@annalib/anna-core 19.0.28 → 19.0.29

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 (19) hide show
  1. package/esm2020/lib/anna-core.module.mjs +5 -10
  2. package/esm2020/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.mjs +16 -51
  3. package/esm2020/lib/anna-generic-table-lib/components/anna-column-filters/anna-column-date-range-filter/anna-column-date-range-filter.component.mjs +1 -1
  4. package/esm2020/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.mjs +10 -27
  5. package/esm2020/public-api.mjs +1 -2
  6. package/fesm2015/annalib-anna-core.mjs +26 -124
  7. package/fesm2015/annalib-anna-core.mjs.map +1 -1
  8. package/fesm2020/annalib-anna-core.mjs +26 -124
  9. package/fesm2020/annalib-anna-core.mjs.map +1 -1
  10. package/lib/anna-core.module.d.ts +11 -12
  11. package/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.d.ts +5 -9
  12. package/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.d.ts +1 -3
  13. package/package.json +1 -1
  14. package/public-api.d.ts +0 -1
  15. package/src/lib/anna-common-scss/_business-rule-common.scss +35 -0
  16. package/src/lib/anna-common-scss/_generic-table-common.scss +0 -1
  17. package/src/lib/anna-common-scss/third-party-lib/_angular-material-mat-radio.scss +1 -1
  18. package/esm2020/lib/anna-core-shared-lib/directives/fixed-rows-popup-table/fixed-rows-popup-table.directive.mjs +0 -43
  19. package/lib/anna-core-shared-lib/directives/fixed-rows-popup-table/fixed-rows-popup-table.directive.d.ts +0 -16
@@ -25,19 +25,18 @@ import * as i23 from "./anna-generic-table-lib/components/anna-column-filters/an
25
25
  import * as i24 from "./anna-core-shared-lib/components/anna-deleted-order-icon-template/anna-deleted-order-icon-template.component";
26
26
  import * as i25 from "./anna-generic-table-lib/components/anna-column-filters/anna-column-slider-filter/anna-column-slider-filter.component";
27
27
  import * as i26 from "./anna-core-shared-lib/pipes/annaDateFormatter.pipe";
