@clr/angular 5.4.1 → 5.5.3

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.
@@ -1363,7 +1363,8 @@
1363
1363
  singleSelectionAriaLabel: 'Single selection header',
1364
1364
  singleActionableAriaLabel: 'Single actionable header',
1365
1365
  detailExpandableAriaLabel: 'Toggle more row content',
1366
- datagridFilterAriaLabel: 'Toggle column filter',
1366
+ datagridFilterAriaLabel: 'Filter dialog',
1367
+ datagridFilterDialogAriaLabel: 'Toggle column filter',
1367
1368
  columnSeparatorAriaLabel: 'Column resize handle',
1368
1369
  columnSeparatorDescription: 'Not necessary to use this button',
1369
1370
  // Alert
@@ -3123,11 +3124,19 @@
3123
3124
  if (!this.container) {
3124
3125
  return;
3125
3126
  }
3126
- if (invalid && this.displayedContent === false) {
3127
- this.container.createEmbeddedView(this.template, { error: this.control.getError(this.error) });
3128
- this.displayedContent = true;
3127
+ if (invalid) {
3128
+ if (this.displayedContent === false) {
3129
+ this.embeddedViewRef = this.container.createEmbeddedView(this.template, {
3130
+ error: this.control.getError(this.error),
3131
+ });
3132
+ this.displayedContent = true;
3133
+ }
3134
+ else if (this.embeddedViewRef && this.embeddedViewRef.context) {
3135
+ // if view is already rendered, update the error object to keep it in sync
3136
+ this.embeddedViewRef.context.error = this.control.getError(this.error);
3137
+ }
3129
3138
  }
3130
- else if (!invalid) {
3139
+ else {
3131
3140
  this.container.clear();
3132
3141
  this.displayedContent = false;
3133
3142
  }
@@ -10764,7 +10773,7 @@
10764
10773
  selector: 'clr-dg-filter',
10765
10774
  // We register this component as a CustomFilter, for the parent column to detect it.
10766
10775
  providers: [{ provide: CustomFilter, useExisting: ClrDatagridFilter }, UNIQUE_ID_PROVIDER],
10767
- template: "\n <button\n class=\"datagrid-filter-toggle\"\n type=\"button\"\n #anchor\n [attr.aria-label]=\"commonStrings.keys.datagridFilterAriaLabel\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.aria-controls]=\"popoverId\"\n clrPopoverAnchor\n clrPopoverOpenCloseButton\n [class.datagrid-filter-open]=\"open\"\n [class.datagrid-filtered]=\"active\"\n >\n <cds-icon\n [attr.status]=\"active ? 'info' : null\"\n [attr.shape]=\"active ? 'filter-grid-circle' : 'filter-grid'\"\n solid\n ></cds-icon>\n </button>\n\n <div\n class=\"datagrid-filter\"\n [id]=\"popoverId\"\n clrFocusTrap\n *clrPopoverContent=\"open; at: smartPosition; outsideClickToClose: true; scrollToClose: true\"\n >\n <div class=\"datagrid-filter-close-wrapper\">\n <button type=\"button\" class=\"close\" clrPopoverCloseButton>\n <cds-icon shape=\"window-close\" [attr.title]=\"commonStrings.keys.close\"></cds-icon>\n </button>\n </div>\n\n <ng-content></ng-content>\n </div>\n "
10776
+ template: "\n <button\n class=\"datagrid-filter-toggle\"\n type=\"button\"\n #anchor\n [attr.aria-label]=\"commonStrings.keys.datagridFilterAriaLabel\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.aria-controls]=\"popoverId\"\n clrPopoverAnchor\n clrPopoverOpenCloseButton\n [class.datagrid-filter-open]=\"open\"\n [class.datagrid-filtered]=\"active\"\n >\n <cds-icon\n [attr.status]=\"active ? 'info' : null\"\n [attr.shape]=\"active ? 'filter-grid-circle' : 'filter-grid'\"\n solid\n ></cds-icon>\n </button>\n\n <div\n class=\"datagrid-filter\"\n [id]=\"popoverId\"\n clrFocusTrap\n *clrPopoverContent=\"open; at: smartPosition; outsideClickToClose: true; scrollToClose: true\"\n role=\"dialog\"\n [attr.aria-label]=\"commonStrings.keys.datagridFilterDialogAriaLabel\"\n >\n <div class=\"datagrid-filter-close-wrapper\">\n <button type=\"button\" class=\"close\" clrPopoverCloseButton>\n <cds-icon shape=\"window-close\" [attr.title]=\"commonStrings.keys.close\"></cds-icon>\n </button>\n </div>\n\n <ng-content></ng-content>\n </div>\n "
10768
10777
  },] }
10769
10778
  ];
10770
10779
  ClrDatagridFilter.ctorParameters = function () { return [
@@ -12543,6 +12552,12 @@
12543
12552
  _this.focusOnClose();
12544
12553
  }
12545
12554
  }), this.signpostIdService.id.subscribe(function (idChange) { return (_this.ariaControl = idChange); }));
12555
+ this.addDefaultAriaLabel(this.el.nativeElement);
12556
+ };
12557
+ ClrSignpostTrigger.prototype.addDefaultAriaLabel = function (el) {
12558
+ if (!el.hasAttribute('aria-label')) {
12559
+ el.setAttribute('aria-label', this.commonStrings.keys.signpostToggle);
12560
+ }
12546
12561
  };
12547
12562
  ClrSignpostTrigger.prototype.focusOnClose = function () {
12548
12563
  if (!i1.isPlatformBrowser(this.platformId)) {
@@ -12572,7 +12587,6 @@
12572
12587
  selector: '[clrSignpostTrigger]',
12573
12588
  host: {
12574
12589
  class: 'signpost-trigger',
12575
- '[attr.aria-label]': 'commonStrings.keys.signpostToggle',
12576
12590
  '[attr.aria-expanded]': 'ariaExpanded',
12577
12591
  '[attr.aria-controls]': 'ariaControl',
12578
12592
  '[class.active]': 'isOpen',
@@ -13899,7 +13913,7 @@
13899
13913
  /**
13900
13914
  * Reopen updated row or close it
13901
13915
  */
13902
- row ? _this.detailService.open(row.item, row.detailButton) : _this.detailService.close();
13916
+ row ? _this.detailService.open(row.item, row.detailButton.nativeElement) : _this.detailService.close();
13903
13917
  }
13904
13918
  }));
13905
13919
  };