react-toolkits 2.9.27 → 2.10.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 CHANGED
@@ -1,10 +1,23 @@
1
1
  # react-toolkits
2
2
 
3
+ ## 2.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - fdd64c8: feat: 使用 axios 发起 http 请求
8
+
9
+ ## 2.9.28
10
+
11
+ ### Patch Changes
12
+
13
+ - 48dbace: fix: response may be not a json
14
+
3
15
  ## 2.9.27
4
16
 
5
17
  ### Patch Changes
6
18
 
7
19
  - b5384d7: feat: parse error message when http code out of 2xx range
20
+
8
21
  ```
9
22
 
10
23
  ```
package/lib/index.css CHANGED
@@ -1,311 +1 @@
1
- /* src/styles/index.css */
2
- *,
3
- ::before,
4
- ::after {
5
- --tw-border-spacing-x: 0;
6
- --tw-border-spacing-y: 0;
7
- --tw-translate-x: 0;
8
- --tw-translate-y: 0;
9
- --tw-rotate: 0;
10
- --tw-skew-x: 0;
11
- --tw-skew-y: 0;
12
- --tw-scale-x: 1;
13
- --tw-scale-y: 1;
14
- --tw-pan-x: ;
15
- --tw-pan-y: ;
16
- --tw-pinch-zoom: ;
17
- --tw-scroll-snap-strictness: proximity;
18
- --tw-gradient-from-position: ;
19
- --tw-gradient-via-position: ;
20
- --tw-gradient-to-position: ;
21
- --tw-ordinal: ;
22
- --tw-slashed-zero: ;
23
- --tw-numeric-figure: ;
24
- --tw-numeric-spacing: ;
25
- --tw-numeric-fraction: ;
26
- --tw-ring-inset: ;
27
- --tw-ring-offset-width: 0px;
28
- --tw-ring-offset-color: #fff;
29
- --tw-ring-color: rgb(59 130 246 / 0.5);
30
- --tw-ring-offset-shadow: 0 0 #0000;
31
- --tw-ring-shadow: 0 0 #0000;
32
- --tw-shadow: 0 0 #0000;
33
- --tw-shadow-colored: 0 0 #0000;
34
- --tw-blur: ;
35
- --tw-brightness: ;
36
- --tw-contrast: ;
37
- --tw-grayscale: ;
38
- --tw-hue-rotate: ;
39
- --tw-invert: ;
40
- --tw-saturate: ;
41
- --tw-sepia: ;
42
- --tw-drop-shadow: ;
43
- --tw-backdrop-blur: ;
44
- --tw-backdrop-brightness: ;
45
- --tw-backdrop-contrast: ;
46
- --tw-backdrop-grayscale: ;
47
- --tw-backdrop-hue-rotate: ;
48
- --tw-backdrop-invert: ;
49
- --tw-backdrop-opacity: ;
50
- --tw-backdrop-saturate: ;
51
- --tw-backdrop-sepia: ;
52
- --tw-contain-size: ;
53
- --tw-contain-layout: ;
54
- --tw-contain-paint: ;
55
- --tw-contain-style: ;
56
- }
57
- ::backdrop {
58
- --tw-border-spacing-x: 0;
59
- --tw-border-spacing-y: 0;
60
- --tw-translate-x: 0;
61
- --tw-translate-y: 0;
62
- --tw-rotate: 0;
63
- --tw-skew-x: 0;
64
- --tw-skew-y: 0;
65
- --tw-scale-x: 1;
66
- --tw-scale-y: 1;
67
- --tw-pan-x: ;
68
- --tw-pan-y: ;
69
- --tw-pinch-zoom: ;
70
- --tw-scroll-snap-strictness: proximity;
71
- --tw-gradient-from-position: ;
72
- --tw-gradient-via-position: ;
73
- --tw-gradient-to-position: ;
74
- --tw-ordinal: ;
75
- --tw-slashed-zero: ;
76
- --tw-numeric-figure: ;
77
- --tw-numeric-spacing: ;
78
- --tw-numeric-fraction: ;
79
- --tw-ring-inset: ;
80
- --tw-ring-offset-width: 0px;
81
- --tw-ring-offset-color: #fff;
82
- --tw-ring-color: rgb(59 130 246 / 0.5);
83
- --tw-ring-offset-shadow: 0 0 #0000;
84
- --tw-ring-shadow: 0 0 #0000;
85
- --tw-shadow: 0 0 #0000;
86
- --tw-shadow-colored: 0 0 #0000;
87
- --tw-blur: ;
88
- --tw-brightness: ;
89
- --tw-contrast: ;
90
- --tw-grayscale: ;
91
- --tw-hue-rotate: ;
92
- --tw-invert: ;
93
- --tw-saturate: ;
94
- --tw-sepia: ;
95
- --tw-drop-shadow: ;
96
- --tw-backdrop-blur: ;
97
- --tw-backdrop-brightness: ;
98
- --tw-backdrop-contrast: ;
99
- --tw-backdrop-grayscale: ;
100
- --tw-backdrop-hue-rotate: ;
101
- --tw-backdrop-invert: ;
102
- --tw-backdrop-opacity: ;
103
- --tw-backdrop-saturate: ;
104
- --tw-backdrop-sepia: ;
105
- --tw-contain-size: ;
106
- --tw-contain-layout: ;
107
- --tw-contain-paint: ;
108
- --tw-contain-style: ;
109
- }
110
- .container {
111
- width: 100%;
112
- }
113
- @media (min-width: 640px) {
114
- .container {
115
- max-width: 640px;
116
- }
117
- }
118
- @media (min-width: 768px) {
119
- .container {
120
- max-width: 768px;
121
- }
122
- }
123
- @media (min-width: 1024px) {
124
- .container {
125
- max-width: 1024px;
126
- }
127
- }
128
- @media (min-width: 1280px) {
129
- .container {
130
- max-width: 1280px;
131
- }
132
- }
133
- @media (min-width: 1536px) {
134
- .container {
135
- max-width: 1536px;
136
- }
137
- }
138
- .fixed {
139
- position: fixed;
140
- }
141
- .absolute {
142
- position: absolute;
143
- }
144
- .relative {
145
- position: relative;
146
- }
147
- .bottom-0 {
148
- bottom: 0px;
149
- }
150
- .left-0 {
151
- left: 0px;
152
- }
153
- .left-14 {
154
- left: 3.5rem;
155
- }
156
- .right-0 {
157
- right: 0px;
158
- }
159
- .right-16 {
160
- right: 4rem;
161
- }
162
- .top-0 {
163
- top: 0px;
164
- }
165
- .top-1\/2 {
166
- top: 50%;
167
- }
168
- .top-16 {
169
- top: 4rem;
170
- }
171
- .top-6 {
172
- top: 1.5rem;
173
- }
174
- .z-10 {
175
- z-index: 10;
176
- }
177
- .my-12 {
178
- margin-top: 3rem;
179
- margin-bottom: 3rem;
180
- }
181
- .mb-0 {
182
- margin-bottom: 0px;
183
- }
184
- .mb-12 {
185
- margin-bottom: 3rem;
186
- }
187
- .mb-6 {
188
- margin-bottom: 1.5rem;
189
- }
190
- .ml-4 {
191
- margin-left: 1rem;
192
- }
193
- .mr-6 {
194
- margin-right: 1.5rem;
195
- }
196
- .mt-4 {
197
- margin-top: 1rem;
198
- }
199
- .block {
200
- display: block;
201
- }
202
- .inline {
203
- display: inline;
204
- }
205
- .flex {
206
- display: flex;
207
- }
208
- .h-10 {
209
- height: 2.5rem;
210
- }
211
- .h-8 {
212
- height: 2rem;
213
- }
214
- .h-full {
215
- height: 100%;
216
- }
217
- .h-screen {
218
- height: 100vh;
219
- }
220
- .w-10\/12 {
221
- width: 83.333333%;
222
- }
223
- .w-\[650px\] {
224
- width: 650px;
225
- }
226
- .w-full {
227
- width: 100%;
228
- }
229
- .w-screen {
230
- width: 100vw;
231
- }
232
- .flex-1 {
233
- flex: 1 1 0%;
234
- }
235
- .flex-grow-0 {
236
- flex-grow: 0;
237
- }
238
- .-translate-y-1\/2 {
239
- --tw-translate-y: -50%;
240
- transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
241
- }
242
- .-translate-y-10 {
243
- --tw-translate-y: -2.5rem;
244
- transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
245
- }
246
- .flex-row {
247
- flex-direction: row;
248
- }
249
- .flex-col {
250
- flex-direction: column;
251
- }
252
- .items-center {
253
- align-items: center;
254
- }
255
- .justify-center {
256
- justify-content: center;
257
- }
258
- .justify-between {
259
- justify-content: space-between;
260
- }
261
- .gap-2 {
262
- gap: 0.5rem;
263
- }
264
- .overflow-hidden {
265
- overflow: hidden;
266
- }
267
- .bg-slate-50 {
268
- --tw-bg-opacity: 1;
269
- background-color: rgb(248 250 252 / var(--tw-bg-opacity));
270
- }
271
- .px-36 {
272
- padding-left: 9rem;
273
- padding-right: 9rem;
274
- }
275
- .px-6 {
276
- padding-left: 1.5rem;
277
- padding-right: 1.5rem;
278
- }
279
- .py-4 {
280
- padding-top: 1rem;
281
- padding-bottom: 1rem;
282
- }
283
- .text-start {
284
- text-align: start;
285
- }
286
- .text-end {
287
- text-align: end;
288
- }
289
- .filter {
290
- filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
291
- }
292
-
293
- /* src/components/layout/style.css */
294
- .expand {
295
- animation-duration: 0.2s;
296
- animation-name: expand;
297
- }
298
- @keyframes expand {
299
- 0%, 50% {
300
- width: 0;
301
- opacity: 0;
302
- }
303
- 75% {
304
- width: 100%;
305
- opacity: 0;
306
- }
307
- 100% {
308
- opacity: 1;
309
- }
310
- }
311
- /*# sourceMappingURL=index.css.map */
1
+ *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.bottom-0{bottom:0}.left-0{left:0}.left-14{left:3.5rem}.right-0{right:0}.right-16{right:4rem}.top-0{top:0}.top-1\/2{top:50%}.top-16{top:4rem}.top-6{top:1.5rem}.z-10{z-index:10}.my-12{margin-top:3rem;margin-bottom:3rem}.mb-0{margin-bottom:0}.mb-12{margin-bottom:3rem}.mb-6{margin-bottom:1.5rem}.ml-4{margin-left:1rem}.mr-6{margin-right:1.5rem}.mt-4{margin-top:1rem}.block{display:block}.inline{display:inline}.flex{display:flex}.h-10{height:2.5rem}.h-8{height:2rem}.h-full{height:100%}.h-screen{height:100vh}.w-10\/12{width:83.333333%}.w-\[650px\]{width:650px}.w-full{width:100%}.w-screen{width:100vw}.flex-1{flex:1 1 0%}.flex-grow-0{flex-grow:0}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-10{--tw-translate-y: -2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.overflow-hidden{overflow:hidden}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.px-36{padding-left:9rem;padding-right:9rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.text-start{text-align:start}.text-end{text-align:end}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.expand{animation-duration:.2s;animation-name:expand}@keyframes expand{0%,50%{width:0;opacity:0}75%{width:100%;opacity:0}to{opacity:1}}
package/lib/index.d.ts CHANGED
@@ -5,6 +5,7 @@ import { ParagraphProps } from 'antd/es/typography/Paragraph';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { FormInstance, MenuProps, ButtonProps, ModalProps, FormProps } from 'antd';
7
7
  import { TableProps } from 'antd/es/table';
8
+ import { AxiosHeaderValue, AxiosRequestConfig } from 'axios';
8
9
  import { ItemType, SubMenuType, MenuItemGroupType, MenuItemType } from 'antd/es/menu/interface';
9
10
  import { Merge } from 'ts-essentials';
10
11
  import * as zustand_middleware from 'zustand/middleware';
@@ -125,6 +126,7 @@ interface ContextProps {
125
126
  locale: Locale;
126
127
  usePermissionApiV2: boolean;
127
128
  gameApiV2: boolean;
129
+ signInPath?: string;
128
130
  interceptor?: {
129
131
  response?: (response: Response, opts: RequestOptions) => Promise<any>;
130
132
  };
@@ -174,21 +176,23 @@ interface InfiniteListExtra<Values> {
174
176
  children: ReactNode | ((form: FormInstance<Values>) => ReactNode);
175
177
  }
176
178
  interface InfiniteListProps<Item, Values, Response> extends Pick<TableProps<Item>, 'columns' | 'rowKey' | 'tableLayout' | 'expandable' | 'rowSelection' | 'bordered'> {
177
- action: string;
179
+ url: string;
178
180
  getRowKey: (response: Response) => any;
179
- getDataSource: (data: Response[] | undefined) => Item[];
181
+ getDataSource: (data: (Response | undefined)[] | undefined) => Item[];
180
182
  code?: string;
181
- headers?: Record<string, string> | ((form: FormInstance<Values>) => Record<string, string>);
183
+ headers?: {
184
+ [key: string]: AxiosHeaderValue;
185
+ } | ((form: FormInstance<Values>) => {
186
+ [key: string]: AxiosHeaderValue;
187
+ });
182
188
  renderForm?: (form: FormInstance<Values>) => ReactNode;
183
189
  transformArg: (values: Values, rowKey?: string) => Record<any, any>;
184
- hasMore?: (data: Response[] | undefined) => boolean;
185
- isGlobal?: boolean;
190
+ hasMore?: (data: (Response | undefined)[] | undefined) => boolean;
186
191
  extras?: InfiniteListExtra<Values>[];
187
192
  }
188
193
  declare const InfiniteList: <Item extends object, Values extends object | undefined = undefined, Response = any>(props: InfiniteListProps<Item, Values, Response>) => react_jsx_runtime.JSX.Element;
189
194
 
190
195
  type MenuItemType2 = Merge<MenuItemType, {
191
- code?: string;
192
196
  route?: string;
193
197
  }>;
194
198
  type SubMenuType2 = Merge<SubMenuType, {
@@ -288,7 +292,9 @@ declare const useGameStore: zustand.UseBoundStore<Omit<zustand.StoreApi<GameStat
288
292
  interface PermissionButtonProps extends ButtonProps {
289
293
  code: string | string[];
290
294
  showLoading?: boolean;
291
- isGlobal?: boolean;
295
+ headers?: {
296
+ [key: string]: AxiosHeaderValue;
297
+ };
292
298
  }
293
299
  declare const PermissionButton: FC<PropsWithChildren<PermissionButtonProps>>;
294
300
 
@@ -307,32 +313,35 @@ declare enum QueryListAction {
307
313
  Jump = 2,
308
314
  Init = 3
309
315
  }
310
- interface QueryListRef<Item, Value, Data> {
316
+ interface QueryListRef<Item, Values, Data> {
311
317
  data: Data | undefined;
312
318
  dataSource: Item[] | undefined;
313
- form: FormInstance<Value>;
319
+ form: FormInstance<Values>;
314
320
  }
315
- interface QueryListProps<Item extends AnyObject = AnyObject, Value = any, Data = any> extends Omit<TableProps<Item>, 'pagination' | 'dataSource' | 'loading' | 'footer'>, Pick<FilterFormWrapperProps, 'buttonsAlign' | 'showReset'> {
321
+ interface QueryListProps<Item extends AnyObject = AnyObject, Values = any, Data = any> extends Omit<TableProps<Item>, 'pagination' | 'dataSource' | 'loading' | 'footer'>, Pick<FilterFormWrapperProps, 'buttonsAlign' | 'showReset'> {
316
322
  code?: string;
317
- isGlobal?: boolean;
318
- route: string;
323
+ url: string;
319
324
  method?: 'GET' | 'POST';
320
325
  refreshInterval?: number;
321
326
  onePage?: boolean;
322
327
  defaultSize?: number;
323
- headers?: RequestOptions['headers'];
324
- body?: RequestOptions['body'] | ((payload: QueryListPayload<Value>) => RequestOptions['body']);
325
- params?: RequestOptions['params'] | ((payload: QueryListPayload<Value>) => RequestOptions['params']);
326
- tableExtra?: ReactNode | ((form: FormInstance<Value>, data?: Data) => ReactNode);
327
- form?: FormInstance<Value>;
328
- renderForm?: (form: FormInstance<Value>) => ReactElement;
329
- afterSuccess?: (action: QueryListAction, data: Data, form: FormInstance<Value>) => void;
328
+ headers?: {
329
+ [key: string]: AxiosHeaderValue;
330
+ } | ((form: FormInstance<Values>) => {
331
+ [key: string]: AxiosHeaderValue;
332
+ });
333
+ body?: AxiosRequestConfig['data'] | ((payload: QueryListPayload<Values>) => AxiosRequestConfig['data']);
334
+ params?: AxiosRequestConfig['params'] | ((payload: QueryListPayload<Values>) => AxiosRequestConfig['params']);
335
+ tableExtra?: ReactNode | ((form: FormInstance<Values>, data?: Data) => ReactNode);
336
+ form?: FormInstance<Values>;
337
+ renderForm?: (form: FormInstance<Values>) => ReactElement;
338
+ afterSuccess?: (action: QueryListAction, form: FormInstance<Values>, data?: Data) => void;
330
339
  getTotal?: (data: Data | undefined) => number | undefined;
331
- getDataSource?: (data: Data | undefined, form: FormInstance<Value>) => Item[] | undefined;
340
+ getDataSource?: (data: Data | undefined, form: FormInstance<Values>) => Item[] | undefined;
332
341
  footer?: (data: Data | undefined) => ReactNode;
333
342
  }
334
- declare const QueryList: <Item extends AnyObject = AnyObject, Value extends object | undefined = undefined, Data = ListResponse<Item>>(props: QueryListProps<Item, Value, Data> & {
335
- ref?: Ref<QueryListRef<Item, Value, Data>>;
343
+ declare const QueryList: <Item extends AnyObject = AnyObject, Values extends object | undefined = undefined, Data = ListResponse<Item>>(props: QueryListProps<Item, Values, Data> & {
344
+ ref?: Ref<QueryListRef<Item, Values, Data>>;
336
345
  }) => ReactElement;
337
346
 
338
347
  interface QueryListMutator {
@@ -366,7 +375,7 @@ interface UserWidgetProps {
366
375
  declare const UserWidget: FC<UserWidgetProps>;
367
376
 
368
377
  declare const SSO_URL = "https://idaas.ifunplus.cn/enduser/api/application/plugin_FunPlus/sso/v1";
369
- declare const APP_ID_HEADER_NAME = "App-ID";
378
+ declare const APP_ID_HEADER = "App-ID";
370
379
 
371
380
  interface ModalState {
372
381
  open: Map<number, boolean>;
@@ -384,7 +393,7 @@ interface UseModalProps extends Omit<ModalProps, 'open' | 'confirmLoading' | 'on
384
393
  onConfirm?: () => void | Promise<void>;
385
394
  }
386
395
  declare function useModal(props: UseModalProps): {
387
- uuid: number;
396
+ id: number;
388
397
  show: () => void;
389
398
  hide: () => void;
390
399
  modal: react_jsx_runtime.JSX.Element;
@@ -400,7 +409,7 @@ interface UseFormModalProps<Values extends AnyObject = AnyObject, ExtraValues =
400
409
  onConfirm?: (values: Values, extraValues: ExtraValues) => void | Promise<void>;
401
410
  }
402
411
  declare function useFormModal<Values extends AnyObject = AnyObject, ExtraValues = any>(props: UseFormModalProps<Values, ExtraValues>): {
403
- uuid: number;
412
+ id: number;
404
413
  show: ({ initialValues, extraValues, }?: {
405
414
  initialValues?: RecursivePartial<Values>;
406
415
  extraValues?: ExtraValues;
@@ -409,12 +418,17 @@ declare function useFormModal<Values extends AnyObject = AnyObject, ExtraValues
409
418
  modal: react_jsx_runtime.JSX.Element;
410
419
  };
411
420
 
412
- declare function usePermissions(codes: string[], options?: Omit<RequestOptions, 'method' | 'body'>): {
413
- data: Record<string, boolean> | undefined;
421
+ type PermissionCheckResult = {
422
+ has_all: true;
423
+ } | Record<string, boolean>;
424
+ declare function usePermissions(codes?: string[], config?: Omit<AxiosRequestConfig, 'method' | 'data' | 'url'>): {
425
+ data: Record<string, boolean>;
426
+ error: any;
427
+ mutate: swr.KeyedMutator<PermissionCheckResult | undefined>;
414
428
  isValidating: boolean;
415
429
  isLoading: boolean;
416
430
  };
417
- declare function usePermission(code: string | undefined, options?: Omit<RequestOptions, 'method' | 'body'>): {
431
+ declare function usePermission(code?: string, config?: Omit<AxiosRequestConfig, 'method' | 'data' | 'url'>): {
418
432
  accessible: boolean;
419
433
  isValidating: boolean;
420
434
  isLoading: boolean;
@@ -445,7 +459,6 @@ declare const useTokenStore: zustand.UseBoundStore<Omit<zustand.StoreApi<TokenSt
445
459
  }>>;
446
460
  };
447
461
  }>;
448
- declare function useTestToken(): swr.SWRResponse<RequestResponse<any>, any, any>;
449
462
 
450
463
  interface NotFoundProps {
451
464
  redirectUrl?: string;
@@ -466,4 +479,4 @@ declare const SignIn: FC<SignInProps>;
466
479
 
467
480
  declare const mixedStorage: StateStorage;
468
481
 
469
- export { APP_ID_HEADER_NAME, ContextProvider, type ContextState, DynamicTags, type DynamicTagsProps, ExpandableParagraph, type ExpandableParagraphProps, FilterFormWrapper, type FilterFormWrapperProps, type Game, Highlight, type HighlightProps, InfiniteList, type InfiniteListProps, Layout, type LayoutState, NavMenu, type NavMenuItem, NotFound, OperationLogList, PermissionButton, type PermissionButtonProps, QueryList, QueryListAction, type QueryListProps, type QueryListRef, RequestError, type RequestOptions, type RequestResponse, RequireGame, RequirePermission, type RequirePermissionProps, SSO_URL, SignIn, type TokenState, type UseFormModalProps, type UseModalOperation, type UseModalProps, UserWidget, type UserWidgetProps, contextStore, mixedStorage, _default as permissionRoutes, request, useFormModal, useGameStore, useLayoutStore, useModal, useModalStore, usePermission, usePermissions, useQueryListStore, useTestToken, useTokenStore, useToolkitsContext };
482
+ export { APP_ID_HEADER, ContextProvider, type ContextState, DynamicTags, type DynamicTagsProps, ExpandableParagraph, type ExpandableParagraphProps, FilterFormWrapper, type FilterFormWrapperProps, type Game, Highlight, type HighlightProps, InfiniteList, type InfiniteListProps, Layout, type LayoutState, NavMenu, type NavMenuItem, NotFound, OperationLogList, PermissionButton, type PermissionButtonProps, QueryList, QueryListAction, type QueryListProps, type QueryListRef, RequestError, type RequestOptions, type RequestResponse, RequireGame, RequirePermission, type RequirePermissionProps, SSO_URL, SignIn, type TokenState, type UseFormModalProps, type UseModalOperation, type UseModalProps, UserWidget, type UserWidgetProps, contextStore, mixedStorage, _default as permissionRoutes, request, useFormModal, useGameStore, useLayoutStore, useModal, useModalStore, usePermission, usePermissions, useQueryListStore, useTokenStore, useToolkitsContext };