@ibiz-template/vue3-components 0.7.41-alpha.13 → 0.7.41-alpha.15

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.
Files changed (139) hide show
  1. package/dist/index-1hn7qv2s.js +4 -0
  2. package/dist/index.min.css +1 -1
  3. package/dist/index.system.min.js +1 -1
  4. package/dist/map-chart-3dojS1dZ.js +1 -0
  5. package/dist/{wang-editor-Iw-hqw1q.js → wang-editor-yDknWojV.js} +1 -1
  6. package/dist/{xlsx-util-FnTIZeKq.js → xlsx-util-8l4wyK1s.js} +1 -1
  7. package/es/common/carousel/carousel.css +1 -1
  8. package/es/common/map-chart/map-chart.mjs +6 -14
  9. package/es/control/calendar/calendar-util.d.ts +12 -0
  10. package/es/control/calendar/calendar-util.mjs +30 -1
  11. package/es/control/calendar/calendar.css +1 -1
  12. package/es/control/calendar/calendar.d.ts +2 -0
  13. package/es/control/calendar/calendar.mjs +110 -26
  14. package/es/control/calendar/components/calendar-daily/calendar-daily.css +1 -1
  15. package/es/control/calendar/components/calendar-daily/calendar-daily.d.ts +2 -0
  16. package/es/control/calendar/components/calendar-daily/calendar-daily.mjs +66 -16
  17. package/es/control/calendar/components/calendar-daily/index.d.ts +2 -0
  18. package/es/control/calendar/components/calendar-daily/use-calendar-daily.d.ts +3 -1
  19. package/es/control/calendar/components/calendar-daily/use-calendar-daily.mjs +99 -44
  20. package/es/control/calendar/components/calendar-week/calendar-week.css +1 -1
  21. package/es/control/calendar/components/calendar-week/calendar-week.d.ts +6 -0
  22. package/es/control/calendar/components/calendar-week/calendar-week.mjs +74 -38
  23. package/es/control/calendar/components/calendar-week/index.d.ts +6 -0
  24. package/es/control/calendar/components/calendar-week/use-calendar-week.d.ts +12 -1
  25. package/es/control/calendar/components/calendar-week/use-calendar-week.mjs +313 -155
  26. package/es/control/calendar/components/constant/event.d.ts +1 -0
  27. package/es/control/calendar/components/constant/event.mjs +2 -1
  28. package/es/control/calendar/components/constant/index.mjs +1 -1
  29. package/es/control/calendar/components/custom-calendar/custom-calendar.css +1 -1
  30. package/es/control/calendar/components/custom-calendar/custom-calendar.d.ts +2 -0
  31. package/es/control/calendar/components/custom-calendar/custom-calendar.mjs +8 -10
  32. package/es/control/calendar/components/custom-calendar/index.d.ts +2 -0
  33. package/es/control/calendar/components/custom-calendar/use-custom-calendar.mjs +4 -0
  34. package/es/control/calendar/components/interface/calendar-daily.d.ts +1 -0
  35. package/es/control/calendar/components/interface/calendar-daily.mjs +6 -1
  36. package/es/control/calendar/components/interface/calendar-week.d.ts +1 -0
  37. package/es/control/calendar/components/interface/calendar-week.mjs +2 -1
  38. package/es/control/calendar/components/interface/common.d.ts +20 -18
  39. package/es/control/calendar/components/interface/custom-calendar.d.ts +1 -0
  40. package/es/control/calendar/components/interface/custom-calendar.mjs +3 -2
  41. package/es/control/calendar/components/util/index.mjs +1 -1
  42. package/es/control/calendar/components/util/util.d.ts +20 -1
  43. package/es/control/calendar/components/util/util.mjs +10 -2
  44. package/es/control/calendar/index.d.ts +2 -0
  45. package/es/control/drbar/drbar.controller.d.ts +6 -0
  46. package/es/control/drbar/drbar.controller.mjs +8 -0
  47. package/es/control/drbar/drbar.mjs +6 -0
  48. package/es/control/drtab/drtab-control.util.mjs +1 -1
  49. package/es/control/drtab/drtab.controller.d.ts +6 -0
  50. package/es/control/drtab/drtab.controller.mjs +9 -0
  51. package/es/control/drtab/drtab.mjs +13 -0
  52. package/es/control/drtab/flow-drtab.css +1 -1
  53. package/es/control/drtab/flow-drtab.mjs +3 -1
  54. package/es/control/gantt/gantt.mjs +4 -1
  55. package/es/control/grid/virtualized-table/virtualized-table.css +1 -1
  56. package/es/control/grid/virtualized-table/virtualized-table.mjs +4 -3
  57. package/es/control/grid/virtualized-table/virtualized-table.util.mjs +4 -4
  58. package/es/control/kanban/kanban.css +1 -1
  59. package/es/control/kanban/kanban.mjs +6 -9
  60. package/es/control/kanban/swimlane-kanban/swimlane-kanban.css +1 -0
  61. package/es/control/kanban/{lane-kanban/lane-kanban.d.ts → swimlane-kanban/swimlane-kanban.d.ts} +3 -2
  62. package/es/control/kanban/{lane-kanban/lane-kanban.mjs → swimlane-kanban/swimlane-kanban.mjs} +22 -29
  63. package/es/control/map/map.mjs +1 -1
  64. package/es/control/medit-view-panel/index.d.ts +2 -0
  65. package/es/control/medit-view-panel/medit-view-panel.d.ts +2 -0
  66. package/es/control/medit-view-panel/medit-view-panel.mjs +19 -6
  67. package/es/control/search-bar/search-bar.mjs +1 -1
  68. package/es/control/tab-exp-panel/index.d.ts +1 -0
  69. package/es/control/tab-exp-panel/tab-exp-panel.css +1 -1
  70. package/es/control/tab-exp-panel/tab-exp-panel.d.ts +2 -1
  71. package/es/control/tab-exp-panel/tab-exp-panel.mjs +21 -2
  72. package/es/control/tree/tree.mjs +4 -1
  73. package/es/editor/span/span/span.mjs +2 -1
  74. package/es/util/fullscreen/fullscreen-util.mjs +1 -1
  75. package/es/view-engine/custom-view.engine.d.ts +1 -1
  76. package/es/view-engine/custom-view.engine.mjs +5 -5
  77. package/es/view-engine/de-index-view-engine.mjs +1 -1
  78. package/es/view-engine/edit-view.engine.mjs +1 -1
  79. package/es/view-engine/index.mjs +4 -0
  80. package/es/view-engine/md-custom-view.engine.d.ts +1 -1
  81. package/es/view-engine/md-custom-view.engine.mjs +5 -5
  82. package/es/view-engine/opt-view.engine.mjs +1 -1
  83. package/lib/common/carousel/carousel.css +1 -1
  84. package/lib/common/map-chart/map-chart.cjs +5 -13
  85. package/lib/control/calendar/calendar-util.cjs +30 -0
  86. package/lib/control/calendar/calendar.cjs +108 -24
  87. package/lib/control/calendar/calendar.css +1 -1
  88. package/lib/control/calendar/components/calendar-daily/calendar-daily.cjs +64 -14
  89. package/lib/control/calendar/components/calendar-daily/calendar-daily.css +1 -1
  90. package/lib/control/calendar/components/calendar-daily/use-calendar-daily.cjs +98 -43
  91. package/lib/control/calendar/components/calendar-week/calendar-week.cjs +73 -37
  92. package/lib/control/calendar/components/calendar-week/calendar-week.css +1 -1
  93. package/lib/control/calendar/components/calendar-week/use-calendar-week.cjs +311 -153
  94. package/lib/control/calendar/components/constant/event.cjs +2 -0
  95. package/lib/control/calendar/components/constant/index.cjs +1 -0
  96. package/lib/control/calendar/components/custom-calendar/custom-calendar.cjs +8 -10
  97. package/lib/control/calendar/components/custom-calendar/custom-calendar.css +1 -1
  98. package/lib/control/calendar/components/custom-calendar/use-custom-calendar.cjs +4 -0
  99. package/lib/control/calendar/components/interface/calendar-daily.cjs +6 -1
  100. package/lib/control/calendar/components/interface/calendar-week.cjs +2 -1
  101. package/lib/control/calendar/components/interface/custom-calendar.cjs +2 -1
  102. package/lib/control/calendar/components/util/index.cjs +2 -0
  103. package/lib/control/calendar/components/util/util.cjs +11 -1
  104. package/lib/control/drbar/drbar.cjs +6 -0
  105. package/lib/control/drbar/drbar.controller.cjs +8 -0
  106. package/lib/control/drtab/drtab-control.util.cjs +1 -1
  107. package/lib/control/drtab/drtab.cjs +13 -0
  108. package/lib/control/drtab/drtab.controller.cjs +9 -0
  109. package/lib/control/drtab/flow-drtab.cjs +3 -1
  110. package/lib/control/drtab/flow-drtab.css +1 -1
  111. package/lib/control/gantt/gantt.cjs +4 -1
  112. package/lib/control/grid/virtualized-table/virtualized-table.cjs +3 -2
  113. package/lib/control/grid/virtualized-table/virtualized-table.css +1 -1
  114. package/lib/control/grid/virtualized-table/virtualized-table.util.cjs +4 -4
  115. package/lib/control/kanban/kanban.cjs +6 -9
  116. package/lib/control/kanban/kanban.css +1 -1
  117. package/lib/control/kanban/{lane-kanban/lane-kanban.cjs → swimlane-kanban/swimlane-kanban.cjs} +22 -29
  118. package/lib/control/kanban/swimlane-kanban/swimlane-kanban.css +1 -0
  119. package/lib/control/map/map.cjs +1 -1
  120. package/lib/control/medit-view-panel/medit-view-panel.cjs +19 -6
  121. package/lib/control/search-bar/search-bar.cjs +1 -1
  122. package/lib/control/tab-exp-panel/tab-exp-panel.cjs +20 -1
  123. package/lib/control/tab-exp-panel/tab-exp-panel.css +1 -1
  124. package/lib/control/tree/tree.cjs +4 -1
  125. package/lib/editor/span/span/span.cjs +2 -1
  126. package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
  127. package/lib/view-engine/custom-view.engine.cjs +5 -5
  128. package/lib/view-engine/de-index-view-engine.cjs +1 -1
  129. package/lib/view-engine/edit-view.engine.cjs +1 -1
  130. package/lib/view-engine/index.cjs +4 -0
  131. package/lib/view-engine/md-custom-view.engine.cjs +5 -5
  132. package/lib/view-engine/opt-view.engine.cjs +1 -1
  133. package/package.json +5 -5
  134. package/dist/index-LzKAcXeH.js +0 -4
  135. package/dist/map-chart-HL7emT5a.js +0 -1
  136. package/es/control/kanban/lane-kanban/lane-kanban.css +0 -1
  137. package/lib/control/kanban/lane-kanban/lane-kanban.css +0 -1
  138. /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.12_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.14_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
  139. /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.12_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.14_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
