@progress/kendo-angular-scheduler 25.1.0-develop.18 → 25.1.0-develop.19

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.
@@ -18,10 +18,11 @@ import * as i1 from '@progress/kendo-angular-dialog';
18
18
  import { DialogCloseResult, DialogComponent, DialogActionsComponent, DialogContainerService, DialogService, WindowService, WindowContainerService } from '@progress/kendo-angular-dialog';
19
19
  import * as i4 from '@progress/kendo-angular-intl';
20
20
  import { formatDate, CldrIntlService, DatePipe, parseDate } from '@progress/kendo-angular-intl';
21
+ import * as i2$1 from '@progress/kendo-angular-buttons';
22
+ import { ButtonComponent, SegmentedControlComponent, DropDownButtonComponent, Button } from '@progress/kendo-angular-buttons';
21
23
  import { MultiSelectComponent, ItemTemplateDirective, TagTemplateDirective, DropDownListComponent } from '@progress/kendo-angular-dropdowns';
22
24
  import { NgStyle, NgTemplateOutlet, AsyncPipe, NgClass } from '@angular/common';
23
25
  import { rightDoubleQuotesIcon, clockIcon, commentIcon, globeIcon, arrowRotateCwIcon, trashIcon, calendarIcon, chevronRightIcon, chevronLeftIcon, plusIcon, filePdfIcon, arrowsNoRepeatIcon, xIcon, chevronUpIcon, chevronDownIcon } from '@progress/kendo-svg-icons';
24
- import { ButtonComponent, SegmentedControlComponent, DropDownButtonComponent, Button } from '@progress/kendo-angular-buttons';
25
26
  import { NumericTextBoxComponent, NumericTextBoxCustomMessagesComponent, FormFieldComponent, TextBoxDirective, TextAreaComponent, SwitchComponent } from '@progress/kendo-angular-inputs';
26
27
  import { parseRule, serializeRule, expand } from '@progress/kendo-recurrence';
27
28
  import { DatePickerComponent, DatePickerCustomMessagesComponent, TimePickerComponent, TimePickerCustomMessagesComponent, CalendarComponent, CalendarCustomMessagesComponent, MultiViewCalendarComponent, MonthCellTemplateDirective, CalendarDOMService, CenturyViewService, DecadeViewService, MonthViewService, YearViewService, NavigationService, TimePickerDOMService, HoursService, MinutesService, SecondsService, MillisecondsService, DayPeriodService } from '@progress/kendo-angular-dateinputs';
@@ -43,8 +44,8 @@ const packageMetadata = {
43
44
  productName: 'Kendo UI for Angular',
44
45
  productCode: 'KENDOUIANGULAR',
45
46
  productCodes: ['KENDOUIANGULAR'],
46
- publishDate: 1787934672,
47
- version: '25.1.0-develop.18',
47
+ publishDate: 1787937026,
48
+ version: '25.1.0-develop.19',
48
49
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
49
50
  };
50
51
 
