@ollap/gantt-vue3 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- /*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@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{--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-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}}}:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--color-orange-400:oklch(75% .183 55.934);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wider:.05em;--radius-md:.375rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1)}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.-top-1{top:calc(var(--spacing)*-1)}.top-0{top:calc(var(--spacing)*0)}.top-2{top:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-4{bottom:calc(var(--spacing)*4)}.-left-\[6px\]{left:-6px}.left-0{left:calc(var(--spacing)*0)}.left-2{left:calc(var(--spacing)*2)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.mr-2{margin-right:calc(var(--spacing)*2)}.flex{display:flex}.h-0{height:calc(var(--spacing)*0)}.h-4{height:calc(var(--spacing)*4)}.h-full{height:100%}.w-0{width:calc(var(--spacing)*0)}.w-4{width:calc(var(--spacing)*4)}.w-64{width:calc(var(--spacing)*64)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-hidden{overflow-y:hidden}.rounded{border-radius:.25rem}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t-\[6px\]{border-top-style:var(--tw-border-style);border-top-width:6px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-\[5px\]{border-right-style:var(--tw-border-style);border-right-width:5px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-\[5px\]{border-left-style:var(--tw-border-style);border-left-width:5px}.border-\[\#e8e8e8\]{border-color:#e8e8e8}.border-orange-400{border-color:var(--color-orange-400)}.border-slate-50{border-color:var(--color-slate-50)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-100\/50{border-color:#f1f5f980}@supports (color:color-mix(in lab,red,red)){.border-slate-100\/50{border-color:color-mix(in oklab,var(--color-slate-100)50%,transparent)}}.border-slate-200{border-color:var(--color-slate-200)}.border-t-orange-400{border-top-color:var(--color-orange-400)}.border-r-transparent{border-right-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.bg-black\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.bg-orange-400{background-color:var(--color-orange-400)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\/50{background-color:#f8fafc80}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/50{background-color:color-mix(in oklab,var(--color-slate-50)50%,transparent)}}.bg-slate-400{background-color:var(--color-slate-400)}.bg-white{background-color:var(--color-white)}.p-2{padding:calc(var(--spacing)*2)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.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-0\.5{padding-block:calc(var(--spacing)*.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-4{padding-block:calc(var(--spacing)*4)}.pr-4{padding-right:calc(var(--spacing)*4)}.pl-12{padding-left:calc(var(--spacing)*12)}.font-sans{font-family:var(--font-sans)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.whitespace-nowrap{white-space:nowrap}.text-slate-400{color:var(--color-slate-400)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-white{color:var(--color-white)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-80{opacity:.8}.shadow-\[10px_0_15px_-3px_rgba\(0\,0\,0\,0\.1\)\]{--tw-shadow:10px 0 15px -3px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}@media(hover:hover){.hover\:-translate-y-0\.5:hover{--tw-translate-y:calc(var(--spacing)*-.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.hover\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\:bg-white:hover{background-color:var(--color-white)}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}@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-font-weight{syntax:"*";inherits:false}@property --tw-tracking{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-duration{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}.overflow-auto[data-v-db66e357]::-webkit-scrollbar{width:6px;height:6px}.overflow-auto[data-v-db66e357]::-webkit-scrollbar-track{background:transparent}.overflow-auto[data-v-db66e357]::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:10px}.overflow-auto[data-v-db66e357]::-webkit-scrollbar-thumb:hover{background:#94a3b8}
1
+ /*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@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{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--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-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--color-orange-400:oklch(75% .183 55.934);--color-blue-400:oklch(70.7% .165 254.624);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wider:.05em;--radius-md:.375rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1)}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.-top-1{top:calc(var(--spacing)*-1)}.top-0{top:calc(var(--spacing)*0)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-4{bottom:calc(var(--spacing)*4)}.-left-\[6px\]{left:-6px}.left-0{left:calc(var(--spacing)*0)}.left-2{left:calc(var(--spacing)*2)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.mr-1\.5{margin-right:calc(var(--spacing)*1.5)}.mr-2{margin-right:calc(var(--spacing)*2)}.flex{display:flex}.inline-block{display:inline-block}.h-0{height:calc(var(--spacing)*0)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.w-0{width:calc(var(--spacing)*0)}.w-1{width:calc(var(--spacing)*1)}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-col-resize{cursor:col-resize}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-md{border-radius:var(--radius-md)}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-t-\[6px\]{border-top-style:var(--tw-border-style);border-top-width:6px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-\[5px\]{border-right-style:var(--tw-border-style);border-right-width:5px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-\[5px\]{border-left-style:var(--tw-border-style);border-left-width:5px}.border-\[\#e8e8e8\]{border-color:#e8e8e8}.border-orange-400{border-color:var(--color-orange-400)}.border-slate-50{border-color:var(--color-slate-50)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-100\/50{border-color:#f1f5f980}@supports (color:color-mix(in lab,red,red)){.border-slate-100\/50{border-color:color-mix(in oklab,var(--color-slate-100)50%,transparent)}}.border-slate-200{border-color:var(--color-slate-200)}.border-t-orange-400{border-top-color:var(--color-orange-400)}.border-r-transparent{border-right-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.bg-black\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.bg-orange-400{background-color:var(--color-orange-400)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\/50{background-color:#f8fafc80}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/50{background-color:color-mix(in oklab,var(--color-slate-50)50%,transparent)}}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-white{background-color:var(--color-white)}.p-2{padding:calc(var(--spacing)*2)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.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-0\.5{padding-block:calc(var(--spacing)*.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-4{padding-block:calc(var(--spacing)*4)}.pr-4{padding-right:calc(var(--spacing)*4)}.font-sans{font-family:var(--font-sans)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.whitespace-nowrap{white-space:nowrap}.text-slate-400{color:var(--color-slate-400)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-white{color:var(--color-white)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-80{opacity:.8}.shadow-\[10px_0_15px_-3px_rgba\(0\,0\,0\,0\.1\)\]{--tw-shadow:10px 0 15px -3px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}@media(hover:hover){.group-hover\:bg-blue-400:is(:where(.group):hover *){background-color:var(--color-blue-400)}.hover\:-translate-y-0\.5:hover{--tw-translate-y:calc(var(--spacing)*-.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.hover\:bg-blue-400:hover{background-color:var(--color-blue-400)}.hover\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\:bg-white:hover{background-color:var(--color-white)}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}@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-font-weight{syntax:"*";inherits:false}@property --tw-tracking{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-duration{syntax:"*";inherits:false}.no-scrollbar[data-v-b661c62a]::-webkit-scrollbar{display:none}.no-scrollbar[data-v-b661c62a]{-ms-overflow-style:none;scrollbar-width:none}.overflow-auto[data-v-b661c62a]::-webkit-scrollbar{width:6px;height:6px}.overflow-auto[data-v-b661c62a]::-webkit-scrollbar-track{background:transparent}.overflow-auto[data-v-b661c62a]::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:10px}.overflow-auto[data-v-b661c62a]::-webkit-scrollbar-thumb:hover{background:#94a3b8}
@@ -21,6 +21,8 @@ declare type __VLS_Props = {
21
21
  list: GanttItem[];
22
22
  dateRange: [string, string];
23
23
  showToday?: boolean;
24
+ shouldCalculate?: (item: GanttItem, task: Task) => boolean;
25
+ defaultLeftPanelWidth?: number;
24
26
  };
25
27
 
26
28
  declare function __VLS_template(): {
@@ -88,6 +90,8 @@ export declare type Task = {
88
90
  startDate: string;
89
91
  endDate: string;
90
92
  color?: CSSProperties['color'];
93
+ children?: Task[];
94
+ expanded?: boolean;
91
95
  };
92
96
 
93
97
  export { }
@@ -1,171 +1,208 @@
1
- import { defineComponent as Z, ref as f, computed as u, onMounted as ee, onUnmounted as te, createElementBlock as o, openBlock as r, createElementVNode as a, createCommentVNode as N, renderSlot as m, createTextVNode as se, normalizeStyle as l, Fragment as w, renderList as S, toDisplayString as g, withDirectives as Y, normalizeClass as ae, vShow as J } from "vue";
2
- const le = "0.2.2", ne = {
3
- version: le
4
- }, oe = { class: "bg-white border border-slate-200 overflow-hidden flex-1 flex flex-col" }, re = { class: "flex border-b border-slate-200 bg-slate-50/50" }, ie = { class: "w-64 shrink-0 px-6 py-4 border-r border-slate-200 font-bold text-slate-700 relative z-20 shadow-[10px_0_15px_-3px_rgba(0,0,0,0.1)]" }, de = { class: "text-[10px] tracking-wider text-slate-400" }, ce = { class: "text-xs font-semibold text-slate-400" }, ue = { class: "flex flex-1 overflow-hidden" }, pe = ["onClick"], ve = { class: "mr-2 w-4 h-4" }, fe = { class: "min-w-0" }, he = { class: "text-sm font-semibold text-slate-700 truncate" }, xe = { class: "text-xs truncate" }, ge = { class: "truncate" }, i = 60, d = 52, be = /* @__PURE__ */ Z({
1
+ import { defineComponent as re, ref as h, computed as g, onMounted as ie, onUnmounted as de, createElementBlock as r, openBlock as i, createElementVNode as n, createCommentVNode as W, normalizeStyle as a, renderSlot as k, createTextVNode as ce, Fragment as T, renderList as L, toDisplayString as w, withDirectives as J, normalizeClass as Q, vShow as Z, withModifiers as ue, nextTick as ee } from "vue";
2
+ const ve = "0.3.0", pe = {
3
+ version: ve
4
+ }, he = { class: "bg-white border border-slate-200 overflow-hidden flex-1 flex flex-col" }, fe = { class: "flex border-b border-slate-200 bg-slate-50/50" }, xe = { class: "text-[10px] tracking-wider text-slate-400" }, ge = { class: "text-xs font-semibold text-slate-400" }, ye = { class: "flex flex-1 overflow-hidden" }, be = ["onClick"], me = { class: "mr-2 w-4 h-4" }, we = { class: "min-w-0" }, _e = { class: "text-sm font-semibold text-slate-700 truncate" }, De = ["onClick"], ke = {
5
+ key: 1,
6
+ class: "mr-1.5 w-3 h-3 inline-block"
7
+ }, Te = { class: "text-xs truncate select-none" }, Se = { class: "truncate" }, c = 60, p = 52, Ee = 150, Ce = 600, $e = 256, Le = /* @__PURE__ */ re({
5
8
  __name: "GanttChart",
6
9
  props: {
7
10
  list: {},
8
11
  dateRange: {},
9
- showToday: { type: Boolean }
12
+ showToday: { type: Boolean },
13
+ shouldCalculate: { type: Function },
14
+ defaultLeftPanelWidth: {}
10
15
  },
11
16
  emits: ["update:list", "toggle"],
12
- setup(b, { emit: O }) {
13
- const h = b, R = O, n = f([]), $ = f(JSON.parse(JSON.stringify(h.list))), x = u(() => n.value.length * i), A = u(() => ({
14
- backgroundImage: `linear-gradient(to right, transparent ${i - 1}px, #e8e8e8 ${i - 1}px, #e8e8e8 ${i}px)`,
17
+ setup(_, { emit: R }) {
18
+ const f = _, M = (t, s) => f.shouldCalculate ? f.shouldCalculate(t, s) : !0, O = R, v = h([]), A = h(JSON.parse(JSON.stringify(f.list))), S = h(f.defaultLeftPanelWidth ?? $e), z = h(!1), te = (t) => {
19
+ z.value = !0;
20
+ const s = t.clientX, e = S.value, l = (u) => {
21
+ if (!z.value) return;
22
+ const d = u.clientX - s, $ = e + d;
23
+ S.value = Math.max(Ee, Math.min(Ce, $));
24
+ }, o = () => {
25
+ z.value = !1, document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", o), document.body.style.cursor = "", document.body.style.userSelect = "";
26
+ };
27
+ document.addEventListener("mousemove", l), document.addEventListener("mouseup", o), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", t.preventDefault();
28
+ }, y = g(() => v.value.length * c), se = g(() => ({
29
+ backgroundImage: `linear-gradient(to right, transparent ${c - 1}px, #e8e8e8 ${c - 1}px, #e8e8e8 ${c}px)`,
15
30
  // backgroundImage: `linear-gradient(to right, #e8e8e8 1px, transparent 1px)`,
16
- backgroundSize: `${i}px 100%`,
31
+ backgroundSize: `${c}px 100%`,
17
32
  // backgroundRepeat: 'repeat-y',
18
33
  // backgroundPosition: `${CELL_WIDTH}px 0`,
19
- width: x.value + "px"
20
- })), F = u(() => {
21
- const s = {};
22
- return $.value.forEach((e) => {
23
- s[e.id] = {}, e.tasks.forEach((t) => {
24
- let c = new Date(t.startDate);
25
- const p = new Date(t.endDate);
26
- for (; c <= p; ) {
27
- const v = c.toISOString().split("T")[0];
28
- s[e.id][v] = (s[e.id][v] || 0) + 1, c.setDate(c.getDate() + 1);
29
- }
34
+ width: y.value + "px"
35
+ })), ne = g(() => {
36
+ const t = {}, s = (e, l) => {
37
+ if (!l.startDate || !l.endDate || !M(e, l)) return;
38
+ let o = new Date(l.startDate);
39
+ const u = new Date(l.endDate);
40
+ for (; o <= u; ) {
41
+ const d = o.toISOString().split("T")[0];
42
+ t[e.id][d] = (t[e.id][d] || 0) + 1, o.setDate(o.getDate() + 1);
43
+ }
44
+ l.children && l.children.forEach((d) => s(e, d));
45
+ };
46
+ return A.value.forEach((e) => {
47
+ t[e.id] = {}, e.tasks.forEach((l) => {
48
+ s(e, l);
30
49
  });
31
- }), s;
32
- }), U = () => {
33
- const s = [];
34
- let e = new Date(h.dateRange[0]);
35
- const t = new Date(h.dateRange[1]);
36
- for (; e <= t; )
37
- s.push(e.toISOString().split("T")[0]), e.setDate(e.getDate() + 1);
38
- n.value = s;
39
- }, P = (s) => {
40
- const e = new Date(s), t = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
50
+ }), t;
51
+ }), le = () => {
52
+ const t = [];
53
+ let s = new Date(f.dateRange[0]);
54
+ const e = new Date(f.dateRange[1]);
55
+ for (; s <= e; )
56
+ t.push(s.toISOString().split("T")[0]), s.setDate(s.getDate() + 1);
57
+ v.value = t;
58
+ }, F = (t) => {
59
+ const s = new Date(t), e = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
41
60
  return {
42
- monthDay: `${String(e.getMonth() + 1).padStart(2, "0")}/${e.getDate()}`,
43
- weekday: t[e.getDay()]
61
+ monthDay: `${String(s.getMonth() + 1).padStart(2, "0")}/${s.getDate()}`,
62
+ weekday: e[s.getDay()]
44
63
  };
45
- }, G = (s) => {
46
- const e = n.value.indexOf(s);
47
- return e > -1 ? e * i : -999;
48
- }, y = (s) => {
49
- const e = new Date(s.startDate), t = new Date(s.endDate), c = new Date(n.value[0]), p = new Date(n.value[n.value.length - 1]);
50
- if (e < c && t > p)
64
+ }, G = (t) => {
65
+ const s = v.value.indexOf(t);
66
+ return s > -1 ? s * c : -999;
67
+ }, D = (t) => {
68
+ if (!t.startDate || !t.endDate) return null;
69
+ const s = new Date(t.startDate), e = new Date(t.endDate), l = new Date(v.value[0]), o = new Date(v.value[v.value.length - 1]);
70
+ if (s < l && e > o)
51
71
  return {
52
72
  left: -4,
53
- width: x.value + 8
73
+ width: y.value + 8
54
74
  };
55
- let v = n.value.indexOf(s.startDate), D = n.value.indexOf(s.endDate), j = 4, W = -8;
56
- return v === -1 && D === -1 ? null : (v === -1 && (v = 0, j = -4), D === -1 && (D = n.value.length - 1, W = 4), {
57
- left: v * i + j,
58
- width: (D - v + 1) * i + W
75
+ let u = v.value.indexOf(t.startDate), d = v.value.indexOf(t.endDate), $ = 4, Y = -8;
76
+ return u === -1 && d === -1 ? null : (u === -1 && (u = 0, $ = -4), d === -1 && (d = v.value.length - 1, Y = 4), {
77
+ left: u * c + $,
78
+ width: (d - u + 1) * c + Y
59
79
  });
60
- }, T = f(), C = f(), I = f(), z = u(() => {
61
- const s = [];
62
- return $.value.forEach((e) => {
63
- s.push({
80
+ }, b = h(), I = h(), x = h(), P = g(() => {
81
+ const t = [], s = (e, l, o, u) => {
82
+ t.push({
83
+ type: "task",
84
+ data: e,
85
+ uniqueKey: `t-${l}-${o}-${e.id}`,
86
+ parentId: o,
87
+ level: u
88
+ }), e.expanded && e.children && e.children.forEach((d) => {
89
+ s(d, l, e.id, u + 1);
90
+ });
91
+ };
92
+ return A.value.forEach((e) => {
93
+ t.push({
64
94
  type: "group",
65
95
  data: e,
66
- uniqueKey: `g-${e.id}`
67
- }), e.expanded && e.tasks.forEach((t) => {
68
- s.push({
69
- type: "task",
70
- data: t,
71
- uniqueKey: `t-${t.id}`,
72
- parentId: e.id
73
- });
96
+ uniqueKey: `g-${e.id}`,
97
+ level: 0
98
+ }), e.expanded && e.tasks.forEach((l) => {
99
+ s(l, e.id, e.id, 1);
74
100
  });
75
- }), s;
76
- }), E = f(0), k = f(600), H = u(() => z.value.length * d), L = u(() => {
77
- const s = Math.floor(E.value / d), e = Math.ceil(k.value / d), t = 5;
101
+ }), t;
102
+ }), E = h(0), N = h(600), B = g(() => P.value.length * p), V = g(() => {
103
+ const t = Math.floor(E.value / p), s = Math.ceil(N.value / p), e = 5;
78
104
  return {
79
- start: Math.max(0, s - t),
80
- end: Math.min(z.value.length, s + e + t)
105
+ start: Math.max(0, t - e),
106
+ end: Math.min(P.value.length, t + s + e)
81
107
  };
82
- }), V = u(() => L.value.start * d), q = u(() => {
83
- const { start: s, end: e } = L.value;
84
- return z.value.slice(s, e);
85
- }), B = () => {
86
- I.value && (k.value = I.value.clientHeight - 1);
87
- }, Q = (s) => {
88
- const e = s.target, t = H.value - k.value;
89
- e.scrollTop > t && (e.scrollTop = t), E.value = e.scrollTop, T.value && (T.value.scrollTop = e.scrollTop), C.value && (C.value.scrollLeft = e.scrollLeft);
90
- }, X = (s) => {
91
- const e = $.value.find((t) => t.id === s);
92
- e && (e.expanded = !e.expanded), R("toggle", s);
93
- }, K = u(() => {
94
- const s = (/* @__PURE__ */ new Date()).toISOString().split("T")[0], e = n.value.indexOf(s);
95
- return e === -1 ? null : e * i;
96
- }), M = f();
97
- let _ = null;
98
- return ee(() => {
99
- U(), B(), M.value && (_ = new ResizeObserver(() => {
100
- B();
101
- }), _.observe(M.value));
102
- }), te(() => {
103
- _ && _.disconnect();
104
- }), (s, e) => (r(), o("div", {
108
+ }), j = g(() => V.value.start * p), q = g(() => {
109
+ const { start: t, end: s } = V.value;
110
+ return P.value.slice(t, s);
111
+ }), K = () => {
112
+ x.value && (N.value = x.value.clientHeight - 1);
113
+ };
114
+ let m = !1;
115
+ const ae = () => {
116
+ m || !b.value || !x.value || (m = !0, E.value = b.value.scrollTop, x.value.scrollTop = b.value.scrollTop, ee(() => m = !1));
117
+ }, oe = () => {
118
+ m || !x.value || !b.value || (m = !0, E.value = x.value.scrollTop, b.value.scrollTop = x.value.scrollTop, I.value && (I.value.scrollLeft = x.value.scrollLeft), ee(() => m = !1));
119
+ }, X = (t) => {
120
+ t.expanded = !t.expanded, O("toggle", t.id);
121
+ }, U = g(() => {
122
+ const t = (/* @__PURE__ */ new Date()).toISOString().split("T")[0], s = v.value.indexOf(t);
123
+ return s === -1 ? null : s * c;
124
+ }), H = h();
125
+ let C = null;
126
+ return ie(() => {
127
+ le(), K(), H.value && (C = new ResizeObserver(() => {
128
+ K();
129
+ }), C.observe(H.value));
130
+ }), de(() => {
131
+ C && C.disconnect();
132
+ }), (t, s) => (i(), r("div", {
105
133
  ref_key: "containerRef",
106
- ref: M,
134
+ ref: H,
107
135
  class: "flex flex-col h-full bg-slate-50 font-sans antialiased select-none"
108
136
  }, [
109
- a("div", oe, [
110
- a("div", re, [
111
- a("div", ie, [
112
- m(s.$slots, "leftPanelHeader", {}, () => [
113
- e[0] || (e[0] = se("项目成员 / 任务状态", -1))
114
- ], !0)
115
- ]),
116
- a("div", {
137
+ n("div", he, [
138
+ n("div", fe, [
139
+ n("div", {
140
+ class: "shrink-0 px-6 py-4 border-r border-slate-200 font-bold text-slate-700 relative z-20 shadow-[10px_0_15px_-3px_rgba(0,0,0,0.1)]",
141
+ style: a({ width: S.value + "px" })
142
+ }, [
143
+ k(t.$slots, "leftPanelHeader", {}, () => [
144
+ s[0] || (s[0] = ce("项目成员 / 任务状态", -1))
145
+ ], !0),
146
+ n("div", {
147
+ class: "absolute top-0 right-0 bottom-0 w-1 cursor-col-resize hover:bg-blue-400 transition-colors z-20 group",
148
+ onMousedown: te
149
+ }, null, 32)
150
+ ], 4),
151
+ n("div", {
117
152
  ref_key: "headerRef",
118
- ref: C,
153
+ ref: I,
119
154
  class: "flex-1 overflow-hidden pointer-events-none"
120
155
  }, [
121
- a("div", {
156
+ n("div", {
122
157
  class: "flex h-full",
123
- style: l({ width: x.value + "px" })
158
+ style: a({ width: y.value + "px" })
124
159
  }, [
125
- (r(!0), o(w, null, S(n.value, (t) => (r(), o("div", {
126
- key: t,
160
+ (i(!0), r(T, null, L(v.value, (e) => (i(), r("div", {
161
+ key: e,
127
162
  class: "shrink-0 flex flex-col items-center justify-center border-r border-slate-100 py-2 transition-colors",
128
- style: l({ width: i + "px" })
163
+ style: a({ width: c + "px" })
129
164
  }, [
130
- m(s.$slots, "headerCell", { date: t }, () => [
131
- a("span", de, g(P(t).weekday), 1),
132
- a("span", ce, g(P(t).monthDay), 1)
165
+ k(t.$slots, "headerCell", { date: e }, () => [
166
+ n("span", xe, w(F(e).weekday), 1),
167
+ n("span", ge, w(F(e).monthDay), 1)
133
168
  ], !0)
134
169
  ], 4))), 128))
135
170
  ], 4)
136
171
  ], 512)
137
172
  ]),
138
- a("div", ue, [
139
- a("div", {
173
+ n("div", ye, [
174
+ n("div", {
140
175
  ref_key: "leftPanelRef",
141
- ref: T,
142
- class: "w-64 shrink-0 border-r border-slate-200 overflow-y-hidden relative z-10 shadow-[10px_0_15px_-3px_rgba(0,0,0,0.1)] bg-white"
176
+ ref: b,
177
+ class: "shrink-0 border-r border-slate-200 overflow-y-auto overflow-x-hidden relative z-10 shadow-[10px_0_15px_-3px_rgba(0,0,0,0.1)] bg-white no-scrollbar",
178
+ style: a({ width: S.value + "px" }),
179
+ onScroll: ae
143
180
  }, [
144
- a("div", {
145
- style: l({ height: H.value + "px", position: "relative" })
181
+ n("div", {
182
+ style: a({ height: B.value + "px", position: "relative" })
146
183
  }, [
147
- a("div", {
148
- style: l({ transform: `translateY(${V.value}px)` })
184
+ n("div", {
185
+ style: a({ transform: `translateY(${j.value}px)` })
149
186
  }, [
150
- (r(!0), o(w, null, S(q.value, (t) => (r(), o("div", {
151
- key: t.uniqueKey
187
+ (i(!0), r(T, null, L(q.value, (e) => (i(), r("div", {
188
+ key: e.uniqueKey
152
189
  }, [
153
- t.type === "group" ? (r(), o("div", {
190
+ e.type === "group" ? (i(), r("div", {
154
191
  key: 0,
155
192
  class: "flex items-center px-4 hover:bg-slate-50 cursor-pointer border-b border-slate-50 transition-colors",
156
- style: l({ height: d + "px" }),
157
- onClick: (c) => X(t.data.id)
193
+ style: a({ height: p + "px" }),
194
+ onClick: (l) => X(e.data)
158
195
  }, [
159
- Y(a("span", {
160
- class: ae(["transform transition-transform duration-200 mr-2", t.data.expanded ? "rotate-90" : ""])
161
- }, [...e[1] || (e[1] = [
162
- a("svg", {
196
+ J(n("span", {
197
+ class: Q(["transform transition-transform duration-200 mr-2", e.data.expanded ? "rotate-90" : ""])
198
+ }, [...s[1] || (s[1] = [
199
+ n("svg", {
163
200
  class: "w-4 h-4 text-slate-400",
164
201
  fill: "none",
165
202
  stroke: "currentColor",
166
203
  viewBox: "0 0 24 24"
167
204
  }, [
168
- a("path", {
205
+ n("path", {
169
206
  "stroke-linecap": "round",
170
207
  "stroke-linejoin": "round",
171
208
  "stroke-width": "2",
@@ -173,118 +210,137 @@ const le = "0.2.2", ne = {
173
210
  })
174
211
  ], -1)
175
212
  ])], 2), [
176
- [J, t.data.tasks.length > 0]
213
+ [Z, e.data.tasks.length > 0]
177
214
  ]),
178
- Y(a("span", ve, null, 512), [
179
- [J, !t.data.tasks.length]
215
+ J(n("span", me, null, 512), [
216
+ [Z, !e.data.tasks.length]
180
217
  ]),
181
- a("div", fe, [
182
- m(s.$slots, "leftPanelItem", {
183
- item: t.data
218
+ n("div", we, [
219
+ k(t.$slots, "leftPanelItem", {
220
+ item: e.data
184
221
  }, () => [
185
- a("div", he, g(t.data.name), 1)
222
+ n("div", _e, w(e.data.name), 1)
186
223
  ], !0)
187
224
  ])
188
- ], 12, pe)) : (r(), o("div", {
225
+ ], 12, be)) : (i(), r("div", {
189
226
  key: 1,
190
- class: "flex items-center pl-12 pr-4 border-b border-slate-100/50 text-slate-600 hover:bg-white transition-colors",
191
- style: l({ height: d + "px" })
227
+ class: "flex items-center pr-4 border-b border-slate-100/50 text-slate-600 hover:bg-white transition-colors cursor-pointer",
228
+ style: a({ height: p + "px", paddingLeft: e.level * 20 + 12 + "px" }),
229
+ onClick: ue((l) => X(e.data), ["stop"])
192
230
  }, [
193
- a("div", xe, g(t.data.name), 1)
194
- ], 4))
231
+ e.data.children && e.data.children.length > 0 ? (i(), r("span", {
232
+ key: 0,
233
+ class: Q(["transform transition-transform duration-200 mr-1.5", e.data.expanded ? "rotate-90" : ""])
234
+ }, [...s[2] || (s[2] = [
235
+ n("svg", {
236
+ class: "w-3 h-3 text-slate-400",
237
+ fill: "none",
238
+ stroke: "currentColor",
239
+ viewBox: "0 0 24 24"
240
+ }, [
241
+ n("path", {
242
+ "stroke-linecap": "round",
243
+ "stroke-linejoin": "round",
244
+ "stroke-width": "2",
245
+ d: "M9 5l7 7-7 7"
246
+ })
247
+ ], -1)
248
+ ])], 2)) : (i(), r("span", ke)),
249
+ n("div", Te, w(e.data.name), 1)
250
+ ], 12, De))
195
251
  ]))), 128))
196
252
  ], 4)
197
253
  ], 4)
198
- ], 512),
199
- a("div", {
254
+ ], 36),
255
+ n("div", {
200
256
  ref_key: "rightPanelRef",
201
- ref: I,
202
- onScroll: Q,
257
+ ref: x,
258
+ onScroll: oe,
203
259
  class: "flex-1 overflow-auto relative select-none"
204
260
  }, [
205
- K.value !== null && b.showToday ? (r(), o("div", {
261
+ U.value !== null && _.showToday ? (i(), r("div", {
206
262
  key: 0,
207
263
  class: "absolute top-0 bottom-0 z-10 pointer-events-none border-l-2 border-orange-400",
208
- style: l({ left: K.value + "px" })
209
- }, [...e[2] || (e[2] = [
210
- a("div", {
264
+ style: a({ left: U.value + "px" })
265
+ }, [...s[3] || (s[3] = [
266
+ n("div", {
211
267
  class: "sticky top-0 z-20",
212
268
  style: { height: "0", overflow: "visible" }
213
269
  }, [
214
- a("div", { class: "absolute -top-1 -left-[6px] w-0 h-0 border-l-[5px] border-l-transparent border-r-[5px] border-r-transparent border-t-[6px] border-t-orange-400" }),
215
- a("div", { class: "absolute top-2 left-2 px-1.5 py-0.5 bg-orange-400 text-[10px] text-white rounded shadow-sm opacity-80 whitespace-nowrap" }, " 今天 ")
270
+ n("div", { class: "absolute -top-1 -left-[6px] w-0 h-0 border-l-[5px] border-l-transparent border-r-[5px] border-r-transparent border-t-[6px] border-t-orange-400" }),
271
+ n("div", { class: "absolute top-2 left-2 px-1.5 py-0.5 bg-orange-400 text-[10px] text-white rounded shadow-sm opacity-80 whitespace-nowrap" }, " 今天 ")
216
272
  ], -1)
217
- ])], 4)) : N("", !0),
218
- a("div", {
273
+ ])], 4)) : W("", !0),
274
+ n("div", {
219
275
  class: "absolute left-0 pointer-events-none",
220
- style: l({
221
- ...A.value,
222
- height: k.value + "px",
276
+ style: a({
277
+ ...se.value,
278
+ height: N.value + "px",
223
279
  top: E.value + "px",
224
- width: x.value + "px"
280
+ width: y.value + "px"
225
281
  })
226
282
  }, null, 4),
227
- a("div", {
228
- style: l({ height: H.value + "px", position: "relative" })
283
+ n("div", {
284
+ style: a({ height: B.value + "px", position: "relative" })
229
285
  }, [
230
- a("div", {
231
- style: l({ transform: `translateY(${V.value}px)` })
286
+ n("div", {
287
+ style: a({ transform: `translateY(${j.value}px)` })
232
288
  }, [
233
- (r(!0), o(w, null, S(q.value, (t) => (r(), o(w, {
234
- key: t.uniqueKey
289
+ (i(!0), r(T, null, L(q.value, (e) => (i(), r(T, {
290
+ key: e.uniqueKey
235
291
  }, [
236
- t.type === "group" ? (r(), o("div", {
292
+ e.type === "group" ? (i(), r("div", {
237
293
  key: 0,
238
294
  class: "relative border-b border-[#e8e8e8]",
239
- style: l({ height: d + "px", width: x.value + "px" })
295
+ style: a({ height: p + "px", width: y.value + "px" })
240
296
  }, [
241
- (r(!0), o(w, null, S(F.value[t.data.id], (c, p) => m(s.$slots, "count", {
242
- key: p,
243
- item: t.data,
244
- date: p,
245
- count: c,
246
- style: l({
247
- left: G(p) + "px",
248
- width: i + "px",
249
- height: d + "px"
297
+ (i(!0), r(T, null, L(ne.value[e.data.id], (l, o) => k(t.$slots, "count", {
298
+ key: o,
299
+ item: e.data,
300
+ date: o,
301
+ count: l,
302
+ style: a({
303
+ left: G(o) + "px",
304
+ width: c + "px",
305
+ height: p + "px"
250
306
  })
251
307
  }, () => [
252
- a("div", {
308
+ n("div", {
253
309
  class: "absolute top-0 flex items-center justify-center text-sm",
254
- style: l({
255
- left: G(p) + "px",
256
- width: i + "px",
257
- height: d + "px",
310
+ style: a({
311
+ left: G(o) + "px",
312
+ width: c + "px",
313
+ height: p + "px",
258
314
  contentVisibility: "auto",
259
- containIntrinsicSize: `${i}px ${d}px`
315
+ containIntrinsicSize: `${c}px ${p}px`
260
316
  })
261
- }, g(c), 5)
317
+ }, w(l), 5)
262
318
  ], !0)), 128))
263
- ], 4)) : (r(), o("div", {
319
+ ], 4)) : (i(), r("div", {
264
320
  key: 1,
265
321
  class: "relative border-b border-[#e8e8e8] overflow-hidden",
266
- style: l({ height: d + "px", width: x.value + "px" })
322
+ style: a({ height: p + "px", width: y.value + "px" })
267
323
  }, [
268
- y(t.data) ? m(s.$slots, "task", {
324
+ D(e.data) ? k(t.$slots, "task", {
269
325
  key: 0,
270
- style: l({
271
- left: y(t.data).left + "px",
272
- width: y(t.data).width + "px",
326
+ style: a({
327
+ left: D(e.data).left + "px",
328
+ width: D(e.data).width + "px",
273
329
  position: "absolute"
274
330
  }),
275
- task: t.data
331
+ task: e.data
276
332
  }, () => [
277
- a("div", {
333
+ n("div", {
278
334
  class: "absolute bg-slate-400 top-2 bottom-2 rounded-md shadow-sm flex items-center px-3 text-[11px] text-white font-medium cursor-pointer hover:shadow-lg hover:-translate-y-0.5 transition-all duration-200",
279
- style: l({
280
- left: y(t.data).left + "px",
281
- width: y(t.data).width + "px",
282
- backgroundColor: t.data.color
335
+ style: a({
336
+ left: D(e.data).left + "px",
337
+ width: D(e.data).width + "px",
338
+ backgroundColor: e.data.color
283
339
  })
284
340
  }, [
285
- a("span", ge, g(t.data.name), 1)
341
+ n("span", Se, w(e.data.name), 1)
286
342
  ], 4)
287
- ], !0) : N("", !0)
343
+ ], !0) : W("", !0)
288
344
  ], 4))
289
345
  ], 64))), 128))
290
346
  ], 4)
@@ -292,19 +348,19 @@ const le = "0.2.2", ne = {
292
348
  ], 544)
293
349
  ])
294
350
  ]),
295
- N("", !0)
351
+ W("", !0)
296
352
  ], 512));
297
353
  }
298
- }), ye = (b, O) => {
299
- const h = b.__vccOpts || b;
300
- for (const [R, n] of O)
301
- h[R] = n;
302
- return h;
303
- }, we = /* @__PURE__ */ ye(be, [["__scopeId", "data-v-db66e357"]]), ke = ne.version, _e = () => {
354
+ }), Re = (_, R) => {
355
+ const f = _.__vccOpts || _;
356
+ for (const [M, O] of R)
357
+ f[M] = O;
358
+ return f;
359
+ }, Oe = /* @__PURE__ */ Re(Le, [["__scopeId", "data-v-b661c62a"]]), ze = pe.version, Ie = () => {
304
360
  console.log("Gantt Core Initialized");
305
361
  };
306
362
  export {
307
- ke as GANTT_VERSION,
308
- we as GanttChart,
309
- _e as setupGantt
363
+ ze as GANTT_VERSION,
364
+ Oe as GanttChart,
365
+ Ie as setupGantt
310
366
  };
@@ -1 +1 @@
1
- (function(i,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(i=typeof globalThis<"u"?globalThis:i||self,e(i.GanttVue3={},i.Vue))})(this,(function(i,e){"use strict";const L={version:"0.2.2"},M={class:"bg-white border border-slate-200 overflow-hidden flex-1 flex flex-col"},H={class:"flex border-b border-slate-200 bg-slate-50/50"},P={class:"w-64 shrink-0 px-6 py-4 border-r border-slate-200 font-bold text-slate-700 relative z-20 shadow-[10px_0_15px_-3px_rgba(0,0,0,0.1)]"},j={class:"text-[10px] tracking-wider text-slate-400"},q={class:"text-xs font-semibold text-slate-400"},v={class:"flex flex-1 overflow-hidden"},F=["onClick"],K={class:"mr-2 w-4 h-4"},W={class:"min-w-0"},Y={class:"text-sm font-semibold text-slate-700 truncate"},A={class:"text-xs truncate"},J={class:"truncate"},o=60,r=52,U=((m,b)=>{const p=m.__vccOpts||m;for(const[k,a]of b)p[k]=a;return p})(e.defineComponent({__name:"GanttChart",props:{list:{},dateRange:{},showToday:{type:Boolean}},emits:["update:list","toggle"],setup(m,{emit:b}){const p=m,k=b,a=e.ref([]),E=e.ref(JSON.parse(JSON.stringify(p.list))),f=e.computed(()=>a.value.length*o),Z=e.computed(()=>({backgroundImage:`linear-gradient(to right, transparent ${o-1}px, #e8e8e8 ${o-1}px, #e8e8e8 ${o}px)`,backgroundSize:`${o}px 100%`,width:f.value+"px"})),ee=e.computed(()=>{const n={};return E.value.forEach(t=>{n[t.id]={},t.tasks.forEach(l=>{let s=new Date(l.startDate);const d=new Date(l.endDate);for(;s<=d;){const c=s.toISOString().split("T")[0];n[t.id][c]=(n[t.id][c]||0)+1,s.setDate(s.getDate()+1)}})}),n}),te=()=>{const n=[];let t=new Date(p.dateRange[0]);const l=new Date(p.dateRange[1]);for(;t<=l;)n.push(t.toISOString().split("T")[0]),t.setDate(t.getDate()+1);a.value=n},B=n=>{const t=new Date(n),l=["周日","周一","周二","周三","周四","周五","周六"];return{monthDay:`${String(t.getMonth()+1).padStart(2,"0")}/${t.getDate()}`,weekday:l[t.getDay()]}},z=n=>{const t=a.value.indexOf(n);return t>-1?t*o:-999},h=n=>{const t=new Date(n.startDate),l=new Date(n.endDate),s=new Date(a.value[0]),d=new Date(a.value[a.value.length-1]);if(t<s&&l>d)return{left:-4,width:f.value+8};let c=a.value.indexOf(n.startDate),y=a.value.indexOf(n.endDate),I=4,G=-8;return c===-1&&y===-1?null:(c===-1&&(c=0,I=-4),y===-1&&(y=a.value.length-1,G=4),{left:c*o+I,width:(y-c+1)*o+G})},u=e.ref(),S=e.ref(),w=e.ref(),_=e.computed(()=>{const n=[];return E.value.forEach(t=>{n.push({type:"group",data:t,uniqueKey:`g-${t.id}`}),t.expanded&&t.tasks.forEach(l=>{n.push({type:"task",data:l,uniqueKey:`t-${l.id}`,parentId:t.id})})}),n}),D=e.ref(0),x=e.ref(600),N=e.computed(()=>_.value.length*r),T=e.computed(()=>{const n=Math.floor(D.value/r),t=Math.ceil(x.value/r),l=5;return{start:Math.max(0,n-l),end:Math.min(_.value.length,n+t+l)}}),O=e.computed(()=>T.value.start*r),R=e.computed(()=>{const{start:n,end:t}=T.value;return _.value.slice(n,t)}),$=()=>{w.value&&(x.value=w.value.clientHeight-1)},le=n=>{const t=n.target,l=N.value-x.value;t.scrollTop>l&&(t.scrollTop=l),D.value=t.scrollTop,u.value&&(u.value.scrollTop=t.scrollTop),S.value&&(S.value.scrollLeft=t.scrollLeft)},ne=n=>{const t=E.value.find(l=>l.id===n);t&&(t.expanded=!t.expanded),k("toggle",n)},C=e.computed(()=>{const n=new Date().toISOString().split("T")[0],t=a.value.indexOf(n);return t===-1?null:t*o}),V=e.ref();let g=null;return e.onMounted(()=>{te(),$(),V.value&&(g=new ResizeObserver(()=>{$()}),g.observe(V.value))}),e.onUnmounted(()=>{g&&g.disconnect()}),(n,t)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:V,class:"flex flex-col h-full bg-slate-50 font-sans antialiased select-none"},[e.createElementVNode("div",M,[e.createElementVNode("div",H,[e.createElementVNode("div",P,[e.renderSlot(n.$slots,"leftPanelHeader",{},()=>[t[0]||(t[0]=e.createTextVNode("项目成员 / 任务状态",-1))],!0)]),e.createElementVNode("div",{ref_key:"headerRef",ref:S,class:"flex-1 overflow-hidden pointer-events-none"},[e.createElementVNode("div",{class:"flex h-full",style:e.normalizeStyle({width:f.value+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,l=>(e.openBlock(),e.createElementBlock("div",{key:l,class:"shrink-0 flex flex-col items-center justify-center border-r border-slate-100 py-2 transition-colors",style:e.normalizeStyle({width:o+"px"})},[e.renderSlot(n.$slots,"headerCell",{date:l},()=>[e.createElementVNode("span",j,e.toDisplayString(B(l).weekday),1),e.createElementVNode("span",q,e.toDisplayString(B(l).monthDay),1)],!0)],4))),128))],4)],512)]),e.createElementVNode("div",v,[e.createElementVNode("div",{ref_key:"leftPanelRef",ref:u,class:"w-64 shrink-0 border-r border-slate-200 overflow-y-hidden relative z-10 shadow-[10px_0_15px_-3px_rgba(0,0,0,0.1)] bg-white"},[e.createElementVNode("div",{style:e.normalizeStyle({height:N.value+"px",position:"relative"})},[e.createElementVNode("div",{style:e.normalizeStyle({transform:`translateY(${O.value}px)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,l=>(e.openBlock(),e.createElementBlock("div",{key:l.uniqueKey},[l.type==="group"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"flex items-center px-4 hover:bg-slate-50 cursor-pointer border-b border-slate-50 transition-colors",style:e.normalizeStyle({height:r+"px"}),onClick:s=>ne(l.data.id)},[e.withDirectives(e.createElementVNode("span",{class:e.normalizeClass(["transform transition-transform duration-200 mr-2",l.data.expanded?"rotate-90":""])},[...t[1]||(t[1]=[e.createElementVNode("svg",{class:"w-4 h-4 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])],2),[[e.vShow,l.data.tasks.length>0]]),e.withDirectives(e.createElementVNode("span",K,null,512),[[e.vShow,!l.data.tasks.length]]),e.createElementVNode("div",W,[e.renderSlot(n.$slots,"leftPanelItem",{item:l.data},()=>[e.createElementVNode("div",Y,e.toDisplayString(l.data.name),1)],!0)])],12,F)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"flex items-center pl-12 pr-4 border-b border-slate-100/50 text-slate-600 hover:bg-white transition-colors",style:e.normalizeStyle({height:r+"px"})},[e.createElementVNode("div",A,e.toDisplayString(l.data.name),1)],4))]))),128))],4)],4)],512),e.createElementVNode("div",{ref_key:"rightPanelRef",ref:w,onScroll:le,class:"flex-1 overflow-auto relative select-none"},[C.value!==null&&m.showToday?(e.openBlock(),e.createElementBlock("div",{key:0,class:"absolute top-0 bottom-0 z-10 pointer-events-none border-l-2 border-orange-400",style:e.normalizeStyle({left:C.value+"px"})},[...t[2]||(t[2]=[e.createElementVNode("div",{class:"sticky top-0 z-20",style:{height:"0",overflow:"visible"}},[e.createElementVNode("div",{class:"absolute -top-1 -left-[6px] w-0 h-0 border-l-[5px] border-l-transparent border-r-[5px] border-r-transparent border-t-[6px] border-t-orange-400"}),e.createElementVNode("div",{class:"absolute top-2 left-2 px-1.5 py-0.5 bg-orange-400 text-[10px] text-white rounded shadow-sm opacity-80 whitespace-nowrap"}," 今天 ")],-1)])],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"absolute left-0 pointer-events-none",style:e.normalizeStyle({...Z.value,height:x.value+"px",top:D.value+"px",width:f.value+"px"})},null,4),e.createElementVNode("div",{style:e.normalizeStyle({height:N.value+"px",position:"relative"})},[e.createElementVNode("div",{style:e.normalizeStyle({transform:`translateY(${O.value}px)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.uniqueKey},[l.type==="group"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"relative border-b border-[#e8e8e8]",style:e.normalizeStyle({height:r+"px",width:f.value+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ee.value[l.data.id],(s,d)=>e.renderSlot(n.$slots,"count",{key:d,item:l.data,date:d,count:s,style:e.normalizeStyle({left:z(d)+"px",width:o+"px",height:r+"px"})},()=>[e.createElementVNode("div",{class:"absolute top-0 flex items-center justify-center text-sm",style:e.normalizeStyle({left:z(d)+"px",width:o+"px",height:r+"px",contentVisibility:"auto",containIntrinsicSize:`${o}px ${r}px`})},e.toDisplayString(s),5)],!0)),128))],4)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"relative border-b border-[#e8e8e8] overflow-hidden",style:e.normalizeStyle({height:r+"px",width:f.value+"px"})},[h(l.data)?e.renderSlot(n.$slots,"task",{key:0,style:e.normalizeStyle({left:h(l.data).left+"px",width:h(l.data).width+"px",position:"absolute"}),task:l.data},()=>[e.createElementVNode("div",{class:"absolute bg-slate-400 top-2 bottom-2 rounded-md shadow-sm flex items-center px-3 text-[11px] text-white font-medium cursor-pointer hover:shadow-lg hover:-translate-y-0.5 transition-all duration-200",style:e.normalizeStyle({left:h(l.data).left+"px",width:h(l.data).width+"px",backgroundColor:l.data.color})},[e.createElementVNode("span",J,e.toDisplayString(l.data.name),1)],4)],!0):e.createCommentVNode("",!0)],4))],64))),128))],4)],4)],544)])]),e.createCommentVNode("",!0)],512))}}),[["__scopeId","data-v-db66e357"]]),Q=L.version,X=()=>{console.log("Gantt Core Initialized")};i.GANTT_VERSION=Q,i.GanttChart=U,i.setupGantt=X,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(p,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(p=typeof globalThis<"u"?globalThis:p||self,e(p.GanttVue3={},p.Vue))})(this,(function(p,e){"use strict";const F={version:"0.3.0"},G={class:"bg-white border border-slate-200 overflow-hidden flex-1 flex flex-col"},A={class:"flex border-b border-slate-200 bg-slate-50/50"},j={class:"text-[10px] tracking-wider text-slate-400"},q={class:"text-xs font-semibold text-slate-400"},K={class:"flex flex-1 overflow-hidden"},X=["onClick"],U={class:"mr-2 w-4 h-4"},Y={class:"min-w-0"},J={class:"text-sm font-semibold text-slate-700 truncate"},Q=["onClick"],Z={key:1,class:"mr-1.5 w-3 h-3 inline-block"},ee={class:"text-xs truncate select-none"},te={class:"truncate"},r=60,d=52,le=150,ne=600,oe=256,ae=((u,_)=>{const f=u.__vccOpts||u;for(const[w,D]of _)f[w]=D;return f})(e.defineComponent({__name:"GanttChart",props:{list:{},dateRange:{},showToday:{type:Boolean},shouldCalculate:{type:Function},defaultLeftPanelWidth:{}},emits:["update:list","toggle"],setup(u,{emit:_}){const f=u,w=(l,n)=>f.shouldCalculate?f.shouldCalculate(l,n):!0,D=_,c=e.ref([]),C=e.ref(JSON.parse(JSON.stringify(f.list))),b=e.ref(f.defaultLeftPanelWidth??oe),N=e.ref(!1),ie=l=>{N.value=!0;const n=l.clientX,t=b.value,o=i=>{if(!N.value)return;const s=i.clientX-n,S=t+s;b.value=Math.max(le,Math.min(ne,S))},a=()=>{N.value=!1,document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",a),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",o),document.addEventListener("mouseup",a),document.body.style.cursor="col-resize",document.body.style.userSelect="none",l.preventDefault()},m=e.computed(()=>c.value.length*r),de=e.computed(()=>({backgroundImage:`linear-gradient(to right, transparent ${r-1}px, #e8e8e8 ${r-1}px, #e8e8e8 ${r}px)`,backgroundSize:`${r}px 100%`,width:m.value+"px"})),ce=e.computed(()=>{const l={},n=(t,o)=>{if(!o.startDate||!o.endDate||!w(t,o))return;let a=new Date(o.startDate);const i=new Date(o.endDate);for(;a<=i;){const s=a.toISOString().split("T")[0];l[t.id][s]=(l[t.id][s]||0)+1,a.setDate(a.getDate()+1)}o.children&&o.children.forEach(s=>n(t,s))};return C.value.forEach(t=>{l[t.id]={},t.tasks.forEach(o=>{n(t,o)})}),l}),pe=()=>{const l=[];let n=new Date(f.dateRange[0]);const t=new Date(f.dateRange[1]);for(;n<=t;)l.push(n.toISOString().split("T")[0]),n.setDate(n.getDate()+1);c.value=l},L=l=>{const n=new Date(l),t=["周日","周一","周二","周三","周四","周五","周六"];return{monthDay:`${String(n.getMonth()+1).padStart(2,"0")}/${n.getDate()}`,weekday:t[n.getDay()]}},v=l=>{const n=c.value.indexOf(l);return n>-1?n*r:-999},g=l=>{if(!l.startDate||!l.endDate)return null;const n=new Date(l.startDate),t=new Date(l.endDate),o=new Date(c.value[0]),a=new Date(c.value[c.value.length-1]);if(n<o&&t>a)return{left:-4,width:m.value+8};let i=c.value.indexOf(l.startDate),s=c.value.indexOf(l.endDate),S=4,W=-8;return i===-1&&s===-1?null:(i===-1&&(i=0,S=-4),s===-1&&(s=c.value.length-1,W=4),{left:i*r+S,width:(s-i+1)*r+W})},x=e.ref(),V=e.ref(),h=e.ref(),z=e.computed(()=>{const l=[],n=(t,o,a,i)=>{l.push({type:"task",data:t,uniqueKey:`t-${o}-${a}-${t.id}`,parentId:a,level:i}),t.expanded&&t.children&&t.children.forEach(s=>{n(s,o,t.id,i+1)})};return C.value.forEach(t=>{l.push({type:"group",data:t,uniqueKey:`g-${t.id}`,level:0}),t.expanded&&t.tasks.forEach(o=>{n(o,t.id,t.id,1)})}),l}),k=e.ref(0),T=e.ref(600),R=e.computed(()=>z.value.length*d),$=e.computed(()=>{const l=Math.floor(k.value/d),n=Math.ceil(T.value/d),t=5;return{start:Math.max(0,l-t),end:Math.min(z.value.length,l+n+t)}}),O=e.computed(()=>$.value.start*d),M=e.computed(()=>{const{start:l,end:n}=$.value;return z.value.slice(l,n)}),I=()=>{h.value&&(T.value=h.value.clientHeight-1)};let y=!1;const fe=()=>{y||!x.value||!h.value||(y=!0,k.value=x.value.scrollTop,h.value.scrollTop=x.value.scrollTop,e.nextTick(()=>y=!1))},he=()=>{y||!h.value||!x.value||(y=!0,k.value=h.value.scrollTop,x.value.scrollTop=h.value.scrollTop,V.value&&(V.value.scrollLeft=h.value.scrollLeft),e.nextTick(()=>y=!1))},P=l=>{l.expanded=!l.expanded,D("toggle",l.id)},H=e.computed(()=>{const l=new Date().toISOString().split("T")[0],n=c.value.indexOf(l);return n===-1?null:n*r}),B=e.ref();let E=null;return e.onMounted(()=>{pe(),I(),B.value&&(E=new ResizeObserver(()=>{I()}),E.observe(B.value))}),e.onUnmounted(()=>{E&&E.disconnect()}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:B,class:"flex flex-col h-full bg-slate-50 font-sans antialiased select-none"},[e.createElementVNode("div",G,[e.createElementVNode("div",A,[e.createElementVNode("div",{class:"shrink-0 px-6 py-4 border-r border-slate-200 font-bold text-slate-700 relative z-20 shadow-[10px_0_15px_-3px_rgba(0,0,0,0.1)]",style:e.normalizeStyle({width:b.value+"px"})},[e.renderSlot(l.$slots,"leftPanelHeader",{},()=>[n[0]||(n[0]=e.createTextVNode("项目成员 / 任务状态",-1))],!0),e.createElementVNode("div",{class:"absolute top-0 right-0 bottom-0 w-1 cursor-col-resize hover:bg-blue-400 transition-colors z-20 group",onMousedown:ie},null,32)],4),e.createElementVNode("div",{ref_key:"headerRef",ref:V,class:"flex-1 overflow-hidden pointer-events-none"},[e.createElementVNode("div",{class:"flex h-full",style:e.normalizeStyle({width:m.value+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,t=>(e.openBlock(),e.createElementBlock("div",{key:t,class:"shrink-0 flex flex-col items-center justify-center border-r border-slate-100 py-2 transition-colors",style:e.normalizeStyle({width:r+"px"})},[e.renderSlot(l.$slots,"headerCell",{date:t},()=>[e.createElementVNode("span",j,e.toDisplayString(L(t).weekday),1),e.createElementVNode("span",q,e.toDisplayString(L(t).monthDay),1)],!0)],4))),128))],4)],512)]),e.createElementVNode("div",K,[e.createElementVNode("div",{ref_key:"leftPanelRef",ref:x,class:"shrink-0 border-r border-slate-200 overflow-y-auto overflow-x-hidden relative z-10 shadow-[10px_0_15px_-3px_rgba(0,0,0,0.1)] bg-white no-scrollbar",style:e.normalizeStyle({width:b.value+"px"}),onScroll:fe},[e.createElementVNode("div",{style:e.normalizeStyle({height:R.value+"px",position:"relative"})},[e.createElementVNode("div",{style:e.normalizeStyle({transform:`translateY(${O.value}px)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,t=>(e.openBlock(),e.createElementBlock("div",{key:t.uniqueKey},[t.type==="group"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"flex items-center px-4 hover:bg-slate-50 cursor-pointer border-b border-slate-50 transition-colors",style:e.normalizeStyle({height:d+"px"}),onClick:o=>P(t.data)},[e.withDirectives(e.createElementVNode("span",{class:e.normalizeClass(["transform transition-transform duration-200 mr-2",t.data.expanded?"rotate-90":""])},[...n[1]||(n[1]=[e.createElementVNode("svg",{class:"w-4 h-4 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])],2),[[e.vShow,t.data.tasks.length>0]]),e.withDirectives(e.createElementVNode("span",U,null,512),[[e.vShow,!t.data.tasks.length]]),e.createElementVNode("div",Y,[e.renderSlot(l.$slots,"leftPanelItem",{item:t.data},()=>[e.createElementVNode("div",J,e.toDisplayString(t.data.name),1)],!0)])],12,X)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"flex items-center pr-4 border-b border-slate-100/50 text-slate-600 hover:bg-white transition-colors cursor-pointer",style:e.normalizeStyle({height:d+"px",paddingLeft:t.level*20+12+"px"}),onClick:e.withModifiers(o=>P(t.data),["stop"])},[t.data.children&&t.data.children.length>0?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["transform transition-transform duration-200 mr-1.5",t.data.expanded?"rotate-90":""])},[...n[2]||(n[2]=[e.createElementVNode("svg",{class:"w-3 h-3 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])],2)):(e.openBlock(),e.createElementBlock("span",Z)),e.createElementVNode("div",ee,e.toDisplayString(t.data.name),1)],12,Q))]))),128))],4)],4)],36),e.createElementVNode("div",{ref_key:"rightPanelRef",ref:h,onScroll:he,class:"flex-1 overflow-auto relative select-none"},[H.value!==null&&u.showToday?(e.openBlock(),e.createElementBlock("div",{key:0,class:"absolute top-0 bottom-0 z-10 pointer-events-none border-l-2 border-orange-400",style:e.normalizeStyle({left:H.value+"px"})},[...n[3]||(n[3]=[e.createElementVNode("div",{class:"sticky top-0 z-20",style:{height:"0",overflow:"visible"}},[e.createElementVNode("div",{class:"absolute -top-1 -left-[6px] w-0 h-0 border-l-[5px] border-l-transparent border-r-[5px] border-r-transparent border-t-[6px] border-t-orange-400"}),e.createElementVNode("div",{class:"absolute top-2 left-2 px-1.5 py-0.5 bg-orange-400 text-[10px] text-white rounded shadow-sm opacity-80 whitespace-nowrap"}," 今天 ")],-1)])],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"absolute left-0 pointer-events-none",style:e.normalizeStyle({...de.value,height:T.value+"px",top:k.value+"px",width:m.value+"px"})},null,4),e.createElementVNode("div",{style:e.normalizeStyle({height:R.value+"px",position:"relative"})},[e.createElementVNode("div",{style:e.normalizeStyle({transform:`translateY(${O.value}px)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t.uniqueKey},[t.type==="group"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"relative border-b border-[#e8e8e8]",style:e.normalizeStyle({height:d+"px",width:m.value+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ce.value[t.data.id],(o,a)=>e.renderSlot(l.$slots,"count",{key:a,item:t.data,date:a,count:o,style:e.normalizeStyle({left:v(a)+"px",width:r+"px",height:d+"px"})},()=>[e.createElementVNode("div",{class:"absolute top-0 flex items-center justify-center text-sm",style:e.normalizeStyle({left:v(a)+"px",width:r+"px",height:d+"px",contentVisibility:"auto",containIntrinsicSize:`${r}px ${d}px`})},e.toDisplayString(o),5)],!0)),128))],4)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"relative border-b border-[#e8e8e8] overflow-hidden",style:e.normalizeStyle({height:d+"px",width:m.value+"px"})},[g(t.data)?e.renderSlot(l.$slots,"task",{key:0,style:e.normalizeStyle({left:g(t.data).left+"px",width:g(t.data).width+"px",position:"absolute"}),task:t.data},()=>[e.createElementVNode("div",{class:"absolute bg-slate-400 top-2 bottom-2 rounded-md shadow-sm flex items-center px-3 text-[11px] text-white font-medium cursor-pointer hover:shadow-lg hover:-translate-y-0.5 transition-all duration-200",style:e.normalizeStyle({left:g(t.data).left+"px",width:g(t.data).width+"px",backgroundColor:t.data.color})},[e.createElementVNode("span",te,e.toDisplayString(t.data.name),1)],4)],!0):e.createCommentVNode("",!0)],4))],64))),128))],4)],4)],544)])]),e.createCommentVNode("",!0)],512))}}),[["__scopeId","data-v-b661c62a"]]),re=F.version,se=()=>{console.log("Gantt Core Initialized")};p.GANTT_VERSION=re,p.GanttChart=ae,p.setupGantt=se,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ollap/gantt-vue3",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"