@progress/kendo-angular-scheduler 4.3.1-dev.202208101208 → 4.3.1-dev.202208291508
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/bundles/kendo-angular-scheduler.umd.js +1 -1
- package/editing-directives/editing-directive-base.d.ts +3 -1
- package/editing-directives/reactive-editing.directive.d.ts +2 -1
- package/esm2015/editing-directives/editing-directive-base.js +7 -3
- package/esm2015/editing-directives/reactive-editing.directive.js +5 -4
- package/esm2015/navigation/focus.service.js +29 -4
- package/esm2015/navigation/focusable.directive.js +6 -1
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/toolbar/navigation.component.js +43 -19
- package/esm2015/views/common/view-footer.component.js +12 -8
- package/esm2015/views/month/month-view-item.component.js +3 -0
- package/esm2015/views/month/month-view-renderer.component.js +2 -2
- package/esm2015/views/view-items/base-view-item.js +1 -3
- package/fesm2015/kendo-angular-scheduler.js +105 -45
- package/navigation/focus.service.d.ts +6 -3
- package/package.json +1 -1
- package/toolbar/navigation.component.d.ts +19 -1
|
@@ -10,7 +10,7 @@ import * as i12$1 from '@progress/kendo-angular-common';
|
|
|
10
10
|
import { hasObservers, isDocumentAvailable, isChanged, Keys, anyChanged, ResizeSensorComponent, EventsModule, guid, ResizeSensorModule } from '@progress/kendo-angular-common';
|
|
11
11
|
import { isEqualDate, timezoneNames, ZonedDate, toLocalDate, getDate, Day, MS_PER_DAY, addDays, firstDayOfMonth, addMonths, firstDayInWeek } from '@progress/kendo-date-math';
|
|
12
12
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
13
|
-
import * as
|
|
13
|
+
import * as i5 from '@progress/kendo-angular-dateinputs';
|
|
14
14
|
import { PreventableEvent as PreventableEvent$1, CalendarModule, DateInputsModule } from '@progress/kendo-angular-dateinputs';
|
|
15
15
|
import { Subject, BehaviorSubject, fromEvent, Subscription, combineLatest, merge } from 'rxjs';
|
|
16
16
|
import { auditTime, buffer, filter, map, debounceTime, take, switchMap, tap, distinctUntilChanged } from 'rxjs/operators';
|
|
@@ -43,7 +43,7 @@ const packageMetadata = {
|
|
|
43
43
|
name: '@progress/kendo-angular-scheduler',
|
|
44
44
|
productName: 'Kendo UI for Angular',
|
|
45
45
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
46
|
-
publishDate:
|
|
46
|
+
publishDate: 1661785631,
|
|
47
47
|
version: '',
|
|
48
48
|
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'
|
|
49
49
|
};
|
|
@@ -1434,10 +1434,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1434
1434
|
* @hidden
|
|
1435
1435
|
*/
|
|
1436
1436
|
class FocusService {
|
|
1437
|
-
constructor(renderer, wrapper, domEvents) {
|
|
1437
|
+
constructor(renderer, wrapper, domEvents, zone) {
|
|
1438
1438
|
this.renderer = renderer;
|
|
1439
1439
|
this.wrapper = wrapper;
|
|
1440
1440
|
this.domEvents = domEvents;
|
|
1441
|
+
this.zone = zone;
|
|
1441
1442
|
this.ariaActiveDescendant = new EventEmitter();
|
|
1442
1443
|
this.items = new Set();
|
|
1443
1444
|
this.elementMap = new WeakMap();
|
|
@@ -1486,6 +1487,24 @@ class FocusService {
|
|
|
1486
1487
|
}
|
|
1487
1488
|
return this.activeItem !== currentItem;
|
|
1488
1489
|
}
|
|
1490
|
+
focusFirst() {
|
|
1491
|
+
const firstEvent = Array.from(this.items.values())[0];
|
|
1492
|
+
if (!firstEvent) {
|
|
1493
|
+
return;
|
|
1494
|
+
}
|
|
1495
|
+
this.activate(firstEvent.element.nativeElement);
|
|
1496
|
+
this.focus();
|
|
1497
|
+
this.zone.onStable.pipe(take(1)).subscribe(() => {
|
|
1498
|
+
const first = Array.from(this.items.values())[0];
|
|
1499
|
+
if (!first) {
|
|
1500
|
+
this.clearActiveDescendant();
|
|
1501
|
+
return;
|
|
1502
|
+
}
|
|
1503
|
+
const id = first.element.nativeElement.getAttribute('id');
|
|
1504
|
+
this.ariaActiveDescendant.next(id);
|
|
1505
|
+
this.lastActiveDescendantId = id;
|
|
1506
|
+
});
|
|
1507
|
+
}
|
|
1489
1508
|
clearActiveDescendant() {
|
|
1490
1509
|
this.ariaActiveDescendant.next(null);
|
|
1491
1510
|
}
|
|
@@ -1496,6 +1515,7 @@ class FocusService {
|
|
|
1496
1515
|
if (item === next) {
|
|
1497
1516
|
const id = item.element.nativeElement.getAttribute('id');
|
|
1498
1517
|
this.ariaActiveDescendant.next(id);
|
|
1518
|
+
this.lastActiveDescendantId = id;
|
|
1499
1519
|
}
|
|
1500
1520
|
});
|
|
1501
1521
|
this.activeItem = next;
|
|
@@ -1534,6 +1554,10 @@ class FocusService {
|
|
|
1534
1554
|
}
|
|
1535
1555
|
onFocusIn(e) {
|
|
1536
1556
|
const item = this.elementMap.get(e.target);
|
|
1557
|
+
const shouldRestoreActiveDescendant = this.lastActiveDescendantId && this.lastActiveDescendantId !== (item === null || item === void 0 ? void 0 : item.element.nativeElement.getAttribute('id'));
|
|
1558
|
+
if (shouldRestoreActiveDescendant) {
|
|
1559
|
+
this.ariaActiveDescendant.next(this.lastActiveDescendantId);
|
|
1560
|
+
}
|
|
1537
1561
|
if (!item || item === this.focusedItem) {
|
|
1538
1562
|
return;
|
|
1539
1563
|
}
|
|
@@ -1550,10 +1574,10 @@ class FocusService {
|
|
|
1550
1574
|
}
|
|
1551
1575
|
this.focusedItem.toggleFocus(false);
|
|
1552
1576
|
this.focusedItem = null;
|
|
1553
|
-
this.
|
|
1577
|
+
this.clearActiveDescendant();
|
|
1554
1578
|
}
|
|
1555
1579
|
}
|
|
1556
|
-
FocusService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusService, deps: [{ token: i0.Renderer2, optional: true }, { token: i0.ElementRef, optional: true }, { token: DomEventsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1580
|
+
FocusService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusService, deps: [{ token: i0.Renderer2, optional: true }, { token: i0.ElementRef, optional: true }, { token: DomEventsService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1557
1581
|
FocusService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusService });
|
|
1558
1582
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusService, decorators: [{
|
|
1559
1583
|
type: Injectable
|
|
@@ -1561,7 +1585,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1561
1585
|
type: Optional
|
|
1562
1586
|
}] }, { type: i0.ElementRef, decorators: [{
|
|
1563
1587
|
type: Optional
|
|
1564
|
-
}] }, { type: DomEventsService }]; } });
|
|
1588
|
+
}] }, { type: DomEventsService }, { type: i0.NgZone }]; } });
|
|
1565
1589
|
|
|
1566
1590
|
/**
|
|
1567
1591
|
* @hidden
|
|
@@ -1798,6 +1822,7 @@ class FocusableDirective {
|
|
|
1798
1822
|
this.element.nativeElement.focus();
|
|
1799
1823
|
}
|
|
1800
1824
|
toggleFocus(value) {
|
|
1825
|
+
var _a;
|
|
1801
1826
|
const focusedClass = 'k-selected';
|
|
1802
1827
|
const element = this.element.nativeElement;
|
|
1803
1828
|
if (value) {
|
|
@@ -1806,7 +1831,11 @@ class FocusableDirective {
|
|
|
1806
1831
|
else {
|
|
1807
1832
|
this.renderer.removeClass(element, focusedClass);
|
|
1808
1833
|
}
|
|
1809
|
-
|
|
1834
|
+
const selectable = element.matches('.k-scheduler-agendaview .k-scheduler-content .k-selected');
|
|
1835
|
+
if (selectable) {
|
|
1836
|
+
(_a = element.closest('.k-scheduler-agendaview').querySelector('[aria-selected="true"]')) === null || _a === void 0 ? void 0 : _a.removeAttribute('aria-selected');
|
|
1837
|
+
this.renderer.setAttribute(element, 'aria-selected', value.toString());
|
|
1838
|
+
}
|
|
1810
1839
|
}
|
|
1811
1840
|
}
|
|
1812
1841
|
FocusableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusableDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: FocusService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -2276,10 +2305,12 @@ const alwaysFalse = () => false;
|
|
|
2276
2305
|
* {% endmeta %}
|
|
2277
2306
|
*/
|
|
2278
2307
|
class ToolbarNavigationComponent {
|
|
2279
|
-
constructor(popupService, toolbarService, localization, cd) {
|
|
2308
|
+
constructor(popupService, toolbarService, localization, cd, viewContext) {
|
|
2280
2309
|
this.popupService = popupService;
|
|
2281
2310
|
this.toolbarService = toolbarService;
|
|
2282
2311
|
this.localization = localization;
|
|
2312
|
+
this.cd = cd;
|
|
2313
|
+
this.viewContext = viewContext;
|
|
2283
2314
|
/**
|
|
2284
2315
|
* @hidden
|
|
2285
2316
|
* TODO: Drop in next MAJOR version
|
|
@@ -2295,6 +2326,10 @@ class ToolbarNavigationComponent {
|
|
|
2295
2326
|
* TODO: Drop in next MAJOR version
|
|
2296
2327
|
*/
|
|
2297
2328
|
this.inlineGapStyle = 'inherit';
|
|
2329
|
+
/**
|
|
2330
|
+
* @hidden
|
|
2331
|
+
*/
|
|
2332
|
+
this.dateRangeText = { short: '', long: '', current: '' };
|
|
2298
2333
|
this.subs = this.localization.changes.subscribe(() => {
|
|
2299
2334
|
cd.markForCheck();
|
|
2300
2335
|
});
|
|
@@ -2340,6 +2375,16 @@ class ToolbarNavigationComponent {
|
|
|
2340
2375
|
onBlur() {
|
|
2341
2376
|
this.closePopup();
|
|
2342
2377
|
}
|
|
2378
|
+
ngOnInit() {
|
|
2379
|
+
this.subs.add(this.ctx.dateRange.subscribe(res => {
|
|
2380
|
+
this.dateRangeText.short = res === null || res === void 0 ? void 0 : res.shortText;
|
|
2381
|
+
this.dateRangeText.long = res === null || res === void 0 ? void 0 : res.text;
|
|
2382
|
+
this.setDateRangeText();
|
|
2383
|
+
}));
|
|
2384
|
+
this.subs.add(this.viewContext.resize.subscribe(() => {
|
|
2385
|
+
this.setDateRangeText();
|
|
2386
|
+
}));
|
|
2387
|
+
}
|
|
2343
2388
|
ngOnDestroy() {
|
|
2344
2389
|
this.subs.unsubscribe();
|
|
2345
2390
|
this.closePopup();
|
|
@@ -2406,8 +2451,13 @@ class ToolbarNavigationComponent {
|
|
|
2406
2451
|
this.popupRef = null;
|
|
2407
2452
|
}
|
|
2408
2453
|
}
|
|
2454
|
+
setDateRangeText() {
|
|
2455
|
+
const isDesktop = window.matchMedia('(min-width: 1024px)').matches;
|
|
2456
|
+
this.dateRangeText.current = isDesktop ? this.dateRangeText.long : this.dateRangeText.short;
|
|
2457
|
+
this.cd.detectChanges();
|
|
2458
|
+
}
|
|
2409
2459
|
}
|
|
2410
|
-
ToolbarNavigationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ToolbarNavigationComponent, deps: [{ token: i1$1.PopupService }, { token: ToolbarService }, { token: i2.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2460
|
+
ToolbarNavigationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ToolbarNavigationComponent, deps: [{ token: i1$1.PopupService }, { token: ToolbarService }, { token: i2.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: ViewContextService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2411
2461
|
ToolbarNavigationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ToolbarNavigationComponent, selector: "[kendoSchedulerToolbarNavigation]", inputs: { min: "min", max: "max" }, host: { properties: { "style.display": "this.inlineDisplayStyle", "style.flex-flow": "this.inlineFlexFlowStyle", "style.gap": "this.inlineGapStyle" } }, providers: [
|
|
2412
2462
|
PopupService
|
|
2413
2463
|
], viewQueries: [{ propertyName: "calendar", first: true, predicate: ["calendar"], descendants: true }], ngImport: i0, template: `
|
|
@@ -2438,18 +2488,19 @@ ToolbarNavigationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
2438
2488
|
</button>
|
|
2439
2489
|
</span>
|
|
2440
2490
|
|
|
2441
|
-
<
|
|
2491
|
+
<button
|
|
2492
|
+
#anchor
|
|
2493
|
+
kendoButton
|
|
2494
|
+
icon="calendar"
|
|
2495
|
+
fillMode="flat"
|
|
2442
2496
|
(click)="toggleSelectedDate({ nativeElement: anchor }, template)"
|
|
2443
2497
|
role="button"
|
|
2444
|
-
href="#"
|
|
2445
2498
|
class="k-nav-current"
|
|
2446
2499
|
tabindex="-1"
|
|
2447
2500
|
[attr.aria-live]="'polite'"
|
|
2448
2501
|
>
|
|
2449
|
-
<span
|
|
2450
|
-
|
|
2451
|
-
<span class="k-lg-date-format">{{ (ctx.dateRange | async)?.text }}</span>
|
|
2452
|
-
</a>
|
|
2502
|
+
<span>{{ dateRangeText?.current }}</span>
|
|
2503
|
+
</button>
|
|
2453
2504
|
|
|
2454
2505
|
<ng-template #template>
|
|
2455
2506
|
<kendo-calendar #calendar (blur)="onBlur()" (valueChange)="selectDate($event)" [value]="ctx.selectedDate | async" [min]="min" [max]="max">
|
|
@@ -2457,7 +2508,7 @@ ToolbarNavigationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
2457
2508
|
</kendo-calendar-messages>
|
|
2458
2509
|
</kendo-calendar>
|
|
2459
2510
|
</ng-template>
|
|
2460
|
-
`, isInline: true, components: [{ type:
|
|
2511
|
+
`, isInline: true, components: [{ type: i5.CalendarComponent, selector: "kendo-calendar", inputs: ["id", "focusedDate", "min", "max", "rangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "disabledDates", "navigation", "activeView", "bottomView", "topView", "type", "animateNavigation", "weekNumber", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "navigationItemTemplate"], outputs: ["activeViewChange", "navigate", "activeViewDateChange", "valueChange"], exportAs: ["kendo-calendar"] }, { type: i5.CalendarCustomMessagesComponent, selector: "kendo-calendar-messages" }], directives: [{ type: i3.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], pipes: { "async": i11.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2461
2512
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ToolbarNavigationComponent, decorators: [{
|
|
2462
2513
|
type: Component,
|
|
2463
2514
|
args: [{
|
|
@@ -2495,18 +2546,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2495
2546
|
</button>
|
|
2496
2547
|
</span>
|
|
2497
2548
|
|
|
2498
|
-
<
|
|
2549
|
+
<button
|
|
2550
|
+
#anchor
|
|
2551
|
+
kendoButton
|
|
2552
|
+
icon="calendar"
|
|
2553
|
+
fillMode="flat"
|
|
2499
2554
|
(click)="toggleSelectedDate({ nativeElement: anchor }, template)"
|
|
2500
2555
|
role="button"
|
|
2501
|
-
href="#"
|
|
2502
2556
|
class="k-nav-current"
|
|
2503
2557
|
tabindex="-1"
|
|
2504
2558
|
[attr.aria-live]="'polite'"
|
|
2505
2559
|
>
|
|
2506
|
-
<span
|
|
2507
|
-
|
|
2508
|
-
<span class="k-lg-date-format">{{ (ctx.dateRange | async)?.text }}</span>
|
|
2509
|
-
</a>
|
|
2560
|
+
<span>{{ dateRangeText?.current }}</span>
|
|
2561
|
+
</button>
|
|
2510
2562
|
|
|
2511
2563
|
<ng-template #template>
|
|
2512
2564
|
<kendo-calendar #calendar (blur)="onBlur()" (valueChange)="selectDate($event)" [value]="ctx.selectedDate | async" [min]="min" [max]="max">
|
|
@@ -2516,7 +2568,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2516
2568
|
</ng-template>
|
|
2517
2569
|
`
|
|
2518
2570
|
}]
|
|
2519
|
-
}], ctorParameters: function () { return [{ type: i1$1.PopupService }, { type: ToolbarService }, { type: i2.LocalizationService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { calendar: [{
|
|
2571
|
+
}], ctorParameters: function () { return [{ type: i1$1.PopupService }, { type: ToolbarService }, { type: i2.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: ViewContextService }]; }, propDecorators: { calendar: [{
|
|
2520
2572
|
type: ViewChild,
|
|
2521
2573
|
args: ['calendar', { static: false }]
|
|
2522
2574
|
}], inlineDisplayStyle: [{
|
|
@@ -3050,7 +3102,7 @@ SchedulerDateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion:
|
|
|
3050
3102
|
[(value)]='date'
|
|
3051
3103
|
(valueChange)='onValueChange($event)'
|
|
3052
3104
|
></kendo-timepicker>
|
|
3053
|
-
`, isInline: true, styles: ["\n kendo-datepicker,\n kendo-timepicker {\n width: 170px;\n }\n "], components: [{ type:
|
|
3105
|
+
`, isInline: true, styles: ["\n kendo-datepicker,\n kendo-timepicker {\n width: 170px;\n }\n "], components: [{ type: i5.DatePickerComponent, selector: "kendo-datepicker", inputs: ["cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "navigationItemTemplate", "focusableId", "activeView", "bottomView", "topView", "calendarType", "animateCalendarNavigation", "disabled", "readonly", "readOnlyInput", "popupSettings", "navigation", "min", "max", "incompleteDateValidation", "focusedDate", "value", "format", "twoDigitYearMax", "formatPlaceholder", "placeholder", "tabindex", "tabIndex", "disabledDates", "title", "rangeValidation", "disabledDatesValidation", "weekNumber", "size", "rounded", "fillMode"], outputs: ["valueChange", "focus", "blur", "open", "close"], exportAs: ["kendo-datepicker"] }, { type: i5.TimePickerComponent, selector: "kendo-timepicker", inputs: ["focusableId", "disabled", "readonly", "readOnlyInput", "format", "formatPlaceholder", "placeholder", "min", "max", "incompleteDateValidation", "cancelButton", "nowButton", "steps", "popupSettings", "tabindex", "tabIndex", "title", "rangeValidation", "value", "size", "rounded", "fillMode"], outputs: ["valueChange", "focus", "blur", "open", "close"], exportAs: ["kendo-timepicker"] }], directives: [{ type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
3054
3106
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SchedulerDateTimePickerComponent, decorators: [{
|
|
3055
3107
|
type: Component,
|
|
3056
3108
|
args: [{
|
|
@@ -4484,7 +4536,7 @@ RecurrenceEndRuleEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion:
|
|
|
4484
4536
|
</li>
|
|
4485
4537
|
</ul>
|
|
4486
4538
|
</div>
|
|
4487
|
-
`, isInline: true, components: [{ type: i12.NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode"], outputs: ["valueChange", "focus", "blur"], exportAs: ["kendoNumericTextBox"] }, { type:
|
|
4539
|
+
`, isInline: true, components: [{ type: i12.NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode"], outputs: ["valueChange", "focus", "blur"], exportAs: ["kendoNumericTextBox"] }, { type: i5.DatePickerComponent, selector: "kendo-datepicker", inputs: ["cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "navigationItemTemplate", "focusableId", "activeView", "bottomView", "topView", "calendarType", "animateCalendarNavigation", "disabled", "readonly", "readOnlyInput", "popupSettings", "navigation", "min", "max", "incompleteDateValidation", "focusedDate", "value", "format", "twoDigitYearMax", "formatPlaceholder", "placeholder", "tabindex", "tabIndex", "disabledDates", "title", "rangeValidation", "disabledDatesValidation", "weekNumber", "size", "rounded", "fillMode"], outputs: ["valueChange", "focus", "blur", "open", "close"], exportAs: ["kendo-datepicker"] }], directives: [{ type: EndRuleRadioButtonDirective, selector: "[kendoRecurrenceEndRuleRadioButton]", inputs: ["kendoRecurrenceEndRuleRadioButton"] }] });
|
|
4488
4540
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RecurrenceEndRuleEditorComponent, decorators: [{
|
|
4489
4541
|
type: Component,
|
|
4490
4542
|
args: [{
|
|
@@ -8880,8 +8932,7 @@ class BaseViewItem {
|
|
|
8880
8932
|
right: this.localization.rtl ? `${rect.left}px` : '',
|
|
8881
8933
|
top: `${rect.top}px`,
|
|
8882
8934
|
width: `${rect.width}px`,
|
|
8883
|
-
height: `${rect.height}px
|
|
8884
|
-
display: 'block'
|
|
8935
|
+
height: `${rect.height}px`
|
|
8885
8936
|
});
|
|
8886
8937
|
}
|
|
8887
8938
|
}
|
|
@@ -8892,7 +8943,6 @@ class BaseViewItem {
|
|
|
8892
8943
|
this.subs.add(this.slotService.slotsChange.subscribe(() => {
|
|
8893
8944
|
this.rect = null;
|
|
8894
8945
|
this.setStyles({
|
|
8895
|
-
display: 'none',
|
|
8896
8946
|
width: 0,
|
|
8897
8947
|
left: 0
|
|
8898
8948
|
});
|
|
@@ -9302,6 +9352,9 @@ class MonthViewItemComponent extends BaseViewItem {
|
|
|
9302
9352
|
this.toggle(false);
|
|
9303
9353
|
return;
|
|
9304
9354
|
}
|
|
9355
|
+
else {
|
|
9356
|
+
this.toggle(true);
|
|
9357
|
+
}
|
|
9305
9358
|
super.reflow();
|
|
9306
9359
|
}
|
|
9307
9360
|
}
|
|
@@ -10997,7 +11050,7 @@ MonthViewRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
10997
11050
|
</ng-container>
|
|
10998
11051
|
</table>
|
|
10999
11052
|
</div>
|
|
11000
|
-
<div class="k-scheduler-content" #content>
|
|
11053
|
+
<div class="k-scheduler-content" tabindex="0" #content>
|
|
11001
11054
|
<table class="k-scheduler-table k-user-select-none" #contentTable role="presentation">
|
|
11002
11055
|
<ng-container *ngFor="let resourceItem of verticalResources | resourceIterator; let verticalIndex = index; trackBy: itemIndex">
|
|
11003
11056
|
<tr *ngFor="let week of weeks; let rangeIndex = index; trackBy: itemIndex">
|
|
@@ -11125,7 +11178,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
11125
11178
|
</ng-container>
|
|
11126
11179
|
</table>
|
|
11127
11180
|
</div>
|
|
11128
|
-
<div class="k-scheduler-content" #content>
|
|
11181
|
+
<div class="k-scheduler-content" tabindex="0" #content>
|
|
11129
11182
|
<table class="k-scheduler-table k-user-select-none" #contentTable role="presentation">
|
|
11130
11183
|
<ng-container *ngFor="let resourceItem of verticalResources | resourceIterator; let verticalIndex = index; trackBy: itemIndex">
|
|
11131
11184
|
<tr *ngFor="let week of weeks; let rangeIndex = index; trackBy: itemIndex">
|
|
@@ -11317,10 +11370,12 @@ class ViewFooterComponent {
|
|
|
11317
11370
|
}
|
|
11318
11371
|
ViewFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ViewFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11319
11372
|
ViewFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ViewFooterComponent, selector: "[viewFooter]", inputs: { items: "items" }, outputs: { itemClick: "itemClick" }, host: { properties: { "class.k-scheduler-footer": "this.hostClasses", "class.k-toolbar": "this.hostClasses", "style.justify-content": "this.inlineJustifyContentStyle" } }, ngImport: i0, template: `
|
|
11320
|
-
<
|
|
11321
|
-
<
|
|
11322
|
-
|
|
11323
|
-
|
|
11373
|
+
<span class="k-scheduler-navigation">
|
|
11374
|
+
<button type="button" kendoButton *ngFor="let item of items" [ngClass]="item.cssClass" (click)="onItemClick($event, item)">
|
|
11375
|
+
<span class="k-button-icon k-icon" [ngClass]="item.iconClass"></span>
|
|
11376
|
+
<span class="k-button-text">{{ item.text }}</span>
|
|
11377
|
+
</button>
|
|
11378
|
+
</span>
|
|
11324
11379
|
`, isInline: true, directives: [{ type: i11.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i11.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
11325
11380
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ViewFooterComponent, decorators: [{
|
|
11326
11381
|
type: Component,
|
|
@@ -11328,10 +11383,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
11328
11383
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
11329
11384
|
selector: '[viewFooter]',
|
|
11330
11385
|
template: `
|
|
11331
|
-
<
|
|
11332
|
-
<
|
|
11333
|
-
|
|
11334
|
-
|
|
11386
|
+
<span class="k-scheduler-navigation">
|
|
11387
|
+
<button type="button" kendoButton *ngFor="let item of items" [ngClass]="item.cssClass" (click)="onItemClick($event, item)">
|
|
11388
|
+
<span class="k-button-icon k-icon" [ngClass]="item.iconClass"></span>
|
|
11389
|
+
<span class="k-button-text">{{ item.text }}</span>
|
|
11390
|
+
</button>
|
|
11391
|
+
</span>
|
|
11335
11392
|
`
|
|
11336
11393
|
}]
|
|
11337
11394
|
}], propDecorators: { hostClasses: [{
|
|
@@ -15411,10 +15468,11 @@ function seriesDate(head, occurrence, current, field) {
|
|
|
15411
15468
|
* @hidden
|
|
15412
15469
|
*/
|
|
15413
15470
|
class EditingDirectiveBase {
|
|
15414
|
-
constructor(scheduler, localDataChangesService, dialogsService) {
|
|
15471
|
+
constructor(scheduler, localDataChangesService, dialogsService, focusService) {
|
|
15415
15472
|
this.scheduler = scheduler;
|
|
15416
15473
|
this.localDataChangesService = localDataChangesService;
|
|
15417
15474
|
this.dialogsService = dialogsService;
|
|
15475
|
+
this.focusService = focusService;
|
|
15418
15476
|
/**
|
|
15419
15477
|
* Fires before the editing directive renders the **Add** dialog.
|
|
15420
15478
|
*/
|
|
@@ -15492,6 +15550,7 @@ class EditingDirectiveBase {
|
|
|
15492
15550
|
.subscribe((editMode) => {
|
|
15493
15551
|
if (editMode !== undefined) {
|
|
15494
15552
|
this.handleRemove(dataItem, editMode);
|
|
15553
|
+
this.focusService.focusFirst();
|
|
15495
15554
|
}
|
|
15496
15555
|
});
|
|
15497
15556
|
}
|
|
@@ -15500,6 +15559,7 @@ class EditingDirectiveBase {
|
|
|
15500
15559
|
.subscribe((shouldRemove) => {
|
|
15501
15560
|
if (shouldRemove) {
|
|
15502
15561
|
this.handleRemove(dataItem, 0 /* Event */);
|
|
15562
|
+
this.focusService.focusFirst();
|
|
15503
15563
|
}
|
|
15504
15564
|
});
|
|
15505
15565
|
}
|
|
@@ -15600,11 +15660,11 @@ class EditingDirectiveBase {
|
|
|
15600
15660
|
return editable && editable[action] !== false;
|
|
15601
15661
|
}
|
|
15602
15662
|
}
|
|
15603
|
-
EditingDirectiveBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EditingDirectiveBase, deps: [{ token: SchedulerComponent }, { token: LocalDataChangesService }, { token: DialogsService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
15663
|
+
EditingDirectiveBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EditingDirectiveBase, deps: [{ token: SchedulerComponent }, { token: LocalDataChangesService }, { token: DialogsService }, { token: FocusService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
15604
15664
|
EditingDirectiveBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: EditingDirectiveBase, inputs: { editService: "editService" }, outputs: { add: "add", edit: "edit" }, ngImport: i0 });
|
|
15605
15665
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EditingDirectiveBase, decorators: [{
|
|
15606
15666
|
type: Directive
|
|
15607
|
-
}], ctorParameters: function () { return [{ type: SchedulerComponent }, { type: LocalDataChangesService }, { type: DialogsService }]; }, propDecorators: { add: [{
|
|
15667
|
+
}], ctorParameters: function () { return [{ type: SchedulerComponent }, { type: LocalDataChangesService }, { type: DialogsService }, { type: FocusService }]; }, propDecorators: { add: [{
|
|
15608
15668
|
type: Output
|
|
15609
15669
|
}], edit: [{
|
|
15610
15670
|
type: Output
|
|
@@ -15617,8 +15677,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
15617
15677
|
* uses the [Reactive Angular Forms]({{ site.data.urls.angular['reactiveforms'] }}).
|
|
15618
15678
|
*/
|
|
15619
15679
|
class ReactiveEditingDirective extends EditingDirectiveBase {
|
|
15620
|
-
constructor(scheduler, localDataChangesService, dialogsService) {
|
|
15621
|
-
super(scheduler, localDataChangesService, dialogsService);
|
|
15680
|
+
constructor(scheduler, localDataChangesService, dialogsService, focusService) {
|
|
15681
|
+
super(scheduler, localDataChangesService, dialogsService, focusService);
|
|
15622
15682
|
this.scheduler = scheduler;
|
|
15623
15683
|
this.localDataChangesService = localDataChangesService;
|
|
15624
15684
|
this.dialogsService = dialogsService;
|
|
@@ -15692,14 +15752,14 @@ class ReactiveEditingDirective extends EditingDirectiveBase {
|
|
|
15692
15752
|
return false;
|
|
15693
15753
|
}
|
|
15694
15754
|
}
|
|
15695
|
-
ReactiveEditingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ReactiveEditingDirective, deps: [{ token: SchedulerComponent }, { token: LocalDataChangesService }, { token: DialogsService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
15755
|
+
ReactiveEditingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ReactiveEditingDirective, deps: [{ token: SchedulerComponent }, { token: LocalDataChangesService }, { token: DialogsService }, { token: FocusService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
15696
15756
|
ReactiveEditingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ReactiveEditingDirective, selector: "[kendoSchedulerReactiveEditing]", inputs: { createFormGroup: ["kendoSchedulerReactiveEditing", "createFormGroup"] }, usesInheritance: true, ngImport: i0 });
|
|
15697
15757
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ReactiveEditingDirective, decorators: [{
|
|
15698
15758
|
type: Directive,
|
|
15699
15759
|
args: [{
|
|
15700
15760
|
selector: '[kendoSchedulerReactiveEditing]'
|
|
15701
15761
|
}]
|
|
15702
|
-
}], ctorParameters: function () { return [{ type: SchedulerComponent }, { type: LocalDataChangesService }, { type: DialogsService }]; }, propDecorators: { createFormGroup: [{
|
|
15762
|
+
}], ctorParameters: function () { return [{ type: SchedulerComponent }, { type: LocalDataChangesService }, { type: DialogsService }, { type: FocusService }]; }, propDecorators: { createFormGroup: [{
|
|
15703
15763
|
type: Input,
|
|
15704
15764
|
args: ['kendoSchedulerReactiveEditing']
|
|
15705
15765
|
}] } });
|
|
@@ -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 { ElementRef, Renderer2, OnDestroy, EventEmitter } from '@angular/core';
|
|
5
|
+
import { ElementRef, Renderer2, OnDestroy, EventEmitter, NgZone } from '@angular/core';
|
|
6
6
|
import { FocusableElement } from './focusable-element.interface';
|
|
7
7
|
import { DomEventsService } from '../views/common/dom-events.service';
|
|
8
8
|
import { FocusPosition } from './focus-position.interface';
|
|
@@ -14,19 +14,22 @@ export declare class FocusService implements OnDestroy {
|
|
|
14
14
|
private renderer;
|
|
15
15
|
private wrapper;
|
|
16
16
|
private domEvents;
|
|
17
|
+
private zone;
|
|
17
18
|
get activeElement(): ElementRef;
|
|
18
19
|
ariaActiveDescendant: EventEmitter<string | null>;
|
|
19
20
|
private activeItem;
|
|
20
21
|
private focusedItem;
|
|
22
|
+
private lastActiveDescendantId;
|
|
21
23
|
private items;
|
|
22
24
|
private elementMap;
|
|
23
25
|
private subs;
|
|
24
|
-
constructor(renderer: Renderer2, wrapper: ElementRef, domEvents: DomEventsService);
|
|
26
|
+
constructor(renderer: Renderer2, wrapper: ElementRef, domEvents: DomEventsService, zone: NgZone);
|
|
25
27
|
ngOnDestroy(): void;
|
|
26
28
|
register(item: FocusableElement): void;
|
|
27
29
|
unregister(item: FocusableElement): void;
|
|
28
30
|
focus(): void;
|
|
29
31
|
focusNext(options?: FocusPosition): boolean;
|
|
32
|
+
focusFirst(): void;
|
|
30
33
|
clearActiveDescendant(): void;
|
|
31
34
|
private activate;
|
|
32
35
|
private activateNext;
|
|
@@ -34,6 +37,6 @@ export declare class FocusService implements OnDestroy {
|
|
|
34
37
|
private toggleWrapper;
|
|
35
38
|
private onFocusIn;
|
|
36
39
|
private onFocusOut;
|
|
37
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FocusService, [{ optional: true; }, { optional: true; }, null]>;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FocusService, [{ optional: true; }, { optional: true; }, null, null]>;
|
|
38
41
|
static ɵprov: i0.ɵɵInjectableDeclaration<FocusService>;
|
|
39
42
|
}
|
package/package.json
CHANGED
|
@@ -8,7 +8,16 @@ import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
|
8
8
|
import { ToolbarService } from './toolbar.service';
|
|
9
9
|
import { ToolbarContext } from './toolbar-context';
|
|
10
10
|
import { CalendarComponent } from '@progress/kendo-angular-dateinputs';
|
|
11
|
+
import { ViewContextService } from '../views/view-context.service';
|
|
11
12
|
import * as i0 from "@angular/core";
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
interface DateRangeText {
|
|
17
|
+
short: string;
|
|
18
|
+
long: string;
|
|
19
|
+
current: string;
|
|
20
|
+
}
|
|
12
21
|
/**
|
|
13
22
|
* A toolbar component which contains the controls for date navigation
|
|
14
23
|
* ([see example]({% slug toolbar_scheduler %}#toc-including-the-built-in-components)).
|
|
@@ -29,6 +38,8 @@ export declare class ToolbarNavigationComponent implements OnDestroy {
|
|
|
29
38
|
private popupService;
|
|
30
39
|
private toolbarService;
|
|
31
40
|
private localization;
|
|
41
|
+
private cd;
|
|
42
|
+
private viewContext;
|
|
32
43
|
set calendar(calendar: CalendarComponent);
|
|
33
44
|
/**
|
|
34
45
|
* @hidden
|
|
@@ -73,13 +84,18 @@ export declare class ToolbarNavigationComponent implements OnDestroy {
|
|
|
73
84
|
* @hidden
|
|
74
85
|
*/
|
|
75
86
|
get ctx(): ToolbarContext;
|
|
87
|
+
/**
|
|
88
|
+
* @hidden
|
|
89
|
+
*/
|
|
90
|
+
dateRangeText: DateRangeText;
|
|
76
91
|
private popupRef;
|
|
77
92
|
private subs;
|
|
78
|
-
constructor(popupService: PopupService, toolbarService: ToolbarService, localization: LocalizationService, cd: ChangeDetectorRef);
|
|
93
|
+
constructor(popupService: PopupService, toolbarService: ToolbarService, localization: LocalizationService, cd: ChangeDetectorRef, viewContext: ViewContextService);
|
|
79
94
|
/**
|
|
80
95
|
* @hidden
|
|
81
96
|
*/
|
|
82
97
|
onBlur(): void;
|
|
98
|
+
ngOnInit(): void;
|
|
83
99
|
ngOnDestroy(): void;
|
|
84
100
|
/**
|
|
85
101
|
* @hidden
|
|
@@ -102,6 +118,8 @@ export declare class ToolbarNavigationComponent implements OnDestroy {
|
|
|
102
118
|
*/
|
|
103
119
|
todayClick(): boolean;
|
|
104
120
|
protected closePopup(): void;
|
|
121
|
+
private setDateRangeText;
|
|
105
122
|
static ɵfac: i0.ɵɵFactoryDeclaration<ToolbarNavigationComponent, never>;
|
|
106
123
|
static ɵcmp: i0.ɵɵComponentDeclaration<ToolbarNavigationComponent, "[kendoSchedulerToolbarNavigation]", never, { "min": "min"; "max": "max"; }, {}, never, never>;
|
|
107
124
|
}
|
|
125
|
+
export {};
|