@famalabs/web-ui 1.0.0-beta.32 → 1.0.0-beta.33
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/components/auth/AuthSuccess.d.ts +2 -2
- package/dist/components/auth/PasswordField.d.ts +6 -7
- package/dist/components/common/MainDiv.d.ts +3 -4
- package/dist/components/common/MenuItems.d.ts +4 -5
- package/dist/components/forms/AiEditingContext.d.ts +2 -3
- package/dist/components/forms/AutocompleteField.d.ts +2 -2
- package/dist/components/forms/DateField.d.ts +2 -2
- package/dist/components/forms/InputField.d.ts +2 -2
- package/dist/components/forms/InputNumber.d.ts +3 -3
- package/dist/components/forms/InputString.d.ts +3 -3
- package/dist/components/forms/RichTextEditor/FormattingToolbar.d.ts +2 -2
- package/dist/components/forms/RichTextEditor/RichTextEditor.d.ts +4 -5
- package/dist/components/forms/RichTextField.d.ts +2 -2
- package/dist/components/forms/SelectField.d.ts +3 -4
- package/dist/components/forms/TimeField.d.ts +2 -2
- package/dist/components/sidebar/SidebarFooter.d.ts +3 -3
- package/dist/components/sidebar/SidebarLayout.d.ts +12 -13
- package/dist/components/tables/CardsTable/CardsTable.d.ts +2 -2
- package/dist/components/tables/RealtimeTable/RealTimeTableFooter.js +1 -1
- package/dist/components/tables/RealtimeTable/RealtimeTable.d.ts +2 -2
- package/dist/components/tables/StaticTable/StaticTable.d.ts +2 -2
- package/dist/components/tables/StaticTable/StaticTableFooter.js +1 -1
- package/dist/components/tables/TableCells/ActionCell.d.ts +4 -4
- package/dist/components/tables/TableCells/AvatarCell.d.ts +3 -3
- package/dist/components/tables/TableCells/BooleanCell.d.ts +2 -2
- package/dist/components/tables/TableCells/DateCell.d.ts +2 -2
- package/dist/components/tables/TableCells/SelectCell.d.ts +3 -3
- package/dist/components/tables/TableComponents/TableFunctions.js +1 -1
- package/dist/components/theme/ThemeLoader/Loader.d.ts +3 -4
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
interface AuthSuccessProps {
|
|
4
4
|
error?: string;
|
|
5
5
|
success?: string;
|
|
6
6
|
title?: string;
|
|
7
7
|
}
|
|
8
|
-
declare const AuthSuccess: ({ error, title, success, }: AuthSuccessProps) =>
|
|
8
|
+
declare const AuthSuccess: ({ error, title, success, }: AuthSuccessProps) => React.JSX.Element;
|
|
9
9
|
|
|
10
10
|
export { AuthSuccess };
|
|
11
11
|
export type { AuthSuccessProps };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
2
|
import { LucideProps } from 'lucide-react';
|
|
4
|
-
import
|
|
3
|
+
import React__default from 'react';
|
|
5
4
|
|
|
6
5
|
type CustomIcons = {
|
|
7
|
-
Eye:
|
|
8
|
-
EyeOff:
|
|
9
|
-
X:
|
|
10
|
-
Check:
|
|
6
|
+
Eye: React__default.ComponentType<React__default.SVGProps<SVGSVGElement> & Omit<LucideProps, 'ref'>>;
|
|
7
|
+
EyeOff: React__default.ComponentType<React__default.SVGProps<SVGSVGElement> & Omit<LucideProps, 'ref'>>;
|
|
8
|
+
X: React__default.ComponentType<React__default.SVGProps<SVGSVGElement> & Omit<LucideProps, 'ref'>>;
|
|
9
|
+
Check: React__default.ComponentType<React__default.SVGProps<SVGSVGElement> & Omit<LucideProps, 'ref'>>;
|
|
11
10
|
};
|
|
12
11
|
interface PasswordFieldProps {
|
|
13
12
|
title: string;
|
|
@@ -24,7 +23,7 @@ interface PasswordFieldProps {
|
|
|
24
23
|
customIcons?: CustomIcons;
|
|
25
24
|
sx?: SxProps<Theme>;
|
|
26
25
|
}
|
|
27
|
-
declare const PasswordField: (props: PasswordFieldProps) =>
|
|
26
|
+
declare const PasswordField: (props: PasswordFieldProps) => React__default.JSX.Element;
|
|
28
27
|
|
|
29
28
|
export { PasswordField };
|
|
30
29
|
export type { PasswordFieldProps };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React from 'react';
|
|
1
|
+
import React__default from 'react';
|
|
3
2
|
|
|
4
3
|
interface IProps {
|
|
5
4
|
appbar?: boolean;
|
|
6
|
-
children:
|
|
5
|
+
children: React__default.ReactNode;
|
|
7
6
|
}
|
|
8
|
-
declare const MainDiv: ({ children }: IProps) =>
|
|
7
|
+
declare const MainDiv: ({ children }: IProps) => React__default.JSX.Element;
|
|
9
8
|
|
|
10
9
|
export { MainDiv };
|
|
11
10
|
export type { IProps };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import { ListProps } from '@mui/material/List';
|
|
3
|
-
import
|
|
2
|
+
import React__default from 'react';
|
|
4
3
|
import { SidebarItem } from '../sidebar/SidebarLayout.js';
|
|
5
4
|
|
|
6
5
|
interface MenuItemsProps {
|
|
7
6
|
items: SidebarItem[];
|
|
8
|
-
linkComponent?:
|
|
9
|
-
linkComponentProps?:
|
|
7
|
+
linkComponent?: React__default.ElementType;
|
|
8
|
+
linkComponentProps?: React__default.ComponentProps<React__default.ElementType>;
|
|
10
9
|
onItemSelect: (item: SidebarItem) => void;
|
|
11
10
|
onItemHover?: (item: SidebarItem) => Promise<void> | void;
|
|
12
11
|
selectedLink?: string;
|
|
@@ -14,7 +13,7 @@ interface MenuItemsProps {
|
|
|
14
13
|
iconOnly?: boolean;
|
|
15
14
|
mobile?: boolean;
|
|
16
15
|
}
|
|
17
|
-
declare function MenuItems(props: MenuItemsProps):
|
|
16
|
+
declare function MenuItems(props: MenuItemsProps): React__default.JSX.Element;
|
|
18
17
|
|
|
19
18
|
export { MenuItems };
|
|
20
19
|
export type { MenuItemsProps };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import React__default, { ReactNode } from 'react';
|
|
3
2
|
|
|
4
3
|
interface AiEditOptions {
|
|
5
4
|
cps?: number;
|
|
@@ -28,7 +27,7 @@ interface AiEditingContextType {
|
|
|
28
27
|
declare const AiEditingProvider: ({ cps, children, }: {
|
|
29
28
|
cps?: number;
|
|
30
29
|
children: ReactNode;
|
|
31
|
-
}) =>
|
|
30
|
+
}) => React__default.JSX.Element;
|
|
32
31
|
declare const useAiEditing: () => AiEditingContextType | {
|
|
33
32
|
aiEditingField: null;
|
|
34
33
|
setAiEditingField: () => null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
|
3
3
|
import { TextFieldProps } from '@mui/material/TextField';
|
|
4
4
|
import { FieldValues, Path, Control, FieldPathValue, RegisterOptions } from 'react-hook-form';
|
|
@@ -14,7 +14,7 @@ interface AutocompleteFieldProps<T extends FieldValues, Option, Multiple extends
|
|
|
14
14
|
textFieldProps?: Omit<TextFieldProps, 'label' | 'error' | 'helperText'>;
|
|
15
15
|
onChange?: AutocompleteProps<Option, Multiple, DisableClearable, FreeSolo>['onChange'];
|
|
16
16
|
}
|
|
17
|
-
declare function AutocompleteField<T extends FieldValues, Option, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false>(props: AutocompleteFieldProps<T, Option, Multiple, DisableClearable, FreeSolo>):
|
|
17
|
+
declare function AutocompleteField<T extends FieldValues, Option, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false>(props: AutocompleteFieldProps<T, Option, Multiple, DisableClearable, FreeSolo>): React.JSX.Element;
|
|
18
18
|
|
|
19
19
|
export { AutocompleteField };
|
|
20
20
|
export type { AutocompleteFieldProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import { DateTimePickerProps } from '@mui/x-date-pickers/DateTimePicker';
|
|
2
|
+
import React__default from 'react';
|
|
3
3
|
import { FieldValues, Path, Control, FieldPathValue, RegisterOptions } from 'react-hook-form';
|
|
4
4
|
|
|
5
5
|
interface DateFieldProps<T extends FieldValues> extends Omit<DateTimePickerProps, 'name' | 'defaultValue' | 'variant' | 'error'> {
|
|
@@ -13,7 +13,7 @@ interface DateFieldProps<T extends FieldValues> extends Omit<DateTimePickerProps
|
|
|
13
13
|
required?: boolean;
|
|
14
14
|
stringOnEmpty?: boolean;
|
|
15
15
|
}
|
|
16
|
-
declare function DateField<T extends FieldValues>(props: DateFieldProps<T>):
|
|
16
|
+
declare function DateField<T extends FieldValues>(props: DateFieldProps<T>): React__default.JSX.Element;
|
|
17
17
|
|
|
18
18
|
export { DateField };
|
|
19
19
|
export type { DateFieldProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { OutlinedTextFieldProps } from '@mui/material/TextField';
|
|
3
3
|
import { FieldValues, Path, Control, FieldPathValue, RegisterOptions } from 'react-hook-form';
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ interface InputFieldProps<T extends FieldValues> extends Omit<OutlinedTextFieldP
|
|
|
10
10
|
shouldUnregister?: boolean;
|
|
11
11
|
legend?: boolean;
|
|
12
12
|
}
|
|
13
|
-
declare function InputField<T extends FieldValues>(props: InputFieldProps<T>):
|
|
13
|
+
declare function InputField<T extends FieldValues>(props: InputFieldProps<T>): React.JSX.Element;
|
|
14
14
|
|
|
15
15
|
export { InputField };
|
|
16
16
|
export type { InputFieldProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TextFieldProps } from '@mui/material/TextField';
|
|
2
|
-
import
|
|
2
|
+
import React__default from 'react';
|
|
3
3
|
import { FormNodeValidator } from './useFormState.js';
|
|
4
4
|
|
|
5
5
|
type NumberValidator = FormNodeValidator<number>;
|
|
@@ -12,10 +12,10 @@ interface InputNumberProps extends Omit<TextFieldProps, 'value' | 'onChange' | '
|
|
|
12
12
|
emptyMessage?: string;
|
|
13
13
|
defaultErrorMessage?: string;
|
|
14
14
|
validators?: NumberValidator[];
|
|
15
|
-
onBlur?: (e:
|
|
15
|
+
onBlur?: (e: React__default.FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
16
16
|
showError?: boolean;
|
|
17
17
|
}
|
|
18
|
-
declare const InputNumber:
|
|
18
|
+
declare const InputNumber: React__default.FC<InputNumberProps>;
|
|
19
19
|
|
|
20
20
|
export { InputNumber };
|
|
21
21
|
export type { InputNumberProps, NumberValidator };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TextFieldProps } from '@mui/material/TextField';
|
|
2
|
-
import
|
|
2
|
+
import React__default from 'react';
|
|
3
3
|
import { FormNodeValidator } from './useFormState.js';
|
|
4
4
|
|
|
5
5
|
type StringValidator = FormNodeValidator<string>;
|
|
@@ -12,10 +12,10 @@ interface InputStringProps extends Omit<TextFieldProps, 'value' | 'onChange' | '
|
|
|
12
12
|
emptyMessage?: string;
|
|
13
13
|
defaultErrorMessage?: string;
|
|
14
14
|
validators?: StringValidator[];
|
|
15
|
-
onBlur?: (e:
|
|
15
|
+
onBlur?: (e: React__default.FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
16
16
|
showError?: boolean;
|
|
17
17
|
}
|
|
18
|
-
declare const InputString:
|
|
18
|
+
declare const InputString: React__default.FC<InputStringProps>;
|
|
19
19
|
|
|
20
20
|
export { InputString };
|
|
21
21
|
export type { InputStringProps, StringValidator };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
|
|
3
3
|
interface AvailableToolbarButtons {
|
|
4
4
|
heading?: boolean | 'full' | 'essential' | [number, number];
|
|
@@ -15,7 +15,7 @@ interface AvailableToolbarButtons {
|
|
|
15
15
|
ai?: boolean;
|
|
16
16
|
}
|
|
17
17
|
interface CustomToolbarButton {
|
|
18
|
-
button:
|
|
18
|
+
button: React__default.JSX.Element;
|
|
19
19
|
position?: number;
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import { PartialBlock } from '@blocknote/core';
|
|
3
2
|
import { ButtonProps } from '@mui/material/Button';
|
|
4
|
-
import
|
|
3
|
+
import React__default from 'react';
|
|
5
4
|
import { AvailableToolbarButtons, CustomToolbarButton } from './FormattingToolbar.js';
|
|
6
5
|
|
|
7
6
|
interface ToolbarOptions {
|
|
@@ -19,8 +18,8 @@ interface ToolbarOptions {
|
|
|
19
18
|
label?: string;
|
|
20
19
|
};
|
|
21
20
|
}
|
|
22
|
-
interface RichTextEditorProps extends Omit<
|
|
23
|
-
ref?:
|
|
21
|
+
interface RichTextEditorProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onBlur'> {
|
|
22
|
+
ref?: React__default.Ref<HTMLDivElement | null>;
|
|
24
23
|
id?: string;
|
|
25
24
|
name?: string;
|
|
26
25
|
label?: string;
|
|
@@ -41,7 +40,7 @@ interface RichTextEditorProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
|
41
40
|
backgroundPreset?: 'default' | 'paper';
|
|
42
41
|
toolbarOptions?: ToolbarOptions;
|
|
43
42
|
}
|
|
44
|
-
declare const RichTextEditor: (props: RichTextEditorProps) =>
|
|
43
|
+
declare const RichTextEditor: (props: RichTextEditorProps) => React__default.JSX.Element;
|
|
45
44
|
|
|
46
45
|
export { RichTextEditor };
|
|
47
46
|
export type { RichTextEditorProps, ToolbarOptions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { FieldValues, Path, Control, FieldPathValue, RegisterOptions } from 'react-hook-form';
|
|
3
3
|
import { RichTextEditorProps } from './RichTextEditor/RichTextEditor.js';
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ interface RichTextFieldProps<T extends FieldValues> extends Omit<RichTextEditorP
|
|
|
10
10
|
required?: boolean;
|
|
11
11
|
shouldUnregister?: boolean;
|
|
12
12
|
}
|
|
13
|
-
declare function RichTextField<T extends FieldValues>(props: RichTextFieldProps<T>):
|
|
13
|
+
declare function RichTextField<T extends FieldValues>(props: RichTextFieldProps<T>): React.JSX.Element;
|
|
14
14
|
|
|
15
15
|
export { RichTextField };
|
|
16
16
|
export type { RichTextFieldProps };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import { SelectProps } from '@mui/material/Select';
|
|
3
|
-
import
|
|
2
|
+
import React__default from 'react';
|
|
4
3
|
import { FieldValues, Path, Control, FieldPathValue, RegisterOptions } from 'react-hook-form';
|
|
5
4
|
|
|
6
5
|
interface SelectFieldProps<T extends FieldValues> extends Omit<SelectProps, 'name' | 'defaultValue' | 'variant' | 'error'> {
|
|
@@ -10,9 +9,9 @@ interface SelectFieldProps<T extends FieldValues> extends Omit<SelectProps, 'nam
|
|
|
10
9
|
rules?: Omit<RegisterOptions<T, Path<T>>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'disabled'>;
|
|
11
10
|
shouldUnregister?: boolean;
|
|
12
11
|
legend?: boolean;
|
|
13
|
-
children:
|
|
12
|
+
children: React__default.ReactNode;
|
|
14
13
|
}
|
|
15
|
-
declare function SelectField<T extends FieldValues>(props: SelectFieldProps<T>):
|
|
14
|
+
declare function SelectField<T extends FieldValues>(props: SelectFieldProps<T>): React__default.JSX.Element;
|
|
16
15
|
|
|
17
16
|
export { SelectField };
|
|
18
17
|
export type { SelectFieldProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import { TimePickerProps } from '@mui/x-date-pickers';
|
|
2
|
+
import React__default from 'react';
|
|
3
3
|
import { FieldValues, Path, Control, FieldPathValue, RegisterOptions } from 'react-hook-form';
|
|
4
4
|
|
|
5
5
|
interface TimeFieldProps<T extends FieldValues> extends Omit<TimePickerProps, 'name' | 'defaultValue' | 'variant' | 'error'> {
|
|
@@ -13,7 +13,7 @@ interface TimeFieldProps<T extends FieldValues> extends Omit<TimePickerProps, 'n
|
|
|
13
13
|
required?: boolean;
|
|
14
14
|
stringOnEmpty?: boolean;
|
|
15
15
|
}
|
|
16
|
-
declare function TimeField<T extends FieldValues>(props: TimeFieldProps<T>):
|
|
16
|
+
declare function TimeField<T extends FieldValues>(props: TimeFieldProps<T>): React__default.JSX.Element;
|
|
17
17
|
|
|
18
18
|
export { TimeField };
|
|
19
19
|
export type { TimeFieldProps };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ListProps } from '@mui/material/List';
|
|
2
|
-
import
|
|
2
|
+
import React__default from 'react';
|
|
3
3
|
import { SidebarItem } from './SidebarLayout.js';
|
|
4
4
|
|
|
5
5
|
interface FooterData {
|
|
6
6
|
items: SidebarItem[];
|
|
7
|
-
linkComponent?:
|
|
8
|
-
linkComponentProps?:
|
|
7
|
+
linkComponent?: React__default.ElementType;
|
|
8
|
+
linkComponentProps?: React__default.ComponentProps<React__default.ElementType>;
|
|
9
9
|
onItemSelect?: (item: SidebarItem) => void;
|
|
10
10
|
onItemHover?: (item: SidebarItem) => Promise<void> | void;
|
|
11
11
|
avatar: {
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import { DrawerProps } from '@mui/material/Drawer';
|
|
3
2
|
import { ListProps } from '@mui/material/List';
|
|
4
|
-
import
|
|
3
|
+
import React__default from 'react';
|
|
5
4
|
import { FooterData } from './SidebarFooter.js';
|
|
6
5
|
|
|
7
6
|
interface SidebarProps {
|
|
8
|
-
children:
|
|
7
|
+
children: React__default.ReactNode;
|
|
9
8
|
sidebarOpen: boolean;
|
|
10
|
-
setSidebarOpen:
|
|
11
|
-
mainContent:
|
|
9
|
+
setSidebarOpen: React__default.Dispatch<React__default.SetStateAction<boolean>>;
|
|
10
|
+
mainContent: React__default.ReactNode;
|
|
12
11
|
}
|
|
13
12
|
interface SidebarItem {
|
|
14
13
|
title: string;
|
|
15
14
|
link: string;
|
|
16
15
|
disabled?: boolean;
|
|
17
16
|
items?: Omit<SidebarItem, 'items'>[];
|
|
18
|
-
icon?:
|
|
19
|
-
linkProps?:
|
|
17
|
+
icon?: React__default.ReactNode;
|
|
18
|
+
linkProps?: React__default.ComponentProps<React__default.ElementType>;
|
|
20
19
|
}
|
|
21
20
|
interface SidebarLogo {
|
|
22
21
|
fullLogo: string;
|
|
@@ -28,10 +27,10 @@ interface SidebarLayoutProps {
|
|
|
28
27
|
open?: boolean;
|
|
29
28
|
onClose?: () => void;
|
|
30
29
|
items: SidebarItem[];
|
|
31
|
-
linkComponent?:
|
|
32
|
-
linkComponentProps?:
|
|
33
|
-
customHeader?:
|
|
34
|
-
customHeaderCompact?:
|
|
30
|
+
linkComponent?: React__default.ElementType;
|
|
31
|
+
linkComponentProps?: React__default.ComponentProps<React__default.ElementType>;
|
|
32
|
+
customHeader?: React__default.ReactNode;
|
|
33
|
+
customHeaderCompact?: React__default.ReactNode;
|
|
35
34
|
mainLogo?: SidebarLogo;
|
|
36
35
|
brandLogo?: SidebarLogo;
|
|
37
36
|
onItemSelect?: (item: SidebarItem) => void;
|
|
@@ -42,9 +41,9 @@ interface SidebarLayoutProps {
|
|
|
42
41
|
footer?: FooterData;
|
|
43
42
|
listProps?: ListProps;
|
|
44
43
|
drawerProps?: DrawerProps;
|
|
45
|
-
children?:
|
|
44
|
+
children?: React__default.ReactNode;
|
|
46
45
|
}
|
|
47
|
-
declare function SidebarLayout(props: SidebarLayoutProps):
|
|
46
|
+
declare function SidebarLayout(props: SidebarLayoutProps): React__default.JSX.Element;
|
|
48
47
|
|
|
49
48
|
export { SidebarLayout };
|
|
50
49
|
export type { SidebarItem, SidebarLayoutProps, SidebarLogo, SidebarProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { CardsTableProps } from './CardsTableTypes.js';
|
|
3
3
|
|
|
4
|
-
declare function CardsTable<T extends Record<string, unknown>>(props: CardsTableProps<T>):
|
|
4
|
+
declare function CardsTable<T extends Record<string, unknown>>(props: CardsTableProps<T>): React__default.JSX.Element;
|
|
5
5
|
|
|
6
6
|
export { CardsTable };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"react/compiler-runtime";import t from"@mui/material/Box";import o from"@mui/material/Grid";import
|
|
1
|
+
import{c as e}from"react/compiler-runtime";import t from"@mui/material/Box";import o from"@mui/material/Grid";import r from"@mui/material/IconButton";import{useTheme as a}from"@mui/material/styles";import n from"@mui/material/TablePagination";import{ChevronRightIcon as i,ChevronLeftIcon as c}from"lucide-react";import"react";import{jsx as l,jsxs as s,Fragment as m}from"react/jsx-runtime";function d(o){const n=e(18),{nextFetch:d,handleDataFetch:p,isFetching:u,count:h,page:g,rowsPerPage:f}=o,b=a(),P=h<=f,x=0===g||!1===d.prev;let F;n[0]!==h||n[1]!==f?(F=Number.isFinite(h)&&Number.isFinite(f)&&f>0?Math.ceil(h/f):0,n[0]=h,n[1]=f,n[2]=F):F=n[2];const w=g>=F-1||!1===d.next;let y;n[3]!==p||n[4]!==x?(y=async()=>{x||await p("left")},n[3]=p,n[4]=x,n[5]=y):y=n[5];const T=y;let C;n[6]!==p||n[7]!==w?(C=async()=>{w||await p("right")},n[6]=p,n[7]=w,n[8]=C):C=n[8];const k=C;let $,R;return n[9]===Symbol.for("react.memo_cache_sentinel")?($={flexShrink:0,ml:2,mr:1},n[9]=$):$=n[9],n[10]!==T||n[11]!==k||n[12]!==u||n[13]!==x||n[14]!==w||n[15]!==P||n[16]!==b?(R=l(t,{component:"div",sx:$,children:P?l("span",{}):s(m,{children:[l(r,{onClick:T,disabled:x||u,"aria-label":"previous-page",children:"rtl"===b.direction?l(i,{size:20}):l(c,{size:20})}),l(r,{onClick:k,disabled:w||u,"aria-label":"next-page",children:"rtl"===b.direction?l(c,{size:20}):l(i,{size:20})})]})}),n[10]=T,n[11]=k,n[12]=u,n[13]=x,n[14]=w,n[15]=P,n[16]=b,n[17]=R):R=n[17],R}const p=t=>{const r=e(30),{currentPage:a,nextFetch:i,expectedRowCount:c,rowsPerPage:s,handleChangeRowsPerPage:m,customSelectPages:p,localeStr:h,isTableEmpty:g,hideFooter:f,stickyFooter:b,footerVariant:P,handleFetchData:x,isFetching:F}=t;if(g&&f)return null;const w=Math.max(0,Math.ceil(Number.isFinite(c)&&Number.isFinite(s)&&s>0?c/s:0));let y;r[0]!==x||r[1]!==F||r[2]!==i?(y=e=>l(d,{...e,handleDataFetch:x,nextFetch:i,isFetching:F}),r[0]=x,r[1]=F,r[2]=i,r[3]=y):y=r[3];const T=y,C=c<=s;let k;r[4]!==p||r[5]!==w||r[6]!==P?(k="standard"===P&&w>0?p??[5,10]:[],r[4]=p,r[5]=w,r[6]=P,r[7]=k):k=r[7];const $=k,R="standard"===P?h?.rowsPerPage:"";let z;r[8]!==c||r[9]!==P||r[10]!==C||r[11]!==h?.moreThanTo||r[12]!==h?.of||r[13]!==h?.page?(z=e=>{const{from:t,to:o,count:r,page:a}=e;if(0!==c)return"standard"===P?`${t}-${o} ${h?.of} ${-1!==r?r:`${h?.moreThanTo} ${o}`}`:C?"":`${h?.page} ${a+1}`},r[8]=c,r[9]=P,r[10]=C,r[11]=h?.moreThanTo,r[12]=h?.of,r[13]=h?.page,r[14]=z):z=r[14];const v=z,N=b?"sticky":"static";let S;r[15]!==N?(S={display:"flex",justifyContent:"flex-end",alignItems:"center",borderRadius:"0 0 8px 8px",position:N,bottom:0,backgroundColor:"background.paper",zIndex:1},r[15]=N,r[16]=S):S=r[16];const D=a||0;let _,I,M;return r[17]===Symbol.for("react.memo_cache_sentinel")?(_={border:"none"},r[17]=_):_=r[17],r[18]!==T||r[19]!==c||r[20]!==m||r[21]!==v||r[22]!==R||r[23]!==s||r[24]!==$||r[25]!==D?(I=l(n,{component:"div",count:c,rowsPerPage:s,rowsPerPageOptions:$,page:D,onPageChange:u,onRowsPerPageChange:m,labelRowsPerPage:R,labelDisplayedRows:v,ActionsComponent:T,sx:_}),r[18]=T,r[19]=c,r[20]=m,r[21]=v,r[22]=R,r[23]=s,r[24]=$,r[25]=D,r[26]=I):I=r[26],r[27]!==S||r[28]!==I?(M=l(o,{className:"RealTimeTable-Footer",component:"div",size:12,container:!0,"data-sticky":!0,sx:S,children:I}),r[27]=S,r[28]=I,r[29]=M):M=r[29],M};function u(){return null}export{p as RealTimeTableFooter,d as TablePaginationActions};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { RealtimeTableProps } from './RealtimeTableTypes.js';
|
|
3
3
|
|
|
4
|
-
declare function RealtimeTable<T extends Record<string, unknown>>(props: RealtimeTableProps<T>):
|
|
4
|
+
declare function RealtimeTable<T extends Record<string, unknown>>(props: RealtimeTableProps<T>): React__default.JSX.Element;
|
|
5
5
|
|
|
6
6
|
export { RealtimeTable };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { StaticTableProps } from './StaticTableTypes.js';
|
|
3
3
|
|
|
4
|
-
declare function StaticTable<T extends Record<string, unknown>>(props: StaticTableProps<T>):
|
|
4
|
+
declare function StaticTable<T extends Record<string, unknown>>(props: StaticTableProps<T>): React__default.JSX.Element;
|
|
5
5
|
|
|
6
6
|
export { StaticTable };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"react/compiler-runtime";import t from"@mui/material/Box";import o from"@mui/material/Grid";import r from"@mui/material/IconButton";import{useTheme as
|
|
1
|
+
import{c as e}from"react/compiler-runtime";import t from"@mui/material/Box";import o from"@mui/material/Grid";import r from"@mui/material/IconButton";import{useTheme as i}from"@mui/material/styles";import n from"@mui/material/TablePagination";import{ChevronRightIcon as a,ChevronLeftIcon as c}from"lucide-react";import"react";import{jsx as l,jsxs as s}from"react/jsx-runtime";function m(o){const n=e(22),{count:m,page:d,rowsPerPage:p,isFetching:g,onPageChange:u}=o,f=i();let P;n[0]!==u||n[1]!==d?(P=e=>{u(e,d-1)},n[0]=u,n[1]=d,n[2]=P):P=n[2];const h=P;let b;n[3]!==u||n[4]!==d?(b=e=>{u(e,d+1)},n[3]=u,n[4]=d,n[5]=b):b=n[5];const x=b;let C;n[6]===Symbol.for("react.memo_cache_sentinel")?(C={flexShrink:0,ml:2.5},n[6]=C):C=n[6];const w=0===d;let y,k;n[7]!==f.direction?(y="rtl"===f.direction?l(a,{size:20}):l(c,{size:20}),n[7]=f.direction,n[8]=y):y=n[8],n[9]!==h||n[10]!==w||n[11]!==y?(k=l(r,{onClick:h,disabled:w,"aria-label":"previous-page",children:y}),n[9]=h,n[10]=w,n[11]=y,n[12]=k):k=n[12];const z=d>=Math.ceil(m/p)-1||g;let F,R,S;return n[13]!==f.direction?(F="rtl"===f.direction?l(c,{size:20}):l(a,{size:20}),n[13]=f.direction,n[14]=F):F=n[14],n[15]!==x||n[16]!==z||n[17]!==F?(R=l(r,{onClick:x,disabled:z,"aria-label":"next-page",children:F}),n[15]=x,n[16]=z,n[17]=F,n[18]=R):R=n[18],n[19]!==k||n[20]!==R?(S=s(t,{component:"div",sx:C,children:[k,R]}),n[19]=k,n[20]=R,n[21]=S):S=n[21],S}function d(t){const r=e(27),{expectedRowCount:i,rowsPerPage:a,page:c,handleChangePage:s,handleChangeRowsPerPage:d,customSelectPages:p,localeStr:g,isTableEmpty:u,hideFooter:f,stickyFooter:P,isFetching:h,footerVariant:b}=t;if(u&&f)return null;let x;r[0]!==h?(x=e=>l(m,{...e,isFetching:h}),r[0]=h,r[1]=x):x=r[1];const C=x,w=i<=a;let y;r[2]!==p||r[3]!==b?(y="standard"===b?p??[5,10]:[],r[2]=p,r[3]=b,r[4]=y):y=r[4];const k=y,z="standard"===b?g?.rowsPerPage:"";let F;r[5]!==b||r[6]!==w||r[7]!==g?.of||r[8]!==g?.page||r[9]!==c?(F="standard"===b?e=>{const{from:t,to:o,count:r}=e;return`${t} - ${o} ${g?.of} ${r}`}:()=>w?"":`${g?.page} ${c+1}`,r[5]=b,r[6]=w,r[7]=g?.of,r[8]=g?.page,r[9]=c,r[10]=F):F=r[10];const R=F,S=P?"sticky":"static";let $,v,_,I;return r[11]!==S?($={display:"flex",justifyContent:"flex-end",alignItems:"center",borderRadius:"0 0 8px 8px",position:S,bottom:0,backgroundColor:"background.paper",zIndex:1},r[11]=S,r[12]=$):$=r[12],r[13]===Symbol.for("react.memo_cache_sentinel")?(v={border:"none"},r[13]=v):v=r[13],r[14]!==C||r[15]!==i||r[16]!==s||r[17]!==d||r[18]!==R||r[19]!==z||r[20]!==c||r[21]!==a||r[22]!==k?(_=l(n,{component:"div",count:i,rowsPerPage:a,rowsPerPageOptions:k,page:c,onPageChange:s,onRowsPerPageChange:d,labelRowsPerPage:z,labelDisplayedRows:R,ActionsComponent:C,sx:v}),r[14]=C,r[15]=i,r[16]=s,r[17]=d,r[18]=R,r[19]=z,r[20]=c,r[21]=a,r[22]=k,r[23]=_):_=r[23],r[24]!==$||r[25]!==_?(I=l(o,{className:"StaticTable-Footer",component:"div",size:12,container:!0,"data-sticky":!0,sx:$,children:_}),r[24]=$,r[25]=_,r[26]=I):I=r[26],I}export{d as StaticTableFooter,m as StaticTablePaginationActions};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ButtonProps } from '@mui/material/Button';
|
|
2
2
|
import { IconButtonProps } from '@mui/material/IconButton';
|
|
3
|
-
import
|
|
3
|
+
import React__default from 'react';
|
|
4
4
|
|
|
5
5
|
interface ExtButtonProps extends Omit<ButtonProps, 'onClick'> {
|
|
6
6
|
label: string;
|
|
7
7
|
}
|
|
8
8
|
interface ExtIconButtonProps extends Omit<IconButtonProps, 'onClick'> {
|
|
9
|
-
icon:
|
|
9
|
+
icon: React__default.ReactNode;
|
|
10
10
|
}
|
|
11
|
-
declare const ActionCell: (clickAction: (event:
|
|
11
|
+
declare const ActionCell: (clickAction: (event: React__default.MouseEvent<HTMLButtonElement, MouseEvent>, value: unknown) => void, buttonProps: ExtButtonProps | ExtIconButtonProps) => ({ cellValue }: {
|
|
12
12
|
cellValue: string;
|
|
13
|
-
}) =>
|
|
13
|
+
}) => React__default.ReactNode;
|
|
14
14
|
|
|
15
15
|
export { ActionCell };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AvatarProps } from '@mui/material/Avatar';
|
|
2
|
-
import
|
|
2
|
+
import React__default from 'react';
|
|
3
3
|
|
|
4
|
-
declare const AvatarCell: (avatarOnly?: boolean, avatarProps?: AvatarProps, clickAction?: (event:
|
|
4
|
+
declare const AvatarCell: (avatarOnly?: boolean, avatarProps?: AvatarProps, clickAction?: (event: React__default.MouseEvent<HTMLDivElement, MouseEvent>, value: unknown) => void) => ({ cellValue }: {
|
|
5
5
|
cellValue: string;
|
|
6
|
-
}) =>
|
|
6
|
+
}) => React__default.ReactNode;
|
|
7
7
|
|
|
8
8
|
export { AvatarCell };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TooltipProps } from '@mui/material/Tooltip';
|
|
2
|
-
import
|
|
2
|
+
import React__default from 'react';
|
|
3
3
|
|
|
4
4
|
declare const BooleanCell: (toolTip?: (value: string) => string, tooltipProps?: Omit<TooltipProps, "title" | "children">) => ({ cellValue }: {
|
|
5
5
|
cellValue: any;
|
|
6
|
-
}) =>
|
|
6
|
+
}) => React__default.ReactNode;
|
|
7
7
|
|
|
8
8
|
export { BooleanCell };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { ChipProps } from '@mui/material/Chip';
|
|
2
|
-
import
|
|
2
|
+
import React__default from 'react';
|
|
3
3
|
|
|
4
4
|
type PrimitiveType = string | number | boolean | bigint | symbol | null | undefined;
|
|
5
5
|
interface SelectCellOption {
|
|
6
6
|
id: PrimitiveType;
|
|
7
7
|
type: ChipProps['color'];
|
|
8
8
|
label: string;
|
|
9
|
-
icon?:
|
|
9
|
+
icon?: React__default.ReactElement;
|
|
10
10
|
}
|
|
11
11
|
declare const SelectCell: (selectOptions: SelectCellOption[]) => ({ cellValue }: {
|
|
12
12
|
cellValue: string;
|
|
13
|
-
}) =>
|
|
13
|
+
}) => React__default.ReactNode;
|
|
14
14
|
|
|
15
15
|
export { SelectCell };
|
|
16
16
|
export type { SelectCellOption };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const n=(n,e)=>{switch(null!=n?typeof n:"undefined"){case"string":return e.toString();case"number":return Number(e);case"boolean":return Boolean(e);default:return e}};function e(n,e){const{value:t,index:o,operator:r,column:i}=e,s=i.filterOptions?.type??"";if(null==t||""===t)return n.filter(n=>n.column!==i.accessor||n.index!==o);const c=n.findIndex(n=>{const e=n.column||"",t=n.index??-1;if(e!==i.accessor||t!==o)return!1;if((n.operator||"")!==(r||""))return!1;return(n.type||"")===(s||"")}),l={index:o,column:i.accessor,value:t,type:s,operator:r||void 0};return-1===c?[...n,l]:n.map((n,e)=>e===c?l:n)}function t(e,t,o){if(!t||!e)return[];const r=`${e}.filter.`,i=new Map,s=new URLSearchParams(t);if(""===s.toString())return[];for(const[e,t]of s.entries()){if(!e.startsWith(r))continue;const s=e.slice(r.length),c=s.split(".");let l,u;const a=c[c.length-1];if(a&&a.startsWith("$")?(l=a,u=c.slice(0,-1).join(".")):u=s,!u)continue;const
|
|
1
|
+
const n=(n,e)=>{switch(null!=n?typeof n:"undefined"){case"string":return e.toString();case"number":return Number(e);case"boolean":return Boolean(e);default:return e}};function e(n,e){const{value:t,index:o,operator:r,column:i}=e,s=i.filterOptions?.type??"";if(null==t||""===t)return n.filter(n=>n.column!==i.accessor||n.index!==o);const c=n.findIndex(n=>{const e=n.column||"",t=n.index??-1;if(e!==i.accessor||t!==o)return!1;if((n.operator||"")!==(r||""))return!1;return(n.type||"")===(s||"")}),l={index:o,column:i.accessor,value:t,type:s,operator:r||void 0};return-1===c?[...n,l]:n.map((n,e)=>e===c?l:n)}function t(e,t,o){if(!t||!e)return[];const r=`${e}.filter.`,i=new Map,s=new URLSearchParams(t);if(""===s.toString())return[];for(const[e,t]of s.entries()){if(!e.startsWith(r))continue;const s=e.slice(r.length),c=s.split(".");let l,u;const a=c[c.length-1];if(a&&a.startsWith("$")?(l=a,u=c.slice(0,-1).join(".")):u=s,!u)continue;const p=o.find(n=>n.accessor===u&&n.filterOptions);if(!p?.filterOptions)continue;const f=p.filterOptions.type;let m=t;switch(f){case"number":{const n=Number(t);if(isNaN(n))continue;m=n;break}case"select":{const e=p.filterOptions;if("$in"===l){const o=t.split(",").map(n=>n.trim());m=o.map(t=>n(e.options[0]?.id,t)).filter(n=>e.options.some(e=>String(e.id)===String(n)))}else if(m=n(e.options[0]?.id,t),!e.options.some(n=>String(n.id)===String(m)))continue;break}}const d=`${u}|0|${l??""}`;i.set(d,{column:u,value:m,index:0,type:f,operator:l})}return Array.from(i.values())}function o(n,e){const t=[];for(const o of e){if(null==o.value||""===o.value)continue;const e=`${n}.filter.${o.column}`;"select"===o.type&&"$in"===o.operator&&Array.isArray(o.value)?t.push(`${e}.$in=${o.value.map(n=>encodeURIComponent(String(n))).join(",")}`):o.operator?t.push(`${e}.${o.operator}=${encodeURIComponent(String(o.value))}`):t.push(`${e}=${encodeURIComponent(String(o.value))}`)}return t.join("&")}function r(n){const e={},t={};for(const o of n){if(null==o.value||""===o.value)continue;const n=o.column.split("."),r=n[0];if(!r)continue;const i=o.operator?"$regex"===o.operator?{[o.operator]:o.value,$options:"i"}:{[o.operator]:o.value}:o.value;if(1===n.length)t[r]=i;else{e[r]||(e[r]={});let t=e[r];for(let e=1;e<n.length-1;e++){const o=n[e];o in t||(t[o]={}),t=t[o]}t[n[n.length-1]]=i}}for(const[n,o]of Object.entries(e))t[n]=o;return t}const i=(n,e)=>{if(!e||0===e.length)return n;const t=e.filter(e=>n.some(n=>n.accessor===e));return n.map(n=>{const e=t.find(e=>e===n.accessor);return{...n,columnOptions:{...n.columnOptions,visible:Boolean(e),locked:Boolean(n.columnOptions?.locked)}}})};export{e as applyFilterUpdate,o as buildFiltersQuery,r as buildRequestFilters,i as loadSavedColumns,t as parseFiltersQuery,n as typeCaster};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import { Theme } from '@mui/material/styles';
|
|
3
|
-
import
|
|
2
|
+
import React__default from 'react';
|
|
4
3
|
|
|
5
4
|
interface ThemeLoaderProps {
|
|
6
5
|
theme: Theme;
|
|
7
6
|
load: () => void | Promise<void>;
|
|
8
7
|
loaded?: () => void;
|
|
9
|
-
children:
|
|
8
|
+
children: React__default.ReactNode;
|
|
10
9
|
}
|
|
11
|
-
declare const ThemeLoader: ({ loaded, load, theme, children }: ThemeLoaderProps) =>
|
|
10
|
+
declare const ThemeLoader: ({ loaded, load, theme, children }: ThemeLoaderProps) => React__default.JSX.Element;
|
|
12
11
|
|
|
13
12
|
export { ThemeLoader };
|