@clr/angular 15.0.0-rc.2 → 15.0.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.
@@ -12690,7 +12690,6 @@ class Items {
12690
12690
  * Indicates if the data is currently loading
12691
12691
  */
12692
12692
  this.loading = false;
12693
- // TODO: Verify that trackBy is registered for the *ngFor case too
12694
12693
  /**
12695
12694
  * Tracking function to identify objects. Default is reference equality.
12696
12695
  */
@@ -12870,6 +12869,16 @@ class ClrDatagridItems {
12870
12869
  this.items.trackBy = value;
12871
12870
  this.iterableProxy.ngForTrackBy = value;
12872
12871
  }
12872
+ /**
12873
+ * Asserts the correct type of the template context that the directive will render.
12874
+ * See https://angular.io/guide/structural-directives#typing-the-directives-context
12875
+ *
12876
+ * The presence of this method is a signal to the Ivy template type-check compiler that the
12877
+ * structural directive renders its template with a specific context type.
12878
+ */
12879
+ static ngTemplateContextGuard(_dir, _ctx) {
12880
+ return true;
12881
+ }
12873
12882
  ngDoCheck() {
12874
12883
  if (!this.differ) {
12875
12884
  this.differ = this.differs.find(this._rawItems).create(this.iterableProxy.ngForTrackBy);
@@ -13624,7 +13633,7 @@ class Selection {
13624
13633
  *
13625
13634
  */
13626
13635
  canItBeLocked() {
13627
- // We depend on the trackBy and all so there are part of the requirment of is item could be locked
13636
+ // We depend on the trackBy and all so there are part of the requirement of is item could be locked
13628
13637
  return this._selectionType !== SelectionType.None && Array.isArray(this._items.all);
13629
13638
  }
13630
13639
  /**
@@ -13644,11 +13653,11 @@ class Selection {
13644
13653
  }
13645
13654
  }
13646
13655
  /**
13647
- * Check is item locked or not by searcing into lockedRefs for entry
13656
+ * Check is item locked or not by searching into lockedRefs for entry
13648
13657
  */
13649
13658
  isLocked(item) {
13650
13659
  /**
13651
- * The check for selectionType will boost the performence by NOT searching
13660
+ * The check for selectionType will boost the performance by NOT searching
13652
13661
  * into the array when there is no need for that.
13653
13662
  */
13654
13663
  if (this.canItBeLocked()) {
@@ -14936,6 +14945,9 @@ class ClrDatagridColumnToggle {
14936
14945
  anchor: ClrAlignment.START,
14937
14946
  content: ClrAlignment.START,
14938
14947
  };
14948
+ // Without tracking the checkboxes get rerendered on model update, which leads
14949
+ // to loss of focus after checkbox toggle.
14950
+ this.trackByFn = index => index;
14939
14951
  this.subscription = popoverToggleService.openChange.subscribe(change => (this.openState = change));
14940
14952
  }
14941
14953
  get allColumnsVisible() {
@@ -14969,11 +14981,6 @@ class ClrDatagridColumnToggle {
14969
14981
  allColumnsSelected() {
14970
14982
  this.allSelectedElement.nativeElement.focus();
14971
14983
  }
14972
- // Without tracking the checkboxes get rerendered on model update, which leads
14973
- // to loss of focus after checkbox toggle.
14974
- trackByFn(index) {
14975
- return index;
14976
- }
14977
14984
  }
14978
14985
  ClrDatagridColumnToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDatagridColumnToggle, deps: [{ token: ClrCommonStringsService }, { token: ColumnsService }, { token: ClrPopoverToggleService }], target: i0.ɵɵFactoryTarget.Component });
14979
14986
  ClrDatagridColumnToggle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrDatagridColumnToggle, selector: "clr-dg-column-toggle", host: { properties: { "class.column-switch-wrapper": "true", "class.active": "openState" } }, viewQueries: [{ propertyName: "allSelectedElement", first: true, predicate: ["allSelected"], descendants: true, read: ElementRef }], hostDirectives: [{ directive: PopoverHostDirective }], ngImport: i0, template: `