@operato/gantt 2.0.0-beta.13 → 2.0.0-beta.15

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/src/gantt-chart-controller.d.ts +32 -0
  3. package/dist/src/gantt-chart-controller.js +393 -0
  4. package/dist/src/gantt-chart-controller.js.map +1 -0
  5. package/dist/src/locales.d.ts +52 -0
  6. package/dist/src/locales.js +79 -0
  7. package/dist/src/locales.js.map +1 -0
  8. package/dist/src/ox-gantt-chart.d.ts +10 -17
  9. package/dist/src/ox-gantt-chart.js +135 -435
  10. package/dist/src/ox-gantt-chart.js.map +1 -1
  11. package/dist/src/ox-gantt-resize-splitter.d.ts +2 -3
  12. package/dist/src/ox-gantt-resize-splitter.js +15 -22
  13. package/dist/src/ox-gantt-resize-splitter.js.map +1 -1
  14. package/dist/src/ox-gantt.d.ts +14 -1
  15. package/dist/src/ox-gantt.js +149 -28
  16. package/dist/src/ox-gantt.js.map +1 -1
  17. package/dist/src/ox-task-tooltip.d.ts +12 -0
  18. package/dist/src/ox-task-tooltip.js +132 -0
  19. package/dist/src/ox-task-tooltip.js.map +1 -0
  20. package/dist/src/types.d.ts +10 -3
  21. package/dist/src/types.js.map +1 -1
  22. package/dist/stories/ox-gantt.stories.d.ts +12 -0
  23. package/dist/stories/ox-gantt.stories.js +100 -88
  24. package/dist/stories/ox-gantt.stories.js.map +1 -1
  25. package/dist/tsconfig.tsbuildinfo +1 -1
  26. package/package.json +3 -2
  27. package/src/gantt-chart-controller.ts +470 -0
  28. package/src/locales.ts +78 -0
  29. package/src/ox-gantt-chart.ts +143 -481
  30. package/src/ox-gantt-resize-splitter.ts +18 -25
  31. package/src/ox-gantt.ts +153 -30
  32. package/src/ox-task-tooltip.ts +120 -0
  33. package/src/types.ts +11 -3
  34. package/stories/ox-gantt.stories.ts +105 -88
  35. package/translations/en.json +11 -1
  36. package/translations/ja.json +11 -1
  37. package/translations/ko.json +11 -1
  38. package/translations/ms.json +11 -1
  39. package/translations/zh.json +11 -1
  40. package/dist/src/locale.d.ts +0 -1
  41. package/dist/src/locale.js +0 -49
  42. package/dist/src/locale.js.map +0 -1
  43. package/src/locale.ts +0 -51
