@progress/kendo-angular-layout 7.0.0-next.202204060717 → 7.0.1-dev.202205020614

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.
@@ -0,0 +1,28 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ /**
6
+ * @hidden
7
+ */
8
+ export declare class PreventableEvent {
9
+ private prevented;
10
+ /**
11
+ * Prevents the default action for a specified event.
12
+ * In this way, the source component suppresses
13
+ * the built-in behavior that follows the event.
14
+ */
15
+ preventDefault(): void;
16
+ /**
17
+ * Returns `true` if the event was prevented
18
+ * by any of its subscribers.
19
+ *
20
+ * @returns `true` if the default action was prevented.
21
+ * Otherwise, returns `false`.
22
+ */
23
+ isDefaultPrevented(): boolean;
24
+ /**
25
+ * @hidden
26
+ */
27
+ constructor(args?: any);
28
+ }
@@ -8,6 +8,10 @@ import { getStylingClasses, mapShapeToRounded } from '../common/util';
8
8
  import { packageMetadata } from '../package-metadata';
9
9
  import * as i0 from "@angular/core";
10
10
  import * as i1 from "@angular/common";
11
+ const DEFAULT_ROUNDED = 'full';
12
+ const DEFAULT_SIZE = 'medium';
13
+ const DEFAULT_THEME_COLOR = 'primary';
14
+ const DEFAULT_FILL_MODE = 'solid';
11
15
  /**
12
16
  * Displays images, icons or initials representing people or other entities.
13
17
  */
@@ -20,10 +24,10 @@ export class AvatarComponent {
20
24
  * Sets a border to the avatar.
21
25
  */
22
26
  this.border = false;
23
- this._themeColor = 'primary';
24
- this._size = 'medium';
25
- this._fillMode = 'solid';
26
- this._rounded = 'full';
27
+ this._themeColor = DEFAULT_THEME_COLOR;
28
+ this._size = DEFAULT_SIZE;
29
+ this._fillMode = DEFAULT_FILL_MODE;
30
+ this._rounded = DEFAULT_ROUNDED;
27
31
  validatePackage(packageMetadata);
28
32
  }
29
33
  /**
@@ -53,12 +57,13 @@ export class AvatarComponent {
53
57
  * * `small`
54
58
  * * `medium` (Default)
55
59
  * * `large`
56
- *
60
+ * * `none`
57
61
  */
58
62
  set size(size) {
59
63
  if (size !== this._size) {
60
- this.handleClasses('size', size);
61
- this._size = size === null ? null : size || 'medium';
64
+ const newSize = size ? size : DEFAULT_SIZE;
65
+ this.handleClasses('size', newSize);
66
+ this._size = newSize;
62
67
  }
63
68
  }
