react-toolkits 2.22.8 → 2.22.9

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/CHANGELOG.md +6 -0
  2. package/README.md +297 -26
  3. package/lib/chunk-3OYXD4UE.js +1 -0
  4. package/lib/chunk-4GULXGNG.js +1 -0
  5. package/lib/chunk-7NM3DK6A.js +1 -0
  6. package/lib/chunk-FXPGR372.js +0 -0
  7. package/lib/chunk-JIBSYGRB.js +1 -0
  8. package/lib/chunk-JTDKSGJR.js +1 -0
  9. package/lib/chunk-K5HXGCZ4.js +1 -0
  10. package/lib/chunk-LRMME3YZ.js +2 -0
  11. package/lib/chunk-OLM4QNJB.js +1 -0
  12. package/lib/chunk-P5SX5RW3.js +1 -0
  13. package/lib/chunk-RITI5HRV.js +1 -0
  14. package/lib/chunk-TRRCT3ST.js +1 -0
  15. package/lib/chunk-TYDTFWYK.js +1 -0
  16. package/lib/chunk-WHOTHZUW.js +1 -0
  17. package/lib/chunk-X6ZI7RL7.js +1 -0
  18. package/lib/chunk-XQERUQGQ.js +1 -0
  19. package/lib/chunk-XWIQENHQ.js +2 -0
  20. package/lib/components.d.ts +530 -0
  21. package/lib/components.js +1 -0
  22. package/lib/components.js.map +1 -0
  23. package/lib/constants.d.ts +11 -0
  24. package/lib/constants.js +1 -0
  25. package/lib/constants.js.map +1 -0
  26. package/lib/createMenuItem-HUQG2HQY.js +1 -0
  27. package/lib/index.css.map +1 -0
  28. package/lib/index.d.ts +20 -789
  29. package/lib/index.js +1 -2
  30. package/lib/index.js.map +1 -0
  31. package/lib/menuItemList-AS6ZDOTZ.js +1 -0
  32. package/lib/modules.d.ts +7 -0
  33. package/lib/modules.js +1 -0
  34. package/lib/modules.js.map +1 -0
  35. package/lib/pages.d.ts +20 -0
  36. package/lib/pages.js +1 -0
  37. package/lib/pages.js.map +1 -0
  38. package/lib/roleDetail-PFVKUPYB.js +1 -0
  39. package/lib/roleList-AHH4PNYW.js +1 -0
  40. package/lib/services.d.ts +196 -0
  41. package/lib/services.js +1 -0
  42. package/lib/services.js.map +1 -0
  43. package/lib/types-DVKf5poe.d.ts +19 -0
  44. package/lib/types.d.ts +23 -0
  45. package/lib/types.js +1 -0
  46. package/lib/types.js.map +1 -0
  47. package/lib/updateMenuItem-7SUIOBXS.js +1 -0
  48. package/lib/userDetail-JJNDBV5T.js +1 -0
  49. package/lib/userList-KX3POGAU.js +1 -0
  50. package/lib/utils.d.ts +6 -0
  51. package/lib/utils.js +1 -0
  52. package/lib/utils.js.map +1 -0
  53. package/locale/chunk-GHHHKGNN.js +1 -0
  54. package/locale/context.js +9 -1
  55. package/locale/context.js.map +1 -0
  56. package/locale/en_GB.js +96 -1
  57. package/locale/en_GB.js.map +1 -0
  58. package/locale/hooks.js +29 -1
  59. package/locale/hooks.js.map +1 -0
  60. package/locale/index.js +29 -1
  61. package/locale/index.js.map +1 -0
  62. package/locale/ja_JP.js +96 -1
  63. package/locale/ja_JP.js.map +1 -0
  64. package/locale/ko_KR.js +96 -1
  65. package/locale/ko_KR.js.map +1 -0
  66. package/locale/zh_CN.js +96 -1
  67. package/locale/zh_CN.js.map +1 -0
  68. package/package.json +30 -2
