angular-overflow-indicator 19.0.5 → 20.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.
package/README.md CHANGED
@@ -54,6 +54,7 @@ import { ScrollViewWithIndicatorComponent } from 'angular-overflow-indicator';
54
54
  **Step 5: Add the overflow-indicator-component with a list larger than the outer container and pass the template reference of the indicator-button**
55
55
 
56
56
  ```html
57
+
57
58
  <div [style]="{ height: '300px', width: '500px' }">
58
59
  <ng-template #customButton>
59
60
  <button (click)="view.scrollToBottom()">There is more below <i>👇</i></button>
@@ -61,7 +62,9 @@ import { ScrollViewWithIndicatorComponent } from 'angular-overflow-indicator';
61
62
 
62
63
  <ng-scroll-view-with-indicator #view [indicatorButton]="customButton">
63
64
  <ul>
64
- <li *ngFor="let item of items()">List item {{ item }}</li>
65
+ @for (item of items(); track item) {
66
+ <li>List item {{ item }}</li>
67
+ }
65
68
  </ul>
66
69
  </ng-scroll-view-with-indicator>
67
70
  </div>
@@ -7,14 +7,14 @@ class DefaultIndicatorButtonComponent {
7
7
  constructor() {
8
8
  this.buttonClicked = output();
9
9
  }
10
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DefaultIndicatorButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
11
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: DefaultIndicatorButtonComponent, isStandalone: true, selector: "ng-scroll-view-default-indicator-button", outputs: { buttonClicked: "buttonClicked" }, ngImport: i0, template: `
10
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: DefaultIndicatorButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
11
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.7", type: DefaultIndicatorButtonComponent, isStandalone: true, selector: "ng-scroll-view-default-indicator-button", outputs: { buttonClicked: "buttonClicked" }, ngImport: i0, template: `
12
12
  <button class="default-button" (click)="buttonClicked.emit()">
13
13
  <span>There is more content</span>
14
14
  </button>
15
15
  `, isInline: true, styles: ["button{border:none;font-size:.8rem;font-weight:500;padding:.4rem .6rem;background-color:#444;color:#fff;border-radius:1rem;margin-bottom:.4rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16
16
  }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DefaultIndicatorButtonComponent, decorators: [{
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: DefaultIndicatorButtonComponent, decorators: [{
18
18
  type: Component,
19
19
  args: [{ selector: 'ng-scroll-view-default-indicator-button', template: `
20
20
  <button class="default-button" (click)="buttonClicked.emit()">
@@ -67,12 +67,12 @@ class ScrollViewWithIndicatorComponent {
67
67
  this.isAtBottom.set(element.scrollTop + 1 >= maxScroll);
68
68
  this.scrollState.emit(Math.round((100 / maxScroll) * (element.scrollTop + 1)));
69
69
  }
