From f558121040831e99439dee8093fec590c6acd2b1 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Tue, 7 Apr 2026 16:10:39 +0300 Subject: [PATCH] Introduce IotHubComponentsModule for all IoT Hub shared components - New IotHubComponentsModule in home/components/iot-hub/ declaring and exporting all IoT Hub components: detail dialog, browse, item card, add item dialog, install/update/delete/device-install dialogs - Import and re-export IotHubComponentsModule from HomeComponentsModule - Remove individual IoT Hub component declarations/exports from HomeComponentsModule --- .../home/components/home-components.module.ts | 27 +-------- .../iot-hub/iot-hub-components.module.ts | 55 +++++++++++++++++++ 2 files changed, 58 insertions(+), 24 deletions(-) create mode 100644 ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-components.module.ts diff --git a/ui-ngx/src/app/modules/home/components/home-components.module.ts b/ui-ngx/src/app/modules/home/components/home-components.module.ts index 84d578a59c..79967cb4fa 100644 --- a/ui-ngx/src/app/modules/home/components/home-components.module.ts +++ b/ui-ngx/src/app/modules/home/components/home-components.module.ts @@ -112,14 +112,7 @@ import { StatesControllerModule } from '@home/components/dashboard-page/states/s import { DashboardLayoutComponent } from '@home/components/dashboard-page/layout/dashboard-layout.component'; import { EditWidgetComponent } from '@home/components/dashboard-page/edit-widget.component'; import { DashboardWidgetSelectComponent } from '@home/components/dashboard-page/dashboard-widget-select.component'; -import { TbIotHubItemDetailDialogComponent } from '@home/components/iot-hub/iot-hub-item-detail-dialog.component'; -import { TbIotHubBrowseComponent } from '@home/components/iot-hub/iot-hub-browse.component'; -import { TbIotHubItemCardComponent } from '@home/components/iot-hub/iot-hub-item-card.component'; -import { TbIotHubAddItemDialogComponent } from '@home/components/iot-hub/iot-hub-add-item-dialog.component'; -import { TbIotHubInstallDialogComponent } from '@home/components/iot-hub/iot-hub-install-dialog.component'; -import { TbIotHubUpdateDialogComponent } from '@home/components/iot-hub/iot-hub-update-dialog.component'; -import { TbIotHubDeleteDialogComponent } from '@home/components/iot-hub/iot-hub-delete-dialog.component'; -import { TbDeviceInstallDialogComponent } from '@home/components/iot-hub/device-install-dialog/device-install-dialog.component'; +import { IotHubComponentsModule } from '@home/components/iot-hub/iot-hub-components.module'; import { AddWidgetDialogComponent } from '@home/components/dashboard-page/add-widget-dialog.component'; import { ManageDashboardLayoutsDialogComponent } from '@home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component'; import { @@ -329,14 +322,6 @@ import { SolutionInstallDialogComponent } from '@home/components/solution/soluti SelectDashboardBreakpointComponent, EditWidgetComponent, DashboardWidgetSelectComponent, - TbIotHubItemDetailDialogComponent, - TbIotHubBrowseComponent, - TbIotHubItemCardComponent, - TbIotHubAddItemDialogComponent, - TbIotHubInstallDialogComponent, - TbIotHubUpdateDialogComponent, - TbIotHubDeleteDialogComponent, - TbDeviceInstallDialogComponent, AddWidgetDialogComponent, MoveWidgetsDialogComponent, ManageDashboardLayoutsDialogComponent, @@ -385,6 +370,7 @@ import { SolutionInstallDialogComponent } from '@home/components/solution/soluti CommonModule, SharedModule, SharedHomeComponentsModule, + IotHubComponentsModule, WidgetConfigComponentsModule, BasicWidgetConfigModule, Lwm2mProfileComponentsModule, @@ -487,14 +473,7 @@ import { SolutionInstallDialogComponent } from '@home/components/solution/soluti SelectDashboardBreakpointComponent, EditWidgetComponent, DashboardWidgetSelectComponent, - TbIotHubItemDetailDialogComponent, - TbIotHubBrowseComponent, - TbIotHubItemCardComponent, - TbIotHubAddItemDialogComponent, - TbIotHubInstallDialogComponent, - TbIotHubUpdateDialogComponent, - TbIotHubDeleteDialogComponent, - TbDeviceInstallDialogComponent, + IotHubComponentsModule, AddWidgetDialogComponent, MoveWidgetsDialogComponent, ManageDashboardLayoutsDialogComponent, diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-components.module.ts b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-components.module.ts new file mode 100644 index 0000000000..4d6efbda1a --- /dev/null +++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-components.module.ts @@ -0,0 +1,55 @@ +/// +/// Copyright © 2016-2026 The Thingsboard Authors +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// + +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { SharedModule } from '@shared/shared.module'; +import { TbIotHubItemDetailDialogComponent } from './iot-hub-item-detail-dialog.component'; +import { TbIotHubBrowseComponent } from './iot-hub-browse.component'; +import { TbIotHubItemCardComponent } from './iot-hub-item-card.component'; +import { TbIotHubAddItemDialogComponent } from './iot-hub-add-item-dialog.component'; +import { TbIotHubInstallDialogComponent } from './iot-hub-install-dialog.component'; +import { TbIotHubUpdateDialogComponent } from './iot-hub-update-dialog.component'; +import { TbIotHubDeleteDialogComponent } from './iot-hub-delete-dialog.component'; +import { TbDeviceInstallDialogComponent } from './device-install-dialog/device-install-dialog.component'; + +@NgModule({ + declarations: [ + TbIotHubItemDetailDialogComponent, + TbIotHubBrowseComponent, + TbIotHubItemCardComponent, + TbIotHubAddItemDialogComponent, + TbIotHubInstallDialogComponent, + TbIotHubUpdateDialogComponent, + TbIotHubDeleteDialogComponent, + TbDeviceInstallDialogComponent + ], + imports: [ + CommonModule, + SharedModule + ], + exports: [ + TbIotHubItemDetailDialogComponent, + TbIotHubBrowseComponent, + TbIotHubItemCardComponent, + TbIotHubAddItemDialogComponent, + TbIotHubInstallDialogComponent, + TbIotHubUpdateDialogComponent, + TbIotHubDeleteDialogComponent, + TbDeviceInstallDialogComponent + ] +}) +export class IotHubComponentsModule { }