@progress/kendo-angular-scheduler 2.2.0-dev.202111260859 → 3.0.1-dev.202202071010
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/dist/cdn/js/kendo-angular-scheduler.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/editing/date-time-picker.component.js +2 -1
- package/dist/es/editing/edit-dialog.component.js +1 -1
- package/dist/es/editing/recurrence/end-rule-radio-button.directive.js +5 -0
- package/dist/es/editing/recurrence/recurrence-monthly-yearly-editor.component.js +1 -1
- package/dist/es/editing/recurrence/repeat-on-radio-button.directive.js +5 -0
- package/dist/es/events/slot-drag-end-event.js +17 -0
- package/dist/es/events/slot-drag-event.js +18 -0
- package/dist/es/events/slot-drag-start-event.js +24 -0
- package/dist/es/events.js +3 -0
- package/dist/es/index.js +1 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/scheduler.component.js +73 -1
- package/dist/es/scheduler.module.js +5 -1
- package/dist/es/toolbar/view-selector.component.js +1 -1
- package/dist/es/types/slot-selection.js +23 -0
- package/dist/es/types.js +1 -0
- package/dist/es/views/common/base-view.js +103 -8
- package/dist/es/views/common/slot-selectable.directive.js +117 -0
- package/dist/es/views/common/view-footer.component.js +1 -1
- package/dist/es/views/common/views-shared.module.js +2 -1
- package/dist/es/views/day-time/day-time-view.component.js +1 -1
- package/dist/es/views/day-time/day-time.module.js +2 -1
- package/dist/es/views/month/month-view-renderer.component.js +9 -5
- package/dist/es/views/multi-day/multi-day-view-renderer.component.js +3 -3
- package/dist/es/views/timeline/timeline-multi-day-view.component.js +1 -1
- package/dist/es/views/utils.js +49 -0
- package/dist/es/views/view-state.service.js +18 -0
- package/dist/es2015/editing/date-time-picker.component.js +7 -1
- package/dist/es2015/editing/edit-dialog.component.js +7 -7
- package/dist/es2015/editing/recurrence/end-rule-radio-button.directive.d.ts +1 -0
- package/dist/es2015/editing/recurrence/end-rule-radio-button.directive.js +5 -0
- package/dist/es2015/editing/recurrence/recurrence-monthly-yearly-editor.component.js +14 -5
- package/dist/es2015/editing/recurrence/repeat-on-radio-button.directive.d.ts +1 -0
- package/dist/es2015/editing/recurrence/repeat-on-radio-button.directive.js +5 -0
- package/dist/es2015/events/slot-drag-end-event.d.ts +10 -0
- package/dist/es2015/events/slot-drag-end-event.js +10 -0
- package/dist/es2015/events/slot-drag-event.d.ts +39 -0
- package/dist/es2015/events/slot-drag-event.js +16 -0
- package/dist/es2015/events/slot-drag-start-event.d.ts +41 -0
- package/dist/es2015/events/slot-drag-start-event.js +19 -0
- package/dist/es2015/events.d.ts +3 -0
- package/dist/es2015/events.js +3 -0
- package/dist/es2015/index.d.ts +2 -0
- package/dist/es2015/index.js +1 -0
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/scheduler.component.d.ts +27 -0
- package/dist/es2015/scheduler.component.js +73 -1
- package/dist/es2015/scheduler.module.js +5 -1
- package/dist/es2015/toolbar/view-selector.component.js +1 -1
- package/dist/es2015/types/datepicker-options.interface.d.ts +5 -5
- package/dist/es2015/types/slot-selection.d.ts +71 -0
- package/dist/es2015/types/slot-selection.js +19 -0
- package/dist/es2015/types.d.ts +2 -0
- package/dist/es2015/types.js +1 -0
- package/dist/es2015/views/common/base-view.d.ts +26 -5
- package/dist/es2015/views/common/base-view.js +103 -8
- package/dist/es2015/views/common/slot-selectable.directive.d.ts +45 -0
- package/dist/es2015/views/common/slot-selectable.directive.js +112 -0
- package/dist/es2015/views/common/view-footer.component.js +1 -1
- package/dist/es2015/views/common/views-shared.module.js +2 -1
- package/dist/es2015/views/day-time/day-time-view.component.js +1 -1
- package/dist/es2015/views/day-time/day-time.module.js +2 -1
- package/dist/es2015/views/month/month-view-renderer.component.d.ts +3 -2
- package/dist/es2015/views/month/month-view-renderer.component.js +17 -7
- package/dist/es2015/views/multi-day/multi-day-view-renderer.component.d.ts +1 -1
- package/dist/es2015/views/multi-day/multi-day-view-renderer.component.js +22 -4
- package/dist/es2015/views/timeline/timeline-multi-day-view.component.js +8 -1
- package/dist/es2015/views/utils.d.ts +29 -0
- package/dist/es2015/views/utils.js +49 -0
- package/dist/es2015/views/view-state.service.d.ts +24 -1
- package/dist/es2015/views/view-state.service.js +18 -0
- package/dist/fesm2015/index.js +1674 -1231
- package/dist/fesm5/index.js +1803 -1388
- package/dist/npm/editing/date-time-picker.component.js +2 -1
- package/dist/npm/editing/edit-dialog.component.js +1 -1
- package/dist/npm/editing/recurrence/end-rule-radio-button.directive.js +5 -0
- package/dist/npm/editing/recurrence/recurrence-monthly-yearly-editor.component.js +1 -1
- package/dist/npm/editing/recurrence/repeat-on-radio-button.directive.js +5 -0
- package/dist/npm/events/slot-drag-end-event.js +19 -0
- package/dist/npm/events/slot-drag-event.js +20 -0
- package/dist/npm/events/slot-drag-start-event.js +26 -0
- package/dist/npm/events.js +6 -0
- package/dist/npm/index.js +2 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/scheduler.component.js +73 -1
- package/dist/npm/scheduler.module.js +4 -0
- package/dist/npm/toolbar/view-selector.component.js +1 -1
- package/dist/npm/types/slot-selection.js +25 -0
- package/dist/npm/types.js +2 -0
- package/dist/npm/views/common/base-view.js +102 -7
- package/dist/npm/views/common/slot-selectable.directive.js +119 -0
- package/dist/npm/views/common/view-footer.component.js +1 -1
- package/dist/npm/views/common/views-shared.module.js +2 -1
- package/dist/npm/views/day-time/day-time-view.component.js +1 -1
- package/dist/npm/views/day-time/day-time.module.js +2 -1
- package/dist/npm/views/month/month-view-renderer.component.js +8 -4
- package/dist/npm/views/multi-day/multi-day-view-renderer.component.js +3 -3
- package/dist/npm/views/timeline/timeline-multi-day-view.component.js +1 -1
- package/dist/npm/views/utils.js +53 -0
- package/dist/npm/views/view-state.service.js +18 -0
- package/dist/systemjs/kendo-angular-scheduler.js +1 -1
- package/package.json +27 -24
- package/schematics/ngAdd/index.js +1 -1
|
@@ -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:
|
|
12
|
+
publishDate: 1644228429,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -38,6 +38,10 @@ import { DomEventsService } from './views/common/dom-events.service';
|
|
|
38
38
|
import { CreateEvent } from './events/create-event';
|
|
39
39
|
import { SchedulerEvent } from './types/scheduler-event';
|
|
40
40
|
import { EventKeydownEvent } from './events/event-keydown-event';
|
|
41
|
+
import { IsSlotSelectedArgs } from './types/slot-selection';
|
|
42
|
+
import { SlotDragStartEvent } from './events/slot-drag-start-event';
|
|
43
|
+
import { SlotDragEvent } from './events/slot-drag-event';
|
|
44
|
+
import { SlotDragEndEvent } from './events/slot-drag-end-event';
|
|
41
45
|
/**
|
|
42
46
|
* Represents the [Kendo UI Scheduler component for Angular]({% slug overview_scheduler %}).
|
|
43
47
|
*
|
|
@@ -85,6 +89,12 @@ export declare class SchedulerComponent implements AfterContentInit, OnDestroy,
|
|
|
85
89
|
* Specifies if the Scheduler is editable.
|
|
86
90
|
*/
|
|
87
91
|
editable: boolean | EditableSettings;
|
|
92
|
+
/**
|
|
93
|
+
* Specifies if the Scheduler's day or time slots are selectable ([see example]({% slug slotselection_scheduler %}#toc-custom-callback)).
|
|
94
|
+
*
|
|
95
|
+
* When this input is set to `true`, the Scheduler component will emit [`slotDragStart`]({% slug api_scheduler_schedulercomponent %}#toc-slotdragstart), [`slotDrag`]({% slug api_scheduler_schedulercomponent %}#toc-slotdrag), and [`slotDragEnd`]({% slug api_scheduler_schedulercomponent %}#toc-slotdragend) events upon user interaction.
|
|
96
|
+
*/
|
|
97
|
+
selectable: boolean;
|
|
88
98
|
/**
|
|
89
99
|
* The minimum date that can be selected by using the navigation of the Scheduler.
|
|
90
100
|
*/
|
|
@@ -323,6 +333,11 @@ export declare class SchedulerComponent implements AfterContentInit, OnDestroy,
|
|
|
323
333
|
* ```
|
|
324
334
|
*/
|
|
325
335
|
eventStyles: (args: EventStyleArgs) => any;
|
|
336
|
+
/**
|
|
337
|
+
* A callback that executes for each slot of the Scheduler view.
|
|
338
|
+
* If it returns `true`, the `k-state-selected` CSS class will be added to the cell, making it visibly selected.
|
|
339
|
+
*/
|
|
340
|
+
isSlotSelected: (args: IsSlotSelectedArgs) => boolean;
|
|
326
341
|
/**
|
|
327
342
|
* @hidden
|
|
328
343
|
*/
|
|
@@ -397,6 +412,18 @@ export declare class SchedulerComponent implements AfterContentInit, OnDestroy,
|
|
|
397
412
|
* Fires when the user stops dragging a Scheduler event.
|
|
398
413
|
*/
|
|
399
414
|
dragEnd: EventEmitter<DragEndEvent>;
|
|
415
|
+
/**
|
|
416
|
+
* Fires when the user starts drag-selecting a Scheduler slot range.
|
|
417
|
+
*/
|
|
418
|
+
slotDragStart: EventEmitter<SlotDragStartEvent>;
|
|
419
|
+
/**
|
|
420
|
+
* Fires when the user is drag-selecting a Scheduler slot range.
|
|
421
|
+
*/
|
|
422
|
+
slotDrag: EventEmitter<SlotDragEvent>;
|
|
423
|
+
/**
|
|
424
|
+
* Fires when the user stops drag-selecting a Scheduler slot range.
|
|
425
|
+
*/
|
|
426
|
+
slotDragEnd: EventEmitter<SlotDragEndEvent>;
|
|
400
427
|
/**
|
|
401
428
|
* Fires when the user clicks the **PDF export** command button.
|
|
402
429
|
*/
|
|
@@ -42,6 +42,9 @@ import { LoadingComponent } from './loading.component';
|
|
|
42
42
|
import { FocusService } from './navigation';
|
|
43
43
|
import { DomEventsService } from './views/common/dom-events.service';
|
|
44
44
|
import { closest } from './common/dom-queries';
|
|
45
|
+
import { alwaysFalse } from './views/utils';
|
|
46
|
+
import { SlotDragEvent } from './events/slot-drag-event';
|
|
47
|
+
import { SlotDragEndEvent } from './events/slot-drag-end-event';
|
|
45
48
|
const todayDate = () => getDate(new Date());
|
|
46
49
|
const ɵ0 = todayDate;
|
|
47
50
|
const DAYS_IN_WEEK = 7;
|
|
@@ -85,6 +88,12 @@ let SchedulerComponent = class SchedulerComponent {
|
|
|
85
88
|
* Specifies if the Scheduler is editable.
|
|
86
89
|
*/
|
|
87
90
|
this.editable = false;
|
|
91
|
+
/**
|
|
92
|
+
* Specifies if the Scheduler's day or time slots are selectable ([see example]({% slug slotselection_scheduler %}#toc-custom-callback)).
|
|
93
|
+
*
|
|
94
|
+
* When this input is set to `true`, the Scheduler component will emit [`slotDragStart`]({% slug api_scheduler_schedulercomponent %}#toc-slotdragstart), [`slotDrag`]({% slug api_scheduler_schedulercomponent %}#toc-slotdrag), and [`slotDragEnd`]({% slug api_scheduler_schedulercomponent %}#toc-slotdragend) events upon user interaction.
|
|
95
|
+
*/
|
|
96
|
+
this.selectable = false;
|
|
88
97
|
/**
|
|
89
98
|
* The height of the events in the **Month** and **Timeline** views, and the height of the **All day** events in the **Day** and **Week** views.
|
|
90
99
|
*/
|
|
@@ -136,6 +145,11 @@ let SchedulerComponent = class SchedulerComponent {
|
|
|
136
145
|
* Specifies the Scheduler current time marker settings.
|
|
137
146
|
*/
|
|
138
147
|
this.currentTimeMarker = true;
|
|
148
|
+
/**
|
|
149
|
+
* A callback that executes for each slot of the Scheduler view.
|
|
150
|
+
* If it returns `true`, the `k-state-selected` CSS class will be added to the cell, making it visibly selected.
|
|
151
|
+
*/
|
|
152
|
+
this.isSlotSelected = alwaysFalse;
|
|
139
153
|
/**
|
|
140
154
|
* @hidden
|
|
141
155
|
*/
|
|
@@ -210,6 +224,18 @@ let SchedulerComponent = class SchedulerComponent {
|
|
|
210
224
|
* Fires when the user stops dragging a Scheduler event.
|
|
211
225
|
*/
|
|
212
226
|
this.dragEnd = new EventEmitter();
|
|
227
|
+
/**
|
|
228
|
+
* Fires when the user starts drag-selecting a Scheduler slot range.
|
|
229
|
+
*/
|
|
230
|
+
this.slotDragStart = new EventEmitter();
|
|
231
|
+
/**
|
|
232
|
+
* Fires when the user is drag-selecting a Scheduler slot range.
|
|
233
|
+
*/
|
|
234
|
+
this.slotDrag = new EventEmitter();
|
|
235
|
+
/**
|
|
236
|
+
* Fires when the user stops drag-selecting a Scheduler slot range.
|
|
237
|
+
*/
|
|
238
|
+
this.slotDragEnd = new EventEmitter();
|
|
213
239
|
/**
|
|
214
240
|
* Fires when the user clicks the **PDF export** command button.
|
|
215
241
|
*/
|
|
@@ -367,6 +393,30 @@ let SchedulerComponent = class SchedulerComponent {
|
|
|
367
393
|
this.resizeSensor.acceptSize();
|
|
368
394
|
}
|
|
369
395
|
}));
|
|
396
|
+
this.subs.add(this.viewState.slotSelectionStart
|
|
397
|
+
.subscribe((e) => {
|
|
398
|
+
if (hasObservers(this.slotDragStart)) {
|
|
399
|
+
this.zone.run(() => {
|
|
400
|
+
this.slotDragStart.emit(Object.assign(e, { sender: this }));
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
}));
|
|
404
|
+
this.subs.add(this.viewState.slotSelectionDrag
|
|
405
|
+
.subscribe((value) => {
|
|
406
|
+
if (hasObservers(this.slotDrag)) {
|
|
407
|
+
this.zone.run(() => {
|
|
408
|
+
this.slotDrag.emit(new SlotDragEvent(this, value));
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
}));
|
|
412
|
+
this.subs.add(this.viewState.slotSelectionEnd
|
|
413
|
+
.subscribe((value) => {
|
|
414
|
+
if (hasObservers(this.slotDragEnd)) {
|
|
415
|
+
this.zone.run(() => {
|
|
416
|
+
this.slotDragEnd.emit(new SlotDragEndEvent(this, value));
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
}));
|
|
370
420
|
this.onViewIndexChange();
|
|
371
421
|
this.notifyOptionsChange = this.notifyOptionsChange.bind(this);
|
|
372
422
|
this.subs.add(this.allDayEventTemplate.changes.subscribe(this.notifyOptionsChange));
|
|
@@ -416,7 +466,7 @@ let SchedulerComponent = class SchedulerComponent {
|
|
|
416
466
|
if (anyChanged([
|
|
417
467
|
'group', 'resources', 'min', 'max', 'showWorkHours', 'startTime', 'scrollTime', 'endTime', 'eventHeight',
|
|
418
468
|
'workDayStart', 'workDayEnd', 'workWeekStart', 'workWeekEnd', 'weekStart', 'slotDuration', 'slotDivisions',
|
|
419
|
-
'editable', 'timezone', 'slotClass', 'slotFill', 'columnWidth', 'eventClass', 'eventStyles'
|
|
469
|
+
'editable', 'timezone', 'slotClass', 'slotFill', 'columnWidth', 'eventClass', 'eventStyles', 'isSlotSelected', 'selectable'
|
|
420
470
|
], changes)) {
|
|
421
471
|
this.notifyOptionsChange(changes);
|
|
422
472
|
}
|
|
@@ -663,6 +713,7 @@ let SchedulerComponent = class SchedulerComponent {
|
|
|
663
713
|
slotDivisions: this.slotDivisions,
|
|
664
714
|
eventHeight: this.eventHeight,
|
|
665
715
|
editable: this.editable,
|
|
716
|
+
selectable: this.selectable,
|
|
666
717
|
timezone: this.timezone,
|
|
667
718
|
currentTimeMarker: this.currentTimeMarker,
|
|
668
719
|
slotClass: this.slotClass,
|
|
@@ -670,6 +721,7 @@ let SchedulerComponent = class SchedulerComponent {
|
|
|
670
721
|
columnWidth: this.columnWidth,
|
|
671
722
|
eventClass: this.eventClass,
|
|
672
723
|
eventStyles: this.eventStyles,
|
|
724
|
+
isSlotSelected: this.isSlotSelected,
|
|
673
725
|
changes: changes
|
|
674
726
|
});
|
|
675
727
|
}
|
|
@@ -818,6 +870,10 @@ tslib_1.__decorate([
|
|
|
818
870
|
Input(),
|
|
819
871
|
tslib_1.__metadata("design:type", Object)
|
|
820
872
|
], SchedulerComponent.prototype, "editable", void 0);
|
|
873
|
+
tslib_1.__decorate([
|
|
874
|
+
Input(),
|
|
875
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
876
|
+
], SchedulerComponent.prototype, "selectable", void 0);
|
|
821
877
|
tslib_1.__decorate([
|
|
822
878
|
Input(),
|
|
823
879
|
tslib_1.__metadata("design:type", Date)
|
|
@@ -931,6 +987,10 @@ tslib_1.__decorate([
|
|
|
931
987
|
Input(),
|
|
932
988
|
tslib_1.__metadata("design:type", Function)
|
|
933
989
|
], SchedulerComponent.prototype, "eventStyles", void 0);
|
|
990
|
+
tslib_1.__decorate([
|
|
991
|
+
Input(),
|
|
992
|
+
tslib_1.__metadata("design:type", Function)
|
|
993
|
+
], SchedulerComponent.prototype, "isSlotSelected", void 0);
|
|
934
994
|
tslib_1.__decorate([
|
|
935
995
|
Output(),
|
|
936
996
|
tslib_1.__metadata("design:type", EventEmitter)
|
|
@@ -1003,6 +1063,18 @@ tslib_1.__decorate([
|
|
|
1003
1063
|
Output(),
|
|
1004
1064
|
tslib_1.__metadata("design:type", EventEmitter)
|
|
1005
1065
|
], SchedulerComponent.prototype, "dragEnd", void 0);
|
|
1066
|
+
tslib_1.__decorate([
|
|
1067
|
+
Output(),
|
|
1068
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
1069
|
+
], SchedulerComponent.prototype, "slotDragStart", void 0);
|
|
1070
|
+
tslib_1.__decorate([
|
|
1071
|
+
Output(),
|
|
1072
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
1073
|
+
], SchedulerComponent.prototype, "slotDrag", void 0);
|
|
1074
|
+
tslib_1.__decorate([
|
|
1075
|
+
Output(),
|
|
1076
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
1077
|
+
], SchedulerComponent.prototype, "slotDragEnd", void 0);
|
|
1006
1078
|
tslib_1.__decorate([
|
|
1007
1079
|
Output(),
|
|
1008
1080
|
tslib_1.__metadata("design:type", EventEmitter)
|
|
@@ -35,7 +35,7 @@ import { EditDialogComponent } from './editing/edit-dialog.component';
|
|
|
35
35
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
36
36
|
import { ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
37
37
|
import { DateInputsModule } from '@progress/kendo-angular-dateinputs';
|
|
38
|
-
import { NumericTextBoxModule, TextBoxModule } from '@progress/kendo-angular-inputs';
|
|
38
|
+
import { CheckBoxModule, NumericTextBoxModule, TextAreaModule, TextBoxModule } from '@progress/kendo-angular-inputs';
|
|
39
39
|
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
|
|
40
40
|
import { SchedulerDateTimePickerComponent } from './editing/date-time-picker.component';
|
|
41
41
|
import { RecurrenceEditorComponent } from './editing/recurrence/recurrence-editor.component';
|
|
@@ -55,6 +55,7 @@ import { EditDialogTemplateDirective } from './editing/edit-dialog-template.dire
|
|
|
55
55
|
import { LoadingComponent } from './loading.component';
|
|
56
56
|
import { SharedModule } from './shared.module';
|
|
57
57
|
import { ShortcutsDirective } from './navigation/shortcuts.directive';
|
|
58
|
+
import { SlotSelectableDirective } from './views/common/slot-selectable.directive';
|
|
58
59
|
const TEMPLATES = [
|
|
59
60
|
AgendaDateTemplateDirective,
|
|
60
61
|
AgendaTimeTemplateDirective,
|
|
@@ -75,6 +76,7 @@ const declarations = [
|
|
|
75
76
|
DataBindingDirective,
|
|
76
77
|
ShortcutsDirective,
|
|
77
78
|
ReactiveEditingDirective,
|
|
79
|
+
SlotSelectableDirective,
|
|
78
80
|
SchedulerDateTimePickerComponent,
|
|
79
81
|
RecurrenceEditorComponent,
|
|
80
82
|
RecurrenceEndRuleEditorComponent,
|
|
@@ -106,6 +108,8 @@ const publicDirectives = [
|
|
|
106
108
|
];
|
|
107
109
|
const importedKendoModules = [
|
|
108
110
|
ButtonsModule,
|
|
111
|
+
CheckBoxModule,
|
|
112
|
+
TextAreaModule,
|
|
109
113
|
DateInputsModule,
|
|
110
114
|
DialogModule,
|
|
111
115
|
NumericTextBoxModule,
|
|
@@ -77,7 +77,7 @@ ToolbarViewSelectorComponent = tslib_1.__decorate([
|
|
|
77
77
|
template: `
|
|
78
78
|
<select *ngIf="ctx.views?.length > 1"
|
|
79
79
|
(change)="onChange($event)"
|
|
80
|
-
class="k-views-dropdown k-
|
|
80
|
+
class="k-views-dropdown k-picker-md k-rounded-md k-picker-solid k-dropdownlist k-picker">
|
|
81
81
|
<option *ngFor="let view of ctx.views"
|
|
82
82
|
[selected]="isSelected(view) == true"
|
|
83
83
|
[value]="view.name"
|
|
@@ -10,7 +10,7 @@ import { Day } from '@progress/kendo-date-math';
|
|
|
10
10
|
export interface DatePickerOptions {
|
|
11
11
|
/**
|
|
12
12
|
* Defines the active view that the Calendar initially renders
|
|
13
|
-
* ([see example]({% slug
|
|
13
|
+
* ([see example]({% slug calendar_type_datepicker %}#toc-active-view)).
|
|
14
14
|
* By default, the active view is `month`.
|
|
15
15
|
*
|
|
16
16
|
* > You have to set `activeView` within the `topView`-`bottomView` range.
|
|
@@ -18,7 +18,7 @@ export interface DatePickerOptions {
|
|
|
18
18
|
activeView?: CalendarView;
|
|
19
19
|
/**
|
|
20
20
|
* Defines the bottommost Calendar view to which the user can navigate
|
|
21
|
-
* ([see example]({% slug
|
|
21
|
+
* ([see example]({% slug calendar_type_datepicker %}#toc-focused-dates)).
|
|
22
22
|
*/
|
|
23
23
|
bottomView?: CalendarView;
|
|
24
24
|
/**
|
|
@@ -29,7 +29,7 @@ export interface DatePickerOptions {
|
|
|
29
29
|
disabledDatesValidation?: boolean;
|
|
30
30
|
/**
|
|
31
31
|
* Specifies the focused date of the Calendar component
|
|
32
|
-
* ([see example]({% slug
|
|
32
|
+
* ([see example]({% slug calendar_type_datepicker %}#toc-focused-dates)).
|
|
33
33
|
*/
|
|
34
34
|
focusedDate?: Date;
|
|
35
35
|
/**
|
|
@@ -82,12 +82,12 @@ export interface DatePickerOptions {
|
|
|
82
82
|
title?: string;
|
|
83
83
|
/**
|
|
84
84
|
* Defines the topmost Calendar view to which the user can navigate
|
|
85
|
-
* ([see example]({% slug
|
|
85
|
+
* ([see example]({% slug calendar_type_datepicker %}#toc-focused-dates)).
|
|
86
86
|
*/
|
|
87
87
|
topView?: CalendarView;
|
|
88
88
|
/**
|
|
89
89
|
* Determines whether to display a week number column in the `month` view of the Calendar
|
|
90
|
-
* ([see example]({% slug
|
|
90
|
+
* ([see example]({% slug calendar_type_datepicker %}#toc-week-number-column)).
|
|
91
91
|
*/
|
|
92
92
|
weekNumber?: boolean;
|
|
93
93
|
/**
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
/**
|
|
6
|
+
* @hidden
|
|
7
|
+
*
|
|
8
|
+
* A callback that executes for each visible slot of the Scheduler component.
|
|
9
|
+
* If it returns `true`, the `k-state-selected` CSS class will be added to the cell, making it visibly selected.
|
|
10
|
+
*/
|
|
11
|
+
export declare type SlotSelectionCallback = (args: IsSlotSelectedArgs) => boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The arguments for the [`isSlotSelected`]({% slug api_scheduler_schedulercomponent %}#toc-isslotselected) callback.
|
|
14
|
+
*/
|
|
15
|
+
export declare class IsSlotSelectedArgs implements SlotRange {
|
|
16
|
+
/**
|
|
17
|
+
* The start date of the slot.
|
|
18
|
+
*/
|
|
19
|
+
start: Date;
|
|
20
|
+
/**
|
|
21
|
+
* The end date of the slot.
|
|
22
|
+
*/
|
|
23
|
+
end: Date;
|
|
24
|
+
/**
|
|
25
|
+
* Indicates if the slot is an all-day slot, or a time slot.
|
|
26
|
+
*/
|
|
27
|
+
isAllDay: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The resources for the slot, if grouping by resource; otherwise all Scheduler resources.
|
|
30
|
+
*/
|
|
31
|
+
resources: any[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Defines a range of regular or all-day slots.
|
|
35
|
+
* Used to describe the selected slots in the [`slotSelectionChange`]({% slug api_scheduler_slotselectabledirective %}#toc-selectionchange) event and to set the selected slots with the [`kendoSchedulerSlotSelectable`]({% slug api_scheduler_slotselectabledirective %}) directive.
|
|
36
|
+
*/
|
|
37
|
+
export interface SlotRange {
|
|
38
|
+
/**
|
|
39
|
+
* The start date of the slot selection.
|
|
40
|
+
*/
|
|
41
|
+
start: Date;
|
|
42
|
+
/**
|
|
43
|
+
* The end date of the slot selection.
|
|
44
|
+
*/
|
|
45
|
+
end: Date;
|
|
46
|
+
/**
|
|
47
|
+
* Indicates if the slot selection consists of all-day slots, or of time slots.
|
|
48
|
+
* The default value is `false`.
|
|
49
|
+
*/
|
|
50
|
+
isAllDay?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* The resources that correspond to the slot selection.
|
|
53
|
+
* The default value is `[]`.
|
|
54
|
+
*/
|
|
55
|
+
resources?: any[];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @hidden
|
|
59
|
+
*/
|
|
60
|
+
export interface ExtendedSlotRange extends SlotRange {
|
|
61
|
+
originalEvent: PointerEvent;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @hidden
|
|
65
|
+
*/
|
|
66
|
+
export declare enum slotDragEventName {
|
|
67
|
+
initDragSelect = "initDragSelect",
|
|
68
|
+
dragSelect = "dragSelect",
|
|
69
|
+
refreshSlotSelection = "refreshSlotSelection",
|
|
70
|
+
dragSelectRelease = "dragSelectRelease"
|
|
71
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
/**
|
|
6
|
+
* The arguments for the [`isSlotSelected`]({% slug api_scheduler_schedulercomponent %}#toc-isslotselected) callback.
|
|
7
|
+
*/
|
|
8
|
+
export class IsSlotSelectedArgs {
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export var slotDragEventName;
|
|
14
|
+
(function (slotDragEventName) {
|
|
15
|
+
slotDragEventName["initDragSelect"] = "initDragSelect";
|
|
16
|
+
slotDragEventName["dragSelect"] = "dragSelect";
|
|
17
|
+
slotDragEventName["refreshSlotSelection"] = "refreshSlotSelection";
|
|
18
|
+
slotDragEventName["dragSelectRelease"] = "dragSelectRelease";
|
|
19
|
+
})(slotDragEventName || (slotDragEventName = {}));
|
package/dist/es2015/types.d.ts
CHANGED
|
@@ -21,3 +21,5 @@ export { EventStyleArgs } from './types/event-style-args.interface';
|
|
|
21
21
|
export { SchedulerSlot } from './types/scheduler-slot.interface';
|
|
22
22
|
export { NumericTextBoxOptions } from './types/numeric-options.interface';
|
|
23
23
|
export { DatePickerOptions } from './types/datepicker-options.interface';
|
|
24
|
+
export { SlotRange } from './types/slot-selection';
|
|
25
|
+
export { IsSlotSelectedArgs } from './types/slot-selection';
|
package/dist/es2015/types.js
CHANGED
|
@@ -3,3 +3,4 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
export * from './types/scheduler-view';
|
|
6
|
+
export { IsSlotSelectedArgs } from './types/slot-selection';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { OnInit, AfterViewInit, OnDestroy, OnChanges, NgZone, ElementRef, Renderer2, TemplateRef } from '@angular/core';
|
|
5
|
+
import { OnInit, AfterViewInit, OnDestroy, OnChanges, NgZone, ElementRef, Renderer2, TemplateRef, ChangeDetectorRef } from '@angular/core';
|
|
6
6
|
import { IntlService } from '@progress/kendo-angular-intl';
|
|
7
7
|
import { Day } from '@progress/kendo-date-math';
|
|
8
8
|
import { Subscription, Subject, BehaviorSubject } from 'rxjs';
|
|
@@ -10,9 +10,12 @@ import { DateRange, NavigationAction, ViewItem } from '../../types';
|
|
|
10
10
|
import { BaseSlotService } from '../view-items/base-slot.service';
|
|
11
11
|
import { ViewContextService } from '../view-context.service';
|
|
12
12
|
import { ViewStateService } from '../view-state.service';
|
|
13
|
+
import Draggable from '@telerik/kendo-draggable';
|
|
13
14
|
import { HintContainerComponent } from '../common/hint-container.component';
|
|
14
15
|
import { PDFService } from '../../pdf/pdf.service';
|
|
15
16
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
17
|
+
import { TimeSlotDirective } from '../day-time/event-slot.directive';
|
|
18
|
+
import { SlotSelectionCallback } from '../../types/slot-selection';
|
|
16
19
|
/** @hidden */
|
|
17
20
|
export declare abstract class BaseView implements OnInit, OnChanges, AfterViewInit, OnDestroy {
|
|
18
21
|
protected viewContext: ViewContextService;
|
|
@@ -24,6 +27,7 @@ export declare abstract class BaseView implements OnInit, OnChanges, AfterViewIn
|
|
|
24
27
|
protected element: ElementRef;
|
|
25
28
|
protected pdfService: PDFService;
|
|
26
29
|
protected localization: LocalizationService;
|
|
30
|
+
protected cdr: ChangeDetectorRef;
|
|
27
31
|
еventTemplate: TemplateRef<any>;
|
|
28
32
|
groupHeaderTemplate: TemplateRef<any>;
|
|
29
33
|
selectedDateFormat: string;
|
|
@@ -49,6 +53,7 @@ export declare abstract class BaseView implements OnInit, OnChanges, AfterViewIn
|
|
|
49
53
|
dragHints: any[];
|
|
50
54
|
resizeHints: any[];
|
|
51
55
|
editable: any;
|
|
56
|
+
selectable: boolean;
|
|
52
57
|
getField: any;
|
|
53
58
|
protected changes: BehaviorSubject<any>;
|
|
54
59
|
protected viewRangeChange: BehaviorSubject<any>;
|
|
@@ -67,10 +72,21 @@ export declare abstract class BaseView implements OnInit, OnChanges, AfterViewIn
|
|
|
67
72
|
protected selectedDate: Date;
|
|
68
73
|
protected resourcesCache: any;
|
|
69
74
|
protected timezone: string;
|
|
70
|
-
protected draggable:
|
|
75
|
+
protected draggable: Draggable;
|
|
76
|
+
/**
|
|
77
|
+
* The event which is currently being resized.
|
|
78
|
+
*/
|
|
71
79
|
protected resizing: any;
|
|
72
80
|
protected dragging: any;
|
|
73
81
|
protected dragArgs: any;
|
|
82
|
+
/**
|
|
83
|
+
* The slot which is currently being dragged over while selecting a range of slots.
|
|
84
|
+
*/
|
|
85
|
+
protected dragSelecting: TimeSlotDirective;
|
|
86
|
+
/**
|
|
87
|
+
* The slot where the drag-selecting originated. Used for flipping the start and end of the emitted range.
|
|
88
|
+
*/
|
|
89
|
+
protected dragSelectOrigin: TimeSlotDirective;
|
|
74
90
|
protected container: any;
|
|
75
91
|
protected containerOffset: any;
|
|
76
92
|
protected pressLocation: any;
|
|
@@ -78,7 +94,8 @@ export declare abstract class BaseView implements OnInit, OnChanges, AfterViewIn
|
|
|
78
94
|
protected scrollInterval: any;
|
|
79
95
|
protected autoHeight: boolean;
|
|
80
96
|
protected rtl: boolean;
|
|
81
|
-
|
|
97
|
+
isSlotSelected: SlotSelectionCallback;
|
|
98
|
+
constructor(viewContext: ViewContextService, viewState: ViewStateService, intl: IntlService, slotService: BaseSlotService, zone: NgZone, renderer: Renderer2, element: ElementRef, pdfService: PDFService, localization: LocalizationService, cdr: ChangeDetectorRef);
|
|
82
99
|
protected abstract onSelectDate(date: Date): void;
|
|
83
100
|
protected abstract onAction(action: NavigationAction): void;
|
|
84
101
|
protected abstract onTasksChange(): void;
|
|
@@ -88,7 +105,7 @@ export declare abstract class BaseView implements OnInit, OnChanges, AfterViewIn
|
|
|
88
105
|
protected abstract dateRange(date: Date): DateRange;
|
|
89
106
|
protected abstract dragHintSize(startSlot: any, endSlot: any): any;
|
|
90
107
|
protected abstract dragRanges(slot: any): any;
|
|
91
|
-
protected abstract slotByPosition(x: number, y: number, container?: any):
|
|
108
|
+
protected abstract slotByPosition(x: number, y: number, container?: any): TimeSlotDirective;
|
|
92
109
|
ngOnInit(): void;
|
|
93
110
|
ngOnChanges(changes: any): void;
|
|
94
111
|
ngAfterViewInit(): void;
|
|
@@ -98,6 +115,8 @@ export declare abstract class BaseView implements OnInit, OnChanges, AfterViewIn
|
|
|
98
115
|
dragResourcesByIndex(index: number): any[];
|
|
99
116
|
getEventClasses(item: any, resources: any, isAllDay?: boolean): any;
|
|
100
117
|
getEventStyles(item: any, itemResource: any, isAllDay?: boolean): any;
|
|
118
|
+
toPlainDate(date: Date): Date;
|
|
119
|
+
toPlainDateTime(date: Date, time: Date): Date;
|
|
101
120
|
protected optionsChange(options: any): void;
|
|
102
121
|
protected toggleElement(visible: boolean): void;
|
|
103
122
|
protected onStable(): any;
|
|
@@ -106,7 +125,7 @@ export declare abstract class BaseView implements OnInit, OnChanges, AfterViewIn
|
|
|
106
125
|
protected bindEvents(): void;
|
|
107
126
|
protected onPress(args: any): void;
|
|
108
127
|
protected onDrag(args: any): void;
|
|
109
|
-
protected onRelease(): void;
|
|
128
|
+
protected onRelease(args: any): void;
|
|
110
129
|
protected setHintClass(className: string): void;
|
|
111
130
|
protected updateHintClass(): void;
|
|
112
131
|
protected removeHintClass(): void;
|
|
@@ -116,6 +135,8 @@ export declare abstract class BaseView implements OnInit, OnChanges, AfterViewIn
|
|
|
116
135
|
protected initDrag(args: any): void;
|
|
117
136
|
protected updateDragContainer(args: any): void;
|
|
118
137
|
protected drag(args: any): void;
|
|
138
|
+
protected initDragSelect(args: any): void;
|
|
139
|
+
protected dragSelect(args: any): void;
|
|
119
140
|
protected dragHintClasses(): any;
|
|
120
141
|
protected dragHintEventStyleArgs(): any;
|
|
121
142
|
protected draggedIsAllDay(task: any, _slot: any): boolean;
|