@progress/kendo-vue-scheduler 9.3.0-develop.5 → 9.3.0-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/Scheduler.d.ts +67 -4
- package/Scheduler.js +1 -1
- package/Scheduler.mjs +267 -115
- package/components/BaseView.js +1 -1
- package/components/BaseView.mjs +10 -4
- package/components/CurrentTimeMarker.js +1 -1
- package/components/CurrentTimeMarker.mjs +9 -9
- package/components/CurrentTimeMarkerArrow.js +1 -1
- package/components/CurrentTimeMarkerArrow.mjs +3 -3
- package/components/DateHeaderCell.js +1 -1
- package/components/DateHeaderCell.mjs +22 -13
- package/components/MoreEventsPopover.d.ts +77 -0
- package/components/MoreEventsPopover.js +8 -0
- package/components/MoreEventsPopover.mjs +125 -0
- package/components/SchedulerActionButtons.d.ts +6 -0
- package/components/SchedulerActionButtons.js +1 -1
- package/components/SchedulerActionButtons.mjs +25 -19
- package/components/SchedulerForm.d.ts +7 -0
- package/components/SchedulerForm.js +1 -1
- package/components/SchedulerForm.mjs +69 -61
- package/components/SchedulerOccurrenceDialog.d.ts +4 -4
- package/components/SchedulerOccurrenceDialog.js +1 -1
- package/components/SchedulerOccurrenceDialog.mjs +35 -26
- package/components/SchedulerRemoveDialog.d.ts +6 -0
- package/components/SchedulerRemoveDialog.js +1 -1
- package/components/SchedulerRemoveDialog.mjs +24 -23
- package/components/ShowMoreItemsButton.d.ts +10 -1
- package/components/ShowMoreItemsButton.js +1 -1
- package/components/ShowMoreItemsButton.mjs +40 -18
- package/components/footer/bussiness-hours/BusinessHours.js +1 -1
- package/components/footer/bussiness-hours/BusinessHours.mjs +16 -21
- package/components/header/SchedulerAdaptiveHeader.js +1 -1
- package/components/header/SchedulerAdaptiveHeader.mjs +28 -26
- package/components/header/SchedulerHeader.d.ts +5 -1
- package/components/header/SchedulerHeader.js +1 -1
- package/components/header/SchedulerHeader.mjs +11 -7
- package/components/header/navigation/NavigationDatePicker.d.ts +22 -3
- package/components/header/navigation/NavigationDatePicker.js +1 -1
- package/components/header/navigation/NavigationDatePicker.mjs +27 -30
- package/components/header/view-selector/ViewSelectorList.d.ts +26 -6
- package/components/header/view-selector/ViewSelectorList.js +1 -1
- package/components/header/view-selector/ViewSelectorList.mjs +55 -49
- package/dist/cdn/js/kendo-vue-scheduler.js +1 -1
- package/editors/RemoveRecurrenceConfirmDialog.d.ts +29 -0
- package/editors/RemoveRecurrenceConfirmDialog.js +8 -0
- package/editors/RemoveRecurrenceConfirmDialog.mjs +65 -0
- package/editors/ResourceEditor.d.ts +3 -0
- package/editors/ResourceEditor.js +1 -1
- package/editors/ResourceEditor.mjs +12 -10
- package/editors/SchedulerFormEditor.d.ts +1067 -2953
- package/editors/SchedulerFormEditor.js +1 -1
- package/editors/SchedulerFormEditor.mjs +297 -365
- package/editors/SchedulerRecurrenceDialog.d.ts +143 -0
- package/editors/SchedulerRecurrenceDialog.js +8 -0
- package/editors/SchedulerRecurrenceDialog.mjs +575 -0
- package/editors/TimezoneDropDownList.d.ts +46 -0
- package/editors/TimezoneDropDownList.js +8 -0
- package/editors/TimezoneDropDownList.mjs +63 -0
- package/editors/ZonedSplitDateTime.d.ts +65 -0
- package/editors/ZonedSplitDateTime.js +8 -0
- package/editors/ZonedSplitDateTime.mjs +100 -0
- package/hooks/main.d.ts +1 -0
- package/hooks/useGroupRowHeightSync.d.ts +10 -0
- package/hooks/useRecurrenceSummary.d.ts +10 -0
- package/hooks/useRecurrenceSummary.js +8 -0
- package/hooks/useRecurrenceSummary.mjs +74 -0
- package/hooks/useRowSync.js +1 -1
- package/hooks/useRowSync.mjs +23 -4
- package/hooks/useSlotExpand.js +1 -1
- package/hooks/useSlotExpand.mjs +36 -28
- package/index.d.mts +9 -3
- package/index.d.ts +9 -3
- package/index.js +1 -1
- package/index.mjs +83 -71
- package/items/SchedulerEditItem.d.ts +14 -3
- package/items/SchedulerEditItem.js +1 -1
- package/items/SchedulerEditItem.mjs +130 -72
- package/items/SchedulerItem.d.ts +10 -0
- package/items/SchedulerItem.js +1 -1
- package/items/SchedulerItem.mjs +153 -135
- package/items/SchedulerProportionalViewItem.d.ts +183 -0
- package/items/SchedulerProportionalViewItem.js +8 -0
- package/items/SchedulerProportionalViewItem.mjs +378 -0
- package/items/SchedulerViewItem.d.ts +3 -0
- package/items/SchedulerViewItem.js +1 -1
- package/items/SchedulerViewItem.mjs +107 -67
- package/messages/main.d.ts +186 -0
- package/messages/main.js +1 -1
- package/messages/main.mjs +226 -102
- package/models/Item.d.ts +2 -0
- package/models/Occurrence.d.ts +2 -0
- package/models/SchedulerModelFields.d.ts +5 -0
- package/models/SchedulerResource.d.ts +6 -0
- package/models/SchedulerView.d.ts +2 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -11
- package/recurrence/common.js +1 -1
- package/recurrence/common.mjs +36 -39
- package/services/itemsService.js +1 -1
- package/services/itemsService.mjs +31 -27
- package/services/occurrenceService.js +1 -1
- package/services/occurrenceService.mjs +41 -35
- package/slots/SchedulerEditSlot.d.ts +2 -0
- package/slots/SchedulerEditSlot.js +1 -1
- package/slots/SchedulerEditSlot.mjs +27 -28
- package/slots/SchedulerSlot.d.ts +4 -0
- package/slots/SchedulerSlot.js +1 -1
- package/slots/SchedulerSlot.mjs +10 -1
- package/slots/SchedulerViewSlot.d.ts +5 -0
- package/slots/SchedulerViewSlot.js +1 -1
- package/slots/SchedulerViewSlot.mjs +70 -50
- package/tasks/SchedulerEditTask.d.ts +6 -0
- package/tasks/SchedulerEditTask.js +1 -1
- package/tasks/SchedulerEditTask.mjs +64 -23
- package/tasks/SchedulerTask.d.ts +15 -0
- package/tasks/SchedulerTask.js +1 -1
- package/tasks/SchedulerTask.mjs +39 -28
- package/tasks/SchedulerViewTask.d.ts +9 -0
- package/tasks/SchedulerViewTask.js +1 -1
- package/tasks/SchedulerViewTask.mjs +10 -5
- package/utils/main.d.ts +4 -1
- package/utils/main.js +1 -1
- package/utils/main.mjs +133 -112
- package/views/agenda/AgendaView.js +1 -1
- package/views/agenda/AgendaView.mjs +28 -22
- package/views/agenda/AgendaViewBody.js +1 -1
- package/views/agenda/AgendaViewBody.mjs +44 -42
- package/views/agenda/AgendaViewHead.js +1 -1
- package/views/agenda/AgendaViewHead.mjs +14 -10
- package/views/common/SchedulerDrag.d.ts +12 -0
- package/views/common/SchedulerResize.d.ts +12 -0
- package/views/common/VerticalResourceIterator.d.ts +3 -0
- package/views/common/VerticalResourceIterator.js +1 -1
- package/views/common/VerticalResourceIterator.mjs +16 -9
- package/views/day/DayView.js +1 -1
- package/views/day/DayView.mjs +2 -2
- package/views/day/MultiDayView.js +1 -1
- package/views/day/MultiDayView.mjs +98 -127
- package/views/month/MonthView.d.ts +8 -2
- package/views/month/MonthView.js +1 -1
- package/views/month/MonthView.mjs +115 -109
- package/views/month/MonthViewBody.d.ts +7 -2
- package/views/month/MonthViewBody.js +1 -1
- package/views/month/MonthViewBody.mjs +15 -11
- package/views/time/MultiDayTimelineView.d.ts +5 -0
- package/views/time/MultiDayTimelineView.js +1 -1
- package/views/time/MultiDayTimelineView.mjs +125 -132
- package/views/time/TimelineView.js +1 -1
- package/views/time/TimelineView.mjs +2 -2
- package/views/week/WeekView.js +1 -1
- package/views/week/WeekView.mjs +2 -2
- package/views/week/WorkWeekView.js +1 -1
- package/views/week/WorkWeekView.mjs +9 -9
- package/components/header/navigation/DatePickerToggleButton.d.ts +0 -16
- package/editors/FilterableComboBox.d.ts +0 -38
- package/editors/FilterableComboBox.js +0 -8
- package/editors/FilterableComboBox.mjs +0 -61
- package/editors/ZonedDateTime.js +0 -8
- package/editors/ZonedDateTime.mjs +0 -57
package/items/SchedulerItem.mjs
CHANGED
|
@@ -5,17 +5,15 @@
|
|
|
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 { COLLECTION_ACTION as
|
|
10
|
-
import { getDefaultSlots as
|
|
11
|
-
import { provideIntlService as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
import { useEditable as I } from "../hooks/useEditable.mjs";
|
|
18
|
-
const H = /* @__PURE__ */ m({
|
|
8
|
+
import { defineComponent as n, h as o, createVNode as t } from "vue";
|
|
9
|
+
import { COLLECTION_ACTION as r, formatEventTime as a } from "../utils/main.mjs";
|
|
10
|
+
import { getDefaultSlots as h, getTemplate as d, Draggable as i } from "@progress/kendo-vue-common";
|
|
11
|
+
import { provideIntlService as u } from "@progress/kendo-vue-intl";
|
|
12
|
+
import { SchedulerOccurrenceDialog as m } from "../components/SchedulerOccurrenceDialog.mjs";
|
|
13
|
+
import { SchedulerRemoveDialog as p } from "../components/SchedulerRemoveDialog.mjs";
|
|
14
|
+
import { SchedulerForm as c } from "../components/SchedulerForm.mjs";
|
|
15
|
+
import { useEditable as g } from "../hooks/useEditable.mjs";
|
|
16
|
+
const C = /* @__PURE__ */ n({
|
|
19
17
|
name: "KendoSchedulerItem",
|
|
20
18
|
inheritAttrs: !1,
|
|
21
19
|
emits: {
|
|
@@ -74,6 +72,7 @@ const H = /* @__PURE__ */ m({
|
|
|
74
72
|
className: String,
|
|
75
73
|
itemStyle: Object,
|
|
76
74
|
editable: [Object, Boolean],
|
|
75
|
+
readonly: Boolean,
|
|
77
76
|
selected: Boolean,
|
|
78
77
|
vertical: Boolean,
|
|
79
78
|
dragHint: Boolean,
|
|
@@ -132,11 +131,31 @@ const H = /* @__PURE__ */ m({
|
|
|
132
131
|
},
|
|
133
132
|
ksRemoveConfirm: {
|
|
134
133
|
default: null
|
|
134
|
+
},
|
|
135
|
+
ksRemoveDialogCancel: {
|
|
136
|
+
default: null
|
|
137
|
+
},
|
|
138
|
+
ksDeleteItem: {
|
|
139
|
+
default: null
|
|
140
|
+
},
|
|
141
|
+
ksFormDelete: {
|
|
142
|
+
default: null
|
|
143
|
+
},
|
|
144
|
+
ksIsSeries: {
|
|
145
|
+
default: null
|
|
135
146
|
}
|
|
136
147
|
},
|
|
137
148
|
computed: {
|
|
138
149
|
currentEditable() {
|
|
139
|
-
|
|
150
|
+
const e = g(this.$props.editable);
|
|
151
|
+
return this.$props.readonly ? {
|
|
152
|
+
add: !1,
|
|
153
|
+
edit: !1,
|
|
154
|
+
drag: !1,
|
|
155
|
+
resize: !1,
|
|
156
|
+
remove: !1,
|
|
157
|
+
select: e.select
|
|
158
|
+
} : e;
|
|
140
159
|
},
|
|
141
160
|
resource() {
|
|
142
161
|
return this.$props.group.resources.find((e) => !!(e.colorField && e[e.colorField] !== "" && e[e.colorField] !== void 0));
|
|
@@ -151,6 +170,7 @@ const H = /* @__PURE__ */ m({
|
|
|
151
170
|
return {
|
|
152
171
|
"k-event": !this.$props.resizeHint,
|
|
153
172
|
"k-selected": this.$props.selected && this.currentEditable.select,
|
|
173
|
+
"k-readonly": !this.$props.resizeHint && !!this.$props.readonly,
|
|
154
174
|
"k-event-drag-hint": this.$props.dragHint,
|
|
155
175
|
"k-scheduler-marquee": this.$props.resizeHint,
|
|
156
176
|
"k-marquee": this.$props.resizeHint,
|
|
@@ -160,22 +180,24 @@ const H = /* @__PURE__ */ m({
|
|
|
160
180
|
};
|
|
161
181
|
},
|
|
162
182
|
eventLabel() {
|
|
163
|
-
return `${
|
|
183
|
+
return `${a(this.intl, this.$props.zonedStart, this.$props.zonedEnd, this.$props.isAllDay)}, ${this.$props.title}`;
|
|
164
184
|
},
|
|
165
185
|
computedStyle() {
|
|
186
|
+
var e;
|
|
166
187
|
return {
|
|
167
188
|
cursor: "pointer",
|
|
168
189
|
userSelect: "none",
|
|
169
190
|
borderColor: this.$props.resizeHint ? void 0 : this.color,
|
|
170
191
|
backgroundColor: this.$props.resizeHint ? void 0 : this.color,
|
|
171
192
|
touchAction: "none",
|
|
172
|
-
...this.$props.itemStyle
|
|
193
|
+
...this.$props.itemStyle,
|
|
194
|
+
containerType: this.$props.resizeHint ? void 0 : ((e = this.$props.itemStyle) == null ? void 0 : e.height) === "auto" ? "normal" : "size"
|
|
173
195
|
};
|
|
174
196
|
}
|
|
175
197
|
},
|
|
176
198
|
created() {
|
|
177
199
|
this.setItems({
|
|
178
|
-
type:
|
|
200
|
+
type: r.add,
|
|
179
201
|
item: this
|
|
180
202
|
});
|
|
181
203
|
},
|
|
@@ -184,15 +206,15 @@ const H = /* @__PURE__ */ m({
|
|
|
184
206
|
},
|
|
185
207
|
unmounted() {
|
|
186
208
|
this.setItems({
|
|
187
|
-
type:
|
|
209
|
+
type: r.remove,
|
|
188
210
|
item: this
|
|
189
211
|
});
|
|
190
212
|
},
|
|
191
213
|
render() {
|
|
192
|
-
const e =
|
|
193
|
-
this.intl =
|
|
194
|
-
const
|
|
195
|
-
h:
|
|
214
|
+
const e = h(this);
|
|
215
|
+
this.intl = u(this);
|
|
216
|
+
const s = d.call(this, {
|
|
217
|
+
h: o,
|
|
196
218
|
template: this.bv.viewProps.resizeHint,
|
|
197
219
|
additionalProps: {
|
|
198
220
|
dataItem: this.dataItem,
|
|
@@ -206,120 +228,95 @@ const H = /* @__PURE__ */ m({
|
|
|
206
228
|
onRelease: this.handleRelease,
|
|
207
229
|
ref: "draggable"
|
|
208
230
|
}, {
|
|
209
|
-
default: () =>
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}, {
|
|
299
|
-
default: () => [t("span", {
|
|
300
|
-
class: "k-resize-handle k-resize-w"
|
|
301
|
-
}, null)]
|
|
302
|
-
}), t(i, {
|
|
303
|
-
onPress: this.handleResizePress,
|
|
304
|
-
onDrag: this.handleResizeEndDrag,
|
|
305
|
-
onRelease: this.handleResizeRelease
|
|
306
|
-
}, {
|
|
307
|
-
default: () => [t("span", {
|
|
308
|
-
class: "k-resize-handle k-resize-e"
|
|
309
|
-
}, null)]
|
|
310
|
-
})], this.$props.resizeHint ? this.bv.viewProps.resizeHint ? d : [t("div", {
|
|
311
|
-
class: "k-marquee-color",
|
|
312
|
-
style: {
|
|
313
|
-
borderColor: this.color,
|
|
314
|
-
backgroundColor: this.color
|
|
315
|
-
}
|
|
316
|
-
}, null), t("div", {
|
|
317
|
-
class: "k-marquee-text"
|
|
318
|
-
}, [!this.$props.tail && t("div", {
|
|
319
|
-
class: "k-label-top"
|
|
320
|
-
}, [this.intl.formatDate(this.$props.zonedStart, this.$props.format)]), !this.$props.head && t("div", {
|
|
321
|
-
class: "k-label-bottom"
|
|
322
|
-
}, [this.intl.formatDate(this.$props.zonedEnd, this.$props.format)])])] : null])]
|
|
231
|
+
default: () => {
|
|
232
|
+
var l;
|
|
233
|
+
return [t("div", {
|
|
234
|
+
id: this.$props.id,
|
|
235
|
+
style: this.computedStyle,
|
|
236
|
+
tabindex: this.currentTabIndex,
|
|
237
|
+
class: this.itemClassName,
|
|
238
|
+
role: "button",
|
|
239
|
+
"aria-label": this.eventLabel,
|
|
240
|
+
"aria-disabled": this.$props.readonly ? !0 : void 0,
|
|
241
|
+
onFocusin: this.handleFocus,
|
|
242
|
+
onBlur: this.handleBlur,
|
|
243
|
+
onMouseup: this.handleMouseUp,
|
|
244
|
+
onMousedown: this.handleMouseDown,
|
|
245
|
+
onClick: this.handleClick,
|
|
246
|
+
onMouseover: this.handleMouseOver,
|
|
247
|
+
onMouseout: this.handleMouseOut,
|
|
248
|
+
onMouseenter: this.handleMouseEnter,
|
|
249
|
+
onMouseleave: this.handleMouseLeave,
|
|
250
|
+
onDblclick: this.handleDoubleClick,
|
|
251
|
+
onKeydown: this.handleKeyDown,
|
|
252
|
+
onKeypress: this.handleKeyPress,
|
|
253
|
+
onKeyup: this.handleKeyUp,
|
|
254
|
+
"data-group-index": this.$props.group.index,
|
|
255
|
+
"data-range-index": this.$props.range.index
|
|
256
|
+
}, [this.formItem && !this.showOccurrenceDialog && this.currentEditable.edit && t(c, {
|
|
257
|
+
dataItem: this.formItem,
|
|
258
|
+
onSubmit: this.handleFormSubmit,
|
|
259
|
+
onClose: this.handleFormClose,
|
|
260
|
+
onCancel: this.handleFormCancel,
|
|
261
|
+
onDelete: this.currentEditable.remove ? this.handleEditDialogDelete : void 0
|
|
262
|
+
}, null), this.showOccurrenceDialog && this.currentEditable.edit && t(m, {
|
|
263
|
+
dataItem: this.formItem || this.dragItem || this.resizeItem || this.removeItem,
|
|
264
|
+
isRemove: !!this.removeItem,
|
|
265
|
+
onClose: this.ksCancel,
|
|
266
|
+
onOccurrenceclick: this.ksOccurrenceClick,
|
|
267
|
+
onSeriesclick: this.ksSeriesClick
|
|
268
|
+
}, null), this.showRemoveDialog && this.removeItem && this.currentEditable.remove && t(p, {
|
|
269
|
+
dataItem: this.removeItem,
|
|
270
|
+
isSeries: (l = this.ksIsSeries) == null ? void 0 : l.call(this),
|
|
271
|
+
onClose: this.ksRemoveDialogCancel,
|
|
272
|
+
onCancel: this.ksRemoveDialogCancel,
|
|
273
|
+
onConfirm: this.ksRemoveConfirm
|
|
274
|
+
}, null), e, this.currentEditable.resize && this.$props.vertical && [t(i, {
|
|
275
|
+
onPress: this.handleResizePress,
|
|
276
|
+
onDrag: this.handleResizeStartDrag,
|
|
277
|
+
onRelease: this.handleResizeRelease
|
|
278
|
+
}, {
|
|
279
|
+
default: () => [t("span", {
|
|
280
|
+
class: "k-resize-handle k-resize-n"
|
|
281
|
+
}, null)]
|
|
282
|
+
}), t(i, {
|
|
283
|
+
onPress: this.handleResizePress,
|
|
284
|
+
onDrag: this.handleResizeEndDrag,
|
|
285
|
+
onRelease: this.handleResizeRelease
|
|
286
|
+
}, {
|
|
287
|
+
default: () => [t("span", {
|
|
288
|
+
class: "k-resize-handle k-resize-s"
|
|
289
|
+
}, null)]
|
|
290
|
+
})], this.currentEditable.resize && !this.$props.vertical && [t(i, {
|
|
291
|
+
onPress: this.handleResizePress,
|
|
292
|
+
onDrag: this.handleResizeStartDrag,
|
|
293
|
+
onRelease: this.handleResizeRelease
|
|
294
|
+
}, {
|
|
295
|
+
default: () => [t("span", {
|
|
296
|
+
class: "k-resize-handle k-resize-w"
|
|
297
|
+
}, null)]
|
|
298
|
+
}), t(i, {
|
|
299
|
+
onPress: this.handleResizePress,
|
|
300
|
+
onDrag: this.handleResizeEndDrag,
|
|
301
|
+
onRelease: this.handleResizeRelease
|
|
302
|
+
}, {
|
|
303
|
+
default: () => [t("span", {
|
|
304
|
+
class: "k-resize-handle k-resize-e"
|
|
305
|
+
}, null)]
|
|
306
|
+
})], this.$props.resizeHint ? this.bv.viewProps.resizeHint ? s : [t("div", {
|
|
307
|
+
class: "k-marquee-color",
|
|
308
|
+
style: {
|
|
309
|
+
borderColor: this.color,
|
|
310
|
+
backgroundColor: this.color
|
|
311
|
+
}
|
|
312
|
+
}, null), t("div", {
|
|
313
|
+
class: "k-marquee-text"
|
|
314
|
+
}, [!this.$props.tail && t("div", {
|
|
315
|
+
class: "k-label-top"
|
|
316
|
+
}, [this.intl.formatDate(this.$props.zonedStart, this.$props.format)]), !this.$props.head && t("div", {
|
|
317
|
+
class: "k-label-bottom"
|
|
318
|
+
}, [this.intl.formatDate(this.$props.zonedEnd, this.$props.format)])])] : null])];
|
|
319
|
+
}
|
|
323
320
|
});
|
|
324
321
|
},
|
|
325
322
|
methods: {
|
|
@@ -429,6 +426,8 @@ const H = /* @__PURE__ */ m({
|
|
|
429
426
|
});
|
|
430
427
|
},
|
|
431
428
|
handleDoubleClick(e) {
|
|
429
|
+
if (this.$props.readonly)
|
|
430
|
+
return;
|
|
432
431
|
const s = {
|
|
433
432
|
event: e,
|
|
434
433
|
target: {
|
|
@@ -571,9 +570,28 @@ const H = /* @__PURE__ */ m({
|
|
|
571
570
|
},
|
|
572
571
|
handleFormCancel(e) {
|
|
573
572
|
this.ksCancel(e), this.$emit("cancel", e);
|
|
573
|
+
},
|
|
574
|
+
handleEditDialogSave(e) {
|
|
575
|
+
const s = {
|
|
576
|
+
value: e,
|
|
577
|
+
event: null,
|
|
578
|
+
target: this
|
|
579
|
+
};
|
|
580
|
+
this.ksFormSubmit(s), this.$emit("formsubmit", s);
|
|
581
|
+
},
|
|
582
|
+
handleEditDialogCancel() {
|
|
583
|
+
const e = {
|
|
584
|
+
value: null,
|
|
585
|
+
event: null,
|
|
586
|
+
target: this
|
|
587
|
+
};
|
|
588
|
+
this.ksCancel(e), this.$emit("cancel", e);
|
|
589
|
+
},
|
|
590
|
+
handleEditDialogDelete(e) {
|
|
591
|
+
this.ksFormDelete && this.ksFormDelete(e);
|
|
574
592
|
}
|
|
575
593
|
}
|
|
576
594
|
});
|
|
577
595
|
export {
|
|
578
|
-
|
|
596
|
+
C as SchedulerItem
|
|
579
597
|
};
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { SchedulerItemProps } from './SchedulerItem';
|
|
9
|
+
import { SchedulerSlotProps } from '../slots/SchedulerSlot';
|
|
10
|
+
import { PropType } from 'vue';
|
|
11
|
+
/**
|
|
12
|
+
* @hidden
|
|
13
|
+
*
|
|
14
|
+
* Represents a customized `viewItem` component which positions itself proportionally to the duration of the item.
|
|
15
|
+
*/
|
|
16
|
+
declare const SchedulerProportionalViewItem: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
17
|
+
ignoreIsAllDay: PropType<boolean>;
|
|
18
|
+
item: PropType<any>;
|
|
19
|
+
uid: PropType<string | number>;
|
|
20
|
+
start: PropType<Date>;
|
|
21
|
+
end: PropType<Date>;
|
|
22
|
+
originalStart: PropType<Date>;
|
|
23
|
+
startTimezone: PropType<string>;
|
|
24
|
+
endTimezone: PropType<string>;
|
|
25
|
+
isAllDay: PropType<boolean>;
|
|
26
|
+
title: PropType<string>;
|
|
27
|
+
description: PropType<string>;
|
|
28
|
+
occurrenceId: PropType<string>;
|
|
29
|
+
recurrenceExceptions: PropType<Date[]>;
|
|
30
|
+
recurrenceRule: PropType<string>;
|
|
31
|
+
recurrenceId: PropType<string | number>;
|
|
32
|
+
dataItem: PropType<any>;
|
|
33
|
+
head: PropType<boolean>;
|
|
34
|
+
tail: PropType<boolean>;
|
|
35
|
+
order: PropType<number>;
|
|
36
|
+
zonedStart: PropType<import('@progress/kendo-date-math').ZonedDate>;
|
|
37
|
+
zonedEnd: PropType<import('@progress/kendo-date-math').ZonedDate>;
|
|
38
|
+
slots: PropType<import('../models/Slot').Slot[]>;
|
|
39
|
+
group: PropType<import('../models/Group').Group>;
|
|
40
|
+
range: PropType<import('../models/Range').Range>;
|
|
41
|
+
isException: PropType<boolean>;
|
|
42
|
+
isRecurring: PropType<boolean>;
|
|
43
|
+
id: PropType<string>;
|
|
44
|
+
tabIndex: PropType<number>;
|
|
45
|
+
className: PropType<string>;
|
|
46
|
+
itemStyle: PropType<any>;
|
|
47
|
+
editable: PropType<boolean | import('../models/EditableProp').EditableProp>;
|
|
48
|
+
readonly: PropType<boolean>;
|
|
49
|
+
selected: PropType<boolean>;
|
|
50
|
+
vertical: PropType<boolean>;
|
|
51
|
+
dragHint: PropType<boolean>;
|
|
52
|
+
resizeHint: PropType<boolean>;
|
|
53
|
+
format: PropType<string>;
|
|
54
|
+
showOccurrenceDialog: {
|
|
55
|
+
type: PropType<boolean>;
|
|
56
|
+
default: any;
|
|
57
|
+
};
|
|
58
|
+
showRemoveDialog: {
|
|
59
|
+
type: PropType<boolean>;
|
|
60
|
+
default: any;
|
|
61
|
+
};
|
|
62
|
+
formItem: PropType<object>;
|
|
63
|
+
dragItem: PropType<object>;
|
|
64
|
+
resizeItem: PropType<object>;
|
|
65
|
+
removeItem: PropType<object>;
|
|
66
|
+
itemRef: PropType<any>;
|
|
67
|
+
onKeydown: PropType<(e: any) => void>;
|
|
68
|
+
onKeyup: PropType<(e: any) => void>;
|
|
69
|
+
onFocus: PropType<(e: any) => void>;
|
|
70
|
+
onMouseup: PropType<(e: any) => void>;
|
|
71
|
+
onMousedown: PropType<(e: any) => void>;
|
|
72
|
+
onClick: PropType<(e: any) => void>;
|
|
73
|
+
onDoubleclick: PropType<(e: any) => void>;
|
|
74
|
+
onRemoveclick: PropType<(e: any) => void>;
|
|
75
|
+
onPress: PropType<(e: any) => void>;
|
|
76
|
+
onDrag: PropType<(e: any) => void>;
|
|
77
|
+
onRelease: PropType<(e: any) => void>;
|
|
78
|
+
onResizepress: PropType<(e: any) => void>;
|
|
79
|
+
onResizeenddrag: PropType<(e: any) => void>;
|
|
80
|
+
onResizestartdrag: PropType<(e: any) => void>;
|
|
81
|
+
onResizerelease: PropType<(e: any) => void>;
|
|
82
|
+
}>, {}, {
|
|
83
|
+
timeout: number;
|
|
84
|
+
display: boolean;
|
|
85
|
+
visible: boolean;
|
|
86
|
+
maxSiblingsPerSlot: number;
|
|
87
|
+
}, {
|
|
88
|
+
itemTime(): any;
|
|
89
|
+
itemTitle(): string;
|
|
90
|
+
formattedTime(): any;
|
|
91
|
+
}, {
|
|
92
|
+
getElement(): any;
|
|
93
|
+
handleFocus(e: any): void;
|
|
94
|
+
handleMouseDown(e: any): void;
|
|
95
|
+
handleClick(e: any): void;
|
|
96
|
+
handleMouseUp(e: any): void;
|
|
97
|
+
handleDoubleClick(e: any): void;
|
|
98
|
+
handleRemoveClick(e: any): void;
|
|
99
|
+
handleKeyDown(e: any): void;
|
|
100
|
+
handleKeyUp(e: any): void;
|
|
101
|
+
handlePress(e: any): void;
|
|
102
|
+
handleDrag(e: any): void;
|
|
103
|
+
handleRelease(e: any): void;
|
|
104
|
+
handleResizePress(e: any): void;
|
|
105
|
+
handleResizeStartDrag(e: any): void;
|
|
106
|
+
handleResizeEndDrag(e: any): void;
|
|
107
|
+
handleResizeRelease(e: any): void;
|
|
108
|
+
calculateMostSiblings(current: any, _siblings: any[]): number;
|
|
109
|
+
getSiblings(items: any[], range: [any, any], minDistance: number): any[];
|
|
110
|
+
inSlot(slot: SchedulerSlotProps, current: SchedulerItemProps): any;
|
|
111
|
+
position(): void;
|
|
112
|
+
handleResize(): void;
|
|
113
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
114
|
+
ignoreIsAllDay: PropType<boolean>;
|
|
115
|
+
item: PropType<any>;
|
|
116
|
+
uid: PropType<string | number>;
|
|
117
|
+
start: PropType<Date>;
|
|
118
|
+
end: PropType<Date>;
|
|
119
|
+
originalStart: PropType<Date>;
|
|
120
|
+
startTimezone: PropType<string>;
|
|
121
|
+
endTimezone: PropType<string>;
|
|
122
|
+
isAllDay: PropType<boolean>;
|
|
123
|
+
title: PropType<string>;
|
|
124
|
+
description: PropType<string>;
|
|
125
|
+
occurrenceId: PropType<string>;
|
|
126
|
+
recurrenceExceptions: PropType<Date[]>;
|
|
127
|
+
recurrenceRule: PropType<string>;
|
|
128
|
+
recurrenceId: PropType<string | number>;
|
|
129
|
+
dataItem: PropType<any>;
|
|
130
|
+
head: PropType<boolean>;
|
|
131
|
+
tail: PropType<boolean>;
|
|
132
|
+
order: PropType<number>;
|
|
133
|
+
zonedStart: PropType<import('@progress/kendo-date-math').ZonedDate>;
|
|
134
|
+
zonedEnd: PropType<import('@progress/kendo-date-math').ZonedDate>;
|
|
135
|
+
slots: PropType<import('../models/Slot').Slot[]>;
|
|
136
|
+
group: PropType<import('../models/Group').Group>;
|
|
137
|
+
range: PropType<import('../models/Range').Range>;
|
|
138
|
+
isException: PropType<boolean>;
|
|
139
|
+
isRecurring: PropType<boolean>;
|
|
140
|
+
id: PropType<string>;
|
|
141
|
+
tabIndex: PropType<number>;
|
|
142
|
+
className: PropType<string>;
|
|
143
|
+
itemStyle: PropType<any>;
|
|
144
|
+
editable: PropType<boolean | import('../models/EditableProp').EditableProp>;
|
|
145
|
+
readonly: PropType<boolean>;
|
|
146
|
+
selected: PropType<boolean>;
|
|
147
|
+
vertical: PropType<boolean>;
|
|
148
|
+
dragHint: PropType<boolean>;
|
|
149
|
+
resizeHint: PropType<boolean>;
|
|
150
|
+
format: PropType<string>;
|
|
151
|
+
showOccurrenceDialog: {
|
|
152
|
+
type: PropType<boolean>;
|
|
153
|
+
default: any;
|
|
154
|
+
};
|
|
155
|
+
showRemoveDialog: {
|
|
156
|
+
type: PropType<boolean>;
|
|
157
|
+
default: any;
|
|
158
|
+
};
|
|
159
|
+
formItem: PropType<object>;
|
|
160
|
+
dragItem: PropType<object>;
|
|
161
|
+
resizeItem: PropType<object>;
|
|
162
|
+
removeItem: PropType<object>;
|
|
163
|
+
itemRef: PropType<any>;
|
|
164
|
+
onKeydown: PropType<(e: any) => void>;
|
|
165
|
+
onKeyup: PropType<(e: any) => void>;
|
|
166
|
+
onFocus: PropType<(e: any) => void>;
|
|
167
|
+
onMouseup: PropType<(e: any) => void>;
|
|
168
|
+
onMousedown: PropType<(e: any) => void>;
|
|
169
|
+
onClick: PropType<(e: any) => void>;
|
|
170
|
+
onDoubleclick: PropType<(e: any) => void>;
|
|
171
|
+
onRemoveclick: PropType<(e: any) => void>;
|
|
172
|
+
onPress: PropType<(e: any) => void>;
|
|
173
|
+
onDrag: PropType<(e: any) => void>;
|
|
174
|
+
onRelease: PropType<(e: any) => void>;
|
|
175
|
+
onResizepress: PropType<(e: any) => void>;
|
|
176
|
+
onResizeenddrag: PropType<(e: any) => void>;
|
|
177
|
+
onResizestartdrag: PropType<(e: any) => void>;
|
|
178
|
+
onResizerelease: PropType<(e: any) => void>;
|
|
179
|
+
}>> & Readonly<{}>, {
|
|
180
|
+
showOccurrenceDialog: boolean;
|
|
181
|
+
showRemoveDialog: boolean;
|
|
182
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
183
|
+
export { SchedulerProportionalViewItem };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),E=require("./SchedulerItem.js"),p=require("../utils/main.js"),D=require("../views/common/utils.js"),S=require("../constants/main.js"),O=require("@progress/kendo-vue-intl"),y=require("./SchedulerItemContent.js"),c=require("@progress/kendo-vue-common"),h=require("@progress/kendo-svg-icons"),M=1,k=12,N=i.defineComponent({name:"KendoSchedulerProportionalViewItem",inheritAttrs:!1,props:{ignoreIsAllDay:Boolean,item:[String,Function,Object],uid:[String,Number],start:Date,end:Date,originalStart:Date,startTimezone:String,endTimezone:String,isAllDay:Boolean,title:String,description:String,occurrenceId:String,recurrenceExceptions:Array,recurrenceRule:String,recurrenceId:[String,Number],dataItem:Object,head:Boolean,tail:Boolean,order:Number,zonedStart:Object,zonedEnd:Object,slots:Array,group:Object,range:Object,isException:Boolean,isRecurring:Boolean,id:String,tabIndex:Number,className:String,itemStyle:Object,editable:[Object,Boolean],readonly:Boolean,selected:Boolean,vertical:Boolean,dragHint:Boolean,resizeHint:Boolean,format:String,showOccurrenceDialog:{type:Boolean,default:void 0},showRemoveDialog:{type:Boolean,default:void 0},formItem:Object,dragItem:Object,resizeItem:Object,removeItem:Object,itemRef:Object,onKeydown:Function,onKeyup:Function,onFocus:Function,onMouseup:Function,onMousedown:Function,onClick:Function,onDoubleclick:Function,onRemoveclick:Function,onPress:Function,onDrag:Function,onRelease:Function,onResizepress:Function,onResizeenddrag:Function,onResizestartdrag:Function,onResizerelease:Function},inject:{kendoIntlService:{default:null},ks:{default:null},bv:{default:null}},computed:{itemTime(){return this.$props.isAllDay?this.intl.toString(this.$props.zonedStart,"t"):this.intl.format("{0:t} - {1:t}",this.$props.zonedStart,this.$props.zonedEnd)},itemTitle(){return`(${this.itemTime}): ${this.$props.title}`},formattedTime(){return this.intl.format("{0:t} – {1:t}",this.$props.zonedStart,this.$props.zonedEnd)}},data(){return{timeout:void 0,display:!0,visible:!1,maxSiblingsPerSlot:0}},mounted(){if(this.element=this.getElement(),!this.ks.scheduler||!this.ks.scheduler.$el)return;c.canUseDOM&&(this.observer=new window.ResizeObserver(this.handleResize),this.observer.observe(this.ks.scheduler.$el));const e=this;this.$nextTick(function(){e.position()})},updated(){const e=this;this.$nextTick(function(){e.position()}),!(!this.ks.scheduler||!this.ks.scheduler.$el||this.observer)&&c.canUseDOM&&window.ResizeObserver&&(this.observer=new window.ResizeObserver(this.handleResize),this.observer.observe(this.ks.scheduler.$el))},unmounted(){this.observer&&this.observer.disconnect()},render(){const e=c.getDefaultSlots(this);this.intl=O.provideIntlService(this);let s;const n=i.createVNode(E.SchedulerItem,{ignoreIsAllDay:this.ignoreIsAllDay,item:this.item,uid:this.uid,start:this.start,end:this.end,originalStart:this.originalStart,startTimezone:this.startTimezone,endTimezone:this.endTimezone,isAllDay:this.isAllDay,title:this.title,description:this.description,occurrenceId:this.occurrenceId,recurrenceExceptions:this.recurrenceExceptions,recurrenceRule:this.recurrenceRule,recurrenceId:this.recurrenceId,dataItem:this.dataItem,head:this.head,tail:this.tail,order:this.order,zonedStart:this.zonedStart,zonedEnd:this.zonedEnd,slots:this.slots,group:this.group,range:this.range,isException:this.isException,isRecurring:this.isRecurring,id:this.id,tabIndex:this.tabIndex,className:this.className,itemStyle:{visibility:this.visible?void 0:"hidden",display:this.display?void 0:"none",...this.$props.itemStyle},editable:this.editable,readonly:this.readonly,selected:this.selected,vertical:this.vertical,dragHint:this.dragHint,resizeHint:this.resizeHint,format:this.format,itemTitle:this.itemTitle,showOccurrenceDialog:this.showOccurrenceDialog,showRemoveDialog:this.showRemoveDialog,formItem:this.formItem,dragItem:this.dragItem,resizeItem:this.resizeItem,removeItem:this.removeItem,maxSiblingsPerSlot:this.maxSiblingsPerSlot,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onFocus:this.handleFocus,onMouseup:this.handleMouseUp,onMousedown:this.handleMouseDown,onClick:this.handleClick,onDoubleclick:this.handleDoubleClick,onRemoveclick:this.handleRemoveClick,onPress:this.handlePress,onDrag:this.handleDrag,onRelease:this.handleRelease,onResizepress:this.handleResizePress,onResizeenddrag:this.handleResizeEndDrag,onResizestartdrag:this.handleResizeStartDrag,onResizerelease:this.handleResizeRelease},{default:()=>[!this.$props.resizeHint&&i.createVNode(i.Fragment,null,[this.$props.tail&&!this.$props.vertical&&i.createVNode("span",{class:"k-event-continuation"},[i.createVNode(c.Icon,{name:this.ks.isRtl?"chevron-right":"chevron-left",icon:this.ks.isRtl?h.chevronRightIcon:h.chevronLeftIcon},null)]),i.createVNode("div",{title:this.itemTitle},[this.$props.tail&&this.$props.vertical&&i.createVNode("span",{class:"k-event-continuation"},[i.createVNode(c.Icon,{name:"chevron-up",icon:h.chevronUpIcon},null)]),i.createVNode(y.SchedulerItemContent,{class:"k-event-title"},{default:()=>[this.$props.title]}),!this.$props.isAllDay&&i.createVNode(y.SchedulerItemContent,{class:"k-event-time"},{default:()=>[this.$props.isRecurring&&!this.$props.isException&&i.createVNode("span",{class:"k-event-recurrence-icon"},[i.createVNode(c.Icon,{name:"arrow-rotate-cw",icon:h.arrowRotateCwIcon},null)]),!this.$props.isRecurring&&this.$props.isException&&i.createVNode("span",{class:"k-event-recurrence-icon"},[i.createVNode(c.Icon,{name:"arrows-no-repeat",icon:h.arrowsNoRepeatIcon},null)]),this.formattedTime]}),this.$props.head&&this.$props.vertical&&i.createVNode("span",{class:"k-event-continuation"},[i.createVNode(c.Icon,{name:"chevron-down",icon:h.chevronDownIcon},null)])]),(this.$props.isRecurring&&!this.$props.isException||!this.$props.isRecurring&&this.$props.isException)&&i.createVNode("span",{class:"k-event-recurrence-icon"},[i.createVNode(c.Icon,{name:this.$props.isRecurring?"arrow-rotate-cw":"arrows-no-repeat",icon:this.$props.isRecurring?h.arrowRotateCwIcon:h.arrowsNoRepeatIcon},null)]),this.$props.head&&!this.$props.vertical&&i.createVNode("span",{class:"k-event-continuation"},[i.createVNode(c.Icon,{name:this.ks.isRtl?"chevron-left":"chevron-right",icon:this.ks.isRtl?h.chevronLeftIcon:h.chevronRightIcon},null)])])]});return s=c.getTemplate.call(this,{h:i.h,template:this.$props.item,defaultRendering:n,defaultSlots:e,additionalListeners:{doubleclick:this.handleDoubleClick,removeclick:this.handleRemoveClick,press:this.handlePress,drag:this.handleDrag,release:this.handleRelease,resizepress:this.handleResizePress,resizeenddrag:this.handleResizeEndDrag,resizestartdrag:this.handleResizeStartDrag,resizerelease:this.handleResizeRelease}}),s},methods:{getElement(){return this.$el.nodeType===8?this.$el.parentElement:this.$el.nodeType===3?this.$el.nextElementSibling:this.$el},handleFocus(e){this.$emit("focus",e)},handleMouseDown(e){this.$emit("mousedown",e)},handleClick(e){this.$emit("click",e)},handleMouseUp(e){this.$emit("mouseup",e)},handleDoubleClick(e){this.$emit("doubleclick",e)},handleRemoveClick(e){this.$emit("removeclick",e)},handleKeyDown(e){this.$emit("keydown",e)},handleKeyUp(e){this.$emit("keyup",e)},handlePress(e){this.$emit("press",e)},handleDrag(e){this.$emit("drag",e)},handleRelease(e){this.$emit("release",e)},handleResizePress(e){this.$emit("resizepress",e)},handleResizeStartDrag(e){this.$emit("resizestartdrag",e)},handleResizeEndDrag(e){this.$emit("resizeenddrag",e)},handleResizeRelease(e){this.$emit("resizerelease",e)},calculateMostSiblings(e,s){let n=0;return s.forEach(l=>{l._order!==void 0&&l._order!==null&&n<l._order&&(n=l._order)}),n+1},getSiblings(e,s,n){const[l,r]=s,u=new Date(Math.min(r.cSlot.end.getTime()-n,Math.max(this.$props.start.getTime(),l.cSlot.start.getTime()))),R=new Date(Math.max(u.getTime()+n,Math.min(this.$props.end.getTime(),r.cSlot.end.getTime())));return e.filter(a=>{const m=Math.max(Math.min(r.cSlot.end.getTime()-n,a.$props.start.getTime()),l.cSlot.start.getTime()),v=Math.min(Math.max(m+n,a.$props.end.getTime()),r.cSlot.end.getTime());return a.$props.id!==this.$props.id&&a.$props.group.index===this.$props.group.index&&a.$props.range.index===this.$props.range.index&&(this.$props.ignoreIsAllDay||a.$props.isAllDay===this.$props.isAllDay)&&p.intersects(new Date(m),new Date(v),u,R)&&p.intersects(l.cSlot.start,r.cSlot.end,a.$props.start,a.$props.end)})},inSlot(e,s){return e.group.index===s.group.index&&e.range.index===s.range.index&&(e.range.isAllDay===void 0||s.range.isAllDay===void 0||e.range.isAllDay===s.range.isAllDay)&&(this.$props.ignoreIsAllDay||e.isAllDay===s.isAllDay)},position(){var b,T;if(!this.element)return;const e=(this.bv.slots||[]).filter(t=>t&&this.inSlot(t.cSlot,this.$props)).sort((t,f)=>t.cSlot.start.getTime()-f.cSlot.start.getTime()),s=e.filter(t=>p.intersects(t.cSlot.start,t.cSlot.end,this.$props.start,this.$props.end));if(!this.element||!s.length)return;const n=p.first(e),l=p.last(e),r=p.first(s),u=p.last(s);if(!r||!u||!n||!l)return;if(!p.intersects(r.cSlot.start,u.cSlot.end,this.$props.start,this.$props.end)){this.display=!1;return}const R=[],a=D.getRect(r.$el),m=(this.$props.vertical?a.height:a.width)/(r.cSlot.end.getTime()-r.cSlot.start.getTime()),v=(this.$props.vertical?k:8)/m,I=(Math.min(this.$props.start.getTime(),u.cSlot.end.getTime()-v)-r.cSlot.start.getTime())*m,w=Math.floor(Math.min(this.$props.end.getTime(),u.cSlot.end.getTime())-Math.max(this.$props.start.getTime(),r.cSlot.start.getTime()))*m;(this.bv.items||[]).forEach(t=>{t&&(t.$props.dragHint||t.$props.resizeHint||R.push(t))});const $=this.getSiblings(R,[n,l],v),g=this.$props.resizeHint||this.$props.dragHint?0:p.calculateProportionalOrder(this,$);let d=1;this.$props.resizeHint||this.$props.dragHint||(d=this.calculateMostSiblings(this,$),$.forEach(t=>{t._maxSiblingsPerSlot&&d<t._maxSiblingsPerSlot&&(d=t._maxSiblingsPerSlot)}),$.forEach(t=>{t._maxSiblingsPerSlot!==void 0&&t._maxSiblingsPerSlot!==null&&t._maxSiblingsPerSlot<d&&(t._maxSiblingsPerSlot=d)}));let z=0;const o=a;$.forEach(t=>{let f=0;t._order!==void 0&&t._order!==null&&t._order<g&&(f=D.getRect(t.getElement()).top+D.getRect(t.getElement()).height-o.top-S.BORDER_WIDTH*g+M),f>z&&(z=f)});const x=20;o.width=this.$props.vertical?o.width/d-S.BORDER_WIDTH-x/d:w-S.BORDER_WIDTH,this.$props.vertical?o.height=w-S.BORDER_WIDTH:(this.$props.resizeHint||this.$props.dragHint)&&d<=1||(o.height=(T=(b=this.$props.itemStyle)==null?void 0:b.height)!=null?T:k),o.left=this.$props.vertical?o.left+g+S.BORDER_WIDTH*g*o.width:o.left+(I<0?0:I),o.top=this.$props.vertical?o.top+(I<0?0:I):o.top+z+S.BORDER_WIDTH*g,this.maxSiblingsPerSlot=d,this._order=g,D.setRect(this.element,o),this.visible=!0,this.display=!0},handleResize(){this.timeout!==void 0&&window.cancelAnimationFrame(this.timeout),this.timeout=window.requestAnimationFrame(()=>{this.position()})}}});exports.SchedulerProportionalViewItem=N;
|