@progress/kendo-vue-scheduler 10.0.1-develop.5 → 10.0.1-develop.7
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/README.md +1 -1
- package/Scheduler.d.ts +27 -12
- package/dist/cdn/js/kendo-vue-scheduler.js +1 -1
- package/editors/SchedulerFormEditor.d.ts +32 -64
- package/hooks/useGroupRowHeightSync.d.ts +2 -0
- package/hooks/useGroupRowHeightSync.js +8 -0
- package/hooks/useGroupRowHeightSync.mjs +57 -0
- package/hooks/useSlotExpand.js +1 -1
- package/hooks/useSlotExpand.mjs +14 -14
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -12
- package/views/month/MonthView.d.ts +2 -0
- package/views/month/MonthView.js +1 -1
- package/views/month/MonthView.mjs +60 -46
|
@@ -5,25 +5,26 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as
|
|
9
|
-
import { BaseView as
|
|
10
|
-
import { firstDayInWeek as l, firstDayOfMonth as
|
|
11
|
-
import { VerticalResourceIterator as
|
|
12
|
-
import { HorizontalResourceIterator as
|
|
13
|
-
import { orderSort as
|
|
14
|
-
import { monthViewTitle as
|
|
15
|
-
import { SchedulerEditSlot as
|
|
16
|
-
import { provideLocalizationService as T, provideIntlService as
|
|
17
|
-
import { DAYS_IN_WEEK_COUNT as
|
|
18
|
-
import { toRanges as
|
|
19
|
-
import { toSlots as
|
|
20
|
-
import { toOccurrences as
|
|
21
|
-
import { toItems as
|
|
8
|
+
import { defineComponent as D, createVNode as r } from "vue";
|
|
9
|
+
import { BaseView as I } from "../../components/BaseView.mjs";
|
|
10
|
+
import { firstDayInWeek as l, firstDayOfMonth as k, getDate as h, addDays as z, lastDayOfMonth as R, ZonedDate as d, MS_PER_DAY as c } from "@progress/kendo-date-math";
|
|
11
|
+
import { VerticalResourceIterator as p } from "../common/VerticalResourceIterator.mjs";
|
|
12
|
+
import { HorizontalResourceIterator as u } from "../common/HorizontalResourceIterator.mjs";
|
|
13
|
+
import { orderSort as $, mapItemsToSlots as b, mapSlotsToItems as A, toUTCDateTime as m } from "../../utils/main.mjs";
|
|
14
|
+
import { monthViewTitle as f, messages as C } from "../../messages/main.mjs";
|
|
15
|
+
import { SchedulerEditSlot as F } from "../../slots/SchedulerEditSlot.mjs";
|
|
16
|
+
import { provideLocalizationService as T, provideIntlService as g } from "@progress/kendo-vue-intl";
|
|
17
|
+
import { DAYS_IN_WEEK_COUNT as w } from "../../constants/main.mjs";
|
|
18
|
+
import { toRanges as O } from "../../services/rangeService.mjs";
|
|
19
|
+
import { toSlots as E } from "../../services/slotsService.mjs";
|
|
20
|
+
import { toOccurrences as M } from "../../services/occurrenceService.mjs";
|
|
21
|
+
import { toItems as x } from "../../services/itemsService.mjs";
|
|
22
22
|
import { MonthViewHead as S } from "./MonthViewHead.mjs";
|
|
23
|
-
import { MonthViewBody as
|
|
24
|
-
import { MoreEventsPopover as
|
|
25
|
-
import { SchedulerEditItem as
|
|
26
|
-
|
|
23
|
+
import { MonthViewBody as P } from "./MonthViewBody.mjs";
|
|
24
|
+
import { MoreEventsPopover as V } from "../../components/MoreEventsPopover.mjs";
|
|
25
|
+
import { SchedulerEditItem as j } from "../../items/SchedulerEditItem.mjs";
|
|
26
|
+
import { syncGroupRowHeights as N } from "../../hooks/useGroupRowHeightSync.mjs";
|
|
27
|
+
const ie = /* @__PURE__ */ D({
|
|
27
28
|
name: "KendoMonthView",
|
|
28
29
|
props: {
|
|
29
30
|
itemsPerSlot: {
|
|
@@ -37,7 +38,7 @@ const se = /* @__PURE__ */ w({
|
|
|
37
38
|
dateRange: {
|
|
38
39
|
type: [Function, Object],
|
|
39
40
|
default: function() {
|
|
40
|
-
return
|
|
41
|
+
return H;
|
|
41
42
|
}
|
|
42
43
|
},
|
|
43
44
|
slotDuration: {
|
|
@@ -100,14 +101,21 @@ const se = /* @__PURE__ */ w({
|
|
|
100
101
|
}
|
|
101
102
|
},
|
|
102
103
|
created() {
|
|
103
|
-
this.intl =
|
|
104
|
+
this.intl = g(this);
|
|
104
105
|
},
|
|
105
106
|
mounted() {
|
|
106
|
-
this.hasMounted = !0;
|
|
107
|
+
this.hasMounted = !0, this.$nextTick(this.syncGroupRows);
|
|
108
|
+
},
|
|
109
|
+
updated() {
|
|
110
|
+
this.$nextTick(this.syncGroupRows);
|
|
111
|
+
},
|
|
112
|
+
unmounted() {
|
|
113
|
+
this.rowSyncFrame !== void 0 && window.cancelAnimationFrame(this.rowSyncFrame);
|
|
107
114
|
},
|
|
108
115
|
data() {
|
|
109
116
|
return {
|
|
110
117
|
hasMounted: !1,
|
|
118
|
+
rowSyncFrame: void 0,
|
|
111
119
|
currentDragItem: void 0,
|
|
112
120
|
currentResizeItem: void 0,
|
|
113
121
|
popoverShow: !1,
|
|
@@ -117,34 +125,34 @@ const se = /* @__PURE__ */ w({
|
|
|
117
125
|
},
|
|
118
126
|
computed: {
|
|
119
127
|
ranges() {
|
|
120
|
-
return
|
|
121
|
-
step:
|
|
128
|
+
return O(this.ks.dateRange, {
|
|
129
|
+
step: c * w,
|
|
122
130
|
timezone: this.ks.timezone
|
|
123
131
|
});
|
|
124
132
|
},
|
|
125
133
|
monthSlots() {
|
|
126
|
-
return
|
|
127
|
-
step:
|
|
134
|
+
return E(this.ks.dateRange, {
|
|
135
|
+
step: c
|
|
128
136
|
}, {
|
|
129
137
|
groups: this.ks.groups,
|
|
130
138
|
ranges: this.ranges
|
|
131
139
|
});
|
|
132
140
|
},
|
|
133
141
|
occurrences() {
|
|
134
|
-
return
|
|
142
|
+
return M(this.ks.dataItems, {
|
|
135
143
|
dateRange: this.ks.dateRange,
|
|
136
144
|
fields: this.ks.fields,
|
|
137
145
|
timezone: this.ks.timezone
|
|
138
146
|
});
|
|
139
147
|
},
|
|
140
148
|
items() {
|
|
141
|
-
const t =
|
|
149
|
+
const t = x(this.occurrences, {
|
|
142
150
|
timezone: this.ks.timezone
|
|
143
151
|
}, {
|
|
144
152
|
groups: this.ks.groups,
|
|
145
153
|
ranges: this.ranges
|
|
146
154
|
});
|
|
147
|
-
return
|
|
155
|
+
return b(t, this.monthSlots, !0), A(t, this.monthSlots, !0), t;
|
|
148
156
|
},
|
|
149
157
|
compDragItem() {
|
|
150
158
|
return this.dragItem !== void 0 ? this.dragItem : this.currentDragItem;
|
|
@@ -154,17 +162,17 @@ const se = /* @__PURE__ */ w({
|
|
|
154
162
|
}
|
|
155
163
|
},
|
|
156
164
|
render() {
|
|
157
|
-
this.localization = T(this), this.localization.toLanguageString(
|
|
158
|
-
const t = this.$props.editItem ||
|
|
159
|
-
this.$props.editSlot ||
|
|
165
|
+
this.localization = T(this), this.localization.toLanguageString(f, C[f]);
|
|
166
|
+
const t = this.$props.editItem || j;
|
|
167
|
+
this.$props.editSlot || F;
|
|
160
168
|
const n = this.items, o = this.monthSlots;
|
|
161
|
-
this.intl =
|
|
169
|
+
this.intl = g(this);
|
|
162
170
|
const s = this.$props.itemsPerSlot, a = this.ks.orientation === "horizontal" ? this.ranges.map(function(e, i) {
|
|
163
|
-
return r(
|
|
171
|
+
return r(u, {
|
|
164
172
|
resources: this.ks.props.resources,
|
|
165
173
|
group: this.ks.props.group
|
|
166
174
|
}, {
|
|
167
|
-
default: () => [r(
|
|
175
|
+
default: () => [r(P, {
|
|
168
176
|
editable: this.$props.editable,
|
|
169
177
|
slotRender: this.$props.slotRender,
|
|
170
178
|
viewSlot: this.$props.viewSlot,
|
|
@@ -175,7 +183,7 @@ const se = /* @__PURE__ */ w({
|
|
|
175
183
|
onShowmoreitems: this.handleShowMoreItemsClick
|
|
176
184
|
}, null)]
|
|
177
185
|
});
|
|
178
|
-
}, this) : r(
|
|
186
|
+
}, this) : r(p, {
|
|
179
187
|
nested: !0,
|
|
180
188
|
resources: this.ks.props.resources,
|
|
181
189
|
group: this.ks.props.group,
|
|
@@ -190,7 +198,7 @@ const se = /* @__PURE__ */ w({
|
|
|
190
198
|
onShowmoreitems: this.handleShowMoreItemsClick
|
|
191
199
|
}
|
|
192
200
|
}, null);
|
|
193
|
-
return r(
|
|
201
|
+
return r(I, {
|
|
194
202
|
viewProps: {
|
|
195
203
|
...this.$props
|
|
196
204
|
},
|
|
@@ -200,7 +208,7 @@ const se = /* @__PURE__ */ w({
|
|
|
200
208
|
}, {
|
|
201
209
|
default: () => [r("div", {
|
|
202
210
|
class: "k-scheduler-head"
|
|
203
|
-
}, [this.ks.orientation === "horizontal" ? r(
|
|
211
|
+
}, [this.ks.orientation === "horizontal" ? r(u, {
|
|
204
212
|
nested: !0,
|
|
205
213
|
resources: this.ks.props.resources,
|
|
206
214
|
group: this.ks.props.group
|
|
@@ -209,7 +217,7 @@ const se = /* @__PURE__ */ w({
|
|
|
209
217
|
monthSlots: o,
|
|
210
218
|
dateHeaderCell: this.$props.dateHeaderCell
|
|
211
219
|
}, null)]
|
|
212
|
-
}) : r(
|
|
220
|
+
}) : r(p, {
|
|
213
221
|
resources: this.ks.props.resources,
|
|
214
222
|
group: this.ks.props.group
|
|
215
223
|
}, {
|
|
@@ -218,8 +226,9 @@ const se = /* @__PURE__ */ w({
|
|
|
218
226
|
dateHeaderCell: this.$props.dateHeaderCell
|
|
219
227
|
}, null)]
|
|
220
228
|
})]), r("div", {
|
|
221
|
-
class: "k-scheduler-body"
|
|
222
|
-
|
|
229
|
+
class: "k-scheduler-body",
|
|
230
|
+
ref: "body"
|
|
231
|
+
}, [a, this.hasMounted && n.filter((e) => e.order === null || e.order < s).sort($).map(function(e) {
|
|
223
232
|
return r(t, {
|
|
224
233
|
item: this.$props.item,
|
|
225
234
|
viewItem: this.$props.viewItem,
|
|
@@ -258,7 +267,7 @@ const se = /* @__PURE__ */ w({
|
|
|
258
267
|
editable: this.$props.editable,
|
|
259
268
|
ignoreIsAllDay: !0
|
|
260
269
|
}, null);
|
|
261
|
-
}, this)]), r(
|
|
270
|
+
}, this)]), r(V, {
|
|
262
271
|
show: this.popoverShow,
|
|
263
272
|
anchor: this.popoverAnchor,
|
|
264
273
|
slot: this.popoverSlot,
|
|
@@ -270,6 +279,11 @@ const se = /* @__PURE__ */ w({
|
|
|
270
279
|
});
|
|
271
280
|
},
|
|
272
281
|
methods: {
|
|
282
|
+
syncGroupRows() {
|
|
283
|
+
this.rowSyncFrame !== void 0 && window.cancelAnimationFrame(this.rowSyncFrame), this.rowSyncFrame = window.requestAnimationFrame(() => {
|
|
284
|
+
N(this.$refs.body), this.rowSyncFrame = void 0;
|
|
285
|
+
});
|
|
286
|
+
},
|
|
273
287
|
handleShowMoreItemsClick({
|
|
274
288
|
event: t,
|
|
275
289
|
slot: n
|
|
@@ -301,19 +315,19 @@ const se = /* @__PURE__ */ w({
|
|
|
301
315
|
this.currentResizeItem = t;
|
|
302
316
|
}
|
|
303
317
|
}
|
|
304
|
-
}),
|
|
318
|
+
}), H = ({
|
|
305
319
|
intl: t,
|
|
306
320
|
date: n,
|
|
307
321
|
timezone: o
|
|
308
322
|
}) => {
|
|
309
|
-
const s = l(
|
|
323
|
+
const s = l(k(h(n)), t.firstDay()), a = z(l(R(h(n)), t.firstDay()), w), e = d.fromUTCDate(m(s), o), i = d.fromUTCDate(m(a), o), v = new Date(e.getTime()), y = new Date(i.getTime());
|
|
310
324
|
return {
|
|
311
|
-
start:
|
|
312
|
-
end:
|
|
325
|
+
start: v,
|
|
326
|
+
end: y,
|
|
313
327
|
zonedStart: e,
|
|
314
328
|
zonedEnd: i
|
|
315
329
|
};
|
|
316
330
|
};
|
|
317
331
|
export {
|
|
318
|
-
|
|
332
|
+
ie as MonthView
|
|
319
333
|
};
|