react-toolkits 0.8.89 → 0.8.90
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 +6 -0
- package/lib/index.css +1 -2
- package/lib/index.d.ts +17 -25
- package/lib/index.js +10 -12
- package/locales/en_GB.js +0 -2
- package/locales/{index-Yb6kmiRt.d.ts → index.d.ts} +1 -1
- package/locales/ja_JP.js +0 -2
- package/locales/ko_KR.js +0 -2
- package/locales/zh_CN.js +0 -2
- package/package.json +26 -26
- package/lib/index.css.map +0 -1
- package/lib/index.js.map +0 -1
- package/locales/en_GB.d.ts +0 -5
- package/locales/en_GB.js.map +0 -1
- package/locales/ja_JP.d.ts +0 -5
- package/locales/ja_JP.js.map +0 -1
- package/locales/ko_KR.d.ts +0 -5
- package/locales/ko_KR.js.map +0 -1
- package/locales/zh_CN.d.ts +0 -5
- package/locales/zh_CN.js.map +0 -1
package/CHANGELOG.md
CHANGED
package/lib/index.css
CHANGED
|
@@ -1,2 +1 @@
|
|
|
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: }::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}.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:-0px}.-mb-0\.5{margin-bottom:-.125rem}.mb-12{margin-bottom:3rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-2{margin-left:.5rem}.ml-64{margin-left:16rem}.ml-8{margin-left:2rem}.mr-2{margin-right:.5rem}.mt-2{margin-top:.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}.max-h-32{max-height:8rem}.w-10\/12{width:83.333333%}.w-12{width:3rem}.w-8{width:2rem}.w-\[18px\]{width:18px}.w-\[650px\]{width:650px}.w-full{width:100%}.w-screen{width:100vw}.flex-1{flex:1 1 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-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.overflow-auto{overflow:auto}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.p-6{padding:1.5rem}.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}.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)}
|
|
2
|
-
/*# 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:-0px}.-mb-0\.5{margin-bottom:-.125rem}.mb-12{margin-bottom:3rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-2{margin-left:.5rem}.ml-64{margin-left:16rem}.ml-8{margin-left:2rem}.mr-2{margin-right:.5rem}.mt-2{margin-top:.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}.max-h-32{max-height:8rem}.w-10\/12{width:83.333333%}.w-12{width:3rem}.w-8{width:2rem}.w-\[18px\]{width:18px}.w-\[650px\]{width:650px}.w-full{width:100%}.w-screen{width:100vw}.flex-1{flex:1 1 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-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.overflow-auto{overflow:auto}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.p-6{padding:1.5rem}.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}.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/lib/index.d.ts
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode, Key, FC, PropsWithChildren, Ref, ReactElement, ComponentType } from 'react';
|
|
4
|
-
import * as
|
|
4
|
+
import * as zustand from 'zustand';
|
|
5
5
|
import * as zustand_middleware from 'zustand/middleware';
|
|
6
6
|
import { StateStorage } from 'zustand/middleware';
|
|
7
|
-
import { MenuDividerType, MenuItemType, SubMenuType, MenuItemGroupType } from 'antd/es/menu/
|
|
7
|
+
import { MenuDividerType, MenuItemType, SubMenuType, MenuItemGroupType } from 'antd/es/menu/interface';
|
|
8
8
|
import { Merge } from 'ts-essentials';
|
|
9
9
|
import { FormInstance, ButtonProps, ModalProps, FormProps } from 'antd';
|
|
10
10
|
import { TableProps } from 'antd/es/table';
|
|
11
|
+
import { AnyObject } from 'antd/es/_util/type';
|
|
11
12
|
import { MutatorCallback, MutatorOptions } from 'swr/_internal';
|
|
12
13
|
import { SWRConfiguration } from 'swr';
|
|
13
14
|
|
|
14
|
-
interface ListResponse<T = any> {
|
|
15
|
-
list: T[];
|
|
16
|
-
total: number;
|
|
17
|
-
}
|
|
18
15
|
type Locale = {
|
|
19
16
|
global: {
|
|
20
17
|
noEntitlement: string;
|
|
@@ -230,7 +227,7 @@ interface InfiniteListProps<Item, Values, Response> extends Pick<TableProps<Item
|
|
|
230
227
|
isGlobal?: boolean;
|
|
231
228
|
extras?: InfiniteListExtra<Values>[];
|
|
232
229
|
}
|
|
233
|
-
declare const InfiniteList: <Item extends object, Values extends object | undefined = undefined,
|
|
230
|
+
declare const InfiniteList: <Item extends object, Values extends object | undefined = undefined, Response = any>(props: InfiniteListProps<Item, Values, Response>) => react_jsx_runtime.JSX.Element;
|
|
234
231
|
|
|
235
232
|
declare const Layout: FC<PropsWithChildren>;
|
|
236
233
|
|
|
@@ -277,12 +274,12 @@ interface QueryListDataType<Item> {
|
|
|
277
274
|
dataSource: Item[];
|
|
278
275
|
total: number;
|
|
279
276
|
}
|
|
280
|
-
interface QueryListRef<Item
|
|
277
|
+
interface QueryListRef<Item, Values, Response> {
|
|
281
278
|
data: QueryListDataType<Item>;
|
|
282
279
|
internalForm: FormInstance<Values>;
|
|
283
280
|
originalData: Response | undefined;
|
|
284
281
|
}
|
|
285
|
-
interface QueryListProps<Item =
|
|
282
|
+
interface QueryListProps<Item extends AnyObject = AnyObject, Values = any, Response = any> extends Omit<TableProps<Item>, 'pagination' | 'dataSource' | 'loading'> {
|
|
286
283
|
code?: string;
|
|
287
284
|
isGlobal?: boolean;
|
|
288
285
|
action: string;
|
|
@@ -299,13 +296,12 @@ interface QueryListProps<Item = any, Values = any, Response = any> extends Pick<
|
|
|
299
296
|
form: FormInstance<Values>;
|
|
300
297
|
data: Response | undefined;
|
|
301
298
|
}) => ReactNode;
|
|
302
|
-
onTableChange?: TableProps<Item>['onChange'];
|
|
303
299
|
afterSuccess?: (action: QueryListAction, data: QueryListDataType<Item>) => void;
|
|
304
300
|
getTotal?: (response: Response) => number;
|
|
305
301
|
getDataSource?: (response: Response, form: FormInstance<Values>) => Item[];
|
|
306
302
|
}
|
|
307
|
-
declare const QueryList: <Item extends
|
|
308
|
-
ref?: Ref<QueryListRef<Item, Values,
|
|
303
|
+
declare const QueryList: <Item extends AnyObject, Values, Response>(props: QueryListProps<Item, Values, Response> & {
|
|
304
|
+
ref?: Ref<QueryListRef<Item, Values, Response>>;
|
|
309
305
|
}) => ReactElement;
|
|
310
306
|
|
|
311
307
|
declare const UserWidget: FC;
|
|
@@ -344,8 +340,8 @@ interface UseFormModalProps<Values, ExtraValues> extends Omit<UseModalProps, 'af
|
|
|
344
340
|
declare function useFormModal<Values, ExtraValues extends NonNullable<unknown> = NonNullable<unknown>>(props: UseFormModalProps<Values, ExtraValues>): {
|
|
345
341
|
uuid: number;
|
|
346
342
|
show: ({ initialValues, extraValues, }?: {
|
|
347
|
-
initialValues?: RecursivePartial<Values
|
|
348
|
-
extraValues?: ExtraValues
|
|
343
|
+
initialValues?: RecursivePartial<Values>;
|
|
344
|
+
extraValues?: ExtraValues;
|
|
349
345
|
}) => void;
|
|
350
346
|
hide: () => void;
|
|
351
347
|
modal: react_jsx_runtime.JSX.Element;
|
|
@@ -368,14 +364,6 @@ declare function usePermission(code: string | undefined, isGlobal?: boolean, con
|
|
|
368
364
|
isLoading: boolean;
|
|
369
365
|
};
|
|
370
366
|
|
|
371
|
-
declare const NotFound: () => react_jsx_runtime.JSX.Element;
|
|
372
|
-
|
|
373
|
-
declare const OperationLogList: FC;
|
|
374
|
-
|
|
375
|
-
declare const SignIn: FC;
|
|
376
|
-
|
|
377
|
-
declare const Permission: () => react_jsx_runtime.JSX.Element;
|
|
378
|
-
|
|
379
367
|
interface UserInfo {
|
|
380
368
|
authorityId: string;
|
|
381
369
|
exp: number;
|
|
@@ -404,8 +392,12 @@ declare const useTokenStore: zustand.UseBoundStore<Omit<zustand.StoreApi<TokenSt
|
|
|
404
392
|
declare function useTokenValidation(skip?: boolean): void;
|
|
405
393
|
|
|
406
394
|
declare const withLayout: (WrappedComponent: ComponentType, props?: Partial<ContextState>) => () => react_jsx_runtime.JSX.Element;
|
|
407
|
-
declare function withBaseRoutes(routes: ReactNode, props?: Partial<Omit<ContextState, 'hideGameSelect'>>): () => react_jsx_runtime.JSX.Element;
|
|
408
395
|
|
|
409
396
|
declare const mixedStorage: StateStorage;
|
|
410
397
|
|
|
411
|
-
|
|
398
|
+
declare const SignIn: react.LazyExoticComponent<react.FC>;
|
|
399
|
+
declare const NotFound: react.LazyExoticComponent<() => react_jsx_runtime.JSX.Element>;
|
|
400
|
+
declare const OperationLogList: react.LazyExoticComponent<react.FC>;
|
|
401
|
+
declare const PermissionRoutes: () => react_jsx_runtime.JSX.Element;
|
|
402
|
+
|
|
403
|
+
export { ContextProvider, type ContextState, DynamicTags, type DynamicTagsProps, FilterFormWrapper, type FilterFormWrapperProps, type Game, GameSelect, type GameState, Highlight, type HighlightTextsProps, InfiniteList, type InfiniteListProps, Layout, NavMenu, type NavMenuItem, NotFound, OperationLogList, PermissionButton, type PermissionButtonProps, PermissionGuard, type PermissionGuardProps, PermissionRoutes, QueryList, QueryListAction, type QueryListProps, type QueryListRef, RequestError, type RequestOptions, type RequestResponse, SignIn, type TokenState, type UseFormModalProps, UserWidget, contextStore, mixedStorage, request, useFormModal, useGameStore, useModal, useModalStore, usePermission, usePermissions, useQueryListStore, useTokenStore, useTokenValidation, useToolkitsContext, useTranslation, withLayout };
|