64
69
  get size() {
@@ -73,13 +78,13 @@ export class AvatarComponent {
73
78
  * * `medium`
74
79
  * * `large`
75
80
  * * `full` (Default)
76
- * * null
77
- *
81
+ * * `none`
78
82
  */
79
83
  set rounded(rounded) {
80
84
  if (rounded !== this._rounded) {
81
- this.handleClasses('rounded', rounded);
82
- this._rounded = rounded === null ? null : rounded || 'full';
85
+ const newRounded = rounded ? rounded : DEFAULT_ROUNDED;
86
+ this.handleClasses('rounded', newRounded);
87
+ this._rounded = newRounded;
83
88
  }
84
89
  }
85
90
  get rounded() {
@@ -101,10 +106,12 @@ export class AvatarComponent {
101
106
  * * `dark`— Applies coloring based on dark theme color.
102
107
  * * `light`— Applies coloring based on light theme color.
103
108
  * * `inverse`— Applies coloring based on inverted theme color.
109
+ * * `none`— Removes the styling associated with the theme color.
104
110
  */
105
111
  set themeColor(themeColor) {
106
112
  if (themeColor !== this._themeColor) {
107
- this._themeColor = themeColor === null ? null : (themeColor || 'primary');
113
+ const newThemeColor = themeColor ? themeColor : DEFAULT_THEME_COLOR;
114
+ this._themeColor = newThemeColor;
108
115
  this.handleFillModeAndThemeColorClasses(this.fillMode, this.themeColor);
109
116
  }
110
117
  }
@@ -117,12 +124,12 @@ export class AvatarComponent {
117
124
  * The possible values are:
118
125
  * * `solid` (Default)
119
126
  * * `outline`
120
- * * null
121
- *
127
+ * * `none`
122
128
  */
123
129
  set fillMode(fillMode) {
124
130
  if (fillMode !== this.fillMode) {
125
- this._fillMode = fillMode === null ? null : (fillMode || 'solid');
131
+ const newFillMode = fillMode ? fillMode : DEFAULT_FILL_MODE;
132
+ this._fillMode = newFillMode;
126
133
  this.handleFillModeAndThemeColorClasses(this.fillMode, this.themeColor);
127
134
  }
128
135
  }
@@ -210,11 +217,11 @@ export class AvatarComponent {
210
217
  });
211
218
  classesToRemove.forEach((cl => this.renderer.removeClass(wrapperElement, cl)));
212
219
  // add fill if needed
213
- if (fill !== null) {
220
+ if (fill !== 'none') {
214
221
  this.renderer.addClass(wrapperElement, `k-avatar-${fill}`);
215
222
  }
216
223
  // add theme color class if fill and theme color
217
- if (fill !== null && themeColor !== null) {
224
+ if (fill !== 'none' && themeColor !== 'none') {
218
225
  this.renderer.addClass(wrapperElement, `k-avatar-${fill}-${themeColor}`);
219
226
  }
220
227
  }
@@ -0,0 +1,34 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ /**
6
+ * @hidden
7
+ */
8
+ export class PreventableEvent {
9
+ /**
10
+ * @hidden
11
+ */
12
+ constructor(args) {
13
+ this.prevented = false;
14
+ Object.assign(this, args);
15
+ }
16
+ /**
17
+ * Prevents the default action for a specified event.
18
+ * In this way, the source component suppresses
19
+ * the built-in behavior that follows the event.
20
+ */
21
+ preventDefault() {
22
+ this.prevented = true;
23
+ }
24
+ /**
25
+ * Returns `true` if the event was prevented
26
+ * by any of its subscribers.
27
+ *
28
+ * @returns `true` if the default action was prevented.
29
+ * Otherwise, returns `false`.
30
+ */
31
+ isDefaultPrevented() {
32
+ return this.prevented;
33
+ }
34
+ }
@@ -64,12 +64,12 @@ export const getStylingClasses = (componentType, stylingOption, previousValue, n
64
64
  case 'size':
65
65
  return {
66
66
  toRemove: `k-${componentType}-${SIZES[previousValue]}`,
67
- toAdd: newValue ? `k-${componentType}-${SIZES[newValue]}` : null
67
+ toAdd: newValue !== 'none' ? `k-${componentType}-${SIZES[newValue]}` : ''
68
68
  };
69
69
  case 'rounded':
70
70
  return {
71
71
  toRemove: `k-rounded-${ROUNDNESS[previousValue]}`,
72
- toAdd: newValue ? `k-rounded-${ROUNDNESS[newValue]}` : null
72
+ toAdd: newValue !== 'none' ? `k-rounded-${ROUNDNESS[newValue]}` : ''
73
73
  };
74
74
  default:
75
75
  break;
@@ -78,7 +78,7 @@ export const getStylingClasses = (componentType, stylingOption, previousValue, n
78
78
  /**
79
79
  * @hidden
80
80
  */
81
- export const mapShapeToRounded = (shape) => SHAPE_TO_ROUNDED[shape] || null;
81
+ export const mapShapeToRounded = (shape) => SHAPE_TO_ROUNDED[shape] || 'none';
82
82
  /**
83
83
  * @hidden
84
84
  */
@@ -299,7 +299,7 @@ export class ExpansionPanelComponent {
299
299
  }
300
300
  }
301
301
  ExpansionPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ExpansionPanelComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.LocalizationService }, { token: i2.AnimationBuilder }], target: i0.ɵɵFactoryTarget.Component });
302
- ExpansionPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ExpansionPanelComponent, selector: "kendo-expansionpanel", inputs: { title: "title", subtitle: "subtitle", disabled: "disabled", expanded: "expanded", expandIcon: "expandIcon", collapseIcon: "collapseIcon", animation: "animation" }, outputs: { expandedChange: "expandedChange", action: "action", expand: "expand", collapse: "collapse" }, host: { listeners: { "blur": "onComponentBlur()", "focus": "onComponentFocus()" }, properties: { "class.k-expander": "this.hostClass", "attr.aria-expanded": "this.expandedClass", "class.k-expanded": "this.expandedClass", "class.k-state-focus": "this.focusClass", "attr.aria-disabled": "this.disabledClass", "class.k-state-disabled": "this.disabledClass", "attr.dir": "this.direction", "attr.tabindex": "this.tabindex" } }, providers: [
302
+ ExpansionPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ExpansionPanelComponent, selector: "kendo-expansionpanel", inputs: { title: "title", subtitle: "subtitle", disabled: "disabled", expanded: "expanded", expandIcon: "expandIcon", collapseIcon: "collapseIcon", animation: "animation" }, outputs: { expandedChange: "expandedChange", action: "action", expand: "expand", collapse: "collapse" }, host: { listeners: { "blur": "onComponentBlur()", "focus": "onComponentFocus()" }, properties: { "class.k-expander": "this.hostClass", "class.k-expanded": "this.expandedClass", "class.k-state-focus": "this.focusClass", "attr.aria-disabled": "this.disabledClass", "class.k-state-disabled": "this.disabledClass", "attr.dir": "this.direction", "attr.tabindex": "this.tabindex" } }, providers: [
303
303
  LocalizationService,
304
304
  {
305
305
  provide: L10N_PREFIX,
@@ -308,6 +308,8 @@ ExpansionPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
308
308
  ], queries: [{ propertyName: "titleTemplate", first: true, predicate: ExpansionPanelTitleDirective, descendants: true }], viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, static: true }], exportAs: ["kendoExpansionPanel"], ngImport: i0, template: `
309
309
  <div
310
310
  [class.k-expander-header]="true"
311
+ [attr.aria-expanded]="expanded && !disabled"
312
+ role="button"
311
313
  (click)="onHeaderClick($event)">
312
314
  <ng-container *ngIf="!titleTemplate">
313
315
  <div *ngIf="title" class="k-expander-title">{{ title }}</div>
@@ -345,6 +347,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
345
347
  template: `
346
348
  <div
347
349
  [class.k-expander-header]="true"
350
+ [attr.aria-expanded]="expanded && !disabled"
351
+ role="button"
348
352
  (click)="onHeaderClick($event)">
349
353
  <ng-container *ngIf="!titleTemplate">
350
354
  <div *ngIf="title" class="k-expander-title">{{ title }}</div>
@@ -400,9 +404,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
400
404
  type: HostBinding,
401
405
  args: ['class.k-expander']
402
406
  }], expandedClass: [{
403
- type: HostBinding,
404
- args: ['attr.aria-expanded']
405
- }, {
406
407
  type: HostBinding,
407
408
  args: ['class.k-expanded']
408
409
  }], focusClass: [{
package/esm2015/main.js CHANGED
@@ -8,6 +8,7 @@ export { PanelBarContentDirective } from './panelbar/panelbar-content.directive'
8
8
  export { PanelBarItemTemplateDirective } from './panelbar/panelbar-item-template.directive';
9
9
  export { PanelBarItemTitleDirective } from './panelbar/panelbar-item-title.directive';
10
10
  export { PanelBarExpandMode } from './panelbar/panelbar-expand-mode';
11
+ export * from './panelbar/events';
11
12
  export { SplitterComponent } from './splitter/splitter.component';
12
13
  export { SplitterPaneComponent } from './splitter/splitter-pane.component';
13
14
  export { TabStripComponent } from './tabstrip/tabstrip.component';
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-layout',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1649229369,
12
+ publishDate: 1651472017,
13
13
  version: '',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
15
15
  };
@@ -0,0 +1,10 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { PreventableEvent } from '../../common/preventable-event';
6
+ /**
7
+ * Arguments for the `collapse` event of the PanelBar.
8
+ */
9
+ export class PanelBarCollapseEvent extends PreventableEvent {
10
+ }
@@ -0,0 +1,10 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { PreventableEvent } from '../../common/preventable-event';
6
+ /**
7
+ * Arguments for the `expand` event of the PanelBar.
8
+ */
9
+ export class PanelBarExpandEvent extends PreventableEvent {
10
+ }
@@ -0,0 +1,10 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { PreventableEvent } from '../../common/preventable-event';
6
+ /**
7
+ * Arguments for the `select` event of the PanelBar.
8
+ */
9
+ export class PanelBarSelectEvent extends PreventableEvent {
10
+ }
@@ -0,0 +1,9 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ /**
6
+ * Arguments for the `stateChange` event of the PanelBar.
7
+ */
8
+ export class PanelBarStateChangeEvent {
9
+ }
@@ -0,0 +1,8 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ export { PanelBarCollapseEvent } from './events/collapse-event';
6
+ export { PanelBarExpandEvent } from './events/expand-event';
7
+ export { PanelBarSelectEvent } from './events/select-event';
8
+ export { PanelBarStateChangeEvent } from './events/state-change-event';
@@ -262,7 +262,22 @@ PanelBarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
262
262
  [src]="imageUrl"
263
263
  alt="">
264
264
  <ng-container *ngIf="!titleTemplate"><span class="k-panelbar-item-text">{{title}}</span></ng-container>
265
- <ng-template *ngIf="titleTemplate" [ngTemplateOutlet]="titleTemplate"></ng-template>
265
+ <ng-template *ngIf="titleTemplate"
266
+ [ngTemplateOutlet]="titleTemplate"
267
+ [ngTemplateOutletContext]="{
268
+ item: {
269
+ title: title,
270
+ id: id,
271
+ icon: icon,
272
+ iconClass: iconClass,
273
+ imageUrl: imageUrl,
274
+ selected: selected,
275
+ expanded: expanded,
276
+ disabled: disabled,
277
+ focused: focused,
278
+ content: content
279
+ }
280
+ }"></ng-template>
266
281
  <span *ngIf="hasChildItems || hasContent"
