react-toolkits 2.9.5 → 2.9.7
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 +12 -0
- package/lib/index.css +0 -6
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +12 -17
- package/lib/index.js +24 -29
- package/lib/index.js.map +1 -1
- package/locale/en_GB.js +1 -1
- package/locale/en_GB.js.map +1 -1
- package/locale/hooks.js.map +1 -1
- package/locale/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/lib/index.css
CHANGED
|
@@ -184,9 +184,6 @@
|
|
|
184
184
|
.mb-12 {
|
|
185
185
|
margin-bottom: 3rem;
|
|
186
186
|
}
|
|
187
|
-
.mb-4 {
|
|
188
|
-
margin-bottom: 1rem;
|
|
189
|
-
}
|
|
190
187
|
.mb-6 {
|
|
191
188
|
margin-bottom: 1.5rem;
|
|
192
189
|
}
|
|
@@ -196,9 +193,6 @@
|
|
|
196
193
|
.mr-6 {
|
|
197
194
|
margin-right: 1.5rem;
|
|
198
195
|
}
|
|
199
|
-
.mt-2 {
|
|
200
|
-
margin-top: 0.5rem;
|
|
201
|
-
}
|
|
202
196
|
.mt-4 {
|
|
203
197
|
margin-top: 1rem;
|
|
204
198
|
}
|
package/lib/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/styles/index.css","../src/components/layout/style.css"],"sourcesContent":["*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: \n}\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: \n}\n.container {\n width: 100%\n}\n@media (min-width: 640px) {\n .container {\n max-width: 640px\n }\n}\n@media (min-width: 768px) {\n .container {\n max-width: 768px\n }\n}\n@media (min-width: 1024px) {\n .container {\n max-width: 1024px\n }\n}\n@media (min-width: 1280px) {\n .container {\n max-width: 1280px\n }\n}\n@media (min-width: 1536px) {\n .container {\n max-width: 1536px\n }\n}\n.fixed {\n position: fixed\n}\n.absolute {\n position: absolute\n}\n.relative {\n position: relative\n}\n.bottom-0 {\n bottom: 0px\n}\n.left-0 {\n left: 0px\n}\n.left-14 {\n left: 3.5rem\n}\n.right-0 {\n right: 0px\n}\n.right-16 {\n right: 4rem\n}\n.top-0 {\n top: 0px\n}\n.top-1\\/2 {\n top: 50%\n}\n.top-16 {\n top: 4rem\n}\n.top-6 {\n top: 1.5rem\n}\n.z-10 {\n z-index: 10\n}\n.my-12 {\n margin-top: 3rem;\n margin-bottom: 3rem\n}\n.mb-0 {\n margin-bottom: 0px\n}\n.mb-12 {\n margin-bottom: 3rem\n}\n.mb-
|
|
1
|
+
{"version":3,"sources":["../src/styles/index.css","../src/components/layout/style.css"],"sourcesContent":["*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: \n}\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: \n}\n.container {\n width: 100%\n}\n@media (min-width: 640px) {\n .container {\n max-width: 640px\n }\n}\n@media (min-width: 768px) {\n .container {\n max-width: 768px\n }\n}\n@media (min-width: 1024px) {\n .container {\n max-width: 1024px\n }\n}\n@media (min-width: 1280px) {\n .container {\n max-width: 1280px\n }\n}\n@media (min-width: 1536px) {\n .container {\n max-width: 1536px\n }\n}\n.fixed {\n position: fixed\n}\n.absolute {\n position: absolute\n}\n.relative {\n position: relative\n}\n.bottom-0 {\n bottom: 0px\n}\n.left-0 {\n left: 0px\n}\n.left-14 {\n left: 3.5rem\n}\n.right-0 {\n right: 0px\n}\n.right-16 {\n right: 4rem\n}\n.top-0 {\n top: 0px\n}\n.top-1\\/2 {\n top: 50%\n}\n.top-16 {\n top: 4rem\n}\n.top-6 {\n top: 1.5rem\n}\n.z-10 {\n z-index: 10\n}\n.my-12 {\n margin-top: 3rem;\n margin-bottom: 3rem\n}\n.mb-0 {\n margin-bottom: 0px\n}\n.mb-12 {\n margin-bottom: 3rem\n}\n.mb-6 {\n margin-bottom: 1.5rem\n}\n.ml-4 {\n margin-left: 1rem\n}\n.mr-6 {\n margin-right: 1.5rem\n}\n.mt-4 {\n margin-top: 1rem\n}\n.block {\n display: block\n}\n.inline {\n display: inline\n}\n.flex {\n display: flex\n}\n.h-10 {\n height: 2.5rem\n}\n.h-8 {\n height: 2rem\n}\n.h-full {\n height: 100%\n}\n.h-screen {\n height: 100vh\n}\n.w-10\\/12 {\n width: 83.333333%\n}\n.w-\\[650px\\] {\n width: 650px\n}\n.w-full {\n width: 100%\n}\n.w-screen {\n width: 100vw\n}\n.flex-1 {\n flex: 1 1 0%\n}\n.flex-grow-0 {\n flex-grow: 0\n}\n.-translate-y-1\\/2 {\n --tw-translate-y: -50%;\n 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))\n}\n.-translate-y-10 {\n --tw-translate-y: -2.5rem;\n 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))\n}\n.flex-row {\n flex-direction: row\n}\n.flex-col {\n flex-direction: column\n}\n.items-center {\n align-items: center\n}\n.justify-center {\n justify-content: center\n}\n.justify-between {\n justify-content: space-between\n}\n.gap-2 {\n gap: 0.5rem\n}\n.overflow-hidden {\n overflow: hidden\n}\n.bg-slate-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(248 250 252 / var(--tw-bg-opacity))\n}\n.px-36 {\n padding-left: 9rem;\n padding-right: 9rem\n}\n.px-6 {\n padding-left: 1.5rem;\n padding-right: 1.5rem\n}\n.py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem\n}\n.text-start {\n text-align: start\n}\n.text-end {\n text-align: end\n}\n.filter {\n 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)\n}\n","\n.expand {\n animation-duration: 0.2s;\n animation-name: expand;\n}\n\n@keyframes expand {\n 0%, 50% {\n width: 0;\n opacity: 0;\n }\n\n 75% {\n width: 100%;\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n"],"mappings":";AAAA;AAAG;AAAU;AACT,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE;AAClC,2BAAyB,EAAE,EAAE;AAC7B,oBAAkB,EAAE,EAAE;AACtB,eAAa,EAAE,EAAE;AACjB,uBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACJ;AACA;AACI,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE;AAClC,2BAAyB,EAAE,EAAE;AAC7B,oBAAkB,EAAE,EAAE;AACtB,eAAa,EAAE,EAAE;AACjB,uBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACJ;AACA,CAAC;AACG,SAAO;AACX;AACA,OAAO,CAAC,SAAS,EAAE;AACf,GAJH;AAKO,eAAW;AACf;AACJ;AACA,OAAO,CAAC,SAAS,EAAE;AACf,GATH;AAUO,eAAW;AACf;AACJ;AACA,OAAO,CAAC,SAAS,EAAE;AACf,GAdH;AAeO,eAAW;AACf;AACJ;AACA,OAAO,CAAC,SAAS,EAAE;AACf,GAnBH;AAoBO,eAAW;AACf;AACJ;AACA,OAAO,CAAC,SAAS,EAAE;AACf,GAxBH;AAyBO,eAAW;AACf;AACJ;AACA,CAAC;AACG,YAAU;AACd;AACA,CAAC;AACG,YAAU;AACd;AACA,CAAC;AACG,YAAU;AACd;AACA,CAAC;AACG,UAAQ;AACZ;AACA,CAAC;AACG,QAAM;AACV;AACA,CAAC;AACG,QAAM;AACV;AACA,CAAC;AACG,SAAO;AACX;AACA,CAAC;AACG,SAAO;AACX;AACA,CAAC;AACG,OAAK;AACT;AACA,CAAC;AACG,OAAK;AACT;AACA,CAAC;AACG,OAAK;AACT;AACA,CAAC;AACG,OAAK;AACT;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,cAAY;AACZ,iBAAe;AACnB;AACA,CAAC;AACG,iBAAe;AACnB;AACA,CAAC;AACG,iBAAe;AACnB;AACA,CAAC;AACG,iBAAe;AACnB;AACA,CAAC;AACG,eAAa;AACjB;AACA,CAAC;AACG,gBAAc;AAClB;AACA,CAAC;AACG,cAAY;AAChB;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,UAAQ;AACZ;AACA,CAAC;AACG,UAAQ;AACZ;AACA,CAAC;AACG,UAAQ;AACZ;AACA,CAAC;AACG,UAAQ;AACZ;AACA,CAAC;AACG,SAAO;AACX;AACA,CAAC;AACG,SAAO;AACX;AACA,CAAC;AACG,SAAO;AACX;AACA,CAAC;AACG,SAAO;AACX;AACA,CAAC;AACG,QAAM,EAAE,EAAE;AACd;AACA,CAAC;AACG,aAAW;AACf;AACA,CAAC;AACG,oBAAkB;AAClB,aAAW,UAAU,IAAI,iBAAiB,EAAE,IAAI,mBAAmB,OAAO,IAAI,cAAc,MAAM,IAAI,cAAc,MAAM,IAAI,cAAc,OAAO,IAAI,eAAe,OAAO,IAAI;AACrL;AACA,CAAC;AACG,oBAAkB;AAClB,aAAW,UAAU,IAAI,iBAAiB,EAAE,IAAI,mBAAmB,OAAO,IAAI,cAAc,MAAM,IAAI,cAAc,MAAM,IAAI,cAAc,OAAO,IAAI,eAAe,OAAO,IAAI;AACrL;AACA,CAAC;AACG,kBAAgB;AACpB;AACA,CAAC;AACG,kBAAgB;AACpB;AACA,CAAC;AACG,eAAa;AACjB;AACA,CAAC;AACG,mBAAiB;AACrB;AACA,CAAC;AACG,mBAAiB;AACrB;AACA,CAAC;AACG,OAAK;AACT;AACA,CAAC;AACG,YAAU;AACd;AACA,CAAC;AACG,mBAAiB;AACjB,oBAAkB,IAAI,IAAI,IAAI,IAAI,EAAE,IAAI;AAC5C;AACA,CAAC;AACG,gBAAc;AACd,iBAAe;AACnB;AACA,CAAC;AACG,gBAAc;AACd,iBAAe;AACnB;AACA,CAAC;AACG,eAAa;AACb,kBAAgB;AACpB;AACA,CAAC;AACG,cAAY;AAChB;AACA,CAAC;AACG,cAAY;AAChB;AACA,CAAC;AACG,UAAQ,IAAI,WAAW,IAAI,iBAAiB,IAAI,eAAe,IAAI,gBAAgB,IAAI,iBAAiB,IAAI,aAAa,IAAI,eAAe,IAAI,YAAY,IAAI;AACpK;;;AC9RA,CAAC;AACC,sBAAoB;AACpB,kBAAgB;AAClB;AAEA,WALC;AAMC;AACE,WAAO;AACP,aAAS;AACX;AAEA;AACE,WAAO;AACP,aAAS;AACX;AAEA;AACE,aAAS;AACX;AACF;","names":[]}
|
package/lib/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as react from 'react';
|
|
|
3
3
|
import { FC, PropsWithChildren, Key, ReactNode, ReactElement, Ref } from 'react';
|
|
4
4
|
import { ParagraphProps } from 'antd/es/typography/Paragraph';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
-
import { FormInstance, ButtonProps, ModalProps, FormProps } from 'antd';
|
|
6
|
+
import { FormInstance, MenuProps, ButtonProps, ModalProps, FormProps } from 'antd';
|
|
7
7
|
import { TableProps } from 'antd/es/table';
|
|
8
8
|
import { MenuDividerType, MenuItemType, SubMenuType, MenuItemGroupType } from 'antd/es/menu/interface';
|
|
9
9
|
import { Merge } from 'ts-essentials';
|
|
@@ -201,6 +201,7 @@ type NavMenuItem = MenuItemType2 | SubMenuType2 | MenuItemGroupType2 | MenuDivid
|
|
|
201
201
|
|
|
202
202
|
interface NavMenuProps {
|
|
203
203
|
items?: NavMenuItem[];
|
|
204
|
+
theme?: MenuProps['theme'];
|
|
204
205
|
}
|
|
205
206
|
declare const NavMenu: react.NamedExoticComponent<NavMenuProps>;
|
|
206
207
|
|
|
@@ -226,10 +227,8 @@ interface GameState {
|
|
|
226
227
|
game: Game | null;
|
|
227
228
|
games: Game[];
|
|
228
229
|
isLoading: boolean;
|
|
229
|
-
switching: boolean;
|
|
230
230
|
setGame: (id: string | number) => Promise<void>;
|
|
231
231
|
refetchGames: () => Promise<void>;
|
|
232
|
-
setSwitching: (switching: boolean) => void;
|
|
233
232
|
}
|
|
234
233
|
|
|
235
234
|
interface GameSelectProps {
|
|
@@ -303,12 +302,12 @@ declare enum QueryListAction {
|
|
|
303
302
|
Jump = 2,
|
|
304
303
|
Init = 3
|
|
305
304
|
}
|
|
306
|
-
interface QueryListRef<Item, Value,
|
|
307
|
-
|
|
305
|
+
interface QueryListRef<Item, Value, Data> {
|
|
306
|
+
data: Data | undefined;
|
|
308
307
|
dataSource: Item[] | undefined;
|
|
309
308
|
form: FormInstance<Value>;
|
|
310
309
|
}
|
|
311
|
-
interface QueryListProps<Item extends AnyObject = AnyObject, Value = any,
|
|
310
|
+
interface QueryListProps<Item extends AnyObject = AnyObject, Value = any, Data = any> extends Omit<TableProps<Item>, 'pagination' | 'dataSource' | 'loading'>, Pick<FilterFormWrapperProps, 'buttonsAlign' | 'showReset'> {
|
|
312
311
|
code?: string;
|
|
313
312
|
isGlobal?: boolean;
|
|
314
313
|
route: string;
|
|
@@ -319,19 +318,15 @@ interface QueryListProps<Item extends AnyObject = AnyObject, Value = any, Respon
|
|
|
319
318
|
headers?: RequestOptions['headers'];
|
|
320
319
|
body?: RequestOptions['body'] | ((payload: QueryListPayload<Value>) => RequestOptions['body']);
|
|
321
320
|
params?: RequestOptions['params'] | ((payload: QueryListPayload<Value>) => RequestOptions['params']);
|
|
322
|
-
tableExtra?: ReactNode | ((form: FormInstance<Value
|
|
321
|
+
tableExtra?: ReactNode | ((form: FormInstance<Value>, data?: Data) => ReactNode);
|
|
323
322
|
form?: FormInstance<Value>;
|
|
324
323
|
renderForm?: (form: FormInstance<Value>) => ReactElement;
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
getDataSource?: (response: Response | undefined, form: FormInstance<Value>) => Item[] | undefined;
|
|
332
|
-
}
|
|
333
|
-
declare const QueryList: <Item extends AnyObject = AnyObject, Value extends object | undefined = undefined, Response = ListResponse<Item>>(props: QueryListProps<Item, Value, Response> & {
|
|
334
|
-
ref?: Ref<QueryListRef<Item, Value, Response>>;
|
|
324
|
+
afterSuccess?: (action: QueryListAction, data: Data, form: FormInstance<Value>) => void;
|
|
325
|
+
getTotal?: (data: Data | undefined) => number | undefined;
|
|
326
|
+
getDataSource?: (data: Data | undefined, form: FormInstance<Value>) => Item[] | undefined;
|
|
327
|
+
}
|
|
328
|
+
declare const QueryList: <Item extends AnyObject = AnyObject, Value extends object | undefined = undefined, Data = ListResponse<Item>>(props: QueryListProps<Item, Value, Data> & {
|
|
329
|
+
ref?: Ref<QueryListRef<Item, Value, Data>>;
|
|
335
330
|
}) => ReactElement;
|
|
336
331
|
|
|
337
332
|
interface QueryListMutator {
|
package/lib/index.js
CHANGED
|
@@ -61,7 +61,7 @@ var init_en_GB = __esm({
|
|
|
61
61
|
SignIn: {
|
|
62
62
|
title: "Sign In Method",
|
|
63
63
|
thirdParty: "Third party sign in",
|
|
64
|
-
signInWithIDass: "Sign in
|
|
64
|
+
signInWithIDass: "Sign in with IDass",
|
|
65
65
|
unregistered: "You are not yet registered on the platform, please contact the administrator",
|
|
66
66
|
welcome: "Welcome"
|
|
67
67
|
},
|
|
@@ -385,7 +385,7 @@ var init_NavMenu = __esm({
|
|
|
385
385
|
init_stores();
|
|
386
386
|
init_utils();
|
|
387
387
|
NavMenu = memo(function NavMenu2(props) {
|
|
388
|
-
const { items } = props;
|
|
388
|
+
const { items, theme: theme4 } = props;
|
|
389
389
|
const location = useLocation();
|
|
390
390
|
const flattenItems = useMemo(() => flatItems(items ?? []), [items]);
|
|
391
391
|
const codes = useMemo(() => flattenItems.map((item) => item.code).filter(Boolean), [flattenItems]);
|
|
@@ -415,6 +415,7 @@ var init_NavMenu = __esm({
|
|
|
415
415
|
return /* @__PURE__ */ jsx(
|
|
416
416
|
Menu,
|
|
417
417
|
{
|
|
418
|
+
theme: theme4,
|
|
418
419
|
style: { borderRight: "none" },
|
|
419
420
|
items: internalItems,
|
|
420
421
|
mode: "inline",
|
|
@@ -583,16 +584,17 @@ var init_stores2 = __esm({
|
|
|
583
584
|
(set, get2) => ({
|
|
584
585
|
initialized: false,
|
|
585
586
|
isLoading: false,
|
|
586
|
-
switching: false,
|
|
587
587
|
game: null,
|
|
588
588
|
games: [],
|
|
589
589
|
async setGame(id2) {
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
await refetchGames();
|
|
590
|
+
if (id2 === get2().game?.game_id) {
|
|
591
|
+
return;
|
|
593
592
|
}
|
|
594
|
-
|
|
595
|
-
|
|
593
|
+
if (!get2().initialized) {
|
|
594
|
+
await get2().refetchGames();
|
|
595
|
+
}
|
|
596
|
+
const game = (get2().games ?? []).find((item) => item.game_id === id2) ?? null;
|
|
597
|
+
set({ game });
|
|
596
598
|
},
|
|
597
599
|
async refetchGames() {
|
|
598
600
|
if (!get2().isLoading) {
|
|
@@ -607,8 +609,7 @@ var init_stores2 = __esm({
|
|
|
607
609
|
});
|
|
608
610
|
}
|
|
609
611
|
}
|
|
610
|
-
}
|
|
611
|
-
setSwitching: (switching) => set({ switching })
|
|
612
|
+
}
|
|
612
613
|
}),
|
|
613
614
|
{
|
|
614
615
|
name: "game",
|
|
@@ -1046,8 +1047,8 @@ var init_QueryList = __esm({
|
|
|
1046
1047
|
method: "GET",
|
|
1047
1048
|
defaultSize: 10,
|
|
1048
1049
|
refreshInterval: 0,
|
|
1049
|
-
getTotal: (
|
|
1050
|
-
getDataSource: (
|
|
1050
|
+
getTotal: (data2) => data2?.total,
|
|
1051
|
+
getDataSource: (data2) => data2?.list,
|
|
1051
1052
|
...props
|
|
1052
1053
|
};
|
|
1053
1054
|
const {
|
|
@@ -1063,11 +1064,10 @@ var init_QueryList = __esm({
|
|
|
1063
1064
|
refreshInterval,
|
|
1064
1065
|
tableExtra,
|
|
1065
1066
|
form,
|
|
1066
|
-
extra,
|
|
1067
|
-
renderForm,
|
|
1068
|
-
afterSuccess,
|
|
1069
1067
|
body,
|
|
1070
1068
|
params,
|
|
1069
|
+
renderForm,
|
|
1070
|
+
afterSuccess,
|
|
1071
1071
|
getTotal,
|
|
1072
1072
|
getDataSource,
|
|
1073
1073
|
...tableProps
|
|
@@ -1077,7 +1077,6 @@ var init_QueryList = __esm({
|
|
|
1077
1077
|
const [_form] = Form.useForm(form);
|
|
1078
1078
|
const { accessible, isLoading } = usePermission(code, isGlobal);
|
|
1079
1079
|
const action = useRef(3 /* Init */);
|
|
1080
|
-
const originalData = useRef();
|
|
1081
1080
|
const { game } = useGameStore();
|
|
1082
1081
|
const usePermissionApiV2 = useToolkitsContext((state) => state.usePermissionApiV2);
|
|
1083
1082
|
const [isValid, setIsValid] = useState(false);
|
|
@@ -1085,17 +1084,15 @@ var init_QueryList = __esm({
|
|
|
1085
1084
|
const { page, size = defaultSize, formValue } = getPayload(route3);
|
|
1086
1085
|
const payload = { page, size, formValue };
|
|
1087
1086
|
const _body = useMemo(() => {
|
|
1088
|
-
return typeof body === "function" ? body(payload) : method === "POST" ? {
|
|
1087
|
+
return typeof body === "function" ? body(payload) : method === "POST" && typeof body === "undefined" ? {
|
|
1089
1088
|
...formValue,
|
|
1090
|
-
...!onePage ? { page, size } : void 0
|
|
1091
|
-
|
|
1092
|
-
} : void 0;
|
|
1089
|
+
...!onePage ? { page, size } : void 0
|
|
1090
|
+
} : body;
|
|
1093
1091
|
}, [onePage, method, page, size, formValue, body]);
|
|
1094
1092
|
const _params = useMemo(
|
|
1095
|
-
() => typeof params === "function" ? params(payload) : method === "GET" ? {
|
|
1093
|
+
() => typeof params === "function" ? params(payload) : method === "GET" && typeof params === "undefined" ? {
|
|
1096
1094
|
...formValue,
|
|
1097
|
-
...!onePage ? { page, size } : void 0
|
|
1098
|
-
...params
|
|
1095
|
+
...!onePage ? { page, size } : void 0
|
|
1099
1096
|
} : void 0,
|
|
1100
1097
|
[onePage, method, page, size, formValue, params]
|
|
1101
1098
|
);
|
|
@@ -1141,9 +1138,9 @@ var init_QueryList = __esm({
|
|
|
1141
1138
|
shouldRetryOnError: false,
|
|
1142
1139
|
revalidateOnFocus: false,
|
|
1143
1140
|
refreshInterval: shouldPoll.current ? refreshInterval : 0,
|
|
1144
|
-
onSuccess(
|
|
1141
|
+
onSuccess(_data) {
|
|
1145
1142
|
shouldPoll.current = true;
|
|
1146
|
-
afterSuccess?.(action.current,
|
|
1143
|
+
afterSuccess?.(action.current, _data, _form);
|
|
1147
1144
|
},
|
|
1148
1145
|
onError(error) {
|
|
1149
1146
|
shouldPoll.current = false;
|
|
@@ -1220,7 +1217,7 @@ var init_QueryList = __esm({
|
|
|
1220
1217
|
init();
|
|
1221
1218
|
}, [accessible, form, game]);
|
|
1222
1219
|
useImperativeHandle(ref, () => ({
|
|
1223
|
-
|
|
1220
|
+
data,
|
|
1224
1221
|
dataSource,
|
|
1225
1222
|
form: _form
|
|
1226
1223
|
}));
|
|
@@ -1257,11 +1254,9 @@ var init_QueryList = __esm({
|
|
|
1257
1254
|
})
|
|
1258
1255
|
}
|
|
1259
1256
|
);
|
|
1260
|
-
const extraRenderer = extra && /* @__PURE__ */ jsx("div", { className: "mt-2 mb-4", children: extra({ form: _form, data: originalData.current }) });
|
|
1261
1257
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
1262
1258
|
formRenderer,
|
|
1263
|
-
|
|
1264
|
-
typeof tableExtra === "function" ? tableExtra(_form) : tableExtra,
|
|
1259
|
+
typeof tableExtra === "function" ? tableExtra(_form, data) : tableExtra,
|
|
1265
1260
|
/* @__PURE__ */ jsx(Table, { ...tableProps, dataSource, loading: isValidating, pagination })
|
|
1266
1261
|
] });
|
|
1267
1262
|
};
|