@progress/kendo-vue-scheduler 3.8.3 → 3.8.4-dev.202302151223

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 (56) hide show
  1. package/dist/cdn/js/kendo-vue-scheduler.js +1 -1
  2. package/dist/es/components/BaseView.js +1 -2
  3. package/dist/es/components/CurrentTimeMarker.js +4 -3
  4. package/dist/es/components/CurrentTimeMarkerArrow.js +4 -3
  5. package/dist/es/hooks/useSlotExpand.js +1 -2
  6. package/dist/es/items/SchedulerEditItem.js +4 -4
  7. package/dist/es/items/SchedulerViewItem.js +15 -14
  8. package/dist/es/package-metadata.js +1 -1
  9. package/dist/es/slots/SchedulerEditSlot.js +17 -11
  10. package/dist/es/slots/SchedulerSlot.js +32 -40
  11. package/dist/es/slots/SchedulerViewSlot.js +8 -0
  12. package/dist/es/views/agenda/AgendaViewBody.js +45 -23
  13. package/dist/es/views/day/DayViewAllDaySlots.js +72 -41
  14. package/dist/es/views/day/DayViewMiddleRow.js +73 -43
  15. package/dist/es/views/day/DayViewVerticalRow.js +70 -43
  16. package/dist/es/views/day/DayViewVerticalSlotsRow.js +74 -44
  17. package/dist/es/views/month/MonthViewBody.js +50 -23
  18. package/dist/es/views/month/MonthViewHead.js +29 -4
  19. package/dist/es/views/time/TimelineViewBody.js +71 -43
  20. package/dist/esm/components/BaseView.js +1 -2
  21. package/dist/esm/components/CurrentTimeMarker.js +4 -3
  22. package/dist/esm/components/CurrentTimeMarkerArrow.js +4 -3
  23. package/dist/esm/hooks/useSlotExpand.js +1 -2
  24. package/dist/esm/items/SchedulerEditItem.js +4 -4
  25. package/dist/esm/items/SchedulerViewItem.js +15 -14
  26. package/dist/esm/package-metadata.js +1 -1
  27. package/dist/esm/slots/SchedulerEditSlot.js +17 -11
  28. package/dist/esm/slots/SchedulerSlot.js +32 -40
  29. package/dist/esm/slots/SchedulerViewSlot.js +8 -0
  30. package/dist/esm/views/agenda/AgendaViewBody.js +45 -23
  31. package/dist/esm/views/day/DayViewAllDaySlots.js +72 -41
  32. package/dist/esm/views/day/DayViewMiddleRow.js +73 -43
  33. package/dist/esm/views/day/DayViewVerticalRow.js +70 -43
  34. package/dist/esm/views/day/DayViewVerticalSlotsRow.js +74 -44
  35. package/dist/esm/views/month/MonthViewBody.js +50 -23
  36. package/dist/esm/views/month/MonthViewHead.js +29 -4
  37. package/dist/esm/views/time/TimelineViewBody.js +71 -43
  38. package/dist/npm/components/BaseView.js +1 -2
  39. package/dist/npm/components/CurrentTimeMarker.js +4 -3
  40. package/dist/npm/components/CurrentTimeMarkerArrow.js +4 -3
  41. package/dist/npm/hooks/useSlotExpand.js +1 -2
  42. package/dist/npm/items/SchedulerEditItem.js +4 -4
  43. package/dist/npm/items/SchedulerViewItem.js +15 -14
  44. package/dist/npm/package-metadata.js +1 -1
  45. package/dist/npm/slots/SchedulerEditSlot.js +17 -11
  46. package/dist/npm/slots/SchedulerSlot.js +32 -40
  47. package/dist/npm/slots/SchedulerViewSlot.js +8 -0
  48. package/dist/npm/views/agenda/AgendaViewBody.js +48 -26
  49. package/dist/npm/views/day/DayViewAllDaySlots.js +72 -41
  50. package/dist/npm/views/day/DayViewMiddleRow.js +75 -45
  51. package/dist/npm/views/day/DayViewVerticalRow.js +70 -43
  52. package/dist/npm/views/day/DayViewVerticalSlotsRow.js +76 -46
  53. package/dist/npm/views/month/MonthViewBody.js +50 -23
  54. package/dist/npm/views/month/MonthViewHead.js +29 -4
  55. package/dist/npm/views/time/TimelineViewBody.js +73 -45
  56. package/package.json +12 -12
