Refactoring

This commit is contained in:
Igor Kulikov 2019-08-21 18:18:46 +03:00
parent 77eb33df96
commit f8ac02da62
68 changed files with 434 additions and 187 deletions

View File

@ -104,7 +104,6 @@
<module>tools</module>
<module>application</module>
<module>msa</module>
<module>ui</module>
</modules>
<profiles>
@ -307,6 +306,7 @@
<exclude>**/*.proto.js</exclude>
<exclude>docker/haproxy/**</exclude>
<exclude>docker/tb-node/**</exclude>
<exclude>ui/**</exclude>
</excludes>
<mapping>
<proto>JAVADOC_STYLE</proto>

View File

@ -16,7 +16,7 @@
import { Component, Input } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { COUNTRIES } from '@shared/components/contact.models';
import { COUNTRIES } from '@home/models/contact.models';
@Component({
selector: 'tb-contact',

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@import '../../../scss/constants';
@import '../../../../scss/constants';
:host {
width: 100%;

View File

@ -14,26 +14,19 @@
/// limitations under the License.
///
import {
Component,
ComponentFactoryResolver,
Inject,
OnInit,
SkipSelf,
ViewChild
} from '@angular/core';
import { ErrorStateMatcher, MAT_DIALOG_DATA, MatDialogRef } from '@angular/material';
import { PageComponent } from '@shared/components/page.component';
import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { FormControl, FormGroupDirective, NgForm } from '@angular/forms';
import { EntityTypeResource, EntityTypeTranslation } from '@shared/models/entity-type.models';
import { EntityTableConfig } from '@shared/components/entity/entities-table-config.models';
import { BaseData, HasId } from '@shared/models/base-data';
import { EntityId } from '@shared/models/id/entity-id';
import { AddEntityDialogData } from '@shared/components/entity/entity-component.models';
import { TbAnchorComponent } from '@shared/components/tb-anchor.component';
import { EntityComponent } from '@shared/components/entity/entity.component';
import {Component, ComponentFactoryResolver, Inject, OnInit, SkipSelf, ViewChild} from '@angular/core';
import {ErrorStateMatcher, MAT_DIALOG_DATA, MatDialogRef} from '@angular/material';
import {PageComponent} from '@shared/components/page.component';
import {Store} from '@ngrx/store';
import {AppState} from '@core/core.state';
import {FormControl, FormGroupDirective, NgForm} from '@angular/forms';
import {EntityTypeResource, EntityTypeTranslation} from '@shared/models/entity-type.models';
import {BaseData, HasId} from '@shared/models/base-data';
import {EntityId} from '@shared/models/id/entity-id';
import {TbAnchorComponent} from '@shared/components/tb-anchor.component';
import {EntityComponent} from './entity.component';
import {EntityTableConfig} from '@home/models/entity/entities-table-config.models';
import {AddEntityDialogData} from '@home/models/entity/entity-component.models';
@Component({
selector: 'tb-add-entity-dialog',

View File

@ -16,12 +16,12 @@
import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { EntityComponent } from '@shared/components/entity/entity.component';
import { FormBuilder, FormGroup, ValidatorFn, Validators } from '@angular/forms';
import { ContactBased } from '@shared/models/contact-based.model';
import { AfterViewInit } from '@angular/core';
import { POSTAL_CODE_PATTERNS } from '@shared/components/contact.models';
import { POSTAL_CODE_PATTERNS } from '@home/models/contact.models';
import { HasId } from '@shared/models/base-data';
import {EntityComponent} from './entity.component';
export abstract class ContactBasedComponent<T extends ContactBased<HasId>> extends EntityComponent<T> implements AfterViewInit {

View File

@ -29,7 +29,7 @@ import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { PageLink, TimePageLink } from '@shared/models/page/page-link';
import { MatDialog, MatPaginator, MatSort } from '@angular/material';
import { EntitiesDataSource } from '@shared/models/datasource/entity-datasource';
import { EntitiesDataSource } from '@home/models/datasource/entity-datasource';
import { debounceTime, distinctUntilChanged, tap } from 'rxjs/operators';
import { Direction, SortOrder } from '@shared/models/page/sort-order';
import { forkJoin, fromEvent, merge, Observable } from 'rxjs';
@ -43,14 +43,14 @@ import {
EntityTableConfig,
GroupActionDescriptor,
HeaderActionDescriptor
} from '@shared/components/entity/entities-table-config.models';
} from '@home/models/entity/entities-table-config.models';
import { EntityTypeTranslation } from '@shared/models/entity-type.models';
import { DialogService } from '@core/services/dialog.service';
import { AddEntityDialogComponent } from '@shared/components/entity/add-entity-dialog.component';
import { AddEntityDialogComponent } from './add-entity-dialog.component';
import {
AddEntityDialogData,
EntityAction
} from '@shared/components/entity/entity-component.models';
} from '@home/models/entity/entity-component.models';
import { Timewindow } from '@shared/models/time/time.models';
import {DomSanitizer, SafeHtml} from '@angular/platform-browser';
import { TbAnchorComponent } from '@shared/components/tb-anchor.component';

View File

@ -31,13 +31,6 @@
<mat-tab label="{{ 'details.details' | translate }}">
<tb-anchor #entityDetailsForm></tb-anchor>
</mat-tab>
<!--mat-tab *ngIf="entity && entitiesTableConfig.entityType !== entityTypes.CUSTOMER"
label="{{ 'audit-log.audit-logs' | translate }}">
<tb-audit-log-table [active]="selectedTab === 1" [auditLogMode]="auditLogModes.ENTITY" [entityId]="entity.id" detailsMode="true"></tb-audit-log-table>
</mat-tab>
<mat-tab *ngIf="entity && entitiesTableConfig.entityType === entityTypes.CUSTOMER"
label="{{ 'audit-log.audit-logs' | translate }}">
<tb-audit-log-table [active]="selectedTab === 1" [auditLogMode]="auditLogModes.CUSTOMER" [customerId]="entity.id" detailsMode="true"></tb-audit-log-table>
</mat-tab-->
<tb-anchor #entityTabs></tb-anchor>
</mat-tab-group>
</tb-details-panel>

View File

@ -23,12 +23,15 @@ import {
OnDestroy,
OnInit,
Output,
ViewChild
ViewChild,
ViewChildren,
QueryList,
ContentChildren, AfterViewInit
} from '@angular/core';
import { PageComponent } from '@shared/components/page.component';
import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { EntityTableConfig } from '@shared/components/entity/entities-table-config.models';
import { EntityTableConfig } from '@home/models/entity/entities-table-config.models';
import { BaseData, HasId } from '@shared/models/base-data';
import {
EntityType,
@ -36,11 +39,12 @@ import {
EntityTypeTranslation
} from '@shared/models/entity-type.models';
import { NgForm } from '@angular/forms';
import { EntityComponent } from '@shared/components/entity/entity.component';
import { EntityComponent } from './entity.component';
import { TbAnchorComponent } from '@shared/components/tb-anchor.component';
import { EntityAction } from '@shared/components/entity/entity-component.models';
import { EntityAction } from '@home/models/entity/entity-component.models';
import { Subscription } from 'rxjs';
// import { AuditLogMode } from '@shared/models/audit-log.models';
import { MatTabGroup, MatTab } from '@angular/material';
import { EntityTabsComponent } from '@home/components/entity/entity-tabs.component';
@Component({
selector: 'tb-entity-details-panel',
@ -48,7 +52,7 @@ import { Subscription } from 'rxjs';
styleUrls: ['./entity-details-panel.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class EntityDetailsPanelComponent extends PageComponent implements OnInit, OnDestroy {
export class EntityDetailsPanelComponent extends PageComponent implements OnInit, AfterViewInit, OnDestroy {
@Input() entitiesTableConfig: EntityTableConfig<BaseData<HasId>>;
@ -62,6 +66,7 @@ export class EntityDetailsPanelComponent extends PageComponent implements OnInit
entityAction = new EventEmitter<EntityAction<BaseData<HasId>>>();
entityComponent: EntityComponent<BaseData<HasId>>;
entityTabsComponent: EntityTabsComponent<BaseData<HasId>>;
detailsForm: NgForm;
isEditValue = false;
@ -71,6 +76,12 @@ export class EntityDetailsPanelComponent extends PageComponent implements OnInit
@ViewChild('entityDetailsForm', {static: true}) entityDetailsFormAnchor: TbAnchorComponent;
@ViewChild('entityTabs', {static: true}) entityTabsAnchor: TbAnchorComponent;
@ViewChild(MatTabGroup, {static: true}) matTabGroup: MatTabGroup;
@ViewChildren(MatTab) inclusiveTabs: QueryList<MatTab>;
translations: EntityTypeTranslation;
resources: EntityTypeResource;
entity: BaseData<HasId>;
@ -94,6 +105,9 @@ export class EntityDetailsPanelComponent extends PageComponent implements OnInit
set isEdit(val: boolean) {
this.isEditValue = val;
this.entityComponent.isEdit = val;
if (this.entityTabsComponent) {
this.entityTabsComponent.isEdit = val;
}
}
get isEdit() {
@ -125,6 +139,19 @@ export class EntityDetailsPanelComponent extends PageComponent implements OnInit
this.entityActionSubscription = this.entityComponent.entityAction.subscribe((action) => {
this.entityAction.emit(action);
});
this.buildEntityTabsComponent();
}
buildEntityTabsComponent() {
if (this.entitiesTableConfig.entityTabsComponent) {
const componentTabsFactory = this.componentFactoryResolver.resolveComponentFactory(this.entitiesTableConfig.entityTabsComponent);
const viewContainerRef = this.entityTabsAnchor.viewContainerRef;
viewContainerRef.clear();
const componentTabsRef = viewContainerRef.createComponent(componentTabsFactory);
this.entityTabsComponent = componentTabsRef.instance;
this.entityTabsComponent.isEdit = this.isEdit;
this.entityTabsComponent.entitiesTableConfig = this.entitiesTableConfig;
}
}
reload(): void {
@ -133,6 +160,9 @@ export class EntityDetailsPanelComponent extends PageComponent implements OnInit
(entity) => {
this.entity = entity;
this.entityComponent.entity = entity;
if (this.entityTabsComponent) {
this.entityTabsComponent.entity = entity;
}
}
);
}
@ -145,6 +175,9 @@ export class EntityDetailsPanelComponent extends PageComponent implements OnInit
this.isEdit = isEdit;
if (!this.isEdit) {
this.entityComponent.entity = this.entity;
if (this.entityTabsComponent) {
this.entityTabsComponent.entity = this.entity;
}
} else {
this.selectedTab = 0;
}
@ -157,6 +190,9 @@ export class EntityDetailsPanelComponent extends PageComponent implements OnInit
(entity) => {
this.entity = entity;
this.entityComponent.entity = entity;
if (this.entityTabsComponent) {
this.entityTabsComponent.entity = entity;
}
this.isEdit = false;
this.entityUpdated.emit(this.entity);
}
@ -164,4 +200,17 @@ export class EntityDetailsPanelComponent extends PageComponent implements OnInit
}
}
ngAfterViewInit(): void {
if (this.entityTabsComponent) {
this.entityTabsComponent.entityTabsChanged.subscribe(
(entityTabs) => {
if (entityTabs) {
this.matTabGroup._tabs.reset([...this.inclusiveTabs.toArray(), ...entityTabs]);
this.matTabGroup._tabs.notifyOnChanges();
}
}
);
}
}
}

View File

@ -19,7 +19,7 @@ import { PageComponent } from '@shared/components/page.component';
import { Input, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { EntityTableConfig } from '@shared/components/entity/entities-table-config.models';
import { EntityTableConfig } from '@home/models/entity/entities-table-config.models';
export abstract class EntityTableHeaderComponent<T extends BaseData<HasId>> extends PageComponent implements OnInit {

View File

@ -0,0 +1,85 @@
///
/// Copyright © 2016-2019 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 { BaseData, HasId } from '@shared/models/base-data';
import { PageComponent } from '@shared/components/page.component';
import {
AfterViewInit,
ContentChildren,
EventEmitter,
Input,
OnInit,
Output,
QueryList,
ViewChildren
} from '@angular/core';
import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { EntityTableConfig } from '@home/models/entity/entities-table-config.models';
import { MatTab } from '@angular/material';
import { EntityAction } from '@home/models/entity/entity-component.models';
import { BehaviorSubject } from 'rxjs';
export abstract class EntityTabsComponent<T extends BaseData<HasId>> extends PageComponent implements OnInit, AfterViewInit {
entityValue: T;
@ViewChildren(MatTab) entityTabs: QueryList<MatTab>;
isEditValue: boolean;
@Input()
set isEdit(isEdit: boolean) {
this.isEditValue = isEdit;
}
get isEdit() {
return this.isEditValue;
}
@Input()
set entity(entity: T) {
this.entityValue = entity;
}
get entity(): T {
return this.entityValue;
}
@Input()
entitiesTableConfig: EntityTableConfig<T>;
private entityTabsSubject = new BehaviorSubject<Array<MatTab>>(null);
entityTabsChanged = this.entityTabsSubject.asObservable();
protected constructor(protected store: Store<AppState>) {
super(store);
}
ngOnInit() {
}
ngAfterViewInit(): void {
this.entityTabsSubject.next(this.entityTabs.toArray());
this.entityTabs.changes.subscribe(
() => {
this.entityTabsSubject.next(this.entityTabs.toArray());
}
);
}
}

View File

@ -20,8 +20,8 @@ import { PageComponent } from '@shared/components/page.component';
import { EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { EntityAction } from '@shared/components/entity/entity-component.models';
import { EntityTableConfig } from '@shared/components/entity/entities-table-config.models';
import { EntityAction } from '@home/models/entity/entity-component.models';
import { EntityTableConfig } from '@home/models/entity/entities-table-config.models';
export abstract class EntityComponent<T extends BaseData<HasId>> extends PageComponent implements OnInit {

View File

@ -0,0 +1,50 @@
///
/// Copyright © 2016-2019 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 '@app/shared/shared.module';
import {AddEntityDialogComponent} from './entity/add-entity-dialog.component';
import {EntitiesTableComponent} from './entity/entities-table.component';
import {DetailsPanelComponent} from './details-panel.component';
import {EntityDetailsPanelComponent} from './entity/entity-details-panel.component';
import {ContactComponent} from './contact.component';
@NgModule({
entryComponents: [
AddEntityDialogComponent
],
declarations:
[
EntitiesTableComponent,
AddEntityDialogComponent,
DetailsPanelComponent,
EntityDetailsPanelComponent,
ContactComponent,
],
imports: [
CommonModule,
SharedModule
],
exports: [
EntitiesTableComponent,
AddEntityDialogComponent,
DetailsPanelComponent,
EntityDetailsPanelComponent,
ContactComponent
]
})
export class HomeComponentsModule { }

View File

@ -22,7 +22,7 @@ import { BaseData, HasId } from '@shared/models/base-data';
import { CollectionViewer, DataSource } from '@angular/cdk/typings/collections';
import { catchError, map, take, tap } from 'rxjs/operators';
import { SelectionModel } from '@angular/cdk/collections';
import {EntityBooleanFunction} from '@shared/components/entity/entities-table-config.models';
import {EntityBooleanFunction} from '@home/models/entity/entities-table-config.models';
export type EntitiesFetchFunction<T extends BaseData<HasId>, P extends PageLink> = (pageLink: P) => Observable<PageData<T>>;

View File

@ -14,26 +14,22 @@
/// limitations under the License.
///
import { BaseData, HasId } from '@shared/models/base-data';
import { EntityId } from '@shared/models/id/entity-id';
import { EntitiesFetchFunction } from '@shared/models/datasource/entity-datasource';
import { Observable, of } from 'rxjs';
import { emptyPageData } from '@shared/models/page/page-data';
import { DatePipe } from '@angular/common';
import { Direction, SortOrder } from '@shared/models/page/sort-order';
import {
EntityType,
EntityTypeResource,
EntityTypeTranslation
} from '@shared/models/entity-type.models';
import { EntityComponent } from '@shared/components/entity/entity.component';
import { Type } from '@angular/core';
import { EntityAction } from '@shared/components/entity/entity-component.models';
import { HasUUID } from '@shared/models/id/has-uuid';
import { PageLink } from '@shared/models/page/page-link';
import { EntitiesTableComponent } from '@shared/components/entity/entities-table.component';
import { EntityTableHeaderComponent } from '@shared/components/entity/entity-table-header.component';
import { ActivatedRoute } from '@angular/router';
import {BaseData, HasId} from '@shared/models/base-data';
import {EntitiesFetchFunction} from '@home/models/datasource/entity-datasource';
import {Observable, of} from 'rxjs';
import {emptyPageData} from '@shared/models/page/page-data';
import {DatePipe} from '@angular/common';
import {Direction, SortOrder} from '@shared/models/page/sort-order';
import {EntityType, EntityTypeResource, EntityTypeTranslation} from '@shared/models/entity-type.models';
import {EntityComponent} from '@home/components/entity/entity.component';
import {Type} from '@angular/core';
import {EntityAction} from './entity-component.models';
import {HasUUID} from '@shared/models/id/has-uuid';
import {PageLink} from '@shared/models/page/page-link';
import {EntitiesTableComponent} from '@home/components/entity/entities-table.component';
import {EntityTableHeaderComponent} from '@home/components/entity/entity-table-header.component';
import {ActivatedRoute} from '@angular/router';
import { EntityTabsComponent } from '../../components/entity/entity-tabs.component';
export type EntityBooleanFunction<T extends BaseData<HasId>> = (entity: T) => boolean;
export type EntityStringFunction<T extends BaseData<HasId>> = (entity: T) => string;
@ -117,6 +113,7 @@ export class EntityTableConfig<T extends BaseData<HasId>, P extends PageLink = P
entityTranslations: EntityTypeTranslation;
entityResources: EntityTypeResource;
entityComponent: Type<EntityComponent<T>>;
entityTabsComponent: Type<EntityTabsComponent<T>>;
addDialogStyle = {};
defaultSortOrder: SortOrder = {property: 'createdTime', direction: Direction.ASC};
columns: Array<EntityTableColumn<T>> = [];

View File

@ -14,8 +14,8 @@
/// limitations under the License.
///
import { BaseData, HasId } from '@shared/models/base-data';
import { EntityTableConfig } from '@shared/components/entity/entities-table-config.models';
import {BaseData, HasId} from '@shared/models/base-data';
import {EntityTableConfig} from './entities-table-config.models';
export interface AddEntityDialogData<T extends BaseData<HasId>> {
entitiesTableConfig: EntityTableConfig<T>;

View File

@ -20,8 +20,9 @@ import { CommonModule } from '@angular/common';
import { AdminRoutingModule } from './admin-routing.module';
import { SharedModule } from '@app/shared/shared.module';
import { MailServerComponent } from '@modules/home/pages/admin/mail-server.component';
import {GeneralSettingsComponent} from "@modules/home/pages/admin/general-settings.component";
import {SecuritySettingsComponent} from "@modules/home/pages/admin/security-settings.component";
import {GeneralSettingsComponent} from '@modules/home/pages/admin/general-settings.component';
import {SecuritySettingsComponent} from '@modules/home/pages/admin/security-settings.component';
import {HomeComponentsModule} from '@modules/home/components/home-components.module';
@NgModule({
declarations:
@ -33,6 +34,7 @@ import {SecuritySettingsComponent} from "@modules/home/pages/admin/security-sett
imports: [
CommonModule,
SharedModule,
HomeComponentsModule,
AdminRoutingModule
]
})

View File

@ -17,7 +17,7 @@
import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {EntitiesTableComponent} from '@shared/components/entity/entities-table.component';
import {EntitiesTableComponent} from '../../components/entity/entities-table.component';
import {Authority} from '@shared/models/authority.enum';
import {AssetsTableConfigResolver} from './assets-table-config.resolver';

View File

@ -17,7 +17,7 @@
import {Component} from '@angular/core';
import {Store} from '@ngrx/store';
import {AppState} from '@core/core.state';
import {EntityTableHeaderComponent} from '@shared/components/entity/entity-table-header.component';
import {EntityTableHeaderComponent} from '../../components/entity/entity-table-header.component';
import {EntityType} from '@shared/models/entity-type.models';
import {AssetInfo} from '@shared/models/asset.models';

View File

@ -17,7 +17,7 @@
import {Component} from '@angular/core';
import {Store} from '@ngrx/store';
import {AppState} from '@core/core.state';
import {EntityComponent} from '@shared/components/entity/entity.component';
import {EntityComponent} from '../../components/entity/entity.component';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {EntityType} from '@shared/models/entity-type.models';
import {NULL_UUID} from '@shared/models/id/has-uuid';

View File

@ -21,6 +21,7 @@ import {HomeDialogsModule} from '../../dialogs/home-dialogs.module';
import {AssetComponent} from './asset.component';
import {AssetTableHeaderComponent} from './asset-table-header.component';
import {AssetRoutingModule} from './asset-routing.module';
import {HomeComponentsModule} from '@modules/home/components/home-components.module';
@NgModule({
entryComponents: [
@ -34,6 +35,7 @@ import {AssetRoutingModule} from './asset-routing.module';
imports: [
CommonModule,
SharedModule,
HomeComponentsModule,
HomeDialogsModule,
AssetRoutingModule
]

View File

@ -25,11 +25,11 @@ import {
EntityTableConfig,
GroupActionDescriptor,
HeaderActionDescriptor
} from '@shared/components/entity/entities-table-config.models';
} from '@home/models/entity/entities-table-config.models';
import {TranslateService} from '@ngx-translate/core';
import {DatePipe} from '@angular/common';
import {EntityType, entityTypeResources, entityTypeTranslations} from '@shared/models/entity-type.models';
import {EntityAction} from '@shared/components/entity/entity-component.models';
import {EntityAction} from '@home/models/entity/entity-component.models';
import {forkJoin, Observable, of} from 'rxjs';
import {select, Store} from '@ngrx/store';
import {selectAuthUser} from '@core/auth/auth.selectors';

View File

@ -17,7 +17,7 @@
import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {EntitiesTableComponent} from '@shared/components/entity/entities-table.component';
import {EntitiesTableComponent} from '../../components/entity/entities-table.component';
import {Authority} from '@shared/models/authority.enum';
import {UsersTableConfigResolver} from '../user/users-table-config.resolver';
import {CustomersTableConfigResolver} from './customers-table-config.resolver';

View File

@ -19,10 +19,10 @@ import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Customer } from '@shared/models/customer.model';
import { ContactBasedComponent } from '@shared/components/entity/contact-based.component';
import {Tenant} from '@app/shared/models/tenant.model';
import {ActionNotificationShow} from '@app/core/notification/notification.actions';
import {TranslateService} from '@ngx-translate/core';
import {ContactBasedComponent} from '../../components/entity/contact-based.component';
@Component({
selector: 'tb-customer',

View File

@ -19,6 +19,7 @@ import { CommonModule } from '@angular/common';
import { SharedModule } from '@shared/shared.module';
import {CustomerComponent} from '@modules/home/pages/customer/customer.component';
import {CustomerRoutingModule} from './customer-routing.module';
import {HomeComponentsModule} from '@modules/home/components/home-components.module';
@NgModule({
entryComponents: [
@ -30,6 +31,7 @@ import {CustomerRoutingModule} from './customer-routing.module';
imports: [
CommonModule,
SharedModule,
HomeComponentsModule,
CustomerRoutingModule
]
})

View File

@ -23,7 +23,7 @@ import {
DateEntityTableColumn,
EntityTableColumn,
EntityTableConfig
} from '@shared/components/entity/entities-table-config.models';
} from '@home/models/entity/entities-table-config.models';
import { TranslateService } from '@ngx-translate/core';
import { DatePipe } from '@angular/common';
import {
@ -31,7 +31,7 @@ import {
entityTypeResources,
entityTypeTranslations
} from '@shared/models/entity-type.models';
import { EntityAction } from '@shared/components/entity/entity-component.models';
import { EntityAction } from '@home/models/entity/entity-component.models';
import {Customer} from '@app/shared/models/customer.model';
import {CustomerService} from '@app/core/http/customer.service';
import {CustomerComponent} from '@modules/home/pages/customer/customer.component';

View File

@ -17,7 +17,7 @@
import {Component} from '@angular/core';
import {Store} from '@ngrx/store';
import {AppState} from '@core/core.state';
import {EntityComponent} from '@shared/components/entity/entity.component';
import {EntityComponent} from '../../components/entity/entity.component';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {ActionNotificationShow} from '@core/notification/notification.actions';
import {TranslateService} from '@ngx-translate/core';
@ -35,7 +35,7 @@ import {DashboardService} from '@core/http/dashboard.service';
templateUrl: './dashboard-form.component.html',
styleUrls: ['./dashboard-form.component.scss']
})
export class DashboardFormComponent extends EntityComponent<Dashboard | DashboardInfo> {
export class DashboardFormComponent extends EntityComponent<Dashboard> {
dashboardScope: 'tenant' | 'customer' | 'customer_user';
customerId: string;

View File

@ -17,7 +17,7 @@
import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {EntitiesTableComponent} from '@shared/components/entity/entities-table.component';
import {EntitiesTableComponent} from '../../components/entity/entities-table.component';
import {Authority} from '@shared/models/authority.enum';
import {DashboardsTableConfigResolver} from './dashboards-table-config.resolver';

View File

@ -22,6 +22,7 @@ import {DashboardFormComponent} from '@modules/home/pages/dashboard/dashboard-fo
import {ManageDashboardCustomersDialogComponent} from '@modules/home/pages/dashboard/manage-dashboard-customers-dialog.component';
import {DashboardRoutingModule} from './dashboard-routing.module';
import {MakeDashboardPublicDialogComponent} from '@modules/home/pages/dashboard/make-dashboard-public-dialog.component';
import {HomeComponentsModule} from '@modules/home/components/home-components.module';
@NgModule({
entryComponents: [
@ -37,6 +38,7 @@ import {MakeDashboardPublicDialogComponent} from '@modules/home/pages/dashboard/
imports: [
CommonModule,
SharedModule,
HomeComponentsModule,
HomeDialogsModule,
DashboardRoutingModule
]

View File

@ -25,11 +25,11 @@ import {
EntityTableConfig,
GroupActionDescriptor,
HeaderActionDescriptor
} from '@shared/components/entity/entities-table-config.models';
} from '@home/models/entity/entities-table-config.models';
import {TranslateService} from '@ngx-translate/core';
import {DatePipe} from '@angular/common';
import {EntityType, entityTypeResources, entityTypeTranslations} from '@shared/models/entity-type.models';
import {EntityAction} from '@shared/components/entity/entity-component.models';
import {EntityAction} from '@home/models/entity/entity-component.models';
import {forkJoin, Observable, of} from 'rxjs';
import {select, Store} from '@ngrx/store';
import {selectAuthUser} from '@core/auth/auth.selectors';

View File

@ -17,7 +17,7 @@
import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {EntitiesTableComponent} from '@shared/components/entity/entities-table.component';
import {EntitiesTableComponent} from '../../components/entity/entities-table.component';
import {Authority} from '@shared/models/authority.enum';
import {DevicesTableConfigResolver} from '@modules/home/pages/device/devices-table-config.resolver';

View File

@ -17,7 +17,7 @@
import { Component } from '@angular/core';
import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { EntityTableHeaderComponent } from '@shared/components/entity/entity-table-header.component';
import { EntityTableHeaderComponent } from '../../components/entity/entity-table-header.component';
import {DeviceInfo} from '@app/shared/models/device.models';
import {EntityType} from '@shared/models/entity-type.models';

View File

@ -0,0 +1,29 @@
<!--
Copyright © 2016-2019 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.
-->
<mat-tab label="{{entity?.name}}">
Hobotok<br/> {{ test }}
{{ entity | json }}
</mat-tab>
<mat-tab *ngIf="entity?.additionalInfo?.gateway" label="Gateway">
Hobotok 2<br/>
{{ entity | json }}
</mat-tab>
<mat-tab label="{{ 'extension.extensions' | translate }}">
Hobotok 2<br/>
{{ entity | json }}
</mat-tab>

View File

@ -0,0 +1,41 @@
///
/// Copyright © 2016-2019 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 { Component } from '@angular/core';
import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { DeviceInfo } from '@shared/models/device.models';
import { EntityType } from '@shared/models/entity-type.models';
import { EntityTabsComponent } from '../../components/entity/entity-tabs.component';
@Component({
selector: 'tb-device-tabs',
templateUrl: './device-tabs.component.html',
styleUrls: []
})
export class DeviceTabsComponent extends EntityTabsComponent<DeviceInfo> {
entityType = EntityType;
constructor(protected store: Store<AppState>) {
super(store);
}
ngOnInit() {
super.ngOnInit();
}
}

View File

@ -17,7 +17,7 @@
import { Component, OnInit } from '@angular/core';
import { select, Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { EntityComponent } from '@shared/components/entity/entity.component';
import { EntityComponent } from '../../components/entity/entity.component';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { User } from '@shared/models/user.model';
import { selectAuth, selectUserDetails } from '@core/auth/auth.selectors';

View File

@ -22,21 +22,26 @@ import {DeviceRoutingModule} from './device-routing.module';
import {DeviceTableHeaderComponent} from '@modules/home/pages/device/device-table-header.component';
import {DeviceCredentialsDialogComponent} from '@modules/home/pages/device/device-credentials-dialog.component';
import {HomeDialogsModule} from '../../dialogs/home-dialogs.module';
import {HomeComponentsModule} from '@modules/home/components/home-components.module';
import { DeviceTabsComponent } from '@home/pages/device/device-tabs.component';
@NgModule({
entryComponents: [
DeviceComponent,
DeviceTabsComponent,
DeviceTableHeaderComponent,
DeviceCredentialsDialogComponent
],
declarations: [
DeviceComponent,
DeviceTabsComponent,
DeviceTableHeaderComponent,
DeviceCredentialsDialogComponent
],
imports: [
CommonModule,
SharedModule,
HomeComponentsModule,
HomeDialogsModule,
DeviceRoutingModule
]

View File

@ -24,11 +24,11 @@ import {
EntityTableColumn,
EntityTableConfig, GroupActionDescriptor,
HeaderActionDescriptor
} from '@shared/components/entity/entities-table-config.models';
} from '@home/models/entity/entities-table-config.models';
import {TranslateService} from '@ngx-translate/core';
import {DatePipe} from '@angular/common';
import {EntityType, entityTypeResources, entityTypeTranslations} from '@shared/models/entity-type.models';
import {EntityAction} from '@shared/components/entity/entity-component.models';
import {EntityAction} from '@home/models/entity/entity-component.models';
import {Device, DeviceCredentials, DeviceInfo} from '@app/shared/models/device.models';
import {DeviceComponent} from '@modules/home/pages/device/device.component';
import {forkJoin, Observable, of} from 'rxjs';
@ -58,6 +58,7 @@ import {
AddEntitiesToCustomerDialogComponent,
AddEntitiesToCustomerDialogData
} from '../../dialogs/add-entities-to-customer-dialog.component';
import { DeviceTabsComponent } from '@home/pages/device/device-tabs.component';
@Injectable()
export class DevicesTableConfigResolver implements Resolve<EntityTableConfig<DeviceInfo>> {
@ -78,6 +79,7 @@ export class DevicesTableConfigResolver implements Resolve<EntityTableConfig<Dev
this.config.entityType = EntityType.DEVICE;
this.config.entityComponent = DeviceComponent;
this.config.entityTabsComponent = DeviceTabsComponent;
this.config.entityTranslations = entityTypeTranslations.get(EntityType.DEVICE);
this.config.entityResources = entityTypeResources.get(EntityType.DEVICE);

View File

@ -17,7 +17,7 @@
import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {EntitiesTableComponent} from '@shared/components/entity/entities-table.component';
import {EntitiesTableComponent} from '../../components/entity/entities-table.component';
import {Authority} from '@shared/models/authority.enum';
import {EntityViewsTableConfigResolver} from '@modules/home/pages/entity-view/entity-views-table-config.resolver';

View File

@ -17,7 +17,7 @@
import {Component} from '@angular/core';
import {Store} from '@ngrx/store';
import {AppState} from '@core/core.state';
import {EntityTableHeaderComponent} from '@shared/components/entity/entity-table-header.component';
import {EntityTableHeaderComponent} from '../../components/entity/entity-table-header.component';
import {EntityType} from '@shared/models/entity-type.models';
import {EntityViewInfo} from '@app/shared/models/entity-view.models';

View File

@ -17,7 +17,7 @@
import {Component} from '@angular/core';
import {Store} from '@ngrx/store';
import {AppState} from '@core/core.state';
import {EntityComponent} from '@shared/components/entity/entity.component';
import {EntityComponent} from '../../components/entity/entity.component';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {EntityType} from '@shared/models/entity-type.models';
import {NULL_UUID} from '@shared/models/id/has-uuid';

View File

@ -21,6 +21,7 @@ import {HomeDialogsModule} from '../../dialogs/home-dialogs.module';
import {EntityViewComponent} from '@modules/home/pages/entity-view/entity-view.component';
import {EntityViewTableHeaderComponent} from './entity-view-table-header.component';
import {EntityViewRoutingModule} from './entity-view-routing.module';
import {HomeComponentsModule} from '@modules/home/components/home-components.module';
@NgModule({
entryComponents: [
@ -34,6 +35,7 @@ import {EntityViewRoutingModule} from './entity-view-routing.module';
imports: [
CommonModule,
SharedModule,
HomeComponentsModule,
HomeDialogsModule,
EntityViewRoutingModule
]

View File

@ -25,11 +25,11 @@ import {
EntityTableConfig,
GroupActionDescriptor,
HeaderActionDescriptor
} from '@shared/components/entity/entities-table-config.models';
} from '@home/models/entity/entities-table-config.models';
import {TranslateService} from '@ngx-translate/core';
import {DatePipe} from '@angular/common';
import {EntityType, entityTypeResources, entityTypeTranslations} from '@shared/models/entity-type.models';
import {EntityAction} from '@shared/components/entity/entity-component.models';
import {EntityAction} from '@home/models/entity/entity-component.models';
import {forkJoin, Observable, of} from 'rxjs';
import {select, Store} from '@ngrx/store';
import {selectAuthUser} from '@core/auth/auth.selectors';

View File

@ -17,7 +17,7 @@
import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {EntitiesTableComponent} from '@shared/components/entity/entities-table.component';
import {EntitiesTableComponent} from '../../components/entity/entities-table.component';
import {Authority} from '@shared/models/authority.enum';
import {RuleChainsTableConfigResolver} from '@modules/home/pages/rulechain/rulechains-table-config.resolver';

View File

@ -17,14 +17,14 @@
import {Component} from '@angular/core';
import {Store} from '@ngrx/store';
import {AppState} from '@core/core.state';
import {EntityComponent} from '@shared/components/entity/entity.component';
import {EntityComponent} from '../../components/entity/entity.component';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {EntityType} from '@shared/models/entity-type.models';
import {NULL_UUID} from '@shared/models/id/has-uuid';
import {ActionNotificationShow} from '@core/notification/notification.actions';
import {TranslateService} from '@ngx-translate/core';
import {AssetInfo} from '@app/shared/models/asset.models';
import {RuleChain} from "@shared/models/rule-chain.models";
import {RuleChain} from '@shared/models/rule-chain.models';
@Component({
selector: 'tb-rulechain',

View File

@ -19,6 +19,7 @@ import {CommonModule} from '@angular/common';
import {SharedModule} from '@shared/shared.module';
import {RuleChainComponent} from '@modules/home/pages/rulechain/rulechain.component';
import {RuleChainRoutingModule} from '@modules/home/pages/rulechain/rulechain-routing.module';
import {HomeComponentsModule} from '@modules/home/components/home-components.module';
@NgModule({
entryComponents: [
@ -30,6 +31,7 @@ import {RuleChainRoutingModule} from '@modules/home/pages/rulechain/rulechain-ro
imports: [
CommonModule,
SharedModule,
HomeComponentsModule,
RuleChainRoutingModule
]
})

View File

@ -22,11 +22,11 @@ import {
DateEntityTableColumn,
EntityTableColumn,
EntityTableConfig
} from '@shared/components/entity/entities-table-config.models';
} from '@home/models/entity/entities-table-config.models';
import {TranslateService} from '@ngx-translate/core';
import {DatePipe} from '@angular/common';
import {EntityType, entityTypeResources, entityTypeTranslations} from '@shared/models/entity-type.models';
import {EntityAction} from '@shared/components/entity/entity-component.models';
import {EntityAction} from '@home/models/entity/entity-component.models';
import {RuleChain} from '@shared/models/rule-chain.models';
import {RuleChainService} from '@core/http/rule-chain.service';
import {RuleChainComponent} from '@modules/home/pages/rulechain/rulechain.component';

View File

@ -17,7 +17,7 @@
import { Injectable, NgModule } from '@angular/core';
import { Resolve, RouterModule, Routes } from '@angular/router';
import { EntitiesTableComponent } from '@shared/components/entity/entities-table.component';
import { EntitiesTableComponent } from '../../components/entity/entities-table.component';
import { Authority } from '@shared/models/authority.enum';
import { TenantsTableConfigResolver } from '@modules/home/pages/tenant/tenants-table-config.resolver';
import { ProfileComponent } from '@modules/home/pages/profile/profile.component';

View File

@ -19,10 +19,10 @@ import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Customer } from '@shared/models/customer.model';
import { ContactBasedComponent } from '@shared/components/entity/contact-based.component';
import {Tenant} from '@app/shared/models/tenant.model';
import {ActionNotificationShow} from '@app/core/notification/notification.actions';
import {TranslateService} from '@ngx-translate/core';
import {ContactBasedComponent} from '../../components/entity/contact-based.component';
@Component({
selector: 'tb-tenant',

View File

@ -19,6 +19,7 @@ import { CommonModule } from '@angular/common';
import { SharedModule } from '@shared/shared.module';
import {TenantComponent} from '@modules/home/pages/tenant/tenant.component';
import {TenantRoutingModule} from '@modules/home/pages/tenant/tenant-routing.module';
import {HomeComponentsModule} from '@modules/home/components/home-components.module';
@NgModule({
entryComponents: [
@ -30,6 +31,7 @@ import {TenantRoutingModule} from '@modules/home/pages/tenant/tenant-routing.mod
imports: [
CommonModule,
SharedModule,
HomeComponentsModule,
TenantRoutingModule
]
})

View File

@ -23,7 +23,7 @@ import {
DateEntityTableColumn,
EntityTableColumn,
EntityTableConfig
} from '@shared/components/entity/entities-table-config.models';
} from '@home/models/entity/entities-table-config.models';
import { TenantService } from '@core/http/tenant.service';
import { TranslateService } from '@ngx-translate/core';
import { DatePipe } from '@angular/common';
@ -33,7 +33,7 @@ import {
entityTypeTranslations
} from '@shared/models/entity-type.models';
import { TenantComponent } from '@modules/home/pages/tenant/tenant.component';
import { EntityAction } from '@shared/components/entity/entity-component.models';
import { EntityAction } from '@home/models/entity/entity-component.models';
import { User } from '@shared/models/user.model';
@Injectable()

View File

@ -17,7 +17,7 @@
import { Component, OnInit } from '@angular/core';
import { select, Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { EntityComponent } from '@shared/components/entity/entity.component';
import { EntityComponent } from '../../components/entity/entity.component';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { User } from '@shared/models/user.model';
import { selectAuth, selectUserDetails } from '@core/auth/auth.selectors';

View File

@ -21,6 +21,7 @@ import { UserComponent } from '@modules/home/pages/user/user.component';
import { UserRoutingModule } from '@modules/home/pages/user/user-routing.module';
import { AddUserDialogComponent } from '@modules/home/pages/user/add-user-dialog.component';
import { ActivationLinkDialogComponent } from '@modules/home/pages/user/activation-link-dialog.component';
import {HomeComponentsModule} from '@modules/home/components/home-components.module';
@NgModule({
entryComponents: [
@ -36,6 +37,7 @@ import { ActivationLinkDialogComponent } from '@modules/home/pages/user/activati
imports: [
CommonModule,
SharedModule,
HomeComponentsModule,
UserRoutingModule
]
})

View File

@ -21,7 +21,7 @@ import {
DateEntityTableColumn,
EntityTableColumn,
EntityTableConfig
} from '@shared/components/entity/entities-table-config.models';
} from '@home/models/entity/entities-table-config.models';
import { TranslateService } from '@ngx-translate/core';
import { DatePipe } from '@angular/common';
import {
@ -38,7 +38,7 @@ import { forkJoin, noop, Observable, of } from 'rxjs';
import { Authority } from '@shared/models/authority.enum';
import { CustomerId } from '@shared/models/id/customer-id';
import { MatDialog } from '@angular/material';
import { EntityAction } from '@shared/components/entity/entity-component.models';
import { EntityAction } from '@home/models/entity/entity-component.models';
import {
AddUserDialogComponent,
AddUserDialogData

View File

@ -17,7 +17,7 @@
import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {EntitiesTableComponent} from '@shared/components/entity/entities-table.component';
import {EntitiesTableComponent} from '../../components/entity/entities-table.component';
import {Authority} from '@shared/models/authority.enum';
import {RuleChainsTableConfigResolver} from '@modules/home/pages/rulechain/rulechains-table-config.resolver';
import {WidgetsBundlesTableConfigResolver} from '@modules/home/pages/widget/widgets-bundles-table-config.resolver';

View File

@ -19,6 +19,7 @@ import {CommonModule} from '@angular/common';
import {SharedModule} from '@shared/shared.module';
import {WidgetsBundleComponent} from '@modules/home/pages/widget/widgets-bundle.component';
import {WidgetLibraryRoutingModule} from '@modules/home/pages/widget/widget-library-routing.module';
import {HomeComponentsModule} from '@modules/home/components/home-components.module';
@NgModule({
entryComponents: [
@ -30,6 +31,7 @@ import {WidgetLibraryRoutingModule} from '@modules/home/pages/widget/widget-libr
imports: [
CommonModule,
SharedModule,
HomeComponentsModule,
WidgetLibraryRoutingModule
]
})

View File

@ -17,7 +17,7 @@
import {Component} from '@angular/core';
import {Store} from '@ngrx/store';
import {AppState} from '@core/core.state';
import {EntityComponent} from '@shared/components/entity/entity.component';
import {EntityComponent} from '../../components/entity/entity.component';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {WidgetsBundle} from '@shared/models/widgets-bundle.model';

View File

@ -22,11 +22,11 @@ import {
DateEntityTableColumn,
EntityTableColumn,
EntityTableConfig
} from '@shared/components/entity/entities-table-config.models';
} from '@home/models/entity/entities-table-config.models';
import {TranslateService} from '@ngx-translate/core';
import {DatePipe} from '@angular/common';
import {EntityType, entityTypeResources, entityTypeTranslations} from '@shared/models/entity-type.models';
import {EntityAction} from '@shared/components/entity/entity-component.models';
import {EntityAction} from '@home/models/entity/entity-component.models';
import {WidgetsBundle} from '@shared/models/widgets-bundle.model';
import {WidgetService} from '@app/core/http/widget.service';
import {WidgetsBundleComponent} from '@modules/home/pages/widget/widgets-bundle.component';

View File

@ -17,11 +17,11 @@
import {AfterViewInit, Component, forwardRef, Input, OnInit} from '@angular/core';
import {ControlValueAccessor, FormBuilder, FormGroup, NG_VALUE_ACCESSOR} from '@angular/forms';
import {Store} from '@ngrx/store';
import {AppState} from '@app/core/core.state';
import {AppState} from '@core/core.state';
import {TranslateService} from '@ngx-translate/core';
import {AliasEntityType, EntityType, entityTypeTranslations} from '@app/shared/models/entity-type.models';
import {AliasEntityType, EntityType, entityTypeTranslations} from '@shared/models/entity-type.models';
import {EntityService} from '@core/http/entity.service';
import {EntityId} from '@app/shared/models/id/entity-id';
import {EntityId} from '@shared/models/id/entity-id';
import {coerceBooleanProperty} from '@angular/cdk/coercion';
@Component({
@ -58,9 +58,9 @@ export class EntitySelectComponent implements ControlValueAccessor, OnInit, Afte
@Input()
disabled: boolean;
private defaultEntityType: EntityType | AliasEntityType = null;
displayEntityTypeSelect: boolean;
private displayEntityTypeSelect: boolean;
private defaultEntityType: EntityType | AliasEntityType = null;
private propagateChange = (v: any) => { };

View File

@ -14,72 +14,67 @@
/// limitations under the License.
///
import { NgModule } from '@angular/core';
import { CommonModule, DatePipe } from '@angular/common';
import { FooterComponent } from './components/footer.component';
import { LogoComponent } from './components/logo.component';
import { ToastDirective, TbSnackBarComponent } from './components/toast.directive';
import { BreadcrumbComponent } from '@app/shared/components/breadcrumb.component';
import {NgModule} from '@angular/core';
import {CommonModule, DatePipe} from '@angular/common';
import {FooterComponent} from './components/footer.component';
import {LogoComponent} from './components/logo.component';
import {TbSnackBarComponent, ToastDirective} from './components/toast.directive';
import {BreadcrumbComponent} from '@app/shared/components/breadcrumb.component';
import {
MatButtonModule,
MatCheckboxModule,
MatIconModule,
MatCardModule,
MatProgressBarModule,
MatInputModule,
MatSnackBarModule,
MatSidenavModule,
MatToolbarModule,
MatMenuModule,
MatGridListModule,
MatDialogModule,
MatSelectModule,
MatTooltipModule,
MatTableModule,
MatPaginatorModule,
MatSortModule,
MatProgressSpinnerModule,
MatDividerModule,
MatTabsModule,
MatRadioModule,
MatSlideToggleModule,
MatDatepickerModule,
MatSliderModule,
MatExpansionModule,
MatStepperModule,
MatAutocompleteModule,
MatChipsModule
MatButtonModule,
MatCardModule,
MatCheckboxModule,
MatChipsModule,
MatDatepickerModule,
MatDialogModule,
MatDividerModule,
MatExpansionModule,
MatGridListModule,
MatIconModule,
MatInputModule,
MatMenuModule,
MatPaginatorModule,
MatProgressBarModule,
MatProgressSpinnerModule,
MatRadioModule,
MatSelectModule,
MatSidenavModule,
MatSliderModule,
MatSlideToggleModule,
MatSnackBarModule,
MatSortModule,
MatStepperModule,
MatTableModule,
MatTabsModule,
MatToolbarModule,
MatTooltipModule
} from '@angular/material';
import { MatDatetimepickerModule, MatNativeDatetimeModule } from '@mat-datetimepicker/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { ShareModule as ShareButtonsModule } from '@ngx-share/core';
import { UserMenuComponent } from '@shared/components/user-menu.component';
import { NospacePipe } from './pipe/nospace.pipe';
import { TranslateModule } from '@ngx-translate/core';
import { TbCheckboxComponent } from '@shared/components/tb-checkbox.component';
import { HelpComponent } from '@shared/components/help.component';
import { EntitiesTableComponent } from '@shared/components/entity/entities-table.component';
import { AddEntityDialogComponent } from '@shared/components/entity/add-entity-dialog.component';
import { DetailsPanelComponent } from '@shared/components/details-panel.component';
import { EntityDetailsPanelComponent } from '@shared/components/entity/entity-details-panel.component';
import { TbAnchorComponent } from '@shared/components/tb-anchor.component';
import { ContactComponent } from '@shared/components/contact.component';
import {MatDatetimepickerModule, MatNativeDatetimeModule} from '@mat-datetimepicker/core';
import {FlexLayoutModule} from '@angular/flex-layout';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {RouterModule} from '@angular/router';
import {ShareModule as ShareButtonsModule} from '@ngx-share/core';
import {UserMenuComponent} from '@shared/components/user-menu.component';
import {NospacePipe} from './pipe/nospace.pipe';
import {TranslateModule} from '@ngx-translate/core';
import {TbCheckboxComponent} from '@shared/components/tb-checkbox.component';
import {HelpComponent} from '@shared/components/help.component';
import {TbAnchorComponent} from '@shared/components/tb-anchor.component';
// import { AuditLogDetailsDialogComponent } from '@shared/components/audit-log/audit-log-details-dialog.component';
// import { AuditLogTableComponent } from '@shared/components/audit-log/audit-log-table.component';
import { MillisecondsToTimeStringPipe } from '@shared/pipe/milliseconds-to-time-string.pipe';
import { TimewindowComponent } from '@shared/components/time/timewindow.component';
import { OverlayModule } from '@angular/cdk/overlay';
import { TimewindowPanelComponent } from '@shared/components/time/timewindow-panel.component';
import { TimeintervalComponent } from '@shared/components/time/timeinterval.component';
import { DatetimePeriodComponent } from '@shared/components/time/datetime-period.component';
import { EnumToArrayPipe } from '@shared/pipe/enum-to-array.pipe';
import { ClipboardModule } from 'ngx-clipboard';
import {MillisecondsToTimeStringPipe} from '@shared/pipe/milliseconds-to-time-string.pipe';
import {TimewindowComponent} from '@shared/components/time/timewindow.component';
import {OverlayModule} from '@angular/cdk/overlay';
import {TimewindowPanelComponent} from '@shared/components/time/timewindow-panel.component';
import {TimeintervalComponent} from '@shared/components/time/timeinterval.component';
import {DatetimePeriodComponent} from '@shared/components/time/datetime-period.component';
import {EnumToArrayPipe} from '@shared/pipe/enum-to-array.pipe';
import {ClipboardModule} from 'ngx-clipboard';
// import { ValueInputComponent } from '@shared/components/value-input.component';
import { FullscreenDirective } from '@shared/components/fullscreen.directive';
import { HighlightPipe } from '@shared/pipe/highlight.pipe';
import {FullscreenDirective} from '@shared/components/fullscreen.directive';
import {HighlightPipe} from '@shared/pipe/highlight.pipe';
import {DashboardAutocompleteComponent} from '@shared/components/dashboard-autocomplete.component';
import {EntitySubTypeAutocompleteComponent} from '@shared/components/entity/entity-subtype-autocomplete.component';
import {EntitySubTypeSelectComponent} from './components/entity/entity-subtype-select.component';
@ -102,7 +97,6 @@ import {SocialSharePanelComponent} from './components/socialshare-panel.componen
entryComponents: [
TbSnackBarComponent,
TbAnchorComponent,
AddEntityDialogComponent,
// AuditLogDetailsDialogComponent,
TimewindowPanelComponent,
],
@ -117,11 +111,6 @@ import {SocialSharePanelComponent} from './components/socialshare-panel.componen
TbSnackBarComponent,
BreadcrumbComponent,
UserMenuComponent,
EntitiesTableComponent,
AddEntityDialogComponent,
DetailsPanelComponent,
EntityDetailsPanelComponent,
ContactComponent,
// AuditLogTableComponent,
// AuditLogDetailsDialogComponent,
TimewindowComponent,
@ -195,11 +184,6 @@ import {SocialSharePanelComponent} from './components/socialshare-panel.componen
TbCheckboxComponent,
BreadcrumbComponent,
UserMenuComponent,
EntitiesTableComponent,
AddEntityDialogComponent,
DetailsPanelComponent,
EntityDetailsPanelComponent,
ContactComponent,
// AuditLogTableComponent,
TimewindowComponent,
TimewindowPanelComponent,

View File

@ -21,7 +21,8 @@
],
"@core/*": ["src/app/core/*"],
"@modules/*": ["src/app/modules/*"],
"@shared/*": ["src/app/shared/*"]
"@shared/*": ["src/app/shared/*"],
"@home/*": ["src/app/modules/home/*"]
},
"lib": [
"es2018",