@bsol-oss/react-datatable5 13.0.1-beta.37 → 13.0.1-beta.38
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.d.ts +3 -11
- package/dist/index.js +10 -59
- package/dist/index.mjs +11 -59
- package/dist/types/components/Form/SchemaFormContext.d.ts +0 -5
- package/dist/types/components/Form/components/core/DefaultForm.d.ts +3 -4
- package/dist/types/components/Form/components/core/FormRoot.d.ts +1 -6
- package/dist/types/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/types/components/Form/components/core/FormTitle.d.ts +0 -1
- package/dist/types/components/Form/components/core/SubmitButton.d.ts +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -700,11 +700,6 @@ interface FormRootProps<TData extends FieldValues> {
|
|
|
700
700
|
setIdMap: Dispatch<SetStateAction<Record<string, unknown>>>;
|
|
701
701
|
form: UseFormReturn<TData, any, TData>;
|
|
702
702
|
children: ReactNode;
|
|
703
|
-
displayConfig?: {
|
|
704
|
-
showSubmitButton?: boolean;
|
|
705
|
-
showResetButton?: boolean;
|
|
706
|
-
showTitle?: boolean;
|
|
707
|
-
};
|
|
708
703
|
dateTimePickerLabels?: DateTimePickerLabels;
|
|
709
704
|
idPickerLabels?: IdPickerLabels;
|
|
710
705
|
enumPickerLabels?: EnumPickerLabels;
|
|
@@ -720,16 +715,13 @@ interface CustomJSONSchema7Definition extends JSONSchema7 {
|
|
|
720
715
|
customQueryFn: any;
|
|
721
716
|
children: ReactNode;
|
|
722
717
|
}
|
|
723
|
-
declare const FormRoot: <TData extends FieldValues>({ schema, idMap, setIdMap, form, children,
|
|
718
|
+
declare const FormRoot: <TData extends FieldValues>({ schema, idMap, setIdMap, form, children, dateTimePickerLabels, idPickerLabels, enumPickerLabels, filePickerLabels, formButtonLabels, timePickerLabels, insideDialog, }: FormRootProps<TData>) => react_jsx_runtime.JSX.Element;
|
|
724
719
|
|
|
725
720
|
interface DefaultFormProps<TData extends FieldValues> {
|
|
726
|
-
formConfig: Omit<FormRootProps<TData>,
|
|
727
|
-
showTitle?: boolean;
|
|
721
|
+
formConfig: Omit<FormRootProps<TData>, 'children'>;
|
|
728
722
|
}
|
|
729
723
|
declare const DefaultForm: <TData extends FieldValues>({ formConfig, }: DefaultFormProps<TData>) => react_jsx_runtime.JSX.Element;
|
|
730
724
|
|
|
731
|
-
declare const FormTitle: () => react_jsx_runtime.JSX.Element;
|
|
732
|
-
|
|
733
725
|
declare const FormBody: () => react_jsx_runtime.JSX.Element;
|
|
734
726
|
|
|
735
727
|
type MediaLibraryBrowserPropsBase = {
|
|
@@ -1477,4 +1469,4 @@ declare module '@tanstack/react-table' {
|
|
|
1477
1469
|
}
|
|
1478
1470
|
}
|
|
1479
1471
|
|
|
1480
|
-
export { CalendarDisplay, type CalendarDisplayProps, type CalendarEvent, type CalendarProps, CardHeader, type CardHeaderProps, type CustomJSONSchema7, type CustomJSONSchema7Definition, type CustomQueryFn, type CustomQueryFnParams, type CustomQueryFnResponse, DataDisplay, type DataDisplayProps, type DataResponse, DataTable, type DataTableDefaultState, type DataTableProps, DataTableServer, type DataTableServerProps, DatePickerContext, DatePickerInput, type DatePickerInputProps, type DatePickerLabels, type DatePickerProps, type DateTimePickerLabels, DefaultCardTitle, DefaultForm, type DefaultFormProps, DefaultTable, type DefaultTableProps, DefaultTableServer, type DefaultTableServerProps, DensityToggleButton, type DensityToggleButtonProps, type EditFilterButtonProps, EditSortingButton, type EditSortingButtonProps, type EditViewButtonProps, EmptyState, type EmptyStateProps, type EnumPickerLabels, ErrorAlert, type ErrorAlertProps, type FilePickerLabels, type FilePickerMediaFile, type FilePickerProps, FilterDialog, FormBody, type FormButtonLabels, FormRoot, type FormRootProps,
|
|
1472
|
+
export { CalendarDisplay, type CalendarDisplayProps, type CalendarEvent, type CalendarProps, CardHeader, type CardHeaderProps, type CustomJSONSchema7, type CustomJSONSchema7Definition, type CustomQueryFn, type CustomQueryFnParams, type CustomQueryFnResponse, DataDisplay, type DataDisplayProps, type DataResponse, DataTable, type DataTableDefaultState, type DataTableProps, DataTableServer, type DataTableServerProps, DatePickerContext, DatePickerInput, type DatePickerInputProps, type DatePickerLabels, type DatePickerProps, type DateTimePickerLabels, DefaultCardTitle, DefaultForm, type DefaultFormProps, DefaultTable, type DefaultTableProps, DefaultTableServer, type DefaultTableServerProps, DensityToggleButton, type DensityToggleButtonProps, type EditFilterButtonProps, EditSortingButton, type EditSortingButtonProps, type EditViewButtonProps, EmptyState, type EmptyStateProps, type EnumPickerLabels, ErrorAlert, type ErrorAlertProps, type FilePickerLabels, type FilePickerMediaFile, type FilePickerProps, FilterDialog, FormBody, type FormButtonLabels, FormRoot, type FormRootProps, type GetDateColorProps, type GetMultiDatesProps, type GetRangeDatesProps, type GetStyleProps, type GetVariantProps, GlobalFilter, type IdPickerLabels, type LoadInitialValuesParams, type LoadInitialValuesResult, MediaLibraryBrowser, type MediaLibraryBrowserProps, PageSizeControl, type PageSizeControlProps, Pagination, type QueryParams, type RangeCalendarProps, type RangeDatePickerLabels, type RangeDatePickerProps, RecordDisplay, type RecordDisplayProps, ReloadButton, type ReloadButtonProps, ResetFilteringButton, ResetSelectionButton, ResetSortingButton, type Result, RowCountText, SelectAllRowsToggle, type SelectAllRowsToggleProps, Table, TableBody, type TableBodyProps, TableCardContainer, type TableCardContainerProps, TableCards, type TableCardsProps, TableComponent, TableControls, type TableControlsProps, TableDataDisplay, type TableDataDisplayProps, TableFilter, TableFilterTags, type TableFilterTagsProps, TableFooter, type TableFooterProps, TableHeader, type TableHeaderProps, type TableHeaderTexts, TableLoadingComponent, type TableLoadingComponentProps, type TableProps, type TableRendererProps, type TableRowSelectorProps, TableSelector, TableSorter, TableViewer, TextCell, type TextCellProps, type TimePickerLabels, TimeRangeZoom, type TimeRangeZoomLabels, type TimeRangeZoomProps, TimeViewportBlock, type TimeViewportBlockItem, type TimeViewportBlockProps, type TimeViewportBlockRenderArgs, TimeViewportBlocks, type TimeViewportBlocksProps, TimeViewportGrid, type TimeViewportGridProps, TimeViewportHeader, type TimeViewportHeaderProps, type TimeViewportHeaderTick, TimeViewportMarkerLine, type TimeViewportMarkerLineProps, TimeViewportRoot, type TimeViewportRootProps, type TimeViewportTrackRenderArgs, type UseDataTableProps, type UseDataTableReturn, type UseDataTableServerProps, type UseDataTableServerReturn, type UseFormProps, type UseTimeRangeZoomResult, type UseTimeViewportBlockGeometryResult, type UseTimeViewportDerivedResult, type UseTimeViewportTicksResult, type ValidationErrorType, ViewDialog, type ViewableTimeRange, defaultRenderDisplay, getMultiDates, getRangeDates, useDataTable, useDataTableContext, useDataTableServer, useForm, useTimeRangeZoom, useTimeViewport, useTimeViewportBlockGeometry, useTimeViewportHeader, useTimeViewportTicks };
|
package/dist/index.js
CHANGED
|
@@ -4190,11 +4190,6 @@ const SchemaFormContext = React.createContext({
|
|
|
4190
4190
|
schema: {},
|
|
4191
4191
|
onSubmit: async () => { },
|
|
4192
4192
|
timezone: 'Asia/Hong_Kong',
|
|
4193
|
-
displayConfig: {
|
|
4194
|
-
showSubmitButton: false,
|
|
4195
|
-
showResetButton: false,
|
|
4196
|
-
showTitle: true,
|
|
4197
|
-
},
|
|
4198
4193
|
});
|
|
4199
4194
|
|
|
4200
4195
|
const useSchemaContext = () => {
|
|
@@ -7848,66 +7843,24 @@ const ColumnRenderer = ({ column, properties, prefix, parentRequired, }) => {
|
|
|
7848
7843
|
return jsxRuntime.jsx(SchemaRenderer, { schema: schemaWithRequired, prefix, column });
|
|
7849
7844
|
};
|
|
7850
7845
|
|
|
7851
|
-
const SubmitButton = () => {
|
|
7852
|
-
const { onSubmit, formButtonLabels } = useSchemaContext();
|
|
7853
|
-
const methods = reactHookForm.useFormContext();
|
|
7854
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7855
|
-
const onValid = async (data) => {
|
|
7856
|
-
// Validation is handled by react-hook-form
|
|
7857
|
-
// This function will only be called if validation passes
|
|
7858
|
-
if (onSubmit) {
|
|
7859
|
-
await onSubmit(data);
|
|
7860
|
-
}
|
|
7861
|
-
};
|
|
7862
|
-
return (jsxRuntime.jsx(react.Button, { onClick: () => {
|
|
7863
|
-
methods.handleSubmit(onValid)();
|
|
7864
|
-
}, formNoValidate: true, children: formButtonLabels?.submit ?? 'Submit' }));
|
|
7865
|
-
};
|
|
7866
|
-
|
|
7867
7846
|
const FormBody = () => {
|
|
7868
|
-
const { schema
|
|
7869
|
-
const { showSubmitButton, showResetButton } = displayConfig;
|
|
7870
|
-
const methods = reactHookForm.useFormContext();
|
|
7871
|
-
console.log('errors', methods.formState.errors);
|
|
7847
|
+
const { schema } = useSchemaContext();
|
|
7872
7848
|
const { properties } = schema;
|
|
7873
7849
|
const ordered = Object.keys(properties);
|
|
7874
|
-
return (jsxRuntime.
|
|
7875
|
-
|
|
7876
|
-
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
methods.reset();
|
|
7882
|
-
}, variant: 'subtle', children: formButtonLabels?.reset ?? 'Reset' })), showSubmitButton && jsxRuntime.jsx(SubmitButton, {})] }))] }));
|
|
7883
|
-
};
|
|
7884
|
-
|
|
7885
|
-
const FormTitle = () => {
|
|
7886
|
-
const { schema } = useSchemaContext();
|
|
7887
|
-
// Debug log when form title is missing
|
|
7888
|
-
if (!schema.title) {
|
|
7889
|
-
console.debug('[Form Title] Missing title in root schema. Add title property to schema.', {
|
|
7890
|
-
schema: {
|
|
7891
|
-
type: schema.type,
|
|
7892
|
-
properties: schema.properties
|
|
7893
|
-
? Object.keys(schema.properties)
|
|
7894
|
-
: undefined,
|
|
7895
|
-
},
|
|
7896
|
-
});
|
|
7897
|
-
}
|
|
7898
|
-
return jsxRuntime.jsx(react.Heading, { children: schema.title ?? 'Form' });
|
|
7850
|
+
return (jsxRuntime.jsx(react.Flex, { flexFlow: 'column', gap: "2", children: jsxRuntime.jsx(react.Grid, { gap: "4", gridTemplateColumns: 'repeat(12, 1fr)', autoFlow: 'row', children: ordered.map((column) => {
|
|
7851
|
+
if (!properties) {
|
|
7852
|
+
console.error('properties is undefined when using FormBody', schema);
|
|
7853
|
+
return null;
|
|
7854
|
+
}
|
|
7855
|
+
return (jsxRuntime.jsx(ColumnRenderer, { properties: properties, prefix: ``, parentRequired: schema.required, column }, `form-input-${column}`));
|
|
7856
|
+
}) }) }));
|
|
7899
7857
|
};
|
|
7900
7858
|
|
|
7901
|
-
const FormRoot = ({ schema, idMap, setIdMap, form, children,
|
|
7902
|
-
showSubmitButton: false,
|
|
7903
|
-
showResetButton: false,
|
|
7904
|
-
showTitle: true,
|
|
7905
|
-
}, dateTimePickerLabels, idPickerLabels, enumPickerLabels, filePickerLabels, formButtonLabels, timePickerLabels, insideDialog = false, }) => {
|
|
7859
|
+
const FormRoot = ({ schema, idMap, setIdMap, form, children, dateTimePickerLabels, idPickerLabels, enumPickerLabels, filePickerLabels, formButtonLabels, timePickerLabels, insideDialog = false, }) => {
|
|
7906
7860
|
return (jsxRuntime.jsx(SchemaFormContext.Provider, { value: {
|
|
7907
7861
|
schema,
|
|
7908
7862
|
idMap,
|
|
7909
7863
|
setIdMap,
|
|
7910
|
-
displayConfig,
|
|
7911
7864
|
dateTimePickerLabels,
|
|
7912
7865
|
idPickerLabels,
|
|
7913
7866
|
enumPickerLabels,
|
|
@@ -7919,8 +7872,7 @@ const FormRoot = ({ schema, idMap, setIdMap, form, children, displayConfig = {
|
|
|
7919
7872
|
};
|
|
7920
7873
|
|
|
7921
7874
|
const DefaultForm = ({ formConfig, }) => {
|
|
7922
|
-
|
|
7923
|
-
return (jsxRuntime.jsx(FormRoot, { ...formConfig, children: jsxRuntime.jsxs(react.Grid, { gap: "2", children: [showTitle && jsxRuntime.jsx(FormTitle, {}), jsxRuntime.jsx(FormBody, {})] }) }));
|
|
7875
|
+
return (jsxRuntime.jsx(FormRoot, { ...formConfig, children: jsxRuntime.jsx(react.Grid, { gap: "2", children: jsxRuntime.jsx(FormBody, {}) }) }));
|
|
7924
7876
|
};
|
|
7925
7877
|
|
|
7926
7878
|
function useForm({ preLoadedValues, schema, }) {
|
|
@@ -9500,7 +9452,6 @@ exports.ErrorAlert = ErrorAlert;
|
|
|
9500
9452
|
exports.FilterDialog = FilterDialog;
|
|
9501
9453
|
exports.FormBody = FormBody;
|
|
9502
9454
|
exports.FormRoot = FormRoot;
|
|
9503
|
-
exports.FormTitle = FormTitle;
|
|
9504
9455
|
exports.GlobalFilter = GlobalFilter;
|
|
9505
9456
|
exports.MediaLibraryBrowser = MediaLibraryBrowser;
|
|
9506
9457
|
exports.PageSizeControl = PageSizeControl;
|
package/dist/index.mjs
CHANGED
|
@@ -4170,11 +4170,6 @@ const SchemaFormContext = createContext({
|
|
|
4170
4170
|
schema: {},
|
|
4171
4171
|
onSubmit: async () => { },
|
|
4172
4172
|
timezone: 'Asia/Hong_Kong',
|
|
4173
|
-
displayConfig: {
|
|
4174
|
-
showSubmitButton: false,
|
|
4175
|
-
showResetButton: false,
|
|
4176
|
-
showTitle: true,
|
|
4177
|
-
},
|
|
4178
4173
|
});
|
|
4179
4174
|
|
|
4180
4175
|
const useSchemaContext = () => {
|
|
@@ -7828,66 +7823,24 @@ const ColumnRenderer = ({ column, properties, prefix, parentRequired, }) => {
|
|
|
7828
7823
|
return jsx(SchemaRenderer, { schema: schemaWithRequired, prefix, column });
|
|
7829
7824
|
};
|
|
7830
7825
|
|
|
7831
|
-
const SubmitButton = () => {
|
|
7832
|
-
const { onSubmit, formButtonLabels } = useSchemaContext();
|
|
7833
|
-
const methods = useFormContext();
|
|
7834
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7835
|
-
const onValid = async (data) => {
|
|
7836
|
-
// Validation is handled by react-hook-form
|
|
7837
|
-
// This function will only be called if validation passes
|
|
7838
|
-
if (onSubmit) {
|
|
7839
|
-
await onSubmit(data);
|
|
7840
|
-
}
|
|
7841
|
-
};
|
|
7842
|
-
return (jsx(Button$1, { onClick: () => {
|
|
7843
|
-
methods.handleSubmit(onValid)();
|
|
7844
|
-
}, formNoValidate: true, children: formButtonLabels?.submit ?? 'Submit' }));
|
|
7845
|
-
};
|
|
7846
|
-
|
|
7847
7826
|
const FormBody = () => {
|
|
7848
|
-
const { schema
|
|
7849
|
-
const { showSubmitButton, showResetButton } = displayConfig;
|
|
7850
|
-
const methods = useFormContext();
|
|
7851
|
-
console.log('errors', methods.formState.errors);
|
|
7827
|
+
const { schema } = useSchemaContext();
|
|
7852
7828
|
const { properties } = schema;
|
|
7853
7829
|
const ordered = Object.keys(properties);
|
|
7854
|
-
return (
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
methods.reset();
|
|
7862
|
-
}, variant: 'subtle', children: formButtonLabels?.reset ?? 'Reset' })), showSubmitButton && jsx(SubmitButton, {})] }))] }));
|
|
7863
|
-
};
|
|
7864
|
-
|
|
7865
|
-
const FormTitle = () => {
|
|
7866
|
-
const { schema } = useSchemaContext();
|
|
7867
|
-
// Debug log when form title is missing
|
|
7868
|
-
if (!schema.title) {
|
|
7869
|
-
console.debug('[Form Title] Missing title in root schema. Add title property to schema.', {
|
|
7870
|
-
schema: {
|
|
7871
|
-
type: schema.type,
|
|
7872
|
-
properties: schema.properties
|
|
7873
|
-
? Object.keys(schema.properties)
|
|
7874
|
-
: undefined,
|
|
7875
|
-
},
|
|
7876
|
-
});
|
|
7877
|
-
}
|
|
7878
|
-
return jsx(Heading, { children: schema.title ?? 'Form' });
|
|
7830
|
+
return (jsx(Flex, { flexFlow: 'column', gap: "2", children: jsx(Grid, { gap: "4", gridTemplateColumns: 'repeat(12, 1fr)', autoFlow: 'row', children: ordered.map((column) => {
|
|
7831
|
+
if (!properties) {
|
|
7832
|
+
console.error('properties is undefined when using FormBody', schema);
|
|
7833
|
+
return null;
|
|
7834
|
+
}
|
|
7835
|
+
return (jsx(ColumnRenderer, { properties: properties, prefix: ``, parentRequired: schema.required, column }, `form-input-${column}`));
|
|
7836
|
+
}) }) }));
|
|
7879
7837
|
};
|
|
7880
7838
|
|
|
7881
|
-
const FormRoot = ({ schema, idMap, setIdMap, form, children,
|
|
7882
|
-
showSubmitButton: false,
|
|
7883
|
-
showResetButton: false,
|
|
7884
|
-
showTitle: true,
|
|
7885
|
-
}, dateTimePickerLabels, idPickerLabels, enumPickerLabels, filePickerLabels, formButtonLabels, timePickerLabels, insideDialog = false, }) => {
|
|
7839
|
+
const FormRoot = ({ schema, idMap, setIdMap, form, children, dateTimePickerLabels, idPickerLabels, enumPickerLabels, filePickerLabels, formButtonLabels, timePickerLabels, insideDialog = false, }) => {
|
|
7886
7840
|
return (jsx(SchemaFormContext.Provider, { value: {
|
|
7887
7841
|
schema,
|
|
7888
7842
|
idMap,
|
|
7889
7843
|
setIdMap,
|
|
7890
|
-
displayConfig,
|
|
7891
7844
|
dateTimePickerLabels,
|
|
7892
7845
|
idPickerLabels,
|
|
7893
7846
|
enumPickerLabels,
|
|
@@ -7899,8 +7852,7 @@ const FormRoot = ({ schema, idMap, setIdMap, form, children, displayConfig = {
|
|
|
7899
7852
|
};
|
|
7900
7853
|
|
|
7901
7854
|
const DefaultForm = ({ formConfig, }) => {
|
|
7902
|
-
|
|
7903
|
-
return (jsx(FormRoot, { ...formConfig, children: jsxs(Grid, { gap: "2", children: [showTitle && jsx(FormTitle, {}), jsx(FormBody, {})] }) }));
|
|
7855
|
+
return (jsx(FormRoot, { ...formConfig, children: jsx(Grid, { gap: "2", children: jsx(FormBody, {}) }) }));
|
|
7904
7856
|
};
|
|
7905
7857
|
|
|
7906
7858
|
function useForm({ preLoadedValues, schema, }) {
|
|
@@ -9462,4 +9414,4 @@ function DataTableServer({ columns, enableRowSelection = true, enableMultiRowSel
|
|
|
9462
9414
|
}, children: jsx(DataTableServerContext.Provider, { value: { url: url ?? '', query }, children: children }) }));
|
|
9463
9415
|
}
|
|
9464
9416
|
|
|
9465
|
-
export { CalendarDisplay, CardHeader, DataDisplay, DataTable, DataTableServer, DatePickerContext, DatePickerInput, DefaultCardTitle, DefaultForm, DefaultTable, DefaultTableServer, DensityToggleButton, EditSortingButton, EmptyState, ErrorAlert, FilterDialog, FormBody, FormRoot,
|
|
9417
|
+
export { CalendarDisplay, CardHeader, DataDisplay, DataTable, DataTableServer, DatePickerContext, DatePickerInput, DefaultCardTitle, DefaultForm, DefaultTable, DefaultTableServer, DensityToggleButton, EditSortingButton, EmptyState, ErrorAlert, FilterDialog, FormBody, FormRoot, GlobalFilter, MediaLibraryBrowser, PageSizeControl, Pagination, RecordDisplay, ReloadButton, ResetFilteringButton, ResetSelectionButton, ResetSortingButton, RowCountText, SelectAllRowsToggle, Table, TableBody, TableCardContainer, TableCards, TableComponent, TableControls, TableDataDisplay, TableFilter, TableFilterTags, TableFooter, TableHeader, TableLoadingComponent, TableSelector, TableSorter, TableViewer, TextCell, TimeRangeZoom, TimeViewportBlock, TimeViewportBlocks, TimeViewportGrid, TimeViewportHeader, TimeViewportMarkerLine, TimeViewportRoot, ViewDialog, defaultRenderDisplay, getMultiDates, getRangeDates, useDataTable, useDataTableContext, useDataTableServer, useForm, useTimeRangeZoom, useTimeViewport, useTimeViewportBlockGeometry, useTimeViewportHeader, useTimeViewportTicks };
|
|
@@ -7,11 +7,6 @@ export interface SchemaFormContext<TData extends FieldValues> {
|
|
|
7
7
|
idMap: Record<string, unknown>;
|
|
8
8
|
setIdMap: Dispatch<SetStateAction<Record<string, unknown>>>;
|
|
9
9
|
timezone?: string;
|
|
10
|
-
displayConfig: {
|
|
11
|
-
showSubmitButton?: boolean;
|
|
12
|
-
showResetButton?: boolean;
|
|
13
|
-
showTitle?: boolean;
|
|
14
|
-
};
|
|
15
10
|
dateTimePickerLabels?: DateTimePickerLabels;
|
|
16
11
|
idPickerLabels?: IdPickerLabels;
|
|
17
12
|
enumPickerLabels?: EnumPickerLabels;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { FormRootProps } from
|
|
2
|
-
import { FieldValues } from
|
|
1
|
+
import { FormRootProps } from './FormRoot';
|
|
2
|
+
import { FieldValues } from 'react-hook-form';
|
|
3
3
|
export interface DefaultFormProps<TData extends FieldValues> {
|
|
4
|
-
formConfig: Omit<FormRootProps<TData>,
|
|
5
|
-
showTitle?: boolean;
|
|
4
|
+
formConfig: Omit<FormRootProps<TData>, 'children'>;
|
|
6
5
|
}
|
|
7
6
|
export declare const DefaultForm: <TData extends FieldValues>({ formConfig, }: DefaultFormProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -33,11 +33,6 @@ export interface FormRootProps<TData extends FieldValues> {
|
|
|
33
33
|
setIdMap: Dispatch<SetStateAction<Record<string, unknown>>>;
|
|
34
34
|
form: UseFormReturn<TData, any, TData>;
|
|
35
35
|
children: ReactNode;
|
|
36
|
-
displayConfig?: {
|
|
37
|
-
showSubmitButton?: boolean;
|
|
38
|
-
showResetButton?: boolean;
|
|
39
|
-
showTitle?: boolean;
|
|
40
|
-
};
|
|
41
36
|
dateTimePickerLabels?: DateTimePickerLabels;
|
|
42
37
|
idPickerLabels?: IdPickerLabels;
|
|
43
38
|
enumPickerLabels?: EnumPickerLabels;
|
|
@@ -53,4 +48,4 @@ export interface CustomJSONSchema7Definition extends JSONSchema7 {
|
|
|
53
48
|
customQueryFn: any;
|
|
54
49
|
children: ReactNode;
|
|
55
50
|
}
|
|
56
|
-
export declare const FormRoot: <TData extends FieldValues>({ schema, idMap, setIdMap, form, children,
|
|
51
|
+
export declare const FormRoot: <TData extends FieldValues>({ schema, idMap, setIdMap, form, children, dateTimePickerLabels, idPickerLabels, enumPickerLabels, filePickerLabels, formButtonLabels, timePickerLabels, insideDialog, }: FormRootProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -125,7 +125,6 @@ export * from './components/DataTable/useDataTableServer';
|
|
|
125
125
|
export * from './components/DataTable/context/useDataTableContext';
|
|
126
126
|
export * from './components/Form/components/core/DefaultForm';
|
|
127
127
|
export * from './components/Form/components/core/FormRoot';
|
|
128
|
-
export * from './components/Form/components/core/FormTitle';
|
|
129
128
|
export * from './components/Form/components/core/FormBody';
|
|
130
129
|
export * from './components/Form/components/types/CustomJSONSchema7';
|
|
131
130
|
export * from './components/Form/components/MediaLibraryBrowser';
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const FormTitle: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SubmitButton: () => import("react/jsx-runtime").JSX.Element;
|