267
282
  class="k-icon k-panelbar-toggle"
268
283
  [ngClass]="{'k-i-arrow-chevron-up k-panelbar-collapse': expanded, 'k-i-arrow-chevron-down k-panelbar-expand': !expanded}">
@@ -388,7 +403,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
388
403
  [src]="imageUrl"
389
404
  alt="">
390
405
  <ng-container *ngIf="!titleTemplate"><span class="k-panelbar-item-text">{{title}}</span></ng-container>
391
- <ng-template *ngIf="titleTemplate" [ngTemplateOutlet]="titleTemplate"></ng-template>
406
+ <ng-template *ngIf="titleTemplate"
407
+ [ngTemplateOutlet]="titleTemplate"
408
+ [ngTemplateOutletContext]="{
409
+ item: {
410
+ title: title,
411
+ id: id,
412
+ icon: icon,
413
+ iconClass: iconClass,
414
+ imageUrl: imageUrl,
415
+ selected: selected,
416
+ expanded: expanded,
417
+ disabled: disabled,
418
+ focused: focused,
419
+ content: content
420
+ }
421
+ }"></ng-template>
392
422
  <span *ngIf="hasChildItems || hasContent"
393
423
  class="k-icon k-panelbar-toggle"
394
424
  [ngClass]="{'k-i-arrow-chevron-up k-panelbar-collapse': expanded, 'k-i-arrow-chevron-down k-panelbar-expand': !expanded}">