@zeedhi/zd-calendar-vue 1.0.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/dist/calendar-vue.esm.js +814 -0
- package/dist/calendar-vue.umd.js +820 -0
- package/package.json +24 -0
- package/tsconfig.eslint.json +10 -0
- package/types/Calendar.d.ts +69 -0
- package/types/index.d.ts +2 -0
|
@@ -0,0 +1,814 @@
|
|
|
1
|
+
import { Prop, Component } from 'vue-property-decorator';
|
|
2
|
+
import { PropWatch, ZdComponentRender } from '@zeedhi/vuetify';
|
|
3
|
+
import { Calendar } from '@zeedhi/zd-calendar-common';
|
|
4
|
+
|
|
5
|
+
/*! *****************************************************************************
|
|
6
|
+
Copyright (c) Microsoft Corporation.
|
|
7
|
+
|
|
8
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
9
|
+
purpose with or without fee is hereby granted.
|
|
10
|
+
|
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
12
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
13
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
14
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
15
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
16
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
17
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
18
|
+
***************************************************************************** */
|
|
19
|
+
|
|
20
|
+
function __decorate(decorators, target, key, desc) {
|
|
21
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
22
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function __metadata(metadataKey, metadataValue) {
|
|
28
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
let ZdCalendar = class ZdCalendar extends ZdComponentRender {
|
|
32
|
+
constructor() {
|
|
33
|
+
super(...arguments);
|
|
34
|
+
this.instanceType = Calendar;
|
|
35
|
+
this.selectedOpen = false;
|
|
36
|
+
this.selectedElement = null;
|
|
37
|
+
this.selectedEvent = {};
|
|
38
|
+
}
|
|
39
|
+
mounted() {
|
|
40
|
+
this.$refs.calendar.checkChange();
|
|
41
|
+
}
|
|
42
|
+
prev() {
|
|
43
|
+
this.$refs.calendar.prev();
|
|
44
|
+
}
|
|
45
|
+
next() {
|
|
46
|
+
this.$refs.calendar.next();
|
|
47
|
+
}
|
|
48
|
+
setToday() {
|
|
49
|
+
this.instance.value = '';
|
|
50
|
+
}
|
|
51
|
+
setType(select) {
|
|
52
|
+
const { value } = select.instance.value;
|
|
53
|
+
this.instance.type = value;
|
|
54
|
+
}
|
|
55
|
+
viewDay({ date }) {
|
|
56
|
+
this.instance.value = date;
|
|
57
|
+
this.instance.type = 'day';
|
|
58
|
+
}
|
|
59
|
+
showEvent({ nativeEvent, event }) {
|
|
60
|
+
const open = () => {
|
|
61
|
+
this.selectedEvent = event;
|
|
62
|
+
this.selectedElement = nativeEvent.target;
|
|
63
|
+
requestAnimationFrame(() => { requestAnimationFrame(() => { this.selectedOpen = true; }); });
|
|
64
|
+
};
|
|
65
|
+
if (this.selectedOpen) {
|
|
66
|
+
this.selectedOpen = false;
|
|
67
|
+
requestAnimationFrame(() => requestAnimationFrame(() => open()));
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
open();
|
|
71
|
+
}
|
|
72
|
+
nativeEvent.stopPropagation();
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
__decorate([
|
|
76
|
+
Prop({ type: [String, Array], default: undefined }),
|
|
77
|
+
__metadata("design:type", Object)
|
|
78
|
+
], ZdCalendar.prototype, "categories", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
PropWatch({ type: [String, Number], default: 1 }),
|
|
81
|
+
__metadata("design:type", Object)
|
|
82
|
+
], ZdCalendar.prototype, "categoryDays", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
PropWatch({ type: String, default: undefined }),
|
|
85
|
+
__metadata("design:type", String)
|
|
86
|
+
], ZdCalendar.prototype, "title", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
PropWatch({ type: [String, Boolean], default: undefined }),
|
|
89
|
+
__metadata("design:type", Object)
|
|
90
|
+
], ZdCalendar.prototype, "showHeader", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
PropWatch({ type: String, default: undefined }),
|
|
93
|
+
__metadata("design:type", String)
|
|
94
|
+
], ZdCalendar.prototype, "categoryForInvalid", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
PropWatch({ type: Boolean, default: false }),
|
|
97
|
+
__metadata("design:type", Object)
|
|
98
|
+
], ZdCalendar.prototype, "categoryHideDynamic", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
PropWatch({ type: Boolean, default: false }),
|
|
101
|
+
__metadata("design:type", Object)
|
|
102
|
+
], ZdCalendar.prototype, "categoryShowAll", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
Prop({ type: [String, Function], default: undefined }),
|
|
105
|
+
__metadata("design:type", Object)
|
|
106
|
+
], ZdCalendar.prototype, "categoryText", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
PropWatch({ type: String, default: 'primary' }),
|
|
109
|
+
__metadata("design:type", String)
|
|
110
|
+
], ZdCalendar.prototype, "color", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
Prop({ type: Function, default: null }),
|
|
113
|
+
__metadata("design:type", Object)
|
|
114
|
+
], ZdCalendar.prototype, "dayFormat", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
PropWatch({ type: [String, Number, Date], default: undefined }),
|
|
117
|
+
__metadata("design:type", Object)
|
|
118
|
+
], ZdCalendar.prototype, "end", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
PropWatch({ type: [String, Function], default: 'category' }),
|
|
121
|
+
__metadata("design:type", Object)
|
|
122
|
+
], ZdCalendar.prototype, "eventCategory", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
PropWatch({ type: [String, Function], default: 'primary' }),
|
|
125
|
+
__metadata("design:type", Object)
|
|
126
|
+
], ZdCalendar.prototype, "eventColor", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
PropWatch({ type: String, default: 'end' }),
|
|
129
|
+
__metadata("design:type", String)
|
|
130
|
+
], ZdCalendar.prototype, "eventEnd", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
PropWatch({ type: Number, default: 20 }),
|
|
133
|
+
__metadata("design:type", Number)
|
|
134
|
+
], ZdCalendar.prototype, "eventHeight", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
PropWatch({ type: Number, default: 1 }),
|
|
137
|
+
__metadata("design:type", Number)
|
|
138
|
+
], ZdCalendar.prototype, "eventMarginBottom", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
PropWatch({ type: Boolean, default: true }),
|
|
141
|
+
__metadata("design:type", Boolean)
|
|
142
|
+
], ZdCalendar.prototype, "eventMore", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
PropWatch({ type: String, default: 'CALENDAR_MORE' }),
|
|
145
|
+
__metadata("design:type", String)
|
|
146
|
+
], ZdCalendar.prototype, "eventMoreText", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
PropWatch({ type: [String, Function], default: 'name' }),
|
|
149
|
+
__metadata("design:type", Object)
|
|
150
|
+
], ZdCalendar.prototype, "eventName", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
PropWatch({ type: [String, Function], default: 'stack' }),
|
|
153
|
+
__metadata("design:type", Object)
|
|
154
|
+
], ZdCalendar.prototype, "eventOverlapMode", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
PropWatch({ type: [String, Number], default: 60 }),
|
|
157
|
+
__metadata("design:type", Object)
|
|
158
|
+
], ZdCalendar.prototype, "eventOverlapThreshold", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
Prop({ type: [String, Object], default: undefined }),
|
|
161
|
+
__metadata("design:type", Object)
|
|
162
|
+
], ZdCalendar.prototype, "eventRipple", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
PropWatch({ type: String, default: 'start' }),
|
|
165
|
+
__metadata("design:type", String)
|
|
166
|
+
], ZdCalendar.prototype, "eventStart", void 0);
|
|
167
|
+
__decorate([
|
|
168
|
+
Prop({ type: [String, Function], default: 'white' }),
|
|
169
|
+
__metadata("design:type", Object)
|
|
170
|
+
], ZdCalendar.prototype, "eventTextColor", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
Prop({ type: [String, Function], default: 'timed' }),
|
|
173
|
+
__metadata("design:type", Object)
|
|
174
|
+
], ZdCalendar.prototype, "eventTimed", void 0);
|
|
175
|
+
__decorate([
|
|
176
|
+
Prop({ type: Array, default: () => [] }),
|
|
177
|
+
__metadata("design:type", Array)
|
|
178
|
+
], ZdCalendar.prototype, "calendarEvents", void 0);
|
|
179
|
+
__decorate([
|
|
180
|
+
Prop({ type: [String, Number], default: 0 }),
|
|
181
|
+
__metadata("design:type", Object)
|
|
182
|
+
], ZdCalendar.prototype, "firstInterval", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
PropWatch({ type: [String, Number, Object], default: 0 }),
|
|
185
|
+
__metadata("design:type", Object)
|
|
186
|
+
], ZdCalendar.prototype, "firstTime", void 0);
|
|
187
|
+
__decorate([
|
|
188
|
+
PropWatch({ type: Boolean, default: false }),
|
|
189
|
+
__metadata("design:type", Boolean)
|
|
190
|
+
], ZdCalendar.prototype, "hideHeader", void 0);
|
|
191
|
+
__decorate([
|
|
192
|
+
Prop({ type: [String, Number], default: 24 }),
|
|
193
|
+
__metadata("design:type", Object)
|
|
194
|
+
], ZdCalendar.prototype, "intervalCount", void 0);
|
|
195
|
+
__decorate([
|
|
196
|
+
Prop({ type: Function, default: null }),
|
|
197
|
+
__metadata("design:type", Object)
|
|
198
|
+
], ZdCalendar.prototype, "intervalFormat", void 0);
|
|
199
|
+
__decorate([
|
|
200
|
+
PropWatch({ type: [String, Number], default: 48 }),
|
|
201
|
+
__metadata("design:type", Object)
|
|
202
|
+
], ZdCalendar.prototype, "intervalHeight", void 0);
|
|
203
|
+
__decorate([
|
|
204
|
+
PropWatch({ type: [String, Number], default: 60 }),
|
|
205
|
+
__metadata("design:type", Object)
|
|
206
|
+
], ZdCalendar.prototype, "intervalMinutes", void 0);
|
|
207
|
+
__decorate([
|
|
208
|
+
Prop({ type: Function, default: null }),
|
|
209
|
+
__metadata("design:type", Object)
|
|
210
|
+
], ZdCalendar.prototype, "intervalStyle", void 0);
|
|
211
|
+
__decorate([
|
|
212
|
+
PropWatch({ type: [String, Number], default: 60 }),
|
|
213
|
+
__metadata("design:type", Object)
|
|
214
|
+
], ZdCalendar.prototype, "intervalWidth", void 0);
|
|
215
|
+
__decorate([
|
|
216
|
+
PropWatch({ type: String, default: 'pt-BR' }),
|
|
217
|
+
__metadata("design:type", String)
|
|
218
|
+
], ZdCalendar.prototype, "locale", void 0);
|
|
219
|
+
__decorate([
|
|
220
|
+
PropWatch({ type: [String, Number], default: 0 }),
|
|
221
|
+
__metadata("design:type", Object)
|
|
222
|
+
], ZdCalendar.prototype, "localeFirstDayOfYear", void 0);
|
|
223
|
+
__decorate([
|
|
224
|
+
PropWatch({ type: Number, default: 7 }),
|
|
225
|
+
__metadata("design:type", Number)
|
|
226
|
+
], ZdCalendar.prototype, "maxDays", void 0);
|
|
227
|
+
__decorate([
|
|
228
|
+
PropWatch({ type: [Number, String], default: 1 }),
|
|
229
|
+
__metadata("design:type", Object)
|
|
230
|
+
], ZdCalendar.prototype, "minWeeks", void 0);
|
|
231
|
+
__decorate([
|
|
232
|
+
Prop({ type: Function, default: null }),
|
|
233
|
+
__metadata("design:type", Object)
|
|
234
|
+
], ZdCalendar.prototype, "monthFormat", void 0);
|
|
235
|
+
__decorate([
|
|
236
|
+
PropWatch({ type: String, default: undefined }),
|
|
237
|
+
__metadata("design:type", String)
|
|
238
|
+
], ZdCalendar.prototype, "now", void 0);
|
|
239
|
+
__decorate([
|
|
240
|
+
PropWatch({ type: Boolean, default: true }),
|
|
241
|
+
__metadata("design:type", Boolean)
|
|
242
|
+
], ZdCalendar.prototype, "shortIntervals", void 0);
|
|
243
|
+
__decorate([
|
|
244
|
+
PropWatch({ type: Boolean, default: true }),
|
|
245
|
+
__metadata("design:type", Boolean)
|
|
246
|
+
], ZdCalendar.prototype, "shortMonths", void 0);
|
|
247
|
+
__decorate([
|
|
248
|
+
PropWatch({ type: Boolean, default: true }),
|
|
249
|
+
__metadata("design:type", Boolean)
|
|
250
|
+
], ZdCalendar.prototype, "shortWeekDays", void 0);
|
|
251
|
+
__decorate([
|
|
252
|
+
Prop({ type: Function, default: null }),
|
|
253
|
+
__metadata("design:type", Object)
|
|
254
|
+
], ZdCalendar.prototype, "showIntervalLabel", void 0);
|
|
255
|
+
__decorate([
|
|
256
|
+
PropWatch({ type: Boolean, default: true }),
|
|
257
|
+
__metadata("design:type", Boolean)
|
|
258
|
+
], ZdCalendar.prototype, "showMonthOnFirst", void 0);
|
|
259
|
+
__decorate([
|
|
260
|
+
PropWatch({ type: Boolean, default: false }),
|
|
261
|
+
__metadata("design:type", Boolean)
|
|
262
|
+
], ZdCalendar.prototype, "showWeek", void 0);
|
|
263
|
+
__decorate([
|
|
264
|
+
PropWatch({ type: [String, Number, Date], default: () => (new Date()) }),
|
|
265
|
+
__metadata("design:type", Object)
|
|
266
|
+
], ZdCalendar.prototype, "start", void 0);
|
|
267
|
+
__decorate([
|
|
268
|
+
PropWatch({ type: String, default: 'month' }),
|
|
269
|
+
__metadata("design:type", String)
|
|
270
|
+
], ZdCalendar.prototype, "type", void 0);
|
|
271
|
+
__decorate([
|
|
272
|
+
PropWatch({ type: [String, Number, Date], default: undefined }),
|
|
273
|
+
__metadata("design:type", Object)
|
|
274
|
+
], ZdCalendar.prototype, "value", void 0);
|
|
275
|
+
__decorate([
|
|
276
|
+
Prop({ type: Function, default: null }),
|
|
277
|
+
__metadata("design:type", Object)
|
|
278
|
+
], ZdCalendar.prototype, "weekdayFormat", void 0);
|
|
279
|
+
__decorate([
|
|
280
|
+
Prop({ type: [String, Array], default: () => [0, 1, 2, 3, 4, 5, 6, 7] }),
|
|
281
|
+
__metadata("design:type", Object)
|
|
282
|
+
], ZdCalendar.prototype, "weekDay", void 0);
|
|
283
|
+
__decorate([
|
|
284
|
+
PropWatch({ type: Object, default: undefined }),
|
|
285
|
+
__metadata("design:type", Object)
|
|
286
|
+
], ZdCalendar.prototype, "selectTypeData", void 0);
|
|
287
|
+
ZdCalendar = __decorate([
|
|
288
|
+
Component
|
|
289
|
+
], ZdCalendar);
|
|
290
|
+
var script = ZdCalendar;
|
|
291
|
+
|
|
292
|
+
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
|
|
293
|
+
if (typeof shadowMode !== 'boolean') {
|
|
294
|
+
createInjectorSSR = createInjector;
|
|
295
|
+
createInjector = shadowMode;
|
|
296
|
+
shadowMode = false;
|
|
297
|
+
}
|
|
298
|
+
// Vue.extend constructor export interop.
|
|
299
|
+
const options = typeof script === 'function' ? script.options : script;
|
|
300
|
+
// render functions
|
|
301
|
+
if (template && template.render) {
|
|
302
|
+
options.render = template.render;
|
|
303
|
+
options.staticRenderFns = template.staticRenderFns;
|
|
304
|
+
options._compiled = true;
|
|
305
|
+
// functional template
|
|
306
|
+
if (isFunctionalTemplate) {
|
|
307
|
+
options.functional = true;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
// scopedId
|
|
311
|
+
if (scopeId) {
|
|
312
|
+
options._scopeId = scopeId;
|
|
313
|
+
}
|
|
314
|
+
let hook;
|
|
315
|
+
if (moduleIdentifier) {
|
|
316
|
+
// server build
|
|
317
|
+
hook = function (context) {
|
|
318
|
+
// 2.3 injection
|
|
319
|
+
context =
|
|
320
|
+
context || // cached call
|
|
321
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
322
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
|
|
323
|
+
// 2.2 with runInNewContext: true
|
|
324
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
325
|
+
context = __VUE_SSR_CONTEXT__;
|
|
326
|
+
}
|
|
327
|
+
// inject component styles
|
|
328
|
+
if (style) {
|
|
329
|
+
style.call(this, createInjectorSSR(context));
|
|
330
|
+
}
|
|
331
|
+
// register component module identifier for async chunk inference
|
|
332
|
+
if (context && context._registeredComponents) {
|
|
333
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
// used by ssr in case component is cached and beforeCreate
|
|
337
|
+
// never gets called
|
|
338
|
+
options._ssrRegister = hook;
|
|
339
|
+
}
|
|
340
|
+
else if (style) {
|
|
341
|
+
hook = shadowMode
|
|
342
|
+
? function (context) {
|
|
343
|
+
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
|
|
344
|
+
}
|
|
345
|
+
: function (context) {
|
|
346
|
+
style.call(this, createInjector(context));
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
if (hook) {
|
|
350
|
+
if (options.functional) {
|
|
351
|
+
// register for functional component in vue file
|
|
352
|
+
const originalRender = options.render;
|
|
353
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
354
|
+
hook.call(context);
|
|
355
|
+
return originalRender(h, context);
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
// inject component registration as beforeCreate hook
|
|
360
|
+
const existing = options.beforeCreate;
|
|
361
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
return script;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
const isOldIE = typeof navigator !== 'undefined' &&
|
|
368
|
+
/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());
|
|
369
|
+
function createInjector(context) {
|
|
370
|
+
return (id, style) => addStyle(id, style);
|
|
371
|
+
}
|
|
372
|
+
let HEAD;
|
|
373
|
+
const styles = {};
|
|
374
|
+
function addStyle(id, css) {
|
|
375
|
+
const group = isOldIE ? css.media || 'default' : id;
|
|
376
|
+
const style = styles[group] || (styles[group] = { ids: new Set(), styles: [] });
|
|
377
|
+
if (!style.ids.has(id)) {
|
|
378
|
+
style.ids.add(id);
|
|
379
|
+
let code = css.source;
|
|
380
|
+
if (css.map) {
|
|
381
|
+
// https://developer.chrome.com/devtools/docs/javascript-debugging
|
|
382
|
+
// this makes source maps inside style tags work properly in Chrome
|
|
383
|
+
code += '\n/*# sourceURL=' + css.map.sources[0] + ' */';
|
|
384
|
+
// http://stackoverflow.com/a/26603875
|
|
385
|
+
code +=
|
|
386
|
+
'\n/*# sourceMappingURL=data:application/json;base64,' +
|
|
387
|
+
btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +
|
|
388
|
+
' */';
|
|
389
|
+
}
|
|
390
|
+
if (!style.element) {
|
|
391
|
+
style.element = document.createElement('style');
|
|
392
|
+
style.element.type = 'text/css';
|
|
393
|
+
if (css.media)
|
|
394
|
+
style.element.setAttribute('media', css.media);
|
|
395
|
+
if (HEAD === undefined) {
|
|
396
|
+
HEAD = document.head || document.getElementsByTagName('head')[0];
|
|
397
|
+
}
|
|
398
|
+
HEAD.appendChild(style.element);
|
|
399
|
+
}
|
|
400
|
+
if ('styleSheet' in style.element) {
|
|
401
|
+
style.styles.push(code);
|
|
402
|
+
style.element.styleSheet.cssText = style.styles
|
|
403
|
+
.filter(Boolean)
|
|
404
|
+
.join('\n');
|
|
405
|
+
}
|
|
406
|
+
else {
|
|
407
|
+
const index = style.ids.size - 1;
|
|
408
|
+
const textNode = document.createTextNode(code);
|
|
409
|
+
const nodes = style.element.childNodes;
|
|
410
|
+
if (nodes[index])
|
|
411
|
+
style.element.removeChild(nodes[index]);
|
|
412
|
+
if (nodes.length)
|
|
413
|
+
style.element.insertBefore(textNode, nodes[index]);
|
|
414
|
+
else
|
|
415
|
+
style.element.appendChild(textNode);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/* script */
|
|
421
|
+
const __vue_script__ = script;
|
|
422
|
+
|
|
423
|
+
/* template */
|
|
424
|
+
var __vue_render__ = function () {
|
|
425
|
+
var _vm = this;
|
|
426
|
+
var _h = _vm.$createElement;
|
|
427
|
+
var _c = _vm._self._c || _h;
|
|
428
|
+
return _c(
|
|
429
|
+
"v-row",
|
|
430
|
+
{ staticClass: "fill-height zd-calendar-content" },
|
|
431
|
+
[
|
|
432
|
+
_c(
|
|
433
|
+
"v-col",
|
|
434
|
+
[
|
|
435
|
+
_c(
|
|
436
|
+
"div",
|
|
437
|
+
{
|
|
438
|
+
directives: [
|
|
439
|
+
{
|
|
440
|
+
name: "show",
|
|
441
|
+
rawName: "v-show",
|
|
442
|
+
value: _vm.instance.showHeader,
|
|
443
|
+
expression: "instance.showHeader",
|
|
444
|
+
},
|
|
445
|
+
],
|
|
446
|
+
class: [
|
|
447
|
+
"zd-toolbar-calendar",
|
|
448
|
+
{ "theme--dark": _vm.instance.dark || _vm.$vuetify.theme.dark },
|
|
449
|
+
{
|
|
450
|
+
"theme--light":
|
|
451
|
+
_vm.instance.light || !_vm.$vuetify.theme.dark,
|
|
452
|
+
},
|
|
453
|
+
],
|
|
454
|
+
attrs: {
|
|
455
|
+
name: "toolbar_" + _vm.instance.name,
|
|
456
|
+
height: "64",
|
|
457
|
+
dark: _vm.instance.dark,
|
|
458
|
+
light: _vm.instance.light,
|
|
459
|
+
},
|
|
460
|
+
},
|
|
461
|
+
[
|
|
462
|
+
_c(
|
|
463
|
+
"div",
|
|
464
|
+
[
|
|
465
|
+
_c("zd-button", {
|
|
466
|
+
staticClass: "mr-4",
|
|
467
|
+
attrs: {
|
|
468
|
+
name: "setTodayButton_" + _vm.instance.name,
|
|
469
|
+
label: "$t(CALENDAR_TODAY)",
|
|
470
|
+
},
|
|
471
|
+
on: {
|
|
472
|
+
click: function ($event) {
|
|
473
|
+
return _vm.setToday()
|
|
474
|
+
},
|
|
475
|
+
},
|
|
476
|
+
}),
|
|
477
|
+
_vm._v(" "),
|
|
478
|
+
_c(
|
|
479
|
+
"zd-button",
|
|
480
|
+
_vm._b(
|
|
481
|
+
{
|
|
482
|
+
attrs: {
|
|
483
|
+
name: "prevButtonCalendar_" + _vm.instance.name,
|
|
484
|
+
},
|
|
485
|
+
on: {
|
|
486
|
+
click: function ($event) {
|
|
487
|
+
return _vm.prev()
|
|
488
|
+
},
|
|
489
|
+
},
|
|
490
|
+
},
|
|
491
|
+
"zd-button",
|
|
492
|
+
{
|
|
493
|
+
icon: true,
|
|
494
|
+
fab: true,
|
|
495
|
+
small: true,
|
|
496
|
+
iconName: "prev",
|
|
497
|
+
},
|
|
498
|
+
false
|
|
499
|
+
)
|
|
500
|
+
),
|
|
501
|
+
_vm._v(" "),
|
|
502
|
+
_c(
|
|
503
|
+
"zd-button",
|
|
504
|
+
_vm._b(
|
|
505
|
+
{
|
|
506
|
+
attrs: {
|
|
507
|
+
name: "nextButtonCalendar_" + _vm.instance.name,
|
|
508
|
+
},
|
|
509
|
+
on: {
|
|
510
|
+
click: function ($event) {
|
|
511
|
+
return _vm.next()
|
|
512
|
+
},
|
|
513
|
+
},
|
|
514
|
+
},
|
|
515
|
+
"zd-button",
|
|
516
|
+
{
|
|
517
|
+
icon: true,
|
|
518
|
+
fab: true,
|
|
519
|
+
small: true,
|
|
520
|
+
iconName: "next",
|
|
521
|
+
},
|
|
522
|
+
false
|
|
523
|
+
)
|
|
524
|
+
),
|
|
525
|
+
],
|
|
526
|
+
1
|
|
527
|
+
),
|
|
528
|
+
_vm._v(" "),
|
|
529
|
+
_vm.instance.title
|
|
530
|
+
? _c("div", [
|
|
531
|
+
_c("h3", [
|
|
532
|
+
_vm._v(
|
|
533
|
+
"\n\t\t\t\t\t\t" +
|
|
534
|
+
_vm._s(_vm.instance.title) +
|
|
535
|
+
"\n\t\t\t\t\t"
|
|
536
|
+
),
|
|
537
|
+
]),
|
|
538
|
+
])
|
|
539
|
+
: _vm._e(),
|
|
540
|
+
_vm._v(" "),
|
|
541
|
+
_c(
|
|
542
|
+
"div",
|
|
543
|
+
[
|
|
544
|
+
_c(
|
|
545
|
+
"zd-select",
|
|
546
|
+
_vm._b(
|
|
547
|
+
{
|
|
548
|
+
ref: "selectCalendarType",
|
|
549
|
+
staticClass: "zd-select-calendar-type",
|
|
550
|
+
attrs: {
|
|
551
|
+
name: "selectCalendarType_" + _vm.instance.name,
|
|
552
|
+
},
|
|
553
|
+
on: {
|
|
554
|
+
change: function ($event) {
|
|
555
|
+
return _vm.setType(_vm.$refs.selectCalendarType)
|
|
556
|
+
},
|
|
557
|
+
},
|
|
558
|
+
},
|
|
559
|
+
"zd-select",
|
|
560
|
+
{
|
|
561
|
+
value: _vm.instance.type,
|
|
562
|
+
dataText: "name",
|
|
563
|
+
dataValue: "value",
|
|
564
|
+
clearable: false,
|
|
565
|
+
autocomplete: false,
|
|
566
|
+
showLabel: false,
|
|
567
|
+
showHelper: false,
|
|
568
|
+
dense: true,
|
|
569
|
+
returnObject: true,
|
|
570
|
+
dark: _vm.instance.dark,
|
|
571
|
+
light: _vm.instance.light,
|
|
572
|
+
datasource: _vm.instance.selectTypeData || {
|
|
573
|
+
data: [
|
|
574
|
+
{ name: _vm.$t("CALENDAR_MONTH"), value: "month" },
|
|
575
|
+
{ name: _vm.$t("CALENDAR_WEEK"), value: "week" },
|
|
576
|
+
{ name: _vm.$t("CALENDAR_DAY"), value: "day" },
|
|
577
|
+
{
|
|
578
|
+
name: _vm.$t("CALENDAR_CATEGORY"),
|
|
579
|
+
value: "category",
|
|
580
|
+
},
|
|
581
|
+
{ name: _vm.$t("CALENDAR_4DAYS"), value: "4day" },
|
|
582
|
+
],
|
|
583
|
+
},
|
|
584
|
+
},
|
|
585
|
+
false
|
|
586
|
+
)
|
|
587
|
+
),
|
|
588
|
+
],
|
|
589
|
+
1
|
|
590
|
+
),
|
|
591
|
+
]
|
|
592
|
+
),
|
|
593
|
+
_vm._v(" "),
|
|
594
|
+
_c(
|
|
595
|
+
"v-sheet",
|
|
596
|
+
{ attrs: { height: _vm.instance.height || 600 } },
|
|
597
|
+
[
|
|
598
|
+
_c("v-calendar", {
|
|
599
|
+
ref: "calendar",
|
|
600
|
+
attrs: {
|
|
601
|
+
categories: _vm.instance.categories,
|
|
602
|
+
"category-days": _vm.instance.categoryDays,
|
|
603
|
+
"category-for-invalid": _vm.instance.categoryForInvalid,
|
|
604
|
+
"category-hide-dynamic": _vm.instance.categoryHideDynamic,
|
|
605
|
+
"category-show-all": _vm.instance.categoryShowAll,
|
|
606
|
+
"category-text": _vm.instance.categoryText,
|
|
607
|
+
color: _vm.instance.color,
|
|
608
|
+
dark: _vm.instance.dark,
|
|
609
|
+
"day-format": _vm.instance.dayFormat,
|
|
610
|
+
end: _vm.instance.end,
|
|
611
|
+
"event-category": _vm.instance.eventCategory,
|
|
612
|
+
"event-color": _vm.instance.eventColor,
|
|
613
|
+
"event-end": _vm.instance.eventEnd,
|
|
614
|
+
"event-height": _vm.instance.eventHeight,
|
|
615
|
+
"event-margin-bottom": _vm.instance.eventMarginBottom,
|
|
616
|
+
"event-more": _vm.instance.eventMore,
|
|
617
|
+
"event-more-text": _vm.$t(_vm.instance.eventMoreText),
|
|
618
|
+
"event-name": _vm.instance.eventName,
|
|
619
|
+
"event-overlap-mode": _vm.instance.eventOverlapMode,
|
|
620
|
+
"event-overlap-threshold": _vm.instance.eventOverlapThreshold,
|
|
621
|
+
"event-start": _vm.instance.eventStart,
|
|
622
|
+
"event-text-color": _vm.instance.eventTextColor,
|
|
623
|
+
"event-timed": _vm.instance.eventTimed,
|
|
624
|
+
"hide-header": _vm.instance.hideHeader,
|
|
625
|
+
"interval-count": _vm.instance.intervalCount,
|
|
626
|
+
"interval-format": _vm.instance.intervalFormat,
|
|
627
|
+
"interval-height": _vm.instance.intervalHeight,
|
|
628
|
+
"interval-minutes": _vm.instance.intervalMinutes,
|
|
629
|
+
"interval-width": _vm.instance.intervalWidth,
|
|
630
|
+
events: _vm.instance.calendarEvents,
|
|
631
|
+
"first-interval": _vm.instance.firstInterval,
|
|
632
|
+
"first-style": _vm.instance.intervalStyle,
|
|
633
|
+
"first-time": _vm.instance.firstTime,
|
|
634
|
+
light: _vm.instance.light,
|
|
635
|
+
id: _vm.instance.name,
|
|
636
|
+
name: _vm.instance.name,
|
|
637
|
+
start: _vm.instance.start,
|
|
638
|
+
type: _vm.instance.type,
|
|
639
|
+
value: _vm.instance.value,
|
|
640
|
+
now: _vm.instance.now,
|
|
641
|
+
"show-week": _vm.instance.showWeek,
|
|
642
|
+
"show-month-on-first-day": _vm.instance.showMonthOnFirstDay,
|
|
643
|
+
"short-intervals": _vm.instance.shortIntervals,
|
|
644
|
+
"short-weekday": _vm.instance.shortWeekday,
|
|
645
|
+
"short-months": _vm.instance.shortMonths,
|
|
646
|
+
"short-week-days": _vm.instance.shortWeekDays,
|
|
647
|
+
locale: _vm.instance.locale,
|
|
648
|
+
"locale-first-day-of-year": _vm.instance.localeFirstDayOfYear,
|
|
649
|
+
"max-days": _vm.instance.maxDays,
|
|
650
|
+
"min-week": _vm.instance.minWeek,
|
|
651
|
+
"month-format": _vm.instance.monthFormat,
|
|
652
|
+
weekdays: _vm.instance.weekdays,
|
|
653
|
+
},
|
|
654
|
+
on: {
|
|
655
|
+
"click:more": _vm.viewDay,
|
|
656
|
+
"click:date": _vm.viewDay,
|
|
657
|
+
"click:event": _vm.showEvent,
|
|
658
|
+
},
|
|
659
|
+
model: {
|
|
660
|
+
value: _vm.instance.value,
|
|
661
|
+
callback: function ($$v) {
|
|
662
|
+
_vm.$set(_vm.instance, "value", $$v);
|
|
663
|
+
},
|
|
664
|
+
expression: "instance.value",
|
|
665
|
+
},
|
|
666
|
+
}),
|
|
667
|
+
_vm._v(" "),
|
|
668
|
+
_c(
|
|
669
|
+
"v-menu",
|
|
670
|
+
{
|
|
671
|
+
attrs: {
|
|
672
|
+
"close-on-content-click": false,
|
|
673
|
+
activator: _vm.selectedElement,
|
|
674
|
+
"offset-x": "",
|
|
675
|
+
},
|
|
676
|
+
model: {
|
|
677
|
+
value: _vm.selectedOpen,
|
|
678
|
+
callback: function ($$v) {
|
|
679
|
+
_vm.selectedOpen = $$v;
|
|
680
|
+
},
|
|
681
|
+
expression: "selectedOpen",
|
|
682
|
+
},
|
|
683
|
+
},
|
|
684
|
+
[
|
|
685
|
+
_c(
|
|
686
|
+
"zd-card",
|
|
687
|
+
{
|
|
688
|
+
attrs: {
|
|
689
|
+
name: "card_" + _vm.instance.name,
|
|
690
|
+
cssClass: "zd-pa-0",
|
|
691
|
+
dark: _vm.instance.dark,
|
|
692
|
+
light: _vm.instance.light,
|
|
693
|
+
},
|
|
694
|
+
},
|
|
695
|
+
[
|
|
696
|
+
_c(
|
|
697
|
+
"v-toolbar",
|
|
698
|
+
{
|
|
699
|
+
attrs: {
|
|
700
|
+
color: _vm.selectedEvent.color,
|
|
701
|
+
elevation: "0",
|
|
702
|
+
dark: "",
|
|
703
|
+
},
|
|
704
|
+
},
|
|
705
|
+
[
|
|
706
|
+
_c(
|
|
707
|
+
"zd-text",
|
|
708
|
+
_vm._b(
|
|
709
|
+
{ attrs: { name: "title_" + _vm.instance.name } },
|
|
710
|
+
"zd-text",
|
|
711
|
+
{
|
|
712
|
+
text: _vm.selectedEvent.name,
|
|
713
|
+
tag: "h5",
|
|
714
|
+
},
|
|
715
|
+
false
|
|
716
|
+
)
|
|
717
|
+
),
|
|
718
|
+
],
|
|
719
|
+
1
|
|
720
|
+
),
|
|
721
|
+
_vm._v(" "),
|
|
722
|
+
_c(
|
|
723
|
+
"v-card-text",
|
|
724
|
+
[
|
|
725
|
+
_c(
|
|
726
|
+
"zd-text",
|
|
727
|
+
_vm._b(
|
|
728
|
+
{
|
|
729
|
+
attrs: {
|
|
730
|
+
name: "description_" + _vm.instance.name,
|
|
731
|
+
},
|
|
732
|
+
},
|
|
733
|
+
"zd-text",
|
|
734
|
+
{
|
|
735
|
+
text: _vm.selectedEvent.description,
|
|
736
|
+
tag: "p",
|
|
737
|
+
},
|
|
738
|
+
false
|
|
739
|
+
)
|
|
740
|
+
),
|
|
741
|
+
],
|
|
742
|
+
1
|
|
743
|
+
),
|
|
744
|
+
_vm._v(" "),
|
|
745
|
+
_c(
|
|
746
|
+
"v-card-actions",
|
|
747
|
+
[
|
|
748
|
+
_c("zd-button", {
|
|
749
|
+
attrs: {
|
|
750
|
+
name: "buttonClose_" + _vm.instance.name,
|
|
751
|
+
flat: "",
|
|
752
|
+
color: "secondary",
|
|
753
|
+
label: "$t(CALENDAR_CLOSE)",
|
|
754
|
+
},
|
|
755
|
+
on: {
|
|
756
|
+
click: function ($event) {
|
|
757
|
+
_vm.selectedOpen = !_vm.selectedOpen;
|
|
758
|
+
},
|
|
759
|
+
},
|
|
760
|
+
}),
|
|
761
|
+
],
|
|
762
|
+
1
|
|
763
|
+
),
|
|
764
|
+
],
|
|
765
|
+
1
|
|
766
|
+
),
|
|
767
|
+
],
|
|
768
|
+
1
|
|
769
|
+
),
|
|
770
|
+
],
|
|
771
|
+
1
|
|
772
|
+
),
|
|
773
|
+
],
|
|
774
|
+
1
|
|
775
|
+
),
|
|
776
|
+
],
|
|
777
|
+
1
|
|
778
|
+
)
|
|
779
|
+
};
|
|
780
|
+
var __vue_staticRenderFns__ = [];
|
|
781
|
+
__vue_render__._withStripped = true;
|
|
782
|
+
|
|
783
|
+
/* style */
|
|
784
|
+
const __vue_inject_styles__ = function (inject) {
|
|
785
|
+
if (!inject) return
|
|
786
|
+
inject("data-v-64d4d2dc_0", { source: ".zd-calendar-content .zd-toolbar-calendar {\n display: flex;\n justify-items: center;\n justify-content: space-between;\n background-color: #fff;\n padding: 0.75rem 0.5rem;\n}\n.zd-calendar-content .zd-toolbar-calendar.theme--dark {\n background-color: #1e1e1e;\n}\n.zd-calendar-content .zd-toolbar-calendar div {\n align-items: center;\n display: flex;\n}", map: undefined, media: undefined });
|
|
787
|
+
|
|
788
|
+
};
|
|
789
|
+
/* scoped */
|
|
790
|
+
const __vue_scope_id__ = undefined;
|
|
791
|
+
/* module identifier */
|
|
792
|
+
const __vue_module_identifier__ = undefined;
|
|
793
|
+
/* functional template */
|
|
794
|
+
const __vue_is_functional_template__ = false;
|
|
795
|
+
/* style inject SSR */
|
|
796
|
+
|
|
797
|
+
/* style inject shadow dom */
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
const __vue_component__ = /*#__PURE__*/normalizeComponent(
|
|
802
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
803
|
+
__vue_inject_styles__,
|
|
804
|
+
__vue_script__,
|
|
805
|
+
__vue_scope_id__,
|
|
806
|
+
__vue_is_functional_template__,
|
|
807
|
+
__vue_module_identifier__,
|
|
808
|
+
false,
|
|
809
|
+
createInjector,
|
|
810
|
+
undefined,
|
|
811
|
+
undefined
|
|
812
|
+
);
|
|
813
|
+
|
|
814
|
+
export { __vue_component__ as ZdCalendar };
|