react-toolkits 0.0.4 → 0.0.6
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/.turbo/turbo-build.log +6 -8
- package/CHANGELOG.md +12 -0
- package/dist/index.css +1 -233
- package/dist/index.d.mts +58 -34
- package/dist/index.esm.js +10 -3141
- package/package.json +1 -1
- package/src/components/FilterForm/index.tsx +1 -0
- package/src/components/QueryList/index.tsx +43 -49
- package/src/constants/index.ts +0 -2
- package/src/features/permission/components/{PermissionList.tsx → PermissionList/index.tsx} +1 -1
- package/src/features/permission/hooks/index.ts +13 -28
- package/src/hooks/index.ts +1 -1
- package/src/hooks/{use-fetcher.tsx → use-http-client.tsx} +16 -42
- package/src/hooks/use-permission.tsx +10 -4
- package/src/index.ts +1 -0
- package/src/layouts/Layout.tsx +75 -37
- package/src/layouts/NavBar.tsx +8 -21
- package/src/pages/Login/index.tsx +3 -0
- package/src/pages/NoMatch/index.tsx +27 -0
- package/src/pages/index.ts +2 -1
- package/src/pages/permission/{RoleList.tsx → RoleList/index.tsx} +24 -19
- package/src/pages/permission/{UserList.tsx → UserList/index.tsx} +15 -13
- package/src/stores/index.ts +1 -1
- package/src/stores/query-list.ts +61 -0
- package/src/types/index.ts +1 -18
- package/tsup.config.ts +2 -2
- package/dist/index.css.map +0 -1
- package/dist/index.esm.js.map +0 -1
- package/src/stores/queryTrigger.ts +0 -27
- /package/src/pages/permission/{RoleDetail.tsx → RoleDetail/index.tsx} +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> react-toolkits@0.0.
|
|
2
|
+
> react-toolkits@0.0.6 build /home/runner/work/everythingflow/everythingflow/packages/react-toolkits
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -11,10 +11,8 @@
|
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[34mDTS[39m Build start
|
|
13
13
|
[32mESM[39m [1mdist/512_orange_nobackground-L6MFCL6M.png [22m[32m9.49 KB[39m
|
|
14
|
-
[32mESM[39m [1mdist/index.css [22m[
|
|
15
|
-
[32mESM[39m [1mdist/index.
|
|
16
|
-
[32mESM[39m
|
|
17
|
-
[
|
|
18
|
-
[
|
|
19
|
-
[32mDTS[39m ⚡️ Build success in 7304ms
|
|
20
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m7.40 KB[39m
|
|
14
|
+
[32mESM[39m [1mdist/index.css [22m[32m3.79 KB[39m
|
|
15
|
+
[32mESM[39m [1mdist/index.esm.js [22m[32m61.16 KB[39m
|
|
16
|
+
[32mESM[39m ⚡️ Build success in 1419ms
|
|
17
|
+
[32mDTS[39m ⚡️ Build success in 7115ms
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m8.68 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.css
CHANGED
|
@@ -1,233 +1 @@
|
|
|
1
|
-
@import
|
|
2
|
-
|
|
3
|
-
/* src/styles/index.css */
|
|
4
|
-
*,
|
|
5
|
-
::before,
|
|
6
|
-
::after {
|
|
7
|
-
--tw-border-spacing-x: 0;
|
|
8
|
-
--tw-border-spacing-y: 0;
|
|
9
|
-
--tw-translate-x: 0;
|
|
10
|
-
--tw-translate-y: 0;
|
|
11
|
-
--tw-rotate: 0;
|
|
12
|
-
--tw-skew-x: 0;
|
|
13
|
-
--tw-skew-y: 0;
|
|
14
|
-
--tw-scale-x: 1;
|
|
15
|
-
--tw-scale-y: 1;
|
|
16
|
-
--tw-pan-x: ;
|
|
17
|
-
--tw-pan-y: ;
|
|
18
|
-
--tw-pinch-zoom: ;
|
|
19
|
-
--tw-scroll-snap-strictness: proximity;
|
|
20
|
-
--tw-gradient-from-position: ;
|
|
21
|
-
--tw-gradient-via-position: ;
|
|
22
|
-
--tw-gradient-to-position: ;
|
|
23
|
-
--tw-ordinal: ;
|
|
24
|
-
--tw-slashed-zero: ;
|
|
25
|
-
--tw-numeric-figure: ;
|
|
26
|
-
--tw-numeric-spacing: ;
|
|
27
|
-
--tw-numeric-fraction: ;
|
|
28
|
-
--tw-ring-inset: ;
|
|
29
|
-
--tw-ring-offset-width: 0px;
|
|
30
|
-
--tw-ring-offset-color: #fff;
|
|
31
|
-
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
32
|
-
--tw-ring-offset-shadow: 0 0 #0000;
|
|
33
|
-
--tw-ring-shadow: 0 0 #0000;
|
|
34
|
-
--tw-shadow: 0 0 #0000;
|
|
35
|
-
--tw-shadow-colored: 0 0 #0000;
|
|
36
|
-
--tw-blur: ;
|
|
37
|
-
--tw-brightness: ;
|
|
38
|
-
--tw-contrast: ;
|
|
39
|
-
--tw-grayscale: ;
|
|
40
|
-
--tw-hue-rotate: ;
|
|
41
|
-
--tw-invert: ;
|
|
42
|
-
--tw-saturate: ;
|
|
43
|
-
--tw-sepia: ;
|
|
44
|
-
--tw-drop-shadow: ;
|
|
45
|
-
--tw-backdrop-blur: ;
|
|
46
|
-
--tw-backdrop-brightness: ;
|
|
47
|
-
--tw-backdrop-contrast: ;
|
|
48
|
-
--tw-backdrop-grayscale: ;
|
|
49
|
-
--tw-backdrop-hue-rotate: ;
|
|
50
|
-
--tw-backdrop-invert: ;
|
|
51
|
-
--tw-backdrop-opacity: ;
|
|
52
|
-
--tw-backdrop-saturate: ;
|
|
53
|
-
--tw-backdrop-sepia: ;
|
|
54
|
-
}
|
|
55
|
-
::backdrop {
|
|
56
|
-
--tw-border-spacing-x: 0;
|
|
57
|
-
--tw-border-spacing-y: 0;
|
|
58
|
-
--tw-translate-x: 0;
|
|
59
|
-
--tw-translate-y: 0;
|
|
60
|
-
--tw-rotate: 0;
|
|
61
|
-
--tw-skew-x: 0;
|
|
62
|
-
--tw-skew-y: 0;
|
|
63
|
-
--tw-scale-x: 1;
|
|
64
|
-
--tw-scale-y: 1;
|
|
65
|
-
--tw-pan-x: ;
|
|
66
|
-
--tw-pan-y: ;
|
|
67
|
-
--tw-pinch-zoom: ;
|
|
68
|
-
--tw-scroll-snap-strictness: proximity;
|
|
69
|
-
--tw-gradient-from-position: ;
|
|
70
|
-
--tw-gradient-via-position: ;
|
|
71
|
-
--tw-gradient-to-position: ;
|
|
72
|
-
--tw-ordinal: ;
|
|
73
|
-
--tw-slashed-zero: ;
|
|
74
|
-
--tw-numeric-figure: ;
|
|
75
|
-
--tw-numeric-spacing: ;
|
|
76
|
-
--tw-numeric-fraction: ;
|
|
77
|
-
--tw-ring-inset: ;
|
|
78
|
-
--tw-ring-offset-width: 0px;
|
|
79
|
-
--tw-ring-offset-color: #fff;
|
|
80
|
-
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
81
|
-
--tw-ring-offset-shadow: 0 0 #0000;
|
|
82
|
-
--tw-ring-shadow: 0 0 #0000;
|
|
83
|
-
--tw-shadow: 0 0 #0000;
|
|
84
|
-
--tw-shadow-colored: 0 0 #0000;
|
|
85
|
-
--tw-blur: ;
|
|
86
|
-
--tw-brightness: ;
|
|
87
|
-
--tw-contrast: ;
|
|
88
|
-
--tw-grayscale: ;
|
|
89
|
-
--tw-hue-rotate: ;
|
|
90
|
-
--tw-invert: ;
|
|
91
|
-
--tw-saturate: ;
|
|
92
|
-
--tw-sepia: ;
|
|
93
|
-
--tw-drop-shadow: ;
|
|
94
|
-
--tw-backdrop-blur: ;
|
|
95
|
-
--tw-backdrop-brightness: ;
|
|
96
|
-
--tw-backdrop-contrast: ;
|
|
97
|
-
--tw-backdrop-grayscale: ;
|
|
98
|
-
--tw-backdrop-hue-rotate: ;
|
|
99
|
-
--tw-backdrop-invert: ;
|
|
100
|
-
--tw-backdrop-opacity: ;
|
|
101
|
-
--tw-backdrop-saturate: ;
|
|
102
|
-
--tw-backdrop-sepia: ;
|
|
103
|
-
}
|
|
104
|
-
.container {
|
|
105
|
-
width: 100%;
|
|
106
|
-
}
|
|
107
|
-
@media (min-width: 640px) {
|
|
108
|
-
.container {
|
|
109
|
-
max-width: 640px;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
@media (min-width: 768px) {
|
|
113
|
-
.container {
|
|
114
|
-
max-width: 768px;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
@media (min-width: 1024px) {
|
|
118
|
-
.container {
|
|
119
|
-
max-width: 1024px;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
@media (min-width: 1280px) {
|
|
123
|
-
.container {
|
|
124
|
-
max-width: 1280px;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
@media (min-width: 1536px) {
|
|
128
|
-
.container {
|
|
129
|
-
max-width: 1536px;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
.fixed {
|
|
133
|
-
position: fixed;
|
|
134
|
-
}
|
|
135
|
-
.absolute {
|
|
136
|
-
position: absolute;
|
|
137
|
-
}
|
|
138
|
-
.relative {
|
|
139
|
-
position: relative;
|
|
140
|
-
}
|
|
141
|
-
.-top-12 {
|
|
142
|
-
top: -3rem;
|
|
143
|
-
}
|
|
144
|
-
.left-0 {
|
|
145
|
-
left: 0px;
|
|
146
|
-
}
|
|
147
|
-
.right-0 {
|
|
148
|
-
right: 0px;
|
|
149
|
-
}
|
|
150
|
-
.top-1\/2 {
|
|
151
|
-
top: 50%;
|
|
152
|
-
}
|
|
153
|
-
.mb-6 {
|
|
154
|
-
margin-bottom: 1.5rem;
|
|
155
|
-
}
|
|
156
|
-
.ml-2 {
|
|
157
|
-
margin-left: 0.5rem;
|
|
158
|
-
}
|
|
159
|
-
.ml-64 {
|
|
160
|
-
margin-left: 16rem;
|
|
161
|
-
}
|
|
162
|
-
.inline {
|
|
163
|
-
display: inline;
|
|
164
|
-
}
|
|
165
|
-
.flex {
|
|
166
|
-
display: flex;
|
|
167
|
-
}
|
|
168
|
-
.hidden {
|
|
169
|
-
display: none;
|
|
170
|
-
}
|
|
171
|
-
.h-8 {
|
|
172
|
-
height: 2rem;
|
|
173
|
-
}
|
|
174
|
-
.h-screen {
|
|
175
|
-
height: 100vh;
|
|
176
|
-
}
|
|
177
|
-
.w-8 {
|
|
178
|
-
width: 2rem;
|
|
179
|
-
}
|
|
180
|
-
.w-full {
|
|
181
|
-
width: 100%;
|
|
182
|
-
}
|
|
183
|
-
.-translate-y-1\/2 {
|
|
184
|
-
--tw-translate-y: -50%;
|
|
185
|
-
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));
|
|
186
|
-
}
|
|
187
|
-
.transform {
|
|
188
|
-
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));
|
|
189
|
-
}
|
|
190
|
-
.items-end {
|
|
191
|
-
align-items: flex-end;
|
|
192
|
-
}
|
|
193
|
-
.items-center {
|
|
194
|
-
align-items: center;
|
|
195
|
-
}
|
|
196
|
-
.justify-end {
|
|
197
|
-
justify-content: flex-end;
|
|
198
|
-
}
|
|
199
|
-
.justify-center {
|
|
200
|
-
justify-content: center;
|
|
201
|
-
}
|
|
202
|
-
.overflow-auto {
|
|
203
|
-
overflow: auto;
|
|
204
|
-
}
|
|
205
|
-
.bg-gray-50 {
|
|
206
|
-
--tw-bg-opacity: 1;
|
|
207
|
-
background-color: rgb(249 250 251 / var(--tw-bg-opacity));
|
|
208
|
-
}
|
|
209
|
-
.p-6 {
|
|
210
|
-
padding: 1.5rem;
|
|
211
|
-
}
|
|
212
|
-
.px-6 {
|
|
213
|
-
padding-left: 1.5rem;
|
|
214
|
-
padding-right: 1.5rem;
|
|
215
|
-
}
|
|
216
|
-
.py-4 {
|
|
217
|
-
padding-top: 1rem;
|
|
218
|
-
padding-bottom: 1rem;
|
|
219
|
-
}
|
|
220
|
-
.text-center {
|
|
221
|
-
text-align: center;
|
|
222
|
-
}
|
|
223
|
-
.text-lg {
|
|
224
|
-
font-size: 1.125rem;
|
|
225
|
-
line-height: 1.75rem;
|
|
226
|
-
}
|
|
227
|
-
.font-bold {
|
|
228
|
-
font-weight: 700;
|
|
229
|
-
}
|
|
230
|
-
.filter {
|
|
231
|
-
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);
|
|
232
|
-
}
|
|
233
|
-
/*# sourceMappingURL=index.css.map */
|
|
1
|
+
@import"antd/dist/reset.css";*,: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: }::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: }.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}.-top-12{top:-3rem}.left-0{left:0}.right-0{right:0}.top-1\/2{top:50%}.mb-6{margin-bottom:1.5rem}.ml-2{margin-left:.5rem}.ml-64{margin-left:16rem}.inline{display:inline}.flex{display:flex}.hidden{display:none}.h-8{height:2rem}.h-screen{height:100vh}.w-8{width:2rem}.w-full{width:100%}.-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))}.transform{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))}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.overflow-auto{overflow:auto}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.p-6{padding:1.5rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-bold{font-weight:700}.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)}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { FC, PropsWithChildren, ForwardedRef, ReactElement, ReactNode } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { FormProps, FormInstance, ModalProps, ButtonProps } from 'antd';
|
|
5
5
|
import { Merge } from 'ts-essentials';
|
|
6
6
|
import { TableProps } from 'antd/es/table';
|
|
7
|
-
import { AxiosRequestConfig } from 'axios';
|
|
7
|
+
import { AxiosRequestConfig, AxiosInstance } from 'axios';
|
|
8
8
|
import * as zustand_middleware from 'zustand/middleware';
|
|
9
9
|
import * as zustand from 'zustand';
|
|
10
10
|
import { RouteObject } from 'react-router-dom';
|
|
@@ -53,7 +53,7 @@ type UseFormModalProps<T> = Merge<Omit<FormModalProps<T>, 'open' | 'onCancel' |
|
|
|
53
53
|
content: FormModalProps<T>['children'];
|
|
54
54
|
}>;
|
|
55
55
|
declare function useFormModal<T extends object>(props: UseFormModalProps<T>): {
|
|
56
|
-
Modal:
|
|
56
|
+
Modal: React.ReactPortal;
|
|
57
57
|
showModal: (options?: {
|
|
58
58
|
initialValues?: RecursivePartial<T> | undefined;
|
|
59
59
|
title?: FormModalProps<T>['title'];
|
|
@@ -72,51 +72,51 @@ interface PermissionButtonProps extends Omit<ButtonProps, 'disabled'> {
|
|
|
72
72
|
}
|
|
73
73
|
declare const PermissionButton: FC<PropsWithChildren<PermissionButtonProps>>;
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
type SubMenuType2 = Merge<SubMenuType, {
|
|
80
|
-
children?: ItemType2[];
|
|
81
|
-
}>;
|
|
82
|
-
type MenuItemGroupType2 = Merge<MenuItemGroupType, {
|
|
83
|
-
children?: ItemType2[];
|
|
84
|
-
}>;
|
|
85
|
-
type ItemType2 = MenuItemType2 | SubMenuType2 | MenuItemGroupType2 | MenuDividerType | null;
|
|
86
|
-
interface NavBarProps {
|
|
87
|
-
items: ItemType2[];
|
|
75
|
+
interface ListResponse<T> {
|
|
76
|
+
List: T[];
|
|
77
|
+
Page?: number;
|
|
78
|
+
Total: number;
|
|
88
79
|
}
|
|
89
|
-
|
|
90
80
|
type PaginationParams = {
|
|
91
81
|
page: number;
|
|
92
82
|
perPage: number;
|
|
93
83
|
};
|
|
94
84
|
|
|
95
85
|
type QueryListKey = Omit<AxiosRequestConfig, 'data' | 'params'>;
|
|
96
|
-
interface QueryListProps<Item, Values> extends Pick<TableProps<Item>, 'columns' | 'rowKey' | 'tableLayout' | 'expandable' | 'rowSelection' | 'bordered'>, Pick<FormProps<Values>, 'initialValues' | 'labelCol'> {
|
|
86
|
+
interface QueryListProps<Item, Values, Response> extends Pick<TableProps<Item>, 'columns' | 'rowKey' | 'tableLayout' | 'expandable' | 'rowSelection' | 'bordered'>, Pick<FormProps<Values>, 'initialValues' | 'labelCol'> {
|
|
97
87
|
swrKey: QueryListKey;
|
|
98
88
|
confirmText?: ReactNode;
|
|
99
89
|
code?: string;
|
|
100
90
|
renderForm?: (form: FormInstance<Values>) => ReactNode;
|
|
101
91
|
transformArg?: (arg: Values & PaginationParams) => unknown;
|
|
92
|
+
transformResponse?: (response: Response) => ListResponse<Item>;
|
|
102
93
|
}
|
|
103
|
-
declare const QueryList: <Item extends object, Values = {}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
94
|
+
declare const QueryList: <Item extends object, Values = {}, Response_1 = ListResponse<Item>>(props: QueryListProps<Item, Values, Response_1>) => react_jsx_runtime.JSX.Element;
|
|
95
|
+
|
|
96
|
+
type ShimmedAxiosInstance = Merge<AxiosInstance, {
|
|
97
|
+
request<T = unknown, D = unknown>(config: AxiosRequestConfig<D>): Promise<T>;
|
|
98
|
+
get<T = unknown, D = unknown>(url: string, config?: AxiosRequestConfig<D>): Promise<T>;
|
|
99
|
+
delete<T = unknown, D = unknown>(url: string, config?: AxiosRequestConfig<D>): Promise<T>;
|
|
100
|
+
head<T = unknown, D = unknown>(url: string, config?: AxiosRequestConfig<D>): Promise<T>;
|
|
101
|
+
post<T = unknown, D = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig<D>): Promise<T>;
|
|
102
|
+
put<T = unknown, D = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig<D>): Promise<T>;
|
|
103
|
+
patch<T = unknown, D = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig<D>): Promise<T>;
|
|
104
|
+
}>;
|
|
105
|
+
declare class HttpClientError extends Error {
|
|
106
|
+
code?: number;
|
|
107
107
|
skip: boolean;
|
|
108
|
-
constructor(message: string, code
|
|
108
|
+
constructor(message: string, code?: number, skip?: boolean);
|
|
109
109
|
}
|
|
110
|
-
declare function
|
|
110
|
+
declare function useHttpClient(): ShimmedAxiosInstance;
|
|
111
111
|
|
|
112
112
|
interface PermissionCheckResult {
|
|
113
113
|
[k: string]: boolean;
|
|
114
114
|
}
|
|
115
115
|
declare function usePermissions(codes: string[]): {
|
|
116
|
-
data: Record<string, boolean
|
|
117
|
-
isLoading:
|
|
116
|
+
data: Record<string, boolean>;
|
|
117
|
+
isLoading: false;
|
|
118
118
|
};
|
|
119
|
-
declare function usePermission(code
|
|
119
|
+
declare function usePermission(code: string): {
|
|
120
120
|
accessible: boolean;
|
|
121
121
|
isValidating: boolean;
|
|
122
122
|
};
|
|
@@ -166,18 +166,40 @@ declare const useTokenStore: zustand.UseBoundStore<Omit<zustand.StoreApi<TokenSt
|
|
|
166
166
|
};
|
|
167
167
|
}>;
|
|
168
168
|
|
|
169
|
-
type
|
|
170
|
-
interface
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
169
|
+
type RefreshFunction = (arg?: Partial<PaginationParams>) => void;
|
|
170
|
+
interface QueryListState {
|
|
171
|
+
data: Map<QueryListKey, {
|
|
172
|
+
pagination?: PaginationParams;
|
|
173
|
+
refresh?: RefreshFunction;
|
|
174
|
+
}>;
|
|
175
|
+
getPaginationData: (key: QueryListKey) => PaginationParams;
|
|
176
|
+
setPaginationData: (key: QueryListKey, pagination?: Partial<PaginationParams>) => void;
|
|
177
|
+
refresh: (key: QueryListKey, arg?: Partial<PaginationParams>) => void;
|
|
178
|
+
setRefresh: (key: QueryListKey, trigger: RefreshFunction) => void;
|
|
174
179
|
}
|
|
175
|
-
declare const
|
|
180
|
+
declare const useQueryListStore: zustand.UseBoundStore<zustand.StoreApi<QueryListState>>;
|
|
176
181
|
|
|
177
182
|
declare const Login: FC<PropsWithChildren>;
|
|
178
183
|
|
|
184
|
+
declare const NoMatch: () => react_jsx_runtime.JSX.Element;
|
|
185
|
+
|
|
179
186
|
declare const routes: RouteObject;
|
|
180
187
|
|
|
188
|
+
type MenuItemType2 = Merge<MenuItemType, {
|
|
189
|
+
code /** 权限编号 **/?: string;
|
|
190
|
+
route /** 前端路由地址 **/?: string;
|
|
191
|
+
}>;
|
|
192
|
+
type SubMenuType2 = Merge<SubMenuType, {
|
|
193
|
+
children?: ItemType2[];
|
|
194
|
+
}>;
|
|
195
|
+
type MenuItemGroupType2 = Merge<MenuItemGroupType, {
|
|
196
|
+
children?: ItemType2[];
|
|
197
|
+
}>;
|
|
198
|
+
type ItemType2 = MenuItemType2 | SubMenuType2 | MenuItemGroupType2 | MenuDividerType | null;
|
|
199
|
+
interface NavBarProps {
|
|
200
|
+
items: ItemType2[];
|
|
201
|
+
}
|
|
202
|
+
|
|
181
203
|
interface LayoutProps {
|
|
182
204
|
title?: ReactNode;
|
|
183
205
|
items: ItemType2[];
|
|
@@ -185,4 +207,6 @@ interface LayoutProps {
|
|
|
185
207
|
}
|
|
186
208
|
declare const Layout: FC<PropsWithChildren<LayoutProps>>;
|
|
187
209
|
|
|
188
|
-
|
|
210
|
+
declare const SSO_URL = "https://idaas.ifunplus.cn/enduser/api/application/plugin_FunPlus/sso/v1";
|
|
211
|
+
|
|
212
|
+
export { DynamicTags, DynamicTagsProps, FilterForm, FilterFormProps, FormModal, FormModalProps, FormModalRef, Highlight, HighlightTextsProps, HttpClientError, ItemType2, Layout, LayoutProps, Login, MenuState, NavBarProps, NoMatch, PermissionButton, PermissionButtonProps, PermissionCheckResult, QueryList, QueryListKey, QueryListProps, QueryListState, SSO_URL, TokenState, UseFormModalProps, routes as permission, useFormModal, useHttpClient, useMenuStore, usePermission, usePermissions, useQueryListStore, useTokenStore };
|