@zeedhi/zd-calendar-vue 1.1.1 → 1.3.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 +185 -39
- package/dist/calendar-vue.umd.js +188 -43
- package/package.json +2 -2
- package/types/Calendar.d.ts +15 -4
package/dist/calendar-vue.esm.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VersionService } from '@zeedhi/core';
|
|
1
2
|
import { Prop, Component } from 'vue-property-decorator';
|
|
2
3
|
import { PropWatch, ZdComponentRender } from '@zeedhi/vuetify';
|
|
3
4
|
import { Calendar } from '@zeedhi/zd-calendar-common';
|
|
@@ -35,29 +36,47 @@ let ZdCalendar = class ZdCalendar extends ZdComponentRender {
|
|
|
35
36
|
this.selectedOpen = false;
|
|
36
37
|
this.selectedElement = null;
|
|
37
38
|
this.selectedEvent = {};
|
|
39
|
+
this.showDatePicker = false;
|
|
40
|
+
}
|
|
41
|
+
onChangePicker() {
|
|
42
|
+
this.showDatePicker = false;
|
|
43
|
+
}
|
|
44
|
+
get titleLabel() {
|
|
45
|
+
if (this.instance.title) {
|
|
46
|
+
return this.instance.title;
|
|
47
|
+
}
|
|
48
|
+
const calendarRef = this.$refs.calendar;
|
|
49
|
+
if (calendarRef) {
|
|
50
|
+
const { title } = calendarRef;
|
|
51
|
+
return title.charAt(0).toUpperCase() + title.slice(1);
|
|
52
|
+
}
|
|
53
|
+
return '';
|
|
38
54
|
}
|
|
39
55
|
mounted() {
|
|
40
56
|
this.$refs.calendar.checkChange();
|
|
41
|
-
const value = this.instance
|
|
57
|
+
const { value } = this.instance;
|
|
42
58
|
this.instance.value = '';
|
|
43
59
|
this.instance.value = value;
|
|
44
60
|
}
|
|
45
|
-
prev() {
|
|
46
|
-
this
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
this.instance.next(this.$el);
|
|
61
|
+
prev(event) {
|
|
62
|
+
this.instance.beforePrevious(this.$el);
|
|
63
|
+
if (!(event === null || event === void 0 ? void 0 : event.defaultPrevented)) {
|
|
64
|
+
this.$refs.calendar.prev();
|
|
65
|
+
this.instance.previous(this.$el);
|
|
66
|
+
}
|
|
52
67
|
}
|
|
53
|
-
|
|
54
|
-
this.instance.
|
|
68
|
+
next(event) {
|
|
69
|
+
this.instance.beforeNext(this.$el);
|
|
70
|
+
if (!(event === null || event === void 0 ? void 0 : event.defaultPrevented)) {
|
|
71
|
+
this.$refs.calendar.next();
|
|
72
|
+
this.instance.next(this.$el);
|
|
73
|
+
}
|
|
55
74
|
}
|
|
56
75
|
setType(select) {
|
|
57
76
|
const { value } = select.instance.value;
|
|
58
77
|
this.instance.type = value;
|
|
59
78
|
}
|
|
60
|
-
viewDay(
|
|
79
|
+
viewDay(date) {
|
|
61
80
|
this.instance.value = date;
|
|
62
81
|
this.instance.type = 'day';
|
|
63
82
|
}
|
|
@@ -76,6 +95,40 @@ let ZdCalendar = class ZdCalendar extends ZdComponentRender {
|
|
|
76
95
|
}
|
|
77
96
|
nativeEvent.stopPropagation();
|
|
78
97
|
}
|
|
98
|
+
clickDate(event) {
|
|
99
|
+
this.instance.clickDate(this.$el, event);
|
|
100
|
+
if (!(event === null || event === void 0 ? void 0 : event.defaultPrevented)) {
|
|
101
|
+
this.viewDay(event.date);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
clickMore(event) {
|
|
105
|
+
this.instance.clickMore(this.$el, event);
|
|
106
|
+
if (!(event === null || event === void 0 ? void 0 : event.defaultPrevented)) {
|
|
107
|
+
this.viewDay(event.date);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
clickEvent({ nativeEvent, event }) {
|
|
111
|
+
this.instance.clickEvent(this.$el, nativeEvent);
|
|
112
|
+
this.showEvent({ nativeEvent, event });
|
|
113
|
+
}
|
|
114
|
+
clickDay(event) {
|
|
115
|
+
this.instance.clickDay(this.$el, event);
|
|
116
|
+
}
|
|
117
|
+
clickDayCategory(event) {
|
|
118
|
+
this.instance.clickDayCategory(this.$el, event);
|
|
119
|
+
}
|
|
120
|
+
clickInterval(event) {
|
|
121
|
+
this.instance.clickInterval(this.$el, event);
|
|
122
|
+
}
|
|
123
|
+
clickTime(event) {
|
|
124
|
+
this.instance.clickTime(this.$el, event);
|
|
125
|
+
}
|
|
126
|
+
clickTimeCategory(event) {
|
|
127
|
+
this.instance.clickTimeCategory(this.$el, event);
|
|
128
|
+
}
|
|
129
|
+
moved(event) {
|
|
130
|
+
this.instance.moved(this.$el, event);
|
|
131
|
+
}
|
|
79
132
|
};
|
|
80
133
|
__decorate([
|
|
81
134
|
Prop({ type: [String, Array], default: undefined }),
|
|
@@ -450,6 +503,7 @@ var __vue_render__ = function () {
|
|
|
450
503
|
],
|
|
451
504
|
class: [
|
|
452
505
|
"zd-toolbar-calendar",
|
|
506
|
+
"row",
|
|
453
507
|
{ "theme--dark": _vm.instance.dark || _vm.$vuetify.theme.dark },
|
|
454
508
|
{
|
|
455
509
|
"theme--light":
|
|
@@ -466,6 +520,7 @@ var __vue_render__ = function () {
|
|
|
466
520
|
[
|
|
467
521
|
_c(
|
|
468
522
|
"div",
|
|
523
|
+
{ staticClass: "zd-col-2 zd-pb-2" },
|
|
469
524
|
[
|
|
470
525
|
_c("zd-button", {
|
|
471
526
|
staticClass: "mr-4",
|
|
@@ -475,11 +530,21 @@ var __vue_render__ = function () {
|
|
|
475
530
|
},
|
|
476
531
|
on: {
|
|
477
532
|
click: function ($event) {
|
|
478
|
-
return _vm.
|
|
533
|
+
return _vm.instance.goToToday()
|
|
479
534
|
},
|
|
480
535
|
},
|
|
481
536
|
}),
|
|
482
|
-
|
|
537
|
+
],
|
|
538
|
+
1
|
|
539
|
+
),
|
|
540
|
+
_vm._v(" "),
|
|
541
|
+
_c(
|
|
542
|
+
"div",
|
|
543
|
+
{
|
|
544
|
+
staticClass:
|
|
545
|
+
"zd-justify-sm-center zd-justify-end zd-col-sm-8 zd-col-10 zd-pb-2",
|
|
546
|
+
},
|
|
547
|
+
[
|
|
483
548
|
_c(
|
|
484
549
|
"zd-button",
|
|
485
550
|
_vm._b(
|
|
@@ -495,6 +560,7 @@ var __vue_render__ = function () {
|
|
|
495
560
|
},
|
|
496
561
|
"zd-button",
|
|
497
562
|
{
|
|
563
|
+
cssClass: "zd-mr-1",
|
|
498
564
|
icon: true,
|
|
499
565
|
fab: true,
|
|
500
566
|
small: true,
|
|
@@ -504,6 +570,88 @@ var __vue_render__ = function () {
|
|
|
504
570
|
)
|
|
505
571
|
),
|
|
506
572
|
_vm._v(" "),
|
|
573
|
+
_c(
|
|
574
|
+
"v-menu",
|
|
575
|
+
{
|
|
576
|
+
staticClass: "zd-date-menu-activator",
|
|
577
|
+
attrs: {
|
|
578
|
+
"offset-overflow": "",
|
|
579
|
+
"offset-y": "",
|
|
580
|
+
transition: "scale-transition",
|
|
581
|
+
"close-on-content-click": false,
|
|
582
|
+
},
|
|
583
|
+
scopedSlots: _vm._u([
|
|
584
|
+
{
|
|
585
|
+
key: "activator",
|
|
586
|
+
fn: function (ref) {
|
|
587
|
+
var on = ref.on;
|
|
588
|
+
return [
|
|
589
|
+
_c(
|
|
590
|
+
"div",
|
|
591
|
+
_vm._g(
|
|
592
|
+
{
|
|
593
|
+
attrs: {
|
|
594
|
+
"dropdown-activator": Object.assign(
|
|
595
|
+
{},
|
|
596
|
+
_vm.$attrs["dropdown-activator"],
|
|
597
|
+
on
|
|
598
|
+
),
|
|
599
|
+
},
|
|
600
|
+
},
|
|
601
|
+
on
|
|
602
|
+
),
|
|
603
|
+
[
|
|
604
|
+
_vm.instance.title || _vm.$refs.calendar
|
|
605
|
+
? _c("zd-button", {
|
|
606
|
+
staticClass:
|
|
607
|
+
"zd-calendar-content-title",
|
|
608
|
+
attrs: {
|
|
609
|
+
name:
|
|
610
|
+
"titleButton_" + _vm.instance.name,
|
|
611
|
+
component: "ZdButton",
|
|
612
|
+
flat: "",
|
|
613
|
+
label: _vm.titleLabel,
|
|
614
|
+
},
|
|
615
|
+
})
|
|
616
|
+
: _vm._e(),
|
|
617
|
+
],
|
|
618
|
+
1
|
|
619
|
+
),
|
|
620
|
+
]
|
|
621
|
+
},
|
|
622
|
+
},
|
|
623
|
+
]),
|
|
624
|
+
model: {
|
|
625
|
+
value: _vm.showDatePicker,
|
|
626
|
+
callback: function ($$v) {
|
|
627
|
+
_vm.showDatePicker = $$v;
|
|
628
|
+
},
|
|
629
|
+
expression: "showDatePicker",
|
|
630
|
+
},
|
|
631
|
+
},
|
|
632
|
+
[
|
|
633
|
+
_vm._v(" "),
|
|
634
|
+
_c("v-date-picker", {
|
|
635
|
+
attrs: {
|
|
636
|
+
"no-title": "",
|
|
637
|
+
dark: _vm.instance.dark,
|
|
638
|
+
light: _vm.instance.light,
|
|
639
|
+
color: _vm.instance.color,
|
|
640
|
+
locale: _vm.instance.locale,
|
|
641
|
+
},
|
|
642
|
+
on: { change: _vm.onChangePicker },
|
|
643
|
+
model: {
|
|
644
|
+
value: _vm.instance.value,
|
|
645
|
+
callback: function ($$v) {
|
|
646
|
+
_vm.$set(_vm.instance, "value", $$v);
|
|
647
|
+
},
|
|
648
|
+
expression: "instance.value",
|
|
649
|
+
},
|
|
650
|
+
}),
|
|
651
|
+
],
|
|
652
|
+
1
|
|
653
|
+
),
|
|
654
|
+
_vm._v(" "),
|
|
507
655
|
_c(
|
|
508
656
|
"zd-button",
|
|
509
657
|
_vm._b(
|
|
@@ -519,6 +667,7 @@ var __vue_render__ = function () {
|
|
|
519
667
|
},
|
|
520
668
|
"zd-button",
|
|
521
669
|
{
|
|
670
|
+
cssClass: "zd-ml-1",
|
|
522
671
|
icon: true,
|
|
523
672
|
fab: true,
|
|
524
673
|
small: true,
|
|
@@ -531,30 +680,9 @@ var __vue_render__ = function () {
|
|
|
531
680
|
1
|
|
532
681
|
),
|
|
533
682
|
_vm._v(" "),
|
|
534
|
-
_c("div", { staticClass: "zd-calendar-content-title" }, [
|
|
535
|
-
_vm.instance.title
|
|
536
|
-
? _c("h2", [
|
|
537
|
-
_vm._v(
|
|
538
|
-
"\n " +
|
|
539
|
-
_vm._s(_vm.instance.title) +
|
|
540
|
-
"\n "
|
|
541
|
-
),
|
|
542
|
-
])
|
|
543
|
-
: _vm._e(),
|
|
544
|
-
_vm._v(" "),
|
|
545
|
-
_vm.$refs.calendar
|
|
546
|
-
? _c("h3", [
|
|
547
|
-
_vm._v(
|
|
548
|
-
"\n " +
|
|
549
|
-
_vm._s(_vm.$refs.calendar.title) +
|
|
550
|
-
"\n "
|
|
551
|
-
),
|
|
552
|
-
])
|
|
553
|
-
: _vm._e(),
|
|
554
|
-
]),
|
|
555
|
-
_vm._v(" "),
|
|
556
683
|
_c(
|
|
557
684
|
"div",
|
|
685
|
+
{ staticClass: "zd-col-sm-2 zd-col-12 zd-pb-2" },
|
|
558
686
|
[
|
|
559
687
|
_c(
|
|
560
688
|
"zd-select",
|
|
@@ -667,9 +795,24 @@ var __vue_render__ = function () {
|
|
|
667
795
|
weekdays: _vm.instance.weekdays,
|
|
668
796
|
},
|
|
669
797
|
on: {
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
798
|
+
click: function ($event) {
|
|
799
|
+
return _vm.click($event)
|
|
800
|
+
},
|
|
801
|
+
focus: function ($event) {
|
|
802
|
+
return _vm.focus($event)
|
|
803
|
+
},
|
|
804
|
+
blur: function ($event) {
|
|
805
|
+
return _vm.blur($event)
|
|
806
|
+
},
|
|
807
|
+
"click:more": _vm.clickMore,
|
|
808
|
+
"click:date": _vm.clickDate,
|
|
809
|
+
"click:event": _vm.clickEvent,
|
|
810
|
+
"click:day": _vm.clickDay,
|
|
811
|
+
"click:day-category": _vm.clickDayCategory,
|
|
812
|
+
"click:interval": _vm.clickInterval,
|
|
813
|
+
"click:time": _vm.clickTime,
|
|
814
|
+
"click:time-category": _vm.clickTimeCategory,
|
|
815
|
+
moved: _vm.moved,
|
|
673
816
|
},
|
|
674
817
|
model: {
|
|
675
818
|
value: _vm.instance.value,
|
|
@@ -798,7 +941,7 @@ __vue_render__._withStripped = true;
|
|
|
798
941
|
/* style */
|
|
799
942
|
const __vue_inject_styles__ = function (inject) {
|
|
800
943
|
if (!inject) return
|
|
801
|
-
inject("data-v-
|
|
944
|
+
inject("data-v-7da13c08_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 margin: 0;\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}\n.zd-calendar-content .zd-calendar-content-title {\n display: flex;\n flex-direction: column;\n width: 154px;\n}", map: undefined, media: undefined });
|
|
802
945
|
|
|
803
946
|
};
|
|
804
947
|
/* scoped */
|
|
@@ -826,4 +969,7 @@ __vue_render__._withStripped = true;
|
|
|
826
969
|
undefined
|
|
827
970
|
);
|
|
828
971
|
|
|
972
|
+
const packageContent = require('../package.json');
|
|
973
|
+
VersionService.addPackageVersion(packageContent.name, packageContent.version);
|
|
974
|
+
|
|
829
975
|
export { __vue_component__ as ZdCalendar };
|
package/dist/calendar-vue.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue-property-decorator'), require('@zeedhi/vuetify'), require('@zeedhi/zd-calendar-common')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'vue-property-decorator', '@zeedhi/vuetify', '@zeedhi/zd-calendar-common'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@zeedhi/zd-calendar-vue"] = {}, global["vue-property-decorator"], global["@zeedhi/vuetify"], global["@zeedhi/zd-calendar-common"]));
|
|
5
|
-
})(this, (function (exports, vuePropertyDecorator, vuetify, zdCalendarCommon) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@zeedhi/core'), require('vue-property-decorator'), require('@zeedhi/vuetify'), require('@zeedhi/zd-calendar-common')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@zeedhi/core', 'vue-property-decorator', '@zeedhi/vuetify', '@zeedhi/zd-calendar-common'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@zeedhi/zd-calendar-vue"] = {}, global.core, global["vue-property-decorator"], global["@zeedhi/vuetify"], global["@zeedhi/zd-calendar-common"]));
|
|
5
|
+
})(this, (function (exports, core, vuePropertyDecorator, vuetify, zdCalendarCommon) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -37,29 +37,47 @@
|
|
|
37
37
|
this.selectedOpen = false;
|
|
38
38
|
this.selectedElement = null;
|
|
39
39
|
this.selectedEvent = {};
|
|
40
|
+
this.showDatePicker = false;
|
|
41
|
+
}
|
|
42
|
+
onChangePicker() {
|
|
43
|
+
this.showDatePicker = false;
|
|
44
|
+
}
|
|
45
|
+
get titleLabel() {
|
|
46
|
+
if (this.instance.title) {
|
|
47
|
+
return this.instance.title;
|
|
48
|
+
}
|
|
49
|
+
const calendarRef = this.$refs.calendar;
|
|
50
|
+
if (calendarRef) {
|
|
51
|
+
const { title } = calendarRef;
|
|
52
|
+
return title.charAt(0).toUpperCase() + title.slice(1);
|
|
53
|
+
}
|
|
54
|
+
return '';
|
|
40
55
|
}
|
|
41
56
|
mounted() {
|
|
42
57
|
this.$refs.calendar.checkChange();
|
|
43
|
-
const value = this.instance
|
|
58
|
+
const { value } = this.instance;
|
|
44
59
|
this.instance.value = '';
|
|
45
60
|
this.instance.value = value;
|
|
46
61
|
}
|
|
47
|
-
prev() {
|
|
48
|
-
this
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
this.instance.next(this.$el);
|
|
62
|
+
prev(event) {
|
|
63
|
+
this.instance.beforePrevious(this.$el);
|
|
64
|
+
if (!(event === null || event === void 0 ? void 0 : event.defaultPrevented)) {
|
|
65
|
+
this.$refs.calendar.prev();
|
|
66
|
+
this.instance.previous(this.$el);
|
|
67
|
+
}
|
|
54
68
|
}
|
|
55
|
-
|
|
56
|
-
this.instance.
|
|
69
|
+
next(event) {
|
|
70
|
+
this.instance.beforeNext(this.$el);
|
|
71
|
+
if (!(event === null || event === void 0 ? void 0 : event.defaultPrevented)) {
|
|
72
|
+
this.$refs.calendar.next();
|
|
73
|
+
this.instance.next(this.$el);
|
|
74
|
+
}
|
|
57
75
|
}
|
|
58
76
|
setType(select) {
|
|
59
77
|
const { value } = select.instance.value;
|
|
60
78
|
this.instance.type = value;
|
|
61
79
|
}
|
|
62
|
-
viewDay(
|
|
80
|
+
viewDay(date) {
|
|
63
81
|
this.instance.value = date;
|
|
64
82
|
this.instance.type = 'day';
|
|
65
83
|
}
|
|
@@ -78,6 +96,40 @@
|
|
|
78
96
|
}
|
|
79
97
|
nativeEvent.stopPropagation();
|
|
80
98
|
}
|
|
99
|
+
clickDate(event) {
|
|
100
|
+
this.instance.clickDate(this.$el, event);
|
|
101
|
+
if (!(event === null || event === void 0 ? void 0 : event.defaultPrevented)) {
|
|
102
|
+
this.viewDay(event.date);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
clickMore(event) {
|
|
106
|
+
this.instance.clickMore(this.$el, event);
|
|
107
|
+
if (!(event === null || event === void 0 ? void 0 : event.defaultPrevented)) {
|
|
108
|
+
this.viewDay(event.date);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
clickEvent({ nativeEvent, event }) {
|
|
112
|
+
this.instance.clickEvent(this.$el, nativeEvent);
|
|
113
|
+
this.showEvent({ nativeEvent, event });
|
|
114
|
+
}
|
|
115
|
+
clickDay(event) {
|
|
116
|
+
this.instance.clickDay(this.$el, event);
|
|
117
|
+
}
|
|
118
|
+
clickDayCategory(event) {
|
|
119
|
+
this.instance.clickDayCategory(this.$el, event);
|
|
120
|
+
}
|
|
121
|
+
clickInterval(event) {
|
|
122
|
+
this.instance.clickInterval(this.$el, event);
|
|
123
|
+
}
|
|
124
|
+
clickTime(event) {
|
|
125
|
+
this.instance.clickTime(this.$el, event);
|
|
126
|
+
}
|
|
127
|
+
clickTimeCategory(event) {
|
|
128
|
+
this.instance.clickTimeCategory(this.$el, event);
|
|
129
|
+
}
|
|
130
|
+
moved(event) {
|
|
131
|
+
this.instance.moved(this.$el, event);
|
|
132
|
+
}
|
|
81
133
|
};
|
|
82
134
|
__decorate([
|
|
83
135
|
vuePropertyDecorator.Prop({ type: [String, Array], default: undefined }),
|
|
@@ -452,6 +504,7 @@
|
|
|
452
504
|
],
|
|
453
505
|
class: [
|
|
454
506
|
"zd-toolbar-calendar",
|
|
507
|
+
"row",
|
|
455
508
|
{ "theme--dark": _vm.instance.dark || _vm.$vuetify.theme.dark },
|
|
456
509
|
{
|
|
457
510
|
"theme--light":
|
|
@@ -468,6 +521,7 @@
|
|
|
468
521
|
[
|
|
469
522
|
_c(
|
|
470
523
|
"div",
|
|
524
|
+
{ staticClass: "zd-col-2 zd-pb-2" },
|
|
471
525
|
[
|
|
472
526
|
_c("zd-button", {
|
|
473
527
|
staticClass: "mr-4",
|
|
@@ -477,11 +531,21 @@
|
|
|
477
531
|
},
|
|
478
532
|
on: {
|
|
479
533
|
click: function ($event) {
|
|
480
|
-
return _vm.
|
|
534
|
+
return _vm.instance.goToToday()
|
|
481
535
|
},
|
|
482
536
|
},
|
|
483
537
|
}),
|
|
484
|
-
|
|
538
|
+
],
|
|
539
|
+
1
|
|
540
|
+
),
|
|
541
|
+
_vm._v(" "),
|
|
542
|
+
_c(
|
|
543
|
+
"div",
|
|
544
|
+
{
|
|
545
|
+
staticClass:
|
|
546
|
+
"zd-justify-sm-center zd-justify-end zd-col-sm-8 zd-col-10 zd-pb-2",
|
|
547
|
+
},
|
|
548
|
+
[
|
|
485
549
|
_c(
|
|
486
550
|
"zd-button",
|
|
487
551
|
_vm._b(
|
|
@@ -497,6 +561,7 @@
|
|
|
497
561
|
},
|
|
498
562
|
"zd-button",
|
|
499
563
|
{
|
|
564
|
+
cssClass: "zd-mr-1",
|
|
500
565
|
icon: true,
|
|
501
566
|
fab: true,
|
|
502
567
|
small: true,
|
|
@@ -506,6 +571,88 @@
|
|
|
506
571
|
)
|
|
507
572
|
),
|
|
508
573
|
_vm._v(" "),
|
|
574
|
+
_c(
|
|
575
|
+
"v-menu",
|
|
576
|
+
{
|
|
577
|
+
staticClass: "zd-date-menu-activator",
|
|
578
|
+
attrs: {
|
|
579
|
+
"offset-overflow": "",
|
|
580
|
+
"offset-y": "",
|
|
581
|
+
transition: "scale-transition",
|
|
582
|
+
"close-on-content-click": false,
|
|
583
|
+
},
|
|
584
|
+
scopedSlots: _vm._u([
|
|
585
|
+
{
|
|
586
|
+
key: "activator",
|
|
587
|
+
fn: function (ref) {
|
|
588
|
+
var on = ref.on;
|
|
589
|
+
return [
|
|
590
|
+
_c(
|
|
591
|
+
"div",
|
|
592
|
+
_vm._g(
|
|
593
|
+
{
|
|
594
|
+
attrs: {
|
|
595
|
+
"dropdown-activator": Object.assign(
|
|
596
|
+
{},
|
|
597
|
+
_vm.$attrs["dropdown-activator"],
|
|
598
|
+
on
|
|
599
|
+
),
|
|
600
|
+
},
|
|
601
|
+
},
|
|
602
|
+
on
|
|
603
|
+
),
|
|
604
|
+
[
|
|
605
|
+
_vm.instance.title || _vm.$refs.calendar
|
|
606
|
+
? _c("zd-button", {
|
|
607
|
+
staticClass:
|
|
608
|
+
"zd-calendar-content-title",
|
|
609
|
+
attrs: {
|
|
610
|
+
name:
|
|
611
|
+
"titleButton_" + _vm.instance.name,
|
|
612
|
+
component: "ZdButton",
|
|
613
|
+
flat: "",
|
|
614
|
+
label: _vm.titleLabel,
|
|
615
|
+
},
|
|
616
|
+
})
|
|
617
|
+
: _vm._e(),
|
|
618
|
+
],
|
|
619
|
+
1
|
|
620
|
+
),
|
|
621
|
+
]
|
|
622
|
+
},
|
|
623
|
+
},
|
|
624
|
+
]),
|
|
625
|
+
model: {
|
|
626
|
+
value: _vm.showDatePicker,
|
|
627
|
+
callback: function ($$v) {
|
|
628
|
+
_vm.showDatePicker = $$v;
|
|
629
|
+
},
|
|
630
|
+
expression: "showDatePicker",
|
|
631
|
+
},
|
|
632
|
+
},
|
|
633
|
+
[
|
|
634
|
+
_vm._v(" "),
|
|
635
|
+
_c("v-date-picker", {
|
|
636
|
+
attrs: {
|
|
637
|
+
"no-title": "",
|
|
638
|
+
dark: _vm.instance.dark,
|
|
639
|
+
light: _vm.instance.light,
|
|
640
|
+
color: _vm.instance.color,
|
|
641
|
+
locale: _vm.instance.locale,
|
|
642
|
+
},
|
|
643
|
+
on: { change: _vm.onChangePicker },
|
|
644
|
+
model: {
|
|
645
|
+
value: _vm.instance.value,
|
|
646
|
+
callback: function ($$v) {
|
|
647
|
+
_vm.$set(_vm.instance, "value", $$v);
|
|
648
|
+
},
|
|
649
|
+
expression: "instance.value",
|
|
650
|
+
},
|
|
651
|
+
}),
|
|
652
|
+
],
|
|
653
|
+
1
|
|
654
|
+
),
|
|
655
|
+
_vm._v(" "),
|
|
509
656
|
_c(
|
|
510
657
|
"zd-button",
|
|
511
658
|
_vm._b(
|
|
@@ -521,6 +668,7 @@
|
|
|
521
668
|
},
|
|
522
669
|
"zd-button",
|
|
523
670
|
{
|
|
671
|
+
cssClass: "zd-ml-1",
|
|
524
672
|
icon: true,
|
|
525
673
|
fab: true,
|
|
526
674
|
small: true,
|
|
@@ -533,30 +681,9 @@
|
|
|
533
681
|
1
|
|
534
682
|
),
|
|
535
683
|
_vm._v(" "),
|
|
536
|
-
_c("div", { staticClass: "zd-calendar-content-title" }, [
|
|
537
|
-
_vm.instance.title
|
|
538
|
-
? _c("h2", [
|
|
539
|
-
_vm._v(
|
|
540
|
-
"\n " +
|
|
541
|
-
_vm._s(_vm.instance.title) +
|
|
542
|
-
"\n "
|
|
543
|
-
),
|
|
544
|
-
])
|
|
545
|
-
: _vm._e(),
|
|
546
|
-
_vm._v(" "),
|
|
547
|
-
_vm.$refs.calendar
|
|
548
|
-
? _c("h3", [
|
|
549
|
-
_vm._v(
|
|
550
|
-
"\n " +
|
|
551
|
-
_vm._s(_vm.$refs.calendar.title) +
|
|
552
|
-
"\n "
|
|
553
|
-
),
|
|
554
|
-
])
|
|
555
|
-
: _vm._e(),
|
|
556
|
-
]),
|
|
557
|
-
_vm._v(" "),
|
|
558
684
|
_c(
|
|
559
685
|
"div",
|
|
686
|
+
{ staticClass: "zd-col-sm-2 zd-col-12 zd-pb-2" },
|
|
560
687
|
[
|
|
561
688
|
_c(
|
|
562
689
|
"zd-select",
|
|
@@ -669,9 +796,24 @@
|
|
|
669
796
|
weekdays: _vm.instance.weekdays,
|
|
670
797
|
},
|
|
671
798
|
on: {
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
799
|
+
click: function ($event) {
|
|
800
|
+
return _vm.click($event)
|
|
801
|
+
},
|
|
802
|
+
focus: function ($event) {
|
|
803
|
+
return _vm.focus($event)
|
|
804
|
+
},
|
|
805
|
+
blur: function ($event) {
|
|
806
|
+
return _vm.blur($event)
|
|
807
|
+
},
|
|
808
|
+
"click:more": _vm.clickMore,
|
|
809
|
+
"click:date": _vm.clickDate,
|
|
810
|
+
"click:event": _vm.clickEvent,
|
|
811
|
+
"click:day": _vm.clickDay,
|
|
812
|
+
"click:day-category": _vm.clickDayCategory,
|
|
813
|
+
"click:interval": _vm.clickInterval,
|
|
814
|
+
"click:time": _vm.clickTime,
|
|
815
|
+
"click:time-category": _vm.clickTimeCategory,
|
|
816
|
+
moved: _vm.moved,
|
|
675
817
|
},
|
|
676
818
|
model: {
|
|
677
819
|
value: _vm.instance.value,
|
|
@@ -800,7 +942,7 @@
|
|
|
800
942
|
/* style */
|
|
801
943
|
const __vue_inject_styles__ = function (inject) {
|
|
802
944
|
if (!inject) return
|
|
803
|
-
inject("data-v-
|
|
945
|
+
inject("data-v-7da13c08_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 margin: 0;\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}\n.zd-calendar-content .zd-calendar-content-title {\n display: flex;\n flex-direction: column;\n width: 154px;\n}", map: undefined, media: undefined });
|
|
804
946
|
|
|
805
947
|
};
|
|
806
948
|
/* scoped */
|
|
@@ -828,6 +970,9 @@
|
|
|
828
970
|
undefined
|
|
829
971
|
);
|
|
830
972
|
|
|
973
|
+
const packageContent = require('../package.json');
|
|
974
|
+
core.VersionService.addPackageVersion(packageContent.name, packageContent.version);
|
|
975
|
+
|
|
831
976
|
exports.ZdCalendar = __vue_component__;
|
|
832
977
|
|
|
833
978
|
Object.defineProperty(exports, '__esModule', { value: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeedhi/zd-calendar-vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Powered by Zeedhi",
|
|
5
5
|
"main": "dist/calendar-vue.umd.js",
|
|
6
6
|
"module": "dist/calendar-vue.esm.js",
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"vue-class-component": "^7.2.6",
|
|
21
21
|
"vue-property-decorator": "^9.1.2"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "6f4fe53063ed34252898787e2866f837a2356bdb"
|
|
24
24
|
}
|
package/types/Calendar.d.ts
CHANGED
|
@@ -59,11 +59,22 @@ export default class ZdCalendar extends ZdComponentRender {
|
|
|
59
59
|
selectedOpen: boolean;
|
|
60
60
|
selectedElement: null;
|
|
61
61
|
selectedEvent: Function | {} | [];
|
|
62
|
+
showDatePicker: boolean;
|
|
63
|
+
onChangePicker(): void;
|
|
64
|
+
get titleLabel(): string;
|
|
62
65
|
mounted(): void;
|
|
63
|
-
prev(): void;
|
|
64
|
-
next(): void;
|
|
65
|
-
setToday(): void;
|
|
66
|
+
prev(event: Event): void;
|
|
67
|
+
next(event: Event): void;
|
|
66
68
|
setType(select: any): void;
|
|
67
|
-
viewDay(
|
|
69
|
+
viewDay(date: string): void;
|
|
68
70
|
showEvent({ nativeEvent, event }: any): void;
|
|
71
|
+
clickDate(event: Event): void;
|
|
72
|
+
clickMore(event: Event): void;
|
|
73
|
+
clickEvent({ nativeEvent, event }: any): void;
|
|
74
|
+
clickDay(event: Event): void;
|
|
75
|
+
clickDayCategory(event: Event): void;
|
|
76
|
+
clickInterval(event: Event): void;
|
|
77
|
+
clickTime(event: Event): void;
|
|
78
|
+
clickTimeCategory(event: Event): void;
|
|
79
|
+
moved(event: Event): void;
|
|
69
80
|
}
|