@progress/kendo-angular-layout 6.3.5 → 6.4.0-dev.202201191016

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 (48) hide show
  1. package/LICENSE.md +1 -1
  2. package/NOTICE.txt +119 -79
  3. package/README.md +1 -1
  4. package/dist/cdn/js/kendo-angular-layout.js +2 -2
  5. package/dist/cdn/main.js +1 -1
  6. package/dist/es/avatar/avatar.component.js +120 -90
  7. package/dist/es/avatar/models/models.js +4 -0
  8. package/dist/es/avatar/models/rounded.js +4 -0
  9. package/dist/es/common/styling-classes.js +4 -0
  10. package/dist/es/common/util.js +40 -0
  11. package/dist/es/main.js +1 -0
  12. package/dist/es/package-metadata.js +1 -1
  13. package/dist/es/tabstrip/tabstrip.component.js +27 -1
  14. package/dist/es2015/avatar/avatar.component.d.ts +30 -30
  15. package/dist/es2015/avatar/avatar.component.js +111 -81
  16. package/dist/es2015/avatar/models/fill.d.ts +2 -8
  17. package/dist/es2015/avatar/models/models.d.ts +9 -0
  18. package/dist/es2015/avatar/models/models.js +4 -0
  19. package/dist/es2015/avatar/models/rounded.d.ts +8 -0
  20. package/dist/es2015/avatar/models/rounded.js +4 -0
  21. package/dist/es2015/avatar/models/shape.d.ts +2 -8
  22. package/dist/es2015/avatar/models/size.d.ts +1 -8
  23. package/dist/es2015/avatar/models/theme-color.d.ts +2 -17
  24. package/dist/es2015/common/styling-classes.d.ts +11 -0
  25. package/dist/es2015/common/styling-classes.js +4 -0
  26. package/dist/es2015/common/util.d.ts +12 -0
  27. package/dist/es2015/common/util.js +40 -0
  28. package/dist/es2015/index.metadata.json +1 -1
  29. package/dist/es2015/main.d.ts +1 -4
  30. package/dist/es2015/main.js +1 -0
  31. package/dist/es2015/package-metadata.js +1 -1
  32. package/dist/es2015/tabstrip/tabstrip.component.d.ts +8 -0
  33. package/dist/es2015/tabstrip/tabstrip.component.js +20 -0
  34. package/dist/es2015/tilelayout/tilelayout-item.component.d.ts +2 -2
  35. package/dist/es2015/tilelayout/tilelayout-resize-handle.directive.d.ts +2 -2
  36. package/dist/es2015/tilelayout/tilelayout.component.d.ts +2 -2
  37. package/dist/fesm2015/index.js +171 -82
  38. package/dist/fesm5/index.js +187 -92
  39. package/dist/npm/avatar/avatar.component.js +120 -90
  40. package/dist/npm/avatar/models/models.js +6 -0
  41. package/dist/npm/avatar/models/rounded.js +6 -0
  42. package/dist/npm/common/styling-classes.js +6 -0
  43. package/dist/npm/common/util.js +40 -0
  44. package/dist/npm/main.js +1 -0
  45. package/dist/npm/package-metadata.js +1 -1
  46. package/dist/npm/tabstrip/tabstrip.component.js +27 -1
  47. package/dist/systemjs/kendo-angular-layout.js +1 -1
  48. package/package.json +13 -11
@@ -21,7 +21,7 @@ var packageMetadata = {
21
21
  name: '@progress/kendo-angular-layout',
22
22
  productName: 'Kendo UI for Angular',
23
23
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
24
- publishDate: 1635940072,
24
+ publishDate: 1642587256,
25
25
  version: '',
26
26
  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'
27
27
  };
@@ -147,6 +147,21 @@ var PanelBarItemTitleDirective = /** @class */ (function () {
147
147
  }());
148
148
 
149
149
  var nextId = 0;