@@ -2142,6 +2143,7 @@ class FocusService {
2142
2143
  elementMap = new WeakMap();
2143
2144
  subs = new Subscription();
2144
2145
  hasContentRendered = false;
2146
+ toolbarEntered = false;
2145
2147
  constructor(renderer, wrapper, domEvents, zone) {
2146
2148
  this.renderer = renderer;
2147
2149
  this.wrapper = wrapper;
@@ -2161,6 +2163,14 @@ class FocusService {
2161
2163
  const items = Array.from(this.focusableItems);
2162
2164
  if (item.containerType !== 'content') {
2163
2165
  this.items.add(item);
2166
+ if (!this.toolbarEntered && this.activeItem.containerType === 'toolbar') {
2167
+ const leftmost = this.leftmostToolbarItem;
2168
+ if (leftmost && leftmost !== this.activeItem) {
2169
+ this.activeItem.toggle(false);
2170
+ this.activeItem = leftmost;
2171
+ leftmost.toggle(true);
2172
+ }
2173
+ }
2164
2174
  }
2165
2175
  else {
2166
2176
  const newContentIndex = items.map(item => item.containerType).lastIndexOf('content') + 1;
@@ -2178,8 +2188,7 @@ class FocusService {
2178
2188
  else {
2179
2189
  this.items.add(item);
2180
2190
  }
2181
- // activate the first content element if there is one; otherwise, keep the toolbar or footer active
2182
- if (!this.hasContentRendered) {
2191
+ if (!this.hasContentRendered && item.canFocus() && this.activeItem.containerType !== 'toolbar') {
2183
2192
  this.activeItem.toggle(false);
2184
2193
  this.activeItem = item;
2185
2194
  item.toggle(true);
@@ -2195,6 +2204,14 @@ class FocusService {
2195
2204
  }
2196
2205
  this.items.delete(item);
2197
2206
  this.elementMap.delete(item.element.nativeElement);
2207
+ if (!this.toolbarEntered && this.activeItem?.containerType === 'toolbar') {
2208
+ const leftmost = this.leftmostToolbarItem;
2209
+ if (leftmost && leftmost !== this.activeItem) {
2210
+ this.activeItem.toggle(false);
2211
+ this.activeItem = leftmost;
2212
+ leftmost.toggle(true);
2213
+ }
2214
+ }
2198
2215
  this.toggleWrapper();
2199
2216
  }
2200
2217
  /**
@@ -2243,11 +2260,13 @@ class FocusService {
2243
2260
  this.activeItem = firstFocusableTool;
2244
2261
  }
2245
2262
  focusNext(options, containerType) {
2263
+ this.toolbarEntered = true;
2246
2264
  const currentItem = this.activeItem;
2247
2265
  this.activateNext(options, true, containerType);
2248
2266
  return this.activeItem !== currentItem;
2249
2267
  }
2250
2268
  focusByIndex(index, preventScroll = true) {
2269
+ this.toolbarEntered = true;
2251
2270
  const item = Array.from(this.items.values())[index];
2252
2271
  if (!item) {
2253
2272
  return;
@@ -2274,6 +2293,12 @@ class FocusService {
2274
2293
  next?.focus(false);
2275
2294
  }
2276
2295
  }
2296
+ get leftmostToolbarItem() {
2297
+ const toolbarItems = Array.from(this.focusableItems)
2298
+ .filter(item => item.containerType === 'toolbar' && item.canFocus())
2299
+ .sort((a, b) => a.focusIndex - b.focusIndex);
2300
+ return toolbarItems[0];
2301
+ }
2277
2302
  findNext(position, containerType) {
2278
2303
  const { offset, nowrap } = { nowrap: false, offset: 1, ...position };
2279
2304
  let items = Array.from(this.items.values())
@@ -2316,6 +2341,7 @@ class FocusService {
2316
2341
  return this.wrapper.nativeElement.contains(document.activeElement);
2317
2342
  }
2318
2343
  onFocusIn(e) {
2344
+ this.toolbarEntered = true;
2319
2345
  const item = this.findRegisteredElement(e.target);
2320
2346
  if (!item || item === this.focusedItem) {
2321
2347
  return;
@@ -2541,6 +2567,7 @@ class FocusableDirective {
2541
2567
  element;
2542
2568
  renderer;
2543
2569
  focusService;
2570
+ segmentedControl;
2544
2571
  /**
2545
2572
  * The order of the element with respect to the other focusable elements.
2546
2573
  * If multiple elements share the same value, their relative to each other order follows their position in the component tree.
@@ -2554,10 +2581,11 @@ class FocusableDirective {
2554
2581
  return !this.element.nativeElement.disabled;
2555
2582
  }
2556
2583
  active;
2557
- constructor(element, renderer, focusService) {
2584
+ constructor(element, renderer, focusService, segmentedControl) {
2558
2585
  this.element = element;
2559
2586
  this.renderer = renderer;
2560
2587
  this.focusService = focusService;
2588
+ this.segmentedControl = segmentedControl;
2561
2589
  this.toggle(false);
2562
2590
  }
2563
2591
  ngAfterViewChecked() {
@@ -2576,8 +2604,13 @@ class FocusableDirective {
2576
2604
  }
2577
2605
  toggle(active) {
2578
2606
  if (active !== this.active) {
2579
- const index = active ? '0' : '-1';
2580
- this.renderer.setAttribute(this.element.nativeElement, 'tabIndex', index);
2607
+ if (this.segmentedControl) {
2608
+ this.segmentedControl.setIsActiveTabStop(active);
2609
+ }
2610
+ else {
2611
+ const index = active ? '0' : '-1';
2612
+ this.renderer.setAttribute(this.element.nativeElement, 'tabIndex', index);
2613
+ }
2581
2614
  this.active = active;
2582
2615
  }
2583
2616
  }
@@ -2585,7 +2618,12 @@ class FocusableDirective {
2585
2618
  return this.visible && this.enabled;
2586
2619
  }
2587
2620
  focus(preventScroll = true) {
2588
- this.element.nativeElement.focus({ preventScroll });
2621
+ if (this.segmentedControl) {
2622
+ this.segmentedControl.focusSelectedButton(preventScroll);
2623
+ }
2624
+ else {
2625
+ this.element.nativeElement.focus({ preventScroll });
2626
+ }
2589
2627
  }
2590
2628
  toggleFocus(value) {
2591
2629
  const element = this.element.nativeElement;
@@ -2610,7 +2648,7 @@ class FocusableDirective {
2610
2648
  this.renderer.setAttribute(element, 'aria-selected', value.toString());
2611
2649
  }
2612
2650
  }
2613
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: FocusableDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: FocusService }], target: i0.ɵɵFactoryTarget.Directive });
2651
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: FocusableDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: FocusService }, { token: i2$1.SegmentedControlComponent, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
2614
2652
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.27", type: FocusableDirective, isStandalone: true, selector: "[kendoSchedulerFocusIndex]", inputs: { focusIndex: ["kendoSchedulerFocusIndex", "focusIndex"], containerType: "containerType" }, ngImport: i0 });
2615
2653
  }
2616
2654
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: FocusableDirective, decorators: [{
@@ -2619,7 +2657,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
2619
2657
  selector: '[kendoSchedulerFocusIndex]',
2620
2658
  standalone: true
2621
2659
  }]
2622
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: FocusService }], propDecorators: { focusIndex: [{
2660
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: FocusService }, { type: i2$1.SegmentedControlComponent, decorators: [{
2661
+ type: Optional
2662
+ }] }], propDecorators: { focusIndex: [{
2623
2663
  type: Input,
2624
2664
  args: ['kendoSchedulerFocusIndex']
2625
2665
  }], containerType: [{
@@ -22456,6 +22496,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
22456
22496
  }] } });
22457
22497
 
22458
22498
  const isContentWrapper = element => hasClasses(element, 'k-scheduler-content');
22499
+ const isArrowKeyHandledBySegmentedControl = (e) => e.defaultPrevented && Boolean(closest(e.target, node => hasClasses(node, 'k-segmented-control')));
22459
22500
  const CALENDAR_TAG = 'KENDO-CALENDAR-HORIZONTAL';
22460
22501
  /**
22461
22502
  * @hidden
@@ -22556,7 +22597,8 @@ class ShortcutsDirective {
22556
22597
  }, {
22557
22598
  match: e => {
22558
22599
  const code = normalizeKeys(e);
22559
- return (code === Keys.ArrowUp || code === Keys.ArrowLeft) && noModifiers(e) && !isContentWrapper(e.target);
22600
+ return (code === Keys.ArrowUp || code === Keys.ArrowLeft) && noModifiers(e) &&
22601
+ !isContentWrapper(e.target) && !isArrowKeyHandledBySegmentedControl(e);
22560
22602
  },
22561
22603
  action: e => {
22562
22604
  //use the MultiViewCalendar navigation for Year View
@@ -22582,7 +22624,8 @@ class ShortcutsDirective {
22582
22624
  }, {
22583
22625
  match: e => {
22584
22626
  const code = normalizeKeys(e);
22585
- return (code === Keys.ArrowDown || code === Keys.ArrowRight) && noModifiers(e) && !isContentWrapper(e.target);
22627
+ return (code === Keys.ArrowDown || code === Keys.ArrowRight) && noModifiers(e) &&
22628
+ !isContentWrapper(e.target) && !isArrowKeyHandledBySegmentedControl(e);
22586
22629
  },
22587
22630
  action: e => {
22588
22631
  //use the MultiViewCalendar navigation for Year View
package/index.d.ts CHANGED
@@ -14,7 +14,7 @@ import { SVGIcon } from '@progress/kendo-svg-icons';
14
14
  import { NumberFormatOptions, IntlService, CldrIntlService } from '@progress/kendo-angular-intl';
15
15
  import { DialogService } from '@progress/kendo-angular-dialog';
16
16
  import { pdf } from '@progress/kendo-drawing';
17
- import { Button, SegmentedItemSettings, ButtonComponent } from '@progress/kendo-angular-buttons';
17
+ import { SegmentedControlComponent, Button, SegmentedItemSettings, ButtonComponent } from '@progress/kendo-angular-buttons';
18
18
  import { RecurrenceRule } from '@progress/kendo-recurrence';
19
19
  import { CalendarView, DateInputFormatPlaceholder, PopupSettings, CalendarComponent } from '@progress/kendo-angular-dateinputs';
20
20
  import { DropDownListComponent, MultiSelectComponent } from '@progress/kendo-angular-dropdowns';
@@ -2167,6 +2167,7 @@ declare class FocusService implements OnDestroy {
2167
2167
  private elementMap;
2168
2168
  private subs;
2169
2169
  private hasContentRendered;
2170
+ private toolbarEntered;
2170
2171
  constructor(renderer: Renderer2, wrapper: ElementRef, domEvents: DomEventsService, zone: NgZone);
2171
2172
  ngOnDestroy(): void;
2172
2173
  register(item: FocusableElement): void;
@@ -2184,6 +2185,7 @@ declare class FocusService implements OnDestroy {
2184
2185
  focusByIndex(index: number, preventScroll?: boolean): void;
2185
2186
  private activate;
2186
2187
  private activateNext;
2188
+ private get leftmostToolbarItem();
2187
2189
  private findNext;
2188
2190
  private toggleWrapper;
2189
2191
  private shouldMoveFocusOnUnregister;
@@ -2239,6 +2241,7 @@ declare class FocusableDirective implements FocusableElement, OnInit {
2239
2241
  element: ElementRef;
2240
2242
  private renderer;
2241
2243
  private focusService;
2244
+ private segmentedControl;
2242
2245
  /**
2243
2246
  * The order of the element with respect to the other focusable elements.
2244
2247
  * If multiple elements share the same value, their relative to each other order follows their position in the component tree.
@@ -2248,7 +2251,7 @@ declare class FocusableDirective implements FocusableElement, OnInit {
2248
2251
  private get visible();
2249
2252
  private get enabled();
2250
2253
  private active;
2251
- constructor(element: ElementRef, renderer: Renderer2, focusService: FocusService);
2254
+ constructor(element: ElementRef, renderer: Renderer2, focusService: FocusService, segmentedControl: SegmentedControlComponent);
2252
2255
  ngAfterViewChecked(): void;
2253
2256
  ngOnInit(): void;
2254
2257
  ngOnDestroy(): void;
@@ -2256,7 +2259,7 @@ declare class FocusableDirective implements FocusableElement, OnInit {
2256
2259
  canFocus(): boolean;
2257
2260
  focus(preventScroll?: boolean): void;
2258
2261
  toggleFocus(value: boolean): void;
2259
- static ɵfac: i0.ɵɵFactoryDeclaration<FocusableDirective, never>;
2262
+ static ɵfac: i0.ɵɵFactoryDeclaration<FocusableDirective, [null, null, null, { optional: true; }]>;
2260
2263
  static ɵdir: i0.ɵɵDirectiveDeclaration<FocusableDirective, "[kendoSchedulerFocusIndex]", never, { "focusIndex": { "alias": "kendoSchedulerFocusIndex"; "required": false; }; "containerType": { "alias": "containerType"; "required": false; }; }, {}, never, never, true, never>;
2261
2264
  }
2262
2265
 
@@ -7,7 +7,7 @@ export const packageMetadata = {
7
7
  "productCodes": [
8
8
  "KENDOUIANGULAR"
9
9
  ],
10
- "publishDate": 1787934672,
11
- "version": "25.1.0-develop.18",
10
+ "publishDate": 1787937026,
11
+ "version": "25.1.0-develop.19",
12
12
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
13
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-scheduler",
3
- "version": "25.1.0-develop.18",
3
+ "version": "25.1.0-develop.19",
4
4
  "description": "Kendo UI Scheduler Angular - Outlook or Google-style angular scheduler calendar. Full-featured and customizable embedded scheduling from the creator developers trust for professional UI components.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -80,7 +80,7 @@
80
80
  "package": {
81
81
  "productName": "Kendo UI for Angular",
82
82
  "productCode": "KENDOUIANGULAR",
83
- "publishDate": 1787934672,
83
+ "publishDate": 1787937026,
84
84
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
85
85
  }
86
86
  },
@@ -93,23 +93,23 @@
93
93
  "@progress/kendo-data-query": "^1.7.3",
94
94
  "@progress/kendo-drawing": "^1.25.0",
95
95
  "@progress/kendo-licensing": "^1.11.0",
96
- "@progress/kendo-angular-tooltip": "25.1.0-develop.18",
97
- "@progress/kendo-angular-buttons": "25.1.0-develop.18",
98
- "@progress/kendo-angular-common": "25.1.0-develop.18",
99
- "@progress/kendo-angular-dateinputs": "25.1.0-develop.18",
100
- "@progress/kendo-angular-dialog": "25.1.0-develop.18",
101
- "@progress/kendo-angular-dropdowns": "25.1.0-develop.18",
102
- "@progress/kendo-angular-icons": "25.1.0-develop.18",
103
- "@progress/kendo-angular-inputs": "25.1.0-develop.18",
104
- "@progress/kendo-angular-intl": "25.1.0-develop.18",
105
- "@progress/kendo-angular-l10n": "25.1.0-develop.18",
106
- "@progress/kendo-angular-label": "25.1.0-develop.18",
107
- "@progress/kendo-angular-popup": "25.1.0-develop.18",
96
+ "@progress/kendo-angular-tooltip": "25.1.0-develop.19",
97
+ "@progress/kendo-angular-buttons": "25.1.0-develop.19",
98
+ "@progress/kendo-angular-common": "25.1.0-develop.19",
99
+ "@progress/kendo-angular-dateinputs": "25.1.0-develop.19",
100
+ "@progress/kendo-angular-dialog": "25.1.0-develop.19",
101
+ "@progress/kendo-angular-dropdowns": "25.1.0-develop.19",
102
+ "@progress/kendo-angular-icons": "25.1.0-develop.19",
103
+ "@progress/kendo-angular-inputs": "25.1.0-develop.19",
104
+ "@progress/kendo-angular-intl": "25.1.0-develop.19",
105
+ "@progress/kendo-angular-l10n": "25.1.0-develop.19",
106
+ "@progress/kendo-angular-label": "25.1.0-develop.19",
107
+ "@progress/kendo-angular-popup": "25.1.0-develop.19",
108
108
  "rxjs": "^6.5.3 || ^7.0.0"
109
109
  },
110
110
  "dependencies": {
111
111
  "tslib": "^2.3.1",
112
- "@progress/kendo-angular-schematics": "25.1.0-develop.18",
112
+ "@progress/kendo-angular-schematics": "25.1.0-develop.19",
113
113
  "@progress/kendo-date-math": "^1.3.2",
114
114
  "@progress/kendo-draggable": "^3.0.2",
115
115
  "@progress/kendo-file-saver": "^1.0.7",
@@ -9,10 +9,10 @@ const schematics_1 = require("@angular-devkit/schematics");
9
9
  function default_1(options) {
10
10
  const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'SchedulerModule', package: 'scheduler', peerDependencies: {
11
11
  // peer deps of the dropdowns
12
- '@progress/kendo-angular-treeview': '25.1.0-develop.18',
13
- '@progress/kendo-angular-navigation': '25.1.0-develop.18',
12
+ '@progress/kendo-angular-treeview': '25.1.0-develop.19',
13
+ '@progress/kendo-angular-navigation': '25.1.0-develop.19',
14
14
  // peer dependency of kendo-angular-inputs
15
- '@progress/kendo-angular-dialog': '25.1.0-develop.18',
15
+ '@progress/kendo-angular-dialog': '25.1.0-develop.19',
16
16
  // peer dependency of kendo-angular-icons
17
17
  '@progress/kendo-svg-icons': '^4.0.0'
18
18
  } });