react-toolkits 2.11.18 → 2.11.19
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 -1
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +38 -45
- package/lib/index.js +162 -134
- package/lib/index.js.map +1 -1
- package/locale/hooks.js +1 -1
- package/locale/index.js +1 -1
- package/package.json +19 -20
package/CHANGELOG.md
CHANGED
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
|
@@ -2,7 +2,7 @@ import * as react from 'react';
|
|
|
2
2
|
import { FC, PropsWithChildren, Key, ReactNode, ReactElement, Ref, ComponentType } from 'react';
|
|
3
3
|
import { ParagraphProps } from 'antd/es/typography/Paragraph';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
-
import { FormInstance, MenuProps,
|
|
5
|
+
import { FormInstance, MenuProps, ModalProps, FormProps, ButtonProps } from 'antd';
|
|
6
6
|
import { TableProps } from 'antd/es/table';
|
|
7
7
|
import { AxiosHeaderValue, AxiosInstance, InternalAxiosRequestConfig, AxiosResponse, AxiosInterceptorOptions } from 'axios';
|
|
8
8
|
import { ItemType, SubMenuType, MenuItemGroupType, MenuItemType } from 'antd/es/menu/interface';
|
|
@@ -116,6 +116,7 @@ interface LayoutProps extends Pick<GameSelectProps, 'filter' | 'onGameChange'> {
|
|
|
116
116
|
title?: ReactNode;
|
|
117
117
|
items?: NavMenuItem[];
|
|
118
118
|
navWidth?: string | number;
|
|
119
|
+
hideGame?: boolean;
|
|
119
120
|
headerExtra?: {
|
|
120
121
|
left?: HeaderExtra[];
|
|
121
122
|
right?: HeaderExtra[];
|
|
@@ -139,6 +140,39 @@ declare const useLayoutStore: zustand.UseBoundStore<Omit<zustand.StoreApi<Layout
|
|
|
139
140
|
};
|
|
140
141
|
}>;
|
|
141
142
|
|
|
143
|
+
interface UseModalOperation {
|
|
144
|
+
hide: () => void;
|
|
145
|
+
}
|
|
146
|
+
interface UseModalProps extends Omit<ModalProps, 'open' | 'confirmLoading' | 'onOk' | 'onCancel'> {
|
|
147
|
+
content?: ReactNode | ((operation: UseModalOperation) => ReactNode);
|
|
148
|
+
onConfirm?: () => void | Promise<void>;
|
|
149
|
+
}
|
|
150
|
+
declare function useModal(props: UseModalProps): {
|
|
151
|
+
id: number;
|
|
152
|
+
show: () => void;
|
|
153
|
+
hide: () => void;
|
|
154
|
+
modal: react_jsx_runtime.JSX.Element;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
type RecursivePartial<T> = NonNullable<T> extends object ? {
|
|
158
|
+
[P in keyof T]?: NonNullable<T[P]> extends (infer U)[] ? RecursivePartial<U>[] : NonNullable<T[P]> extends object ? RecursivePartial<T[P]> : T[P];
|
|
159
|
+
} : T;
|
|
160
|
+
interface UseFormModalProps<Values extends AnyObject = AnyObject, ExtraValues = any> extends Omit<UseModalProps, 'afterClose' | 'onConfirm' | 'content'> {
|
|
161
|
+
formProps?: Omit<FormProps, 'form'>;
|
|
162
|
+
form?: FormInstance<Values>;
|
|
163
|
+
content?: ReactNode | ((extraValues: ExtraValues, operation: UseModalOperation) => ReactNode);
|
|
164
|
+
onConfirm?: (values: Values, extraValues: ExtraValues) => void | Promise<void>;
|
|
165
|
+
}
|
|
166
|
+
declare function useFormModal<Values extends AnyObject = AnyObject, ExtraValues = any>(props: UseFormModalProps<Values, ExtraValues>): {
|
|
167
|
+
id: number;
|
|
168
|
+
show: ({ initialValues, extraValues, }?: {
|
|
169
|
+
initialValues?: RecursivePartial<Values>;
|
|
170
|
+
extraValues?: ExtraValues;
|
|
171
|
+
}) => void;
|
|
172
|
+
hide: () => void;
|
|
173
|
+
modal: react_jsx_runtime.JSX.Element;
|
|
174
|
+
};
|
|
175
|
+
|
|
142
176
|
interface PermissionButtonProps extends ButtonProps {
|
|
143
177
|
code?: string | string[];
|
|
144
178
|
showLoading?: boolean;
|
|
@@ -395,58 +429,17 @@ interface MenuListItem {
|
|
|
395
429
|
|
|
396
430
|
declare function useMenuList(): swr.SWRResponse<MenuListItem[], any, any>;
|
|
397
431
|
|
|
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
432
|
type PermissionCheckResult = {
|
|
440
433
|
has_all: true;
|
|
441
434
|
} | Record<string, boolean>;
|
|
442
|
-
declare
|
|
435
|
+
declare const usePermissions: (codes?: string[]) => {
|
|
443
436
|
data: Record<string, boolean>;
|
|
444
437
|
error: any;
|
|
445
438
|
mutate: swr.KeyedMutator<PermissionCheckResult>;
|
|
446
439
|
isValidating: boolean;
|
|
447
440
|
isLoading: boolean;
|
|
448
441
|
};
|
|
449
|
-
declare
|
|
442
|
+
declare const usePermission: (code?: string) => {
|
|
450
443
|
accessible: boolean;
|
|
451
444
|
isValidating: boolean;
|
|
452
445
|
isLoading: boolean;
|
|
@@ -480,4 +473,4 @@ type JsonData<T = any> = {
|
|
|
480
473
|
|
|
481
474
|
declare const mixedStorage: StateStorage;
|
|
482
475
|
|
|
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, ToolkitsProvider, type ToolkitsProviderProps, type UseFormModalProps,
|
|
476
|
+
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, ToolkitsProvider, type ToolkitsProviderProps, type UseFormModalProps, UserWidget, _default$2 as menuRoutes, mixedStorage, _default as permissionRoutes, toolkitsStore, useFormModal, useLayoutStore, useMenuList, useModal, usePermission, usePermissions, useQueryListStore, useToolkitsStore, withContext };
|
package/lib/index.js
CHANGED
|
@@ -3,17 +3,17 @@ import { jwtDecode } from 'jwt-decode';
|
|
|
3
3
|
import { create, useStore, createStore } from 'zustand';
|
|
4
4
|
import { persist, createJSONStorage } from 'zustand/middleware';
|
|
5
5
|
import * as Antd from 'antd';
|
|
6
|
-
import { Spin, Menu,
|
|
7
|
-
import { memo, useMemo, useCallback, useEffect, lazy, useContext, useState, useRef, Suspense,
|
|
6
|
+
import { Spin, Menu, Typography, Select, Card, Form, Input, theme, Space, Tag, Result, Table, Button, Divider, Dropdown, Alert, Modal, App, Tooltip, Popconfirm, Switch, InputNumber, Row, Col, Breadcrumb, Skeleton, Descriptions, Empty, Collapse, Checkbox } from 'antd';
|
|
7
|
+
import { createContext, memo, useMemo, useCallback, useEffect, forwardRef, lazy, useContext, useState, useRef, Suspense, Fragment as Fragment$1, useImperativeHandle, cloneElement } from 'react';
|
|
8
8
|
import useSWR5, { mutate, SWRConfig, unstable_serialize } from 'swr';
|
|
9
9
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
|
-
import { has, template, get
|
|
10
|
+
import { isEqual, has, template, get } from 'lodash-es';
|
|
11
11
|
import { flushSync } from 'react-dom';
|
|
12
12
|
import { createRoot } from 'react-dom/client';
|
|
13
13
|
import useSWRMutation2 from 'swr/mutation';
|
|
14
|
-
import { useLocation,
|
|
14
|
+
import { useLocation, Link, useNavigate, Navigate, Routes, Route, useParams } from 'react-router-dom';
|
|
15
15
|
import { Editor } from '@monaco-editor/react';
|
|
16
|
-
import { PlusOutlined,
|
|
16
|
+
import { PlusOutlined, MenuUnfoldOutlined, MenuFoldOutlined, LogoutOutlined, UserOutlined, UserAddOutlined, UsergroupAddOutlined } from '@ant-design/icons';
|
|
17
17
|
import { produce } from 'immer';
|
|
18
18
|
import qs from 'query-string';
|
|
19
19
|
import useSWRInfinite from 'swr/infinite';
|
|
@@ -555,35 +555,146 @@ var init_highlight = __esm({
|
|
|
555
555
|
init_Highlight();
|
|
556
556
|
}
|
|
557
557
|
});
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
return {
|
|
573
|
-
accessible: true,
|
|
574
|
-
isValidating: false,
|
|
575
|
-
isLoading: false
|
|
558
|
+
var usePermissions, usePermission;
|
|
559
|
+
var init_permission = __esm({
|
|
560
|
+
"src/hooks/permission.ts"() {
|
|
561
|
+
init_toolkitsProvider();
|
|
562
|
+
usePermissions = (codes = []) => {
|
|
563
|
+
const usePermissionApiV2 = useToolkitsStore((state) => state.usePermissionApiV2);
|
|
564
|
+
const url4 = usePermissionApiV2 ? "/api/usystem/user/checkV2" : "/api/usystem/user/check";
|
|
565
|
+
const key = codes.length ? { method: "POST", url: url4, data: { permissions: codes } } : null;
|
|
566
|
+
const { data, ...rest } = useSWR5(key);
|
|
567
|
+
const newData = codes.reduce((acc, curr) => {
|
|
568
|
+
acc[curr] = data?.has_all ? true : data?.[curr] ?? false;
|
|
569
|
+
return acc;
|
|
570
|
+
}, {});
|
|
571
|
+
return { ...rest, data: newData };
|
|
576
572
|
};
|
|
573
|
+
usePermission = (code) => {
|
|
574
|
+
const { data, isValidating, isLoading } = usePermissions(code ? [code] : void 0);
|
|
575
|
+
if (code === void 0) {
|
|
576
|
+
return {
|
|
577
|
+
accessible: true,
|
|
578
|
+
isValidating: false,
|
|
579
|
+
isLoading: false
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
return {
|
|
583
|
+
accessible: data?.[code] ?? false,
|
|
584
|
+
isValidating,
|
|
585
|
+
isLoading
|
|
586
|
+
};
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
});
|
|
590
|
+
var useModalStore;
|
|
591
|
+
var init_stores2 = __esm({
|
|
592
|
+
"src/components/modal/stores.ts"() {
|
|
593
|
+
useModalStore = create((set, get2) => ({
|
|
594
|
+
open: /* @__PURE__ */ new Map(),
|
|
595
|
+
isOpen: (uuid) => get2().open.get(uuid) ?? false,
|
|
596
|
+
show(uuid) {
|
|
597
|
+
set({ open: new Map(get2().open).set(uuid, true) });
|
|
598
|
+
},
|
|
599
|
+
hide(uuid) {
|
|
600
|
+
set({ open: new Map(get2().open).set(uuid, false) });
|
|
601
|
+
},
|
|
602
|
+
hideAll() {
|
|
603
|
+
set({ open: /* @__PURE__ */ new Map() });
|
|
604
|
+
}
|
|
605
|
+
}));
|
|
606
|
+
}
|
|
607
|
+
});
|
|
608
|
+
function useModal(props) {
|
|
609
|
+
const { content, onConfirm, ...modalProps } = props;
|
|
610
|
+
const _id = useMemo(() => ++id, []);
|
|
611
|
+
const { show, hide, isOpen } = useModalStore();
|
|
612
|
+
const open = isOpen(_id);
|
|
613
|
+
const [confirmLoading, setConfirmLoading] = useState(false);
|
|
614
|
+
const isRenderFunction = typeof content === "function";
|
|
615
|
+
const _show = () => {
|
|
616
|
+
show(_id);
|
|
617
|
+
};
|
|
618
|
+
const _hide = () => {
|
|
619
|
+
hide(_id);
|
|
620
|
+
};
|
|
621
|
+
const onCancel = () => {
|
|
622
|
+
_hide();
|
|
623
|
+
};
|
|
624
|
+
const onOk = async () => {
|
|
625
|
+
try {
|
|
626
|
+
setConfirmLoading(true);
|
|
627
|
+
await onConfirm?.();
|
|
628
|
+
_hide();
|
|
629
|
+
} finally {
|
|
630
|
+
setConfirmLoading(false);
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
const internalModal = /* @__PURE__ */ jsx(Modal, { ...modalProps, open, confirmLoading, onOk, onCancel, children: isRenderFunction ? content({ hide: _hide }) : content });
|
|
634
|
+
return {
|
|
635
|
+
id: _id,
|
|
636
|
+
show: _show,
|
|
637
|
+
hide: _hide,
|
|
638
|
+
modal: internalModal
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
var id;
|
|
642
|
+
var init_modal = __esm({
|
|
643
|
+
"src/components/modal/modal.tsx"() {
|
|
644
|
+
init_stores2();
|
|
645
|
+
id = 0;
|
|
577
646
|
}
|
|
647
|
+
});
|
|
648
|
+
function useFormModal(props) {
|
|
649
|
+
const { content, form, formProps, onConfirm, ...modalProps } = props;
|
|
650
|
+
const [internalExtraValues, setInternalExtraValues] = useState({});
|
|
651
|
+
let [internalForm] = Form.useForm();
|
|
652
|
+
internalForm = form || internalForm;
|
|
653
|
+
const isRenderFunction = typeof content === "function";
|
|
654
|
+
const hanldeConfirm = async () => {
|
|
655
|
+
const values = await internalForm.validateFields();
|
|
656
|
+
await onConfirm?.(values, internalExtraValues);
|
|
657
|
+
hide();
|
|
658
|
+
};
|
|
659
|
+
const afterClose = () => {
|
|
660
|
+
internalForm.resetFields();
|
|
661
|
+
};
|
|
662
|
+
const { id: id2, show, hide, modal } = useModal({
|
|
663
|
+
...modalProps,
|
|
664
|
+
content: (operation) => /* @__PURE__ */ jsx(Form, { ...formProps, form: internalForm, children: isRenderFunction ? content(internalExtraValues, operation) : content }),
|
|
665
|
+
onConfirm: hanldeConfirm,
|
|
666
|
+
afterClose
|
|
667
|
+
});
|
|
668
|
+
const onShow = ({
|
|
669
|
+
initialValues,
|
|
670
|
+
extraValues
|
|
671
|
+
} = {}) => {
|
|
672
|
+
if (extraValues) {
|
|
673
|
+
setInternalExtraValues(extraValues);
|
|
674
|
+
}
|
|
675
|
+
if (initialValues) {
|
|
676
|
+
internalForm.setFieldsValue(initialValues);
|
|
677
|
+
}
|
|
678
|
+
show();
|
|
679
|
+
};
|
|
578
680
|
return {
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
681
|
+
id: id2,
|
|
682
|
+
show: onShow,
|
|
683
|
+
hide,
|
|
684
|
+
modal
|
|
582
685
|
};
|
|
583
686
|
}
|
|
584
|
-
var
|
|
585
|
-
"src/
|
|
586
|
-
|
|
687
|
+
var init_formModal = __esm({
|
|
688
|
+
"src/components/modal/formModal.tsx"() {
|
|
689
|
+
init_modal();
|
|
690
|
+
}
|
|
691
|
+
});
|
|
692
|
+
|
|
693
|
+
// src/components/modal/index.ts
|
|
694
|
+
var init_modal2 = __esm({
|
|
695
|
+
"src/components/modal/index.ts"() {
|
|
696
|
+
init_formModal();
|
|
697
|
+
init_modal();
|
|
587
698
|
}
|
|
588
699
|
});
|
|
589
700
|
var PermissionButton, PermissionButton_default;
|
|
@@ -615,7 +726,7 @@ var init_permissionButton = __esm({
|
|
|
615
726
|
}
|
|
616
727
|
});
|
|
617
728
|
var useQueryListStore;
|
|
618
|
-
var
|
|
729
|
+
var init_stores3 = __esm({
|
|
619
730
|
"src/components/queryList/stores.ts"() {
|
|
620
731
|
useQueryListStore = create((set, get2) => ({
|
|
621
732
|
keyMap: /* @__PURE__ */ new Map(),
|
|
@@ -651,7 +762,7 @@ var init_QueryList = __esm({
|
|
|
651
762
|
init_filterFormWrapper();
|
|
652
763
|
init_locale();
|
|
653
764
|
init_toolkitsProvider();
|
|
654
|
-
|
|
765
|
+
init_stores3();
|
|
655
766
|
QueryListAction = /* @__PURE__ */ ((QueryListAction2) => {
|
|
656
767
|
QueryListAction2[QueryListAction2["Confirm"] = 0] = "Confirm";
|
|
657
768
|
QueryListAction2[QueryListAction2["Reset"] = 1] = "Reset";
|
|
@@ -874,7 +985,7 @@ var init_QueryList = __esm({
|
|
|
874
985
|
var init_queryList = __esm({
|
|
875
986
|
"src/components/queryList/index.ts"() {
|
|
876
987
|
init_QueryList();
|
|
877
|
-
|
|
988
|
+
init_stores3();
|
|
878
989
|
}
|
|
879
990
|
});
|
|
880
991
|
|
|
@@ -933,102 +1044,6 @@ var init_menu = __esm({
|
|
|
933
1044
|
init_types();
|
|
934
1045
|
}
|
|
935
1046
|
});
|
|
936
|
-
function useModal(props) {
|
|
937
|
-
const { content, onConfirm, ...modalProps } = props;
|
|
938
|
-
const _id = useMemo(() => ++id, []);
|
|
939
|
-
const { show, hide, getOpen } = useModalStore();
|
|
940
|
-
const open = getOpen(_id);
|
|
941
|
-
const [confirmLoading, setConfirmLoading] = useState(false);
|
|
942
|
-
const isRenderFunction = typeof content === "function";
|
|
943
|
-
const _show = () => {
|
|
944
|
-
show(_id);
|
|
945
|
-
};
|
|
946
|
-
const _hide = () => {
|
|
947
|
-
hide(_id);
|
|
948
|
-
};
|
|
949
|
-
const onCancel = () => {
|
|
950
|
-
_hide();
|
|
951
|
-
};
|
|
952
|
-
const onOk = async () => {
|
|
953
|
-
try {
|
|
954
|
-
setConfirmLoading(true);
|
|
955
|
-
await onConfirm?.();
|
|
956
|
-
_hide();
|
|
957
|
-
} finally {
|
|
958
|
-
setConfirmLoading(false);
|
|
959
|
-
}
|
|
960
|
-
};
|
|
961
|
-
const internalModal = /* @__PURE__ */ jsx(Modal, { ...modalProps, open, confirmLoading, onOk, onCancel, children: isRenderFunction ? content({ hide: _hide }) : content });
|
|
962
|
-
return {
|
|
963
|
-
id: _id,
|
|
964
|
-
show: _show,
|
|
965
|
-
hide: _hide,
|
|
966
|
-
modal: internalModal
|
|
967
|
-
};
|
|
968
|
-
}
|
|
969
|
-
var useModalStore, id;
|
|
970
|
-
var init_modal = __esm({
|
|
971
|
-
"src/hooks/modal.tsx"() {
|
|
972
|
-
useModalStore = create()((set, get2) => ({
|
|
973
|
-
open: /* @__PURE__ */ new Map(),
|
|
974
|
-
getOpen: (uuid) => get2().open.get(uuid) ?? false,
|
|
975
|
-
show(uuid) {
|
|
976
|
-
set({ open: new Map(get2().open).set(uuid, true) });
|
|
977
|
-
},
|
|
978
|
-
hide(uuid) {
|
|
979
|
-
set({ open: new Map(get2().open).set(uuid, false) });
|
|
980
|
-
},
|
|
981
|
-
hideAll() {
|
|
982
|
-
set({ open: /* @__PURE__ */ new Map() });
|
|
983
|
-
}
|
|
984
|
-
}));
|
|
985
|
-
id = 0;
|
|
986
|
-
}
|
|
987
|
-
});
|
|
988
|
-
function useFormModal(props) {
|
|
989
|
-
const { content, form, formProps, onConfirm, ...modalProps } = props;
|
|
990
|
-
const [internalExtraValues, setInternalExtraValues] = useState({});
|
|
991
|
-
let [internalForm] = Form.useForm();
|
|
992
|
-
internalForm = form || internalForm;
|
|
993
|
-
const isRenderFunction = typeof content === "function";
|
|
994
|
-
const hanldeConfirm = async () => {
|
|
995
|
-
const values = await internalForm.validateFields();
|
|
996
|
-
await onConfirm?.(values, internalExtraValues);
|
|
997
|
-
hide();
|
|
998
|
-
};
|
|
999
|
-
const afterClose = () => {
|
|
1000
|
-
internalForm.resetFields();
|
|
1001
|
-
};
|
|
1002
|
-
const { id: id2, show, hide, modal } = useModal({
|
|
1003
|
-
...modalProps,
|
|
1004
|
-
content: (operation) => /* @__PURE__ */ jsx(Form, { ...formProps, form: internalForm, children: isRenderFunction ? content(internalExtraValues, operation) : content }),
|
|
1005
|
-
onConfirm: hanldeConfirm,
|
|
1006
|
-
afterClose
|
|
1007
|
-
});
|
|
1008
|
-
const onShow = ({
|
|
1009
|
-
initialValues,
|
|
1010
|
-
extraValues
|
|
1011
|
-
} = {}) => {
|
|
1012
|
-
if (extraValues) {
|
|
1013
|
-
setInternalExtraValues(extraValues);
|
|
1014
|
-
}
|
|
1015
|
-
if (initialValues) {
|
|
1016
|
-
internalForm.setFieldsValue(initialValues);
|
|
1017
|
-
}
|
|
1018
|
-
show();
|
|
1019
|
-
};
|
|
1020
|
-
return {
|
|
1021
|
-
id: id2,
|
|
1022
|
-
show: onShow,
|
|
1023
|
-
hide,
|
|
1024
|
-
modal
|
|
1025
|
-
};
|
|
1026
|
-
}
|
|
1027
|
-
var init_formModal = __esm({
|
|
1028
|
-
"src/hooks/formModal.tsx"() {
|
|
1029
|
-
init_modal();
|
|
1030
|
-
}
|
|
1031
|
-
});
|
|
1032
1047
|
|
|
1033
1048
|
// src/pages/menu/menuItemList/index.tsx
|
|
1034
1049
|
var menuItemList_exports = {};
|
|
@@ -1709,11 +1724,11 @@ var init_userList = __esm({
|
|
|
1709
1724
|
"src/pages/permission/userList/index.tsx"() {
|
|
1710
1725
|
init_highlight();
|
|
1711
1726
|
init_locale();
|
|
1727
|
+
init_modal2();
|
|
1712
1728
|
init_permissionButton();
|
|
1713
1729
|
init_queryList();
|
|
1714
1730
|
init_toolkitsProvider();
|
|
1715
1731
|
init_permission2();
|
|
1716
|
-
init_formModal();
|
|
1717
1732
|
({ Option: Option3 } = Select);
|
|
1718
1733
|
url2 = "/api/usystem/user/list";
|
|
1719
1734
|
useModal2 = (isCreate) => {
|
|
@@ -1900,12 +1915,12 @@ var init_roleList = __esm({
|
|
|
1900
1915
|
"src/pages/permission/roleList/index.tsx"() {
|
|
1901
1916
|
init_highlight();
|
|
1902
1917
|
init_locale();
|
|
1918
|
+
init_modal2();
|
|
1903
1919
|
init_permissionButton();
|
|
1904
1920
|
init_queryList();
|
|
1905
|
-
|
|
1921
|
+
init_stores3();
|
|
1906
1922
|
init_toolkitsProvider();
|
|
1907
1923
|
init_permission2();
|
|
1908
|
-
init_formModal();
|
|
1909
1924
|
init_permission();
|
|
1910
1925
|
url3 = "/api/usystem/role/list";
|
|
1911
1926
|
useModal3 = (isCreate) => {
|
|
@@ -2627,11 +2642,22 @@ var useLayoutStore = create()(
|
|
|
2627
2642
|
var { Spin: Spin3, theme: theme3 } = Antd;
|
|
2628
2643
|
var { Header, Sider, Content } = Antd.Layout;
|
|
2629
2644
|
var Layout2 = (props) => {
|
|
2630
|
-
const {
|
|
2645
|
+
const {
|
|
2646
|
+
menuCollapsible,
|
|
2647
|
+
isMenuLoading,
|
|
2648
|
+
title,
|
|
2649
|
+
items,
|
|
2650
|
+
headerExtra,
|
|
2651
|
+
children,
|
|
2652
|
+
navWidth,
|
|
2653
|
+
hideGame,
|
|
2654
|
+
filter,
|
|
2655
|
+
onGameChange
|
|
2656
|
+
} = props;
|
|
2631
2657
|
const {
|
|
2632
2658
|
token: { colorBgContainer, colorBorder }
|
|
2633
2659
|
} = theme3.useToken();
|
|
2634
|
-
const { usePermissionApiV2
|
|
2660
|
+
const { usePermissionApiV2 } = useToolkitsStore((s) => s);
|
|
2635
2661
|
const { collapsed, setCollapsed } = useLayoutStore();
|
|
2636
2662
|
const onCollapse = async () => {
|
|
2637
2663
|
setCollapsed(!collapsed);
|
|
@@ -2723,6 +2749,7 @@ var Layout2 = (props) => {
|
|
|
2723
2749
|
var Layout_default = Layout2;
|
|
2724
2750
|
|
|
2725
2751
|
// src/index.ts
|
|
2752
|
+
init_modal2();
|
|
2726
2753
|
init_permissionButton();
|
|
2727
2754
|
init_queryList();
|
|
2728
2755
|
|
|
@@ -2757,6 +2784,7 @@ var RequirePermission_default = RequirePermission;
|
|
|
2757
2784
|
init_toolkitsProvider();
|
|
2758
2785
|
init_constants();
|
|
2759
2786
|
init_menu();
|
|
2787
|
+
init_permission();
|
|
2760
2788
|
var MenuItemList2 = lazy(() => Promise.resolve().then(() => (init_menuItemList(), menuItemList_exports)));
|
|
2761
2789
|
var CreateMenuItem2 = lazy(() => Promise.resolve().then(() => (init_createMenuItem(), createMenuItem_exports)));
|
|
2762
2790
|
var UpdateMenuItem = lazy(() => Promise.resolve().then(() => (init_updateMenuItem(), updateMenuItem_exports)));
|
|
@@ -2954,6 +2982,6 @@ var signIn_default = SignIn;
|
|
|
2954
2982
|
// src/index.ts
|
|
2955
2983
|
init_storage();
|
|
2956
2984
|
|
|
2957
|
-
export { APP_ID_HEADER, DynamicTags_default as DynamicTags, ExpandableParagraph_default as ExpandableParagraph, FRONTEND_ROUTE_PREFIX, FilterFormWrapper_default as FilterFormWrapper, Highlight_default as Highlight, InfiniteList_default as InfiniteList, Layout_default as Layout, NavMenu_default as NavMenu, notFound_default as NotFound, operationLogList_default as OperationLogList, PermissionButton_default as PermissionButton, QueryList_default as QueryList, QueryListAction, RequirePermission_default as RequirePermission, SSO_URL, signIn_default as SignIn, Provider_default as ToolkitsProvider, UserWidget_default as UserWidget, menu_default as menuRoutes, mixedStorage, permission_default as permissionRoutes, toolkitsStore, useFormModal, useLayoutStore, useMenuList, useModal,
|
|
2985
|
+
export { APP_ID_HEADER, DynamicTags_default as DynamicTags, ExpandableParagraph_default as ExpandableParagraph, FRONTEND_ROUTE_PREFIX, FilterFormWrapper_default as FilterFormWrapper, Highlight_default as Highlight, InfiniteList_default as InfiniteList, Layout_default as Layout, NavMenu_default as NavMenu, notFound_default as NotFound, operationLogList_default as OperationLogList, PermissionButton_default as PermissionButton, QueryList_default as QueryList, QueryListAction, RequirePermission_default as RequirePermission, SSO_URL, signIn_default as SignIn, Provider_default as ToolkitsProvider, UserWidget_default as UserWidget, menu_default as menuRoutes, mixedStorage, permission_default as permissionRoutes, toolkitsStore, useFormModal, useLayoutStore, useMenuList, useModal, usePermission, usePermissions, useQueryListStore, useToolkitsStore, withContext };
|
|
2958
2986
|
//# sourceMappingURL=index.js.map
|
|
2959
2987
|
//# sourceMappingURL=index.js.map
|