@@ -1,6 +1,6 @@
1
- import { ref, computed } from 'vue';
1
+ import { ref, computed, nextTick, watch } from 'vue';
2
2
  import '../util/index.mjs';
3
- import { getCurWeekDates, isToday, isDateInCurWeek, isTimeGreaterThan, handleTimeRange, handleBkColor, fade, handleEVentClick } from '../util/util.mjs';
3
+ import { handleTimeRange, isToday, handleBkColor, fade, isDateInCurWeek, isTimeGreaterThan, checkDateRangeIncludes, getCurWeekDates, handleEmit } from '../util/util.mjs';
4
4
 
5
5
  "use strict";
6
6
  const useCalendarWeek = (props, emit) => {
@@ -28,7 +28,11 @@ const useCalendarWeek = (props, emit) => {
28
28
  };
29
29
  const handleDrag = (event) => {
30
30
  const heightChange = event.clientY - initialMouseY + initialHeight;
31
- resizableHand.value.style.height = "".concat(heightChange, "px");
31
+ if (heightChange < 320)
32
+ resizableHand.value.style.height = "".concat(heightChange, "px");
33
+ };
34
+ const handleDragEnd = () => {
35
+ initHeaderEventScroll();
32
36
  };
33
37
  const getDateRanges = (firstDate, lastDate) => {
34
38
  const firstDay = new Date(firstDate);
@@ -41,12 +45,153 @@ const useCalendarWeek = (props, emit) => {
41
45
  }
42
46
  return dateArray;
43
47
  };
48
+ const handleEventItemUIData = (_event, _weekDay, tempColors, _length, _index) => {
49
+ const tempEventContent = {};
50
+ const { targetLegend } = _event;
51
+ Object.assign(tempEventContent, _event);
52
+ Object.assign(tempEventContent, { zIndex: _index + 1 });
53
+ const percentage = Number((100 / _length).toFixed(3));
54
+ const width = "".concat(percentage, "%");
55
+ const styleLeft = "".concat(_index * percentage, "%");
56
+ Object.assign(tempEventContent, { width, styleLeft });
57
+ let height = "auto";
58
+ let styleTop = 60;
59
+ const timeRange = handleTimeRange(
60
+ _event.beginTime,
61
+ _event.endTime,
62
+ "YYYY-MM-DD HH:mm:ss"
63
+ );
64
+ if (isToday(_event.beginTime, _event.endTime)) {
65
+ height = getEventHeight(_event.beginTime, _event.endTime);
66
+ const tempVal = handleTopOrCurVal(new Date(_event.beginTime));
67
+ styleTop = tempVal.styleTop;
68
+ } else if (isToday(_event.beginTime, _weekDay.date) && !isToday(_event.endTime, _weekDay.date)) {
69
+ const endDate = new Date(_weekDay.date);
70
+ endDate.setHours(23, 59, 59, 0);
71
+ height = getEventHeight(_event.beginTime, endDate);
72
+ const tempVal = handleTopOrCurVal(new Date(_event.beginTime));
73
+ styleTop = tempVal.styleTop;
74
+ } else if (isToday(_event.endTime, _weekDay.date) && !isToday(_event.beginTime, _weekDay.date)) {
75
+ const beginDate = new Date(_weekDay.date);
76
+ beginDate.setHours(0, 0, 0, 0);
77
+ height = getEventHeight(beginDate, _event.endTime);
78
+ const tempVal = handleTopOrCurVal(new Date(beginDate));
79
+ styleTop = tempVal.styleTop;
80
+ } else {
81
+ const date = new Date(_weekDay.date);
82
+ const beginDate = new Date(date.setHours(0, 0, 0, 0));
83
+ const endDate = new Date(date.setHours(23, 59, 59, 59));
84
+ height = getEventHeight(beginDate, endDate);
85
+ const tempVal = handleTopOrCurVal(new Date(beginDate));
86
+ styleTop = tempVal.styleTop;
87
+ }
88
+ Object.assign(tempEventContent, { height, styleTop, timeRange });
89
+ if (!(_event == null ? void 0 : _event.bkColor)) {
90
+ const bkColor = targetLegend && targetLegend.bkcolor || handleBkColor(tempColors, _event.itemType);
91
+ Object.assign(tempEventContent, { bkColor });
92
+ }
93
+ if (tempEventContent.bkColor) {
94
+ const tempBkColor = fade(tempEventContent.bkColor, 10);
95
+ Object.assign(tempEventContent, {
96
+ bkColorFade: tempBkColor
97
+ });
98
+ }
99
+ if (!(_event == null ? void 0 : _event.color)) {
100
+ const tempColor = targetLegend && targetLegend.color;
101
+ Object.assign(tempEventContent, {
102
+ color: tempColor
103
+ });
104
+ }
105
+ if ((tempEventContent == null ? void 0 : tempEventContent.height) && (tempEventContent == null ? void 0 : tempEventContent.height) > 10) {
106
+ const border = "1px solid #FFF";
107
+ Object.assign(tempEventContent, { border });
108
+ } else {
109
+ Object.assign(tempEventContent, { border: "none" });
110
+ }
111
+ return tempEventContent;
112
+ };
113
+ const handleHeaderEventItemUIData = (_event, _weekDay, _firstDay, _lastDay, _length, _index, _hostIndex) => {
114
+ const tempEventHeader = {};
115
+ Object.assign(tempEventHeader, _event);
116
+ Object.assign(tempEventHeader, {
117
+ width: 0,
118
+ styleLeft: 0
119
+ });
120
+ let headerEVentWidth = 0;
121
+ let headerEventLeft = 0;
122
+ if (isDateInCurWeek(_event.beginTime, _firstDay, _lastDay) && isDateInCurWeek(_event.endTime, _firstDay, _lastDay)) {
123
+ const eventWidth = handleHeaderEventWidth(
124
+ _event.beginTime,
125
+ _event.endTime,
126
+ _firstDay,
127
+ _lastDay
128
+ );
129
+ const eventLeft = handleHeaderEventLeft(
130
+ _event.beginTime,
131
+ _firstDay,
132
+ _lastDay
133
+ );
134
+ headerEVentWidth = "".concat(eventWidth, "%");
135
+ headerEventLeft = "".concat(eventLeft, "%");
136
+ } else if (isDateInCurWeek(_event.beginTime, _firstDay, _lastDay) && !isDateInCurWeek(_event.endTime, _firstDay, _lastDay)) {
137
+ const eventWidth = handleHeaderEventWidth(
138
+ _event.beginTime,
139
+ _lastDay,
140
+ _firstDay,
141
+ _lastDay
142
+ );
143
+ const eventLeft = handleHeaderEventLeft(
144
+ _event.beginTime,
145
+ _firstDay,
146
+ _lastDay
147
+ );
148
+ headerEVentWidth = "".concat(eventWidth, "%");
149
+ headerEventLeft = "".concat(eventLeft, "%");
150
+ } else if (isDateInCurWeek(_event.endTime, _firstDay, _lastDay) && !isDateInCurWeek(_event.beginTime, _firstDay, _lastDay)) {
151
+ const eventWidth = handleHeaderEventWidth(
152
+ _firstDay,
153
+ _event.endTime,
154
+ _firstDay,
155
+ _lastDay
156
+ );
157
+ headerEVentWidth = "".concat(eventWidth, "%");
158
+ headerEventLeft = "".concat(0, "%");
159
+ } else if (!isDateInCurWeek(_event.endTime, _firstDay, _lastDay) && !isDateInCurWeek(_event.beginTime, _firstDay, _lastDay) && isTimeGreaterThan(_firstDay, _event.beginTime) && isTimeGreaterThan(_event.endTime, _firstDay)) {
160
+ const eventWidth = handleHeaderEventWidth(
161
+ _firstDay,
162
+ _lastDay,
163
+ _firstDay,
164
+ _lastDay
165
+ );
166
+ headerEVentWidth = "".concat(eventWidth, "%");
167
+ headerEventLeft = "".concat(0, "%");
168
+ }
169
+ Object.assign(tempEventHeader, {
170
+ width: headerEVentWidth,
171
+ styleLeft: headerEventLeft
172
+ });
173
+ let eventHeaderIsShow = false;
174
+ if (isDateInCurWeek(_event.beginTime, _firstDay, _lastDay) && isToday(_event.beginTime, _weekDay.date)) {
175
+ eventHeaderIsShow = true;
176
+ } else if (_hostIndex === 0) {
177
+ eventHeaderIsShow = true;
178
+ }
179
+ const _curDate = new Date(_weekDay.date);
180
+ if (!checkDateRangeIncludes(_event.beginTime, _event.endTime, _curDate)) {
181
+ eventHeaderIsShow = false;
182
+ }
183
+ Object.assign(tempEventHeader, {
184
+ isShow: eventHeaderIsShow
185
+ });
186
+ return tempEventHeader;
187
+ };
44
188
  const handleUIEvents = () => {
45
189
  const events = props.events;
46
190
  const curDate = props == null ? void 0 : props.selectedDay;
47
191
  const tempColors = /* @__PURE__ */ new Map();
48
192
  const { firstDay, lastDay } = getCurWeekDates(curDate);
49
193
  const tempArray = [];
194
+ const tempHeaderArray = [];
50
195
  const tempEvents = [];
51
196
  const tempRowsHeader = [];
52
197
  weekDays.value = [];
@@ -76,12 +221,18 @@ const useCalendarWeek = (props, emit) => {
76
221
  const item = { date, day, caption, isActivate };
77
222
  weekDays.value.push(item);
78
223
  tempArray.push([]);
224
+ tempHeaderArray.push([]);
79
225
  tempEvents.push([]);
80
226
  tempRowsHeader.push([]);
81
227
  }
82
228
  events.forEach((event) => {
229
+ const targetLegend = legends.value.find(
230
+ (legendItem) => Object.is(legendItem.id, event.itemType)
231
+ );
232
+ if (!targetLegend || !targetLegend.isShow)
233
+ return;
83
234
  if (event.beginTime) {
84
- const item = {};
235
+ const item = { targetLegend };
85
236
  Object.assign(item, event);
86
237
  const targetEvent = selectedData.value.find(
87
238
  (tempItem) => tempItem.id === event.id
@@ -94,6 +245,13 @@ const useCalendarWeek = (props, emit) => {
94
245
  if (!event.endTime && event.beginTime) {
95
246
  Object.assign(item, { endTime: event.beginTime });
96
247
  }
248
+ if (isDateInCurWeek(item.beginTime, firstDay, lastDay) && isDateInCurWeek(item.endTime, firstDay, lastDay) || isDateInCurWeek(item.beginTime, firstDay, lastDay) && !isDateInCurWeek(item.endTime, firstDay, lastDay) || isDateInCurWeek(item.endTime, firstDay, lastDay) && !isDateInCurWeek(item.beginTime, firstDay, lastDay) || !isDateInCurWeek(event.endTime, firstDay, lastDay) && !isDateInCurWeek(event.beginTime, firstDay, lastDay) && isTimeGreaterThan(firstDay, event.beginTime) && isTimeGreaterThan(event.endTime, firstDay)) {
249
+ const dateArray = getDateRanges(firstDay, lastDay);
250
+ dateArray.forEach((date) => {
251
+ const weekIndex = new Date(date).getDay();
252
+ tempHeaderArray[weekIndex].push({ ...item });
253
+ });
254
+ }
97
255
  if (isDateInCurWeek(item.beginTime, firstDay, lastDay) && isDateInCurWeek(item.endTime, firstDay, lastDay)) {
98
256
  const dateArray = getDateRanges(item.beginTime, item.endTime);
99
257
  dateArray.forEach((date) => {
@@ -135,157 +293,54 @@ const useCalendarWeek = (props, emit) => {
135
293
  return type;
136
294
  });
137
295
  });
296
+ tempHeaderArray.forEach((item) => {
297
+ item.sort((a, b) => {
298
+ const tempA = a;
299
+ const tempB = b;
300
+ const beginTimeDifference = new Date(tempA.beginTime).getTime() - new Date(tempB.beginTime).getTime();
301
+ let type;
302
+ if (beginTimeDifference === 0) {
303
+ type = new Date(tempA.endTime).getTime() - new Date(tempB.endTime).getTime();
304
+ } else {
305
+ type = beginTimeDifference;
306
+ }
307
+ return type;
308
+ });
309
+ });
138
310
  tempArray.forEach((item, hostIndex) => {
139
311
  item.forEach((event, index) => {
140
- const targetLegend = legends.value.find(
141
- (legendItem) => Object.is(legendItem.id, event.itemType)
142
- );
143
- if (targetLegend && targetLegend.isShow || !targetLegend) {
144
- const tempEventContent = {};
145
- const tempEventHeader = {};
312
+ if (event.targetLegend) {
313
+ const length = tempArray[hostIndex].length;
314
+ const weekDay = weekDays.value[hostIndex];
315
+ tempEvents[hostIndex].push(
316
+ handleEventItemUIData(event, weekDay, tempColors, length, index)
317
+ );
318
+ }
319
+ });
320
+ });
321
+ tempHeaderArray.forEach((item, hostIndex) => {
322
+ item.forEach((event, index) => {
323
+ if (event.targetLegend) {
146
324
  const length = tempArray[hostIndex].length;
147
325
  const weekDay = weekDays.value[hostIndex];
148
- Object.assign(tempEventContent, event);
149
- Object.assign(tempEventContent, { zIndex: index + 1 });
150
- const percentage = Number((100 / length).toFixed(3));
151
- const width = "".concat(percentage, "%");
152
- const styleLeft = "".concat(index * percentage, "%");
153
- Object.assign(tempEventContent, { width, styleLeft });
154
- let height = "auto";
155
- let styleTop = 60;
156
- let timeRange = "";
157
- if (isToday(event.beginTime, event.endTime)) {
158
- height = getEventHeight(event.beginTime, event.endTime);
159
- timeRange = handleTimeRange(
160
- event.beginTime,
161
- event.endTime,
162
- "HH:mm"
163
- );
164
- const tempVal = handleTopOrCurVal(new Date(event.beginTime));
165
- styleTop = tempVal.styleTop;
166
- } else if (isToday(event.beginTime, weekDay.date) && !isToday(event.endTime, weekDay.date)) {
167
- const endDate = new Date(weekDay.date);
168
- endDate.setHours(23, 59, 59, 0);
169
- height = getEventHeight(event.beginTime, endDate);
170
- timeRange = handleTimeRange(
171
- event.beginTime,
172
- event.endTime,
173
- "YYYY-MM-DD HH:mm"
174
- );
175
- const tempVal = handleTopOrCurVal(new Date(event.beginTime));
176
- styleTop = tempVal.styleTop;
177
- } else if (isToday(event.endTime, weekDay.date) && !isToday(event.beginTime, weekDay.date)) {
178
- const beginDate = new Date(weekDay.date);
179
- beginDate.setHours(0, 0, 0, 0);
180
- height = getEventHeight(beginDate, event.endTime);
181
- timeRange = handleTimeRange(
182
- event.beginTime,
183
- event.endTime,
184
- "YYYY-MM-DD HH:mm"
185
- );
186
- const tempVal = handleTopOrCurVal(new Date(beginDate));
187
- styleTop = tempVal.styleTop;
188
- } else {
189
- const date = new Date(weekDay.date);
190
- const beginDate = new Date(date.setHours(0, 0, 0, 0));
191
- const endDate = new Date(date.setHours(23, 59, 59, 59));
192
- height = getEventHeight(beginDate, endDate);
193
- timeRange = handleTimeRange(
194
- event.beginTime,
195
- event.endTime,
196
- "YYYY-MM-DD HH:mm"
197
- );
198
- const tempVal = handleTopOrCurVal(new Date(beginDate));
199
- styleTop = tempVal.styleTop;
200
- }
201
- Object.assign(tempEventContent, { height, styleTop, timeRange });
202
- if (!(event == null ? void 0 : event.bkColor)) {
203
- const bkColor = targetLegend ? targetLegend.bkcolor : handleBkColor(tempColors, event.itemType);
204
- Object.assign(tempEventContent, { bkColor });
205
- }
206
- if (tempEventContent.bkColor) {
207
- const tempBkColor = fade(tempEventContent.bkColor, 10);
208
- Object.assign(tempEventContent, {
209
- bkColorFade: tempBkColor
210
- });
211
- }
212
- if ((tempEventContent == null ? void 0 : tempEventContent.height) && (tempEventContent == null ? void 0 : tempEventContent.height) > 10) {
213
- const border = "1px solid #FFF";
214
- Object.assign(tempEventContent, { border });
215
- } else {
216
- Object.assign(tempEventContent, { border: "none" });
217
- }
218
- tempEvents[hostIndex].push(tempEventContent);
219
- if (!isToday(event.beginTime, event.endTime)) {
220
- Object.assign(tempEventHeader, tempEventContent);
221
- Object.assign(tempEventHeader, {
222
- width: 0,
223
- styleLeft: 0
224
- });
225
- let headerEVentWidth = 0;
226
- let headerEventLeft = 0;
227
- if (isDateInCurWeek(event.beginTime, firstDay, lastDay) && isDateInCurWeek(event.endTime, firstDay, lastDay)) {
228
- const eventWidth = handleHeaderEventWidth(
229
- event.beginTime,
230
- event.endTime,
231
- firstDay,
232
- lastDay
233
- );
234
- const eventLeft = handleHeaderEventLeft(
235
- event.beginTime,
236
- firstDay,
237
- lastDay
238
- );
239
- headerEVentWidth = "".concat(eventWidth, "%");
240
- headerEventLeft = "".concat(eventLeft, "%");
241
- } else if (isDateInCurWeek(event.beginTime, firstDay, lastDay) && !isDateInCurWeek(event.endTime, firstDay, lastDay)) {
242
- const eventWidth = handleHeaderEventWidth(
243
- event.beginTime,
244
- lastDay,
245
- firstDay,
246
- lastDay
247
- );
248
- const eventLeft = handleHeaderEventLeft(
249
- event.beginTime,
250
- firstDay,
251
- lastDay
252
- );
253
- headerEVentWidth = "".concat(eventWidth, "%");
254
- headerEventLeft = "".concat(eventLeft, "%");
255
- } else if (isDateInCurWeek(event.endTime, firstDay, lastDay) && !isDateInCurWeek(event.beginTime, firstDay, lastDay)) {
256
- const eventWidth = handleHeaderEventWidth(
257
- firstDay,
258
- event.endTime,
259
- firstDay,
260
- lastDay
261
- );
262
- headerEVentWidth = "".concat(eventWidth, "%");
263
- headerEventLeft = "".concat(0, "%");
264
- } else if (!isDateInCurWeek(event.endTime, firstDay, lastDay) && !isDateInCurWeek(event.beginTime, firstDay, lastDay) && isTimeGreaterThan(firstDay, event.beginTime) && isTimeGreaterThan(event.endTime, firstDay)) {
265
- const eventWidth = handleHeaderEventWidth(
266
- firstDay,
267
- lastDay,
268
- firstDay,
269
- lastDay
270
- );
271
- headerEVentWidth = "".concat(eventWidth, "%");
272
- headerEventLeft = "".concat(0, "%");
273
- }
274
- Object.assign(tempEventHeader, {
275
- width: headerEVentWidth,
276
- styleLeft: headerEventLeft
277
- });
278
- let eventHeaderIsShow = false;
279
- if (isDateInCurWeek(event.beginTime, firstDay, lastDay) && isToday(event.beginTime, weekDay.date)) {
280
- eventHeaderIsShow = true;
281
- } else if (hostIndex === 0) {
282
- eventHeaderIsShow = true;
283
- }
284
- Object.assign(tempEventHeader, {
285
- isShow: eventHeaderIsShow
286
- });
287
- tempRowsHeader[hostIndex].push(tempEventHeader);
288
- }
326
+ const _tempEnent = handleEventItemUIData(
327
+ event,
328
+ weekDay,
329
+ tempColors,
330
+ length,
331
+ index
332
+ );
333
+ tempRowsHeader[hostIndex].push(
334
+ handleHeaderEventItemUIData(
335
+ _tempEnent,
336
+ weekDay,
337
+ firstDay,
338
+ lastDay,
339
+ length,
340
+ index,
341
+ hostIndex
342
+ )
343
+ );
289
344
  }
290
345
  });
291
346
  });
@@ -358,9 +413,10 @@ const useCalendarWeek = (props, emit) => {
358
413
  }
359
414
  return tempDrawData;
360
415
  };
361
- const eventClick = async (item, location) => {
416
+ const handleEventClick = (item, location) => {
362
417
  popVisible.value = false;
363
- const res = await handleEVentClick(
418
+ const res = handleEmit(
419
+ "eventClick",
364
420
  item,
365
421
  location,
366
422
  props.events,
@@ -375,6 +431,97 @@ const useCalendarWeek = (props, emit) => {
375
431
  selectedData.value = tempSelectedData;
376
432
  handleUIEvents();
377
433
  };
434
+ const handleEventDblClick = (item, location) => {
435
+ popVisible.value = false;
436
+ const res = handleEmit(
437
+ "eventDblClick",
438
+ item,
439
+ location,
440
+ props.events,
441
+ multiple.value,
442
+ selectedData.value,
443
+ emit
444
+ );
445
+ const { tempSelectedData, isSelectedEvent } = res;
446
+ if (!isSelectedEvent) {
447
+ Object.assign(item, { isSelectedEvent });
448
+ }
449
+ selectedData.value = tempSelectedData;
450
+ handleUIEvents();
451
+ };
452
+ const headerEventRef = ref();
453
+ const scrollTop = ref(0);
454
+ const thumbHeight = ref(0);
455
+ const enableScroll = ref(false);
456
+ const orginY = ref(0);
457
+ const realHeight = ref(1);
458
+ const visibleHeight = ref(1);
459
+ const isScroll = ref(false);
460
+ const onMouseMove = (event) => {
461
+ if (enableScroll.value) {
462
+ const y = event.clientY - orginY.value;
463
+ scrollTop.value += y;
464
+ orginY.value = event.clientY;
465
+ if (headerEventRef.value) {
466
+ headerEventRef.value.scrollTop = realHeight.value * (scrollTop.value / visibleHeight.value);
467
+ }
468
+ }
469
+ event.preventDefault();
470
+ event.stopPropagation();
471
+ };
472
+ const onMouseUp = (event) => {
473
+ enableScroll.value = false;
474
+ event.preventDefault();
475
+ event.stopPropagation();
476
+ document.removeEventListener("mousemove", onMouseMove);
477
+ document.removeEventListener("mouseup", onMouseUp);
478
+ };
479
+ const onScrollbarMouseDown = (event) => {
480
+ orginY.value = event.clientY;
481
+ enableScroll.value = true;
482
+ event.preventDefault();
483
+ event.stopPropagation();
484
+ document.addEventListener("mousemove", onMouseMove);
485
+ document.addEventListener("mouseup", onMouseUp);
486
+ };
487
+ const onHeaderEventScroll = (event) => {
488
+ var _a, _b, _c;
489
+ const realTop = ((_a = event.target) == null ? void 0 : _a.scrollTop) || 0;
490
+ realHeight.value = (_b = event.target) == null ? void 0 : _b.scrollHeight;
491
+ visibleHeight.value = (_c = event.target) == null ? void 0 : _c.clientHeight;
492
+ const realRatio = realTop / realHeight.value;
493
+ scrollTop.value = realRatio * visibleHeight.value;
494
+ thumbHeight.value = visibleHeight.value * (visibleHeight.value / realHeight.value);
495
+ };
496
+ const initHeaderEventScroll = () => {
497
+ realHeight.value = 0;
498
+ visibleHeight.value = 0;
499
+ isScroll.value = false;
500
+ thumbHeight.value = 0;
501
+ nextTick(() => {
502
+ if (headerEventRef.value) {
503
+ realHeight.value = headerEventRef.value.scrollHeight;
504
+ visibleHeight.value = headerEventRef.value.clientHeight;
505
+ if (realHeight.value > visibleHeight.value) {
506
+ isScroll.value = true;
507
+ }
508
+ thumbHeight.value = visibleHeight.value * (visibleHeight.value / realHeight.value);
509
+ }
510
+ });
511
+ };
512
+ const eventContextmenu = async (item, evt) => {
513
+ emit("eventContextmenu", { evt, data: [item] });
514
+ };
515
+ watch(
516
+ () => headerEventRef.value,
517
+ () => {
518
+ initHeaderEventScroll();
519
+ },
520
+ {
521
+ immediate: true,
522
+ deep: true
523
+ }
524
+ );
378
525
  return {
379
526
  drawData,
380
527
  curTimeTimer,
@@ -388,12 +535,23 @@ const useCalendarWeek = (props, emit) => {
388
535
  legends,
389
536
  rowsHeader,
390
537
  popVisible,
538
+ headerEventRef,
539
+ thumbHeight,
540
+ realHeight,
541
+ scrollTop,
542
+ isScroll,
391
543
  handleCurTime,
392
544
  handleDrag,
393
545
  handleDragStart,
394
- eventClick,
546
+ handleDragEnd,
547
+ handleEventClick,
548
+ handleEventDblClick,
395
549
  initDrawData,
396
- handleUIEvents
550
+ handleUIEvents,
551
+ onScrollbarMouseDown,
552
+ onHeaderEventScroll,
553
+ initHeaderEventScroll,
554
+ eventContextmenu
397
555
  };
398
556
  };
399
557
 
@@ -3,3 +3,4 @@ export declare const CHANGE_EVENT = "change";
3
3
  export declare const INPUT_EVENT = "input";
4
4
  export declare const EVENT_CLICK_EVENT = "eventClick";
5
5
  export declare const EVENT_DBL_CLICK_EVENT = "eventDblClick";
6
+ export declare const EVENT_CONTEXT_MENU = "eventContextmenu";
@@ -4,5 +4,6 @@ const CHANGE_EVENT = "change";
4
4
  const INPUT_EVENT = "input";
5
5
  const EVENT_CLICK_EVENT = "eventClick";
6
6
  const EVENT_DBL_CLICK_EVENT = "eventDblClick";
7
+ const EVENT_CONTEXT_MENU = "eventContextmenu";
7
8
 
8
- export { CHANGE_EVENT, EVENT_CLICK_EVENT, EVENT_DBL_CLICK_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT };
9
+ export { CHANGE_EVENT, EVENT_CLICK_EVENT, EVENT_CONTEXT_MENU, EVENT_DBL_CLICK_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT };
@@ -1,3 +1,3 @@
1
- export { CHANGE_EVENT, EVENT_CLICK_EVENT, EVENT_DBL_CLICK_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT } from './event.mjs';
1
+ export { CHANGE_EVENT, EVENT_CLICK_EVENT, EVENT_CONTEXT_MENU, EVENT_DBL_CLICK_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT } from './event.mjs';
2
2
 
3
3
  "use strict";
@@ -1 +1 @@
1
- .ibiz-custom-calendar{width:100%;height:100%}.ibiz-custom-calendar__calendar-day{display:flex;flex-direction:column;width:100%;min-width:380px;height:100%;min-height:900px;border:1px solid var(--ibiz-color-border)}.ibiz-custom-calendar__calendar-day--header{padding:0 40px;border-bottom:1px solid var(--ibiz-color-border)}.ibiz-custom-calendar__calendar-day--header-top{display:flex;align-items:center;justify-content:space-between;height:70px}.ibiz-custom-calendar__calendar-day--title{min-width:80px;font-size:20px}.ibiz-custom-calendar__calendar-day--text-secondary{height:56px;line-height:56px;text-align:left}.ibiz-custom-calendar__calendar-day--select-time{width:130px;height:32px}.ibiz-custom-calendar__calendar-day--select-time .el-input__suffix{display:none}.ibiz-custom-calendar__calendar-day--legend{display:flex;flex-grow:1;align-items:center;justify-content:center;height:100%;overflow:auto}.ibiz-custom-calendar__calendar-day--legend-item{display:flex;align-items:center;width:auto;height:auto;padding:0 3px;cursor:pointer}.ibiz-custom-calendar__calendar-day--legend-item-tip{display:inline-block;width:26px;height:14px;margin-right:6px;border-radius:4px}.ibiz-custom-calendar__calendar-day--legend-item-text{display:inline-block;width:auto;max-width:100px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.ibiz-custom-calendar__calendar-week{display:flex;flex-direction:column;width:100%;min-width:380px;height:100%;border:1px solid var(--ibiz-color-border)}.ibiz-custom-calendar__calendar-week--header{padding:0 40px;border-bottom:1px solid var(--ibiz-color-border)}.ibiz-custom-calendar__calendar-week--header-top{display:flex;align-items:center;justify-content:space-between;height:70px}.ibiz-custom-calendar__calendar-week--title{min-width:80px;font-size:20px}.ibiz-custom-calendar__calendar-week--text-secondary{height:56px;line-height:56px;text-align:left}.ibiz-custom-calendar__calendar-week--select-time{width:130px;height:32px}.ibiz-custom-calendar__calendar-week--select-time .el-input__suffix{display:none}.ibiz-custom-calendar__calendar-week--legend{display:flex;flex-grow:1;align-items:center;justify-content:center;height:100%;overflow:auto}.ibiz-custom-calendar__calendar-week--legend-item{display:flex;align-items:center;width:auto;height:auto;padding:0 3px;cursor:pointer}.ibiz-custom-calendar__calendar-week--legend-item-tip{display:inline-block;width:26px;height:14px;margin-right:6px;border-radius:4px}.ibiz-custom-calendar__calendar-week--legend-item-text{display:inline-block;width:auto;max-width:100px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.ibiz-custom-calendar__calendar-month{display:flex;flex-direction:column;width:100%;height:100%}.ibiz-custom-calendar__calendar-month--body{flex-grow:1;width:100%;height:calc(100% - 58px)}.ibiz-custom-calendar__calendar-month--legend{display:flex;align-items:center;justify-content:center;width:auto;height:100%}.ibiz-custom-calendar__calendar-month--legend-item{display:flex;align-items:center;width:auto;height:auto;padding:0 3px;cursor:pointer}.ibiz-custom-calendar__calendar-month--legend-item-tip{display:inline-block;width:26px;height:14px;margin-right:6px;border-radius:4px}.ibiz-custom-calendar__calendar-month--legend-item-text{display:inline-block;width:auto;max-width:100px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.ibiz-custom-calendar__calendar-month--header{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:58px;padding:12px 20px;border-bottom:1px solid var(--ibiz-color-border)}.ibiz-custom-calendar__calendar-month--button-group{display:flex;align-items:center;justify-content:space-between;width:388px}.ibiz-custom-calendar__header--title{min-width:120px}.ibiz-custom-calendar .el-date-editor.el-input,.ibiz-custom-calendar .el-date-editor.el-input__wrapper{width:130px;height:32px}
1
+ .ibiz-custom-calendar{width:100%;height:100%}.ibiz-custom-calendar__calendar-day{display:flex;flex-direction:column;width:100%;min-width:380px;height:100%;min-height:900px;border:1px solid var(--ibiz-color-border)}.ibiz-custom-calendar__calendar-day--header{padding:0 40px;border-bottom:1px solid var(--ibiz-color-border)}.ibiz-custom-calendar__calendar-day--header-top{display:flex;align-items:center;justify-content:space-between;height:70px}.ibiz-custom-calendar__calendar-day--title{min-width:80px;font-size:20px}.ibiz-custom-calendar__calendar-day--text-secondary{height:56px;line-height:56px;text-align:left}.ibiz-custom-calendar__calendar-day--select-time{width:130px;height:32px}.ibiz-custom-calendar__calendar-day--select-time .el-input__suffix{display:none}.ibiz-custom-calendar__calendar-day--legend{display:flex;flex-grow:1;align-items:center;justify-content:center;height:100%;overflow:auto}.ibiz-custom-calendar__calendar-day--legend-item{display:flex;align-items:center;width:auto;height:auto;padding:0 var(--ibiz-spacing-tight);line-height:1em;cursor:pointer}.ibiz-custom-calendar__calendar-day--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-custom-calendar__calendar-day--legend-item-text{display:inline-block;width:auto;max-width:100px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.ibiz-custom-calendar__calendar-week{display:flex;flex-direction:column;width:100%;min-width:380px;height:100%;border:1px solid var(--ibiz-color-border)}.ibiz-custom-calendar__calendar-week--header{padding:0 40px;border-bottom:1px solid var(--ibiz-color-border)}.ibiz-custom-calendar__calendar-week--header-top{display:flex;align-items:center;justify-content:space-between;height:70px}.ibiz-custom-calendar__calendar-week--title{min-width:80px;font-size:20px}.ibiz-custom-calendar__calendar-week--text-secondary{height:56px;line-height:56px;text-align:left}.ibiz-custom-calendar__calendar-week--select-time{width:130px;height:32px}.ibiz-custom-calendar__calendar-week--select-time .el-input__suffix{display:none}.ibiz-custom-calendar__calendar-week--legend{display:flex;flex-grow:1;align-items:center;justify-content:center;height:100%;overflow:auto}.ibiz-custom-calendar__calendar-week--legend-item{display:flex;align-items:center;width:auto;height:auto;padding:0 var(--ibiz-spacing-tight);line-height:1em;cursor:pointer}.ibiz-custom-calendar__calendar-week--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-custom-calendar__calendar-week--legend-item-text{display:inline-block;width:auto;max-width:100px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.ibiz-custom-calendar__calendar-month{display:flex;flex-direction:column;width:100%;height:100%}.ibiz-custom-calendar__calendar-month--body{flex-grow:1;width:100%;height:calc(100% - 58px)}.ibiz-custom-calendar__calendar-month--legend{display:flex;align-items:center;justify-content:center;width:auto;height:100%}.ibiz-custom-calendar__calendar-month--legend-item{display:flex;align-items:center;width:auto;height:auto;padding:0 var(--ibiz-spacing-tight);line-height:1em;cursor:pointer}.ibiz-custom-calendar__calendar-month--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-custom-calendar__calendar-month--legend-item-text{display:inline-block;width:auto;max-width:100px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.ibiz-custom-calendar__calendar-month--header{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:58px;padding:12px 20px;border-bottom:1px solid var(--ibiz-color-border)}.ibiz-custom-calendar__calendar-month--button-group{display:flex;align-items:center;justify-content:space-between;width:388px}.ibiz-custom-calendar__header--title{min-width:120px}.ibiz-custom-calendar .el-date-editor.el-input,.ibiz-custom-calendar .el-date-editor.el-input__wrapper{width:130px;height:32px}
@@ -12,12 +12,14 @@ export declare const CustomCalendar: import("vue").DefineComponent<import("@ibiz
12
12
  change: (value: Date) => boolean;
13
13
  eventClick: (value: import("@ibiz-template/core").IApiParams) => import("@ibiz-template/core").IApiParams;
14
14
  eventDblClick: (value: import("@ibiz-template/core").IApiParams) => import("@ibiz-template/core").IApiParams;
15
+ eventContextmenu: (_value: import("@ibiz-template/core").IApiParams) => import("@ibiz-template/core").IApiParams;
15
16
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<import("@ibiz-template/core").IApiParams>> & {
16
17
  onChange?: ((value: Date) => any) | undefined;
17
18
  onInput?: ((value: Date) => any) | undefined;
18
19
  "onUpdate:modelValue"?: ((value: Date) => any) | undefined;
19
20
  onEventClick?: ((value: import("@ibiz-template/core").IApiParams) => any) | undefined;
20
21
  onEventDblClick?: ((value: import("@ibiz-template/core").IApiParams) => any) | undefined;
22
+ onEventContextmenu?: ((_value: import("@ibiz-template/core").IApiParams) => any) | undefined;
21
23
  }, {
22
24
  [x: string]: any;
23
25
  [x: symbol]: any;
@@ -34,6 +34,7 @@ const CustomCalendar = /* @__PURE__ */ defineComponent({
34
34
  pickDay,
35
35
  handleEVentClick,
36
36
  handleEVentDblClick,
37
+ handleEventContextmenu,
37
38
  selectDate,
38
39
  selectLegend
39
40
  } = useCustomCalendar(props, emit, "custom-calendar");
@@ -64,13 +65,10 @@ const CustomCalendar = /* @__PURE__ */ defineComponent({
64
65
  }, [createVNode("div", {
65
66
  "class": ns.em("calendar-week", "legend-item-tip"),
66
67
  "style": {
67
- background: item.isShow ? item.bkcolor : "#CCCCCC"
68
+ background: item.isShow ? item.bkcolor : "var(".concat(ns.cssVarName("color-disabled-bg"), ")")
68
69
  }
69
70
  }, null), createVNode("div", {
70
71
  "class": ns.em("calendar-week", "legend-item-text"),
71
- "style": {
72
- color: item.isShow ? item.color : "#CCCCCC"
73
- },
74
72
  "title": showTitle(item.name)
75
73
  }, [item.name])]);
76
74
  })]), createVNode("div", {
@@ -89,7 +87,8 @@ const CustomCalendar = /* @__PURE__ */ defineComponent({
89
87
  "multiple": multiple.value,
90
88
  "selectedData": selectedData.value,
91
89
  "onEventClick": (value) => handleEVentClick(value),
92
- "onEventDblClick": (value) => handleEVentDblClick(value)
90
+ "onEventDblClick": (value) => handleEVentDblClick(value),
91
+ "onEventContextmenu": (value) => handleEventContextmenu(value)
93
92
  }, slots)]);
94
93
  };
95
94
  const renderDay = () => {
@@ -116,13 +115,10 @@ const CustomCalendar = /* @__PURE__ */ defineComponent({
116
115
  }, [createVNode("div", {
117
116
  "class": ns.em("calendar-week", "legend-item-tip"),
118
117
  "style": {
119
- background: item.isShow ? item.bkcolor : "#CCCCCC"
118
+ background: item.isShow ? item.bkcolor : "var(".concat(ns.cssVarName("color-disabled-bg"), ")")
120
119
  }
121
120
  }, null), createVNode("div", {
122
121
  "class": ns.em("calendar-week", "legend-item-text"),
123
- "style": {
124
- color: item.isShow ? item.color : "#CCCCCC"
125
- },
126
122
  "title": showTitle(item.name)
127
123
  }, [item.name])]);
128
124
  })]), createVNode("div", {
@@ -138,12 +134,14 @@ const CustomCalendar = /* @__PURE__ */ defineComponent({
138
134
  }, [curWeek.value])]), createVNode(IBizCalendarDaily, {
139
135
  "selected-day": realSelectedDay.value,
140
136
  "controller": props.controller,
137
+ "showDetail": props.showDetail,
141
138
  "events": events.value,
142
139
  "legends": legends.value,
143
140
  "multiple": multiple.value,
144
141
  "selectedData": selectedData.value,
145
142
  "onEventClick": (value) => handleEVentClick(value),
146
- "onEventDblClick": (value) => handleEVentDblClick(value)
143
+ "onEventDblClick": (value) => handleEVentDblClick(value),
144
+ "onEventContextmenu": (value) => handleEventContextmenu(value)
147
145
  }, slots)]);
148
146
  };
149
147
  const renderUser = () => {