@annalib/anna-core 34.0.33 → 34.0.35

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.
@@ -4160,7 +4160,7 @@ class ButtonToggleComponent {
4160
4160
  useExisting: forwardRef(() => ButtonToggleComponent),
4161
4161
  multi: true,
4162
4162
  },
4163
- ], ngImport: i0, template: "<div\r\n class=\"toggle-group\"\r\n [ngClass]=\"isPageViewToggle ? 'view-switch-toggle' : ''\"\r\n [class.disabled]=\"disabled\"\r\n>\r\n <button\r\n *ngFor=\"let option of options\"\r\n class=\"toggle-button\"\r\n [class.active]=\"selectedValue === option.value\"\r\n [disabled]=\"disabled || option.disabled\"\r\n (click)=\"onToggle(option.value)\"\r\n >\r\n {{ option.label }}\r\n </button>\r\n</div>\r\n", styles: [".toggle-group{display:flex;border:1px solid #e0e0e0}.toggle-button{border:none;cursor:pointer;padding:0 12px;width:fit-content!important;font-weight:400;line-height:22px;font-size:var(--page-link-fs);font-family:Roboto;white-space:nowrap;transition:all .3s ease;opacity:1}.toggle-group:not(.disabled) .toggle-button.active{background:#1b88ff;color:#fff}.toggle-group:not(.disabled) .toggle-button:not(.active){background:#fff;color:#bdbdbd}.toggle-group.disabled .toggle-button.active{opacity:.5;background:#7b7b7b;color:#fff;cursor:not-allowed}.toggle-group.disabled .toggle-button:not(.active){opacity:.5;background-color:#bdbdbd;color:#4a4a4a;cursor:not-allowed}.toggle-group.view-switch-toggle{border:none!important;border-radius:2px;background:#f4f4f4!important}.toggle-group.view-switch-toggle button.toggle-button:not(.active){color:#268bff!important;background:none!important}.toggle-group.view-switch-toggle button.toggle-button.active{border-radius:2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4163
+ ], ngImport: i0, template: "<div\r\n class=\"toggle-group\"\r\n [ngClass]=\"isPageViewToggle ? 'view-switch-toggle' : ''\"\r\n [class.disabled]=\"disabled\"\r\n>\r\n <button\r\n *ngFor=\"let option of options\"\r\n class=\"toggle-button\"\r\n [class.active]=\"selectedValue === option.value\"\r\n [disabled]=\"disabled || option.disabled\"\r\n (click)=\"onToggle(option.value)\"\r\n >\r\n {{ option.label }}\r\n </button>\r\n</div>\r\n", styles: [".toggle-group{display:flex;border:1px solid #e0e0e0}.toggle-button{border:none;cursor:pointer;padding:0 12px;width:fit-content!important;font-weight:400;line-height:22px;font-size:var(--page-link-fs);font-family:Roboto;white-space:nowrap;transition:all .3s ease;opacity:1}.toggle-group:not(.disabled) .toggle-button.active{background:#1b88ff;color:#fff}.toggle-group:not(.disabled) .toggle-button:not(.active){background:#fff;color:#bdbdbd}.toggle-group.disabled .toggle-button.active{opacity:.5;background:#7b7b7b;color:#fff;cursor:not-allowed}.toggle-group.disabled .toggle-button:not(.active){opacity:.5;background-color:#bdbdbd;color:#4a4a4a;cursor:not-allowed}.toggle-group.view-switch-toggle{border:none!important;border-radius:2px;background:#f4f4f4!important}.toggle-group.view-switch-toggle button.toggle-button:not(.active){color:#268bff!important;background:none!important}.toggle-group.view-switch-toggle button.toggle-button.active{border-radius:2px}.toggle-group.view-switch-toggle button:only-child{cursor:default!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4164
4164
  }
