Skip to content

Commit

Permalink
Merge branch 'release/1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Xeyos88 committed Dec 19, 2024
2 parents fe77645 + b95a0f5 commit 4667f48
Show file tree
Hide file tree
Showing 16 changed files with 74 additions and 111 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Changelog

## [v1.0.1](https://github.com/Xeyos88/HyVueGantt/tree/v1.0.1) (2024-12-19)

[Full Changelog](https://github.com/Xeyos88/HyVueGantt/v1.00...v1.0.1)

**Fixed bugs:**

- Update bar connection position with hidden rows

## [v1.0.0](https://github.com/Xeyos88/HyVueGantt/tree/v1.0.0) (2024-12-19)

**Firt version**

- Feature: Complete TypeScript support with enhanced type definitions and inference
- Feature: Bars support connections with multiple styles ('bezier', 'straight', 'squared') and patterns ('solid', 'dot', 'dash', 'dashdot')
- Feature: Built-in keyboard navigation with arrow keys for bar movement and resizing
- Feature: 11 pre-built color schemes with consistent theming across components
- Feature: `pushOnConnect` props for controlling bar behavior during drag operations
- Feature: Responsive zoom controls with customizable steps and limits
- Feature: Support for bar bundles to group and move related bars together
- Fix: Bar position calculation improved for better accuracy
- Fix: Memory leak in resize observer properly handled
- Fix: Edge cases in bar overlap detection resolved
- Fix: Time axis rendering optimization for large datasets
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

A powerful Gantt chart component for Vue 3, evolved from vue-ganttastic. Provides flexible and performant timeline visualization for modern applications.

<img src="https://github.com/Xeyos88/HyVueGantt/blob/main/docs/.vitepress/public/logo.png?raw=true" alt="logo HyVueGantt" witdh="300" height="300">

## Guide and Docs

For further guides and references, check out the [documentation](https://github.com/Xeyos88/HyVueGantt).

## 🚀 Installation

```bash
Expand Down
12 changes: 0 additions & 12 deletions deploy.sh

This file was deleted.

63 changes: 0 additions & 63 deletions docs-deploy.yml

This file was deleted.

4 changes: 2 additions & 2 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ export default defineConfig({
title: "Hyper Vue Gantt",
description: "Documentation for the Huper Vue Gantt Chart Library",
base: '/HyVueGantt/',
head: [['link', { rel: 'icon', href: '/favicon.ico' }]],
head: [['link', { rel: 'icon', href: 'https://raw.githubusercontent.com/Xeyos88/HyVueGantt/refs/heads/main/public/favicon.ico' }]],

themeConfig: {
logo: {
src: '/logo.png',
src: 'https://github.com/Xeyos88/HyVueGantt/blob/main/docs/.vitepress/public/logo.png?raw=true',
alt: 'Hyper Vue Gantt Logo'
},

Expand Down
8 changes: 2 additions & 6 deletions docs/.vitepress/theme/components/AdvancedGanttDemo.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import dayjs from 'dayjs'
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'
import { GGanttChart, GGanttRow } from 'hy-vue-gantt'
dayjs.extend(isSameOrBefore)
const isLibraryReady = ref(false)
const currentScheme = ref('default')
Expand Down Expand Up @@ -70,8 +66,8 @@ onMounted(() => {
</select>
</div>
<g-gantt-chart
chart-start="2024-12-10"
chart-end="2024-12-20"
chart-start="2024-12-11"
chart-end="2024-12-17"
precision="day"
bar-start="start"
bar-end="end"
Expand Down
4 changes: 0 additions & 4 deletions docs/.vitepress/theme/components/BasicGanttDemo.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import dayjs from 'dayjs'
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'
import { GGanttChart, GGanttRow } from 'hy-vue-gantt'
dayjs.extend(isSameOrBefore)
const isLibraryReady = ref(false)
const rows = ref([
Expand Down
4 changes: 0 additions & 4 deletions docs/.vitepress/theme/components/ConnectionsGanttDemo.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import dayjs from 'dayjs'
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'
import { GGanttChart, GGanttRow } from 'hy-vue-gantt'
dayjs.extend(isSameOrBefore)
const isLibraryReady = ref(false)
const rows = ref([
Expand Down
5 changes: 0 additions & 5 deletions docs/.vitepress/theme/components/OtherGanttDemo.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import dayjs from 'dayjs'
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'
import { GGanttChart, GGanttRow } from 'hy-vue-gantt'
dayjs.extend(isSameOrBefore)
const isLibraryReady = ref(false)
const rows = ref([
Expand Down
3 changes: 0 additions & 3 deletions docs/.vitepress/theme/components/TimeGanttDemo.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import dayjs from 'dayjs'
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'
import { GGanttChart, GGanttRow } from 'hy-vue-gantt'
dayjs.extend(isSameOrBefore)
const isLibraryReady = ref(false)
const currentPrecision = ref('hour')
Expand Down
16 changes: 12 additions & 4 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import DefaultTheme from 'vitepress/theme'
import { defineClientComponent } from 'vitepress'
import './custom.css'
import dayjs from 'dayjs'
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'
import dayjs from "dayjs"
import isSameOrBefore from "dayjs/plugin/isSameOrBefore.js"
import isSameOrAfter from "dayjs/plugin/isSameOrAfter.js"
import isBetween from "dayjs/plugin/isBetween.js"

dayjs.extend(isSameOrBefore)

export function extendDayjs() {
dayjs.extend(isSameOrBefore)
dayjs.extend(isSameOrAfter)
dayjs.extend(isBetween)
}

const GanttDemo = defineClientComponent(() => {
return import('./components/BasicGanttDemo.vue')
Expand All @@ -30,10 +37,11 @@ const OtherGanttDemo = defineClientComponent(() => {
export default {
extends: DefaultTheme,
enhanceApp({ app }) {
extendDayjs()
app.component('BasicGanttDemo', GanttDemo)
app.component('ConnectionsGanttDemo', ConnectionsGanttDemo)
app.component('TimeGanttDemo', TimeGanttDemo)
app.component('AdvancedGanttDemo',AdvancedGanttDemo)
app.component('OtherGanttDemo',OtherGanttDemo)
app.component('OtherGanttDemo', OtherGanttDemo)
}
}
2 changes: 0 additions & 2 deletions docs/components/g-gantt-chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ Here's a minimal example of using the GGanttChart component:

### Props

### Props

| Prop Name | Type | Default | Description |
|-----------|------|---------|-------------|
| chartStart | `string \| Date` | Required | The start date of the chart's visible range |
Expand Down
2 changes: 0 additions & 2 deletions docs/guide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ import { createApp } from 'vue'
import App from './App.vue'
import hyvuegantt from 'hy-vue-gantt'

// Import the default styles
import 'hy-vue-gantt/dist/style.css'

const app = createApp(App)
app.use(hyvuegantt)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hy-vue-gantt",
"version": "1.0.0",
"version": "1.0.1",
"description": "Fork and update of vue-ganttastic",
"author": "Eugenio Topa (@Xeyos88)",
"scripts": {
Expand Down Expand Up @@ -56,7 +56,7 @@
"dayjs": "^1.11.13",
"vue": "^3.5.13"
},
"homepage": "",
"homepage": "https://xeyos88.github.io/HyVueGantt/",
"keywords": [
"gantt",
"chart",
Expand Down
6 changes: 4 additions & 2 deletions src/composables/useConnections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ export function useConnections(
const parentElement = document.getElementById(id.value)
const rowsContainer = parentElement!.querySelector(".g-gantt-rows-container")
if (!rowsContainer) return
const scrollTop = rowsContainer.scrollTop
const scrollLeft = rowsContainer.scrollLeft

const containerRect = rowsContainer.getBoundingClientRect()
const bars = parentElement!.querySelectorAll(".g-gantt-bar")
Expand All @@ -80,8 +82,8 @@ export function useConnections(
if (barId) {
const position = {
id: barId,
x: rect.left - containerRect.left,
y: rect.top - containerRect.top,
x: rect.left - containerRect.left +scrollLeft,
y: rect.top - containerRect.top +scrollTop,
width: rect.width,
height: rect.height
}
Expand Down

0 comments on commit 4667f48

Please sign in to comment.