@eui/ecl 19.3.1-snapshot-1750931067902 → 19.3.1-snapshot-1750955330873
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/components/ecl-sticky-container/ecl-sticky-container.component.d.ts +13 -0
- package/components/ecl-sticky-container/ecl-sticky-container.component.d.ts.map +1 -1
- package/docs/components/EclStickyContainerComponent.html +26 -0
- package/docs/dependencies.html +2 -2
- package/docs/js/search/search_index.js +2 -2
- package/fesm2022/eui-ecl-components-ecl-sticky-container.mjs +13 -0
- package/fesm2022/eui-ecl-components-ecl-sticky-container.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,10 @@ import { takeUntil } from 'rxjs/operators';
|
|
|
6
6
|
import { ECLBaseDirective } from '@eui/ecl/core';
|
|
7
7
|
import * as i1 from '@angular/cdk/layout';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* This is a component, that has fixed position on the screen. It is a wrapper for other components,
|
|
11
|
+
* when their position needs to be fixed. For example it is used in the 'ecl-inpage-navigation'.
|
|
12
|
+
*/
|
|
9
13
|
class EclStickyContainerComponent extends ECLBaseDirective {
|
|
10
14
|
get cssClasses() {
|
|
11
15
|
return [super.getCssClasses('ecl-sticky-container'), !this.isEnabled ? 'ecl-sticky-container--disabled' : ''].join(' ').trim();
|
|
@@ -21,8 +25,17 @@ class EclStickyContainerComponent extends ECLBaseDirective {
|
|
|
21
25
|
this.cdkBreakpointObserver = cdkBreakpointObserver;
|
|
22
26
|
this.renderer = renderer;
|
|
23
27
|
this.el = el;
|
|
28
|
+
/**
|
|
29
|
+
* This property gives the option to disable ti default behaviour, when value os 'false'.
|
|
30
|
+
*/
|
|
24
31
|
this.isEnabled = true;
|
|
32
|
+
/**
|
|
33
|
+
* Sets the 'top' style property.
|
|
34
|
+
*/
|
|
25
35
|
this.marginTop = 0;
|
|
36
|
+
/**
|
|
37
|
+
* Sets the 'botom' style property.
|
|
38
|
+
*/
|
|
26
39
|
this.marginBottom = 0;
|
|
27
40
|
this.destroy$ = new Subject();
|
|
28
41
|
this.BREAKPOINT_CHANGES_TIMEOUT = 500;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-ecl-components-ecl-sticky-container.mjs","sources":["../../components/ecl-sticky-container/ecl-sticky-container.component.ts","../../components/ecl-sticky-container/ecl-sticky-container.component.html","../../components/ecl-sticky-container/ecl-sticky-container.module.ts","../../components/ecl-sticky-container/eui-ecl-components-ecl-sticky-container.ts"],"sourcesContent":["import { BreakpointObserver } from '@angular/cdk/layout';\nimport { Component, ElementRef, HostBinding, Input, OnDestroy, Renderer2, afterNextRender, booleanAttribute } from '@angular/core';\nimport { Subject, delay } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n@Component({\n selector: 'ecl-sticky-container',\n templateUrl: './ecl-sticky-container.component.html',\n standalone: false,\n styles: [\n `\n :host {\n display: block;\n align-self: flex-start;\n top: 0;\n position: sticky;\n position: -webkit-sticky;\n }\n\n :host.ecl-sticky-container--disabled {\n position: static;\n }\n `,\n ],\n})\nexport class EclStickyContainerComponent extends ECLBaseDirective implements OnDestroy {\n @Input({ transform: booleanAttribute }) isEnabled = true;\n @Input() marginTop = 0;\n @Input() marginBottom = 0;\n\n @HostBinding('class')\n get cssClasses(): string {\n return [super.getCssClasses('ecl-sticky-container'), !this.isEnabled ? 'ecl-sticky-container--disabled' : ''].join(' ').trim();\n }\n\n @HostBinding('style.top.px')\n get top(): number {\n return this.marginTop || null;\n }\n\n @HostBinding('style.bottom.px')\n get bottom(): number {\n return this.marginBottom || null;\n }\n\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private BREAKPOINT_CHANGES_TIMEOUT = 500;\n\n constructor(private cdkBreakpointObserver: BreakpointObserver, private renderer: Renderer2, private el: ElementRef) {\n super();\n afterNextRender(() => {\n this.observeBreakpointChanges();\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n private observeBreakpointChanges(): void {\n this.cdkBreakpointObserver\n .observe('(max-width: 996px)')\n .pipe(takeUntil(this.destroy$), delay(this.BREAKPOINT_CHANGES_TIMEOUT))\n .subscribe((result) => {\n if (result.matches) {\n this.renderer.setStyle(this.el.nativeElement, 'z-index', '15');\n } else {\n this.renderer.removeStyle(this.el.nativeElement, 'z-index');\n }\n });\n }\n}\n","<ng-content></ng-content>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { EclStickyContainerComponent } from './ecl-sticky-container.component';\n\n@NgModule({\n imports: [CommonModule],\n exports: [EclStickyContainerComponent],\n declarations: [EclStickyContainerComponent],\n})\nexport class EclStickyContainerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"eui-ecl-components-ecl-sticky-container.mjs","sources":["../../components/ecl-sticky-container/ecl-sticky-container.component.ts","../../components/ecl-sticky-container/ecl-sticky-container.component.html","../../components/ecl-sticky-container/ecl-sticky-container.module.ts","../../components/ecl-sticky-container/eui-ecl-components-ecl-sticky-container.ts"],"sourcesContent":["import { BreakpointObserver } from '@angular/cdk/layout';\nimport { Component, ElementRef, HostBinding, Input, OnDestroy, Renderer2, afterNextRender, booleanAttribute } from '@angular/core';\nimport { Subject, delay } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * This is a component, that has fixed position on the screen. It is a wrapper for other components,\n * when their position needs to be fixed. For example it is used in the 'ecl-inpage-navigation'.\n */\n@Component({\n selector: 'ecl-sticky-container',\n templateUrl: './ecl-sticky-container.component.html',\n standalone: false,\n styles: [\n `\n :host {\n display: block;\n align-self: flex-start;\n top: 0;\n position: sticky;\n position: -webkit-sticky;\n }\n\n :host.ecl-sticky-container--disabled {\n position: static;\n }\n `,\n ],\n})\nexport class EclStickyContainerComponent extends ECLBaseDirective implements OnDestroy {\n /**\n * This property gives the option to disable ti default behaviour, when value os 'false'.\n */\n @Input({ transform: booleanAttribute }) isEnabled = true;\n /**\n * Sets the 'top' style property.\n */\n @Input() marginTop = 0;\n /**\n * Sets the 'botom' style property.\n */\n @Input() marginBottom = 0;\n\n @HostBinding('class')\n get cssClasses(): string {\n return [super.getCssClasses('ecl-sticky-container'), !this.isEnabled ? 'ecl-sticky-container--disabled' : ''].join(' ').trim();\n }\n\n @HostBinding('style.top.px')\n get top(): number {\n return this.marginTop || null;\n }\n\n @HostBinding('style.bottom.px')\n get bottom(): number {\n return this.marginBottom || null;\n }\n\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private BREAKPOINT_CHANGES_TIMEOUT = 500;\n\n constructor(private cdkBreakpointObserver: BreakpointObserver, private renderer: Renderer2, private el: ElementRef) {\n super();\n afterNextRender(() => {\n this.observeBreakpointChanges();\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n private observeBreakpointChanges(): void {\n this.cdkBreakpointObserver\n .observe('(max-width: 996px)')\n .pipe(takeUntil(this.destroy$), delay(this.BREAKPOINT_CHANGES_TIMEOUT))\n .subscribe((result) => {\n if (result.matches) {\n this.renderer.setStyle(this.el.nativeElement, 'z-index', '15');\n } else {\n this.renderer.removeStyle(this.el.nativeElement, 'z-index');\n }\n });\n }\n}\n","<ng-content></ng-content>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { EclStickyContainerComponent } from './ecl-sticky-container.component';\n\n@NgModule({\n imports: [CommonModule],\n exports: [EclStickyContainerComponent],\n declarations: [EclStickyContainerComponent],\n})\nexport class EclStickyContainerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAMA;;;AAGG;AAqBG,MAAO,2BAA4B,SAAQ,gBAAgB,CAAA;AAc7D,IAAA,IACI,UAAU,GAAA;AACV,QAAA,OA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