wcz-test 3.1.1 → 3.3.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 CHANGED
@@ -1,14 +1,10 @@
1
- import { TypographyProps, ContainerProps, SxProps, Theme, ChipProps, ButtonProps, IconButtonProps, LinkProps, TabProps, CssVarsThemeOptions, TextFieldProps, SliderProps, RadioGroupProps, SwitchProps, CheckboxProps, AutocompleteProps } from '@mui/material';
2
- export { PageHeader } from '@toolpad/core/PageContainer';
1
+ import { TypographyProps, SxProps, Theme, TableContainerProps, ChipProps, ButtonProps, IconButtonProps, LinkProps, TabProps, CssVarsThemeOptions, TextFieldProps, SliderProps, RadioGroupProps, SwitchProps, CheckboxProps, AutocompleteProps } from '@mui/material';
3
2
  import * as react from 'react';
4
- import react__default, { FC } from 'react';
3
+ import react__default, { FC, ReactNode, ComponentType } from 'react';
5
4
  import { DropzoneOptions } from 'react-dropzone';
6
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
6
  import { GridValidRowModel, GridRenderCellParams, GridColumnHeaderParams, GridActionsCellItemProps } from '@mui/x-data-grid-premium';
8
- import { LinkComponent, ErrorComponentProps } from '@tanstack/react-router';
9
- import { Navigation } from '@toolpad/core/AppProvider';
10
- export { Navigation } from '@toolpad/core/AppProvider';
11
- import { DashboardLayoutProps } from '@toolpad/core/DashboardLayout';
7
+ import { LinkComponent, ErrorComponentProps, LinkOptions } from '@tanstack/react-router';
12
8
  import { TFunction } from 'i18next';
13
9
  export { t } from 'i18next';
14
10
  export { uuidv7 } from 'uuidv7';
@@ -17,9 +13,7 @@ import { DateTimePickerProps, DatePickerProps } from '@mui/x-date-pickers-pro';
17
13
  import { NumericFormatProps, InputAttributes } from 'react-number-format/types/types';
18
14
  import * as _tanstack_react_form from '@tanstack/react-form';
19
15
  import * as _tanstack_form_core from '@tanstack/form-core';
20
- export { useDialogs } from '@toolpad/core/useDialogs';
21
- export { useNotifications } from '@toolpad/core/useNotifications';
22
- export { useLocalStorageState } from '@toolpad/core/useLocalStorageState';
16
+ export { default as useLocalStorageState } from 'use-local-storage-state';
23
17
  export { useTranslation } from 'react-i18next';
24
18
  import * as _tanstack_react_query from '@tanstack/react-query';
25
19
  import { DefinedInitialDataOptions, UseMutationOptions } from '@tanstack/react-query';
@@ -31,13 +25,64 @@ interface TypographyWithIconProps extends TypographyProps {
31
25
  }
32
26
  declare const TypographyWithIcon: React.FC<TypographyWithIconProps>;
33
27
 
34
- declare const PageContainer: FC<ContainerProps>;
28
+ interface PageHeaderProps {
29
+ title: string;
30
+ action?: ReactNode;
31
+ sx?: SxProps<Theme>;
32
+ }
33
+ declare const PageHeader: FC<PageHeaderProps>;
34
+
35
+ declare const TableContainer: FC<TableContainerProps>;
35
36
 
36
37
  interface DropzoneProps extends DropzoneOptions {
37
38
  sx?: SxProps<Theme>;
38
39
  }
39
40
  declare const Dropzone: FC<DropzoneProps>;
40
41
 
