wcz-test 4.0.1 → 4.1.0
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 +24 -24
- package/dist/index.js +786 -488
- package/dist/index.js.map +1 -1
- package/package.json +70 -83
- package/dist/index.cjs +0 -3654
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -426
package/dist/index.d.ts
CHANGED
|
@@ -51,11 +51,6 @@ interface FileMeta {
|
|
|
51
51
|
mimeType: string;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
type FileActions = {
|
|
55
|
-
download?: boolean;
|
|
56
|
-
delete?: boolean;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
54
|
type FileViewerGridItemBar = "hidden" | "always" | "onMouseEnter";
|
|
60
55
|
interface FileViewerGridProps {
|
|
61
56
|
size?: number;
|
|
@@ -63,6 +58,11 @@ interface FileViewerGridProps {
|
|
|
63
58
|
sx?: SxProps<Theme>;
|
|
64
59
|
}
|
|
65
60
|
|
|
61
|
+
type FileActions = {
|
|
62
|
+
download?: boolean;
|
|
63
|
+
delete?: boolean;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
66
|
interface FileViewerListProps {
|
|
67
67
|
sx?: SxProps<Theme>;
|
|
68
68
|
}
|
|
@@ -75,7 +75,7 @@ interface FileViewerProps {
|
|
|
75
75
|
/** Insert your record ID (can be multiple splitted by comma) */
|
|
76
76
|
subId: string | undefined | null;
|
|
77
77
|
onDelete?: (params: {
|
|
78
|
-
remainingFileMetas: FileMeta
|
|
78
|
+
remainingFileMetas: Array<FileMeta>;
|
|
79
79
|
deletedFileMeta: FileMeta;
|
|
80
80
|
}) => void;
|
|
81
81
|
actions?: FileActions;
|
|
@@ -131,10 +131,10 @@ interface NavigationParams {
|
|
|
131
131
|
t: TFunction<"translation", undefined>;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
interface NavigationPageItem extends Pick<LinkOptions, "to"
|
|
134
|
+
interface NavigationPageItem extends Pick<LinkOptions, "to">, Partial<Pick<LinkOptions, "href" | "params" | "search">> {
|
|
135
135
|
title: string;
|
|
136
136
|
icon: React.ReactNode;
|
|
137
|
-
children?: NavigationItem
|
|
137
|
+
children?: Array<NavigationItem>;
|
|
138
138
|
hidden?: boolean;
|
|
139
139
|
}
|
|
140
140
|
interface NavigationDivider {
|
|
@@ -147,7 +147,7 @@ interface NavigationHeader {
|
|
|
147
147
|
hidden?: boolean;
|
|
148
148
|
}
|
|
149
149
|
type NavigationItem = NavigationPageItem | NavigationDivider | NavigationHeader;
|
|
150
|
-
type Navigation = NavigationItem
|
|
150
|
+
type Navigation = Array<NavigationItem>;
|
|
151
151
|
|
|
152
152
|
interface ProvidersProps {
|
|
153
153
|
getNavigation?: (parameters: NavigationParams) => Navigation;
|
|
@@ -224,7 +224,7 @@ interface Option {
|
|
|
224
224
|
}
|
|
225
225
|
interface FormRadioGroupProps extends Omit<RadioGroupProps, FormOmittedProps> {
|
|
226
226
|
label?: string;
|
|
227
|
-
options: Option
|
|
227
|
+
options: Array<Option>;
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
interface FormSwitchProps extends Omit<SwitchProps, FormOmittedProps> {
|
|
@@ -291,8 +291,8 @@ declare const withLayoutForm: <TFormData, TOnMount extends _tanstack_form_core.F
|
|
|
291
291
|
}>;
|
|
292
292
|
}>) => react.JSX.Element;
|
|
293
293
|
|
|
294
|
-
interface OpenDialogOptions<
|
|
295
|
-
onClose?: (result:
|
|
294
|
+
interface OpenDialogOptions<TResult> {
|
|
295
|
+
onClose?: (result: TResult) => Promise<void>;
|
|
296
296
|
}
|
|
297
297
|
interface AlertOptions {
|
|
298
298
|
title?: ReactNode;
|
|
@@ -301,19 +301,19 @@ interface ConfirmOptions {
|
|
|
301
301
|
title?: ReactNode;
|
|
302
302
|
cancelText?: ReactNode;
|
|
303
303
|
}
|
|
304
|
-
interface DialogProps<
|
|
305
|
-
payload:
|
|
304
|
+
interface DialogProps<TPayload = undefined, TResult = void> {
|
|
305
|
+
payload: TPayload;
|
|
306
306
|
open: boolean;
|
|
307
|
-
onClose: (result:
|
|
307
|
+
onClose: (result: TResult) => Promise<void>;
|
|
308
308
|
}
|
|
309
309
|
type OpenAlertDialog = (message: ReactNode, options?: AlertOptions) => Promise<void>;
|
|
310
310
|
type OpenConfirmDialog = (message: ReactNode, options?: ConfirmOptions) => Promise<boolean>;
|
|
311
|
-
type DialogComponent<
|
|
311
|
+
type DialogComponent<TPayload, TResult> = React.ComponentType<DialogProps<TPayload, TResult>>;
|
|
312
312
|
interface OpenDialog {
|
|
313
|
-
<
|
|
314
|
-
<
|
|
313
|
+
<TPayload extends undefined, TResult>(Component: DialogComponent<TPayload, TResult>, payload?: TPayload, options?: OpenDialogOptions<TResult>): Promise<TResult>;
|
|
314
|
+
<TPayload, TResult>(Component: DialogComponent<TPayload, TResult>, payload: TPayload, options?: OpenDialogOptions<TResult>): Promise<TResult>;
|
|
315
315
|
}
|
|
316
|
-
type CloseDialog = <
|
|
316
|
+
type CloseDialog = <TResult>(dialog: Promise<TResult>, result: TResult) => Promise<TResult>;
|
|
317
317
|
interface DialogHook {
|
|
318
318
|
alert: OpenAlertDialog;
|
|
319
319
|
confirm: OpenConfirmDialog;
|
|
@@ -323,7 +323,7 @@ interface DialogHook {
|
|
|
323
323
|
declare function useDialogs(): DialogHook;
|
|
324
324
|
|
|
325
325
|
type OptionalId = string | undefined | null;
|
|
326
|
-
type BaseFileMetaArrayQueryOptions = Omit<DefinedInitialDataOptions<FileMeta
|
|
326
|
+
type BaseFileMetaArrayQueryOptions = Omit<DefinedInitialDataOptions<Array<FileMeta>>, "queryKey" | "queryFn" | "staleTime" | "gcTime" | "refetchOnWindowFocus" | "initialData">;
|
|
327
327
|
type BaseBlobQueryOptions = Omit<DefinedInitialDataOptions<Blob, Error, string>, "queryKey" | "queryFn" | "select" | "staleTime" | "gcTime" | "refetchOnWindowFocus" | "initialData">;
|
|
328
328
|
type BaseFileMetaMutationOptions = Omit<UseMutationOptions<FileMeta, Error, FileMeta>, "mutationFn" | "onSettled">;
|
|
329
329
|
type BaseBlobMutationOptions = Omit<UseMutationOptions<Blob, Error, FileMeta>, "mutationFn" | "onSuccess">;
|
|
@@ -354,10 +354,10 @@ interface EmailAttachment {
|
|
|
354
354
|
interface Email {
|
|
355
355
|
subject: string;
|
|
356
356
|
body: string;
|
|
357
|
-
to: string
|
|
358
|
-
bcc?: string
|
|
359
|
-
cc?: string
|
|
360
|
-
attachments?: EmailAttachment
|
|
357
|
+
to: Array<string>;
|
|
358
|
+
bcc?: Array<string>;
|
|
359
|
+
cc?: Array<string>;
|
|
360
|
+
attachments?: Array<EmailAttachment>;
|
|
361
361
|
}
|
|
362
362
|
|
|
363
363
|
declare enum EmployeeCategoryGroup {
|