wcz-test 3.4.5 → 3.4.7

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.
Files changed (68) hide show
  1. package/dist/index.d.ts +2 -426
  2. package/dist/src/components/core/AppTitle.d.ts +3 -0
  3. package/dist/src/components/core/Layout.d.ts +10 -0
  4. package/dist/src/components/core/Markdown.d.ts +6 -0
  5. package/dist/src/components/core/PageHeader.d.ts +9 -0
  6. package/dist/src/components/core/TableContainer.d.ts +3 -0
  7. package/dist/src/components/core/ToolbarAccount.d.ts +2 -0
  8. package/dist/src/components/core/TypographyWithIcon.d.ts +7 -0
  9. package/dist/src/components/core/navigation/NavigationList.d.ts +21 -0
  10. package/dist/src/components/core/navigation/NavigationListItem.d.ts +15 -0
  11. package/dist/src/components/core/navigation/NavigationRail.d.ts +12 -0
  12. package/dist/src/components/data-grid/ChipInputCell.d.ts +9 -0
  13. package/dist/src/components/data-grid/EditableColumnHeader.d.ts +2 -0
  14. package/dist/src/components/file/Dropzone.d.ts +8 -0
  15. package/dist/src/components/file/FileViewer.d.ts +21 -0
  16. package/dist/src/components/file/fileViewer/FileViewerGrid.d.ts +17 -0
  17. package/dist/src/components/file/fileViewer/FileViewerList.d.ts +12 -0
  18. package/dist/src/components/file/fileViewer/ImageViewer.d.ts +6 -0
  19. package/dist/src/components/file/fileViewer/common/ActionsMenu.d.ts +15 -0
  20. package/dist/src/components/form/FormAutocomplete.d.ts +7 -0
  21. package/dist/src/components/form/FormCheckbox.d.ts +7 -0
  22. package/dist/src/components/form/FormDatePicker.d.ts +8 -0
  23. package/dist/src/components/form/FormDateTimePicker.d.ts +8 -0
  24. package/dist/src/components/form/FormNumberField.d.ts +9 -0
  25. package/dist/src/components/form/FormRadioGroup.d.ts +13 -0
  26. package/dist/src/components/form/FormSlider.d.ts +7 -0
  27. package/dist/src/components/form/FormSubmitButton.d.ts +4 -0
  28. package/dist/src/components/form/FormSwitch.d.ts +7 -0
  29. package/dist/src/components/form/FormTextField.d.ts +7 -0
  30. package/dist/src/components/router/RouterButton.d.ts +6 -0
  31. package/dist/src/components/router/RouterError.d.ts +7 -0
  32. package/dist/src/components/router/RouterGridActionsCellItem.d.ts +6 -0
  33. package/dist/src/components/router/RouterIconButton.d.ts +6 -0
  34. package/dist/src/components/router/RouterLink.d.ts +6 -0
  35. package/dist/src/components/router/RouterListItemButton.d.ts +6 -0
  36. package/dist/src/components/router/RouterNotFound.d.ts +1 -0
  37. package/dist/src/components/router/RouterTab.d.ts +6 -0
  38. package/dist/src/contexts/DialogsContext.d.ts +6 -0
  39. package/dist/src/contexts/FileContext.d.ts +13 -0
  40. package/dist/src/contexts/LayoutContext.d.ts +11 -0
  41. package/dist/src/hooks/DialogsHooks.d.ts +42 -0
  42. package/dist/src/hooks/FileHooks.d.ts +27 -0
  43. package/dist/src/hooks/FormHooks.d.ts +40 -0
  44. package/dist/src/hooks/PeopleSoftHooks.d.ts +23 -0
  45. package/dist/src/hooks/ThemeHook.d.ts +2 -0
  46. package/dist/src/index.d.ts +35 -0
  47. package/dist/src/models/KeycloakSettings.d.ts +8 -0
  48. package/dist/src/models/Navigation.d.ts +18 -0
  49. package/dist/src/models/NavigationParams.d.ts +6 -0
  50. package/dist/src/models/User.d.ts +8 -0
  51. package/dist/src/models/email/Email.d.ts +9 -0
  52. package/dist/src/models/email/EmailAttachment.d.ts +4 -0
  53. package/dist/src/models/file/FileActions.d.ts +4 -0
  54. package/dist/src/models/file/FileMeta.d.ts +11 -0
  55. package/dist/src/models/peoplesoft/Department.d.ts +14 -0
  56. package/dist/src/models/peoplesoft/Employee.d.ts +38 -0
  57. package/dist/src/models/peoplesoft/EmployeeCategoryGroup.d.ts +5 -0
  58. package/dist/src/models/peoplesoft/EmployeeStatus.d.ts +5 -0
  59. package/dist/src/providers/DialogsProvider.d.ts +6 -0
  60. package/dist/src/providers/LayoutProvider.d.ts +11 -0
  61. package/dist/src/routes/__root.d.ts +6 -0
  62. package/dist/src/utils/ClientUtils.d.ts +46 -0
  63. package/dist/src/utils/FormUtils.d.ts +7 -0
  64. package/dist/src/utils/i18n.d.ts +1 -0
  65. package/dist/vite.config.d.ts +2 -0
  66. package/package.json +14 -12
  67. package/dist/index.js +0 -3602
  68. package/dist/index.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,426 +1,2 @@
