react-toolkits 2.19.2 → 2.21.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/CHANGELOG.md +12 -0
- package/lib/index.d.ts +342 -60
- package/lib/index.js +1349 -2
- package/locale/hooks.js +1349 -1
- package/locale/index.js +1349 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# react-toolkits
|
|
2
2
|
|
|
3
|
+
## 2.21.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 01b6652: 重构InfiniteList和QueryList组件,采用dataAdapter模式优化数据源处理逻辑,提升代码可读性和一致性。同时更新相关页面以使用新的dataAdapter配置。
|
|
8
|
+
|
|
9
|
+
## 2.20.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 1acfc29: 更新pnpm依赖,添加@tanstack/react-query和@tanstack/react-query-devtools,移除swr。修改InfiniteList和QueryList组件以支持新的请求配置,优化数据源处理逻辑,确保组件在数据加载时的表现更佳。同时,重构相关hooks和状态管理,提升代码可读性和一致性。
|
|
14
|
+
|
|
3
15
|
## 2.19.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/lib/index.d.ts
CHANGED
|
@@ -6,11 +6,10 @@ import { AnyObject } from 'antd/es/_util/type';
|
|
|
6
6
|
import * as zustand from 'zustand';
|
|
7
7
|
import { ParagraphProps } from 'antd/es/typography/Paragraph';
|
|
8
8
|
import { TableProps } from 'antd/es/table';
|
|
9
|
-
import * as swr from 'swr';
|
|
10
|
-
import { MutatorCallback, MutatorOptions, Arguments, SWRResponse } from 'swr';
|
|
11
9
|
import { ItemType, SubMenuType, MenuItemGroupType, MenuItemType } from 'antd/es/menu/interface';
|
|
12
10
|
import { Merge } from 'ts-essentials';
|
|
13
11
|
import { Options } from 'ky';
|
|
12
|
+
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
14
13
|
import { StateStorage } from 'zustand/middleware';
|
|
15
14
|
|
|
16
15
|
interface UseDrawerOperation {
|
|
@@ -118,58 +117,100 @@ interface HighlightProps extends PropsWithChildren {
|
|
|
118
117
|
}
|
|
119
118
|
declare const Highlight: (props: HighlightProps) => react_jsx_runtime.JSX.Element;
|
|
120
119
|
|
|
121
|
-
interface
|
|
122
|
-
|
|
120
|
+
interface InfiniteListPayload<Values = any> {
|
|
121
|
+
page?: number;
|
|
122
|
+
formValue?: Values;
|
|
123
|
+
}
|
|
124
|
+
interface InfiniteListRequestConfig<Values = any> {
|
|
125
|
+
url: string;
|
|
126
|
+
method?: 'GET' | 'POST';
|
|
127
|
+
body?: FormData | Record<string | number, any> | ((payload: InfiniteListPayload<Values>, pageParam: any) => FormData | Record<string | number, any>);
|
|
128
|
+
params?: Record<string | number, any> | ((payload: InfiniteListPayload<Values>, pageParam: any) => Record<string | number, any>);
|
|
129
|
+
headers?: Record<string, string> | ((form: FormInstance<Values>) => Record<string, string>);
|
|
130
|
+
cacheTime?: number;
|
|
131
|
+
staleTime?: number;
|
|
132
|
+
}
|
|
133
|
+
declare enum InfiniteListAction {
|
|
134
|
+
Confirm = 0,
|
|
135
|
+
Reset = 1,
|
|
136
|
+
LoadMore = 2,
|
|
137
|
+
Init = 3
|
|
123
138
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
139
|
+
interface InfiniteListDataAdapter<Item = any, Values = any, Data = any> {
|
|
140
|
+
items?: (data: Data[] | undefined, form: FormInstance<Values>) => Item[] | undefined;
|
|
141
|
+
hasMore?: (lastPage: Data | undefined, allPages: Data[]) => boolean;
|
|
142
|
+
nextPageParam?: (lastPage: Data | undefined, allPages: Data[], pageParam: any) => any;
|
|
127
143
|
}
|
|
128
144
|
interface InfiniteListRef<Item = any, Values = any, Data = any> {
|
|
129
145
|
data: Data[] | undefined;
|
|
130
146
|
dataSource: Item[] | undefined;
|
|
131
147
|
form: FormInstance<Values>;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
148
|
+
refetch: () => void;
|
|
149
|
+
fetchNextPage: () => void;
|
|
150
|
+
hasNextPage: boolean;
|
|
151
|
+
isFetchingNextPage: boolean;
|
|
135
152
|
}
|
|
136
153
|
interface InfiniteListProps<Item, Values, Data> extends Pick<TableProps<Item>, 'columns' | 'rowKey' | 'tableLayout' | 'expandable' | 'rowSelection' | 'bordered'>, Pick<FilterFormWrapperProps, 'buttonsAlign' | 'showReset'> {
|
|
137
|
-
|
|
138
|
-
getRowKey?: (response: Data | undefined, pageIndex: number) => any;
|
|
139
|
-
getDataSource: (data: Data[] | undefined) => Item[];
|
|
140
|
-
form?: FormInstance<Values>;
|
|
154
|
+
identifier: string;
|
|
141
155
|
code?: string;
|
|
142
|
-
|
|
156
|
+
form?: FormInstance<Values>;
|
|
157
|
+
refreshInterval?: number;
|
|
158
|
+
request: InfiniteListRequestConfig<Values>;
|
|
159
|
+
tableExtra?: ReactNode | ((form: FormInstance<Values>, data?: Data[]) => ReactNode);
|
|
143
160
|
renderForm?: (form: FormInstance<Values>) => ReactElement;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
161
|
+
afterSuccess?: (action: InfiniteListAction, form: FormInstance<Values>, data?: Data[]) => void;
|
|
162
|
+
afterError?: (error: Error, action: InfiniteListAction, form: FormInstance<Values>) => void;
|
|
163
|
+
dataAdapter?: InfiniteListDataAdapter<Item, Values, Data>;
|
|
164
|
+
initialPageParam?: any;
|
|
147
165
|
footer?: (data: Data[] | undefined) => ReactNode;
|
|
148
166
|
}
|
|
149
167
|
declare const InfiniteList: <Item extends AnyObject = AnyObject, Values extends object | undefined = undefined, Data = any>(props: InfiniteListProps<Item, Values, Data> & {
|
|
150
168
|
ref?: Ref<InfiniteListRef<Item, Data>>;
|
|
151
169
|
}) => ReactElement;
|
|
152
170
|
|
|
153
|
-
type
|
|
154
|
-
type
|
|
155
|
-
interface
|
|
156
|
-
id:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
type InfiniteQueryRefetchFunction = () => void | Promise<unknown>;
|
|
172
|
+
type InfiniteQueryFetchNextPageFunction = () => void | Promise<unknown>;
|
|
173
|
+
interface InfiniteListInstance {
|
|
174
|
+
id: string;
|
|
175
|
+
url: string;
|
|
176
|
+
queryKey: readonly unknown[];
|
|
177
|
+
payload: InfiniteListPayload;
|
|
178
|
+
refetch: InfiniteQueryRefetchFunction;
|
|
179
|
+
fetchNextPage: InfiniteQueryFetchNextPageFunction;
|
|
180
|
+
}
|
|
181
|
+
interface InfiniteListState {
|
|
182
|
+
instances: Map<string, InfiniteListInstance>;
|
|
183
|
+
registerInstance(id: string, url: string, queryKey: readonly unknown[], refetch: InfiniteQueryRefetchFunction, fetchNextPage: InfiniteQueryFetchNextPageFunction): void;
|
|
184
|
+
unregisterInstance(id: string): void;
|
|
185
|
+
updatePayload(id: string, payload: InfiniteListPayload): void;
|
|
186
|
+
getPayload(id: string): InfiniteListPayload;
|
|
187
|
+
refetch(id: string, payload?: InfiniteListPayload): Promise<void>;
|
|
188
|
+
fetchNextPage(id: string): Promise<void>;
|
|
189
|
+
getInstance(id: string): InfiniteListInstance | undefined;
|
|
190
|
+
getAllInstances(): InfiniteListInstance[];
|
|
191
|
+
}
|
|
192
|
+
declare const useInfiniteListStore: zustand.UseBoundStore<Omit<Omit<zustand.StoreApi<InfiniteListState>, "setState"> & {
|
|
193
|
+
setState(partial: InfiniteListState | Partial<InfiniteListState> | ((state: InfiniteListState) => InfiniteListState | Partial<InfiniteListState>), replace?: false | undefined, action?: (string | {
|
|
194
|
+
[x: string]: unknown;
|
|
195
|
+
[x: number]: unknown;
|
|
196
|
+
[x: symbol]: unknown;
|
|
197
|
+
type: string;
|
|
198
|
+
}) | undefined): void;
|
|
199
|
+
setState(state: InfiniteListState | ((state: InfiniteListState) => InfiniteListState), replace: true, action?: (string | {
|
|
200
|
+
[x: string]: unknown;
|
|
201
|
+
[x: number]: unknown;
|
|
202
|
+
[x: symbol]: unknown;
|
|
203
|
+
type: string;
|
|
204
|
+
}) | undefined): void;
|
|
205
|
+
}, "subscribe"> & {
|
|
206
|
+
subscribe: {
|
|
207
|
+
(listener: (selectedState: InfiniteListState, previousSelectedState: InfiniteListState) => void): () => void;
|
|
208
|
+
<U>(selector: (state: InfiniteListState) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
209
|
+
equalityFn?: ((a: U, b: U) => boolean) | undefined;
|
|
210
|
+
fireImmediately?: boolean;
|
|
211
|
+
} | undefined): () => void;
|
|
212
|
+
};
|
|
213
|
+
}>;
|
|
173
214
|
|
|
174
215
|
type MenuItemType2 = Merge<MenuItemType, {
|
|
175
216
|
route?: string;
|
|
@@ -189,6 +230,24 @@ interface NavMenuProps {
|
|
|
189
230
|
}
|
|
190
231
|
declare const NavMenu: react.NamedExoticComponent<NavMenuProps>;
|
|
191
232
|
|
|
233
|
+
type Area = 'all' | 'cn' | 'global';
|
|
234
|
+
type ScreenOrientation = 0 | 1;
|
|
235
|
+
interface Game {
|
|
236
|
+
id: number;
|
|
237
|
+
game_id: string | number;
|
|
238
|
+
game_group: string;
|
|
239
|
+
name: string;
|
|
240
|
+
screen_type: ScreenOrientation;
|
|
241
|
+
area: Area;
|
|
242
|
+
icon: string;
|
|
243
|
+
auth: string;
|
|
244
|
+
ctime: string;
|
|
245
|
+
mtime: string;
|
|
246
|
+
is_delete: 0 | 1;
|
|
247
|
+
is_new_game: 0 | 1;
|
|
248
|
+
server_type: string;
|
|
249
|
+
}
|
|
250
|
+
|
|
192
251
|
interface GameSelectProps {
|
|
193
252
|
filter?: (game: Game) => boolean;
|
|
194
253
|
options?: (data?: Game[]) => SelectProps['options'];
|
|
@@ -272,6 +331,15 @@ interface QueryListPayload<Values = any> {
|
|
|
272
331
|
size?: number;
|
|
273
332
|
formValue?: Values;
|
|
274
333
|
}
|
|
334
|
+
interface QueryListRequestConfig<Values = any> {
|
|
335
|
+
url: string;
|
|
336
|
+
method?: 'GET' | 'POST';
|
|
337
|
+
body?: FormData | Record<string | number, any> | ((payload: QueryListPayload<Values>) => FormData | Record<string | number, any>);
|
|
338
|
+
params?: Record<string | number, any> | ((payload: QueryListPayload<Values>) => Record<string | number, any>);
|
|
339
|
+
headers?: Record<string, string> | ((form: FormInstance<Values>) => Record<string, string>);
|
|
340
|
+
cacheTime?: number;
|
|
341
|
+
staleTime?: number;
|
|
342
|
+
}
|
|
275
343
|
declare enum QueryListAction {
|
|
276
344
|
Confirm = 0,
|
|
277
345
|
Reset = 1,
|
|
@@ -283,42 +351,70 @@ interface QueryListRef<Item extends AnyObject = AnyObject, Values = AnyObject, D
|
|
|
283
351
|
dataSource: Item[] | undefined;
|
|
284
352
|
form: FormInstance<Values>;
|
|
285
353
|
}
|
|
354
|
+
interface QueryListDataAdapter<Item extends AnyObject = AnyObject, Values = AnyObject, Data = any> {
|
|
355
|
+
total?: (data: Data | undefined) => number | undefined;
|
|
356
|
+
items?: (data: Data | undefined, form: FormInstance<Values>) => Item[] | undefined;
|
|
357
|
+
}
|
|
286
358
|
interface QueryListProps<Item extends AnyObject = AnyObject, Values = AnyObject, Data = any> extends Omit<TableProps<Item>, 'pagination' | 'dataSource' | 'loading' | 'footer'>, Pick<FilterFormWrapperProps, 'buttonsAlign' | 'showReset'> {
|
|
287
|
-
|
|
359
|
+
identifier: string;
|
|
288
360
|
code?: string;
|
|
289
361
|
form?: FormInstance<Values>;
|
|
290
|
-
method?: 'GET' | 'POST';
|
|
291
362
|
refreshInterval?: number;
|
|
292
363
|
onePage?: boolean;
|
|
293
364
|
defaultSize?: number;
|
|
294
|
-
body?: FormData | Record<string | number, any> | ((payload: QueryListPayload<Values>) => FormData | Record<string | number, any>);
|
|
295
365
|
pageSizeOptions?: number[];
|
|
296
|
-
|
|
366
|
+
request: QueryListRequestConfig<Values>;
|
|
297
367
|
tableExtra?: ReactNode | ((form: FormInstance<Values>, data?: Data) => ReactNode);
|
|
298
|
-
headers?: Record<string, string> | ((form: FormInstance<Values>) => Record<string, string>);
|
|
299
368
|
renderForm?: (form: FormInstance<Values>) => ReactElement;
|
|
300
369
|
afterSuccess?: (action: QueryListAction, form: FormInstance<Values>, data?: Data) => void;
|
|
301
|
-
|
|
302
|
-
|
|
370
|
+
afterError?: (error: Error, action: QueryListAction, form: FormInstance<Values>) => void;
|
|
371
|
+
dataAdapter?: QueryListDataAdapter<Item, Values, Data>;
|
|
303
372
|
footer?: (data: Data | undefined) => ReactNode;
|
|
304
373
|
}
|
|
305
374
|
declare const QueryList: <Item extends AnyObject = AnyObject, Values extends object | undefined = undefined, Data = any>(props: QueryListProps<Item, Values, Data> & {
|
|
306
375
|
ref?: Ref<QueryListRef<Item, Values, Data>>;
|
|
307
376
|
}) => ReactElement;
|
|
308
377
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
378
|
+
type QueryRefetchFunction = () => void | Promise<unknown>;
|
|
379
|
+
interface QueryListInstance {
|
|
380
|
+
id: string;
|
|
381
|
+
url: string;
|
|
382
|
+
queryKey: readonly unknown[];
|
|
383
|
+
payload: QueryListPayload;
|
|
384
|
+
refetch: QueryRefetchFunction;
|
|
312
385
|
}
|
|
313
386
|
interface QueryListState {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
387
|
+
instances: Map<string, QueryListInstance>;
|
|
388
|
+
registerInstance(id: string, url: string, queryKey: readonly unknown[], refetch: QueryRefetchFunction): void;
|
|
389
|
+
unregisterInstance(id: string): void;
|
|
390
|
+
updatePayload(id: string, payload: QueryListPayload): void;
|
|
391
|
+
getPayload(id: string): QueryListPayload;
|
|
392
|
+
refetch(id: string, payload?: QueryListPayload): Promise<void>;
|
|
393
|
+
getInstance(id: string): QueryListInstance | undefined;
|
|
394
|
+
getAllInstances(): QueryListInstance[];
|
|
395
|
+
}
|
|
396
|
+
declare const useQueryListStore: zustand.UseBoundStore<Omit<Omit<zustand.StoreApi<QueryListState>, "setState"> & {
|
|
397
|
+
setState(partial: QueryListState | Partial<QueryListState> | ((state: QueryListState) => QueryListState | Partial<QueryListState>), replace?: false | undefined, action?: (string | {
|
|
398
|
+
[x: string]: unknown;
|
|
399
|
+
[x: number]: unknown;
|
|
400
|
+
[x: symbol]: unknown;
|
|
401
|
+
type: string;
|
|
402
|
+
}) | undefined): void;
|
|
403
|
+
setState(state: QueryListState | ((state: QueryListState) => QueryListState), replace: true, action?: (string | {
|
|
404
|
+
[x: string]: unknown;
|
|
405
|
+
[x: number]: unknown;
|
|
406
|
+
[x: symbol]: unknown;
|
|
407
|
+
type: string;
|
|
408
|
+
}) | undefined): void;
|
|
409
|
+
}, "subscribe"> & {
|
|
410
|
+
subscribe: {
|
|
411
|
+
(listener: (selectedState: QueryListState, previousSelectedState: QueryListState) => void): () => void;
|
|
412
|
+
<U>(selector: (state: QueryListState) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
413
|
+
equalityFn?: ((a: U, b: U) => boolean) | undefined;
|
|
414
|
+
fireImmediately?: boolean;
|
|
415
|
+
} | undefined): () => void;
|
|
416
|
+
};
|
|
417
|
+
}>;
|
|
322
418
|
|
|
323
419
|
declare const RequireGame: FC<PropsWithChildren>;
|
|
324
420
|
|
|
@@ -492,11 +588,197 @@ interface SignInProps {
|
|
|
492
588
|
}
|
|
493
589
|
declare const SignIn: FC<SignInProps>;
|
|
494
590
|
|
|
495
|
-
declare function usePermission(code?: string, config?: Options):
|
|
496
|
-
|
|
497
|
-
|
|
591
|
+
declare function usePermission(code?: string | string[], config?: Options): {
|
|
592
|
+
data: boolean | Record<string, boolean>;
|
|
593
|
+
error: Error;
|
|
594
|
+
isError: true;
|
|
595
|
+
isPending: false;
|
|
596
|
+
isLoading: false;
|
|
597
|
+
isLoadingError: false;
|
|
598
|
+
isRefetchError: true;
|
|
599
|
+
isSuccess: false;
|
|
600
|
+
isPlaceholderData: false;
|
|
601
|
+
status: "error";
|
|
602
|
+
dataUpdatedAt: number;
|
|
603
|
+
errorUpdatedAt: number;
|
|
604
|
+
failureCount: number;
|
|
605
|
+
failureReason: Error | null;
|
|
606
|
+
errorUpdateCount: number;
|
|
607
|
+
isFetched: boolean;
|
|
608
|
+
isFetchedAfterMount: boolean;
|
|
609
|
+
isFetching: boolean;
|
|
610
|
+
isInitialLoading: boolean;
|
|
611
|
+
isPaused: boolean;
|
|
612
|
+
isRefetching: boolean;
|
|
613
|
+
isStale: boolean;
|
|
614
|
+
isEnabled: boolean;
|
|
615
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<Record<string, boolean> & {
|
|
616
|
+
has_all?: boolean;
|
|
617
|
+
}, Error>>;
|
|
618
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
619
|
+
promise: Promise<Record<string, boolean> & {
|
|
620
|
+
has_all?: boolean;
|
|
621
|
+
}>;
|
|
622
|
+
} | {
|
|
623
|
+
data: boolean | Record<string, boolean>;
|
|
624
|
+
error: null;
|
|
625
|
+
isError: false;
|
|
626
|
+
isPending: false;
|
|
627
|
+
isLoading: false;
|
|
628
|
+
isLoadingError: false;
|
|
629
|
+
isRefetchError: false;
|
|
630
|
+
isSuccess: true;
|
|
631
|
+
isPlaceholderData: false;
|
|
632
|
+
status: "success";
|
|
633
|
+
dataUpdatedAt: number;
|
|
634
|
+
errorUpdatedAt: number;
|
|
635
|
+
failureCount: number;
|
|
636
|
+
failureReason: Error | null;
|
|
637
|
+
errorUpdateCount: number;
|
|
638
|
+
isFetched: boolean;
|
|
639
|
+
isFetchedAfterMount: boolean;
|
|
640
|
+
isFetching: boolean;
|
|
641
|
+
isInitialLoading: boolean;
|
|
642
|
+
isPaused: boolean;
|
|
643
|
+
isRefetching: boolean;
|
|
644
|
+
isStale: boolean;
|
|
645
|
+
isEnabled: boolean;
|
|
646
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<Record<string, boolean> & {
|
|
647
|
+
has_all?: boolean;
|
|
648
|
+
}, Error>>;
|
|
649
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
650
|
+
promise: Promise<Record<string, boolean> & {
|
|
651
|
+
has_all?: boolean;
|
|
652
|
+
}>;
|
|
653
|
+
} | {
|
|
654
|
+
data: boolean | Record<string, boolean>;
|
|
655
|
+
error: Error;
|
|
656
|
+
isError: true;
|
|
657
|
+
isPending: false;
|
|
658
|
+
isLoading: false;
|
|
659
|
+
isLoadingError: true;
|
|
660
|
+
isRefetchError: false;
|
|
661
|
+
isSuccess: false;
|
|
662
|
+
isPlaceholderData: false;
|
|
663
|
+
status: "error";
|
|
664
|
+
dataUpdatedAt: number;
|
|
665
|
+
errorUpdatedAt: number;
|
|
666
|
+
failureCount: number;
|
|
667
|
+
failureReason: Error | null;
|
|
668
|
+
errorUpdateCount: number;
|
|
669
|
+
isFetched: boolean;
|
|
670
|
+
isFetchedAfterMount: boolean;
|
|
671
|
+
isFetching: boolean;
|
|
672
|
+
isInitialLoading: boolean;
|
|
673
|
+
isPaused: boolean;
|
|
674
|
+
isRefetching: boolean;
|
|
675
|
+
isStale: boolean;
|
|
676
|
+
isEnabled: boolean;
|
|
677
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<Record<string, boolean> & {
|
|
678
|
+
has_all?: boolean;
|
|
679
|
+
}, Error>>;
|
|
680
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
681
|
+
promise: Promise<Record<string, boolean> & {
|
|
682
|
+
has_all?: boolean;
|
|
683
|
+
}>;
|
|
684
|
+
} | {
|
|
685
|
+
data: boolean | Record<string, boolean>;
|
|
686
|
+
error: null;
|
|
687
|
+
isError: false;
|
|
688
|
+
isPending: true;
|
|
689
|
+
isLoading: true;
|
|
690
|
+
isLoadingError: false;
|
|
691
|
+
isRefetchError: false;
|
|
692
|
+
isSuccess: false;
|
|
693
|
+
isPlaceholderData: false;
|
|
694
|
+
status: "pending";
|
|
695
|
+
dataUpdatedAt: number;
|
|
696
|
+
errorUpdatedAt: number;
|
|
697
|
+
failureCount: number;
|
|
698
|
+
failureReason: Error | null;
|
|
699
|
+
errorUpdateCount: number;
|
|
700
|
+
isFetched: boolean;
|
|
701
|
+
isFetchedAfterMount: boolean;
|
|
702
|
+
isFetching: boolean;
|
|
703
|
+
isInitialLoading: boolean;
|
|
704
|
+
isPaused: boolean;
|
|
705
|
+
isRefetching: boolean;
|
|
706
|
+
isStale: boolean;
|
|
707
|
+
isEnabled: boolean;
|
|
708
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<Record<string, boolean> & {
|
|
709
|
+
has_all?: boolean;
|
|
710
|
+
}, Error>>;
|
|
711
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
712
|
+
promise: Promise<Record<string, boolean> & {
|
|
713
|
+
has_all?: boolean;
|
|
714
|
+
}>;
|
|
715
|
+
} | {
|
|
716
|
+
data: boolean | Record<string, boolean>;
|
|
717
|
+
error: null;
|
|
718
|
+
isError: false;
|
|
719
|
+
isPending: true;
|
|
720
|
+
isLoadingError: false;
|
|
721
|
+
isRefetchError: false;
|
|
722
|
+
isSuccess: false;
|
|
723
|
+
isPlaceholderData: false;
|
|
724
|
+
status: "pending";
|
|
725
|
+
dataUpdatedAt: number;
|
|
726
|
+
errorUpdatedAt: number;
|
|
727
|
+
failureCount: number;
|
|
728
|
+
failureReason: Error | null;
|
|
729
|
+
errorUpdateCount: number;
|
|
730
|
+
isFetched: boolean;
|
|
731
|
+
isFetchedAfterMount: boolean;
|
|
732
|
+
isFetching: boolean;
|
|
733
|
+
isLoading: boolean;
|
|
734
|
+
isInitialLoading: boolean;
|
|
735
|
+
isPaused: boolean;
|
|
736
|
+
isRefetching: boolean;
|
|
737
|
+
isStale: boolean;
|
|
738
|
+
isEnabled: boolean;
|
|
739
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<Record<string, boolean> & {
|
|
740
|
+
has_all?: boolean;
|
|
741
|
+
}, Error>>;
|
|
742
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
743
|
+
promise: Promise<Record<string, boolean> & {
|
|
744
|
+
has_all?: boolean;
|
|
745
|
+
}>;
|
|
746
|
+
} | {
|
|
747
|
+
data: boolean | Record<string, boolean>;
|
|
748
|
+
isError: false;
|
|
749
|
+
error: null;
|
|
750
|
+
isPending: false;
|
|
751
|
+
isLoading: false;
|
|
752
|
+
isLoadingError: false;
|
|
753
|
+
isRefetchError: false;
|
|
754
|
+
isSuccess: true;
|
|
755
|
+
isPlaceholderData: true;
|
|
756
|
+
status: "success";
|
|
757
|
+
dataUpdatedAt: number;
|
|
758
|
+
errorUpdatedAt: number;
|
|
759
|
+
failureCount: number;
|
|
760
|
+
failureReason: Error | null;
|
|
761
|
+
errorUpdateCount: number;
|
|
762
|
+
isFetched: boolean;
|
|
763
|
+
isFetchedAfterMount: boolean;
|
|
764
|
+
isFetching: boolean;
|
|
765
|
+
isInitialLoading: boolean;
|
|
766
|
+
isPaused: boolean;
|
|
767
|
+
isRefetching: boolean;
|
|
768
|
+
isStale: boolean;
|
|
769
|
+
isEnabled: boolean;
|
|
770
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<Record<string, boolean> & {
|
|
771
|
+
has_all?: boolean;
|
|
772
|
+
}, Error>>;
|
|
773
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
774
|
+
promise: Promise<Record<string, boolean> & {
|
|
775
|
+
has_all?: boolean;
|
|
776
|
+
}>;
|
|
777
|
+
};
|
|
778
|
+
declare function useMenuList(): _tanstack_react_query.UseQueryResult<MenuListItem[], Error>;
|
|
779
|
+
declare const useGames: () => _tanstack_react_query.UseQueryResult<Game[], Error>;
|
|
498
780
|
|
|
499
781
|
declare const mixedStorage: StateStorage;
|
|
500
782
|
declare const generateId: () => number;
|
|
501
783
|
|
|
502
|
-
export { APP_ID_HEADER, DynamicTags, type DynamicTagsProps, ExpandableParagraph, type ExpandableParagraphProps, FRONTEND_ROUTE_PREFIX, FilterFormWrapper, type FilterFormWrapperProps, type Game, Highlight, type HighlightProps, InfiniteList, type InfiniteListProps, type InfiniteListRef, Layout, type LayoutProps, type MenuListItem, NavMenu, type NavMenuItem, NotFound, _default$1 as OperationLogList, type Permission, PermissionButton, type PermissionButtonProps, PermissionVersion, QueryList, QueryListAction, type QueryListPayload, type QueryListProps, type QueryListRef, type RecursivePartial, RequireGame, RequirePermission, type RequirePermissionProps, SSO_URL, SignIn, ToolkitsProvider, type ToolkitsProviderProps, type UseFormDrawerProps, type UseFormModalProps, UserWidget, WILDCARD, generateId, _default$2 as menuRoutes, mixedStorage, _default as permissionRoutes, useDrawer, useDrawerStore,
|
|
784
|
+
export { APP_ID_HEADER, DynamicTags, type DynamicTagsProps, ExpandableParagraph, type ExpandableParagraphProps, FRONTEND_ROUTE_PREFIX, FilterFormWrapper, type FilterFormWrapperProps, type Game, Highlight, type HighlightProps, InfiniteList, InfiniteListAction, type InfiniteListPayload, type InfiniteListProps, type InfiniteListRef, type InfiniteListRequestConfig, Layout, type LayoutProps, type MenuListItem, NavMenu, type NavMenuItem, NotFound, _default$1 as OperationLogList, type Permission, PermissionButton, type PermissionButtonProps, PermissionVersion, QueryList, QueryListAction, type QueryListPayload, type QueryListProps, type QueryListRef, type RecursivePartial, RequireGame, RequirePermission, type RequirePermissionProps, SSO_URL, SignIn, ToolkitsProvider, type ToolkitsProviderProps, type UseFormDrawerProps, type UseFormModalProps, UserWidget, WILDCARD, generateId, _default$2 as menuRoutes, mixedStorage, _default as permissionRoutes, useDrawer, useDrawerStore, useFormDrawer, useFormModal, useGames, useInfiniteListStore, useMenuList, useModal, useModalStore, usePermission, useQueryListStore, useToolkitsStore, withContext };
|