intable 0.0.35 → 0.0.36
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/LICENSE +21 -21
- package/README.md +10 -10
- package/dist/__uno.css +1 -1
- package/dist/components/Menu.js +49 -58
- package/dist/components/Render.js +16 -9
- package/dist/index.js +3 -3
- package/dist/plugins/FilterPlugin.js +3 -3
- package/dist/plugins/MenuPlugin.js +90 -71
- package/dist/style.css +2 -2
- package/dist/theme/antd.scss +41 -41
- package/dist/theme/dark.scss +46 -46
- package/dist/theme/element-plus.scss +38 -38
- package/dist/theme/github.scss +80 -80
- package/dist/theme/material.scss +73 -73
- package/dist/theme/shadcn.scss +66 -66
- package/dist/theme/stripe.scss +57 -57
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 huodoushigemi
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 huodoushigemi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: intable
|
|
3
|
-
description: A high-performance, plugin-based Excel-like table component for SolidJS with virtual scroll, cell editing, validation, copy/paste, row grouping, tree data, column/row drag, merge cells, diff view, and multi-framework support (Vue, React).
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# intable
|
|
7
|
-
|
|
8
|
-
## [🚀 在线体验 Demo](https://huodoushigemi.github.io/intable)
|
|
9
|
-
|
|
10
|
-
## [📃 文档 Docs](https://github.com/huodoushigemi/intable/blob/main/.github/instructions/intable-scenarios.instructions.md)
|
|
1
|
+
---
|
|
2
|
+
name: intable
|
|
3
|
+
description: A high-performance, plugin-based Excel-like table component for SolidJS with virtual scroll, cell editing, validation, copy/paste, row grouping, tree data, column/row drag, merge cells, diff view, and multi-framework support (Vue, React).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# intable
|
|
7
|
+
|
|
8
|
+
## [🚀 在线体验 Demo](https://huodoushigemi.github.io/intable)
|
|
9
|
+
|
|
10
|
+
## [📃 文档 Docs](https://github.com/huodoushigemi/intable/blob/main/.github/instructions/intable-scenarios.instructions.md)
|
package/dist/__uno.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--un-bg-opacity:100%;--un-leading:initial;--un-content:"";--un-translate-x:initial;--un-translate-y:initial;--un-translate-z:initial;--un-text-opacity:100%;--un-border-opacity:100%;--un-space-y-reverse:initial;--un-space-x-reverse:initial;--un-outline-style:solid;--un-outline-opacity:100%}}@property --un-text-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-leading{syntax:"*";inherits:false}@property --un-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --un-outline-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-border-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-bg-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-inset-ring-color{syntax:"*";inherits:false}@property --un-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-inset-shadow-color{syntax:"*";inherits:false}@property --un-ring-color{syntax:"*";inherits:false}@property --un-ring-inset{syntax:"*";inherits:false}@property --un-ring-offset-color{syntax:"*";inherits:false}@property --un-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --un-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-shadow-color{syntax:"*";inherits:false}@property --un-translate-x{syntax:"*";inherits:false;initial-value:0}@property --un-translate-y{syntax:"*";inherits:false;initial-value:0}@property --un-translate-z{syntax:"*";inherits:false;initial-value:0}@property --un-numeric-figure{syntax:"*";inherits:false}@property --un-numeric-fraction{syntax:"*";inherits:false}@property --un-numeric-spacing{syntax:"*";inherits:false}@property --un-ordinal{syntax:"*";inherits:false}@property --un-slashed-zero{syntax:"*";inherits:false}@property --un-space-y-reverse{syntax:"*";inherits:false;initial-value:0}:root,:host{--spacing:.25rem;--radius-DEFAULT:.25rem;--colors-gray-DEFAULT:#99a1af;--leading-snug:1.375;--colors-gray-800:#1e2939;--colors-white:#fff;--colors-gray-100:#f3f4f6;--colors-gray-900:#101828;--text-sm-fontSize:.875rem;--text-sm-lineHeight:1.25rem;--text-xs-fontSize:.75rem;--text-xs-lineHeight:1rem;--default-transition-timingFunction:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--radius-md:.375rem;--radius-xl:.75rem;--fontWeight-medium:500;--fontWeight-semibold:600;--tracking-wide:.025em;--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--radius-sm:.25rem;--colors-blue-DEFAULT:#54a2ff;--colors-red-DEFAULT:#ff6568;--text-2xl-fontSize:1.5rem;--text-2xl-lineHeight:2rem;--colors-green-DEFAULT:#05df72;--colors-black:#000;--font-sans:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--default-font-family:var(--font-sans);--default-monoFont-family:var(--font-mono)}@supports (color:lab(0% 0 0)){:root,:host{--colors-gray-DEFAULT:lab(65.9269% -.832677 -8.17474);--colors-gray-800:lab(16.1051% -1.18239 -11.7533);--colors-gray-100:lab(96.1596% -.082314 -1.13575);--colors-gray-900:lab(8.11897% .811271 -12.254);--colors-blue-DEFAULT:lab(65.0361% -1.42065 -56.9802);--colors-red-DEFAULT:lab(63.7053% 60.745 31.3109);--colors-green-DEFAULT:lab(78.503% -64.9264 39.7492)}}*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-featureSettings,normal);font-variation-settings:var(--default-font-variationSettings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-monoFont-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-monoFont-featureSettings,normal);font-variation-settings:var(--default-monoFont-variationSettings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}textarea{resize:vertical}::-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{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden~=until-found])){display:none!important}.container{width:100%}.aic{align-items:center}@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}}.text-2xl{font-size:var(--text-2xl-fontSize);line-height:var(--un-leading,var(--text-2xl-lineHeight))}.text-3{font-size:.75rem}.text-3\.5{font-size:.875rem}.text-4{font-size:1rem}.text-sm{font-size:var(--text-sm-fontSize);line-height:var(--un-leading,var(--text-sm-lineHeight))}.text-xs{font-size:var(--text-xs-fontSize);line-height:var(--un-leading,var(--text-xs-lineHeight))}.c-\[--c-primary\]{color:color-mix(in oklab,var(--c-primary)var(--un-text-opacity),transparent)}.c-\#1e3a8a{color:color-mix(in oklab,#1e3a8a var(--un-text-opacity),transparent)}.c-\#7c2d12{color:color-mix(in oklab,#7c2d12 var(--un-text-opacity),transparent)}.c-blue{color:color-mix(in srgb,var(--colors-blue-DEFAULT)var(--un-text-opacity),transparent)}.c-gray\/70{color:color-mix(in srgb,var(--colors-gray-DEFAULT)70%,transparent)}.c-red\/75{color:color-mix(in srgb,var(--colors-red-DEFAULT)75%,transparent)}.leading-5{--un-leading:calc(4px*5);line-height:20px}.lh-\[1\]{--un-leading:1;line-height:1}.tracking-wide{--un-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.font-medium{--un-font-weight:var(--fontWeight-medium);font-weight:var(--fontWeight-medium)}.font-mono{font-family:var(--font-mono)}.font-semibold{--un-font-weight:var(--fontWeight-semibold);font-weight:var(--fontWeight-semibold)}.m9{margin:36px}.mx-1{margin-inline:4px}.mx-3\!{margin-inline:12px!important}.my-1{margin-block:4px}.ml{margin-left:16px}.ml-\.5{margin-left:2px}.ml-1{margin-left:4px}.mr--1{margin-right:-4px}.mr-1{margin-right:4px}.mr-2{margin-right:8px}.mr-2\.5{margin-right:10px}.mt-1{margin-top:4px}.p-1{padding:4px}.p-4\!{padding:16px!important}.px,.px-4{padding-inline:16px}.px-1\.5{padding-inline:6px}.px-2{padding-inline:8px}.px-3{padding-inline:12px}.py-1{padding-block:4px}.py-1\.5{padding-block:6px}.py-2{padding-block:8px}.pl-1{padding-left:4px}.pl-4{padding-left:16px}.pr-4{padding-right:16px}.ps{padding-inline-start:16px}.outline-0{outline-style:var(--un-outline-style);outline-width:0}.outline-1\.5px{outline-style:var(--un-outline-style);outline-width:1.5px}.outline-2{outline-style:var(--un-outline-style);outline-width:2px}.outline-\[--c-primary\]{outline-color:color-mix(in oklab,var(--c-primary)var(--un-outline-opacity),transparent)}.outline-blue{outline-color:color-mix(in srgb,var(--colors-blue-DEFAULT)var(--un-outline-opacity),transparent)}.outline-none{--un-outline-style:none;outline-style:none}.outline-solid{--un-outline-style:solid;outline-style:solid}.b,.b-1,.border{border-width:1px}.b-2px{border-width:2px}.b-r-0{border-right-width:0}.b-\[--table-bg\]{border-color:color-mix(in oklab,var(--table-bg)var(--un-border-opacity),transparent)}.b-\#00000000\!{border-color:color-mix(in oklab,#0000 var(--un-border-opacity),transparent)!important}.b-\#4f7ff0{border-color:color-mix(in oklab,#4f7ff0 var(--un-border-opacity),transparent)}.b-\#f59e0b{border-color:color-mix(in oklab,#f59e0b var(--un-border-opacity),transparent)}.rd-1{border-radius:.25rem}.rd-1\.5{border-radius:.375rem}.rd-2{border-radius:.5rem}.rd-sm{border-radius:var(--radius-sm)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rd-l-4{border-top-left-radius:1rem;border-bottom-left-radius:1rem}.b-dashed{--un-border-style:dashed;border-style:dashed}.b-solid{--un-border-style:solid;border-style:solid}.bg-\[--c-primary\]{background-color:color-mix(in oklab,var(--c-primary)var(--un-bg-opacity),transparent)}.bg-\[--table-bg\]{background-color:color-mix(in oklab,var(--table-bg)var(--un-bg-opacity),transparent)}.bg-\[--table-header-bg\]{background-color:color-mix(in oklab,var(--table-header-bg)var(--un-bg-opacity),transparent)}.bg-\#dbe6ff\/75{background-color:#dbe6ffbf;background-color:lab(91.0303% -.143617 -13.4803/.75)}.bg-\#fff{background-color:color-mix(in oklab,#fff var(--un-bg-opacity),transparent)}.bg-\#fff3d6\/85{background-color:#fff3d6d9;background-color:lab(96.236% .744313 15.5662/.85)}.bg-blue\/20\!{background-color:color-mix(in srgb,var(--colors-blue-DEFAULT)20%,transparent)!important}.bg-gray\/20{background-color:color-mix(in srgb,var(--colors-gray-DEFAULT)20%,transparent)}.bg-green\!{background-color:color-mix(in srgb,var(--colors-green-DEFAULT)var(--un-bg-opacity),transparent)!important}.bg-red\!{background-color:color-mix(in srgb,var(--colors-red-DEFAULT)var(--un-bg-opacity),transparent)!important}.bg-transparent{background-color:#0000}.hover\:bg-\[--li-hover-bg\]:hover{background-color:color-mix(in oklab,var(--li-hover-bg)var(--un-bg-opacity),transparent)}.hover\:bg-black\/8:hover{background-color:color-mix(in srgb,var(--colors-black)8%,transparent)}.op-0{opacity:0}.op-15{opacity:.15}.op-60{opacity:.6}.op-75{opacity:.75}.op40{opacity:.4}.opacity-50{opacity:.5}.group:hover .group-hover\:op-100{opacity:1}.hover\:underline:hover{text-decoration-line:underline}.flex{display:flex}.flex-1{flex:1}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.gap-1{gap:4px}.gap-1\.5{gap:6px}.gap-2{gap:8px}.grid{display:grid}.size-3\.5{width:14px;height:14px}.size-4\!{width:16px!important;height:16px!important}.size-full{width:100%;height:100%}.h-1\!{height:4px!important}.h-2\.5{height:10px}.h-3\.5{height:14px}.h-6{height:24px}.h-6\.5{height:26px}.h-a\!{height:auto!important}.h-full{height:100%}.max-h-100{max-height:400px}.max-h-60{max-height:240px}.max-h-inherit{max-height:inherit}.min-h-16{min-height:64px}.min-h-40{min-height:160px}.min-h-a\!{min-height:auto!important}.min-w-24{min-width:96px}.min-w-44{min-width:176px}.min-w-52{min-width:208px}.w-10{width:40px}.w-10px\!{width:10px!important}.w-2\.5{width:10px}.w-3\.5{width:14px}.w-6\.5{width:26px}.w-a\!{width:auto!important}.w-full{width:100%}.after\:h-1:after{height:4px}.after\:w-1:after{width:4px}.inline{display:inline}.block{display:block}.inline-block{display:inline-block}.contents{display:contents}.hidden{display:none}.visible{visibility:visible}.collapse{visibility:collapse}.cursor-pointer{cursor:pointer}.cursor-crosshair{cursor:crosshair}.cursor-s-resize{cursor:s-resize}.cursor-w-resize{cursor:w-resize}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.resize{resize:both}.resize-none{resize:none}.select-none{-webkit-user-select:none;user-select:none}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.uppercase{text-transform:uppercase}.shadow-inner{--un-shadow:inset 0 2px 4px 0 var(--un-shadow-color,#0000000d);box-shadow:var(--un-inset-shadow),var(--un-inset-ring-shadow),var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-sm{--un-shadow:0 1px 3px 0 var(--un-shadow-color,#0000001a),0 1px 2px -1px var(--un-shadow-color,#0000001a);box-shadow:var(--un-inset-shadow),var(--un-inset-ring-shadow),var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-xl{--un-shadow:0 20px 25px -5px var(--un-shadow-color,#0000001a),0 8px 10px -6px var(--un-shadow-color,#0000001a);box-shadow:var(--un-inset-shadow),var(--un-inset-ring-shadow),var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.translate-x--1\/2{--un-translate-x:-50%;translate:var(--un-translate-x)var(--un-translate-y)}.translate-x-1\/2{--un-translate-x:50%;translate:var(--un-translate-x)var(--un-translate-y)}.translate-y--1\/2{--un-translate-y:-50%;translate:var(--un-translate-x)var(--un-translate-y)}.transform{transform:var(--un-rotate-x)var(--un-rotate-y)var(--un-rotate-z)var(--un-skew-x)var(--un-skew-y)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,--un-gradient-from,--un-gradient-via,--un-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--un-ease,var(--default-transition-timingFunction));transition-duration:var(--un-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--un-ease,var(--default-transition-timingFunction));transition-duration:var(--un-duration,var(--default-transition-duration))}.items-start{align-items:flex-start}.items-center{align-items:center}.box-border{box-sizing:border-box}.inset-0{inset:0}.bottom-0{bottom:0}.left--0,.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-1\/2{top:50%}.justify-end\!{justify-content:flex-end!important}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.z--1{z-index:-1}.z-1{z-index:1}.z-2{z-index:2}.z-9{z-index:9}.overflow-auto{overflow:auto}.of-y-auto{overflow-y:auto}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:1s linear infinite spin}.filter{filter:var(--un-blur,)var(--un-brightness,)var(--un-contrast,)var(--un-grayscale,)var(--un-hue-rotate,)var(--un-invert,)var(--un-saturate,)var(--un-sepia,)var(--un-drop-shadow,)}.table{display:table}.table-cell{display:table-cell}.tabular-nums{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal,)var(--un-slashed-zero,)var(--un-numeric-figure,)var(--un-numeric-spacing,)var(--un-numeric-fraction,)}:where(.space-y-5>:not(:last-child)){--un-space-y-reverse:0;margin-block-start:calc(calc(4px*5)*var(--un-space-y-reverse));margin-block-end:calc(calc(4px*5)*calc(1 - var(--un-space-y-reverse)))}@supports (color:color-mix(in lab, red, red)){.c-blue{color:color-mix(in oklab,var(--colors-blue-DEFAULT)var(--un-text-opacity),transparent)}.c-gray\/70{color:color-mix(in oklab,var(--colors-gray-DEFAULT)70%,transparent)}.c-red\/75{color:color-mix(in oklab,var(--colors-red-DEFAULT)75%,transparent)}.outline-blue{outline-color:color-mix(in oklab,var(--colors-blue-DEFAULT)var(--un-outline-opacity),transparent)}.bg-blue\/20\!{background-color:color-mix(in oklab,var(--colors-blue-DEFAULT)20%,transparent)!important}.bg-gray\/20{background-color:color-mix(in oklab,var(--colors-gray-DEFAULT)20%,transparent)}.bg-green\!{background-color:color-mix(in oklab,var(--colors-green-DEFAULT)var(--un-bg-opacity),transparent)!important}.bg-red\!{background-color:color-mix(in oklab,var(--colors-red-DEFAULT)var(--un-bg-opacity),transparent)!important}.hover\:bg-black\/8:hover{background-color:color-mix(in oklab,var(--colors-black)8%,transparent)}}
|
|
1
|
+
@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--un-bg-opacity:100%;--un-leading:initial;--un-content:"";--un-translate-x:initial;--un-translate-y:initial;--un-translate-z:initial;--un-text-opacity:100%;--un-border-opacity:100%;--un-space-y-reverse:initial;--un-space-x-reverse:initial;--un-outline-style:solid;--un-outline-opacity:100%}}@property --un-text-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-leading{syntax:"*";inherits:false}@property --un-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --un-outline-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-border-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-bg-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-inset-ring-color{syntax:"*";inherits:false}@property --un-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-inset-shadow-color{syntax:"*";inherits:false}@property --un-ring-color{syntax:"*";inherits:false}@property --un-ring-inset{syntax:"*";inherits:false}@property --un-ring-offset-color{syntax:"*";inherits:false}@property --un-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --un-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-shadow-color{syntax:"*";inherits:false}@property --un-translate-x{syntax:"*";inherits:false;initial-value:0}@property --un-translate-y{syntax:"*";inherits:false;initial-value:0}@property --un-translate-z{syntax:"*";inherits:false;initial-value:0}@property --un-numeric-figure{syntax:"*";inherits:false}@property --un-numeric-fraction{syntax:"*";inherits:false}@property --un-numeric-spacing{syntax:"*";inherits:false}@property --un-ordinal{syntax:"*";inherits:false}@property --un-slashed-zero{syntax:"*";inherits:false}@property --un-space-y-reverse{syntax:"*";inherits:false;initial-value:0}:root,:host{--spacing:.25rem;--radius-DEFAULT:.25rem;--colors-gray-DEFAULT:#99a1af;--leading-snug:1.375;--colors-gray-800:#1e2939;--colors-white:#fff;--colors-gray-100:#f3f4f6;--colors-gray-900:#101828;--text-sm-fontSize:.875rem;--text-sm-lineHeight:1.25rem;--text-xs-fontSize:.75rem;--text-xs-lineHeight:1rem;--radius-md:.375rem;--default-transition-timingFunction:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--radius-xl:.75rem;--fontWeight-medium:500;--fontWeight-semibold:600;--tracking-wide:.025em;--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--radius-sm:.25rem;--colors-blue-DEFAULT:#54a2ff;--colors-red-DEFAULT:#ff6568;--text-2xl-fontSize:1.5rem;--text-2xl-lineHeight:2rem;--colors-green-DEFAULT:#05df72;--colors-black:#000;--font-sans:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--default-font-family:var(--font-sans);--default-monoFont-family:var(--font-mono)}@supports (color:lab(0% 0 0)){:root,:host{--colors-gray-DEFAULT:lab(65.9269% -.832707 -8.17474);--colors-gray-800:lab(16.1051% -1.18239 -11.7533);--colors-gray-100:lab(96.1596% -.082314 -1.13575);--colors-gray-900:lab(8.11897% .811279 -12.254);--colors-blue-DEFAULT:lab(65.0361% -1.42062 -56.9803);--colors-red-DEFAULT:lab(63.7053% 60.7449 31.3109);--colors-green-DEFAULT:lab(78.503% -64.9265 39.7492)}}*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-featureSettings,normal);font-variation-settings:var(--default-font-variationSettings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-monoFont-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-monoFont-featureSettings,normal);font-variation-settings:var(--default-monoFont-variationSettings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}textarea{resize:vertical}::-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{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden~=until-found])){display:none!important}.container{width:100%}.aic{align-items:center}@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}}.text-2xl{font-size:var(--text-2xl-fontSize);line-height:var(--un-leading,var(--text-2xl-lineHeight))}.text-3{font-size:.75rem}.text-3\.5{font-size:.875rem}.text-4{font-size:1rem}.text-sm{font-size:var(--text-sm-fontSize);line-height:var(--un-leading,var(--text-sm-lineHeight))}.text-xs{font-size:var(--text-xs-fontSize);line-height:var(--un-leading,var(--text-xs-lineHeight))}.c-\[--c-primary\]{color:color-mix(in oklab,var(--c-primary)var(--un-text-opacity),transparent)}.c-\#1e3a8a{color:color-mix(in oklab,#1e3a8a var(--un-text-opacity),transparent)}.c-\#7c2d12{color:color-mix(in oklab,#7c2d12 var(--un-text-opacity),transparent)}.c-blue{color:color-mix(in srgb,var(--colors-blue-DEFAULT)var(--un-text-opacity),transparent)}.c-gray\/70{color:color-mix(in srgb,var(--colors-gray-DEFAULT)70%,transparent)}.c-red\/75{color:color-mix(in srgb,var(--colors-red-DEFAULT)75%,transparent)}.leading-5{--un-leading:calc(4px*5);line-height:20px}.lh-\[1\]{--un-leading:1;line-height:1}.tracking-wide{--un-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.font-medium{--un-font-weight:var(--fontWeight-medium);font-weight:var(--fontWeight-medium)}.font-mono{font-family:var(--font-mono)}.font-semibold{--un-font-weight:var(--fontWeight-semibold);font-weight:var(--fontWeight-semibold)}.m9{margin:36px}.mx-1{margin-inline:4px}.mx-2{margin-inline:8px}.mx-3\!{margin-inline:12px!important}.my-1{margin-block:4px}.ml{margin-left:16px}.ml-\.5{margin-left:2px}.ml-1{margin-left:4px}.mr--1{margin-right:-4px}.mr-1{margin-right:4px}.mr-2{margin-right:8px}.mr-2\.5{margin-right:10px}.mt-1{margin-top:4px}.p-0\!{padding:0!important}.p-1{padding:4px}.p-4\!{padding:16px!important}.px,.px-4{padding-inline:16px}.px-1\.5{padding-inline:6px}.px-2{padding-inline:8px}.px-3{padding-inline:12px}.py-1{padding-block:4px}.py-1\.5{padding-block:6px}.py-2{padding-block:8px}.pl-1{padding-left:4px}.pl-4{padding-left:16px}.pr-4{padding-right:16px}.ps{padding-inline-start:16px}.text-center{text-align:center}.outline-0{outline-style:var(--un-outline-style);outline-width:0}.outline-1\.5px{outline-style:var(--un-outline-style);outline-width:1.5px}.outline-2{outline-style:var(--un-outline-style);outline-width:2px}.outline-\[--c-primary\]{outline-color:color-mix(in oklab,var(--c-primary)var(--un-outline-opacity),transparent)}.outline-blue{outline-color:color-mix(in srgb,var(--colors-blue-DEFAULT)var(--un-outline-opacity),transparent)}.outline-none{--un-outline-style:none;outline-style:none}.outline-solid{--un-outline-style:solid;outline-style:solid}.b,.b-1,.border{border-width:1px}.b-2px{border-width:2px}.b-r-0{border-right-width:0}.b-\[--table-bg\]{border-color:color-mix(in oklab,var(--table-bg)var(--un-border-opacity),transparent)}.b-\#00000000\!{border-color:color-mix(in oklab,#0000 var(--un-border-opacity),transparent)!important}.b-\#4f7ff0{border-color:color-mix(in oklab,#4f7ff0 var(--un-border-opacity),transparent)}.b-\#f59e0b{border-color:color-mix(in oklab,#f59e0b var(--un-border-opacity),transparent)}.rd-1{border-radius:.25rem}.rd-1\.5{border-radius:.375rem}.rd-2{border-radius:.5rem}.rd-sm{border-radius:var(--radius-sm)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rd-l-4{border-top-left-radius:1rem;border-bottom-left-radius:1rem}.b-dashed{--un-border-style:dashed;border-style:dashed}.b-solid{--un-border-style:solid;border-style:solid}.bg-\[--bg\]{background-color:color-mix(in oklab,var(--bg)var(--un-bg-opacity),transparent)}.bg-\[--c-primary\]{background-color:color-mix(in oklab,var(--c-primary)var(--un-bg-opacity),transparent)}.bg-\[--table-bg\]{background-color:color-mix(in oklab,var(--table-bg)var(--un-bg-opacity),transparent)}.bg-\[--table-header-bg\]{background-color:color-mix(in oklab,var(--table-header-bg)var(--un-bg-opacity),transparent)}.bg-\#dbe6ff\/75{background-color:#dbe6ffbf;background-color:lab(91.0303% -.143617 -13.4803/.75)}.bg-\#fff{background-color:color-mix(in oklab,#fff var(--un-bg-opacity),transparent)}.bg-\#fff3d6\/85{background-color:#fff3d6d9;background-color:lab(96.236% .744224 15.5662/.85)}.bg-blue\/20\!{background-color:color-mix(in srgb,var(--colors-blue-DEFAULT)20%,transparent)!important}.bg-gray\/20{background-color:color-mix(in srgb,var(--colors-gray-DEFAULT)20%,transparent)}.bg-green\!{background-color:color-mix(in srgb,var(--colors-green-DEFAULT)var(--un-bg-opacity),transparent)!important}.bg-red\!{background-color:color-mix(in srgb,var(--colors-red-DEFAULT)var(--un-bg-opacity),transparent)!important}.bg-transparent{background-color:#0000}.hover\:bg-\[--li-hover-bg\]:hover{background-color:color-mix(in oklab,var(--li-hover-bg)var(--un-bg-opacity),transparent)}.hover\:bg-black\/8:hover{background-color:color-mix(in srgb,var(--colors-black)8%,transparent)}.op-0{opacity:0}.op-15{opacity:.15}.op-60{opacity:.6}.op-75{opacity:.75}.op40{opacity:.4}.opacity-50{opacity:.5}.group:hover .group-hover\:op-100{opacity:1}.hover\:underline:hover{text-decoration-line:underline}.flex{display:flex}.flex-1{flex:1}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.gap-1{gap:4px}.gap-1\.5{gap:6px}.gap-2{gap:8px}.grid{display:grid}.size-3\.5{width:14px;height:14px}.size-4\!{width:16px!important;height:16px!important}.size-full{width:100%;height:100%}.h-1\!{height:4px!important}.h-2\.5{height:10px}.h-3\.5{height:14px}.h-5{height:20px}.h-6{height:24px}.h-6\.5{height:26px}.h-a\!{height:auto!important}.h-full{height:100%}.max-h-100{max-height:400px}.max-h-60{max-height:240px}.max-h-inherit{max-height:inherit}.min-h-16{min-height:64px}.min-h-40{min-height:160px}.min-h-a\!{min-height:auto!important}.min-w-24{min-width:96px}.min-w-44{min-width:176px}.min-w-52{min-width:208px}.w-10{width:40px}.w-10px\!{width:10px!important}.w-2\.5{width:10px}.w-3\.5{width:14px}.w-6\.5{width:26px}.w-8\!{width:32px!important}.w-a\!{width:auto!important}.w-full{width:100%}.after\:h-1:after{height:4px}.after\:w-1:after{width:4px}.inline{display:inline}.block{display:block}.inline-block{display:inline-block}.contents{display:contents}.hidden{display:none}.visible{visibility:visible}.collapse{visibility:collapse}.cursor-pointer{cursor:pointer}.cursor-crosshair{cursor:crosshair}.cursor-s-resize{cursor:s-resize}.cursor-w-resize{cursor:w-resize}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.resize{resize:both}.resize-none{resize:none}.select-none{-webkit-user-select:none;user-select:none}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.uppercase{text-transform:uppercase}.shadow-inner{--un-shadow:inset 0 2px 4px 0 var(--un-shadow-color,#0000000d);box-shadow:var(--un-inset-shadow),var(--un-inset-ring-shadow),var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-sm{--un-shadow:0 1px 3px 0 var(--un-shadow-color,#0000001a),0 1px 2px -1px var(--un-shadow-color,#0000001a);box-shadow:var(--un-inset-shadow),var(--un-inset-ring-shadow),var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-xl{--un-shadow:0 20px 25px -5px var(--un-shadow-color,#0000001a),0 8px 10px -6px var(--un-shadow-color,#0000001a);box-shadow:var(--un-inset-shadow),var(--un-inset-ring-shadow),var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.translate-x--1\/2{--un-translate-x:-50%;translate:var(--un-translate-x)var(--un-translate-y)}.translate-x-1\/2{--un-translate-x:50%;translate:var(--un-translate-x)var(--un-translate-y)}.translate-y--1\/2{--un-translate-y:-50%;translate:var(--un-translate-x)var(--un-translate-y)}.transform{transform:var(--un-rotate-x)var(--un-rotate-y)var(--un-rotate-z)var(--un-skew-x)var(--un-skew-y)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,--un-gradient-from,--un-gradient-via,--un-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--un-ease,var(--default-transition-timingFunction));transition-duration:var(--un-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--un-ease,var(--default-transition-timingFunction));transition-duration:var(--un-duration,var(--default-transition-duration))}.items-start{align-items:flex-start}.items-center{align-items:center}.box-border{box-sizing:border-box}.inset-0{inset:0}.bottom-0{bottom:0}.left--0,.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-1\/2{top:50%}.justify-end\!{justify-content:flex-end!important}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.z--1{z-index:-1}.z-1{z-index:1}.z-2{z-index:2}.z-9{z-index:9}.overflow-auto{overflow:auto}.of-y-auto{overflow-y:auto}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:1s linear infinite spin}.filter{filter:var(--un-blur,)var(--un-brightness,)var(--un-contrast,)var(--un-grayscale,)var(--un-hue-rotate,)var(--un-invert,)var(--un-saturate,)var(--un-sepia,)var(--un-drop-shadow,)}.table{display:table}.table-cell{display:table-cell}.tabular-nums{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal,)var(--un-slashed-zero,)var(--un-numeric-figure,)var(--un-numeric-spacing,)var(--un-numeric-fraction,)}:where(.space-y-5>:not(:last-child)){--un-space-y-reverse:0;margin-block-start:calc(calc(4px*5)*var(--un-space-y-reverse));margin-block-end:calc(calc(4px*5)*calc(1 - var(--un-space-y-reverse)))}@supports (color:color-mix(in lab, red, red)){.c-blue{color:color-mix(in oklab,var(--colors-blue-DEFAULT)var(--un-text-opacity),transparent)}.c-gray\/70{color:color-mix(in oklab,var(--colors-gray-DEFAULT)70%,transparent)}.c-red\/75{color:color-mix(in oklab,var(--colors-red-DEFAULT)75%,transparent)}.outline-blue{outline-color:color-mix(in oklab,var(--colors-blue-DEFAULT)var(--un-outline-opacity),transparent)}.bg-blue\/20\!{background-color:color-mix(in oklab,var(--colors-blue-DEFAULT)20%,transparent)!important}.bg-gray\/20{background-color:color-mix(in oklab,var(--colors-gray-DEFAULT)20%,transparent)}.bg-green\!{background-color:color-mix(in oklab,var(--colors-green-DEFAULT)var(--un-bg-opacity),transparent)!important}.bg-red\!{background-color:color-mix(in oklab,var(--colors-red-DEFAULT)var(--un-bg-opacity),transparent)!important}.hover\:bg-black\/8:hover{background-color:color-mix(in oklab,var(--colors-black)8%,transparent)}}
|
package/dist/components/Menu.js
CHANGED
|
@@ -2,21 +2,20 @@ import { useSignle2 } from "../hooks/index.js";
|
|
|
2
2
|
import { unFn } from "../utils.js";
|
|
3
3
|
import { createRender } from "./Render.js";
|
|
4
4
|
import { VDir } from "../hooks/useDir.js";
|
|
5
|
-
import { Popover } from "./Popover.js";
|
|
6
5
|
import loading_default from "../loading.js";
|
|
7
6
|
import { className, createComponent, effect, insert, memo, mergeProps, spread, template, use } from "solid-js/web";
|
|
8
|
-
import { children, createContext, createEffect, createMemo, createSignal,
|
|
7
|
+
import { children, createContext, createEffect, createMemo, createSignal, splitProps, useContext } from "solid-js";
|
|
9
8
|
import { createMutable } from "solid-js/store";
|
|
10
9
|
import { combineProps } from "@solid-primitives/props";
|
|
10
|
+
import { createLazyMemo } from "@solid-primitives/memo";
|
|
11
11
|
import { delay } from "es-toolkit";
|
|
12
12
|
import { pointerHover } from "@solid-primitives/pointer";
|
|
13
|
-
import {
|
|
14
|
-
import { autoUpdate, createFloating, offset } from "floating-ui-solid";
|
|
13
|
+
import { autoUpdate, createFloating } from "floating-ui-solid";
|
|
15
14
|
var _tmpl$ = /* @__PURE__ */ template("<div><div>"), _tmpl$2 = /* @__PURE__ */ template("<div>"), _tmpl$3 = /* @__PURE__ */ template("<div class=\"px-4 py-2 op40\">无内容");
|
|
16
|
-
function Menu(
|
|
17
|
-
let
|
|
18
|
-
is: (
|
|
19
|
-
let
|
|
15
|
+
function Menu(D) {
|
|
16
|
+
let j = createContext({ deep: 0 }), M = createRender({
|
|
17
|
+
is: (T) => {
|
|
18
|
+
let E = useContext(j), [O, k] = splitProps(T, [
|
|
20
19
|
"children",
|
|
21
20
|
"label",
|
|
22
21
|
"icon",
|
|
@@ -24,16 +23,16 @@ function Menu(k) {
|
|
|
24
23
|
"cb",
|
|
25
24
|
"menu",
|
|
26
25
|
"popover"
|
|
27
|
-
]),
|
|
26
|
+
]), A = createMemo(() => D.x && E.deep == 1), M, [P, F] = createSignal(), [I, L] = useSignle2(!1, { before: () => delay(100) }), R = createMemo(() => P() ? createFloating({
|
|
28
27
|
strategy: "fixed",
|
|
29
|
-
placement:
|
|
30
|
-
...
|
|
28
|
+
placement: A() ? "bottom-start" : "right-start",
|
|
29
|
+
...O.menu,
|
|
31
30
|
elements: {
|
|
32
|
-
reference: () =>
|
|
33
|
-
floating:
|
|
31
|
+
reference: () => M,
|
|
32
|
+
floating: P
|
|
34
33
|
},
|
|
35
|
-
whileElementsMounted(
|
|
36
|
-
return autoUpdate(
|
|
34
|
+
whileElementsMounted(r, w, T) {
|
|
35
|
+
return autoUpdate(r, w, T, {
|
|
37
36
|
ancestorResize: !0,
|
|
38
37
|
elementResize: !0,
|
|
39
38
|
layoutShift: !0,
|
|
@@ -42,65 +41,57 @@ function Menu(k) {
|
|
|
42
41
|
}
|
|
43
42
|
}).floatingStyles : void 0);
|
|
44
43
|
createEffect(() => {
|
|
45
|
-
|
|
44
|
+
P() && Object.assign(P().style, R()?.() ?? {});
|
|
46
45
|
});
|
|
47
|
-
let
|
|
48
|
-
async function
|
|
49
|
-
if (
|
|
50
|
-
let
|
|
51
|
-
if (
|
|
52
|
-
await
|
|
46
|
+
let z = createMutable({ loading: !1 });
|
|
47
|
+
async function B() {
|
|
48
|
+
if (z.loading) return;
|
|
49
|
+
let r = O.cb?.();
|
|
50
|
+
if (r instanceof Promise) try {
|
|
51
|
+
await r, z.loading = !0;
|
|
53
52
|
} finally {
|
|
54
|
-
|
|
53
|
+
z.loading = !1, D.onAction?.(O);
|
|
55
54
|
}
|
|
56
|
-
else
|
|
55
|
+
else D.onAction?.(O);
|
|
57
56
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return typeof O == "function" ? use(O, i) : N = i, spread(i, mergeProps(() => combineProps({ class: `li flex aic rd-2 ${M() ? "my-1 p-1" : "mx-1 pl-1 pr-4 py-1"} ${unFn(A.isActive) && "active"}` }, j), { "on:click": H }), !1, !0), insert(D, (() => {
|
|
71
|
-
var i = memo(() => !!V.loading);
|
|
72
|
-
return () => i() ? createComponent(loading_default, {}) : A.icon;
|
|
73
|
-
})()), insert(i, () => A.label, null), insert(i, (() => {
|
|
74
|
-
var i = memo(() => !!(R() && A.children));
|
|
75
|
-
return () => i() && createComponent(I, {
|
|
76
|
-
ref: L,
|
|
77
|
-
class: "z-1",
|
|
57
|
+
let V = createLazyMemo(() => children(() => O.children)());
|
|
58
|
+
return (() => {
|
|
59
|
+
var r = _tmpl$(), T = r.firstChild;
|
|
60
|
+
use(pointerHover, r, () => L);
|
|
61
|
+
var E = M;
|
|
62
|
+
return typeof E == "function" ? use(E, r) : M = r, spread(r, mergeProps(() => combineProps({ class: `li flex aic rd-2 ${A() ? "my-1 p-1" : "mx-1 pl-1 pr-4 py-1"} ${unFn(O.isActive) && "active"}` }, k), { "on:click": B }), !1, !0), insert(T, (() => {
|
|
63
|
+
var r = memo(() => !!z.loading);
|
|
64
|
+
return () => r() ? createComponent(loading_default, {}) : O.icon;
|
|
65
|
+
})()), insert(r, () => O.label, null), insert(r, (() => {
|
|
66
|
+
var r = memo(() => !!(I() && V()));
|
|
67
|
+
return () => r() && createComponent(N, {
|
|
68
|
+
ref: F,
|
|
78
69
|
get children() {
|
|
79
|
-
return
|
|
70
|
+
return V();
|
|
80
71
|
}
|
|
81
72
|
});
|
|
82
|
-
})(), null), effect(() => className(
|
|
73
|
+
})(), null), effect(() => className(T, `flex aic ${A() ? "" : D.density == "comfortable" ? "ml-1 mr-2.5" : "ml-.5 mr-1"} `)), r;
|
|
83
74
|
})();
|
|
84
75
|
},
|
|
85
|
-
processProps: (
|
|
86
|
-
let
|
|
87
|
-
return Array.isArray(
|
|
76
|
+
processProps: (r) => {
|
|
77
|
+
let w = 0;
|
|
78
|
+
return Array.isArray(r.children) && r.children.forEach((r) => !r.is && typeof r == "object" && (r["data-index"] = w++)), r;
|
|
88
79
|
}
|
|
89
|
-
}),
|
|
90
|
-
let
|
|
91
|
-
return createComponent(
|
|
92
|
-
value:
|
|
80
|
+
}), N = (r) => {
|
|
81
|
+
let w = useContext(j), T = createMutable({ deep: w.deep + 1 });
|
|
82
|
+
return createComponent(j.Provider, {
|
|
83
|
+
value: T,
|
|
93
84
|
get children() {
|
|
94
|
-
var
|
|
95
|
-
return use(VDir,
|
|
85
|
+
var w = _tmpl$2();
|
|
86
|
+
return use(VDir, w, () => r.usedir), spread(w, mergeProps(() => combineProps({ class: `${D.x && T.deep == 1 ? "tt-menu-x flex" : "tt-menu max-h-100"} overflow-auto` }, r), { "on:click": (r) => r.stopPropagation() }), !1, !0), insert(w, () => ((r) => r ?? _tmpl$3())(r.children)), w;
|
|
96
87
|
}
|
|
97
88
|
});
|
|
98
89
|
};
|
|
99
|
-
return createComponent(
|
|
100
|
-
is:
|
|
90
|
+
return createComponent(M, mergeProps(() => combineProps({}, D), {
|
|
91
|
+
is: N,
|
|
101
92
|
items: null,
|
|
102
93
|
get children() {
|
|
103
|
-
return
|
|
94
|
+
return D.items;
|
|
104
95
|
}
|
|
105
96
|
}));
|
|
106
97
|
}
|
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
import { Dynamic, createComponent, memo, mergeProps } from "solid-js/web";
|
|
2
|
-
import { splitProps } from "solid-js";
|
|
2
|
+
import { For, splitProps } from "solid-js";
|
|
3
3
|
var unFn = (e, ...a) => typeof e == "function" ? e(...a) : e;
|
|
4
|
-
function createRender({ is:
|
|
5
|
-
let
|
|
6
|
-
let [
|
|
4
|
+
function createRender({ is: s, processProps: c = (e) => e } = {}) {
|
|
5
|
+
let l = (o) => {
|
|
6
|
+
let [l, d] = splitProps(c?.(o), [
|
|
7
7
|
"is",
|
|
8
8
|
"vIf",
|
|
9
9
|
"children"
|
|
10
10
|
]);
|
|
11
|
-
return memo(() => memo(() => !!(!("vIf" in
|
|
12
|
-
return
|
|
11
|
+
return memo(() => memo(() => !!(!("vIf" in l) || unFn(l.vIf)))() && createComponent(Dynamic, mergeProps({ get component() {
|
|
12
|
+
return l.is ?? s;
|
|
13
13
|
} }, d, { get children() {
|
|
14
|
-
return
|
|
14
|
+
return createComponent(u, { get each() {
|
|
15
|
+
return l.children;
|
|
16
|
+
} });
|
|
15
17
|
} })));
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
+
}, u = (e) => memo(() => memo(() => !!Array.isArray(e.each))() ? createComponent(For, {
|
|
19
|
+
get each() {
|
|
20
|
+
return e.each;
|
|
21
|
+
},
|
|
22
|
+
children: (e) => typeof e == "object" ? l(e) : e
|
|
23
|
+
}) : e.each);
|
|
24
|
+
return l;
|
|
18
25
|
}
|
|
19
26
|
const Render = createRender({ is: "div" });
|
|
20
27
|
export { Render, createRender };
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import { ImportExportPlugin } from "./plugins/ImportExportPlugin.js";
|
|
|
25
25
|
import { TooltipPlugin } from "./plugins/TooltipPlugin.js";
|
|
26
26
|
import loading_bold_default from "./loading-bold.js";
|
|
27
27
|
import { createComponent, insert, memo, mergeProps, spread, template, use } from "solid-js/web";
|
|
28
|
-
import { $PROXY, For, batch, createComputed, createContext, createEffect, createMemo, createSignal, getOwner, mapArray, mergeProps as mergeProps$1, on, onCleanup, onMount, runWithOwner, untrack, useContext } from "solid-js";
|
|
28
|
+
import { $PROXY, For, batch, createComputed, createContext, createEffect, createMemo, createRenderEffect, createSignal, getOwner, mapArray, mergeProps as mergeProps$1, on, onCleanup, onMount, runWithOwner, untrack, useContext } from "solid-js";
|
|
29
29
|
import { createMutable, reconcile } from "solid-js/store";
|
|
30
30
|
import { combineProps } from "@solid-primitives/props";
|
|
31
31
|
import { createLazyMemo } from "@solid-primitives/memo";
|
|
@@ -71,9 +71,9 @@ const Ctx = createContext({
|
|
|
71
71
|
props: J.props,
|
|
72
72
|
store: J
|
|
73
73
|
});
|
|
74
|
-
return window.store = J, window.ctx = Q,
|
|
74
|
+
return window.store = J, window.ctx = Q, createRenderEffect(() => {
|
|
75
75
|
let _ = J.props.store;
|
|
76
|
-
|
|
76
|
+
_ && (typeof _ == "function" ? _(J) : "value" in _ ? _.value = J : "current" in _ && (_.current = J));
|
|
77
77
|
}), createComponent(Ctx.Provider, {
|
|
78
78
|
value: Q,
|
|
79
79
|
get children() {
|
|
@@ -112,10 +112,10 @@ const FilterPlugin = {
|
|
|
112
112
|
...e
|
|
113
113
|
}, e), m.filter ??= useControlled(e, m.owner), m.filter.$setOpt(e), m.filter),
|
|
114
114
|
newRow: ({ newRow: e }, { store: h }) => function(...g) {
|
|
115
|
-
let _ = e(...g), {
|
|
116
|
-
return
|
|
115
|
+
let _ = e(...g), { columns: v } = h.props;
|
|
116
|
+
return v.forEach((e) => {
|
|
117
117
|
if (e[h.internal] || !e.filterable) return;
|
|
118
|
-
let g =
|
|
118
|
+
let g = h.props.filter.value.find((m) => isRuleNode(m) && m.field === e.id);
|
|
119
119
|
g && isRuleNode(g) && (_[e.id] = {
|
|
120
120
|
ne: `not ${g.value}`,
|
|
121
121
|
between: toArr(g.value)[0],
|
|
@@ -2,137 +2,156 @@ import { useMemoAsync } from "../hooks/index.js";
|
|
|
2
2
|
import { findParent } from "../tree.js";
|
|
3
3
|
import "../utils.js";
|
|
4
4
|
import { Menu } from "../components/Menu.js";
|
|
5
|
-
import { createComponent, memo } from "solid-js/web";
|
|
5
|
+
import { addEventListener, createComponent, delegateEvents, effect, memo, template } from "solid-js/web";
|
|
6
6
|
import { batch, createMemo, createSignal, mapArray } from "solid-js";
|
|
7
7
|
import { delay, range, remove } from "es-toolkit";
|
|
8
8
|
import { createEventListener } from "@solid-primitives/event-listener";
|
|
9
9
|
import { autoPlacement, computePosition } from "@floating-ui/dom";
|
|
10
|
+
var _tmpl$ = /* @__PURE__ */ template("<input type=number class=\"mx-2 p-0! w-8! h-5 text-center in-input bg-[--bg] input-no-spin\">"), state = {
|
|
11
|
+
c1: 1,
|
|
12
|
+
c2: 1
|
|
13
|
+
};
|
|
10
14
|
const MenuPlugin = {
|
|
11
15
|
name: "menu",
|
|
12
16
|
priority: Infinity,
|
|
13
17
|
store: (e) => ({}),
|
|
14
|
-
layers: [(
|
|
15
|
-
let [
|
|
16
|
-
createEventListener(() =>
|
|
17
|
-
function
|
|
18
|
-
e.preventDefault(),
|
|
18
|
+
layers: [(c) => {
|
|
19
|
+
let [u, f] = createSignal(), p = mapArray(() => c.plugins || [], (e) => createMemo(() => e.menus?.(c))), h = createMemo(() => p().flatMap((e) => e() || [])), [g, b] = createSignal();
|
|
20
|
+
createEventListener(() => c.table, "contextmenu", x);
|
|
21
|
+
function x(e) {
|
|
22
|
+
e.preventDefault(), c.table.contains(e.target) && b({
|
|
19
23
|
x: e.x,
|
|
20
24
|
y: e.y
|
|
21
25
|
});
|
|
22
26
|
}
|
|
23
27
|
createEventListener(document, "pointerdown", (e) => {
|
|
24
|
-
|
|
28
|
+
u()?.contains(e.target) || b();
|
|
25
29
|
});
|
|
26
|
-
let
|
|
27
|
-
let e =
|
|
28
|
-
if (e) return computePosition({ getBoundingClientRect: () => DOMRect.fromRect(
|
|
30
|
+
let S = useMemoAsync(() => {
|
|
31
|
+
let e = u();
|
|
32
|
+
if (e) return computePosition({ getBoundingClientRect: () => DOMRect.fromRect(g()) }, e, {
|
|
29
33
|
strategy: "fixed",
|
|
30
34
|
placement: "top-start",
|
|
31
35
|
middleware: [autoPlacement({
|
|
32
36
|
boundary: document.body,
|
|
33
37
|
alignment: "start"
|
|
34
38
|
})]
|
|
35
|
-
}).then(({ x: e, y:
|
|
39
|
+
}).then(({ x: e, y: c }) => ({
|
|
36
40
|
position: "fixed",
|
|
37
|
-
transform: `translate(${e}px, ${
|
|
41
|
+
transform: `translate(${e}px, ${c}px)`,
|
|
38
42
|
top: 0,
|
|
39
43
|
left: 0,
|
|
40
44
|
"z-index": 10
|
|
41
45
|
}));
|
|
42
46
|
});
|
|
43
|
-
return memo(() => memo(() => !!
|
|
44
|
-
ref:
|
|
47
|
+
return memo(() => memo(() => !!g())() && createComponent(Menu, {
|
|
48
|
+
ref: f,
|
|
45
49
|
class: "pointer-events-auto",
|
|
46
50
|
get style() {
|
|
47
|
-
return
|
|
51
|
+
return S() || "position: fixed";
|
|
48
52
|
},
|
|
49
53
|
get items() {
|
|
50
|
-
return
|
|
54
|
+
return h();
|
|
51
55
|
},
|
|
52
|
-
onAction: () =>
|
|
56
|
+
onAction: () => b()
|
|
53
57
|
}));
|
|
54
58
|
}],
|
|
55
59
|
menus: (e) => [
|
|
56
60
|
{
|
|
57
|
-
label:
|
|
58
|
-
|
|
61
|
+
label: () => [
|
|
62
|
+
"↑ 新增 ",
|
|
63
|
+
(() => {
|
|
64
|
+
var e = _tmpl$();
|
|
65
|
+
return addEventListener(e, "click", (e) => e.stopPropagation()), e.$$input = (e) => state.c1 = +e.currentTarget.value, effect(() => e.value = state.c1 = 1), e;
|
|
66
|
+
})(),
|
|
67
|
+
" 行"
|
|
68
|
+
],
|
|
69
|
+
cb: () => e.commands.addRows(e.selected.end[1], Array(state.c1).fill(0).map(() => e.props.newRow(e.selected.end[1])))
|
|
59
70
|
},
|
|
60
71
|
{
|
|
61
|
-
label:
|
|
62
|
-
|
|
72
|
+
label: () => [
|
|
73
|
+
"↓ 新增 ",
|
|
74
|
+
(() => {
|
|
75
|
+
var e = _tmpl$();
|
|
76
|
+
return addEventListener(e, "click", (e) => e.stopPropagation()), e.$$input = (e) => state.c2 = +e.currentTarget.value, effect(() => e.value = state.c2 = 1), e;
|
|
77
|
+
})(),
|
|
78
|
+
" 行"
|
|
79
|
+
],
|
|
80
|
+
cb: () => e.commands.addRows(e.selected.end[1], Array(state.c2).fill(0).map(() => e.props.newRow(e.selected.end[1])), !1)
|
|
63
81
|
},
|
|
64
82
|
{
|
|
65
83
|
label: "删除行",
|
|
66
|
-
cb: () => e.commands.deleteRows(range(...((e) => [e[0], e[1] + 1])([e.selected.start[1], e.selected.end[1]].sort((e,
|
|
84
|
+
cb: () => e.commands.deleteRows(range(...((e) => [e[0], e[1] + 1])([e.selected.start[1], e.selected.end[1]].sort((e, c) => e - c))))
|
|
67
85
|
}
|
|
68
86
|
],
|
|
69
87
|
commands: (e) => ({
|
|
70
|
-
rowEquals(
|
|
71
|
-
let
|
|
72
|
-
return
|
|
88
|
+
rowEquals(c, l) {
|
|
89
|
+
let u = e.props.rowKey;
|
|
90
|
+
return c == l || u != null && c?.[u] == l?.[u];
|
|
73
91
|
},
|
|
74
|
-
rowIndexOf(
|
|
75
|
-
return
|
|
92
|
+
rowIndexOf(c, l) {
|
|
93
|
+
return c.findIndex((c) => e.commands.rowEquals(c, l));
|
|
76
94
|
},
|
|
77
|
-
rowChange(
|
|
78
|
-
let
|
|
79
|
-
|
|
95
|
+
rowChange(c) {
|
|
96
|
+
let l = [...e.rawProps.data || []], u = e.commands.rowIndexOf(l, c);
|
|
97
|
+
u > -1 && (l[u] = c, e.props.onDataChange?.(l));
|
|
80
98
|
},
|
|
81
|
-
rowsChange(
|
|
82
|
-
let
|
|
83
|
-
|
|
84
|
-
let
|
|
85
|
-
|
|
86
|
-
}), e.props.onDataChange?.(
|
|
99
|
+
rowsChange(c) {
|
|
100
|
+
let l = [...e.rawProps.data || []];
|
|
101
|
+
c.forEach((c) => {
|
|
102
|
+
let u = e.commands.rowIndexOf(l, c);
|
|
103
|
+
u > -1 && (l[u] = c);
|
|
104
|
+
}), e.props.onDataChange?.(l);
|
|
87
105
|
},
|
|
88
|
-
addRows(
|
|
89
|
-
addRows(e,
|
|
106
|
+
addRows(c, l, u = !0) {
|
|
107
|
+
addRows(e, c, l, u);
|
|
90
108
|
},
|
|
91
|
-
deleteRows(
|
|
92
|
-
let { rowKey:
|
|
93
|
-
remove(
|
|
109
|
+
deleteRows(c) {
|
|
110
|
+
let { rowKey: l, data: u } = e.props, d = [...e.rawProps.data || []], f = new Set(c.map((e) => u[e]));
|
|
111
|
+
remove(d, (e) => f.has(e)), e.props?.onDataChange?.(d);
|
|
94
112
|
},
|
|
95
|
-
moveRows(
|
|
96
|
-
let { data:
|
|
97
|
-
if (!
|
|
98
|
-
let
|
|
99
|
-
function
|
|
100
|
-
return e.reduce((e,
|
|
101
|
-
if (
|
|
102
|
-
if (Array.isArray(
|
|
103
|
-
let e =
|
|
104
|
-
|
|
105
|
-
...
|
|
106
|
-
[
|
|
113
|
+
moveRows(l, u) {
|
|
114
|
+
let { data: d } = e.props, f = l.map((e) => d[e]).filter((c) => c && !c?.[e.internal]);
|
|
115
|
+
if (!f.length) return;
|
|
116
|
+
let p = u >= 0 && u < d.length ? d[u] : null, { rowKey: m } = e.props, h = e.props.tree?.children || Symbol(), g = new Set(f.map((e) => e[m])), _ = [];
|
|
117
|
+
function v(e) {
|
|
118
|
+
return e.reduce((e, c) => {
|
|
119
|
+
if (g.has(c[m])) return _.push(c), e;
|
|
120
|
+
if (Array.isArray(c[h]) && c[h].length) {
|
|
121
|
+
let e = v(c[h]);
|
|
122
|
+
c = e.length === c[h].length ? c : {
|
|
123
|
+
...c,
|
|
124
|
+
[h]: e
|
|
107
125
|
};
|
|
108
126
|
}
|
|
109
|
-
return e.push(
|
|
127
|
+
return e.push(c), e;
|
|
110
128
|
}, []);
|
|
111
129
|
}
|
|
112
|
-
let
|
|
113
|
-
if (
|
|
114
|
-
let
|
|
115
|
-
e.selected.start = [0,
|
|
130
|
+
let y = v([...e.rawProps.data || []]), b = findParent(y, (e) => e[m] === p?.[m])?.children ?? y, x = p ? b.findIndex((e) => e[m] === p[m]) : -1;
|
|
131
|
+
if (x > -1 ? b.splice(x, 0, _) : b.push(..._), e.selected) {
|
|
132
|
+
let c = Math.max(0, u - f.length);
|
|
133
|
+
e.selected.start = [0, c], e.selected.end = [Infinity, c + _.length - 1];
|
|
116
134
|
}
|
|
117
|
-
e.props?.onDataChange?.(
|
|
135
|
+
e.props?.onDataChange?.(y);
|
|
118
136
|
}
|
|
119
137
|
})
|
|
120
138
|
};
|
|
121
|
-
function addRows(e,
|
|
122
|
-
let { data:
|
|
123
|
-
for (
|
|
124
|
-
return
|
|
125
|
-
},
|
|
126
|
-
for (
|
|
127
|
-
return
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
|
|
139
|
+
function addRows(e, c, l, u) {
|
|
140
|
+
let { data: d } = e.props, f = (c) => {
|
|
141
|
+
for (u = !1; --c >= 0 && d[c]?.[e.internal];);
|
|
142
|
+
return c >= 0 ? d[c] : null;
|
|
143
|
+
}, p = (c) => {
|
|
144
|
+
for (u = !0; ++c < d.length && d[c]?.[e.internal];);
|
|
145
|
+
return c < d.length ? d[c] : null;
|
|
146
|
+
}, m = d[c]?.[e.internal] ? u ? f(c) || p(c) : p(c) || f(c) : d[c];
|
|
147
|
+
m && batch(() => {
|
|
148
|
+
c = e.commands.rowIndexOf(d, m), e.selected && (e.selected.start = [0, c + (u ? 0 : 1)], e.selected.end = [Infinity, c + l.length - 1 + (u ? 0 : 1)]);
|
|
131
149
|
}), (() => {
|
|
132
|
-
let
|
|
133
|
-
|
|
150
|
+
let c = [...e.rawProps.data || []], d = m ? e.commands.rowIndexOf(c, m) + (u ? 0 : 1) : c.length;
|
|
151
|
+
c.splice(d, 0, ...l), e.props?.onDataChange?.(c);
|
|
134
152
|
})(), delay(0).then(() => {
|
|
135
153
|
e.scrollCellIfNeeded(e.selected.start[0], e.selected.start[1]);
|
|
136
154
|
});
|
|
137
155
|
}
|
|
156
|
+
delegateEvents(["input"]);
|
|
138
157
|
export { MenuPlugin };
|