@ibiz-template/vue3-components 0.7.41-alpha.14 → 0.7.41-alpha.16
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-U4v1OOOD.js +1 -0
- package/dist/index-lFGFvnYE.js +1 -0
- package/dist/index-m8q8r8br.js +4 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/map-chart-3dojS1dZ.js +1 -0
- package/dist/{wang-editor-z0RY8bO1.js → wang-editor-_06OYPpu.js} +1 -1
- package/dist/{xlsx-util-8Du1A340.js → xlsx-util-FNiwKrqm.js} +1 -1
- package/es/common/carousel/carousel.css +1 -1
- package/es/common/index.mjs +2 -0
- package/es/common/kanben-setting/kanben-setting.css +1 -0
- package/es/common/kanben-setting/kanben-setting.d.ts +42 -0
- package/es/common/kanben-setting/kanben-setting.mjs +65 -0
- package/es/common/map-chart/map-chart.mjs +6 -14
- package/es/control/calendar/calendar-util.d.ts +12 -0
- package/es/control/calendar/calendar-util.mjs +30 -1
- package/es/control/calendar/calendar.css +1 -1
- package/es/control/calendar/calendar.d.ts +2 -0
- package/es/control/calendar/calendar.mjs +106 -25
- package/es/control/calendar/components/calendar-daily/calendar-daily.css +1 -1
- package/es/control/calendar/components/calendar-daily/calendar-daily.d.ts +2 -0
- package/es/control/calendar/components/calendar-daily/calendar-daily.mjs +66 -16
- package/es/control/calendar/components/calendar-daily/index.d.ts +2 -0
- package/es/control/calendar/components/calendar-daily/use-calendar-daily.d.ts +3 -1
- package/es/control/calendar/components/calendar-daily/use-calendar-daily.mjs +99 -44
- package/es/control/calendar/components/calendar-week/calendar-week.css +1 -1
- package/es/control/calendar/components/calendar-week/calendar-week.d.ts +6 -0
- package/es/control/calendar/components/calendar-week/calendar-week.mjs +74 -38
- package/es/control/calendar/components/calendar-week/index.d.ts +6 -0
- package/es/control/calendar/components/calendar-week/use-calendar-week.d.ts +12 -1
- package/es/control/calendar/components/calendar-week/use-calendar-week.mjs +313 -155
- package/es/control/calendar/components/constant/event.d.ts +1 -0
- package/es/control/calendar/components/constant/event.mjs +2 -1
- package/es/control/calendar/components/constant/index.mjs +1 -1
- package/es/control/calendar/components/custom-calendar/custom-calendar.css +1 -1
- package/es/control/calendar/components/custom-calendar/custom-calendar.d.ts +2 -0
- package/es/control/calendar/components/custom-calendar/custom-calendar.mjs +8 -10
- package/es/control/calendar/components/custom-calendar/index.d.ts +2 -0
- package/es/control/calendar/components/custom-calendar/use-custom-calendar.mjs +4 -0
- package/es/control/calendar/components/interface/calendar-daily.d.ts +1 -0
- package/es/control/calendar/components/interface/calendar-daily.mjs +6 -1
- package/es/control/calendar/components/interface/calendar-week.d.ts +1 -0
- package/es/control/calendar/components/interface/calendar-week.mjs +2 -1
- package/es/control/calendar/components/interface/common.d.ts +20 -18
- package/es/control/calendar/components/interface/custom-calendar.d.ts +1 -0
- package/es/control/calendar/components/interface/custom-calendar.mjs +3 -2
- package/es/control/calendar/components/util/index.mjs +1 -1
- package/es/control/calendar/components/util/util.d.ts +20 -1
- package/es/control/calendar/components/util/util.mjs +10 -2
- package/es/control/calendar/index.d.ts +2 -0
- package/es/control/data-view/data-view.css +1 -1
- package/es/control/data-view/data-view.mjs +42 -13
- package/es/control/drbar/drbar.controller.mjs +2 -0
- package/es/control/drbar/drbar.mjs +6 -6
- package/es/control/drtab/drtab.controller.mjs +2 -0
- package/es/control/drtab/drtab.mjs +6 -6
- package/es/control/drtab/flow-drtab.css +1 -1
- package/es/control/drtab/flow-drtab.mjs +3 -1
- package/es/control/form/edit-form/edit-form.mjs +11 -0
- package/es/control/form/form-detail/form-item/form-item.mjs +11 -7
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +4 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-multi-form/repeater-multi-form.mjs +1 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.d.ts +6 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.mjs +4 -0
- package/es/control/grid/virtualized-table/virtualized-table.css +1 -1
- package/es/control/grid/virtualized-table/virtualized-table.mjs +4 -3
- package/es/control/grid/virtualized-table/virtualized-table.util.mjs +4 -4
- package/es/control/kanban/kanban.css +1 -1
- package/es/control/kanban/kanban.mjs +22 -18
- package/es/control/kanban/swimlane-kanban/swimlane-kanban.css +1 -0
- package/es/control/kanban/{lane-kanban/lane-kanban.d.ts → swimlane-kanban/swimlane-kanban.d.ts} +3 -8
- package/es/control/kanban/{lane-kanban/lane-kanban.mjs → swimlane-kanban/swimlane-kanban.mjs} +42 -38
- package/es/control/list/list.css +1 -1
- package/es/control/list/list.mjs +14 -1
- package/es/control/map/map.mjs +1 -1
- package/es/control/medit-view-panel/index.d.ts +2 -0
- package/es/control/medit-view-panel/medit-view-panel.d.ts +2 -0
- package/es/control/medit-view-panel/medit-view-panel.mjs +19 -6
- package/es/control/search-bar/search-bar.mjs +1 -1
- package/es/editor/span/span/span.mjs +2 -1
- package/es/locale/en/index.d.ts +5 -0
- package/es/locale/en/index.mjs +6 -1
- package/es/locale/zh-CN/index.d.ts +5 -0
- package/es/locale/zh-CN/index.mjs +6 -1
- package/es/panel-component/app-extend-menu/extend-menu-base/common-extend-menu/common-extend-menu.mjs +20 -5
- package/es/panel-component/app-extend-menu/extend-menu-base/extend-button-menu/extend-button-menu.d.ts +1950 -1
- package/es/panel-component/app-extend-menu/extend-menu-base/extend-menu-base.util.d.ts +53 -6
- package/es/panel-component/app-extend-menu/extend-menu-base/extend-standard-menu/extend-standard-menu.css +1 -0
- package/es/panel-component/app-extend-menu/extend-menu-base/extend-standard-menu/extend-standard-menu.d.ts +2031 -0
- package/es/panel-component/app-extend-menu/extend-menu-base/extend-standard-menu/extend-standard-menu.mjs +278 -0
- package/es/view-engine/index.mjs +4 -0
- package/lib/common/carousel/carousel.css +1 -1
- package/lib/common/index.cjs +2 -0
- package/lib/common/kanben-setting/kanben-setting.cjs +67 -0
- package/lib/common/kanben-setting/kanben-setting.css +1 -0
- package/lib/common/map-chart/map-chart.cjs +5 -13
- package/lib/control/calendar/calendar-util.cjs +30 -0
- package/lib/control/calendar/calendar.cjs +104 -23
- package/lib/control/calendar/calendar.css +1 -1
- package/lib/control/calendar/components/calendar-daily/calendar-daily.cjs +64 -14
- package/lib/control/calendar/components/calendar-daily/calendar-daily.css +1 -1
- package/lib/control/calendar/components/calendar-daily/use-calendar-daily.cjs +98 -43
- package/lib/control/calendar/components/calendar-week/calendar-week.cjs +73 -37
- package/lib/control/calendar/components/calendar-week/calendar-week.css +1 -1
- package/lib/control/calendar/components/calendar-week/use-calendar-week.cjs +311 -153
- package/lib/control/calendar/components/constant/event.cjs +2 -0
- package/lib/control/calendar/components/constant/index.cjs +1 -0
- package/lib/control/calendar/components/custom-calendar/custom-calendar.cjs +8 -10
- package/lib/control/calendar/components/custom-calendar/custom-calendar.css +1 -1
- package/lib/control/calendar/components/custom-calendar/use-custom-calendar.cjs +4 -0
- package/lib/control/calendar/components/interface/calendar-daily.cjs +6 -1
- package/lib/control/calendar/components/interface/calendar-week.cjs +2 -1
- package/lib/control/calendar/components/interface/custom-calendar.cjs +2 -1
- package/lib/control/calendar/components/util/index.cjs +2 -0
- package/lib/control/calendar/components/util/util.cjs +11 -1
- package/lib/control/data-view/data-view.cjs +42 -13
- package/lib/control/data-view/data-view.css +1 -1
- package/lib/control/drbar/drbar.cjs +6 -6
- package/lib/control/drbar/drbar.controller.cjs +2 -0
- package/lib/control/drtab/drtab.cjs +6 -6
- package/lib/control/drtab/drtab.controller.cjs +2 -0
- package/lib/control/drtab/flow-drtab.cjs +3 -1
- package/lib/control/drtab/flow-drtab.css +1 -1
- package/lib/control/form/edit-form/edit-form.cjs +11 -0
- package/lib/control/form/form-detail/form-item/form-item.cjs +11 -7
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +4 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-multi-form/repeater-multi-form.cjs +1 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.cjs +4 -0
- package/lib/control/grid/virtualized-table/virtualized-table.cjs +3 -2
- package/lib/control/grid/virtualized-table/virtualized-table.css +1 -1
- package/lib/control/grid/virtualized-table/virtualized-table.util.cjs +4 -4
- package/lib/control/kanban/kanban.cjs +21 -17
- package/lib/control/kanban/kanban.css +1 -1
- package/lib/control/kanban/{lane-kanban/lane-kanban.cjs → swimlane-kanban/swimlane-kanban.cjs} +42 -38
- package/lib/control/kanban/swimlane-kanban/swimlane-kanban.css +1 -0
- package/lib/control/list/list.cjs +14 -1
- package/lib/control/list/list.css +1 -1
- package/lib/control/map/map.cjs +1 -1
- package/lib/control/medit-view-panel/medit-view-panel.cjs +19 -6
- package/lib/control/search-bar/search-bar.cjs +1 -1
- package/lib/editor/span/span/span.cjs +2 -1
- package/lib/locale/en/index.cjs +6 -1
- package/lib/locale/zh-CN/index.cjs +6 -1
- package/lib/panel-component/app-extend-menu/extend-menu-base/common-extend-menu/common-extend-menu.cjs +20 -5
- package/lib/panel-component/app-extend-menu/extend-menu-base/extend-standard-menu/extend-standard-menu.cjs +280 -0
- package/lib/panel-component/app-extend-menu/extend-menu-base/extend-standard-menu/extend-standard-menu.css +1 -0
- package/lib/view-engine/index.cjs +4 -0
- package/package.json +4 -4
- package/dist/index-1fHusiqt.js +0 -4
- package/dist/index-EYFbyMUF.js +0 -1
- package/dist/index-kNUznzXY.js +0 -1
- package/dist/map-chart-HL7emT5a.js +0 -1
- package/es/control/kanban/lane-kanban/lane-kanban.css +0 -1
- package/lib/control/kanban/lane-kanban/lane-kanban.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control-calendar{--ibiz-control-calendar-text-color:var(--ibiz-color-text-0);--ibiz-control-calendar-hover-bg-color:var(--ibiz-color-fill-0);--ibiz-control-calendar-active-bg-color:var(--ibiz-color-fill-0);--ibiz-control-calendar-border-color:var(--ibiz-color-primary-active);--ibiz-control-calendar-font-size:var(--ibiz-font-size-small);--ibiz-control-calendar-item-padding:var(--ibiz-spacing-tight);--ibiz-control-calendar-border-radius:var(--ibiz-border-radius-small);--ibiz-control-calendar-margin:var(--ibiz-spacing-extra-tight);position:relative;width:100%;height:100%}.ibiz-control-calendar__nav-icon{position:absolute;top:18px;right:0;color:var(--ibiz-color-primary);cursor:pointer}.ibiz-control-calendar__calendar-item{display:flex;align-items:center;padding:var(--ibiz-control-calendar-item-padding)}.ibiz-control-calendar__icon{width:var(--ibiz-width-icon-small);height:var(--ibiz-width-icon-small);margin-right:var(--ibiz-spacing-base-tight);border-radius:var(--ibiz-border-radius-circle)}.ibiz-control-calendar-content{display:flex;flex-direction:column;width:100%;height:100%}.ibiz-control-calendar-content .el-calendar{display:flex;flex-direction:column;height:100%}.ibiz-control-calendar-content .el-calendar__header{flex-wrap:
|
|
1
|
+
.ibiz-control-calendar{--ibiz-control-calendar-text-color:var(--ibiz-color-text-0);--ibiz-control-calendar-hover-bg-color:var(--ibiz-color-fill-0);--ibiz-control-calendar-active-bg-color:var(--ibiz-color-fill-0);--ibiz-control-calendar-border-color:var(--ibiz-color-primary-active);--ibiz-control-calendar-font-size:var(--ibiz-font-size-small);--ibiz-control-calendar-item-padding:var(--ibiz-spacing-tight);--ibiz-control-calendar-border-radius:var(--ibiz-border-radius-small);--ibiz-control-calendar-margin:var(--ibiz-spacing-extra-tight);position:relative;width:100%;height:100%}.ibiz-control-calendar__nav-icon{position:absolute;top:18px;right:0;color:var(--ibiz-color-primary);cursor:pointer}.ibiz-control-calendar__calendar-item{display:flex;align-items:center;padding:var(--ibiz-control-calendar-item-padding)}.ibiz-control-calendar__icon{width:var(--ibiz-width-icon-small);height:var(--ibiz-width-icon-small);margin-right:var(--ibiz-spacing-base-tight);border-radius:var(--ibiz-border-radius-circle)}.ibiz-control-calendar-content{display:flex;flex-direction:column;width:100%;height:100%}.ibiz-control-calendar-content .el-calendar{display:flex;flex-direction:column;height:100%}.ibiz-control-calendar-content .el-calendar__header{flex-wrap:nowrap}.ibiz-control-calendar-content .el-calendar-table,.ibiz-control-calendar-content .el-calendar-table .el-calendar-day{width:100%;height:100%;min-height:90px;cursor:pointer}.ibiz-control-calendar-content .el-calendar-table{flex:1;width:-moz-fit-content;width:fit-content}.ibiz-control-calendar-content .el-calendar-table .el-calendar-day:hover{cursor:pointer;background-color:var(--el-calendar-selected-bg-color)}.ibiz-control-calendar-content .el-calendar__body{display:flex;flex:1;padding:0;overflow:auto}.ibiz-control-calendar-content.is-show-date-range .el-calendar-day{padding:var(--ibiz-spacing-tight) 0}.ibiz-control-calendar-content.is-show-date-range .ibiz-control-calendar-item{width:calc(100% + 1px);min-height:34px;border-radius:0}.ibiz-control-calendar-content.is-show-date-range .ibiz-control-calendar-item.is-begin-time{width:100%;margin-left:var(--ibiz-spacing-super-tight);border-radius:var(--ibiz-spacing-extra-tight) 0 0 var(--ibiz-spacing-extra-tight)}.ibiz-control-calendar-content.is-show-date-range .ibiz-control-calendar-item.is-begin-time.is-end-time{width:calc(100% - var(--ibiz-spacing-super-tight) * 2);border-radius:var(--ibiz-spacing-extra-tight)}.ibiz-control-calendar-content.is-show-date-range .ibiz-control-calendar-item.is-end-time{width:calc(100% - var(--ibiz-spacing-super-tight));border-radius:0 var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-extra-tight) 0}.ibiz-control-calendar-content.is-show-date-range .ibiz-control-calendar-item.is-active{border-right:none;border-left:none}.ibiz-control-calendar-content.is-show-date-range .ibiz-control-calendar-item.is-active.is-begin-time{border-left:solid .5px var(--ibiz-control-calendar-item-active-border-color,var(--ibiz-control-calendar-border-color))}.ibiz-control-calendar-content.is-show-date-range .ibiz-control-calendar-item.is-active.is-end-time{border-right:solid .5px var(--ibiz-control-calendar-item-active-border-color,var(--ibiz-control-calendar-border-color))}.ibiz-control-calendar-content.is-show-date-range .ibiz-control-calendar-item.is-hidden{position:relative;z-index:-1;opacity:0}.ibiz-control-calendar-content.is-show-date-range .ibiz-control-calendar-item.is-no-begin-time,.ibiz-control-calendar-content.is-show-date-range .ibiz-control-calendar-item.is-no-end-time{width:calc(100% - var(--ibiz-spacing-super-tight) * 2);margin-left:var(--ibiz-spacing-super-tight);border-radius:var(--ibiz-spacing-extra-tight)}.ibiz-control-calendar-more{width:100%;font-size:var(--ibiz-font-size-small);border-radius:var(--ibiz-spacing-extra-tight)}.ibiz-control-calendar-more:hover{background-color:var(--ibiz-control-calendar-hover-bg-color)}.ibiz-control-calendar-item{--ibiz-control-calendar-text-color:var(--ibiz-color-text-0);--ibiz-control-calendar-hover-bg-color:var(--ibiz-color-fill-0);--ibiz-control-calendar-active-bg-color:var(--ibiz-color-fill-0);--ibiz-control-calendar-border-color:var(--ibiz-color-primary-active);--ibiz-control-calendar-font-size:var(--ibiz-font-size-small);--ibiz-control-calendar-item-padding:var(--ibiz-spacing-tight);--ibiz-control-calendar-border-radius:var(--ibiz-border-radius-small);--ibiz-control-calendar-margin:var(--ibiz-spacing-extra-tight);--ibiz-control-calendar-item-color:none;--ibiz-color-text-2:var(--ibiz-control-calendar-item-color);--ibiz-editor-default-text-color:var(--ibiz-control-calendar-item-color);height:100%;padding:var(--ibiz-control-calendar-item-padding);margin-bottom:var(--ibiz-control-calendar-margin);overflow:hidden;font-size:var(--ibiz-control-calendar-font-size);color:var(--ibiz-control-calendar-text-color);text-overflow:ellipsis;white-space:nowrap;cursor:pointer;border:solid .5px transparent;border-radius:var(--ibiz-control-calendar-border-radius)}.ibiz-control-calendar-item:hover{background-color:var(--ibiz-control-calendar-hover-bg-color)}.ibiz-control-calendar-item.is-active{background-color:var(--ibiz-control-calendar-active-bg-color);border:solid .5px var(--ibiz-control-calendar-item-active-border-color,var(--ibiz-control-calendar-border-color))}.ibiz-control-calendar-date-text{--ibiz-control-calendar-text-color:var(--ibiz-color-text-0);--ibiz-control-calendar-hover-bg-color:var(--ibiz-color-fill-0);--ibiz-control-calendar-active-bg-color:var(--ibiz-color-fill-0);--ibiz-control-calendar-border-color:var(--ibiz-color-primary-active);--ibiz-control-calendar-font-size:var(--ibiz-font-size-small);--ibiz-control-calendar-item-padding:var(--ibiz-spacing-tight);--ibiz-control-calendar-border-radius:var(--ibiz-border-radius-small);--ibiz-control-calendar-margin:var(--ibiz-spacing-extra-tight);padding-bottom:var(--ibiz-control-calendar-item-padding);margin:0;text-align:center}.ibiz-control-calendar-day{height:-moz-fit-content;height:fit-content}.ibiz-control-calendar-content-title{line-height:var(--ibiz-editor-default-line-height);white-space:nowrap}.ibiz-control-calendar-content-header{--ibiz-control-calendar-text-color:var(--ibiz-color-text-0);--ibiz-control-calendar-hover-bg-color:var(--ibiz-color-fill-0);--ibiz-control-calendar-active-bg-color:var(--ibiz-color-fill-0);--ibiz-control-calendar-border-color:var(--ibiz-color-primary-active);--ibiz-control-calendar-font-size:var(--ibiz-font-size-small);--ibiz-control-calendar-item-padding:var(--ibiz-spacing-tight);--ibiz-control-calendar-border-radius:var(--ibiz-border-radius-small);--ibiz-control-calendar-margin:var(--ibiz-spacing-extra-tight);display:flex;align-items:center}.ibiz-control-calendar-content-header>*+*{margin-left:var(--ibiz-control-calendar-item-padding)}.ibiz-control-calendar-content-header .el-button-group{display:flex}.ibiz-control-calendar-legend{display:flex;justify-content:center;width:100%}.ibiz-control-calendar-legend__item{display:flex;align-items:center;padding:0 var(--ibiz-spacing-tight);line-height:1em;cursor:pointer}.ibiz-control-calendar-legend__item--tip{display:inline-block;width:1.5em;height:.9em;margin-right:var(--ibiz-spacing-extra-tight);border-radius:var(--ibiz-border-radius-extra-small)}.ibiz-control-calendar-legend__item--text{display:inline-block;width:auto;max-width:100px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.ibiz-control-calendar-timeline-content{height:100%;overflow:auto}.ibiz-control-calendar-timeline-content .el-timeline{padding-left:0}
|
|
@@ -29,11 +29,13 @@ const CalendarDaily = /* @__PURE__ */ vue.defineComponent({
|
|
|
29
29
|
curTimeTimer,
|
|
30
30
|
calendarDaily,
|
|
31
31
|
selectedData,
|
|
32
|
-
|
|
32
|
+
handleEventClick,
|
|
33
|
+
handleEventDblClick,
|
|
33
34
|
handleDrag,
|
|
34
35
|
handleDragStart,
|
|
35
36
|
handleCurTime,
|
|
36
|
-
initDrawData
|
|
37
|
+
initDrawData,
|
|
38
|
+
eventContextmenu
|
|
37
39
|
} = useCalendarDaily.useCalendarDaily(props, emit);
|
|
38
40
|
vue.watch(() => props.selectedData, () => {
|
|
39
41
|
if (props.selectedData && props.selectedData.length > 0) {
|
|
@@ -60,19 +62,31 @@ const CalendarDaily = /* @__PURE__ */ vue.defineComponent({
|
|
|
60
62
|
});
|
|
61
63
|
const renderEventItem = (location, eventBoxStyle, eventContentStyle, event, index, slotNme, classEName) => {
|
|
62
64
|
var _a;
|
|
65
|
+
let title = "".concat(event.text || "");
|
|
66
|
+
if (location === "header" && event.timeRange)
|
|
67
|
+
title = "".concat(title, " ").concat(event.timeRange || "");
|
|
68
|
+
title = core.showTitle(title) || "";
|
|
69
|
+
if (props.showDetail)
|
|
70
|
+
title = "";
|
|
63
71
|
return vue.createVNode("div", {
|
|
64
72
|
"key": index,
|
|
65
73
|
"class": [ns.em(classEName, "event-box")],
|
|
66
74
|
"style": eventBoxStyle
|
|
67
75
|
}, [vue.createVNode("button", {
|
|
68
76
|
"class": [ns.em(classEName, "event-content"), event.isSelectedEvent ? "is-selected-event" : "", event.classname],
|
|
69
|
-
"onClick": () =>
|
|
70
|
-
|
|
77
|
+
"onClick": () => {
|
|
78
|
+
handleEventClick(event, "head");
|
|
79
|
+
},
|
|
80
|
+
"onDblclick": () => {
|
|
81
|
+
handleEventDblClick(event, "head");
|
|
82
|
+
},
|
|
83
|
+
"onContextmenu": (e) => eventContextmenu(event, e),
|
|
84
|
+
"style": eventContentStyle,
|
|
85
|
+
"title": title
|
|
71
86
|
}, [slots[slotNme] ? (_a = slots[slotNme]) == null ? void 0 : _a.call(slots, {
|
|
72
87
|
data: event
|
|
73
88
|
}) : vue.createVNode("div", {
|
|
74
|
-
"class": [ns.em(classEName, "event-summary"), event.classname]
|
|
75
|
-
"title": core.showTitle("".concat(event.text || "", " ").concat(event.timeRange || ""))
|
|
89
|
+
"class": [ns.em(classEName, "event-summary"), event.classname]
|
|
76
90
|
}, [event.icon && vue.createVNode("span", {
|
|
77
91
|
"class": [event.icon, ns.em(classEName, "event-icon")],
|
|
78
92
|
"style": {
|
|
@@ -84,6 +98,41 @@ const CalendarDaily = /* @__PURE__ */ vue.defineComponent({
|
|
|
84
98
|
"class": ["fa fa-check", ns.em(classEName, "check")]
|
|
85
99
|
}, null) : ""])]);
|
|
86
100
|
};
|
|
101
|
+
const renderPopover = (content, event, placement) => {
|
|
102
|
+
if (!props.showDetail) {
|
|
103
|
+
return content;
|
|
104
|
+
}
|
|
105
|
+
const _tempEvent = {
|
|
106
|
+
...event,
|
|
107
|
+
color: "",
|
|
108
|
+
bkColor: ""
|
|
109
|
+
};
|
|
110
|
+
return vue.createVNode(vue.resolveComponent("el-popover"), {
|
|
111
|
+
"show-after": 100,
|
|
112
|
+
"offset": 4,
|
|
113
|
+
"width": "auto",
|
|
114
|
+
"popper-class": [ns.e("event-popover")],
|
|
115
|
+
"placement": placement || "right-start"
|
|
116
|
+
}, {
|
|
117
|
+
reference: () => content,
|
|
118
|
+
default: () => {
|
|
119
|
+
var _a;
|
|
120
|
+
return vue.createVNode("div", {
|
|
121
|
+
"class": [ns.em("event-popover", "body")]
|
|
122
|
+
}, [vue.createVNode("div", {
|
|
123
|
+
"class": [ns.em("event-popover", "close")],
|
|
124
|
+
"onClick": (el) => util.handlePopClose(el),
|
|
125
|
+
"innerHTML": util.closeIcon
|
|
126
|
+
}, null), vue.createVNode("div", {
|
|
127
|
+
"class": [ns.em("event-popover", "scroll")]
|
|
128
|
+
}, [(slots == null ? void 0 : slots.event) ? (_a = slots.event) == null ? void 0 : _a.call(slots, {
|
|
129
|
+
data: _tempEvent
|
|
130
|
+
}) : vue.createVNode("div", {
|
|
131
|
+
"class": [ns.em("event-popover", "content")]
|
|
132
|
+
}, ["".concat(event.text || "", " ").concat(event.timeRange || "")])])]);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
};
|
|
87
136
|
const renderHeader = () => {
|
|
88
137
|
return vue.createVNode("div", {
|
|
89
138
|
"class": [ns.e("calendar-daily__head")],
|
|
@@ -98,14 +147,16 @@ const CalendarDaily = /* @__PURE__ */ vue.defineComponent({
|
|
|
98
147
|
"class": ns.em("allday-info", "work-items-scroll")
|
|
99
148
|
}, [vue.createVNode("div", {
|
|
100
149
|
"class": ns.em("allday-info", "work-items-body")
|
|
101
|
-
}, [events.value.map((event, index) => {
|
|
150
|
+
}, [events.value.length > 0 ? events.value.map((event, index) => {
|
|
102
151
|
const eventBoxStyle = {};
|
|
103
152
|
const eventContentStyle = {
|
|
104
|
-
color: event.color,
|
|
105
153
|
background: event.bkColorFade
|
|
106
154
|
};
|
|
107
|
-
|
|
108
|
-
|
|
155
|
+
const tempContent = renderEventItem("header", eventBoxStyle, eventContentStyle, event, index, "head-event", "allday-info");
|
|
156
|
+
return renderPopover(tempContent, event, "bottom");
|
|
157
|
+
}) : vue.createVNode(vue.resolveComponent("iBizNoData"), {
|
|
158
|
+
"hideNoDataImage": true
|
|
159
|
+
}, null)])])]), vue.createVNode("div", {
|
|
109
160
|
"class": ns.e("resizable-handle"),
|
|
110
161
|
"draggable": "true",
|
|
111
162
|
"onDrag": (event) => handleDrag(event),
|
|
@@ -148,11 +199,10 @@ const CalendarDaily = /* @__PURE__ */ vue.defineComponent({
|
|
|
148
199
|
}
|
|
149
200
|
const eventContentStyle = {
|
|
150
201
|
background: event.bkColorFade,
|
|
151
|
-
"border-left": "3px solid ".concat(event.bkColor)
|
|
152
|
-
color: event.color
|
|
202
|
+
"border-left": "3px solid ".concat(event.bkColor)
|
|
153
203
|
};
|
|
154
|
-
const tempContent = renderEventItem("content", eventBoxStyle, eventContentStyle, event, index, "
|
|
155
|
-
return tempContent;
|
|
204
|
+
const tempContent = renderEventItem("content", eventBoxStyle, eventContentStyle, event, index, "", "time-pane");
|
|
205
|
+
return renderPopover(tempContent, event);
|
|
156
206
|
})])])]), util.isToday(props == null ? void 0 : props.selectedDay, /* @__PURE__ */ new Date()) ? vue.createVNode("div", {
|
|
157
207
|
"class": ns.em("time-pane", "current-time"),
|
|
158
208
|
"style": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-calendar-daily{width:100%;height:100%;flex:1;display:flex;flex-direction:column;overflow:hidden}.ibiz-calendar-daily__calendar-daily__head{width:100%;height:58px;min-height:58px;padding-bottom:0;display:flex;position:relative;z-index:100}.ibiz-calendar-daily__allday-info{min-width:90px;height:100%;padding-left:40px;color
|
|
1
|
+
.ibiz-calendar-daily{width:100%;height:100%;flex:1;display:flex;flex-direction:column;overflow:hidden}.ibiz-calendar-daily__calendar-daily__head{width:100%;height:58px;min-height:58px;padding-bottom:0;display:flex;position:relative;z-index:100}.ibiz-calendar-daily__allday-info{min-width:90px;height:100%;padding-left:40px;color:var(--ibiz-color-text-3);overflow:hidden;display:flex;align-items:center}.ibiz-calendar-daily__allday-info--work-items{width:100%;height:100%;padding-top:5px;overflow:hidden}.ibiz-calendar-daily__allday-info--work-items-scroll{height:100%;overflow-y:scroll;overflow-x:hidden}.ibiz-calendar-daily__allday-info--work-items-body{height:auto}.ibiz-calendar-daily__allday-info--work-items-body:has(.ibiz-no-data){height:100%}.ibiz-calendar-daily__allday-info--work-items-body:has(.ibiz-no-data) .ibiz-no-data{min-height:100%;min-width:100%}.ibiz-calendar-daily__allday-info--work-items-body:has(.ibiz-no-data) .ibiz-no-data .el-empty__description{margin:0}.ibiz-calendar-daily__allday-info--event-box{width:100%;height:22px;line-height:22px;padding:0 8px;margin-top:4px}.ibiz-calendar-daily__allday-info--event-box:nth-child(1){margin-top:0}.ibiz-calendar-daily__allday-info--event-content{display:block;width:100%;height:100%;border:none;outline:0;text-align:left;border-radius:4px;background:var(--ibiz-color-tertiary-light-hover);border-radius:4px;position:relative;cursor:pointer}.ibiz-calendar-daily__allday-info--event-content.is-selected-event{padding-right:20px}.ibiz-calendar-daily__allday-info--event-summary{width:100%;height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-calendar-daily__allday-info--event-icon{margin-right:6px}.ibiz-calendar-daily__allday-info--event-name{margin-right:6px}.ibiz-calendar-daily__allday-info--time-range{margin-right:6px}.ibiz-calendar-daily__allday-info--check{color:var(--ibiz-color-primary);position:absolute;right:6px;top:50%;transform:translate(0,-50%)}.ibiz-calendar-daily__allday-resize-line{width:100%;height:3px;background-color:var(--ibiz-color-border)}.ibiz-calendar-daily__resizable-handle{width:100%;height:10px;position:absolute;bottom:-4px;display:flex;align-items:center;cursor:row-resize}.ibiz-calendar-daily__scroll-area{flex:1;overflow-y:scroll;overflow-x:hidden}.ibiz-calendar-daily__time-pane{height:auto;width:calc(100% - 5px);display:flex;flex-basis:0%;flex-grow:1;flex-shrink:1;position:relative}.ibiz-calendar-daily__time-pane--time-labels{width:90px;min-width:90px;padding:27px 0 27px 40px;border-right:1px solid var(--ibiz-color-border);position:sticky;left:0}.ibiz-calendar-daily__time-pane--time-label{margin-top:38px;height:22px;text-align:left}.ibiz-calendar-daily__time-pane--time-label:nth-child(1){height:22px;margin-top:22px}.ibiz-calendar-daily__time-pane--time-columns{position:relative;flex:1;padding-bottom:59px}.ibiz-calendar-daily__time-pane--time-column{height:60px;border-top:1px dashed var(--ibiz-color-border)}.ibiz-calendar-daily__time-pane--time-column:first-child{border-top:none}.ibiz-calendar-daily__time-pane--time-column-last{border-bottom:1px dashed var(--ibiz-color-border)}.ibiz-calendar-daily__time-pane--event-timed-container{position:absolute;top:0;width:100%;height:100%;overflow:hidden}.ibiz-calendar-daily__time-pane--container-scroll{position:relative;top:0;overflow:auto;height:100%;width:auto;overflow-y:hidden;overflow-x:auto}.ibiz-calendar-daily__time-pane--event-box{position:absolute;width:auto;height:auto;padding-left:4px}.ibiz-calendar-daily__time-pane--event-content{position:relative;z-index:3;width:100%;height:100%;min-height:22px;padding:8px;overflow:hidden;line-height:100%;text-align:left;cursor:pointer;border:none;outline:0}.ibiz-calendar-daily__time-pane--event-content.is-selected-event{border:1px solid var(--ibiz-color-primary)}.ibiz-calendar-daily__time-pane--event-summary{width:100%;height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-calendar-daily__time-pane--event-summary>span{margin-right:4px}.ibiz-calendar-daily__time-pane--current-time{width:calc(100% - 36px);margin-left:40px;position:absolute;top:38px;left:-3px;height:2px;background-color:var(--ibiz-color-primary);display:flex;align-items:center}.ibiz-calendar-daily__time-pane--current-time-label{width:48px;min-width:48px;max-width:18px;height:24px;text-align:center;line-height:24px;border:none;border-radius:4px;background:var(--ibiz-color-primary);color:var(--ibiz-color-primary-text)}.ibiz-calendar-daily__event-popover{position:relative;width:auto;height:auto;padding:0}.ibiz-calendar-daily__event-popover.el-popover.el-popper{padding:8px}.ibiz-calendar-daily__event-popover:has(.ibiz-control-calendar-item-default){display:none!important}.ibiz-calendar-daily__event-popover--body{width:auto;height:auto;overflow:hidden}.ibiz-calendar-daily__event-popover--scroll{width:auto;min-width:200px;height:auto;max-height:80%;overflow:auto;pointer-events:none}.ibiz-calendar-daily__event-popover--scroll .ibiz-control-calendar-item:last-child{margin-bottom:0}.ibiz-calendar-daily__event-popover--scroll .ibiz-control-calendar-item.is-active{background-color:transparent;border-color:transparent}.ibiz-calendar-daily__event-popover--close{position:absolute;top:8px;right:8px;display:none;cursor:pointer}.ibiz-calendar-daily__event-popover--close:hover .el-icon{background:var(--ibiz-color-primary);border-radius:50%}.ibiz-calendar-daily__event-popover--close:hover .el-icon svg{fill:var(--ibiz-color-white)}.ibiz-calendar-daily__event-popover .el-icon{display:flex;align-items:center;justify-content:center;min-width:24px;min-height:24px;font-size:20px}.ibiz-calendar-daily__event-popover .el-icon svg{fill:var(--el-text-color-secondary)}
|
|
@@ -26,7 +26,8 @@ const useCalendarDaily = (props, emit) => {
|
|
|
26
26
|
};
|
|
27
27
|
const handleDrag = (event) => {
|
|
28
28
|
const heightChange = event.clientY - initialMouseY + initialHeight;
|
|
29
|
-
|
|
29
|
+
if (heightChange < 320)
|
|
30
|
+
resizableHand.value.style.height = "".concat(heightChange, "px");
|
|
30
31
|
};
|
|
31
32
|
const events = vue.computed(() => {
|
|
32
33
|
return computeUIEvents(
|
|
@@ -36,14 +37,17 @@ const useCalendarDaily = (props, emit) => {
|
|
|
36
37
|
calendarDaily.value
|
|
37
38
|
);
|
|
38
39
|
});
|
|
39
|
-
const computeUIEvents = (
|
|
40
|
+
const computeUIEvents = (_events, curDate, _legends, _calendarDaily) => {
|
|
40
41
|
const tempEvents = [];
|
|
41
42
|
const tempColors = /* @__PURE__ */ new Map();
|
|
42
43
|
let contentWidth = 0;
|
|
43
|
-
if (
|
|
44
|
-
contentWidth = parseInt(
|
|
44
|
+
if (_calendarDaily) {
|
|
45
|
+
contentWidth = parseInt(
|
|
46
|
+
window.getComputedStyle(_calendarDaily).width,
|
|
47
|
+
10
|
|
48
|
+
);
|
|
45
49
|
}
|
|
46
|
-
|
|
50
|
+
_events.sort((a, b) => {
|
|
47
51
|
const beginTimeDifference = new Date(a.beginTime).getTime() - new Date(b.beginTime).getTime();
|
|
48
52
|
let type;
|
|
49
53
|
if (beginTimeDifference === 0) {
|
|
@@ -53,18 +57,33 @@ const useCalendarDaily = (props, emit) => {
|
|
|
53
57
|
}
|
|
54
58
|
return type;
|
|
55
59
|
});
|
|
56
|
-
const tempArray =
|
|
57
|
-
|
|
60
|
+
const tempArray = [];
|
|
61
|
+
_events.forEach((event) => {
|
|
62
|
+
const targetLegend = _legends.find(
|
|
63
|
+
(legendItem) => Object.is(legendItem.id, event.itemType)
|
|
64
|
+
);
|
|
65
|
+
if (!targetLegend || !targetLegend.isShow)
|
|
66
|
+
return;
|
|
67
|
+
if (event && event.beginTime && util.checkDateRangeIncludes(event.beginTime, event.endTime, curDate)) {
|
|
68
|
+
const item = { ...event, targetLegend };
|
|
69
|
+
const targetEvent = selectedData.value.find(
|
|
70
|
+
(tempItem) => tempItem.id === event.id
|
|
71
|
+
);
|
|
72
|
+
if (targetEvent) {
|
|
73
|
+
Object.assign(item, { isSelectedEvent: true });
|
|
74
|
+
} else {
|
|
75
|
+
Object.assign(item, { isSelectedEvent: false });
|
|
76
|
+
}
|
|
77
|
+
if (!event.endTime && event.beginTime) {
|
|
78
|
+
Object.assign(item, { endTime: event.beginTime });
|
|
79
|
+
}
|
|
80
|
+
tempArray.push(item);
|
|
81
|
+
}
|
|
58
82
|
});
|
|
59
83
|
tempArray.forEach((event, index) => {
|
|
84
|
+
const { targetLegend } = event;
|
|
60
85
|
const tempItem = {};
|
|
61
86
|
Object.assign(tempItem, event);
|
|
62
|
-
const targetLegend = legends2.find(
|
|
63
|
-
(legendItem) => Object.is(legendItem.id, event.itemType)
|
|
64
|
-
);
|
|
65
|
-
const targetEvent = selectedData.value.find(
|
|
66
|
-
(item) => item.id === event.id
|
|
67
|
-
);
|
|
68
87
|
Object.assign(tempItem, { zIndex: index + 1 });
|
|
69
88
|
const length = tempArray.length;
|
|
70
89
|
const itemWidth = (contentWidth - 90) / length;
|
|
@@ -76,25 +95,40 @@ const useCalendarDaily = (props, emit) => {
|
|
|
76
95
|
styleLeft = "".concat(index * 100, "px");
|
|
77
96
|
}
|
|
78
97
|
Object.assign(tempItem, { width, styleLeft });
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
98
|
+
let height = "auto";
|
|
99
|
+
let styleTop = 60;
|
|
100
|
+
const timeRange = util.handleTimeRange(
|
|
101
|
+
event.beginTime,
|
|
102
|
+
event.endTime,
|
|
103
|
+
"YYYY-MM-DD HH:mm:ss"
|
|
104
|
+
);
|
|
105
|
+
if (util.isToday(event.beginTime, event.endTime)) {
|
|
106
|
+
height = getEventHeight(event.beginTime, event.endTime);
|
|
107
|
+
const tempVal = handleTopOrCurVal(new Date(event.beginTime));
|
|
108
|
+
styleTop = tempVal.styleTop;
|
|
109
|
+
} else if (util.isToday(event.beginTime, curDate) && !util.isToday(event.endTime, curDate)) {
|
|
110
|
+
const endDate = new Date(curDate);
|
|
111
|
+
endDate.setHours(23, 59, 59, 0);
|
|
112
|
+
height = getEventHeight(event.beginTime, endDate);
|
|
113
|
+
const tempVal = handleTopOrCurVal(new Date(event.beginTime));
|
|
114
|
+
styleTop = tempVal.styleTop;
|
|
115
|
+
} else if (util.isToday(event.endTime, curDate) && !util.isToday(event.beginTime, curDate)) {
|
|
116
|
+
const beginDate = new Date(curDate);
|
|
117
|
+
beginDate.setHours(0, 0, 0, 0);
|
|
118
|
+
height = getEventHeight(beginDate, event.endTime);
|
|
119
|
+
const tempVal = handleTopOrCurVal(new Date(beginDate));
|
|
120
|
+
styleTop = tempVal.styleTop;
|
|
121
|
+
} else {
|
|
122
|
+
const date = new Date(curDate);
|
|
123
|
+
const beginDate = new Date(date.setHours(0, 0, 0, 0));
|
|
124
|
+
const endDate = new Date(date.setHours(23, 59, 59, 59));
|
|
125
|
+
height = getEventHeight(beginDate, endDate);
|
|
126
|
+
const tempVal = handleTopOrCurVal(new Date(beginDate));
|
|
127
|
+
styleTop = tempVal.styleTop;
|
|
95
128
|
}
|
|
129
|
+
Object.assign(tempItem, { height, styleTop, timeRange });
|
|
96
130
|
if (!(event == null ? void 0 : event.bkColor)) {
|
|
97
|
-
const bkColor = targetLegend
|
|
131
|
+
const bkColor = targetLegend && targetLegend.bkcolor || util.handleBkColor(tempColors, event.itemType);
|
|
98
132
|
Object.assign(tempItem, { bkColor });
|
|
99
133
|
}
|
|
100
134
|
if (tempItem.bkColor) {
|
|
@@ -103,27 +137,26 @@ const useCalendarDaily = (props, emit) => {
|
|
|
103
137
|
bkColorFade: tempBkColor
|
|
104
138
|
});
|
|
105
139
|
}
|
|
140
|
+
if (!(event == null ? void 0 : event.color)) {
|
|
141
|
+
const tempColor = targetLegend && targetLegend.color;
|
|
142
|
+
Object.assign(tempItem, {
|
|
143
|
+
color: tempColor
|
|
144
|
+
});
|
|
145
|
+
}
|
|
106
146
|
if ((tempItem == null ? void 0 : tempItem.height) && (tempItem == null ? void 0 : tempItem.height) > 10) {
|
|
107
147
|
const border = "1px solid #FFF";
|
|
108
148
|
Object.assign(tempItem, { border });
|
|
109
149
|
} else {
|
|
110
150
|
Object.assign(tempItem, { border: "none" });
|
|
111
151
|
}
|
|
112
|
-
|
|
113
|
-
Object.assign(tempItem, { isSelectedEvent: true });
|
|
114
|
-
} else {
|
|
115
|
-
Object.assign(tempItem, { isSelectedEvent: false });
|
|
116
|
-
}
|
|
117
|
-
if (targetLegend && targetLegend.isShow || !targetLegend) {
|
|
118
|
-
tempEvents.push(tempItem);
|
|
119
|
-
}
|
|
152
|
+
tempEvents.push(tempItem);
|
|
120
153
|
});
|
|
121
154
|
tempColors.clear();
|
|
122
155
|
return tempEvents;
|
|
123
156
|
};
|
|
124
|
-
const
|
|
157
|
+
const getEventHeight = (startTime, endTime) => {
|
|
125
158
|
let height = 1;
|
|
126
|
-
if (util.isToday(startTime,
|
|
159
|
+
if (util.isToday(startTime, endTime)) {
|
|
127
160
|
const difference = new Date(endTime).getTime() - new Date(startTime).getTime();
|
|
128
161
|
height = Math.floor(difference / (1e3 * 60));
|
|
129
162
|
}
|
|
@@ -163,8 +196,25 @@ const useCalendarDaily = (props, emit) => {
|
|
|
163
196
|
}
|
|
164
197
|
return tempDrawData;
|
|
165
198
|
};
|
|
166
|
-
const
|
|
167
|
-
const res =
|
|
199
|
+
const handleEventClick = (item, location) => {
|
|
200
|
+
const res = util.handleEmit(
|
|
201
|
+
"eventClick",
|
|
202
|
+
item,
|
|
203
|
+
location,
|
|
204
|
+
props.events,
|
|
205
|
+
multiple.value,
|
|
206
|
+
selectedData.value,
|
|
207
|
+
emit
|
|
208
|
+
);
|
|
209
|
+
const { tempSelectedData, isSelectedEvent } = res;
|
|
210
|
+
if (!isSelectedEvent) {
|
|
211
|
+
Object.assign(item, { isSelectedEvent });
|
|
212
|
+
}
|
|
213
|
+
selectedData.value = tempSelectedData;
|
|
214
|
+
};
|
|
215
|
+
const handleEventDblClick = (item, location) => {
|
|
216
|
+
const res = util.handleEmit(
|
|
217
|
+
"eventDblClick",
|
|
168
218
|
item,
|
|
169
219
|
location,
|
|
170
220
|
props.events,
|
|
@@ -178,6 +228,9 @@ const useCalendarDaily = (props, emit) => {
|
|
|
178
228
|
}
|
|
179
229
|
selectedData.value = tempSelectedData;
|
|
180
230
|
};
|
|
231
|
+
const eventContextmenu = async (item, evt) => {
|
|
232
|
+
emit("eventContextmenu", { evt, data: [item] });
|
|
233
|
+
};
|
|
181
234
|
return {
|
|
182
235
|
drawData,
|
|
183
236
|
curTimeTimer,
|
|
@@ -190,7 +243,9 @@ const useCalendarDaily = (props, emit) => {
|
|
|
190
243
|
handleCurTime,
|
|
191
244
|
handleDrag,
|
|
192
245
|
handleDragStart,
|
|
193
|
-
|
|
246
|
+
handleEventClick,
|
|
247
|
+
handleEventDblClick,
|
|
248
|
+
eventContextmenu,
|
|
194
249
|
initDrawData
|
|
195
250
|
};
|
|
196
251
|
};
|
|
@@ -30,15 +30,24 @@ const CalendarWeek = /* @__PURE__ */ vue.defineComponent({
|
|
|
30
30
|
selectedData,
|
|
31
31
|
legends,
|
|
32
32
|
rowsHeader,
|
|
33
|
-
|
|
33
|
+
headerEventRef,
|
|
34
|
+
thumbHeight,
|
|
35
|
+
scrollTop,
|
|
36
|
+
realHeight,
|
|
37
|
+
isScroll,
|
|
38
|
+
handleEventClick,
|
|
39
|
+
handleEventDblClick,
|
|
34
40
|
handleDrag,
|
|
35
41
|
handleDragStart,
|
|
42
|
+
handleDragEnd,
|
|
36
43
|
handleCurTime,
|
|
37
44
|
initDrawData,
|
|
38
|
-
handleUIEvents
|
|
45
|
+
handleUIEvents,
|
|
46
|
+
onScrollbarMouseDown,
|
|
47
|
+
onHeaderEventScroll,
|
|
48
|
+
initHeaderEventScroll,
|
|
49
|
+
eventContextmenu
|
|
39
50
|
} = useCalendarWeek.useCalendarWeek(props, emit);
|
|
40
|
-
const hoverItem = vue.ref("");
|
|
41
|
-
const visible = vue.ref(false);
|
|
42
51
|
vue.watch(() => props.selectedData, () => {
|
|
43
52
|
if (props.selectedData && props.selectedData.length > 0) {
|
|
44
53
|
const data = props.selectedData.length > selectedData.value.length ? props.selectedData : selectedData.value;
|
|
@@ -59,6 +68,7 @@ const CalendarWeek = /* @__PURE__ */ vue.defineComponent({
|
|
|
59
68
|
});
|
|
60
69
|
vue.watch(() => props.events, () => {
|
|
61
70
|
handleUIEvents();
|
|
71
|
+
initHeaderEventScroll();
|
|
62
72
|
}, {
|
|
63
73
|
immediate: true,
|
|
64
74
|
deep: true
|
|
@@ -75,60 +85,67 @@ const CalendarWeek = /* @__PURE__ */ vue.defineComponent({
|
|
|
75
85
|
curTimeTimer.value = null;
|
|
76
86
|
}
|
|
77
87
|
});
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
const onMouseleavee = () => {
|
|
86
|
-
hoverItem.value = "";
|
|
87
|
-
visible.value = false;
|
|
88
|
+
const renderScrollbar = () => {
|
|
89
|
+
return vue.createVNode("div", {
|
|
90
|
+
"class": ns.b("scroll-bar")
|
|
91
|
+
}, [vue.createVNode("div", {
|
|
92
|
+
"class": ns.be("scroll-bar", "thumb"),
|
|
93
|
+
"onMousedown": onScrollbarMouseDown
|
|
94
|
+
}, null)]);
|
|
88
95
|
};
|
|
89
96
|
const renderEventItem = (location, eventBoxStyle, eventContentStyle, event, index, slotNme, classEName) => {
|
|
90
97
|
var _a;
|
|
98
|
+
let title = "".concat(event.text || "");
|
|
99
|
+
if (location === "header" && event.timeRange)
|
|
100
|
+
title = "".concat(title, " ").concat(event.timeRange || "");
|
|
101
|
+
title = core.showTitle(title) || "";
|
|
102
|
+
if (props.showDetail)
|
|
103
|
+
title = "";
|
|
91
104
|
return vue.createVNode("div", {
|
|
92
105
|
"key": index,
|
|
93
106
|
"class": [ns.em(classEName, "event-box")],
|
|
94
|
-
"style": eventBoxStyle
|
|
95
|
-
"onMouseenter": () => onMouseenter(event),
|
|
96
|
-
"onMouseleave": onMouseleavee,
|
|
97
|
-
"onClick": onClickCalendarItem
|
|
107
|
+
"style": eventBoxStyle
|
|
98
108
|
}, [vue.createVNode("button", {
|
|
99
|
-
"class": [ns.em(classEName, "event-content"),
|
|
109
|
+
"class": [ns.em(classEName, "event-content"), ns.is("selected-event", !!event.isSelectedEvent), event.classname],
|
|
100
110
|
"onClick": () => {
|
|
101
|
-
|
|
111
|
+
handleEventClick(event, "head");
|
|
112
|
+
},
|
|
113
|
+
"onDblclick": () => {
|
|
114
|
+
handleEventDblClick(event, "head");
|
|
102
115
|
},
|
|
103
|
-
"
|
|
116
|
+
"onContextmenu": (e) => eventContextmenu(event, e),
|
|
117
|
+
"style": eventContentStyle,
|
|
118
|
+
"title": title
|
|
104
119
|
}, [slots[slotNme] ? (_a = slots[slotNme]) == null ? void 0 : _a.call(slots, {
|
|
105
120
|
data: event
|
|
106
121
|
}) : vue.createVNode("div", {
|
|
107
|
-
"class": [ns.em(classEName, "event-summary"), event.classname]
|
|
108
|
-
"title": core.showTitle(location === "header" ? "".concat(event.text || "", " ").concat(event.timeRange || "") : "")
|
|
122
|
+
"class": [ns.em(classEName, "event-summary"), event.classname]
|
|
109
123
|
}, [event.icon && vue.createVNode("span", {
|
|
110
124
|
"class": [event.icon, ns.em(classEName, "event-icon")],
|
|
111
125
|
"style": {
|
|
112
126
|
color: event.bkColor
|
|
113
127
|
}
|
|
114
128
|
}, null), event.text && vue.createVNode("span", {
|
|
115
|
-
"class": [ns.em(classEName, "event-name")]
|
|
116
|
-
"title": event.text
|
|
129
|
+
"class": [ns.em(classEName, "event-name")]
|
|
117
130
|
}, [event.text])]), location === "header" && event.isSelectedEvent ? vue.createVNode("span", {
|
|
118
131
|
"class": ["fa fa-check", ns.em(classEName, "check")]
|
|
119
132
|
}, null) : ""])]);
|
|
120
133
|
};
|
|
121
|
-
const renderPopover = (content, event) => {
|
|
134
|
+
const renderPopover = (content, event, placement) => {
|
|
122
135
|
if (!props.showDetail) {
|
|
123
136
|
return content;
|
|
124
137
|
}
|
|
138
|
+
const _tempEvent = {
|
|
139
|
+
...event,
|
|
140
|
+
color: "",
|
|
141
|
+
bkColor: ""
|
|
142
|
+
};
|
|
125
143
|
return vue.createVNode(vue.resolveComponent("el-popover"), {
|
|
126
|
-
"visible": visible.value && event.id === hoverItem.value,
|
|
127
144
|
"show-after": 100,
|
|
128
145
|
"offset": 4,
|
|
129
146
|
"width": "auto",
|
|
130
147
|
"popper-class": [ns.e("event-popover")],
|
|
131
|
-
"placement": "right-start"
|
|
148
|
+
"placement": placement || "right-start"
|
|
132
149
|
}, {
|
|
133
150
|
reference: () => content,
|
|
134
151
|
default: () => {
|
|
@@ -142,7 +159,7 @@ const CalendarWeek = /* @__PURE__ */ vue.defineComponent({
|
|
|
142
159
|
}, null), vue.createVNode("div", {
|
|
143
160
|
"class": [ns.em("event-popover", "scroll")]
|
|
144
161
|
}, [(slots == null ? void 0 : slots.event) ? (_a = slots.event) == null ? void 0 : _a.call(slots, {
|
|
145
|
-
data:
|
|
162
|
+
data: _tempEvent
|
|
146
163
|
}) : vue.createVNode("div", {
|
|
147
164
|
"class": [ns.em("event-popover", "content")]
|
|
148
165
|
}, ["".concat(event.text || "", " ").concat(event.timeRange || "")])])]);
|
|
@@ -169,7 +186,15 @@ const CalendarWeek = /* @__PURE__ */ vue.defineComponent({
|
|
|
169
186
|
"class": [ns.em("header", "events")]
|
|
170
187
|
}, [vue.createVNode("div", {
|
|
171
188
|
"class": [ns.em("header", "event-cell-first")]
|
|
172
|
-
}, [ibiz.i18n.t("control.calendar.calendardaily.tip")]),
|
|
189
|
+
}, [ibiz.i18n.t("control.calendar.calendardaily.tip")]), vue.createVNode("div", {
|
|
190
|
+
"class": ns.em("header", "event-container"),
|
|
191
|
+
"ref": (el) => {
|
|
192
|
+
headerEventRef.value = el;
|
|
193
|
+
},
|
|
194
|
+
"onScroll": onHeaderEventScroll
|
|
195
|
+
}, [vue.createVNode("div", {
|
|
196
|
+
"class": ns.em("header", "container-scroll")
|
|
197
|
+
}, [rowsHeader.value.map((item) => vue.createVNode("div", {
|
|
173
198
|
"class": [ns.em("header", "event-cell")]
|
|
174
199
|
}, [item.map((event, index) => {
|
|
175
200
|
const eventBoxStyle = {
|
|
@@ -178,15 +203,18 @@ const CalendarWeek = /* @__PURE__ */ vue.defineComponent({
|
|
|
178
203
|
width: "".concat(event == null ? void 0 : event.width)
|
|
179
204
|
};
|
|
180
205
|
const eventContentStyle = {
|
|
181
|
-
color: event.color,
|
|
182
206
|
background: event.bkColorFade
|
|
183
207
|
};
|
|
184
|
-
|
|
185
|
-
|
|
208
|
+
if (!event.isShow)
|
|
209
|
+
return "";
|
|
210
|
+
const tempContent = renderEventItem("header", eventBoxStyle, eventContentStyle, event, index, "head-event", "header");
|
|
211
|
+
return renderPopover(tempContent, event, "bottom");
|
|
212
|
+
})]))]), isScroll.value && renderScrollbar()])]), vue.createVNode("div", {
|
|
186
213
|
"class": ns.em("header", "resizable-handle"),
|
|
187
214
|
"draggable": "true",
|
|
188
215
|
"onDrag": (event) => handleDrag(event),
|
|
189
|
-
"onDragstart": (event) => handleDragStart(event)
|
|
216
|
+
"onDragstart": (event) => handleDragStart(event),
|
|
217
|
+
"onDragend": () => handleDragEnd()
|
|
190
218
|
}, [vue.createVNode("div", {
|
|
191
219
|
"class": ns.em("header", "resize-line")
|
|
192
220
|
}, null)])]);
|
|
@@ -226,8 +254,7 @@ const CalendarWeek = /* @__PURE__ */ vue.defineComponent({
|
|
|
226
254
|
}
|
|
227
255
|
const eventContentStyle = {
|
|
228
256
|
background: event.bkColorFade,
|
|
229
|
-
"border-left": "3px solid ".concat(event.bkColor)
|
|
230
|
-
color: event.color
|
|
257
|
+
"border-left": "3px solid ".concat(event.bkColor)
|
|
231
258
|
};
|
|
232
259
|
const tempContent = renderEventItem("content", eventBoxStyle, eventContentStyle, event, index, "", "time-pane");
|
|
233
260
|
return renderPopover(tempContent, event);
|
|
@@ -235,7 +262,11 @@ const CalendarWeek = /* @__PURE__ */ vue.defineComponent({
|
|
|
235
262
|
};
|
|
236
263
|
return {
|
|
237
264
|
ns,
|
|
265
|
+
thumbHeight,
|
|
238
266
|
calendarWeek,
|
|
267
|
+
scrollTop,
|
|
268
|
+
realHeight,
|
|
269
|
+
headerEventRef,
|
|
239
270
|
renderHeader,
|
|
240
271
|
renderContent
|
|
241
272
|
};
|
|
@@ -245,7 +276,12 @@ const CalendarWeek = /* @__PURE__ */ vue.defineComponent({
|
|
|
245
276
|
"ref": (el) => {
|
|
246
277
|
this.calendarWeek = el;
|
|
247
278
|
},
|
|
248
|
-
"class": this.ns.b()
|
|
279
|
+
"class": this.ns.b(),
|
|
280
|
+
"style": {
|
|
281
|
+
["".concat(this.ns.cssVarBlockName("header-event-scroll-bar-thumb-height"))]: "".concat(this.thumbHeight, "px"),
|
|
282
|
+
["".concat(this.ns.cssVarBlockName("header-event-scroll-bar-thumb-top"))]: "".concat(this.scrollTop, "px"),
|
|
283
|
+
["".concat(this.ns.cssVarBlockName("header-event-scroll-real-height"))]: "".concat(this.realHeight, "px")
|
|
284
|
+
}
|
|
249
285
|
}, [this.renderHeader(), this.renderContent()]);
|
|
250
286
|
}
|
|
251
287
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-calendar-week{display:flex;flex:1;flex-direction:column;width:100%;height:100%;overflow:hidden}.ibiz-calendar-week__header{position:relative;z-index:100;display:flex;flex-direction:column;width:
|
|
1
|
+
.ibiz-calendar-week{display:flex;flex:1;flex-direction:column;width:100%;height:100%;overflow:hidden}.ibiz-calendar-week__header{position:relative;z-index:100;display:flex;flex-direction:column;width:100%;height:150px;min-height:150px}.ibiz-calendar-week__header--date-cell-first{width:90px;max-width:90px;height:100%;border-right:1px solid var(--ibiz-color-border);border-bottom:1px solid var(--ibiz-color-border)}.ibiz-calendar-week__header--event-cell-first{display:flex;align-items:center;justify-content:center;width:90px;max-width:90px;height:100%;padding-left:40px;border-right:1px solid var(--ibiz-color-border)}.ibiz-calendar-week__header--dates{display:flex;justify-content:space-between;width:calc(100% - 7px);height:96px}.ibiz-calendar-week__header--date-cell{display:flex;flex:1;flex-direction:column;align-items:center;border-right:1px solid var(--ibiz-color-border);border-bottom:1px solid var(--ibiz-color-border)}.ibiz-calendar-week__header--date-week{width:100%;height:26px;margin-top:6px;text-align:center}.ibiz-calendar-week__header--date-day{display:flex;align-items:center;justify-content:center;width:50px;height:50px;margin-top:6px;font-weight:600;border:none;border-radius:50%}.ibiz-calendar-week__header--date-day.is-today{color:var(--ibiz-color-primary-text);background:var(--ibiz-color-primary)}.ibiz-calendar-week__header--events{display:flex;flex:1;width:100%;height:30px;overflow:hidden;position:relative}.ibiz-calendar-week__header--event-container{width:calc(100% - 97px);height:100%;overflow-y:auto;overflow-x:hidden}.ibiz-calendar-week__header--event-container::-webkit-scrollbar{display:none}.ibiz-calendar-week__header--container-scroll{display:flex;height:auto}.ibiz-calendar-week__header--event-cell{position:relative;top:0;left:0;flex:1;width:100%;height:auto}.ibiz-calendar-week__header--event-cell::after{content:"";display:block;position:absolute;top:0;right:0;width:1px;height:var(--ibiz-calendar-week-header-event-scroll-real-height);border-right:1px solid var(--ibiz-color-border)}.ibiz-calendar-week__header--event-box{position:absolute;display:flex;min-width:32px}.ibiz-calendar-week__header--event-box:has(.ibiz-calendar-week__header--check){min-width:50px}.ibiz-calendar-week__header--event-content{position:relative;z-index:2;width:100%;height:100%;min-height:22px;padding-left:4px;cursor:pointer;background-color:var(--ibiz-color-primary);border:none;outline:0}.ibiz-calendar-week__header--event-content.is-selected-event{padding-right:20px}.ibiz-calendar-week__header--event-summary{width:100%;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.ibiz-calendar-week__header--resizable-handle{position:absolute;bottom:-6px;display:flex;align-items:center;width:calc(100% - 7px);height:10px;cursor:row-resize}.ibiz-calendar-week__header--resize-line{width:100%;height:1px;background-color:var(--ibiz-color-border)}.ibiz-calendar-week__header--check{position:absolute;top:50%;right:6px;color:var(--ibiz-color-primary);transform:translate(0,-50%)}.ibiz-calendar-week__scroll-area{flex:1;overflow:hidden scroll}.ibiz-calendar-week__time-pane{position:relative;display:flex;flex:1 1 0%;width:calc(100% - 3px);height:auto}.ibiz-calendar-week__time-pane--time-labels{position:sticky;left:0;width:90px;min-width:90px;padding:27px 0 27px 40px;border-right:1px solid var(--ibiz-color-border)}.ibiz-calendar-week__time-pane--time-label{height:22px;margin-top:38px;line-height:22px;text-align:left}.ibiz-calendar-week__time-pane--time-label:nth-child(1){height:22px;margin-top:22px}.ibiz-calendar-week__time-pane--time-columns{position:relative;flex:1;padding-bottom:60px;border-right:1px solid var(--ibiz-color-border)}.ibiz-calendar-week__time-pane--time-column{height:60px;border-top:1px solid var(--ibiz-color-border)}.ibiz-calendar-week__time-pane--time-column:nth-child(1){border-top:none}.ibiz-calendar-week__time-pane--time-column-last{border-bottom:1px solid var(--ibiz-color-border)}.ibiz-calendar-week__time-pane--event-timed-container{position:absolute;top:0;width:100%;height:100%;overflow:hidden}.ibiz-calendar-week__time-pane--container-scroll{position:relative;top:0;width:100%;height:100%;overflow:auto;overflow:hidden}.ibiz-calendar-week__time-pane--event-box{position:absolute;width:auto;height:auto;padding:0 2px}.ibiz-calendar-week__time-pane--event-content{position:relative;z-index:3;width:100%;height:100%;padding:8px;overflow:hidden;line-height:100%;text-align:left;cursor:pointer;border:none;outline:0}.ibiz-calendar-week__time-pane--event-content.is-selected-event{border:1px solid var(--ibiz-color-primary)}.ibiz-calendar-week__time-pane--event-summary{width:100%;height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-calendar-week__time-pane--event-summary>span{margin-right:4px}.ibiz-calendar-week__event-popover{position:relative;width:auto;height:auto;padding:0}.ibiz-calendar-week__event-popover.el-popover.el-popper{padding:8px}.ibiz-calendar-week__event-popover:has(.ibiz-control-calendar-item-default){display:none!important}.ibiz-calendar-week__event-popover--body{width:auto;height:auto;overflow:hidden}.ibiz-calendar-week__event-popover--scroll{width:auto;min-width:200px;height:auto;max-height:80%;overflow:auto;pointer-events:none}.ibiz-calendar-week__event-popover--scroll .ibiz-control-calendar-item:last-child{margin-bottom:0}.ibiz-calendar-week__event-popover--scroll .ibiz-control-calendar-item.is-active{background-color:transparent;border-color:transparent}.ibiz-calendar-week__event-popover--close{position:absolute;top:8px;right:8px;display:none;cursor:pointer}.ibiz-calendar-week__event-popover--close:hover .el-icon{background:var(--ibiz-color-primary);border-radius:50%}.ibiz-calendar-week__event-popover--close:hover .el-icon svg{fill:var(--ibiz-color-white)}.ibiz-calendar-week__event-popover .el-icon{display:flex;align-items:center;justify-content:center;min-width:24px;min-height:24px;font-size:20px}.ibiz-calendar-week__event-popover .el-icon svg{fill:var(--el-text-color-secondary)}.ibiz-calendar-week-scroll-bar{position:absolute;top:var(--ibiz-calendar-week-header-event-scroll-bar-thumb-top);right:0;z-index:10;width:4px;height:100%;border-radius:var(--ibiz-border-radius-extra-small)}.ibiz-calendar-week-scroll-bar__thumb{width:4px;height:var(--ibiz-calendar-week-header-event-scroll-bar-thumb-height);cursor:pointer;background-color:var(--ibiz-color-fill-2);border-radius:var(--ibiz-border-radius-extra-small)}
|