42
+ interface FileMeta {
43
+ id: string;
44
+ subId: string;
45
+ appName: string;
46
+ fileName: string;
47
+ fileExtension: string;
48
+ fileSize: number;
49
+ mediaSubType: string;
50
+ mediaType: string;
51
+ mimeType: string;
52
+ }
53
+
54
+ type FileActions = {
55
+ download?: boolean;
56
+ delete?: boolean;
57
+ };
58
+
59
+ type FileViewerGridItemBar = "hidden" | "always" | "onMouseEnter";
60
+ interface FileViewerGridProps {
61
+ size?: number;
62
+ itemBar?: FileViewerGridItemBar;
63
+ sx?: SxProps<Theme>;
64
+ }
65
+
66
+ interface FileViewerListProps {
67
+ sx?: SxProps<Theme>;
68
+ }
69
+
70
+ interface FileViewerComponent {
71
+ Grid: ComponentType<FileViewerGridProps>;
72
+ List: ComponentType<FileViewerListProps>;
73
+ }
74
+ interface FileViewerProps {
75
+ /** Insert your record ID (can be multiple splitted by comma) */
76
+ subId: string | undefined | null;
77
+ onDelete?: (params: {
78
+ remainingFileMetas: FileMeta[];
79
+ deletedFileMeta: FileMeta;
80
+ }) => void;
81
+ actions?: FileActions;
82
+ children: (component: FileViewerComponent) => ReactNode;
83
+ }
84
+ declare const FileViewer: FC<FileViewerProps>;
85
+
41
86
  interface ChipInputCellProps<T extends GridValidRowModel> {
42
87
  params: GridRenderCellParams<T>;
43
88
  slotProps?: ChipProps;
@@ -83,9 +128,25 @@ interface NavigationParams {
83
128
  t: TFunction<"translation", undefined>;
84
129
  }
85
130
 
86
- interface ProvidersProps extends Pick<DashboardLayoutProps, "children" | "defaultSidebarCollapsed" | "disableCollapsibleSidebar" | "sidebarExpandedWidth"> {
131
+ interface NavigationPageItem extends Pick<LinkOptions, "to" | "href" | "params" | "search"> {
132
+ title: string;
133
+ icon: React.ReactNode;
134
+ children?: NavigationItem[];
135
+ }
136
+ interface NavigationDivider {
137
+ kind: "divider";
138
+ }
139
+ interface NavigationHeader {
140
+ kind: "header";
141
+ title: string;
142
+ }
143
+ type NavigationItem = NavigationPageItem | NavigationDivider | NavigationHeader;
144
+ type Navigation = NavigationItem[];
145
+
146
+ interface ProvidersProps {
87
147
  getNavigation?: (parameters: NavigationParams) => Navigation;
88
148
  theme?: Pick<CssVarsThemeOptions, "colorSchemes" | "components">;
149
+ children: ReactNode;
89
150
  }
90
151
  declare const LayoutProvider: FC<ProvidersProps>;
91
152
 
@@ -135,6 +196,8 @@ declare const rootRouteHead: ({ title }: RootRouteHeadProps) => () => {
135
196
  };
136
197
  declare const wczApiClient: axios.AxiosInstance;
137
198
 
199
+ type FormSubmitButtonProps = Omit<ButtonProps, "loading" | "disabled" | "onClick" | "type">;
200
+
138
201
  type FormOmittedProps = "name" | "value" | "onChange" | "onBlur" | "error" | "helperText" | "renderInput" | "type" | "aria-label";
139
202
 
140
203
  interface FormDateTimePickerProps extends Omit<DateTimePickerProps, FormOmittedProps> {
@@ -179,27 +242,22 @@ interface FormTextFieldProps extends Omit<TextFieldProps, FormOmittedProps> {
179
242
  type?: "color" | "email" | "password" | "search" | "tel" | "text" | "url";
180
243
  }
181
244
 
182
- type FormSubmitButtonProps = Omit<ButtonProps, "loading" | "disabled" | "onClick" | "type">;
183
-
184
- declare const useFieldContext: <TData>() => _tanstack_form_core.FieldApi<any, string, TData, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>;
185
- declare const useFormContext: () => _tanstack_react_form.ReactFormExtendedApi<Record<string, never>, any, any, any, any, any, any, any, any, any>;
186
- declare const useLayoutForm: <TFormData, TOnMount extends _tanstack_form_core.FormValidateOrFn<TFormData> | undefined, TOnChange extends _tanstack_form_core.FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends _tanstack_form_core.FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends _tanstack_form_core.FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends _tanstack_form_core.FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends _tanstack_form_core.FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends _tanstack_form_core.FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends _tanstack_form_core.FormAsyncValidateOrFn<TFormData> | undefined, TSubmitMeta>(props: _tanstack_form_core.FormOptions<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnServer, TSubmitMeta>) => _tanstack_form_core.FormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnServer, TSubmitMeta> & _tanstack_react_form.ReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnServer, TSubmitMeta> & NoInfer<{
245
+ declare const useFieldContext: <TData>() => _tanstack_form_core.FieldApi<any, string, TData, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>;
246
+ declare const useFormContext: () => _tanstack_react_form.ReactFormExtendedApi<Record<string, never>, any, any, any, any, any, any, any, any, any, any, any>;
247
+ declare const useLayoutForm: <TFormData, TOnMount extends _tanstack_form_core.FormValidateOrFn<TFormData> | undefined, TOnChange extends _tanstack_form_core.FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends _tanstack_form_core.FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends _tanstack_form_core.FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends _tanstack_form_core.FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends _tanstack_form_core.FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends _tanstack_form_core.FormAsyncValidateOrFn<TFormData> | undefined, TOnDynamic extends _tanstack_form_core.FormValidateOrFn<TFormData> | undefined, TOnDynamicAsync extends _tanstack_form_core.FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends _tanstack_form_core.FormAsyncValidateOrFn<TFormData> | undefined, TSubmitMeta>(props: _tanstack_form_core.FormOptions<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>) => _tanstack_react_form.AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
248
+ readonly TextField: react.FC<FormTextFieldProps>;
249
+ readonly NumberField: react.FC<FormNumberFieldProps>;
250
+ readonly Autocomplete: react.FC<FormAutocompleteProps>;
251
+ readonly Checkbox: react.FC<FormCheckboxProps>;
252
+ readonly Switch: react.FC<FormSwitchProps>;
253
+ readonly RadioGroup: react.FC<FormRadioGroupProps>;
254
+ readonly Slider: react.FC<FormSliderProps>;
255
+ readonly DatePicker: react.FC<FormDatePickerProps>;
256
+ readonly DateTimePicker: react.FC<FormDateTimePickerProps>;
257
+ }, {
187
258
  readonly SubmitButton: react.FC<FormSubmitButtonProps>;
188
- }> & {
189
- AppField: _tanstack_react_form.FieldComponent<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnServer, TSubmitMeta, NoInfer<{
190
- readonly TextField: react.FC<FormTextFieldProps>;
191
- readonly NumberField: react.FC<FormNumberFieldProps>;
192
- readonly Autocomplete: react.FC<FormAutocompleteProps>;
193
- readonly Checkbox: react.FC<FormCheckboxProps>;
194
- readonly Switch: react.FC<FormSwitchProps>;
195
- readonly RadioGroup: react.FC<FormRadioGroupProps>;
196
- readonly Slider: react.FC<FormSliderProps>;
197
- readonly DatePicker: react.FC<FormDatePickerProps>;
198
- readonly DateTimePicker: react.FC<FormDateTimePickerProps>;
199
- }>>;
200
- AppForm: react.ComponentType<react.PropsWithChildren>;
201
- };
202
- declare const withLayoutForm: <TFormData, TOnMount extends _tanstack_form_core.FormValidateOrFn<TFormData> | undefined, TOnChange extends _tanstack_form_core.FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends _tanstack_form_core.FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends _tanstack_form_core.FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends _tanstack_form_core.FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends _tanstack_form_core.FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends _tanstack_form_core.FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends _tanstack_form_core.FormAsyncValidateOrFn<TFormData> | undefined, TSubmitMeta, TRenderProps extends object = {}>({ render, props, }: _tanstack_react_form.WithFormProps<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnServer, TSubmitMeta, {
259
+ }>;
260
+ declare const withLayoutForm: <TFormData, TOnMount extends _tanstack_form_core.FormValidateOrFn<TFormData> | undefined, TOnChange extends _tanstack_form_core.FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends _tanstack_form_core.FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends _tanstack_form_core.FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends _tanstack_form_core.FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends _tanstack_form_core.FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends _tanstack_form_core.FormAsyncValidateOrFn<TFormData> | undefined, TOnDynamic extends _tanstack_form_core.FormValidateOrFn<TFormData> | undefined, TOnDynamicAsync extends _tanstack_form_core.FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends _tanstack_form_core.FormAsyncValidateOrFn<TFormData> | undefined, TSubmitMeta, TRenderProps extends object = {}>({ render, props, }: _tanstack_react_form.WithFormProps<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
203
261
  readonly TextField: react.FC<FormTextFieldProps>;
204
262
  readonly NumberField: react.FC<FormNumberFieldProps>;
205
263
  readonly Autocomplete: react.FC<FormAutocompleteProps>;
@@ -212,46 +270,68 @@ declare const withLayoutForm: <TFormData, TOnMount extends _tanstack_form_core.F
212
270
  }, {
213
271
  readonly SubmitButton: react.FC<FormSubmitButtonProps>;
214
272
  }, TRenderProps>) => (props: react.PropsWithChildren<NoInfer<[unknown] extends [TRenderProps] ? any : TRenderProps> & {
215
- form: _tanstack_form_core.FormApi<[unknown] extends [TFormData] ? any : TFormData, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta> & _tanstack_react_form.ReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta> & NoInfer<{
273
+ form: _tanstack_react_form.AppFieldExtendedReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnDynamic] ? [TOnDynamic] extends [TOnDynamic & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamic : TOnDynamic, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnDynamicAsync] ? [TOnDynamicAsync] extends [TOnDynamicAsync & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamicAsync : TOnDynamicAsync, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta, {
274
+ readonly TextField: react.FC<FormTextFieldProps>;
275
+ readonly NumberField: react.FC<FormNumberFieldProps>;
276
+ readonly Autocomplete: react.FC<FormAutocompleteProps>;
277
+ readonly Checkbox: react.FC<FormCheckboxProps>;
278
+ readonly Switch: react.FC<FormSwitchProps>;
279
+ readonly RadioGroup: react.FC<FormRadioGroupProps>;
280
+ readonly Slider: react.FC<FormSliderProps>;
281
+ readonly DatePicker: react.FC<FormDatePickerProps>;
282
+ readonly DateTimePicker: react.FC<FormDateTimePickerProps>;
283
+ }, {
216
284
  readonly SubmitButton: react.FC<FormSubmitButtonProps>;
217
- }> & {
218
- AppField: _tanstack_react_form.FieldComponent<[unknown] extends [TFormData] ? any : TFormData, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [_tanstack_form_core.FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (_tanstack_form_core.FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta, NoInfer<{
219
- readonly TextField: react.FC<FormTextFieldProps>;
220
- readonly NumberField: react.FC<FormNumberFieldProps>;
221
- readonly Autocomplete: react.FC<FormAutocompleteProps>;
222
- readonly Checkbox: react.FC<FormCheckboxProps>;
223
- readonly Switch: react.FC<FormSwitchProps>;
224
- readonly RadioGroup: react.FC<FormRadioGroupProps>;
225
- readonly Slider: react.FC<FormSliderProps>;
226
- readonly DatePicker: react.FC<FormDatePickerProps>;
227
- readonly DateTimePicker: react.FC<FormDateTimePickerProps>;
228
- }>>;
229
- AppForm: react.ComponentType<react.PropsWithChildren>;
230
- };
285
+ }>;
231
286
  }>) => react.JSX.Element;
232
287
 
233
- interface FileMeta {
234
- id: string;
235
- subId: string;
236
- appName: string;
237
- fileName: string;
238
- fileExtension: string;
239
- fileSize: number;
240
- mediaSubType: string;
241
- mediaType: string;
242
- mimeType: string;
288
+ interface OpenDialogOptions<R> {
289
+ onClose?: (result: R) => Promise<void>;
243
290
  }
244
-
245
- declare const useGetFileMetas: (subId: string | undefined | null, options?: Omit<DefinedInitialDataOptions<FileMeta[]>, "queryKey" | "queryFn" | "initialData" | "refetchOnWindowFocus">) => _tanstack_react_query.DefinedUseQueryResult<FileMeta[], Error>;
246
- declare const useGetFileThumbnail: (meta: FileMeta | undefined | null, options?: Omit<DefinedInitialDataOptions<Blob, Error, string>, "queryKey" | "queryFn" | "select" | "staleTime" | "gcTime" | "refetchOnWindowFocus" | "initialData">) => _tanstack_react_query.UseQueryResult<string, Error>;
247
- declare const useGetFile: (meta: FileMeta | undefined | null, options?: Omit<DefinedInitialDataOptions<Blob, Error, string>, "queryKey" | "queryFn" | "select" | "staleTime" | "gcTime" | "refetchOnWindowFocus" | "initialData">) => _tanstack_react_query.UseQueryResult<string, Error>;
248
- declare const useDownloadFile: (options?: Omit<UseMutationOptions<Blob, Error, FileMeta>, "mutationFn" | "onSuccess">) => _tanstack_react_query.UseMutationResult<Blob, Error, FileMeta, unknown>;
249
- declare const useOpenFile: (options?: Omit<UseMutationOptions<Blob, Error, FileMeta>, "mutationFn" | "onSuccess">) => _tanstack_react_query.UseMutationResult<Blob, Error, FileMeta, unknown>;
250
- declare const useUpdateFileMeta: (options?: Omit<UseMutationOptions<FileMeta, Error, FileMeta>, "mutationFn" | "onSettled">) => _tanstack_react_query.UseMutationResult<FileMeta, Error, FileMeta, unknown>;
251
- declare const useDeleteFile: (options?: Omit<UseMutationOptions<FileMeta, Error, FileMeta>, "mutationFn" | "onSettled">) => _tanstack_react_query.UseMutationResult<FileMeta, Error, FileMeta, unknown>;
252
- declare const useDeleteFiles: (options?: Omit<UseMutationOptions<string, Error, string>, "mutationFn" | "onSettled">) => _tanstack_react_query.UseMutationResult<string, Error, string, unknown>;
291
+ interface AlertOptions {
292
+ title?: ReactNode;
293
+ }
294
+ interface ConfirmOptions {
295
+ title?: ReactNode;
296
+ cancelText?: ReactNode;
297
+ }
298
+ interface DialogProps<P = undefined, R = void> {
299
+ payload: P;
300
+ open: boolean;
301
+ onClose: (result: R) => Promise<void>;
302
+ }
303
+ type OpenAlertDialog = (message: ReactNode, options?: AlertOptions) => Promise<void>;
304
+ type OpenConfirmDialog = (message: ReactNode, options?: ConfirmOptions) => Promise<boolean>;
305
+ type DialogComponent<P, R> = React.ComponentType<DialogProps<P, R>>;
306
+ interface OpenDialog {
307
+ <P extends undefined, R>(Component: DialogComponent<P, R>, payload?: P, options?: OpenDialogOptions<R>): Promise<R>;
308
+ <P, R>(Component: DialogComponent<P, R>, payload: P, options?: OpenDialogOptions<R>): Promise<R>;
309
+ }
310
+ type CloseDialog = <R>(dialog: Promise<R>, result: R) => Promise<R>;
311
+ interface DialogHook {
312
+ alert: OpenAlertDialog;
313
+ confirm: OpenConfirmDialog;
314
+ open: OpenDialog;
315
+ close: CloseDialog;
316
+ }
317
+ declare function useDialogs(): DialogHook;
318
+
319
+ type OptionalId = string | undefined | null;
320
+ type BaseFileMetaArrayQueryOptions = Omit<DefinedInitialDataOptions<FileMeta[]>, "queryKey" | "queryFn" | "staleTime" | "gcTime" | "refetchOnWindowFocus" | "initialData">;
321
+ type BaseBlobQueryOptions = Omit<DefinedInitialDataOptions<Blob, Error, string>, "queryKey" | "queryFn" | "select" | "staleTime" | "gcTime" | "refetchOnWindowFocus" | "initialData">;
322
+ type BaseFileMetaMutationOptions = Omit<UseMutationOptions<FileMeta, Error, FileMeta>, "mutationFn" | "onSettled">;
323
+ type BaseBlobMutationOptions = Omit<UseMutationOptions<Blob, Error, FileMeta>, "mutationFn" | "onSuccess">;
324
+ type BaseStringMutationOptions = Omit<UseMutationOptions<string, Error, string>, "mutationFn" | "onSettled">;
325
+ declare const useGetFileMetas: (subId: OptionalId, options?: BaseFileMetaArrayQueryOptions) => _tanstack_react_query.UseQueryResult<FileMeta[], Error>;
326
+ declare const useGetFileThumbnail: (meta: FileMeta | undefined | null, options?: BaseBlobQueryOptions) => _tanstack_react_query.UseQueryResult<string, Error>;
327
+ declare const useGetFile: (meta: FileMeta | undefined | null, options?: BaseBlobQueryOptions) => _tanstack_react_query.UseQueryResult<string, Error>;
328
+ declare const useDownloadFile: (options?: BaseBlobMutationOptions) => _tanstack_react_query.UseMutationResult<Blob, Error, FileMeta, unknown>;
329
+ declare const useOpenFile: (options?: BaseBlobMutationOptions) => _tanstack_react_query.UseMutationResult<Blob, Error, FileMeta, unknown>;
330
+ declare const useUpdateFileMeta: (options?: BaseFileMetaMutationOptions) => _tanstack_react_query.UseMutationResult<FileMeta, Error, FileMeta, unknown>;
331
+ declare const useDeleteFile: (options?: BaseFileMetaMutationOptions) => _tanstack_react_query.UseMutationResult<FileMeta, Error, FileMeta, unknown>;
332
+ declare const useDeleteFiles: (options?: BaseStringMutationOptions) => _tanstack_react_query.UseMutationResult<string, Error, string, unknown>;
253
333
  interface UseUploadFileProps {
254
- subId: string | undefined | null;
334
+ subId: OptionalId;
255
335
  onSuccess?: (meta: Pick<FileMeta, "id" | "appName" | "subId" | "fileName">) => void;
256
336
  onError?: (error: Error | DetailedError) => void;
257
337
  }
@@ -259,12 +339,6 @@ declare const useUploadFile: ({ subId, onSuccess, onError }: UseUploadFileProps)
259
339
  mutate: (file: File) => Promise<void>;
260
340
  progress: number;
261
341
  };
262
- declare function useOptimisticFileMutation(subId: string | undefined | null, options?: Omit<DefinedInitialDataOptions<FileMeta[]>, "queryKey" | "queryFn" | "initialData" | "refetchOnWindowFocus">): {
263
- addFile: (meta: FileMeta) => void;
264
- removeFile: (meta: FileMeta) => void;
265
- save: () => void;
266
- undo: () => void;
267
- };
268
342
 
269
343
  interface EmailAttachment {
270
344
  appName: string;
@@ -289,10 +363,10 @@ declare enum EmployeeCategoryGroup {
289
363
  declare enum EmployeeStatus {
290
364
  Active = "Active",
291
365
  Terminated = "Terminated",
292
- LeaveOfAbsence = "LeaveOfAbsence"
366
+ LeaveOfAbsence = "Leave of Absence"
293
367
  }
294
368
 
295
- interface PeoplesoftEmployee {
369
+ interface Employee {
296
370
  badgeId: string;
297
371
  category: string;
298
372
  categoryGroup: EmployeeCategoryGroup;
@@ -323,9 +397,13 @@ interface PeoplesoftEmployee {
323
397
  terminationFutureDate: Date | null;
324
398
  type: string;
325
399
  upperDepartmentId: string;
400
+ jobCode: string;
401
+ jobDescription: string;
402
+ terminationReason: string | null;
403
+ supervisorRecordNumber: number;
326
404
  }
327
405
 
328
- interface PeoplesoftDepartment {
406
+ interface Department {
329
407
  departmentId: string;
330
408
  description: string;
331
409
  managerId: string;
@@ -336,7 +414,7 @@ interface PeoplesoftDepartment {
336
414
  location: string;
337
415
  salLocation: string;
338
416
  plantId: string;
339
- manager: PeoplesoftEmployee;
417
+ manager: Employee;
340
418
  }
341
419
 
342
- export { ChipInputCell, Dropzone, EditableColumnHeader, type Email, type EmailAttachment, EmployeeCategoryGroup, EmployeeStatus, type FileMeta, LayoutProvider, type NavigationParams, PageContainer, type PeoplesoftDepartment, type PeoplesoftEmployee, Platform, RouterButton, RouterError, RouterGridActionsCellItem, RouterIconButton, RouterLink, RouterNotFound, RouterTab, TypographyWithIcon, type User, rootRouteHead, useDeleteFile, useDeleteFiles, useDownloadFile, useFieldContext, useFormContext, useGetFile, useGetFileMetas, useGetFileThumbnail, useLayoutForm, useOpenFile, useOptimisticFileMutation, useUpdateFileMeta, useUploadFile, wczApiClient, withLayoutForm };
420
+ 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, RouterNotFound, RouterTab, TableContainer, TypographyWithIcon, type User, rootRouteHead, useDeleteFile, useDeleteFiles, useDialogs, useDownloadFile, useFieldContext, useFormContext, useGetFile, useGetFileMetas, useGetFileThumbnail, useLayoutForm, useOpenFile, useUpdateFileMeta, useUploadFile, wczApiClient, withLayoutForm };