@yusr_systems/ui 2.0.2 → 2.0.4
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 +230 -46
- package/dist/yusr-ui.js +8432 -7421
- package/dist/yusr-ui.umd.cjs +35 -27
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,34 +2,32 @@ import { ActionCreatorWithPayload } from '@reduxjs/toolkit';
|
|
|
2
2
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
3
3
|
import { AsyncThunk } from '@reduxjs/toolkit';
|
|
4
4
|
import { AsyncThunkConfig } from '@reduxjs/toolkit';
|
|
5
|
-
import { AuthState } from '
|
|
5
|
+
import { AuthState } from '@yusr_systems/core/src/auth/authSlice';
|
|
6
6
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
7
|
-
import { BaseApiService } from '
|
|
8
|
-
import { BaseEntity } from '
|
|
9
|
-
import {
|
|
10
|
-
import { BaseFilterableApiService } from '../../../../yusr-core/src/networking';
|
|
7
|
+
import { BaseApiService } from '@yusr_systems/core/src/networking';
|
|
8
|
+
import { BaseEntity } from '@yusr_systems/core/src/entities';
|
|
9
|
+
import { BaseFilterableApiService } from '@yusr_systems/core/src/networking';
|
|
11
10
|
import { CaseReducerActions } from '@reduxjs/toolkit';
|
|
12
11
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
13
12
|
import { ClassProp } from 'class-variance-authority/types';
|
|
14
13
|
import { ClassValue } from 'clsx';
|
|
15
|
-
import { ColumnName } from '
|
|
14
|
+
import { ColumnName } from '@yusr_systems/core/src/types';
|
|
16
15
|
import { Combobox as Combobox_2 } from '@base-ui/react/combobox';
|
|
17
16
|
import { Command as Command_2 } from 'cmdk';
|
|
18
17
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
19
18
|
import { DayButton } from 'react-day-picker';
|
|
20
19
|
import { DayPicker } from 'react-day-picker';
|
|
21
|
-
import { default as default_2 } from '
|
|
20
|
+
import { default as default_2 } from 'react';
|
|
21
|
+
import { default as default_3 } from 'embla-carousel-react';
|
|
22
22
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
23
23
|
import * as Direction from '@radix-ui/react-direction';
|
|
24
|
-
import { Dispatch } from '
|
|
24
|
+
import { Dispatch } from 'react';
|
|
25
25
|
import { Draft } from 'immer';
|
|
26
26
|
import { Drawer as Drawer_2 } from 'vaul';
|
|
27
27
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
28
28
|
import { EnhancedStore } from '@reduxjs/toolkit';
|
|
29
|
-
import { FilterCondition } from '
|
|
30
|
-
import {
|
|
31
|
-
import { FilterResult } from '../../../../../yusr-core/src/types';
|
|
32
|
-
import { FilterResult as FilterResult_2 } from '../../../../yusr-core/src/types';
|
|
29
|
+
import { FilterCondition } from '@yusr_systems/core/src/entities';
|
|
30
|
+
import { FilterResult } from '@yusr_systems/core/src/types';
|
|
33
31
|
import { JSX } from 'react/jsx-runtime';
|
|
34
32
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
35
33
|
import { Locale } from 'react-day-picker';
|
|
@@ -41,29 +39,26 @@ import { ReactNode } from 'react';
|
|
|
41
39
|
import * as RechartsPrimitive from 'recharts';
|
|
42
40
|
import { Reducer } from 'redux';
|
|
43
41
|
import { ReducersMapObject } from '@reduxjs/toolkit';
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
42
|
+
import { RefObject } from 'react';
|
|
43
|
+
import { RequestResult } from '@yusr_systems/core/src/types';
|
|
44
|
+
import { ResourcePermissions } from '@yusr_systems/core/src/auth/permissionSelector';
|
|
46
45
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
47
46
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
48
47
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
48
|
+
import { SetStateAction } from 'react';
|
|
49
49
|
import { Slice } from '@reduxjs/toolkit';
|
|
50
50
|
import { SliceCaseReducers } from '@reduxjs/toolkit';
|
|
51
51
|
import { SliceSelectors } from '@reduxjs/toolkit';
|
|
52
|
-
import { StorageFile } from '
|
|
53
|
-
import { StoreEnhancer } from 'redux';
|
|
52
|
+
import { StorageFile } from '@yusr_systems/core/src/entities';
|
|
54
53
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
55
54
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
56
|
-
import { ThunkDispatch } from 'redux-thunk';
|
|
57
55
|
import { ToasterProps } from 'sonner';
|
|
58
56
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
59
57
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
60
58
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
61
|
-
import { Tuple } from '@reduxjs/toolkit';
|
|
62
|
-
import { TypedUseSelectorHook } from 'react-redux';
|
|
63
59
|
import { UnknownAction } from '@reduxjs/toolkit';
|
|
64
|
-
import { UnknownAction as UnknownAction_2 } from 'redux';
|
|
65
60
|
import { UseEmblaCarouselType } from 'embla-carousel-react';
|
|
66
|
-
import { ValidationRule } from '
|
|
61
|
+
import { ValidationRule } from '@yusr_systems/core/src/validation/validationRule';
|
|
67
62
|
import { VariantProps } from 'class-variance-authority';
|
|
68
63
|
|
|
69
64
|
export declare function Alert({ className, variant, ...props }: React_2.ComponentProps<"div"> & VariantProps<typeof alertVariants>): JSX.Element;
|
|
@@ -106,6 +101,11 @@ declare const alertVariants: (props?: ({
|
|
|
106
101
|
|
|
107
102
|
declare type AppStore = ReturnType<typeof createInternalStore>;
|
|
108
103
|
|
|
104
|
+
declare interface AuthActions {
|
|
105
|
+
logout: () => any;
|
|
106
|
+
syncFromStorage: () => any;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
109
|
export declare function Avatar({ className, size, ...props }: React_2.ComponentProps<typeof AvatarPrimitive.Root> & {
|
|
110
110
|
size?: "default" | "sm" | "lg";
|
|
111
111
|
}): JSX.Element;
|
|
@@ -196,8 +196,8 @@ export declare type CarouselApi = UseEmblaCarouselType[1];
|
|
|
196
196
|
export declare function CarouselContent({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
|
|
197
197
|
|
|
198
198
|
declare type CarouselContextProps = {
|
|
199
|
-
carouselRef: ReturnType<typeof
|
|
200
|
-
api: ReturnType<typeof
|
|
199
|
+
carouselRef: ReturnType<typeof default_3>[0];
|
|
200
|
+
api: ReturnType<typeof default_3>[1];
|
|
201
201
|
scrollPrev: () => void;
|
|
202
202
|
scrollNext: () => void;
|
|
203
203
|
canScrollPrev: boolean;
|
|
@@ -221,6 +221,8 @@ declare type CarouselProps = {
|
|
|
221
221
|
setApi?: (api: CarouselApi) => void;
|
|
222
222
|
};
|
|
223
223
|
|
|
224
|
+
export declare function ChangeDialog<T extends BaseEntity>({ title, description, className, formData, dialogMode, service, disable, onSuccess, validate, children }: ChangeDialogProps<T>): JSX.Element;
|
|
225
|
+
|
|
224
226
|
export declare interface ChangeDialogProps<T extends BaseEntity> extends SaveButtonProps<T>, PropsWithChildren {
|
|
225
227
|
title: string;
|
|
226
228
|
description?: string;
|
|
@@ -407,7 +409,7 @@ export declare function createGenericDialogSlice<T>(sliceName: string): Slice<ID
|
|
|
407
409
|
}, action: PayloadAction<boolean>) => void;
|
|
408
410
|
}, string, string, SliceSelectors<IDialogState<T>>>;
|
|
409
411
|
|
|
410
|
-
export declare function createGenericEntitySlice<T extends
|
|
412
|
+
export declare function createGenericEntitySlice<T extends BaseEntity, CR extends SliceCaseReducers<IEntityState<T>> = {}>(sliceName: string, service: BaseFilterableApiService<T>, filterMethod?: FilterMethodType<T>, customReducers?: CR): {
|
|
411
413
|
reducer: Reducer<IEntityState<T>>;
|
|
412
414
|
actions: CaseReducerActions<{
|
|
413
415
|
setCurrentPage: (state: {
|
|
@@ -434,17 +436,13 @@ export declare function createGenericEntitySlice<T extends BaseEntity_2, CR exte
|
|
|
434
436
|
deletedId?: number;
|
|
435
437
|
}>) => void;
|
|
436
438
|
} & CR, string> & {
|
|
437
|
-
filter: AsyncThunk<
|
|
439
|
+
filter: AsyncThunk<FilterResult<T> | undefined, FilterCondition | undefined, AsyncThunkConfig>;
|
|
438
440
|
};
|
|
439
441
|
};
|
|
440
442
|
|
|
441
|
-
export declare const createInternalStore: <TUser extends object, TSetting extends object>(externalReducers
|
|
442
|
-
auth: AuthState<
|
|
443
|
-
}
|
|
444
|
-
dispatch: ThunkDispatch<{
|
|
445
|
-
auth: AuthState<object, object>;
|
|
446
|
-
}, undefined, UnknownAction_2>;
|
|
447
|
-
}>, StoreEnhancer]>>;
|
|
443
|
+
export declare const createInternalStore: <TUser extends object, TSetting extends object, R extends ReducersMapObject = ReducersMapObject>(externalReducers: R) => EnhancedStore<{
|
|
444
|
+
auth: AuthState<TUser, TSetting>;
|
|
445
|
+
} & { [K in keyof R]: ReturnType<R[K]>; }>;
|
|
448
446
|
|
|
449
447
|
export declare interface CrudActions<T extends BaseEntity> {
|
|
450
448
|
filter: AsyncThunk<FilterResult<T> | undefined, FilterCondition | undefined, object>;
|
|
@@ -459,6 +457,10 @@ export declare interface CrudActions<T extends BaseEntity> {
|
|
|
459
457
|
setCurrentPage: (page: number) => UnknownAction;
|
|
460
458
|
}
|
|
461
459
|
|
|
460
|
+
export declare function CrudEmptyTablePreview({ mode }: EmptyTablePreviewProps): JSX.Element;
|
|
461
|
+
|
|
462
|
+
export declare function CrudPage<T extends BaseEntity>({ permissions, useSlice, entityName, title, addNewItemTitle, cards, columnsToFilter, actions, service, entityState, tableHeadRows, tableRowMapper, ChangeDialog, children }: CrudPageProps<T>): JSX.Element;
|
|
463
|
+
|
|
462
464
|
export declare type CrudPageProps<T extends BaseEntity> = PropsWithChildren & {
|
|
463
465
|
entityState: IEntityState<T>;
|
|
464
466
|
useSlice: () => IDialogState<T>;
|
|
@@ -470,11 +472,42 @@ export declare type CrudPageProps<T extends BaseEntity> = PropsWithChildren & {
|
|
|
470
472
|
cards: CardProps[];
|
|
471
473
|
columnsToFilter: ColumnName[];
|
|
472
474
|
service: BaseApiService<T>;
|
|
473
|
-
tableHeadRows:
|
|
475
|
+
tableHeadRows: CrudTableHeadRow[];
|
|
474
476
|
tableRowMapper: (entity: T) => TableBodyRowInfo[];
|
|
475
477
|
ChangeDialog: React.ReactNode;
|
|
476
478
|
};
|
|
477
479
|
|
|
480
|
+
export declare function CrudTable({ state, children }: {
|
|
481
|
+
state: IEntityState<any>;
|
|
482
|
+
children: React.ReactNode;
|
|
483
|
+
}): JSX.Element;
|
|
484
|
+
|
|
485
|
+
export declare function CrudTableBodyRow({ tableRows, dropdownMenu, contextMenuContent }: GenericRowProps): JSX.Element;
|
|
486
|
+
|
|
487
|
+
export declare function CrudTableCard({ cards }: {
|
|
488
|
+
cards: CardProps[];
|
|
489
|
+
}): JSX.Element;
|
|
490
|
+
|
|
491
|
+
export declare function CrudTableHeader({ title, buttonTitle, createComp, isButtonVisible }: {
|
|
492
|
+
title: string;
|
|
493
|
+
buttonTitle: string;
|
|
494
|
+
createComp: ReactNode;
|
|
495
|
+
isButtonVisible?: boolean;
|
|
496
|
+
}): JSX.Element;
|
|
497
|
+
|
|
498
|
+
export declare function CrudTableHeaderRows({ tableHeadRows }: {
|
|
499
|
+
tableHeadRows: CrudTableHeadRow[];
|
|
500
|
+
}): JSX.Element;
|
|
501
|
+
|
|
502
|
+
export declare type CrudTableHeadRow = {
|
|
503
|
+
rowName: string;
|
|
504
|
+
rowStyles: string;
|
|
505
|
+
};
|
|
506
|
+
|
|
507
|
+
export declare function CrudTablePagination({ pageSize, totalNumber, currentPage, onPageChanged }: PaginationFooterProps): JSX.Element;
|
|
508
|
+
|
|
509
|
+
export declare function CrudTableRowActionsMenu({ onEditClicked, onDeleteClicked, type, permissions }: Props_2): JSX.Element;
|
|
510
|
+
|
|
478
511
|
export declare function DateField({ label, error, isInvalid, required, ...props }: DateFieldProps): JSX.Element;
|
|
479
512
|
|
|
480
513
|
declare interface DateFieldProps extends DateInputProps {
|
|
@@ -510,6 +543,8 @@ export declare interface DateTimeInputProps {
|
|
|
510
543
|
locale?: any;
|
|
511
544
|
}
|
|
512
545
|
|
|
546
|
+
export declare function DeleteDialog<T extends BaseEntity>({ entityName, id, service, onSuccess }: Props<T>): JSX.Element;
|
|
547
|
+
|
|
513
548
|
export declare function Dialog({ ...props }: React_2.ComponentProps<typeof DialogPrimitive.Root>): JSX.Element;
|
|
514
549
|
|
|
515
550
|
export declare function DialogClose({ ...props }: React_2.ComponentProps<typeof DialogPrimitive.Close>): JSX.Element;
|
|
@@ -601,6 +636,19 @@ export declare function DropdownMenuSubTrigger({ className, inset, children, ...
|
|
|
601
636
|
|
|
602
637
|
export declare function DropdownMenuTrigger({ ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): JSX.Element;
|
|
603
638
|
|
|
639
|
+
export declare function DynamicListContainer<T>({ title, items, onAdd, addLabel, emptyMessage, error, headers, children }: DynamicListProps<T>): JSX.Element;
|
|
640
|
+
|
|
641
|
+
declare interface DynamicListProps<T> {
|
|
642
|
+
title: string;
|
|
643
|
+
items: T[];
|
|
644
|
+
onAdd: () => void;
|
|
645
|
+
addLabel: string;
|
|
646
|
+
emptyMessage: string;
|
|
647
|
+
error?: string;
|
|
648
|
+
headers: string[];
|
|
649
|
+
children: (item: any, index: number) => React.ReactNode;
|
|
650
|
+
}
|
|
651
|
+
|
|
604
652
|
export declare function Empty({ className, ...props }: React.ComponentProps<"div">): JSX.Element;
|
|
605
653
|
|
|
606
654
|
export declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): JSX.Element;
|
|
@@ -615,6 +663,12 @@ declare const emptyMediaVariants: (props?: ({
|
|
|
615
663
|
variant?: "default" | "icon" | null | undefined;
|
|
616
664
|
} & ClassProp) | undefined) => string;
|
|
617
665
|
|
|
666
|
+
declare type EmptyTableMode = "empty" | "loading" | "error";
|
|
667
|
+
|
|
668
|
+
declare type EmptyTablePreviewProps = {
|
|
669
|
+
mode: EmptyTableMode;
|
|
670
|
+
};
|
|
671
|
+
|
|
618
672
|
export declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): JSX.Element;
|
|
619
673
|
|
|
620
674
|
export declare function Field({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): JSX.Element;
|
|
@@ -658,7 +712,7 @@ declare const fieldVariants: (props?: ({
|
|
|
658
712
|
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
659
713
|
} & ClassProp) | undefined) => string;
|
|
660
714
|
|
|
661
|
-
declare type FilterMethodType<T> = (pageNumber: number, rowsPerPage: number, condition?:
|
|
715
|
+
declare type FilterMethodType<T> = (pageNumber: number, rowsPerPage: number, condition?: FilterCondition | undefined) => Promise<RequestResult<FilterResult<T>>> | undefined;
|
|
662
716
|
|
|
663
717
|
export declare function FormField({ label, error, isInvalid, children, required }: FormFieldProps): JSX.Element;
|
|
664
718
|
|
|
@@ -670,14 +724,20 @@ declare interface FormFieldProps {
|
|
|
670
724
|
required?: boolean;
|
|
671
725
|
}
|
|
672
726
|
|
|
727
|
+
declare interface GenericRowProps {
|
|
728
|
+
tableRows: TableBodyRowInfo[];
|
|
729
|
+
dropdownMenu: ReactNode;
|
|
730
|
+
contextMenuContent: ReactNode;
|
|
731
|
+
}
|
|
732
|
+
|
|
673
733
|
export declare interface IDialogState<T> {
|
|
674
734
|
selectedRow: T | null;
|
|
675
735
|
isChangeDialogOpen: boolean;
|
|
676
736
|
isDeleteDialogOpen: boolean;
|
|
677
737
|
}
|
|
678
738
|
|
|
679
|
-
declare interface IEntityState<T> {
|
|
680
|
-
entities:
|
|
739
|
+
export declare interface IEntityState<T> {
|
|
740
|
+
entities: FilterResult<T>;
|
|
681
741
|
isLoaded: boolean;
|
|
682
742
|
isLoading: boolean;
|
|
683
743
|
currentPage: number;
|
|
@@ -722,6 +782,21 @@ export declare function isPDF(file?: StorageFile): boolean;
|
|
|
722
782
|
|
|
723
783
|
export declare function Label({ className, ...props }: React_2.ComponentProps<typeof LabelPrimitive.Root>): JSX.Element;
|
|
724
784
|
|
|
785
|
+
export declare function Lightbox({ srcLight, srcDark, alt, onClose }: LightboxProps): JSX.Element;
|
|
786
|
+
|
|
787
|
+
declare interface LightboxProps {
|
|
788
|
+
srcLight: string;
|
|
789
|
+
srcDark: string;
|
|
790
|
+
alt: string;
|
|
791
|
+
onClose: () => void;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
declare type ListType = "dropdown" | "context";
|
|
795
|
+
|
|
796
|
+
export declare function Loading({ entityName }: {
|
|
797
|
+
entityName: string;
|
|
798
|
+
}): JSX.Element;
|
|
799
|
+
|
|
725
800
|
export declare function NumberField({ label, error, isInvalid, required, ...props }: NumberFieldProps): JSX.Element;
|
|
726
801
|
|
|
727
802
|
declare interface NumberFieldProps extends NumberInputProps {
|
|
@@ -743,6 +818,13 @@ export declare function PaginationContent({ className, ...props }: React_2.Compo
|
|
|
743
818
|
|
|
744
819
|
export declare function PaginationEllipsis({ className, ...props }: React_2.ComponentProps<"span">): JSX.Element;
|
|
745
820
|
|
|
821
|
+
declare type PaginationFooterProps = {
|
|
822
|
+
pageSize: number;
|
|
823
|
+
totalNumber: number;
|
|
824
|
+
currentPage: number;
|
|
825
|
+
onPageChanged?: (newPage: number) => void;
|
|
826
|
+
};
|
|
827
|
+
|
|
746
828
|
export declare function PaginationItem({ ...props }: React_2.ComponentProps<"li">): JSX.Element;
|
|
747
829
|
|
|
748
830
|
export declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): JSX.Element;
|
|
@@ -777,6 +859,29 @@ export declare function PopoverTitle({ className, ...props }: React_2.ComponentP
|
|
|
777
859
|
|
|
778
860
|
export declare function PopoverTrigger({ ...props }: React_2.ComponentProps<typeof PopoverPrimitive.Trigger>): JSX.Element;
|
|
779
861
|
|
|
862
|
+
declare interface Props<T extends BaseEntity> {
|
|
863
|
+
entityName: string;
|
|
864
|
+
id: number;
|
|
865
|
+
service: BaseApiService<T>;
|
|
866
|
+
onSuccess?: () => void;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
declare interface Props_2 {
|
|
870
|
+
onEditClicked: () => void;
|
|
871
|
+
onDeleteClicked: () => void;
|
|
872
|
+
type: ListType;
|
|
873
|
+
permissions: ResourcePermissions;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
export declare function ProtectedRoute({ isAuthenticated, loginPath }: ProtectedRouteProps): JSX.Element;
|
|
877
|
+
|
|
878
|
+
declare interface ProtectedRouteProps {
|
|
879
|
+
isAuthenticated: boolean;
|
|
880
|
+
loginPath?: string;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
export declare function SaveButton<T extends BaseEntity>({ formData, dialogMode, service, disable, onSuccess, validate }: SaveButtonProps<T>): JSX.Element;
|
|
884
|
+
|
|
780
885
|
export declare interface SaveButtonProps<T extends BaseEntity> {
|
|
781
886
|
formData: T | Partial<T>;
|
|
782
887
|
dialogMode?: DialogMode;
|
|
@@ -790,6 +895,34 @@ export declare function ScrollArea({ className, children, ...props }: React_2.Co
|
|
|
790
895
|
|
|
791
896
|
export declare function ScrollBar({ className, orientation, ...props }: React_2.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): JSX.Element;
|
|
792
897
|
|
|
898
|
+
export declare function SearchableSelect<T>({ items, itemLabelKey, itemValueKey, value, onValueChange, disabled, errorInputClass, placeholder, columnsNames, onSearch }: SearchableSelectParams<T>): JSX.Element;
|
|
899
|
+
|
|
900
|
+
declare type SearchableSelectParams<T> = {
|
|
901
|
+
items: T[];
|
|
902
|
+
itemLabelKey: keyof T;
|
|
903
|
+
itemValueKey: keyof T;
|
|
904
|
+
value: string;
|
|
905
|
+
onValueChange: (value: string) => void;
|
|
906
|
+
disabled?: boolean;
|
|
907
|
+
errorInputClass?: string;
|
|
908
|
+
placeholder?: string;
|
|
909
|
+
columnsNames: ColumnName[];
|
|
910
|
+
onSearch: (condition: {
|
|
911
|
+
value: string;
|
|
912
|
+
columnName: string;
|
|
913
|
+
} | undefined) => void;
|
|
914
|
+
};
|
|
915
|
+
|
|
916
|
+
export declare function SearchInput({ columnsNames, onSearch }: SearchInputParams): JSX.Element;
|
|
917
|
+
|
|
918
|
+
declare type SearchInputParams = {
|
|
919
|
+
columnsNames: ColumnName[];
|
|
920
|
+
onSearch: (condition: {
|
|
921
|
+
value: string;
|
|
922
|
+
columnName: string;
|
|
923
|
+
} | undefined) => void;
|
|
924
|
+
};
|
|
925
|
+
|
|
793
926
|
export declare function Select({ ...props }: React_2.ComponentProps<typeof SelectPrimitive.Root>): JSX.Element;
|
|
794
927
|
|
|
795
928
|
export declare function SelectContent({ className, children, position, align, ...props }: React_2.ComponentProps<typeof SelectPrimitive.Content>): JSX.Element;
|
|
@@ -834,6 +967,8 @@ export declare function SelectValue({ ...props }: React_2.ComponentProps<typeof
|
|
|
834
967
|
|
|
835
968
|
export declare function Separator({ className, orientation, decorative, ...props }: React_2.ComponentProps<typeof SeparatorPrimitive.Root>): JSX.Element;
|
|
836
969
|
|
|
970
|
+
export declare const setupAuthListeners: (dispatch: InternalDispatch, actions: AuthActions) => void;
|
|
971
|
+
|
|
837
972
|
export declare function Sheet({ ...props }: React_2.ComponentProps<typeof DialogPrimitive.Root>): JSX.Element;
|
|
838
973
|
|
|
839
974
|
export declare function SheetClose({ ...props }: React_2.ComponentProps<typeof DialogPrimitive.Close>): JSX.Element;
|
|
@@ -898,6 +1033,8 @@ export declare function SidebarInput({ className, ...props }: React_2.ComponentP
|
|
|
898
1033
|
|
|
899
1034
|
export declare function SidebarInset({ className, ...props }: React_2.ComponentProps<"main">): JSX.Element;
|
|
900
1035
|
|
|
1036
|
+
export declare function SidebarLogo({ logos, alt }: SidebarLogoProps): JSX.Element;
|
|
1037
|
+
|
|
901
1038
|
export declare interface SidebarLogoProps {
|
|
902
1039
|
logos: {
|
|
903
1040
|
full: {
|
|
@@ -986,6 +1123,22 @@ export declare function SideBarUserData<T extends UsernameObject>({ user }: {
|
|
|
986
1123
|
|
|
987
1124
|
export declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): JSX.Element;
|
|
988
1125
|
|
|
1126
|
+
export declare function StorageFileField({ label, file, onFileChange, onRemove, onDownload, getFileSrc, showPreview, fileInputRef, error, isInvalid, dir }: StorageFileFieldProps): JSX.Element;
|
|
1127
|
+
|
|
1128
|
+
declare interface StorageFileFieldProps {
|
|
1129
|
+
label: string;
|
|
1130
|
+
file: StorageFile | StorageFile[] | undefined;
|
|
1131
|
+
onFileChange: (event: default_2.ChangeEvent<HTMLInputElement>) => void;
|
|
1132
|
+
onRemove: (index: number, file: StorageFile) => void;
|
|
1133
|
+
onDownload: (e: default_2.MouseEvent, file: StorageFile | undefined) => void;
|
|
1134
|
+
getFileSrc: (file: StorageFile | undefined) => string;
|
|
1135
|
+
showPreview: (file: StorageFile | undefined) => boolean;
|
|
1136
|
+
fileInputRef: default_2.RefObject<HTMLInputElement | null>;
|
|
1137
|
+
error?: string;
|
|
1138
|
+
isInvalid?: boolean;
|
|
1139
|
+
dir?: "rtl" | "ltr";
|
|
1140
|
+
}
|
|
1141
|
+
|
|
989
1142
|
export declare function Switch({ className, size, ...props }: React_2.ComponentProps<typeof SwitchPrimitive.Root> & {
|
|
990
1143
|
size?: "sm" | "default";
|
|
991
1144
|
}): JSX.Element;
|
|
@@ -1009,11 +1162,6 @@ export declare function TableHead({ className, ...props }: React_2.ComponentProp
|
|
|
1009
1162
|
|
|
1010
1163
|
export declare function TableHeader({ className, ...props }: React_2.ComponentProps<"thead">): JSX.Element;
|
|
1011
1164
|
|
|
1012
|
-
export declare type TableHeadRow = {
|
|
1013
|
-
rowName: string;
|
|
1014
|
-
rowStyles: string;
|
|
1015
|
-
};
|
|
1016
|
-
|
|
1017
1165
|
export declare function TableRow({ className, ...props }: React_2.ComponentProps<"tr">): JSX.Element;
|
|
1018
1166
|
|
|
1019
1167
|
export declare function Tabs({ className, orientation, ...props }: React_2.ComponentProps<typeof TabsPrimitive.Root>): JSX.Element;
|
|
@@ -1100,10 +1248,20 @@ export declare function TooltipTrigger({ ...props }: React_2.ComponentProps<type
|
|
|
1100
1248
|
|
|
1101
1249
|
export declare function useCarousel(): CarouselContextProps;
|
|
1102
1250
|
|
|
1103
|
-
declare type UseCarouselParameters = Parameters<typeof
|
|
1251
|
+
declare type UseCarouselParameters = Parameters<typeof default_3>;
|
|
1104
1252
|
|
|
1105
1253
|
export declare function useComboboxAnchor(): React_2.RefObject<HTMLDivElement | null>;
|
|
1106
1254
|
|
|
1255
|
+
export declare function useDialog<T>(): {
|
|
1256
|
+
selectedRow: T | null;
|
|
1257
|
+
isEditDialogOpen: boolean;
|
|
1258
|
+
isDeleteDialogOpen: boolean;
|
|
1259
|
+
setIsEditDialogOpen: Dispatch<SetStateAction<boolean>>;
|
|
1260
|
+
setIsDeleteDialogOpen: Dispatch<SetStateAction<boolean>>;
|
|
1261
|
+
openEditDialog: (entity: T) => void;
|
|
1262
|
+
openDeleteDialog: (entity: T) => void;
|
|
1263
|
+
};
|
|
1264
|
+
|
|
1107
1265
|
export declare const useDirection: typeof Direction.useDirection;
|
|
1108
1266
|
|
|
1109
1267
|
export declare function useDynamicList<T, K extends keyof T>(fieldName: K, setFormData: (updater: (prev: T) => T) => void, clearError: (field: string) => void): {
|
|
@@ -1134,18 +1292,44 @@ export declare function useFormValidation<T>(data: T, rules: ValidationRule<T>[]
|
|
|
1134
1292
|
|
|
1135
1293
|
export declare function useIsMobile(): boolean;
|
|
1136
1294
|
|
|
1295
|
+
export declare function useLightBox(): {
|
|
1296
|
+
lightbox: {
|
|
1297
|
+
srcLight: string;
|
|
1298
|
+
srcDark: string;
|
|
1299
|
+
alt: string;
|
|
1300
|
+
} | null;
|
|
1301
|
+
openLightbox: (srcLight: string, srcDark: string, alt: string) => void;
|
|
1302
|
+
closeLightbox: () => void;
|
|
1303
|
+
};
|
|
1304
|
+
|
|
1137
1305
|
declare interface UsernameObject {
|
|
1138
1306
|
username?: string;
|
|
1139
1307
|
}
|
|
1140
1308
|
|
|
1141
1309
|
export declare function useSidebar(): SidebarContextProps;
|
|
1142
1310
|
|
|
1311
|
+
export declare function useStorageFile<T>(setFormData: React.Dispatch<React.SetStateAction<T>>, fieldName: keyof T): {
|
|
1312
|
+
fileInputRef: RefObject<HTMLInputElement | null>;
|
|
1313
|
+
handleFileChange: (event: React.ChangeEvent<HTMLInputElement>) => Promise<void>;
|
|
1314
|
+
handleRemoveFile: (index: number) => void;
|
|
1315
|
+
handleDownload: (e: React.MouseEvent, file: StorageFile | undefined) => Promise<void>;
|
|
1316
|
+
showFilePreview: (file: StorageFile | undefined) => boolean;
|
|
1317
|
+
getFileSrc: (file: StorageFile | undefined) => string;
|
|
1318
|
+
};
|
|
1319
|
+
|
|
1143
1320
|
export declare const useTheme: () => ThemeProviderState;
|
|
1144
1321
|
|
|
1145
|
-
export declare
|
|
1146
|
-
|
|
1147
|
-
|
|
1322
|
+
export declare function YusrBusBackground(): JSX.Element;
|
|
1323
|
+
|
|
1324
|
+
export declare function ZoomableImage({ srcLight, srcDark, alt, className, wrapperClassName, onOpen }: ZoomableImageProps): JSX.Element;
|
|
1148
1325
|
|
|
1149
|
-
|
|
1326
|
+
declare interface ZoomableImageProps {
|
|
1327
|
+
srcLight: string;
|
|
1328
|
+
srcDark: string;
|
|
1329
|
+
alt: string;
|
|
1330
|
+
className?: string;
|
|
1331
|
+
wrapperClassName?: string;
|
|
1332
|
+
onOpen: (srcLight: string, srcDark: string, alt: string) => void;
|
|
1333
|
+
}
|
|
1150
1334
|
|
|
1151
1335
|
export { }
|