4165
4165
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ButtonToggleComponent, decorators: [{
4166
4166
  type: Component,
@@ -4170,7 +4170,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
4170
4170
  useExisting: forwardRef(() => ButtonToggleComponent),
4171
4171
  multi: true,
4172
4172
  },
4173
- ], template: "<div\r\n class=\"toggle-group\"\r\n [ngClass]=\"isPageViewToggle ? 'view-switch-toggle' : ''\"\r\n [class.disabled]=\"disabled\"\r\n>\r\n <button\r\n *ngFor=\"let option of options\"\r\n class=\"toggle-button\"\r\n [class.active]=\"selectedValue === option.value\"\r\n [disabled]=\"disabled || option.disabled\"\r\n (click)=\"onToggle(option.value)\"\r\n >\r\n {{ option.label }}\r\n </button>\r\n</div>\r\n", styles: [".toggle-group{display:flex;border:1px solid #e0e0e0}.toggle-button{border:none;cursor:pointer;padding:0 12px;width:fit-content!important;font-weight:400;line-height:22px;font-size:var(--page-link-fs);font-family:Roboto;white-space:nowrap;transition:all .3s ease;opacity:1}.toggle-group:not(.disabled) .toggle-button.active{background:#1b88ff;color:#fff}.toggle-group:not(.disabled) .toggle-button:not(.active){background:#fff;color:#bdbdbd}.toggle-group.disabled .toggle-button.active{opacity:.5;background:#7b7b7b;color:#fff;cursor:not-allowed}.toggle-group.disabled .toggle-button:not(.active){opacity:.5;background-color:#bdbdbd;color:#4a4a4a;cursor:not-allowed}.toggle-group.view-switch-toggle{border:none!important;border-radius:2px;background:#f4f4f4!important}.toggle-group.view-switch-toggle button.toggle-button:not(.active){color:#268bff!important;background:none!important}.toggle-group.view-switch-toggle button.toggle-button.active{border-radius:2px}\n"] }]
4173
+ ], template: "<div\r\n class=\"toggle-group\"\r\n [ngClass]=\"isPageViewToggle ? 'view-switch-toggle' : ''\"\r\n [class.disabled]=\"disabled\"\r\n>\r\n <button\r\n *ngFor=\"let option of options\"\r\n class=\"toggle-button\"\r\n [class.active]=\"selectedValue === option.value\"\r\n [disabled]=\"disabled || option.disabled\"\r\n (click)=\"onToggle(option.value)\"\r\n >\r\n {{ option.label }}\r\n </button>\r\n</div>\r\n", styles: [".toggle-group{display:flex;border:1px solid #e0e0e0}.toggle-button{border:none;cursor:pointer;padding:0 12px;width:fit-content!important;font-weight:400;line-height:22px;font-size:var(--page-link-fs);font-family:Roboto;white-space:nowrap;transition:all .3s ease;opacity:1}.toggle-group:not(.disabled) .toggle-button.active{background:#1b88ff;color:#fff}.toggle-group:not(.disabled) .toggle-button:not(.active){background:#fff;color:#bdbdbd}.toggle-group.disabled .toggle-button.active{opacity:.5;background:#7b7b7b;color:#fff;cursor:not-allowed}.toggle-group.disabled .toggle-button:not(.active){opacity:.5;background-color:#bdbdbd;color:#4a4a4a;cursor:not-allowed}.toggle-group.view-switch-toggle{border:none!important;border-radius:2px;background:#f4f4f4!important}.toggle-group.view-switch-toggle button.toggle-button:not(.active){color:#268bff!important;background:none!important}.toggle-group.view-switch-toggle button.toggle-button.active{border-radius:2px}.toggle-group.view-switch-toggle button:only-child{cursor:default!important}\n"] }]
4174
4174
  }], propDecorators: { options: [{
4175
4175
  type: Input
4176
4176
  }], disabled: [{
@@ -4866,15 +4866,13 @@ class AnnaNonEditableGenericTableComponent {
4866
4866
  let viewportHeight = window.innerHeight;
4867
4867
  const { rowHeight } = this.gtDimension;
4868
4868
  const { headerHeight } = this.gtDimension;
4869
- // const { dataOnTopHeight } = this.gtDimension; // not used anymore
4870
- // const { marginFromBottom } = this.gtDimension;
4871
4869
  let actualTableHeight;
4872
4870
  const element = this.tableElementRef?.nativeElement;
4873
4871
  const hasHorizontalScrollbar = element.scrollWidth > element.clientWidth;
4874
4872
  let dataOnTopHeight =
4875
4873
  // eslint-disable-next-line no-unsafe-optional-chaining
4876
4874
  element?.getBoundingClientRect()?.top + window?.scrollY + (hasHorizontalScrollbar ? 4 : 1);
4877
- dataOnTopHeight = dataOnTopHeight > 0 ? dataOnTopHeight : 252;
4875
+ dataOnTopHeight = dataOnTopHeight > 0 ? Math.ceil(dataOnTopHeight) : 252;
4878
4876
  if (this.fixNumberOfRowsForPopup) {
4879
4877
  const maxNoOfRowsToDisplay = viewportHeight < 740 ? 5 : 10;
4880
4878
  this.maximumRowsWhichCanBeRenderedWithoutScroll = maxNoOfRowsToDisplay;
@@ -4884,9 +4882,7 @@ class AnnaNonEditableGenericTableComponent {
4884
4882
  const minHeightForTable = headerHeight + 3 * rowHeight;
4885
4883
  viewportHeight = viewportHeight <= dataOnTopHeight ? dataOnTopHeight + minHeightForTable : viewportHeight;
4886
4884
  const heightLeftForTable = viewportHeight - dataOnTopHeight;
4887
- // const heightLeftForTable = viewportHeight - dataOnTopHeight - marginFromBottom;
4888
4885
  this.maximumRowsWhichCanBeRenderedWithoutScroll = Math.ceil((heightLeftForTable - headerHeight) / rowHeight);
4889
- // actualTableHeight = viewportHeight - dataOnTopHeight - marginFromBottom;
4890
4886
  if (this.fixRowsToRender) {
4891
4887
  this.maximumRowsWhichCanBeRenderedWithoutScroll = this.fixRowsToRender;
4892
4888
  actualTableHeight =