mantine-gantt 0.0.3 → 0.1.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.
- package/README.md +152 -26
- package/dist/cjs/Gantt/DependencyLinks.cjs +3 -3
- package/dist/cjs/Gantt/DependencyLinks.cjs.map +1 -1
- package/dist/cjs/Gantt/Gantt.cjs +198 -48
- package/dist/cjs/Gantt/Gantt.cjs.map +1 -1
- package/dist/cjs/Gantt/Gantt.module.css.cjs +1 -1
- package/dist/cjs/Gantt/TaskBar.cjs +37 -19
- package/dist/cjs/Gantt/TaskBar.cjs.map +1 -1
- package/dist/cjs/Gantt/TimelineGrid.cjs +57 -17
- package/dist/cjs/Gantt/TimelineGrid.cjs.map +1 -1
- package/dist/cjs/Gantt/TimelineHeader.cjs +54 -8
- package/dist/cjs/Gantt/TimelineHeader.cjs.map +1 -1
- package/dist/cjs/Gantt/utils.cjs +6 -9
- package/dist/cjs/Gantt/utils.cjs.map +1 -1
- package/dist/esm/Gantt/DependencyLinks.mjs +3 -3
- package/dist/esm/Gantt/DependencyLinks.mjs.map +1 -1
- package/dist/esm/Gantt/Gantt.mjs +200 -50
- package/dist/esm/Gantt/Gantt.mjs.map +1 -1
- package/dist/esm/Gantt/Gantt.module.css.mjs +1 -1
- package/dist/esm/Gantt/TaskBar.mjs +39 -21
- package/dist/esm/Gantt/TaskBar.mjs.map +1 -1
- package/dist/esm/Gantt/TimelineGrid.mjs +57 -17
- package/dist/esm/Gantt/TimelineGrid.mjs.map +1 -1
- package/dist/esm/Gantt/TimelineHeader.mjs +54 -8
- package/dist/esm/Gantt/TimelineHeader.mjs.map +1 -1
- package/dist/esm/Gantt/utils.mjs +6 -9
- package/dist/esm/Gantt/utils.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.layer.css +1 -1
- package/dist/types/Gantt/DependencyLinks.d.ts +5 -3
- package/dist/types/Gantt/TaskBar.d.ts +4 -2
- package/dist/types/Gantt/TimelineGrid.d.ts +2 -1
- package/dist/types/Gantt/TimelineHeader.d.ts +2 -1
- package/dist/types/Gantt/types.d.ts +6 -2
- package/dist/types/Gantt/utils.d.ts +1 -0
- package/package.json +2 -2
package/dist/styles.layer.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer mantine {.me_d2025adb{border:1px solid var(--mantine-color-default-border);border-radius:var(--mantine-radius-md);font-size:var(--mantine-font-size-sm);height:100%;min-height:400px;overflow:hidden}.me_d2025adb,.me_f2f7453c{background-color:var(--mantine-color-body);display:flex}.me_f2f7453c{border-right:1px solid var(--mantine-color-default-border);flex-direction:column;min-width:var(--gantt-task-list-width,320px);width:var(--gantt-task-list-width,320px)}.me_923f36e9{background-color:var(--mantine-color-gray-0);display:grid;grid-template-columns:1fr 90px 90px;height:var(--gantt-header-height,50px)}[data-mantine-color-scheme=dark] .me_923f36e9{background-color:var(--mantine-color-dark-6)}.me_923f36e9{border-bottom:1px solid var(--mantine-color-default-border);font-weight:600;position:sticky;top:0;z-index:10}.me_60a797eb{align-items:center;border-right:1px solid var(--mantine-color-default-border);color:var(--mantine-color-gray-7);display:flex;padding:0 var(--mantine-spacing-sm)}[data-mantine-color-scheme=dark] .me_60a797eb{color:var(--mantine-color-dark-1)}.me_60a797eb:last-child{border-right:none}.me_6f39f4fe{flex:1;overflow-y:auto;scrollbar-width:none}.me_6f39f4fe::-webkit-scrollbar{display:none}.me_352322fe{border-bottom:1px solid var(--mantine-color-default-border);display:grid;grid-template-columns:1fr 90px 90px;height:var(--gantt-row-height,44px);transition:background-color .15s ease}.me_352322fe:hover{background-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .me_352322fe:hover{background-color:var(--mantine-color-dark-6)}.me_6f3a44be{align-items:center;border-right:1px solid var(--mantine-color-default-border);display:flex;overflow:hidden;padding:0 var(--mantine-spacing-sm);text-overflow:ellipsis;white-space:nowrap}.me_6f3a44be:last-child{border-right:none}.me_6f3a44be:first-child{color:var(--mantine-color-gray-8);font-weight:500}[data-mantine-color-scheme=dark] .me_6f3a44be:first-child{color:var(--mantine-color-dark-0)}.me_6f3a44be:not(:first-child){color:var(--mantine-color-gray-6);font-size:var(--mantine-font-size-xs)}[data-mantine-color-scheme=dark] .me_6f3a44be:not(:first-child){color:var(--mantine-color-dark-2)}.me_8fa609ba{display:flex;flex:1;flex-direction:column;overflow:hidden;position:relative}.me_c31c24e7{background-color:var(--mantine-color-gray-0);height:var(--gantt-header-height,50px)}[data-mantine-color-scheme=dark] .me_c31c24e7{background-color:var(--mantine-color-dark-6)}.me_c31c24e7{border-bottom:1px solid var(--mantine-color-default-border);flex-shrink:0;overflow-x:hidden;overflow-y:hidden}.me_cb4231af{display:flex;flex-direction:column;height:100%}.me_282b9f73{display:flex;flex:1}.me_dd4156e9{align-items:center;border-right:1px solid var(--mantine-color-default-border);color:var(--mantine-color-gray-6);display:flex;font-size:var(--mantine-font-size-xs);font-weight:500;justify-content:center;min-width:var(--gantt-column-width,40px);width:var(--gantt-column-width,40px)}[data-mantine-color-scheme=dark] .me_dd4156e9{color:var(--mantine-color-dark-2)}.me_dd4156e9:last-child{border-right:none}.me_dd4156e9[data-weekend]{background-color:var(--mantine-color-gray-1)}[data-mantine-color-scheme=dark] .me_dd4156e9[data-weekend]{background-color:var(--mantine-color-dark-7)}.me_dd4156e9[data-today],[data-mantine-color-scheme=dark] .me_dd4156e9[data-today]{background-color:var(--mantine-primary-color-light)}.me_dd4156e9[data-today]{color:var(--mantine-primary-color-filled);font-weight:600}.me_8ac462da{background-color:var(--mantine-color-gray-1);border-bottom:1px solid var(--mantine-color-default-border);display:flex}[data-mantine-color-scheme=dark] .me_8ac462da{background-color:var(--mantine-color-dark-7)}.me_f9e3635c{align-items:center;border-right:1px solid var(--mantine-color-default-border);color:var(--mantine-color-gray-7);display:flex;font-size:var(--mantine-font-size-xs);font-weight:600;justify-content:center}[data-mantine-color-scheme=dark] .me_f9e3635c{color:var(--mantine-color-dark-1)}.me_f9e3635c{min-width:0;overflow:hidden;padding:2px var(--mantine-spacing-xs);text-overflow:ellipsis;white-space:nowrap}.me_f9e3635c:last-child{border-right:none}.me_d5d64a7c{flex:1;overflow-x:auto;overflow-y:scroll;position:relative;scrollbar-width:none}.me_d5d64a7c::-webkit-scrollbar{height:12px;width:0}.me_d5d64a7c::-webkit-scrollbar-track{background:var(--mantine-color-gray-1)}[data-mantine-color-scheme=dark] .me_d5d64a7c::-webkit-scrollbar-track{background:var(--mantine-color-dark-6)}.me_d5d64a7c::-webkit-scrollbar-thumb{background:var(--mantine-color-gray-4)}[data-mantine-color-scheme=dark] .me_d5d64a7c::-webkit-scrollbar-thumb{background:var(--mantine-color-dark-4)}.me_d5d64a7c::-webkit-scrollbar-thumb{border-radius:6px}.me_d5d64a7c::-webkit-scrollbar-thumb:hover{background:var(--mantine-color-gray-5)}[data-mantine-color-scheme=dark] .me_d5d64a7c::-webkit-scrollbar-thumb:hover{background:var(--mantine-color-dark-3)}.me_a9b83d5f{min-height:100%;position:relative}.me_d5d89c20{left:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0}.me_3be2739c{background-color:rgba(0,0,0,.03);position:absolute;top:0}[data-mantine-color-scheme=dark] .me_3be2739c{background-color:hsla(0,0%,100%,.02)}.me_1e5ed1d3{background-color:rgba(0,0,0,.08);position:absolute;top:0;width:1px}[data-mantine-color-scheme=dark] .me_1e5ed1d3{background-color:hsla(0,0%,100%,.08)}.me_6b1855{background-color:var(--mantine-color-default-border);height:1px}.me_6b1855,.me_8b0725c0{left:0;position:absolute;right:0}.me_8b0725c0{border-bottom:1px solid var(--mantine-color-default-border);height:var(--gantt-row-height,44px)}.me_8b0725c0:last-child{border-bottom:none}.me_5228dbb5{align-items:center;background-color:var(--task-bar-color,var(--mantine-primary-color-filled));border-radius:var(--mantine-radius-sm);box-shadow:var(--mantine-shadow-xs);cursor:grab;display:flex;height:calc(var(--gantt-row-height) - 16px);overflow:visible;position:absolute;top:8px;touch-action:none;user-select:none;will-change:left,width;z-index:10}.me_5228dbb5:hover{box-shadow:var(--mantine-shadow-sm)}.me_5228dbb5[data-dragging]{box-shadow:var(--mantine-shadow-md);cursor:grabbing;opacity:.9;transition:box-shadow .15s ease;z-index:100}.me_d1af7d02{background-color:rgba(0,0,0,.15);border-radius:var(--mantine-radius-sm) 0 0 var(--mantine-radius-sm);height:100%;left:0;pointer-events:none;position:absolute;top:0}.me_b561bc3f{color:var(--mantine-color-white);font-size:var(--mantine-font-size-xs);font-weight:500;overflow:hidden;padding:0 var(--mantine-spacing-xs);position:relative;text-overflow:ellipsis;white-space:nowrap;z-index:1}.me_176570f5{align-items:center;background:linear-gradient(90deg,transparent,rgba(0,0,0,.1));cursor:ew-resize;display:flex;height:100%;justify-content:center;opacity:0;position:absolute;right:0;top:0;transition:opacity .15s ease;width:10px}.me_5228dbb5:hover .me_176570f5{opacity:1}.me_176570f5:after{border-left:1px solid hsla(0,0%,100%,.5);border-right:1px solid hsla(0,0%,100%,.5);content:"";height:14px;width:3px}.me_14ce029c{align-items:center;background:linear-gradient(270deg,transparent,rgba(0,0,0,.1));cursor:ew-resize;display:flex;height:100%;justify-content:center;left:0;opacity:0;position:absolute;top:0;transition:opacity .15s ease;width:10px;z-index:2}.me_5228dbb5:hover .me_14ce029c{opacity:1}.me_14ce029c:after{border-left:1px solid hsla(0,0%,100%,.5);border-right:1px solid hsla(0,0%,100%,.5);content:"";height:14px;width:3px}.me_810d0b9a{background-color:var(--mantine-primary-color-filled);border:2px solid var(--mantine-color-white);border-radius:50%;height:14px;position:absolute;right:-18px;top:50%;transform:translateY(-50%);width:14px}[data-mantine-color-scheme=dark] .me_810d0b9a{border:2px solid var(--mantine-color-dark-6)}.me_810d0b9a{cursor:crosshair;opacity:0;transition:opacity .15s ease,transform .15s ease;z-index:30}.me_5228dbb5:hover .me_810d0b9a{opacity:1}.me_810d0b9a:hover{background-color:var(--mantine-primary-color-filled);transform:translateY(-50%) scale(1.2)}.me_5228dbb5[data-link-target]{outline:2px dashed var(--mantine-primary-color-filled);outline-offset:2px}.me_f220b47c{bottom:0;pointer-events:none;width:2px;z-index:50}.me_f220b47c,.me_f220b47c:before{background-color:var(--mantine-color-red-6);position:absolute;top:0}.me_f220b47c:before{border-radius:50%;content:"";height:10px;left:-4px;width:10px}.me_d0e44395{height:100%;left:0;overflow:visible;pointer-events:none;position:absolute;top:0;width:100%;z-index:1}.me_69d5d098{fill:none;stroke:var(--mantine-color-gray-6)}[data-mantine-color-scheme=dark] .me_69d5d098{stroke:var(--mantine-color-gray-5)}.me_69d5d098{stroke-width:1.5;pointer-events:stroke}.me_69d5d098:hover{stroke:var(--mantine-color-gray-8)}[data-mantine-color-scheme=dark] .me_69d5d098:hover{stroke:var(--mantine-color-gray-3)}.me_ffc139d6{fill:var(--mantine-color-gray-6)}[data-mantine-color-scheme=dark] .me_ffc139d6{fill:var(--mantine-color-gray-5)}}
|
|
1
|
+
@layer mantine {.me_d2025adb{border:1px solid var(--mantine-color-default-border);border-radius:var(--mantine-radius-md);font-size:var(--mantine-font-size-sm);height:100%;min-height:400px;overflow:hidden}.me_d2025adb,.me_f2f7453c{background-color:var(--mantine-color-body);display:flex}.me_f2f7453c{border-right:1px solid var(--mantine-color-default-border);flex-direction:column;min-width:var(--gantt-task-list-width,320px);width:var(--gantt-task-list-width,320px)}.me_923f36e9{background-color:var(--mantine-color-gray-0);display:grid;grid-template-columns:1fr 90px 90px;height:var(--gantt-header-height,50px)}[data-mantine-color-scheme=dark] .me_923f36e9{background-color:var(--mantine-color-dark-6)}.me_923f36e9{border-bottom:1px solid var(--mantine-color-default-border);font-weight:600;position:sticky;top:0;z-index:10}.me_60a797eb{align-items:center;border-right:1px solid var(--mantine-color-default-border);color:var(--mantine-color-gray-7);display:flex;padding:0 var(--mantine-spacing-sm)}[data-mantine-color-scheme=dark] .me_60a797eb{color:var(--mantine-color-dark-1)}.me_60a797eb:last-child{border-right:none}.me_6f39f4fe{flex:1;overflow-y:auto;scrollbar-width:none}.me_6f39f4fe::-webkit-scrollbar{display:none}.me_352322fe{border-bottom:1px solid var(--mantine-color-default-border);display:grid;grid-template-columns:1fr 90px 90px;height:var(--gantt-row-height,44px);transition:background-color .15s ease}.me_352322fe:hover{background-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .me_352322fe:hover{background-color:var(--mantine-color-dark-6)}.me_6f3a44be{align-items:center;border-right:1px solid var(--mantine-color-default-border);display:flex;overflow:hidden;padding:0 var(--mantine-spacing-sm);text-overflow:ellipsis;white-space:nowrap}.me_6f3a44be:last-child{border-right:none}.me_6f3a44be:first-child{color:var(--mantine-color-gray-8);font-weight:500}[data-mantine-color-scheme=dark] .me_6f3a44be:first-child{color:var(--mantine-color-dark-0)}.me_6f3a44be:not(:first-child){color:var(--mantine-color-gray-6);font-size:var(--mantine-font-size-xs)}[data-mantine-color-scheme=dark] .me_6f3a44be:not(:first-child){color:var(--mantine-color-dark-2)}.me_8fa609ba{display:flex;flex:1;flex-direction:column;overflow:hidden;position:relative}.me_c31c24e7{background-color:var(--mantine-color-gray-0);height:var(--gantt-header-height,50px)}[data-mantine-color-scheme=dark] .me_c31c24e7{background-color:var(--mantine-color-dark-6)}.me_c31c24e7{border-bottom:1px solid var(--mantine-color-default-border);flex-shrink:0;overflow-x:hidden;overflow-y:hidden}.me_cb4231af{display:flex;flex-direction:column;height:100%}.me_282b9f73{display:flex;flex:1}.me_dd4156e9{align-items:center;border-right:1px solid var(--mantine-color-default-border);color:var(--mantine-color-gray-6);display:flex;font-size:var(--mantine-font-size-xs);font-weight:500;justify-content:center;min-width:var(--gantt-column-width,40px);width:var(--gantt-column-width,40px)}[data-mantine-color-scheme=dark] .me_dd4156e9{color:var(--mantine-color-dark-2)}.me_dd4156e9:last-child{border-right:none}.me_dd4156e9[data-weekend]{background-color:var(--mantine-color-gray-1)}[data-mantine-color-scheme=dark] .me_dd4156e9[data-weekend]{background-color:var(--mantine-color-dark-7)}.me_dd4156e9[data-today],[data-mantine-color-scheme=dark] .me_dd4156e9[data-today]{background-color:var(--mantine-primary-color-light)}.me_dd4156e9[data-today]{color:var(--mantine-primary-color-filled);font-weight:600}.me_8ac462da{background-color:var(--mantine-color-gray-1);border-bottom:1px solid var(--mantine-color-default-border);display:flex}[data-mantine-color-scheme=dark] .me_8ac462da{background-color:var(--mantine-color-dark-7)}.me_f9e3635c{align-items:center;border-right:1px solid var(--mantine-color-default-border);color:var(--mantine-color-gray-7);display:flex;font-size:var(--mantine-font-size-xs);font-weight:600;justify-content:center}[data-mantine-color-scheme=dark] .me_f9e3635c{color:var(--mantine-color-dark-1)}.me_f9e3635c{min-width:0;overflow:hidden;padding:2px var(--mantine-spacing-xs);text-overflow:ellipsis;white-space:nowrap}.me_f9e3635c:last-child{border-right:none}.me_d5d64a7c{flex:1;overflow-x:auto;overflow-y:scroll;position:relative;scrollbar-width:none}.me_d5d64a7c::-webkit-scrollbar{height:12px;width:0}.me_d5d64a7c::-webkit-scrollbar-track{background:var(--mantine-color-gray-1)}[data-mantine-color-scheme=dark] .me_d5d64a7c::-webkit-scrollbar-track{background:var(--mantine-color-dark-6)}.me_d5d64a7c::-webkit-scrollbar-thumb{background:var(--mantine-color-gray-4)}[data-mantine-color-scheme=dark] .me_d5d64a7c::-webkit-scrollbar-thumb{background:var(--mantine-color-dark-4)}.me_d5d64a7c::-webkit-scrollbar-thumb{border-radius:6px}.me_d5d64a7c::-webkit-scrollbar-thumb:hover{background:var(--mantine-color-gray-5)}[data-mantine-color-scheme=dark] .me_d5d64a7c::-webkit-scrollbar-thumb:hover{background:var(--mantine-color-dark-3)}.me_a9b83d5f{min-height:100%;position:relative}.me_d5d89c20{left:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0}.me_3be2739c{background-color:rgba(0,0,0,.03);position:absolute;top:0}[data-mantine-color-scheme=dark] .me_3be2739c{background-color:hsla(0,0%,100%,.02)}.me_1e5ed1d3{background-color:rgba(0,0,0,.08);position:absolute;top:0;width:1px}[data-mantine-color-scheme=dark] .me_1e5ed1d3{background-color:hsla(0,0%,100%,.08)}.me_77ef3b5a{background-color:rgba(0,0,0,.2);position:absolute;top:0;width:1px}[data-mantine-color-scheme=dark] .me_77ef3b5a{background-color:hsla(0,0%,100%,.15)}.me_6b1855{background-color:var(--mantine-color-default-border);height:1px}.me_6b1855,.me_8b0725c0{left:0;position:absolute;right:0}.me_8b0725c0{border-bottom:1px solid var(--mantine-color-default-border);height:var(--gantt-row-height,44px)}.me_8b0725c0:last-child{border-bottom:none}.me_5228dbb5{align-items:center;background-color:var(--task-bar-color,var(--mantine-primary-color-filled));border-radius:var(--mantine-radius-sm);box-shadow:var(--mantine-shadow-xs);cursor:grab;display:flex;height:calc(var(--gantt-row-height) - 16px);overflow:visible;position:absolute;top:8px;touch-action:none;user-select:none;will-change:left,width,transform;z-index:10}.me_5228dbb5:hover{box-shadow:var(--mantine-shadow-sm)}.me_5228dbb5[data-dragging]{box-shadow:var(--mantine-shadow-md);cursor:grabbing;opacity:.9;transition:box-shadow .15s ease;z-index:100}.me_d1af7d02{background-color:rgba(0,0,0,.15);border-radius:var(--mantine-radius-sm) 0 0 var(--mantine-radius-sm);height:100%;left:0;pointer-events:none;position:absolute;top:0}.me_b561bc3f{color:var(--mantine-color-white);font-size:var(--mantine-font-size-xs);font-weight:500;overflow:hidden;padding:0 var(--mantine-spacing-xs);position:relative;text-overflow:ellipsis;white-space:nowrap;z-index:1}.me_176570f5{align-items:center;background:linear-gradient(90deg,transparent,rgba(0,0,0,.1));cursor:ew-resize;display:flex;height:100%;justify-content:center;opacity:0;position:absolute;right:0;top:0;transition:opacity .15s ease;width:10px}.me_5228dbb5:hover .me_176570f5{opacity:1}.me_176570f5:after{border-left:1px solid hsla(0,0%,100%,.5);border-right:1px solid hsla(0,0%,100%,.5);content:"";height:14px;width:3px}.me_14ce029c{align-items:center;background:linear-gradient(270deg,transparent,rgba(0,0,0,.1));cursor:ew-resize;display:flex;height:100%;justify-content:center;left:0;opacity:0;position:absolute;top:0;transition:opacity .15s ease;width:10px;z-index:2}.me_5228dbb5:hover .me_14ce029c{opacity:1}.me_14ce029c:after{border-left:1px solid hsla(0,0%,100%,.5);border-right:1px solid hsla(0,0%,100%,.5);content:"";height:14px;width:3px}.me_810d0b9a{background-color:var(--mantine-primary-color-filled);border:2px solid var(--mantine-color-white);border-radius:50%;height:14px;position:absolute;right:-18px;top:50%;transform:translateY(-50%);width:14px}[data-mantine-color-scheme=dark] .me_810d0b9a{border:2px solid var(--mantine-color-dark-6)}.me_810d0b9a{cursor:crosshair;opacity:0;transition:opacity .15s ease,transform .15s ease;z-index:30}.me_5228dbb5:hover .me_810d0b9a{opacity:1}.me_810d0b9a:hover{background-color:var(--mantine-primary-color-filled);transform:translateY(-50%) scale(1.2)}.me_5228dbb5[data-link-target]{outline:2px dashed var(--mantine-primary-color-filled);outline-offset:2px}.me_f220b47c{bottom:0;pointer-events:none;width:2px;z-index:50}.me_f220b47c,.me_f220b47c:before{background-color:var(--mantine-color-red-6);position:absolute;top:0}.me_f220b47c:before{border-radius:50%;content:"";height:10px;left:-4px;width:10px}.me_d0e44395{height:100%;left:0;overflow:visible;pointer-events:none;position:absolute;top:0;width:100%;z-index:1}.me_69d5d098{fill:none;stroke:var(--mantine-color-gray-6)}[data-mantine-color-scheme=dark] .me_69d5d098{stroke:var(--mantine-color-gray-5)}.me_69d5d098{stroke-width:1.5;pointer-events:stroke}.me_69d5d098:hover{stroke:var(--mantine-color-gray-8)}[data-mantine-color-scheme=dark] .me_69d5d098:hover{stroke:var(--mantine-color-gray-3)}.me_ffc139d6{fill:var(--mantine-color-gray-6)}[data-mantine-color-scheme=dark] .me_ffc139d6{fill:var(--mantine-color-gray-5)}}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import type { Dayjs } from 'dayjs';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type {
|
|
3
|
+
import type { GetStylesApi } from '@mantine/core';
|
|
4
|
+
import type { GanttDragType, GanttFactory, GanttTask } from './types';
|
|
4
5
|
interface DependencyLinksProps {
|
|
5
6
|
tasks: GanttTask[];
|
|
6
7
|
startDate: Dayjs;
|
|
7
8
|
columnWidth: number;
|
|
8
9
|
rowHeight: number;
|
|
10
|
+
getStyles: GetStylesApi<GanttFactory>;
|
|
9
11
|
activeDragId?: string | null;
|
|
10
|
-
activeDragType?:
|
|
12
|
+
activeDragType?: GanttDragType | null;
|
|
11
13
|
dragDelta?: number;
|
|
12
14
|
}
|
|
13
|
-
export declare function DependencyLinks({ tasks, startDate, columnWidth, rowHeight, activeDragId, activeDragType, dragDelta, }: DependencyLinksProps): React.JSX.Element;
|
|
15
|
+
export declare function DependencyLinks({ tasks, startDate, columnWidth, rowHeight, getStyles, activeDragId, activeDragType, dragDelta, }: DependencyLinksProps): React.JSX.Element;
|
|
14
16
|
export declare namespace DependencyLinks {
|
|
15
17
|
var displayName: string;
|
|
16
18
|
}
|
|
@@ -10,9 +10,11 @@ interface TaskBarProps {
|
|
|
10
10
|
isDragging?: boolean;
|
|
11
11
|
isLinkDragging?: boolean;
|
|
12
12
|
linkSourceId?: string | null;
|
|
13
|
-
|
|
13
|
+
/** Pointer-derived left (px) for an active move drag. When set, it positions the bar
|
|
14
|
+
instead of dnd-kit's transform, so it follows the cursor through auto-scroll. */
|
|
15
|
+
overrideLeft?: number | null;
|
|
14
16
|
onClick?: () => void;
|
|
15
17
|
}
|
|
16
|
-
declare function TaskBarComponent({ task, startDate, columnWidth, getStyles, isDragging, isLinkDragging, linkSourceId,
|
|
18
|
+
declare function TaskBarComponent({ task, startDate, columnWidth, getStyles, isDragging, isLinkDragging, linkSourceId, overrideLeft, onClick, }: TaskBarProps): React.JSX.Element;
|
|
17
19
|
export declare const TaskBar: React.MemoExoticComponent<typeof TaskBarComponent>;
|
|
18
20
|
export {};
|
|
@@ -9,8 +9,9 @@ interface TimelineGridProps {
|
|
|
9
9
|
rowCount: number;
|
|
10
10
|
rowHeight: number;
|
|
11
11
|
getStyles: GetStylesApi<GanttFactory>;
|
|
12
|
+
viewMode: 'day' | 'week' | 'month';
|
|
12
13
|
}
|
|
13
|
-
export declare function TimelineGrid({ startDate, endDate, columnWidth, rowCount, rowHeight, }: TimelineGridProps): React.JSX.Element;
|
|
14
|
+
export declare function TimelineGrid({ startDate, endDate, columnWidth, rowCount, rowHeight, getStyles, viewMode, }: TimelineGridProps): React.JSX.Element;
|
|
14
15
|
export declare namespace TimelineGrid {
|
|
15
16
|
var displayName: string;
|
|
16
17
|
}
|
|
@@ -8,8 +8,9 @@ interface TimelineHeaderProps {
|
|
|
8
8
|
columnWidth: number;
|
|
9
9
|
getStyles: GetStylesApi<GanttFactory>;
|
|
10
10
|
totalWidth: number;
|
|
11
|
+
viewMode: 'day' | 'week' | 'month';
|
|
11
12
|
}
|
|
12
|
-
export declare function TimelineHeader({ startDate, endDate, columnWidth, totalWidth, }: TimelineHeaderProps): React.JSX.Element;
|
|
13
|
+
export declare function TimelineHeader({ startDate, endDate, columnWidth, getStyles, totalWidth, viewMode, }: TimelineHeaderProps): React.JSX.Element;
|
|
13
14
|
export declare namespace TimelineHeader {
|
|
14
15
|
var displayName: string;
|
|
15
16
|
}
|
|
@@ -16,7 +16,7 @@ export interface GanttTask {
|
|
|
16
16
|
/** Custom color for the task bar */
|
|
17
17
|
color?: MantineColor;
|
|
18
18
|
}
|
|
19
|
-
export type GanttStylesNames = 'root' | 'taskList' | 'taskListHeader' | 'taskListBody' | 'taskListRow' | 'taskListCell' | 'timeline' | 'timelineHeader' | 'timelineHeaderRow' | 'timelineHeaderCell' | 'weekHeader' | 'weekHeaderCell' | 'timelineBody' | 'timelineContent' | 'timelineRow' | 'timelineGrid' | 'gridLine' | 'taskBar' | 'taskBarLabel' | 'taskBarProgress' | 'resizeHandle' | 'resizeHandleLeft' | 'linkConnector';
|
|
19
|
+
export type GanttStylesNames = 'root' | 'taskList' | 'taskListHeader' | 'taskListBody' | 'taskListRow' | 'taskListCell' | 'timeline' | 'timelineHeader' | 'timelineHeaderInner' | 'timelineHeaderRow' | 'timelineHeaderCell' | 'weekHeader' | 'weekHeaderCell' | 'timelineBody' | 'timelineContent' | 'timelineRow' | 'timelineGrid' | 'gridLine' | 'majorGridLine' | 'weekendBackground' | 'todayLine' | 'taskBar' | 'taskBarLabel' | 'taskBarProgress' | 'resizeHandle' | 'resizeHandleLeft' | 'linkConnector' | 'dependencyLinks' | 'dependencyLine' | 'linkArrow';
|
|
20
20
|
export type GanttCssVariables = {
|
|
21
21
|
root: '--gantt-column-width' | '--gantt-row-height' | '--gantt-header-height' | '--gantt-task-list-width';
|
|
22
22
|
};
|
|
@@ -43,6 +43,8 @@ export interface GanttBaseProps {
|
|
|
43
43
|
viewMode?: 'day' | 'week' | 'month';
|
|
44
44
|
/** Whether to show task titles on hover, default false */
|
|
45
45
|
showTitle?: boolean;
|
|
46
|
+
/** Whether to show today marker line, default true */
|
|
47
|
+
showTodayMarker?: boolean;
|
|
46
48
|
}
|
|
47
49
|
export type GanttFactory = Factory<{
|
|
48
50
|
props: GanttProps;
|
|
@@ -52,9 +54,11 @@ export type GanttFactory = Factory<{
|
|
|
52
54
|
}>;
|
|
53
55
|
export interface GanttProps extends BoxProps, StylesApiProps<GanttFactory>, ElementProps<'div', 'onChange'>, GanttBaseProps {
|
|
54
56
|
}
|
|
57
|
+
/** Kind of drag interaction encoded in active.data.current.type */
|
|
58
|
+
export type GanttDragType = 'move' | 'resize-end' | 'resize-start' | 'link';
|
|
55
59
|
/** Context for drag operations */
|
|
56
60
|
export interface DragContext {
|
|
57
|
-
type:
|
|
61
|
+
type: GanttDragType;
|
|
58
62
|
taskId: string;
|
|
59
63
|
initialX: number;
|
|
60
64
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mantine-gantt",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "A gantt chart component for mantine",
|
|
5
|
-
"homepage": "https://github.
|
|
5
|
+
"homepage": "https://wojakgra.github.io/mantine-gantt",
|
|
6
6
|
"packageManager": "yarn@4.0.1",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "Jakub Wojdziak <jakub@wojak.works>",
|