Browse Source

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
pull/15508/head
Igor Kulikov 6 months ago
parent
commit
f558121040
  1. 27
      ui-ngx/src/app/modules/home/components/home-components.module.ts
  2. 55
      ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-components.module.ts

27
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 { DashboardLayoutComponent } from '@home/components/dashboard-page/layout/dashboard-layout.component';
import { EditWidgetComponent } from '@home/components/dashboard-page/edit-widget.component'; import { EditWidgetComponent } from '@home/components/dashboard-page/edit-widget.component';
import { DashboardWidgetSelectComponent } from '@home/components/dashboard-page/dashboard-widget-select.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 { IotHubComponentsModule } from '@home/components/iot-hub/iot-hub-components.module';
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 { AddWidgetDialogComponent } from '@home/components/dashboard-page/add-widget-dialog.component'; 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 { ManageDashboardLayoutsDialogComponent } from '@home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component';
import { import {
@ -329,14 +322,6 @@ import { SolutionInstallDialogComponent } from '@home/components/solution/soluti
SelectDashboardBreakpointComponent, SelectDashboardBreakpointComponent,
EditWidgetComponent, EditWidgetComponent,
DashboardWidgetSelectComponent, DashboardWidgetSelectComponent,
TbIotHubItemDetailDialogComponent,
TbIotHubBrowseComponent,
TbIotHubItemCardComponent,
TbIotHubAddItemDialogComponent,
TbIotHubInstallDialogComponent,
TbIotHubUpdateDialogComponent,
TbIotHubDeleteDialogComponent,
TbDeviceInstallDialogComponent,
AddWidgetDialogComponent, AddWidgetDialogComponent,
MoveWidgetsDialogComponent, MoveWidgetsDialogComponent,
ManageDashboardLayoutsDialogComponent, ManageDashboardLayoutsDialogComponent,
@ -385,6 +370,7 @@ import { SolutionInstallDialogComponent } from '@home/components/solution/soluti
CommonModule, CommonModule,
SharedModule, SharedModule,
SharedHomeComponentsModule, SharedHomeComponentsModule,
IotHubComponentsModule,
WidgetConfigComponentsModule, WidgetConfigComponentsModule,
BasicWidgetConfigModule, BasicWidgetConfigModule,
Lwm2mProfileComponentsModule, Lwm2mProfileComponentsModule,
@ -487,14 +473,7 @@ import { SolutionInstallDialogComponent } from '@home/components/solution/soluti
SelectDashboardBreakpointComponent, SelectDashboardBreakpointComponent,
EditWidgetComponent, EditWidgetComponent,
DashboardWidgetSelectComponent, DashboardWidgetSelectComponent,
TbIotHubItemDetailDialogComponent, IotHubComponentsModule,
TbIotHubBrowseComponent,
TbIotHubItemCardComponent,
TbIotHubAddItemDialogComponent,
TbIotHubInstallDialogComponent,
TbIotHubUpdateDialogComponent,
TbIotHubDeleteDialogComponent,
TbDeviceInstallDialogComponent,
AddWidgetDialogComponent, AddWidgetDialogComponent,
MoveWidgetsDialogComponent, MoveWidgetsDialogComponent,
ManageDashboardLayoutsDialogComponent, ManageDashboardLayoutsDialogComponent,

55
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 { }
Loading…
Cancel
Save