150
+ var SIZES = {
151
+ small: 'sm',
152
+ medium: 'md',
153
+ large: 'lg'
154
+ };
155
+ var ROUNDNESS = {
156
+ small: 'sm',
157
+ medium: 'md',
158
+ large: 'lg',
159
+ full: 'full'
160
+ };
161
+ var SHAPE_TO_ROUNDED = {
162
+ rounded: 'large',
163
+ circle: 'full'
164
+ };
150
165
  var parsePanelBarItems = function (data) {
151
166
  return data.map(function (item) {
152
167
  if (!item.id) {
@@ -186,6 +201,31 @@ var isNavigationKey = function (keyCode) {
186
201
  return keyCode === Keys.PageUp || keyCode === Keys.PageDown ||
187
202
  keyCode === Keys.Home || keyCode === Keys.End;
188
203
  };
204
+ /**
205
+ * @hidden
206
+ *
207
+ * Returns the styling classes to be added and removed
208
+ */
209
+ var getStylingClasses = function (componentType, stylingOption, previousValue, newValue) {
210
+ switch (stylingOption) {
211
+ case 'size':
212
+ return {
213
+ toRemove: "k-" + componentType + "-" + SIZES[previousValue],
214
+ toAdd: newValue ? "k-" + componentType + "-" + SIZES[newValue] : null
215
+ };
216
+ case 'rounded':
217
+ return {
218
+ toRemove: "k-rounded-" + ROUNDNESS[previousValue],
219
+ toAdd: newValue ? "k-rounded-" + ROUNDNESS[newValue] : null
220
+ };
221
+ default:
222
+ break;
223
+ }
224
+ };
225
+ /**
226
+ * @hidden
227
+ */
228
+ var mapShapeToRounded = function (shape) { return SHAPE_TO_ROUNDED[shape] || null; };
189
229
 
190
230
  var focusableRegex = /^(?:a|input|select|option|textarea|button|object)$/i;
191
231
  var toClassList = function (classNames) { return String(classNames).trim().split(' '); };
@@ -2926,6 +2966,32 @@ var TabStripComponent = /** @class */ (function () {
2926
2966
  enumerable: true,
2927
2967
  configurable: true
2928
2968
  });
2969
+ Object.defineProperty(TabStripComponent.prototype, "tabListWidth", {
2970
+ /**
2971
+ * @hidden
2972
+ */
2973
+ get: function () {
2974
+ if (this.tabPosition === 'top' || this.tabPosition === 'bottom') {
2975
+ return '100%';
2976
+ }
2977
+ return null;
2978
+ },
2979
+ enumerable: true,
2980
+ configurable: true
2981
+ });
2982
+ Object.defineProperty(TabStripComponent.prototype, "tabListHeight", {
2983
+ /**
2984
+ * @hidden
2985
+ */
2986
+ get: function () {
2987
+ if (this.tabPosition === 'left' || this.tabPosition === 'right') {
2988
+ return '100%';
2989
+ }
2990
+ return null;
2991
+ },
2992
+ enumerable: true,
2993
+ configurable: true
2994
+ });
2929
2995
  Object.defineProperty(TabStripComponent.prototype, "isScrollable", {
2930
2996
  /**
2931
2997
  * @hidden
@@ -3197,7 +3263,7 @@ var TabStripComponent = /** @class */ (function () {
3197
3263
  ],
3198
3264
  exportAs: 'kendoTabStrip',
3199
3265
  selector: 'kendo-tabstrip',
3200
- template: "\n <ng-container kendoTabStripLocalizedMessages\n i18n-closeTitle=\"kendo.tabstrip.closeTitle|The title for the **Close** button in the TabStrip tab.\"\n closeTitle=\"Close\">\n </ng-container>\n <ng-container *ngIf=\"!tabsAtBottom\">\n <ng-container *ngTemplateOutlet=\"heading\">\n </ng-container>\n <ng-container *ngTemplateOutlet=\"content\">\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"tabsAtBottom\">\n <ng-container *ngTemplateOutlet=\"content\">\n </ng-container>\n <ng-container *ngTemplateOutlet=\"heading\">\n </ng-container>\n </ng-container>\n <ng-template #heading>\n <div class=\"k-tabstrip-items-wrapper\" [ngClass]=\"itemsWrapperClass\">\n <span *ngIf=\"hasScrollButtons\"\n #prevScrollButton\n kendoTabStripScrollableButton\n [prev]=\"true\"></span>\n <ul role=\"tablist\" #tablist\n class=\"k-reset k-tabstrip-items\"\n [style.justifyContent]=\"tabsAlignmentStyles\"\n >\n <ng-container *ngFor=\"let tab of tabs; let i = index;\">\n <li *ngIf=\"!tab.closed\"\n #tabHeaderContainer\n kendoTabStripTab\n [ngClass]=\"tab.cssClass\"\n [ngStyle]=\"tab.cssStyle\"\n [tab]=\"tab\"\n [index]=\"i\"\n role=\"tab\"\n [tabStripClosable]=\"closable\"\n [tabStripCloseIcon]=\"closeIcon\"\n (click)=\"onTabClick($event, i)\"\n [id]=\"'k-tabstrip-tab-' + i\"\n [attr.aria-controls]=\"'k-tabstrip-tabpanel-' + i\">\n </li>\n </ng-container>\n </ul>\n <span *ngIf=\"hasScrollButtons\" #nextScrollButton\n kendoTabStripScrollableButton\n [prev]=\"false\">\n </span>\n </div>\n </ng-template>\n <ng-template #content>\n <ng-template ngFor let-tab [ngForOf]=\"tabs\" let-i=\"index\">\n <div\n [@state]=\"tab.selected && animate ? 'active' : 'inactive'\"\n *ngIf=\"!tab.closed && (tab.selected || keepTabContent)\"\n [ngClass]=\"!this.keepTabContent || tab.selected ? 'k-content k-state-active' : 'k-content'\"\n [tabIndex]=\"0\"\n role=\"tabpanel\"\n [id]=\"'k-tabstrip-tabpanel-' + i\"\n [attr.aria-hidden]=\"!tab.selected\"\n [attr.aria-expanded]=\"tab.selected\"\n [attr.aria-labelledby]=\"'k-tabstrip-tab-' + i\"\n [attr.aria-disabled]=\"tab.disabled\"\n >\n <ng-template [ngTemplateOutlet]=\"tab.tabContent?.templateRef\">\n </ng-template>\n </div>\n </ng-template>\n </ng-template>\n <kendo-resize-sensor *ngIf=\"isScrollable\" (resize)=\"onResize()\"></kendo-resize-sensor>\n "
3266
+ template: "\n <ng-container kendoTabStripLocalizedMessages\n i18n-closeTitle=\"kendo.tabstrip.closeTitle|The title for the **Close** button in the TabStrip tab.\"\n closeTitle=\"Close\">\n </ng-container>\n <ng-container *ngIf=\"!tabsAtBottom\">\n <ng-container *ngTemplateOutlet=\"heading\">\n </ng-container>\n <ng-container *ngTemplateOutlet=\"content\">\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"tabsAtBottom\">\n <ng-container *ngTemplateOutlet=\"content\">\n </ng-container>\n <ng-container *ngTemplateOutlet=\"heading\">\n </ng-container>\n </ng-container>\n <ng-template #heading>\n <div class=\"k-tabstrip-items-wrapper\" [ngClass]=\"itemsWrapperClass\">\n <span *ngIf=\"hasScrollButtons\"\n #prevScrollButton\n kendoTabStripScrollableButton\n [prev]=\"true\"></span>\n <ul role=\"tablist\" #tablist\n class=\"k-reset k-tabstrip-items\"\n [style.justifyContent]=\"tabsAlignmentStyles\"\n [style.width]=\"tabListWidth\"\n [style.height]=\"tabListHeight\"\n >\n <ng-container *ngFor=\"let tab of tabs; let i = index;\">\n <li *ngIf=\"!tab.closed\"\n #tabHeaderContainer\n kendoTabStripTab\n [ngClass]=\"tab.cssClass\"\n [ngStyle]=\"tab.cssStyle\"\n [tab]=\"tab\"\n [index]=\"i\"\n role=\"tab\"\n [tabStripClosable]=\"closable\"\n [tabStripCloseIcon]=\"closeIcon\"\n (click)=\"onTabClick($event, i)\"\n [id]=\"'k-tabstrip-tab-' + i\"\n [attr.aria-controls]=\"'k-tabstrip-tabpanel-' + i\">\n </li>\n </ng-container>\n </ul>\n <span *ngIf=\"hasScrollButtons\" #nextScrollButton\n kendoTabStripScrollableButton\n [prev]=\"false\">\n </span>\n </div>\n </ng-template>\n <ng-template #content>\n <ng-template ngFor let-tab [ngForOf]=\"tabs\" let-i=\"index\">\n <div\n [@state]=\"tab.selected && animate ? 'active' : 'inactive'\"\n *ngIf=\"!tab.closed && (tab.selected || keepTabContent)\"\n [ngClass]=\"!this.keepTabContent || tab.selected ? 'k-content k-state-active' : 'k-content'\"\n [tabIndex]=\"0\"\n role=\"tabpanel\"\n [id]=\"'k-tabstrip-tabpanel-' + i\"\n [attr.aria-hidden]=\"!tab.selected\"\n [attr.aria-expanded]=\"tab.selected\"\n [attr.aria-labelledby]=\"'k-tabstrip-tab-' + i\"\n [attr.aria-disabled]=\"tab.disabled\"\n >\n <ng-template [ngTemplateOutlet]=\"tab.tabContent?.templateRef\">\n </ng-template>\n </div>\n </ng-template>\n </ng-template>\n <kendo-resize-sensor *ngIf=\"isScrollable\" (resize)=\"onResize()\"></kendo-resize-sensor>\n "
3201
3267
  }),
3202
3268
  __metadata("design:paramtypes", [LocalizationService,
3203
3269
  Renderer2,
@@ -4703,17 +4769,6 @@ var LocalizedStepperMessagesDirective = /** @class */ (function (_super) {
4703
4769
  return LocalizedStepperMessagesDirective;
4704
4770
  }(StepperMessages));
4705
4771
 
4706
- var SIZE_CLASSES = {
4707
- 'small': 'k-avatar-sm',
4708
- 'medium': 'k-avatar-md',
4709
- 'large': 'k-avatar-lg'
4710
- };
4711
- var SHAPE_CLASSES = {
4712
- 'circle': 'k-avatar-circle',
4713
- 'square': 'k-avatar-square',
4714
- 'rectangle': 'k-avatar-rectangle',
4715
- 'rounded': 'k-avatar-rounded'
4716
- };
4717
4772
  /**
4718
4773
  * Displays images, icons or initials representing people or other entities.
4719
4774
  */
@@ -4722,45 +4777,16 @@ var AvatarComponent = /** @class */ (function () {
4722
4777
  this.renderer = renderer;
4723
4778
  this.element = element;
4724
4779
  this.hostClass = true;
4725
- /**
4726
- * Specifies the appearance fill style of the avatar.
4727
- *
4728
- * The possible values are:
4729
- * * `solid` (Default)
4730
- * * `outline`
4731
- *
4732
- */
4733
- this.fill = 'solid';
4734
4780
  /**
4735
4781
  * Sets a border to the avatar.
4736
4782
  */
4737
4783
  this.border = false;
4738
4784
  this._themeColor = 'primary';
4739
4785
  this._size = 'medium';
4740
- this._shape = 'square';
4741
- this.avatar = this.element.nativeElement;
4786
+ this._fillMode = 'solid';
4787
+ this._rounded = 'full';
4742
4788
  validatePackage(packageMetadata);
4743
4789
  }
4744
- Object.defineProperty(AvatarComponent.prototype, "solidClass", {
4745
- /**
4746
- * @hidden
4747
- */
4748
- get: function () {
4749
- return this.fill === 'solid';
4750
- },
4751
- enumerable: true,
4752
- configurable: true
4753
- });
4754
- Object.defineProperty(AvatarComponent.prototype, "outlineClass", {
4755
- /**
4756
- * @hidden
4757
- */
4758
- get: function () {
4759
- return this.fill === 'outline';
4760
- },
4761
- enumerable: true,
4762
- configurable: true
4763
- });
4764
4790
  Object.defineProperty(AvatarComponent.prototype, "borderClass", {
4765
4791
  /**
4766
4792
  * @hidden
@@ -4782,23 +4808,12 @@ var AvatarComponent = /** @class */ (function () {
4782
4808
  configurable: true
4783
4809
  });
4784
4810
  Object.defineProperty(AvatarComponent.prototype, "shape", {
4785
- get: function () {
4786
- return this._shape;
4787
- },
4788
4811
  /**
4789
4812
  * Sets the shape for the avatar.
4790
- *
4791
- * Possible values are:
4792
- * * (Default) `square`
4793
- * * `circle`
4794
- * * `rectangle`
4795
- * * `rounded`
4796
- *
4813
+ * @hidden
4797
4814
  */
4798
4815
  set: function (shape) {
4799
- this.renderer.removeClass(this.avatar, SHAPE_CLASSES[this.shape]);
4800
- this.renderer.addClass(this.avatar, SHAPE_CLASSES[shape]);
4801
- this._shape = shape;
4816
+ this.rounded = mapShapeToRounded(shape);
4802
4817
  },
4803
4818
  enumerable: true,
4804
4819
  configurable: true
@@ -4818,9 +4833,35 @@ var AvatarComponent = /** @class */ (function () {
4818
4833
  *
4819
4834
  */
4820
4835
  set: function (size) {
4821
- this.renderer.removeClass(this.avatar, SIZE_CLASSES[this.size]);
4822
- this.renderer.addClass(this.avatar, SIZE_CLASSES[size]);
4823
- this._size = size;
4836
+ if (size !== this._size) {
4837
+ this.handleClasses('size', size);
4838
+ this._size = size === null ? null : size || 'medium';
4839
+ }
4840
+ },
4841
+ enumerable: true,
4842
+ configurable: true
4843
+ });
4844
+ Object.defineProperty(AvatarComponent.prototype, "rounded", {
4845
+ get: function () {
4846
+ return this._rounded;
4847
+ },
4848
+ /**
4849
+ * Specifies the rounded styling of the avatar
4850
+ * ([see example]({% slug appearance_avatar %}#toc-rounded-corners)).
4851
+ *
4852
+ * The possible values are:
4853
+ * * `small`
4854
+ * * `medium`
4855
+ * * `large`
4856
+ * * `full` (Default)
4857
+ * * null
4858
+ *
4859
+ */
4860
+ set: function (rounded) {
4861
+ if (rounded !== this._rounded) {
4862
+ this.handleClasses('rounded', rounded);
4863
+ this._rounded = rounded === null ? null : rounded || 'full';
4864
+ }
4824
4865
  },
4825
4866
  enumerable: true,
4826
4867
  configurable: true
@@ -4834,10 +4875,10 @@ var AvatarComponent = /** @class */ (function () {
4834
4875
  * The theme color will be applied as background and border color, while also amending the text color accordingly.
4835
4876
  *
4836
4877
  * The possible values are:
4878
+ * * `base`&mdash; Applies the base coloring value.
4837
4879
  * * `primary` (Default)&mdash;Applies coloring based on primary theme color.
4838
4880
  * * `secondary`&mdash;Applies coloring based on secondary theme color.
4839
4881
  * * `tertiary`&mdash; Applies coloring based on tertiary theme color.
4840
- * * `inherit`&mdash; Applies inherited coloring value.
4841
4882
  * * `info`&mdash;Applies coloring based on info theme color.
4842
4883
  * * `success`&mdash; Applies coloring based on success theme color.
4843
4884
  * * `warning`&mdash; Applies coloring based on warning theme color.
@@ -4845,45 +4886,67 @@ var AvatarComponent = /** @class */ (function () {
4845
4886
  * * `dark`&mdash; Applies coloring based on dark theme color.
4846
4887
  * * `light`&mdash; Applies coloring based on light theme color.
4847
4888
  * * `inverse`&mdash; Applies coloring based on inverted theme color.
4848
- *
4849
4889
  */
4850
4890
  set: function (themeColor) {
4851
- this.renderer.removeClass(this.avatar, "k-avatar-" + this.themeColor);
4852
- this.renderer.addClass(this.avatar, "k-avatar-" + themeColor);
4853
- this._themeColor = themeColor;
4891
+ if (themeColor !== this._themeColor) {
4892
+ this._themeColor = themeColor === null ? null : (themeColor || 'primary');
4893
+ this.handleFillModeAndThemeColorClasses(this.fillMode, this.themeColor);
4894
+ }
4854
4895
  },
4855
4896
  enumerable: true,
4856
4897
  configurable: true
4857
4898
  });
4858
- Object.defineProperty(AvatarComponent.prototype, "avatarWidth", {
4899
+ Object.defineProperty(AvatarComponent.prototype, "fillMode", {
4900
+ get: function () {
4901
+ return this._fillMode;
4902
+ },
4859
4903
  /**
4904
+ * Specifies the appearance fill style of the avatar.
4905
+ *
4906
+ * The possible values are:
4907
+ * * `solid` (Default)
4908
+ * * `outline`
4909
+ * * null
4910
+ *
4911
+ */
4912
+ set: function (fillMode) {
4913
+ if (fillMode !== this.fillMode) {
4914
+ this._fillMode = fillMode === null ? null : (fillMode || 'solid');
4915
+ this.handleFillModeAndThemeColorClasses(this.fillMode, this.themeColor);
4916
+ }
4917
+ },
4918
+ enumerable: true,
4919
+ configurable: true
4920
+ });
4921
+ Object.defineProperty(AvatarComponent.prototype, "fill", {
4922
+ /**
4923
+ * Specifies the appearance fill style of the avatar.
4924
+ * Deprecated, left for backward compatibility.
4925
+ *
4860
4926
  * @hidden
4861
4927
  */
4862
- get: function () {
4863
- return this.width;
4928
+ set: function (fillMode) {
4929
+ this.fillMode = fillMode;
4864
4930
  },
4865
4931
  enumerable: true,
4866
4932
  configurable: true
4867
4933
  });
4868
- Object.defineProperty(AvatarComponent.prototype, "avatarHeight", {
4934
+ Object.defineProperty(AvatarComponent.prototype, "avatarWidth", {
4869
4935
  /**
4870
4936
  * @hidden
4871
4937
  */
4872
4938
  get: function () {
4873
- return this.height;
4939
+ return this.width;
4874
4940
  },
4875
4941
  enumerable: true,
4876
4942
  configurable: true
4877
4943
  });
4878
- AvatarComponent.prototype.ngAfterViewInit = function () {
4879
- this.setAvatarClasses();
4880
- };
4881
- Object.defineProperty(AvatarComponent.prototype, "imageUrl", {
4944
+ Object.defineProperty(AvatarComponent.prototype, "avatarHeight", {
4882
4945
  /**
4883
4946
  * @hidden
4884
4947
  */
4885
4948
  get: function () {
4886
- return "url(" + this.imageSrc + ")";
4949
+ return this.height;
4887
4950
  },
4888
4951
  enumerable: true,
4889
4952
  configurable: true
@@ -4891,6 +4954,14 @@ var AvatarComponent = /** @class */ (function () {
4891
4954
  AvatarComponent.prototype.ngOnInit = function () {
4892
4955
  this.verifyProperties();
4893
4956
  };
4957
+ AvatarComponent.prototype.ngAfterViewInit = function () {
4958
+ var _this = this;
4959
+ var stylingInputs = ['size', 'rounded'];
4960
+ stylingInputs.forEach(function (input) {
4961
+ _this.handleClasses(input, _this[input]);
4962
+ });
4963
+ this.handleFillModeAndThemeColorClasses(this.fillMode, this.themeColor);
4964
+ };
4894
4965
  /**
4895
4966
  * @hidden
4896
4967
  */
@@ -4922,25 +4993,38 @@ var AvatarComponent = /** @class */ (function () {
4922
4993
  throw new Error("\n Invalid property configuration given.\n The kendo-avatar component can accept only one of:\n icon, imageSrc or initials properties.\n ");
4923
4994
  }
4924
4995
  };
4925
- AvatarComponent.prototype.setAvatarClasses = function () {
4926
- this.renderer.addClass(this.avatar, SHAPE_CLASSES[this.shape]);
4927
- this.renderer.addClass(this.avatar, "k-avatar-" + this.themeColor);
4928
- this.renderer.addClass(this.avatar, SIZE_CLASSES[this.size]);
4996
+ AvatarComponent.prototype.handleClasses = function (styleType, value) {
4997
+ var elem = this.element.nativeElement;
4998
+ var classes = getStylingClasses('avatar', styleType, this[styleType], value);
4999
+ if (classes.toRemove) {
5000
+ this.renderer.removeClass(elem, classes.toRemove);
5001
+ }
5002
+ if (classes.toAdd) {
5003
+ this.renderer.addClass(elem, classes.toAdd);
5004
+ }
5005
+ };
5006
+ AvatarComponent.prototype.handleFillModeAndThemeColorClasses = function (fill, themeColor) {
5007
+ var _this = this;
5008
+ var wrapperElement = this.element.nativeElement;
5009
+ // remove existing fill and theme color classes
5010
+ var currentClasses = Array.from(wrapperElement.classList);
5011
+ var classesToRemove = currentClasses.filter(function (cl) {
5012
+ return cl.startsWith('k-avatar-solid') || cl.startsWith('k-avatar-outline');
5013
+ });
5014
+ classesToRemove.forEach((function (cl) { return _this.renderer.removeClass(wrapperElement, cl); }));
5015
+ // add fill if needed
5016
+ if (fill !== null) {
5017
+ this.renderer.addClass(wrapperElement, "k-avatar-" + fill);
5018
+ }
5019
+ // add theme color class if fill and theme color
5020
+ if (fill !== null && themeColor !== null) {
5021
+ this.renderer.addClass(wrapperElement, "k-avatar-" + fill + "-" + themeColor);
5022
+ }
4929
5023
  };
4930
5024
  __decorate([
4931
5025
  HostBinding('class.k-avatar'),
4932
5026
  __metadata("design:type", Boolean)
4933
5027
  ], AvatarComponent.prototype, "hostClass", void 0);
4934
- __decorate([
4935
- HostBinding('class.k-avatar-solid'),
4936
- __metadata("design:type", Boolean),
4937
- __metadata("design:paramtypes", [])
4938
- ], AvatarComponent.prototype, "solidClass", null);
4939
- __decorate([
4940
- HostBinding('class.k-avatar-outline'),
4941
- __metadata("design:type", Boolean),
4942
- __metadata("design:paramtypes", [])
4943
- ], AvatarComponent.prototype, "outlineClass", null);
4944
5028
  __decorate([
4945
5029
  HostBinding('class.k-avatar-bordered'),
4946
5030
  __metadata("design:type", Boolean),
@@ -4961,6 +5045,11 @@ var AvatarComponent = /** @class */ (function () {
4961
5045
  __metadata("design:type", String),
4962
5046
  __metadata("design:paramtypes", [String])
4963
5047
  ], AvatarComponent.prototype, "size", null);
5048
+ __decorate([
5049
+ Input(),
5050
+ __metadata("design:type", String),
5051
+ __metadata("design:paramtypes", [String])
5052
+ ], AvatarComponent.prototype, "rounded", null);
4964
5053
  __decorate([
4965
5054
  Input(),
4966
5055
  __metadata("design:type", String),
@@ -4968,8 +5057,14 @@ var AvatarComponent = /** @class */ (function () {
4968
5057
  ], AvatarComponent.prototype, "themeColor", null);
4969
5058
  __decorate([
4970
5059
  Input(),
4971
- __metadata("design:type", String)
4972
- ], AvatarComponent.prototype, "fill", void 0);
5060
+ __metadata("design:type", String),
5061
+ __metadata("design:paramtypes", [String])
5062
+ ], AvatarComponent.prototype, "fillMode", null);
5063
+ __decorate([
5064
+ Input(),
5065
+ __metadata("design:type", String),
5066
+ __metadata("design:paramtypes", [String])
5067
+ ], AvatarComponent.prototype, "fill", null);
4973
5068
  __decorate([
4974
5069
  Input(),
4975
5070
  __metadata("design:type", Boolean)
@@ -5015,7 +5110,7 @@ var AvatarComponent = /** @class */ (function () {
5015
5110
  AvatarComponent = __decorate([
5016
5111
  Component({
5017
5112
  selector: 'kendo-avatar',
5018
- template: "\n <ng-content *ngIf=\"customAvatar\"></ng-content>\n\n <ng-container *ngIf=\"imageSrc\">\n <div class=\"k-avatar-image\" [ngStyle]=\"cssStyle\" [style.backgroundImage]=\"imageUrl\"></div>\n </ng-container>\n\n <ng-container *ngIf=\"initials\">\n <span class=\"k-avatar-text\" [ngStyle]=\"cssStyle\">{{ initials.substring(0, 2) }}</span>\n </ng-container>\n\n <ng-container *ngIf=\"icon || iconClass\">\n <span class=\"k-avatar-icon\" [ngStyle]=\"cssStyle\" [ngClass]=\"iconClasses()\"></span>\n </ng-container>\n "
5113
+ template: "\n <ng-content *ngIf=\"customAvatar\"></ng-content>\n\n <ng-container *ngIf=\"imageSrc\">\n <span class=\"k-avatar-image\">\n <img src=\"{{imageSrc}}\" [ngStyle]=\"cssStyle\" />\n </span>\n </ng-container>\n\n <ng-container *ngIf=\"initials\">\n <span class=\"k-avatar-text\" [ngStyle]=\"cssStyle\">{{ initials.substring(0, 2) }}</span>\n </ng-container>\n\n <ng-container *ngIf=\"icon || iconClass\">\n <span class=\"k-avatar-icon\" [ngStyle]=\"cssStyle\" [ngClass]=\"iconClasses()\"></span>\n </ng-container>\n "
5019
5114
  }),
5020
5115
  __metadata("design:paramtypes", [Renderer2, ElementRef])
5021
5116
  ], AvatarComponent);