@progress/kendo-angular-layout 11.0.0-develop.102 → 11.0.0-develop.104

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.
Files changed (50) hide show
  1. package/avatar/avatar.component.d.ts +9 -5
  2. package/avatar.module.d.ts +2 -1
  3. package/drawer/item.component.d.ts +6 -1
  4. package/drawer/models/drawer-item.interface.d.ts +11 -1
  5. package/drawer.module.d.ts +2 -1
  6. package/esm2020/avatar/avatar.component.mjs +33 -16
  7. package/esm2020/avatar.module.mjs +4 -3
  8. package/esm2020/drawer/drawer.component.mjs +1 -0
  9. package/esm2020/drawer/item.component.mjs +62 -21
  10. package/esm2020/drawer.module.mjs +4 -3
  11. package/esm2020/expansionpanel/expansionpanel.component.mjs +72 -9
  12. package/esm2020/expansionpanel.module.mjs +4 -3
  13. package/esm2020/package-metadata.mjs +1 -1
  14. package/esm2020/panelbar/panelbar-item.component.mjs +88 -25
  15. package/esm2020/panelbar/panelbar.component.mjs +3 -1
  16. package/esm2020/panelbar.module.mjs +4 -3
  17. package/esm2020/splitter/splitter-bar.component.mjs +60 -23
  18. package/esm2020/splitter.module.mjs +7 -3
  19. package/esm2020/stepper/list.component.mjs +10 -1
  20. package/esm2020/stepper/step.component.mjs +82 -20
  21. package/esm2020/stepper/stepper.component.mjs +24 -2
  22. package/esm2020/stepper.module.mjs +4 -3
  23. package/esm2020/tabstrip/models/scrollable-settings.mjs +4 -2
  24. package/esm2020/tabstrip/models/tabstrip-tab.component.mjs +5 -1
  25. package/esm2020/tabstrip/rendering/tab.component.mjs +41 -15
  26. package/esm2020/tabstrip/scrollable-button.component.mjs +55 -30
  27. package/esm2020/tabstrip/tabstrip.component.mjs +30 -6
  28. package/esm2020/tabstrip.module.mjs +5 -3
  29. package/expansionpanel/expansionpanel.component.d.ts +25 -2
  30. package/expansionpanel.module.d.ts +2 -1
  31. package/fesm2015/progress-kendo-angular-layout.mjs +577 -181
  32. package/fesm2020/progress-kendo-angular-layout.mjs +577 -181
  33. package/package.json +7 -5
  34. package/panelbar/panelbar-item-model.d.ts +6 -0
  35. package/panelbar/panelbar-item.component.d.ts +29 -1
  36. package/panelbar.module.d.ts +2 -1
  37. package/schematics/ngAdd/index.js +4 -2
  38. package/splitter/splitter-bar.component.d.ts +8 -5
  39. package/splitter.module.d.ts +2 -1
  40. package/stepper/list.component.d.ts +5 -1
  41. package/stepper/models/stepper-step.interface.d.ts +6 -0
  42. package/stepper/step.component.d.ts +13 -3
  43. package/stepper/stepper.component.d.ts +21 -1
  44. package/stepper.module.d.ts +2 -1
  45. package/tabstrip/models/scrollable-settings.d.ts +11 -0
  46. package/tabstrip/models/tabstrip-tab.component.d.ts +13 -3
  47. package/tabstrip/rendering/tab.component.d.ts +5 -1
  48. package/tabstrip/scrollable-button.component.d.ts +5 -1
  49. package/tabstrip/tabstrip.component.d.ts +14 -3
  50. package/tabstrip.module.d.ts +3 -1
@@ -2,6 +2,7 @@
2
2
  * Copyright © 2023 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
+ /* eslint-disable @typescript-eslint/no-explicit-any */
5
6
  import { Component, Input, ContentChildren, ViewChildren, Optional, Host, HostBinding, SkipSelf, isDevMode, TemplateRef, QueryList, ViewChild, ElementRef, Renderer2 } from '@angular/core';
6
7
  import { animate, trigger, style, state, transition, AUTO_STYLE } from '@angular/animations';
7
8
  import { PanelBarService } from "./panelbar.service";
@@ -10,9 +11,11 @@ import { PanelBarItemTitleDirective } from "./panelbar-item-title.directive";
10
11
  import { isFocusable } from '../common/dom-queries';
11
12
  import { Subscription } from 'rxjs';
12
13
  import { PanelBarExpandMode } from './panelbar-expand-mode';
14
+ import { arrowDownIcon, arrowUpIcon } from '@progress/kendo-svg-icons';
13
15
  import * as i0 from "@angular/core";
