diff --git a/ui-ngx/package.json b/ui-ngx/package.json index bd9ce3d1b1..c4b5930b13 100644 --- a/ui-ngx/package.json +++ b/ui-ngx/package.json @@ -89,7 +89,6 @@ "ngx-daterangepicker-material": "^6.0.4", "ngx-drag-drop": "^20.0.1", "ngx-flowchart": "https://github.com/thingsboard/ngx-flowchart.git#release/4.1.0", - "ngx-hm-carousel": "^19.0.0", "ngx-markdown": "^20.1.0", "ngx-sharebuttons": "^17.0.0", "ngx-translate-messageformat-compiler": "^7.3.0", diff --git a/ui-ngx/patches/ngx-hm-carousel+19.0.0.patch b/ui-ngx/patches/ngx-hm-carousel+19.0.0.patch deleted file mode 100644 index 0dfee707e1..0000000000 --- a/ui-ngx/patches/ngx-hm-carousel+19.0.0.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/node_modules/ngx-hm-carousel/fesm2022/ngx-hm-carousel.mjs b/node_modules/ngx-hm-carousel/fesm2022/ngx-hm-carousel.mjs -index 117f782..70e49a7 100644 ---- a/node_modules/ngx-hm-carousel/fesm2022/ngx-hm-carousel.mjs -+++ b/node_modules/ngx-hm-carousel/fesm2022/ngx-hm-carousel.mjs -@@ -1,5 +1,5 @@ - import * as i0 from '@angular/core'; --import { Directive, inject, ViewContainerRef, TemplateRef, input, PLATFORM_ID, DestroyRef, Renderer2, NgZone, ChangeDetectorRef, viewChild, ElementRef, contentChildren, contentChild, computed, signal, effect, forwardRef, Component, ChangeDetectionStrategy } from '@angular/core'; -+import { Directive, inject, ViewContainerRef, TemplateRef, input, PLATFORM_ID, DestroyRef, Renderer2, NgZone, ChangeDetectorRef, viewChild, ElementRef, contentChildren, contentChild, computed, signal, effect, forwardRef, Component, ChangeDetectionStrategy, afterNextRender } from '@angular/core'; - import { DOCUMENT, isPlatformBrowser, NgTemplateOutlet, AsyncPipe } from '@angular/common'; - import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop'; - import { NG_VALUE_ACCESSOR } from '@angular/forms'; -@@ -340,7 +340,7 @@ class NgxHmCarouselComponent { - }); - }); - }); -- const effectRef = effect(() => { -+ afterNextRender(() => { - this.rootElm = this.container().nativeElement; - this.containerElm = this.rootElm.children[0]; - this.init(); -@@ -365,10 +365,6 @@ class NgxHmCarouselComponent { - ]) - .pipe(takeUntilDestroyed(this._destroyRef)) - .subscribe(); -- // only exec once -- effectRef.destroy(); -- }, { -- allowSignalWrites: true, - }); - } - ngOnDestroy() { diff --git a/ui-ngx/src/app/app.component.ts b/ui-ngx/src/app/app.component.ts index b811c7fc2c..9ad8eebeac 100644 --- a/ui-ngx/src/app/app.component.ts +++ b/ui-ngx/src/app/app.component.ts @@ -1,8 +1,6 @@ // SPDX-FileCopyrightText: Copyright The ThingsBoard Authors // SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. // SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 -import 'hammerjs'; - import { Component } from '@angular/core'; import { environment as env } from '@env/environment'; diff --git a/ui-ngx/src/app/modules/common/modules-map.ts b/ui-ngx/src/app/modules/common/modules-map.ts index da47be2020..494a534b2d 100644 --- a/ui-ngx/src/app/modules/common/modules-map.ts +++ b/ui-ngx/src/app/modules/common/modules-map.ts @@ -71,7 +71,7 @@ import * as momentPlugin from '@fullcalendar/moment'; import * as interactionPlugin from '@fullcalendar/interaction'; import * as FullCalendar from '@fullcalendar/angular'; import * as CanvasGauges from 'canvas-gauges'; -import * as NgxHmCarousel from 'ngx-hm-carousel'; +import * as NgxHmCarousel from '@shared/components/carousel/carousel.component'; import * as TbCore from '@core/public-api'; import * as TbShared from '@shared/public-api'; diff --git a/ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.html b/ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.html index 4312b71358..38d7aa0379 100644 --- a/ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.html +++ b/ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.html @@ -239,11 +239,8 @@ showFirstLastButtons> @if (mode === 'widget' && widgetsList.length > 0) {
@for (widgets of widgetsList; track widgets) { @@ -267,6 +264,7 @@ @if (widgetsCarouselIndex > 0) {