@progress/kendo-angular-scheduler 17.3.0-develop.1 → 18.0.0-develop.1
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.
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-scheduler',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
13
|
-
version: '
|
|
12
|
+
publishDate: 1736250094,
|
|
13
|
+
version: '18.0.0-develop.1',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
15
15
|
};
|
|
@@ -193,35 +193,7 @@ export class SlotRange {
|
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
195
|
// The number of slots an event spans in current group
|
|
196
|
-
|
|
197
|
-
if (event.item.isMultiDay) {
|
|
198
|
-
const slotMatch = this.slots.filter(slot => intersects(event.item.startTime, event.item.endTime, slot.start, slot.end));
|
|
199
|
-
eventWidth = slotMatch.reduce((acc, currentValue) => acc + currentValue.rect.width + BORDER_WIDTH, 0) - BORDER_WIDTH;
|
|
200
|
-
if (prevEvent) {
|
|
201
|
-
const newHeight = prevEvent.element.nativeElement.clientHeight + prevEvent.rect.top;
|
|
202
|
-
const newTop = newHeight + EVENT_SPACING;
|
|
203
|
-
// If event is spanning in multiple slots, it needs to be positioned so that its top
|
|
204
|
-
// is calculated based on the most 'accumulated height' among all slots
|
|
205
|
-
if (event.rect.top < newTop) {
|
|
206
|
-
event.rect.top = newTop;
|
|
207
|
-
// Consequently, all previously renderd events (after that multi-span event) need to
|
|
208
|
-
// be reposition so that they don't overlap
|
|
209
|
-
slotMatch.forEach(slot => {
|
|
210
|
-
const slotKey = slot.id.resourceIndex + ':' + slot.id.rangeIndex + ':' + slot.id.index;
|
|
211
|
-
if (slotKey !== key) {
|
|
212
|
-
slotItems[slotKey].events.forEach((e, index) => {
|
|
213
|
-
if (index > event.item.data[event.resourceIndex].rowIndex) {
|
|
214
|
-
e.rect.top = event.rect.top + event.element.nativeElement.clientHeight + EVENT_SPACING;
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
else {
|
|
223
|
-
eventWidth = slotRect.width;
|
|
224
|
-
}
|
|
196
|
+
const eventWidth = this.calculateEventWidth(event, prevEvent, slotItems, key, slotRect);
|
|
225
197
|
event.rect.width = eventWidth;
|
|
226
198
|
event.element.nativeElement.style.width = event.rect.width + 'px';
|
|
227
199
|
event.element.nativeElement.style.height = 'auto';
|
|
@@ -240,6 +212,42 @@ export class SlotRange {
|
|
|
240
212
|
}
|
|
241
213
|
});
|
|
242
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* Extracted to a separate method to address SonarQube suggestion:
|
|
217
|
+
* "Refactor this code to not nest functions more than 4 levels deep"
|
|
218
|
+
*/
|
|
219
|
+
calculateEventWidth = (event, prevEvent, slotItems, key, slotRect) => {
|
|
220
|
+
let eventWidth;
|
|
221
|
+
if (event.item.isMultiDay) {
|
|
222
|
+
const slotMatch = this.slots.filter(slot => intersects(event.item.startTime, event.item.endTime, slot.start, slot.end));
|
|
223
|
+
eventWidth = slotMatch.reduce((acc, currentValue) => acc + currentValue.rect.width + BORDER_WIDTH, 0) - BORDER_WIDTH;
|
|
224
|
+
if (prevEvent) {
|
|
225
|
+
const newHeight = prevEvent.element.nativeElement.clientHeight + prevEvent.rect.top;
|
|
226
|
+
const newTop = newHeight + EVENT_SPACING;
|
|
227
|
+
// If event is spanning in multiple slots, it needs to be positioned so that its top
|
|
228
|
+
// is calculated based on the most 'accumulated height' among all slots
|
|
229
|
+
if (event.rect.top < newTop) {
|
|
230
|
+
event.rect.top = newTop;
|
|
231
|
+
// Consequently, all previously renderd events (after that multi-span event) need to
|
|
232
|
+
// be reposition so that they don't overlap
|
|
233
|
+
slotMatch.forEach(slot => {
|
|
234
|
+
const slotKey = slot.id.resourceIndex + ':' + slot.id.rangeIndex + ':' + slot.id.index;
|
|
235
|
+
if (slotKey !== key) {
|
|
236
|
+
slotItems[slotKey].events.forEach((e, index) => {
|
|
237
|
+
if (index > event.item.data[event.resourceIndex].rowIndex) {
|
|
238
|
+
e.rect.top = event.rect.top + event.element.nativeElement.clientHeight + EVENT_SPACING;
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
eventWidth = slotRect.width;
|
|
248
|
+
}
|
|
249
|
+
return eventWidth;
|
|
250
|
+
};
|
|
243
251
|
}
|
|
244
252
|
/**
|
|
245
253
|
* @hidden
|
|
@@ -42,8 +42,8 @@ const packageMetadata = {
|
|
|
42
42
|
name: '@progress/kendo-angular-scheduler',
|
|
43
43
|
productName: 'Kendo UI for Angular',
|
|
44
44
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
45
|
-
publishDate:
|
|
46
|
-
version: '
|
|
45
|
+
publishDate: 1736250094,
|
|
46
|
+
version: '18.0.0-develop.1',
|
|
47
47
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
48
48
|
};
|
|
49
49
|
|
|
@@ -11778,35 +11778,7 @@ let SlotRange$1 = class SlotRange {
|
|
|
11778
11778
|
};
|
|
11779
11779
|
}
|
|
11780
11780
|
// The number of slots an event spans in current group
|
|
11781
|
-
|
|
11782
|
-
if (event.item.isMultiDay) {
|
|
11783
|
-
const slotMatch = this.slots.filter(slot => intersects(event.item.startTime, event.item.endTime, slot.start, slot.end));
|
|
11784
|
-
eventWidth = slotMatch.reduce((acc, currentValue) => acc + currentValue.rect.width + BORDER_WIDTH, 0) - BORDER_WIDTH;
|
|
11785
|
-
if (prevEvent) {
|
|
11786
|
-
const newHeight = prevEvent.element.nativeElement.clientHeight + prevEvent.rect.top;
|
|
11787
|
-
const newTop = newHeight + EVENT_SPACING;
|
|
11788
|
-
// If event is spanning in multiple slots, it needs to be positioned so that its top
|
|
11789
|
-
// is calculated based on the most 'accumulated height' among all slots
|
|
11790
|
-
if (event.rect.top < newTop) {
|
|
11791
|
-
event.rect.top = newTop;
|
|
11792
|
-
// Consequently, all previously renderd events (after that multi-span event) need to
|
|
11793
|
-
// be reposition so that they don't overlap
|
|
11794
|
-
slotMatch.forEach(slot => {
|
|
11795
|
-
const slotKey = slot.id.resourceIndex + ':' + slot.id.rangeIndex + ':' + slot.id.index;
|
|
11796
|
-
if (slotKey !== key) {
|
|
11797
|
-
slotItems[slotKey].events.forEach((e, index) => {
|
|
11798
|
-
if (index > event.item.data[event.resourceIndex].rowIndex) {
|
|
11799
|
-
e.rect.top = event.rect.top + event.element.nativeElement.clientHeight + EVENT_SPACING;
|
|
11800
|
-
}
|
|
11801
|
-
});
|
|
11802
|
-
}
|
|
11803
|
-
});
|
|
11804
|
-
}
|
|
11805
|
-
}
|
|
11806
|
-
}
|
|
11807
|
-
else {
|
|
11808
|
-
eventWidth = slotRect.width;
|
|
11809
|
-
}
|
|
11781
|
+
const eventWidth = this.calculateEventWidth(event, prevEvent, slotItems, key, slotRect);
|
|
11810
11782
|
event.rect.width = eventWidth;
|
|
11811
11783
|
event.element.nativeElement.style.width = event.rect.width + 'px';
|
|
11812
11784
|
event.element.nativeElement.style.height = 'auto';
|
|
@@ -11825,6 +11797,42 @@ let SlotRange$1 = class SlotRange {
|
|
|
11825
11797
|
}
|
|
11826
11798
|
});
|
|
11827
11799
|
}
|
|
11800
|
+
/**
|
|
11801
|
+
* Extracted to a separate method to address SonarQube suggestion:
|
|
11802
|
+
* "Refactor this code to not nest functions more than 4 levels deep"
|
|
11803
|
+
*/
|
|
11804
|
+
calculateEventWidth = (event, prevEvent, slotItems, key, slotRect) => {
|
|
11805
|
+
let eventWidth;
|
|
11806
|
+
if (event.item.isMultiDay) {
|
|
11807
|
+
const slotMatch = this.slots.filter(slot => intersects(event.item.startTime, event.item.endTime, slot.start, slot.end));
|
|
11808
|
+
eventWidth = slotMatch.reduce((acc, currentValue) => acc + currentValue.rect.width + BORDER_WIDTH, 0) - BORDER_WIDTH;
|
|
11809
|
+
if (prevEvent) {
|
|
11810
|
+
const newHeight = prevEvent.element.nativeElement.clientHeight + prevEvent.rect.top;
|
|
11811
|
+
const newTop = newHeight + EVENT_SPACING;
|
|
11812
|
+
// If event is spanning in multiple slots, it needs to be positioned so that its top
|
|
11813
|
+
// is calculated based on the most 'accumulated height' among all slots
|
|
11814
|
+
if (event.rect.top < newTop) {
|
|
11815
|
+
event.rect.top = newTop;
|
|
11816
|
+
// Consequently, all previously renderd events (after that multi-span event) need to
|
|
11817
|
+
// be reposition so that they don't overlap
|
|
11818
|
+
slotMatch.forEach(slot => {
|
|
11819
|
+
const slotKey = slot.id.resourceIndex + ':' + slot.id.rangeIndex + ':' + slot.id.index;
|
|
11820
|
+
if (slotKey !== key) {
|
|
11821
|
+
slotItems[slotKey].events.forEach((e, index) => {
|
|
11822
|
+
if (index > event.item.data[event.resourceIndex].rowIndex) {
|
|
11823
|
+
e.rect.top = event.rect.top + event.element.nativeElement.clientHeight + EVENT_SPACING;
|
|
11824
|
+
}
|
|
11825
|
+
});
|
|
11826
|
+
}
|
|
11827
|
+
});
|
|
11828
|
+
}
|
|
11829
|
+
}
|
|
11830
|
+
}
|
|
11831
|
+
else {
|
|
11832
|
+
eventWidth = slotRect.width;
|
|
11833
|
+
}
|
|
11834
|
+
return eventWidth;
|
|
11835
|
+
};
|
|
11828
11836
|
};
|
|
11829
11837
|
/**
|
|
11830
11838
|
* @hidden
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-scheduler",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.0.0-develop.1",
|
|
4
4
|
"description": "Kendo UI Scheduler Angular - Outlook or Google-style angular scheduler calendar. Full-featured and customizable embedded scheduling from the creator developers trust for professional UI components.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -26,23 +26,23 @@
|
|
|
26
26
|
"@progress/kendo-data-query": "^1.0.0",
|
|
27
27
|
"@progress/kendo-drawing": "^1.21.0",
|
|
28
28
|
"@progress/kendo-licensing": "^1.0.2",
|
|
29
|
-
"@progress/kendo-angular-tooltip": "
|
|
30
|
-
"@progress/kendo-angular-buttons": "
|
|
31
|
-
"@progress/kendo-angular-common": "
|
|
32
|
-
"@progress/kendo-angular-dateinputs": "
|
|
33
|
-
"@progress/kendo-angular-dialog": "
|
|
34
|
-
"@progress/kendo-angular-dropdowns": "
|
|
35
|
-
"@progress/kendo-angular-icons": "
|
|
36
|
-
"@progress/kendo-angular-inputs": "
|
|
37
|
-
"@progress/kendo-angular-intl": "
|
|
38
|
-
"@progress/kendo-angular-l10n": "
|
|
39
|
-
"@progress/kendo-angular-label": "
|
|
40
|
-
"@progress/kendo-angular-popup": "
|
|
29
|
+
"@progress/kendo-angular-tooltip": "18.0.0-develop.1",
|
|
30
|
+
"@progress/kendo-angular-buttons": "18.0.0-develop.1",
|
|
31
|
+
"@progress/kendo-angular-common": "18.0.0-develop.1",
|
|
32
|
+
"@progress/kendo-angular-dateinputs": "18.0.0-develop.1",
|
|
33
|
+
"@progress/kendo-angular-dialog": "18.0.0-develop.1",
|
|
34
|
+
"@progress/kendo-angular-dropdowns": "18.0.0-develop.1",
|
|
35
|
+
"@progress/kendo-angular-icons": "18.0.0-develop.1",
|
|
36
|
+
"@progress/kendo-angular-inputs": "18.0.0-develop.1",
|
|
37
|
+
"@progress/kendo-angular-intl": "18.0.0-develop.1",
|
|
38
|
+
"@progress/kendo-angular-l10n": "18.0.0-develop.1",
|
|
39
|
+
"@progress/kendo-angular-label": "18.0.0-develop.1",
|
|
40
|
+
"@progress/kendo-angular-popup": "18.0.0-develop.1",
|
|
41
41
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"tslib": "^2.3.1",
|
|
45
|
-
"@progress/kendo-angular-schematics": "
|
|
45
|
+
"@progress/kendo-angular-schematics": "18.0.0-develop.1",
|
|
46
46
|
"@progress/kendo-date-math": "^1.3.2",
|
|
47
47
|
"@progress/kendo-draggable": "^3.0.2",
|
|
48
48
|
"@progress/kendo-file-saver": "^1.0.7",
|
|
@@ -4,10 +4,10 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
4
4
|
function default_1(options) {
|
|
5
5
|
const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'SchedulerModule', package: 'scheduler', peerDependencies: {
|
|
6
6
|
// peer deps of the dropdowns
|
|
7
|
-
'@progress/kendo-angular-treeview': '
|
|
8
|
-
'@progress/kendo-angular-navigation': '
|
|
7
|
+
'@progress/kendo-angular-treeview': '18.0.0-develop.1',
|
|
8
|
+
'@progress/kendo-angular-navigation': '18.0.0-develop.1',
|
|
9
9
|
// peer dependency of kendo-angular-inputs
|
|
10
|
-
'@progress/kendo-angular-dialog': '
|
|
10
|
+
'@progress/kendo-angular-dialog': '18.0.0-develop.1',
|
|
11
11
|
// peer dependency of kendo-angular-icons
|
|
12
12
|
'@progress/kendo-svg-icons': '^4.0.0'
|
|
13
13
|
} });
|
|
@@ -28,6 +28,11 @@ export declare class SlotRange {
|
|
|
28
28
|
unregisterSlot(slot: any): void;
|
|
29
29
|
layout(eventHeight: number | 'auto', eventsPerDay: number | 'auto', adaptiveSlotHeight: boolean): void;
|
|
30
30
|
private renderAutoHeightEvents;
|
|
31
|
+
/**
|
|
32
|
+
* Extracted to a separate method to address SonarQube suggestion:
|
|
33
|
+
* "Refactor this code to not nest functions more than 4 levels deep"
|
|
34
|
+
*/
|
|
35
|
+
private calculateEventWidth;
|
|
31
36
|
}
|
|
32
37
|
/**
|
|
33
38
|
* @hidden
|