@ollap/gantt-vue3 0.3.5 → 0.3.6

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-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)}.top-4{top:calc(var(--spacing)*4)}.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-1{left:calc(var(--spacing)*1)}.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}.gap-4{gap:calc(var(--spacing)*4)}.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-05d54120]::-webkit-scrollbar{display:none}.no-scrollbar[data-v-05d54120]{-ms-overflow-style:none;scrollbar-width:none}.overflow-auto[data-v-05d54120]::-webkit-scrollbar{width:6px;height:6px}.overflow-auto[data-v-05d54120]::-webkit-scrollbar-track{background:transparent}.overflow-auto[data-v-05d54120]::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:10px}.overflow-auto[data-v-05d54120]::-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)}.top-4{top:calc(var(--spacing)*4)}.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-1{left:calc(var(--spacing)*1)}.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}.gap-4{gap:calc(var(--spacing)*4)}.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-34d566f8]::-webkit-scrollbar{display:none}.no-scrollbar[data-v-34d566f8]{-ms-overflow-style:none;scrollbar-width:none}.overflow-auto[data-v-34d566f8]::-webkit-scrollbar{width:6px;height:6px}.overflow-auto[data-v-34d566f8]::-webkit-scrollbar-track{background:transparent}.overflow-auto[data-v-34d566f8]::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:10px}.overflow-auto[data-v-34d566f8]::-webkit-scrollbar-thumb:hover{background:#94a3b8}
@@ -53,11 +53,11 @@ declare function __VLS_template(): {
53
53
  task?(_: {
54
54
  task: any;
55
55
  ganttItemId: string | number;
56
+ getTimelinePos: (timeline: Timeline) => number | null;
56
57
  style: {
57
58
  left: string;
58
59
  width: string;
59
60
  position: string;
60
- getTimelinePos: (timeline: Timeline) => number | null;
61
61
  };
62
62
  }): any;
63
63
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as ce, ref as f, watch as Z, computed as g, onMounted as ue, onUnmounted as pe, createElementBlock as r, openBlock as i, createElementVNode as a, createCommentVNode as A, normalizeStyle as l, renderSlot as _, createTextVNode as ve, Fragment as k, renderList as E, toDisplayString as y, withDirectives as ee, normalizeClass as te, vShow as se, withModifiers as he, nextTick as ae } from "vue";
2
- const fe = "0.3.5", xe = {
3
- version: fe
1
+ import { defineComponent as ce, ref as h, watch as Z, computed as g, onMounted as ue, onUnmounted as pe, createElementBlock as r, openBlock as i, createElementVNode as a, createCommentVNode as A, normalizeStyle as l, renderSlot as _, createTextVNode as ve, Fragment as k, renderList as E, toDisplayString as y, withDirectives as ee, normalizeClass as te, vShow as se, withModifiers as fe, nextTick as ae } from "vue";
2
+ const he = "0.3.6", xe = {
3
+ version: he
4
4
  }, ge = { class: "bg-white border border-slate-200 overflow-hidden flex-1 flex flex-col" }, ye = { class: "flex border-b border-slate-200 bg-slate-50/50" }, be = { class: "text-[10px] tracking-wider text-slate-400" }, me = { class: "text-xs font-semibold text-slate-400" }, we = { class: "flex flex-1 overflow-hidden" }, _e = ["onClick"], ke = { class: "mr-2 w-4 h-4" }, De = { class: "min-w-0" }, Te = { class: "text-sm font-semibold text-slate-700 truncate" }, Se = ["onClick"], Ee = {
5
5
  key: 1,
6
6
  class: "mr-1.5 w-3 h-3 inline-block"
7
- }, $e = { class: "text-xs truncate select-none flex gap-4" }, Ce = { class: "truncate" }, Ie = { class: "absolute top-0 bottom-2 left-0 right-0" }, Oe = { class: "absolute left-1 top-0 text-xs whitespace-nowrap" }, d = 60, h = 52, Re = 150, Le = 600, Me = 256, ze = /* @__PURE__ */ ce({
7
+ }, $e = { class: "text-xs truncate select-none flex gap-4" }, Ce = { class: "truncate" }, Ie = { class: "absolute top-0 bottom-2 left-0 right-0" }, Oe = { class: "absolute left-1 top-0 text-xs whitespace-nowrap" }, d = 60, f = 52, Re = 150, Le = 600, Me = 256, ze = /* @__PURE__ */ ce({
8
8
  __name: "GanttChart",
9
9
  props: {
10
10
  list: {},
@@ -15,14 +15,14 @@ const fe = "0.3.5", xe = {
15
15
  },
16
16
  emits: ["update:list", "toggle"],
17
17
  setup(D, { expose: L, emit: $ }) {
18
- const v = D, M = (t, s) => v.shouldCalculate ? v.shouldCalculate(t, s) : !0, ne = $, u = f([]), z = f(JSON.parse(JSON.stringify(v.list)));
18
+ const v = D, M = (t, s) => v.shouldCalculate ? v.shouldCalculate(t, s) : !0, ne = $, u = h([]), z = h(JSON.parse(JSON.stringify(v.list)));
19
19
  Z(
20
20
  () => v.list,
21
21
  () => {
22
22
  z.value = JSON.parse(JSON.stringify(v.list));
23
23
  }
24
24
  );
25
- const C = f(v.defaultLeftPanelWidth ?? Me), P = f(!1), le = (t) => {
25
+ const C = h(v.defaultLeftPanelWidth ?? Me), P = h(!1), le = (t) => {
26
26
  P.value = !0;
27
27
  const s = t.clientX, e = C.value, n = (p) => {
28
28
  if (!P.value) return;
@@ -88,7 +88,7 @@ const fe = "0.3.5", xe = {
88
88
  if (!t.time) return null;
89
89
  const s = new Date(t.time), e = u.value.indexOf(s.toISOString().split("T")[0]);
90
90
  return e > -1 ? e * d : -999;
91
- }, m = f(), N = f(), x = f(), I = g(() => {
91
+ }, m = h(), N = h(), x = h(), I = g(() => {
92
92
  const t = [], s = (e, n, o, p) => {
93
93
  t.push({
94
94
  type: "task",
@@ -112,13 +112,13 @@ const fe = "0.3.5", xe = {
112
112
  s(n, e.id, e.id, 1);
113
113
  });
114
114
  }), t;
115
- }), S = f(0), H = f(600), j = g(() => I.value.length * h), q = g(() => {
116
- const t = Math.floor(S.value / h), s = Math.ceil(H.value / h), e = 5;
115
+ }), S = h(0), H = h(600), j = g(() => I.value.length * f), q = g(() => {
116
+ const t = Math.floor(S.value / f), s = Math.ceil(H.value / f), e = 5;
117
117
  return {
118
118
  start: Math.max(0, t - e),
119
119
  end: Math.min(I.value.length, t + s + e)
120
120
  };
121
- }), J = g(() => q.value.start * h), K = g(() => {
121
+ }), J = g(() => q.value.start * f), K = g(() => {
122
122
  const { start: t, end: s } = q.value;
123
123
  return I.value.slice(t, s);
124
124
  }), X = () => {
@@ -134,7 +134,7 @@ const fe = "0.3.5", xe = {
134
134
  }, Y = g(() => {
135
135
  const t = (/* @__PURE__ */ new Date()).toISOString().split("T")[0], s = u.value.indexOf(t);
136
136
  return s === -1 ? null : s * d;
137
- }), W = f();
137
+ }), W = h();
138
138
  let O = null;
139
139
  return ue(() => {
140
140
  F(), X(), W.value && (O = new ResizeObserver(() => {
@@ -215,7 +215,7 @@ const fe = "0.3.5", xe = {
215
215
  e.type === "group" ? (i(), r("div", {
216
216
  key: 0,
217
217
  class: "flex items-center px-4 hover:bg-slate-50 cursor-pointer border-b border-slate-50 transition-colors",
218
- style: l({ height: h + "px" }),
218
+ style: l({ height: f + "px" }),
219
219
  onClick: (n) => U(e.data)
220
220
  }, [
221
221
  ee(a("span", {
@@ -250,8 +250,8 @@ const fe = "0.3.5", xe = {
250
250
  ], 12, _e)) : (i(), r("div", {
251
251
  key: 1,
252
252
  class: "flex items-center pr-4 border-b border-slate-100/50 text-slate-600 hover:bg-white transition-colors cursor-pointer",
253
- style: l({ height: h + "px", paddingLeft: e.level * 20 + 12 + "px" }),
254
- onClick: he((n) => U(e.data), ["stop"])
253
+ style: l({ height: f + "px", paddingLeft: e.level * 20 + 12 + "px" }),
254
+ onClick: fe((n) => U(e.data), ["stop"])
255
255
  }, [
256
256
  e.data.children && e.data.children.length > 0 ? (i(), r("span", {
257
257
  key: 0,
@@ -321,7 +321,7 @@ const fe = "0.3.5", xe = {
321
321
  e.type === "group" ? (i(), r("div", {
322
322
  key: 0,
323
323
  class: "relative border-b border-[#e8e8e8]",
324
- style: l({ height: h + "px", width: b.value + "px" })
324
+ style: l({ height: f + "px", width: b.value + "px" })
325
325
  }, [
326
326
  (i(!0), r(k, null, E(re.value[e.data.id], (n, o) => _(t.$slots, "count", {
327
327
  key: o,
@@ -331,7 +331,7 @@ const fe = "0.3.5", xe = {
331
331
  style: l({
332
332
  left: B(o) + "px",
333
333
  width: d + "px",
334
- height: h + "px"
334
+ height: f + "px"
335
335
  })
336
336
  }, () => [
337
337
  a("div", {
@@ -339,27 +339,27 @@ const fe = "0.3.5", xe = {
339
339
  style: l({
340
340
  left: B(o) + "px",
341
341
  width: d + "px",
342
- height: h + "px",
342
+ height: f + "px",
343
343
  contentVisibility: "auto",
344
- containIntrinsicSize: `${d}px ${h}px`
344
+ containIntrinsicSize: `${d}px ${f}px`
345
345
  })
346
346
  }, y(n), 5)
347
347
  ], !0)), 128))
348
348
  ], 4)) : (i(), r("div", {
349
349
  key: 1,
350
350
  class: "relative border-b border-[#e8e8e8] overflow-hidden",
351
- style: l({ height: h + "px", width: b.value + "px" })
351
+ style: l({ height: f + "px", width: b.value + "px" })
352
352
  }, [
353
353
  T(e.data) ? _(t.$slots, "task", {
354
354
  key: 0,
355
355
  style: l({
356
356
  left: T(e.data).left + "px",
357
357
  width: T(e.data).width + "px",
358
- position: "absolute",
359
- getTimelinePos: V
358
+ position: "absolute"
360
359
  }),
361
360
  task: e.data,
362
- ganttItemId: e.groupId
361
+ ganttItemId: e.groupId,
362
+ getTimelinePos: V
363
363
  }, () => [
364
364
  a("div", {
365
365
  class: "absolute bg-slate-400 top-4 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",
@@ -402,7 +402,7 @@ const fe = "0.3.5", xe = {
402
402
  for (const [v, M] of L)
403
403
  $[v] = M;
404
404
  return $;
405
- }, He = /* @__PURE__ */ Pe(ze, [["__scopeId", "data-v-05d54120"]]), We = xe.version, Ae = () => {
405
+ }, He = /* @__PURE__ */ Pe(ze, [["__scopeId", "data-v-34d566f8"]]), We = xe.version, Ae = () => {
406
406
  console.log("Gantt Core Initialized");
407
407
  };
408
408
  export {
@@ -1 +1 @@
1
- (function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f.GanttVue3={},f.Vue))})(this,(function(f,e){"use strict";const A={version:"0.3.5"},j={class:"bg-white border border-slate-200 overflow-hidden flex-1 flex flex-col"},q={class:"flex border-b border-slate-200 bg-slate-50/50"},J={class:"text-[10px] tracking-wider text-slate-400"},K={class:"text-xs font-semibold text-slate-400"},X={class:"flex flex-1 overflow-hidden"},U=["onClick"],Y={class:"mr-2 w-4 h-4"},Q={class:"min-w-0"},Z={class:"text-sm font-semibold text-slate-700 truncate"},ee=["onClick"],te={key:1,class:"mr-1.5 w-3 h-3 inline-block"},le={class:"text-xs truncate select-none flex gap-4"},ne={class:"truncate"},oe={class:"absolute top-0 bottom-2 left-0 right-0"},ae={class:"absolute left-1 top-0 text-xs whitespace-nowrap"},r=60,c=52,re=150,se=600,ie=256,de=((y,D)=>{const k=y.__vccOpts||y;for(const[p,N]of D)k[p]=N;return k})(e.defineComponent({__name:"GanttChart",props:{list:{},dateRange:{},showToday:{type:Boolean},shouldCalculate:{type:Function},defaultLeftPanelWidth:{}},emits:["update:list","toggle"],setup(y,{expose:D,emit:k}){const p=y,N=(l,n)=>p.shouldCalculate?p.shouldCalculate(l,n):!0,fe=k,i=e.ref([]),V=e.ref(JSON.parse(JSON.stringify(p.list)));e.watch(()=>p.list,()=>{V.value=JSON.parse(JSON.stringify(p.list))});const E=e.ref(p.defaultLeftPanelWidth??ie),B=e.ref(!1),he=l=>{B.value=!0;const n=l.clientX,t=E.value,o=d=>{if(!B.value)return;const s=d.clientX-n,_=t+s;E.value=Math.max(re,Math.min(se,_))},a=()=>{B.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(()=>i.value.length*r),me=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"})),xe=e.computed(()=>{const l={},n=(t,o)=>{if(!o.startDate||!o.endDate||!N(t,o))return;let a=new Date(o.startDate);const d=new Date(o.endDate);for(;a<=d;){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 V.value.forEach(t=>{l[t.id]={},t.tasks.forEach(o=>{n(t,o)})}),l}),L=()=>{const l=[];let n=new Date(p.dateRange[0]);const t=new Date(p.dateRange[1]);for(;n<=t;)l.push(n.toISOString().split("T")[0]),n.setDate(n.getDate()+1);i.value=l},O=l=>{const n=new Date(l),t=["周日","周一","周二","周三","周四","周五","周六"];return{monthDay:`${String(n.getMonth()+1).padStart(2,"0")}/${n.getDate()}`,weekday:t[n.getDay()]}},$=l=>{const n=i.value.indexOf(l);return n>-1?n*r:-999},u=l=>{if(!l.startDate||!l.endDate)return null;const n=new Date(l.startDate),t=new Date(l.endDate),o=new Date(i.value[0]),a=new Date(i.value[i.value.length-1]);if(n<o&&t>a)return{left:-4,width:m.value+8};let d=i.value.indexOf(l.startDate),s=i.value.indexOf(l.endDate),_=4,G=-8;return d===-1&&s===-1?null:(d===-1&&(d=0,_=-4),s===-1&&(s=i.value.length-1,G=4),{left:d*r+_,width:(s-d+1)*r+G})},I=l=>{if(!l.time)return null;const n=new Date(l.time),t=i.value.indexOf(n.toISOString().split("T")[0]);return t>-1?t*r:-999},x=e.ref(),T=e.ref(),h=e.ref(),S=e.computed(()=>{const l=[],n=(t,o,a,d)=>{l.push({type:"task",data:t,uniqueKey:`t-${o}-${a}-${t.id}`,parentId:a,groupId:o,level:d}),t.expanded&&t.children&&t.children.forEach(s=>{n(s,o,t.id,d+1)})};return V.value.forEach(t=>{l.push({type:"group",data:t,uniqueKey:`g-${t.id}`,groupId:t.id,level:0}),t.expanded&&t.tasks.forEach(o=>{n(o,t.id,t.id,1)})}),l}),b=e.ref(0),z=e.ref(600),R=e.computed(()=>S.value.length*c),M=e.computed(()=>{const l=Math.floor(b.value/c),n=Math.ceil(z.value/c),t=5;return{start:Math.max(0,l-t),end:Math.min(S.value.length,l+n+t)}}),P=e.computed(()=>M.value.start*c),v=e.computed(()=>{const{start:l,end:n}=M.value;return S.value.slice(l,n)}),F=()=>{h.value&&(z.value=h.value.clientHeight-1)};let g=!1;const ge=()=>{g||!x.value||!h.value||(g=!0,b.value=x.value.scrollTop,h.value.scrollTop=x.value.scrollTop,e.nextTick(()=>g=!1))},ye=()=>{g||!h.value||!x.value||(g=!0,b.value=h.value.scrollTop,x.value.scrollTop=h.value.scrollTop,T.value&&(T.value.scrollLeft=h.value.scrollLeft),e.nextTick(()=>g=!1))},H=l=>{l.expanded=!l.expanded,fe("toggle",l.id)},W=e.computed(()=>{const l=new Date().toISOString().split("T")[0],n=i.value.indexOf(l);return n===-1?null:n*r}),C=e.ref();let w=null;return e.onMounted(()=>{L(),F(),C.value&&(w=new ResizeObserver(()=>{F()}),w.observe(C.value))}),e.watch(()=>p.dateRange,()=>{L()}),e.onUnmounted(()=>{w&&w.disconnect()}),D({getExpandedMapId:()=>{const l=new Map;return S.value.forEach(n=>{n.type==="group"&&l.set(n.data.id,n.data.expanded),n.type==="task"&&l.set(`${n.groupId}-${n.data.id}`,n.data.expanded)}),l}}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:C,class:"flex flex-col h-full bg-slate-50 font-sans antialiased select-none"},[e.createElementVNode("div",j,[e.createElementVNode("div",q,[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:E.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:he},null,32)],4),e.createElementVNode("div",{ref_key:"headerRef",ref:T,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(i.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(O(t).weekday),1),e.createElementVNode("span",K,e.toDisplayString(O(t).monthDay),1)],!0)],4))),128))],4)],512)]),e.createElementVNode("div",X,[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:E.value+"px"}),onScroll:ge},[e.createElementVNode("div",{style:e.normalizeStyle({height:R.value+"px",position:"relative"})},[e.createElementVNode("div",{style:e.normalizeStyle({transform:`translateY(${P.value}px)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.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:c+"px"}),onClick:o=>H(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",Y,null,512),[[e.vShow,!t.data.tasks.length]]),e.createElementVNode("div",Q,[e.renderSlot(l.$slots,"leftPanelItem",{item:t.data},()=>[e.createElementVNode("div",Z,e.toDisplayString(t.data.name),1)],!0)])],12,U)):(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:c+"px",paddingLeft:t.level*20+12+"px"}),onClick:e.withModifiers(o=>H(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",te)),e.renderSlot(l.$slots,"leftPanelItemTask",{item:t.data},()=>[e.createElementVNode("div",le,e.toDisplayString(t.data.name),1)],!0)],12,ee))]))),128))],4)],4)],36),e.createElementVNode("div",{ref_key:"rightPanelRef",ref:h,onScroll:ye,class:"flex-1 overflow-auto relative select-none"},[W.value!==null&&y.showToday?(e.openBlock(),e.createElementBlock("div",{key:0,class:"absolute top-0 z-10 pointer-events-none border-l-2 border-orange-400",style:e.normalizeStyle({left:W.value+"px",bottom:-b.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({...me.value,height:z.value+"px",top:b.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(${P.value}px)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.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:c+"px",width:m.value+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xe.value[t.data.id],(o,a)=>e.renderSlot(l.$slots,"count",{key:a,item:t.data,date:a,count:o,style:e.normalizeStyle({left:$(a)+"px",width:r+"px",height:c+"px"})},()=>[e.createElementVNode("div",{class:"absolute top-0 flex items-center justify-center text-sm",style:e.normalizeStyle({left:$(a)+"px",width:r+"px",height:c+"px",contentVisibility:"auto",containIntrinsicSize:`${r}px ${c}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:c+"px",width:m.value+"px"})},[u(t.data)?e.renderSlot(l.$slots,"task",{key:0,style:e.normalizeStyle({left:u(t.data).left+"px",width:u(t.data).width+"px",position:"absolute",getTimelinePos:I}),task:t.data,ganttItemId:t.groupId},()=>[e.createElementVNode("div",{class:"absolute bg-slate-400 top-4 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:u(t.data).left+"px",width:u(t.data).width+"px",backgroundColor:t.data.color})},[e.createElementVNode("span",ne,e.toDisplayString(t.data.name),1)],4),e.createElementVNode("div",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data.timelines,o=>(e.openBlock(),e.createElementBlock("div",{key:o.id,style:e.normalizeStyle({left:I(o)+"px",width:"2px",position:"absolute",height:"100%",backgroundColor:o.color,color:o.color})},[e.createElementVNode("span",ae,e.toDisplayString(o.name),1)],4))),128))])],!0):e.createCommentVNode("",!0)],4))],64))),128))],4)],4)],544)])]),e.createCommentVNode("",!0)],512))}}),[["__scopeId","data-v-05d54120"]]),ce=A.version,pe=()=>{console.log("Gantt Core Initialized")};f.GANTT_VERSION=ce,f.GanttChart=de,f.setupGantt=pe,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f.GanttVue3={},f.Vue))})(this,(function(f,e){"use strict";const A={version:"0.3.6"},j={class:"bg-white border border-slate-200 overflow-hidden flex-1 flex flex-col"},q={class:"flex border-b border-slate-200 bg-slate-50/50"},J={class:"text-[10px] tracking-wider text-slate-400"},K={class:"text-xs font-semibold text-slate-400"},X={class:"flex flex-1 overflow-hidden"},U=["onClick"],Y={class:"mr-2 w-4 h-4"},Q={class:"min-w-0"},Z={class:"text-sm font-semibold text-slate-700 truncate"},ee=["onClick"],te={key:1,class:"mr-1.5 w-3 h-3 inline-block"},le={class:"text-xs truncate select-none flex gap-4"},ne={class:"truncate"},oe={class:"absolute top-0 bottom-2 left-0 right-0"},ae={class:"absolute left-1 top-0 text-xs whitespace-nowrap"},r=60,c=52,re=150,se=600,ie=256,de=((y,D)=>{const k=y.__vccOpts||y;for(const[p,N]of D)k[p]=N;return k})(e.defineComponent({__name:"GanttChart",props:{list:{},dateRange:{},showToday:{type:Boolean},shouldCalculate:{type:Function},defaultLeftPanelWidth:{}},emits:["update:list","toggle"],setup(y,{expose:D,emit:k}){const p=y,N=(l,n)=>p.shouldCalculate?p.shouldCalculate(l,n):!0,fe=k,i=e.ref([]),V=e.ref(JSON.parse(JSON.stringify(p.list)));e.watch(()=>p.list,()=>{V.value=JSON.parse(JSON.stringify(p.list))});const E=e.ref(p.defaultLeftPanelWidth??ie),B=e.ref(!1),he=l=>{B.value=!0;const n=l.clientX,t=E.value,o=d=>{if(!B.value)return;const s=d.clientX-n,_=t+s;E.value=Math.max(re,Math.min(se,_))},a=()=>{B.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(()=>i.value.length*r),me=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"})),xe=e.computed(()=>{const l={},n=(t,o)=>{if(!o.startDate||!o.endDate||!N(t,o))return;let a=new Date(o.startDate);const d=new Date(o.endDate);for(;a<=d;){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 V.value.forEach(t=>{l[t.id]={},t.tasks.forEach(o=>{n(t,o)})}),l}),L=()=>{const l=[];let n=new Date(p.dateRange[0]);const t=new Date(p.dateRange[1]);for(;n<=t;)l.push(n.toISOString().split("T")[0]),n.setDate(n.getDate()+1);i.value=l},O=l=>{const n=new Date(l),t=["周日","周一","周二","周三","周四","周五","周六"];return{monthDay:`${String(n.getMonth()+1).padStart(2,"0")}/${n.getDate()}`,weekday:t[n.getDay()]}},$=l=>{const n=i.value.indexOf(l);return n>-1?n*r:-999},u=l=>{if(!l.startDate||!l.endDate)return null;const n=new Date(l.startDate),t=new Date(l.endDate),o=new Date(i.value[0]),a=new Date(i.value[i.value.length-1]);if(n<o&&t>a)return{left:-4,width:m.value+8};let d=i.value.indexOf(l.startDate),s=i.value.indexOf(l.endDate),_=4,G=-8;return d===-1&&s===-1?null:(d===-1&&(d=0,_=-4),s===-1&&(s=i.value.length-1,G=4),{left:d*r+_,width:(s-d+1)*r+G})},I=l=>{if(!l.time)return null;const n=new Date(l.time),t=i.value.indexOf(n.toISOString().split("T")[0]);return t>-1?t*r:-999},x=e.ref(),T=e.ref(),h=e.ref(),S=e.computed(()=>{const l=[],n=(t,o,a,d)=>{l.push({type:"task",data:t,uniqueKey:`t-${o}-${a}-${t.id}`,parentId:a,groupId:o,level:d}),t.expanded&&t.children&&t.children.forEach(s=>{n(s,o,t.id,d+1)})};return V.value.forEach(t=>{l.push({type:"group",data:t,uniqueKey:`g-${t.id}`,groupId:t.id,level:0}),t.expanded&&t.tasks.forEach(o=>{n(o,t.id,t.id,1)})}),l}),b=e.ref(0),z=e.ref(600),R=e.computed(()=>S.value.length*c),M=e.computed(()=>{const l=Math.floor(b.value/c),n=Math.ceil(z.value/c),t=5;return{start:Math.max(0,l-t),end:Math.min(S.value.length,l+n+t)}}),P=e.computed(()=>M.value.start*c),v=e.computed(()=>{const{start:l,end:n}=M.value;return S.value.slice(l,n)}),F=()=>{h.value&&(z.value=h.value.clientHeight-1)};let g=!1;const ge=()=>{g||!x.value||!h.value||(g=!0,b.value=x.value.scrollTop,h.value.scrollTop=x.value.scrollTop,e.nextTick(()=>g=!1))},ye=()=>{g||!h.value||!x.value||(g=!0,b.value=h.value.scrollTop,x.value.scrollTop=h.value.scrollTop,T.value&&(T.value.scrollLeft=h.value.scrollLeft),e.nextTick(()=>g=!1))},H=l=>{l.expanded=!l.expanded,fe("toggle",l.id)},W=e.computed(()=>{const l=new Date().toISOString().split("T")[0],n=i.value.indexOf(l);return n===-1?null:n*r}),C=e.ref();let w=null;return e.onMounted(()=>{L(),F(),C.value&&(w=new ResizeObserver(()=>{F()}),w.observe(C.value))}),e.watch(()=>p.dateRange,()=>{L()}),e.onUnmounted(()=>{w&&w.disconnect()}),D({getExpandedMapId:()=>{const l=new Map;return S.value.forEach(n=>{n.type==="group"&&l.set(n.data.id,n.data.expanded),n.type==="task"&&l.set(`${n.groupId}-${n.data.id}`,n.data.expanded)}),l}}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:C,class:"flex flex-col h-full bg-slate-50 font-sans antialiased select-none"},[e.createElementVNode("div",j,[e.createElementVNode("div",q,[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:E.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:he},null,32)],4),e.createElementVNode("div",{ref_key:"headerRef",ref:T,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(i.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(O(t).weekday),1),e.createElementVNode("span",K,e.toDisplayString(O(t).monthDay),1)],!0)],4))),128))],4)],512)]),e.createElementVNode("div",X,[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:E.value+"px"}),onScroll:ge},[e.createElementVNode("div",{style:e.normalizeStyle({height:R.value+"px",position:"relative"})},[e.createElementVNode("div",{style:e.normalizeStyle({transform:`translateY(${P.value}px)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.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:c+"px"}),onClick:o=>H(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",Y,null,512),[[e.vShow,!t.data.tasks.length]]),e.createElementVNode("div",Q,[e.renderSlot(l.$slots,"leftPanelItem",{item:t.data},()=>[e.createElementVNode("div",Z,e.toDisplayString(t.data.name),1)],!0)])],12,U)):(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:c+"px",paddingLeft:t.level*20+12+"px"}),onClick:e.withModifiers(o=>H(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",te)),e.renderSlot(l.$slots,"leftPanelItemTask",{item:t.data},()=>[e.createElementVNode("div",le,e.toDisplayString(t.data.name),1)],!0)],12,ee))]))),128))],4)],4)],36),e.createElementVNode("div",{ref_key:"rightPanelRef",ref:h,onScroll:ye,class:"flex-1 overflow-auto relative select-none"},[W.value!==null&&y.showToday?(e.openBlock(),e.createElementBlock("div",{key:0,class:"absolute top-0 z-10 pointer-events-none border-l-2 border-orange-400",style:e.normalizeStyle({left:W.value+"px",bottom:-b.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({...me.value,height:z.value+"px",top:b.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(${P.value}px)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.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:c+"px",width:m.value+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xe.value[t.data.id],(o,a)=>e.renderSlot(l.$slots,"count",{key:a,item:t.data,date:a,count:o,style:e.normalizeStyle({left:$(a)+"px",width:r+"px",height:c+"px"})},()=>[e.createElementVNode("div",{class:"absolute top-0 flex items-center justify-center text-sm",style:e.normalizeStyle({left:$(a)+"px",width:r+"px",height:c+"px",contentVisibility:"auto",containIntrinsicSize:`${r}px ${c}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:c+"px",width:m.value+"px"})},[u(t.data)?e.renderSlot(l.$slots,"task",{key:0,style:e.normalizeStyle({left:u(t.data).left+"px",width:u(t.data).width+"px",position:"absolute"}),task:t.data,ganttItemId:t.groupId,getTimelinePos:I},()=>[e.createElementVNode("div",{class:"absolute bg-slate-400 top-4 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:u(t.data).left+"px",width:u(t.data).width+"px",backgroundColor:t.data.color})},[e.createElementVNode("span",ne,e.toDisplayString(t.data.name),1)],4),e.createElementVNode("div",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data.timelines,o=>(e.openBlock(),e.createElementBlock("div",{key:o.id,style:e.normalizeStyle({left:I(o)+"px",width:"2px",position:"absolute",height:"100%",backgroundColor:o.color,color:o.color})},[e.createElementVNode("span",ae,e.toDisplayString(o.name),1)],4))),128))])],!0):e.createCommentVNode("",!0)],4))],64))),128))],4)],4)],544)])]),e.createCommentVNode("",!0)],512))}}),[["__scopeId","data-v-34d566f8"]]),ce=A.version,pe=()=>{console.log("Gantt Core Initialized")};f.GANTT_VERSION=ce,f.GanttChart=de,f.setupGantt=pe,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ollap/gantt-vue3",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"