@@ -9,6 +9,7 @@ var Vue = require("vue");
9
9
  var allVue = Vue;
10
10
  var gh = allVue.h;
11
11
  var isV3 = allVue.version && allVue.version[0] === '3';
12
+ var main_1 = require("../../utils/main");
12
13
  var SchedulerEditSlot_1 = require("../../slots/SchedulerEditSlot");
13
14
  var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
14
15
  /** @hidden */
@@ -37,10 +38,56 @@ var MonthViewBodyVue2 = {
37
38
  setActiveViewName: {
38
39
  default: null
39
40
  },
41
+ setSlots: {
42
+ default: null
43
+ },
40
44
  kendoIntlService: {
41
45
  default: null
42
46
  }
43
47
  },
48
+ provide: function provide() {
49
+ return {
50
+ ksSlots: this.ksSlots
51
+ };
52
+ },
53
+ data: function data() {
54
+ var _this = this;
55
+ var groupIndex = this.groupIndex !== undefined ? this.groupIndex : this.ri.groupIndex;
56
+ return {
57
+ ksSlots: {
58
+ cSlots: this.monthSlots.filter(function (slot) {
59
+ return slot.group.index === groupIndex && slot.range.index === _this.rangeIndex;
60
+ })
61
+ }
62
+ };
63
+ },
64
+ watch: {
65
+ currentCellSlots: function currentCellSlots(newValue) {
66
+ this.ksSlots.cSlots = newValue;
67
+ }
68
+ },
69
+ computed: {
70
+ currentCellSlots: function currentCellSlots() {
71
+ var _this = this;
72
+ var groupIndex = this.groupIndex !== undefined ? this.groupIndex : this.ri.groupIndex;
73
+ return this.monthSlots.filter(function (slot) {
74
+ return slot.group.index === groupIndex && slot.range.index === _this.rangeIndex;
75
+ });
76
+ }
77
+ },
78
+ destroyed: !!isV3 ? undefined : function () {
79
+ this.setSlots({
80
+ type: main_1.COLLECTION_ACTION.remove,
81
+ item: this
82
+ });
83
+ },
84
+ // @ts-ignore
85
+ unmounted: function unmounted() {
86
+ this.setSlots({
87
+ type: main_1.COLLECTION_ACTION.remove,
88
+ item: this
89
+ });
90
+ },
44
91
  // @ts-ignore
