@bsol-oss/react-datatable5 12.0.0-beta.74 → 12.0.0-beta.75
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 +133 -126
- package/dist/index.js +567 -253
- package/dist/index.mjs +569 -256
- package/dist/types/components/Form/SchemaFormContext.d.ts +3 -2
- package/dist/types/components/Form/components/fields/BooleanPicker.d.ts +1 -1
- package/dist/types/components/Form/components/fields/ColumnRenderer.d.ts +3 -2
- package/dist/types/components/Form/components/fields/DateTimePicker.d.ts +1 -1
- package/dist/types/components/Form/components/fields/FilePicker.d.ts +1 -1
- package/dist/types/components/Form/components/fields/ObjectInput.d.ts +1 -1
- package/dist/types/components/Form/components/fields/RecordInput.d.ts +1 -1
- package/dist/types/components/Form/components/fields/StringInputField.d.ts +1 -1
- package/dist/types/components/Form/components/fields/TextAreaInput.d.ts +1 -1
- package/dist/types/components/Form/components/fields/TimePicker.d.ts +1 -1
- package/dist/types/components/Form/components/types/CustomJSONSchema7.d.ts +3 -0
- package/dist/types/components/Form/useForm.d.ts +4 -2
- package/dist/types/components/Form/utils/ajvResolver.d.ts +13 -0
- package/dist/types/components/Form/utils/buildErrorMessages.d.ts +5 -1
- package/dist/types/components/Form/utils/getFieldError.d.ts +6 -0
- package/dist/types/components/Form/utils/useFormI18n.d.ts +1 -1
- package/dist/types/components/Form/utils/validateData.d.ts +2 -2
- package/dist/types/components/ui/field.d.ts +3 -3
- package/package.json +1 -1
- package/dist/types/components/Controls/DensityFeature.d.ts +0 -23
- package/dist/types/components/Controls/DensityToggleButton.d.ts +0 -6
- package/dist/types/components/Controls/EditFilterButton.d.ts +0 -9
- package/dist/types/components/Controls/EditOrderButton.d.ts +0 -7
- package/dist/types/components/Controls/EditSortingButton.d.ts +0 -7
- package/dist/types/components/Controls/EditViewButton.d.ts +0 -7
- package/dist/types/components/Controls/FilterDialog.d.ts +0 -5
- package/dist/types/components/Controls/PageSizeControl.d.ts +0 -4
- package/dist/types/components/Controls/Pagination.d.ts +0 -1
- package/dist/types/components/Controls/ResetFilteringButton.d.ts +0 -4
- package/dist/types/components/Controls/ResetSelectionButton.d.ts +0 -4
- package/dist/types/components/Controls/ResetSortingButton.d.ts +0 -4
- package/dist/types/components/Controls/RowCountText.d.ts +0 -1
- package/dist/types/components/Controls/SelectAllRowsToggle.d.ts +0 -8
- package/dist/types/components/Controls/TablePagination.d.ts +0 -1
- package/dist/types/components/Controls/ViewDialog.d.ts +0 -5
- package/dist/types/components/DataTable/CardHeader.d.ts +0 -13
- package/dist/types/components/DataTable/DataDisplay.d.ts +0 -6
- package/dist/types/components/DataTable/ReloadButton.d.ts +0 -5
- package/dist/types/components/DataTable/Table.d.ts +0 -10
- package/dist/types/components/DataTable/TableBody.d.ts +0 -21
- package/dist/types/components/DataTable/TableCardContainer.d.ts +0 -7
- package/dist/types/components/DataTable/TableCards.d.ts +0 -11
- package/dist/types/components/DataTable/TableComponent.d.ts +0 -6
- package/dist/types/components/DataTable/TableControls.d.ts +0 -21
- package/dist/types/components/DataTable/TableFilter.d.ts +0 -1
- package/dist/types/components/DataTable/TableFilterTags.d.ts +0 -1
- package/dist/types/components/DataTable/TableFilters.d.ts +0 -1
- package/dist/types/components/DataTable/TableFooter.d.ts +0 -9
- package/dist/types/components/DataTable/TableHeader.d.ts +0 -13
- package/dist/types/components/DataTable/TableLoadingComponent.d.ts +0 -5
- package/dist/types/components/DataTable/TableOrderer.d.ts +0 -1
- package/dist/types/components/DataTable/TableSelector.d.ts +0 -1
- package/dist/types/components/DataTable/TableSorter.d.ts +0 -1
- package/dist/types/components/DataTable/TableViewer.d.ts +0 -1
- package/dist/types/components/DataTable/TextCell.d.ts +0 -10
- package/dist/types/components/DataTable/components/EmptyState.d.ts +0 -5
- package/dist/types/components/DataTable/components/ErrorAlert.d.ts +0 -4
- package/dist/types/components/DataTable/components/RecordDisplay.d.ts +0 -9
- package/dist/types/components/DataTable/components/TextCell.d.ts +0 -10
- package/dist/types/components/Filter/DateRangeFilter.d.ts +0 -9
- package/dist/types/components/Filter/FilterOptions.d.ts +0 -4
- package/dist/types/components/Form/Form.d.ts +0 -36
- package/dist/types/components/Form/components/ArrayRenderer.d.ts +0 -7
- package/dist/types/components/Form/components/BooleanPicker.d.ts +0 -7
- package/dist/types/components/Form/components/ColumnRenderer.d.ts +0 -7
- package/dist/types/components/Form/components/DatePicker.d.ts +0 -7
- package/dist/types/components/Form/components/EnumPicker.d.ts +0 -8
- package/dist/types/components/Form/components/FilePicker.d.ts +0 -5
- package/dist/types/components/Form/components/IdPicker.d.ts +0 -8
- package/dist/types/components/Form/components/IdViewer.d.ts +0 -5
- package/dist/types/components/Form/components/NumberInputField.d.ts +0 -7
- package/dist/types/components/Form/components/ObjectInput.d.ts +0 -7
- package/dist/types/components/Form/components/RecordInput.d.ts +0 -7
- package/dist/types/components/Form/components/SchemaRenderer.d.ts +0 -7
- package/dist/types/components/Form/components/StringInputField.d.ts +0 -20
- package/dist/types/components/Form/components/TagPicker.d.ts +0 -30
- package/dist/types/components/Form/utils/translateWrapper.d.ts +0 -6
- package/dist/types/components/Form/utils/validation.d.ts +0 -104
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AxiosRequestConfig } from 'axios';
|
|
2
2
|
import { JSONSchema7 } from 'json-schema';
|
|
3
3
|
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
4
|
-
import { FieldValues } from 'react-hook-form';
|
|
4
|
+
import { FieldValues, Resolver } from 'react-hook-form';
|
|
5
5
|
import { UseTranslationResponse } from 'react-i18next';
|
|
6
6
|
import { DateTimePickerLabels, IdPickerLabels, EnumPickerLabels } from './components/types/CustomJSONSchema7';
|
|
7
7
|
export interface SchemaFormContext<TData extends FieldValues> {
|
|
@@ -15,7 +15,7 @@ export interface SchemaFormContext<TData extends FieldValues> {
|
|
|
15
15
|
rowNumber?: number | string;
|
|
16
16
|
idMap: Record<string, object>;
|
|
17
17
|
setIdMap: Dispatch<SetStateAction<Record<string, object>>>;
|
|
18
|
-
translate: UseTranslationResponse<
|
|
18
|
+
translate: UseTranslationResponse<string, string>;
|
|
19
19
|
requestOptions: AxiosRequestConfig;
|
|
20
20
|
isSuccess: boolean;
|
|
21
21
|
setIsSuccess: Dispatch<SetStateAction<boolean>>;
|
|
@@ -43,5 +43,6 @@ export interface SchemaFormContext<TData extends FieldValues> {
|
|
|
43
43
|
dateTimePickerLabels?: DateTimePickerLabels;
|
|
44
44
|
idPickerLabels?: IdPickerLabels;
|
|
45
45
|
enumPickerLabels?: EnumPickerLabels;
|
|
46
|
+
ajvResolver: Resolver<FieldValues>;
|
|
46
47
|
}
|
|
47
48
|
export declare const SchemaFormContext: import("react").Context<SchemaFormContext<unknown>>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { CustomJSONSchema7 } from
|
|
1
|
+
import { CustomJSONSchema7 } from '../types/CustomJSONSchema7';
|
|
2
2
|
export interface ColumnRendererProps {
|
|
3
3
|
column: string;
|
|
4
4
|
properties: Record<string, CustomJSONSchema7>;
|
|
5
5
|
prefix: string;
|
|
6
|
+
parentRequired?: string[];
|
|
6
7
|
}
|
|
7
|
-
export declare const ColumnRenderer: ({ column, properties, prefix, }: ColumnRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const ColumnRenderer: ({ column, properties, prefix, parentRequired, }: ColumnRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { InputDefaultProps } from
|
|
1
|
+
import { InputDefaultProps } from './types';
|
|
2
2
|
export declare const DateTimePicker: ({ column, schema, prefix, }: InputDefaultProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { InputDefaultProps } from
|
|
1
|
+
import { InputDefaultProps } from './types';
|
|
2
2
|
export declare const FilePicker: ({ column, schema, prefix }: InputDefaultProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,6 +2,7 @@ import { JSONSchema7 } from 'json-schema';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { ForeignKeyProps } from '../fields/StringInputField';
|
|
4
4
|
import { UseFormReturn } from 'react-hook-form';
|
|
5
|
+
import { ValidationErrorType } from '../../utils/buildErrorMessages';
|
|
5
6
|
export interface DateTimePickerLabels {
|
|
6
7
|
monthNamesShort?: string[];
|
|
7
8
|
weekdayNamesShort?: string[];
|
|
@@ -52,6 +53,8 @@ export interface CustomJSONSchema7 extends JSONSchema7 {
|
|
|
52
53
|
displayTimeFormat?: string;
|
|
53
54
|
showLabel?: boolean;
|
|
54
55
|
formatOptions?: Intl.NumberFormatOptions;
|
|
56
|
+
numberStorageType?: 'string' | 'number';
|
|
57
|
+
errorMessages?: Partial<Record<ValidationErrorType | string, string>>;
|
|
55
58
|
}
|
|
56
59
|
export interface TagPickerProps {
|
|
57
60
|
column: string;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { FieldValues } from
|
|
2
|
+
import { FieldValues } from 'react-hook-form';
|
|
3
|
+
import { JSONSchema7 } from 'json-schema';
|
|
3
4
|
export interface UseFormProps {
|
|
4
5
|
preLoadedValues?: FieldValues | undefined;
|
|
5
6
|
keyPrefix?: string;
|
|
6
7
|
namespace?: string;
|
|
8
|
+
schema?: JSONSchema7;
|
|
7
9
|
}
|
|
8
|
-
export declare const useForm: ({ preLoadedValues, keyPrefix, namespace }: UseFormProps) => {
|
|
10
|
+
export declare const useForm: ({ preLoadedValues, keyPrefix, namespace, schema, }: UseFormProps) => {
|
|
9
11
|
form: import("react-hook-form").UseFormReturn<FieldValues, any, undefined>;
|
|
10
12
|
idMap: Record<string, object>;
|
|
11
13
|
setIdMap: import("react").Dispatch<import("react").SetStateAction<Record<string, object>>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FieldValues, Resolver } from 'react-hook-form';
|
|
2
|
+
import { ErrorObject } from 'ajv';
|
|
3
|
+
import { CustomJSONSchema7 } from '../components/types/CustomJSONSchema7';
|
|
4
|
+
/**
|
|
5
|
+
* Converts AJV error objects to react-hook-form field errors format
|
|
6
|
+
*/
|
|
7
|
+
export declare const convertAjvErrorsToFieldErrors: (errors: ErrorObject<string, Record<string, unknown>, unknown>[] | null | undefined, schema: CustomJSONSchema7) => Record<string, {
|
|
8
|
+
type: string;
|
|
9
|
+
keyword: string;
|
|
10
|
+
params?: Record<string, unknown>;
|
|
11
|
+
message?: string;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const ajvResolver: <T extends FieldValues>(schema: CustomJSONSchema7) => Resolver<T>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Common validation error types that can be customized
|
|
6
6
|
*/
|
|
7
|
-
export type ValidationErrorType =
|
|
7
|
+
export type ValidationErrorType = 'minLength' | 'maxLength' | 'pattern' | 'minimum' | 'maximum' | 'multipleOf' | 'format' | 'type' | 'enum' | 'required' | 'minItems' | 'maxItems' | 'uniqueItems' | 'minProperties' | 'maxProperties' | 'anyOf' | 'oneOf' | 'allOf' | 'const' | 'additionalProperties' | 'dependencies';
|
|
8
8
|
/**
|
|
9
9
|
* Configuration for field-specific validation errors
|
|
10
10
|
*/
|
|
@@ -115,6 +115,10 @@ export interface ErrorMessageResult {
|
|
|
115
115
|
* ```
|
|
116
116
|
*/
|
|
117
117
|
export declare const buildErrorMessages: (config: ErrorMessageConfig) => ErrorMessageResult;
|
|
118
|
+
/**
|
|
119
|
+
* Converts buildErrorMessages result to ajv-errors compatible format
|
|
120
|
+
*/
|
|
121
|
+
export declare const convertToAjvErrorsFormat: (errorMessages: ErrorMessageResult) => Record<string, any>;
|
|
118
122
|
/**
|
|
119
123
|
* Helper function to build required field errors
|
|
120
124
|
*
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FieldErrors } from 'react-hook-form';
|
|
2
|
+
/**
|
|
3
|
+
* Gets the error message for a specific field from react-hook-form errors
|
|
4
|
+
* Prioritizes required errors (#.required) over field-specific validation errors
|
|
5
|
+
*/
|
|
6
|
+
export declare const getFieldError: (errors: FieldErrors, fieldName: string) => string | undefined;
|
|
@@ -49,5 +49,5 @@ export declare const useFormI18n: (column: string, prefix?: string) => {
|
|
|
49
49
|
/**
|
|
50
50
|
* Access to the original translate object for edge cases
|
|
51
51
|
*/
|
|
52
|
-
translate: import("react-i18next").UseTranslationResponse<
|
|
52
|
+
translate: import("react-i18next").UseTranslationResponse<string, string>;
|
|
53
53
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ErrorObject, ValidateFunction } from
|
|
2
|
-
import { JSONSchema7 } from
|
|
1
|
+
import { ErrorObject, ValidateFunction } from 'ajv';
|
|
2
|
+
import { JSONSchema7 } from 'json-schema';
|
|
3
3
|
type ValidateDataResult = {
|
|
4
4
|
isValid: boolean;
|
|
5
5
|
validate: ValidateFunction;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Field as ChakraField } from
|
|
2
|
-
import * as React from
|
|
3
|
-
export interface FieldProps extends Omit<ChakraField.RootProps,
|
|
1
|
+
import { Field as ChakraField } from '@chakra-ui/react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface FieldProps extends Omit<ChakraField.RootProps, 'label'> {
|
|
4
4
|
label?: React.ReactNode;
|
|
5
5
|
helperText?: React.ReactNode;
|
|
6
6
|
errorText?: React.ReactNode;
|
package/package.json
CHANGED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { OnChangeFn, Updater, RowData, TableFeature } from "@tanstack/react-table";
|
|
2
|
-
export type DensityState = "sm" | "md" | "lg";
|
|
3
|
-
export interface DensityTableState {
|
|
4
|
-
density: DensityState;
|
|
5
|
-
}
|
|
6
|
-
export interface DensityOptions {
|
|
7
|
-
enableDensity?: boolean;
|
|
8
|
-
onDensityChange?: OnChangeFn<DensityState>;
|
|
9
|
-
}
|
|
10
|
-
export interface DensityInstance {
|
|
11
|
-
setDensity: (updater: Updater<DensityState>) => void;
|
|
12
|
-
toggleDensity: (value?: DensityState) => void;
|
|
13
|
-
getDensityValue: (value?: DensityState) => number;
|
|
14
|
-
}
|
|
15
|
-
declare module "@tanstack/react-table" {
|
|
16
|
-
interface TableState extends DensityTableState {
|
|
17
|
-
}
|
|
18
|
-
interface TableOptionsResolved<TData extends RowData> extends DensityOptions {
|
|
19
|
-
}
|
|
20
|
-
interface Table<TData extends RowData> extends DensityInstance {
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export declare const DensityFeature: TableFeature<any>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface EditFilterButtonProps {
|
|
3
|
-
text?: string;
|
|
4
|
-
title?: string;
|
|
5
|
-
closeText?: string;
|
|
6
|
-
resetText?: string;
|
|
7
|
-
icon?: React.ReactElement;
|
|
8
|
-
}
|
|
9
|
-
export declare const EditFilterButton: ({ text, title, closeText, resetText, icon, }: EditFilterButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface EditSortingButtonProps {
|
|
3
|
-
title?: string;
|
|
4
|
-
icon?: React.ReactElement;
|
|
5
|
-
text?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const EditSortingButton: ({ text, icon, title, }: EditSortingButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Pagination: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const RowCountText: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface SelectAllRowsToggleProps {
|
|
3
|
-
selectAllIcon?: React.ReactElement;
|
|
4
|
-
clearAllIcon?: React.ReactElement;
|
|
5
|
-
selectAllText?: string;
|
|
6
|
-
clearAllText?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const SelectAllRowsToggle: ({ selectAllIcon, clearAllIcon, selectAllText, clearAllText, }: SelectAllRowsToggleProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TablePagination: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ImageProps } from "@chakra-ui/react";
|
|
2
|
-
import { Row } from "@tanstack/react-table";
|
|
3
|
-
import { IconType } from "react-icons";
|
|
4
|
-
export interface CardHeaderProps<TData> {
|
|
5
|
-
row: Row<TData>;
|
|
6
|
-
imageColumnId?: keyof TData;
|
|
7
|
-
titleColumnId?: keyof TData;
|
|
8
|
-
tagColumnId?: keyof TData;
|
|
9
|
-
tagIcon?: IconType;
|
|
10
|
-
showTag?: boolean;
|
|
11
|
-
imageProps?: ImageProps;
|
|
12
|
-
}
|
|
13
|
-
export declare const CardHeader: <TData>({ row, imageColumnId, titleColumnId, tagColumnId, tagIcon, showTag, imageProps, }: CardHeaderProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { UseTranslationResponse } from "react-i18next";
|
|
2
|
-
export interface DataDisplayProps {
|
|
3
|
-
variant?: "horizontal" | "stats" | "";
|
|
4
|
-
translate?: UseTranslationResponse<any, any>;
|
|
5
|
-
}
|
|
6
|
-
export declare const DataDisplay: ({ variant }: DataDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { TableRootProps } from "@chakra-ui/react";
|
|
2
|
-
import { ReactNode } from "react";
|
|
3
|
-
export interface TableProps extends TableRootProps {
|
|
4
|
-
showLoading?: boolean;
|
|
5
|
-
loadingComponent?: ReactNode;
|
|
6
|
-
emptyComponent?: ReactNode;
|
|
7
|
-
canResize?: boolean;
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
}
|
|
10
|
-
export declare const Table: ({ children, emptyComponent, canResize, ...props }: TableProps) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Row } from "@tanstack/react-table";
|
|
2
|
-
export interface TableBodyProps {
|
|
3
|
-
pinnedBgColor?: {
|
|
4
|
-
light: string;
|
|
5
|
-
dark: string;
|
|
6
|
-
};
|
|
7
|
-
showSelector?: boolean;
|
|
8
|
-
alwaysShowSelector?: boolean;
|
|
9
|
-
canResize?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface TableRowSelectorProps<TData> {
|
|
12
|
-
index: number;
|
|
13
|
-
row: Row<TData>;
|
|
14
|
-
hoveredRow: number;
|
|
15
|
-
pinnedBgColor?: {
|
|
16
|
-
light: string;
|
|
17
|
-
dark: string;
|
|
18
|
-
};
|
|
19
|
-
alwaysShowSelector?: boolean;
|
|
20
|
-
}
|
|
21
|
-
export declare const TableBody: ({ pinnedBgColor, showSelector, alwaysShowSelector, canResize, }: TableBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { GridProps } from "@chakra-ui/react";
|
|
2
|
-
import { ReactNode } from "react";
|
|
3
|
-
export interface TableCardContainerProps extends GridProps {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
variant?: "carousel" | "";
|
|
6
|
-
}
|
|
7
|
-
export declare const TableCardContainer: ({ children, variant, ...props }: TableCardContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CardBodyProps } from "@chakra-ui/react";
|
|
2
|
-
import { Row } from "@tanstack/react-table";
|
|
3
|
-
import { ReactNode } from "react";
|
|
4
|
-
export interface TableCardsProps<TData> {
|
|
5
|
-
isSelectable?: boolean;
|
|
6
|
-
showDisplayNameOnly?: boolean;
|
|
7
|
-
renderTitle?: (row: Row<TData>) => ReactNode | undefined;
|
|
8
|
-
cardBodyProps?: CardBodyProps;
|
|
9
|
-
}
|
|
10
|
-
export declare const DefaultCardTitle: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export declare const TableCards: <TData>({ isSelectable, showDisplayNameOnly, renderTitle, cardBodyProps, }: TableCardsProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Table } from "@tanstack/react-table";
|
|
2
|
-
import React from "react";
|
|
3
|
-
export interface TableRendererProps<TData> {
|
|
4
|
-
render: (render: Table<TData>) => React.ReactElement;
|
|
5
|
-
}
|
|
6
|
-
export declare const TableComponent: <TData>({ render, }: TableRendererProps<TData>) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
export interface TableControlsProps {
|
|
3
|
-
totalText?: string;
|
|
4
|
-
fitTableWidth?: boolean;
|
|
5
|
-
fitTableHeight?: boolean;
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
showGlobalFilter?: boolean;
|
|
8
|
-
showFilter?: boolean;
|
|
9
|
-
showFilterName?: boolean;
|
|
10
|
-
showFilterTags?: boolean;
|
|
11
|
-
showReload?: boolean;
|
|
12
|
-
showPagination?: boolean;
|
|
13
|
-
showPageSizeControl?: boolean;
|
|
14
|
-
showPageCountText?: boolean;
|
|
15
|
-
showView?: boolean;
|
|
16
|
-
filterOptions?: string[];
|
|
17
|
-
extraItems?: ReactNode;
|
|
18
|
-
loading?: boolean;
|
|
19
|
-
hasError?: boolean;
|
|
20
|
-
}
|
|
21
|
-
export declare const TableControls: ({ fitTableWidth, fitTableHeight, children, showGlobalFilter, showFilter, showFilterName, showFilterTags, showReload, showPagination, showPageSizeControl, showPageCountText, showView, filterOptions, extraItems, loading, hasError, }: TableControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TableFilter: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TableFilterTags: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TableFilter: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface TableFooterProps {
|
|
2
|
-
pinnedBgColor?: {
|
|
3
|
-
light: string;
|
|
4
|
-
dark: string;
|
|
5
|
-
};
|
|
6
|
-
showSelector?: boolean;
|
|
7
|
-
alwaysShowSelector?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare const TableFooter: ({ pinnedBgColor, showSelector, alwaysShowSelector, }: TableFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { TableHeaderProps as ChakraTableHeaderProps } from "@chakra-ui/react";
|
|
2
|
-
export interface TableHeaderProps {
|
|
3
|
-
canResize?: boolean;
|
|
4
|
-
pinnedBgColor?: {
|
|
5
|
-
light: string;
|
|
6
|
-
dark: string;
|
|
7
|
-
};
|
|
8
|
-
showSelector?: boolean;
|
|
9
|
-
isSticky?: boolean;
|
|
10
|
-
alwaysShowSelector?: boolean;
|
|
11
|
-
tHeadProps?: ChakraTableHeaderProps;
|
|
12
|
-
}
|
|
13
|
-
export declare const TableHeader: ({ canResize, pinnedBgColor, showSelector, isSticky, alwaysShowSelector, tHeadProps, }: TableHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TableOrderer: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TableSelector: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TableSorter: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TableViewer: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FlexProps, TextProps } from "@chakra-ui/react";
|
|
2
|
-
import { ReactNode } from "react";
|
|
3
|
-
export interface TextCellProps {
|
|
4
|
-
label?: string;
|
|
5
|
-
noOfLines?: number[];
|
|
6
|
-
children: string | number | ReactNode | ReactNode[];
|
|
7
|
-
containerProps?: FlexProps;
|
|
8
|
-
textProps?: TextProps;
|
|
9
|
-
}
|
|
10
|
-
export declare const TextCell: ({ label, containerProps, textProps, children, }: TextCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BoxProps } from "@chakra-ui/react";
|
|
2
|
-
import { UseTranslationResponse } from "react-i18next";
|
|
3
|
-
export interface RecordDisplayProps {
|
|
4
|
-
object: object | null;
|
|
5
|
-
boxProps?: BoxProps;
|
|
6
|
-
translate?: UseTranslationResponse<any, any>;
|
|
7
|
-
prefix?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const RecordDisplay: ({ object, boxProps, translate, prefix, }: RecordDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FlexProps, TextProps } from "@chakra-ui/react";
|
|
2
|
-
import { ReactNode } from "react";
|
|
3
|
-
export interface TextCellProps {
|
|
4
|
-
label?: string;
|
|
5
|
-
noOfLines?: number[];
|
|
6
|
-
children: string | number | ReactNode | ReactNode[];
|
|
7
|
-
containerProps?: FlexProps;
|
|
8
|
-
textProps?: TextProps;
|
|
9
|
-
}
|
|
10
|
-
export declare const TextCell: ({ label, containerProps, textProps, children, }: TextCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface DateRangeFilterProps {
|
|
3
|
-
startDate: string;
|
|
4
|
-
endDate: string;
|
|
5
|
-
setStartDate: (value: string) => void;
|
|
6
|
-
setEndDate: (value: string) => void;
|
|
7
|
-
}
|
|
8
|
-
export declare const DateRangeFilter: React.FC<DateRangeFilterProps>;
|
|
9
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { ForeignKeyProps } from "@/components/Form/components/fields/StringInputField";
|
|
2
|
-
import { AxiosRequestConfig } from "axios";
|
|
3
|
-
import { JSONSchema7 } from "json-schema";
|
|
4
|
-
import { Dispatch, SetStateAction } from "react";
|
|
5
|
-
import { FieldValues, SubmitHandler, UseFormReturn } from "react-hook-form";
|
|
6
|
-
import { UseTranslationResponse } from "react-i18next";
|
|
7
|
-
export interface FormProps<TData extends FieldValues> {
|
|
8
|
-
schema: JSONSchema7;
|
|
9
|
-
serverUrl: string;
|
|
10
|
-
requestUrl?: string;
|
|
11
|
-
idMap: Record<string, object>;
|
|
12
|
-
setIdMap: Dispatch<SetStateAction<Record<string, object>>>;
|
|
13
|
-
form: UseFormReturn;
|
|
14
|
-
translate: UseTranslationResponse<any, any>;
|
|
15
|
-
order?: string[];
|
|
16
|
-
ignore?: string[];
|
|
17
|
-
include?: string[];
|
|
18
|
-
onSubmit?: SubmitHandler<TData>;
|
|
19
|
-
rowNumber?: number | string;
|
|
20
|
-
requestOptions?: AxiosRequestConfig;
|
|
21
|
-
}
|
|
22
|
-
export interface CustomJSONSchema7Definition extends JSONSchema7 {
|
|
23
|
-
variant: string;
|
|
24
|
-
in_table: string;
|
|
25
|
-
column_ref: string;
|
|
26
|
-
display_column: string;
|
|
27
|
-
gridColumn: string;
|
|
28
|
-
gridRow: string;
|
|
29
|
-
foreign_key: ForeignKeyProps;
|
|
30
|
-
}
|
|
31
|
-
export declare const idPickerSanityCheck: (column: string, foreign_key?: {
|
|
32
|
-
table?: string | undefined;
|
|
33
|
-
column?: string | undefined;
|
|
34
|
-
display_column?: string | undefined;
|
|
35
|
-
} | undefined) => void;
|
|
36
|
-
export declare const Form: <TData extends FieldValues>({ schema, idMap, setIdMap, form, serverUrl, translate, order, ignore, include, onSubmit, rowNumber, requestOptions, }: FormProps<TData>) => import("react/jsx-runtime").JSX.Element;
|