react-toolkits 0.0.5 → 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.
@@ -1,5 +1,5 @@
1
1
 
2
- > react-toolkits@0.0.5 build /home/runner/work/everythingflow/everythingflow/packages/react-toolkits
2
+ > react-toolkits@0.0.6 build /home/runner/work/everythingflow/everythingflow/packages/react-toolkits
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -11,10 +11,8 @@
11
11
  ESM Build start
12
12
  DTS Build start
13
13
  ESM dist/512_orange_nobackground-L6MFCL6M.png 9.49 KB
14
- ESM dist/index.css 4.51 KB
15
- ESM dist/index.css.map 7.65 KB
16
- ESM dist/index.esm.js 116.47 KB
17
- ESM dist/index.esm.js.map 161.28 KB
18
- ESM ⚡️ Build success in 1983ms
19
- DTS ⚡️ Build success in 8777ms
20
- DTS dist/index.d.mts 8.28 KB
14
+ ESM dist/index.css 3.79 KB
15
+ ESM dist/index.esm.js 61.16 KB
16
+ ESM ⚡️ Build success in 1419ms
17
+ DTS ⚡️ Build success in 7115ms
18
+ DTS dist/index.d.mts 8.68 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # react-toolkits
2
2
 
3
+ ## 0.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 90f2dd0: release react-toolkits
8
+
3
9
  ## 0.0.5
4
10
 
5
11
  ### Patch Changes
package/dist/index.css CHANGED
@@ -1,233 +1 @@
1
- @import "antd/dist/reset.css";
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
@@ -72,20 +72,26 @@ interface PermissionButtonProps extends Omit<ButtonProps, 'disabled'> {
72
72
  }
73
73
  declare const PermissionButton: FC<PropsWithChildren<PermissionButtonProps>>;
74
74
 
75
+ interface ListResponse<T> {
76
+ List: T[];
77
+ Page?: number;
78
+ Total: number;
79
+ }
75
80
  type PaginationParams = {
76
81
  page: number;
77
82
  perPage: number;
78
83
  };
79
84
 
80
85
  type QueryListKey = Omit<AxiosRequestConfig, 'data' | 'params'>;
81
- 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'> {
82
87
  swrKey: QueryListKey;
83
88
  confirmText?: ReactNode;
84
89
  code?: string;
85
90
  renderForm?: (form: FormInstance<Values>) => ReactNode;
86
91
  transformArg?: (arg: Values & PaginationParams) => unknown;
92
+ transformResponse?: (response: Response) => ListResponse<Item>;
87
93
  }
88
- declare const QueryList: <Item extends object, Values = {}>(props: QueryListProps<Item, Values>) => react_jsx_runtime.JSX.Element;
94
+ declare const QueryList: <Item extends object, Values = {}, Response_1 = ListResponse<Item>>(props: QueryListProps<Item, Values, Response_1>) => react_jsx_runtime.JSX.Element;
89
95
 
90
96
  type ShimmedAxiosInstance = Merge<AxiosInstance, {
91
97
  request<T = unknown, D = unknown>(config: AxiosRequestConfig<D>): Promise<T>;
@@ -160,13 +166,18 @@ declare const useTokenStore: zustand.UseBoundStore<Omit<zustand.StoreApi<TokenSt
160
166
  };
161
167
  }>;
162
168
 
163
- type TriggerFunction = (arg?: Partial<PaginationParams>) => void;
164
- interface QueryTriggerState {
165
- triggers: Map<QueryListKey, TriggerFunction>;
166
- setTrigger: (key: QueryListKey, trigger: TriggerFunction) => void;
167
- trigger: (key: QueryListKey, arg?: Partial<PaginationParams>) => void;
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;
168
179
  }
169
- declare const useQueryTriggerStore: zustand.UseBoundStore<zustand.StoreApi<QueryTriggerState>>;
180
+ declare const useQueryListStore: zustand.UseBoundStore<zustand.StoreApi<QueryListState>>;
170
181
 
171
182
  declare const Login: FC<PropsWithChildren>;
172
183
 
@@ -198,4 +209,4 @@ declare const Layout: FC<PropsWithChildren<LayoutProps>>;
198
209
 
199
210
  declare const SSO_URL = "https://idaas.ifunplus.cn/enduser/api/application/plugin_FunPlus/sso/v1";
200
211
 
201
- export { DynamicTags, DynamicTagsProps, FilterForm, FilterFormProps, FormModal, FormModalProps, FormModalRef, Highlight, HighlightTextsProps, HttpClientError, ItemType2, Layout, LayoutProps, Login, MenuState, NavBarProps, NoMatch, PermissionButton, PermissionButtonProps, PermissionCheckResult, QueryList, QueryListKey, QueryListProps, QueryTriggerState, SSO_URL, TokenState, UseFormModalProps, routes as permission, useFormModal, useHttpClient, useMenuStore, usePermission, usePermissions, useQueryTriggerStore, useTokenStore };
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 };