wcz-test 2.13.0 → 3.0.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 +26 -29
- package/dist/index.js +300 -233
- package/dist/index.js.map +1 -1
- package/package.json +8 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { TypographyProps, ContainerProps, ChipProps, ButtonProps, IconButtonProps, LinkProps, TabProps, CssVarsThemeOptions, TextFieldProps, SliderProps, RadioGroupProps, SwitchProps, CheckboxProps, AutocompleteProps } from '@mui/material';
|
|
1
|
+
import { TypographyProps, ContainerProps, SxProps, Theme, ChipProps, ButtonProps, IconButtonProps, LinkProps, TabProps, CssVarsThemeOptions, TextFieldProps, SliderProps, RadioGroupProps, SwitchProps, CheckboxProps, AutocompleteProps } from '@mui/material';
|
|
2
2
|
export { PageHeader } from '@toolpad/core/PageContainer';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import react__default, { FC } from 'react';
|
|
5
|
+
import { DropzoneOptions } from 'react-dropzone';
|
|
5
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
7
|
import { GridValidRowModel, GridRenderCellParams, GridColumnHeaderParams, GridActionsCellItemProps } from '@mui/x-data-grid-premium';
|
|
7
8
|
import { LinkComponent, ErrorComponentProps } from '@tanstack/react-router';
|
|
8
9
|
import { Navigation } from '@toolpad/core/AppProvider';
|
|
9
10
|
export { Navigation } from '@toolpad/core/AppProvider';
|
|
11
|
+
import { DashboardLayoutProps } from '@toolpad/core/DashboardLayout';
|
|
10
12
|
import { TFunction } from 'i18next';
|
|
13
|
+
export { t } from 'i18next';
|
|
11
14
|
export { uuidv7 } from 'uuidv7';
|
|
12
15
|
import * as axios from 'axios';
|
|
13
16
|
import { DateTimePickerProps, DatePickerProps } from '@mui/x-date-pickers-pro';
|
|
@@ -30,6 +33,11 @@ declare const TypographyWithIcon: React.FC<TypographyWithIconProps>;
|
|
|
30
33
|
|
|
31
34
|
declare const PageContainer: FC<ContainerProps>;
|
|
32
35
|
|
|
36
|
+
interface DropzoneProps extends DropzoneOptions {
|
|
37
|
+
sx?: SxProps<Theme>;
|
|
38
|
+
}
|
|
39
|
+
declare const Dropzone: FC<DropzoneProps>;
|
|
40
|
+
|
|
33
41
|
interface ChipInputCellProps<T extends GridValidRowModel> {
|
|
34
42
|
params: GridRenderCellParams<T>;
|
|
35
43
|
slotProps?: ChipProps;
|
|
@@ -75,25 +83,23 @@ interface NavigationParams {
|
|
|
75
83
|
t: TFunction<"translation", undefined>;
|
|
76
84
|
}
|
|
77
85
|
|
|
78
|
-
interface ProvidersProps {
|
|
86
|
+
interface ProvidersProps extends Pick<DashboardLayoutProps, "children" | "defaultSidebarCollapsed" | "disableCollapsibleSidebar" | "sidebarExpandedWidth"> {
|
|
79
87
|
getNavigation?: (parameters: NavigationParams) => Navigation;
|
|
80
88
|
theme?: Pick<CssVarsThemeOptions, "colorSchemes" | "components">;
|
|
81
|
-
children: React.ReactNode;
|
|
82
89
|
}
|
|
83
90
|
declare const LayoutProvider: FC<ProvidersProps>;
|
|
84
91
|
|
|
85
92
|
declare class Platform {
|
|
86
|
-
static
|
|
87
|
-
static
|
|
88
|
-
static
|
|
89
|
-
static
|
|
93
|
+
static get isAndroid(): boolean;
|
|
94
|
+
static get isIOS(): boolean;
|
|
95
|
+
static get isWindows(): boolean;
|
|
96
|
+
static get isMacOS(): boolean;
|
|
97
|
+
private static get userAgent();
|
|
90
98
|
}
|
|
91
|
-
declare const getContrastTextColor: (color: string) => "black" | "white";
|
|
92
99
|
interface RootRouteHeadProps {
|
|
93
100
|
title: string;
|
|
94
|
-
themeColor: string;
|
|
95
101
|
}
|
|
96
|
-
declare const rootRouteHead: ({ title
|
|
102
|
+
declare const rootRouteHead: ({ title }: RootRouteHeadProps) => () => {
|
|
97
103
|
meta: ({
|
|
98
104
|
charSet: string;
|
|
99
105
|
name?: undefined;
|
|
@@ -115,34 +121,19 @@ declare const rootRouteHead: ({ title, themeColor }: RootRouteHeadProps) => () =
|
|
|
115
121
|
sizes: string;
|
|
116
122
|
href: string;
|
|
117
123
|
type?: undefined;
|
|
118
|
-
name?: undefined;
|
|
119
|
-
theme_color?: undefined;
|
|
120
124
|
} | {
|
|
121
125
|
rel: string;
|
|
122
126
|
type: string;
|
|
123
127
|
sizes: string;
|
|
124
128
|
href: string;
|
|
125
|
-
name?: undefined;
|
|
126
|
-
theme_color?: undefined;
|
|
127
|
-
} | {
|
|
128
|
-
rel: string;
|
|
129
|
-
href: string;
|
|
130
|
-
name: string;
|
|
131
|
-
theme_color: string;
|
|
132
|
-
sizes?: undefined;
|
|
133
|
-
type?: undefined;
|
|
134
129
|
} | {
|
|
135
130
|
rel: string;
|
|
136
131
|
href: string;
|
|
137
132
|
sizes?: undefined;
|
|
138
133
|
type?: undefined;
|
|
139
|
-
name?: undefined;
|
|
140
|
-
theme_color?: undefined;
|
|
141
134
|
})[];
|
|
142
135
|
};
|
|
143
136
|
declare const wczApiClient: axios.AxiosInstance;
|
|
144
|
-
declare const WISTRON_PRIMARY_COLOR = "#00506E";
|
|
145
|
-
declare const WISTRON_SECONDARY_COLOR = "#64DC00";
|
|
146
137
|
|
|
147
138
|
type FormOmittedProps = "name" | "value" | "onChange" | "onBlur" | "error" | "helperText" | "renderInput" | "type" | "aria-label";
|
|
148
139
|
|
|
@@ -208,7 +199,7 @@ declare const useLayoutForm: <TFormData, TOnMount extends _tanstack_form_core.Fo
|
|
|
208
199
|
}>>;
|
|
209
200
|
AppForm: react.ComponentType<react.PropsWithChildren>;
|
|
210
201
|
};
|
|
211
|
-
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
|
|
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, {
|
|
212
203
|
readonly TextField: react.FC<FormTextFieldProps>;
|
|
213
204
|
readonly NumberField: react.FC<FormNumberFieldProps>;
|
|
214
205
|
readonly Autocomplete: react.FC<FormAutocompleteProps>;
|
|
@@ -261,12 +252,18 @@ declare const useDeleteFile: (options?: Omit<UseMutationOptions<FileMeta, Error,
|
|
|
261
252
|
declare const useDeleteFiles: (options?: Omit<UseMutationOptions<string, Error, string>, "mutationFn" | "onSettled">) => _tanstack_react_query.UseMutationResult<string, Error, string, unknown>;
|
|
262
253
|
interface UseUploadFileProps {
|
|
263
254
|
subId: string | undefined | null;
|
|
264
|
-
onSuccess?: (
|
|
255
|
+
onSuccess?: (meta: Pick<FileMeta, "id" | "appName" | "subId" | "fileName">) => void;
|
|
265
256
|
onError?: (error: Error | DetailedError) => void;
|
|
266
257
|
}
|
|
267
258
|
declare const useUploadFile: ({ subId, onSuccess, onError }: UseUploadFileProps) => {
|
|
268
259
|
mutate: (file: File) => Promise<void>;
|
|
269
|
-
|
|
260
|
+
progress: number;
|
|
261
|
+
};
|
|
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;
|
|
270
267
|
};
|
|
271
268
|
|
|
272
269
|
interface EmailAttachment {
|
|
@@ -342,4 +339,4 @@ interface PeoplesoftDepartment {
|
|
|
342
339
|
manager: PeoplesoftEmployee;
|
|
343
340
|
}
|
|
344
341
|
|
|
345
|
-
export { ChipInputCell, 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,
|
|
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 };
|