@opentinyvue/vue-calendar-view 2.22.0 → 3.22.0

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/lib/pc.js CHANGED
@@ -6,314 +6,42 @@ import RadioButton from '@opentinyvue/vue-radio-button';
6
6
  import RadioGroup from '@opentinyvue/vue-radio-group';
7
7
  import Tooltip from '@opentinyvue/vue-tooltip';
8
8
  import { iconCheckedSur, iconPlus, iconChevronLeft, iconChevronRight, iconDayView, iconAgendaView, iconMonthView } from '@opentinyvue/vue-icon';
9
+ import { resolveComponent, openBlock, createElementBlock, normalizeStyle, createElementVNode, createVNode, withCtx, createTextVNode, toDisplayString, renderSlot, createBlock, Fragment, renderList, resolveDynamicComponent, normalizeClass, createCommentVNode } from 'vue';
9
10
 
10
- function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
11
- var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
12
- if (render) {
13
- options.render = render;
14
- options.staticRenderFns = staticRenderFns;
15
- options._compiled = true;
11
+ function _createForOfIteratorHelperLoose(r, e) {
12
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
13
+ if (t) return (t = t.call(r)).next.bind(t);
14
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
15
+ t && (r = t);
16
+ var o = 0;
17
+ return function() {
18
+ return o >= r.length ? { done: true } : { done: false, value: r[o++] };
19
+ };
16
20
  }
17
- var hook;
18
- if (injectStyles) {
19
- hook = injectStyles;
20
- }
21
- if (hook) {
22
- if (options.functional) {
23
- options._injectStyles = hook;
24
- var originalRender = options.render;
25
- options.render = function renderWithStyleInjection(h, context) {
26
- hook.call(context);
27
- return originalRender(h, context);
28
- };
29
- } else {
30
- var existing = options.beforeCreate;
31
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
32
- }
21
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
22
+ }
23
+ function _unsupportedIterableToArray(r, a) {
24
+ if (r) {
25
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
26
+ var t = {}.toString.call(r).slice(8, -1);
27
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
33
28
  }
34
- return {
35
- exports: scriptExports,
36
- options
37
- };
38
29
  }
39
-
40
- var render = function render2() {
41
- var _vm = this;
42
- var _h = _vm.$createElement;
43
- var _c = _vm._self._c || _h;
44
- return _c("div", {
45
- staticClass: "tiny-calendar-view",
46
- style: {
47
- "height": typeof _vm.height === "number" ? _vm.height + "px" : _vm.height
48
- }
49
- }, [_c("div", {
50
- staticClass: "tiny-calendar-view__header"
51
- }, [_c("div", [_c("tiny-button", {
52
- on: {
53
- "click": _vm.toToday
54
- }
55
- }, [_vm._v(_vm._s(_vm.t("ui.calendarView.backToday")))])], 1), _c("tiny-date-picker", {
56
- staticClass: "tiny-calendar-view__picker",
57
- attrs: {
58
- "type": "month",
59
- "clearable": false,
60
- "format": _vm.t("ui.calendarView.dateFormat")
61
- },
62
- on: {
63
- "change": _vm.currentDateChange
64
- },
65
- model: {
66
- value: _vm.state.currentDate,
67
- callback: function callback($$v) {
68
- _vm.$set(_vm.state, "currentDate", $$v);
69
- },
70
- expression: "state.currentDate"
71
- }
72
- }), _c("div", {
73
- staticClass: "tiny-calendar-view__tool"
74
- }, [_vm._t("tool")], 2), _vm.modes.length ? _c("tiny-radio-group", {
75
- staticClass: "tiny-calendar-view__radio",
76
- attrs: {
77
- "size": "mini"
78
- },
79
- model: {
80
- value: _vm.state.mode,
81
- callback: function callback($$v) {
82
- _vm.$set(_vm.state, "mode", $$v);
83
- },
84
- expression: "state.mode"
85
- }
86
- }, _vm._l(_vm.modes, function(mode) {
87
- return _c("tiny-radio-button", {
88
- key: mode,
89
- attrs: {
90
- "label": mode
91
- }
92
- }, [_c(_vm.state.modesIcon[mode], {
93
- tag: "component",
94
- class: _vm.state.mode === mode && "fill-brand"
95
- })], 1);
96
- }), 1) : _vm._e()], 1), _vm.state.mode === "month" ? _c("div", {
97
- staticClass: "tiny-calendar-view-month"
98
- }, [_c("div", {
99
- staticClass: "tiny-calendar-view-month__header"
100
- }, [_c("div", {
101
- staticClass: "header-left",
102
- on: {
103
- "click": _vm.goPrevMonth
104
- }
105
- }, [_c("icon-chevron-left")], 1), _c("ul", {
106
- staticClass: "header-main"
107
- }, _vm._l(_vm.state.weekDays, function(day) {
108
- return _c("li", {
109
- key: day
110
- }, [_c("span", [_vm._v(_vm._s(_vm.t("ui.calendarView.weekDays." + day)))])]);
111
- }), 0), _c("div", {
112
- staticClass: "header-right",
113
- on: {
114
- "click": _vm.goNextMonth
115
- }
116
- }, [_c("icon-chevron-right")], 1)]), _c("div", {
117
- staticClass: "tiny-calendar-view-month__main"
118
- }, [_c("div", {
119
- staticClass: "main-container"
120
- }, _vm._l(_vm.state.calendar, function(item, index) {
121
- return _c("ul", {
122
- key: index
123
- }, _vm._l(item, function(day, i) {
124
- return _c("li", {
125
- key: i,
126
- class: [i === 0 || i === 6 ? "is-weekends" : "", day.isLast || day.isNext || day.disabled ? "" : _vm.isSelectedDate(day) ? "is-selected" : "not-selected", "bg-" + _vm.getDayBgColor(day)],
127
- style: {
128
- "width": "14.2857%"
129
- },
130
- on: {
131
- "click": function click($event) {
132
- return _vm.selectDay(day);
133
- }
134
- }
135
- }, [_vm.multiSelect && _vm.isSelectedDate(day) ? _c("div", {
136
- staticClass: "day-selected"
137
- }, [_c("icon-checked-sur")], 1) : _vm._e(), _c("div", {
138
- staticClass: "date",
139
- class: [day.isLast || day.isNext ? "is-next-or-last" : _vm.isToday(day) || _vm.isSelectedDate(day) ? "is-selected" : "", day.disabled ? "is-disabled" : ""]
140
- }, [_vm._v(" " + _vm._s(_vm.isToday(day) ? _vm.t("ui.datepicker.today") : day.value) + " ")]), _c("div", {
141
- staticClass: "day-events",
142
- staticStyle: {
143
- "max-height": "calc(100% - 26px)"
144
- }
145
- }, _vm._l(_vm.getEventByTime(day, _vm._constants.DAY_START_TIME, _vm._constants.DAY_END_TIME), function(event, idx) {
146
- return _c("div", {
147
- key: idx,
148
- staticClass: "events-container",
149
- on: {
150
- "mouseenter": function mouseenter($event) {
151
- return _vm.handleMouseenter($event, event);
152
- },
153
- "mouseleave": function mouseleave($event) {
154
- return _vm.handleMouseleave($event, event);
155
- }
156
- }
157
- }, [_vm.isStartOrEndDay("start", day.value, _vm._constants.DAY_START_TIME, _vm._constants.DAY_END_TIME, event) ? _c("div", {
158
- staticClass: "events-start",
159
- class: event.dayNumber > 1 && "multi-day"
160
- }, [_c("span", {
161
- staticClass: "events-title",
162
- class: event.theme ? "theme-" + event.theme : ""
163
- }, [_vm._v(" " + _vm._s(event.title) + " ")])]) : _c("div", {
164
- staticClass: "events-end",
165
- class: [_vm.isStartOrEndDay("end", day.value, _vm._constants.DAY_START_TIME, _vm._constants.DAY_END_TIME, event) ? "is-end" : "", event.theme ? "bg-" + event.theme : ""]
166
- })]);
167
- }), 0)]);
168
- }), 0);
169
- }), 0)])]) : _c("div", {
170
- staticClass: "tiny-calendar-view-week"
171
- }, [_c("div", {
172
- staticClass: "tiny-calendar-view-week__header"
173
- }, [_c("div", {
174
- staticClass: "header-left",
175
- on: {
176
- "click": _vm.getPrevWeek
177
- }
178
- }, [_c("icon-chevron-left")], 1), _c("ul", {
179
- staticClass: "header-main"
180
- }, _vm._l(_vm.state.weekDates, function(date, index) {
181
- return _c("li", {
182
- key: date.value
183
- }, [_vm._t("header", function() {
184
- return [_c("span", {
185
- staticClass: "date",
186
- class: _vm.dateIsToday(date.value) && "is-today"
187
- }, [_c("span", [_vm._v(_vm._s(date.value.split("-")[2]))]), _vm.isShowMark(date.value) ? _c("span", {
188
- staticClass: "mark",
189
- class: [date.value.split("-")[2] > 9 ? "is-two-digit" : "", _vm.markColor ? "mark-" + _vm.markColor : ""]
190
- }) : _vm._e()]), _c("span", {
191
- staticClass: "week-day",
192
- class: _vm.dateIsToday(date.value) && "is-today"
193
- }, [_vm._v(_vm._s(_vm.dateIsToday(date.value) ? _vm.t("ui.datepicker.today") : _vm.t("ui.calendarView.weekDays." + index)))])];
194
- }, {
195
- "slotScope": {
196
- date: date.value,
197
- weekDay: _vm.t("ui.calendarView.weekDays." + index)
198
- }
199
- })], 2);
200
- }), 0), _c("div", {
201
- staticClass: "header-right",
202
- on: {
203
- "click": _vm.getNextWeek
204
- }
205
- }, [_c("icon-chevron-right")], 1)]), _vm.state.mode === "timeline" ? _c("div", {
206
- staticClass: "tiny-calendar-view-week__timeline"
207
- }, [_c("div", {
208
- staticClass: "day-times"
209
- }, [_c("ul", _vm._l(_vm.state.dayTimes, function(item, i) {
210
- return _c("li", {
211
- key: item.time,
212
- class: i % 2 === 1 && "is-odd-num"
213
- }, [_c("span", [_vm._v(_vm._s(item.text.includes("30") ? "" : item.text))])]);
214
- }), 0)]), _c("div", {
215
- staticClass: "day-events"
216
- }, [_c("ul", _vm._l(_vm.state.weekDates, function(date, index) {
217
- return _c("li", {
218
- key: date.value,
219
- class: index === 0 || index === 6 ? "is-weekends" : "",
220
- staticStyle: {
221
- "width": "calc((100% - 10px) / 7)"
222
- }
223
- }, [_vm._t("timeline" + (index + 1), function() {
224
- return [_c("ul", {
225
- staticClass: "events-list"
226
- }, _vm._l(_vm.state.dayTimes, function(item, i) {
227
- return _c("li", {
228
- key: date.value + item.time,
229
- class: i % 2 === 0 && "is-even-num"
230
- }, _vm._l(_vm.getEventByTime(date.value, item.time, _vm.state.dayTimes[i + 1] && _vm.state.dayTimes[i + 1].time), function(event, idx) {
231
- return _c("div", {
232
- key: idx,
233
- staticClass: "events-item",
234
- class: ["theme-" + (event.theme || "blue")],
235
- style: {
236
- "height": event.height + "px",
237
- "left": event.left + "px",
238
- "width": "calc(92% - " + event.left + "px)"
239
- }
240
- }, [_c("span", [_vm._v(_vm._s(event.title))])]);
241
- }), 0);
242
- }), 0)];
243
- }, {
244
- "slotScope": {
245
- date: date.value,
246
- events: _vm.state.curWeekEvents[date.value]
247
- }
248
- })], 2);
249
- }), 0)])]) : _vm._e(), _vm.state.mode === "schedule" ? _c("div", {
250
- staticClass: "tiny-calendar-view-week__schedule"
251
- }, [_c("ul", _vm._l(_vm.state.weekDates, function(date, index) {
252
- return _c("li", {
253
- key: date.value,
254
- staticStyle: {
255
- "width": "14.28%"
256
- }
257
- }, [_vm._t("weekday" + (index + 1), function() {
258
- return _vm._l(_vm.state.curWeekEvents[date.value] || [], function(event, idx) {
259
- return _c("div", {
260
- key: idx,
261
- staticClass: "day-events"
262
- }, [_c("div", {
263
- staticClass: "title"
264
- }, [_vm._v(_vm._s(event.title))]), _c("div", {
265
- staticClass: "date"
266
- }, [_vm._v(" " + _vm._s(_vm.getEventShowTime("start", event, date.value)) + " - " + _vm._s(_vm.getEventShowTime("end", event, date.value)) + " ")]), _c("p", {
267
- staticClass: "content"
268
- }, [_vm._v(_vm._s(event.content || ""))])]);
269
- });
270
- }, {
271
- "slotScope": {
272
- date: date.value,
273
- events: _vm.state.curWeekEvents[date.value]
274
- }
275
- }), _vm.isShowNewSchedule(date.value) ? _c("div", {
276
- staticClass: "new-schedule",
277
- on: {
278
- "click": function click($event) {
279
- return _vm.newSchedule(date.value);
280
- }
281
- }
282
- }, [_c("icon-plus"), _c("span", [_vm._v(_vm._s(_vm.t("ui.calendarView.new")))])], 1) : _vm._e()], 2);
283
- }), 0)]) : _vm._e()]), _c("tiny-tooltip", {
284
- ref: "tooltip",
285
- attrs: {
286
- "popper-class": "tiny-calendar-view-tooltip",
287
- "manual": true,
288
- "effect": "light",
289
- "placement": "right"
290
- },
291
- scopedSlots: _vm._u([{
292
- key: "content",
293
- fn: function fn() {
294
- return [_c("div", {
295
- staticClass: "tooltip-main"
296
- }, [_c("div", {
297
- staticClass: "title"
298
- }, [_vm._v(_vm._s(_vm.state.eventTipContent.title))]), _c("div", {
299
- staticClass: "date"
300
- }, [_vm._v(" " + _vm._s(_vm.state.eventTipContent.startDay) + " " + _vm._s(_vm.state.eventTipContent.startTime) + " ~ " + _vm._s(_vm.state.eventTipContent.endDay) + " " + _vm._s(_vm.state.eventTipContent.endTime) + " ")]), _c("p", {
301
- staticClass: "content"
302
- }, [_vm._v(_vm._s(_vm.state.eventTipContent.content || ""))])])];
303
- },
304
- proxy: true
305
- }]),
306
- model: {
307
- value: _vm.state.eventTipVisible,
308
- callback: function callback($$v) {
309
- _vm.$set(_vm.state, "eventTipVisible", $$v);
310
- },
311
- expression: "state.eventTipVisible"
312
- }
313
- })], 1);
30
+ function _arrayLikeToArray(r, a) {
31
+ (null == a || a > r.length) && (a = r.length);
32
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
33
+ return n;
34
+ }
35
+ var _export_sfc = function _export_sfc2(sfc, props) {
36
+ var target = sfc.__vccOpts || sfc;
37
+ for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
38
+ var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
39
+ target[key] = val;
40
+ }
41
+ return target;
314
42
  };
315
- var staticRenderFns = [];
316
- var __vue2_script = defineComponent({
43
+
44
+ var _sfc_main = defineComponent({
317
45
  emits: ["update:modelValue", "new-schedule", "selected-date-change", "prev-week-click", "next-week-click", "week-change", "year-change", "month-change", "date-click", "mode-change"],
318
46
  components: {
319
47
  TinyButton: Button,
@@ -343,15 +71,519 @@ var __vue2_script = defineComponent({
343
71
  });
344
72
  }
345
73
  });
346
- var __cssModules = {};
347
- var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
348
- function __vue2_injectStyles(context) {
349
- for (var o in __cssModules) {
350
- this[o] = __cssModules[o];
74
+ var _hoisted_1 = {
75
+ class: "tiny-calendar-view__header"
76
+ };
77
+ var _hoisted_2 = {
78
+ class: "tiny-calendar-view__tool"
79
+ };
80
+ var _hoisted_3 = {
81
+ key: 0,
82
+ class: "tiny-calendar-view-month"
83
+ };
84
+ var _hoisted_4 = {
85
+ class: "tiny-calendar-view-month__header"
86
+ };
87
+ var _hoisted_5 = {
88
+ class: "header-main"
89
+ };
90
+ var _hoisted_6 = {
91
+ class: "tiny-calendar-view-month__main"
92
+ };
93
+ var _hoisted_7 = {
94
+ class: "main-container"
95
+ };
96
+ var _hoisted_8 = ["onClick"];
97
+ var _hoisted_9 = {
98
+ key: 0,
99
+ class: "day-selected"
100
+ };
101
+ var _hoisted_10 = {
102
+ class: "day-events",
103
+ style: {
104
+ "max-height": "calc(100% - 26px)"
351
105
  }
106
+ };
107
+ var _hoisted_11 = ["onMouseenter", "onMouseleave"];
108
+ var _hoisted_12 = {
109
+ key: 1,
110
+ class: "tiny-calendar-view-week"
111
+ };
112
+ var _hoisted_13 = {
113
+ class: "tiny-calendar-view-week__header"
114
+ };
115
+ var _hoisted_14 = {
116
+ class: "header-main"
117
+ };
118
+ var _hoisted_15 = {
119
+ key: 0,
120
+ class: "tiny-calendar-view-week__timeline"
121
+ };
122
+ var _hoisted_16 = {
123
+ class: "day-times"
124
+ };
125
+ var _hoisted_17 = {
126
+ class: "day-events"
127
+ };
128
+ var _hoisted_18 = {
129
+ class: "events-list"
130
+ };
131
+ var _hoisted_19 = {
132
+ key: 1,
133
+ class: "tiny-calendar-view-week__schedule"
134
+ };
135
+ var _hoisted_20 = {
136
+ class: "title"
137
+ };
138
+ var _hoisted_21 = {
139
+ class: "date"
140
+ };
141
+ var _hoisted_22 = {
142
+ class: "content"
143
+ };
144
+ var _hoisted_23 = ["onClick"];
145
+ var _hoisted_24 = {
146
+ class: "tooltip-main"
147
+ };
148
+ var _hoisted_25 = {
149
+ class: "title"
150
+ };
151
+ var _hoisted_26 = {
152
+ class: "date"
153
+ };
154
+ var _hoisted_27 = {
155
+ class: "content"
156
+ };
157
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
158
+ var _component_tiny_button = resolveComponent("tiny-button");
159
+ var _component_tiny_date_picker = resolveComponent("tiny-date-picker");
160
+ var _component_tiny_radio_button = resolveComponent("tiny-radio-button");
161
+ var _component_tiny_radio_group = resolveComponent("tiny-radio-group");
162
+ var _component_icon_chevron_left = resolveComponent("icon-chevron-left");
163
+ var _component_icon_chevron_right = resolveComponent("icon-chevron-right");
164
+ var _component_icon_checked_sur = resolveComponent("icon-checked-sur");
165
+ var _component_icon_plus = resolveComponent("icon-plus");
166
+ var _component_tiny_tooltip = resolveComponent("tiny-tooltip");
167
+ return openBlock(), createElementBlock(
168
+ "div",
169
+ {
170
+ class: "tiny-calendar-view",
171
+ style: normalizeStyle({
172
+ "height": typeof _ctx.height === "number" ? _ctx.height + "px" : _ctx.height
173
+ })
174
+ },
175
+ [createElementVNode("div", _hoisted_1, [createElementVNode("div", null, [createVNode(_component_tiny_button, {
176
+ onClick: _ctx.toToday
177
+ }, {
178
+ default: withCtx(function() {
179
+ return [createTextVNode(
180
+ toDisplayString(_ctx.t("ui.calendarView.backToday")),
181
+ 1
182
+ /* TEXT */
183
+ )];
184
+ }),
185
+ _: 1
186
+ /* STABLE */
187
+ }, 8, ["onClick"])]), createVNode(_component_tiny_date_picker, {
188
+ modelValue: _ctx.state.currentDate,
189
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
190
+ return _ctx.state.currentDate = $event;
191
+ }),
192
+ class: "tiny-calendar-view__picker",
193
+ type: "month",
194
+ clearable: false,
195
+ onChange: _ctx.currentDateChange,
196
+ format: _ctx.t("ui.calendarView.dateFormat")
197
+ }, null, 8, ["modelValue", "onChange", "format"]), createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "tool")]), _ctx.modes.length ? (openBlock(), createBlock(_component_tiny_radio_group, {
198
+ key: 0,
199
+ modelValue: _ctx.state.mode,
200
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = function($event) {
201
+ return _ctx.state.mode = $event;
202
+ }),
203
+ size: "mini",
204
+ class: "tiny-calendar-view__radio"
205
+ }, {
206
+ default: withCtx(function() {
207
+ return [(openBlock(true), createElementBlock(
208
+ Fragment,
209
+ null,
210
+ renderList(_ctx.modes, function(mode) {
211
+ return openBlock(), createBlock(_component_tiny_radio_button, {
212
+ key: mode,
213
+ label: mode
214
+ }, {
215
+ default: withCtx(function() {
216
+ return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.state.modesIcon[mode]), {
217
+ class: normalizeClass(_ctx.state.mode === mode && "fill-brand")
218
+ }, null, 8, ["class"]))];
219
+ }),
220
+ _: 2
221
+ /* DYNAMIC */
222
+ }, 1032, ["label"]);
223
+ }),
224
+ 128
225
+ /* KEYED_FRAGMENT */
226
+ ))];
227
+ }),
228
+ _: 1
229
+ /* STABLE */
230
+ }, 8, ["modelValue"])) : createCommentVNode("v-if", true)]), _ctx.state.mode === "month" ? (openBlock(), createElementBlock("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [createElementVNode("div", {
231
+ class: "header-left",
232
+ onClick: _cache[2] || (_cache[2] = function() {
233
+ return _ctx.goPrevMonth && _ctx.goPrevMonth.apply(_ctx, arguments);
234
+ })
235
+ }, [createVNode(_component_icon_chevron_left)]), createElementVNode("ul", _hoisted_5, [(openBlock(true), createElementBlock(
236
+ Fragment,
237
+ null,
238
+ renderList(_ctx.state.weekDays, function(day) {
239
+ return openBlock(), createElementBlock("li", {
240
+ key: day
241
+ }, [createElementVNode(
242
+ "span",
243
+ null,
244
+ toDisplayString(_ctx.t("ui.calendarView.weekDays." + day)),
245
+ 1
246
+ /* TEXT */
247
+ )]);
248
+ }),
249
+ 128
250
+ /* KEYED_FRAGMENT */
251
+ ))]), createElementVNode("div", {
252
+ class: "header-right",
253
+ onClick: _cache[3] || (_cache[3] = function() {
254
+ return _ctx.goNextMonth && _ctx.goNextMonth.apply(_ctx, arguments);
255
+ })
256
+ }, [createVNode(_component_icon_chevron_right)])]), createElementVNode("div", _hoisted_6, [createElementVNode("div", _hoisted_7, [(openBlock(true), createElementBlock(
257
+ Fragment,
258
+ null,
259
+ renderList(_ctx.state.calendar, function(item, index) {
260
+ return openBlock(), createElementBlock("ul", {
261
+ key: index
262
+ }, [(openBlock(true), createElementBlock(
263
+ Fragment,
264
+ null,
265
+ renderList(item, function(day, i) {
266
+ return openBlock(), createElementBlock("li", {
267
+ key: i,
268
+ onClick: function onClick($event) {
269
+ return _ctx.selectDay(day);
270
+ },
271
+ style: {
272
+ "width": "14.2857%"
273
+ },
274
+ class: normalizeClass([i === 0 || i === 6 ? "is-weekends" : "", day.isLast || day.isNext || day.disabled ? "" : _ctx.isSelectedDate(day) ? "is-selected" : "not-selected", "bg-" + _ctx.getDayBgColor(day)])
275
+ }, [_ctx.multiSelect && _ctx.isSelectedDate(day) ? (openBlock(), createElementBlock("div", _hoisted_9, [createVNode(_component_icon_checked_sur)])) : createCommentVNode("v-if", true), createElementVNode(
276
+ "div",
277
+ {
278
+ class: normalizeClass(["date", [day.isLast || day.isNext ? "is-next-or-last" : _ctx.isToday(day) || _ctx.isSelectedDate(day) ? "is-selected" : "", day.disabled ? "is-disabled" : ""]])
279
+ },
280
+ toDisplayString(_ctx.isToday(day) ? _ctx.t("ui.datepicker.today") : day.value),
281
+ 3
282
+ /* TEXT, CLASS */
283
+ ), createElementVNode("div", _hoisted_10, [(openBlock(true), createElementBlock(
284
+ Fragment,
285
+ null,
286
+ renderList(_ctx.getEventByTime(day, _ctx._constants.DAY_START_TIME, _ctx._constants.DAY_END_TIME), function(event, idx) {
287
+ return openBlock(), createElementBlock("div", {
288
+ key: idx,
289
+ onMouseenter: function onMouseenter($event) {
290
+ return _ctx.handleMouseenter($event, event);
291
+ },
292
+ onMouseleave: function onMouseleave($event) {
293
+ return _ctx.handleMouseleave($event, event);
294
+ },
295
+ class: "events-container"
296
+ }, [_ctx.isStartOrEndDay("start", day.value, _ctx._constants.DAY_START_TIME, _ctx._constants.DAY_END_TIME, event) ? (openBlock(), createElementBlock(
297
+ "div",
298
+ {
299
+ key: 0,
300
+ class: normalizeClass(["events-start", event.dayNumber > 1 && "multi-day"])
301
+ },
302
+ [createElementVNode(
303
+ "span",
304
+ {
305
+ class: normalizeClass(["events-title", event.theme ? "theme-" + event.theme : ""])
306
+ },
307
+ toDisplayString(event.title),
308
+ 3
309
+ /* TEXT, CLASS */
310
+ )],
311
+ 2
312
+ /* CLASS */
313
+ )) : (openBlock(), createElementBlock(
314
+ "div",
315
+ {
316
+ key: 1,
317
+ class: normalizeClass(["events-end", [_ctx.isStartOrEndDay("end", day.value, _ctx._constants.DAY_START_TIME, _ctx._constants.DAY_END_TIME, event) ? "is-end" : "", event.theme ? "bg-" + event.theme : ""]])
318
+ },
319
+ null,
320
+ 2
321
+ /* CLASS */
322
+ ))], 40, _hoisted_11);
323
+ }),
324
+ 128
325
+ /* KEYED_FRAGMENT */
326
+ ))])], 10, _hoisted_8);
327
+ }),
328
+ 128
329
+ /* KEYED_FRAGMENT */
330
+ ))]);
331
+ }),
332
+ 128
333
+ /* KEYED_FRAGMENT */
334
+ ))])])])) : (openBlock(), createElementBlock("div", _hoisted_12, [createElementVNode("div", _hoisted_13, [createElementVNode("div", {
335
+ class: "header-left",
336
+ onClick: _cache[4] || (_cache[4] = function() {
337
+ return _ctx.getPrevWeek && _ctx.getPrevWeek.apply(_ctx, arguments);
338
+ })
339
+ }, [createVNode(_component_icon_chevron_left)]), createElementVNode("ul", _hoisted_14, [(openBlock(true), createElementBlock(
340
+ Fragment,
341
+ null,
342
+ renderList(_ctx.state.weekDates, function(date, index) {
343
+ return openBlock(), createElementBlock("li", {
344
+ key: date.value
345
+ }, [renderSlot(_ctx.$slots, "header", {
346
+ slotScope: {
347
+ date: date.value,
348
+ weekDay: _ctx.t("ui.calendarView.weekDays." + index)
349
+ }
350
+ }, function() {
351
+ return [createElementVNode(
352
+ "span",
353
+ {
354
+ class: normalizeClass(["date", _ctx.dateIsToday(date.value) && "is-today"])
355
+ },
356
+ [createElementVNode(
357
+ "span",
358
+ null,
359
+ toDisplayString(date.value.split("-")[2]),
360
+ 1
361
+ /* TEXT */
362
+ ), _ctx.isShowMark(date.value) ? (openBlock(), createElementBlock(
363
+ "span",
364
+ {
365
+ key: 0,
366
+ class: normalizeClass(["mark", [date.value.split("-")[2] > 9 ? "is-two-digit" : "", _ctx.markColor ? "mark-" + _ctx.markColor : ""]])
367
+ },
368
+ null,
369
+ 2
370
+ /* CLASS */
371
+ )) : createCommentVNode("v-if", true)],
372
+ 2
373
+ /* CLASS */
374
+ ), createElementVNode(
375
+ "span",
376
+ {
377
+ class: normalizeClass(["week-day", _ctx.dateIsToday(date.value) && "is-today"])
378
+ },
379
+ toDisplayString(_ctx.dateIsToday(date.value) ? _ctx.t("ui.datepicker.today") : _ctx.t("ui.calendarView.weekDays." + index)),
380
+ 3
381
+ /* TEXT, CLASS */
382
+ )];
383
+ })]);
384
+ }),
385
+ 128
386
+ /* KEYED_FRAGMENT */
387
+ ))]), createElementVNode("div", {
388
+ class: "header-right",
389
+ onClick: _cache[5] || (_cache[5] = function() {
390
+ return _ctx.getNextWeek && _ctx.getNextWeek.apply(_ctx, arguments);
391
+ })
392
+ }, [createVNode(_component_icon_chevron_right)])]), _ctx.state.mode === "timeline" ? (openBlock(), createElementBlock("div", _hoisted_15, [createElementVNode("div", _hoisted_16, [createElementVNode("ul", null, [(openBlock(true), createElementBlock(
393
+ Fragment,
394
+ null,
395
+ renderList(_ctx.state.dayTimes, function(item, i) {
396
+ return openBlock(), createElementBlock(
397
+ "li",
398
+ {
399
+ key: item.time,
400
+ class: normalizeClass(i % 2 === 1 && "is-odd-num")
401
+ },
402
+ [createElementVNode(
403
+ "span",
404
+ null,
405
+ toDisplayString(item.text.includes("30") ? "" : item.text),
406
+ 1
407
+ /* TEXT */
408
+ )],
409
+ 2
410
+ /* CLASS */
411
+ );
412
+ }),
413
+ 128
414
+ /* KEYED_FRAGMENT */
415
+ ))])]), createElementVNode("div", _hoisted_17, [createElementVNode("ul", null, [(openBlock(true), createElementBlock(
416
+ Fragment,
417
+ null,
418
+ renderList(_ctx.state.weekDates, function(date, index) {
419
+ return openBlock(), createElementBlock(
420
+ "li",
421
+ {
422
+ key: date.value,
423
+ style: {
424
+ "width": "calc((100% - 10px) / 7)"
425
+ },
426
+ class: normalizeClass(index === 0 || index === 6 ? "is-weekends" : "")
427
+ },
428
+ [renderSlot(_ctx.$slots, "timeline" + (index + 1), {
429
+ slotScope: {
430
+ date: date.value,
431
+ events: _ctx.state.curWeekEvents[date.value]
432
+ }
433
+ }, function() {
434
+ return [createElementVNode("ul", _hoisted_18, [(openBlock(true), createElementBlock(
435
+ Fragment,
436
+ null,
437
+ renderList(_ctx.state.dayTimes, function(item, i) {
438
+ return openBlock(), createElementBlock(
439
+ "li",
440
+ {
441
+ key: date.value + item.time,
442
+ class: normalizeClass(i % 2 === 0 && "is-even-num")
443
+ },
444
+ [(openBlock(true), createElementBlock(
445
+ Fragment,
446
+ null,
447
+ renderList(_ctx.getEventByTime(date.value, item.time, _ctx.state.dayTimes[i + 1] && _ctx.state.dayTimes[i + 1].time), function(event, idx) {
448
+ return openBlock(), createElementBlock(
449
+ "div",
450
+ {
451
+ key: idx,
452
+ class: normalizeClass(["events-item", ["theme-" + (event.theme || "blue")]]),
453
+ style: normalizeStyle({
454
+ "height": event.height + "px",
455
+ "left": event.left + "px",
456
+ "width": "calc(92% - " + event.left + "px)"
457
+ })
458
+ },
459
+ [createElementVNode(
460
+ "span",
461
+ null,
462
+ toDisplayString(event.title),
463
+ 1
464
+ /* TEXT */
465
+ )],
466
+ 6
467
+ /* CLASS, STYLE */
468
+ );
469
+ }),
470
+ 128
471
+ /* KEYED_FRAGMENT */
472
+ ))],
473
+ 2
474
+ /* CLASS */
475
+ );
476
+ }),
477
+ 128
478
+ /* KEYED_FRAGMENT */
479
+ ))])];
480
+ })],
481
+ 2
482
+ /* CLASS */
483
+ );
484
+ }),
485
+ 128
486
+ /* KEYED_FRAGMENT */
487
+ ))])])])) : createCommentVNode("v-if", true), _ctx.state.mode === "schedule" ? (openBlock(), createElementBlock("div", _hoisted_19, [createElementVNode("ul", null, [(openBlock(true), createElementBlock(
488
+ Fragment,
489
+ null,
490
+ renderList(_ctx.state.weekDates, function(date, index) {
491
+ return openBlock(), createElementBlock("li", {
492
+ key: date.value,
493
+ style: {
494
+ "width": "14.28%"
495
+ }
496
+ }, [renderSlot(_ctx.$slots, "weekday" + (index + 1), {
497
+ slotScope: {
498
+ date: date.value,
499
+ events: _ctx.state.curWeekEvents[date.value]
500
+ }
501
+ }, function() {
502
+ return [(openBlock(true), createElementBlock(
503
+ Fragment,
504
+ null,
505
+ renderList(_ctx.state.curWeekEvents[date.value] || [], function(event, idx) {
506
+ return openBlock(), createElementBlock("div", {
507
+ key: idx,
508
+ class: "day-events"
509
+ }, [createElementVNode(
510
+ "div",
511
+ _hoisted_20,
512
+ toDisplayString(event.title),
513
+ 1
514
+ /* TEXT */
515
+ ), createElementVNode(
516
+ "div",
517
+ _hoisted_21,
518
+ toDisplayString(_ctx.getEventShowTime("start", event, date.value)) + " - " + toDisplayString(_ctx.getEventShowTime("end", event, date.value)),
519
+ 1
520
+ /* TEXT */
521
+ ), createElementVNode(
522
+ "p",
523
+ _hoisted_22,
524
+ toDisplayString(event.content || ""),
525
+ 1
526
+ /* TEXT */
527
+ )]);
528
+ }),
529
+ 128
530
+ /* KEYED_FRAGMENT */
531
+ ))];
532
+ }), _ctx.isShowNewSchedule(date.value) ? (openBlock(), createElementBlock("div", {
533
+ key: 0,
534
+ class: "new-schedule",
535
+ onClick: function onClick($event) {
536
+ return _ctx.newSchedule(date.value);
537
+ }
538
+ }, [createVNode(_component_icon_plus), createElementVNode(
539
+ "span",
540
+ null,
541
+ toDisplayString(_ctx.t("ui.calendarView.new")),
542
+ 1
543
+ /* TEXT */
544
+ )], 8, _hoisted_23)) : createCommentVNode("v-if", true)]);
545
+ }),
546
+ 128
547
+ /* KEYED_FRAGMENT */
548
+ ))])])) : createCommentVNode("v-if", true)])), createVNode(_component_tiny_tooltip, {
549
+ ref: "tooltip",
550
+ modelValue: _ctx.state.eventTipVisible,
551
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = function($event) {
552
+ return _ctx.state.eventTipVisible = $event;
553
+ }),
554
+ "popper-class": "tiny-calendar-view-tooltip",
555
+ manual: true,
556
+ effect: "light",
557
+ placement: "right"
558
+ }, {
559
+ content: withCtx(function() {
560
+ return [createElementVNode("div", _hoisted_24, [createElementVNode(
561
+ "div",
562
+ _hoisted_25,
563
+ toDisplayString(_ctx.state.eventTipContent.title),
564
+ 1
565
+ /* TEXT */
566
+ ), createElementVNode(
567
+ "div",
568
+ _hoisted_26,
569
+ toDisplayString(_ctx.state.eventTipContent.startDay) + " " + toDisplayString(_ctx.state.eventTipContent.startTime) + " ~ " + toDisplayString(_ctx.state.eventTipContent.endDay) + " " + toDisplayString(_ctx.state.eventTipContent.endTime),
570
+ 1
571
+ /* TEXT */
572
+ ), createElementVNode(
573
+ "p",
574
+ _hoisted_27,
575
+ toDisplayString(_ctx.state.eventTipContent.content || ""),
576
+ 1
577
+ /* TEXT */
578
+ )])];
579
+ }),
580
+ _: 1
581
+ /* STABLE */
582
+ }, 8, ["modelValue"])],
583
+ 4
584
+ /* STYLE */
585
+ );
352
586
  }
353
- var pc = /* @__PURE__ */ function() {
354
- return __component__.exports;
355
- }();
587
+ var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
356
588
 
357
589
  export { pc as default };