react-toolkits 2.11.18 → 2.13.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 +18 -0
- package/lib/index.css +1 -1
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +232 -253
- package/lib/index.js +319 -271
- package/lib/index.js.map +1 -1
- package/locale/hooks.js +5 -5
- package/locale/hooks.js.map +1 -1
- package/locale/index.js +5 -5
- package/locale/index.js.map +1 -1
- package/package.json +21 -22
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# react-toolkits
|
|
2
2
|
|
|
3
|
+
## 2.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 36eaf3d: Release
|
|
8
|
+
|
|
9
|
+
## 2.12.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 66def58: refactor: some new apis
|
|
14
|
+
|
|
15
|
+
## 2.11.19
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 7838c76: fix: resolve exported useModalStore undefined issue
|
|
20
|
+
|
|
3
21
|
## 2.11.18
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/lib/index.css
CHANGED
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-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.gap-8 {\n gap: 2rem\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,OAAK;AACT;AACA,CAAC;AACG,YAAU;AACd;AACA,CAAC;AACG,mBAAiB;AACjB,oBAAkB,IAAI,IAAI,IAAI,IAAI,EAAE,IAAI;
|
|
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.gap-8 {\n gap: 2rem\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, 1))\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,OAAK;AACT;AACA,CAAC;AACG,YAAU;AACd;AACA,CAAC;AACG,mBAAiB;AACjB,oBAAkB,IAAI,IAAI,IAAI,IAAI,EAAE,IAAI,eAAe,EAAE;AAC7D;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;;;ACjSA,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
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import * as react from 'react';
|
|
2
|
-
import { FC, PropsWithChildren, Key,
|
|
3
|
+
import { ReactNode, FC, PropsWithChildren, Key, ComponentType, ReactElement, Ref } from 'react';
|
|
4
|
+
import { AxiosInstance, InternalAxiosRequestConfig, AxiosResponse, AxiosInterceptorOptions, AxiosHeaderValue } from 'axios';
|
|
3
5
|
import { ParagraphProps } from 'antd/es/typography/Paragraph';
|
|
4
|
-
import
|
|
5
|
-
import { FormInstance, MenuProps, ButtonProps, ModalProps, FormProps } from 'antd';
|
|
6
|
+
import { MenuProps, FormInstance, ModalProps, FormProps, ButtonProps } from 'antd';
|
|
6
7
|
import { TableProps } from 'antd/es/table';
|
|
7
|
-
import { AxiosHeaderValue, AxiosInstance, InternalAxiosRequestConfig, AxiosResponse, AxiosInterceptorOptions } from 'axios';
|
|
8
8
|
import { ItemType, SubMenuType, MenuItemGroupType, MenuItemType } from 'antd/es/menu/interface';
|
|
9
9
|
import { Merge } from 'ts-essentials';
|
|
10
10
|
import * as zustand_middleware from 'zustand/middleware';
|
|
@@ -14,56 +14,117 @@ import { AnyObject } from 'antd/es/_util/type';
|
|
|
14
14
|
import * as swr from 'swr';
|
|
15
15
|
import { MutatorCallback, MutatorOptions } from 'swr';
|
|
16
16
|
|
|
17
|
-
interface
|
|
18
|
-
|
|
19
|
-
addable?: boolean;
|
|
20
|
-
removable?: boolean;
|
|
21
|
-
addCallback?: (addedTag: string) => Promise<boolean>;
|
|
22
|
-
removeCallback?: (removedTag: string) => Promise<boolean>;
|
|
23
|
-
}
|
|
24
|
-
declare const DynamicTags: FC<DynamicTagsProps>;
|
|
25
|
-
|
|
26
|
-
type ExpandableParagraphProps = Omit<ParagraphProps, 'ellipsis' | 'className'>;
|
|
27
|
-
declare const ExpandableParagraph: FC<ExpandableParagraphProps>;
|
|
28
|
-
|
|
29
|
-
interface FilterFormWrapperProps extends PropsWithChildren {
|
|
30
|
-
onConfirm?: () => void | Promise<void>;
|
|
31
|
-
onReset?: () => void;
|
|
32
|
-
extras?: {
|
|
33
|
-
key: Key;
|
|
34
|
-
children: ReactNode;
|
|
35
|
-
}[];
|
|
36
|
-
isConfirming?: boolean;
|
|
37
|
-
buttonsAlign?: 'left' | 'right' | 'bottom';
|
|
38
|
-
showReset?: boolean;
|
|
17
|
+
interface AxiosSlice {
|
|
18
|
+
axios: AxiosInstance;
|
|
39
19
|
}
|
|
40
|
-
declare const FilterFormWrapper: (props: FilterFormWrapperProps) => react_jsx_runtime.JSX.Element;
|
|
41
20
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
21
|
+
type Locale = {
|
|
22
|
+
global: {
|
|
23
|
+
noEntitlement: string;
|
|
24
|
+
name: string;
|
|
25
|
+
creationTime: string;
|
|
26
|
+
operation: string;
|
|
27
|
+
update: string;
|
|
28
|
+
edit: string;
|
|
29
|
+
delete: string;
|
|
30
|
+
selectAll: string;
|
|
31
|
+
game: string;
|
|
32
|
+
user: string;
|
|
33
|
+
role: string;
|
|
34
|
+
username: string;
|
|
35
|
+
password: string;
|
|
36
|
+
label: string;
|
|
37
|
+
method: string;
|
|
38
|
+
route: string;
|
|
39
|
+
request: string;
|
|
40
|
+
response: string;
|
|
41
|
+
add: string;
|
|
42
|
+
signIn: string;
|
|
43
|
+
};
|
|
44
|
+
SignIn: {
|
|
45
|
+
title: string;
|
|
46
|
+
thirdParty: string;
|
|
47
|
+
signInWithIDass: string;
|
|
48
|
+
unregistered: string;
|
|
49
|
+
welcome: string;
|
|
50
|
+
};
|
|
51
|
+
NotFound: {
|
|
52
|
+
subTitle: string;
|
|
53
|
+
buttonText: string;
|
|
54
|
+
};
|
|
55
|
+
FilterFormWrapper: {
|
|
56
|
+
confirmText: string;
|
|
57
|
+
resetText: string;
|
|
58
|
+
};
|
|
59
|
+
FormModal: {
|
|
60
|
+
confirmText: string;
|
|
61
|
+
cancelText: string;
|
|
62
|
+
};
|
|
63
|
+
GameSelect: {
|
|
64
|
+
label: string;
|
|
65
|
+
placeholder: string;
|
|
66
|
+
};
|
|
67
|
+
RequireGame: {
|
|
68
|
+
description: string;
|
|
69
|
+
};
|
|
70
|
+
UserWidget: {
|
|
71
|
+
signOutText: string;
|
|
72
|
+
};
|
|
73
|
+
UserList: {
|
|
74
|
+
createTitle: string;
|
|
75
|
+
createSuccessfully: string;
|
|
76
|
+
updateTitle: string;
|
|
77
|
+
updateSuccessfully: string;
|
|
78
|
+
deleteTitle: string;
|
|
79
|
+
deleteContent: string;
|
|
80
|
+
deleteSuccessfully: string;
|
|
81
|
+
};
|
|
82
|
+
RoleList: {
|
|
83
|
+
createTitle: string;
|
|
84
|
+
createSuccessfully: string;
|
|
85
|
+
updateTitle: string;
|
|
86
|
+
updateSuccessfully: string;
|
|
87
|
+
deleteTitle: string;
|
|
88
|
+
deleteContent: string;
|
|
89
|
+
deleteSuccessfully: string;
|
|
90
|
+
};
|
|
91
|
+
PermissionList: {
|
|
92
|
+
failedDescription: string;
|
|
93
|
+
baseSectionTitle: string;
|
|
94
|
+
gameSectionTitle: string;
|
|
95
|
+
gameSectionDescription: string;
|
|
96
|
+
gameSelectPlaceholder: string;
|
|
97
|
+
removeText: string;
|
|
98
|
+
addText: string;
|
|
99
|
+
};
|
|
100
|
+
RoleDetail: {
|
|
101
|
+
title: string;
|
|
102
|
+
};
|
|
103
|
+
InfiniteList: {
|
|
104
|
+
loadingText: string;
|
|
105
|
+
reachEndText: string;
|
|
106
|
+
loadMoreText: string;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
46
109
|
|
|
47
|
-
interface
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
[
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
extras?: InfiniteListExtra<Values>[];
|
|
110
|
+
interface ContextSlice {
|
|
111
|
+
locale: Locale;
|
|
112
|
+
isPermissionApiV2: boolean;
|
|
113
|
+
gameApiV2: boolean;
|
|
114
|
+
signInPath: string;
|
|
115
|
+
isGlobal: boolean;
|
|
116
|
+
unregistered?: boolean;
|
|
117
|
+
hideGameSelect?: boolean;
|
|
118
|
+
layoutTitle?: ReactNode;
|
|
119
|
+
interceptors?: {
|
|
120
|
+
request?: [(config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig | Promise<InternalAxiosRequestConfig>];
|
|
121
|
+
response?: [
|
|
122
|
+
(response: AxiosResponse) => AxiosResponse | Promise<AxiosResponse>,
|
|
123
|
+
((error: any) => any) | null,
|
|
124
|
+
options?: AxiosInterceptorOptions
|
|
125
|
+
];
|
|
126
|
+
};
|
|
65
127
|
}
|
|
66
|
-
declare const InfiniteList: <Item extends object, Values extends object | undefined = undefined, Response = any>(props: InfiniteListProps<Item, Values, Response>) => react_jsx_runtime.JSX.Element;
|
|
67
128
|
|
|
68
129
|
type MenuItemType2 = Merge<MenuItemType, {
|
|
69
130
|
route?: string;
|
|
@@ -103,14 +164,13 @@ interface Game {
|
|
|
103
164
|
|
|
104
165
|
interface GameSelectProps {
|
|
105
166
|
filter?: (game: Game) => boolean;
|
|
106
|
-
onGameChange?: (game: Game) => void;
|
|
107
167
|
}
|
|
108
168
|
|
|
109
169
|
type HeaderExtra = {
|
|
110
170
|
key: Key;
|
|
111
171
|
children: ReactNode;
|
|
112
172
|
};
|
|
113
|
-
interface LayoutProps extends Pick<GameSelectProps, 'filter'
|
|
173
|
+
interface LayoutProps extends Pick<GameSelectProps, 'filter'> {
|
|
114
174
|
menuCollapsible?: boolean;
|
|
115
175
|
isMenuLoading?: boolean;
|
|
116
176
|
title?: ReactNode;
|
|
@@ -139,6 +199,121 @@ declare const useLayoutStore: zustand.UseBoundStore<Omit<zustand.StoreApi<Layout
|
|
|
139
199
|
};
|
|
140
200
|
}>;
|
|
141
201
|
|
|
202
|
+
interface UserInfo {
|
|
203
|
+
authorityId: string;
|
|
204
|
+
exp: number;
|
|
205
|
+
}
|
|
206
|
+
interface TokenSlice {
|
|
207
|
+
token?: string;
|
|
208
|
+
getUser: () => UserInfo | null;
|
|
209
|
+
setToken: (token: string) => void;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
interface GameSlice {
|
|
213
|
+
game?: Game;
|
|
214
|
+
games: Game[];
|
|
215
|
+
selectedGame?: string | number;
|
|
216
|
+
isGamesLoading: boolean;
|
|
217
|
+
setGame: (value?: string | number) => void;
|
|
218
|
+
setGames: (games: Game[]) => void;
|
|
219
|
+
setSelectedGame: (value: string | number) => void;
|
|
220
|
+
setIsGamesLoading: (loading: boolean) => void;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
type ToolkitsState = TokenSlice & GameSlice & ContextSlice & AxiosSlice & {
|
|
224
|
+
clearToken: () => void;
|
|
225
|
+
setUnregistered: () => void;
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
declare function useContextStore<T>(selector: (state: ToolkitsState) => T): T;
|
|
229
|
+
type ContextProviderProps = PropsWithChildren<Partial<ContextSlice>>;
|
|
230
|
+
declare const Contextrovider: FC<ContextProviderProps>;
|
|
231
|
+
declare const withContext: (Component: ComponentType, providerProps: Omit<ContextProviderProps, "children">) => (props: any) => react_jsx_runtime.JSX.Element;
|
|
232
|
+
|
|
233
|
+
interface DynamicTagsProps {
|
|
234
|
+
initialTags?: string[];
|
|
235
|
+
addable?: boolean;
|
|
236
|
+
removable?: boolean;
|
|
237
|
+
addCallback?: (addedTag: string) => Promise<boolean>;
|
|
238
|
+
removeCallback?: (removedTag: string) => Promise<boolean>;
|
|
239
|
+
}
|
|
240
|
+
declare const DynamicTags: FC<DynamicTagsProps>;
|
|
241
|
+
|
|
242
|
+
type ExpandableParagraphProps = Omit<ParagraphProps, 'ellipsis' | 'className'>;
|
|
243
|
+
declare const ExpandableParagraph: FC<ExpandableParagraphProps>;
|
|
244
|
+
|
|
245
|
+
interface FilterFormWrapperProps extends PropsWithChildren {
|
|
246
|
+
onConfirm?: () => void | Promise<void>;
|
|
247
|
+
onReset?: () => void;
|
|
248
|
+
extras?: {
|
|
249
|
+
key: Key;
|
|
250
|
+
children: ReactNode;
|
|
251
|
+
}[];
|
|
252
|
+
isConfirming?: boolean;
|
|
253
|
+
buttonsAlign?: 'left' | 'right' | 'bottom';
|
|
254
|
+
showReset?: boolean;
|
|
255
|
+
}
|
|
256
|
+
declare const FilterFormWrapper: (props: FilterFormWrapperProps) => react_jsx_runtime.JSX.Element;
|
|
257
|
+
|
|
258
|
+
interface HighlightProps extends PropsWithChildren {
|
|
259
|
+
texts: Array<string | number>;
|
|
260
|
+
}
|
|
261
|
+
declare const Highlight: (props: HighlightProps) => react_jsx_runtime.JSX.Element;
|
|
262
|
+
|
|
263
|
+
interface InfiniteListExtra<Values> {
|
|
264
|
+
key: Key;
|
|
265
|
+
children: ReactNode | ((form: FormInstance<Values>) => ReactNode);
|
|
266
|
+
}
|
|
267
|
+
interface InfiniteListProps<Item, Values, Response> extends Pick<TableProps<Item>, 'columns' | 'rowKey' | 'tableLayout' | 'expandable' | 'rowSelection' | 'bordered'> {
|
|
268
|
+
url: string;
|
|
269
|
+
getRowKey: (response: Response) => any;
|
|
270
|
+
getDataSource: (data: (Response | undefined)[] | undefined) => Item[];
|
|
271
|
+
code?: string;
|
|
272
|
+
headers?: {
|
|
273
|
+
[key: string]: AxiosHeaderValue;
|
|
274
|
+
} | ((form: FormInstance<Values>) => {
|
|
275
|
+
[key: string]: AxiosHeaderValue;
|
|
276
|
+
});
|
|
277
|
+
renderForm?: (form: FormInstance<Values>) => ReactNode;
|
|
278
|
+
transformArg: (values: Values, rowKey?: string) => Record<any, any>;
|
|
279
|
+
hasMore?: (data: (Response | undefined)[] | undefined) => boolean;
|
|
280
|
+
extras?: InfiniteListExtra<Values>[];
|
|
281
|
+
}
|
|
282
|
+
declare const InfiniteList: <Item extends object, Values extends object | undefined = undefined, Response = any>(props: InfiniteListProps<Item, Values, Response>) => react_jsx_runtime.JSX.Element;
|
|
283
|
+
|
|
284
|
+
interface UseModalOperation {
|
|
285
|
+
hide: () => void;
|
|
286
|
+
}
|
|
287
|
+
interface UseModalProps extends Omit<ModalProps, 'open' | 'confirmLoading' | 'onOk' | 'onCancel'> {
|
|
288
|
+
content?: ReactNode | ((operation: UseModalOperation) => ReactNode);
|
|
289
|
+
onConfirm?: () => void | Promise<void>;
|
|
290
|
+
}
|
|
291
|
+
declare function useModal(props: UseModalProps): {
|
|
292
|
+
id: number;
|
|
293
|
+
show: () => void;
|
|
294
|
+
hide: () => void;
|
|
295
|
+
modal: react_jsx_runtime.JSX.Element;
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
type RecursivePartial<T> = NonNullable<T> extends object ? {
|
|
299
|
+
[P in keyof T]?: NonNullable<T[P]> extends (infer U)[] ? RecursivePartial<U>[] : NonNullable<T[P]> extends object ? RecursivePartial<T[P]> : T[P];
|
|
300
|
+
} : T;
|
|
301
|
+
interface UseFormModalProps<Values extends AnyObject = AnyObject, ExtraValues = any> extends Omit<UseModalProps, 'afterClose' | 'onConfirm' | 'content'> {
|
|
302
|
+
formProps?: Omit<FormProps, 'form'>;
|
|
303
|
+
form?: FormInstance<Values>;
|
|
304
|
+
content?: ReactNode | ((extraValues: ExtraValues, operation: UseModalOperation) => ReactNode);
|
|
305
|
+
onConfirm?: (values: Values, extraValues: ExtraValues) => void | Promise<void>;
|
|
306
|
+
}
|
|
307
|
+
declare function useFormModal<Values extends AnyObject = AnyObject, ExtraValues = any>(props: UseFormModalProps<Values, ExtraValues>): {
|
|
308
|
+
id: number;
|
|
309
|
+
show: ({ initialValues, extraValues, }?: {
|
|
310
|
+
initialValues?: RecursivePartial<Values>;
|
|
311
|
+
extraValues?: ExtraValues;
|
|
312
|
+
}) => void;
|
|
313
|
+
hide: () => void;
|
|
314
|
+
modal: react_jsx_runtime.JSX.Element;
|
|
315
|
+
};
|
|
316
|
+
|
|
142
317
|
interface PermissionButtonProps extends ButtonProps {
|
|
143
318
|
code?: string | string[];
|
|
144
319
|
showLoading?: boolean;
|
|
@@ -205,168 +380,13 @@ interface QueryListState {
|
|
|
205
380
|
}
|
|
206
381
|
declare const useQueryListStore: zustand.UseBoundStore<zustand.StoreApi<QueryListState>>;
|
|
207
382
|
|
|
383
|
+
declare const RequireGame: FC<PropsWithChildren>;
|
|
384
|
+
|
|
208
385
|
interface RequirePermissionProps {
|
|
209
386
|
code: string;
|
|
210
387
|
}
|
|
211
388
|
declare const RequirePermission: FC<PropsWithChildren<RequirePermissionProps>>;
|
|
212
389
|
|
|
213
|
-
interface AxiosSlice {
|
|
214
|
-
axios: AxiosInstance;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
type Locale = {
|
|
218
|
-
global: {
|
|
219
|
-
noEntitlement: string;
|
|
220
|
-
name: string;
|
|
221
|
-
creationTime: string;
|
|
222
|
-
operation: string;
|
|
223
|
-
update: string;
|
|
224
|
-
edit: string;
|
|
225
|
-
delete: string;
|
|
226
|
-
selectAll: string;
|
|
227
|
-
game: string;
|
|
228
|
-
user: string;
|
|
229
|
-
role: string;
|
|
230
|
-
username: string;
|
|
231
|
-
password: string;
|
|
232
|
-
label: string;
|
|
233
|
-
method: string;
|
|
234
|
-
route: string;
|
|
235
|
-
request: string;
|
|
236
|
-
response: string;
|
|
237
|
-
add: string;
|
|
238
|
-
signIn: string;
|
|
239
|
-
};
|
|
240
|
-
SignIn: {
|
|
241
|
-
title: string;
|
|
242
|
-
thirdParty: string;
|
|
243
|
-
signInWithIDass: string;
|
|
244
|
-
unregistered: string;
|
|
245
|
-
welcome: string;
|
|
246
|
-
};
|
|
247
|
-
NotFound: {
|
|
248
|
-
subTitle: string;
|
|
249
|
-
buttonText: string;
|
|
250
|
-
};
|
|
251
|
-
FilterFormWrapper: {
|
|
252
|
-
confirmText: string;
|
|
253
|
-
resetText: string;
|
|
254
|
-
};
|
|
255
|
-
FormModal: {
|
|
256
|
-
confirmText: string;
|
|
257
|
-
cancelText: string;
|
|
258
|
-
};
|
|
259
|
-
GameSelect: {
|
|
260
|
-
label: string;
|
|
261
|
-
placeholder: string;
|
|
262
|
-
};
|
|
263
|
-
RequireGame: {
|
|
264
|
-
description: string;
|
|
265
|
-
};
|
|
266
|
-
UserWidget: {
|
|
267
|
-
signOutText: string;
|
|
268
|
-
};
|
|
269
|
-
UserList: {
|
|
270
|
-
createTitle: string;
|
|
271
|
-
createSuccessfully: string;
|
|
272
|
-
updateTitle: string;
|
|
273
|
-
updateSuccessfully: string;
|
|
274
|
-
deleteTitle: string;
|
|
275
|
-
deleteContent: string;
|
|
276
|
-
deleteSuccessfully: string;
|
|
277
|
-
};
|
|
278
|
-
RoleList: {
|
|
279
|
-
createTitle: string;
|
|
280
|
-
createSuccessfully: string;
|
|
281
|
-
updateTitle: string;
|
|
282
|
-
updateSuccessfully: string;
|
|
283
|
-
deleteTitle: string;
|
|
284
|
-
deleteContent: string;
|
|
285
|
-
deleteSuccessfully: string;
|
|
286
|
-
};
|
|
287
|
-
PermissionList: {
|
|
288
|
-
failedDescription: string;
|
|
289
|
-
baseSectionTitle: string;
|
|
290
|
-
gameSectionTitle: string;
|
|
291
|
-
gameSectionDescription: string;
|
|
292
|
-
gameSelectPlaceholder: string;
|
|
293
|
-
removeText: string;
|
|
294
|
-
addText: string;
|
|
295
|
-
};
|
|
296
|
-
RoleDetail: {
|
|
297
|
-
title: string;
|
|
298
|
-
};
|
|
299
|
-
InfiniteList: {
|
|
300
|
-
loadingText: string;
|
|
301
|
-
reachEndText: string;
|
|
302
|
-
loadMoreText: string;
|
|
303
|
-
};
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
interface ContextSlice {
|
|
307
|
-
locale: Locale;
|
|
308
|
-
usePermissionApiV2: boolean;
|
|
309
|
-
gameApiV2: boolean;
|
|
310
|
-
signInPath: string;
|
|
311
|
-
isGlobal: boolean;
|
|
312
|
-
unregistered?: boolean;
|
|
313
|
-
hideGame?: boolean;
|
|
314
|
-
interceptors?: {
|
|
315
|
-
request?: [(config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig | Promise<InternalAxiosRequestConfig>];
|
|
316
|
-
response?: [
|
|
317
|
-
(response: AxiosResponse) => AxiosResponse | Promise<AxiosResponse>,
|
|
318
|
-
((error: any) => any) | null,
|
|
319
|
-
options?: AxiosInterceptorOptions
|
|
320
|
-
];
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
interface UserInfo {
|
|
325
|
-
authorityId: string;
|
|
326
|
-
exp: number;
|
|
327
|
-
}
|
|
328
|
-
interface TokenSlice {
|
|
329
|
-
token?: string;
|
|
330
|
-
getUser: () => UserInfo | null;
|
|
331
|
-
setToken: (token: string) => void;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
interface GameSlice {
|
|
335
|
-
initialized: boolean;
|
|
336
|
-
game?: Game;
|
|
337
|
-
games: Game[];
|
|
338
|
-
isLoading: boolean;
|
|
339
|
-
setGame(game: Game): void;
|
|
340
|
-
fetchGames: (options?: {
|
|
341
|
-
apiV2?: boolean;
|
|
342
|
-
forceUpdate?: boolean;
|
|
343
|
-
}) => Promise<Game[] | undefined>;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
type ToolkitsState = TokenSlice & GameSlice & ContextSlice & AxiosSlice & {
|
|
347
|
-
setContext: (props: Partial<ContextSlice>) => void;
|
|
348
|
-
clearToken: () => void;
|
|
349
|
-
setUnregistered: () => void;
|
|
350
|
-
};
|
|
351
|
-
declare const createToolkitsStore: (initProps?: Partial<ContextSlice>) => Omit<zustand.StoreApi<ToolkitsState>, "persist"> & {
|
|
352
|
-
persist: {
|
|
353
|
-
setOptions: (options: Partial<zustand_middleware.PersistOptions<ToolkitsState, unknown>>) => void;
|
|
354
|
-
clearStorage: () => void;
|
|
355
|
-
rehydrate: () => Promise<void> | void;
|
|
356
|
-
hasHydrated: () => boolean;
|
|
357
|
-
onHydrate: (fn: (state: ToolkitsState) => void) => () => void;
|
|
358
|
-
onFinishHydration: (fn: (state: ToolkitsState) => void) => () => void;
|
|
359
|
-
getOptions: () => Partial<zustand_middleware.PersistOptions<ToolkitsState, unknown>>;
|
|
360
|
-
};
|
|
361
|
-
};
|
|
362
|
-
|
|
363
|
-
type ToolkitsStore = ReturnType<typeof createToolkitsStore>;
|
|
364
|
-
declare function useToolkitsStore<T>(selector: (state: ToolkitsState) => T): T;
|
|
365
|
-
type ToolkitsProviderProps = PropsWithChildren<Partial<ContextSlice>>;
|
|
366
|
-
declare let toolkitsStore: ToolkitsStore;
|
|
367
|
-
declare const ToolkitsProvider: FC<ToolkitsProviderProps>;
|
|
368
|
-
declare const withContext: (Component: ComponentType, providerProps: Omit<ToolkitsProviderProps, "children">) => (props: any) => react_jsx_runtime.JSX.Element;
|
|
369
|
-
|
|
370
390
|
declare const UserWidget: FC;
|
|
371
391
|
|
|
372
392
|
declare const SSO_URL = "https://idaas.ifunplus.cn/enduser/api/application/plugin_FunPlus/sso/v1";
|
|
@@ -395,58 +415,17 @@ interface MenuListItem {
|
|
|
395
415
|
|
|
396
416
|
declare function useMenuList(): swr.SWRResponse<MenuListItem[], any, any>;
|
|
397
417
|
|
|
398
|
-
interface ModalState {
|
|
399
|
-
open: Map<number, boolean>;
|
|
400
|
-
getOpen: (uuid: number) => boolean;
|
|
401
|
-
show: (uuid: number) => void;
|
|
402
|
-
hide: (uuid: number) => void;
|
|
403
|
-
hideAll: () => void;
|
|
404
|
-
}
|
|
405
|
-
declare const useModalStore: zustand.UseBoundStore<zustand.StoreApi<ModalState>>;
|
|
406
|
-
interface UseModalOperation {
|
|
407
|
-
hide: () => void;
|
|
408
|
-
}
|
|
409
|
-
interface UseModalProps extends Omit<ModalProps, 'open' | 'confirmLoading' | 'onOk' | 'onCancel'> {
|
|
410
|
-
content?: ReactNode | ((operation: UseModalOperation) => ReactNode);
|
|
411
|
-
onConfirm?: () => void | Promise<void>;
|
|
412
|
-
}
|
|
413
|
-
declare function useModal(props: UseModalProps): {
|
|
414
|
-
id: number;
|
|
415
|
-
show: () => void;
|
|
416
|
-
hide: () => void;
|
|
417
|
-
modal: react_jsx_runtime.JSX.Element;
|
|
418
|
-
};
|
|
419
|
-
|
|
420
|
-
type RecursivePartial<T> = NonNullable<T> extends object ? {
|
|
421
|
-
[P in keyof T]?: NonNullable<T[P]> extends (infer U)[] ? RecursivePartial<U>[] : NonNullable<T[P]> extends object ? RecursivePartial<T[P]> : T[P];
|
|
422
|
-
} : T;
|
|
423
|
-
interface UseFormModalProps<Values extends AnyObject = AnyObject, ExtraValues = any> extends Omit<UseModalProps, 'afterClose' | 'onConfirm' | 'content'> {
|
|
424
|
-
formProps?: Omit<FormProps, 'form'>;
|
|
425
|
-
form?: FormInstance<Values>;
|
|
426
|
-
content?: ReactNode | ((extraValues: ExtraValues, operation: UseModalOperation) => ReactNode);
|
|
427
|
-
onConfirm?: (values: Values, extraValues: ExtraValues) => void | Promise<void>;
|
|
428
|
-
}
|
|
429
|
-
declare function useFormModal<Values extends AnyObject = AnyObject, ExtraValues = any>(props: UseFormModalProps<Values, ExtraValues>): {
|
|
430
|
-
id: number;
|
|
431
|
-
show: ({ initialValues, extraValues, }?: {
|
|
432
|
-
initialValues?: RecursivePartial<Values>;
|
|
433
|
-
extraValues?: ExtraValues;
|
|
434
|
-
}) => void;
|
|
435
|
-
hide: () => void;
|
|
436
|
-
modal: react_jsx_runtime.JSX.Element;
|
|
437
|
-
};
|
|
438
|
-
|
|
439
418
|
type PermissionCheckResult = {
|
|
440
419
|
has_all: true;
|
|
441
420
|
} | Record<string, boolean>;
|
|
442
|
-
declare
|
|
421
|
+
declare const usePermissions: (codes?: string[]) => {
|
|
443
422
|
data: Record<string, boolean>;
|
|
444
423
|
error: any;
|
|
445
424
|
mutate: swr.KeyedMutator<PermissionCheckResult>;
|
|
446
425
|
isValidating: boolean;
|
|
447
426
|
isLoading: boolean;
|
|
448
427
|
};
|
|
449
|
-
declare
|
|
428
|
+
declare const usePermission: (code?: string) => {
|
|
450
429
|
accessible: boolean;
|
|
451
430
|
isValidating: boolean;
|
|
452
431
|
isLoading: boolean;
|
|
@@ -480,4 +459,4 @@ type JsonData<T = any> = {
|
|
|
480
459
|
|
|
481
460
|
declare const mixedStorage: StateStorage;
|
|
482
461
|
|
|
483
|
-
export { APP_ID_HEADER, DynamicTags, type DynamicTagsProps, ExpandableParagraph, type ExpandableParagraphProps, FRONTEND_ROUTE_PREFIX, FilterFormWrapper, type FilterFormWrapperProps, type Game, Highlight, type HighlightProps, InfiniteList, type InfiniteListProps, type JsonData, Layout, type LayoutState, NavMenu, type NavMenuItem, NotFound, _default$1 as OperationLogList, PermissionButton, type PermissionButtonProps, QueryList, QueryListAction, type QueryListPayload, type QueryListProps, type QueryListRef, RequirePermission, type RequirePermissionProps, SSO_URL, SignIn,
|
|
462
|
+
export { APP_ID_HEADER, Contextrovider as ContextProvider, type ContextProviderProps, DynamicTags, type DynamicTagsProps, ExpandableParagraph, type ExpandableParagraphProps, FRONTEND_ROUTE_PREFIX, FilterFormWrapper, type FilterFormWrapperProps, type Game, Highlight, type HighlightProps, InfiniteList, type InfiniteListProps, type JsonData, Layout, type LayoutProps, type LayoutState, NavMenu, type NavMenuItem, NotFound, _default$1 as OperationLogList, PermissionButton, type PermissionButtonProps, QueryList, QueryListAction, type QueryListPayload, type QueryListProps, type QueryListRef, RequireGame, RequirePermission, type RequirePermissionProps, SSO_URL, SignIn, type UseFormModalProps, UserWidget, _default$2 as menuRoutes, mixedStorage, _default as permissionRoutes, useContextStore, useFormModal, useLayoutStore, useMenuList, useModal, usePermission, usePermissions, useQueryListStore, withContext };
|