@@ -0,0 +1,530 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { DrawerProps, Button, FormProps, FormInstance, MenuProps, SelectProps, ModalProps, ButtonProps } from 'antd';
3
+ import * as react from 'react';
4
+ import { ReactNode, ComponentProps, FC, PropsWithChildren, Key, ReactElement, Ref, DetailedHTMLProps, ImgHTMLAttributes, ComponentType } from 'react';
5
+ import { AnyObject } from 'antd/es/_util/type';
6
+ import { RecursivePartial } from './types.js';
7
+ import * as zustand from 'zustand';
8
+ import { ParagraphProps } from 'antd/es/typography/Paragraph';
9
+ import { TableProps } from 'antd/es/table';
10
+ import { ItemType, SubMenuType, MenuItemGroupType, MenuItemType } from 'antd/es/menu/interface';
11
+ import { Merge } from 'ts-essentials';
12
+ import { G as Game } from './types-DVKf5poe.js';
13
+ import { Options } from 'ky';
14
+ import { PermissionVersion } from './constants.js';
15
+
16
+ interface UseDrawerOperation {
17
+ hide: () => void;
18
+ }
19
+ interface UseDrawerProps extends Omit<DrawerProps, 'open' | 'confirmLoading' | 'onClose' | 'footer'> {
20
+ content?: ReactNode | ((operation: UseDrawerOperation) => ReactNode);
21
+ onConfirm?: () => void | Promise<void>;
22
+ afterOpen?: () => void | Promise<void>;
23
+ afterClose?: () => void | Promise<void>;
24
+ footer?: ReactNode | null;
25
+ confirmText?: string;
26
+ cancelText?: string;
27
+ confirmButtonProps?: ComponentProps<typeof Button>;
28
+ cancelButtonProps?: ComponentProps<typeof Button>;
29
+ }
30
+ declare function useDrawer(props: UseDrawerProps): {
31
+ id: number;
32
+ show: () => Promise<void>;
33
+ hide: () => void;
34
+ confirmLoading: boolean;
35
+ drawer: react_jsx_runtime.JSX.Element;
36
+ };
37
+
38
+ interface UseFormDrawerProps<Values extends AnyObject = AnyObject, ExtraValues = any> extends Omit<UseDrawerProps, 'onConfirm' | 'content' | 'onShow' | 'afterClose'> {
39
+ formProps?: Omit<FormProps, 'form'>;
40
+ form?: FormInstance<Values>;
41
+ content?: ReactNode | ((extraValues: ExtraValues, operation: UseDrawerOperation) => ReactNode);
42
+ onConfirm?: (values: Values, extraValues: ExtraValues) => void | Promise<void>;
43
+ onSuccess?: () => void;
44
+ afterClose?: (form: FormInstance<Values>) => void;
45
+ }
46
+ declare function useFormDrawer<Values extends AnyObject = AnyObject, ExtraValues = any>(props: UseFormDrawerProps<Values, ExtraValues>): {
47
+ id: number;
48
+ show: (options?: {
49
+ initialValues?: RecursivePartial<Values>;
50
+ extraValues?: ExtraValues;
51
+ }) => void;
52
+ hide: () => void;
53
+ drawer: react_jsx_runtime.JSX.Element;
54
+ };
55
+
56
+ interface DrawerState {
57
+ open: Map<number, boolean>;
58
+ usedIds: Set<number>;
59
+ isOpen: (uuid: number) => boolean;
60
+ show: (uuid: number) => void;
61
+ hide: (uuid: number) => void;
62
+ hideAll: () => void;
63
+ checkUniqueness: (uuid: number) => boolean;
64
+ registerIds: (uuid: number) => boolean;
65
+ cleanup: (uuid: number) => void;
66
+ }
67
+ declare const useDrawerStore: zustand.UseBoundStore<zustand.StoreApi<DrawerState>>;
68
+
69
+ interface DynamicTagsProps {
70
+ initialTags?: string[];
71
+ addable?: boolean;
72
+ removable?: boolean;
73
+ addCallback?: (addedTag: string) => Promise<boolean>;
74
+ removeCallback?: (removedTag: string) => Promise<boolean>;
75
+ }
76
+ declare const DynamicTags: FC<DynamicTagsProps>;
77
+
78
+ type ExpandableParagraphProps = Omit<ParagraphProps, 'ellipsis' | 'className'>;
79
+ declare const ExpandableParagraph: FC<ExpandableParagraphProps>;
80
+
81
+ interface FilterFormWrapperProps extends PropsWithChildren {
82
+ onConfirm?: () => void | Promise<void>;
83
+ onReset?: () => void;
84
+ extras?: {
85
+ key: Key;
86
+ children: ReactNode;
87
+ }[];
88
+ isConfirming?: boolean;
89
+ buttonsAlign?: 'left' | 'right' | 'bottom';
90
+ showReset?: boolean;
91
+ }
92
+ declare const FilterFormWrapper: (props: FilterFormWrapperProps) => react_jsx_runtime.JSX.Element;
93
+
94
+ interface HighlightProps extends PropsWithChildren {
95
+ texts: Array<string | number>;
96
+ }
97
+ declare const Highlight: (props: HighlightProps) => react_jsx_runtime.JSX.Element;
98
+
99
+ interface InfiniteListPayload<Values = any> {
100
+ page?: number;
101
+ formValue?: Values;
102
+ }
103
+ interface InfiniteListRequestConfig<Values = any> {
104
+ url: string;
105
+ method?: 'GET' | 'POST';
106
+ body?: FormData | Record<string | number, any> | ((payload: InfiniteListPayload<Values>, pageParam: any) => FormData | Record<string | number, any>);
107
+ params?: Record<string | number, any> | ((payload: InfiniteListPayload<Values>, pageParam: any) => Record<string | number, any>);
108
+ headers?: Record<string, string> | ((form: FormInstance<Values>) => Record<string, string>);
109
+ cacheTime?: number;
110
+ staleTime?: number;
111
+ }
112
+ declare enum InfiniteListAction {
113
+ Confirm = 0,
114
+ Reset = 1,
115
+ LoadMore = 2,
116
+ Init = 3
117
+ }
118
+ interface InfiniteListDataAdapter<Item = any, Values = any, Data = any> {
119
+ items?: (data: Data[] | undefined, form: FormInstance<Values>) => Item[] | undefined;
120
+ hasMore?: (lastPage: Data | undefined, allPages: Data[]) => boolean;
121
+ nextPageParam?: (lastPage: Data | undefined, allPages: Data[], pageParam: any) => any;
122
+ }
123
+ interface InfiniteListRef<Item = any, Values = any, Data = any> {
124
+ data: Data[] | undefined;
125
+ dataSource: Item[] | undefined;
126
+ form: FormInstance<Values>;
127
+ refetch: () => void;
128
+ fetchNextPage: () => void;
129
+ hasNextPage: boolean;
130
+ isFetchingNextPage: boolean;
131
+ }
132
+ interface InfiniteListProps<Item, Values, Data> extends Pick<TableProps<Item>, 'columns' | 'rowKey' | 'tableLayout' | 'expandable' | 'rowSelection' | 'bordered'>, Pick<FilterFormWrapperProps, 'buttonsAlign' | 'showReset'> {
133
+ identifier: string;
134
+ code?: string;
135
+ form?: FormInstance<Values>;
136
+ refreshInterval?: number;
137
+ request: InfiniteListRequestConfig<Values>;
138
+ tableExtra?: ReactNode | ((form: FormInstance<Values>, data?: Data[]) => ReactNode);
139
+ renderForm?: (form: FormInstance<Values>) => ReactElement;
140
+ afterSuccess?: (action: InfiniteListAction, form: FormInstance<Values>, data?: Data[]) => void;
141
+ afterError?: (error: Error, action: InfiniteListAction, form: FormInstance<Values>) => void;
142
+ dataAdapter?: InfiniteListDataAdapter<Item, Values, Data>;
143
+ initialPageParam?: any;
144
+ footer?: (data: Data[] | undefined) => ReactNode;
145
+ }
146
+ declare const InfiniteList: <Item extends AnyObject = AnyObject, Values extends object | undefined = undefined, Data = any>(props: InfiniteListProps<Item, Values, Data> & {
147
+ ref?: Ref<InfiniteListRef<Item, Data>>;
148
+ }) => ReactElement;
149
+
150
+ type InfiniteQueryRefetchFunction = () => void | Promise<unknown>;
151
+ type InfiniteQueryFetchNextPageFunction = () => void | Promise<unknown>;
152
+ interface InfiniteListInstance {
153
+ id: string;
154
+ url: string;
155
+ queryKey: readonly unknown[];
156
+ payload: InfiniteListPayload;
157
+ refetch: InfiniteQueryRefetchFunction;
158
+ fetchNextPage: InfiniteQueryFetchNextPageFunction;
159
+ }
160
+ interface InfiniteListState {
161
+ instances: Map<string, InfiniteListInstance>;
162
+ registerInstance(id: string, url: string, queryKey: readonly unknown[], refetch: InfiniteQueryRefetchFunction, fetchNextPage: InfiniteQueryFetchNextPageFunction): void;
163
+ unregisterInstance(id: string): void;
164
+ updatePayload(id: string, payload: InfiniteListPayload): void;
165
+ getPayload(id: string): InfiniteListPayload;
166
+ refetch(id: string, payload?: InfiniteListPayload): Promise<void>;
167
+ fetchNextPage(id: string): Promise<void>;
168
+ getInstance(id: string): InfiniteListInstance | undefined;
169
+ getAllInstances(): InfiniteListInstance[];
170
+ }
171
+ declare const useInfiniteListStore: zustand.UseBoundStore<Omit<Omit<zustand.StoreApi<InfiniteListState>, "setState"> & {
172
+ setState(partial: InfiniteListState | Partial<InfiniteListState> | ((state: InfiniteListState) => InfiniteListState | Partial<InfiniteListState>), replace?: false | undefined, action?: (string | {
173
+ [x: string]: unknown;
174
+ [x: number]: unknown;
175
+ [x: symbol]: unknown;
176
+ type: string;
177
+ }) | undefined): void;
178
+ setState(state: InfiniteListState | ((state: InfiniteListState) => InfiniteListState), replace: true, action?: (string | {
179
+ [x: string]: unknown;
180
+ [x: number]: unknown;
181
+ [x: symbol]: unknown;
182
+ type: string;
183
+ }) | undefined): void;
184
+ }, "subscribe"> & {
185
+ subscribe: {
186
+ (listener: (selectedState: InfiniteListState, previousSelectedState: InfiniteListState) => void): () => void;
187
+ <U>(selector: (state: InfiniteListState) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
188
+ equalityFn?: ((a: U, b: U) => boolean) | undefined;
189
+ fireImmediately?: boolean;
190
+ } | undefined): () => void;
191
+ };
192
+ }>;
193
+
194
+ type MenuItemType2 = Merge<MenuItemType, {
195
+ route?: string;
196
+ }>;
197
+ type SubMenuType2 = Merge<SubMenuType, {
198
+ children?: NavMenuItem[];
199
+ }>;
200
+ type MenuItemGroupType2 = Merge<MenuItemGroupType, {
201
+ children?: NavMenuItem[];
202
+ }>;
203
+ type NavMenuItem = Exclude<ItemType, SubMenuType | MenuItemGroupType | MenuItemType> | MenuItemType2 | SubMenuType2 | MenuItemGroupType2;
204
+
205
+ interface NavMenuProps {
206
+ items?: NavMenuItem[];
207
+ theme?: MenuProps['theme'];
208
+ loading?: boolean;
209
+ }
210
+ declare const NavMenu: react.NamedExoticComponent<NavMenuProps>;
211
+
212
+ interface GameSelectProps {
213
+ filter?: (game: Game) => boolean;
214
+ options?: (data?: Game[]) => SelectProps['options'];
215
+ }
216
+
217
+ type HeaderExtra = {
218
+ key: Key;
219
+ children: ReactNode;
220
+ };
221
+ interface LayoutProps extends Pick<GameSelectProps, 'filter'> {
222
+ collapsible?: boolean;
223
+ isMenuLoading?: boolean;
224
+ items?: NavMenuItem[];
225
+ navWidth?: string | number;
226
+ gameSelectOptions?: GameSelectProps['options'];
227
+ headerExtra?: {
228
+ left?: HeaderExtra[];
229
+ right?: HeaderExtra[];
230
+ };
231
+ title?: string;
232
+ subtitle?: string;
233
+ }
234
+ declare const Layout: FC<PropsWithChildren<LayoutProps>>;
235
+
236
+ type LogoProps = Omit<DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, 'src' | 'alt'>;
237
+ declare const Logo: FC<LogoProps>;
238
+
239
+ interface UseModalOperation {
240
+ hide: () => void;
241
+ }
242
+ interface UseModalProps extends Omit<ModalProps, 'open' | 'confirmLoading' | 'onOk' | 'onCancel'> {
243
+ content?: ReactNode | ((operation: UseModalOperation) => ReactNode);
244
+ onConfirm?: () => void | Promise<void>;
245
+ afterOpen?: () => void | Promise<void>;
246
+ afterClose?: () => void | Promise<void>;
247
+ }
248
+ declare function useModal(props: UseModalProps): {
249
+ id: number;
250
+ show: () => Promise<void>;
251
+ hide: () => void;
252
+ modal: react_jsx_runtime.JSX.Element;
253
+ };
254
+
255
+ interface UseFormModalProps<Values extends AnyObject = AnyObject, ExtraValues = any> extends Omit<UseModalProps, 'onConfirm' | 'content' | 'onShow' | 'afterClose'> {
256
+ formProps?: Omit<FormProps, 'form'>;
257
+ form?: FormInstance<Values>;
258
+ content?: ReactNode | ((extraValues: ExtraValues, operation: UseModalOperation) => ReactNode);
259
+ onConfirm?: (values: Values, extraValues: ExtraValues) => void | Promise<void>;
260
+ onSuccess?: () => void;
261
+ afterClose?: (form: FormInstance<Values>) => void;
262
+ }
263
+ declare function useFormModal<Values extends AnyObject = AnyObject, ExtraValues = any>(props: UseFormModalProps<Values, ExtraValues>): {
264
+ id: number;
265
+ show: (options?: {
266
+ initialValues?: RecursivePartial<Values>;
267
+ extraValues?: ExtraValues;
268
+ }) => void;
269
+ hide: () => void;
270
+ modal: react_jsx_runtime.JSX.Element;
271
+ };
272
+
273
+ interface ModalState {
274
+ open: Map<number, boolean>;
275
+ usedIds: Set<number>;
276
+ isOpen: (uuid: number) => boolean;
277
+ show: (uuid: number) => void;
278
+ hide: (uuid: number) => void;
279
+ hideAll: () => void;
280
+ checkUniqueness: (uuid: number) => boolean;
281
+ registerIds: (uuid: number) => boolean;
282
+ cleanup: (uuid: number) => void;
283
+ }
284
+ declare const useModalStore: zustand.UseBoundStore<zustand.StoreApi<ModalState>>;
285
+
286
+ interface PermissionButtonProps extends ButtonProps {
287
+ code?: string | string[];
288
+ showLoading?: boolean;
289
+ config?: Options;
290
+ }
291
+ declare const PermissionButton: FC<PropsWithChildren<PermissionButtonProps>>;
292
+
293
+ interface QueryListPayload<Values = any> {
294
+ page?: number;
295
+ size?: number;
296
+ filters?: Values;
297
+ }
298
+ interface CacheConfig {
299
+ cacheTime?: number;
300
+ staleTime?: number;
301
+ }
302
+ type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD';
303
+ interface QueryListRequestConfig extends CacheConfig {
304
+ url: string;
305
+ method?: HttpMethod;
306
+ body?: FormData | Record<string | number, any>;
307
+ searchParams?: Record<string | number, any>;
308
+ headers?: Record<string, string>;
309
+ }
310
+ type QueryListRequestConfigType<Values = any> = QueryListRequestConfig | ((payload: QueryListPayload<Values>) => QueryListRequestConfig);
311
+ declare enum QueryListAction {
312
+ Confirm = 0,
313
+ Reset = 1,
314
+ Jump = 2,
315
+ Init = 3
316
+ }
317
+ interface QueryListRef<Item extends AnyObject = AnyObject, Values = AnyObject, Data = any> {
318
+ data: Data | undefined;
319
+ dataSource: Item[] | undefined;
320
+ form: FormInstance<Values>;
321
+ }
322
+ interface QueryListDataAdapter<Item extends AnyObject = AnyObject> {
323
+ total?: number;
324
+ items?: Item[];
325
+ }
326
+ type QueryListDataAdapterConfig<Item extends AnyObject = AnyObject, Data = any> = QueryListDataAdapter<Item> | ((data: Data) => QueryListDataAdapter<Item>);
327
+ interface QueryListProps<Item extends AnyObject = AnyObject, Values = AnyObject, Data = any> extends Omit<TableProps<Item>, 'pagination' | 'dataSource' | 'loading' | 'footer'>, Pick<FilterFormWrapperProps, 'buttonsAlign' | 'showReset'> {
328
+ identifier?: string;
329
+ code?: string;
330
+ form?: FormInstance<Values>;
331
+ refreshInterval?: number;
332
+ onePage?: boolean;
333
+ defaultSize?: number;
334
+ pageSizeOptions?: number[];
335
+ request: QueryListRequestConfigType<Values>;
336
+ tableExtra?: ReactNode | ((form: FormInstance<Values>, data?: Data) => ReactNode);
337
+ renderForm?: (form: FormInstance<Values>) => ReactElement;
338
+ afterSuccess?: (action: QueryListAction, form: FormInstance<Values>, data?: Data) => void;
339
+ afterError?: (error: Error, action: QueryListAction, form: FormInstance<Values>) => void;
340
+ dataAdapter?: QueryListDataAdapterConfig<Item, Data>;
341
+ footer?: (data: Data | undefined) => ReactNode;
342
+ }
343
+ declare const QueryList: <Item extends AnyObject = AnyObject, Values extends object | undefined = undefined, Data = any>(props: QueryListProps<Item, Values, Data> & {
344
+ ref?: Ref<QueryListRef<Item, Values, Data>>;
345
+ }) => ReactElement;
346
+
347
+ type QueryRefetchFunction = () => void | Promise<unknown>;
348
+ interface QueryListInstance {
349
+ id: string;
350
+ url: string;
351
+ queryKey: readonly unknown[];
352
+ payload: QueryListPayload;
353
+ refetch: QueryRefetchFunction;
354
+ }
355
+ interface QueryListState {
356
+ instances: Map<string, QueryListInstance>;
357
+ registerInstance(id: string, url: string, queryKey: readonly unknown[], refetch: QueryRefetchFunction): void;
358
+ unregisterInstance(id: string): void;
359
+ updatePayload(id: string, payload: QueryListPayload): void;
360
+ getPayload(id: string): QueryListPayload;
361
+ refetch(id: string, payload?: QueryListPayload): Promise<void>;
362
+ getInstance(id: string): QueryListInstance | undefined;
363
+ getAllInstances(): QueryListInstance[];
364
+ }
365
+ declare const useQueryListStore: zustand.UseBoundStore<Omit<Omit<zustand.StoreApi<QueryListState>, "setState"> & {
366
+ setState(partial: QueryListState | Partial<QueryListState> | ((state: QueryListState) => QueryListState | Partial<QueryListState>), replace?: false | undefined, action?: (string | {
367
+ [x: string]: unknown;
368
+ [x: number]: unknown;
369
+ [x: symbol]: unknown;
370
+ type: string;
371
+ }) | undefined): void;
372
+ setState(state: QueryListState | ((state: QueryListState) => QueryListState), replace: true, action?: (string | {
373
+ [x: string]: unknown;
374
+ [x: number]: unknown;
375
+ [x: symbol]: unknown;
376
+ type: string;
377
+ }) | undefined): void;
378
+ }, "subscribe"> & {
379
+ subscribe: {
380
+ (listener: (selectedState: QueryListState, previousSelectedState: QueryListState) => void): () => void;
381
+ <U>(selector: (state: QueryListState) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
382
+ equalityFn?: ((a: U, b: U) => boolean) | undefined;
383
+ fireImmediately?: boolean;
384
+ } | undefined): () => void;
385
+ };
386
+ }>;
387
+
388
+ declare const RequireGame: FC<PropsWithChildren>;
389
+
390
+ interface RequirePermissionProps {
391
+ code: string;
392
+ config?: Options;
393
+ }
394
+ declare const RequirePermission: FC<PropsWithChildren<RequirePermissionProps>>;
395
+
396
+ type Locale = {
397
+ global: {
398
+ noEntitlement: string;
399
+ name: string;
400
+ creationTime: string;
401
+ operation: string;
402
+ update: string;
403
+ edit: string;
404
+ delete: string;
405
+ selectAll: string;
406
+ game: string;
407
+ user: string;
408
+ role: string;
409
+ username: string;
410
+ password: string;
411
+ label: string;
412
+ method: string;
413
+ route: string;
414
+ request: string;
415
+ response: string;
416
+ add: string;
417
+ signIn: string;
418
+ projectGroup: string;
419
+ view: string;
420
+ };
421
+ SignIn: {
422
+ title: string;
423
+ thirdParty: string;
424
+ signInWithIDass: string;
425
+ unregistered: string;
426
+ welcome: string;
427
+ };
428
+ NotFound: {
429
+ subTitle: string;
430
+ buttonText: string;
431
+ };
432
+ FilterFormWrapper: {
433
+ confirmText: string;
434
+ resetText: string;
435
+ };
436
+ FormModal: {
437
+ confirmText: string;
438
+ cancelText: string;
439
+ };
440
+ GameSelect: {
441
+ label: string;
442
+ placeholder: string;
443
+ };
444
+ RequireGame: {
445
+ description: string;
446
+ };
447
+ UserWidget: {
448
+ signOutText: string;
449
+ };
450
+ User: {
451
+ createTitle: string;
452
+ createSuccessfully: string;
453
+ updateTitle: string;
454
+ updateSuccessfully: string;
455
+ deleteTitle: string;
456
+ deleteContent: string;
457
+ deleteSuccessfully: string;
458
+ };
459
+ Role: {
460
+ createTitle: string;
461
+ createSuccessfully: string;
462
+ updateTitle: string;
463
+ updateSuccessfully: string;
464
+ deleteTitle: string;
465
+ deleteContent: string;
466
+ deleteSuccessfully: string;
467
+ };
468
+ PermissionList: {
469
+ failedDescription: string;
470
+ baseSectionTitle: string;
471
+ gameSectionTitle: string;
472
+ gameSectionDescription: string;
473
+ gameSelectPlaceholder: string;
474
+ removeText: string;
475
+ addText: string;
476
+ };
477
+ RoleDetail: {
478
+ title: string;
479
+ };
480
+ InfiniteList: {
481
+ loadingText: string;
482
+ reachEndText: string;
483
+ loadMoreText: string;
484
+ };
485
+ };
486
+
487
+ interface ContextSlice {
488
+ locale: Locale;
489
+ permissionVersion: PermissionVersion;
490
+ gameApiV2: boolean;
491
+ signInPath: string;
492
+ isGlobal: boolean;
493
+ navWidth?: number;
494
+ collapsed?: boolean;
495
+ collapsible?: boolean;
496
+ mainPagePath: string;
497
+ setContext(state: Partial<Omit<ContextSlice, 'setContext'>>): void;
498
+ }
499
+
500
+ interface GameSlice {
501
+ gameId?: string | number;
502
+ setGameId: (id?: string | number) => void;
503
+ }
504
+
505
+ interface UserInfo {
506
+ authorityId: string;
507
+ exp: number;
508
+ }
509
+ interface TokenSlice {
510
+ token?: string;
511
+ getUser: () => UserInfo | null;
512
+ setToken: (token: string) => void;
513
+ }
514
+
515
+ type ToolkitsState = TokenSlice & GameSlice & ContextSlice & {
516
+ clearToken: () => void;
517
+ };
518
+
519
+ declare function useToolkitsStore(): ToolkitsState;
520
+ declare function useToolkitsStore<T>(selector: (state: ToolkitsState) => T): T;
521
+ type ToolkitsProviderProps = PropsWithChildren<Partial<Omit<ContextSlice, 'setContext'>>>;
522
+ declare const ToolkitsProvider: FC<ToolkitsProviderProps>;
523
+ declare const withContext: (Component: ComponentType, providerProps: Omit<ToolkitsProviderProps, "children">) => {
524
+ (props: any): react_jsx_runtime.JSX.Element;
525
+ displayName: string;
526
+ };
527
+
528
+ declare const UserWidget: FC;
529
+
530
+ export { DynamicTags, type DynamicTagsProps, ExpandableParagraph, type ExpandableParagraphProps, FilterFormWrapper, type FilterFormWrapperProps, Game, Highlight, type HighlightProps, InfiniteList, InfiniteListAction, type InfiniteListPayload, type InfiniteListProps, type InfiniteListRef, type InfiniteListRequestConfig, Layout, type LayoutProps, Logo, type LogoProps, NavMenu, type NavMenuItem, PermissionButton, type PermissionButtonProps, QueryList, QueryListAction, type QueryListPayload, type QueryListProps, type QueryListRef, RequireGame, RequirePermission, type RequirePermissionProps, ToolkitsProvider, type ToolkitsProviderProps, type UseFormDrawerProps, type UseFormModalProps, UserWidget, useDrawer, useDrawerStore, useFormDrawer, useFormModal, useInfiniteListStore, useModal, useModalStore, useQueryListStore, useToolkitsStore, withContext };
@@ -0,0 +1 @@
1
+ export{d as DynamicTags,f as InfiniteList,j as Layout,g as NavMenu,h as RequireGame,k as RequirePermission,i as UserWidget,b as useDrawer,a as useDrawerStore,c as useFormDrawer,e as useInfiniteListStore}from'./chunk-K5HXGCZ4.js';export{a as Highlight}from'./chunk-RITI5HRV.js';export{d as PermissionButton,c as useFormModal,b as useModal,a as useModalStore}from'./chunk-3OYXD4UE.js';export{a as ExpandableParagraph,b as Logo}from'./chunk-JTDKSGJR.js';export{a as FilterFormWrapper,d as QueryList,c as QueryListAction,b as useQueryListStore}from'./chunk-4GULXGNG.js';import'./chunk-7NM3DK6A.js';import'./chunk-X6ZI7RL7.js';export{c as ToolkitsProvider,a as useToolkitsStore,b as withContext}from'./chunk-WHOTHZUW.js';import'./chunk-LRMME3YZ.js';import'./chunk-OLM4QNJB.js';