@@ -1 +1 @@
1
- {"version":3,"file":"ox-gantt.js","sourceRoot":"","sources":["../../src/ox-gantt.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAoC,MAAM,KAAK,CAAA;AAC7E,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,qBAAqB,CAAA;AAC5B,OAAO,+BAA+B,CAAA;AAK/B,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,UAAU;IAAhC;;QAuEsB,UAAK,GAAW,EAAE,CAAA;QAE7C,aAAQ,GAAW,IAAI,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA,CAAC,4BAA4B;QAEpH,WAAM,GAAW,IAAI,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA,CAAC,sBAAsB;QAQtG,gBAAW,GAAW,CAAC,CAAA;IAkFjC,CAAC;aApKQ,WAAM,GAAG;QACd,iBAAiB;QACjB,eAAe;QACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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I,CAAC,aAAa,CAAC,SAAS,CAAC,CAAA;IACjE,CAAC;IAED,WAAW,CAAC,CAAc;QACxB,IAAI,CAAC,WAAW,GAAK,CAAC,CAAC,MAAsB,EAAE,sBAAsC,EAAE,WAAW,CAAA;IACpG,CAAC;IAED,UAAU,CAAC,CAAc;QACvB,IAAI,KAAK,GAAG,CAAC,CAAC,MAAM,CAAA;QACpB,IAAI,CAAC,GAAI,CAAC,CAAC,MAAsB,EAAE,sBAAqC,CAAA;QACxE,IAAI,CAAC,EAAE,CAAC;YACN,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,CAAC,IAAI,CAAA;QACnD,CAAC;IACH,CAAC;;AA7F0B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;sCAAmB;AAE7C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;yCACoC;AAEvF;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;uCACsC;AAElE;IAApB,KAAK,CAAC,YAAY,CAAC;0CAA2B;AACrB;IAAzB,KAAK,CAAC,iBAAiB,CAAC;8CAA+B;AAC7B;IAA1B,KAAK,CAAC,kBAAkB,CAAC;+CAAgC;AAC1C;IAAf,KAAK,CAAC,OAAO,CAAC;0CAA6B;AACnB;IAAxB,KAAK,CAAC,gBAAgB,CAAC;2CAA0B;AAjFvC,OAAO;IADnB,aAAa,CAAC,UAAU,CAAC;GACb,OAAO,CAqKnB","sourcesContent":["import { LitElement, html, css, PropertyValues, PropertyValueMap } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\nimport { ScrollbarStyles } from '@operato/styles'\n\nimport './ox-gantt-chart.js'\nimport './ox-gantt-resize-splitter.js'\nimport { OxGanttChart } from './ox-gantt-chart.js'\nimport { Task } from './types.js'\n\n@customElement('ox-gantt')\nexport class OxGantt extends LitElement {\n static styles = [\n MDTypeScaleStyles,\n ScrollbarStyles,\n css`\n :host {\n display: block;\n font-family: Arial, sans-serif;\n text-wrap: nowrap;\n }\n\n .container {\n display: flex;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n\n .task-container {\n padding: 0;\n overflow: auto;\n overflow-y: overlay;\n box-sizing: border-box;\n border: 1px solid var(--ox-gantt-border-color, var(--md-sys-color-on-surface));\n }\n\n .chart-container {\n flex: 1;\n padding: 0;\n box-sizing: border-box;\n border: 1px solid var(--ox-gantt-border-color, var(--md-sys-color-on-surface));\n }\n\n ox-gantt-resize-splitter {\n width: 4px;\n }\n\n table {\n width: 100%;\n border-collapse: collapse;\n border: 1px solid var(--ox-gantt-border-color, var(--md-sys-color-on-surface));\n margin: -1px;\n margin-right: 0;\n }\n\n thead th {\n position: sticky;\n top: -1px;\n z-index: 1;\n background-color: var(--ox-gantt-header-background-color, var(--md-sys-color-secondary-container));\n }\n\n th,\n td {\n border: 1px solid var(--ox-gantt-border-color, var(--md-sys-color-on-surface));\n padding: 4px;\n text-align: left;\n }\n\n th {\n height: 40px;\n box-sizing: border-box;\n }\n\n td {\n height: 30px;\n box-sizing: border-box;\n }\n `\n ]\n\n @property({ type: Array }) tasks: Task[] = []\n @property({ type: String, attribute: 'from-date' })\n fromDate: string = new Date(new Date().getFullYear(), 0, 1).toISOString().split('T')[0] /* beginning of this year */\n @property({ type: String, attribute: 'to-date' })\n toDate: string = new Date(new Date().getFullYear(), 11, 31).toISOString().split('T')[0] /* end of this year */\n\n @query('.container') container!: HTMLDivElement\n @query('.task-container') taskContainer!: HTMLDivElement\n @query('.chart-container') chartContainer!: HTMLDivElement\n @query('table') taskTable!: HTMLTableElement\n @query('ox-gantt-chart') ganttChart!: OxGanttChart\n\n private _startWidth: number = 0\n\n render() {\n return html`\n <div class=\"container md-typescale-body-medium\">\n <div class=\"task-container\" @scroll=${this.syncScroll}>${this.renderTaskTable()}</div>\n <ox-gantt-resize-splitter\n vertical\n @splitter-dragstart=${(e: CustomEvent) => this.resizeStart(e)}\n @splitter-drag=${(e: CustomEvent) => this.resizeDrag(e)}\n ></ox-gantt-resize-splitter>\n <ox-gantt-chart\n class=\"chart-container\"\n @scroll=${this.syncScroll}\n .fromDate=${this.fromDate}\n .toDate=${this.toDate}\n .tasks=${this.tasks}\n axis-scale=\"week-day\"\n extend-grid-lines\n ></ox-gantt-chart>\n </div>\n `\n }\n\n renderTaskTable() {\n return html`\n <table>\n <thead>\n <tr>\n <th>ID</th>\n <th>Section</th>\n <th>Title</th>\n <th>Type</th>\n <th>Start Time</th>\n <th>End Time</th>\n <th>Tags</th>\n <th>Progress</th>\n <th>Prev. Task</th>\n </tr>\n </thead>\n <tbody>\n ${this.tasks.map(\n task => html`\n <tr>\n <td>${task.id}</td>\n <td>${task.section?.name || ''}</td>\n <td>${task.title}</td>\n <td>${task.type}</td>\n <td>${task.startTime.toISOString().split('T')[0]}</td>\n <td>${task.endTime.toISOString().split('T')[0]}</td>\n <td>${task.tags?.join(', ') || ''}</td>\n <td>${task.progress || ''}</td>\n <td>${task.after || ''}</td>\n </tr>\n `\n )}\n </tbody>\n </table>\n `\n }\n\n protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n this.taskContainer.style.width = '254px'\n }\n\n updated(changes: PropertyValues<this>) {}\n\n syncScroll() {\n this.ganttChart.setVerticalOffset(this.taskContainer.scrollTop)\n }\n\n resizeStart(e: CustomEvent) {\n this._startWidth = ((e.target as HTMLElement)?.previousElementSibling as HTMLElement)?.offsetWidth\n }\n\n resizeDrag(e: CustomEvent) {\n var delta = e.detail\n var x = (e.target as HTMLElement)?.previousElementSibling as HTMLElement\n if (x) {\n x.style.width = `${this._startWidth + delta.x}px`\n }\n }\n}\n"]}
1
+ {"version":3,"file":"ox-gantt.js","sourceRoot":"","sources":["../../src/ox-gantt.ts"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YAAE,OAAM;QAC7B,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAA;QACtB,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAA;QAExC,IAAI,aAAa,EAAE,CAAC;YAClB,aAAa,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,CAAC,IAAI,CAAA;QAC/D,CAAC;IACH,CAAC;IAED,SAAS,CAAC,CAAc;QACtB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAA;IAC1B,CAAC;;AAhN0B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;sCAAmB;AAE7C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;yCACoC;AAEvF;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;uCACsC;AAC1B;IAA5D,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;gDAAiC;AAEpF;IAAR,KAAK,EAAE;+CAAwB;AAExB;IADP,KAAK,EAAE;6CAyCP;AAEoB;IAApB,KAAK,CAAC,YAAY,CAAC;0CAA2B;AACrB;IAAzB,KAAK,CAAC,iBAAiB,CAAC;8CAA+B;AAC7B;IAA1B,KAAK,CAAC,kBAAkB,CAAC;+CAAgC;AAC1C;IAAf,KAAK,CAAC,OAAO,CAAC;0CAA6B;AACnB;IAAxB,KAAK,CAAC,gBAAgB,CAAC;2CAA0B;AArIvC,OAAO;IADnB,aAAa,CAAC,UAAU,CAAC;GACb,OAAO,CA+RnB","sourcesContent":["import { LitElement, html, css, PropertyValues, PropertyValueMap } from 'lit'\nimport i18next from 'i18next'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\nimport { ScrollbarStyles } from '@operato/styles'\n\nimport './ox-gantt-chart.js'\nimport './ox-gantt-resize-splitter.js'\nimport { OxGanttChart } from './ox-gantt-chart.js'\nimport { ColumnConfig, Task } from './types.js'\n\n@customElement('ox-gantt')\nexport class OxGantt extends LitElement {\n static styles = [\n MDTypeScaleStyles,\n ScrollbarStyles,\n css`\n :host {\n display: block;\n font-family: Arial, sans-serif;\n text-wrap: nowrap;\n position: relative;\n }\n\n .container {\n display: flex;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n\n .task-container {\n padding: 0;\n overflow: auto;\n overflow-y: overlay;\n box-sizing: border-box;\n border: 1px solid var(--ox-gantt-border-color, var(--md-sys-color-on-surface));\n }\n\n .chart-container {\n flex: 1;\n padding: 0;\n box-sizing: border-box;\n border: 1px solid var(--ox-gantt-border-color, var(--md-sys-color-on-surface));\n }\n\n ox-gantt-resize-splitter {\n width: 4px;\n cursor: ew-resize;\n }\n\n table {\n width: 100%;\n border-collapse: collapse;\n border: 1px solid var(--ox-gantt-border-color, var(--md-sys-color-on-surface));\n margin: -1px;\n margin-right: 0;\n }\n\n thead th {\n position: sticky;\n top: -1px;\n z-index: 1;\n background-color: var(--ox-gantt-header-background-color, var(--md-sys-color-secondary-container));\n text-transform: capitalize;\n }\n\n th,\n td {\n border: 1px solid var(--ox-gantt-border-color, var(--md-sys-color-on-surface));\n padding: 4px;\n text-align: left;\n }\n\n th {\n height: 40px;\n box-sizing: border-box;\n }\n\n td {\n height: 30px;\n box-sizing: border-box;\n }\n\n tr.selected {\n background-color: var(--ox-gantt-selected-background-color, var(--md-sys-color-surface-variant));\n }\n `\n ]\n\n @property({ type: Array }) tasks: Task[] = []\n @property({ type: String, attribute: 'from-date' })\n fromDate: string = new Date(new Date().getFullYear(), 0, 1).toISOString().split('T')[0] /* beginning of this year */\n @property({ type: String, attribute: 'to-date' })\n toDate: string = new Date(new Date().getFullYear(), 11, 31).toISOString().split('T')[0] /* end of this year */\n @property({ type: Boolean, attribute: 'extend-grid-lines' }) extendGridLines: boolean = false\n\n @state() selectedTaskId?: string\n @state()\n private columnConfig: ColumnConfig[] = [\n { id: 'id', label: i18next.t('label.gantt-task-id') || 'ID', visible: true, width: '50px', order: 1 },\n {\n id: 'section',\n label: i18next.t('label.gantt-task-section') || 'section',\n visible: true,\n width: '100px',\n order: 2\n },\n { id: 'title', label: i18next.t('label.gantt-task-title') || 'title', visible: true, width: '150px', order: 3 },\n { id: 'type', label: i18next.t('label.gantt-task-type') || 'type', visible: true, width: '100px', order: 4 },\n {\n id: 'startDate',\n label: i18next.t('label.gantt-task-start-date') || 'start date',\n visible: true,\n width: '100px',\n order: 5\n },\n {\n id: 'endDate',\n label: i18next.t('label.gantt-task-end-date') || 'end date',\n visible: true,\n width: '100px',\n order: 6\n },\n { id: 'tags', label: i18next.t('label.gantt-task-tags') || 'tags', visible: true, width: '100px', order: 7 },\n {\n id: 'progress',\n label: i18next.t('label.gantt-task-progress') || 'progress',\n visible: true,\n width: '100px',\n order: 8\n },\n {\n id: 'dependsOn',\n label: i18next.t('label.gantt-task-previous') || 'previous',\n visible: true,\n width: '100px',\n order: 9\n }\n ]\n\n @query('.container') container!: HTMLDivElement\n @query('.task-container') taskContainer!: HTMLDivElement\n @query('.chart-container') chartContainer!: HTMLDivElement\n @query('table') taskTable!: HTMLTableElement\n @query('ox-gantt-chart') ganttChart!: OxGanttChart\n\n private _startWidth: number = 0\n private _isDragging: boolean = false\n\n render() {\n return html`\n <div class=\"container md-typescale-body-medium\">\n <div class=\"task-container\" @scroll=${this.syncScroll}>${this.renderTaskTable()}</div>\n <ox-gantt-resize-splitter\n vertical\n @splitter-dragstart=${(e: CustomEvent) => this.resizeStart(e)}\n @splitter-drag=${(e: CustomEvent) => this.resizeDrag(e)}\n @splitter-dragend=${(e: CustomEvent) => this.resizeEnd(e)}\n ></ox-gantt-resize-splitter>\n <ox-gantt-chart\n class=\"chart-container\"\n @scroll=${this.syncScroll}\n .fromDate=${this.fromDate}\n .toDate=${this.toDate}\n .tasks=${this.tasks}\n .selectedTaskId=${this.selectedTaskId}\n axis-scale=\"week-day\"\n ?extend-grid-lines=${this.extendGridLines}\n @task-clicked=${this.handleTaskClicked}\n ></ox-gantt-chart>\n </div>\n `\n }\n\n renderTaskTable() {\n const mergedTasks = this.mergeTasksBySection(this.tasks)\n\n // Sort columns by the configured order\n const sortedColumns = [...this.columnConfig].sort((a, b) => a.order - b.order)\n\n return html`\n <table>\n <thead>\n <tr>\n ${sortedColumns.map(col => (col.visible ? html`<th style=\"width: ${col.width}\">${col.label}</th>` : null))}\n </tr>\n </thead>\n <tbody>\n ${mergedTasks.map(\n ({ task, showSection, rowSpan }) => html`\n <tr class=\"${this.selectedTaskId === task.id ? 'selected' : ''}\" @click=${() => this.selectTask(task.id)}>\n ${sortedColumns.map(col => {\n if (col.id === 'section') {\n return col.visible && showSection\n ? html`<td rowspan=\"${rowSpan}\" style=\"width: ${col.width}\">${task.section?.name || ''}</td>`\n : null\n }\n return col.visible\n ? html`<td style=\"width: ${col.width}\">${this.getTaskFieldValue(task, col.id)}</td>`\n : null\n })}\n </tr>\n `\n )}\n </tbody>\n </table>\n `\n }\n\n getTaskFieldValue(task: Task, field: string) {\n switch (field) {\n case 'id':\n return task.id\n case 'section':\n return task.section?.name || ''\n case 'title':\n return task.title\n case 'type':\n return task.type\n case 'startDate':\n return task.startDate.toISOString().split('T')[0]\n case 'endDate':\n return task.endDate.toISOString().split('T')[0]\n case 'tags':\n return task.tags?.join(', ') || ''\n case 'progress':\n return task.progress || ''\n case 'dependsOn':\n return task.dependsOn || ''\n default:\n return ''\n }\n }\n\n mergeTasksBySection(tasks: Task[]): Array<{ task: Task; showSection: boolean; rowSpan: number }> {\n const mergedTasks = [] as Array<{ task: Task; showSection: boolean; rowSpan: number }>\n let currentSection = ''\n let rowSpan = 0\n\n tasks.forEach((task, index) => {\n if (task.section?.name !== currentSection) {\n currentSection = task.section?.name || ''\n rowSpan = 1\n mergedTasks.push({ task, showSection: true, rowSpan: 1 })\n } else {\n mergedTasks[mergedTasks.length - rowSpan].rowSpan = ++rowSpan\n mergedTasks.push({ task, showSection: false, rowSpan: 0 })\n }\n\n if (index === tasks.length - 1 && rowSpan > 0) {\n mergedTasks[mergedTasks.length - rowSpan].rowSpan = rowSpan\n }\n })\n\n return mergedTasks\n }\n\n selectTask(taskId: string) {\n this.selectedTaskId = taskId\n }\n\n handleTaskClicked(event: CustomEvent) {\n this.selectedTaskId = event.detail.taskId\n }\n\n protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n this.taskContainer.style.width = '254px'\n }\n\n updated(changes: PropertyValues<this>) {}\n\n syncScroll(e: Event) {\n const target = e.target as HTMLElement\n if (target === this.taskContainer) {\n this.ganttChart.setVerticalOffset(this.taskContainer.scrollTop)\n } else if (target === this.ganttChart) {\n this.taskContainer.scrollTop = this.ganttChart.getVerticalOffset()\n }\n }\n\n resizeStart(e: CustomEvent) {\n this._startWidth = ((e.target as HTMLElement)?.previousElementSibling as HTMLElement)?.offsetWidth\n this._isDragging = true\n }\n\n resizeDrag(e: CustomEvent) {\n if (!this._isDragging) return\n const delta = e.detail\n const taskContainer = this.taskContainer\n\n if (taskContainer) {\n taskContainer.style.width = `${this._startWidth + delta.x}px`\n }\n }\n\n resizeEnd(e: CustomEvent) {\n this._isDragging = false\n }\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import { LitElement } from 'lit';
2
+ export declare class OxTaskTooltip extends LitElement {
3
+ static styles: import("lit").CSSResult;
4
+ title: string;
5
+ startDate: string;
6
+ endDate: string;
7
+ progress: number;
8
+ type: string;
9
+ show(x: number, y: number): void;
10
+ hide(): void;
11
+ render(): import("lit-html").TemplateResult<1>;
12
+ }
@@ -0,0 +1,132 @@
1
+ import { __decorate } from "tslib";
2
+ import { LitElement, html, css } from 'lit';
3
+ import { customElement, property } from 'lit/decorators.js';
4
+ let OxTaskTooltip = class OxTaskTooltip extends LitElement {
5
+ constructor() {
6
+ super(...arguments);
7
+ this.title = '';
8
+ this.startDate = '';
9
+ this.endDate = '';
10
+ this.progress = 0;
11
+ this.type = '';
12
+ }
13
+ static { this.styles = css `
14
+ :host {
15
+ position: fixed; /* position: absolute로 변경 */
16
+ background-color: var(--ox-gantt-tooltip-background-color, var(--md-sys-color-surface, #f9f9f9));
17
+ border: 1px solid var(--ox-gantt-tooltip-border-color, var(--md-sys-color-outline, #ccc));
18
+ padding: var(--spacing-medium, 10px);
19
+ border-radius: var(--spacing-medium, 8px);
20
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
21
+ visibility: hidden;
22
+ z-index: 10;
23
+ max-width: 300px;
24
+ font-family: Roboto;
25
+ font-size: 14px;
26
+ line-height: 1.6;
27
+ color: var(--ox-gantt-tooltip-color, var(--md-sys-color-on-surface, #333));
28
+ transition:
29
+ visibility 0.1s,
30
+ opacity 0.1s;
31
+ opacity: 0; /* 초기에는 보이지 않음 */
32
+ }
33
+ :host([visible]) {
34
+ visibility: visible;
35
+ opacity: 1; /* 보일 때는 불투명 */
36
+ }
37
+ .title {
38
+ font-weight: bold;
39
+ font-size: 16px;
40
+ margin-bottom: 8px;
41
+ color: var(--ox-gantt-tooltip-title-color, var(--md-sys-color-primary, #0078d4)); /* 파란색 텍스트 */
42
+ }
43
+ .detail {
44
+ display: grid;
45
+ grid-template-columns: auto auto 1fr;
46
+ gap: 4px;
47
+ align-items: center;
48
+ }
49
+ .label {
50
+ font-weight: bold;
51
+ color: var(--ox-gantt-tooltip-color, var(--md-sys-color-on-surface-variant, #333));
52
+ text-align: right; /* 라벨을 우측 정렬 */
53
+ }
54
+ .colon {
55
+ text-align: center;
56
+ color: var(--ox-gantt-tooltip-color, var(--md-sys-color-on-surface, #333));
57
+ }
58
+ .value {
59
+ text-align: left; /* 값을 좌측 정렬 */
60
+ color: var(--ox-gantt-tooltip-color, var(--md-sys-color-on-surface, #333));
61
+ }
62
+ `; }
63
+ show(x, y) {
64
+ const tooltipWidth = this.offsetWidth;
65
+ const tooltipHeight = this.offsetHeight;
66
+ const offsetX = 10;
67
+ const offsetY = 10;
68
+ // 기본 위치 계산
69
+ let left = x + offsetX;
70
+ let top = y + offsetY;
71
+ // 화면 경계 확인 및 조정
72
+ const screenWidth = window.innerWidth;
73
+ const screenHeight = window.innerHeight;
74
+ if (left + tooltipWidth > screenWidth) {
75
+ left = x - tooltipWidth - offsetX;
76
+ }
77
+ if (top + tooltipHeight > screenHeight) {
78
+ top = y - tooltipHeight - offsetY;
79
+ }
80
+ // offsetParent 요소를 기준으로 위치 설정
81
+ if (this.offsetParent) {
82
+ const parentRect = this.offsetParent.getBoundingClientRect();
83
+ this.style.left = `${left - parentRect.left}px`;
84
+ this.style.top = `${top - parentRect.top}px`;
85
+ }
86
+ else {
87
+ this.style.left = `${left}px`;
88
+ this.style.top = `${top}px`;
89
+ const myRect = this.getBoundingClientRect();
90
+ /* 실제 바운드와 설정한 left/top 이 일치하지 않는다면, 부모 어딘가에서 transform 되었다고 판단하고, 보정해줌 */
91
+ if (myRect.left !== left || myRect.top !== top) {
92
+ this.style.left = `${left + (left - myRect.left)}px`;
93
+ this.style.top = `${top + (top - myRect.top)}px`;
94
+ }
95
+ }
96
+ this.setAttribute('visible', '');
97
+ }
98
+ hide() {
99
+ this.removeAttribute('visible');
100
+ }
101
+ render() {
102
+ return html `
103
+ <div class="title">${this.title}</div>
104
+ <div class="detail">
105
+ <span class="label">Type</span><span class="colon">:</span><span class="value">${this.type}</span>
106
+ <span class="label">Start Date</span><span class="colon">:</span><span class="value">${this.startDate}</span>
107
+ <span class="label">End Date</span><span class="colon">:</span><span class="value">${this.endDate}</span>
108
+ <span class="label">Progress</span><span class="colon">:</span><span class="value">${this.progress}%</span>
109
+ </div>
110
+ `;
111
+ }
112
+ };
113
+ __decorate([
114
+ property({ type: String })
115
+ ], OxTaskTooltip.prototype, "title", void 0);
116
+ __decorate([
117
+ property({ type: String })
118
+ ], OxTaskTooltip.prototype, "startDate", void 0);
119
+ __decorate([
120
+ property({ type: String })
121
+ ], OxTaskTooltip.prototype, "endDate", void 0);
122
+ __decorate([
123
+ property({ type: Number })
124
+ ], OxTaskTooltip.prototype, "progress", void 0);
125
+ __decorate([
126
+ property({ type: String })
127
+ ], OxTaskTooltip.prototype, "type", void 0);
128
+ OxTaskTooltip = __decorate([
129
+ customElement('ox-task-tooltip')
130
+ ], OxTaskTooltip);
131
+ export { OxTaskTooltip };
132
+ //# sourceMappingURL=ox-task-tooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-task-tooltip.js","sourceRoot":"","sources":["../../src/ox-task-tooltip.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAGpD,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAU;IAAtC;;QAoDuB,UAAK,GAAG,EAAE,CAAA;QACV,cAAS,GAAG,EAAE,CAAA;QACd,YAAO,GAAG,EAAE,CAAA;QACZ,aAAQ,GAAG,CAAC,CAAA;QACZ,SAAI,GAAG,EAAE,CAAA;IA2DvC,CAAC;aAlHQ,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDlB,AAjDY,CAiDZ;IAQD,IAAI,CAAC,CAAS,EAAE,CAAS;QACvB,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,CAAA;QACrC,MAAM,aAAa,GAAG,IAAI,CAAC,YAAY,CAAA;QACvC,MAAM,OAAO,GAAG,EAAE,CAAA;QAClB,MAAM,OAAO,GAAG,EAAE,CAAA;QAElB,WAAW;QACX,IAAI,IAAI,GAAG,CAAC,GAAG,OAAO,CAAA;QACtB,IAAI,GAAG,GAAG,CAAC,GAAG,OAAO,CAAA;QAErB,gBAAgB;QAChB,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAA;QACrC,M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CAAC;IAED,IAAI;QACF,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAA;IACjC,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;2BACY,IAAI,CAAC,KAAK;;yFAEoD,IAAI,CAAC,IAAI;+FACH,IAAI,CAAC,SAAS;6FAChB,IAAI,CAAC,OAAO;6FACZ,IAAI,CAAC,QAAQ;;KAErG,CAAA;IACH,CAAC;;AA9D2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAW;AACV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAe;AACd;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAAa;AACZ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAa;AACZ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAU;AAxD1B,aAAa;IADzB,aAAa,CAAC,iBAAiB,CAAC;GACpB,aAAa,CAmHzB","sourcesContent":["import { LitElement, html, css } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('ox-task-tooltip')\nexport class OxTaskTooltip extends LitElement {\n static styles = css`\n :host {\n position: fixed; /* position: absolute로 변경 */\n background-color: var(--ox-gantt-tooltip-background-color, var(--md-sys-color-surface, #f9f9f9));\n border: 1px solid var(--ox-gantt-tooltip-border-color, var(--md-sys-color-outline, #ccc));\n padding: var(--spacing-medium, 10px);\n border-radius: var(--spacing-medium, 8px);\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);\n visibility: hidden;\n z-index: 10;\n max-width: 300px;\n font-family: Roboto;\n font-size: 14px;\n line-height: 1.6;\n color: var(--ox-gantt-tooltip-color, var(--md-sys-color-on-surface, #333));\n transition:\n visibility 0.1s,\n opacity 0.1s;\n opacity: 0; /* 초기에는 보이지 않음 */\n }\n :host([visible]) {\n visibility: visible;\n opacity: 1; /* 보일 때는 불투명 */\n }\n .title {\n font-weight: bold;\n font-size: 16px;\n margin-bottom: 8px;\n color: var(--ox-gantt-tooltip-title-color, var(--md-sys-color-primary, #0078d4)); /* 파란색 텍스트 */\n }\n .detail {\n display: grid;\n grid-template-columns: auto auto 1fr;\n gap: 4px;\n align-items: center;\n }\n .label {\n font-weight: bold;\n color: var(--ox-gantt-tooltip-color, var(--md-sys-color-on-surface-variant, #333));\n text-align: right; /* 라벨을 우측 정렬 */\n }\n .colon {\n text-align: center;\n color: var(--ox-gantt-tooltip-color, var(--md-sys-color-on-surface, #333));\n }\n .value {\n text-align: left; /* 값을 좌측 정렬 */\n color: var(--ox-gantt-tooltip-color, var(--md-sys-color-on-surface, #333));\n }\n `\n\n @property({ type: String }) title = ''\n @property({ type: String }) startDate = ''\n @property({ type: String }) endDate = ''\n @property({ type: Number }) progress = 0\n @property({ type: String }) type = ''\n\n show(x: number, y: number) {\n const tooltipWidth = this.offsetWidth\n const tooltipHeight = this.offsetHeight\n const offsetX = 10\n const offsetY = 10\n\n // 기본 위치 계산\n let left = x + offsetX\n let top = y + offsetY\n\n // 화면 경계 확인 및 조정\n const screenWidth = window.innerWidth\n const screenHeight = window.innerHeight\n\n if (left + tooltipWidth > screenWidth) {\n left = x - tooltipWidth - offsetX\n }\n if (top + tooltipHeight > screenHeight) {\n top = y - tooltipHeight - offsetY\n }\n\n // offsetParent 요소를 기준으로 위치 설정\n if (this.offsetParent) {\n const parentRect = this.offsetParent!.getBoundingClientRect()\n this.style.left = `${left - parentRect.left}px`\n this.style.top = `${top - parentRect.top}px`\n } else {\n this.style.left = `${left}px`\n this.style.top = `${top}px`\n\n const myRect = this.getBoundingClientRect()\n\n /* 실제 바운드와 설정한 left/top 이 일치하지 않는다면, 부모 어딘가에서 transform 되었다고 판단하고, 보정해줌 */\n if (myRect.left !== left || myRect.top !== top) {\n this.style.left = `${left + (left - myRect.left)}px`\n this.style.top = `${top + (top - myRect.top)}px`\n }\n }\n\n this.setAttribute('visible', '')\n }\n\n hide() {\n this.removeAttribute('visible')\n }\n\n render() {\n return html`\n <div class=\"title\">${this.title}</div>\n <div class=\"detail\">\n <span class=\"label\">Type</span><span class=\"colon\">:</span><span class=\"value\">${this.type}</span>\n <span class=\"label\">Start Date</span><span class=\"colon\">:</span><span class=\"value\">${this.startDate}</span>\n <span class=\"label\">End Date</span><span class=\"colon\">:</span><span class=\"value\">${this.endDate}</span>\n <span class=\"label\">Progress</span><span class=\"colon\">:</span><span class=\"value\">${this.progress}%</span>\n </div>\n `\n }\n}\n"]}
@@ -5,10 +5,10 @@ export interface Task {
5
5
  title: string;
6
6
  type: TaskType;
7
7
  section?: Section;
8
- startTime: Date;
9
- endTime: Date;
8
+ startDate: Date;
9
+ endDate: Date;
10
10
  progress?: number;
11
- after?: string;
11
+ dependsOn?: string;
12
12
  length: string;
13
13
  tags?: TaskTag[];
14
14
  children?: Task[];
@@ -16,4 +16,11 @@ export interface Task {
16
16
  export interface Section {
17
17
  name: string;
18
18
  }
19
+ export interface ColumnConfig {
20
+ id: string;
21
+ label: string;
22
+ visible: boolean;
23
+ width: string;
24
+ order: number;
25
+ }
19
26
  export type LEVEL = 'year-quarter' | 'year-month' | 'quarter-week' | 'week-day';
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["export type TaskTag = 'done' | 'active' | 'critical' | 'milestone'\nexport type TaskType = 'task' | 'milestone' | 'phase'\n\nexport interface Task {\n id: string\n title: string\n type: TaskType\n section?: Section\n startTime: Date\n endTime: Date\n progress?: number\n after?: string // 이전 태스크의 ID\n length: string // 예: '3d' (3 days)\n tags?: TaskTag[]\n children?: Task[]\n}\n\nexport interface Section {\n name: string\n}\n\nexport type LEVEL = 'year-quarter' | 'year-month' | 'quarter-week' | 'week-day'\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["export type TaskTag = 'done' | 'active' | 'critical' | 'milestone'\nexport type TaskType = 'task' | 'milestone' | 'phase'\n\nexport interface Task {\n id: string\n title: string\n type: TaskType\n section?: Section\n startDate: Date\n endDate: Date\n progress?: number\n dependsOn?: string // 이전 태스크의 ID\n length: string // 예: '3d' (3 days)\n tags?: TaskTag[]\n children?: Task[]\n}\n\nexport interface Section {\n name: string\n}\n\nexport interface ColumnConfig {\n id: string\n label: string\n visible: boolean\n width: string\n order: number\n}\n\nexport type LEVEL = 'year-quarter' | 'year-month' | 'quarter-week' | 'week-day'\n"]}
@@ -8,6 +8,15 @@ declare const _default: {
8
8
  tasks: {
9
9
  control: string;
10
10
  };
11
+ fromDate: {
12
+ control: string;
13
+ };
14
+ toDate: {
15
+ control: string;
16
+ };
17
+ extendGridLines: {
18
+ control: string;
19
+ };
11
20
  theme: {
12
21
  control: string;
13
22
  options: string[];
@@ -22,6 +31,9 @@ interface Story<T> {
22
31
  }
23
32
  interface ArgTypes {
24
33
  tasks: Task[];
34
+ fromDate: number | string;
35
+ toDate: number | string;
36
+ extendGridLines: boolean;
25
37
  theme: 'light' | 'dark';
26
38
  }
27
39
  export declare const Regular: Story<ArgTypes>;
@@ -7,10 +7,13 @@ export default {
7
7
  component: 'ox-gantt',
8
8
  argTypes: {
9
9
  tasks: { control: 'object' },
10
+ fromDate: { control: 'date' },
11
+ toDate: { control: 'date' },
12
+ extendGridLines: { control: 'boolean' },
10
13
  theme: { control: 'select', options: ['light', 'dark'] }
11
14
  }
12
15
  };
13
- const Template = ({ theme = 'light', tasks }) => html `
16
+ const Template = ({ theme = 'light', tasks, fromDate, toDate, extendGridLines }) => html `
14
17
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
15
18
 
16
19
  <link href="/themes/light.css" rel="stylesheet" />
@@ -64,8 +67,8 @@ const Template = ({ theme = 'light', tasks }) => html `
64
67
  </script>
65
68
 
66
69
  <ox-gantt
67
- from-date="2022-12-27"
68
- to-date="2024-12-31"
70
+ from-date=${new Date(fromDate).toISOString().split('T')[0]}
71
+ to-date=${new Date(toDate).toISOString().split('T')[0]}
69
72
  .tasks=${tasks}
70
73
  @date-range-selected=${(e) => {
71
74
  console.log('date-range-selected', e.detail);
@@ -73,24 +76,33 @@ const Template = ({ theme = 'light', tasks }) => html `
73
76
  @task-clicked=${(e) => {
74
77
  console.log('task-clicked', e.detail);
75
78
  }}
79
+ ?extend-grid-lines=${extendGridLines}
76
80
  >
77
81
  </ox-gantt>
78
82
  `;
79
- const exampleSection = {
83
+ const developmentSection = {
80
84
  name: 'Development'
81
85
  };
86
+ const testSection = {
87
+ name: 'Test'
88
+ };
89
+ const releaseSection = {
90
+ name: 'Release'
91
+ };
82
92
  export const Regular = Template.bind({});
83
93
  Regular.args = {
94
+ fromDate: '2022-12-27',
95
+ toDate: '2024-12-31',
84
96
  tasks: [
85
97
  {
86
98
  id: '1',
87
99
  title: 'Design',
88
100
  type: 'task',
89
- section: exampleSection,
90
- startTime: new Date('2023-01-01'),
91
- endTime: new Date('2023-01-05'),
101
+ section: developmentSection,
102
+ startDate: new Date('2023-01-01'),
103
+ endDate: new Date('2023-01-05'),
92
104
  progress: 60,
93
- after: '',
105
+ dependsOn: '',
94
106
  length: '5d',
95
107
  tags: ['active'],
96
108
  children: []
@@ -99,11 +111,11 @@ Regular.args = {
99
111
  id: '2',
100
112
  title: 'Development',
101
113
  type: 'milestone',
102
- section: exampleSection,
103
- startTime: new Date('2023-01-06'),
104
- endTime: new Date('2023-01-06'),
114
+ section: developmentSection,
115
+ startDate: new Date('2023-01-06'),
116
+ endDate: new Date('2023-01-06'),
105
117
  progress: 30,
106
- after: '1',
118
+ dependsOn: '1',
107
119
  length: '1d',
108
120
  tags: ['milestone'],
109
121
  children: []
@@ -112,11 +124,11 @@ Regular.args = {
112
124
  id: '3',
113
125
  title: 'Coding',
114
126
  type: 'phase',
115
- section: exampleSection,
116
- startTime: new Date('2023-01-07'),
117
- endTime: new Date('2023-01-15'),
127
+ section: developmentSection,
128
+ startDate: new Date('2023-01-07'),
129
+ endDate: new Date('2023-01-15'),
118
130
  progress: 10,
119
- after: '2',
131
+ dependsOn: '2',
120
132
  length: '9d',
121
133
  tags: ['critical'],
122
134
  children: [
@@ -124,11 +136,11 @@ Regular.args = {
124
136
  id: '3-1',
125
137
  title: 'Coding-A',
126
138
  type: 'task',
127
- section: exampleSection,
128
- startTime: new Date('2023-01-07'),
129
- endTime: new Date('2023-01-10'),
139
+ section: developmentSection,
140
+ startDate: new Date('2023-01-07'),
141
+ endDate: new Date('2023-01-10'),
130
142
  progress: 60,
131
- after: '',
143
+ dependsOn: '',
132
144
  length: '4d',
133
145
  tags: ['done'],
134
146
  children: []
@@ -137,10 +149,10 @@ Regular.args = {
137
149
  id: '3-2',
138
150
  title: 'Coding-B',
139
151
  type: 'task',
140
- section: exampleSection,
141
- startTime: new Date('2023-01-11'),
142
- endTime: new Date('2023-01-15'),
143
- after: '3-1',
152
+ section: developmentSection,
153
+ startDate: new Date('2023-01-11'),
154
+ endDate: new Date('2023-01-15'),
155
+ dependsOn: '3-1',
144
156
  length: '5d',
145
157
  tags: ['active'],
146
158
  children: []
@@ -151,11 +163,11 @@ Regular.args = {
151
163
  id: '4',
152
164
  title: 'Test',
153
165
  type: 'milestone',
154
- section: exampleSection,
155
- startTime: new Date('2023-01-07'),
156
- endTime: new Date('2023-01-10'),
166
+ section: developmentSection,
167
+ startDate: new Date('2023-01-07'),
168
+ endDate: new Date('2023-01-10'),
157
169
  progress: 100,
158
- after: '1',
170
+ dependsOn: '1',
159
171
  length: '1d',
160
172
  tags: ['done'],
161
173
  children: []
@@ -164,10 +176,10 @@ Regular.args = {
164
176
  id: '5',
165
177
  title: 'Deploy',
166
178
  type: 'milestone',
167
- section: exampleSection,
168
- startTime: new Date('2023-01-15'),
169
- endTime: new Date('2023-01-21'),
170
- after: '4',
179
+ section: developmentSection,
180
+ startDate: new Date('2023-01-15'),
181
+ endDate: new Date('2023-01-21'),
182
+ dependsOn: '4',
171
183
  length: '1d',
172
184
  tags: ['milestone'],
173
185
  children: []
@@ -176,10 +188,10 @@ Regular.args = {
176
188
  id: '6',
177
189
  title: 'Publishing',
178
190
  type: 'milestone',
179
- section: exampleSection,
180
- startTime: new Date('2023-01-11'),
181
- endTime: new Date('2023-01-15'),
182
- after: '5',
191
+ section: developmentSection,
192
+ startDate: new Date('2023-01-11'),
193
+ endDate: new Date('2023-01-15'),
194
+ dependsOn: '5',
183
195
  length: '1d',
184
196
  tags: ['milestone'],
185
197
  children: []
@@ -188,10 +200,10 @@ Regular.args = {
188
200
  id: '7',
189
201
  title: 'Provisioning',
190
202
  type: 'milestone',
191
- section: exampleSection,
192
- startTime: new Date('2023-01-12'),
193
- endTime: new Date('2023-01-15'),
194
- after: '6',
203
+ section: developmentSection,
204
+ startDate: new Date('2023-01-12'),
205
+ endDate: new Date('2023-01-15'),
206
+ dependsOn: '6',
195
207
  length: '1d',
196
208
  tags: ['milestone'],
197
209
  children: []
@@ -200,10 +212,10 @@ Regular.args = {
200
212
  id: '8',
201
213
  title: 'Alpha Test',
202
214
  type: 'milestone',
203
- section: exampleSection,
204
- startTime: new Date('2023-01-15'),
205
- endTime: new Date('2023-01-17'),
206
- after: '7',
215
+ section: testSection,
216
+ startDate: new Date('2023-01-15'),
217
+ endDate: new Date('2023-01-17'),
218
+ dependsOn: '7',
207
219
  length: '1d',
208
220
  tags: ['critical'],
209
221
  children: []
@@ -212,10 +224,10 @@ Regular.args = {
212
224
  id: '9',
213
225
  title: 'Beta Task',
214
226
  type: 'milestone',
215
- section: exampleSection,
216
- startTime: new Date('2023-01-15'),
217
- endTime: new Date('2023-01-18'),
218
- after: '8',
227
+ section: testSection,
228
+ startDate: new Date('2023-01-15'),
229
+ endDate: new Date('2023-01-18'),
230
+ dependsOn: '8',
219
231
  length: '1d',
220
232
  tags: ['active'],
221
233
  children: []
@@ -224,10 +236,10 @@ Regular.args = {
224
236
  id: '10',
225
237
  title: 'Gamma Test',
226
238
  type: 'milestone',
227
- section: exampleSection,
228
- startTime: new Date('2023-01-18'),
229
- endTime: new Date('2023-01-19'),
230
- after: '9',
239
+ section: testSection,
240
+ startDate: new Date('2023-01-18'),
241
+ endDate: new Date('2023-01-19'),
242
+ dependsOn: '9',
231
243
  length: '1d',
232
244
  tags: ['critical'],
233
245
  children: []
@@ -236,10 +248,10 @@ Regular.args = {
236
248
  id: '11',
237
249
  title: 'Zeta Test',
238
250
  type: 'milestone',
239
- section: exampleSection,
240
- startTime: new Date('2023-01-18'),
241
- endTime: new Date('2023-01-22'),
242
- after: '9',
251
+ section: testSection,
252
+ startDate: new Date('2023-01-18'),
253
+ endDate: new Date('2023-01-22'),
254
+ dependsOn: '9',
243
255
  length: '1d',
244
256
  tags: ['milestone'],
245
257
  children: []
@@ -248,10 +260,10 @@ Regular.args = {
248
260
  id: '12',
249
261
  title: 'Release',
250
262
  type: 'milestone',
251
- section: exampleSection,
252
- startTime: new Date('2023-01-18'),
253
- endTime: new Date('2023-01-23'),
254
- after: '9',
263
+ section: releaseSection,
264
+ startDate: new Date('2023-01-18'),
265
+ endDate: new Date('2023-01-23'),
266
+ dependsOn: '9',
255
267
  length: '1d',
256
268
  tags: ['milestone'],
257
269
  children: []
@@ -260,10 +272,10 @@ Regular.args = {
260
272
  id: '13',
261
273
  title: 'Release',
262
274
  type: 'milestone',
263
- section: exampleSection,
264
- startTime: new Date('2023-01-22'),
265
- endTime: new Date('2023-01-27'),
266
- after: '12',
275
+ section: releaseSection,
276
+ startDate: new Date('2023-01-22'),
277
+ endDate: new Date('2023-01-27'),
278
+ dependsOn: '12',
267
279
  length: '1d',
268
280
  tags: ['done'],
269
281
  children: []
@@ -272,10 +284,10 @@ Regular.args = {
272
284
  id: '14',
273
285
  title: 'Release',
274
286
  type: 'milestone',
275
- section: exampleSection,
276
- startTime: new Date('2023-01-27'),
277
- endTime: new Date('2023-01-30'),
278
- after: '13',
287
+ section: releaseSection,
288
+ startDate: new Date('2023-01-27'),
289
+ endDate: new Date('2023-01-30'),
290
+ dependsOn: '13',
279
291
  length: '1d',
280
292
  tags: ['milestone'],
281
293
  children: []
@@ -284,10 +296,10 @@ Regular.args = {
284
296
  id: '15',
285
297
  title: 'Release',
286
298
  type: 'milestone',
287
- section: exampleSection,
288
- startTime: new Date('2023-01-30'),
289
- endTime: new Date('2023-01-31'),
290
- after: '14',
299
+ section: releaseSection,
300
+ startDate: new Date('2023-01-30'),
301
+ endDate: new Date('2023-01-31'),
302
+ dependsOn: '14',
291
303
  length: '1d',
292
304
  tags: ['milestone'],
293
305
  children: []
@@ -296,10 +308,10 @@ Regular.args = {
296
308
  id: '16',
297
309
  title: 'Release',
298
310
  type: 'milestone',
299
- section: exampleSection,
300
- startTime: new Date('2023-01-31'),
301
- endTime: new Date('2023-02-05'),
302
- after: '15',
311
+ section: releaseSection,
312
+ startDate: new Date('2023-01-31'),
313
+ endDate: new Date('2023-02-05'),
314
+ dependsOn: '15',
303
315
  length: '1d',
304
316
  tags: ['active'],
305
317
  children: []
@@ -308,10 +320,10 @@ Regular.args = {
308
320
  id: '17',
309
321
  title: 'Release',
310
322
  type: 'milestone',
311
- section: exampleSection,
312
- startTime: new Date('2023-02-06'),
313
- endTime: new Date('2023-02-07'),
314
- after: '16',
323
+ section: releaseSection,
324
+ startDate: new Date('2023-02-06'),
325
+ endDate: new Date('2023-02-07'),
326
+ dependsOn: '16',
315
327
  length: '1d',
316
328
  tags: ['milestone'],
317
329
  children: []
@@ -320,10 +332,10 @@ Regular.args = {
320
332
  id: '18',
321
333
  title: 'Release',
322
334
  type: 'milestone',
323
- section: exampleSection,
324
- startTime: new Date('2023-02-08'),
325
- endTime: new Date('2023-02-09'),
326
- after: '17',
335
+ section: releaseSection,
336
+ startDate: new Date('2023-02-08'),
337
+ endDate: new Date('2023-02-09'),
338
+ dependsOn: '17',
327
339
  length: '1d',
328
340
  tags: ['critical'],
329
341
  children: []
@@ -332,10 +344,10 @@ Regular.args = {
332
344
  id: '19',
333
345
  title: 'Release',
334
346
  type: 'milestone',
335
- section: exampleSection,
336
- startTime: new Date('2023-02-10'),
337
- endTime: new Date('2023-02-25'),
338
- after: '18',
347
+ section: releaseSection,
348
+ startDate: new Date('2023-02-10'),
349
+ endDate: new Date('2023-02-25'),
350
+ dependsOn: '18',
339
351
  length: '1d',
340
352
  tags: ['milestone'],
341
353
  children: []