chbim-time-axis-v2 0.0.9 → 0.0.11
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.
|
@@ -11823,7 +11823,7 @@ const _hoisted_4$1 = ["onMouseenter", "onContextmenu"];
|
|
|
11823
11823
|
const _hoisted_5$1 = ["onMousedown", "onContextmenu"];
|
|
11824
11824
|
const _hoisted_6$1 = ["onMousedown"];
|
|
11825
11825
|
const _hoisted_7$1 = {
|
|
11826
|
-
key:
|
|
11826
|
+
key: 0,
|
|
11827
11827
|
class: "barLabel"
|
|
11828
11828
|
};
|
|
11829
11829
|
const _hoisted_8$1 = ["onMousedown"];
|
|
@@ -12302,7 +12302,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12302
12302
|
name: b.name || "",
|
|
12303
12303
|
color: b.color,
|
|
12304
12304
|
startTime: b.startTime,
|
|
12305
|
-
endTime: b.endTime
|
|
12305
|
+
endTime: b.endTime,
|
|
12306
|
+
attr: b.attr,
|
|
12307
|
+
class: b.class
|
|
12306
12308
|
});
|
|
12307
12309
|
}
|
|
12308
12310
|
});
|
|
@@ -12317,7 +12319,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12317
12319
|
id: i.id,
|
|
12318
12320
|
name: i.name || "",
|
|
12319
12321
|
color: i.color,
|
|
12320
|
-
time: i.time
|
|
12322
|
+
time: i.time,
|
|
12323
|
+
attr: i.attr,
|
|
12324
|
+
class: i.class
|
|
12321
12325
|
});
|
|
12322
12326
|
}
|
|
12323
12327
|
});
|
|
@@ -12609,7 +12613,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12609
12613
|
}, null, 4)) : createCommentVNode("", true),
|
|
12610
12614
|
bar.hasMainBar && bar.originalTask.type !== "block" && bar.originalTask.type !== "instant" ? (openBlock(), createElementBlock("div", {
|
|
12611
12615
|
key: 1,
|
|
12612
|
-
class: "taskBar draggable",
|
|
12616
|
+
class: normalizeClass(["taskBar draggable", bar.originalTask.class]),
|
|
12613
12617
|
style: normalizeStyle({
|
|
12614
12618
|
left: bar.left + "px",
|
|
12615
12619
|
width: bar.width + "px",
|
|
@@ -12617,7 +12621,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12617
12621
|
}),
|
|
12618
12622
|
onMousedown: (e) => handleDragStart(e, bar.originalTask),
|
|
12619
12623
|
onContextmenu: withModifiers(
|
|
12620
|
-
(e) => _ctx.$emit("bar-contextmenu", {
|
|
12624
|
+
(e) => _ctx.$emit("bar-contextmenu", {
|
|
12625
|
+
event: e,
|
|
12626
|
+
task: bar.originalTask,
|
|
12627
|
+
time: getTimeFromEvent(e)
|
|
12628
|
+
}),
|
|
12621
12629
|
["stop", "prevent"]
|
|
12622
12630
|
)
|
|
12623
12631
|
}, [
|
|
@@ -12629,20 +12637,22 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12629
12637
|
["stop"]
|
|
12630
12638
|
)
|
|
12631
12639
|
}, null, 40, _hoisted_6$1)) : createCommentVNode("", true),
|
|
12632
|
-
|
|
12640
|
+
renderSlot(_ctx.$slots, "barContent", { bar }, () => [
|
|
12641
|
+
bar.width > 50 ? (openBlock(), createElementBlock("span", _hoisted_7$1, toDisplayString(bar.name), 1)) : createCommentVNode("", true)
|
|
12642
|
+
], true),
|
|
12633
12643
|
bar.originalTask.type !== "group" ? (openBlock(), createElementBlock("div", {
|
|
12634
|
-
key:
|
|
12644
|
+
key: 1,
|
|
12635
12645
|
class: "resize-handle right",
|
|
12636
12646
|
onMousedown: withModifiers(
|
|
12637
12647
|
(e) => handleResizeStart(e, bar.originalTask, "right"),
|
|
12638
12648
|
["stop"]
|
|
12639
12649
|
)
|
|
12640
12650
|
}, null, 40, _hoisted_8$1)) : createCommentVNode("", true)
|
|
12641
|
-
],
|
|
12651
|
+
], 46, _hoisted_5$1)) : createCommentVNode("", true),
|
|
12642
12652
|
bar.originalTask.type === "block" && bar.blocks ? (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(bar.blocks, (blk, idx) => {
|
|
12643
12653
|
return openBlock(), createElementBlock("div", {
|
|
12644
12654
|
key: idx,
|
|
12645
|
-
class: "taskBar draggable",
|
|
12655
|
+
class: normalizeClass(["taskBar draggable", blk.class]),
|
|
12646
12656
|
style: normalizeStyle({
|
|
12647
12657
|
left: blk.left + "px",
|
|
12648
12658
|
width: blk.width + "px",
|
|
@@ -12655,7 +12665,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12655
12665
|
(e) => _ctx.$emit("bar-contextmenu", {
|
|
12656
12666
|
event: e,
|
|
12657
12667
|
task: bar.originalTask,
|
|
12658
|
-
block: blk
|
|
12668
|
+
block: blk,
|
|
12669
|
+
time: getTimeFromEvent(e)
|
|
12659
12670
|
}),
|
|
12660
12671
|
["stop", "prevent"]
|
|
12661
12672
|
)
|
|
@@ -12667,7 +12678,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12667
12678
|
["stop"]
|
|
12668
12679
|
)
|
|
12669
12680
|
}, null, 40, _hoisted_10$1),
|
|
12670
|
-
|
|
12681
|
+
renderSlot(_ctx.$slots, "blockContent", {
|
|
12682
|
+
block: blk,
|
|
12683
|
+
task: bar.originalTask
|
|
12684
|
+
}, () => [
|
|
12685
|
+
blk.width > 50 ? (openBlock(), createElementBlock("span", _hoisted_11$1, toDisplayString(blk.name), 1)) : createCommentVNode("", true)
|
|
12686
|
+
], true),
|
|
12671
12687
|
createElementVNode("div", {
|
|
12672
12688
|
class: "resize-handle right",
|
|
12673
12689
|
onMousedown: withModifiers(
|
|
@@ -12675,21 +12691,16 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12675
12691
|
["stop"]
|
|
12676
12692
|
)
|
|
12677
12693
|
}, null, 40, _hoisted_12$1)
|
|
12678
|
-
],
|
|
12694
|
+
], 46, _hoisted_9$1);
|
|
12679
12695
|
}), 128)) : createCommentVNode("", true),
|
|
12680
12696
|
bar.instants ? (openBlock(true), createElementBlock(Fragment, { key: 3 }, renderList(bar.instants, (inst, idx) => {
|
|
12681
12697
|
return openBlock(), createElementBlock("div", {
|
|
12682
12698
|
key: inst.id,
|
|
12683
|
-
class: "instantTaskPoint draggable",
|
|
12699
|
+
class: normalizeClass(["instantTaskPoint draggable", inst.class]),
|
|
12684
12700
|
style: normalizeStyle({
|
|
12685
12701
|
left: inst.left - 10 + "px",
|
|
12686
|
-
width: "18px",
|
|
12687
|
-
height: "18px",
|
|
12688
12702
|
backgroundColor: inst.color || "#ffffff",
|
|
12689
|
-
|
|
12690
|
-
borderRadius: "50%",
|
|
12691
|
-
position: "absolute",
|
|
12692
|
-
cursor: "pointer"
|
|
12703
|
+
position: "absolute"
|
|
12693
12704
|
}),
|
|
12694
12705
|
title: `${inst.name ? inst.name + "\n" : ""}${unref(dayjs)(
|
|
12695
12706
|
inst.time
|
|
@@ -12699,11 +12710,17 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12699
12710
|
(e) => _ctx.$emit("bar-contextmenu", {
|
|
12700
12711
|
event: e,
|
|
12701
12712
|
task: bar.originalTask,
|
|
12702
|
-
instant: inst
|
|
12713
|
+
instant: inst,
|
|
12714
|
+
time: getTimeFromEvent(e)
|
|
12703
12715
|
}),
|
|
12704
12716
|
["stop", "prevent"]
|
|
12705
12717
|
)
|
|
12706
|
-
},
|
|
12718
|
+
}, [
|
|
12719
|
+
renderSlot(_ctx.$slots, "instantContent", {
|
|
12720
|
+
instant: inst,
|
|
12721
|
+
task: bar.originalTask
|
|
12722
|
+
}, void 0, true)
|
|
12723
|
+
], 46, _hoisted_13$1);
|
|
12707
12724
|
}), 128)) : createCommentVNode("", true)
|
|
12708
12725
|
], 46, _hoisted_4$1);
|
|
12709
12726
|
}), 128))
|
|
@@ -12720,8 +12737,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12720
12737
|
};
|
|
12721
12738
|
}
|
|
12722
12739
|
});
|
|
12723
|
-
const
|
|
12724
|
-
const TimelineChart = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
12740
|
+
const TimelineChart_vue_vue_type_style_index_0_scoped_7a1f218b_lang = "";
|
|
12741
|
+
const TimelineChart = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-7a1f218b"]]);
|
|
12725
12742
|
const _hoisted_1 = { class: "toolbar" };
|
|
12726
12743
|
const _hoisted_2 = { style: { "flex": "1", "display": "flex", "align-items": "center", "height": "100%" } };
|
|
12727
12744
|
const _hoisted_3 = { class: "left-controls" };
|
|
@@ -12779,8 +12796,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12779
12796
|
const contextMenuTask = ref(null);
|
|
12780
12797
|
const contextMenuBlock = ref(null);
|
|
12781
12798
|
const contextMenuInstant = ref(null);
|
|
12799
|
+
const contextMenuTime = ref(null);
|
|
12782
12800
|
const openBarContextMenu = (payload) => {
|
|
12783
|
-
const { event, task, block, instant } = payload;
|
|
12801
|
+
const { event, task, block, instant, time } = payload;
|
|
12784
12802
|
event.preventDefault();
|
|
12785
12803
|
event.stopPropagation();
|
|
12786
12804
|
closeBuiltinMenu();
|
|
@@ -12799,12 +12817,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12799
12817
|
contextMenuTask.value = task;
|
|
12800
12818
|
contextMenuBlock.value = block || null;
|
|
12801
12819
|
contextMenuInstant.value = instant || null;
|
|
12820
|
+
contextMenuTime.value = time || null;
|
|
12802
12821
|
};
|
|
12803
12822
|
const closeContextMenu = () => {
|
|
12804
12823
|
contextMenuVisible.value = false;
|
|
12805
12824
|
contextMenuTask.value = null;
|
|
12806
12825
|
contextMenuBlock.value = null;
|
|
12807
12826
|
contextMenuInstant.value = null;
|
|
12827
|
+
contextMenuTime.value = null;
|
|
12808
12828
|
};
|
|
12809
12829
|
const builtinMenuVisible = ref(false);
|
|
12810
12830
|
const builtinMenuStyle = ref({});
|
|
@@ -12987,8 +13007,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12987
13007
|
const processedChildren = process(rawChildren);
|
|
12988
13008
|
let minTime = Number.MAX_SAFE_INTEGER;
|
|
12989
13009
|
let maxTime = Number.MIN_SAFE_INTEGER;
|
|
12990
|
-
if (
|
|
12991
|
-
|
|
13010
|
+
if (processedChildren.length > 0) {
|
|
13011
|
+
processedChildren.forEach((child) => {
|
|
12992
13012
|
const start = new Date(child.startTime).getTime();
|
|
12993
13013
|
const end = new Date(child.endTime).getTime();
|
|
12994
13014
|
if (!isNaN(start)) {
|
|
@@ -13509,7 +13529,35 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13509
13529
|
onRowMouseleave: handleRowMouseLeave,
|
|
13510
13530
|
onBarContextmenu: openBarContextMenu,
|
|
13511
13531
|
onRowContextmenu: openRowContextMenu
|
|
13512
|
-
},
|
|
13532
|
+
}, createSlots({ _: 2 }, [
|
|
13533
|
+
_ctx.$slots.barContent ? {
|
|
13534
|
+
name: "barContent",
|
|
13535
|
+
fn: withCtx(({ bar }) => [
|
|
13536
|
+
renderSlot(_ctx.$slots, "barContent", { bar }, void 0, true)
|
|
13537
|
+
]),
|
|
13538
|
+
key: "0"
|
|
13539
|
+
} : void 0,
|
|
13540
|
+
_ctx.$slots.blockContent ? {
|
|
13541
|
+
name: "blockContent",
|
|
13542
|
+
fn: withCtx(({ block, task }) => [
|
|
13543
|
+
renderSlot(_ctx.$slots, "blockContent", {
|
|
13544
|
+
block,
|
|
13545
|
+
task
|
|
13546
|
+
}, void 0, true)
|
|
13547
|
+
]),
|
|
13548
|
+
key: "1"
|
|
13549
|
+
} : void 0,
|
|
13550
|
+
_ctx.$slots.instantContent ? {
|
|
13551
|
+
name: "instantContent",
|
|
13552
|
+
fn: withCtx(({ instant, task }) => [
|
|
13553
|
+
renderSlot(_ctx.$slots, "instantContent", {
|
|
13554
|
+
instant,
|
|
13555
|
+
task
|
|
13556
|
+
}, void 0, true)
|
|
13557
|
+
]),
|
|
13558
|
+
key: "2"
|
|
13559
|
+
} : void 0
|
|
13560
|
+
]), 1032, ["tasks", "currentTime", "scale", "viewStartTime", "viewEndTime", "hoveredTaskId"])
|
|
13513
13561
|
])
|
|
13514
13562
|
], 512), [
|
|
13515
13563
|
[vShow, !isMinimized.value]
|
|
@@ -13525,6 +13573,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13525
13573
|
task: contextMenuTask.value,
|
|
13526
13574
|
block: contextMenuBlock.value,
|
|
13527
13575
|
instant: contextMenuInstant.value,
|
|
13576
|
+
time: contextMenuTime.value,
|
|
13528
13577
|
close: closeContextMenu
|
|
13529
13578
|
}, () => [
|
|
13530
13579
|
contextMenuTask.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
@@ -13567,8 +13616,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13567
13616
|
};
|
|
13568
13617
|
}
|
|
13569
13618
|
});
|
|
13570
|
-
const
|
|
13571
|
-
const CesiumGantt = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
13619
|
+
const CesiumGantt_vue_vue_type_style_index_0_scoped_ea905489_lang = "";
|
|
13620
|
+
const CesiumGantt = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ea905489"]]);
|
|
13572
13621
|
CesiumGantt.install = (app) => {
|
|
13573
13622
|
app.component("CesiumGantt", CesiumGantt);
|
|
13574
13623
|
};
|