Skip to content

Commit 02d44b9

Browse files
committed
Merge branch 'release/3.8.1'
2 parents ef03948 + 83ab623 commit 02d44b9

File tree

10 files changed

+19
-16
lines changed

10 files changed

+19
-16
lines changed

CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ All notable changes to this project will be documented in this file.
88

99
[Full Changelog](https://github.com/Xeyos88/HyVueGantt/compare/v3.7.0...v3.8.0)
1010

11-
12-
1311
**✨ New Features:**
1412

1513
- Bar definition event

docs/components/g-gantt-chart.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ Here's a minimal example of using the GGanttChart component:
6767
| currentTimeLabel | `string` | `''` | Label for current time indicator |
6868
| dateFormat | `string \| false` | `'YYYY-MM-DD HH:mm'` | Format for dates |
6969
| milestones | `GanttMilestone[]` | `[]` | List of milestone |
70+
| timeaxisEvents | `TimeaxisEvent[]` | `[]` | Array of events to display on the time axis |
71+
| showEventsAxis | `boolean` | `false` | Controls the visibility of the events axis |
72+
| eventsAxisHeight | `number` | `25` | Sets the height of the events axis in pixels |
7073
| holidayHighlight| `string` | `` | Country Cody of date-holidays |
7174
| rowClass| `(row: ChartRow) => string` | `` | Method to add classes to data rows |
7275
| rowLabelClass| `(row: ChartRow) => string` | `` | Method to add classes to label rows |
@@ -118,9 +121,6 @@ Here's a minimal example of using the GGanttChart component:
118121
| connection-cancel | `{ sourceBar: GanttBarObject, connectionPoint: ConnectionPoint, e: MouseEvent }` | Cancels the creation of a connection |
119122
| connection-delete | `{ sourceBar: GanttBarObject, targetBar: GanttBarObject, e: MouseEvent }` | Delete a connection |
120123
| label-edit | `{ sourceBar: GanttBarObject, e: MouseEvent, oldValue: string, newValue: string }` | Edit bar label |
121-
| timeaxisEvents | `TimeaxisEvent[]` | `[]` | Array of events to display on the time axis |
122-
| showEventsAxis | `boolean` | `true` | Controls the visibility of the events axis |
123-
| eventsAxisHeight | `number` | `25` | Sets the height of the events axis in pixels |
124124
| export-start | `format: string` | Emitted when the export process starts |
125125
| export-success | `result: ExportResult` | Emitted when the export process completes successfully |
126126
| export-error | `error: string` | Emitted when the export process encounters an error |

docs/examples/basic.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The most basic implementation of a Gantt chart:
1414
:precision="precision"
1515
:bar-start="barStart"
1616
:bar-end="barEnd"
17+
:date-format="dateFormat"
1718
>
1819
<g-gantt-row
1920
v-for="row in rows"
@@ -32,6 +33,7 @@ const chartEnd = ref('2024-12-31')
3233
const precision = ref('day')
3334
const barStart = ref('start')
3435
const barEnd = ref('end')
36+
const dateFormat = "YYYY-MM-DD"
3537
3638
const rows = ref([
3739
{

docs/guide/installation.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ app.mount('#app')
6868
Alternatively, you can import components individually:
6969

7070
```typescript
71-
import { GGanttChart, GGanttRow } from 'hy-vue-gantt'
71+
import { GGanttChart, GGanttRow, extendDayjs } from 'hy-vue-gantt'
72+
73+
extendDayjs()
7274

7375
export default {
7476
components: {

docs/guide/introduction.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Hyper Vue Gantt
1+
# Hyper Vue Gantt
22

33
A powerful and flexible Gantt chart component for Vue 3 applications. This component is an evolution of [vue-ganttastic](https://github.com/zunnzunn/vue-ganttastic) package.
44

@@ -30,6 +30,7 @@ Hyper Vue Gantt is designed to provide a seamless experience for creating and ma
3030
:precision="precision"
3131
:bar-start="barStart"
3232
:bar-end="barEnd"
33+
:date-format="dateFormat"
3334
>
3435
<g-gantt-row
3536
v-for="row in rows"
@@ -46,6 +47,7 @@ const chartEnd = "2024-12-31"
4647
const precision = "day"
4748
const barStart = "start"
4849
const barEnd = "end"
50+
const dateFormat = "YYYY-MM-DD"
4951
5052
const rows = [
5153
{

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hy-vue-gantt",
3-
"version": "3.8.0",
3+
"version": "3.8.1",
44
"description": "Evolution of vue-ganttastic package",
55
"author": "Eugenio Topa (@Xeyos88)",
66
"scripts": {

src/components/GGanttChart.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ const props = withDefaults(defineProps<GGanttChartProps>(), {
130130
labelResizable: true,
131131
milestones: () => [],
132132
timeaxisEvents: () => [],
133-
showEventsAxis: true,
133+
showEventsAxis: false,
134134
eventsAxisHeight: 25,
135135
holidayHighlight: "",
136136
rowClass: () => "",

src/composables/useDayjsHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default function useDayjsHelper(config: GGanttChartConfig = provideConfig
5252
return dayjs(input)
5353
}
5454
const format = dateFormat.value || DEFAULT_DATE_FORMAT
55-
return dayjs(value, format, true)
55+
return dayjs(value, format, false)
5656
}
5757

5858
/**

tests/components/GGanttMilestone.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { describe, it, expect } from "vitest"
22
import { mount } from "@vue/test-utils"
33
import GGanttMilestone from "../../src/components/GGanttMilestone.vue"
44

5-
65
describe("GGanttMilestone", () => {
76
const mockMilestone = {
87
id: "milestone1",
@@ -16,7 +15,7 @@ describe("GGanttMilestone", () => {
1615
props: {
1716
milestone: mockMilestone,
1817
...props
19-
},
18+
}
2019
})
2120
}
2221

@@ -84,4 +83,4 @@ describe("GGanttMilestone", () => {
8483
expect(wrapper.exists()).toBe(true)
8584
})
8685
})
87-
})
86+
})

tests/composables/useDayjsHelper.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ describe("useDayjsHelper", () => {
4949
it("should convert string date to dayjs object", () => {
5050
const { toDayjs } = useDayjsHelper(mockConfig)
5151
const result = toDayjs("2024-01-01")
52-
expect(dayjs).toHaveBeenCalledWith("2024-01-01", "YYYY-MM-DD HH:mm", true)
52+
expect(dayjs).toHaveBeenCalledWith("2024-01-01", "YYYY-MM-DD HH:mm", false)
5353
})
5454

5555
it("should convert Date object to dayjs object", () => {
@@ -67,7 +67,7 @@ describe("useDayjsHelper", () => {
6767
ganttBarConfig: { id: "1" }
6868
}
6969
const result = toDayjs(bar, "start")
70-
expect(dayjs).toHaveBeenCalledWith("2024-01-01", "YYYY-MM-DD HH:mm", true)
70+
expect(dayjs).toHaveBeenCalledWith("2024-01-01", "YYYY-MM-DD HH:mm", false)
7171
})
7272

7373
it("should handle bar object with end property", () => {
@@ -78,7 +78,7 @@ describe("useDayjsHelper", () => {
7878
ganttBarConfig: { id: "1" }
7979
}
8080
const result = toDayjs(bar, "end")
81-
expect(dayjs).toHaveBeenCalledWith("2024-01-02", "YYYY-MM-DD HH:mm", true)
81+
expect(dayjs).toHaveBeenCalledWith("2024-01-02", "YYYY-MM-DD HH:mm", false)
8282
})
8383
})
8484

0 commit comments

Comments
 (0)