@porscheinformatik/clr-addons 21.1.2 → 21.2.0

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.
@@ -1229,7 +1229,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImpo
1229
1229
  */
1230
1230
 
1231
1231
  /*
1232
- * Copyright (c) 2018-2025 Porsche Informatik. All Rights Reserved.
1232
+ * Copyright (c) 2018-2026 Porsche Informatik. All Rights Reserved.
1233
1233
  * This software is released under MIT license.
1234
1234
  * The full license information can be found in LICENSE in the root directory of this project.
1235
1235
  */
@@ -1247,7 +1247,7 @@ class ClrLetterAvatar {
1247
1247
  if (this.name !== undefined) {
1248
1248
  return this.name.split(/\s/).reduce((response, word) => {
1249
1249
  if (response.length < 2) {
1250
- return (response += word.slice(0, 1));
1250
+ return response + word.slice(0, 1);
1251
1251
  }
1252
1252
  else {
1253
1253
  return response;
@@ -2581,9 +2581,7 @@ class ClrNumericField {
2581
2581
  this._unit = null;
2582
2582
  this.allowedKeys = new Set(NUMBERS);
2583
2583
  /* Control Values Accessor Stuff below */
2584
- // eslint-disable-next-line @typescript-eslint/no-empty-function
2585
2584
  this.onChange = (_) => { };
2586
- // eslint-disable-next-line @typescript-eslint/no-empty-function
2587
2585
  this.onTouched = () => { };
2588
2586
  }
2589
2587
  ngOnInit() {
@@ -5943,6 +5941,8 @@ class ClrViewEditSection {
5943
5941
  this._isCollapsed = false;
5944
5942
  this._titleTextStyle = 'subsection';
5945
5943
  this._titleTextFontWeight = 'medium';
5944
+ this._showBadge = false;
5945
+ this._badgeClass = 'label label-primary';
5946
5946
  this._isCollapsedChange = new EventEmitter();
5947
5947
  this._editModeChanged = new EventEmitter(false);
5948
5948
  this._submitted = new EventEmitter(false);
@@ -5985,7 +5985,7 @@ class ClrViewEditSection {
5985
5985
  }
5986
5986
  }
5987
5987
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: ClrViewEditSection, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
5988
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.18", type: ClrViewEditSection, isStandalone: false, selector: "clr-view-edit-section", inputs: { _title: ["clrTitle", "_title"], _saveText: ["clrSaveText", "_saveText"], _preventSave: ["clrPreventModeChangeOnSave", "_preventSave"], _cancelText: ["clrCancelText", "_cancelText"], _editable: ["clrEditable", "_editable"], _editIcon: ["clrEditIcon", "_editIcon"], _isCollapsible: ["clrIsCollapsible", "_isCollapsible"], _isCollapsed: ["clrIsCollapsed", "_isCollapsed"], _titleTextStyle: ["clrTitleTextStyle", "_titleTextStyle"], _titleTextFontWeight: ["clrTitleTextFontWeight", "_titleTextFontWeight"], viewRef: ["clrViewRef", "viewRef"], editRef: ["clrEditRef", "editRef"], editMode: ["clrEditMode", "editMode"] }, outputs: { _isCollapsedChange: "clrIsCollapsedChange", _editModeChanged: "clrEditModeChange", _submitted: "clrSectionSubmitted", _cancelled: "clrSectionEditCancelled" }, ngImport: i0, template: "<div class=\"card view-edit-section\" (keyup.escape)=\"onCancel()\">\n <div class=\"card-block\">\n <div class=\"card-title\" [attr.cds-text]=\"_titleTextStyle + ' ' + _titleTextFontWeight\">\n @if (_isCollapsible && !editMode) {\n <span\n class=\"ces-title-trigger\"\n (click)=\"onCollapseExpand()\"\n (keydown.enter)=\"onCollapseExpand()\"\n (keydown.space)=\"onCollapseExpand(); $event.preventDefault()\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-expanded]=\"!_isCollapsed\"\n >\n {{ _title }}\n </span>\n <button type=\"button\" (click)=\"onCollapseExpand()\" class=\"btn btn-icon btn-link ces-caret-btn\">\n <cds-icon shape=\"angle\" size=\"20\" class=\"ces-caret-icon\" [@rotateIcon]=\"_isCollapsed\"></cds-icon>\n </button>\n } @else { {{ _title }} }\n <div class=\"ves-actions\">\n @if (_editable && !editMode && actionBlock.children.length == 0) {\n <button type=\"button\" (click)=\"onEdit()\" class=\"btn btn-icon btn-link ves-action\">\n <cds-icon class=\"ves-edit-icon\" [shape]=\"_editIcon\" size=\"20\"></cds-icon>\n </button>\n }\n <div #actionBlock>\n <ng-content select=\"[action-block]\"></ng-content>\n </div>\n </div>\n </div>\n @if (!(_isCollapsed && _isCollapsible)) {\n <div class=\"card-text\" [@collapseExpandAnimation]=\"initialized\">\n @if (!editMode) {\n <ng-template [ngTemplateOutlet]=\"viewRef\"></ng-template>\n } @if (editMode) {\n <ng-template [ngTemplateOutlet]=\"editRef\"></ng-template>\n } @if (editMode) {\n <form clrForm (ngSubmit)=\"onSubmit()\" class=\"button-bar\">\n <button class=\"btn btn-primary ves-save\" type=\"submit\">{{ _saveText }}</button>\n <button class=\"btn ves-cancel\" (click)=\"onCancel()\" type=\"button\">{{ _cancelText }}</button>\n </form>\n }\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.ClrIcon, selector: "clr-icon, cds-icon", inputs: ["shape", "size", "direction", "flip", "solid", "status", "inverse", "badge"] }, { kind: "directive", type: i2.CdsIconCustomTag, selector: "cds-icon" }, { kind: "directive", type: i1$1.ClrForm, selector: "[clrForm]", inputs: ["clrLabelSize"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }], animations: [
5988
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.18", type: ClrViewEditSection, isStandalone: false, selector: "clr-view-edit-section", inputs: { _title: ["clrTitle", "_title"], _saveText: ["clrSaveText", "_saveText"], _preventSave: ["clrPreventModeChangeOnSave", "_preventSave"], _cancelText: ["clrCancelText", "_cancelText"], _editable: ["clrEditable", "_editable"], _editIcon: ["clrEditIcon", "_editIcon"], _isCollapsible: ["clrIsCollapsible", "_isCollapsible"], _isCollapsed: ["clrIsCollapsed", "_isCollapsed"], _titleTextStyle: ["clrTitleTextStyle", "_titleTextStyle"], _titleTextFontWeight: ["clrTitleTextFontWeight", "_titleTextFontWeight"], _showBadge: ["clrShowBadge", "_showBadge"], _badgeContent: ["clrBadgeContent", "_badgeContent"], _badgeClass: ["clrBadgeClass", "_badgeClass"], viewRef: ["clrViewRef", "viewRef"], editRef: ["clrEditRef", "editRef"], editMode: ["clrEditMode", "editMode"] }, outputs: { _isCollapsedChange: "clrIsCollapsedChange", _editModeChanged: "clrEditModeChange", _submitted: "clrSectionSubmitted", _cancelled: "clrSectionEditCancelled" }, ngImport: i0, template: "<div class=\"card view-edit-section\" (keyup.escape)=\"onCancel()\">\n <div class=\"card-block\">\n <div class=\"card-title\" [attr.cds-text]=\"_titleTextStyle + ' ' + _titleTextFontWeight\">\n <ng-template #titleContainer>\n {{ _title }} @if (_showBadge) { @if (_badgeContent) {\n <span class=\"ves-badge\" [ngClass]=\"_badgeClass\">{{ _badgeContent }}</span>\n }\n <ng-content select=\"[badge]\"></ng-content>\n }\n </ng-template>\n @if (_isCollapsible && !editMode) {\n <span\n class=\"ces-title-trigger\"\n (click)=\"onCollapseExpand()\"\n (keydown.enter)=\"onCollapseExpand()\"\n (keydown.space)=\"onCollapseExpand(); $event.preventDefault()\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-expanded]=\"!_isCollapsed\"\n >\n <ng-template [ngTemplateOutlet]=\"titleContainer\"></ng-template>\n </span>\n <button type=\"button\" (click)=\"onCollapseExpand()\" class=\"btn btn-icon btn-link ces-caret-btn\">\n <cds-icon shape=\"angle\" size=\"20\" class=\"ces-caret-icon\" [@rotateIcon]=\"_isCollapsed\"></cds-icon>\n </button>\n } @else {\n <ng-template [ngTemplateOutlet]=\"titleContainer\"></ng-template>\n }\n <div class=\"ves-actions\">\n @if (_editable && !editMode && actionBlock.children.length == 0) {\n <button type=\"button\" (click)=\"onEdit()\" class=\"btn btn-icon btn-link ves-action\">\n <cds-icon class=\"ves-edit-icon\" [shape]=\"_editIcon\" size=\"20\"></cds-icon>\n </button>\n }\n <div #actionBlock>\n <ng-content select=\"[action-block]\"></ng-content>\n </div>\n </div>\n </div>\n @if (!(_isCollapsed && _isCollapsible)) {\n <div class=\"card-text\" [@collapseExpandAnimation]=\"initialized\">\n @if (!editMode) {\n <ng-template [ngTemplateOutlet]=\"viewRef\"></ng-template>\n } @if (editMode) {\n <ng-template [ngTemplateOutlet]=\"editRef\"></ng-template>\n } @if (editMode) {\n <form clrForm (ngSubmit)=\"onSubmit()\" class=\"button-bar\">\n <button class=\"btn btn-primary ves-save\" type=\"submit\">{{ _saveText }}</button>\n <button class=\"btn ves-cancel\" (click)=\"onCancel()\" type=\"button\">{{ _cancelText }}</button>\n </form>\n }\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.ClrIcon, selector: "clr-icon, cds-icon", inputs: ["shape", "size", "direction", "flip", "solid", "status", "inverse", "badge"] }, { kind: "directive", type: i2.CdsIconCustomTag, selector: "cds-icon" }, { kind: "directive", type: i1$1.ClrForm, selector: "[clrForm]", inputs: ["clrLabelSize"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }], animations: [
5989
5989
  trigger('collapseExpandAnimation', [
5990
5990
  transition(':enter', [
5991
5991
  style({ opacity: 0, height: 0, overflow: 'hidden' }),
@@ -6023,7 +6023,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImpo
6023
6023
  transition('true => false', animate('300ms ease-out')),
6024
6024
  transition('false => true', animate('300ms ease-in')),
6025
6025
  ]),
6026
- ], standalone: false, template: "<div class=\"card view-edit-section\" (keyup.escape)=\"onCancel()\">\n <div class=\"card-block\">\n <div class=\"card-title\" [attr.cds-text]=\"_titleTextStyle + ' ' + _titleTextFontWeight\">\n @if (_isCollapsible && !editMode) {\n <span\n class=\"ces-title-trigger\"\n (click)=\"onCollapseExpand()\"\n (keydown.enter)=\"onCollapseExpand()\"\n (keydown.space)=\"onCollapseExpand(); $event.preventDefault()\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-expanded]=\"!_isCollapsed\"\n >\n {{ _title }}\n </span>\n <button type=\"button\" (click)=\"onCollapseExpand()\" class=\"btn btn-icon btn-link ces-caret-btn\">\n <cds-icon shape=\"angle\" size=\"20\" class=\"ces-caret-icon\" [@rotateIcon]=\"_isCollapsed\"></cds-icon>\n </button>\n } @else { {{ _title }} }\n <div class=\"ves-actions\">\n @if (_editable && !editMode && actionBlock.children.length == 0) {\n <button type=\"button\" (click)=\"onEdit()\" class=\"btn btn-icon btn-link ves-action\">\n <cds-icon class=\"ves-edit-icon\" [shape]=\"_editIcon\" size=\"20\"></cds-icon>\n </button>\n }\n <div #actionBlock>\n <ng-content select=\"[action-block]\"></ng-content>\n </div>\n </div>\n </div>\n @if (!(_isCollapsed && _isCollapsible)) {\n <div class=\"card-text\" [@collapseExpandAnimation]=\"initialized\">\n @if (!editMode) {\n <ng-template [ngTemplateOutlet]=\"viewRef\"></ng-template>\n } @if (editMode) {\n <ng-template [ngTemplateOutlet]=\"editRef\"></ng-template>\n } @if (editMode) {\n <form clrForm (ngSubmit)=\"onSubmit()\" class=\"button-bar\">\n <button class=\"btn btn-primary ves-save\" type=\"submit\">{{ _saveText }}</button>\n <button class=\"btn ves-cancel\" (click)=\"onCancel()\" type=\"button\">{{ _cancelText }}</button>\n </form>\n }\n </div>\n }\n </div>\n</div>\n" }]
6026
+ ], standalone: false, template: "<div class=\"card view-edit-section\" (keyup.escape)=\"onCancel()\">\n <div class=\"card-block\">\n <div class=\"card-title\" [attr.cds-text]=\"_titleTextStyle + ' ' + _titleTextFontWeight\">\n <ng-template #titleContainer>\n {{ _title }} @if (_showBadge) { @if (_badgeContent) {\n <span class=\"ves-badge\" [ngClass]=\"_badgeClass\">{{ _badgeContent }}</span>\n }\n <ng-content select=\"[badge]\"></ng-content>\n }\n </ng-template>\n @if (_isCollapsible && !editMode) {\n <span\n class=\"ces-title-trigger\"\n (click)=\"onCollapseExpand()\"\n (keydown.enter)=\"onCollapseExpand()\"\n (keydown.space)=\"onCollapseExpand(); $event.preventDefault()\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-expanded]=\"!_isCollapsed\"\n >\n <ng-template [ngTemplateOutlet]=\"titleContainer\"></ng-template>\n </span>\n <button type=\"button\" (click)=\"onCollapseExpand()\" class=\"btn btn-icon btn-link ces-caret-btn\">\n <cds-icon shape=\"angle\" size=\"20\" class=\"ces-caret-icon\" [@rotateIcon]=\"_isCollapsed\"></cds-icon>\n </button>\n } @else {\n <ng-template [ngTemplateOutlet]=\"titleContainer\"></ng-template>\n }\n <div class=\"ves-actions\">\n @if (_editable && !editMode && actionBlock.children.length == 0) {\n <button type=\"button\" (click)=\"onEdit()\" class=\"btn btn-icon btn-link ves-action\">\n <cds-icon class=\"ves-edit-icon\" [shape]=\"_editIcon\" size=\"20\"></cds-icon>\n </button>\n }\n <div #actionBlock>\n <ng-content select=\"[action-block]\"></ng-content>\n </div>\n </div>\n </div>\n @if (!(_isCollapsed && _isCollapsible)) {\n <div class=\"card-text\" [@collapseExpandAnimation]=\"initialized\">\n @if (!editMode) {\n <ng-template [ngTemplateOutlet]=\"viewRef\"></ng-template>\n } @if (editMode) {\n <ng-template [ngTemplateOutlet]=\"editRef\"></ng-template>\n } @if (editMode) {\n <form clrForm (ngSubmit)=\"onSubmit()\" class=\"button-bar\">\n <button class=\"btn btn-primary ves-save\" type=\"submit\">{{ _saveText }}</button>\n <button class=\"btn ves-cancel\" (click)=\"onCancel()\" type=\"button\">{{ _cancelText }}</button>\n </form>\n }\n </div>\n }\n </div>\n</div>\n" }]
6027
6027
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { _title: [{
6028
6028
  type: Input,
6029
6029
  args: ['clrTitle']
@@ -6054,6 +6054,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImpo
6054
6054
  }], _titleTextFontWeight: [{
6055
6055
  type: Input,
6056
6056
  args: ['clrTitleTextFontWeight']
6057
+ }], _showBadge: [{
6058
+ type: Input,
6059
+ args: ['clrShowBadge']
6060
+ }], _badgeContent: [{
6061
+ type: Input,
6062
+ args: ['clrBadgeContent']
6063
+ }], _badgeClass: [{
6064
+ type: Input,
6065
+ args: ['clrBadgeClass']
6057
6066
  }], viewRef: [{
6058
6067
  type: Input,
6059
6068
  args: ['clrViewRef']