28
- import * as i27 from "./anna-core-shared-lib/directives/fixed-rows-popup-table/fixed-rows-popup-table.directive";
29
- import * as i28 from "@angular/common";
30
- import * as i29 from "@ng-bootstrap/ng-bootstrap";
31
- import * as i30 from "@angular/forms";
32
- import * as i31 from "@angular/material/radio";
33
- import * as i32 from "@angular/material/button-toggle";
34
- import * as i33 from "@angular/material/table";
35
- import * as i34 from "@angular-slider/ngx-slider";
36
- import * as i35 from "ngx-skeleton-loader";
37
- import * as i36 from "@angular/cdk/scrolling";
38
- import * as i37 from "ng-circle-progress";
28
+ import * as i27 from "@angular/common";
29
+ import * as i28 from "@ng-bootstrap/ng-bootstrap";
30
+ import * as i29 from "@angular/forms";
31
+ import * as i30 from "@angular/material/radio";
32
+ import * as i31 from "@angular/material/button-toggle";
33
+ import * as i32 from "@angular/material/table";
34
+ import * as i33 from "@angular-slider/ngx-slider";
35
+ import * as i34 from "ngx-skeleton-loader";
36
+ import * as i35 from "@angular/cdk/scrolling";
37
+ import * as i36 from "ng-circle-progress";
39
38
  export declare class AnnaCoreModule {
40
39
  static ɵfac: i0.ɵɵFactoryDeclaration<AnnaCoreModule, never>;
41
- static ɵmod: i0.ɵɵNgModuleDeclaration<AnnaCoreModule, [typeof i1.AnnaNoDataComponent, typeof i2.AnnaFilterSearchedTextPipe, typeof i3.AnnaConvertZeroOrNullOrUndefinedPipe, typeof i4.AnnaTypeofDataPipe, typeof i2.AnnaFilterSearchedTextPipe, typeof i5.AnnaReplaceCharPipe, typeof i6.AnnaBuyerApprovalIconTemplateComponent, typeof i7.AnnaLiveIconTemplateComponent, typeof i8.AnnaNotifyIconTemplateComponent, typeof i9.AnnaPayForPerformanceIconTemplateComponent, typeof i10.AnnaRejectedIconTemplateComponent, typeof i11.showEllipsisTextOnHoverDirective, typeof i12.AnnaIconColumnComponent, typeof i13.AnnaWeekCalendarComponent, typeof i14.AnnaCalendarFilterComponent, typeof i15.AnnaSortComponent, typeof i16.AnnaVirtualTableDirective, typeof i17.AnnaNonEditableGenericTableComponent, typeof i18.AnnaTableVirtualScrollViewportComponent, typeof i19.AnnaFixedRowSizeTableVirtualScrollStrategyDirective, typeof i20.DigitOnlyDirective, typeof i21.AnnaColumnDateRangeFilterComponent, typeof i22.AnnaColumnTimeFilterComponent, typeof i23.AnnaColumnCheckboxFilterComponent, typeof i24.AnnaDeletedOrderIconTemplateComponent, typeof i25.AnnaColumnSliderFilterComponent, typeof i26.AnnaDateFormatterPipe, typeof i27.FixedRowsPopupTableDirective], [typeof i28.CommonModule, typeof i29.NgbModule, typeof i30.FormsModule, typeof i31.MatRadioModule, typeof i32.MatButtonToggleModule, typeof i33.MatTableModule, typeof i34.NgxSliderModule, typeof i35.NgxSkeletonLoaderModule, typeof i36.ScrollingModule, typeof i37.NgCircleProgressModule], [typeof i1.AnnaNoDataComponent, typeof i2.AnnaFilterSearchedTextPipe, typeof i3.AnnaConvertZeroOrNullOrUndefinedPipe, typeof i4.AnnaTypeofDataPipe, typeof i5.AnnaReplaceCharPipe, typeof i2.AnnaFilterSearchedTextPipe, typeof i6.AnnaBuyerApprovalIconTemplateComponent, typeof i7.AnnaLiveIconTemplateComponent, typeof i8.AnnaNotifyIconTemplateComponent, typeof i9.AnnaPayForPerformanceIconTemplateComponent, typeof i10.AnnaRejectedIconTemplateComponent, typeof i11.showEllipsisTextOnHoverDirective, typeof i12.AnnaIconColumnComponent, typeof i13.AnnaWeekCalendarComponent, typeof i14.AnnaCalendarFilterComponent, typeof i15.AnnaSortComponent, typeof i16.AnnaVirtualTableDirective, typeof i17.AnnaNonEditableGenericTableComponent, typeof i18.AnnaTableVirtualScrollViewportComponent, typeof i21.AnnaColumnDateRangeFilterComponent, typeof i22.AnnaColumnTimeFilterComponent, typeof i23.AnnaColumnCheckboxFilterComponent, typeof i19.AnnaFixedRowSizeTableVirtualScrollStrategyDirective, typeof i20.DigitOnlyDirective, typeof i24.AnnaDeletedOrderIconTemplateComponent, typeof i25.AnnaColumnSliderFilterComponent, typeof i26.AnnaDateFormatterPipe, typeof i27.FixedRowsPopupTableDirective]>;
40
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AnnaCoreModule, [typeof i1.AnnaNoDataComponent, typeof i2.AnnaFilterSearchedTextPipe, typeof i3.AnnaConvertZeroOrNullOrUndefinedPipe, typeof i4.AnnaTypeofDataPipe, typeof i2.AnnaFilterSearchedTextPipe, typeof i5.AnnaReplaceCharPipe, typeof i6.AnnaBuyerApprovalIconTemplateComponent, typeof i7.AnnaLiveIconTemplateComponent, typeof i8.AnnaNotifyIconTemplateComponent, typeof i9.AnnaPayForPerformanceIconTemplateComponent, typeof i10.AnnaRejectedIconTemplateComponent, typeof i11.showEllipsisTextOnHoverDirective, typeof i12.AnnaIconColumnComponent, typeof i13.AnnaWeekCalendarComponent, typeof i14.AnnaCalendarFilterComponent, typeof i15.AnnaSortComponent, typeof i16.AnnaVirtualTableDirective, typeof i17.AnnaNonEditableGenericTableComponent, typeof i18.AnnaTableVirtualScrollViewportComponent, typeof i19.AnnaFixedRowSizeTableVirtualScrollStrategyDirective, typeof i20.DigitOnlyDirective, typeof i21.AnnaColumnDateRangeFilterComponent, typeof i22.AnnaColumnTimeFilterComponent, typeof i23.AnnaColumnCheckboxFilterComponent, typeof i24.AnnaDeletedOrderIconTemplateComponent, typeof i25.AnnaColumnSliderFilterComponent, typeof i26.AnnaDateFormatterPipe], [typeof i27.CommonModule, typeof i28.NgbModule, typeof i29.FormsModule, typeof i30.MatRadioModule, typeof i31.MatButtonToggleModule, typeof i32.MatTableModule, typeof i33.NgxSliderModule, typeof i34.NgxSkeletonLoaderModule, typeof i35.ScrollingModule, typeof i36.NgCircleProgressModule], [typeof i1.AnnaNoDataComponent, typeof i2.AnnaFilterSearchedTextPipe, typeof i3.AnnaConvertZeroOrNullOrUndefinedPipe, typeof i4.AnnaTypeofDataPipe, typeof i5.AnnaReplaceCharPipe, typeof i2.AnnaFilterSearchedTextPipe, typeof i6.AnnaBuyerApprovalIconTemplateComponent, typeof i7.AnnaLiveIconTemplateComponent, typeof i8.AnnaNotifyIconTemplateComponent, typeof i9.AnnaPayForPerformanceIconTemplateComponent, typeof i10.AnnaRejectedIconTemplateComponent, typeof i11.showEllipsisTextOnHoverDirective, typeof i12.AnnaIconColumnComponent, typeof i13.AnnaWeekCalendarComponent, typeof i14.AnnaCalendarFilterComponent, typeof i15.AnnaSortComponent, typeof i16.AnnaVirtualTableDirective, typeof i17.AnnaNonEditableGenericTableComponent, typeof i18.AnnaTableVirtualScrollViewportComponent, typeof i21.AnnaColumnDateRangeFilterComponent, typeof i22.AnnaColumnTimeFilterComponent, typeof i23.AnnaColumnCheckboxFilterComponent, typeof i19.AnnaFixedRowSizeTableVirtualScrollStrategyDirective, typeof i20.DigitOnlyDirective, typeof i24.AnnaDeletedOrderIconTemplateComponent, typeof i25.AnnaColumnSliderFilterComponent, typeof i26.AnnaDateFormatterPipe]>;
42
41
  static ɵinj: i0.ɵɵInjectorDeclaration<AnnaCoreModule>;
43
42
  }
