@ibiz-template/vue3-components 0.7.26-alpha.1 → 0.7.26-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-_h-elF6t.js → index-8tGeBxpc.js} +1 -1
- package/dist/{index--XeT2CTZ.js → index-CDgQJyai.js} +1 -1
- package/dist/index-o58Mv9D4.js +4 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-jKx8FmtR.js → xlsx-util-Ux1_tuw5.js} +1 -1
- package/es/_virtual/localeData.mjs +3 -0
- package/es/control/calendar/calendar.css +1 -1
- package/es/control/calendar/calendar.d.ts +2 -3
- package/es/control/calendar/calendar.mjs +104 -173
- package/es/control/calendar/components/calendar-daily/calendar-daily.css +1 -0
- package/es/control/calendar/components/calendar-daily/calendar-daily.d.ts +18 -0
- package/es/control/calendar/components/calendar-daily/calendar-daily.mjs +175 -0
- package/es/control/calendar/components/calendar-daily/index.d.ts +18 -0
- package/es/control/calendar/components/calendar-daily/index.mjs +9 -0
- package/es/control/calendar/components/calendar-daily/use-calendar-daily.d.ts +154 -0
- package/es/control/calendar/components/calendar-daily/use-calendar-daily.mjs +196 -0
- package/es/control/calendar/components/calendar-month/calendar-month.css +1 -0
- package/es/control/calendar/components/calendar-month/calendar-month.d.ts +18 -0
- package/es/control/calendar/components/calendar-month/calendar-month.mjs +242 -0
- package/es/control/calendar/components/calendar-month/index.d.ts +18 -0
- package/es/control/calendar/components/calendar-month/index.mjs +9 -0
- package/es/control/calendar/components/calendar-month/use-calendar-month.d.ts +3 -0
- package/es/control/calendar/components/calendar-month/use-calendar-month.mjs +384 -0
- package/es/control/calendar/components/calendar-week/calendar-week.css +1 -0
- package/es/control/calendar/components/calendar-week/calendar-week.d.ts +18 -0
- package/es/control/calendar/components/calendar-week/calendar-week.mjs +241 -0
- package/es/control/calendar/components/calendar-week/index.d.ts +18 -0
- package/es/control/calendar/components/calendar-week/index.mjs +9 -0
- package/es/control/calendar/components/calendar-week/use-calendar-week.d.ts +159 -0
- package/es/control/calendar/components/calendar-week/use-calendar-week.mjs +399 -0
- package/es/control/calendar/components/constant/event.d.ts +5 -0
- package/es/control/calendar/components/constant/event.mjs +8 -0
- package/es/control/calendar/components/constant/index.d.ts +1 -0
- package/es/control/calendar/components/constant/index.mjs +3 -0
- package/es/control/calendar/components/custom-calendar/custom-calendar.css +1 -0
- package/es/control/calendar/components/custom-calendar/custom-calendar.d.ts +24 -0
- package/es/control/calendar/components/custom-calendar/custom-calendar.mjs +283 -0
- package/es/control/calendar/components/custom-calendar/index.d.ts +24 -0
- package/es/control/calendar/components/custom-calendar/index.mjs +12 -0
- package/es/control/calendar/components/custom-calendar/use-custom-calendar.d.ts +3 -0
- package/es/control/calendar/components/custom-calendar/use-custom-calendar.mjs +264 -0
- package/es/control/calendar/components/interface/calendar-daily.d.ts +12 -0
- package/es/control/calendar/components/interface/calendar-daily.mjs +34 -0
- package/es/control/calendar/components/interface/calendar-month.d.ts +20 -0
- package/es/control/calendar/components/interface/calendar-month.mjs +43 -0
- package/es/control/calendar/components/interface/calendar-week.d.ts +12 -0
- package/es/control/calendar/components/interface/calendar-week.mjs +34 -0
- package/es/control/calendar/components/interface/common.d.ts +116 -0
- package/es/control/calendar/components/interface/common.mjs +1 -0
- package/es/control/calendar/components/interface/custom-calendar.d.ts +14 -0
- package/es/control/calendar/components/interface/custom-calendar.mjs +67 -0
- package/es/control/calendar/components/interface/index.d.ts +5 -0
- package/es/control/calendar/components/interface/index.mjs +7 -0
- package/es/control/calendar/components/util/index.d.ts +1 -0
- package/es/control/calendar/components/util/index.mjs +4 -0
- package/es/control/calendar/components/util/util.d.ts +89 -0
- package/es/control/calendar/components/util/util.mjs +281 -0
- package/es/control/calendar/index.d.ts +1 -2
- package/es/control/calendar/index.mjs +2 -0
- package/es/editor/data-picker/ibiz-picker-link/ibiz-picker-link.mjs +2 -2
- package/es/editor/date-picker/date-picker-editor.controller.mjs +3 -0
- package/es/editor/date-range/date-range-editor.controller.mjs +3 -0
- package/es/editor/slider/ibiz-slider/ibiz-slider.css +1 -1
- package/es/editor/slider/ibiz-slider/ibiz-slider.d.ts +2 -0
- package/es/editor/slider/ibiz-slider/ibiz-slider.mjs +76 -21
- package/es/locale/en/index.d.ts +43 -0
- package/es/locale/en/index.mjs +44 -1
- package/es/locale/zh-CN/index.d.ts +39 -0
- package/es/locale/zh-CN/index.mjs +40 -1
- package/es/node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/plugin/localeData.mjs +13 -0
- package/lib/_virtual/localeData.cjs +5 -0
- package/lib/control/calendar/calendar.cjs +104 -173
- package/lib/control/calendar/calendar.css +1 -1
- package/lib/control/calendar/components/calendar-daily/calendar-daily.cjs +177 -0
- package/lib/control/calendar/components/calendar-daily/calendar-daily.css +1 -0
- package/lib/control/calendar/components/calendar-daily/index.cjs +14 -0
- package/lib/control/calendar/components/calendar-daily/use-calendar-daily.cjs +198 -0
- package/lib/control/calendar/components/calendar-month/calendar-month.cjs +244 -0
- package/lib/control/calendar/components/calendar-month/calendar-month.css +1 -0
- package/lib/control/calendar/components/calendar-month/index.cjs +14 -0
- package/lib/control/calendar/components/calendar-month/use-calendar-month.cjs +386 -0
- package/lib/control/calendar/components/calendar-week/calendar-week.cjs +243 -0
- package/lib/control/calendar/components/calendar-week/calendar-week.css +1 -0
- package/lib/control/calendar/components/calendar-week/index.cjs +14 -0
- package/lib/control/calendar/components/calendar-week/use-calendar-week.cjs +401 -0
- package/lib/control/calendar/components/constant/event.cjs +14 -0
- package/lib/control/calendar/components/constant/index.cjs +11 -0
- package/lib/control/calendar/components/custom-calendar/custom-calendar.cjs +285 -0
- package/lib/control/calendar/components/custom-calendar/custom-calendar.css +1 -0
- package/lib/control/calendar/components/custom-calendar/index.cjs +17 -0
- package/lib/control/calendar/components/custom-calendar/use-custom-calendar.cjs +266 -0
- package/lib/control/calendar/components/interface/calendar-daily.cjs +37 -0
- package/lib/control/calendar/components/interface/calendar-month.cjs +46 -0
- package/lib/control/calendar/components/interface/calendar-week.cjs +37 -0
- package/lib/control/calendar/components/interface/common.cjs +3 -0
- package/lib/control/calendar/components/interface/custom-calendar.cjs +70 -0
- package/lib/control/calendar/components/interface/index.cjs +18 -0
- package/lib/control/calendar/components/util/index.cjs +42 -0
- package/lib/control/calendar/components/util/util.cjs +316 -0
- package/lib/control/calendar/index.cjs +2 -0
- package/lib/editor/data-picker/ibiz-picker-link/ibiz-picker-link.cjs +2 -2
- package/lib/editor/date-picker/date-picker-editor.controller.cjs +3 -0
- package/lib/editor/date-range/date-range-editor.controller.cjs +3 -0
- package/lib/editor/slider/ibiz-slider/ibiz-slider.cjs +76 -21
- package/lib/editor/slider/ibiz-slider/ibiz-slider.css +1 -1
- package/lib/locale/en/index.cjs +44 -1
- package/lib/locale/zh-CN/index.cjs +40 -1
- package/lib/node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/plugin/localeData.cjs +17 -0
- package/package.json +5 -5
- package/dist/index-yupCl1Un.js +0 -4
|
@@ -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);width:100%;height:100%}.ibiz-control-calendar__calendar-item{display:flex;align-items:center;padding:var(--ibiz-control-calendar-item-padding)}.ibiz-control-calendar__icon{width:
|
|
1
|
+
.ibiz-control-light-calendar{--ibiz-control-light-calendar-text-color:var(--ibiz-color-text-0);--ibiz-control-light-calendar-hover-bg-color:var(--ibiz-color-fill-0);--ibiz-control-light-calendar-active-bg-color:var(--ibiz-color-fill-0);--ibiz-control-light-calendar-border-color:var(--ibiz-color-primary-active);--ibiz-control-light-calendar-font-size:var(--ibiz-font-size-small);--ibiz-control-light-calendar-item-padding:var(--ibiz-spacing-tight);--ibiz-control-light-calendar-border-radius:var(--ibiz-border-radius-small);--ibiz-control-light-calendar-margin:var(--ibiz-spacing-extra-tight);width:100%;height:100%}.ibiz-control-light-calendar__calendar-item{display:flex;gap:var(--ibiz-spacing-base-tight);align-items:center;padding:var(--ibiz-control-light-calendar-item-padding)}.ibiz-control-light-calendar__icon{width:10px;height:10px;border-radius:50%}.ibiz-control-light-calendar-content{display:flex;flex-direction:column;width:100%;height:100%}.ibiz-control-light-calendar-content .el-calendar{display:flex;flex-direction:column}.ibiz-control-light-calendar-content .el-calendar-table,.ibiz-control-light-calendar-content .el-calendar-table .el-calendar-day{width:100%;height:100%;cursor:pointer}.ibiz-control-light-calendar-content .el-calendar-table{flex:1;width:-moz-fit-content;width:fit-content}.ibiz-control-light-calendar-content .el-calendar-table .el-calendar-day:hover{cursor:pointer;background-color:var(--el-calendar-selected-bg-color)}.ibiz-control-light-calendar-content .el-calendar__body{display:flex;flex:1;padding:0}.ibiz-control-light-calendar-item{--ibiz-control-light-calendar-text-color:var(--ibiz-color-text-0);--ibiz-control-light-calendar-hover-bg-color:var(--ibiz-color-fill-0);--ibiz-control-light-calendar-active-bg-color:var(--ibiz-color-fill-0);--ibiz-control-light-calendar-border-color:var(--ibiz-color-primary-active);--ibiz-control-light-calendar-font-size:var(--ibiz-font-size-small);--ibiz-control-light-calendar-item-padding:var(--ibiz-spacing-tight);--ibiz-control-light-calendar-border-radius:var(--ibiz-border-radius-small);--ibiz-control-light-calendar-margin:var(--ibiz-spacing-extra-tight);height:100%;padding:var(--ibiz-control-light-calendar-item-padding);margin-bottom:var(--ibiz-control-light-calendar-margin);overflow:hidden;font-size:var(--ibiz-control-light-calendar-font-size);color:var(--ibiz-control-light-calendar-text-color);text-overflow:ellipsis;white-space:nowrap;cursor:pointer;border:solid .5px transparent;border-radius:var(--ibiz-control-light-calendar-border-radius)}.ibiz-control-light-calendar-item:hover{background-color:var(--ibiz-control-light-calendar-hover-bg-color)}.ibiz-control-light-calendar-item.is-active{background-color:var(--ibiz-control-light-calendar-active-bg-color);border:solid .5px var(--ibiz-control-light-calendar-border-color)}.ibiz-control-light-calendar-date-text{--ibiz-control-light-calendar-text-color:var(--ibiz-color-text-0);--ibiz-control-light-calendar-hover-bg-color:var(--ibiz-color-fill-0);--ibiz-control-light-calendar-active-bg-color:var(--ibiz-color-fill-0);--ibiz-control-light-calendar-border-color:var(--ibiz-color-primary-active);--ibiz-control-light-calendar-font-size:var(--ibiz-font-size-small);--ibiz-control-light-calendar-item-padding:var(--ibiz-spacing-tight);--ibiz-control-light-calendar-border-radius:var(--ibiz-border-radius-small);--ibiz-control-light-calendar-margin:var(--ibiz-spacing-extra-tight);padding:var(--ibiz-control-light-calendar-item-padding);margin-top:0}.ibiz-control-light-calendar-day{height:-moz-fit-content;height:fit-content}.ibiz-control-light-calendar-content-header{--ibiz-control-light-calendar-text-color:var(--ibiz-color-text-0);--ibiz-control-light-calendar-hover-bg-color:var(--ibiz-color-fill-0);--ibiz-control-light-calendar-active-bg-color:var(--ibiz-color-fill-0);--ibiz-control-light-calendar-border-color:var(--ibiz-color-primary-active);--ibiz-control-light-calendar-font-size:var(--ibiz-font-size-small);--ibiz-control-light-calendar-item-padding:var(--ibiz-spacing-tight);--ibiz-control-light-calendar-border-radius:var(--ibiz-border-radius-small);--ibiz-control-light-calendar-margin:var(--ibiz-spacing-extra-tight);display:flex;gap:var(--ibiz-control-light-calendar-item-padding);align-items:center}.ibiz-control-light-calendar-timeline-content .el-timeline{padding-left:0}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { ISysCalendar } from '@ibiz/model-core';
|
|
3
3
|
import './calendar.scss';
|
|
4
|
-
import { CalendarController,
|
|
4
|
+
import { CalendarController, IControlProvider } from '@ibiz-template/runtime';
|
|
5
5
|
export declare const CalendarControl: import("vue").DefineComponent<{
|
|
6
6
|
modelData: {
|
|
7
7
|
type: PropType<ISysCalendar>;
|
|
@@ -30,9 +30,8 @@ export declare const CalendarControl: import("vue").DefineComponent<{
|
|
|
30
30
|
c: CalendarController;
|
|
31
31
|
ns: import("@ibiz-template/core").Namespace;
|
|
32
32
|
calendarRef: import("vue").Ref<IData | undefined>;
|
|
33
|
-
popoverVisible: import("vue").Ref<boolean>;
|
|
34
33
|
selectDate: (tag: string) => void;
|
|
35
|
-
|
|
34
|
+
renderCalendar: () => JSX.Element;
|
|
36
35
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
37
36
|
modelData: {
|
|
38
37
|
type: PropType<ISysCalendar>;
|
|
@@ -3,6 +3,9 @@ import { useControlController, useNamespace } from '@ibiz-template/vue3-util';
|
|
|
3
3
|
import './calendar.css';
|
|
4
4
|
import { CalendarController } from '@ibiz-template/runtime';
|
|
5
5
|
import dayjs from 'dayjs';
|
|
6
|
+
import './components/util/index.mjs';
|
|
7
|
+
import { IBizCustomCalendar } from './components/custom-calendar/index.mjs';
|
|
8
|
+
import { fade } from './components/util/util.mjs';
|
|
6
9
|
|
|
7
10
|
"use strict";
|
|
8
11
|
function _isSlot(s) {
|
|
@@ -39,18 +42,14 @@ const CalendarControl = /* @__PURE__ */ defineComponent({
|
|
|
39
42
|
const c = useControlController((...args) => new CalendarController(...args));
|
|
40
43
|
const ns = useNamespace("control-".concat(c.model.controlType.toLowerCase()));
|
|
41
44
|
const calendarRef = ref();
|
|
42
|
-
const popoverVisible = ref(false);
|
|
43
45
|
const selectDate = (tag) => {
|
|
44
46
|
if (!calendarRef.value)
|
|
45
47
|
return;
|
|
46
48
|
calendarRef.value.selectDate(tag);
|
|
47
49
|
};
|
|
48
|
-
c.evt.on("onActive", () => {
|
|
49
|
-
popoverVisible.value = false;
|
|
50
|
-
});
|
|
51
50
|
watch(() => c.state.selectedDate, (oldVal, newVal) => {
|
|
52
|
-
const oldDateString = dayjs(oldVal).format("YYYY-MM");
|
|
53
|
-
const newDateString = dayjs(newVal).format("YYYY-MM");
|
|
51
|
+
const oldDateString = dayjs(oldVal).format("YYYY-MM-DD");
|
|
52
|
+
const newDateString = dayjs(newVal).format("YYYY-MM-DD");
|
|
54
53
|
if (oldDateString === newDateString) {
|
|
55
54
|
return;
|
|
56
55
|
}
|
|
@@ -59,205 +58,129 @@ const CalendarControl = /* @__PURE__ */ defineComponent({
|
|
|
59
58
|
const calcItemStyle = (data) => {
|
|
60
59
|
return {
|
|
61
60
|
color: data.color,
|
|
62
|
-
backgroundColor: data.bkColor
|
|
61
|
+
backgroundColor: fade(data.bkColor, 10)
|
|
63
62
|
};
|
|
64
63
|
};
|
|
65
|
-
return {
|
|
66
|
-
c,
|
|
67
|
-
ns,
|
|
68
|
-
calendarRef,
|
|
69
|
-
popoverVisible,
|
|
70
|
-
selectDate,
|
|
71
|
-
calcItemStyle
|
|
72
|
-
};
|
|
73
|
-
},
|
|
74
|
-
render() {
|
|
75
|
-
let _slot6;
|
|
76
64
|
const renderPanelItem = (item, modelData) => {
|
|
77
65
|
const {
|
|
78
66
|
context,
|
|
79
67
|
params
|
|
80
|
-
} =
|
|
81
|
-
const
|
|
68
|
+
} = c;
|
|
69
|
+
const {
|
|
70
|
+
calendarStyle
|
|
71
|
+
} = c.model;
|
|
72
|
+
const findIndex = c.state.selectedData.findIndex((data) => {
|
|
82
73
|
return data.deData.srfkey === item.deData.srfkey;
|
|
83
74
|
});
|
|
84
|
-
const itemClass = [
|
|
85
|
-
const style =
|
|
75
|
+
const itemClass = [ns.b("item"), ns.is("active", findIndex !== -1)];
|
|
76
|
+
const style = calcItemStyle(item);
|
|
77
|
+
if (calendarStyle === "TIMELINE") {
|
|
78
|
+
return createVNode(resolveComponent("iBizControlShell"), {
|
|
79
|
+
"class": itemClass,
|
|
80
|
+
"data": item.deData,
|
|
81
|
+
"modelData": modelData,
|
|
82
|
+
"context": context,
|
|
83
|
+
"params": params,
|
|
84
|
+
"style": style,
|
|
85
|
+
"onClick": (e) => {
|
|
86
|
+
e.stopPropagation();
|
|
87
|
+
return c.onRowClick(item);
|
|
88
|
+
},
|
|
89
|
+
"onDblclick": (e) => {
|
|
90
|
+
e.stopPropagation();
|
|
91
|
+
return c.onDbRowClick(item);
|
|
92
|
+
}
|
|
93
|
+
}, null);
|
|
94
|
+
}
|
|
86
95
|
return createVNode(resolveComponent("iBizControlShell"), {
|
|
87
|
-
"class": itemClass,
|
|
88
96
|
"data": item.deData,
|
|
89
97
|
"modelData": modelData,
|
|
90
98
|
"context": context,
|
|
91
|
-
"params": params
|
|
92
|
-
"style": style,
|
|
93
|
-
"onClick": (e) => {
|
|
94
|
-
e.stopPropagation();
|
|
95
|
-
return this.c.onRowClick(item);
|
|
96
|
-
},
|
|
97
|
-
"onDblclick": (e) => {
|
|
98
|
-
e.stopPropagation();
|
|
99
|
-
return this.c.onDbRowClick(item);
|
|
100
|
-
}
|
|
99
|
+
"params": params
|
|
101
100
|
}, null);
|
|
102
101
|
};
|
|
103
102
|
const renderDefaultItem = (item) => {
|
|
104
|
-
const
|
|
103
|
+
const {
|
|
104
|
+
calendarStyle
|
|
105
|
+
} = c.model;
|
|
106
|
+
const findIndex = c.state.selectedData.findIndex((data) => {
|
|
105
107
|
return data.deData.srfkey === item.deData.srfkey;
|
|
106
108
|
});
|
|
107
|
-
const itemClass = [
|
|
108
|
-
const style =
|
|
109
|
+
const itemClass = [ns.b("item"), ns.is("active", findIndex !== -1)];
|
|
110
|
+
const style = calcItemStyle(item);
|
|
111
|
+
if (calendarStyle === "TIMELINE") {
|
|
112
|
+
return createVNode("div", {
|
|
113
|
+
"class": itemClass,
|
|
114
|
+
"key": item.deData.srfkey,
|
|
115
|
+
"style": style,
|
|
116
|
+
"onClick": () => c.onRowClick(item),
|
|
117
|
+
"onDblclick": () => c.onDbRowClick(item)
|
|
118
|
+
}, ["".concat(item.text)]);
|
|
119
|
+
}
|
|
109
120
|
return createVNode("div", {
|
|
110
|
-
"
|
|
111
|
-
"key": item.deData.srfkey,
|
|
112
|
-
"style": style,
|
|
113
|
-
"title": item.tips || item.text,
|
|
114
|
-
"onClick": () => this.c.onRowClick(item),
|
|
115
|
-
"onDblclick": () => this.c.onDbRowClick(item)
|
|
121
|
+
"key": item.deData.srfkey
|
|
116
122
|
}, [item.text]);
|
|
117
123
|
};
|
|
118
|
-
const renderCalendarItem = (item) => {
|
|
119
|
-
var _a;
|
|
120
|
-
const model = (_a = this.c.model.sysCalendarItems) == null ? void 0 : _a.find((calendarItems) => {
|
|
121
|
-
return item.itemType === calendarItems.itemType;
|
|
122
|
-
});
|
|
123
|
-
const panel = model.layoutPanel;
|
|
124
|
-
return panel ? renderPanelItem(item, panel) : renderDefaultItem(item);
|
|
125
|
-
};
|
|
126
|
-
const renderCalendarList = (items) => {
|
|
127
|
-
if (items.length > 1) {
|
|
128
|
-
return [renderCalendarItem(items[0]), createVNode(resolveComponent("el-popover"), {
|
|
129
|
-
"trigger": "click",
|
|
130
|
-
"visible": this.popoverVisible,
|
|
131
|
-
"onUpdate:visible": ($event) => this.popoverVisible = $event
|
|
132
|
-
}, {
|
|
133
|
-
reference: () => {
|
|
134
|
-
return createVNode("span", {
|
|
135
|
-
"class": this.ns.b("more")
|
|
136
|
-
}, ["+".concat(items.length - 1, " ").concat(ibiz.i18n.t("app.more"), "...")]);
|
|
137
|
-
},
|
|
138
|
-
default: () => {
|
|
139
|
-
return items.map((item) => {
|
|
140
|
-
return renderCalendarItem(item);
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
})];
|
|
144
|
-
}
|
|
145
|
-
return items.map((item) => {
|
|
146
|
-
return renderCalendarItem(item);
|
|
147
|
-
});
|
|
148
|
-
};
|
|
149
|
-
const renderCalendarItems = (date) => {
|
|
150
|
-
const dateString = dayjs(date).format("YYYY-MM-DD");
|
|
151
|
-
const items = this.c.state.items.filter((item) => {
|
|
152
|
-
const begin = new Date(item.beginTime);
|
|
153
|
-
return dateString === dayjs(begin).format("YYYY-MM-DD");
|
|
154
|
-
});
|
|
155
|
-
return renderCalendarList(items);
|
|
156
|
-
};
|
|
157
124
|
const renderElCalender = () => {
|
|
125
|
+
const slots = {};
|
|
126
|
+
const {
|
|
127
|
+
sysCalendarItems
|
|
128
|
+
} = c.model;
|
|
129
|
+
slots.event = ({
|
|
130
|
+
data
|
|
131
|
+
}) => {
|
|
132
|
+
const targetCalendarItem = sysCalendarItems == null ? void 0 : sysCalendarItems.find((item) => {
|
|
133
|
+
return item.id === data.itemType;
|
|
134
|
+
});
|
|
135
|
+
if (c.state.showDetail && targetCalendarItem && targetCalendarItem.layoutPanel) {
|
|
136
|
+
return renderPanelItem(data, targetCalendarItem.layoutPanel);
|
|
137
|
+
}
|
|
138
|
+
return renderDefaultItem(data);
|
|
139
|
+
};
|
|
158
140
|
return createVNode("div", {
|
|
159
|
-
"class":
|
|
160
|
-
}, [createVNode(
|
|
161
|
-
"modelValue":
|
|
162
|
-
"onUpdate:modelValue": ($event) =>
|
|
163
|
-
"
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
"modelValue": this.c.state.selectedDate,
|
|
176
|
-
"onUpdate:modelValue": ($event) => this.c.state.selectedDate = $event,
|
|
177
|
-
"type": "month"
|
|
178
|
-
}, null), createVNode(resolveComponent("el-button-group"), null, {
|
|
179
|
-
default: () => [createVNode(resolveComponent("el-button"), {
|
|
180
|
-
"onClick": () => {
|
|
181
|
-
this.selectDate("prev-year");
|
|
182
|
-
}
|
|
183
|
-
}, _isSlot(_slot = ibiz.i18n.t("control.calendar.lastYear")) ? _slot : {
|
|
184
|
-
default: () => [_slot]
|
|
185
|
-
}), createVNode(resolveComponent("el-button"), {
|
|
186
|
-
"onClick": () => {
|
|
187
|
-
this.selectDate("prev-month");
|
|
188
|
-
}
|
|
189
|
-
}, _isSlot(_slot2 = ibiz.i18n.t("control.calendar.lastMonth")) ? _slot2 : {
|
|
190
|
-
default: () => [_slot2]
|
|
191
|
-
}), createVNode(resolveComponent("el-button"), {
|
|
192
|
-
"onClick": () => {
|
|
193
|
-
this.selectDate("today");
|
|
194
|
-
}
|
|
195
|
-
}, _isSlot(_slot3 = ibiz.i18n.t("control.calendar.today")) ? _slot3 : {
|
|
196
|
-
default: () => [_slot3]
|
|
197
|
-
}), createVNode(resolveComponent("el-button"), {
|
|
198
|
-
"onClick": () => {
|
|
199
|
-
this.selectDate("next-month");
|
|
200
|
-
}
|
|
201
|
-
}, _isSlot(_slot4 = ibiz.i18n.t("control.calendar.nextMonth")) ? _slot4 : {
|
|
202
|
-
default: () => [_slot4]
|
|
203
|
-
}), createVNode(resolveComponent("el-button"), {
|
|
204
|
-
"onClick": () => {
|
|
205
|
-
this.selectDate("next-year");
|
|
206
|
-
}
|
|
207
|
-
}, _isSlot(_slot5 = ibiz.i18n.t("control.calendar.nextYear")) ? _slot5 : {
|
|
208
|
-
default: () => [_slot5]
|
|
209
|
-
})]
|
|
210
|
-
})]), createVNode("div", {
|
|
211
|
-
"class": this.ns.b("legend")
|
|
212
|
-
}, [(_a = this.c.model.sysCalendarItems) == null ? void 0 : _a.map((calendarItem) => {
|
|
213
|
-
let label = calendarItem.name;
|
|
214
|
-
if (calendarItem.nameLanguageRes) {
|
|
215
|
-
label = ibiz.i18n.t(calendarItem.nameLanguageRes.lanResTag, calendarItem.name);
|
|
216
|
-
}
|
|
217
|
-
return createVNode("div", {
|
|
218
|
-
"class": this.ns.e("calendar-item")
|
|
219
|
-
}, [createVNode("div", {
|
|
220
|
-
"class": this.ns.e("icon"),
|
|
221
|
-
"style": {
|
|
222
|
-
background: calendarItem.bkcolor,
|
|
223
|
-
color: calendarItem.color
|
|
224
|
-
}
|
|
225
|
-
}, null), label]);
|
|
226
|
-
})])];
|
|
141
|
+
"class": ns.b("content")
|
|
142
|
+
}, [createVNode(IBizCustomCalendar, {
|
|
143
|
+
"modelValue": c.state.selectedDate,
|
|
144
|
+
"onUpdate:modelValue": ($event) => c.state.selectedDate = $event,
|
|
145
|
+
"controller": c,
|
|
146
|
+
"ref": "calendarRef",
|
|
147
|
+
"viewType": c.model.calendarStyle,
|
|
148
|
+
"events": c.state.items,
|
|
149
|
+
"legends": c.state.legends,
|
|
150
|
+
"multiple": !c.state.singleSelect,
|
|
151
|
+
"selectedData": c.state.selectedData,
|
|
152
|
+
"onEventClick": (value) => {
|
|
153
|
+
const {
|
|
154
|
+
data
|
|
155
|
+
} = value;
|
|
156
|
+
c.onRowClick(data[0]);
|
|
227
157
|
},
|
|
228
|
-
"
|
|
229
|
-
data
|
|
230
|
-
}) => {
|
|
158
|
+
"onEventDblClick": (value) => {
|
|
231
159
|
const {
|
|
232
|
-
|
|
233
|
-
} =
|
|
234
|
-
|
|
235
|
-
"class": this.ns.b("day")
|
|
236
|
-
}, [createVNode("p", {
|
|
237
|
-
"class": this.ns.b("date-text")
|
|
238
|
-
}, [date.getDate()]), createVNode("div", {
|
|
239
|
-
"class": this.ns.b("items")
|
|
240
|
-
}, [renderCalendarItems(date)])]);
|
|
160
|
+
data
|
|
161
|
+
} = value;
|
|
162
|
+
c.onDbRowClick(data[0]);
|
|
241
163
|
}
|
|
164
|
+
}, _isSlot(slots) ? slots : {
|
|
165
|
+
default: () => [slots]
|
|
242
166
|
})]);
|
|
243
167
|
};
|
|
244
168
|
const renderNoData = () => {
|
|
245
169
|
const {
|
|
246
170
|
isLoaded
|
|
247
|
-
} =
|
|
171
|
+
} = c.state;
|
|
248
172
|
return isLoaded && createVNode(resolveComponent("iBizNoData"), {
|
|
249
|
-
"text":
|
|
250
|
-
"emptyTextLanguageRes":
|
|
251
|
-
"enableShowImage": this.c.state.hideNoDataImage
|
|
173
|
+
"text": c.model.emptyText,
|
|
174
|
+
"emptyTextLanguageRes": c.model.emptyTextLanguageRes
|
|
252
175
|
}, null);
|
|
253
176
|
};
|
|
254
177
|
const renderTimeLine = () => {
|
|
255
178
|
return createVNode("div", {
|
|
256
|
-
"class":
|
|
179
|
+
"class": ns.b("timeline-content")
|
|
257
180
|
}, [createVNode(resolveComponent("el-timeline"), null, {
|
|
258
|
-
default: () => [
|
|
181
|
+
default: () => [c.state.items.length > 0 ? c.state.items.map((item) => {
|
|
259
182
|
var _a;
|
|
260
|
-
const model = (_a =
|
|
183
|
+
const model = (_a = c.model.sysCalendarItems) == null ? void 0 : _a.find((calendarItems) => {
|
|
261
184
|
return item.itemType === calendarItems.itemType;
|
|
262
185
|
});
|
|
263
186
|
return createVNode(resolveComponent("el-timeline-item"), {
|
|
@@ -272,19 +195,27 @@ const CalendarControl = /* @__PURE__ */ defineComponent({
|
|
|
272
195
|
})]);
|
|
273
196
|
};
|
|
274
197
|
const renderCalendar = () => {
|
|
275
|
-
switch (
|
|
198
|
+
switch (c.model.calendarStyle) {
|
|
276
199
|
case "TIMELINE":
|
|
277
200
|
return renderTimeLine();
|
|
278
|
-
break;
|
|
279
201
|
default:
|
|
280
202
|
return renderElCalender();
|
|
281
|
-
break;
|
|
282
203
|
}
|
|
283
204
|
};
|
|
205
|
+
return {
|
|
206
|
+
c,
|
|
207
|
+
ns,
|
|
208
|
+
calendarRef,
|
|
209
|
+
selectDate,
|
|
210
|
+
renderCalendar
|
|
211
|
+
};
|
|
212
|
+
},
|
|
213
|
+
render() {
|
|
214
|
+
let _slot;
|
|
284
215
|
return createVNode(resolveComponent("iBizControlBase"), {
|
|
285
216
|
"controller": this.c
|
|
286
|
-
}, _isSlot(
|
|
287
|
-
default: () => [
|
|
217
|
+
}, _isSlot(_slot = this.renderCalendar()) ? _slot : {
|
|
218
|
+
default: () => [_slot]
|
|
288
219
|
});
|
|
289
220
|
}
|
|
290
221
|
});
|
|
@@ -0,0 +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:#999;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--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:#f5f5f5;border-radius:4px;position:relative;cursor:pointer}.ibiz-calendar-daily__allday-info--event-content:active{animation:move 1s linear}.ibiz-calendar-daily__allday-info--morphing-animation{height:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background-color:pink;animation:move 1s linear}.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{width:100%;height:100%;padding:12px 8px;line-height:100%;border:none;outline:0;text-align:left;overflow:hidden;position:relative;z-index:3;cursor:pointer}.ibiz-calendar-daily__time-pane--event-content:active{animation:pulse 1s linear}.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%;line-height:30px;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:#fff}.ibiz-calendar-daily__event-popover{padding:0;width:auto;height:auto;position:relative}.ibiz-calendar-daily__event-popover.el-popover.el-popper{padding:24px 12px 8px 12px}.ibiz-calendar-daily__event-popover--body{width:auto;height:auto;overflow:hidden}.ibiz-calendar-daily__event-popover--scroll{width:auto;height:auto;min-width:200px;min-height:100px;overflow:auto}.ibiz-calendar-daily__event-popover--close{position:absolute;right:8px;top:8px;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:#fff}.ibiz-calendar-daily__event-popover .el-icon{font-size:20px;min-height:24px;min-width:24px;display:flex;justify-content:center;align-items:center}.ibiz-calendar-daily__event-popover .el-icon svg{fill:var(--el-text-color-secondary)}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}100%{transform:scale(1)}}@keyframes move{0%{transform:scale(1)}50%{transform:scale(1.03)}100%{transform:scale(1)}}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import './calendar-daily.scss';
|
|
2
|
+
export declare const CalendarDaily: import("vue").DefineComponent<IParams, {
|
|
3
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
4
|
+
calendarDaily: import("vue").Ref<any>;
|
|
5
|
+
renderHeader: () => JSX.Element;
|
|
6
|
+
renderContent: () => JSX.Element;
|
|
7
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
pick: (value: import("dayjs").Dayjs) => boolean;
|
|
9
|
+
eventClick: (value: IParams) => IParams;
|
|
10
|
+
eventDblClick: (value: IParams) => IParams;
|
|
11
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<IParams>> & {
|
|
12
|
+
onEventClick?: ((value: IParams) => any) | undefined;
|
|
13
|
+
onEventDblClick?: ((value: IParams) => any) | undefined;
|
|
14
|
+
onPick?: ((value: import("dayjs").Dayjs) => any) | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
[x: symbol]: any;
|
|
18
|
+
}, {}>;
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { watch, onMounted, onUnmounted, createVNode, defineComponent } from 'vue';
|
|
2
|
+
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
+
import '../interface/index.mjs';
|
|
4
|
+
import '../util/index.mjs';
|
|
5
|
+
import { useCalendarDaily } from './use-calendar-daily.mjs';
|
|
6
|
+
import './calendar-daily.css';
|
|
7
|
+
import { calendarDailyProps, calendarDailyEmits } from '../interface/calendar-daily.mjs';
|
|
8
|
+
import { isToday } from '../util/util.mjs';
|
|
9
|
+
|
|
10
|
+
"use strict";
|
|
11
|
+
const CalendarDaily = /* @__PURE__ */ defineComponent({
|
|
12
|
+
name: "CalendarDaily",
|
|
13
|
+
props: calendarDailyProps,
|
|
14
|
+
emits: calendarDailyEmits,
|
|
15
|
+
setup(props, {
|
|
16
|
+
emit,
|
|
17
|
+
slots
|
|
18
|
+
}) {
|
|
19
|
+
const ns = useNamespace("calendar-daily");
|
|
20
|
+
const {
|
|
21
|
+
drawData,
|
|
22
|
+
curTimeTop,
|
|
23
|
+
curTimeVal,
|
|
24
|
+
resizableHand,
|
|
25
|
+
events,
|
|
26
|
+
curTimeTimer,
|
|
27
|
+
calendarDaily,
|
|
28
|
+
selectedData,
|
|
29
|
+
eventClick,
|
|
30
|
+
handleDrag,
|
|
31
|
+
handleDragStart,
|
|
32
|
+
handleCurTime,
|
|
33
|
+
initDrawData
|
|
34
|
+
} = useCalendarDaily(props, emit);
|
|
35
|
+
watch(() => props.selectedData, () => {
|
|
36
|
+
if (props.selectedData && props.selectedData.length > 0) {
|
|
37
|
+
const data = props.selectedData.length > selectedData.value.length ? props.selectedData : selectedData.value;
|
|
38
|
+
selectedData.value = data;
|
|
39
|
+
} else {
|
|
40
|
+
selectedData.value = [];
|
|
41
|
+
}
|
|
42
|
+
}, {
|
|
43
|
+
immediate: true,
|
|
44
|
+
deep: true
|
|
45
|
+
});
|
|
46
|
+
onMounted(() => {
|
|
47
|
+
handleCurTime();
|
|
48
|
+
drawData.value = initDrawData();
|
|
49
|
+
curTimeTimer.value = setInterval(() => handleCurTime(), 1e3);
|
|
50
|
+
});
|
|
51
|
+
onUnmounted(() => {
|
|
52
|
+
const timer = curTimeTimer.value;
|
|
53
|
+
if (timer) {
|
|
54
|
+
clearInterval(timer);
|
|
55
|
+
curTimeTimer.value = null;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
const renderEventItem = (location, eventBoxStyle, eventContentStyle, event, index, slotNme, classEName) => {
|
|
59
|
+
var _a;
|
|
60
|
+
return createVNode("div", {
|
|
61
|
+
"key": index,
|
|
62
|
+
"class": [ns.em(classEName, "event-box")],
|
|
63
|
+
"style": eventBoxStyle
|
|
64
|
+
}, [createVNode("button", {
|
|
65
|
+
"class": [ns.em(classEName, "event-content"), event.isSelectedEvent ? "is-selected-event" : "", event.classname],
|
|
66
|
+
"onClick": () => eventClick(event, "head"),
|
|
67
|
+
"style": eventContentStyle
|
|
68
|
+
}, [slots[slotNme] ? (_a = slots[slotNme]) == null ? void 0 : _a.call(slots, {
|
|
69
|
+
data: event
|
|
70
|
+
}) : createVNode("div", {
|
|
71
|
+
"class": [ns.em(classEName, "event-summary"), event.classname],
|
|
72
|
+
"title": "".concat(event.text || "", " ").concat(event.timeRange || "")
|
|
73
|
+
}, [event.icon && createVNode("span", {
|
|
74
|
+
"class": [event.icon, ns.em(classEName, "event-icon")],
|
|
75
|
+
"style": {
|
|
76
|
+
color: event.bkColor
|
|
77
|
+
}
|
|
78
|
+
}, null), event.text && createVNode("span", {
|
|
79
|
+
"class": [ns.em(classEName, "event-name")]
|
|
80
|
+
}, [event.text])]), location === "header" && event.isSelectedEvent ? createVNode("span", {
|
|
81
|
+
"class": ["fa fa-check", ns.em(classEName, "check")]
|
|
82
|
+
}, null) : ""])]);
|
|
83
|
+
};
|
|
84
|
+
const renderHeader = () => {
|
|
85
|
+
return createVNode("div", {
|
|
86
|
+
"class": [ns.e("calendar-daily__head")],
|
|
87
|
+
"ref": (el) => {
|
|
88
|
+
resizableHand.value = el;
|
|
89
|
+
}
|
|
90
|
+
}, [createVNode("div", {
|
|
91
|
+
"class": ns.e("allday-info")
|
|
92
|
+
}, [ibiz.i18n.t("control.calendar.calendardaily.tip")]), createVNode("div", {
|
|
93
|
+
"class": ns.em("allday-info", "work-items")
|
|
94
|
+
}, [createVNode("div", {
|
|
95
|
+
"class": ns.em("allday-info", "work-items-scroll")
|
|
96
|
+
}, [createVNode("div", {
|
|
97
|
+
"class": ns.em("allday-info", "work-items-body")
|
|
98
|
+
}, [events.value.map((event, index) => {
|
|
99
|
+
const eventBoxStyle = {};
|
|
100
|
+
const eventContentStyle = {
|
|
101
|
+
color: event.color,
|
|
102
|
+
background: event.bkColorFade
|
|
103
|
+
};
|
|
104
|
+
return renderEventItem("header", eventBoxStyle, eventContentStyle, event, index, "head-event", "allday-info");
|
|
105
|
+
})])])]), createVNode("div", {
|
|
106
|
+
"class": ns.e("resizable-handle"),
|
|
107
|
+
"draggable": "true",
|
|
108
|
+
"onDrag": (event) => handleDrag(event),
|
|
109
|
+
"onDragstart": (event) => handleDragStart(event)
|
|
110
|
+
}, [createVNode("div", {
|
|
111
|
+
"class": ns.e("allday-resize-line")
|
|
112
|
+
}, null)])]);
|
|
113
|
+
};
|
|
114
|
+
const renderContent = () => {
|
|
115
|
+
return createVNode("div", {
|
|
116
|
+
"class": [ns.e("scroll-area")]
|
|
117
|
+
}, [createVNode("div", {
|
|
118
|
+
"class": ns.e("time-pane")
|
|
119
|
+
}, [createVNode("div", {
|
|
120
|
+
"class": ns.em("time-pane", "time-labels")
|
|
121
|
+
}, [drawData.value.map((timescale) => createVNode("div", {
|
|
122
|
+
"key": timescale,
|
|
123
|
+
"class": [ns.em("time-pane", "time-label")]
|
|
124
|
+
}, [timescale]))]), createVNode("div", {
|
|
125
|
+
"class": ns.em("time-pane", "time-columns")
|
|
126
|
+
}, [drawData.value.map((timescale, index) => createVNode("div", {
|
|
127
|
+
"key": timescale,
|
|
128
|
+
"class": [ns.em("time-pane", "time-column"), index === drawData.value.length - 1 && ns.em("time-pane", "time-column-last")]
|
|
129
|
+
}, null)), createVNode("div", {
|
|
130
|
+
"class": ns.em("time-pane", "event-timed-container")
|
|
131
|
+
}, [createVNode("div", {
|
|
132
|
+
"class": ns.em("time-pane", "container-scroll")
|
|
133
|
+
}, [events.value.map((event, index) => {
|
|
134
|
+
const eventBoxStyle = {
|
|
135
|
+
top: "".concat(event.styleTop, "px"),
|
|
136
|
+
left: "".concat(event.styleLeft),
|
|
137
|
+
height: "".concat(event.height, "px"),
|
|
138
|
+
width: "".concat(event.width),
|
|
139
|
+
"min-height": "".concat(event.height, "px"),
|
|
140
|
+
"z-index": event.zIndex
|
|
141
|
+
};
|
|
142
|
+
const eventContentStyle = {
|
|
143
|
+
background: event.bkColorFade,
|
|
144
|
+
"border-left": "3px solid ".concat(event.bkColor),
|
|
145
|
+
color: event.color
|
|
146
|
+
};
|
|
147
|
+
const tempContent = renderEventItem("content", eventBoxStyle, eventContentStyle, event, index, "event", "time-pane");
|
|
148
|
+
return tempContent;
|
|
149
|
+
})])])]), isToday(props == null ? void 0 : props.selectedDay, /* @__PURE__ */ new Date()) ? createVNode("div", {
|
|
150
|
+
"class": ns.em("time-pane", "current-time"),
|
|
151
|
+
"style": {
|
|
152
|
+
top: "".concat(curTimeTop.value, "px")
|
|
153
|
+
}
|
|
154
|
+
}, [createVNode("div", {
|
|
155
|
+
"class": ns.em("time-pane", "current-time-label")
|
|
156
|
+
}, [curTimeVal.value])]) : ""])]);
|
|
157
|
+
};
|
|
158
|
+
return {
|
|
159
|
+
ns,
|
|
160
|
+
calendarDaily,
|
|
161
|
+
renderHeader,
|
|
162
|
+
renderContent
|
|
163
|
+
};
|
|
164
|
+
},
|
|
165
|
+
render() {
|
|
166
|
+
return createVNode("div", {
|
|
167
|
+
"ref": (el) => {
|
|
168
|
+
this.calendarDaily = el;
|
|
169
|
+
},
|
|
170
|
+
"class": this.ns.b()
|
|
171
|
+
}, [this.renderHeader(), this.renderContent()]);
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
export { CalendarDaily };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const IBizCalendarDaily: import("@ibiz-template/vue3-util").TypeWithInstall<import("vue").DefineComponent<IParams, {
|
|
2
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
3
|
+
calendarDaily: import("vue").Ref<any>;
|
|
4
|
+
renderHeader: () => JSX.Element;
|
|
5
|
+
renderContent: () => JSX.Element;
|
|
6
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
pick: (value: import("dayjs").Dayjs) => boolean;
|
|
8
|
+
eventClick: (value: IParams) => IParams;
|
|
9
|
+
eventDblClick: (value: IParams) => IParams;
|
|
10
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<IParams>> & {
|
|
11
|
+
onEventClick?: ((value: IParams) => any) | undefined;
|
|
12
|
+
onEventDblClick?: ((value: IParams) => any) | undefined;
|
|
13
|
+
onPick?: ((value: import("dayjs").Dayjs) => any) | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
[x: symbol]: any;
|
|
17
|
+
}, {}>>;
|
|
18
|
+
export default IBizCalendarDaily;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { withInstall } from '@ibiz-template/vue3-util';
|
|
2
|
+
import { CalendarDaily } from './calendar-daily.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
const IBizCalendarDaily = withInstall(CalendarDaily, function(v) {
|
|
6
|
+
v.component(CalendarDaily.name, CalendarDaily);
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export { IBizCalendarDaily, IBizCalendarDaily as default };
|