@xpyjs/gantt-vue 0.0.1-alpha.1 → 0.0.1-alpha.2
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/dist/index.js +17 -16
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/types/components/GanttVue.vue.d.ts +2 -0
- package/types/components/props.d.ts +1 -0
- package/types/index.d.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { defineComponent as m, ref as f, watch as k, onMounted as _, onUnmounted as x, createElementBlock as v, openBlock as w, nextTick as g } from "vue";
|
|
2
2
|
import { XGantt as G } from "@xpyjs/gantt-core";
|
|
3
3
|
import { colorjs as T, dayjs as X, generateId as B } from "@xpyjs/gantt-core";
|
|
4
|
-
const
|
|
4
|
+
const y = /* @__PURE__ */ m({
|
|
5
5
|
__name: "GanttVue",
|
|
6
6
|
props: {
|
|
7
7
|
options: { default: () => ({}) }
|
|
8
8
|
},
|
|
9
|
-
emits: ["error", "update:link", "create:link", "select:link", "select", "click:row", "dblclick:row", "contextmenu:row", "click:slider", "dblclick:slider", "contextmenu:slider", "move"],
|
|
9
|
+
emits: ["loaded", "error", "update:link", "create:link", "select:link", "select", "click:row", "dblclick:row", "contextmenu:row", "click:slider", "dblclick:slider", "contextmenu:slider", "move"],
|
|
10
10
|
setup(t, { expose: r, emit: o }) {
|
|
11
|
-
const c = t,
|
|
11
|
+
const c = t, l = o, s = f();
|
|
12
12
|
let e = null;
|
|
13
13
|
const u = async () => {
|
|
14
|
-
|
|
15
|
-
},
|
|
14
|
+
s.value && (await g(), e = new G(s.value, c.options), d());
|
|
15
|
+
}, d = () => {
|
|
16
16
|
if (!e) return;
|
|
17
17
|
[
|
|
18
|
+
"loaded",
|
|
18
19
|
"error",
|
|
19
20
|
"update:link",
|
|
20
21
|
"create:link",
|
|
@@ -27,11 +28,11 @@ const b = /* @__PURE__ */ m({
|
|
|
27
28
|
"dblclick:slider",
|
|
28
29
|
"contextmenu:slider",
|
|
29
30
|
"move"
|
|
30
|
-
].forEach((
|
|
31
|
+
].forEach((i) => {
|
|
31
32
|
e.on(
|
|
32
|
-
|
|
33
|
-
(...
|
|
34
|
-
|
|
33
|
+
i,
|
|
34
|
+
(...p) => {
|
|
35
|
+
l(i, ...p);
|
|
35
36
|
}
|
|
36
37
|
);
|
|
37
38
|
});
|
|
@@ -39,7 +40,7 @@ const b = /* @__PURE__ */ m({
|
|
|
39
40
|
return k(
|
|
40
41
|
() => c,
|
|
41
42
|
(n) => {
|
|
42
|
-
e && e.
|
|
43
|
+
e && e.update(n.options);
|
|
43
44
|
},
|
|
44
45
|
{ deep: !0 }
|
|
45
46
|
), r({
|
|
@@ -57,18 +58,18 @@ const b = /* @__PURE__ */ m({
|
|
|
57
58
|
u();
|
|
58
59
|
}), x(() => {
|
|
59
60
|
e && (e.destroy(), e = null);
|
|
60
|
-
}), (n,
|
|
61
|
+
}), (n, i) => (w(), v("div", {
|
|
61
62
|
ref_key: "containerRef",
|
|
62
|
-
ref:
|
|
63
|
+
ref: s,
|
|
63
64
|
class: "x-gantt-container"
|
|
64
65
|
}, null, 512));
|
|
65
66
|
}
|
|
66
|
-
}),
|
|
67
|
+
}), b = (t, r) => {
|
|
67
68
|
const o = t.__vccOpts || t;
|
|
68
|
-
for (const [c,
|
|
69
|
-
o[c] =
|
|
69
|
+
for (const [c, l] of r)
|
|
70
|
+
o[c] = l;
|
|
70
71
|
return o;
|
|
71
|
-
}, j = /* @__PURE__ */ y
|
|
72
|
+
}, j = /* @__PURE__ */ b(y, [["__scopeId", "data-v-8c20afe3"]]), a = j;
|
|
72
73
|
a.install = (t) => {
|
|
73
74
|
t.component("XGanttVue", a);
|
|
74
75
|
};
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@xpyjs/gantt-core")):typeof define=="function"&&define.amd?define(["exports","vue","@xpyjs/gantt-core"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.XGanttVue={},e.Vue,e.XGanttCore))})(this,function(e,t,r){"use strict";const i=((o,a)=>{const s=o.__vccOpts||o;for(const[l,u]of a)s[l]=u;return s})(t.defineComponent({__name:"GanttVue",props:{options:{default:()=>({})}},emits:["error","update:link","create:link","select:link","select","click:row","dblclick:row","contextmenu:row","click:slider","dblclick:slider","contextmenu:slider","move"],setup(o,{expose:a,emit:s}){const l=o,u=s,d=t.ref();let n=null;const p=async()=>{d.value&&(await t.nextTick(),n=new r.XGantt(d.value,l.options),m())},m=()=>{if(!n)return;["error","update:link","create:link","select:link","select","click:row","dblclick:row","contextmenu:row","click:slider","dblclick:slider","contextmenu:slider","move"].forEach(f=>{n.on(f,(...k)=>{u(f,...k)})})};return t.watch(()=>l,c=>{n&&n.
|
|
1
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@xpyjs/gantt-core")):typeof define=="function"&&define.amd?define(["exports","vue","@xpyjs/gantt-core"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.XGanttVue={},e.Vue,e.XGanttCore))})(this,function(e,t,r){"use strict";const i=((o,a)=>{const s=o.__vccOpts||o;for(const[l,u]of a)s[l]=u;return s})(t.defineComponent({__name:"GanttVue",props:{options:{default:()=>({})}},emits:["loaded","error","update:link","create:link","select:link","select","click:row","dblclick:row","contextmenu:row","click:slider","dblclick:slider","contextmenu:slider","move"],setup(o,{expose:a,emit:s}){const l=o,u=s,d=t.ref();let n=null;const p=async()=>{d.value&&(await t.nextTick(),n=new r.XGantt(d.value,l.options),m())},m=()=>{if(!n)return;["loaded","error","update:link","create:link","select:link","select","click:row","dblclick:row","contextmenu:row","click:slider","dblclick:slider","contextmenu:slider","move"].forEach(f=>{n.on(f,(...k)=>{u(f,...k)})})};return t.watch(()=>l,c=>{n&&n.update(c.options)},{deep:!0}),a({getInstance:()=>n,jumpTo:c=>{n&&n.jumpTo(c)}}),t.onMounted(()=>{p()}),t.onUnmounted(()=>{n&&(n.destroy(),n=null)}),(c,f)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"containerRef",ref:d,class:"x-gantt-container"},null,512))}}),[["__scopeId","data-v-8c20afe3"]]);i.install=o=>{o.component("XGanttVue",i)},Object.defineProperty(e,"colorjs",{enumerable:!0,get:()=>r.colorjs}),Object.defineProperty(e,"dayjs",{enumerable:!0,get:()=>r.dayjs}),Object.defineProperty(e,"generateId",{enumerable:!0,get:()=>r.generateId}),e.XGanttVue=i,e.default=i,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.x-gantt{--x-gantt-border-color: #e5e5e5}.x-gantt-table-container{flex-shrink:0;box-sizing:border-box;height:100%;overflow:hidden;display:flex;flex-direction:column;width:100%}.x-gantt-table-header{flex-shrink:0;box-sizing:border-box;border-bottom:1px solid var(--x-gantt-border-color)!important;display:flex;flex-direction:row;overflow:hidden;position:relative;flex-wrap:nowrap}.x-gantt-table-header .x-gantt-table-header-cell{position:relative;box-sizing:border-box;overflow:hidden;font-weight:var(--x-gantt-header-font-weight);flex-shrink:0;padding:0 8px}.x-gantt-table-header .x-gantt-table-header-cell.border{border-right:1px solid var(--x-gantt-border-color)!important}.x-gantt-table-header .x-gantt-table-header-cell .x-gantt-column-resize-handle{transition:background-color .2s ease}.x-gantt-table-header .x-gantt-table-header-cell .x-gantt-column-resize-handle:hover{background-color:#0000001a!important}.x-gantt-table-header>div:last-child.x-gantt-table-header-group.border>.x-gantt-table-header-cell.border{border-right:none}.x-gantt-table-header>div:last-child .x-gantt-table-header-group.border>.x-gantt-table-header-cell.border{border-right:none}.x-gantt-table-header>div:last-child.x-gantt-table-header-cell.border{border-right:none}.x-gantt-table-header-group{display:flex;flex-direction:column;box-sizing:border-box}.x-gantt-table-header-group>.x-gantt-table-header-cell{border-bottom:1px solid var(--x-gantt-border-color)!important}.x-gantt-table-header-group>.x-gantt-table-header-cell>.x-gantt-table-header-title{text-align:center}.x-gantt-table-header-children{display:flex;flex-direction:row}.x-gantt-table-body{flex:1;overflow:hidden;box-sizing:border-box;position:relative;width:100%;height:100%}.x-gantt-table-row{box-sizing:border-box}.x-gantt-table-row.hover>.x-gantt-table-cell{background-color:var(--x-gantt-row-hover-color, rgba(0, 0, 0, .05))!important}.x-gantt-table-row.selected>.x-gantt-table-cell{background-color:var(--x-gantt-row-selected-color, rgba(0, 0, 0, .1))!important}.x-gantt-table-cell{box-sizing:border-box;display:inline-block;border-bottom:1px solid var(--x-gantt-border-color)!important;padding:var(--x-gantt-cell-padding, 4px 8px)}.x-gantt-table-cell .x-gantt-table-cell__content{box-sizing:border-box}.x-gantt-table-cell.border{border-right:1px solid var(--x-gantt-border-color)!important}.x-gantt-content-wrapper{width:100%;height:100%;scrollbar-width:none}.x-gantt-content-wrapper::-webkit-scrollbar{display:none}.gantt-scrollbar{position:absolute;z-index:10;opacity:0;transition:opacity .2s ease-in-out;pointer-events:none}.gantt-scrollbar.visible{opacity:1;pointer-events:auto}.gantt-scrollbar-thumb{position:absolute;cursor:pointer;transition:background-color .2s ease-in-out,height .1s ease-out,width .1s ease-out,transform .05s linear}.gantt-scrollbar-vertical{top:0;right:0;bottom:0}.gantt-scrollbar-vertical .gantt-scrollbar-thumb-vertical{top:0;left:0;right:0}.gantt-scrollbar-horizontal{left:0;bottom:0;right:0}.gantt-scrollbar-horizontal .gantt-scrollbar-thumb-horizontal{left:0;top:0;bottom:0}.x-gantt-checkbox{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--x-gantt-border-color);border-radius:3px;cursor:pointer;transition:all .15s ease-in-out;box-sizing:border-box;-webkit-user-select:none;user-select:none;position:relative;overflow:hidden}.x-gantt-checkbox:focus{outline:none}.x-gantt-checkbox:focus-visible{outline:none}.x-gantt-checkbox__icon svg{transition:all .15s ease-in-out}.x-gantt-checkbox:hover{border-color:var(--x-gantt-primary-color)}.x-gantt{width:100%;height:100%;display:flex;box-sizing:border-box;flex-wrap:nowrap;padding:0;margin:0;overflow:hidden;position:relative}.x-gantt.border{border:1px solid var(--x-gantt-border-color)}.x-gantt-container[data-v-
|
|
1
|
+
.x-gantt{--x-gantt-border-color: #e5e5e5}.x-gantt-table-container{flex-shrink:0;box-sizing:border-box;height:100%;overflow:hidden;display:flex;flex-direction:column;width:100%}.x-gantt-table-header{flex-shrink:0;box-sizing:border-box;border-bottom:1px solid var(--x-gantt-border-color)!important;display:flex;flex-direction:row;overflow:hidden;position:relative;flex-wrap:nowrap}.x-gantt-table-header .x-gantt-table-header-cell{position:relative;box-sizing:border-box;overflow:hidden;font-weight:var(--x-gantt-header-font-weight);flex-shrink:0;padding:0 8px}.x-gantt-table-header .x-gantt-table-header-cell.border{border-right:1px solid var(--x-gantt-border-color)!important}.x-gantt-table-header .x-gantt-table-header-cell .x-gantt-column-resize-handle{transition:background-color .2s ease}.x-gantt-table-header .x-gantt-table-header-cell .x-gantt-column-resize-handle:hover{background-color:#0000001a!important}.x-gantt-table-header>div:last-child.x-gantt-table-header-group.border>.x-gantt-table-header-cell.border{border-right:none}.x-gantt-table-header>div:last-child .x-gantt-table-header-group.border>.x-gantt-table-header-cell.border{border-right:none}.x-gantt-table-header>div:last-child.x-gantt-table-header-cell.border{border-right:none}.x-gantt-table-header-group{display:flex;flex-direction:column;box-sizing:border-box}.x-gantt-table-header-group>.x-gantt-table-header-cell{border-bottom:1px solid var(--x-gantt-border-color)!important}.x-gantt-table-header-group>.x-gantt-table-header-cell>.x-gantt-table-header-title{text-align:center}.x-gantt-table-header-children{display:flex;flex-direction:row}.x-gantt-table-body{flex:1;overflow:hidden;box-sizing:border-box;position:relative;width:100%;height:100%}.x-gantt-table-row{box-sizing:border-box}.x-gantt-table-row.hover>.x-gantt-table-cell{background-color:var(--x-gantt-row-hover-color, rgba(0, 0, 0, .05))!important}.x-gantt-table-row.selected>.x-gantt-table-cell{background-color:var(--x-gantt-row-selected-color, rgba(0, 0, 0, .1))!important}.x-gantt-table-cell{box-sizing:border-box;display:inline-block;border-bottom:1px solid var(--x-gantt-border-color)!important;padding:var(--x-gantt-cell-padding, 4px 8px)}.x-gantt-table-cell .x-gantt-table-cell__content{box-sizing:border-box}.x-gantt-table-cell.border{border-right:1px solid var(--x-gantt-border-color)!important}.x-gantt-content-wrapper{width:100%;height:100%;scrollbar-width:none}.x-gantt-content-wrapper::-webkit-scrollbar{display:none}.gantt-scrollbar{position:absolute;z-index:10;opacity:0;transition:opacity .2s ease-in-out;pointer-events:none}.gantt-scrollbar.visible{opacity:1;pointer-events:auto}.gantt-scrollbar-thumb{position:absolute;cursor:pointer;transition:background-color .2s ease-in-out,height .1s ease-out,width .1s ease-out,transform .05s linear}.gantt-scrollbar-vertical{top:0;right:0;bottom:0}.gantt-scrollbar-vertical .gantt-scrollbar-thumb-vertical{top:0;left:0;right:0}.gantt-scrollbar-horizontal{left:0;bottom:0;right:0}.gantt-scrollbar-horizontal .gantt-scrollbar-thumb-horizontal{left:0;top:0;bottom:0}.x-gantt-checkbox{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--x-gantt-border-color);border-radius:3px;cursor:pointer;transition:all .15s ease-in-out;box-sizing:border-box;-webkit-user-select:none;user-select:none;position:relative;overflow:hidden}.x-gantt-checkbox:focus{outline:none}.x-gantt-checkbox:focus-visible{outline:none}.x-gantt-checkbox__icon svg{transition:all .15s ease-in-out}.x-gantt-checkbox:hover{border-color:var(--x-gantt-primary-color)}.x-gantt{width:100%;height:100%;display:flex;box-sizing:border-box;flex-wrap:nowrap;padding:0;margin:0;overflow:hidden;position:relative}.x-gantt.border{border:1px solid var(--x-gantt-border-color)}.x-gantt-container{position:relative;height:100%;overflow:hidden}.x-gantt-container[data-v-8c20afe3]{position:relative;width:100%;height:100%}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xpyjs/gantt-vue",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.1-alpha.
|
|
4
|
+
"version": "0.0.1-alpha.2",
|
|
5
5
|
"description": "Vue wrapper for x-gantt",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.umd.cjs",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"vue": "^3.0.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@xpyjs/gantt-core": "0.0.1-alpha.
|
|
26
|
+
"@xpyjs/gantt-core": "0.0.1-alpha.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@vitejs/plugin-vue": "^5.0.0",
|
|
@@ -57,6 +57,6 @@
|
|
|
57
57
|
"dev": "vite build --watch",
|
|
58
58
|
"build": "tsc && vite build",
|
|
59
59
|
"preview": "vite preview",
|
|
60
|
-
"release": "pnpm publish --access public
|
|
60
|
+
"release": "pnpm publish --access public"
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -14,6 +14,7 @@ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VL
|
|
|
14
14
|
*/
|
|
15
15
|
jumpTo: (date?: any) => void;
|
|
16
16
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
17
|
+
loaded: () => void;
|
|
17
18
|
error: (error: ErrorType) => void;
|
|
18
19
|
"update:link": (link: ILink) => void;
|
|
19
20
|
"create:link": (link: ILink) => void;
|
|
@@ -32,6 +33,7 @@ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VL
|
|
|
32
33
|
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<XGanttVueProps>, {
|
|
33
34
|
options: () => {};
|
|
34
35
|
}>>> & Readonly<{
|
|
36
|
+
onLoaded?: (() => any) | undefined;
|
|
35
37
|
onError?: ((error: ErrorType) => any) | undefined;
|
|
36
38
|
"onUpdate:link"?: ((link: ILink) => any) | undefined;
|
|
37
39
|
"onCreate:link"?: ((link: ILink) => any) | undefined;
|
package/types/index.d.ts
CHANGED
|
@@ -9,5 +9,5 @@ declare const XGanttVue: typeof GanttVue & {
|
|
|
9
9
|
};
|
|
10
10
|
export { XGanttVue };
|
|
11
11
|
export default XGanttVue;
|
|
12
|
-
export type { IOptions, IOptionConfig, EmitData, EventMap, ILink, ErrorType, Dayjs, Colorjs } from '@xpyjs/gantt-core';
|
|
12
|
+
export type { IOptions, IOptionConfig, EmitData, EventMap, ILink, ErrorType, Dayjs, Colorjs, XGanttUnit } from '@xpyjs/gantt-core';
|
|
13
13
|
export { generateId, dayjs, colorjs } from '@xpyjs/gantt-core';
|