70
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ScrollViewWithIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
71
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.6", type: ScrollViewWithIndicatorComponent, isStandalone: true, selector: "ng-scroll-view-with-indicator", inputs: { indicatorButton: { classPropertyName: "indicatorButton", publicName: "indicatorButton", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { scrollState: "scrollState" }, viewQueries: [{ propertyName: "contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true }], ngImport: i0, template: "<div class=\"content-wrapper\" #contentWrapper (scroll)=\"onScroll()\">\r\n <ng-content />\r\n</div>\r\n\r\n<div class=\"scroll-indicator\" *ngIf=\"isOverflowing() && !isAtBottom()\">\r\n <ng-container *ngIf=\"indicatorButton(); else defaultButton\" [ngTemplateOutlet]=\"indicatorButton()\" />\r\n\r\n <ng-template #defaultButton>\r\n <ng-scroll-view-default-indicator-button (buttonClicked)=\"scrollToBottom()\" />\r\n </ng-template>\r\n</div>\r\n", styles: [":host{height:100%;max-height:100%;position:relative;min-height:0;display:flex}.content-wrapper{flex:1;max-height:100%;min-height:0;overflow-y:auto;box-sizing:border-box}.scroll-indicator{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DefaultIndicatorButtonComponent, selector: "ng-scroll-view-default-indicator-button", outputs: ["buttonClicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
70
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ScrollViewWithIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
71
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: ScrollViewWithIndicatorComponent, isStandalone: true, selector: "ng-scroll-view-with-indicator", inputs: { indicatorButton: { classPropertyName: "indicatorButton", publicName: "indicatorButton", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { scrollState: "scrollState" }, viewQueries: [{ propertyName: "contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true }], ngImport: i0, template: "<div class=\"content-wrapper\" #contentWrapper (scroll)=\"onScroll()\">\r\n <ng-content />\r\n</div>\r\n\r\n@if (isOverflowing() && !isAtBottom()) {\r\n <div class=\"scroll-indicator\">\r\n @if (indicatorButton()) {\r\n <ng-container [ngTemplateOutlet]=\"indicatorButton()\" />\r\n } @else {\r\n <ng-scroll-view-default-indicator-button (buttonClicked)=\"scrollToBottom()\" />\r\n }\r\n </div>\r\n}\r\n", styles: [":host{height:100%;max-height:100%;position:relative;min-height:0;display:flex}.content-wrapper{flex:1;max-height:100%;min-height:0;overflow-y:auto;box-sizing:border-box}.scroll-indicator{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DefaultIndicatorButtonComponent, selector: "ng-scroll-view-default-indicator-button", outputs: ["buttonClicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
72
72
  }
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ScrollViewWithIndicatorComponent, decorators: [{
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ScrollViewWithIndicatorComponent, decorators: [{
74
74
  type: Component,
75
- args: [{ selector: 'ng-scroll-view-with-indicator', imports: [CommonModule, DefaultIndicatorButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"content-wrapper\" #contentWrapper (scroll)=\"onScroll()\">\r\n <ng-content />\r\n</div>\r\n\r\n<div class=\"scroll-indicator\" *ngIf=\"isOverflowing() && !isAtBottom()\">\r\n <ng-container *ngIf=\"indicatorButton(); else defaultButton\" [ngTemplateOutlet]=\"indicatorButton()\" />\r\n\r\n <ng-template #defaultButton>\r\n <ng-scroll-view-default-indicator-button (buttonClicked)=\"scrollToBottom()\" />\r\n </ng-template>\r\n</div>\r\n", styles: [":host{height:100%;max-height:100%;position:relative;min-height:0;display:flex}.content-wrapper{flex:1;max-height:100%;min-height:0;overflow-y:auto;box-sizing:border-box}.scroll-indicator{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:center}\n"] }]
75
+ args: [{ selector: 'ng-scroll-view-with-indicator', imports: [CommonModule, DefaultIndicatorButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"content-wrapper\" #contentWrapper (scroll)=\"onScroll()\">\r\n <ng-content />\r\n</div>\r\n\r\n@if (isOverflowing() && !isAtBottom()) {\r\n <div class=\"scroll-indicator\">\r\n @if (indicatorButton()) {\r\n <ng-container [ngTemplateOutlet]=\"indicatorButton()\" />\r\n } @else {\r\n <ng-scroll-view-default-indicator-button (buttonClicked)=\"scrollToBottom()\" />\r\n }\r\n </div>\r\n}\r\n", styles: [":host{height:100%;max-height:100%;position:relative;min-height:0;display:flex}.content-wrapper{flex:1;max-height:100%;min-height:0;overflow-y:auto;box-sizing:border-box}.scroll-indicator{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:center}\n"] }]
76
76
  }], propDecorators: { contentWrapper: [{
77
77
  type: ViewChild,
78
78
  args: ['contentWrapper']
@@ -1 +1 @@
1
- {"version":3,"file":"angular-overflow-indicator.mjs","sources":["../../../../libs/angular-overflow-indicator/src/lib/default-indicator-button/default-indicator-button.component.ts","../../../../libs/angular-overflow-indicator/src/lib/scroll-view-with-indicator/scroll-view-with-indicator.component.ts","../../../../libs/angular-overflow-indicator/src/lib/scroll-view-with-indicator/scroll-view-with-indicator.component.html","../../../../libs/angular-overflow-indicator/src/angular-overflow-indicator.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, output } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ng-scroll-view-default-indicator-button',\r\n template: `\r\n <button class=\"default-button\" (click)=\"buttonClicked.emit()\">\r\n <span>There is more content</span>\r\n </button>\r\n `,\r\n styles: `\r\n button {\r\n border: none;\r\n font-size: 0.8rem;\r\n font-weight: 500;\r\n padding: 0.4rem 0.6rem;\r\n background-color: #444444;\r\n color: #ffffff;\r\n border-radius: 1rem;\r\n margin-bottom: 0.4rem;\r\n }\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class DefaultIndicatorButtonComponent {\r\n buttonClicked = output();\r\n}\r\n","import {\r\n AfterViewInit,\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n inject,\r\n input,\r\n OnDestroy,\r\n output,\r\n signal,\r\n TemplateRef,\r\n ViewChild\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { DefaultIndicatorButtonComponent } from '../default-indicator-button';\r\n\r\n@Component({\r\n selector: 'ng-scroll-view-with-indicator',\r\n templateUrl: './scroll-view-with-indicator.component.html',\r\n styleUrls: ['./scroll-view-with-indicator.component.css'],\r\n imports: [CommonModule, DefaultIndicatorButtonComponent],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class ScrollViewWithIndicatorComponent implements AfterViewInit, OnDestroy {\r\n @ViewChild('contentWrapper') contentWrapper!: ElementRef<HTMLDivElement>;\r\n scrollState = output<number>();\r\n\r\n readonly indicatorButton = input.required<TemplateRef<unknown>>();\r\n readonly isOverflowing = signal(false);\r\n readonly isAtBottom = signal(false);\r\n\r\n private readonly cdr = inject(ChangeDetectorRef);\r\n private resizeObserver: ResizeObserver | null = null;\r\n\r\n ngAfterViewInit(): void {\r\n this.resizeObserver = new ResizeObserver(() => {\r\n this.updateOverflowState();\r\n this.updateScrollState();\r\n this.cdr.detectChanges();\r\n });\r\n\r\n this.resizeObserver.observe(this.contentWrapper.nativeElement);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.resizeObserver?.disconnect();\r\n }\r\n\r\n /**\r\n * Manually scrolls the content-container to the bottom\r\n */\r\n scrollToBottom(): void {\r\n this.contentWrapper.nativeElement.scrollTop = this.contentWrapper.nativeElement.scrollHeight;\r\n }\r\n\r\n /**\r\n * If the user scrolled all the way to the end of the container,\r\n * the indicator button can be hidden\r\n */\r\n onScroll(): void {\r\n this.updateScrollState();\r\n }\r\n\r\n private updateOverflowState(): void {\r\n const element = this.contentWrapper.nativeElement;\r\n const maxScroll = element.scrollHeight - element.offsetHeight;\r\n this.isOverflowing.set(element.offsetHeight < element.scrollHeight && element.scrollTop < maxScroll);\r\n }\r\n\r\n private updateScrollState(): void {\r\n const element = this.contentWrapper.nativeElement;\r\n const maxScroll = element.scrollHeight - element.offsetHeight;\r\n this.isAtBottom.set(element.scrollTop + 1 >= maxScroll);\r\n this.scrollState.emit(Math.round((100 / maxScroll) * (element.scrollTop + 1)));\r\n }\r\n}\r\n","<div class=\"content-wrapper\" #contentWrapper (scroll)=\"onScroll()\">\r\n <ng-content />\r\n</div>\r\n\r\n<div class=\"scroll-indicator\" *ngIf=\"isOverflowing() && !isAtBottom()\">\r\n <ng-container *ngIf=\"indicatorButton(); else defaultButton\" [ngTemplateOutlet]=\"indicatorButton()\" />\r\n\r\n <ng-template #defaultButton>\r\n <ng-scroll-view-default-indicator-button (buttonClicked)=\"scrollToBottom()\" />\r\n </ng-template>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAuBa,+BAA+B,CAAA;AArB5C,IAAA,WAAA,GAAA;QAsBE,IAAa,CAAA,aAAA,GAAG,MAAM,EAAE;AACzB;8GAFY,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA/B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,+BAA+B,EAnBhC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yCAAA,EAAA,OAAA,EAAA,EAAA,aAAA,EAAA,eAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAA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AAA,EAAA,CAAA,EAAA,YAAA,EAAA,gBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,ycAWA,EDUY,MAAA,EAAA,CAAA,6QAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,0SAAE,+BAA+B,EAAA,QAAA,EAAA,yCAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAG5C,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAP5C,SAAS;+BACE,+BAA+B,EAAA,OAAA,EAGhC,CAAC,YAAY,EAAE,+BAA+B,CAAC,EAAA,eAAA,EACvC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,ycAAA,EAAA,MAAA,EAAA,CAAA,6QAAA,CAAA,EAAA;8BAGlB,cAAc,EAAA,CAAA;sBAA1C,SAAS;uBAAC,gBAAgB;;;AEzB7B;;AAEG;;;;"}
1
+ {"version":3,"file":"angular-overflow-indicator.mjs","sources":["../tmp-esm2022/lib/default-indicator-button/default-indicator-button.component.js","../tmp-esm2022/lib/scroll-view-with-indicator/scroll-view-with-indicator.component.js","../tmp-esm2022/angular-overflow-indicator.js"],"sourcesContent":["import { ChangeDetectionStrategy, Component, output } from '@angular/core';\nimport * as i0 from \"@angular/core\";\nexport class DefaultIndicatorButtonComponent {\n constructor() {\n this.buttonClicked = output();\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.0.7\", ngImport: i0, type: DefaultIndicatorButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }\n static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"20.0.7\", type: DefaultIndicatorButtonComponent, isStandalone: true, selector: \"ng-scroll-view-default-indicator-button\", outputs: { buttonClicked: \"buttonClicked\" }, ngImport: i0, template: `\r\n <button class=\"default-button\" (click)=\"buttonClicked.emit()\">\r\n <span>There is more content</span>\r\n </button>\r\n `, isInline: true, styles: [\"button{border:none;font-size:.8rem;font-weight:500;padding:.4rem .6rem;background-color:#444;color:#fff;border-radius:1rem;margin-bottom:.4rem}\\n\"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.0.7\", ngImport: i0, type: DefaultIndicatorButtonComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ng-scroll-view-default-indicator-button', template: `\r\n <button class=\"default-button\" (click)=\"buttonClicked.emit()\">\r\n <span>There is more content</span>\r\n </button>\r\n `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [\"button{border:none;font-size:.8rem;font-weight:500;padding:.4rem .6rem;background-color:#444;color:#fff;border-radius:1rem;margin-bottom:.4rem}\\n\"] }]\n }] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdC1pbmRpY2F0b3ItYnV0dG9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYW5ndWxhci1vdmVyZmxvdy1pbmRpY2F0b3Ivc3JjL2xpYi9kZWZhdWx0LWluZGljYXRvci1idXR0b24vZGVmYXVsdC1pbmRpY2F0b3ItYnV0dG9uLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUF1QjNFLE1BQU0sT0FBTywrQkFBK0I7SUFyQjVDO1FBc0JFLGtCQU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HJcbn0pXHJcbmV4cG9ydCBjbGFzcyBEZWZhdWx0SW5kaWNhdG9yQnV0dG9uQ29tcG9uZW50IHtcclxuICBidXR0b25DbGlja2VkID0gb3V0cHV0KCk7XHJcbn1cclxuIl19","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, inject, input, output, signal, ViewChild } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DefaultIndicatorButtonComponent } from '../default-indicator-button';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"@angular/common\";\nexport class ScrollViewWithIndicatorComponent {\n constructor() {\n this.scrollState = output();\n this.indicatorButton = input.required();\n this.isOverflowing = signal(false);\n this.isAtBottom = signal(false);\n this.cdr = inject(ChangeDetectorRef);\n this.resizeObserver = null;\n }\n ngAfterViewInit() {\n this.resizeObserver = new ResizeObserver(() => {\n this.updateOverflowState();\n this.updateScrollState();\n this.cdr.detectChanges();\n });\n this.resizeObserver.observe(this.contentWrapper.nativeElement);\n }\n ngOnDestroy() {\n this.resizeObserver?.disconnect();\n }\n /**\n * Manually scrolls the content-container to the bottom\n */\n scrollToBottom() {\n this.contentWrapper.nativeElement.scrollTop = this.contentWrapper.nativeElement.scrollHeight;\n }\n /**\n * If the user scrolled all the way to the end of the container,\n * the indicator button can be hidden\n */\n onScroll() {\n this.updateScrollState();\n }\n updateOverflowState() {\n const element = this.contentWrapper.nativeElement;\n const maxScroll = element.scrollHeight - element.offsetHeight;\n this.isOverflowing.set(element.offsetHeight < element.scrollHeight && element.scrollTop < maxScroll);\n }\n updateScrollState() {\n const element = this.contentWrapper.nativeElement;\n const maxScroll = element.scrollHeight - element.offsetHeight;\n this.isAtBottom.set(element.scrollTop + 1 >= maxScroll);\n this.scrollState.emit(Math.round((100 / maxScroll) * (element.scrollTop + 1)));\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.0.7\", ngImport: i0, type: ScrollViewWithIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }\n static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"20.0.7\", type: ScrollViewWithIndicatorComponent, isStandalone: true, selector: \"ng-scroll-view-with-indicator\", inputs: { indicatorButton: { classPropertyName: \"indicatorButton\", publicName: \"indicatorButton\", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { scrollState: \"scrollState\" }, viewQueries: [{ propertyName: \"contentWrapper\", first: true, predicate: [\"contentWrapper\"], descendants: true }], ngImport: i0, template: \"<div class=\\\"content-wrapper\\\" #contentWrapper (scroll)=\\\"onScroll()\\\">\\r\\n <ng-content />\\r\\n</div>\\r\\n\\r\\n@if (isOverflowing() && !isAtBottom()) {\\r\\n <div class=\\\"scroll-indicator\\\">\\r\\n @if (indicatorButton()) {\\r\\n <ng-container [ngTemplateOutlet]=\\\"indicatorButton()\\\" />\\r\\n } @else {\\r\\n <ng-scroll-view-default-indicator-button (buttonClicked)=\\\"scrollToBottom()\\\" />\\r\\n }\\r\\n </div>\\r\\n}\\r\\n\", styles: [\":host{height:100%;max-height:100%;position:relative;min-height:0;display:flex}.content-wrapper{flex:1;max-height:100%;min-height:0;overflow-y:auto;box-sizing:border-box}.scroll-indicator{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:center}\\n\"], dependencies: [{ kind: \"ngmodule\", type: CommonModule }, { kind: \"directive\", type: i1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"component\", type: DefaultIndicatorButtonComponent, selector: \"ng-scroll-view-default-indicator-button\", outputs: [\"buttonClicked\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.0.7\", ngImport: i0, type: ScrollViewWithIndicatorComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ng-scroll-view-with-indicator', imports: [CommonModule, DefaultIndicatorButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: \"<div class=\\\"content-wrapper\\\" #contentWrapper (scroll)=\\\"onScroll()\\\">\\r\\n <ng-content />\\r\\n</div>\\r\\n\\r\\n@if (isOverflowing() && !isAtBottom()) {\\r\\n <div class=\\\"scroll-indicator\\\">\\r\\n @if (indicatorButton()) {\\r\\n <ng-container [ngTemplateOutlet]=\\\"indicatorButton()\\\" />\\r\\n } @else {\\r\\n <ng-scroll-view-default-indicator-button (buttonClicked)=\\\"scrollToBottom()\\\" />\\r\\n }\\r\\n </div>\\r\\n}\\r\\n\", styles: [\":host{height:100%;max-height:100%;position:relative;min-height:0;display:flex}.content-wrapper{flex:1;max-height:100%;min-height:0;overflow-y:auto;box-sizing:border-box}.scroll-indicator{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:center}\\n\"] }]\n }], propDecorators: { contentWrapper: [{\n type: ViewChild,\n args: ['contentWrapper']\n }] } });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Nyb2xsLXZpZXctd2l0aC1pbmRpY2F0b3IuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9hbmd1bGFyLW92ZXJmbG93LWluZGljYXRvci9zcmMvbGliL3Njcm9sbC12aWV3LXdpdGgtaW5kaWNhdG9yL3Njcm9sbC12aWV3LXdpdGgtaW5kaWNhdG9yLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYW5ndWxhci1vdmVyZmxvdy1pbmRpY2F0b3Ivc3JjL2xpYi9zY3JvbGwtdmlldy13aXRoLWluZGljYXRvci9zY3JvbGwtdmlldy13aXRoLWluZGljYXRvci5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBRUwsdUJBQXVCLEVBQ3ZCLGlCQUFpQixFQUNqQixT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xuICAgIH1cclxuICA8L2Rpdj5cclxufVxyXG4iXX0=","/**\n * Generated bundle index. Do not edit.\n */\nexport * from './index';\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci1vdmVyZmxvdy1pbmRpY2F0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXItb3ZlcmZsb3ctaW5kaWNhdG9yL3NyYy9hbmd1bGFyLW92ZXJmbG93LWluZGljYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ=="],"names":[],"mappings":";;;;;AAEO,MAAM,+BAA+B,CAAC;AAC7C,IAAI,WAAW,GAAG;AAClB,QAAQ,IAAI,CAAC,aAAa,GAAG,MAAM,EAAE;AACrC;AACA,IAAI,SAAS,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,kBAAkB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,+BAA+B,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,eAAe,CAAC,SAAS,EAAE,CAAC,CAAC;AACjM,IAAI,SAAS,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,oBAAoB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,+BAA+B,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,yCAAyC,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,EAAE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,EAAE,eAAe,EAAE,EAAE,CAAC,uBAAuB,CAAC,MAAM,EAAE,CAAC,CAAC;AACloD;AACA,EAAE,CAAC,wBAAwB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,gCAAgC,EAAE,UAAU,EAAE,CAAC;AAC1I,YAAY,IAAI,EAAE,SAAS;AAC3B,YAAY,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,+BAA+B,EAAE,OAAO,EAAE,CAAC,YAAY,EAAE,+BAA+B,CAAC,EAAE,eAAe,EAAE,uBAAuB,CAAC,MAAM,EAAE,QAAQ,EAAE,0aAA0a,EAAE,MAAM,EAAE,CAAC,6QAA6Q,CAAC,EAAE;AAC13B,SAAS,CAAC,EAAE,cAAc,EAAE,EAAE,cAAc,EAAE,CAAC;AAC/C,gBAAgB,IAAI,EAAE,SAAS;AAC/B,gBAAgB,IAAI,EAAE,CAAC,gBAAgB;AACvC,aAAa,CAAC,EAAE,EAAE,CAAC;;AC1DnB;AACA;AACA;;;;"}
package/index.d.ts CHANGED
@@ -1 +1,29 @@
1
- export * from './lib/scroll-view-with-indicator';
1
+ import * as _angular_core from '@angular/core';
2
+ import { AfterViewInit, OnDestroy, ElementRef, TemplateRef } from '@angular/core';
3
+
4
+ declare class ScrollViewWithIndicatorComponent implements AfterViewInit, OnDestroy {
5
+ contentWrapper: ElementRef<HTMLDivElement>;
6
+ scrollState: _angular_core.OutputEmitterRef<number>;
7
+ readonly indicatorButton: _angular_core.InputSignal<TemplateRef<unknown>>;
8
+ readonly isOverflowing: _angular_core.WritableSignal<boolean>;
9
+ readonly isAtBottom: _angular_core.WritableSignal<boolean>;
10
+ private readonly cdr;
11
+ private resizeObserver;
12
+ ngAfterViewInit(): void;
13
+ ngOnDestroy(): void;
14
+ /**
15
+ * Manually scrolls the content-container to the bottom
16
+ */
17
+ scrollToBottom(): void;
18
+ /**
19
+ * If the user scrolled all the way to the end of the container,
20
+ * the indicator button can be hidden
21
+ */
22
+ onScroll(): void;
23
+ private updateOverflowState;
24
+ private updateScrollState;
25
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScrollViewWithIndicatorComponent, never>;
26
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ScrollViewWithIndicatorComponent, "ng-scroll-view-with-indicator", never, { "indicatorButton": { "alias": "indicatorButton"; "required": true; "isSignal": true; }; }, { "scrollState": "scrollState"; }, never, ["*"], true, never>;
27
+ }
28
+
29
+ export { ScrollViewWithIndicatorComponent };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "angular-overflow-indicator",
3
- "version": "19.0.5",
3
+ "version": "20.0.0",
4
4
  "description": "A simple and performant component that displays a given button if the content of the component overflows",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -9,8 +9,8 @@
9
9
  "directory": "libs/angular-overflow-indicator"
10
10
  },
11
11
  "peerDependencies": {
12
- "@angular/common": "^19.0.0",
13
- "@angular/core": "^19.0.0"
12
+ "@angular/common": "^20.0.0",
13
+ "@angular/core": "^20.0.0"
14
14
  },
15
15
  "dependencies": {
16
16
  "tslib": "^2.6.2"
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class DefaultIndicatorButtonComponent {
3
- buttonClicked: import("@angular/core").OutputEmitterRef<void>;
4
- static ɵfac: i0.ɵɵFactoryDeclaration<DefaultIndicatorButtonComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<DefaultIndicatorButtonComponent, "ng-scroll-view-default-indicator-button", never, {}, { "buttonClicked": "buttonClicked"; }, never, never, true, never>;
6
- }
@@ -1 +0,0 @@
1
- export { DefaultIndicatorButtonComponent } from './default-indicator-button.component';
@@ -1 +0,0 @@
1
- export { ScrollViewWithIndicatorComponent } from './scroll-view-with-indicator.component';
@@ -1,26 +0,0 @@
1
- import { AfterViewInit, ElementRef, OnDestroy, TemplateRef } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class ScrollViewWithIndicatorComponent implements AfterViewInit, OnDestroy {
4
- contentWrapper: ElementRef<HTMLDivElement>;
5
- scrollState: import("@angular/core").OutputEmitterRef<number>;
6
- readonly indicatorButton: import("@angular/core").InputSignal<TemplateRef<unknown>>;
7
- readonly isOverflowing: import("@angular/core").WritableSignal<boolean>;
8
- readonly isAtBottom: import("@angular/core").WritableSignal<boolean>;
9
- private readonly cdr;
10
- private resizeObserver;
11
- ngAfterViewInit(): void;
12
- ngOnDestroy(): void;
13
- /**
14
- * Manually scrolls the content-container to the bottom
15
- */
16
- scrollToBottom(): void;
17
- /**
18
- * If the user scrolled all the way to the end of the container,
19
- * the indicator button can be hidden
20
- */
21
- onScroll(): void;
22
- private updateOverflowState;
23
- private updateScrollState;
24
- static ɵfac: i0.ɵɵFactoryDeclaration<ScrollViewWithIndicatorComponent, never>;
25
- static ɵcmp: i0.ɵɵComponentDeclaration<ScrollViewWithIndicatorComponent, "ng-scroll-view-with-indicator", never, { "indicatorButton": { "alias": "indicatorButton"; "required": true; "isSignal": true; }; }, { "scrollState": "scrollState"; }, never, ["*"], true, never>;
26
- }