14
16
  import * as i1 from "./panelbar.service";
15
- import * as i2 from "@angular/common";
17
+ import * as i2 from "@progress/kendo-angular-icons";
18
+ import * as i3 from "@angular/common";
16
19
  /**
17
20
  * @hidden
18
21
  */
@@ -61,6 +64,14 @@ export class PanelBarItemComponent {
61
64
  this.role = "treeitem";
62
65
  this.titleAttribute = null; // eslint-disable-line
63
66
  this.kItemClass = true;
67
+ /**
68
+ * @hidden
69
+ */
70
+ this.arrowUpSVGIcon = arrowUpIcon;
71
+ /**
72
+ * @hidden
73
+ */
74
+ this.arrowDownSVGIcon = arrowDownIcon;
64
75
  this.focused = false;
65
76
  this.wrapperFocused = false;
66
77
  this.subscriptions = new Subscription(() => { });
@@ -70,6 +81,19 @@ export class PanelBarItemComponent {
70
81
  this.wrapperFocused = parent ? parent.focused : false;
71
82
  this.level = this.parent ? this.parent.level + 1 : 0;
72
83
  }
84
+ /**
85
+ * Defines an SVGIcon to be rendered.
86
+ * The input can take either an [existing Kendo SVG icon](slug:svgicon_list) or a custom one.
87
+ */
88
+ set svgIcon(icon) {
89
+ if (isDevMode() && icon && this.icon && this.iconClass) {
90
+ throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
91
+ }
92
+ this._svgIcon = icon;
93
+ }
94
+ get svgIcon() {
95
+ return this._svgIcon;
96
+ }
73
97
  /**
74
98
  * When set to `true`, expands the PanelBar item ([see example]({% slug items_panelbar %}#toc-expanded-state)).
75
99
  */
@@ -161,10 +185,30 @@ export class PanelBarItemComponent {
161
185
  * @hidden
162
186
  */
163
187
  get iconClasses() {
164
- const icon = this.icon ? 'k-i-' + this.icon : null;
165
- return {
166
- [icon || this.iconClass]: true
167
- };
188
+ if (this.icon) {
189
+ return `${this.icon}`;
190
+ }
191
+ }
192
+ /**
193
+ * @hidden
194
+ */
195
+ get customIconClasses() {
196
+ if (this.iconClass) {
197
+ return `${this.iconClass}`;
198
+ }
199
+ }
200
+ /**
201
+ * @hidden
202
+ */
203
+ get dirInnerCssClasses() {
204
+ const dirClass = this.expanded ? 'k-panelbar-collapse' : 'k-panelbar-expand';
205
+ return `k-panelbar-toggle ${dirClass}`;
206
+ }
207
+ /**
208
+ * @hidden
209
+ */
210
+ get arrowSVGIcon() {
211
+ return this.expanded ? this.arrowUpSVGIcon : this.arrowDownSVGIcon;
168
212
  }
169
213
  /**
170
214
  * @hidden
@@ -177,6 +221,7 @@ export class PanelBarItemComponent {
177
221
  focused: this.focused,
178
222
  icon: this.icon,
179
223
  iconClass: this.iconClass,
224
+ svgIcon: this.svgIcon,
180
225
  id: this.id,
181
226
  imageUrl: this.imageUrl,
182
227
  selected: this.selected,
@@ -239,7 +284,7 @@ export class PanelBarItemComponent {
239
284
  }
240
285
  }
241
286
  PanelBarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PanelBarItemComponent, deps: [{ token: PanelBarItemComponent, host: true, optional: true, skipSelf: true }, { token: i1.PanelBarService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
242
- PanelBarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PanelBarItemComponent, selector: "kendo-panelbar-item", inputs: { title: "title", id: "id", icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl", disabled: "disabled", expanded: "expanded", selected: "selected", content: "content", items: "items", template: "template" }, host: { properties: { "attr.role": "this.role", "attr.title": "this.titleAttribute", "class.k-panelbar-item": "this.kItemClass", "class.k-state-default": "this.kStateDefaultClass", "class.k-expanded": "this.kStateExpandedClass", "id": "this.itemId", "attr.aria-expanded": "this.ariaExpanded", "attr.aria-selected": "this.ariaSelected", "attr.aria-disabled": "this.ariaDisabled", "class.k-panelbar-header": "this.headerClass" } }, queries: [{ propertyName: "contentItems", predicate: PanelBarItemComponent }, { propertyName: "contentTemplate", predicate: PanelBarContentDirective }, { propertyName: "titleTemplates", predicate: PanelBarItemTitleDirective }], viewQueries: [{ propertyName: "header", first: true, predicate: ["header"], descendants: true }, { propertyName: "contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true }, { propertyName: "viewChildItems", predicate: PanelBarItemComponent, descendants: true }], exportAs: ["kendoPanelbarItem"], ngImport: i0, template: `
287
+ PanelBarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PanelBarItemComponent, selector: "kendo-panelbar-item", inputs: { title: "title", id: "id", icon: "icon", iconClass: "iconClass", svgIcon: "svgIcon", imageUrl: "imageUrl", disabled: "disabled", expanded: "expanded", selected: "selected", content: "content", items: "items", template: "template" }, host: { properties: { "attr.role": "this.role", "attr.title": "this.titleAttribute", "class.k-panelbar-item": "this.kItemClass", "class.k-state-default": "this.kStateDefaultClass", "class.k-expanded": "this.kStateExpandedClass", "id": "this.itemId", "attr.aria-expanded": "this.ariaExpanded", "attr.aria-selected": "this.ariaSelected", "attr.aria-disabled": "this.ariaDisabled", "class.k-panelbar-header": "this.headerClass" } }, queries: [{ propertyName: "contentItems", predicate: PanelBarItemComponent }, { propertyName: "contentTemplate", predicate: PanelBarContentDirective }, { propertyName: "titleTemplates", predicate: PanelBarItemTitleDirective }], viewQueries: [{ propertyName: "header", first: true, predicate: ["header"], descendants: true }, { propertyName: "contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true }, { propertyName: "viewChildItems", predicate: PanelBarItemComponent, descendants: true }], exportAs: ["kendoPanelbarItem"], ngImport: i0, template: `
243
288
  <span
244
289
  #header
245
290
  [class.k-link]="true"
@@ -247,11 +292,14 @@ PanelBarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
247
292
  [class.k-focus]="focused && wrapperFocused"
248
293
  [class.k-disabled]="disabled"
249
294
  (click)="onItemClick($event)">
250
- <span
251
- *ngIf="icon || iconClass"
252
- class="k-icon k-panelbar-item-icon"
253
- [ngClass]="iconClasses">
254
- </span>
295
+ <kendo-icon-wrapper
296
+ *ngIf="icon || iconClass || svgIcon"
297
+ [name]="iconClasses"
298
+ [customFontClass]="customIconClasses"
299
+ [svgIcon]="svgIcon"
300
+ innerCssClass="k-panelbar-item-icon"
301
+ >
302
+ </kendo-icon-wrapper>
255
303
  <img
256
304
  *ngIf="imageUrl"
257
305
  class="k-image k-panelbar-item-icon"
@@ -266,6 +314,7 @@ PanelBarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
266
314
  id: id,
267
315
  icon: icon,
268
316
  iconClass: iconClass,
317
+ svgIcon: svgIcon,
269
318
  imageUrl: imageUrl,
270
319
  selected: selected,
271
320
  expanded: expanded,
@@ -274,10 +323,13 @@ PanelBarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
274
323
  content: content
275
324
  }
276
325
  }"></ng-template>
277
- <span *ngIf="hasChildItems || hasContent"
278
- class="k-icon k-panelbar-toggle"
279
- [ngClass]="{'k-i-chevron-up k-panelbar-collapse': expanded, 'k-i-chevron-down k-panelbar-expand': !expanded}">
280
- </span>
326
+ <kendo-icon-wrapper
327
+ *ngIf="hasChildItems || hasContent"
328
+ [name]="expanded ? 'arrow-chevron-up' : 'chevron-down'"
329
+ [svgIcon]="arrowSVGIcon"
330
+ [innerCssClass]="dirInnerCssClasses"
331
+ >
332
+ </kendo-icon-wrapper>
281
333
  </span>
282
334
  <div
283
335
  #contentWrapper
@@ -323,6 +375,7 @@ PanelBarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
323
375
  [id]="item.id"
324
376
  [icon]="item.icon"
325
377
  [iconClass]="item.iconClass"
378
+ [svgIcon]="item.svgIcon"
326
379
  [imageUrl]="item.imageUrl"
327
380
  [selected]="!!item.selected"
328
381
  [expanded]="!!item.expanded"
@@ -353,7 +406,7 @@ PanelBarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
353
406
  </ng-template>
354
407
  <ng-template [ngIf]="!template">{{content}}</ng-template>
355
408
  </div>
356
- </div>`, isInline: true, components: [{ type: PanelBarItemComponent, selector: "kendo-panelbar-item", inputs: ["title", "id", "icon", "iconClass", "imageUrl", "disabled", "expanded", "selected", "content", "items", "template"], exportAs: ["kendoPanelbarItem"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], animations: [
409
+ </div>`, isInline: true, components: [{ type: i2.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: PanelBarItemComponent, selector: "kendo-panelbar-item", inputs: ["title", "id", "icon", "iconClass", "svgIcon", "imageUrl", "disabled", "expanded", "selected", "content", "items", "template"], exportAs: ["kendoPanelbarItem"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], animations: [
357
410
  trigger('toggle', [
358
411
  state('inactive', style({ display: 'none' })),
359
412
  transition('* => active', [
@@ -392,11 +445,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
392
445
  [class.k-focus]="focused && wrapperFocused"
393
446
  [class.k-disabled]="disabled"
394
447
  (click)="onItemClick($event)">
395
- <span
396
- *ngIf="icon || iconClass"
397
- class="k-icon k-panelbar-item-icon"
398
- [ngClass]="iconClasses">
399
- </span>
448
+ <kendo-icon-wrapper
449
+ *ngIf="icon || iconClass || svgIcon"
450
+ [name]="iconClasses"
451
+ [customFontClass]="customIconClasses"
452
+ [svgIcon]="svgIcon"
453
+ innerCssClass="k-panelbar-item-icon"
454
+ >
455
+ </kendo-icon-wrapper>
400
456
  <img
401
457
  *ngIf="imageUrl"
402
458
  class="k-image k-panelbar-item-icon"
@@ -411,6 +467,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
411
467
  id: id,
412
468
  icon: icon,
413
469
  iconClass: iconClass,
470
+ svgIcon: svgIcon,
414
471
  imageUrl: imageUrl,
415
472
  selected: selected,
416
473
  expanded: expanded,
@@ -419,10 +476,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
419
476
  content: content
420
477
  }
421
478
  }"></ng-template>
422
- <span *ngIf="hasChildItems || hasContent"
423
- class="k-icon k-panelbar-toggle"
424
- [ngClass]="{'k-i-chevron-up k-panelbar-collapse': expanded, 'k-i-chevron-down k-panelbar-expand': !expanded}">
425
- </span>
479
+ <kendo-icon-wrapper
480
+ *ngIf="hasChildItems || hasContent"
481
+ [name]="expanded ? 'arrow-chevron-up' : 'chevron-down'"
482
+ [svgIcon]="arrowSVGIcon"
483
+ [innerCssClass]="dirInnerCssClasses"
484
+ >
485
+ </kendo-icon-wrapper>
426
486
  </span>
427
487
  <div
428
488
  #contentWrapper
@@ -468,6 +528,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
468
528
  [id]="item.id"
469
529
  [icon]="item.icon"
470
530
  [iconClass]="item.iconClass"
531
+ [svgIcon]="item.svgIcon"
471
532
  [imageUrl]="item.imageUrl"
472
533
  [selected]="!!item.selected"
473
534
  [expanded]="!!item.expanded"
@@ -514,6 +575,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
514
575
  type: Input
515
576
  }], iconClass: [{
516
577
  type: Input
578
+ }], svgIcon: [{
579
+ type: Input
517
580
  }], imageUrl: [{
518
581
  type: Input
519
582
  }], disabled: [{
@@ -499,6 +499,7 @@ PanelBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
499
499
  [id]="item.id"
500
500
  [icon]="item.icon"
501
501
  [iconClass]="item.iconClass"
502
+ [svgIcon]="item.svgIcon"
502
503
  [imageUrl]="item.imageUrl"
503
504
  [selected]="!!item.selected"
504
505
  [expanded]="!!item.expanded"
@@ -510,7 +511,7 @@ PanelBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
510
511
  </kendo-panelbar-item>
511
512
  </ng-container>
512
513
  </ng-template>
513
- `, isInline: true, components: [{ type: i3.PanelBarItemComponent, selector: "kendo-panelbar-item", inputs: ["title", "id", "icon", "iconClass", "imageUrl", "disabled", "expanded", "selected", "content", "items", "template"], exportAs: ["kendoPanelbarItem"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
514
+ `, isInline: true, components: [{ type: i3.PanelBarItemComponent, selector: "kendo-panelbar-item", inputs: ["title", "id", "icon", "iconClass", "svgIcon", "imageUrl", "disabled", "expanded", "selected", "content", "items", "template"], exportAs: ["kendoPanelbarItem"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
514
515
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PanelBarComponent, decorators: [{
515
516
  type: Component,
516
517
  args: [{
@@ -533,6 +534,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
533
534
  [id]="item.id"
534
535
  [icon]="item.icon"
535
536
  [iconClass]="item.iconClass"
537
+ [svgIcon]="item.svgIcon"
536
538
  [imageUrl]="item.imageUrl"
537
539
  [selected]="!!item.selected"
538
540
  [expanded]="!!item.expanded"
@@ -9,6 +9,7 @@ import { PanelBarItemComponent } from './panelbar/panelbar-item.component';
9
9
  import { PanelBarContentDirective } from './panelbar/panelbar-content.directive';
10
10
  import { PanelBarItemTemplateDirective } from './panelbar/panelbar-item-template.directive';
11
11
  import { PanelBarItemTitleDirective } from './panelbar/panelbar-item-title.directive';
12
+ import { IconsModule } from '@progress/kendo-angular-icons';
12
13
  import * as i0 from "@angular/core";
13
14
  const exportedModules = [
14
15
  PanelBarComponent,
@@ -38,17 +39,17 @@ PanelBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
38
39
  PanelBarItemComponent,
39
40
  PanelBarContentDirective,
40
41
  PanelBarItemTemplateDirective,
41
- PanelBarItemTitleDirective], imports: [CommonModule], exports: [PanelBarComponent,
42
+ PanelBarItemTitleDirective], imports: [CommonModule, IconsModule], exports: [PanelBarComponent,
42
43
  PanelBarItemComponent,
43
44
  PanelBarContentDirective,
44
45
  PanelBarItemTemplateDirective,
45
46
  PanelBarItemTitleDirective] });
46
- PanelBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PanelBarModule, imports: [[CommonModule]] });
47
+ PanelBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PanelBarModule, imports: [[CommonModule, IconsModule]] });
47
48
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PanelBarModule, decorators: [{
48
49
  type: NgModule,
49
50
  args: [{
50
51
  declarations: [declarations],
51
52
  exports: [exportedModules],
52
- imports: [CommonModule]
53
+ imports: [CommonModule, IconsModule]
53
54
  }]
54
55
  }] });
@@ -2,6 +2,7 @@
2
2
  * Copyright © 2023 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
+ /* eslint-disable @typescript-eslint/no-explicit-any */
5
6
  import { Component, ElementRef, Host, HostBinding, Input, Renderer2 } from '@angular/core';
6
7
  import { LocalizationService } from '@progress/kendo-angular-l10n';
7
8
  import { DraggableDirective, Keys } from '@progress/kendo-angular-common';
@@ -9,11 +10,13 @@ import { SplitterService } from './splitter.service';
9
10
  import { Subscription, of } from 'rxjs';
10
11
  import { delay, filter, map, switchMap, takeUntil, tap } from 'rxjs/operators';
11
12
  import { shouldToggleOrResize } from './util';
13
+ import { caretAltDownIcon, caretAltLeftIcon, caretAltRightIcon, caretAltUpIcon } from '@progress/kendo-svg-icons';
12
14
  import * as i0 from "@angular/core";
13
15
  import * as i1 from "@progress/kendo-angular-common";
14
- import * as i2 from "./splitter.service";
15
- import * as i3 from "@progress/kendo-angular-l10n";
16
- import * as i4 from "@angular/common";
16
+ import * as i2 from "@progress/kendo-angular-l10n";
17
+ import * as i3 from "./splitter.service";
18
+ import * as i4 from "@progress/kendo-angular-icons";
19
+ import * as i5 from "@angular/common";
17
20
  const stopPropagation = ({ originalEvent: event }) => {
18
21
  event.stopPropagation();
19
22
  event.preventDefault();
@@ -31,11 +34,11 @@ const createMoveStream = (draggable) => mouseDown => draggable.kendoDrag
31
34
  * @hidden
32
35
  */
33
36
  export class SplitterBarComponent {
34
- constructor(draggable, element, splitterService, localization, renderer) {
37
+ constructor(draggable, localization, splitterService, element, renderer) {
35
38
  this.draggable = draggable;
36
- this.element = element;
37
- this.splitterService = splitterService;
38
39
  this.localization = localization;
40
+ this.splitterService = splitterService;
41
+ this.element = element;
39
42
  this.renderer = renderer;
40
43
  this.orientation = 'horizontal';
41
44
  this.index = 0;
@@ -125,26 +128,60 @@ export class SplitterBarComponent {
125
128
  const isCollapsed = pane.collapsed;
126
129
  const isHorizontal = this.orientation === 'horizontal';
127
130
  return classFromObject({
128
- 'k-icon': true,
129
- 'k-i-caret-alt-left': isCollapsible && isHorizontal && !isCollapsed,
130
- 'k-i-caret-alt-right': isCollapsible && isHorizontal && isCollapsed,
131
- 'k-i-caret-alt-up': isCollapsible && !isHorizontal && !isCollapsed,
132
- 'k-i-caret-alt-down': isCollapsible && !isHorizontal && isCollapsed
131
+ 'caret-alt-left': isCollapsible && isHorizontal && !isCollapsed,
132
+ 'caret-alt-right': isCollapsible && isHorizontal && isCollapsed,
133
+ 'caret-alt-up': isCollapsible && !isHorizontal && !isCollapsed,
134
+ 'caret-alt-down': isCollapsible && !isHorizontal && isCollapsed
133
135
  });
134
136
  }
137
+ previousSVGArrowClass() {
138
+ const pane = this.splitterService.pane(this.index);
139
+ const isCollapsible = pane.collapsible;
140
+ const isCollapsed = pane.collapsed;
141
+ const isHorizontal = this.orientation === 'horizontal';
142
+ if (isCollapsible && isHorizontal && !isCollapsed) {
143
+ return caretAltLeftIcon;
144
+ }
145
+ if (isCollapsible && isHorizontal && isCollapsed) {
146
+ return caretAltRightIcon;
147
+ }
148
+ if (isCollapsible && !isHorizontal && !isCollapsed) {
149
+ return caretAltUpIcon;
150
+ }
151
+ if (isCollapsible && !isHorizontal && isCollapsed) {
152
+ return caretAltDownIcon;
153
+ }
154
+ }
135
155
  nextArrowClass() {
136
156
  const pane = this.splitterService.pane(this.index + 1);
137
157
  const isCollapsible = pane.collapsible;
138
158
  const isCollapsed = pane.collapsed;
139
159
  const isHorizontal = this.orientation === 'horizontal';
140
160
  return classFromObject({
141
- 'k-icon': true,
142
- 'k-i-caret-alt-right': isCollapsible && isHorizontal && !isCollapsed,
143
- 'k-i-caret-alt-left': isCollapsible && isHorizontal && isCollapsed,
144
- 'k-i-caret-alt-down': isCollapsible && !isHorizontal && !isCollapsed,
145
- 'k-i-caret-alt-up': isCollapsible && !isHorizontal && isCollapsed
161
+ 'caret-alt-right': isCollapsible && isHorizontal && !isCollapsed,
162
+ 'caret-alt-left': isCollapsible && isHorizontal && isCollapsed,
163
+ 'caret-alt-down': isCollapsible && !isHorizontal && !isCollapsed,
164
+ 'caret-alt-up': isCollapsible && !isHorizontal && isCollapsed
146
165
  });
147
166
  }
167
+ nextSVGArrowClass() {
168
+ const pane = this.splitterService.pane(this.index + 1);
169
+ const isCollapsible = pane.collapsible;
170
+ const isCollapsed = pane.collapsed;
171
+ const isHorizontal = this.orientation === 'horizontal';
172
+ if (isCollapsible && isHorizontal && !isCollapsed) {
173
+ return caretAltRightIcon;
174
+ }
175
+ if (isCollapsible && isHorizontal && isCollapsed) {
176
+ return caretAltLeftIcon;
177
+ }
178
+ if (isCollapsible && !isHorizontal && !isCollapsed) {
179
+ return caretAltDownIcon;
180
+ }
181
+ if (isCollapsible && !isHorizontal && isCollapsed) {
182
+ return caretAltUpIcon;
183
+ }
184
+ }
148
185
  togglePane() {
149
186
  if (this.expandLast) {
150
187
  this.toggleNext();
@@ -178,33 +215,33 @@ export class SplitterBarComponent {
178
215
  }
179
216
  }
180
217
  }
181
- SplitterBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SplitterBarComponent, deps: [{ token: i1.DraggableDirective, host: true }, { token: i0.ElementRef }, { token: i2.SplitterService }, { token: i3.LocalizationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
218
+ SplitterBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SplitterBarComponent, deps: [{ token: i1.DraggableDirective, host: true }, { token: i2.LocalizationService }, { token: i3.SplitterService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
182
219
  SplitterBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: SplitterBarComponent, selector: "kendo-splitter-bar", inputs: { orientation: "orientation", index: "index" }, host: { properties: { "attr.aria-orientation": "this.orientation", "attr.role": "this.ariaRole", "class.k-focus": "this.focused", "attr.tabindex": "this.tabIndex", "class": "this.hostClasses", "style.-ms-flex-order": "this.order", "style.order": "this.order" } }, ngImport: i0, template: `
183
220
  <div *ngIf="shouldShowIcon('prev')" [class]="collapseClass('prev')" (click)="togglePrevious()">
184
- <span [class]="previousArrowClass()"></span>
221
+ <kendo-icon-wrapper [name]="previousArrowClass()" [svgIcon]="previousSVGArrowClass()"></kendo-icon-wrapper>
185
222
  </div>
186
223
  <div class="k-resize-handle"></div>
187
224
  <div *ngIf="shouldShowIcon('next')" [class]="collapseClass('next')" (click)="toggleNext()">
188
- <span [class]="nextArrowClass()"></span>
225
+ <kendo-icon-wrapper [name]="nextArrowClass()" [svgIcon]="nextSVGArrowClass()"></kendo-icon-wrapper>
189
226
  </div>
190
- `, isInline: true, directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
227
+ `, isInline: true, components: [{ type: i4.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
191
228
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SplitterBarComponent, decorators: [{
192
229
  type: Component,
193
230
  args: [{
194
231
  selector: 'kendo-splitter-bar',
195
232
  template: `
196
233
  <div *ngIf="shouldShowIcon('prev')" [class]="collapseClass('prev')" (click)="togglePrevious()">
197
- <span [class]="previousArrowClass()"></span>
234
+ <kendo-icon-wrapper [name]="previousArrowClass()" [svgIcon]="previousSVGArrowClass()"></kendo-icon-wrapper>
198
235
  </div>
199
236
  <div class="k-resize-handle"></div>
200
237
  <div *ngIf="shouldShowIcon('next')" [class]="collapseClass('next')" (click)="toggleNext()">
201
- <span [class]="nextArrowClass()"></span>
238
+ <kendo-icon-wrapper [name]="nextArrowClass()" [svgIcon]="nextSVGArrowClass()"></kendo-icon-wrapper>
202
239
  </div>
203
240
  `
204
241
  }]
205
242
  }], ctorParameters: function () { return [{ type: i1.DraggableDirective, decorators: [{
206
243
  type: Host
207
- }] }, { type: i0.ElementRef }, { type: i2.SplitterService }, { type: i3.LocalizationService }, { type: i0.Renderer2 }]; }, propDecorators: { orientation: [{
244
+ }] }, { type: i2.LocalizationService }, { type: i3.SplitterService }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { orientation: [{
208
245
  type: Input
209
246
  }, {
210
247
  type: HostBinding,
@@ -8,6 +8,7 @@ import { DraggableModule } from '@progress/kendo-angular-common';
8
8
  import { SplitterComponent } from './splitter/splitter.component';
9
9
  import { SplitterBarComponent } from './splitter/splitter-bar.component';
10
10
  import { SplitterPaneComponent } from './splitter/splitter-pane.component';
11
+ import { IconsModule } from '@progress/kendo-angular-icons';
11
12
  import * as i0 from "@angular/core";
12
13
  const exportedModules = [
13
14
  SplitterComponent,
@@ -30,11 +31,13 @@ export class SplitterModule {
30
31
  SplitterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SplitterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
31
32
  SplitterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SplitterModule, declarations: [SplitterBarComponent, SplitterComponent,
32
33
  SplitterPaneComponent], imports: [CommonModule,
33
- DraggableModule], exports: [SplitterComponent,
34
+ DraggableModule,
35
+ IconsModule], exports: [SplitterComponent,
34
36
  SplitterPaneComponent] });
35
37
  SplitterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SplitterModule, imports: [[
36
38
  CommonModule,
37
- DraggableModule
39
+ DraggableModule,
40
+ IconsModule
38
41
  ]] });
39
42
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SplitterModule, decorators: [{
40
43
  type: NgModule,
@@ -43,7 +46,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
43
46
  exports: [exportedModules],
44
47
  imports: [
45
48
  CommonModule,
46
- DraggableModule
49
+ DraggableModule,
50
+ IconsModule
47
51
  ]
48
52
  }]
49
53
  }] });
@@ -89,7 +89,7 @@ export class StepperListComponent {
89
89
  }
90
90
  }
91
91
  StepperListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: StepperListComponent, deps: [{ token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1.StepperService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
92
- StepperListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: StepperListComponent, selector: "[kendoStepperList]", inputs: { linear: "linear", stepType: "stepType", orientation: "orientation", currentStep: "currentStep", steps: "steps", successIcon: "successIcon", errorIcon: "errorIcon", indicatorTemplate: "indicatorTemplate", labelTemplate: "labelTemplate", stepTemplate: "stepTemplate" }, outputs: { listKeydown: "listKeydown", listClick: "listClick" }, ngImport: i0, template: "\n <ng-container *ngFor='let step of steps; let idx = index'>\n <li kendoStepperStep\n [attr.data-kendo-stepper-index]='idx'\n [type]='stepType'\n [step]='step'\n [index]='idx'\n [current]='currentStep'\n [successIcon]='successIcon'\n [errorIcon]='errorIcon'\n [indicatorTemplate]='indicatorTemplate'\n [labelTemplate]='labelTemplate'\n [stepTemplate]='stepTemplate'\n class='k-step'\n [class.k-step-first]='idx === 0'\n [class.k-step-last]='idx === steps.length - 1'\n [class.k-step-done]='idx < currentStep'\n [class.k-step-current]='idx === currentStep'\n [class.k-step-optional]='step.optional'\n [class.k-disabled]='step.disabled'\n [class.k-focus]='idx === focusedStep'\n [ngClass]='step.cssClass'\n [ngStyle]='step.cssStyle'\n [style.max-width.%] = 'maxStepWidth'\n [style.max-height.%] = 'maxStepHeight'\n >\n </li>\n </ng-container>\n ", isInline: true, components: [{ type: i2.StepperStepComponent, selector: "[kendoStepperStep]", inputs: ["step", "index", "current", "type", "successIcon", "errorIcon", "indicatorTemplate", "labelTemplate", "stepTemplate"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
92
+ StepperListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: StepperListComponent, selector: "[kendoStepperList]", inputs: { linear: "linear", stepType: "stepType", orientation: "orientation", currentStep: "currentStep", steps: "steps", successIcon: "successIcon", successSVGIcon: "successSVGIcon", errorIcon: "errorIcon", errorSVGIcon: "errorSVGIcon", svgIcon: "svgIcon", indicatorTemplate: "indicatorTemplate", labelTemplate: "labelTemplate", stepTemplate: "stepTemplate" }, outputs: { listKeydown: "listKeydown", listClick: "listClick" }, ngImport: i0, template: "\n <ng-container *ngFor='let step of steps; let idx = index'>\n <li kendoStepperStep\n [attr.data-kendo-stepper-index]='idx'\n [type]='stepType'\n [step]='step'\n [index]='idx'\n [current]='currentStep'\n [successIcon]='successIcon'\n [successSVGIcon]='successSVGIcon'\n [errorIcon]='errorIcon'\n [errorSVGIcon]='errorSVGIcon'\n [svgIcon]='svgIcon'\n [indicatorTemplate]='indicatorTemplate'\n [labelTemplate]='labelTemplate'\n [stepTemplate]='stepTemplate'\n class='k-step'\n [class.k-step-first]='idx === 0'\n [class.k-step-last]='idx === steps.length - 1'\n [class.k-step-done]='idx < currentStep'\n [class.k-step-current]='idx === currentStep'\n [class.k-step-optional]='step.optional'\n [class.k-disabled]='step.disabled'\n [class.k-focus]='idx === focusedStep'\n [ngClass]='step.cssClass'\n [ngStyle]='step.cssStyle'\n [style.max-width.%] = 'maxStepWidth'\n [style.max-height.%] = 'maxStepHeight'\n >\n </li>\n </ng-container>\n ", isInline: true, components: [{ type: i2.StepperStepComponent, selector: "[kendoStepperStep]", inputs: ["step", "index", "current", "type", "successIcon", "successSVGIcon", "errorIcon", "errorSVGIcon", "svgIcon", "indicatorTemplate", "labelTemplate", "stepTemplate"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
93
93
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: StepperListComponent, decorators: [{
94
94
  type: Component,
95
95
  args: [{
@@ -104,7 +104,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
104
104
  [index]='idx'
105
105
  [current]='currentStep'
106
106
  [successIcon]='successIcon'
107
+ [successSVGIcon]='successSVGIcon'
107
108
  [errorIcon]='errorIcon'
109
+ [errorSVGIcon]='errorSVGIcon'
110
+ [svgIcon]='svgIcon'
108
111
  [indicatorTemplate]='indicatorTemplate'
109
112
  [labelTemplate]='labelTemplate'
110
113
  [stepTemplate]='stepTemplate'
@@ -137,8 +140,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
137
140
  type: Input
138
141
  }], successIcon: [{
139
142
  type: Input
143
+ }], successSVGIcon: [{
144
+ type: Input
140
145
  }], errorIcon: [{
141
146
  type: Input
147
+ }], errorSVGIcon: [{
148
+ type: Input
149
+ }], svgIcon: [{
150
+ type: Input
142
151
  }], indicatorTemplate: [{
143
152
  type: Input
144
153
  }], labelTemplate: [{