@progress/kendo-angular-scheduler 21.4.1-develop.1 → 22.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.
- package/editing/recurrence/localization/messages.d.ts +1 -1
- package/editing/resource-editor-base.d.ts +1 -1
- package/editing-directives/editing-directive-base.d.ts +1 -1
- package/fesm2022/progress-kendo-angular-scheduler.mjs +313 -313
- package/localization/messages.d.ts +1 -1
- package/package.json +20 -28
- package/schematics/ngAdd/index.js +3 -3
- package/views/common/base-view.d.ts +1 -1
- package/views/common/configuration-view-base.d.ts +1 -1
- package/views/day-time/day-time-view-base.d.ts +1 -1
- package/views/day-time/day-time-view.component.d.ts +1 -1
- package/views/multi-day/multi-day-view-base.d.ts +1 -1
- package/views/timeline/timeline-base.d.ts +1 -1
- package/views/view-items/base-slot.directive.d.ts +1 -1
- package/views/view-items/base-view-item.d.ts +1 -1
- package/esm2022/common/constants.mjs +0 -8
- package/esm2022/common/default-model-fields.mjs +0 -20
- package/esm2022/common/dom-queries.mjs +0 -107
- package/esm2022/common/modifiers.mjs +0 -31
- package/esm2022/common/util.mjs +0 -227
- package/esm2022/data-binding.directive.mjs +0 -162
- package/esm2022/directives.mjs +0 -136
- package/esm2022/editing/date-time-picker.component.mjs +0 -190
- package/esm2022/editing/dialogs.service.mjs +0 -96
- package/esm2022/editing/edit-dialog-template.directive.mjs +0 -53
- package/esm2022/editing/edit-dialog.component.mjs +0 -679
- package/esm2022/editing/edit.service.mjs +0 -107
- package/esm2022/editing/local-data-changes.service.mjs +0 -18
- package/esm2022/editing/recurrence/end-rule-radio-button.directive.mjs +0 -77
- package/esm2022/editing/recurrence/localization/custom-messages.component.mjs +0 -44
- package/esm2022/editing/recurrence/localization/localized-messages.directive.mjs +0 -39
- package/esm2022/editing/recurrence/localization/messages.mjs +0 -239
- package/esm2022/editing/recurrence/localization/recurrence-localization.service.mjs +0 -47
- package/esm2022/editing/recurrence/recurrence-editor.component.mjs +0 -497
- package/esm2022/editing/recurrence/recurrence-end-rule-editor.component.mjs +0 -334
- package/esm2022/editing/recurrence/recurrence-frequency-editor.component.mjs +0 -105
- package/esm2022/editing/recurrence/recurrence-interval-editor.component.mjs +0 -169
- package/esm2022/editing/recurrence/recurrence-monthly-yearly-editor.component.mjs +0 -468
- package/esm2022/editing/recurrence/recurrence-weekday-rule-editor.component.mjs +0 -138
- package/esm2022/editing/recurrence/recurrence.service.mjs +0 -254
- package/esm2022/editing/recurrence/repeat-on-radio-button.directive.mjs +0 -81
- package/esm2022/editing/resource-editor-base.mjs +0 -59
- package/esm2022/editing/resource-multiple-editor.component.mjs +0 -101
- package/esm2022/editing/resource-single-editor.component.mjs +0 -82
- package/esm2022/editing/timezone-editor.component.mjs +0 -193
- package/esm2022/editing-directives/base-edit.service.mjs +0 -320
- package/esm2022/editing-directives/edit-service.interface.mjs +0 -5
- package/esm2022/editing-directives/editing-directive-base.mjs +0 -242
- package/esm2022/editing-directives/local-edit.service.mjs +0 -122
- package/esm2022/editing-directives/reactive-editing.directive.mjs +0 -132
- package/esm2022/editing-directives/utils.mjs +0 -107
- package/esm2022/events/add-event.mjs +0 -26
- package/esm2022/events/cancel-event.mjs +0 -14
- package/esm2022/events/create-event.mjs +0 -40
- package/esm2022/events/date-change-event.mjs +0 -29
- package/esm2022/events/drag-end-event.mjs +0 -46
- package/esm2022/events/drag-event.mjs +0 -54
- package/esm2022/events/drag-start-event.mjs +0 -30
- package/esm2022/events/edit-event-base.mjs +0 -32
- package/esm2022/events/edit-event.mjs +0 -30
- package/esm2022/events/event-click-event.mjs +0 -32
- package/esm2022/events/event-keydown-event.mjs +0 -28
- package/esm2022/events/more-events-click.mjs +0 -24
- package/esm2022/events/navigate-event.mjs +0 -26
- package/esm2022/events/preventable-event.mjs +0 -28
- package/esm2022/events/remove-event.mjs +0 -30
- package/esm2022/events/resize-end-event.mjs +0 -38
- package/esm2022/events/resize-event.mjs +0 -46
- package/esm2022/events/resize-start-event.mjs +0 -30
- package/esm2022/events/save-event.mjs +0 -18
- package/esm2022/events/slot-click-event.mjs +0 -44
- package/esm2022/events/slot-drag-end-event.mjs +0 -10
- package/esm2022/events/slot-drag-event.mjs +0 -40
- package/esm2022/events/slot-drag-start-event.mjs +0 -44
- package/esm2022/events/view-event-map.mjs +0 -35
- package/esm2022/events.mjs +0 -27
- package/esm2022/index.mjs +0 -83
- package/esm2022/loading.component.mjs +0 -52
- package/esm2022/localization/custom-messages.component.mjs +0 -56
- package/esm2022/localization/localized-messages.directive.mjs +0 -39
- package/esm2022/localization/messages.mjs +0 -614
- package/esm2022/localization/scheduler-localization.service.mjs +0 -31
- package/esm2022/navigation/focus-position.interface.mjs +0 -5
- package/esm2022/navigation/focus.service.mjs +0 -202
- package/esm2022/navigation/focusable-element.interface.mjs +0 -5
- package/esm2022/navigation/focusable.directive.mjs +0 -98
- package/esm2022/navigation/shortcuts.directive.mjs +0 -239
- package/esm2022/navigation.mjs +0 -6
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/pdf/pdf-command.directive.mjs +0 -96
- package/esm2022/pdf/pdf-export-event.mjs +0 -10
- package/esm2022/pdf/pdf.component.mjs +0 -241
- package/esm2022/pdf/pdf.module.mjs +0 -42
- package/esm2022/pdf/pdf.service.mjs +0 -36
- package/esm2022/progress-kendo-angular-scheduler.mjs +0 -8
- package/esm2022/scheduler.component.mjs +0 -1981
- package/esm2022/scheduler.module.mjs +0 -138
- package/esm2022/toolbar/navigation.component.mjs +0 -391
- package/esm2022/toolbar/toolbar-context.mjs +0 -5
- package/esm2022/toolbar/toolbar-template.directive.mjs +0 -50
- package/esm2022/toolbar/toolbar.component.mjs +0 -168
- package/esm2022/toolbar/toolbar.service.mjs +0 -46
- package/esm2022/toolbar/view-selector.component.mjs +0 -181
- package/esm2022/types/actions.mjs +0 -5
- package/esm2022/types/create-form-group-args.interface.mjs +0 -5
- package/esm2022/types/crud-operation.enum.mjs +0 -18
- package/esm2022/types/current-time-settings.interface.mjs +0 -5
- package/esm2022/types/date-range.interface.mjs +0 -5
- package/esm2022/types/datepicker-options.interface.mjs +0 -5
- package/esm2022/types/edit-event-args.interface.mjs +0 -5
- package/esm2022/types/edit-mode.enum.mjs +0 -23
- package/esm2022/types/editable-settings.interface.mjs +0 -5
- package/esm2022/types/event-style-args.interface.mjs +0 -5
- package/esm2022/types/focusable-container.mjs +0 -5
- package/esm2022/types/group.interface.mjs +0 -5
- package/esm2022/types/numeric-options.interface.mjs +0 -5
- package/esm2022/types/ongoing-events-settings.interface.mjs +0 -5
- package/esm2022/types/resource.interface.mjs +0 -5
- package/esm2022/types/scheduler-event.mjs +0 -5
- package/esm2022/types/scheduler-model-fields.interface.mjs +0 -5
- package/esm2022/types/scheduler-slot.interface.mjs +0 -5
- package/esm2022/types/scheduler-view.mjs +0 -9
- package/esm2022/types/slot-class-args.interface.mjs +0 -5
- package/esm2022/types/slot-selection.mjs +0 -35
- package/esm2022/types/view-item.interface.mjs +0 -5
- package/esm2022/types.mjs +0 -12
- package/esm2022/views/agenda/agenda-header-item.component.mjs +0 -85
- package/esm2022/views/agenda/agenda-header.component.mjs +0 -75
- package/esm2022/views/agenda/agenda-task-item.component.mjs +0 -137
- package/esm2022/views/agenda/agenda-view-internal.component.mjs +0 -424
- package/esm2022/views/agenda/agenda-view-list.component.mjs +0 -256
- package/esm2022/views/agenda/agenda-view.component.mjs +0 -130
- package/esm2022/views/agenda/tasks.collection.mjs +0 -96
- package/esm2022/views/agenda/utils.mjs +0 -176
- package/esm2022/views/common/base-view.mjs +0 -1099
- package/esm2022/views/common/configuration-view-base.mjs +0 -164
- package/esm2022/views/common/dom-events.service.mjs +0 -22
- package/esm2022/views/common/hint-container.component.mjs +0 -41
- package/esm2022/views/common/repeat.pipe.mjs +0 -36
- package/esm2022/views/common/resize-hint.component.mjs +0 -97
- package/esm2022/views/common/resource-iterator.pipe.mjs +0 -49
- package/esm2022/views/common/scheduler-task.mjs +0 -5
- package/esm2022/views/common/slot-selectable.directive.mjs +0 -137
- package/esm2022/views/common/view-footer.component.mjs +0 -103
- package/esm2022/views/common/work-hours-footer.directive.mjs +0 -45
- package/esm2022/views/constants.mjs +0 -31
- package/esm2022/views/day-time/day-time-slot.service.mjs +0 -633
- package/esm2022/views/day-time/day-time-view-base.mjs +0 -244
- package/esm2022/views/day-time/day-time-view-item.component.mjs +0 -216
- package/esm2022/views/day-time/day-time-view.component.mjs +0 -437
- package/esm2022/views/day-time/event-slot.directive.mjs +0 -138
- package/esm2022/views/day-time/utils.mjs +0 -32
- package/esm2022/views/month/month-slot.component.mjs +0 -166
- package/esm2022/views/month/month-slot.service.mjs +0 -404
- package/esm2022/views/month/month-view-item.component.mjs +0 -161
- package/esm2022/views/month/month-view-renderer.component.mjs +0 -683
- package/esm2022/views/month/month-view.component.mjs +0 -203
- package/esm2022/views/month/multi-week-view.component.mjs +0 -202
- package/esm2022/views/month/utils.mjs +0 -107
- package/esm2022/views/multi-day/day-view.component.mjs +0 -186
- package/esm2022/views/multi-day/multi-day-view-base.mjs +0 -55
- package/esm2022/views/multi-day/multi-day-view-renderer.component.mjs +0 -1002
- package/esm2022/views/multi-day/multi-day-view.component.mjs +0 -197
- package/esm2022/views/multi-day/utils.mjs +0 -63
- package/esm2022/views/multi-day/week-view.component.mjs +0 -189
- package/esm2022/views/multi-day/work-week-view.component.mjs +0 -172
- package/esm2022/views/scheduler-view.directive.mjs +0 -65
- package/esm2022/views/templates/agenda-date-template.directive.mjs +0 -41
- package/esm2022/views/templates/agenda-time-template.directive.mjs +0 -46
- package/esm2022/views/templates/all-day-event-template.directive.mjs +0 -42
- package/esm2022/views/templates/all-day-slot-template.directive.mjs +0 -42
- package/esm2022/views/templates/date-header-template.directive.mjs +0 -42
- package/esm2022/views/templates/event-template.directive.mjs +0 -42
- package/esm2022/views/templates/group-header-template.directive.mjs +0 -42
- package/esm2022/views/templates/major-time-header-template.directive.mjs +0 -41
- package/esm2022/views/templates/minor-time-header-template.directive.mjs +0 -41
- package/esm2022/views/templates/month-day-slot-template.directive.mjs +0 -42
- package/esm2022/views/templates/multi-week-day-slot-template.directive.mjs +0 -42
- package/esm2022/views/templates/time-slot-template.directive.mjs +0 -43
- package/esm2022/views/templates.mjs +0 -16
- package/esm2022/views/timeline/timeline-base.mjs +0 -39
- package/esm2022/views/timeline/timeline-month-view.component.mjs +0 -211
- package/esm2022/views/timeline/timeline-multi-day-view.component.mjs +0 -649
- package/esm2022/views/timeline/timeline-view.component.mjs +0 -189
- package/esm2022/views/timeline/timeline-week-view.component.mjs +0 -181
- package/esm2022/views/timeline/utils.mjs +0 -60
- package/esm2022/views/utils.mjs +0 -373
- package/esm2022/views/view-context.service.mjs +0 -111
- package/esm2022/views/view-items/base-slot.directive.mjs +0 -104
- package/esm2022/views/view-items/base-slot.service.mjs +0 -82
- package/esm2022/views/view-items/base-view-item.mjs +0 -194
- package/esm2022/views/view-items/item-map.mjs +0 -38
- package/esm2022/views/view-items/types.mjs +0 -5
- package/esm2022/views/view-state.service.mjs +0 -144
- package/esm2022/views/year/utils.mjs +0 -60
- package/esm2022/views/year/year-view-internal.component.mjs +0 -471
- package/esm2022/views/year/year-view.component.mjs +0 -136
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { ChangeDetectorRef, Directive, Input } from '@angular/core';
|
|
6
|
-
import { OCCURRENCE_ID } from './common/constants';
|
|
7
|
-
import { SchedulerComponent } from './scheduler.component';
|
|
8
|
-
import { parseRule, expand } from '@progress/kendo-recurrence';
|
|
9
|
-
import { toUTCDateTime } from './views/utils';
|
|
10
|
-
import { ZonedDate } from '@progress/kendo-date-math';
|
|
11
|
-
import { LocalDataChangesService } from './editing/local-data-changes.service';
|
|
12
|
-
import { clone, setField, getField } from './common/util';
|
|
13
|
-
import { IntlService } from '@progress/kendo-angular-intl';
|
|
14
|
-
import * as i0 from "@angular/core";
|
|
15
|
-
import * as i1 from "./scheduler.component";
|
|
16
|
-
import * as i2 from "@progress/kendo-angular-intl";
|
|
17
|
-
import * as i3 from "./editing/local-data-changes.service";
|
|
18
|
-
// TODO
|
|
19
|
-
// Extract as public method
|
|
20
|
-
const occurrences = (item, fields, range, timezone, weekStart) => {
|
|
21
|
-
const rrule = parseRule({
|
|
22
|
-
recurrenceRule: getField(item, fields.recurrenceRule),
|
|
23
|
-
weekStart: weekStart
|
|
24
|
-
});
|
|
25
|
-
if (!rrule.start) {
|
|
26
|
-
const start = getField(item, fields.start);
|
|
27
|
-
rrule.start = ZonedDate.fromLocalDate(start, timezone);
|
|
28
|
-
}
|
|
29
|
-
if (!rrule.end) {
|
|
30
|
-
const end = getField(item, fields.end);
|
|
31
|
-
rrule.end = ZonedDate.fromLocalDate(end, timezone);
|
|
32
|
-
}
|
|
33
|
-
const exceptions = getField(item, fields.recurrenceExceptions);
|
|
34
|
-
if (exceptions) {
|
|
35
|
-
rrule.exceptionDates = exceptions
|
|
36
|
-
.map(exDate => ZonedDate.fromLocalDate(exDate, timezone));
|
|
37
|
-
// TODO: Merge exceptions from recurrence rule with event.recurrenceException
|
|
38
|
-
}
|
|
39
|
-
const utcRangeStart = toUTCDateTime(range.start);
|
|
40
|
-
const utcRangeEnd = toUTCDateTime(range.end);
|
|
41
|
-
const series = expand(rrule, {
|
|
42
|
-
rangeStart: ZonedDate.fromUTCDate(utcRangeStart, timezone),
|
|
43
|
-
rangeEnd: ZonedDate.fromUTCDate(utcRangeEnd, timezone)
|
|
44
|
-
});
|
|
45
|
-
if (!series.events.length) {
|
|
46
|
-
return [];
|
|
47
|
-
}
|
|
48
|
-
const expanded = series.events.map(occ => {
|
|
49
|
-
const event = clone(item);
|
|
50
|
-
setField(event, fields.id, OCCURRENCE_ID);
|
|
51
|
-
setField(event, fields.recurrenceId, getField(item, fields.id));
|
|
52
|
-
setField(event, fields.start, occ.start.toLocalDate());
|
|
53
|
-
setField(event, fields.end, occ.end.toLocalDate());
|
|
54
|
-
return event;
|
|
55
|
-
});
|
|
56
|
-
return [item, ...expanded];
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* A directive that processes Scheduler events in memory ([see example](slug:databinding_scheduler#automatic-data-processing)).
|
|
60
|
-
*
|
|
61
|
-
* Processing includes expanding of recurring events and filtering data for
|
|
62
|
-
* the currently active period.
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* ```html
|
|
66
|
-
* <kendo-scheduler [kendoSchedulerBinding]="data">
|
|
67
|
-
* </kendo-scheduler>
|
|
68
|
-
* ```
|
|
69
|
-
*
|
|
70
|
-
* @remarks
|
|
71
|
-
* Applied to: {@link SchedulerComponent}
|
|
72
|
-
*/
|
|
73
|
-
export class DataBindingDirective {
|
|
74
|
-
scheduler;
|
|
75
|
-
changeDetector;
|
|
76
|
-
intl;
|
|
77
|
-
localDataChangesService;
|
|
78
|
-
/**
|
|
79
|
-
* Sets the data array for the Scheduler.
|
|
80
|
-
*/
|
|
81
|
-
set data(value) {
|
|
82
|
-
this.originalData = value || [];
|
|
83
|
-
if (this.localDataChangesService) {
|
|
84
|
-
this.localDataChangesService.data = value;
|
|
85
|
-
}
|
|
86
|
-
this.scheduler.events = this.process();
|
|
87
|
-
}
|
|
88
|
-
dateRange;
|
|
89
|
-
originalData = [];
|
|
90
|
-
subscription;
|
|
91
|
-
dataChangedSubscription;
|
|
92
|
-
constructor(scheduler, changeDetector, intl, localDataChangesService) {
|
|
93
|
-
this.scheduler = scheduler;
|
|
94
|
-
this.changeDetector = changeDetector;
|
|
95
|
-
this.intl = intl;
|
|
96
|
-
this.localDataChangesService = localDataChangesService;
|
|
97
|
-
if (localDataChangesService) {
|
|
98
|
-
this.dataChangedSubscription = this.localDataChangesService.changes.subscribe(this.rebind.bind(this));
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* @hidden
|
|
103
|
-
*/
|
|
104
|
-
ngOnInit() {
|
|
105
|
-
this.subscription = this.scheduler
|
|
106
|
-
.dateChange
|
|
107
|
-
.subscribe(e => this.onDateChange(e));
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* @hidden
|
|
111
|
-
*/
|
|
112
|
-
ngOnDestroy() {
|
|
113
|
-
if (this.subscription) {
|
|
114
|
-
this.subscription.unsubscribe();
|
|
115
|
-
}
|
|
116
|
-
if (this.dataChangedSubscription) {
|
|
117
|
-
this.dataChangedSubscription.unsubscribe();
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* @hidden
|
|
122
|
-
*/
|
|
123
|
-
rebind() {
|
|
124
|
-
this.data = this.originalData;
|
|
125
|
-
this.changeDetector.markForCheck();
|
|
126
|
-
}
|
|
127
|
-
process() {
|
|
128
|
-
if (!this.dateRange) {
|
|
129
|
-
// No processing until a date range is set
|
|
130
|
-
return [];
|
|
131
|
-
}
|
|
132
|
-
const data = [];
|
|
133
|
-
const fields = this.scheduler.modelFields;
|
|
134
|
-
this.originalData
|
|
135
|
-
.forEach(item => {
|
|
136
|
-
if (getField(item, fields.recurrenceRule)) {
|
|
137
|
-
const series = occurrences(item, fields, this.dateRange, this.scheduler.timezone, this.scheduler.weekStart);
|
|
138
|
-
data.push(...series);
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
data.push(item);
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
return data;
|
|
145
|
-
}
|
|
146
|
-
onDateChange(e) {
|
|
147
|
-
this.dateRange = e.dateRange;
|
|
148
|
-
this.rebind();
|
|
149
|
-
}
|
|
150
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DataBindingDirective, deps: [{ token: i1.SchedulerComponent }, { token: i0.ChangeDetectorRef }, { token: i2.IntlService }, { token: i3.LocalDataChangesService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
151
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: DataBindingDirective, isStandalone: true, selector: "[kendoSchedulerBinding]", inputs: { data: ["kendoSchedulerBinding", "data"] }, ngImport: i0 });
|
|
152
|
-
}
|
|
153
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DataBindingDirective, decorators: [{
|
|
154
|
-
type: Directive,
|
|
155
|
-
args: [{
|
|
156
|
-
selector: '[kendoSchedulerBinding]',
|
|
157
|
-
standalone: true
|
|
158
|
-
}]
|
|
159
|
-
}], ctorParameters: () => [{ type: i1.SchedulerComponent }, { type: i0.ChangeDetectorRef }, { type: i2.IntlService }, { type: i3.LocalDataChangesService }], propDecorators: { data: [{
|
|
160
|
-
type: Input,
|
|
161
|
-
args: ['kendoSchedulerBinding']
|
|
162
|
-
}] } });
|
package/esm2022/directives.mjs
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { DataBindingDirective } from './data-binding.directive';
|
|
6
|
-
import { SchedulerCustomMessagesComponent } from './localization/custom-messages.component';
|
|
7
|
-
import { PDFCommandDirective } from './pdf/pdf-command.directive';
|
|
8
|
-
import { PDFComponent } from './pdf/pdf.component';
|
|
9
|
-
import { SchedulerComponent } from './scheduler.component';
|
|
10
|
-
import { SlotSelectableDirective } from './views/common/slot-selectable.directive';
|
|
11
|
-
import { SchedulerViewDirective } from './views/scheduler-view.directive';
|
|
12
|
-
import { AgendaViewComponent } from './views/agenda/agenda-view.component';
|
|
13
|
-
import { MonthViewComponent } from './views/month/month-view.component';
|
|
14
|
-
import { MultiWeekViewComponent } from './views/month/multi-week-view.component';
|
|
15
|
-
import { DayViewComponent } from './views/multi-day/day-view.component';
|
|
16
|
-
import { MultiDayViewComponent } from './views/multi-day/multi-day-view.component';
|
|
17
|
-
import { WeekViewComponent } from './views/multi-day/week-view.component';
|
|
18
|
-
import { WorkWeekViewComponent } from './views/multi-day/work-week-view.component';
|
|
19
|
-
import { TimelineMonthViewComponent } from './views/timeline/timeline-month-view.component';
|
|
20
|
-
import { TimelineViewComponent } from './views/timeline/timeline-view.component';
|
|
21
|
-
import { TimelineWeekViewComponent } from './views/timeline/timeline-week-view.component';
|
|
22
|
-
import { YearViewComponent } from './views/year/year-view.component';
|
|
23
|
-
import { ReactiveEditingDirective } from './editing-directives/reactive-editing.directive';
|
|
24
|
-
import { EditDialogTemplateDirective } from './editing/edit-dialog-template.directive';
|
|
25
|
-
import { RecurrenceEditorComponent } from './editing/recurrence/recurrence-editor.component';
|
|
26
|
-
import { TimeZoneEditorComponent } from './editing/timezone-editor.component';
|
|
27
|
-
import { ToolbarNavigationComponent } from './toolbar/navigation.component';
|
|
28
|
-
import { ToolbarTemplateDirective } from './toolbar/toolbar-template.directive';
|
|
29
|
-
import { ToolbarViewSelectorComponent } from './toolbar/view-selector.component';
|
|
30
|
-
import { AgendaDateTemplateDirective } from './views/templates/agenda-date-template.directive';
|
|
31
|
-
import { AgendaTimeTemplateDirective } from './views/templates/agenda-time-template.directive';
|
|
32
|
-
import { AllDayEventTemplateDirective } from './views/templates/all-day-event-template.directive';
|
|
33
|
-
import { AllDaySlotTemplateDirective } from './views/templates/all-day-slot-template.directive';
|
|
34
|
-
import { DateHeaderTemplateDirective } from './views/templates/date-header-template.directive';
|
|
35
|
-
import { EventTemplateDirective } from './views/templates/event-template.directive';
|
|
36
|
-
import { GroupHeaderTemplateDirective } from './views/templates/group-header-template.directive';
|
|
37
|
-
import { MajorTimeHeaderTemplateDirective } from './views/templates/major-time-header-template.directive';
|
|
38
|
-
import { MinorTimeHeaderTemplateDirective } from './views/templates/minor-time-header-template.directive';
|
|
39
|
-
import { MonthDaySlotTemplateDirective } from './views/templates/month-day-slot-template.directive';
|
|
40
|
-
import { MultiWeekDaySlotTemplateDirective } from './views/templates/multi-week-day-slot-template.directive';
|
|
41
|
-
import { TimeSlotTemplateDirective } from './views/templates/time-slot-template.directive';
|
|
42
|
-
import { ShortcutsDirective } from './navigation/shortcuts.directive';
|
|
43
|
-
/**
|
|
44
|
-
* Utility array that contains all `@progress/kendo-angular-scheduler` PDF-related components and directives.
|
|
45
|
-
*
|
|
46
|
-
* Use the `KENDO_SCHEDULERPDF` array to import all PDF export features for the Scheduler.
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
* ```ts
|
|
50
|
-
* import { KENDO_SCHEDULER, KENDO_SCHEDULERPDF } from '@progress/kendo-angular-scheduler';
|
|
51
|
-
*
|
|
52
|
-
* @Component({
|
|
53
|
-
* standalone: true,
|
|
54
|
-
* imports: [KENDO_SCHEDULER, KENDO_SCHEDULERPDF],
|
|
55
|
-
* template: `
|
|
56
|
-
* <kendo-scheduler [kendoSchedulerBinding]="events">
|
|
57
|
-
* <ng-template kendoSchedulerToolbarTemplate>
|
|
58
|
-
* <button kendoSchedulerPDFCommand>Export PDF</button>
|
|
59
|
-
* </ng-template>
|
|
60
|
-
* <kendo-scheduler-day-view></kendo-scheduler-day-view>
|
|
61
|
-
* <kendo-scheduler-pdf fileName="scheduler.pdf"></kendo-scheduler-pdf>
|
|
62
|
-
* </kendo-scheduler>
|
|
63
|
-
* `
|
|
64
|
-
* })
|
|
65
|
-
* export class AppComponent {}
|
|
66
|
-
* ```
|
|
67
|
-
*/
|
|
68
|
-
export const KENDO_SCHEDULERPDF = [
|
|
69
|
-
PDFComponent,
|
|
70
|
-
PDFCommandDirective
|
|
71
|
-
];
|
|
72
|
-
/**
|
|
73
|
-
* Utility array that contains all `@progress/kendo-angular-scheduler`-related components and directives.
|
|
74
|
-
*
|
|
75
|
-
* Use the `KENDO_SCHEDULER` array to import all Scheduler features in your Angular application.
|
|
76
|
-
*
|
|
77
|
-
* @example
|
|
78
|
-
* ```ts
|
|
79
|
-
* import { KENDO_SCHEDULER } from '@progress/kendo-angular-scheduler';
|
|
80
|
-
*
|
|
81
|
-
* @Component({
|
|
82
|
-
* standalone: true,
|
|
83
|
-
* imports: [KENDO_SCHEDULER],
|
|
84
|
-
* template: `
|
|
85
|
-
* <kendo-scheduler [kendoSchedulerBinding]="events">
|
|
86
|
-
* <kendo-scheduler-day-view></kendo-scheduler-day-view>
|
|
87
|
-
* </kendo-scheduler>
|
|
88
|
-
* `
|
|
89
|
-
* })
|
|
90
|
-
* export class AppComponent {}
|
|
91
|
-
* ```
|
|
92
|
-
*/
|
|
93
|
-
export const KENDO_SCHEDULER = [
|
|
94
|
-
SchedulerComponent,
|
|
95
|
-
SchedulerCustomMessagesComponent,
|
|
96
|
-
SchedulerViewDirective,
|
|
97
|
-
DataBindingDirective,
|
|
98
|
-
SlotSelectableDirective,
|
|
99
|
-
PDFComponent,
|
|
100
|
-
PDFCommandDirective,
|
|
101
|
-
ShortcutsDirective,
|
|
102
|
-
// views
|
|
103
|
-
AgendaViewComponent,
|
|
104
|
-
DayViewComponent,
|
|
105
|
-
MonthViewComponent,
|
|
106
|
-
MultiDayViewComponent,
|
|
107
|
-
MultiWeekViewComponent,
|
|
108
|
-
TimelineMonthViewComponent,
|
|
109
|
-
TimelineViewComponent,
|
|
110
|
-
TimelineWeekViewComponent,
|
|
111
|
-
WeekViewComponent,
|
|
112
|
-
WorkWeekViewComponent,
|
|
113
|
-
YearViewComponent,
|
|
114
|
-
// editing
|
|
115
|
-
ReactiveEditingDirective,
|
|
116
|
-
RecurrenceEditorComponent,
|
|
117
|
-
TimeZoneEditorComponent,
|
|
118
|
-
// toolbar
|
|
119
|
-
ToolbarNavigationComponent,
|
|
120
|
-
ToolbarTemplateDirective,
|
|
121
|
-
ToolbarViewSelectorComponent,
|
|
122
|
-
// templates
|
|
123
|
-
AgendaDateTemplateDirective,
|
|
124
|
-
AgendaTimeTemplateDirective,
|
|
125
|
-
AllDayEventTemplateDirective,
|
|
126
|
-
AllDaySlotTemplateDirective,
|
|
127
|
-
DateHeaderTemplateDirective,
|
|
128
|
-
EventTemplateDirective,
|
|
129
|
-
EditDialogTemplateDirective,
|
|
130
|
-
GroupHeaderTemplateDirective,
|
|
131
|
-
MajorTimeHeaderTemplateDirective,
|
|
132
|
-
MinorTimeHeaderTemplateDirective,
|
|
133
|
-
MonthDaySlotTemplateDirective,
|
|
134
|
-
MultiWeekDaySlotTemplateDirective,
|
|
135
|
-
TimeSlotTemplateDirective,
|
|
136
|
-
];
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Injector, ViewChild } from '@angular/core';
|
|
6
|
-
import { NG_VALUE_ACCESSOR, NgControl, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
-
import { Component, forwardRef, Input, Output, EventEmitter } from '@angular/core';
|
|
8
|
-
import { DatePickerComponent, DateTimePickerComponent, DateTimePickerCustomMessagesComponent, DatePickerCustomMessagesComponent } from '@progress/kendo-angular-dateinputs';
|
|
9
|
-
import { SchedulerLocalizationService } from '../localization/scheduler-localization.service';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
import * as i1 from "../localization/scheduler-localization.service";
|
|
12
|
-
import * as i2 from "@angular/forms";
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
export const SCHEDULER_DATETIMEPICKER_VALUE_ACCESSOR = {
|
|
17
|
-
multi: true,
|
|
18
|
-
provide: NG_VALUE_ACCESSOR,
|
|
19
|
-
useExisting: forwardRef(() => SchedulerDateTimePickerComponent)
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* @hidden
|
|
23
|
-
*/
|
|
24
|
-
export class SchedulerDateTimePickerComponent {
|
|
25
|
-
injector;
|
|
26
|
-
localization;
|
|
27
|
-
datePicker;
|
|
28
|
-
dateTimePicker;
|
|
29
|
-
isAllDay;
|
|
30
|
-
valueChange = new EventEmitter();
|
|
31
|
-
constructor(injector, localization) {
|
|
32
|
-
this.injector = injector;
|
|
33
|
-
this.localization = localization;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* @hidden
|
|
37
|
-
*/
|
|
38
|
-
get focusableId() {
|
|
39
|
-
return this.isAllDay ? this.datePicker?.focusableId : this.dateTimePicker?.focusableId;
|
|
40
|
-
}
|
|
41
|
-
get formControl() {
|
|
42
|
-
const ngControl = this.injector.get(NgControl, null);
|
|
43
|
-
return ngControl?.control || null;
|
|
44
|
-
}
|
|
45
|
-
textFor(key) {
|
|
46
|
-
return this.localization.get(key);
|
|
47
|
-
}
|
|
48
|
-
date;
|
|
49
|
-
writeValue(newDate) {
|
|
50
|
-
if (newDate instanceof Date) {
|
|
51
|
-
this.date = newDate;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
onValueChange(newValue) {
|
|
55
|
-
this.onChangeCallback(newValue);
|
|
56
|
-
this.valueChange.emit(newValue);
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* @hidden
|
|
60
|
-
*/
|
|
61
|
-
focus() {
|
|
62
|
-
this.datePicker ? this.datePicker.focus() : this.dateTimePicker.focus();
|
|
63
|
-
}
|
|
64
|
-
onTouchedCallback = (_) => { };
|
|
65
|
-
onChangeCallback = (_) => { };
|
|
66
|
-
/**
|
|
67
|
-
* @hidden
|
|
68
|
-
*/
|
|
69
|
-
registerOnChange(fn) {
|
|
70
|
-
this.onChangeCallback = fn;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* @hidden
|
|
74
|
-
*/
|
|
75
|
-
registerOnTouched(fn) {
|
|
76
|
-
this.onTouchedCallback = fn;
|
|
77
|
-
}
|
|
78
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SchedulerDateTimePickerComponent, deps: [{ token: i0.Injector }, { token: i1.SchedulerLocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SchedulerDateTimePickerComponent, isStandalone: true, selector: "kendo-scheduler-datetime-picker", inputs: { isAllDay: "isAllDay" }, outputs: { valueChange: "valueChange" }, providers: [
|
|
80
|
-
SCHEDULER_DATETIMEPICKER_VALUE_ACCESSOR
|
|
81
|
-
], viewQueries: [{ propertyName: "datePicker", first: true, predicate: ["datepicker"], descendants: true }, { propertyName: "dateTimePicker", first: true, predicate: ["datetimepicker"], descendants: true }], ngImport: i0, template: `
|
|
82
|
-
@if (isAllDay) {
|
|
83
|
-
<kendo-datepicker
|
|
84
|
-
#datepicker
|
|
85
|
-
[(value)]='date'
|
|
86
|
-
(valueChange)='onValueChange($event)'
|
|
87
|
-
[formControl]="formControl"
|
|
88
|
-
[clearButton]="true"
|
|
89
|
-
>
|
|
90
|
-
<kendo-datepicker-messages
|
|
91
|
-
[today]="textFor('editorDateInputsToday')"
|
|
92
|
-
[toggle]="textFor('editorDateInputsToggle')"
|
|
93
|
-
[parentViewButtonTitle]="textFor('editorDateInputsParentViewButton')"
|
|
94
|
-
>
|
|
95
|
-
</kendo-datepicker-messages>
|
|
96
|
-
</kendo-datepicker>
|
|
97
|
-
}
|
|
98
|
-
@if (!isAllDay) {
|
|
99
|
-
<kendo-datetimepicker
|
|
100
|
-
#datetimepicker
|
|
101
|
-
[(value)]='date'
|
|
102
|
-
(valueChange)='onValueChange($event)'
|
|
103
|
-
[formControl]="formControl"
|
|
104
|
-
[clearButton]="true"
|
|
105
|
-
>
|
|
106
|
-
<kendo-datetimepicker-messages
|
|
107
|
-
[toggle]="textFor('editorDateInputsToggle')"
|
|
108
|
-
[today]="textFor('editorDateInputsToday')"
|
|
109
|
-
[accept]="textFor('editorDateInputsAccept')"
|
|
110
|
-
[acceptLabel]="textFor('editorDateInputsAcceptLabel')"
|
|
111
|
-
[cancelLabel]="textFor('editorDateInputsCancelLabel')"
|
|
112
|
-
[cancel]="textFor('editorDateInputsCancel')"
|
|
113
|
-
[now]="textFor('editorDateInputsNow')"
|
|
114
|
-
[nowLabel]="textFor('editorDateInputsNowLabel')"
|
|
115
|
-
[dateTab]="textFor('editorDateInputsDateTab')"
|
|
116
|
-
[dateTabLabel]="textFor('editorDateInputsDateTabLabel')"
|
|
117
|
-
[timeTab]="textFor('editorDateInputsTimeTab')"
|
|
118
|
-
[timeTabLabel]="textFor('editorDateInputsTimeTabLabel')"
|
|
119
|
-
[parentViewButtonTitle]="textFor('editorDateInputsParentViewButton')"
|
|
120
|
-
>
|
|
121
|
-
</kendo-datetimepicker-messages>
|
|
122
|
-
</kendo-datetimepicker>
|
|
123
|
-
}
|
|
124
|
-
`, isInline: true, dependencies: [{ kind: "component", type: DatePickerComponent, selector: "kendo-datepicker", inputs: ["focusableId", "cellTemplate", "clearButton", "inputAttributes", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "headerTemplate", "footerTemplate", "footer", "navigationItemTemplate", "weekDaysFormat", "showOtherMonthDays", "activeView", "bottomView", "topView", "calendarType", "animateCalendarNavigation", "disabled", "readonly", "readOnlyInput", "popupSettings", "navigation", "min", "max", "incompleteDateValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "enableMouseWheel", "allowCaretMode", "autoFill", "focusedDate", "value", "format", "twoDigitYearMax", "formatPlaceholder", "placeholder", "tabindex", "tabIndex", "disabledDates", "adaptiveTitle", "adaptiveSubtitle", "rangeValidation", "disabledDatesValidation", "weekNumber", "size", "rounded", "fillMode", "adaptiveMode"], outputs: ["valueChange", "focus", "blur", "open", "close", "escape"], exportAs: ["kendo-datepicker"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: DatePickerCustomMessagesComponent, selector: "kendo-datepicker-messages" }, { kind: "component", type: DateTimePickerComponent, selector: "kendo-datetimepicker", inputs: ["focusableId", "weekDaysFormat", "showOtherMonthDays", "value", "format", "twoDigitYearMax", "tabindex", "disabledDates", "popupSettings", "adaptiveTitle", "adaptiveSubtitle", "disabled", "readonly", "readOnlyInput", "cancelButton", "formatPlaceholder", "placeholder", "steps", "focusedDate", "calendarType", "animateCalendarNavigation", "weekNumber", "min", "max", "rangeValidation", "disabledDatesValidation", "incompleteDateValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "enableMouseWheel", "allowCaretMode", "clearButton", "autoFill", "adaptiveMode", "inputAttributes", "defaultTab", "size", "rounded", "fillMode", "headerTemplate", "footerTemplate", "footer"], outputs: ["valueChange", "open", "close", "focus", "blur", "escape"], exportAs: ["kendo-datetimepicker"] }, { kind: "component", type: DateTimePickerCustomMessagesComponent, selector: "kendo-datetimepicker-messages" }] });
|
|
125
|
-
}
|
|
126
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SchedulerDateTimePickerComponent, decorators: [{
|
|
127
|
-
type: Component,
|
|
128
|
-
args: [{
|
|
129
|
-
providers: [
|
|
130
|
-
SCHEDULER_DATETIMEPICKER_VALUE_ACCESSOR
|
|
131
|
-
],
|
|
132
|
-
selector: 'kendo-scheduler-datetime-picker',
|
|
133
|
-
template: `
|
|
134
|
-
@if (isAllDay) {
|
|
135
|
-
<kendo-datepicker
|
|
136
|
-
#datepicker
|
|
137
|
-
[(value)]='date'
|
|
138
|
-
(valueChange)='onValueChange($event)'
|
|
139
|
-
[formControl]="formControl"
|
|
140
|
-
[clearButton]="true"
|
|
141
|
-
>
|
|
142
|
-
<kendo-datepicker-messages
|
|
143
|
-
[today]="textFor('editorDateInputsToday')"
|
|
144
|
-
[toggle]="textFor('editorDateInputsToggle')"
|
|
145
|
-
[parentViewButtonTitle]="textFor('editorDateInputsParentViewButton')"
|
|
146
|
-
>
|
|
147
|
-
</kendo-datepicker-messages>
|
|
148
|
-
</kendo-datepicker>
|
|
149
|
-
}
|
|
150
|
-
@if (!isAllDay) {
|
|
151
|
-
<kendo-datetimepicker
|
|
152
|
-
#datetimepicker
|
|
153
|
-
[(value)]='date'
|
|
154
|
-
(valueChange)='onValueChange($event)'
|
|
155
|
-
[formControl]="formControl"
|
|
156
|
-
[clearButton]="true"
|
|
157
|
-
>
|
|
158
|
-
<kendo-datetimepicker-messages
|
|
159
|
-
[toggle]="textFor('editorDateInputsToggle')"
|
|
160
|
-
[today]="textFor('editorDateInputsToday')"
|
|
161
|
-
[accept]="textFor('editorDateInputsAccept')"
|
|
162
|
-
[acceptLabel]="textFor('editorDateInputsAcceptLabel')"
|
|
163
|
-
[cancelLabel]="textFor('editorDateInputsCancelLabel')"
|
|
164
|
-
[cancel]="textFor('editorDateInputsCancel')"
|
|
165
|
-
[now]="textFor('editorDateInputsNow')"
|
|
166
|
-
[nowLabel]="textFor('editorDateInputsNowLabel')"
|
|
167
|
-
[dateTab]="textFor('editorDateInputsDateTab')"
|
|
168
|
-
[dateTabLabel]="textFor('editorDateInputsDateTabLabel')"
|
|
169
|
-
[timeTab]="textFor('editorDateInputsTimeTab')"
|
|
170
|
-
[timeTabLabel]="textFor('editorDateInputsTimeTabLabel')"
|
|
171
|
-
[parentViewButtonTitle]="textFor('editorDateInputsParentViewButton')"
|
|
172
|
-
>
|
|
173
|
-
</kendo-datetimepicker-messages>
|
|
174
|
-
</kendo-datetimepicker>
|
|
175
|
-
}
|
|
176
|
-
`,
|
|
177
|
-
standalone: true,
|
|
178
|
-
imports: [DatePickerComponent, ReactiveFormsModule, DatePickerCustomMessagesComponent, DateTimePickerComponent, DateTimePickerCustomMessagesComponent]
|
|
179
|
-
}]
|
|
180
|
-
}], ctorParameters: () => [{ type: i0.Injector }, { type: i1.SchedulerLocalizationService }], propDecorators: { datePicker: [{
|
|
181
|
-
type: ViewChild,
|
|
182
|
-
args: ['datepicker']
|
|
183
|
-
}], dateTimePicker: [{
|
|
184
|
-
type: ViewChild,
|
|
185
|
-
args: ['datetimepicker']
|
|
186
|
-
}], isAllDay: [{
|
|
187
|
-
type: Input
|
|
188
|
-
}], valueChange: [{
|
|
189
|
-
type: Output
|
|
190
|
-
}] } });
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { ChangeDetectorRef, Injectable } from '@angular/core';
|
|
6
|
-
import { DialogCloseResult, DialogService } from '@progress/kendo-angular-dialog';
|
|
7
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
-
import { map, take } from 'rxjs/operators';
|
|
9
|
-
import { FocusService } from '../navigation/focus.service';
|
|
10
|
-
import { CrudOperation, EditMode } from '../types';
|
|
11
|
-
import { ViewStateService } from '../views/view-state.service';
|
|
12
|
-
import * as i0 from "@angular/core";
|
|
13
|
-
import * as i1 from "@progress/kendo-angular-dialog";
|
|
14
|
-
import * as i2 from "@progress/kendo-angular-l10n";
|
|
15
|
-
import * as i3 from "../navigation/focus.service";
|
|
16
|
-
import * as i4 from "../views/view-state.service";
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
export class DialogsService {
|
|
21
|
-
dialogService;
|
|
22
|
-
localization;
|
|
23
|
-
changeDetector;
|
|
24
|
-
focusService;
|
|
25
|
-
viewState;
|
|
26
|
-
container;
|
|
27
|
-
isOpen = false;
|
|
28
|
-
constructor(dialogService, localization, changeDetector, focusService, viewState) {
|
|
29
|
-
this.dialogService = dialogService;
|
|
30
|
-
this.localization = localization;
|
|
31
|
-
this.changeDetector = changeDetector;
|
|
32
|
-
this.focusService = focusService;
|
|
33
|
-
this.viewState = viewState;
|
|
34
|
-
}
|
|
35
|
-
openRemoveConfirmationDialog() {
|
|
36
|
-
const dialog = this.dialogService.open({
|
|
37
|
-
title: this.textFor('deleteDialogTitle'),
|
|
38
|
-
content: this.textFor('deleteConfirmation'),
|
|
39
|
-
actions: [
|
|
40
|
-
{ text: this.textFor('cancel'), value: false },
|
|
41
|
-
{ text: this.textFor('destroy'), value: true }
|
|
42
|
-
],
|
|
43
|
-
appendTo: this.container,
|
|
44
|
-
autoFocusedElement: 'button:nth-child(2)'
|
|
45
|
-
});
|
|
46
|
-
this.isOpen = true;
|
|
47
|
-
this.changeDetector.markForCheck();
|
|
48
|
-
return dialog.result.pipe(map((result) => {
|
|
49
|
-
this.isOpen = false;
|
|
50
|
-
if (result instanceof DialogCloseResult) {
|
|
51
|
-
this.focusService.focus();
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
this.viewState.layoutEnd.pipe(take(1)).subscribe(() => this.focusService.focus());
|
|
55
|
-
const res = result;
|
|
56
|
-
return res.value;
|
|
57
|
-
}));
|
|
58
|
-
}
|
|
59
|
-
openRecurringConfirmationDialog(operation) {
|
|
60
|
-
const dialog = this.dialogService.open({
|
|
61
|
-
actions: [
|
|
62
|
-
{
|
|
63
|
-
text: operation === CrudOperation.Edit ? this.textFor('editOccurrence') : this.textFor('deleteOccurrence'),
|
|
64
|
-
value: EditMode.Occurrence
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
text: operation === CrudOperation.Edit ? this.textFor('editSeries') : this.textFor('deleteSeries'),
|
|
68
|
-
value: EditMode.Series
|
|
69
|
-
}
|
|
70
|
-
],
|
|
71
|
-
appendTo: this.container,
|
|
72
|
-
autoFocusedElement: 'button:nth-child(1)',
|
|
73
|
-
content: operation === CrudOperation.Edit ? this.textFor('editRecurringConfirmation') : this.textFor('deleteRecurringConfirmation'),
|
|
74
|
-
title: operation === CrudOperation.Edit ? this.textFor('editRecurringDialogTitle') : this.textFor('deleteRecurringDialogTitle')
|
|
75
|
-
});
|
|
76
|
-
this.isOpen = true;
|
|
77
|
-
this.changeDetector.markForCheck();
|
|
78
|
-
return dialog.result.pipe(map((result) => {
|
|
79
|
-
this.isOpen = false;
|
|
80
|
-
this.focusService.focus();
|
|
81
|
-
if (result instanceof DialogCloseResult) {
|
|
82
|
-
return undefined;
|
|
83
|
-
}
|
|
84
|
-
const res = result;
|
|
85
|
-
return res.value;
|
|
86
|
-
}));
|
|
87
|
-
}
|
|
88
|
-
textFor(key) {
|
|
89
|
-
return this.localization.get(key);
|
|
90
|
-
}
|
|
91
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DialogsService, deps: [{ token: i1.DialogService }, { token: i2.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i3.FocusService }, { token: i4.ViewStateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
92
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DialogsService });
|
|
93
|
-
}
|
|
94
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DialogsService, decorators: [{
|
|
95
|
-
type: Injectable
|
|
96
|
-
}], ctorParameters: () => [{ type: i1.DialogService }, { type: i2.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i3.FocusService }, { type: i4.ViewStateService }] });
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, TemplateRef, Optional, Input } from '@angular/core';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Represents the template directive for customizing the Scheduler edit dialog.
|
|
9
|
-
* To define the template, nest an `<ng-template>` tag
|
|
10
|
-
* with the `kendoSchedulerEditDialogTemplate` directive inside the `<kendo-scheduler>` tag ([see example](slug:custom_reactive_editing_scheduler)).
|
|
11
|
-
*
|
|
12
|
-
* The template context is set to the current event and the following additional fields are passed:
|
|
13
|
-
* - `event`—The currently edited event. Represents the default context that will be assigned to any template variable which utilizes the `let-x` syntax—for example, `let-event`.
|
|
14
|
-
* - `formGroup`—The current [`FormGroup`](https://angular.io/docs/ts/latest/api/forms/index/FormGroup-class.html).
|
|
15
|
-
* - `editMode`—The current edit mode.
|
|
16
|
-
* - `isNew`—The state of the current event.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```html
|
|
20
|
-
* <kendo-scheduler>
|
|
21
|
-
* <ng-template kendoSchedulerEditDialogTemplate let-formGroup="formGroup" let-isNew="isNew"
|
|
22
|
-
* autoFocusedElement=".title-input" let-editMode="editMode" let-event>
|
|
23
|
-
* <div>
|
|
24
|
-
* <label>Title:</label>
|
|
25
|
-
* <kendo-textbox placeholder="Title" [formControl]="formGroup.get('title') />
|
|
26
|
-
* </div>
|
|
27
|
-
* </ng-template>
|
|
28
|
-
* </kendo-scheduler>
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
export class EditDialogTemplateDirective {
|
|
32
|
-
templateRef;
|
|
33
|
-
/**
|
|
34
|
-
* Specifies the query selector used to set the initial focus.
|
|
35
|
-
*/
|
|
36
|
-
autoFocusedElement;
|
|
37
|
-
constructor(templateRef) {
|
|
38
|
-
this.templateRef = templateRef;
|
|
39
|
-
}
|
|
40
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditDialogTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
41
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: EditDialogTemplateDirective, isStandalone: true, selector: "[kendoSchedulerEditDialogTemplate]", inputs: { autoFocusedElement: "autoFocusedElement" }, ngImport: i0 });
|
|
42
|
-
}
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditDialogTemplateDirective, decorators: [{
|
|
44
|
-
type: Directive,
|
|
45
|
-
args: [{
|
|
46
|
-
selector: '[kendoSchedulerEditDialogTemplate]',
|
|
47
|
-
standalone: true
|
|
48
|
-
}]
|
|
49
|
-
}], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
|
|
50
|
-
type: Optional
|
|
51
|
-
}] }], propDecorators: { autoFocusedElement: [{
|
|
52
|
-
type: Input
|
|
53
|
-
}] } });
|