@progress/kendo-angular-scheduler 23.2.1-develop.1 → 23.2.1-develop.2
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.
|
@@ -44,7 +44,7 @@ const packageMetadata = {
|
|
|
44
44
|
productCode: 'KENDOUIANGULAR',
|
|
45
45
|
productCodes: ['KENDOUIANGULAR'],
|
|
46
46
|
publishDate: 0,
|
|
47
|
-
version: '23.2.1-develop.
|
|
47
|
+
version: '23.2.1-develop.2',
|
|
48
48
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
49
49
|
};
|
|
50
50
|
|
|
@@ -2790,6 +2790,12 @@ function resourcesMatch(res1, res2, resourceConfigs) {
|
|
|
2790
2790
|
* @hidden
|
|
2791
2791
|
*/
|
|
2792
2792
|
function isSameRange(range1, range2, resourceConfigs) {
|
|
2793
|
+
if (!range1 && !range2) {
|
|
2794
|
+
return true;
|
|
2795
|
+
}
|
|
2796
|
+
if (!range1 || !range2) {
|
|
2797
|
+
return false;
|
|
2798
|
+
}
|
|
2793
2799
|
return (range1.start.getTime() === range2.start.getTime() &&
|
|
2794
2800
|
range1.end.getTime() === range2.end.getTime() &&
|
|
2795
2801
|
range1.isAllDay === range2.isAllDay &&
|
|
@@ -10318,6 +10324,7 @@ class SlotSelectableDirective {
|
|
|
10318
10324
|
*/
|
|
10319
10325
|
selectionOriginResources;
|
|
10320
10326
|
selectedRange = null;
|
|
10327
|
+
rangeBeforeDrag = null;
|
|
10321
10328
|
slotSelectionChangeSource = new EventEmitter();
|
|
10322
10329
|
subscriptions = new Subscription();
|
|
10323
10330
|
constructor(scheduler, cdr) {
|
|
@@ -10335,20 +10342,27 @@ class SlotSelectableDirective {
|
|
|
10335
10342
|
this.subscriptions.add(startSource.subscribe(e => this.initDragSelect(e)));
|
|
10336
10343
|
this.subscriptions.add(drag$.subscribe(e => this.onDrag(e)));
|
|
10337
10344
|
this.subscriptions.add(end$.subscribe(() => this.onRelease()));
|
|
10345
|
+
this.subscriptions.add(this.scheduler.slotClick.subscribe(e => this.onSlotClick(e)));
|
|
10338
10346
|
}
|
|
10339
10347
|
ngOnInit() {
|
|
10340
10348
|
this.scheduler.isSlotSelected = this.isSlotSelected.bind(this);
|
|
10341
10349
|
}
|
|
10342
10350
|
ngOnChanges(changes) {
|
|
10343
10351
|
if (isChanged("slotSelection", changes, false)) {
|
|
10344
|
-
const
|
|
10345
|
-
|
|
10346
|
-
|
|
10347
|
-
|
|
10348
|
-
|
|
10349
|
-
|
|
10350
|
-
|
|
10351
|
-
|
|
10352
|
+
const currentValue = changes['slotSelection'].currentValue;
|
|
10353
|
+
if (!currentValue) {
|
|
10354
|
+
this.selectedRange = null;
|
|
10355
|
+
}
|
|
10356
|
+
else {
|
|
10357
|
+
const defaults = {
|
|
10358
|
+
isAllDay: false,
|
|
10359
|
+
resources: this.scheduler?.resources ? this.scheduler.resources.reduce((result, resource) => {
|
|
10360
|
+
result.push(...resource.data);
|
|
10361
|
+
return result;
|
|
10362
|
+
}, []) : []
|
|
10363
|
+
};
|
|
10364
|
+
this.selectedRange = Object.assign(defaults, currentValue);
|
|
10365
|
+
}
|
|
10352
10366
|
this.cdr.markForCheck();
|
|
10353
10367
|
}
|
|
10354
10368
|
}
|
|
@@ -10367,6 +10381,7 @@ class SlotSelectableDirective {
|
|
|
10367
10381
|
}
|
|
10368
10382
|
initDragSelect({ start, end, isAllDay, resources }) {
|
|
10369
10383
|
this.selectionOriginResources = resources.slice();
|
|
10384
|
+
this.rangeBeforeDrag = this.selectedRange;
|
|
10370
10385
|
this.selectedRange = { start, end, isAllDay, resources: resources.slice() };
|
|
10371
10386
|
this.cdr.markForCheck();
|
|
10372
10387
|
}
|
|
@@ -10380,11 +10395,23 @@ class SlotSelectableDirective {
|
|
|
10380
10395
|
this.cdr.markForCheck();
|
|
10381
10396
|
}
|
|
10382
10397
|
onRelease() {
|
|
10398
|
+
const hasChanged = !isSameRange(this.rangeBeforeDrag, this.selectedRange, this.scheduler.resources);
|
|
10383
10399
|
this.selectionOriginResources = null;
|
|
10384
|
-
|
|
10400
|
+
this.rangeBeforeDrag = null;
|
|
10401
|
+
if (this.selectedRange && hasChanged) {
|
|
10385
10402
|
this.slotSelectionChangeSource.emit(this.selectedRange);
|
|
10386
10403
|
}
|
|
10387
10404
|
}
|
|
10405
|
+
onSlotClick({ start, end, isAllDay, resources }) {
|
|
10406
|
+
const newRange = { start, end, isAllDay, resources: resources.slice() };
|
|
10407
|
+
const hasChanged = !isSameRange(this.selectedRange, newRange, this.scheduler.resources);
|
|
10408
|
+
if (!hasChanged) {
|
|
10409
|
+
return;
|
|
10410
|
+
}
|
|
10411
|
+
this.selectedRange = newRange;
|
|
10412
|
+
this.cdr.markForCheck();
|
|
10413
|
+
this.slotSelectionChangeSource.emit(this.selectedRange);
|
|
10414
|
+
}
|
|
10388
10415
|
/**
|
|
10389
10416
|
* @hidden
|
|
10390
10417
|
* Checks if the selected range contains a local date range.
|
|
@@ -12619,6 +12646,7 @@ class BaseView {
|
|
|
12619
12646
|
editable;
|
|
12620
12647
|
selectable; // initialized to false in the scheduler component
|
|
12621
12648
|
getField = getField;
|
|
12649
|
+
isSlotSelected = () => false;
|
|
12622
12650
|
changes = new BehaviorSubject(null);
|
|
12623
12651
|
viewRangeChange = new BehaviorSubject(null);
|
|
12624
12652
|
subs = new Subscription();
|
|
@@ -12661,7 +12689,7 @@ class BaseView {
|
|
|
12661
12689
|
scrollInterval;
|
|
12662
12690
|
autoHeight = false;
|
|
12663
12691
|
rtl = false;
|
|
12664
|
-
|
|
12692
|
+
isEventTarget = false;
|
|
12665
12693
|
constructor(viewContext, viewState, intl, slotService, zone, renderer, element, pdfService, localization, cdr, scrollBarWidthService) {
|
|
12666
12694
|
this.viewContext = viewContext;
|
|
12667
12695
|
this.viewState = viewState;
|
|
@@ -12908,15 +12936,15 @@ class BaseView {
|
|
|
12908
12936
|
if (!args.isTouch) {
|
|
12909
12937
|
args.originalEvent.preventDefault();
|
|
12910
12938
|
}
|
|
12911
|
-
this.pressLocation = { x: args.pageX, y: args.pageY };
|
|
12912
12939
|
this.pressTarget = task;
|
|
12913
12940
|
}
|
|
12914
12941
|
}
|
|
12942
|
+
this.pressLocation = { x: args.pageX, y: args.pageY };
|
|
12943
|
+
this.isEventTarget = Boolean(this.targetTask(target));
|
|
12915
12944
|
const notDraggingEvent = !this.pressTarget;
|
|
12916
12945
|
if (notDraggingEvent && this.selectable) {
|
|
12917
12946
|
//fixes https://github.com/telerik/kendo-angular/issues/4446
|
|
12918
12947
|
args.originalEvent.preventDefault();
|
|
12919
|
-
this.initDragSelect(args);
|
|
12920
12948
|
}
|
|
12921
12949
|
this.dragArgs = args;
|
|
12922
12950
|
}
|
|
@@ -12932,6 +12960,13 @@ class BaseView {
|
|
|
12932
12960
|
args.originalEvent.preventDefault();
|
|
12933
12961
|
this.scrollContainer(this.drag, args);
|
|
12934
12962
|
}
|
|
12963
|
+
const hasMovedMinDistance = this.pressLocation && pointDistance(this.pressLocation.x, this.pressLocation.y, args.pageX, args.pageY) >= MIN_MOVE_DISTANCE;
|
|
12964
|
+
const canStartDragSelection = !this.isEventTarget && !this.dragSelecting && this.selectable;
|
|
12965
|
+
if (canStartDragSelection && hasMovedMinDistance) {
|
|
12966
|
+
args.pageX = this.pressLocation.x;
|
|
12967
|
+
args.pageY = this.pressLocation.y;
|
|
12968
|
+
this.initDragSelect(args);
|
|
12969
|
+
}
|
|
12935
12970
|
if (this.dragSelecting) {
|
|
12936
12971
|
this.dragSelect(args);
|
|
12937
12972
|
}
|
|
@@ -12985,6 +13020,7 @@ class BaseView {
|
|
|
12985
13020
|
this.dragArgs = null;
|
|
12986
13021
|
this.pressLocation = null;
|
|
12987
13022
|
this.pressTarget = null;
|
|
13023
|
+
this.isEventTarget = false;
|
|
12988
13024
|
}
|
|
12989
13025
|
setHintClass(className) {
|
|
12990
13026
|
(this.dragging || this.resizing).hintClass = className;
|
|
@@ -13021,11 +13057,13 @@ class BaseView {
|
|
|
13021
13057
|
return this.dragging ? this.dragHints : this.resizeHints;
|
|
13022
13058
|
}
|
|
13023
13059
|
initDrag(args) {
|
|
13024
|
-
|
|
13060
|
+
const hasPressTarget = this.pressTarget && this.pressLocation;
|
|
13061
|
+
const hasMovedMinDistance = hasPressTarget && pointDistance(this.pressLocation.x, this.pressLocation.y, args.pageX, args.pageY) >= MIN_MOVE_DISTANCE;
|
|
13062
|
+
const canStartDrag = !this.dragging && hasPressTarget && hasMovedMinDistance;
|
|
13063
|
+
if (canStartDrag) {
|
|
13025
13064
|
const dragging = this.pressTarget;
|
|
13026
13065
|
const task = dragging.task;
|
|
13027
13066
|
if (this.emitEvent('dragStart', { event: task.event, dataItem: task.event.dataItem })) {
|
|
13028
|
-
this.pressLocation = null;
|
|
13029
13067
|
this.pressTarget = null;
|
|
13030
13068
|
return;
|
|
13031
13069
|
}
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = {
|
|
|
7
7
|
"productCodes": [
|
|
8
8
|
"KENDOUIANGULAR"
|
|
9
9
|
],
|
|
10
|
-
"publishDate":
|
|
11
|
-
"version": "23.2.1-develop.
|
|
10
|
+
"publishDate": 1772441522,
|
|
11
|
+
"version": "23.2.1-develop.2",
|
|
12
12
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
13
13
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-scheduler",
|
|
3
|
-
"version": "23.2.1-develop.
|
|
3
|
+
"version": "23.2.1-develop.2",
|
|
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",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"package": {
|
|
20
20
|
"productName": "Kendo UI for Angular",
|
|
21
21
|
"productCode": "KENDOUIANGULAR",
|
|
22
|
-
"publishDate":
|
|
22
|
+
"publishDate": 1772441522,
|
|
23
23
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
@@ -32,23 +32,23 @@
|
|
|
32
32
|
"@progress/kendo-data-query": "^1.7.3",
|
|
33
33
|
"@progress/kendo-drawing": "^1.24.0",
|
|
34
34
|
"@progress/kendo-licensing": "^1.10.0",
|
|
35
|
-
"@progress/kendo-angular-tooltip": "23.2.1-develop.
|
|
36
|
-
"@progress/kendo-angular-buttons": "23.2.1-develop.
|
|
37
|
-
"@progress/kendo-angular-common": "23.2.1-develop.
|
|
38
|
-
"@progress/kendo-angular-dateinputs": "23.2.1-develop.
|
|
39
|
-
"@progress/kendo-angular-dialog": "23.2.1-develop.
|
|
40
|
-
"@progress/kendo-angular-dropdowns": "23.2.1-develop.
|
|
41
|
-
"@progress/kendo-angular-icons": "23.2.1-develop.
|
|
42
|
-
"@progress/kendo-angular-inputs": "23.2.1-develop.
|
|
43
|
-
"@progress/kendo-angular-intl": "23.2.1-develop.
|
|
44
|
-
"@progress/kendo-angular-l10n": "23.2.1-develop.
|
|
45
|
-
"@progress/kendo-angular-label": "23.2.1-develop.
|
|
46
|
-
"@progress/kendo-angular-popup": "23.2.1-develop.
|
|
35
|
+
"@progress/kendo-angular-tooltip": "23.2.1-develop.2",
|
|
36
|
+
"@progress/kendo-angular-buttons": "23.2.1-develop.2",
|
|
37
|
+
"@progress/kendo-angular-common": "23.2.1-develop.2",
|
|
38
|
+
"@progress/kendo-angular-dateinputs": "23.2.1-develop.2",
|
|
39
|
+
"@progress/kendo-angular-dialog": "23.2.1-develop.2",
|
|
40
|
+
"@progress/kendo-angular-dropdowns": "23.2.1-develop.2",
|
|
41
|
+
"@progress/kendo-angular-icons": "23.2.1-develop.2",
|
|
42
|
+
"@progress/kendo-angular-inputs": "23.2.1-develop.2",
|
|
43
|
+
"@progress/kendo-angular-intl": "23.2.1-develop.2",
|
|
44
|
+
"@progress/kendo-angular-l10n": "23.2.1-develop.2",
|
|
45
|
+
"@progress/kendo-angular-label": "23.2.1-develop.2",
|
|
46
|
+
"@progress/kendo-angular-popup": "23.2.1-develop.2",
|
|
47
47
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"tslib": "^2.3.1",
|
|
51
|
-
"@progress/kendo-angular-schematics": "23.2.1-develop.
|
|
51
|
+
"@progress/kendo-angular-schematics": "23.2.1-develop.2",
|
|
52
52
|
"@progress/kendo-date-math": "^1.3.2",
|
|
53
53
|
"@progress/kendo-draggable": "^3.0.2",
|
|
54
54
|
"@progress/kendo-file-saver": "^1.0.7",
|
|
@@ -9,10 +9,10 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
9
9
|
function default_1(options) {
|
|
10
10
|
const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'SchedulerModule', package: 'scheduler', peerDependencies: {
|
|
11
11
|
// peer deps of the dropdowns
|
|
12
|
-
'@progress/kendo-angular-treeview': '23.2.1-develop.
|
|
13
|
-
'@progress/kendo-angular-navigation': '23.2.1-develop.
|
|
12
|
+
'@progress/kendo-angular-treeview': '23.2.1-develop.2',
|
|
13
|
+
'@progress/kendo-angular-navigation': '23.2.1-develop.2',
|
|
14
14
|
// peer dependency of kendo-angular-inputs
|
|
15
|
-
'@progress/kendo-angular-dialog': '23.2.1-develop.
|
|
15
|
+
'@progress/kendo-angular-dialog': '23.2.1-develop.2',
|
|
16
16
|
// peer dependency of kendo-angular-icons
|
|
17
17
|
'@progress/kendo-svg-icons': '^4.0.0'
|
|
18
18
|
} });
|
|
@@ -63,6 +63,7 @@ export declare abstract class BaseView implements OnInit, OnChanges, AfterViewIn
|
|
|
63
63
|
editable: any;
|
|
64
64
|
selectable: boolean;
|
|
65
65
|
getField: any;
|
|
66
|
+
isSlotSelected: SlotSelectionCallback;
|
|
66
67
|
protected changes: BehaviorSubject<any>;
|
|
67
68
|
protected viewRangeChange: BehaviorSubject<any>;
|
|
68
69
|
protected subs: Subscription;
|
|
@@ -105,7 +106,7 @@ export declare abstract class BaseView implements OnInit, OnChanges, AfterViewIn
|
|
|
105
106
|
protected scrollInterval: any;
|
|
106
107
|
protected autoHeight: boolean;
|
|
107
108
|
protected rtl: boolean;
|
|
108
|
-
|
|
109
|
+
private isEventTarget;
|
|
109
110
|
constructor(viewContext: ViewContextService, viewState: ViewStateService, intl: IntlService, slotService: BaseSlotService, zone: NgZone, renderer: Renderer2, element: ElementRef, pdfService: PDFService, localization: LocalizationService, cdr: ChangeDetectorRef, scrollBarWidthService: ScrollbarWidthService);
|
|
110
111
|
/**
|
|
111
112
|
* Generates a list of space-separated IDs based on a collection of items to associate scrollable containers
|
|
@@ -40,6 +40,7 @@ export declare class SlotSelectableDirective implements OnInit, OnChanges, OnDes
|
|
|
40
40
|
*/
|
|
41
41
|
private selectionOriginResources;
|
|
42
42
|
private selectedRange;
|
|
43
|
+
private rangeBeforeDrag;
|
|
43
44
|
private slotSelectionChangeSource;
|
|
44
45
|
private subscriptions;
|
|
45
46
|
constructor(scheduler: SchedulerComponent, cdr: ChangeDetectorRef);
|
|
@@ -50,6 +51,7 @@ export declare class SlotSelectableDirective implements OnInit, OnChanges, OnDes
|
|
|
50
51
|
private initDragSelect;
|
|
51
52
|
private onDrag;
|
|
52
53
|
private onRelease;
|
|
54
|
+
private onSlotClick;
|
|
53
55
|
/**
|
|
54
56
|
* @hidden
|
|
55
57
|
* Checks if the selected range contains a local date range.
|