react-toolkits 2.26.1 → 2.27.1
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 +1 -1
- package/lib/index.d.ts +159 -30
- package/lib/index.js +3 -2
- package/lib/index.js.map +1 -1
- package/package.json +20 -21
- package/lib/chunk-24U2EF5M.js +0 -2
- package/lib/chunk-24U2EF5M.js.map +0 -1
- package/lib/chunk-5QAEUAZE.js +0 -2
- package/lib/chunk-5QAEUAZE.js.map +0 -1
- package/lib/chunk-D5YXBSTI.js +0 -2
- package/lib/chunk-D5YXBSTI.js.map +0 -1
- package/lib/chunk-F2GDEOP4.js +0 -3
- package/lib/chunk-F2GDEOP4.js.map +0 -1
- package/lib/chunk-FIT6S4UM.js +0 -2
- package/lib/chunk-FIT6S4UM.js.map +0 -1
- package/lib/chunk-JDCSIJL7.js +0 -2
- package/lib/chunk-JDCSIJL7.js.map +0 -1
- package/lib/chunk-KZHYK554.js +0 -2
- package/lib/chunk-KZHYK554.js.map +0 -1
- package/lib/chunk-MVG7YFPB.js +0 -2
- package/lib/chunk-MVG7YFPB.js.map +0 -1
- package/lib/chunk-P5T74EXP.js +0 -2
- package/lib/chunk-P5T74EXP.js.map +0 -1
- package/lib/createMenuItem-Q5TJGFKZ.js +0 -2
- package/lib/createMenuItem-Q5TJGFKZ.js.map +0 -1
- package/lib/menuItemList-5QGQYB3N.js +0 -2
- package/lib/menuItemList-5QGQYB3N.js.map +0 -1
- package/lib/roleDetail-ODJVDVB4.js +0 -2
- package/lib/roleDetail-ODJVDVB4.js.map +0 -1
- package/lib/roleList-ATJYWJ6Q.js +0 -2
- package/lib/roleList-ATJYWJ6Q.js.map +0 -1
- package/lib/updateMenuItem-4HDRJAY7.js +0 -2
- package/lib/updateMenuItem-4HDRJAY7.js.map +0 -1
- package/lib/userDetail-B5H4A4X2.js +0 -2
- package/lib/userDetail-B5H4A4X2.js.map +0 -1
- package/lib/userList-7CQLR3HK.js +0 -2
- package/lib/userList-7CQLR3HK.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# react-toolkits
|
|
2
2
|
|
|
3
|
+
## 2.27.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 908ad9e: refactor: update visibility store implementation and improve InfiniteList component
|
|
8
|
+
|
|
9
|
+
## 2.27.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- c283168: chore: update dependencies and refactor components for improved functionality
|
|
14
|
+
|
|
3
15
|
## 2.26.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/lib/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-inset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root{--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-50:oklch(97% .014 254.604);--color-purple-50:oklch(97.7% .014 308.299);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-white:#fff;--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:1.42857;--text-base:1rem;--text-base--line-height:1.5;--text-xl:1.25rem;--text-xl--line-height:1.4;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--leading-tight:1.25;--radius-lg:.5rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0,0,.2,1);--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{border:0 solid;box-sizing:border-box;margin:0;padding:0}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}strong{font-weight:bolder}code{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}table{border-collapse:collapse;border-color:inherit;text-indent:0}menu{list-style:none}img,object,svg{display:block;vertical-align:middle}img{height:auto;max-width:100%}button,select{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}::file-selector-button{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}}@layer antd,components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.top-0{top:calc(var(--spacing)*0)}.top-6{top:calc(var(--spacing)*6)}.right-6{right:calc(var(--spacing)*6)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-6{left:calc(var(--spacing)*6)}.z-10{z-index:10}.z-20{z-index:20}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-4{margin-inline:calc(var(--spacing)*4)}.my-6{margin-block:calc(var(--spacing)*6)}.my-12{margin-block:calc(var(--spacing)*12)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mr-6{margin-right:calc(var(--spacing)*6)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.mb-12{margin-bottom:calc(var(--spacing)*12)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.hidden{display:none}.inline{display:inline}.h-12{height:calc(var(--spacing)*12)}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.w-8{width:calc(var(--spacing)*8)}.w-40{width:calc(var(--spacing)*40)}.w-full{width:100%}.w-screen{width:100vw}.max-w-full{max-width:100%}.max-w-none{max-width:none}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.grow-0{flex-grow:0}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-4{gap:calc(var(--spacing)*4)}.gap-8{gap:calc(var(--spacing)*8)}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-0{border-right-style:var(--tw-border-style);border-right-width:0}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-200{border-color:var(--color-gray-200)}.bg-linear-to-br{--tw-gradient-position:to bottom right}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-br{--tw-gradient-position:to bottom right in oklab}}.bg-linear-to-br{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-r{--tw-gradient-position:to right}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-r{--tw-gradient-position:to right in oklab}}.bg-linear-to-r{background-image:linear-gradient(var(--tw-gradient-stops))}.from-blue-50{--tw-gradient-from:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-gray-800{--tw-gradient-from:var(--color-gray-800);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-white{--tw-gradient-from:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.via-gray-700{--tw-gradient-via:var(--color-gray-700);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-gray-600{--tw-gradient-to:var(--color-gray-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-purple-50{--tw-gradient-to:var(--color-purple-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:calc(var(--spacing)*1)}.p-6{padding:calc(var(--spacing)*6)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-6{padding-block:calc(var(--spacing)*6)}.text-center{text-align:center}.text-end{text-align:end}.text-start{text-align:start}.align-top{vertical-align:top}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{font-weight:var(--font-weight-bold)}.font-medium{font-weight:var(--font-weight-medium)}.font-semibold{font-weight:var(--font-weight-semibold)}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-gray-500{color:var(--color-gray-500)}.text-transparent{color:#0000}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040)}.shadow-2xl,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}
|
|
1
|
+
@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-inset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root{--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-50:oklch(97% .014 254.604);--color-purple-50:oklch(97.7% .014 308.299);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-white:#fff;--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:1.42857;--text-base:1rem;--text-base--line-height:1.5;--text-xl:1.25rem;--text-xl--line-height:1.4;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--leading-tight:1.25;--radius-lg:.5rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0,0,.2,1);--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{border:0 solid;box-sizing:border-box;margin:0;padding:0}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}strong{font-weight:bolder}code{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}table{border-collapse:collapse;border-color:inherit;text-indent:0}menu{list-style:none}img,object,svg{display:block;vertical-align:middle}img{height:auto;max-width:100%}button,select{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}::file-selector-button{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}}@layer antd,components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.top-0{top:calc(var(--spacing)*0)}.top-6{top:calc(var(--spacing)*6)}.right-6{right:calc(var(--spacing)*6)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-6{left:calc(var(--spacing)*6)}.z-10{z-index:10}.z-20{z-index:20}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-4{margin-inline:calc(var(--spacing)*4)}.my-6{margin-block:calc(var(--spacing)*6)}.my-12{margin-block:calc(var(--spacing)*12)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mr-6{margin-right:calc(var(--spacing)*6)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.mb-12{margin-bottom:calc(var(--spacing)*12)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.hidden{display:none}.inline{display:inline}.h-12{height:calc(var(--spacing)*12)}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.w-8{width:calc(var(--spacing)*8)}.w-40{width:calc(var(--spacing)*40)}.w-full{width:100%}.w-screen{width:100vw}.max-w-full{max-width:100%}.max-w-none{max-width:none}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.grow-0{flex-grow:0}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-4{gap:calc(var(--spacing)*4)}.gap-8{gap:calc(var(--spacing)*8)}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-0{border-right-style:var(--tw-border-style);border-right-width:0}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-gray-200{border-color:var(--color-gray-200)}.bg-linear-to-br{--tw-gradient-position:to bottom right}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-br{--tw-gradient-position:to bottom right in oklab}}.bg-linear-to-br{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-r{--tw-gradient-position:to right}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-r{--tw-gradient-position:to right in oklab}}.bg-linear-to-r{background-image:linear-gradient(var(--tw-gradient-stops))}.from-blue-50{--tw-gradient-from:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-gray-800{--tw-gradient-from:var(--color-gray-800);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-white{--tw-gradient-from:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.via-gray-700{--tw-gradient-via:var(--color-gray-700);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-gray-600{--tw-gradient-to:var(--color-gray-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-purple-50{--tw-gradient-to:var(--color-purple-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:calc(var(--spacing)*1)}.p-6{padding:calc(var(--spacing)*6)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-6{padding-block:calc(var(--spacing)*6)}.text-center{text-align:center}.text-end{text-align:end}.text-start{text-align:start}.align-top{vertical-align:top}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{font-weight:var(--font-weight-bold)}.font-medium{font-weight:var(--font-weight-medium)}.font-semibold{font-weight:var(--font-weight-semibold)}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-gray-500{color:var(--color-gray-500)}.text-transparent{color:#0000}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040)}.shadow-2xl,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
|
package/lib/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
7
7
|
import { AnyObject } from 'antd/es/_util/type';
|
|
8
8
|
import { TableProps } from 'antd/es/table';
|
|
9
9
|
import * as zustand from 'zustand';
|
|
10
|
+
import { StateCreator } from 'zustand';
|
|
10
11
|
import { ItemType, SubMenuType, MenuItemGroupType, MenuItemType } from 'antd/es/menu/interface';
|
|
11
12
|
import { Merge } from 'ts-essentials';
|
|
12
13
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
@@ -59,56 +60,172 @@ interface HighlightProps extends PropsWithChildren {
|
|
|
59
60
|
}
|
|
60
61
|
declare const Highlight: (props: HighlightProps) => react_jsx_runtime.JSX.Element;
|
|
61
62
|
|
|
63
|
+
/**
|
|
64
|
+
* 无限列表的载荷数据
|
|
65
|
+
* @template Values 表单值的类型
|
|
66
|
+
*/
|
|
62
67
|
interface InfiniteListPayload<Values = any> {
|
|
68
|
+
/** 当前页码(仅用于表单状态,实际分页参数通过 pageParam 传递) */
|
|
63
69
|
page?: number;
|
|
70
|
+
/** 表单筛选条件 */
|
|
64
71
|
filters?: Values;
|
|
65
72
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
headers?: Record<string, string> | ((form: FormInstance<Values>) => Record<string, string>);
|
|
73
|
+
/**
|
|
74
|
+
* 缓存配置
|
|
75
|
+
*/
|
|
76
|
+
interface CacheConfig$1 {
|
|
77
|
+
/** 缓存时间(毫秒),数据在缓存中保留的时间 */
|
|
72
78
|
cacheTime?: number;
|
|
79
|
+
/** 过期时间(毫秒),数据在过期前被认为是新鲜的 */
|
|
73
80
|
staleTime?: number;
|
|
74
81
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
/**
|
|
83
|
+
* HTTP 请求方法
|
|
84
|
+
*/
|
|
85
|
+
type HttpMethod$1 = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
|
|
86
|
+
/**
|
|
87
|
+
* 分页参数类型,支持多种分页方式:
|
|
88
|
+
* - number: 页码分页
|
|
89
|
+
* - string: 游标分页(cursor)
|
|
90
|
+
* - object: 复杂分页参数对象
|
|
91
|
+
* - undefined: 无下一页
|
|
92
|
+
*/
|
|
93
|
+
type PageParam = number | string | Record<string, any> | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* 请求体解析器
|
|
96
|
+
* 可以是静态值,也可以是动态函数
|
|
97
|
+
* @template Values 表单值的类型
|
|
98
|
+
* @template PageParamType 分页参数的类型(可能是 undefined,表示第一页)
|
|
99
|
+
*/
|
|
100
|
+
type RequestBodyResolver<Values = any, PageParamType = PageParam> = FormData | Record<string | number, any> | ((payload: InfiniteListPayload<Values>, pageParam: PageParamType | undefined) => FormData | Record<string | number, any>);
|
|
101
|
+
/**
|
|
102
|
+
* 请求参数解析器(用于 URL 查询参数)
|
|
103
|
+
* 可以是静态值,也可以是动态函数
|
|
104
|
+
* @template Values 表单值的类型
|
|
105
|
+
* @template PageParamType 分页参数的类型(可能是 undefined,表示第一页)
|
|
106
|
+
*/
|
|
107
|
+
type RequestParamsResolver<Values = any, PageParamType = PageParam> = Record<string | number, any> | ((payload: InfiniteListPayload<Values>, pageParam: PageParamType | undefined) => Record<string | number, any>);
|
|
108
|
+
/**
|
|
109
|
+
* 无限列表请求配置
|
|
110
|
+
* @template Values 表单值的类型
|
|
111
|
+
* @template PageParamType 分页参数的类型
|
|
112
|
+
*/
|
|
113
|
+
interface InfiniteListRequestConfig<Values = any, PageParamType = PageParam> extends CacheConfig$1 {
|
|
114
|
+
/** 请求 URL */
|
|
115
|
+
url: string;
|
|
116
|
+
/** HTTP 请求方法,默认为 GET */
|
|
117
|
+
method?: HttpMethod$1;
|
|
118
|
+
/** 请求体(用于 POST、PUT、PATCH、DELETE 等方法) */
|
|
119
|
+
body?: RequestBodyResolver<Values, PageParamType>;
|
|
120
|
+
/** URL 查询参数 */
|
|
121
|
+
searchParams?: RequestParamsResolver<Values, PageParamType>;
|
|
122
|
+
/** 请求头,可以是静态对象或动态函数 */
|
|
123
|
+
headers?: Record<string, string> | ((form: FormInstance<Values>) => Record<string, string>);
|
|
80
124
|
}
|
|
81
|
-
|
|
125
|
+
/**
|
|
126
|
+
* 无限列表请求配置类型
|
|
127
|
+
* 可以是静态配置,也可以是动态函数
|
|
128
|
+
* @template Values 表单值的类型
|
|
129
|
+
* @template PageParamType 分页参数的类型
|
|
130
|
+
*/
|
|
131
|
+
type InfiniteListRequestConfigType<Values = any, PageParamType = PageParam> = InfiniteListRequestConfig<Values, PageParamType> | ((payload: InfiniteListPayload<Values>, pageParam: PageParamType | undefined) => InfiniteListRequestConfig<Values, PageParamType>);
|
|
132
|
+
/**
|
|
133
|
+
* 数据适配器,用于转换和适配后端返回的数据格式
|
|
134
|
+
* @template Item 列表项类型
|
|
135
|
+
* @template Values 表单值类型
|
|
136
|
+
* @template Data 后端返回的数据类型
|
|
137
|
+
* @template PageParamType 分页参数的类型
|
|
138
|
+
*/
|
|
139
|
+
interface InfiniteListDataAdapter<Item = any, Values = any, Data = any, PageParamType = PageParam> {
|
|
140
|
+
/**
|
|
141
|
+
* 从后端数据中提取列表项
|
|
142
|
+
* @param data 所有已加载的页面数据
|
|
143
|
+
* @param form 表单实例
|
|
144
|
+
* @returns 提取的列表项数组
|
|
145
|
+
*/
|
|
82
146
|
items?: (data: Data[] | undefined, form: FormInstance<Values>) => Item[] | undefined;
|
|
147
|
+
/**
|
|
148
|
+
* 判断是否还有更多数据
|
|
149
|
+
* @param lastPage 最后一页的数据
|
|
150
|
+
* @param allPages 所有已加载的页面数据
|
|
151
|
+
* @returns 是否还有更多数据
|
|
152
|
+
*/
|
|
83
153
|
hasMore?: (lastPage: Data | undefined, allPages: Data[]) => boolean;
|
|
84
|
-
|
|
154
|
+
/**
|
|
155
|
+
* 计算下一页的分页参数
|
|
156
|
+
* @param lastPage 最后一页的数据
|
|
157
|
+
* @param allPages 所有已加载的页面数据
|
|
158
|
+
* @param pageParam 当前的分页参数
|
|
159
|
+
* @returns 下一页的分页参数,返回 undefined 表示没有下一页
|
|
160
|
+
*/
|
|
161
|
+
nextPageParam?: (lastPage: Data | undefined, allPages: Data[], pageParam: PageParamType) => PageParamType | undefined;
|
|
85
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* InfiniteList 组件的引用对象,提供外部访问的 API
|
|
165
|
+
* @template Item 列表项类型
|
|
166
|
+
* @template Values 表单值类型
|
|
167
|
+
* @template Data 后端返回的数据类型
|
|
168
|
+
*/
|
|
86
169
|
interface InfiniteListRef<Item = any, Values = any, Data = any> {
|
|
170
|
+
/** 所有已加载的页面数据 */
|
|
87
171
|
data: Data[] | undefined;
|
|
172
|
+
/** 处理后的列表数据源 */
|
|
88
173
|
dataSource: Item[] | undefined;
|
|
174
|
+
/** 表单实例 */
|
|
89
175
|
form: FormInstance<Values>;
|
|
176
|
+
/** 重新获取数据 */
|
|
90
177
|
refetch: () => void;
|
|
178
|
+
/** 获取下一页数据 */
|
|
91
179
|
fetchNextPage: () => void;
|
|
180
|
+
/** 是否还有下一页 */
|
|
92
181
|
hasNextPage: boolean;
|
|
182
|
+
/** 是否正在获取下一页 */
|
|
93
183
|
isFetchingNextPage: boolean;
|
|
94
184
|
}
|
|
95
|
-
|
|
185
|
+
/**
|
|
186
|
+
* InfiniteList 组件的属性
|
|
187
|
+
* @template Item 列表项类型
|
|
188
|
+
* @template Values 表单值类型
|
|
189
|
+
* @template Data 后端返回的数据类型
|
|
190
|
+
* @template PageParamType 分页参数的类型
|
|
191
|
+
*/
|
|
192
|
+
interface InfiniteListProps<Item, Values, Data, PageParamType = PageParam> extends Omit<TableProps<Item>, 'pagination' | 'dataSource' | 'loading' | 'footer'>, Pick<FilterFormWrapperProps, 'buttonsAlign' | 'showReset'> {
|
|
193
|
+
/** 唯一标识符,用于在 store 中区分不同的列表实例 */
|
|
96
194
|
identifier?: string;
|
|
195
|
+
/** 权限代码,用于权限控制 */
|
|
97
196
|
code?: string;
|
|
197
|
+
/** 表单实例,如果不提供则内部创建 */
|
|
98
198
|
form?: FormInstance<Values>;
|
|
199
|
+
/** 自动刷新间隔(毫秒),0 表示不自动刷新 */
|
|
99
200
|
refreshInterval?: number;
|
|
100
|
-
|
|
201
|
+
/** 请求配置,可以是静态配置或动态函数 */
|
|
202
|
+
request: InfiniteListRequestConfigType<Values, PageParamType>;
|
|
203
|
+
/** 表格额外内容,可以是静态内容或动态函数 */
|
|
101
204
|
tableExtra?: ReactNode | ((form: FormInstance<Values>, data?: Data[]) => ReactNode);
|
|
205
|
+
/** 自定义表单渲染函数 */
|
|
102
206
|
renderForm?: (form: FormInstance<Values>) => ReactElement;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
207
|
+
/** 请求成功后的回调 */
|
|
208
|
+
afterSuccess?: (form: FormInstance<Values>, data?: Data[]) => void;
|
|
209
|
+
/** 请求失败后的回调 */
|
|
210
|
+
afterError?: (error: Error, form: FormInstance<Values>) => void;
|
|
211
|
+
/** 数据适配器,用于转换后端数据格式 */
|
|
212
|
+
dataAdapter?: InfiniteListDataAdapter<Item, Values, Data, PageParamType>;
|
|
213
|
+
/** 初始分页参数,默认为 0 */
|
|
214
|
+
initialPageParam?: PageParamType;
|
|
215
|
+
/** 表格底部内容,可以是静态内容或动态函数 */
|
|
107
216
|
footer?: (data: Data[] | undefined) => ReactNode;
|
|
108
217
|
}
|
|
109
|
-
|
|
218
|
+
/**
|
|
219
|
+
* InfiniteList 组件
|
|
220
|
+
* @template Item 列表项类型
|
|
221
|
+
* @template Values 表单值类型
|
|
222
|
+
* @template Data 后端返回的数据类型
|
|
223
|
+
* @template PageParamType 分页参数的类型
|
|
224
|
+
*/
|
|
225
|
+
declare function InfiniteListComponent<Item extends AnyObject = AnyObject, Values extends object | undefined = undefined, Data = any, PageParamType = PageParam>(props: InfiniteListProps<Item, Values, Data, PageParamType> & {
|
|
110
226
|
ref?: Ref<InfiniteListRef<Item, Values, Data>>;
|
|
111
|
-
})
|
|
227
|
+
}): ReactElement;
|
|
228
|
+
declare const InfiniteList: typeof InfiniteListComponent;
|
|
112
229
|
|
|
113
230
|
type InfiniteQueryRefetchFunction = () => void | Promise<unknown>;
|
|
114
231
|
type InfiniteQueryFetchNextPageFunction = () => void | Promise<unknown>;
|
|
@@ -248,8 +365,12 @@ type LogoProps = Omit<DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTM
|
|
|
248
365
|
declare const Logo: FC<LogoProps>;
|
|
249
366
|
|
|
250
367
|
interface ListResponse<T = any> {
|
|
251
|
-
|
|
252
|
-
|
|
368
|
+
code: number;
|
|
369
|
+
data: {
|
|
370
|
+
list: T[];
|
|
371
|
+
total: number;
|
|
372
|
+
};
|
|
373
|
+
msg: string;
|
|
253
374
|
}
|
|
254
375
|
interface QueryListPayload<Values = any> {
|
|
255
376
|
page?: number;
|
|
@@ -609,11 +730,11 @@ interface VisibilityState {
|
|
|
609
730
|
cleanup: (uuid: number) => void;
|
|
610
731
|
}
|
|
611
732
|
/**
|
|
612
|
-
*
|
|
613
|
-
*
|
|
614
|
-
*
|
|
733
|
+
* 创建可见性管理的 Zustand store 配置
|
|
734
|
+
* 这是一个纯函数,返回 store 的配置对象
|
|
735
|
+
* 使用函数形式延迟执行,避免模块初始化顺序问题
|
|
615
736
|
*/
|
|
616
|
-
declare function
|
|
737
|
+
declare function createVisibilityStoreConfig(): StateCreator<VisibilityState, [], [], VisibilityState>;
|
|
617
738
|
|
|
618
739
|
declare const generateId: () => number;
|
|
619
740
|
|
|
@@ -625,7 +746,11 @@ declare const generateId: () => number;
|
|
|
625
746
|
*/
|
|
626
747
|
declare const mixedStorage: StateStorage;
|
|
627
748
|
|
|
628
|
-
|
|
749
|
+
/**
|
|
750
|
+
* Drawer store hook
|
|
751
|
+
* 使用 lazy initialization 确保 create 函数在调用时已经准备好
|
|
752
|
+
*/
|
|
753
|
+
declare function useDrawerStore(): VisibilityState;
|
|
629
754
|
|
|
630
755
|
interface UseModalOperation {
|
|
631
756
|
hide: () => void;
|
|
@@ -663,7 +788,11 @@ interface UseFormModalReturn<Values extends AnyObject, ExtraValues> {
|
|
|
663
788
|
}
|
|
664
789
|
declare function useFormModal<Values extends AnyObject = AnyObject, ExtraValues = Record<string, unknown>>(props: UseFormModalProps<Values, ExtraValues>): UseFormModalReturn<Values, ExtraValues>;
|
|
665
790
|
|
|
666
|
-
|
|
791
|
+
/**
|
|
792
|
+
* Modal store hook
|
|
793
|
+
* 使用 lazy initialization 确保 create 函数在调用时已经准备好
|
|
794
|
+
*/
|
|
795
|
+
declare function useModalStore(): VisibilityState;
|
|
667
796
|
|
|
668
797
|
declare const _default$1: react_jsx_runtime.JSX.Element;
|
|
669
798
|
|
|
@@ -872,4 +1001,4 @@ declare function useAuth(code?: string | string[], config?: Options): {
|
|
|
872
1001
|
declare function useMenuList(): _tanstack_react_query.UseQueryResult<MenuListItem[], Error>;
|
|
873
1002
|
declare const useGames: () => _tanstack_react_query.UseQueryResult<Game[], Error>;
|
|
874
1003
|
|
|
875
|
-
export { APP_ID_HEADER, AuthButton, type AuthButtonProps, DynamicTags, type DynamicTagsProps, ExpandableParagraph, type ExpandableParagraphProps, FRONTEND_ROUTE_PREFIX, FilterFormWrapper, type FilterFormWrapperProps, type Game, GameSelect, type GameSelectConfig, type GameSelectProps, type HeaderExtra, type HeaderExtraConfig, Highlight, type HighlightProps, InfiniteList,
|
|
1004
|
+
export { APP_ID_HEADER, AuthButton, type AuthButtonProps, type CacheConfig$1 as CacheConfig, DynamicTags, type DynamicTagsProps, ExpandableParagraph, type ExpandableParagraphProps, FRONTEND_ROUTE_PREFIX, FilterFormWrapper, type FilterFormWrapperProps, type Game, GameSelect, type GameSelectConfig, type GameSelectProps, type HeaderExtra, type HeaderExtraConfig, Highlight, type HighlightProps, type HttpMethod$1 as HttpMethod, InfiniteList, type InfiniteListDataAdapter, type InfiniteListPayload, type InfiniteListProps, type InfiniteListRef, type InfiniteListRequestConfig, type InfiniteListRequestConfigType, Layout, type LayoutProps, Logo, type LogoProps, type MenuListItem, Nav, type NavItem, type NavigationConfig, NotFound, OperationLogList, type Permission, PermissionMode, QueryList, QueryListAction, type QueryListPayload, type QueryListProps, type QueryListRef, type RecursivePartial, RequireAuth, type RequireAuthProps, _default$2 as RequireGame, type RouteMatchRule, SSO_URL, SignIn, ToolkitsProvider, type ToolkitsProviderProps, type UseFormDrawerProps, type UseFormModalProps, UserDropdown, type VisibilityState, WILDCARD, createVisibilityStoreConfig, generateId, _default$1 as menu, mixedStorage, _default as permission, useAuth, useDrawer, useDrawerStore, useFormDrawer, useFormModal, useGames, useInfiniteListStore, useMenuList, useModal, useModalStore, useQueryListStore, useToolkitsStore };
|