1
- import { TypographyProps, SxProps, Theme, BoxProps, ChipProps, ButtonProps, IconButtonProps, LinkProps, TabProps, ListItemButtonProps, CssVarsThemeOptions, TextFieldProps, SliderProps, RadioGroupProps, SwitchProps, CheckboxProps, AutocompleteProps } from '@mui/material';
2
- import * as react from 'react';
3
- import react__default, { FC, ReactNode, ComponentType } from 'react';
4
- import { DropzoneOptions } from 'react-dropzone';
5
- import * as react_jsx_runtime from 'react/jsx-runtime';
6
- import { GridValidRowModel, GridRenderCellParams, GridColumnHeaderParams, GridActionsCellItemProps } from '@mui/x-data-grid-premium';
7
- import { LinkComponent, ErrorComponentProps, LinkOptions } from '@tanstack/react-router';
8
- import { TFunction } from 'i18next';
9
- export { t } from 'i18next';
10
- export { uuidv7 } from 'uuidv7';
11
- import * as axios from 'axios';
12
- import { DateTimePickerProps, DatePickerProps } from '@mui/x-date-pickers-pro';
13
- import { NumericFormatProps, InputAttributes } from 'react-number-format/types/types';
14
- import * as _tanstack_react_form from '@tanstack/react-form';
15
- import * as _tanstack_form_core from '@tanstack/form-core';
16
- export { default as useLocalStorageState } from 'use-local-storage-state';
17
- export { useTranslation } from 'react-i18next';
18
- import * as _tanstack_react_query from '@tanstack/react-query';
19
- import { DefinedInitialDataOptions, UseMutationOptions } from '@tanstack/react-query';
20
- import { DetailedError } from 'tus-js-client';
21
-
22
- interface TypographyWithIconProps extends TypographyProps {
23
- startIcon?: React.ReactNode;
24
- endIcon?: React.ReactNode;
25
- }
26
- declare const TypographyWithIcon: React.FC<TypographyWithIconProps>;
27
-
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<BoxProps>;
36
-
37
- interface DropzoneProps extends DropzoneOptions {
38
- sx?: SxProps<Theme>;
39
- }
40
- declare const Dropzone: FC<DropzoneProps>;
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
-
86
- interface ChipInputCellProps<T extends GridValidRowModel> {
87
- params: GridRenderCellParams<T>;
88
- slotProps?: ChipProps;
89
- getLabel?: (object: T) => string | number;
90
- }
91
- declare const ChipInputCell: <T extends GridValidRowModel>({ params, slotProps, getLabel }: ChipInputCellProps<T>) => react_jsx_runtime.JSX.Element | null;
92
-
93
- declare const EditableColumnHeader: <T extends GridValidRowModel>({ colDef }: GridColumnHeaderParams<T>) => react_jsx_runtime.JSX.Element;
94
-
95
- declare const Component$5: react__default.ForwardRefExoticComponent<Omit<ButtonProps<"a">, "ref"> & react__default.RefAttributes<HTMLAnchorElement>>;
96
- declare const RouterButton: LinkComponent<typeof Component$5>;
97
-
98
- declare const Component$4: react__default.ForwardRefExoticComponent<GridActionsCellItemProps & react__default.RefAttributes<HTMLButtonElement>>;
99
- declare const RouterGridActionsCellItem: LinkComponent<typeof Component$4>;
100
-
101
- declare const Component$3: react__default.ForwardRefExoticComponent<Omit<IconButtonProps<"a">, "ref"> & react__default.RefAttributes<HTMLAnchorElement>>;
102
- declare const RouterIconButton: LinkComponent<typeof Component$3>;
103
-
104
- declare const Component$2: react__default.ForwardRefExoticComponent<Omit<LinkProps, "ref"> & react__default.RefAttributes<HTMLAnchorElement>>;
105
- declare const RouterLink: LinkComponent<typeof Component$2>;
106
-
107
- declare const Component$1: react__default.ForwardRefExoticComponent<Omit<TabProps<"a">, "ref"> & react__default.RefAttributes<HTMLAnchorElement>>;
108
- declare const RouterTab: LinkComponent<typeof Component$1>;
109
-
110
- declare const Component: react__default.ForwardRefExoticComponent<Omit<ListItemButtonProps<"a">, "ref"> & react__default.RefAttributes<HTMLAnchorElement>>;
111
- declare const RouterListItemButton: LinkComponent<typeof Component>;
112
-
113
- declare function RouterNotFound(): react_jsx_runtime.JSX.Element;
114
-
115
- interface RouterErrorProps {
116
- error: ErrorComponentProps["error"];
117
- }
118
- declare const RouterError: FC<RouterErrorProps>;
119
-
120
- interface User {
121
- employeeId: string;
122
- name: string;
123
- department: string;
124
- email?: string;
125
- company: string;
126
- category: string;
127
- }
128
-
129
- interface NavigationParams {
130
- user: User;
131
- t: TFunction<"translation", undefined>;
132
- }
133
-
134
- interface NavigationPageItem extends Pick<LinkOptions, "to" | "href" | "params" | "search"> {
135
- title: string;
136
- icon: React.ReactNode;
137
- children?: NavigationItem[];
138
- hidden?: boolean;
139
- }
140
- interface NavigationDivider {
141
- kind: "divider";
142
- hidden?: boolean;
143
- }
144
- interface NavigationHeader {
145
- kind: "header";
146
- title: string;
147
- hidden?: boolean;
148
- }
149
- type NavigationItem = NavigationPageItem | NavigationDivider | NavigationHeader;
150
- type Navigation = NavigationItem[];
151
-
152
- interface ProvidersProps {
153
- getNavigation?: (parameters: NavigationParams) => Navigation;
154
- theme?: Pick<CssVarsThemeOptions, "colorSchemes" | "components">;
155
- children: ReactNode;
156
- }
157
- declare const LayoutProvider: FC<ProvidersProps>;
158
-
159
- declare class Platform {
160
- static get isAndroid(): boolean;
161
- static get isIOS(): boolean;
162
- static get isWindows(): boolean;
163
- static get isMacOS(): boolean;
164
- private static get userAgent();
165
- }
166
- interface RootRouteHeadProps {
167
- title: string;
168
- }
169
- declare const rootRouteHead: ({ title }: RootRouteHeadProps) => () => {
170
- meta: ({
171
- charSet: string;
172
- name?: undefined;
173
- content?: undefined;
174
- title?: undefined;
175
- } | {
176
- name: string;
177
- content: string;
178
- charSet?: undefined;
179
- title?: undefined;
180
- } | {
181
- title: string;
182
- charSet?: undefined;
183
- name?: undefined;
184
- content?: undefined;
185
- })[];
186
- links: ({
187
- rel: string;
188
- sizes: string;
189
- href: string;
190
- type?: undefined;
191
- } | {
192
- rel: string;
193
- type: string;
194
- sizes: string;
195
- href: string;
196
- } | {
197
- rel: string;
198
- href: string;
199
- sizes?: undefined;
200
- type?: undefined;
201
- })[];
202
- };
203
- declare const wczApiClient: axios.AxiosInstance;
204
-
205
- type FormSubmitButtonProps = Omit<ButtonProps, "loading" | "disabled" | "onClick" | "type">;
206
-
207
- type FormOmittedProps = "name" | "value" | "onChange" | "onBlur" | "error" | "helperText" | "renderInput" | "type" | "aria-label";
208
-
209
- interface FormDateTimePickerProps extends Omit<DateTimePickerProps, FormOmittedProps> {
210
- textFieldProps?: TextFieldProps;
211
- }
212
-
213
- interface FormDatePickerProps extends Omit<DatePickerProps, FormOmittedProps> {
214
- textFieldProps?: TextFieldProps;
215
- }
216
-
217
- interface FormSliderProps extends Omit<SliderProps, FormOmittedProps> {
218
- label?: string;
219
- }
220
-
221
- interface Option {
222
- label: string;
223
- value: string | number;
224
- }
225
- interface FormRadioGroupProps extends Omit<RadioGroupProps, FormOmittedProps> {
226
- label?: string;
227
- options: Option[];
228
- }
229
-
230
- interface FormSwitchProps extends Omit<SwitchProps, FormOmittedProps> {
231
- label?: string;
232
- }
233
-
234
- interface FormCheckboxProps extends Omit<CheckboxProps, FormOmittedProps> {
235
- label?: string;
236
- }
237
-
238
- interface FormAutocompleteProps extends Omit<AutocompleteProps<any, boolean, boolean, boolean>, FormOmittedProps> {
239
- textFieldProps?: Omit<TextFieldProps, FormOmittedProps>;
240
- }
241
-
242
- interface FormNumberFieldProps extends Omit<TextFieldProps, FormOmittedProps> {
243
- defaultValue?: number | null;
244
- options?: Omit<NumericFormatProps<InputAttributes>, "customInput" | "onValueChange" | keyof InputAttributes>;
245
- }
246
-
247
- interface FormTextFieldProps extends Omit<TextFieldProps, FormOmittedProps> {
248
- type?: "color" | "email" | "password" | "search" | "tel" | "text" | "url";
249
- }
250
-
251
- 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>;
252
- declare const useFormContext: () => _tanstack_react_form.ReactFormExtendedApi<Record<string, never>, any, any, any, any, any, any, any, any, any, any, any>;
253
- 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, {
254
- readonly TextField: react.FC<FormTextFieldProps>;
255
- readonly NumberField: react.FC<FormNumberFieldProps>;
256
- readonly Autocomplete: react.FC<FormAutocompleteProps>;
257
- readonly Checkbox: react.FC<FormCheckboxProps>;
258
- readonly Switch: react.FC<FormSwitchProps>;
259
- readonly RadioGroup: react.FC<FormRadioGroupProps>;
260
- readonly Slider: react.FC<FormSliderProps>;
261
- readonly DatePicker: react.FC<FormDatePickerProps>;
262
- readonly DateTimePicker: react.FC<FormDateTimePickerProps>;
263
- }, {
264
- readonly SubmitButton: react.FC<FormSubmitButtonProps>;
265
- }>;
266
- 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, {
267
- readonly TextField: react.FC<FormTextFieldProps>;
268
- readonly NumberField: react.FC<FormNumberFieldProps>;
269
- readonly Autocomplete: react.FC<FormAutocompleteProps>;
270
- readonly Checkbox: react.FC<FormCheckboxProps>;
271
- readonly Switch: react.FC<FormSwitchProps>;
272
- readonly RadioGroup: react.FC<FormRadioGroupProps>;
273
- readonly Slider: react.FC<FormSliderProps>;
274
- readonly DatePicker: react.FC<FormDatePickerProps>;
275
- readonly DateTimePicker: react.FC<FormDateTimePickerProps>;
276
- }, {
277
- readonly SubmitButton: react.FC<FormSubmitButtonProps>;
278
- }, TRenderProps>) => (props: react.PropsWithChildren<NoInfer<[unknown] extends [TRenderProps] ? any : TRenderProps> & {
279
- 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, {
280
- readonly TextField: react.FC<FormTextFieldProps>;
281
- readonly NumberField: react.FC<FormNumberFieldProps>;
282
- readonly Autocomplete: react.FC<FormAutocompleteProps>;
283
- readonly Checkbox: react.FC<FormCheckboxProps>;
284
- readonly Switch: react.FC<FormSwitchProps>;
285
- readonly RadioGroup: react.FC<FormRadioGroupProps>;
286
- readonly Slider: react.FC<FormSliderProps>;
287
- readonly DatePicker: react.FC<FormDatePickerProps>;
288
- readonly DateTimePicker: react.FC<FormDateTimePickerProps>;
289
- }, {
290
- readonly SubmitButton: react.FC<FormSubmitButtonProps>;
291
- }>;
292
- }>) => react.JSX.Element;
293
-
294
- interface OpenDialogOptions<R> {
295
- onClose?: (result: R) => Promise<void>;
296
- }
297
- interface AlertOptions {
298
- title?: ReactNode;
299
- }
300
- interface ConfirmOptions {
301
- title?: ReactNode;
302
- cancelText?: ReactNode;
303
- }
304
- interface DialogProps<P = undefined, R = void> {
305
- payload: P;
306
- open: boolean;
307
- onClose: (result: R) => Promise<void>;
308
- }
309
- type OpenAlertDialog = (message: ReactNode, options?: AlertOptions) => Promise<void>;
310
- type OpenConfirmDialog = (message: ReactNode, options?: ConfirmOptions) => Promise<boolean>;
311
- type DialogComponent<P, R> = React.ComponentType<DialogProps<P, R>>;
312
- 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>;
315
- }
316
- type CloseDialog = <R>(dialog: Promise<R>, result: R) => Promise<R>;
317
- interface DialogHook {
318
- alert: OpenAlertDialog;
319
- confirm: OpenConfirmDialog;
320
- open: OpenDialog;
321
- close: CloseDialog;
322
- }
323
- declare function useDialogs(): DialogHook;
324
-
325
- type OptionalId = string | undefined | null;
326
- type BaseFileMetaArrayQueryOptions = Omit<DefinedInitialDataOptions<FileMeta[]>, "queryKey" | "queryFn" | "staleTime" | "gcTime" | "refetchOnWindowFocus" | "initialData">;
327
- type BaseBlobQueryOptions = Omit<DefinedInitialDataOptions<Blob, Error, string>, "queryKey" | "queryFn" | "select" | "staleTime" | "gcTime" | "refetchOnWindowFocus" | "initialData">;
328
- type BaseFileMetaMutationOptions = Omit<UseMutationOptions<FileMeta, Error, FileMeta>, "mutationFn" | "onSettled">;
329
- type BaseBlobMutationOptions = Omit<UseMutationOptions<Blob, Error, FileMeta>, "mutationFn" | "onSuccess">;
330
- type BaseStringMutationOptions = Omit<UseMutationOptions<string, Error, string>, "mutationFn" | "onSettled">;
331
- declare const useGetFileMetas: (subId: OptionalId, options?: BaseFileMetaArrayQueryOptions) => _tanstack_react_query.UseQueryResult<FileMeta[], Error>;
332
- declare const useGetFileThumbnail: (meta: FileMeta | undefined | null, options?: BaseBlobQueryOptions) => _tanstack_react_query.UseQueryResult<string, Error>;
333
- declare const useGetFile: (meta: FileMeta | undefined | null, options?: BaseBlobQueryOptions) => _tanstack_react_query.UseQueryResult<string, Error>;
334
- declare const useDownloadFile: (options?: BaseBlobMutationOptions) => _tanstack_react_query.UseMutationResult<Blob, Error, FileMeta, unknown>;
335
- declare const useOpenFile: (options?: BaseBlobMutationOptions) => _tanstack_react_query.UseMutationResult<Blob, Error, FileMeta, unknown>;
336
- declare const useUpdateFileMeta: (options?: BaseFileMetaMutationOptions) => _tanstack_react_query.UseMutationResult<FileMeta, Error, FileMeta, unknown>;
337
- declare const useDeleteFile: (options?: BaseFileMetaMutationOptions) => _tanstack_react_query.UseMutationResult<FileMeta, Error, FileMeta, unknown>;
338
- declare const useDeleteFiles: (options?: BaseStringMutationOptions) => _tanstack_react_query.UseMutationResult<string, Error, string, unknown>;
339
- interface UseUploadFileProps {
340
- subId: OptionalId;
341
- onSuccess?: (meta: Pick<FileMeta, "id" | "appName" | "subId" | "fileName">) => void;
342
- onError?: (error: Error | DetailedError) => void;
343
- }
344
- declare const useUploadFile: ({ subId, onSuccess, onError }: UseUploadFileProps) => {
345
- mutate: (file: File) => Promise<void>;
346
- progress: number;
347
- };
348
-
349
- interface EmailAttachment {
350
- appName: string;
351
- subId: string;
352
- }
353
-
354
- interface Email {
355
- subject: string;
356
- body: string;
357
- to: string[];
358
- bcc?: string[];
359
- cc?: string[];
360
- attachments?: EmailAttachment[];
361
- }
362
-
363
- declare enum EmployeeCategoryGroup {
364
- IDL = "IDL",
365
- FD = "FD",
366
- FI = "FI"
367
- }
368
-
369
- declare enum EmployeeStatus {
370
- Active = "Active",
371
- Terminated = "Terminated",
372
- LeaveOfAbsence = "Leave of Absence"
373
- }
374
-
375
- interface Employee {
376
- badgeId: string;
377
- category: string;
378
- categoryGroup: EmployeeCategoryGroup;
379
- companyCode: string;
380
- contactPhone: string;
381
- departmentId: string;
382
- departmentDescription: string;
383
- emailString: string;
384
- employeeId: string;
385
- extensionNumber: string;
386
- firstName: string;
387
- gender: string;
388
- hiredDate: Date;
389
- lastName: string;
390
- managerId: string;
391
- middleName: string;
392
- name: string;
393
- nameTitleCase: string;
394
- nfcSn: string;
395
- plantId: string;
396
- position: string;
397
- previousEmployeeIds: string | null;
398
- reHiredDate: Date | null;
399
- recordNumber: number;
400
- status: EmployeeStatus;
401
- supervisorId: string;
402
- terminationDate: Date | null;
403
- terminationFutureDate: Date | null;
404
- type: string;
405
- upperDepartmentId: string;
406
- jobCode: string;
407
- jobDescription: string;
408
- terminationReason: string | null;
409
- supervisorRecordNumber: number;
410
- }
411
-
412
- interface Department {
413
- departmentId: string;
414
- description: string;
415
- managerId: string;
416
- managerRecordNumber: string;
417
- treeLevel: number;
418
- upperDepartmentId: string;
419
- companyCode: string;
420
- location: string;
421
- salLocation: string;
422
- plantId: string;
423
- manager: Employee;
424
- }
425
-
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 };
1
+ export * from './src/index'
2
+ export {}
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ export declare const AppTitle: FC;
3
+ export declare const useAppTitle: () => string | undefined;
@@ -0,0 +1,10 @@
1
+ import { CssVarsThemeOptions } from '@mui/material/styles';
2
+ import { FC, ReactNode } from 'react';
3
+ import { Navigation } from '../../models/Navigation';
4
+ interface LayoutProps {
5
+ navigation: Navigation | undefined;
6
+ theme?: Pick<CssVarsThemeOptions, "colorSchemes" | "components">;
7
+ children: ReactNode;
8
+ }
9
+ export declare const Layout: FC<LayoutProps>;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ import { TypographyProps } from '@mui/material';
2
+ interface MarkdownProps extends TypographyProps {
3
+ readonly fullWidth?: boolean;
4
+ }
5
+ export declare function Markdown(props: MarkdownProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ import { FC, ReactNode } from 'react';
3
+ interface PageHeaderProps {
4
+ title: string;
5
+ action?: ReactNode;
6
+ sx?: SxProps<Theme>;
7
+ }
8
+ export declare const PageHeader: FC<PageHeaderProps>;
9
+ export {};
@@ -0,0 +1,3 @@
1
+ import { BoxProps } from '@mui/material';
2
+ import { FC } from 'react';
3
+ export declare const TableContainer: FC<BoxProps>;
@@ -0,0 +1,2 @@
1
+ import { FC } from 'react';
2
+ export declare const ToolbarAccount: FC;
@@ -0,0 +1,7 @@
1
+ import { TypographyProps } from '@mui/material';
2
+ interface TypographyWithIconProps extends TypographyProps {
3
+ startIcon?: React.ReactNode;
4
+ endIcon?: React.ReactNode;
5
+ }
6
+ export declare const TypographyWithIcon: React.FC<TypographyWithIconProps>;
7
+ export {};
@@ -0,0 +1,21 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { Navigation, NavigationDivider, NavigationHeader, NavigationItem, NavigationPageItem } from '../../../models/Navigation';
3
+ export declare const isPageItem: (item: NavigationItem) => item is NavigationPageItem;
4
+ export declare const isDivider: (item: NavigationItem) => item is NavigationDivider;
5
+ export declare const isHeader: (item: NavigationItem) => item is NavigationHeader;
6
+ interface NavigationListProps {
7
+ subNavigation: Navigation;
8
+ depth?: number;
9
+ collapsed?: boolean;
10
+ isPopover?: boolean;
11
+ isSidebarFullyExpanded?: boolean;
12
+ isSidebarFullyCollapsed?: boolean;
13
+ expandedWidth: number | string;
14
+ renderItem?: (item: NavigationPageItem, context: {
15
+ collapsed: boolean;
16
+ }) => ReactNode;
17
+ activePath?: string | null;
18
+ onNavigate: (item: NavigationPageItem) => void;
19
+ }
20
+ export declare const NavigationList: FC<NavigationListProps>;
21
+ export {};
@@ -0,0 +1,15 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { NavigationItem, NavigationPageItem } from '../../../models/Navigation';
3
+ interface NavigationListItemProps {
4
+ item: NavigationPageItem;
5
+ isOpen?: boolean;
6
+ selected?: boolean;
7
+ disabled?: boolean;
8
+ collapsed?: boolean;
9
+ isSidebarFullyExpanded?: boolean;
10
+ isSidebarFullyCollapsed?: boolean;
11
+ onClick?: (item: NavigationPageItem) => void;
12
+ renderNested?: (sub: NavigationItem[]) => ReactNode;
13
+ }
14
+ export declare const NavigationListItem: FC<NavigationListItemProps>;
15
+ export {};
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+ import { Navigation } from '../../../models/Navigation';
3
+ export declare const MINI_WIDTH = 84;
4
+ export declare const EXPANDED_WIDTH = 320;
5
+ export declare const TOOLBAR_HEIGHT = 65;
6
+ interface NavigationRailProps {
7
+ navigation: Navigation;
8
+ expanded: boolean;
9
+ setExpanded: (open: boolean) => void;
10
+ }
11
+ export declare const NavigationRail: FC<NavigationRailProps>;
12
+ export {};
@@ -0,0 +1,9 @@
1
+ import { ChipProps } from '@mui/material';
2
+ import { GridRenderCellParams, GridValidRowModel } from '@mui/x-data-grid-premium';
3
+ interface ChipInputCellProps<T extends GridValidRowModel> {
4
+ params: GridRenderCellParams<T>;
5
+ slotProps?: ChipProps;
6
+ getLabel?: (object: T) => string | number;
7
+ }
8
+ export declare const ChipInputCell: <T extends GridValidRowModel>({ params, slotProps, getLabel }: ChipInputCellProps<T>) => import("react/jsx-runtime").JSX.Element | null;
9
+ export {};
@@ -0,0 +1,2 @@
1
+ import { GridColumnHeaderParams, GridValidRowModel } from '@mui/x-data-grid-premium';
2
+ export declare const EditableColumnHeader: <T extends GridValidRowModel>({ colDef }: GridColumnHeaderParams<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ import { FC } from 'react';
3
+ import { DropzoneOptions } from 'react-dropzone';
4
+ interface DropzoneProps extends DropzoneOptions {
5
+ sx?: SxProps<Theme>;
6
+ }
7
+ export declare const Dropzone: FC<DropzoneProps>;
8
+ export {};
@@ -0,0 +1,21 @@
1
+ import { ComponentType, FC, ReactNode } from 'react';
2
+ import { FileMeta } from '../../models/file/FileMeta';
3
+ import { FileActions } from '../../models/file/FileActions';
4
+ import { FileViewerGridProps } from './fileViewer/FileViewerGrid';
5
+ import { FileViewerListProps } from './fileViewer/FileViewerList';
6
+ interface FileViewerComponent {
7
+ Grid: ComponentType<FileViewerGridProps>;
8
+ List: ComponentType<FileViewerListProps>;
9
+ }
10
+ interface FileViewerProps {
11
+ /** Insert your record ID (can be multiple splitted by comma) */
12
+ subId: string | undefined | null;
13
+ onDelete?: (params: {
14
+ remainingFileMetas: FileMeta[];
15
+ deletedFileMeta: FileMeta;
16
+ }) => void;
17
+ actions?: FileActions;
18
+ children: (component: FileViewerComponent) => ReactNode;
19
+ }
20
+ export declare const FileViewer: FC<FileViewerProps>;
21
+ export {};
@@ -0,0 +1,17 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ import { default as React } from 'react';
3
+ import { FileMeta } from '../../../models/file/FileMeta';
4
+ type FileViewerGridItemBar = "hidden" | "always" | "onMouseEnter";
5
+ export interface FileViewerGridProps {
6
+ size?: number;
7
+ itemBar?: FileViewerGridItemBar;
8
+ sx?: SxProps<Theme>;
9
+ }
10
+ export declare const FileViewerGrid: React.FC<FileViewerGridProps>;
11
+ interface GridFileViewerItemProps {
12
+ meta: FileMeta;
13
+ size?: number;
14
+ itemBar?: FileViewerGridItemBar;
15
+ }
16
+ export declare const GridFileViewerItem: React.FC<GridFileViewerItemProps>;
17
+ export {};
@@ -0,0 +1,12 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ import { FC } from 'react';
3
+ import { FileMeta } from '../../../models/file/FileMeta';
4
+ export interface FileViewerListProps {
5
+ sx?: SxProps<Theme>;
6
+ }
7
+ export declare const FileViewerList: FC<FileViewerListProps>;
8
+ interface ListFileViewerItemProps {
9
+ meta: FileMeta;
10
+ }
11
+ export declare const ListFileViewerItem: React.FC<ListFileViewerItemProps>;
12
+ export {};
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface ImageViewerProps {
3
+ metaId: string;
4
+ }
5
+ export declare const ImageViewer: React.FC<ImageViewerProps>;
6
+ export {};
@@ -0,0 +1,15 @@
1
+ import { FC } from 'react';
2
+ import { FileMeta } from '../../../../models/file/FileMeta';
3
+ interface ActionsMenuProps {
4
+ meta: FileMeta;
5
+ menu: {
6
+ mouseX: number;
7
+ mouseY: number;
8
+ } | null;
9
+ setMenu: (menu: {
10
+ mouseX: number;
11
+ mouseY: number;
12
+ } | null) => void;
13
+ }
14
+ export declare const ActionsMenu: FC<ActionsMenuProps>;
15
+ export {};
@@ -0,0 +1,7 @@
1
+ import { AutocompleteProps, TextFieldProps } from '@mui/material';
2
+ import { FC } from 'react';
3
+ import { FormOmittedProps } from '../../utils/FormUtils';
4
+ export interface FormAutocompleteProps extends Omit<AutocompleteProps<any, boolean, boolean, boolean>, FormOmittedProps> {
5
+ textFieldProps?: Omit<TextFieldProps, FormOmittedProps>;
6
+ }
7
+ export declare const FormAutocomplete: FC<FormAutocompleteProps>;
@@ -0,0 +1,7 @@
1
+ import { CheckboxProps } from '@mui/material';
2
+ import { FC } from 'react';
3
+ import { FormOmittedProps } from '../../utils/FormUtils';
4
+ export interface FormCheckboxProps extends Omit<CheckboxProps, FormOmittedProps> {
5
+ label?: string;
6
+ }
7
+ export declare const FormCheckbox: FC<FormCheckboxProps>;