45
92
  setup: !isV3 ? undefined : function () {
46
93
  var v3 = !!isV3;
@@ -50,7 +97,6 @@ var MonthViewBodyVue2 = {
50
97
  },
51
98
  // @ts-ignore
52
99
  render: function render(createElement) {
53
- var _this = this;
54
100
  var h = gh || createElement;
55
101
  this.intl = (0, kendo_vue_intl_1.provideIntlService)(this);
56
102
  var EditSlot = this.$props.editSlot || SchedulerEditSlot_1.SchedulerEditSlot;
@@ -59,9 +105,7 @@ var MonthViewBodyVue2 = {
59
105
  return h("div", {
60
106
  "class": "k-scheduler-row",
61
107
  key: this.rangeIndex
62
- }, [this.monthSlots.filter(function (slot) {
63
- return slot.group.index === groupIndex && slot.range.index === _this.rangeIndex;
64
- }).map(function (slot, slotIndex, filtered) {
108
+ }, [this.currentCellSlots.map(function (slot, slotIndex, filtered) {
65
109
  return (
66
110
  // @ts-ignore function children
67
111
  h(EditSlot, {
@@ -70,15 +114,7 @@ var MonthViewBodyVue2 = {
70
114
  slotRender: this.$props.slotRender,
71
115
  viewSlot: that.$props.viewSlot,
72
116
  form: that.$props.form,
73
- index: slot.index,
74
- start: slot.start,
75
- end: slot.end,
76
- zonedStart: slot.zonedStart,
77
- zonedEnd: slot.zonedEnd,
78
- items: slot.items,
79
- group: slot.group,
80
- range: slot.range,
81
- isAllDay: slot.isAllDay,
117
+ index: slotIndex,
82
118
  navDay: true,
83
119
  itemsPerSlot: that.itemsPerSlot,
84
120
  expandable: {
@@ -90,17 +126,8 @@ var MonthViewBodyVue2 = {
90
126
  editable: that.$props.editable
91
127
  },
92
128
  viewSlot: that.$props.viewSlot,
93
- key: slotIndex,
94
129
  form: that.$props.form,
95
- index: slot.index,
96
- start: slot.start,
97
- end: slot.end,
98
- zonedStart: slot.zonedStart,
99
- zonedEnd: slot.zonedEnd,
100
- items: slot.items,
101
- group: slot.group,
102
- range: slot.range,
103
- isAllDay: slot.isAllDay,
130
+ index: slotIndex,
104
131
  navDay: true,
105
132
  itemsPerSlot: that.itemsPerSlot,
106
133
  expandable: {
@@ -27,6 +27,34 @@ var MonthViewHeadVue2 = {
27
27
  default: null
28
28
  }
29
29
  },
30
+ provide: function provide() {
31
+ return {
32
+ ksSlots: this.ksSlots
33
+ };
34
+ },
35
+ data: function data() {
36
+ var _this = this;
37
+ return {
38
+ ksSlots: {
39
+ cSlots: this.monthSlots.filter(function (slot) {
40
+ return slot.group.index === _this.ri.groupIndex && slot.range.index === 0;
41
+ })
42
+ }
43
+ };
44
+ },
45
+ watch: {
46
+ currentCellSlots: function currentCellSlots(newValue) {
47
+ this.ksSlots.cSlots = newValue;
48
+ }
49
+ },
50
+ computed: {
51
+ currentCellSlots: function currentCellSlots() {
52
+ var _this = this;
53
+ return this.monthSlots.filter(function (slot) {
54
+ return slot.group.index === _this.ri.groupIndex && slot.range.index === 0;
55
+ });
56
+ }
57
+ },
30
58
  // @ts-ignore
31
59
  setup: !isV3 ? undefined : function () {
32
60
  var v3 = !!isV3;
@@ -36,14 +64,11 @@ var MonthViewHeadVue2 = {
36
64
  },
37
65
  // @ts-ignore
38
66
  render: function render(createElement) {
39
- var _this = this;
40
67
  var h = gh || createElement;
41
68
  return h("div", {
42
69
  "class": "k-scheduler-row",
43
70
  key: this.ri.groupIndex
44
- }, [this.monthSlots.filter(function (slot) {
45
- return slot.group.index === _this.ri.groupIndex && slot.range.index === 0;
46
- }).map(function (slot, slotIndex) {
71
+ }, [this.currentCellSlots.map(function (slot, slotIndex) {
47
72
  return (
48
73
  // @ts-ignore function children
49
74
  h(DateHeaderCell_1.DateHeaderCell, {
@@ -9,9 +9,9 @@ var Vue = require("vue");
9
9
  var allVue = Vue;
10
10
  var gh = allVue.h;
11
11
  var isV3 = allVue.version && allVue.version[0] === '3';
12
- var inject = allVue.inject;
13
- var SchedulerEditSlot_1 = require("../../slots/SchedulerEditSlot");
14
12
  var main_1 = require("../../utils/main");
13
+ var SchedulerEditSlot_1 = require("../../slots/SchedulerEditSlot");
14
+ var main_2 = require("../../utils/main");
15
15
  var CurrentTimeMarker_1 = require("../../components/CurrentTimeMarker");
16
16
  /** @hidden */
17
17
  var TimelineViewBodyVue2 = {
@@ -36,8 +36,50 @@ var TimelineViewBodyVue2 = {
36
36
  },
37
37
  ks: {
38
38
  default: null
39
+ },
40
+ setSlots: {
41
+ default: null
39
42
  }
40
43
  },
44
+ provide: function provide() {
45
+ return {
46
+ ksSlots: this.ksSlots
47
+ };
48
+ },
49
+ data: function data() {
50
+ var timelineSlots = this.timelineSlots;
51
+ var groupIndex = this.groupIndex !== undefined ? this.groupIndex : this.ri.groupIndex;
52
+ return {
53
+ ksSlots: {
54
+ cSlots: this.calculateRanges(timelineSlots, groupIndex, this.ranges)
55
+ }
56
+ };
57
+ },
58
+ watch: {
59
+ currentCellSlots: function currentCellSlots(newValue) {
60
+ this.ksSlots.cSlots = newValue;
61
+ }
62
+ },
63
+ computed: {
64
+ currentCellSlots: function currentCellSlots() {
65
+ var timelineSlots = this.timelineSlots;
66
+ var groupIndex = this.groupIndex !== undefined ? this.groupIndex : this.ri.groupIndex;
67
+ return this.calculateRanges(timelineSlots, groupIndex, this.ranges);
68
+ }
69
+ },
70
+ destroyed: !!isV3 ? undefined : function () {
71
+ this.setSlots({
72
+ type: main_1.COLLECTION_ACTION.remove,
73
+ item: this
74
+ });
75
+ },
76
+ // @ts-ignore
77
+ unmounted: function unmounted() {
78
+ this.setSlots({
79
+ type: main_1.COLLECTION_ACTION.remove,
80
+ item: this
81
+ });
82
+ },
41
83
  // @ts-ignore
42
84
  setup: !isV3 ? undefined : function () {
43
85
  var v3 = !!isV3;
@@ -55,55 +97,34 @@ var TimelineViewBodyVue2 = {
55
97
  var editable = this.$props.editable;
56
98
  return h("div", {
57
99
  "class": "k-scheduler-row"
58
- }, [this.ranges.map(function (_, rangeIndex) {
59
- return this.timelineSlots.filter(function (s) {
60
- return s.group.index === groupIndex && s.range.index === rangeIndex;
61
- }).map(function (slot, slotIndex, filtered) {
62
- return h(SchedulerEditSlot_1.SchedulerEditSlot, {
63
- key: "".concat(slot.start.getTime(), ":").concat(slot.group.index),
100
+ }, [this.currentCellSlots.map(function (cSlot, slotIndex, filtered) {
101
+ return h(SchedulerEditSlot_1.SchedulerEditSlot, {
102
+ slotRender: that.$props.slotRender,
103
+ attrs: this.v3 ? undefined : {
64
104
  slotRender: that.$props.slotRender,
65
- attrs: this.v3 ? undefined : {
66
- slotRender: that.$props.slotRender,
67
- viewSlot: that.$props.viewSlot,
68
- index: slot.index,
69
- start: slot.start,
70
- end: slot.end,
71
- zonedStart: slot.zonedStart,
72
- zonedEnd: slot.zonedEnd,
73
- items: slot.items,
74
- group: slot.group,
75
- range: slot.range,
76
- isAllDay: slot.isAllDay,
77
- form: that.$props.form,
78
- isWorkHour: (0, main_1.isInTimeRange)(slot.zonedStart, that.workDayStart, that.workDayEnd),
79
- col: orientation === 'horizontal' ? rangeIndex * filtered.length + slotIndex + filtered.length * ranges.length * (groupIndex || 0) : rangeIndex * filtered.length + slotIndex,
80
- row: orientation === 'horizontal' ? 0 : groupIndex || 0,
81
- expandable: true,
82
- editable: editable
83
- },
84
105
  viewSlot: that.$props.viewSlot,
85
- index: slot.index,
86
- start: slot.start,
87
- end: slot.end,
88
- zonedStart: slot.zonedStart,
89
- zonedEnd: slot.zonedEnd,
90
- items: slot.items,
91
- group: slot.group,
92
- range: slot.range,
93
- isAllDay: slot.isAllDay,
106
+ index: slotIndex,
94
107
  form: that.$props.form,
95
- onDataaction: that.handleDataAction,
96
- on: this.v3 ? undefined : {
97
- "dataaction": that.handleDataAction
98
- },
99
- isWorkHour: (0, main_1.isInTimeRange)(slot.zonedStart, that.workDayStart, that.workDayEnd),
100
- col: orientation === 'horizontal' ? rangeIndex * filtered.length + slotIndex + filtered.length * ranges.length * (groupIndex || 0) : rangeIndex * filtered.length + slotIndex,
108
+ isWorkHour: (0, main_2.isInTimeRange)(cSlot.zonedStart, that.workDayStart, that.workDayEnd),
109
+ col: orientation === 'horizontal' ? cSlot.range.index * filtered.length + slotIndex + filtered.length * ranges.length * (groupIndex || 0) : cSlot.range.index * filtered.length + slotIndex,
101
110
  row: orientation === 'horizontal' ? 0 : groupIndex || 0,
102
111
  expandable: true,
103
112
  editable: editable
104
- });
105
- }, true);
106
- }, this), this.$props.currentTimeMarker && (0, main_1.intersects)((0, main_1.first)(ranges).start, (0, main_1.last)(ranges).end, new Date(), new Date(), true) && h(CurrentTimeMarker_1.CurrentTimeMarker, {
113
+ },
114
+ viewSlot: that.$props.viewSlot,
115
+ index: slotIndex,
116
+ form: that.$props.form,
117
+ onDataaction: that.handleDataAction,
118
+ on: this.v3 ? undefined : {
119
+ "dataaction": that.handleDataAction
120
+ },
121
+ isWorkHour: (0, main_2.isInTimeRange)(cSlot.zonedStart, that.workDayStart, that.workDayEnd),
122
+ col: orientation === 'horizontal' ? cSlot.range.index * filtered.length + slotIndex + filtered.length * ranges.length * (groupIndex || 0) : cSlot.range.index * filtered.length + slotIndex,
123
+ row: orientation === 'horizontal' ? 0 : groupIndex || 0,
124
+ expandable: true,
125
+ editable: editable
126
+ });
127
+ }, this), this.$props.currentTimeMarker && (0, main_2.intersects)((0, main_2.first)(ranges).start, (0, main_2.last)(ranges).end, new Date(), new Date(), true) && h(CurrentTimeMarker_1.CurrentTimeMarker, {
107
128
  groupIndex: groupIndex,
108
129
  attrs: this.v3 ? undefined : {
109
130
  groupIndex: groupIndex,
@@ -115,6 +136,13 @@ var TimelineViewBodyVue2 = {
115
136
  methods: {
116
137
  handleDataAction: function handleDataAction(action) {
117
138
  this.$emit('dataaction', action);
139
+ },
140
+ calculateRanges: function calculateRanges(timelineSlots, groupIndex, ranges) {
141
+ return ranges.map(function (_, rangeIndex) {
142
+ return timelineSlots.filter(function (s) {
143
+ return s.group.index === groupIndex && s.range.index === rangeIndex;
144
+ });
145
+ }).flat();
118
146
  }
119
147
  }
120
148
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-scheduler",
3
3
  "description": "Kendo UI for Vue Scheduler package",
4
- "version": "3.8.3",
4
+ "version": "3.8.4-dev.202302151223",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/telerik/kendo-vue.git"
@@ -50,7 +50,7 @@
50
50
  "@progress/kendo-data-query": "^1.5.1",
51
51
  "@progress/kendo-draggable": "^3.0.1",
52
52
  "@progress/kendo-recurrence": "^1.0.1",
53
- "@progress/kendo-vue-common": "3.8.3"
53
+ "@progress/kendo-vue-common": "3.8.4-dev.202302151223"
54
54
  },
55
55
  "@progress": {
56
56
  "friendlyName": "Scheduler",
@@ -66,16 +66,16 @@
66
66
  "@progress/kendo-drawing": "^1.8.0",
67
67
  "@progress/kendo-licensing": "^1.3.0",
68
68
  "@progress/kendo-svg-icons": "^1.0.0",
69
- "@progress/kendo-vue-buttons": "3.8.3",
70
- "@progress/kendo-vue-dateinputs": "3.8.3",
71
- "@progress/kendo-vue-dialogs": "3.8.3",
72
- "@progress/kendo-vue-dropdowns": "3.8.3",
73
- "@progress/kendo-vue-form": "3.8.3",
74
- "@progress/kendo-vue-inputs": "3.8.3",
75
- "@progress/kendo-vue-intl": "3.8.3",
76
- "@progress/kendo-vue-labels": "3.8.3",
77
- "@progress/kendo-vue-popup": "3.8.3",
78
- "@progress/kendo-vue-progressbars": "3.8.3",
69
+ "@progress/kendo-vue-buttons": "3.8.4-dev.202302151223",
70
+ "@progress/kendo-vue-dateinputs": "3.8.4-dev.202302151223",
71
+ "@progress/kendo-vue-dialogs": "3.8.4-dev.202302151223",
72
+ "@progress/kendo-vue-dropdowns": "3.8.4-dev.202302151223",
73
+ "@progress/kendo-vue-form": "3.8.4-dev.202302151223",
74
+ "@progress/kendo-vue-inputs": "3.8.4-dev.202302151223",
75
+ "@progress/kendo-vue-intl": "3.8.4-dev.202302151223",
76
+ "@progress/kendo-vue-labels": "3.8.4-dev.202302151223",
77
+ "@progress/kendo-vue-popup": "3.8.4-dev.202302151223",
78
+ "@progress/kendo-vue-progressbars": "3.8.4-dev.202302151223",
79
79
  "cldr-core": "^41.0.0",
80
80
  "cldr-dates-full": "^41.0.0",
81
81
  "cldr-numbers-full": "^41.0.0"