@eui/ecl 22.0.0-alpha.73 → 22.0.0-alpha.75
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/docs/changelog.html +42 -0
- package/docs/js/search/search_index.js +2 -2
- package/docs/json/documentation.json +33 -33
- package/docs/llms.txt +1 -1
- package/docs/properties.html +1 -1
- package/fesm2022/eui-ecl-components-ecl-news-ticker.mjs +8 -7
- package/fesm2022/eui-ecl-components-ecl-news-ticker.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eui-ecl-components-ecl-news-ticker.d.ts +1 -2
- package/types/eui-ecl-components-ecl-news-ticker.d.ts.map +1 -1
|
@@ -81267,7 +81267,7 @@
|
|
|
81267
81267
|
},
|
|
81268
81268
|
{
|
|
81269
81269
|
"name": "EclNewsTickerComponent",
|
|
81270
|
-
"id": "component-EclNewsTickerComponent-
|
|
81270
|
+
"id": "component-EclNewsTickerComponent-d424446b39ecd87f7705a3d4da90ec41104094f16d1935f1ea298f7fa093af366e258f6e388cb37b5ad83262e5669c83236cf37f6c3137f7d6399d8cbf3df961",
|
|
81271
81271
|
"file": "packages/ecl/components/ecl-news-ticker/ecl-news-ticker.component.ts",
|
|
81272
81272
|
"encapsulation": [],
|
|
81273
81273
|
"entryComponents": [],
|
|
@@ -81295,7 +81295,7 @@
|
|
|
81295
81295
|
"indexKey": "",
|
|
81296
81296
|
"optional": false,
|
|
81297
81297
|
"description": "<p>Enables or disables automatic cycling through ticker items.\nDefaults to <code>true</code>.</p>\n",
|
|
81298
|
-
"line":
|
|
81298
|
+
"line": 40,
|
|
81299
81299
|
"rawdescription": "\n\nEnables or disables automatic cycling through ticker items.\nDefaults to `true`.\n",
|
|
81300
81300
|
"modifierKind": [
|
|
81301
81301
|
148
|
|
@@ -81371,7 +81371,7 @@
|
|
|
81371
81371
|
"indexKey": "",
|
|
81372
81372
|
"optional": false,
|
|
81373
81373
|
"description": "<p>Emits when the visible news ticker item changes.\nThe payload is an instance of <code>EclNewsTickerItemEvent</code>.</p>\n",
|
|
81374
|
-
"line":
|
|
81374
|
+
"line": 46,
|
|
81375
81375
|
"rawdescription": "\n\nEmits when the visible news ticker item changes.\nThe payload is an instance of `EclNewsTickerItemEvent`.\n",
|
|
81376
81376
|
"modifierKind": [
|
|
81377
81377
|
148
|
|
@@ -81410,7 +81410,7 @@
|
|
|
81410
81410
|
"indexKey": "",
|
|
81411
81411
|
"optional": false,
|
|
81412
81412
|
"description": "",
|
|
81413
|
-
"line":
|
|
81413
|
+
"line": 78,
|
|
81414
81414
|
"rawdescription": "\n",
|
|
81415
81415
|
"modifierKind": [
|
|
81416
81416
|
124,
|
|
@@ -81427,7 +81427,7 @@
|
|
|
81427
81427
|
"indexKey": "",
|
|
81428
81428
|
"optional": false,
|
|
81429
81429
|
"description": "<p>Reference to the hidden first item used for looping.</p>\n",
|
|
81430
|
-
"line":
|
|
81430
|
+
"line": 56,
|
|
81431
81431
|
"rawdescription": "\n\nReference to the hidden first item used for looping.\n",
|
|
81432
81432
|
"modifierKind": [
|
|
81433
81433
|
148
|
|
@@ -81443,7 +81443,7 @@
|
|
|
81443
81443
|
"indexKey": "",
|
|
81444
81444
|
"optional": false,
|
|
81445
81445
|
"description": "",
|
|
81446
|
-
"line":
|
|
81446
|
+
"line": 86,
|
|
81447
81447
|
"rawdescription": "\n"
|
|
81448
81448
|
},
|
|
81449
81449
|
{
|
|
@@ -81456,7 +81456,7 @@
|
|
|
81456
81456
|
"indexKey": "",
|
|
81457
81457
|
"optional": false,
|
|
81458
81458
|
"description": "<p>Reference to the hidden last item used for looping.</p>\n",
|
|
81459
|
-
"line":
|
|
81459
|
+
"line": 61,
|
|
81460
81460
|
"rawdescription": "\n\nReference to the hidden last item used for looping.\n",
|
|
81461
81461
|
"modifierKind": [
|
|
81462
81462
|
148
|
|
@@ -81472,7 +81472,7 @@
|
|
|
81472
81472
|
"indexKey": "",
|
|
81473
81473
|
"optional": false,
|
|
81474
81474
|
"description": "<p>Query list of all <code>EclNewsTickerItemComponent</code> children projected into this component.</p>\n",
|
|
81475
|
-
"line":
|
|
81475
|
+
"line": 51,
|
|
81476
81476
|
"rawdescription": "\n\nQuery list of all `EclNewsTickerItemComponent` children projected into this component.\n",
|
|
81477
81477
|
"modifierKind": [
|
|
81478
81478
|
148
|
|
@@ -81488,7 +81488,7 @@
|
|
|
81488
81488
|
"indexKey": "",
|
|
81489
81489
|
"optional": false,
|
|
81490
81490
|
"description": "<p>Reference to the pause button used to stop autoplay.</p>\n",
|
|
81491
|
-
"line":
|
|
81491
|
+
"line": 76,
|
|
81492
81492
|
"rawdescription": "\n\nReference to the pause button used to stop autoplay.\n",
|
|
81493
81493
|
"modifierKind": [
|
|
81494
81494
|
148
|
|
@@ -81504,7 +81504,7 @@
|
|
|
81504
81504
|
"indexKey": "",
|
|
81505
81505
|
"optional": false,
|
|
81506
81506
|
"description": "<p>Reference to the play button used to start autoplay.</p>\n",
|
|
81507
|
-
"line":
|
|
81507
|
+
"line": 71,
|
|
81508
81508
|
"rawdescription": "\n\nReference to the play button used to start autoplay.\n",
|
|
81509
81509
|
"modifierKind": [
|
|
81510
81510
|
148
|
|
@@ -81520,7 +81520,7 @@
|
|
|
81520
81520
|
"indexKey": "",
|
|
81521
81521
|
"optional": false,
|
|
81522
81522
|
"description": "",
|
|
81523
|
-
"line":
|
|
81523
|
+
"line": 87,
|
|
81524
81524
|
"rawdescription": "\n"
|
|
81525
81525
|
},
|
|
81526
81526
|
{
|
|
@@ -81533,7 +81533,7 @@
|
|
|
81533
81533
|
"indexKey": "",
|
|
81534
81534
|
"optional": false,
|
|
81535
81535
|
"description": "<p>Reference to the container element that holds the slides.</p>\n",
|
|
81536
|
-
"line":
|
|
81536
|
+
"line": 66,
|
|
81537
81537
|
"rawdescription": "\n\nReference to the container element that holds the slides.\n",
|
|
81538
81538
|
"modifierKind": [
|
|
81539
81539
|
148
|
|
@@ -81549,7 +81549,7 @@
|
|
|
81549
81549
|
"indexKey": "",
|
|
81550
81550
|
"optional": false,
|
|
81551
81551
|
"description": "",
|
|
81552
|
-
"line":
|
|
81552
|
+
"line": 88,
|
|
81553
81553
|
"rawdescription": "\n"
|
|
81554
81554
|
},
|
|
81555
81555
|
{
|
|
@@ -81561,7 +81561,7 @@
|
|
|
81561
81561
|
"indexKey": "",
|
|
81562
81562
|
"optional": false,
|
|
81563
81563
|
"description": "",
|
|
81564
|
-
"line":
|
|
81564
|
+
"line": 89,
|
|
81565
81565
|
"rawdescription": "\n"
|
|
81566
81566
|
}
|
|
81567
81567
|
],
|
|
@@ -81573,7 +81573,7 @@
|
|
|
81573
81573
|
"optional": false,
|
|
81574
81574
|
"returnType": "void",
|
|
81575
81575
|
"typeParameters": [],
|
|
81576
|
-
"line":
|
|
81576
|
+
"line": 220,
|
|
81577
81577
|
"deprecated": false,
|
|
81578
81578
|
"deprecationMessage": "",
|
|
81579
81579
|
"rawdescription": "\n\nCancels the automatic cycling of the ticker items.\n",
|
|
@@ -81586,7 +81586,7 @@
|
|
|
81586
81586
|
"optional": false,
|
|
81587
81587
|
"returnType": "void",
|
|
81588
81588
|
"typeParameters": [],
|
|
81589
|
-
"line":
|
|
81589
|
+
"line": 194,
|
|
81590
81590
|
"deprecated": false,
|
|
81591
81591
|
"deprecationMessage": "",
|
|
81592
81592
|
"rawdescription": "\n\nMoves to the next slide and emits `itemSwitch` event.\n",
|
|
@@ -81599,7 +81599,7 @@
|
|
|
81599
81599
|
"optional": false,
|
|
81600
81600
|
"returnType": "void",
|
|
81601
81601
|
"typeParameters": [],
|
|
81602
|
-
"line":
|
|
81602
|
+
"line": 149,
|
|
81603
81603
|
"deprecated": false,
|
|
81604
81604
|
"deprecationMessage": "",
|
|
81605
81605
|
"rawdescription": "\n\nLifecycle hook that clears intervals and subscriptions.\n",
|
|
@@ -81612,7 +81612,7 @@
|
|
|
81612
81612
|
"optional": false,
|
|
81613
81613
|
"returnType": "void",
|
|
81614
81614
|
"typeParameters": [],
|
|
81615
|
-
"line":
|
|
81615
|
+
"line": 121,
|
|
81616
81616
|
"deprecated": false,
|
|
81617
81617
|
"deprecationMessage": "",
|
|
81618
81618
|
"rawdescription": "\n\nInitializes the autoplay state based on the input configuration.\n",
|
|
@@ -81625,7 +81625,7 @@
|
|
|
81625
81625
|
"optional": false,
|
|
81626
81626
|
"returnType": "void",
|
|
81627
81627
|
"typeParameters": [],
|
|
81628
|
-
"line":
|
|
81628
|
+
"line": 242,
|
|
81629
81629
|
"deprecated": false,
|
|
81630
81630
|
"deprecationMessage": "",
|
|
81631
81631
|
"rawdescription": "\n\nHandles mouse out event from a ticker item.\nResumes autoplay if it was paused due to hover.\n",
|
|
@@ -81638,7 +81638,7 @@
|
|
|
81638
81638
|
"optional": false,
|
|
81639
81639
|
"returnType": "void",
|
|
81640
81640
|
"typeParameters": [],
|
|
81641
|
-
"line":
|
|
81641
|
+
"line": 231,
|
|
81642
81642
|
"deprecated": false,
|
|
81643
81643
|
"deprecationMessage": "",
|
|
81644
81644
|
"rawdescription": "\n\nHandles mouse over event on a ticker item.\nTemporarily pauses autoplay.\n",
|
|
@@ -81651,7 +81651,7 @@
|
|
|
81651
81651
|
"optional": false,
|
|
81652
81652
|
"returnType": "void",
|
|
81653
81653
|
"typeParameters": [],
|
|
81654
|
-
"line":
|
|
81654
|
+
"line": 186,
|
|
81655
81655
|
"deprecated": false,
|
|
81656
81656
|
"deprecationMessage": "",
|
|
81657
81657
|
"rawdescription": "\n\nHandles \"next\" button click.\nNavigates to the next slide and stops autoplay.\n",
|
|
@@ -81673,7 +81673,7 @@
|
|
|
81673
81673
|
"optional": false,
|
|
81674
81674
|
"returnType": "void",
|
|
81675
81675
|
"typeParameters": [],
|
|
81676
|
-
"line":
|
|
81676
|
+
"line": 264,
|
|
81677
81677
|
"deprecated": false,
|
|
81678
81678
|
"deprecationMessage": "",
|
|
81679
81679
|
"rawdescription": "\n\nHandles focus event on the \"Pause\" button.\nStops autoplay and shifts focus to the \"Play\" button.\n",
|
|
@@ -81708,7 +81708,7 @@
|
|
|
81708
81708
|
"optional": false,
|
|
81709
81709
|
"returnType": "void",
|
|
81710
81710
|
"typeParameters": [],
|
|
81711
|
-
"line":
|
|
81711
|
+
"line": 253,
|
|
81712
81712
|
"deprecated": false,
|
|
81713
81713
|
"deprecationMessage": "",
|
|
81714
81714
|
"rawdescription": "\n\nHandles focus event on the \"Play\" button.\nStarts autoplay and shifts focus to the \"Pause\" button.\n",
|
|
@@ -81734,7 +81734,7 @@
|
|
|
81734
81734
|
"optional": false,
|
|
81735
81735
|
"returnType": "void",
|
|
81736
81736
|
"typeParameters": [],
|
|
81737
|
-
"line":
|
|
81737
|
+
"line": 164,
|
|
81738
81738
|
"deprecated": false,
|
|
81739
81739
|
"deprecationMessage": "",
|
|
81740
81740
|
"rawdescription": "\n\nHandles \"previous\" button click.\nNavigates to the previous slide and stops autoplay.\n",
|
|
@@ -81747,7 +81747,7 @@
|
|
|
81747
81747
|
"optional": false,
|
|
81748
81748
|
"returnType": "void",
|
|
81749
81749
|
"typeParameters": [],
|
|
81750
|
-
"line":
|
|
81750
|
+
"line": 172,
|
|
81751
81751
|
"deprecated": false,
|
|
81752
81752
|
"deprecationMessage": "",
|
|
81753
81753
|
"rawdescription": "\n\nMoves to the previous slide and emits `itemSwitch` event.\n",
|
|
@@ -81760,7 +81760,7 @@
|
|
|
81760
81760
|
"optional": false,
|
|
81761
81761
|
"returnType": "void",
|
|
81762
81762
|
"typeParameters": [],
|
|
81763
|
-
"line":
|
|
81763
|
+
"line": 207,
|
|
81764
81764
|
"deprecated": false,
|
|
81765
81765
|
"deprecationMessage": "",
|
|
81766
81766
|
"rawdescription": "\n\nStarts automatic cycling of the ticker items.\n",
|
|
@@ -81857,14 +81857,14 @@
|
|
|
81857
81857
|
"description": "<p>A news ticker (marquee-style) component that cycles through <code>ecl-news-ticker-item</code> slides.\nSupports autoplay, manual previous/next navigation, pause/resume controls, and responsive resizing.</p>\n<ul>\n<li><code>isAutoplay</code> input: enables automatic slide cycling (default <code>true</code>).</li>\n<li>Sub-components: <code>ecl-news-ticker-item</code> holds each slide; directive <code>[eclNewsTickerIcon]</code> styles icons inside items.</li>\n<li><code>itemSwitch</code> output: emits <code>EclNewsTickerItemEvent</code> when the visible item changes.</li>\n<li>Public navigation methods: <code>onPrevious()</code>, <code>previousSlide()</code>, <code>onNext()</code>, <code>nextSlide()</code>, <code>startAutoplay()</code>, <code>cancelAutoplay()</code>.</li>\n<li>Mouse-over pauses autoplay; mouse-out resumes it.</li>\n</ul>\n",
|
|
81858
81858
|
"rawdescription": "\n\nA news ticker (marquee-style) component that cycles through `ecl-news-ticker-item` slides.\nSupports autoplay, manual previous/next navigation, pause/resume controls, and responsive resizing.\n\n- `isAutoplay` input: enables automatic slide cycling (default `true`).\n- Sub-components: `ecl-news-ticker-item` holds each slide; directive `[eclNewsTickerIcon]` styles icons inside items.\n- `itemSwitch` output: emits `EclNewsTickerItemEvent` when the visible item changes.\n- Public navigation methods: `onPrevious()`, `previousSlide()`, `onNext()`, `nextSlide()`, `startAutoplay()`, `cancelAutoplay()`.\n- Mouse-over pauses autoplay; mouse-out resumes it.\n",
|
|
81859
81859
|
"type": "component",
|
|
81860
|
-
"sourceCode": "import { ChangeDetectorRef, Component, computed, DOCUMENT, ElementRef, OnDestroy, Renderer2, afterNextRender, booleanAttribute, inject, output, input, contentChildren, viewChild, OnInit } from '@angular/core';\nimport { outputToObservable } from '@angular/core/rxjs-interop';\nimport { auditTime, fromEvent, Subject, takeUntil } from 'rxjs';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclButtonComponent } from '@eui/ecl/components/ecl-button';\nimport { EclNewsTickerItemComponent } from './ecl-news-ticker-item.component';\nimport { EclNewsTickerItemEvent } from './events/ecl-news-ticker-item.event';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\n\n/**\n * A news ticker (marquee-style) component that cycles through `ecl-news-ticker-item` slides.\n * Supports autoplay, manual previous/next navigation, pause/resume controls, and responsive resizing.\n *\n * - `isAutoplay` input: enables automatic slide cycling (default `true`).\n * - Sub-components: `ecl-news-ticker-item` holds each slide; directive `[eclNewsTickerIcon]` styles icons inside items.\n * - `itemSwitch` output: emits `EclNewsTickerItemEvent` when the visible item changes.\n * - Public navigation methods: `onPrevious()`, `previousSlide()`, `onNext()`, `nextSlide()`, `startAutoplay()`, `cancelAutoplay()`.\n * - Mouse-over pauses autoplay; mouse-out resumes it.\n */\n@Component({\n selector: 'ecl-news-ticker',\n templateUrl: './ecl-news-ticker.component.html',\n imports: [\n ...EUI_ECL_BUTTON,\n ...EUI_ECL_ICON,\n EclNewsTickerItemComponent,\n TranslatePipe,\n ],\n host: {\n '[class]': 'cssClasses()',\n },\n})\nexport class EclNewsTickerComponent extends ECLBaseDirective implements OnDestroy, OnInit {\n /**\n\t * Enables or disables automatic cycling through ticker items.\n\t * Defaults to `true`.\n\t */\n readonly isAutoplay = input(true, { transform: booleanAttribute });\n\n /**\n\t * Emits when the visible news ticker item changes.\n\t * The payload is an instance of `EclNewsTickerItemEvent`.\n\t */\n readonly itemSwitch = output<EclNewsTickerItemEvent>();\n\n /**\n\t * Query list of all `EclNewsTickerItemComponent` children projected into this component.\n\t */\n readonly newsTickerItems = contentChildren(EclNewsTickerItemComponent);\n\n /**\n\t * Reference to the hidden first item used for looping.\n\t */\n readonly firstHiddenItem = viewChild<EclNewsTickerItemComponent>('firstHiddenItem');\n\n /**\n\t * Reference to the hidden last item used for looping.\n\t */\n readonly lastHiddenItem = viewChild<EclNewsTickerItemComponent>('lastHiddenItem');\n\n /**\n\t * Reference to the container element that holds the slides.\n\t */\n readonly slidesContainer = viewChild<ElementRef>('slidesContainer');\n\n /**\n\t * Reference to the play button used to start autoplay.\n\t */\n readonly playBtn = viewChild<EclButtonComponent>('playBtn');\n\n /**\n\t * Reference to the pause button used to stop autoplay.\n\t */\n readonly pauseBtn = viewChild<EclButtonComponent>('pauseBtn');\n\n protected readonly cssClasses = computed<string>(() => {\n const classes = [super.getCssClasses('ecl-news-ticker')];\n if (this.newsTickerItems().length <= 1) {\n classes.push('ecl-news-ticker--single');\n }\n return classes.join(' ').trim();\n });\n\n itemIndex = 1;\n playing = false;\n slidesTransform = '';\n transitionDuration: number | undefined;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private intervalId: any;\n private PLAY_INTERVAL = 5000;\n private INIT_DELAY = 300;\n private _contentHeight = 0;\n private pausePlay = false;\n private unsubscribeListener?: () => void;\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private renderer2 = inject(Renderer2);\n private cd = inject(ChangeDetectorRef);\n private readonly document = inject<Document>(DOCUMENT);\n private readonly window = this.document.defaultView; // Window | null\n\n constructor() {\n super();\n afterNextRender(() => {\n setTimeout(() => {\n this.initContainer();\n }, this.INIT_DELAY);\n this.newsTickerItems().forEach((item) => {\n outputToObservable(item.itemFocused).pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.cancelAutoplay();\n });\n });\n this.observeResizeWindow();\n });\n }\n\n /**\n\t * Initializes the autoplay state based on the input configuration.\n\t */\n ngOnInit(): void {\n this.playing = this.isAutoplay();\n }\n\n /**\n\t * Returns the height of the currently visible ticker item.\n\t */\n get contentHeight(): number {\n return this._contentHeight;\n }\n\n /**\n\t * Returns the number of ticker items.\n\t */\n get itemsCount(): number {\n return this.newsTickerItems().length;\n }\n\n /**\n\t * Indicates whether navigation controls should be shown.\n\t */\n get isShowControls(): boolean {\n return this.newsTickerItems().length > 1;\n }\n\n /**\n\t * Lifecycle hook that clears intervals and subscriptions.\n\t */\n ngOnDestroy(): void {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n if (this.unsubscribeListener) {\n this.unsubscribeListener();\n }\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n /**\n\t * Handles \"previous\" button click.\n\t * Navigates to the previous slide and stops autoplay.\n\t */\n onPrevious(): void {\n this.cancelAutoplay();\n this.previousSlide();\n }\n\n /**\n\t * Moves to the previous slide and emits `itemSwitch` event.\n\t */\n previousSlide(): void {\n this.itemIndex = this.getPrevIndex();\n if (this.itemIndex === this.itemsCount) {\n this.moveSlides(this.getFirstItem(this.getAllItemsArray()), true);\n } else {\n this.moveSlides(this.getCurrentItem(), true);\n }\n this.itemSwitch.emit(new EclNewsTickerItemEvent(this.itemIndex));\n }\n\n /**\n\t * Handles \"next\" button click.\n\t * Navigates to the next slide and stops autoplay.\n\t */\n onNext(): void {\n this.cancelAutoplay();\n this.nextSlide();\n }\n\n /**\n\t * Moves to the next slide and emits `itemSwitch` event.\n\t */\n nextSlide(): void {\n this.itemIndex = this.getNextIndex();\n if (this.itemIndex === 1) {\n this.moveSlides(this.getLastItem(this.getAllItemsArray()), true);\n } else {\n this.moveSlides(this.getCurrentItem(), true);\n }\n this.itemSwitch.emit(new EclNewsTickerItemEvent(this.itemIndex));\n }\n\n /**\n\t * Starts automatic cycling of the ticker items.\n\t */\n startAutoplay(): void {\n if (!this.playing) {\n this.playing = true;\n }\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n this.intervalId = setInterval(() => this.nextSlide(), this.PLAY_INTERVAL);\n }\n\n /**\n\t * Cancels the automatic cycling of the ticker items.\n\t */\n cancelAutoplay(): void {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n this.playing = false;\n }\n\n /**\n\t * Handles mouse over event on a ticker item.\n\t * Temporarily pauses autoplay.\n\t */\n onNewsTickerItemMouseOver(): void {\n if (this.playing) {\n this.pausePlay = true;\n this.cancelAutoplay();\n }\n }\n\n /**\n\t * Handles mouse out event from a ticker item.\n\t * Resumes autoplay if it was paused due to hover.\n\t */\n onNewsTickerItemMouseOut(): void {\n if (this.pausePlay) {\n this.pausePlay = false;\n this.startAutoplay();\n }\n }\n\n /**\n\t * Handles focus event on the \"Play\" button.\n\t * Starts autoplay and shifts focus to the \"Pause\" button.\n\t */\n onPlayBtnEnter(evt: Event): void {\n evt.preventDefault();\n this.startAutoplay();\n this.cd.detectChanges();\n this.pauseBtn()?.el.nativeElement.focus();\n }\n\n /**\n\t * Handles focus event on the \"Pause\" button.\n\t * Stops autoplay and shifts focus to the \"Play\" button.\n\t */\n onPauseBtnEnter(evt: Event): void {\n evt.preventDefault();\n this.cancelAutoplay();\n this.cd.detectChanges();\n this.playBtn()?.el.nativeElement.focus();\n }\n\n /**\n\t * Handles window resize and recalculates the layout.\n\t */\n private observeResizeWindow(): void {\n if (!this.window) {\n return;\n }\n fromEvent(this.window, 'resize').pipe(\n auditTime(50),\n takeUntil(this.destroy$)).subscribe(() => {\n setTimeout(() => {\n this.resizeTicker();\n this.moveSlides(this.getCurrentItem(), false);\n });\n });\n\n }\n\n private moveSlides(item: EclNewsTickerItemComponent | undefined, withTransition: boolean): void {\n if (item) {\n const newOffset = item.el.nativeElement.offsetTop;\n const newHeight = Math.floor(item.el.nativeElement.getBoundingClientRect().height,\n );\n this._contentHeight = newHeight;\n this.transitionDuration = withTransition ? 0.4 : 0;\n this.slidesTransform = `translate3d(0px, -${newOffset}px, 0px)`;\n this.cd.detectChanges();\n this.setCurrentSlide(item);\n }\n }\n\n private initContainer(): void {\n const newsTickerItems = this.newsTickerItems();\n if (newsTickerItems.length === 1) {\n this.resizeTicker();\n this.moveSlides(this.getFirstItem(Array.from(newsTickerItems)), false);\n return;\n }\n const firstHiddenItem = this.firstHiddenItem();\n const lastHiddenItem = this.lastHiddenItem();\n const slidesContainer = this.slidesContainer();\n if (firstHiddenItem) {\n firstHiddenItem.el.nativeElement.innerHTML = this.getLastContentChild();\n }\n if (lastHiddenItem) {\n lastHiddenItem.el.nativeElement.innerHTML = this.getFirstContentChild();\n }\n if (slidesContainer) {\n this.unsubscribeListener = this.renderer2.listen(slidesContainer.nativeElement, 'transitionend', () => this.checkIndex());\n }\n this.resizeTicker();\n this.moveSlides(this.getFirstItem(Array.from(newsTickerItems)), false);\n if (this.isAutoplay()) {\n this.startAutoplay();\n }\n }\n\n private checkIndex(): void {\n if (this.itemIndex === 1) {\n const item = this.getFirstItem(Array.from(this.newsTickerItems()));\n this.moveSlides(item, false);\n } else if (this.itemIndex === this.itemsCount) {\n const item = this.getLastItem(Array.from(this.newsTickerItems()));\n this.moveSlides(item, false);\n }\n }\n\n private resizeTicker(): void {\n let highestSlide = 0;\n this.newsTickerItems().forEach((slide) => {\n const slideHeight = slide.el.nativeElement.offsetHeight;\n highestSlide = highestSlide < slideHeight ? slideHeight : highestSlide;\n });\n }\n\n private getNextIndex(): number {\n return this.itemIndex === this.itemsCount ? 1 : ++this.itemIndex;\n }\n\n private getCurrentItem(): EclNewsTickerItemComponent | undefined {\n return this.getAllItemsArray()[this.itemIndex];\n }\n\n private getPrevIndex(): number {\n return this.itemIndex === 1 ? this.itemsCount : --this.itemIndex;\n }\n\n private getFirstItem(items: (EclNewsTickerItemComponent | undefined)[]): EclNewsTickerItemComponent | undefined {\n return items.length > 0 ? items[0] : undefined;\n }\n\n private getLastItem(items: (EclNewsTickerItemComponent | undefined)[]): EclNewsTickerItemComponent | undefined {\n return items[items.length - 1];\n }\n\n private getLastContentChild(): string {\n return this.newsTickerItems().length > 0 ? this.newsTickerItems().at(this.itemsCount - 1)?.el.nativeElement.innerHTML ?? '' : '';\n }\n\n private getFirstContentChild(): string {\n return this.newsTickerItems().length > 0 ? this.newsTickerItems().at(0)?.el.nativeElement.innerHTML ?? '' : '';\n }\n\n private getAllItemsArray(): (EclNewsTickerItemComponent | undefined)[] {\n return [...[this.firstHiddenItem()], ...this.newsTickerItems(), ...[this.lastHiddenItem()]];\n }\n\n private setCurrentSlide(currentItem: EclNewsTickerItemComponent): void {\n this.newsTickerItems().forEach((item) => {\n item.isCurrent = false;\n if (item === currentItem) {\n item.isCurrent = true;\n }\n });\n }\n}\n",
|
|
81860
|
+
"sourceCode": "import { ChangeDetectorRef, Component, computed, DOCUMENT, ElementRef, OnDestroy, Renderer2, afterNextRender, booleanAttribute, inject, output, input, contentChildren, viewChild, OnInit } from '@angular/core';\nimport { outputToObservable } from '@angular/core/rxjs-interop';\nimport { auditTime, fromEvent, Subject, takeUntil } from 'rxjs';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclButtonComponent } from '@eui/ecl/components/ecl-button';\nimport { EclNewsTickerItemComponent } from './ecl-news-ticker-item.component';\nimport { EclNewsTickerItemEvent } from './events/ecl-news-ticker-item.event';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\n\n/**\n * A news ticker (marquee-style) component that cycles through `ecl-news-ticker-item` slides.\n * Supports autoplay, manual previous/next navigation, pause/resume controls, and responsive resizing.\n *\n * - `isAutoplay` input: enables automatic slide cycling (default `true`).\n * - Sub-components: `ecl-news-ticker-item` holds each slide; directive `[eclNewsTickerIcon]` styles icons inside items.\n * - `itemSwitch` output: emits `EclNewsTickerItemEvent` when the visible item changes.\n * - Public navigation methods: `onPrevious()`, `previousSlide()`, `onNext()`, `nextSlide()`, `startAutoplay()`, `cancelAutoplay()`.\n * - Mouse-over pauses autoplay; mouse-out resumes it.\n */\n@Component({\n selector: 'ecl-news-ticker',\n templateUrl: './ecl-news-ticker.component.html',\n imports: [\n ...EUI_ECL_BUTTON,\n ...EUI_ECL_ICON,\n EclNewsTickerItemComponent,\n TranslatePipe,\n ],\n host: {\n '[class]': 'cssClasses()',\n },\n})\nexport class EclNewsTickerComponent extends ECLBaseDirective implements OnDestroy, OnInit {\n /**\n\t * Enables or disables automatic cycling through ticker items.\n\t * Defaults to `true`.\n\t */\n readonly isAutoplay = input(true, { transform: booleanAttribute });\n\n /**\n\t * Emits when the visible news ticker item changes.\n\t * The payload is an instance of `EclNewsTickerItemEvent`.\n\t */\n readonly itemSwitch = output<EclNewsTickerItemEvent>();\n\n /**\n\t * Query list of all `EclNewsTickerItemComponent` children projected into this component.\n\t */\n readonly newsTickerItems = contentChildren(EclNewsTickerItemComponent);\n\n /**\n\t * Reference to the hidden first item used for looping.\n\t */\n readonly firstHiddenItem = viewChild<EclNewsTickerItemComponent>('firstHiddenItem');\n\n /**\n\t * Reference to the hidden last item used for looping.\n\t */\n readonly lastHiddenItem = viewChild<EclNewsTickerItemComponent>('lastHiddenItem');\n\n /**\n\t * Reference to the container element that holds the slides.\n\t */\n readonly slidesContainer = viewChild<ElementRef>('slidesContainer');\n\n /**\n\t * Reference to the play button used to start autoplay.\n\t */\n readonly playBtn = viewChild<EclButtonComponent>('playBtn');\n\n /**\n\t * Reference to the pause button used to stop autoplay.\n\t */\n readonly pauseBtn = viewChild<EclButtonComponent>('pauseBtn');\n\n protected readonly cssClasses = computed<string>(() => {\n const classes = [super.getCssClasses('ecl-news-ticker')];\n if (this.newsTickerItems().length <= 1) {\n classes.push('ecl-news-ticker--single');\n }\n return classes.join(' ').trim();\n });\n\n itemIndex = 1;\n playing = false;\n slidesTransform = '';\n transitionDuration: number | undefined;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private intervalId: any;\n private PLAY_INTERVAL = 5000;\n private INIT_DELAY = 300;\n private _contentHeight = 0;\n private pausePlay = false;\n private unsubscribeListener?: () => void;\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private renderer2 = inject(Renderer2);\n private cd = inject(ChangeDetectorRef);\n private readonly document = inject<Document>(DOCUMENT);\n private readonly window = this.document.defaultView; // Window | null\n\n constructor() {\n super();\n afterNextRender(() => {\n setTimeout(() => {\n this.initContainer();\n }, this.INIT_DELAY);\n this.newsTickerItems().forEach((item) => {\n outputToObservable(item.itemFocused).pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.cancelAutoplay();\n });\n });\n this.observeResizeWindow();\n });\n }\n\n /**\n\t * Initializes the autoplay state based on the input configuration.\n\t */\n ngOnInit(): void {\n this.playing = this.isAutoplay();\n }\n\n /**\n\t * Returns the height of the currently visible ticker item.\n\t */\n get contentHeight(): number {\n return this._contentHeight;\n }\n\n /**\n\t * Returns the number of ticker items.\n\t */\n get itemsCount(): number {\n return this.newsTickerItems().length;\n }\n\n /**\n\t * Indicates whether navigation controls should be shown.\n\t */\n get isShowControls(): boolean {\n return this.newsTickerItems().length > 1;\n }\n\n /**\n\t * Lifecycle hook that clears intervals and subscriptions.\n\t */\n ngOnDestroy(): void {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n if (this.unsubscribeListener) {\n this.unsubscribeListener();\n }\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n /**\n\t * Handles \"previous\" button click.\n\t * Navigates to the previous slide and stops autoplay.\n\t */\n onPrevious(): void {\n this.cancelAutoplay();\n this.previousSlide();\n }\n\n /**\n\t * Moves to the previous slide and emits `itemSwitch` event.\n\t */\n previousSlide(): void {\n this.itemIndex = this.getPrevIndex();\n if (this.itemIndex === this.itemsCount) {\n this.moveSlides(this.getFirstItem(this.getAllItemsArray()), true);\n } else {\n this.moveSlides(this.getCurrentItem(), true);\n }\n this.itemSwitch.emit(new EclNewsTickerItemEvent(this.itemIndex));\n }\n\n /**\n\t * Handles \"next\" button click.\n\t * Navigates to the next slide and stops autoplay.\n\t */\n onNext(): void {\n this.cancelAutoplay();\n this.nextSlide();\n }\n\n /**\n\t * Moves to the next slide and emits `itemSwitch` event.\n\t */\n nextSlide(): void {\n this.itemIndex = this.getNextIndex();\n if (this.itemIndex === 1) {\n this.moveSlides(this.getLastItem(this.getAllItemsArray()), true);\n } else {\n this.moveSlides(this.getCurrentItem(), true);\n }\n this.itemSwitch.emit(new EclNewsTickerItemEvent(this.itemIndex));\n }\n\n /**\n\t * Starts automatic cycling of the ticker items.\n\t */\n startAutoplay(): void {\n if (!this.playing) {\n this.playing = true;\n }\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n this.intervalId = setInterval(() => this.nextSlide(), this.PLAY_INTERVAL);\n }\n\n /**\n\t * Cancels the automatic cycling of the ticker items.\n\t */\n cancelAutoplay(): void {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n this.playing = false;\n }\n\n /**\n\t * Handles mouse over event on a ticker item.\n\t * Temporarily pauses autoplay.\n\t */\n onNewsTickerItemMouseOver(): void {\n if (this.playing) {\n this.pausePlay = true;\n this.cancelAutoplay();\n }\n }\n\n /**\n\t * Handles mouse out event from a ticker item.\n\t * Resumes autoplay if it was paused due to hover.\n\t */\n onNewsTickerItemMouseOut(): void {\n if (this.pausePlay) {\n this.pausePlay = false;\n this.startAutoplay();\n }\n }\n\n /**\n\t * Handles focus event on the \"Play\" button.\n\t * Starts autoplay and shifts focus to the \"Pause\" button.\n\t */\n onPlayBtnEnter(evt: Event): void {\n evt.preventDefault();\n this.startAutoplay();\n this.cd.detectChanges();\n this.pauseBtn()?.el.nativeElement.focus();\n }\n\n /**\n\t * Handles focus event on the \"Pause\" button.\n\t * Stops autoplay and shifts focus to the \"Play\" button.\n\t */\n onPauseBtnEnter(evt: Event): void {\n evt.preventDefault();\n this.cancelAutoplay();\n this.cd.detectChanges();\n this.playBtn()?.el.nativeElement.focus();\n }\n\n /**\n\t * Handles window resize and recalculates the layout.\n\t */\n private observeResizeWindow(): void {\n if (!this.window) {\n return;\n }\n fromEvent(this.window, 'resize').pipe(\n auditTime(50),\n takeUntil(this.destroy$)).subscribe(() => {\n setTimeout(() => {\n this.resizeTicker();\n this.moveSlides(this.getCurrentItem(), false);\n });\n });\n\n }\n\n private moveSlides(item: EclNewsTickerItemComponent | undefined, withTransition: boolean): void {\n if (item) {\n const newOffset = item.el.nativeElement.offsetTop;\n const newHeight = Math.floor(item.el.nativeElement.getBoundingClientRect().height,\n );\n this._contentHeight = newHeight;\n this.transitionDuration = withTransition ? 0.4 : 0;\n this.slidesTransform = `translate3d(0px, -${newOffset}px, 0px)`;\n this.cd.detectChanges();\n this.setCurrentSlide(item);\n }\n }\n\n private initContainer(): void {\n const newsTickerItems = this.newsTickerItems();\n if (newsTickerItems.length === 1) {\n this.resizeTicker();\n this.moveSlides(this.getFirstItem(Array.from(newsTickerItems)), false);\n return;\n }\n const firstHiddenItem = this.firstHiddenItem();\n const lastHiddenItem = this.lastHiddenItem();\n const slidesContainer = this.slidesContainer();\n if (firstHiddenItem) {\n this.cloneItemContent(newsTickerItems.at(this.itemsCount - 1)!, firstHiddenItem);\n }\n if (lastHiddenItem) {\n this.cloneItemContent(newsTickerItems.at(0)!, lastHiddenItem);\n }\n if (slidesContainer) {\n this.unsubscribeListener = this.renderer2.listen(slidesContainer.nativeElement, 'transitionend', () => this.checkIndex());\n }\n this.resizeTicker();\n this.moveSlides(this.getFirstItem(Array.from(newsTickerItems)), false);\n if (this.isAutoplay()) {\n this.startAutoplay();\n }\n }\n\n private checkIndex(): void {\n if (this.itemIndex === 1) {\n const item = this.getFirstItem(Array.from(this.newsTickerItems()));\n this.moveSlides(item, false);\n } else if (this.itemIndex === this.itemsCount) {\n const item = this.getLastItem(Array.from(this.newsTickerItems()));\n this.moveSlides(item, false);\n }\n }\n\n private resizeTicker(): void {\n let highestSlide = 0;\n this.newsTickerItems().forEach((slide) => {\n const slideHeight = slide.el.nativeElement.offsetHeight;\n highestSlide = highestSlide < slideHeight ? slideHeight : highestSlide;\n });\n }\n\n private getNextIndex(): number {\n return this.itemIndex === this.itemsCount ? 1 : ++this.itemIndex;\n }\n\n private getCurrentItem(): EclNewsTickerItemComponent | undefined {\n return this.getAllItemsArray()[this.itemIndex];\n }\n\n private getPrevIndex(): number {\n return this.itemIndex === 1 ? this.itemsCount : --this.itemIndex;\n }\n\n private getFirstItem(items: (EclNewsTickerItemComponent | undefined)[]): EclNewsTickerItemComponent | undefined {\n return items.length > 0 ? items[0] : undefined;\n }\n\n private getLastItem(items: (EclNewsTickerItemComponent | undefined)[]): EclNewsTickerItemComponent | undefined {\n return items[items.length - 1];\n }\n\n private cloneItemContent(source: EclNewsTickerItemComponent, target: EclNewsTickerItemComponent): void {\n const targetEl = target.el.nativeElement as HTMLElement;\n while (targetEl.firstChild) {\n targetEl.removeChild(targetEl.firstChild);\n }\n Array.from((source.el.nativeElement as HTMLElement).childNodes).forEach(node => {\n targetEl.appendChild(node.cloneNode(true));\n });\n }\n\n private getAllItemsArray(): (EclNewsTickerItemComponent | undefined)[] {\n return [...[this.firstHiddenItem()], ...this.newsTickerItems(), ...[this.lastHiddenItem()]];\n }\n\n private setCurrentSlide(currentItem: EclNewsTickerItemComponent): void {\n this.newsTickerItems().forEach((item) => {\n item.isCurrent = false;\n if (item === currentItem) {\n item.isCurrent = true;\n }\n });\n }\n}\n",
|
|
81861
81861
|
"assetsDirs": [],
|
|
81862
81862
|
"styleUrlsData": "",
|
|
81863
81863
|
"stylesData": "",
|
|
81864
81864
|
"jsdoctags": [
|
|
81865
81865
|
{
|
|
81866
|
-
"pos":
|
|
81867
|
-
"end":
|
|
81866
|
+
"pos": 796,
|
|
81867
|
+
"end": 1475,
|
|
81868
81868
|
"kind": 321,
|
|
81869
81869
|
"id": 0,
|
|
81870
81870
|
"flags": 16777216,
|
|
@@ -81879,7 +81879,7 @@
|
|
|
81879
81879
|
"deprecated": false,
|
|
81880
81880
|
"deprecationMessage": "",
|
|
81881
81881
|
"args": [],
|
|
81882
|
-
"line":
|
|
81882
|
+
"line": 101,
|
|
81883
81883
|
"rawdescription": "\n"
|
|
81884
81884
|
},
|
|
81885
81885
|
"extends": [
|
|
@@ -81896,7 +81896,7 @@
|
|
|
81896
81896
|
"name": "contentHeight",
|
|
81897
81897
|
"type": "number",
|
|
81898
81898
|
"returnType": "number",
|
|
81899
|
-
"line":
|
|
81899
|
+
"line": 128,
|
|
81900
81900
|
"rawdescription": "\n\nReturns the height of the currently visible ticker item.\n",
|
|
81901
81901
|
"description": "<p>Returns the height of the currently visible ticker item.</p>\n"
|
|
81902
81902
|
}
|
|
@@ -81907,7 +81907,7 @@
|
|
|
81907
81907
|
"name": "itemsCount",
|
|
81908
81908
|
"type": "number",
|
|
81909
81909
|
"returnType": "number",
|
|
81910
|
-
"line":
|
|
81910
|
+
"line": 135,
|
|
81911
81911
|
"rawdescription": "\n\nReturns the number of ticker items.\n",
|
|
81912
81912
|
"description": "<p>Returns the number of ticker items.</p>\n"
|
|
81913
81913
|
}
|
|
@@ -81918,7 +81918,7 @@
|
|
|
81918
81918
|
"name": "isShowControls",
|
|
81919
81919
|
"type": "boolean",
|
|
81920
81920
|
"returnType": "boolean",
|
|
81921
|
-
"line":
|
|
81921
|
+
"line": 142,
|
|
81922
81922
|
"rawdescription": "\n\nIndicates whether navigation controls should be shown.\n",
|
|
81923
81923
|
"description": "<p>Indicates whether navigation controls should be shown.</p>\n"
|
|
81924
81924
|
}
|
package/docs/llms.txt
CHANGED
package/docs/properties.html
CHANGED
|
@@ -334,8 +334,8 @@ var EclNewsTickerComponent = class EclNewsTickerComponent extends ECLBaseDirecti
|
|
|
334
334
|
const firstHiddenItem = this.firstHiddenItem();
|
|
335
335
|
const lastHiddenItem = this.lastHiddenItem();
|
|
336
336
|
const slidesContainer = this.slidesContainer();
|
|
337
|
-
if (firstHiddenItem)
|
|
338
|
-
if (lastHiddenItem)
|
|
337
|
+
if (firstHiddenItem) this.cloneItemContent(newsTickerItems.at(this.itemsCount - 1), firstHiddenItem);
|
|
338
|
+
if (lastHiddenItem) this.cloneItemContent(newsTickerItems.at(0), lastHiddenItem);
|
|
339
339
|
if (slidesContainer) this.unsubscribeListener = this.renderer2.listen(slidesContainer.nativeElement, "transitionend", () => this.checkIndex());
|
|
340
340
|
this.resizeTicker();
|
|
341
341
|
this.moveSlides(this.getFirstItem(Array.from(newsTickerItems)), false);
|
|
@@ -372,11 +372,12 @@ var EclNewsTickerComponent = class EclNewsTickerComponent extends ECLBaseDirecti
|
|
|
372
372
|
getLastItem(items) {
|
|
373
373
|
return items[items.length - 1];
|
|
374
374
|
}
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
375
|
+
cloneItemContent(source, target) {
|
|
376
|
+
const targetEl = target.el.nativeElement;
|
|
377
|
+
while (targetEl.firstChild) targetEl.removeChild(targetEl.firstChild);
|
|
378
|
+
Array.from(source.el.nativeElement.childNodes).forEach((node) => {
|
|
379
|
+
targetEl.appendChild(node.cloneNode(true));
|
|
380
|
+
});
|
|
380
381
|
}
|
|
381
382
|
getAllItemsArray() {
|
|
382
383
|
return [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-ecl-components-ecl-news-ticker.mjs","names":["i1","i2"],"sources":["../../components/ecl-news-ticker/ecl-news-ticker-icon.directive.ts","../../components/ecl-news-ticker/ecl-news-ticker-item.component.ts","../../components/ecl-news-ticker/ecl-news-ticker-item.component.html","../../components/ecl-news-ticker/events/ecl-news-ticker-item.event.ts","../../components/ecl-news-ticker/ecl-news-ticker.component.ts","../../components/ecl-news-ticker/ecl-news-ticker.component.html","../../components/ecl-news-ticker/index.ts"],"sourcesContent":["import { Directive } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Directive to mark and style the icon inside a news ticker item.\n */\n@Directive({\n selector: '[eclNewsTickerIcon]',\n host: {\n class: 'ecl-news-ticker__icon',\n },\n})\nexport class EclNewsTickerIconDirective extends ECLBaseDirective {}\n","import { AfterContentInit, Component, computed, ElementRef, OnDestroy, Renderer2, inject, contentChild, output } from '@angular/core';\nimport { fromEvent, Subject, takeUntil } from 'rxjs';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclLinkDirective } from '@eui/ecl/components/ecl-link';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EclNewsTickerIconDirective } from './ecl-news-ticker-icon.directive';\n\n/**\n * Single slide inside an `EclNewsTickerComponent`.\n * Renders as a `role=\"listitem\"` slide with optional projected `ecl-link` content.\n * Manages its own `aria-hidden` and `inert` attributes based on whether it is the currently\n * visible slide, and emits `itemFocused` when its internal link receives focus so the parent\n * ticker can cancel autoplay.\n *\n * - Selector: `ecl-news-ticker-item`.\n * - `isCurrent` — getter/setter that toggles visibility state and adjusts the link tabindex.\n * - `itemFocused` — emits `void` when the projected link gains focus.\n * - Project a single `[eclLink]` anchor inside the slide for text content.\n */\n@Component({\n selector: 'ecl-news-ticker-item',\n templateUrl: './ecl-news-ticker-item.component.html',\n imports: [...EUI_ECL_ICON, EclNewsTickerIconDirective],\n host: {\n '[class]': 'cssClasses()',\n '[attr.role]': 'role',\n '[attr.inert]': 'isInert',\n },\n})\nexport class EclNewsTickerItemComponent extends ECLBaseDirective implements AfterContentInit, OnDestroy {\n el = inject(ElementRef);\n private readonly renderer = inject(Renderer2);\n\n /**\n\t * Optional projected `ecl-link` element within the news ticker item.\n\t */\n readonly eclLink = contentChild(EclLinkDirective);\n\n /**\n\t * Projected `ecl-icon` marked with the `eclNewsTickerIcon` directive.\n\t * When absent, a default icon is rendered instead.\n\t */\n readonly projectedIcon = contentChild(EclNewsTickerIconDirective);\n\n /**\n\t * Whether the consumer projected an icon. Drives the default-icon fallback.\n\t */\n readonly hasProjectedIcon = computed(() => !!this.projectedIcon());\n\n /**\n\t * Emitted when the internal link receives focus (used to cancel autoplay).\n\t */\n readonly itemFocused = output<void>();\n\n /**\n\t * Declares ARIA role as list item for accessibility.\n\t */\n role = 'listitem';\n\n /**\n\t * Sets the component’s CSS classes.\n\t */\n protected readonly cssClasses = computed<string>(() =>\n super.getCssClasses('ecl-news-ticker__slide'));\n\n /**\n\t * Whether this slide is currently visible.\n\t */\n get isCurrent(): boolean {\n return this._isCurrent;\n }\n set isCurrent(value: boolean) {\n this._isCurrent = value;\n if (this.eclLink()) {\n this.setLinkTabindex();\n }\n }\n private _isCurrent = false;\n\n /**\n\t * Sets `inert` attribute when the item is not current (prevents interaction).\n\t * `inert` already removes the element from the accessibility tree, so no separate\n\t * `aria-hidden` is needed (matches the ECL reference, which uses `inert` alone).\n\t */\n get isInert(): boolean | undefined {\n return !this.isCurrent || undefined;\n }\n\n private destroy$: Subject<boolean> = new Subject<boolean>();\n\n /**\n\t * Lifecycle hook that sets up the internal link class and focus listener.\n\t */\n ngAfterContentInit(): void {\n const eclLink = this.eclLink();\n if (eclLink) {\n eclLink.class.set('ecl-news-ticker__slide-text');\n }\n\n if (eclLink) {\n fromEvent(eclLink.el.nativeElement, 'focus')\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.itemFocused.emit();\n });\n }\n }\n\n /**\n\t * Cleanup on destroy: unsubscribe from observables.\n\t */\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n private setLinkTabindex(): void {\n const linkElement = this.eclLink()?.el.nativeElement;\n if (!linkElement) {\n return;\n }\n\n if (this._isCurrent) {\n this.renderer.removeAttribute(linkElement, 'tabindex');\n } else {\n this.renderer.setAttribute(linkElement, 'tabindex', '-1');\n }\n }\n}\n","<div class=\"ecl-news-ticker__slide-icon\">\n <ng-content select=\"[eclNewsTickerIcon]\"></ng-content>\n @if (!hasProjectedIcon()) {\n <ecl-icon iconSet=\"phosphor\" icon=\"newspaper\" size=\"l\" eclNewsTickerIcon />\n }\n</div>\n<div class=\"ecl-news-ticker__slide-content\">\n <ng-content></ng-content>\n</div>\n","import { EclBaseEvent } from '@eui/ecl/core';\n\n/**\n * Emitted when the news ticker transitions to a different item (e.g. auto-advance or user navigation).\n *\n * @param itemIndex Zero-based index of the newly active ticker item.\n */\nexport class EclNewsTickerItemEvent extends EclBaseEvent {\n constructor(public itemIndex: number) {\n super();\n }\n}","// code-security-audit-disabled: ECL news ticker — innerHTML assigned from internal getFirstContentChild/getLastContentChild methods (ECL projected content nodes); no external user HTML.\nimport { ChangeDetectorRef, Component, computed, DOCUMENT, ElementRef, OnDestroy, Renderer2, afterNextRender, booleanAttribute, inject, output, input, contentChildren, viewChild, OnInit } from '@angular/core';\nimport { outputToObservable } from '@angular/core/rxjs-interop';\nimport { auditTime, fromEvent, Subject, takeUntil } from 'rxjs';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclButtonComponent } from '@eui/ecl/components/ecl-button';\nimport { EclNewsTickerItemComponent } from './ecl-news-ticker-item.component';\nimport { EclNewsTickerItemEvent } from './events/ecl-news-ticker-item.event';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\n\n/**\n * A news ticker (marquee-style) component that cycles through `ecl-news-ticker-item` slides.\n * Supports autoplay, manual previous/next navigation, pause/resume controls, and responsive resizing.\n *\n * - `isAutoplay` input: enables automatic slide cycling (default `true`).\n * - Sub-components: `ecl-news-ticker-item` holds each slide; directive `[eclNewsTickerIcon]` styles icons inside items.\n * - `itemSwitch` output: emits `EclNewsTickerItemEvent` when the visible item changes.\n * - Public navigation methods: `onPrevious()`, `previousSlide()`, `onNext()`, `nextSlide()`, `startAutoplay()`, `cancelAutoplay()`.\n * - Mouse-over pauses autoplay; mouse-out resumes it.\n */\n@Component({\n selector: 'ecl-news-ticker',\n templateUrl: './ecl-news-ticker.component.html',\n imports: [\n ...EUI_ECL_BUTTON,\n ...EUI_ECL_ICON,\n EclNewsTickerItemComponent,\n TranslatePipe,\n ],\n host: {\n '[class]': 'cssClasses()',\n },\n})\nexport class EclNewsTickerComponent extends ECLBaseDirective implements OnDestroy, OnInit {\n /**\n\t * Enables or disables automatic cycling through ticker items.\n\t * Defaults to `true`.\n\t */\n readonly isAutoplay = input(true, { transform: booleanAttribute });\n\n /**\n\t * Emits when the visible news ticker item changes.\n\t * The payload is an instance of `EclNewsTickerItemEvent`.\n\t */\n readonly itemSwitch = output<EclNewsTickerItemEvent>();\n\n /**\n\t * Query list of all `EclNewsTickerItemComponent` children projected into this component.\n\t */\n readonly newsTickerItems = contentChildren(EclNewsTickerItemComponent);\n\n /**\n\t * Reference to the hidden first item used for looping.\n\t */\n readonly firstHiddenItem = viewChild<EclNewsTickerItemComponent>('firstHiddenItem');\n\n /**\n\t * Reference to the hidden last item used for looping.\n\t */\n readonly lastHiddenItem = viewChild<EclNewsTickerItemComponent>('lastHiddenItem');\n\n /**\n\t * Reference to the container element that holds the slides.\n\t */\n readonly slidesContainer = viewChild<ElementRef>('slidesContainer');\n\n /**\n\t * Reference to the play button used to start autoplay.\n\t */\n readonly playBtn = viewChild<EclButtonComponent>('playBtn');\n\n /**\n\t * Reference to the pause button used to stop autoplay.\n\t */\n readonly pauseBtn = viewChild<EclButtonComponent>('pauseBtn');\n\n protected readonly cssClasses = computed<string>(() => {\n const classes = [super.getCssClasses('ecl-news-ticker')];\n if (this.newsTickerItems().length <= 1) {\n classes.push('ecl-news-ticker--single');\n }\n return classes.join(' ').trim();\n });\n\n itemIndex = 1;\n playing = false;\n slidesTransform = '';\n transitionDuration: number | undefined;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private intervalId: any;\n private PLAY_INTERVAL = 5000;\n private INIT_DELAY = 300;\n private _contentHeight = 0;\n private pausePlay = false;\n private unsubscribeListener?: () => void;\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private renderer2 = inject(Renderer2);\n private cd = inject(ChangeDetectorRef);\n private readonly document = inject<Document>(DOCUMENT);\n private readonly window = this.document.defaultView; // Window | null\n\n constructor() {\n super();\n afterNextRender(() => {\n setTimeout(() => {\n this.initContainer();\n }, this.INIT_DELAY);\n this.newsTickerItems().forEach((item) => {\n outputToObservable(item.itemFocused).pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.cancelAutoplay();\n });\n });\n this.observeResizeWindow();\n });\n }\n\n /**\n\t * Initializes the autoplay state based on the input configuration.\n\t */\n ngOnInit(): void {\n this.playing = this.isAutoplay();\n }\n\n /**\n\t * Returns the height of the currently visible ticker item.\n\t */\n get contentHeight(): number {\n return this._contentHeight;\n }\n\n /**\n\t * Returns the number of ticker items.\n\t */\n get itemsCount(): number {\n return this.newsTickerItems().length;\n }\n\n /**\n\t * Indicates whether navigation controls should be shown.\n\t */\n get isShowControls(): boolean {\n return this.newsTickerItems().length > 1;\n }\n\n /**\n\t * Lifecycle hook that clears intervals and subscriptions.\n\t */\n ngOnDestroy(): void {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n if (this.unsubscribeListener) {\n this.unsubscribeListener();\n }\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n /**\n\t * Handles \"previous\" button click.\n\t * Navigates to the previous slide and stops autoplay.\n\t */\n onPrevious(): void {\n this.cancelAutoplay();\n this.previousSlide();\n }\n\n /**\n\t * Moves to the previous slide and emits `itemSwitch` event.\n\t */\n previousSlide(): void {\n this.itemIndex = this.getPrevIndex();\n if (this.itemIndex === this.itemsCount) {\n this.moveSlides(this.getFirstItem(this.getAllItemsArray()), true);\n } else {\n this.moveSlides(this.getCurrentItem(), true);\n }\n this.itemSwitch.emit(new EclNewsTickerItemEvent(this.itemIndex));\n }\n\n /**\n\t * Handles \"next\" button click.\n\t * Navigates to the next slide and stops autoplay.\n\t */\n onNext(): void {\n this.cancelAutoplay();\n this.nextSlide();\n }\n\n /**\n\t * Moves to the next slide and emits `itemSwitch` event.\n\t */\n nextSlide(): void {\n this.itemIndex = this.getNextIndex();\n if (this.itemIndex === 1) {\n this.moveSlides(this.getLastItem(this.getAllItemsArray()), true);\n } else {\n this.moveSlides(this.getCurrentItem(), true);\n }\n this.itemSwitch.emit(new EclNewsTickerItemEvent(this.itemIndex));\n }\n\n /**\n\t * Starts automatic cycling of the ticker items.\n\t */\n startAutoplay(): void {\n if (!this.playing) {\n this.playing = true;\n }\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n this.intervalId = setInterval(() => this.nextSlide(), this.PLAY_INTERVAL);\n }\n\n /**\n\t * Cancels the automatic cycling of the ticker items.\n\t */\n cancelAutoplay(): void {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n this.playing = false;\n }\n\n /**\n\t * Handles mouse over event on a ticker item.\n\t * Temporarily pauses autoplay.\n\t */\n onNewsTickerItemMouseOver(): void {\n if (this.playing) {\n this.pausePlay = true;\n this.cancelAutoplay();\n }\n }\n\n /**\n\t * Handles mouse out event from a ticker item.\n\t * Resumes autoplay if it was paused due to hover.\n\t */\n onNewsTickerItemMouseOut(): void {\n if (this.pausePlay) {\n this.pausePlay = false;\n this.startAutoplay();\n }\n }\n\n /**\n\t * Handles focus event on the \"Play\" button.\n\t * Starts autoplay and shifts focus to the \"Pause\" button.\n\t */\n onPlayBtnEnter(evt: Event): void {\n evt.preventDefault();\n this.startAutoplay();\n this.cd.detectChanges();\n this.pauseBtn()?.el.nativeElement.focus();\n }\n\n /**\n\t * Handles focus event on the \"Pause\" button.\n\t * Stops autoplay and shifts focus to the \"Play\" button.\n\t */\n onPauseBtnEnter(evt: Event): void {\n evt.preventDefault();\n this.cancelAutoplay();\n this.cd.detectChanges();\n this.playBtn()?.el.nativeElement.focus();\n }\n\n /**\n\t * Handles window resize and recalculates the layout.\n\t */\n private observeResizeWindow(): void {\n if (!this.window) {\n return;\n }\n fromEvent(this.window, 'resize').pipe(\n auditTime(50),\n takeUntil(this.destroy$)).subscribe(() => {\n setTimeout(() => {\n this.resizeTicker();\n this.moveSlides(this.getCurrentItem(), false);\n });\n });\n\n }\n\n private moveSlides(item: EclNewsTickerItemComponent | undefined, withTransition: boolean): void {\n if (item) {\n const newOffset = item.el.nativeElement.offsetTop;\n const newHeight = Math.floor(item.el.nativeElement.getBoundingClientRect().height,\n );\n this._contentHeight = newHeight;\n this.transitionDuration = withTransition ? 0.4 : 0;\n this.slidesTransform = `translate3d(0px, -${newOffset}px, 0px)`;\n this.cd.detectChanges();\n this.setCurrentSlide(item);\n }\n }\n\n private initContainer(): void {\n const newsTickerItems = this.newsTickerItems();\n if (newsTickerItems.length === 1) {\n this.resizeTicker();\n this.moveSlides(this.getFirstItem(Array.from(newsTickerItems)), false);\n return;\n }\n const firstHiddenItem = this.firstHiddenItem();\n const lastHiddenItem = this.lastHiddenItem();\n const slidesContainer = this.slidesContainer();\n if (firstHiddenItem) {\n firstHiddenItem.el.nativeElement.innerHTML = this.getLastContentChild();\n }\n if (lastHiddenItem) {\n lastHiddenItem.el.nativeElement.innerHTML = this.getFirstContentChild();\n }\n if (slidesContainer) {\n this.unsubscribeListener = this.renderer2.listen(slidesContainer.nativeElement, 'transitionend', () => this.checkIndex());\n }\n this.resizeTicker();\n this.moveSlides(this.getFirstItem(Array.from(newsTickerItems)), false);\n if (this.isAutoplay()) {\n this.startAutoplay();\n }\n }\n\n private checkIndex(): void {\n if (this.itemIndex === 1) {\n const item = this.getFirstItem(Array.from(this.newsTickerItems()));\n this.moveSlides(item, false);\n } else if (this.itemIndex === this.itemsCount) {\n const item = this.getLastItem(Array.from(this.newsTickerItems()));\n this.moveSlides(item, false);\n }\n }\n\n private resizeTicker(): void {\n let highestSlide = 0;\n this.newsTickerItems().forEach((slide) => {\n const slideHeight = slide.el.nativeElement.offsetHeight;\n highestSlide = highestSlide < slideHeight ? slideHeight : highestSlide;\n });\n }\n\n private getNextIndex(): number {\n return this.itemIndex === this.itemsCount ? 1 : ++this.itemIndex;\n }\n\n private getCurrentItem(): EclNewsTickerItemComponent | undefined {\n return this.getAllItemsArray()[this.itemIndex];\n }\n\n private getPrevIndex(): number {\n return this.itemIndex === 1 ? this.itemsCount : --this.itemIndex;\n }\n\n private getFirstItem(items: (EclNewsTickerItemComponent | undefined)[]): EclNewsTickerItemComponent | undefined {\n return items.length > 0 ? items[0] : undefined;\n }\n\n private getLastItem(items: (EclNewsTickerItemComponent | undefined)[]): EclNewsTickerItemComponent | undefined {\n return items[items.length - 1];\n }\n\n private getLastContentChild(): string {\n return this.newsTickerItems().length > 0 ? this.newsTickerItems().at(this.itemsCount - 1)?.el.nativeElement.innerHTML ?? '' : '';\n }\n\n private getFirstContentChild(): string {\n return this.newsTickerItems().length > 0 ? this.newsTickerItems().at(0)?.el.nativeElement.innerHTML ?? '' : '';\n }\n\n private getAllItemsArray(): (EclNewsTickerItemComponent | undefined)[] {\n return [...[this.firstHiddenItem()], ...this.newsTickerItems(), ...[this.lastHiddenItem()]];\n }\n\n private setCurrentSlide(currentItem: EclNewsTickerItemComponent): void {\n this.newsTickerItems().forEach((item) => {\n item.isCurrent = false;\n if (item === currentItem) {\n item.isCurrent = true;\n }\n });\n }\n}\n","<div class=\"ecl-news-ticker__container\">\n <div class=\"ecl-news-ticker__content\" [style.height.px]=\"contentHeight\">\n <ul class=\"ecl-news-ticker__slides\" [style.transition-duration.s]=\"transitionDuration\"\n [style.transform]=\"slidesTransform\" (mouseover)=\"onNewsTickerItemMouseOver()\"\n (mouseout)=\"onNewsTickerItemMouseOut()\" #slidesContainer>\n @if(isShowControls) {\n <ecl-news-ticker-item #firstHiddenItem></ecl-news-ticker-item>\n }\n <ng-content></ng-content>\n @if(isShowControls) {\n <ecl-news-ticker-item #lastHiddenItem></ecl-news-ticker-item>\n }\n </ul>\n </div>\n</div>\n\n@if(isShowControls) {\n<div class=\"ecl-news-ticker__controls\">\n <div class=\"ecl-news-ticker__actions\">\n <button eclButton class=\"ecl-news-ticker__prev\" variant=\"tertiary\" eclStyle=\"neutral\" isIconOnly (click)=\"onPrevious()\">\n <span eclButtonLabel>\n {{ 'ecl.news-ticker.PREV-ITEM' | translate }}\n </span>\n <ecl-icon iconSet=\"phosphor\" icon=\"caret-left\" size=\"m\"></ecl-icon>\n </button>\n <button #playBtn eclButton class=\"ecl-news-ticker__play\" variant=\"tertiary\" eclStyle=\"neutral\" isIconOnly [class.ecl-u-d-none]=\"playing\"\n (click)=\"startAutoplay()\" (keydown.enter)=\"onPlayBtnEnter($event)\">\n <span class=\"ecl-u-sr-only\">\n {{ 'ecl.news-ticker.AUTO-PLAY' | translate }}\n </span>\n <ecl-icon iconSet=\"phosphor\" icon=\"play-circle\" size=\"m\"></ecl-icon>\n </button>\n <button #pauseBtn eclButton class=\"ecl-news-ticker__pause\" variant=\"tertiary\" eclStyle=\"neutral\" isIconOnly [class.ecl-u-d-none]=\"!playing\"\n (click)=\"cancelAutoplay()\" (keydown.enter)=\"onPauseBtnEnter($event)\">\n <span class=\"ecl-u-sr-only\">\n {{ 'ecl.news-ticker.PAUSE' | translate }}\n </span>\n <ecl-icon iconSet=\"phosphor\" icon=\"pause-circle\" size=\"m\"></ecl-icon>\n </button>\n <button eclButton class=\"ecl-news-ticker__next\" variant=\"tertiary\" eclStyle=\"neutral\" isIconOnly (click)=\"onNext()\">\n <span eclButtonLabel>\n {{ 'ecl.news-ticker.NEXT-ITEM' | translate }}\n </span>\n <ecl-icon iconSet=\"phosphor\" icon=\"caret-right\" size=\"m\"></ecl-icon>\n </button>\n </div>\n <div class=\"ecl-news-ticker__counter\">\n <span class=\"ecl-news-ticker__counter--current\"> {{ itemIndex }}</span>\n {{ 'ecl.common.OF' | translate }}\n <span class=\"ecl-news-ticker__counter--max\">{{ itemsCount }}</span>\n </div>\n</div>\n}","import { EclNewsTickerComponent } from './ecl-news-ticker.component';\nimport { EclNewsTickerItemComponent } from './ecl-news-ticker-item.component';\nimport { EclNewsTickerIconDirective } from './ecl-news-ticker-icon.directive';\n\nexport * from './ecl-news-ticker.component';\nexport * from './ecl-news-ticker-item.component';\nexport * from './ecl-news-ticker-icon.directive';\nexport * from './events/ecl-news-ticker-item.event';\n\nexport const EUI_ECL_NEWS_TICKER = [\n EclNewsTickerComponent,\n EclNewsTickerItemComponent,\n EclNewsTickerIconDirective,\n] as const;\n"],"mappings":";;;;;;;;;;;AAYA,IAAa,6BAAb,MAAa,mCAAmC,iBAAgB;CAAnD;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA0B,MAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAA1B;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAA0B,cAAA;GAAA,UAAA;GAAA,MAAA,EAAA,gBAAA,wBAAA;GAAA,iBAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAA1B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA0B,YAAA,CAAA;EANtC,MAAA;EAAU,MAAA,CAAA;GACP,UAAU;GACV,MAAM,EACF,OAAO,wBACV;EACJ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AA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAKR,YAAU,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AEnEhE,MAAa,sBAAsB;CAC/B;CACA;CACA;AACM"}
|
|
1
|
+
{"version":3,"file":"eui-ecl-components-ecl-news-ticker.mjs","names":["i1","i2"],"sources":["../../components/ecl-news-ticker/ecl-news-ticker-icon.directive.ts","../../components/ecl-news-ticker/ecl-news-ticker-item.component.ts","../../components/ecl-news-ticker/ecl-news-ticker-item.component.html","../../components/ecl-news-ticker/events/ecl-news-ticker-item.event.ts","../../components/ecl-news-ticker/ecl-news-ticker.component.ts","../../components/ecl-news-ticker/ecl-news-ticker.component.html","../../components/ecl-news-ticker/index.ts"],"sourcesContent":["import { Directive } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Directive to mark and style the icon inside a news ticker item.\n */\n@Directive({\n selector: '[eclNewsTickerIcon]',\n host: {\n class: 'ecl-news-ticker__icon',\n },\n})\nexport class EclNewsTickerIconDirective extends ECLBaseDirective {}\n","import { AfterContentInit, Component, computed, ElementRef, OnDestroy, Renderer2, inject, contentChild, output } from '@angular/core';\nimport { fromEvent, Subject, takeUntil } from 'rxjs';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclLinkDirective } from '@eui/ecl/components/ecl-link';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EclNewsTickerIconDirective } from './ecl-news-ticker-icon.directive';\n\n/**\n * Single slide inside an `EclNewsTickerComponent`.\n * Renders as a `role=\"listitem\"` slide with optional projected `ecl-link` content.\n * Manages its own `aria-hidden` and `inert` attributes based on whether it is the currently\n * visible slide, and emits `itemFocused` when its internal link receives focus so the parent\n * ticker can cancel autoplay.\n *\n * - Selector: `ecl-news-ticker-item`.\n * - `isCurrent` — getter/setter that toggles visibility state and adjusts the link tabindex.\n * - `itemFocused` — emits `void` when the projected link gains focus.\n * - Project a single `[eclLink]` anchor inside the slide for text content.\n */\n@Component({\n selector: 'ecl-news-ticker-item',\n templateUrl: './ecl-news-ticker-item.component.html',\n imports: [...EUI_ECL_ICON, EclNewsTickerIconDirective],\n host: {\n '[class]': 'cssClasses()',\n '[attr.role]': 'role',\n '[attr.inert]': 'isInert',\n },\n})\nexport class EclNewsTickerItemComponent extends ECLBaseDirective implements AfterContentInit, OnDestroy {\n el = inject(ElementRef);\n private readonly renderer = inject(Renderer2);\n\n /**\n\t * Optional projected `ecl-link` element within the news ticker item.\n\t */\n readonly eclLink = contentChild(EclLinkDirective);\n\n /**\n\t * Projected `ecl-icon` marked with the `eclNewsTickerIcon` directive.\n\t * When absent, a default icon is rendered instead.\n\t */\n readonly projectedIcon = contentChild(EclNewsTickerIconDirective);\n\n /**\n\t * Whether the consumer projected an icon. Drives the default-icon fallback.\n\t */\n readonly hasProjectedIcon = computed(() => !!this.projectedIcon());\n\n /**\n\t * Emitted when the internal link receives focus (used to cancel autoplay).\n\t */\n readonly itemFocused = output<void>();\n\n /**\n\t * Declares ARIA role as list item for accessibility.\n\t */\n role = 'listitem';\n\n /**\n\t * Sets the component’s CSS classes.\n\t */\n protected readonly cssClasses = computed<string>(() =>\n super.getCssClasses('ecl-news-ticker__slide'));\n\n /**\n\t * Whether this slide is currently visible.\n\t */\n get isCurrent(): boolean {\n return this._isCurrent;\n }\n set isCurrent(value: boolean) {\n this._isCurrent = value;\n if (this.eclLink()) {\n this.setLinkTabindex();\n }\n }\n private _isCurrent = false;\n\n /**\n\t * Sets `inert` attribute when the item is not current (prevents interaction).\n\t * `inert` already removes the element from the accessibility tree, so no separate\n\t * `aria-hidden` is needed (matches the ECL reference, which uses `inert` alone).\n\t */\n get isInert(): boolean | undefined {\n return !this.isCurrent || undefined;\n }\n\n private destroy$: Subject<boolean> = new Subject<boolean>();\n\n /**\n\t * Lifecycle hook that sets up the internal link class and focus listener.\n\t */\n ngAfterContentInit(): void {\n const eclLink = this.eclLink();\n if (eclLink) {\n eclLink.class.set('ecl-news-ticker__slide-text');\n }\n\n if (eclLink) {\n fromEvent(eclLink.el.nativeElement, 'focus')\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.itemFocused.emit();\n });\n }\n }\n\n /**\n\t * Cleanup on destroy: unsubscribe from observables.\n\t */\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n private setLinkTabindex(): void {\n const linkElement = this.eclLink()?.el.nativeElement;\n if (!linkElement) {\n return;\n }\n\n if (this._isCurrent) {\n this.renderer.removeAttribute(linkElement, 'tabindex');\n } else {\n this.renderer.setAttribute(linkElement, 'tabindex', '-1');\n }\n }\n}\n","<div class=\"ecl-news-ticker__slide-icon\">\n <ng-content select=\"[eclNewsTickerIcon]\"></ng-content>\n @if (!hasProjectedIcon()) {\n <ecl-icon iconSet=\"phosphor\" icon=\"newspaper\" size=\"l\" eclNewsTickerIcon />\n }\n</div>\n<div class=\"ecl-news-ticker__slide-content\">\n <ng-content></ng-content>\n</div>\n","import { EclBaseEvent } from '@eui/ecl/core';\n\n/**\n * Emitted when the news ticker transitions to a different item (e.g. auto-advance or user navigation).\n *\n * @param itemIndex Zero-based index of the newly active ticker item.\n */\nexport class EclNewsTickerItemEvent extends EclBaseEvent {\n constructor(public itemIndex: number) {\n super();\n }\n}","import { ChangeDetectorRef, Component, computed, DOCUMENT, ElementRef, OnDestroy, Renderer2, afterNextRender, booleanAttribute, inject, output, input, contentChildren, viewChild, OnInit } from '@angular/core';\nimport { outputToObservable } from '@angular/core/rxjs-interop';\nimport { auditTime, fromEvent, Subject, takeUntil } from 'rxjs';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclButtonComponent } from '@eui/ecl/components/ecl-button';\nimport { EclNewsTickerItemComponent } from './ecl-news-ticker-item.component';\nimport { EclNewsTickerItemEvent } from './events/ecl-news-ticker-item.event';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\n\n/**\n * A news ticker (marquee-style) component that cycles through `ecl-news-ticker-item` slides.\n * Supports autoplay, manual previous/next navigation, pause/resume controls, and responsive resizing.\n *\n * - `isAutoplay` input: enables automatic slide cycling (default `true`).\n * - Sub-components: `ecl-news-ticker-item` holds each slide; directive `[eclNewsTickerIcon]` styles icons inside items.\n * - `itemSwitch` output: emits `EclNewsTickerItemEvent` when the visible item changes.\n * - Public navigation methods: `onPrevious()`, `previousSlide()`, `onNext()`, `nextSlide()`, `startAutoplay()`, `cancelAutoplay()`.\n * - Mouse-over pauses autoplay; mouse-out resumes it.\n */\n@Component({\n selector: 'ecl-news-ticker',\n templateUrl: './ecl-news-ticker.component.html',\n imports: [\n ...EUI_ECL_BUTTON,\n ...EUI_ECL_ICON,\n EclNewsTickerItemComponent,\n TranslatePipe,\n ],\n host: {\n '[class]': 'cssClasses()',\n },\n})\nexport class EclNewsTickerComponent extends ECLBaseDirective implements OnDestroy, OnInit {\n /**\n\t * Enables or disables automatic cycling through ticker items.\n\t * Defaults to `true`.\n\t */\n readonly isAutoplay = input(true, { transform: booleanAttribute });\n\n /**\n\t * Emits when the visible news ticker item changes.\n\t * The payload is an instance of `EclNewsTickerItemEvent`.\n\t */\n readonly itemSwitch = output<EclNewsTickerItemEvent>();\n\n /**\n\t * Query list of all `EclNewsTickerItemComponent` children projected into this component.\n\t */\n readonly newsTickerItems = contentChildren(EclNewsTickerItemComponent);\n\n /**\n\t * Reference to the hidden first item used for looping.\n\t */\n readonly firstHiddenItem = viewChild<EclNewsTickerItemComponent>('firstHiddenItem');\n\n /**\n\t * Reference to the hidden last item used for looping.\n\t */\n readonly lastHiddenItem = viewChild<EclNewsTickerItemComponent>('lastHiddenItem');\n\n /**\n\t * Reference to the container element that holds the slides.\n\t */\n readonly slidesContainer = viewChild<ElementRef>('slidesContainer');\n\n /**\n\t * Reference to the play button used to start autoplay.\n\t */\n readonly playBtn = viewChild<EclButtonComponent>('playBtn');\n\n /**\n\t * Reference to the pause button used to stop autoplay.\n\t */\n readonly pauseBtn = viewChild<EclButtonComponent>('pauseBtn');\n\n protected readonly cssClasses = computed<string>(() => {\n const classes = [super.getCssClasses('ecl-news-ticker')];\n if (this.newsTickerItems().length <= 1) {\n classes.push('ecl-news-ticker--single');\n }\n return classes.join(' ').trim();\n });\n\n itemIndex = 1;\n playing = false;\n slidesTransform = '';\n transitionDuration: number | undefined;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private intervalId: any;\n private PLAY_INTERVAL = 5000;\n private INIT_DELAY = 300;\n private _contentHeight = 0;\n private pausePlay = false;\n private unsubscribeListener?: () => void;\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private renderer2 = inject(Renderer2);\n private cd = inject(ChangeDetectorRef);\n private readonly document = inject<Document>(DOCUMENT);\n private readonly window = this.document.defaultView; // Window | null\n\n constructor() {\n super();\n afterNextRender(() => {\n setTimeout(() => {\n this.initContainer();\n }, this.INIT_DELAY);\n this.newsTickerItems().forEach((item) => {\n outputToObservable(item.itemFocused).pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.cancelAutoplay();\n });\n });\n this.observeResizeWindow();\n });\n }\n\n /**\n\t * Initializes the autoplay state based on the input configuration.\n\t */\n ngOnInit(): void {\n this.playing = this.isAutoplay();\n }\n\n /**\n\t * Returns the height of the currently visible ticker item.\n\t */\n get contentHeight(): number {\n return this._contentHeight;\n }\n\n /**\n\t * Returns the number of ticker items.\n\t */\n get itemsCount(): number {\n return this.newsTickerItems().length;\n }\n\n /**\n\t * Indicates whether navigation controls should be shown.\n\t */\n get isShowControls(): boolean {\n return this.newsTickerItems().length > 1;\n }\n\n /**\n\t * Lifecycle hook that clears intervals and subscriptions.\n\t */\n ngOnDestroy(): void {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n if (this.unsubscribeListener) {\n this.unsubscribeListener();\n }\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n }\n\n /**\n\t * Handles \"previous\" button click.\n\t * Navigates to the previous slide and stops autoplay.\n\t */\n onPrevious(): void {\n this.cancelAutoplay();\n this.previousSlide();\n }\n\n /**\n\t * Moves to the previous slide and emits `itemSwitch` event.\n\t */\n previousSlide(): void {\n this.itemIndex = this.getPrevIndex();\n if (this.itemIndex === this.itemsCount) {\n this.moveSlides(this.getFirstItem(this.getAllItemsArray()), true);\n } else {\n this.moveSlides(this.getCurrentItem(), true);\n }\n this.itemSwitch.emit(new EclNewsTickerItemEvent(this.itemIndex));\n }\n\n /**\n\t * Handles \"next\" button click.\n\t * Navigates to the next slide and stops autoplay.\n\t */\n onNext(): void {\n this.cancelAutoplay();\n this.nextSlide();\n }\n\n /**\n\t * Moves to the next slide and emits `itemSwitch` event.\n\t */\n nextSlide(): void {\n this.itemIndex = this.getNextIndex();\n if (this.itemIndex === 1) {\n this.moveSlides(this.getLastItem(this.getAllItemsArray()), true);\n } else {\n this.moveSlides(this.getCurrentItem(), true);\n }\n this.itemSwitch.emit(new EclNewsTickerItemEvent(this.itemIndex));\n }\n\n /**\n\t * Starts automatic cycling of the ticker items.\n\t */\n startAutoplay(): void {\n if (!this.playing) {\n this.playing = true;\n }\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n this.intervalId = setInterval(() => this.nextSlide(), this.PLAY_INTERVAL);\n }\n\n /**\n\t * Cancels the automatic cycling of the ticker items.\n\t */\n cancelAutoplay(): void {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n this.playing = false;\n }\n\n /**\n\t * Handles mouse over event on a ticker item.\n\t * Temporarily pauses autoplay.\n\t */\n onNewsTickerItemMouseOver(): void {\n if (this.playing) {\n this.pausePlay = true;\n this.cancelAutoplay();\n }\n }\n\n /**\n\t * Handles mouse out event from a ticker item.\n\t * Resumes autoplay if it was paused due to hover.\n\t */\n onNewsTickerItemMouseOut(): void {\n if (this.pausePlay) {\n this.pausePlay = false;\n this.startAutoplay();\n }\n }\n\n /**\n\t * Handles focus event on the \"Play\" button.\n\t * Starts autoplay and shifts focus to the \"Pause\" button.\n\t */\n onPlayBtnEnter(evt: Event): void {\n evt.preventDefault();\n this.startAutoplay();\n this.cd.detectChanges();\n this.pauseBtn()?.el.nativeElement.focus();\n }\n\n /**\n\t * Handles focus event on the \"Pause\" button.\n\t * Stops autoplay and shifts focus to the \"Play\" button.\n\t */\n onPauseBtnEnter(evt: Event): void {\n evt.preventDefault();\n this.cancelAutoplay();\n this.cd.detectChanges();\n this.playBtn()?.el.nativeElement.focus();\n }\n\n /**\n\t * Handles window resize and recalculates the layout.\n\t */\n private observeResizeWindow(): void {\n if (!this.window) {\n return;\n }\n fromEvent(this.window, 'resize').pipe(\n auditTime(50),\n takeUntil(this.destroy$)).subscribe(() => {\n setTimeout(() => {\n this.resizeTicker();\n this.moveSlides(this.getCurrentItem(), false);\n });\n });\n\n }\n\n private moveSlides(item: EclNewsTickerItemComponent | undefined, withTransition: boolean): void {\n if (item) {\n const newOffset = item.el.nativeElement.offsetTop;\n const newHeight = Math.floor(item.el.nativeElement.getBoundingClientRect().height,\n );\n this._contentHeight = newHeight;\n this.transitionDuration = withTransition ? 0.4 : 0;\n this.slidesTransform = `translate3d(0px, -${newOffset}px, 0px)`;\n this.cd.detectChanges();\n this.setCurrentSlide(item);\n }\n }\n\n private initContainer(): void {\n const newsTickerItems = this.newsTickerItems();\n if (newsTickerItems.length === 1) {\n this.resizeTicker();\n this.moveSlides(this.getFirstItem(Array.from(newsTickerItems)), false);\n return;\n }\n const firstHiddenItem = this.firstHiddenItem();\n const lastHiddenItem = this.lastHiddenItem();\n const slidesContainer = this.slidesContainer();\n if (firstHiddenItem) {\n this.cloneItemContent(newsTickerItems.at(this.itemsCount - 1)!, firstHiddenItem);\n }\n if (lastHiddenItem) {\n this.cloneItemContent(newsTickerItems.at(0)!, lastHiddenItem);\n }\n if (slidesContainer) {\n this.unsubscribeListener = this.renderer2.listen(slidesContainer.nativeElement, 'transitionend', () => this.checkIndex());\n }\n this.resizeTicker();\n this.moveSlides(this.getFirstItem(Array.from(newsTickerItems)), false);\n if (this.isAutoplay()) {\n this.startAutoplay();\n }\n }\n\n private checkIndex(): void {\n if (this.itemIndex === 1) {\n const item = this.getFirstItem(Array.from(this.newsTickerItems()));\n this.moveSlides(item, false);\n } else if (this.itemIndex === this.itemsCount) {\n const item = this.getLastItem(Array.from(this.newsTickerItems()));\n this.moveSlides(item, false);\n }\n }\n\n private resizeTicker(): void {\n let highestSlide = 0;\n this.newsTickerItems().forEach((slide) => {\n const slideHeight = slide.el.nativeElement.offsetHeight;\n highestSlide = highestSlide < slideHeight ? slideHeight : highestSlide;\n });\n }\n\n private getNextIndex(): number {\n return this.itemIndex === this.itemsCount ? 1 : ++this.itemIndex;\n }\n\n private getCurrentItem(): EclNewsTickerItemComponent | undefined {\n return this.getAllItemsArray()[this.itemIndex];\n }\n\n private getPrevIndex(): number {\n return this.itemIndex === 1 ? this.itemsCount : --this.itemIndex;\n }\n\n private getFirstItem(items: (EclNewsTickerItemComponent | undefined)[]): EclNewsTickerItemComponent | undefined {\n return items.length > 0 ? items[0] : undefined;\n }\n\n private getLastItem(items: (EclNewsTickerItemComponent | undefined)[]): EclNewsTickerItemComponent | undefined {\n return items[items.length - 1];\n }\n\n private cloneItemContent(source: EclNewsTickerItemComponent, target: EclNewsTickerItemComponent): void {\n const targetEl = target.el.nativeElement as HTMLElement;\n while (targetEl.firstChild) {\n targetEl.removeChild(targetEl.firstChild);\n }\n Array.from((source.el.nativeElement as HTMLElement).childNodes).forEach(node => {\n targetEl.appendChild(node.cloneNode(true));\n });\n }\n\n private getAllItemsArray(): (EclNewsTickerItemComponent | undefined)[] {\n return [...[this.firstHiddenItem()], ...this.newsTickerItems(), ...[this.lastHiddenItem()]];\n }\n\n private setCurrentSlide(currentItem: EclNewsTickerItemComponent): void {\n this.newsTickerItems().forEach((item) => {\n item.isCurrent = false;\n if (item === currentItem) {\n item.isCurrent = true;\n }\n });\n }\n}\n","<div class=\"ecl-news-ticker__container\">\n <div class=\"ecl-news-ticker__content\" [style.height.px]=\"contentHeight\">\n <ul class=\"ecl-news-ticker__slides\" [style.transition-duration.s]=\"transitionDuration\"\n [style.transform]=\"slidesTransform\" (mouseover)=\"onNewsTickerItemMouseOver()\"\n (mouseout)=\"onNewsTickerItemMouseOut()\" #slidesContainer>\n @if(isShowControls) {\n <ecl-news-ticker-item #firstHiddenItem></ecl-news-ticker-item>\n }\n <ng-content></ng-content>\n @if(isShowControls) {\n <ecl-news-ticker-item #lastHiddenItem></ecl-news-ticker-item>\n }\n </ul>\n </div>\n</div>\n\n@if(isShowControls) {\n<div class=\"ecl-news-ticker__controls\">\n <div class=\"ecl-news-ticker__actions\">\n <button eclButton class=\"ecl-news-ticker__prev\" variant=\"tertiary\" eclStyle=\"neutral\" isIconOnly (click)=\"onPrevious()\">\n <span eclButtonLabel>\n {{ 'ecl.news-ticker.PREV-ITEM' | translate }}\n </span>\n <ecl-icon iconSet=\"phosphor\" icon=\"caret-left\" size=\"m\"></ecl-icon>\n </button>\n <button #playBtn eclButton class=\"ecl-news-ticker__play\" variant=\"tertiary\" eclStyle=\"neutral\" isIconOnly [class.ecl-u-d-none]=\"playing\"\n (click)=\"startAutoplay()\" (keydown.enter)=\"onPlayBtnEnter($event)\">\n <span class=\"ecl-u-sr-only\">\n {{ 'ecl.news-ticker.AUTO-PLAY' | translate }}\n </span>\n <ecl-icon iconSet=\"phosphor\" icon=\"play-circle\" size=\"m\"></ecl-icon>\n </button>\n <button #pauseBtn eclButton class=\"ecl-news-ticker__pause\" variant=\"tertiary\" eclStyle=\"neutral\" isIconOnly [class.ecl-u-d-none]=\"!playing\"\n (click)=\"cancelAutoplay()\" (keydown.enter)=\"onPauseBtnEnter($event)\">\n <span class=\"ecl-u-sr-only\">\n {{ 'ecl.news-ticker.PAUSE' | translate }}\n </span>\n <ecl-icon iconSet=\"phosphor\" icon=\"pause-circle\" size=\"m\"></ecl-icon>\n </button>\n <button eclButton class=\"ecl-news-ticker__next\" variant=\"tertiary\" eclStyle=\"neutral\" isIconOnly (click)=\"onNext()\">\n <span eclButtonLabel>\n {{ 'ecl.news-ticker.NEXT-ITEM' | translate }}\n </span>\n <ecl-icon iconSet=\"phosphor\" icon=\"caret-right\" size=\"m\"></ecl-icon>\n </button>\n </div>\n <div class=\"ecl-news-ticker__counter\">\n <span class=\"ecl-news-ticker__counter--current\"> {{ itemIndex }}</span>\n {{ 'ecl.common.OF' | translate }}\n <span class=\"ecl-news-ticker__counter--max\">{{ itemsCount }}</span>\n </div>\n</div>\n}","import { EclNewsTickerComponent } from './ecl-news-ticker.component';\nimport { EclNewsTickerItemComponent } from './ecl-news-ticker-item.component';\nimport { EclNewsTickerIconDirective } from './ecl-news-ticker-icon.directive';\n\nexport * from './ecl-news-ticker.component';\nexport * from './ecl-news-ticker-item.component';\nexport * from './ecl-news-ticker-icon.directive';\nexport * from './events/ecl-news-ticker-item.event';\n\nexport const EUI_ECL_NEWS_TICKER = [\n EclNewsTickerComponent,\n EclNewsTickerItemComponent,\n EclNewsTickerIconDirective,\n] as const;\n"],"mappings":";;;;;;;;;;;AAYA,IAAa,6BAAb,MAAa,mCAAmC,iBAAgB;CAAnD;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA0B,MAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAA1B;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAA0B,cAAA;GAAA,UAAA;GAAA,MAAA,EAAA,gBAAA,wBAAA;GAAA,iBAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAA1B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA0B,YAAA,CAAA;EANtC,MAAA;EAAU,MAAA,CAAA;GACP,UAAU;GACV,MAAM,EACF,OAAO,wBACV;EACJ,CAAA;;;ACkBD,IAAa,6BAAb,MAAa,mCAAm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CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AElEhE,MAAa,sBAAsB;CAC/B;CACA;CACA;AACM"}
|
package/package.json
CHANGED
|
@@ -227,8 +227,7 @@ export declare class EclNewsTickerComponent extends ECLBaseDirective implements
|
|
|
227
227
|
private getPrevIndex;
|
|
228
228
|
private getFirstItem;
|
|
229
229
|
private getLastItem;
|
|
230
|
-
private
|
|
231
|
-
private getFirstContentChild;
|
|
230
|
+
private cloneItemContent;
|
|
232
231
|
private getAllItemsArray;
|
|
233
232
|
private setCurrentSlide;
|
|
234
233
|
static ɵfac: i0.ɵɵFactoryDeclaration<EclNewsTickerComponent, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-ecl-components-ecl-news-ticker.d.ts","names":[],"sources":["../../components/ecl-news-ticker/ecl-news-ticker-icon.directive.ts","../../components/ecl-news-ticker/ecl-news-ticker-item.component.ts","../../components/ecl-news-ticker/events/ecl-news-ticker-item.event.ts","../../components/ecl-news-ticker/ecl-news-ticker.component.ts","../../components/ecl-news-ticker/index.ts"],"mappings":";;;;;;;;qBAYa,mCAAmC;SAAnC,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;;;;;;;;;;;;;;qBCiBA,mCAAmC,4BAA4B,kBAAkB;EAC1F,IAAE;mBACe;;;;WAKR,iCAAO,OAAA;;;;;WAMP,uCAAa,OAAA;;;;WAKb,0CAAgB;;;;WAKhB,qCAAW;;;;EAKpB;;;;qBAKmB,oCAAU;;;;MAMzB;MAGA,UAAU;UAMN;;;;;;MAOJ;UAII;;;;EAKR;;;;EAkBA;UAKQ;SAvFC,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAA0B;;;;;;;;qBCtB1B,+BAA+B;EACrB;EAAA,YAAA;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"eui-ecl-components-ecl-news-ticker.d.ts","names":[],"sources":["../../components/ecl-news-ticker/ecl-news-ticker-icon.directive.ts","../../components/ecl-news-ticker/ecl-news-ticker-item.component.ts","../../components/ecl-news-ticker/events/ecl-news-ticker-item.event.ts","../../components/ecl-news-ticker/ecl-news-ticker.component.ts","../../components/ecl-news-ticker/index.ts"],"mappings":";;;;;;;;qBAYa,mCAAmC;SAAnC,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;;;;;;;;;;;;;;qBCiBA,mCAAmC,4BAA4B,kBAAkB;EAC1F,IAAE;mBACe;;;;WAKR,iCAAO,OAAA;;;;;WAMP,uCAAa,OAAA;;;;WAKb,0CAAgB;;;;WAKhB,qCAAW;;;;EAKpB;;;;qBAKmB,oCAAU;;;;MAMzB;MAGA,UAAU;UAMN;;;;;;MAOJ;UAII;;;;EAKR;;;;EAkBA;UAKQ;SAvFC,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAA0B;;;;;;;;qBCtB1B,+BAA+B;EACrB;EAAA,YAAA;;;;;;;;;;;;qBC0BV,+BAA+B,4BAA4B,WAAW;;;;;WAKtE,oCAAU;;;;;WAMV,oCAAU,iBAAA;;;;WAKV,yCAAe,gBAAA;;;;WAKf,yCAAe,OAAA;;;;WAKf,wCAAc,OAAA;;;;WAKd,yCAAe,OAAA;;;;WAKf,iCAAO,OAAA;;;;WAKP,kCAAQ,OAAA;qBAEE,oCAAU;EAQ7B;EACA;EACA;EACA;UAEQ;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;mBACS;mBACA;;;;;EAoBjB;;;;MAOI;;;;MAOA;;;;MAOA;;;;EAOJ;;;;;EAeA;;;;EAQA;;;;;EAcA;;;;EAQA;;;;EAaA;;;;EAaA;;;;;EAWA;;;;;EAWA;;;;;EAWA,eAAe,KAAK;;;;;EAWpB,gBAAgB,KAAK;;;;UAUb;UAeA;UAaA;UA0BA;UAUA;UAQA;UAIA;UAIA;UAIA;UAIA;UAIA;UAUA;UAIA;SAzVC,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAsB;MAAA;MAAA;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