@@ -1,11 +1,11 @@
1
1
  import { EventEmitter, OnChanges, OnInit, SimpleChanges } from "@angular/core";
2
- import { NgbDate } from "@ng-bootstrap/ng-bootstrap";
2
+ import { NgbDate, NgbDatepickerConfig } from "@ng-bootstrap/ng-bootstrap";
3
3
  import { AnnaDateTimeFormatService } from '../../../anna-core-shared-lib/services/anna-date-time-format.service';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class AnnaCalendarFilterComponent implements OnInit, OnChanges {
6
6
  private annaTimeService;
7
+ private datePickerConfig;
7
8
  maxDate: any;
8
- autoClose: "inside" | "outside" | boolean;
9
9
  label: string;
10
10
  minDate: any;
11
11
  showLabel: boolean;
@@ -15,8 +15,6 @@ export declare class AnnaCalendarFilterComponent implements OnInit, OnChanges {
15
15
  selectedDate: EventEmitter<any>;
16
16
  selectedFromDate: any;
17
17
  selectedToDate: any;
18
- disableFunction: any;
19
- showFooterTemplate: boolean;
20
18
  apply: EventEmitter<any>;
21
19
  cancel: EventEmitter<any>;
22
20
  fromDate: any;
@@ -24,12 +22,11 @@ export declare class AnnaCalendarFilterComponent implements OnInit, OnChanges {
24
22
  hoveredDate: any;
25
23
  disableApplyBtn: boolean;
26
24
  dateToBeShownInInput: string;
27
- constructor(annaTimeService: AnnaDateTimeFormatService);
25
+ disableFunction: any;
26
+ constructor(annaTimeService: AnnaDateTimeFormatService, datePickerConfig: NgbDatepickerConfig);
28
27
  ngOnChanges(changes: SimpleChanges): void;
29
- setStartAndEndDate(): void;
30
28
  ngOnInit(): void;
31
29
  onDateSelection(date: NgbDate): void;
32
- checkIfDisabledDateSelectedInRange(date: NgbDate): boolean;
33
30
  isHovered(date: NgbDate): boolean;
34
31
  isInside(date: NgbDate): boolean;
35
32
  isRange(date: NgbDate): boolean;
@@ -37,7 +34,6 @@ export declare class AnnaCalendarFilterComponent implements OnInit, OnChanges {
37
34
  applySelection(): void;
38
35
  disableCalendarApplyBtn(): void;
39
36
  setInputText(): void;
40
- datepickerClosed(): void;
41
37
  static ɵfac: i0.ɵɵFactoryDeclaration<AnnaCalendarFilterComponent, never>;
42
- static ɵcmp: i0.ɵɵComponentDeclaration<AnnaCalendarFilterComponent, "anna-core-calendar-filter-lib", never, { "maxDate": "maxDate"; "autoClose": "autoClose"; "label": "label"; "minDate": "minDate"; "showLabel": "showLabel"; "dateFormat": "dateFormat"; "placeholder": "placeholder"; "disabled": "disabled"; "selectedFromDate": "selectedFromDate"; "selectedToDate": "selectedToDate"; "disableFunction": "disableFunction"; "showFooterTemplate": "showFooterTemplate"; }, { "selectedDate": "selectedDate"; "apply": "apply"; "cancel": "cancel"; }, never, never, false, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<AnnaCalendarFilterComponent, "anna-core-calendar-filter-lib", never, { "maxDate": "maxDate"; "label": "label"; "minDate": "minDate"; "showLabel": "showLabel"; "dateFormat": "dateFormat"; "placeholder": "placeholder"; "disabled": "disabled"; "selectedFromDate": "selectedFromDate"; "selectedToDate": "selectedToDate"; }, { "selectedDate": "selectedDate"; "apply": "apply"; "cancel": "cancel"; }, never, never, false, never>;
43
39
  }
@@ -38,7 +38,6 @@ export declare class AnnaNonEditableGenericTableComponent implements OnInit, OnC
38
38
  };
39
39
  tableClass: string;
40
40
  maximumRowsWhichCanBeRenderedWithoutScroll: number;
41
- fixNumberOfRowsForPopup: boolean;
42
41
  limit: number;
43
42
  includeBorderInTableHeight: boolean;
44
43
  downloadInProgress: boolean;
@@ -127,7 +126,6 @@ export declare class AnnaNonEditableGenericTableComponent implements OnInit, OnC
127
126
  trackByFn(index: number): number;
128
127
  setTooltipRadioNames(): void;
129
128
  selectOrUnselectCheckbox(rowData: any, columnKeys: any, isCheckboxSelected: any): void;
130
- selectOrUnselectRadiobox(rowData: any, columnKeys: any, isCheckboxSelected: boolean): void;
131
129
  selectUnselectAllRows(): void;
132
130
  selectUnselectRow(rowData: any): void;
133
131
  undoCreditedSpot(data: any): void;
@@ -170,6 +168,6 @@ export declare class AnnaNonEditableGenericTableComponent implements OnInit, OnC
170
168
  filterApplied(tableData: any[]): void;
171
169
  sortingApplied(tableData: any[]): void;
172
170
  static ɵfac: i0.ɵɵFactoryDeclaration<AnnaNonEditableGenericTableComponent, never>;
173
- static ɵcmp: i0.ɵɵComponentDeclaration<AnnaNonEditableGenericTableComponent, "anna-core-non-editable-generic-table-lib", never, { "showSkeletonLoading": "showSkeletonLoading"; "tableHeaders": "tableHeaders"; "tableData": "tableData"; "clonedTableData": "clonedTableData"; "gtGeneralConfig": "gtGeneralConfig"; "totalRowInfo": "totalRowInfo"; "gtDimension": "gtDimension"; "tableClass": "tableClass"; "maximumRowsWhichCanBeRenderedWithoutScroll": "maximumRowsWhichCanBeRenderedWithoutScroll"; "fixNumberOfRowsForPopup": "fixNumberOfRowsForPopup"; "limit": "limit"; "includeBorderInTableHeight": "includeBorderInTableHeight"; "downloadInProgress": "downloadInProgress"; "percentDone": "percentDone"; "starredInProgress": "starredInProgress"; "clickableRow": "clickableRow"; "setTableHeightWhenRowSizeIsFixed": "setTableHeightWhenRowSizeIsFixed"; "tableBorderBottomClassRequired": "tableBorderBottomClassRequired"; "hideSomeTds": "hideSomeTds"; "tdsHaveRowSpan": "tdsHaveRowSpan"; "multipleTablesPresent": "multipleTablesPresent"; }, { "toggleCheckbox": "toggleCheckbox"; "toggleRowCheckbox": "toggleRowCheckbox"; "toggleHeaderCheckbox": "toggleHeaderCheckbox"; "undoIconClicked": "undoIconClicked"; "filterAppliedToTable": "filterAppliedToTable"; "sortingAppliedToTable": "sortingAppliedToTable"; "rowClicked": "rowClicked"; "radioButtonSelected": "radioButtonSelected"; "columnFilterOpened": "columnFilterOpened"; "columnFilterClosed": "columnFilterClosed"; "gtIconClicked": "gtIconClicked"; "gtSVGIconClicked": "gtSVGIconClicked"; "gtTextActionClicked": "gtTextActionClicked"; "gtViewDetailClicked": "gtViewDetailClicked"; "gtInnerHTMLClicked": "gtInnerHTMLClicked"; "downloadSpotDetails": "downloadSpotDetails"; "clickableDataClicked": "clickableDataClicked"; "totalRowIconClicked": "totalRowIconClicked"; "notificationIconHover": "notificationIconHover"; "notificationIconHoverLeave": "notificationIconHoverLeave"; "editableInputEdited": "editableInputEdited"; "radioButtonMessageIconClicked": "radioButtonMessageIconClicked"; }, never, never, false, never>;
171
+ static ɵcmp: i0.ɵɵComponentDeclaration<AnnaNonEditableGenericTableComponent, "anna-core-non-editable-generic-table-lib", never, { "showSkeletonLoading": "showSkeletonLoading"; "tableHeaders": "tableHeaders"; "tableData": "tableData"; "clonedTableData": "clonedTableData"; "gtGeneralConfig": "gtGeneralConfig"; "totalRowInfo": "totalRowInfo"; "gtDimension": "gtDimension"; "tableClass": "tableClass"; "maximumRowsWhichCanBeRenderedWithoutScroll": "maximumRowsWhichCanBeRenderedWithoutScroll"; "limit": "limit"; "includeBorderInTableHeight": "includeBorderInTableHeight"; "downloadInProgress": "downloadInProgress"; "percentDone": "percentDone"; "starredInProgress": "starredInProgress"; "clickableRow": "clickableRow"; "setTableHeightWhenRowSizeIsFixed": "setTableHeightWhenRowSizeIsFixed"; "tableBorderBottomClassRequired": "tableBorderBottomClassRequired"; "hideSomeTds": "hideSomeTds"; "tdsHaveRowSpan": "tdsHaveRowSpan"; "multipleTablesPresent": "multipleTablesPresent"; }, { "toggleCheckbox": "toggleCheckbox"; "toggleRowCheckbox": "toggleRowCheckbox"; "toggleHeaderCheckbox": "toggleHeaderCheckbox"; "undoIconClicked": "undoIconClicked"; "filterAppliedToTable": "filterAppliedToTable"; "sortingAppliedToTable": "sortingAppliedToTable"; "rowClicked": "rowClicked"; "radioButtonSelected": "radioButtonSelected"; "columnFilterOpened": "columnFilterOpened"; "columnFilterClosed": "columnFilterClosed"; "gtIconClicked": "gtIconClicked"; "gtSVGIconClicked": "gtSVGIconClicked"; "gtTextActionClicked": "gtTextActionClicked"; "gtViewDetailClicked": "gtViewDetailClicked"; "gtInnerHTMLClicked": "gtInnerHTMLClicked"; "downloadSpotDetails": "downloadSpotDetails"; "clickableDataClicked": "clickableDataClicked"; "totalRowIconClicked": "totalRowIconClicked"; "notificationIconHover": "notificationIconHover"; "notificationIconHoverLeave": "notificationIconHoverLeave"; "editableInputEdited": "editableInputEdited"; "radioButtonMessageIconClicked": "radioButtonMessageIconClicked"; }, never, never, false, never>;
174
172
  }
175
173
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@annalib/anna-core",
3
- "version": "19.0.28",
3
+ "version": "19.0.29",
4
4
  "peerDependencies": {
5
5
  "@angular-slider/ngx-slider": "^2.0.4",
6
6
  "@angular/common": "^15.2.9",
package/public-api.d.ts CHANGED
@@ -28,7 +28,6 @@ export * from "./lib/anna-core-shared-lib/pipes/annaReplaceChar.pipe";
28
28
  export * from "./lib/anna-core-shared-lib/pipes/annaDateFormatter.pipe";
29
29
  export * from "./lib/anna-core-shared-lib/directives/show-ellipsis-text/show-ellipsis-text.directive";
30
30
  export * from './lib/anna-core-shared-lib/directives/digits-only/digits-only.directive';
31
- export * from './lib/anna-core-shared-lib/directives/fixed-rows-popup-table/fixed-rows-popup-table.directive';
32
31
  export * from "./lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component";
33
32
  export * from "./lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component";
34
33
  export * from "./lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component";
@@ -0,0 +1,35 @@
1
+ .ng-content-selector-for-message {
2
+ display: inline;
3
+ font-size: 0.75rem !important;
4
+ font-weight: 400 !important;
5
+ line-height: 16px !important;
6
+
7
+ a {
8
+ color: #268BFF;
9
+ text-decoration: underline;
10
+ }
11
+ }
12
+
13
+ ::ng-deep section.message-box.sm.seller-approval-requested {
14
+ .div-message p.message-label {
15
+ padding: 0 0 0 4px !important;
16
+ }
17
+ }
18
+
19
+ ::ng-deep section.message-box.sm.inline-block-msg {
20
+ padding: 4px!important;
21
+ .div-message p.message-label {
22
+ display: inline-block !important;
23
+ padding: 0 0 0 6px !important;
24
+ }
25
+ .div-icon {
26
+ position: relative;
27
+ top: 4px;
28
+ left: 3px !important;
29
+ }
30
+ }
31
+
32
+ .comment-textarea {
33
+ resize: none;
34
+ height: 90px;
35
+ }
@@ -10,7 +10,6 @@
10
10
 
11
11
  thead {
12
12
  th {
13
- cursor: default;
14
13
  box-shadow: none !important;
15
14
  border: solid 1px #d4d4d4 !important;
16
15
  }
@@ -16,6 +16,6 @@
16
16
  }
17
17
 
18
18
  .mdc-radio--disabled + label {
19
- color: var(--primary-text-color-dark) !important;
19
+ color: var(--disabled-text-color) !important;
20
20
  }
21
21
  }
@@ -1,43 +0,0 @@
1
- import { Directive, ElementRef, HostListener, Input, Renderer2 } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export class FixedRowsPopupTableDirective {
4
- constructor(el, renderer) {
5
- this.el = el;
6
- this.renderer = renderer;
7
- this.popupRowHeight = 37.5;
8
- this.popupHeaderHeight = 38;
9
- this.maxRowsRenderedWithoutScrollForPopup = 10;
10
- }
11
- onWindowResize() {
12
- this.setPopUpTableHeight();
13
- }
14
- ngOnInit() {
15
- this.setPopUpTableHeight();
16
- }
17
- setPopUpTableHeight() {
18
- const viewportHeight = window.innerHeight;
19
- const maxNoOfRowsToDisplay = viewportHeight < 740 ? 5 : 10;
20
- this.maxRowsRenderedWithoutScrollForPopup = maxNoOfRowsToDisplay;
21
- let totalPopupTableHeight = this.maxRowsRenderedWithoutScrollForPopup * this.popupRowHeight + this.popupHeaderHeight;
22
- let tableHeightForPopup = (this.tableDataLength < this.maxRowsRenderedWithoutScrollForPopup) ? ((this.popupRowHeight) * (this.tableDataLength ? this.tableDataLength : 1)) + this.popupHeaderHeight : totalPopupTableHeight;
23
- this.renderer.setStyle(this.el.nativeElement, 'height', `calc(${tableHeightForPopup}px)`);
24
- }
25
- }
26
- FixedRowsPopupTableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FixedRowsPopupTableDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
27
- FixedRowsPopupTableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: FixedRowsPopupTableDirective, selector: "[fixedRowsInPopupTable]", inputs: { popupRowHeight: "popupRowHeight", popupHeaderHeight: "popupHeaderHeight", tableDataLength: "tableDataLength" }, host: { listeners: { "window:resize": "onWindowResize()" } }, ngImport: i0 });
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FixedRowsPopupTableDirective, decorators: [{
29
- type: Directive,
30
- args: [{
31
- selector: '[fixedRowsInPopupTable]'
32
- }]
33
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { popupRowHeight: [{
34
- type: Input
35
- }], popupHeaderHeight: [{
36
- type: Input
37
- }], tableDataLength: [{
38
- type: Input
39
- }], onWindowResize: [{
40
- type: HostListener,
41
- args: ['window:resize']
42
- }] } });
43
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZml4ZWQtcm93cy1wb3B1cC10YWJsZS5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbm5hLWNvcmUvc3JjL2xpYi9hbm5hLWNvcmUtc2hhcmVkLWxpYi9kaXJlY3RpdmVzL2ZpeGVkLXJvd3MtcG9wdXAtdGFibGUvZml4ZWQtcm93cy1wb3B1cC10YWJsZS5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxVQUFVLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBS3RGLE1BQU0sT0FBTyw0QkFBNEI7SUFNdkMsWUFBb0IsRUFBYyxFQUFVLFFBQW1CO1FBQTNDLE9BQUUsR0FBRixFQUFFLENBQVk7UUFBVSxhQUFRLEdBQVIsUUFBUSxDQUFXO1FBTHRELG1CQUFjLEdBQVcsSUFBSSxDQUFDO1FBQzlCLHNCQUFpQixHQUFXLEVBQUUsQ0FBQztRQUV4Qyx5Q0FBb0MsR0FBVyxFQUFFLENBQUM7SUFFaUIsQ0FBQztJQUdwRSxjQUFjO1FBQ1osSUFBSSxDQUFDLG1CQUFtQixFQUFFLENBQUM7SUFDN0IsQ0FBQztJQUVELFFBQVE7UUFDTixJQUFJLENBQUMsbUJBQW1CLEVBQUUsQ0FBQztJQUM3QixDQUFDO0lBRUQsbUJBQW1CO1FBQ2pCLE1BQU0sY0FBYyxHQUFHLE1BQU0sQ0FBQyxXQUFXLENBQUM7UUFDMUMsTUFBTSxvQkFBb0IsR0FBRyxjQUFj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nyb2xsRm9yUG9wdXAgPSBtYXhOb09mUm93c1RvRGlzcGxheTtcclxuICAgIGxldCAgdG90YWxQb3B1cFRhYmxlSGVpZ2h0ID0gdGhpcy5tYXhSb3dzUmVuZGVyZWRXaXRob3V0U2Nyb2xsRm9yUG9wdXAgKiB0aGlzLnBvcHVwUm93SGVpZ2h0ICsgdGhpcy5wb3B1cEhlYWRlckhlaWdodDtcclxuXHJcbiAgICBsZXQgdGFibGVIZWlnaHRGb3JQb3B1cD0gICh0aGlzLnRhYmxlRGF0YUxlbmd0aCA8IHRoaXMubWF4Um93c1JlbmRlcmVkV2l0aG91dFNjcm9sbEZvclBvcHVwKSA/ICgodGhpcy5wb3B1cFJvd0hlaWdodCkqKHRoaXMudGFibGVEYXRhTGVuZ3RoID90aGlzLnRhYmxlRGF0YUxlbmd0aCA6IDEpICkgKyB0aGlzLnBvcHVwSGVhZGVySGVpZ2h0OiB0b3RhbFBvcHVwVGFibGVIZWlnaHRcclxuXHJcbiAgICB0aGlzLnJlbmRlcmVyLnNldFN0eWxlKFxyXG4gICAgICB0aGlzLmVsLm5hdGl2ZUVsZW1lbnQsXHJcbiAgICAgICdoZWlnaHQnLFxyXG4gICAgICBgY2FsYygke3RhYmxlSGVpZ2h0Rm9yUG9wdXB9cHgpYFxyXG4gICAgKTtcclxuICB9XHJcbn1cclxuIl19
@@ -1,16 +0,0 @@
1
- import { ElementRef, Renderer2 } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class FixedRowsPopupTableDirective {
4
- private el;
5
- private renderer;
6
- popupRowHeight: number;
7
- popupHeaderHeight: number;
8
- tableDataLength: number;
9
- maxRowsRenderedWithoutScrollForPopup: number;
10
- constructor(el: ElementRef, renderer: Renderer2);
11
- onWindowResize(): void;
12
- ngOnInit(): void;
13
- setPopUpTableHeight(): void;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<FixedRowsPopupTableDirective, never>;
15
- static ɵdir: i0.ɵɵDirectiveDeclaration<FixedRowsPopupTableDirective, "[fixedRowsInPopupTable]", never, { "popupRowHeight": "popupRowHeight"; "popupHeaderHeight": "popupHeaderHeight"; "tableDataLength": "tableDataLength"; }, {}, never, never, false, never>;
16
- }