wcz-test 4.0.1 → 4.1.1

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 CHANGED
@@ -9,6 +9,7 @@ import { TFunction } from 'i18next';
9
9
  export { t } from 'i18next';
10
10
  export { uuidv7 } from 'uuidv7';
11
11
  import * as axios from 'axios';
12
+ import * as _tanstack_start_client_core from '@tanstack/start-client-core';
12
13
  import { DateTimePickerProps, DatePickerProps } from '@mui/x-date-pickers-pro';
13
14
  import { NumericFormatProps, InputAttributes } from 'react-number-format/types/types';
14
15
  import * as _tanstack_react_form from '@tanstack/react-form';
@@ -51,11 +52,6 @@ interface FileMeta {
51
52
  mimeType: string;
52
53
  }
53
54
 
54
- type FileActions = {
55
- download?: boolean;
56
- delete?: boolean;
57
- };
58
-
59
55
  type FileViewerGridItemBar = "hidden" | "always" | "onMouseEnter";
60
56
  interface FileViewerGridProps {
61
57
  size?: number;
@@ -63,6 +59,11 @@ interface FileViewerGridProps {
63
59
  sx?: SxProps<Theme>;
64
60
  }
65
61
 
62
+ type FileActions = {
63
+ download?: boolean;
64
+ delete?: boolean;
65
+ };
66
+
66
67
  interface FileViewerListProps {
67
68
  sx?: SxProps<Theme>;
68
69
  }
@@ -75,7 +76,7 @@ interface FileViewerProps {
75
76
  /** Insert your record ID (can be multiple splitted by comma) */
76
77
  subId: string | undefined | null;
77
78
  onDelete?: (params: {
78
- remainingFileMetas: FileMeta[];
79
+ remainingFileMetas: Array<FileMeta>;
79
80
  deletedFileMeta: FileMeta;
80
81
  }) => void;
81
82
  actions?: FileActions;
@@ -131,10 +132,10 @@ interface NavigationParams {
131
132
  t: TFunction<"translation", undefined>;
132
133
  }
133
134
 
134
- interface NavigationPageItem extends Pick<LinkOptions, "to" | "href" | "params" | "search"> {
135
+ interface NavigationPageItem extends Pick<LinkOptions, "to">, Partial<Pick<LinkOptions, "href" | "params" | "search">> {
135
136
  title: string;
136
137
  icon: React.ReactNode;
137
- children?: NavigationItem[];
138
+ children?: Array<NavigationItem>;
138
139
  hidden?: boolean;
139
140
  }
140
141
  interface NavigationDivider {
@@ -147,7 +148,7 @@ interface NavigationHeader {
147
148
  hidden?: boolean;
148
149
  }
149
150
  type NavigationItem = NavigationPageItem | NavigationDivider | NavigationHeader;
150
- type Navigation = NavigationItem[];
151
+ type Navigation = Array<NavigationItem>;
151
152
 
152
153
  interface ProvidersProps {
153
154
  getNavigation?: (parameters: NavigationParams) => Navigation;
@@ -202,6 +203,8 @@ declare const rootRouteHead: ({ title }: RootRouteHeadProps) => () => {
202
203
  };
203
204
  declare const wczApiClient: axios.AxiosInstance;
204
205
 
206
+ declare const setSSRLanguage: _tanstack_start_client_core.ServerOnlyFn<[], Promise<void>>;
207
+
205
208
  type FormSubmitButtonProps = Omit<ButtonProps, "loading" | "disabled" | "onClick" | "type">;
206
209
 
207
210
  type FormOmittedProps = "name" | "value" | "onChange" | "onBlur" | "error" | "helperText" | "renderInput" | "type" | "aria-label";
@@ -224,7 +227,7 @@ interface Option {
224
227
  }
225
228
  interface FormRadioGroupProps extends Omit<RadioGroupProps, FormOmittedProps> {
226
229
  label?: string;
227
- options: Option[];
230
+ options: Array<Option>;
228
231
  }
229
232
 
230
233
  interface FormSwitchProps extends Omit<SwitchProps, FormOmittedProps> {
@@ -291,8 +294,8 @@ declare const withLayoutForm: <TFormData, TOnMount extends _tanstack_form_core.F
291
294
  }>;
292
295
  }>) => react.JSX.Element;
293
296
 
294
- interface OpenDialogOptions<R> {
295
- onClose?: (result: R) => Promise<void>;
297
+ interface OpenDialogOptions<TResult> {
298
+ onClose?: (result: TResult) => Promise<void>;
296
299
  }
297
300
  interface AlertOptions {
298
301
  title?: ReactNode;
@@ -301,19 +304,19 @@ interface ConfirmOptions {
301
304
  title?: ReactNode;
302
305
  cancelText?: ReactNode;
303
306
  }
304
- interface DialogProps<P = undefined, R = void> {
305
- payload: P;
307
+ interface DialogProps<TPayload = undefined, TResult = void> {
308
+ payload: TPayload;
306
309
  open: boolean;
307
- onClose: (result: R) => Promise<void>;
310
+ onClose: (result: TResult) => Promise<void>;
308
311
  }
309
312
  type OpenAlertDialog = (message: ReactNode, options?: AlertOptions) => Promise<void>;
310
313
  type OpenConfirmDialog = (message: ReactNode, options?: ConfirmOptions) => Promise<boolean>;
311
- type DialogComponent<P, R> = React.ComponentType<DialogProps<P, R>>;
314
+ type DialogComponent<TPayload, TResult> = React.ComponentType<DialogProps<TPayload, TResult>>;
312
315
  interface OpenDialog {
313
- <P extends undefined, R>(Component: DialogComponent<P, R>, payload?: P, options?: OpenDialogOptions<R>): Promise<R>;
314
- <P, R>(Component: DialogComponent<P, R>, payload: P, options?: OpenDialogOptions<R>): Promise<R>;
316
+ <TPayload extends undefined, TResult>(Component: DialogComponent<TPayload, TResult>, payload?: TPayload, options?: OpenDialogOptions<TResult>): Promise<TResult>;
317
+ <TPayload, TResult>(Component: DialogComponent<TPayload, TResult>, payload: TPayload, options?: OpenDialogOptions<TResult>): Promise<TResult>;
315
318
  }
316
- type CloseDialog = <R>(dialog: Promise<R>, result: R) => Promise<R>;
319
+ type CloseDialog = <TResult>(dialog: Promise<TResult>, result: TResult) => Promise<TResult>;
317
320
  interface DialogHook {
318
321
  alert: OpenAlertDialog;
319
322
  confirm: OpenConfirmDialog;
@@ -323,7 +326,7 @@ interface DialogHook {
323
326
  declare function useDialogs(): DialogHook;
324
327
 
325
328
  type OptionalId = string | undefined | null;
326
- type BaseFileMetaArrayQueryOptions = Omit<DefinedInitialDataOptions<FileMeta[]>, "queryKey" | "queryFn" | "staleTime" | "gcTime" | "refetchOnWindowFocus" | "initialData">;
329
+ type BaseFileMetaArrayQueryOptions = Omit<DefinedInitialDataOptions<Array<FileMeta>>, "queryKey" | "queryFn" | "staleTime" | "gcTime" | "refetchOnWindowFocus" | "initialData">;
327
330
  type BaseBlobQueryOptions = Omit<DefinedInitialDataOptions<Blob, Error, string>, "queryKey" | "queryFn" | "select" | "staleTime" | "gcTime" | "refetchOnWindowFocus" | "initialData">;
328
331
  type BaseFileMetaMutationOptions = Omit<UseMutationOptions<FileMeta, Error, FileMeta>, "mutationFn" | "onSettled">;
329
332
  type BaseBlobMutationOptions = Omit<UseMutationOptions<Blob, Error, FileMeta>, "mutationFn" | "onSuccess">;
@@ -354,10 +357,10 @@ interface EmailAttachment {
354
357
  interface Email {
355
358
  subject: string;
356
359
  body: string;
357
- to: string[];
358
- bcc?: string[];
359
- cc?: string[];
360
- attachments?: EmailAttachment[];
360
+ to: Array<string>;
361
+ bcc?: Array<string>;
362
+ cc?: Array<string>;
363
+ attachments?: Array<EmailAttachment>;
361
364
  }
362
365
 
363
366
  declare enum EmployeeCategoryGroup {
@@ -423,4 +426,4 @@ interface Department {
423
426
  manager: Employee;
424
427
  }
425
428
 
426
- export { ChipInputCell, type Department, type DialogProps, Dropzone, EditableColumnHeader, type Email, type EmailAttachment, type Employee, EmployeeCategoryGroup, EmployeeStatus, type FileMeta, FileViewer, LayoutProvider, type Navigation, type NavigationParams, PageHeader, Platform, RouterButton, RouterError, RouterGridActionsCellItem, RouterIconButton, RouterLink, RouterListItemButton, RouterNotFound, RouterTab, TableContainer, TypographyWithIcon, type User, rootRouteHead, useDeleteFile, useDeleteFiles, useDialogs, useDownloadFile, useFieldContext, useFormContext, useGetFile, useGetFileMetas, useGetFileThumbnail, useLayoutForm, useOpenFile, useUpdateFileMeta, useUploadFile, wczApiClient, withLayoutForm };
429
+ export { ChipInputCell, type Department, type DialogProps, Dropzone, EditableColumnHeader, type Email, type EmailAttachment, type Employee, EmployeeCategoryGroup, EmployeeStatus, type FileMeta, FileViewer, LayoutProvider, type Navigation, type NavigationParams, PageHeader, Platform, RouterButton, RouterError, RouterGridActionsCellItem, RouterIconButton, RouterLink, RouterListItemButton, RouterNotFound, RouterTab, TableContainer, TypographyWithIcon, type User, rootRouteHead, setSSRLanguage, useDeleteFile, useDeleteFiles, useDialogs, useDownloadFile, useFieldContext, useFormContext, useGetFile, useGetFileMetas, useGetFileThumbnail, useLayoutForm, useOpenFile, useUpdateFileMeta, useUploadFile, wczApiClient, withLayoutForm };