Commit e3e860fe3f67cc2a30b5ac01e772220854772587
Committed by
GitHub
1 parent
e175b571
[3.0] Improvement code style (#2670)
* Clear code and styles * Clear import
Showing
148 changed files
with
382 additions
and
547 deletions
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import { NgModule } from '@angular/core'; | 17 | import { NgModule } from '@angular/core'; |
18 | -import { Routes, RouterModule } from '@angular/router'; | 18 | +import { RouterModule, Routes } from '@angular/router'; |
19 | 19 | ||
20 | const routes: Routes = [ | 20 | const routes: Routes = [ |
21 | { path: '', | 21 | { path: '', |
@@ -14,11 +14,11 @@ | @@ -14,11 +14,11 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { SubscriptionData, SubscriptionUpdateMsg, SubscriptionDataHolder } from '@app/shared/models/telemetry/telemetry.models'; | 17 | +import { SubscriptionData, SubscriptionDataHolder } from '@app/shared/models/telemetry/telemetry.models'; |
18 | import { AggregationType } from '@shared/models/time/time.models'; | 18 | import { AggregationType } from '@shared/models/time/time.models'; |
19 | import { UtilsService } from '@core/services/utils.service'; | 19 | import { UtilsService } from '@core/services/utils.service'; |
20 | -import Timeout = NodeJS.Timeout; | ||
21 | import { deepClone } from '@core/utils'; | 20 | import { deepClone } from '@core/utils'; |
21 | +import Timeout = NodeJS.Timeout; | ||
22 | 22 | ||
23 | export declare type onAggregatedData = (data: SubscriptionData, detectChanges: boolean) => void; | 23 | export declare type onAggregatedData = (data: SubscriptionData, detectChanges: boolean) => void; |
24 | 24 |
@@ -28,7 +28,7 @@ import { | @@ -28,7 +28,7 @@ import { | ||
28 | } from '@shared/models/telemetry/telemetry.models'; | 28 | } from '@shared/models/telemetry/telemetry.models'; |
29 | import { DatasourceListener } from './datasource.service'; | 29 | import { DatasourceListener } from './datasource.service'; |
30 | import { AggregationType, SubscriptionTimewindow, YEAR } from '@shared/models/time/time.models'; | 30 | import { AggregationType, SubscriptionTimewindow, YEAR } from '@shared/models/time/time.models'; |
31 | -import { deepClone, isDefined, isObject, isDefinedAndNotNull } from '@core/utils'; | 31 | +import { deepClone, isDefinedAndNotNull, isObject } from '@core/utils'; |
32 | import { UtilsService } from '@core/services/utils.service'; | 32 | import { UtilsService } from '@core/services/utils.service'; |
33 | import { EntityType } from '@shared/models/entity-type.models'; | 33 | import { EntityType } from '@shared/models/entity-type.models'; |
34 | import { DataAggregator } from '@core/api/data-aggregator'; | 34 | import { DataAggregator } from '@core/api/data-aggregator'; |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Observable, Subject } from 'rxjs'; | 17 | +import { Observable } from 'rxjs'; |
18 | import { EntityId } from '@app/shared/models/id/entity-id'; | 18 | import { EntityId } from '@app/shared/models/id/entity-id'; |
19 | import { | 19 | import { |
20 | DataSet, | 20 | DataSet, |
@@ -28,7 +28,8 @@ import { | @@ -28,7 +28,8 @@ import { | ||
28 | MissingTranslationHandler, | 28 | MissingTranslationHandler, |
29 | TranslateCompiler, | 29 | TranslateCompiler, |
30 | TranslateLoader, | 30 | TranslateLoader, |
31 | - TranslateModule, TranslateParser | 31 | + TranslateModule, |
32 | + TranslateParser | ||
32 | } from '@ngx-translate/core'; | 33 | } from '@ngx-translate/core'; |
33 | import { TranslateHttpLoader } from '@ngx-translate/http-loader'; | 34 | import { TranslateHttpLoader } from '@ngx-translate/http-loader'; |
34 | import { TbMissingTranslationHandler } from './translate/missing-translate-handler'; | 35 | import { TbMissingTranslationHandler } from './translate/missing-translate-handler'; |
@@ -14,13 +14,10 @@ | @@ -14,13 +14,10 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { | ||
18 | - ActionReducerMap, | ||
19 | - MetaReducer, Store | ||
20 | -} from '@ngrx/store'; | 17 | +import { ActionReducerMap, MetaReducer } from '@ngrx/store'; |
21 | import { storeFreeze } from 'ngrx-store-freeze'; | 18 | import { storeFreeze } from 'ngrx-store-freeze'; |
22 | 19 | ||
23 | -import { environment as env} from '@env/environment'; | 20 | +import { environment as env } from '@env/environment'; |
24 | 21 | ||
25 | import { initStateFromLocalStorage } from './meta-reducers/init-state-from-local-storage.reducer'; | 22 | import { initStateFromLocalStorage } from './meta-reducers/init-state-from-local-storage.reducer'; |
26 | import { debug } from './meta-reducers/debug.reducer'; | 23 | import { debug } from './meta-reducers/debug.reducer'; |
@@ -35,7 +32,6 @@ import { SettingsEffects } from '@app/core/settings/settings.effects'; | @@ -35,7 +32,6 @@ import { SettingsEffects } from '@app/core/settings/settings.effects'; | ||
35 | import { NotificationState } from '@app/core/notification/notification.models'; | 32 | import { NotificationState } from '@app/core/notification/notification.models'; |
36 | import { notificationReducer } from '@app/core/notification/notification.reducer'; | 33 | import { notificationReducer } from '@app/core/notification/notification.reducer'; |
37 | import { NotificationEffects } from '@app/core/notification/notification.effects'; | 34 | import { NotificationEffects } from '@app/core/notification/notification.effects'; |
38 | -import { take } from 'rxjs/operators'; | ||
39 | 35 | ||
40 | export const reducers: ActionReducerMap<AppState> = { | 36 | export const reducers: ActionReducerMap<AppState> = { |
41 | load: loadReducer, | 37 | load: loadReducer, |
@@ -15,12 +15,7 @@ | @@ -15,12 +15,7 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import { Injectable, NgZone } from '@angular/core'; | 17 | import { Injectable, NgZone } from '@angular/core'; |
18 | -import { | ||
19 | - ActivatedRouteSnapshot, | ||
20 | - CanActivate, | ||
21 | - CanActivateChild, | ||
22 | - RouterStateSnapshot | ||
23 | -} from '@angular/router'; | 18 | +import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, RouterStateSnapshot } from '@angular/router'; |
24 | import { AuthService } from '../auth/auth.service'; | 19 | import { AuthService } from '../auth/auth.service'; |
25 | import { select, Store } from '@ngrx/store'; | 20 | import { select, Store } from '@ngrx/store'; |
26 | import { AppState } from '../core.state'; | 21 | import { AppState } from '../core.state'; |
@@ -15,11 +15,7 @@ | @@ -15,11 +15,7 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import { Injectable } from '@angular/core'; | 17 | import { Injectable } from '@angular/core'; |
18 | -import { | ||
19 | - ActivatedRouteSnapshot, | ||
20 | - CanDeactivate, | ||
21 | - RouterStateSnapshot | ||
22 | -} from '@angular/router'; | 18 | +import { ActivatedRouteSnapshot, CanDeactivate, RouterStateSnapshot } from '@angular/router'; |
23 | import { FormGroup } from '@angular/forms'; | 19 | import { FormGroup } from '@angular/forms'; |
24 | import { select, Store } from '@ngrx/store'; | 20 | import { select, Store } from '@ngrx/store'; |
25 | import { AppState } from '@core/core.state'; | 21 | import { AppState } from '@core/core.state'; |
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | 16 | ||
17 | import { Injectable } from '@angular/core'; | 17 | import { Injectable } from '@angular/core'; |
18 | import { defaultHttpOptionsFromConfig, RequestConfig } from './http-utils'; | 18 | import { defaultHttpOptionsFromConfig, RequestConfig } from './http-utils'; |
19 | -import { Observable } from 'rxjs'; | 19 | +import { EMPTY, Observable } from 'rxjs'; |
20 | import { HttpClient } from '@angular/common/http'; | 20 | import { HttpClient } from '@angular/common/http'; |
21 | import { PageData } from '@shared/models/page/page-data'; | 21 | import { PageData } from '@shared/models/page/page-data'; |
22 | import { EntityId } from '@shared/models/id/entity-id'; | 22 | import { EntityId } from '@shared/models/id/entity-id'; |
@@ -36,9 +36,8 @@ import { UtilsService } from '@core/services/utils.service'; | @@ -36,9 +36,8 @@ import { UtilsService } from '@core/services/utils.service'; | ||
36 | import { TimePageLink } from '@shared/models/page/page-link'; | 36 | import { TimePageLink } from '@shared/models/page/page-link'; |
37 | import { Direction, SortOrder } from '@shared/models/page/sort-order'; | 37 | import { Direction, SortOrder } from '@shared/models/page/sort-order'; |
38 | import { concatMap, expand, map, toArray } from 'rxjs/operators'; | 38 | import { concatMap, expand, map, toArray } from 'rxjs/operators'; |
39 | -import { EMPTY } from 'rxjs'; | ||
40 | -import Timeout = NodeJS.Timeout; | ||
41 | import { isDefined } from '@core/utils'; | 39 | import { isDefined } from '@core/utils'; |
40 | +import Timeout = NodeJS.Timeout; | ||
42 | 41 | ||
43 | interface AlarmSourceListenerQuery { | 42 | interface AlarmSourceListenerQuery { |
44 | entityType: EntityType; | 43 | entityType: EntityType; |
@@ -19,8 +19,7 @@ import { HttpClient } from '@angular/common/http'; | @@ -19,8 +19,7 @@ import { HttpClient } from '@angular/common/http'; | ||
19 | import { ComponentDescriptor, ComponentType } from '@shared/models/component-descriptor.models'; | 19 | import { ComponentDescriptor, ComponentType } from '@shared/models/component-descriptor.models'; |
20 | import { defaultHttpOptionsFromConfig, RequestConfig } from '@core/http/http-utils'; | 20 | import { defaultHttpOptionsFromConfig, RequestConfig } from '@core/http/http-utils'; |
21 | import { Observable, of } from 'rxjs'; | 21 | import { Observable, of } from 'rxjs'; |
22 | -import { RuleChainMetaData } from '@shared/models/rule-chain.models'; | ||
23 | -import { tap, map } from 'rxjs/operators'; | 22 | +import { map } from 'rxjs/operators'; |
24 | import { RuleNodeType } from '@shared/models/rule-node.models'; | 23 | import { RuleNodeType } from '@shared/models/rule-node.models'; |
25 | 24 | ||
26 | @Injectable({ | 25 | @Injectable({ |
@@ -21,7 +21,8 @@ import { HttpClient } from '@angular/common/http'; | @@ -21,7 +21,8 @@ import { HttpClient } from '@angular/common/http'; | ||
21 | import { PageLink } from '@shared/models/page/page-link'; | 21 | import { PageLink } from '@shared/models/page/page-link'; |
22 | import { PageData } from '@shared/models/page/page-data'; | 22 | import { PageData } from '@shared/models/page/page-data'; |
23 | import { | 23 | import { |
24 | - ClaimRequest, ClaimResult, | 24 | + ClaimRequest, |
25 | + ClaimResult, | ||
25 | Device, | 26 | Device, |
26 | DeviceCredentials, | 27 | DeviceCredentials, |
27 | DeviceInfo, | 28 | DeviceInfo, |
@@ -642,7 +642,6 @@ export class EntityService { | @@ -642,7 +642,6 @@ export class EntityService { | ||
642 | return result; | 642 | return result; |
643 | } | 643 | } |
644 | )); | 644 | )); |
645 | - break; | ||
646 | case AliasFilterType.entityList: | 645 | case AliasFilterType.entityList: |
647 | return this.getEntities(filter.entityType, filter.entityList, {ignoreLoading: true, ignoreErrors: true}).pipe( | 646 | return this.getEntities(filter.entityType, filter.entityList, {ignoreLoading: true, ignoreErrors: true}).pipe( |
648 | map((entities) => { | 647 | map((entities) => { |
@@ -654,7 +653,6 @@ export class EntityService { | @@ -654,7 +653,6 @@ export class EntityService { | ||
654 | } | 653 | } |
655 | } | 654 | } |
656 | )); | 655 | )); |
657 | - break; | ||
658 | case AliasFilterType.entityName: | 656 | case AliasFilterType.entityName: |
659 | return this.getEntitiesByNameFilter(filter.entityType, filter.entityNameFilter, maxItems, | 657 | return this.getEntitiesByNameFilter(filter.entityType, filter.entityNameFilter, maxItems, |
660 | '', {ignoreLoading: true, ignoreErrors: true}).pipe( | 658 | '', {ignoreLoading: true, ignoreErrors: true}).pipe( |
@@ -668,7 +666,6 @@ export class EntityService { | @@ -668,7 +666,6 @@ export class EntityService { | ||
668 | } | 666 | } |
669 | ) | 667 | ) |
670 | ); | 668 | ); |
671 | - break; | ||
672 | case AliasFilterType.stateEntity: | 669 | case AliasFilterType.stateEntity: |
673 | result.stateEntity = true; | 670 | result.stateEntity = true; |
674 | if (stateEntityId) { | 671 | if (stateEntityId) { |
@@ -681,7 +678,6 @@ export class EntityService { | @@ -681,7 +678,6 @@ export class EntityService { | ||
681 | } else { | 678 | } else { |
682 | return of(result); | 679 | return of(result); |
683 | } | 680 | } |
684 | - break; | ||
685 | case AliasFilterType.assetType: | 681 | case AliasFilterType.assetType: |
686 | return this.getEntitiesByNameFilter(EntityType.ASSET, filter.assetNameFilter, maxItems, | 682 | return this.getEntitiesByNameFilter(EntityType.ASSET, filter.assetNameFilter, maxItems, |
687 | filter.assetType, {ignoreLoading: true, ignoreErrors: true}).pipe( | 683 | filter.assetType, {ignoreLoading: true, ignoreErrors: true}).pipe( |
@@ -695,7 +691,6 @@ export class EntityService { | @@ -695,7 +691,6 @@ export class EntityService { | ||
695 | } | 691 | } |
696 | ) | 692 | ) |
697 | ); | 693 | ); |
698 | - break; | ||
699 | case AliasFilterType.deviceType: | 694 | case AliasFilterType.deviceType: |
700 | return this.getEntitiesByNameFilter(EntityType.DEVICE, filter.deviceNameFilter, maxItems, | 695 | return this.getEntitiesByNameFilter(EntityType.DEVICE, filter.deviceNameFilter, maxItems, |
701 | filter.deviceType, {ignoreLoading: true, ignoreErrors: true}).pipe( | 696 | filter.deviceType, {ignoreLoading: true, ignoreErrors: true}).pipe( |
@@ -709,7 +704,6 @@ export class EntityService { | @@ -709,7 +704,6 @@ export class EntityService { | ||
709 | } | 704 | } |
710 | ) | 705 | ) |
711 | ); | 706 | ); |
712 | - break; | ||
713 | case AliasFilterType.entityViewType: | 707 | case AliasFilterType.entityViewType: |
714 | return this.getEntitiesByNameFilter(EntityType.ENTITY_VIEW, filter.entityViewNameFilter, maxItems, | 708 | return this.getEntitiesByNameFilter(EntityType.ENTITY_VIEW, filter.entityViewNameFilter, maxItems, |
715 | filter.entityViewType, {ignoreLoading: true, ignoreErrors: true}).pipe( | 709 | filter.entityViewType, {ignoreLoading: true, ignoreErrors: true}).pipe( |
@@ -723,7 +717,6 @@ export class EntityService { | @@ -723,7 +717,6 @@ export class EntityService { | ||
723 | } | 717 | } |
724 | ) | 718 | ) |
725 | ); | 719 | ); |
726 | - break; | ||
727 | case AliasFilterType.relationsQuery: | 720 | case AliasFilterType.relationsQuery: |
728 | result.stateEntity = filter.rootStateEntity; | 721 | result.stateEntity = filter.rootStateEntity; |
729 | let rootEntityType; | 722 | let rootEntityType; |
@@ -768,7 +761,6 @@ export class EntityService { | @@ -768,7 +761,6 @@ export class EntityService { | ||
768 | } else { | 761 | } else { |
769 | return of(result); | 762 | return of(result); |
770 | } | 763 | } |
771 | - break; | ||
772 | case AliasFilterType.assetSearchQuery: | 764 | case AliasFilterType.assetSearchQuery: |
773 | case AliasFilterType.deviceSearchQuery: | 765 | case AliasFilterType.deviceSearchQuery: |
774 | case AliasFilterType.entityViewSearchQuery: | 766 | case AliasFilterType.entityViewSearchQuery: |
@@ -823,7 +815,6 @@ export class EntityService { | @@ -823,7 +815,6 @@ export class EntityService { | ||
823 | } else { | 815 | } else { |
824 | return of(result); | 816 | return of(result); |
825 | } | 817 | } |
826 | - break; | ||
827 | } | 818 | } |
828 | } | 819 | } |
829 | 820 |
@@ -18,9 +18,7 @@ import { createFeatureSelector, createSelector, select, Store } from '@ngrx/stor | @@ -18,9 +18,7 @@ import { createFeatureSelector, createSelector, select, Store } from '@ngrx/stor | ||
18 | 18 | ||
19 | import { AppState } from '../core.state'; | 19 | import { AppState } from '../core.state'; |
20 | import { LoadState } from './load.models'; | 20 | import { LoadState } from './load.models'; |
21 | -import { AuthUser } from '@shared/models/user.model'; | ||
22 | import { take } from 'rxjs/operators'; | 21 | import { take } from 'rxjs/operators'; |
23 | -import { selectAuthUser } from '@core/auth/auth.selectors'; | ||
24 | 22 | ||
25 | export const selectLoadState = createFeatureSelector<AppState, LoadState>( | 23 | export const selectLoadState = createFeatureSelector<AppState, LoadState>( |
26 | 'load' | 24 | 'load' |
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import { Action } from '@ngrx/store'; | 17 | import { Action } from '@ngrx/store'; |
18 | -import { NotificationMessage, HideNotification } from '@app/core/notification/notification.models'; | 18 | +import { HideNotification, NotificationMessage } from '@app/core/notification/notification.models'; |
19 | 19 | ||
20 | export enum NotificationActionTypes { | 20 | export enum NotificationActionTypes { |
21 | SHOW_NOTIFICATION = '[Notification] Show', | 21 | SHOW_NOTIFICATION = '[Notification] Show', |
@@ -16,14 +16,9 @@ | @@ -16,14 +16,9 @@ | ||
16 | 16 | ||
17 | import { Injectable } from '@angular/core'; | 17 | import { Injectable } from '@angular/core'; |
18 | import { Actions, Effect, ofType } from '@ngrx/effects'; | 18 | import { Actions, Effect, ofType } from '@ngrx/effects'; |
19 | -import { | ||
20 | - map, | ||
21 | -} from 'rxjs/operators'; | 19 | +import { map } from 'rxjs/operators'; |
22 | 20 | ||
23 | -import { | ||
24 | - NotificationActions, | ||
25 | - NotificationActionTypes | ||
26 | -} from '@app/core/notification/notification.actions'; | 21 | +import { NotificationActions, NotificationActionTypes } from '@app/core/notification/notification.actions'; |
27 | import { NotificationService } from '@app/core/services/notification.service'; | 22 | import { NotificationService } from '@app/core/services/notification.service'; |
28 | 23 | ||
29 | @Injectable() | 24 | @Injectable() |
@@ -14,11 +14,10 @@ | @@ -14,11 +14,10 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {Injectable} from '@angular/core'; | ||
18 | -import {Subject, Subscription} from 'rxjs'; | ||
19 | -import {NotificationMessage} from '@core/notification/notification.models'; | ||
20 | -import {BroadcastEvent, BroadcastListener, BroadcastMessage} from '@core/services/broadcast.models'; | ||
21 | -import {filter} from 'rxjs/operators'; | 17 | +import { Injectable } from '@angular/core'; |
18 | +import { Subject, Subscription } from 'rxjs'; | ||
19 | +import { BroadcastEvent, BroadcastListener, BroadcastMessage } from '@core/services/broadcast.models'; | ||
20 | +import { filter } from 'rxjs/operators'; | ||
22 | 21 | ||
23 | @Injectable({ | 22 | @Injectable({ |
24 | providedIn: 'root' | 23 | providedIn: 'root' |
@@ -331,7 +331,6 @@ export class DashboardUtilsService { | @@ -331,7 +331,6 @@ export class DashboardUtilsService { | ||
331 | const states = dashboardConfiguration.states; | 331 | const states = dashboardConfiguration.states; |
332 | const state = states[targetState]; | 332 | const state = states[targetState]; |
333 | if (state) { | 333 | if (state) { |
334 | - const allWidgets = dashboardConfiguration.widgets; | ||
335 | const result: DashboardLayoutsInfo = {}; | 334 | const result: DashboardLayoutsInfo = {}; |
336 | for (const l of Object.keys(state.layouts)) { | 335 | for (const l of Object.keys(state.layouts)) { |
337 | const layout: DashboardLayout = state.layouts[l]; | 336 | const layout: DashboardLayout = state.layouts[l]; |
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | 16 | ||
17 | import { Injectable } from '@angular/core'; | 17 | import { Injectable } from '@angular/core'; |
18 | import { Dashboard, DashboardLayoutId } from '@app/shared/models/dashboard.models'; | 18 | import { Dashboard, DashboardLayoutId } from '@app/shared/models/dashboard.models'; |
19 | -import { EntityAlias, EntityAliasFilter, EntityAliases, EntityAliasInfo, AliasesInfo } from '@shared/models/alias.models'; | 19 | +import { AliasesInfo, EntityAlias, EntityAliases, EntityAliasInfo } from '@shared/models/alias.models'; |
20 | import { DatasourceType, Widget, WidgetPosition, WidgetSize } from '@shared/models/widget.models'; | 20 | import { DatasourceType, Widget, WidgetPosition, WidgetSize } from '@shared/models/widget.models'; |
21 | import { DashboardUtilsService } from '@core/services/dashboard-utils.service'; | 21 | import { DashboardUtilsService } from '@core/services/dashboard-utils.service'; |
22 | import { deepClone, isEqual } from '@core/utils'; | 22 | import { deepClone, isEqual } from '@core/utils'; |
@@ -23,7 +23,7 @@ import { take } from 'rxjs/operators'; | @@ -23,7 +23,7 @@ import { take } from 'rxjs/operators'; | ||
23 | import { HomeSection, MenuSection } from '@core/services/menu.models'; | 23 | import { HomeSection, MenuSection } from '@core/services/menu.models'; |
24 | import { BehaviorSubject, Observable, Subject } from 'rxjs'; | 24 | import { BehaviorSubject, Observable, Subject } from 'rxjs'; |
25 | import { Authority } from '@shared/models/authority.enum'; | 25 | import { Authority } from '@shared/models/authority.enum'; |
26 | -import {AuthUser} from '@shared/models/user.model'; | 26 | +import { AuthUser } from '@shared/models/user.model'; |
27 | 27 | ||
28 | @Injectable({ | 28 | @Injectable({ |
29 | providedIn: 'root' | 29 | providedIn: 'root' |
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | 16 | ||
17 | import { Injectable } from '@angular/core'; | 17 | import { Injectable } from '@angular/core'; |
18 | import { HideNotification, NotificationMessage } from '@app/core/notification/notification.models'; | 18 | import { HideNotification, NotificationMessage } from '@app/core/notification/notification.models'; |
19 | -import { BehaviorSubject, Observable, Subject } from 'rxjs'; | 19 | +import { Observable, Subject } from 'rxjs'; |
20 | 20 | ||
21 | 21 | ||
22 | @Injectable( | 22 | @Injectable( |
@@ -15,7 +15,6 @@ | @@ -15,7 +15,6 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import { Inject, Injectable, NgZone } from '@angular/core'; | 17 | import { Inject, Injectable, NgZone } from '@angular/core'; |
18 | -import { HttpClient } from '@angular/common/http'; | ||
19 | import { WINDOW } from '@core/services/window.service'; | 18 | import { WINDOW } from '@core/services/window.service'; |
20 | 19 | ||
21 | export type CancelAnimationFrame = () => void; | 20 | export type CancelAnimationFrame = () => void; |
@@ -15,11 +15,14 @@ | @@ -15,11 +15,14 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import { Injectable } from '@angular/core'; | 17 | import { Injectable } from '@angular/core'; |
18 | -import { Observable, of } from 'rxjs'; | 18 | +import { Observable } from 'rxjs'; |
19 | import { RuleChainService } from '@core/http/rule-chain.service'; | 19 | import { RuleChainService } from '@core/http/rule-chain.service'; |
20 | -import { map, switchMap } from 'rxjs/operators'; | 20 | +import { switchMap } from 'rxjs/operators'; |
21 | import { MatDialog } from '@angular/material/dialog'; | 21 | import { MatDialog } from '@angular/material/dialog'; |
22 | -import { NodeScriptTestDialogComponent, NodeScriptTestDialogData } from '@shared/components/dialog/node-script-test-dialog.component'; | 22 | +import { |
23 | + NodeScriptTestDialogComponent, | ||
24 | + NodeScriptTestDialogData | ||
25 | +} from '@shared/components/dialog/node-script-test-dialog.component'; | ||
23 | 26 | ||
24 | @Injectable({ | 27 | @Injectable({ |
25 | providedIn: 'root' | 28 | providedIn: 'root' |
@@ -15,7 +15,14 @@ | @@ -15,7 +15,14 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import { Injectable } from '@angular/core'; | 17 | import { Injectable } from '@angular/core'; |
18 | -import { AggregationType, DAY, defaultTimeIntervals, SECOND, Timewindow, defaultTimewindow } from '@shared/models/time/time.models'; | 18 | +import { |
19 | + AggregationType, | ||
20 | + DAY, | ||
21 | + defaultTimeIntervals, | ||
22 | + defaultTimewindow, | ||
23 | + SECOND, | ||
24 | + Timewindow | ||
25 | +} from '@shared/models/time/time.models'; | ||
19 | import { HttpClient } from '@angular/common/http'; | 26 | import { HttpClient } from '@angular/common/http'; |
20 | import { Observable } from 'rxjs'; | 27 | import { Observable } from 'rxjs'; |
21 | import { defaultHttpOptions } from '@core/http/http-utils'; | 28 | import { defaultHttpOptions } from '@core/http/http-utils'; |
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | 16 | ||
17 | 17 | ||
18 | import { isPlatformBrowser } from '@angular/common'; | 18 | import { isPlatformBrowser } from '@angular/common'; |
19 | -import { ClassProvider, FactoryProvider, InjectionToken, PLATFORM_ID, Injectable } from '@angular/core'; | 19 | +import { ClassProvider, FactoryProvider, Injectable, InjectionToken, PLATFORM_ID } from '@angular/core'; |
20 | 20 | ||
21 | /* Create a new injection token for injecting the window into a component. */ | 21 | /* Create a new injection token for injecting the window into a component. */ |
22 | export const WINDOW = new InjectionToken('WindowToken'); | 22 | export const WINDOW = new InjectionToken('WindowToken'); |
@@ -14,27 +14,16 @@ | @@ -14,27 +14,16 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { ActivationEnd, ActivationStart, Router } from '@angular/router'; | 17 | +import { ActivationEnd, Router } from '@angular/router'; |
18 | import { Injectable } from '@angular/core'; | 18 | import { Injectable } from '@angular/core'; |
19 | import { select, Store } from '@ngrx/store'; | 19 | import { select, Store } from '@ngrx/store'; |
20 | import { Actions, Effect, ofType } from '@ngrx/effects'; | 20 | import { Actions, Effect, ofType } from '@ngrx/effects'; |
21 | import { TranslateService } from '@ngx-translate/core'; | 21 | import { TranslateService } from '@ngx-translate/core'; |
22 | import { merge } from 'rxjs'; | 22 | import { merge } from 'rxjs'; |
23 | -import { | ||
24 | - tap, | ||
25 | - withLatestFrom, | ||
26 | - map, | ||
27 | - distinctUntilChanged, | ||
28 | - filter | ||
29 | -} from 'rxjs/operators'; | 23 | +import { distinctUntilChanged, filter, map, tap, withLatestFrom } from 'rxjs/operators'; |
30 | 24 | ||
31 | -import { | ||
32 | - SettingsActionTypes, | ||
33 | - SettingsActions, | ||
34 | -} from './settings.actions'; | ||
35 | -import { | ||
36 | - selectSettingsState | ||
37 | -} from './settings.selectors'; | 25 | +import { SettingsActions, SettingsActionTypes, } from './settings.actions'; |
26 | +import { selectSettingsState } from './settings.selectors'; | ||
38 | import { AppState } from '@app/core/core.state'; | 27 | import { AppState } from '@app/core/core.state'; |
39 | import { LocalStorageService } from '@app/core/local-storage/local-storage.service'; | 28 | import { LocalStorageService } from '@app/core/local-storage/local-storage.service'; |
40 | import { TitleService } from '@app/core/services/title.service'; | 29 | import { TitleService } from '@app/core/services/title.service'; |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {MissingTranslationHandler, MissingTranslationHandlerParams} from '@ngx-translate/core'; | 17 | +import { MissingTranslationHandler, MissingTranslationHandlerParams } from '@ngx-translate/core'; |
18 | import { customTranslationsPrefix } from '@app/shared/models/constants'; | 18 | import { customTranslationsPrefix } from '@app/shared/models/constants'; |
19 | 19 | ||
20 | export class TbMissingTranslationHandler implements MissingTranslationHandler { | 20 | export class TbMissingTranslationHandler implements MissingTranslationHandler { |
@@ -15,10 +15,12 @@ | @@ -15,10 +15,12 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import { | 17 | import { |
18 | - MESSAGE_FORMAT_CONFIG, MessageFormatConfig, | 18 | + MESSAGE_FORMAT_CONFIG, |
19 | + MessageFormatConfig, | ||
19 | TranslateMessageFormatCompiler | 20 | TranslateMessageFormatCompiler |
20 | } from 'ngx-translate-messageformat-compiler'; | 21 | } from 'ngx-translate-messageformat-compiler'; |
21 | import { Inject, Injectable, Optional } from '@angular/core'; | 22 | import { Inject, Injectable, Optional } from '@angular/core'; |
23 | + | ||
22 | const parse = require('messageformat-parser').parse; | 24 | const parse = require('messageformat-parser').parse; |
23 | 25 | ||
24 | @Injectable({ providedIn: 'root' }) | 26 | @Injectable({ providedIn: 'root' }) |
@@ -15,8 +15,8 @@ | @@ -15,8 +15,8 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import _ from 'lodash'; | 17 | import _ from 'lodash'; |
18 | -import { Observable, Subject, fromEvent, of } from 'rxjs'; | ||
19 | -import { finalize, share, map } from 'rxjs/operators'; | 18 | +import { fromEvent, Observable, of, Subject } from 'rxjs'; |
19 | +import { finalize, map, share } from 'rxjs/operators'; | ||
20 | import base64js from 'base64-js'; | 20 | import base64js from 'base64-js'; |
21 | 21 | ||
22 | export function onParentScrollOrWindowResize(el: Node): Observable<Event> { | 22 | export function onParentScrollOrWindowResize(el: Node): Observable<Event> { |
@@ -17,18 +17,12 @@ | @@ -17,18 +17,12 @@ | ||
17 | import { Injectable, NgModule } from '@angular/core'; | 17 | import { Injectable, NgModule } from '@angular/core'; |
18 | import { ActivatedRouteSnapshot, Resolve, RouterModule, Routes } from '@angular/router'; | 18 | import { ActivatedRouteSnapshot, Resolve, RouterModule, Routes } from '@angular/router'; |
19 | 19 | ||
20 | -import {Authority} from '@shared/models/authority.enum'; | 20 | +import { Authority } from '@shared/models/authority.enum'; |
21 | import { DashboardPageComponent } from '@home/pages/dashboard/dashboard-page.component'; | 21 | import { DashboardPageComponent } from '@home/pages/dashboard/dashboard-page.component'; |
22 | -import { BreadCrumbConfig, BreadCrumbLabelFunction } from '@shared/components/breadcrumb'; | ||
23 | -import { widgetTypesBreadcumbLabelFunction } from '@home/pages/widget/widget-library-routing.module'; | ||
24 | -import { WidgetsBundle } from '@shared/models/widgets-bundle.model'; | ||
25 | -import { WidgetService } from '@core/http/widget.service'; | ||
26 | -import { Observable } from 'rxjs'; | ||
27 | import { Dashboard } from '@app/shared/models/dashboard.models'; | 22 | import { Dashboard } from '@app/shared/models/dashboard.models'; |
28 | import { DashboardService } from '@core/http/dashboard.service'; | 23 | import { DashboardService } from '@core/http/dashboard.service'; |
29 | import { DashboardUtilsService } from '@core/services/dashboard-utils.service'; | 24 | import { DashboardUtilsService } from '@core/services/dashboard-utils.service'; |
30 | -import { map } from 'rxjs/operators'; | ||
31 | -import { dashboardBreadcumbLabelFunction, DashboardResolver } from '@app/modules/home/pages/dashboard/dashboard-routing.module'; | 25 | +import { DashboardResolver } from '@app/modules/home/pages/dashboard/dashboard-routing.module'; |
32 | import { UtilsService } from '@core/services/utils.service'; | 26 | import { UtilsService } from '@core/services/utils.service'; |
33 | import { Widget } from '@app/shared/models/widget.models'; | 27 | import { Widget } from '@app/shared/models/widget.models'; |
34 | 28 |
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import { NgModule } from '@angular/core'; | 17 | import { NgModule } from '@angular/core'; |
18 | -import { Routes, RouterModule } from '@angular/router'; | 18 | +import { RouterModule, Routes } from '@angular/router'; |
19 | 19 | ||
20 | import { AuthGuard } from '@core/guards/auth.guard'; | 20 | import { AuthGuard } from '@core/guards/auth.guard'; |
21 | import { StoreModule } from '@ngrx/store'; | 21 | import { StoreModule } from '@ngrx/store'; |
@@ -57,7 +57,7 @@ | @@ -57,7 +57,7 @@ | ||
57 | </div> | 57 | </div> |
58 | <div mat-dialog-actions fxLayoutAlign="end center"> | 58 | <div mat-dialog-actions fxLayoutAlign="end center"> |
59 | <mat-checkbox formControlName="openDashboard" | 59 | <mat-checkbox formControlName="openDashboard" |
60 | - style="margin-bottom: 0px; padding-right: 20px;"> | 60 | + style="margin-bottom: 0; padding-right: 20px;"> |
61 | {{ 'dashboard.open-dashboard' | translate }} | 61 | {{ 'dashboard.open-dashboard' | translate }} |
62 | </mat-checkbox> | 62 | </mat-checkbox> |
63 | <button mat-raised-button color="primary" | 63 | <button mat-raised-button color="primary" |
@@ -21,7 +21,7 @@ import { ContactBased } from '@shared/models/contact-based.model'; | @@ -21,7 +21,7 @@ import { ContactBased } from '@shared/models/contact-based.model'; | ||
21 | import { AfterViewInit } from '@angular/core'; | 21 | import { AfterViewInit } from '@angular/core'; |
22 | import { POSTAL_CODE_PATTERNS } from '@home/models/contact.models'; | 22 | import { POSTAL_CODE_PATTERNS } from '@home/models/contact.models'; |
23 | import { HasId } from '@shared/models/base-data'; | 23 | import { HasId } from '@shared/models/base-data'; |
24 | -import {EntityComponent} from './entity.component'; | 24 | +import { EntityComponent } from './entity.component'; |
25 | import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; | 25 | import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; |
26 | 26 | ||
27 | export abstract class ContactBasedComponent<T extends ContactBased<HasId>> extends EntityComponent<T> implements AfterViewInit { | 27 | export abstract class ContactBasedComponent<T extends ContactBased<HasId>> extends EntityComponent<T> implements AfterViewInit { |
@@ -16,12 +16,16 @@ | @@ -16,12 +16,16 @@ | ||
16 | 16 | ||
17 | import { | 17 | import { |
18 | AfterViewInit, | 18 | AfterViewInit, |
19 | - ChangeDetectionStrategy, ChangeDetectorRef, | 19 | + ChangeDetectionStrategy, |
20 | + ChangeDetectorRef, | ||
20 | Component, | 21 | Component, |
21 | ComponentFactoryResolver, | 22 | ComponentFactoryResolver, |
22 | - ElementRef, EventEmitter, | ||
23 | - Input, OnChanges, | ||
24 | - OnInit, SimpleChanges, | 23 | + ElementRef, |
24 | + EventEmitter, | ||
25 | + Input, | ||
26 | + OnChanges, | ||
27 | + OnInit, | ||
28 | + SimpleChanges, | ||
25 | ViewChild | 29 | ViewChild |
26 | } from '@angular/core'; | 30 | } from '@angular/core'; |
27 | import { PageComponent } from '@shared/components/page.component'; | 31 | import { PageComponent } from '@shared/components/page.component'; |
@@ -16,10 +16,13 @@ | @@ -16,10 +16,13 @@ | ||
16 | 16 | ||
17 | import { | 17 | import { |
18 | AfterViewInit, | 18 | AfterViewInit, |
19 | - ChangeDetectionStrategy, ChangeDetectorRef, | 19 | + ChangeDetectionStrategy, |
20 | + ChangeDetectorRef, | ||
20 | Component, | 21 | Component, |
21 | - ComponentFactoryResolver, ComponentRef, | ||
22 | - EventEmitter, Injector, | 22 | + ComponentFactoryResolver, |
23 | + ComponentRef, | ||
24 | + EventEmitter, | ||
25 | + Injector, | ||
23 | Input, | 26 | Input, |
24 | OnDestroy, | 27 | OnDestroy, |
25 | OnInit, | 28 | OnInit, |
@@ -106,7 +106,7 @@ | @@ -106,7 +106,7 @@ | ||
106 | <ng-template [ngSwitchCase]="aliasFilterType.relationsQuery"> | 106 | <ng-template [ngSwitchCase]="aliasFilterType.relationsQuery"> |
107 | <section fxLayout="column" id="relationsQueryFilter"> | 107 | <section fxLayout="column" id="relationsQueryFilter"> |
108 | <label class="tb-small">{{ 'alias.root-entity' | translate }}</label> | 108 | <label class="tb-small">{{ 'alias.root-entity' | translate }}</label> |
109 | - <section class="tb-root-state-entity-switch" fxLayout="row" fxLayoutAlign="start center" style="padding-left: 0px;"> | 109 | + <section class="tb-root-state-entity-switch" fxLayout="row" fxLayoutAlign="start center" style="padding-left: 0;"> |
110 | <mat-slide-toggle class="root-state-entity-switch" | 110 | <mat-slide-toggle class="root-state-entity-switch" |
111 | formControlName="rootStateEntity"> | 111 | formControlName="rootStateEntity"> |
112 | </mat-slide-toggle> | 112 | </mat-slide-toggle> |
@@ -134,7 +134,7 @@ | @@ -134,7 +134,7 @@ | ||
134 | </div> | 134 | </div> |
135 | </div> | 135 | </div> |
136 | <div fxFlex fxLayout="row"> | 136 | <div fxFlex fxLayout="row"> |
137 | - <section class="tb-root-state-entity-switch" fxLayout="row" fxLayoutAlign="start center" style="padding-left: 0px;"> | 137 | + <section class="tb-root-state-entity-switch" fxLayout="row" fxLayoutAlign="start center" style="padding-left: 0;"> |
138 | <mat-slide-toggle class="root-state-entity-switch" | 138 | <mat-slide-toggle class="root-state-entity-switch" |
139 | formControlName="fetchLastLevelOnly"> | 139 | formControlName="fetchLastLevelOnly"> |
140 | </mat-slide-toggle> | 140 | </mat-slide-toggle> |
@@ -16,13 +16,14 @@ | @@ -16,13 +16,14 @@ | ||
16 | 16 | ||
17 | import { BaseData, HasId } from '@shared/models/base-data'; | 17 | import { BaseData, HasId } from '@shared/models/base-data'; |
18 | import { PageComponent } from '@shared/components/page.component'; | 18 | import { PageComponent } from '@shared/components/page.component'; |
19 | -import { Input, OnInit, Directive } from '@angular/core'; | 19 | +import { Directive, Input, OnInit } from '@angular/core'; |
20 | import { Store } from '@ngrx/store'; | 20 | import { Store } from '@ngrx/store'; |
21 | import { AppState } from '@core/core.state'; | 21 | import { AppState } from '@core/core.state'; |
22 | import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; | 22 | import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; |
23 | import { PageLink } from '@shared/models/page/page-link'; | 23 | import { PageLink } from '@shared/models/page/page-link'; |
24 | 24 | ||
25 | @Directive() | 25 | @Directive() |
26 | +// tslint:disable-next-line:directive-class-suffix | ||
26 | export abstract class EntityTableHeaderComponent<T extends BaseData<HasId>, | 27 | export abstract class EntityTableHeaderComponent<T extends BaseData<HasId>, |
27 | P extends PageLink = PageLink, | 28 | P extends PageLink = PageLink, |
28 | L extends BaseData<HasId> = T, | 29 | L extends BaseData<HasId> = T, |
@@ -16,15 +16,14 @@ | @@ -16,15 +16,14 @@ | ||
16 | 16 | ||
17 | import { BaseData, HasId } from '@shared/models/base-data'; | 17 | import { BaseData, HasId } from '@shared/models/base-data'; |
18 | import { PageComponent } from '@shared/components/page.component'; | 18 | import { PageComponent } from '@shared/components/page.component'; |
19 | -import { AfterViewInit, ContentChildren, EventEmitter, Input, OnInit, Output, QueryList, ViewChildren, Directive } from '@angular/core'; | 19 | +import { AfterViewInit, Directive, Input, OnInit, QueryList, ViewChildren } from '@angular/core'; |
20 | import { Store } from '@ngrx/store'; | 20 | import { Store } from '@ngrx/store'; |
21 | import { AppState } from '@core/core.state'; | 21 | import { AppState } from '@core/core.state'; |
22 | import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; | 22 | import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; |
23 | import { MatTab } from '@angular/material/tabs'; | 23 | import { MatTab } from '@angular/material/tabs'; |
24 | -import { EntityAction } from '@home/models/entity/entity-component.models'; | ||
25 | import { BehaviorSubject } from 'rxjs'; | 24 | import { BehaviorSubject } from 'rxjs'; |
26 | import { Authority } from '@app/shared/models/authority.enum'; | 25 | import { Authority } from '@app/shared/models/authority.enum'; |
27 | -import { selectAuthUser, getCurrentAuthUser } from '@core/auth/auth.selectors'; | 26 | +import { getCurrentAuthUser } from '@core/auth/auth.selectors'; |
28 | import { AuthUser } from '@shared/models/user.model'; | 27 | import { AuthUser } from '@shared/models/user.model'; |
29 | import { EntityType } from '@shared/models/entity-type.models'; | 28 | import { EntityType } from '@shared/models/entity-type.models'; |
30 | import { AuditLogMode } from '@shared/models/audit-log.models'; | 29 | import { AuditLogMode } from '@shared/models/audit-log.models'; |
@@ -35,6 +34,7 @@ import { NgForm } from '@angular/forms'; | @@ -35,6 +34,7 @@ import { NgForm } from '@angular/forms'; | ||
35 | import { PageLink } from '@shared/models/page/page-link'; | 34 | import { PageLink } from '@shared/models/page/page-link'; |
36 | 35 | ||
37 | @Directive() | 36 | @Directive() |
37 | +// tslint:disable-next-line:directive-class-suffix | ||
38 | export abstract class EntityTabsComponent<T extends BaseData<HasId>, | 38 | export abstract class EntityTabsComponent<T extends BaseData<HasId>, |
39 | P extends PageLink = PageLink, | 39 | P extends PageLink = PageLink, |
40 | L extends BaseData<HasId> = T, | 40 | L extends BaseData<HasId> = T, |
@@ -19,27 +19,10 @@ import { ErrorStateMatcher } from '@angular/material/core'; | @@ -19,27 +19,10 @@ import { ErrorStateMatcher } from '@angular/material/core'; | ||
19 | import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; | 19 | import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; |
20 | import { Store } from '@ngrx/store'; | 20 | import { Store } from '@ngrx/store'; |
21 | import { AppState } from '@core/core.state'; | 21 | import { AppState } from '@core/core.state'; |
22 | -import { | ||
23 | - AbstractControl, | ||
24 | - FormArray, | ||
25 | - FormBuilder, | ||
26 | - FormControl, | ||
27 | - FormGroup, | ||
28 | - FormGroupDirective, | ||
29 | - NgForm, Validators, ValidatorFn | ||
30 | -} from '@angular/forms'; | 22 | +import { FormBuilder, FormControl, FormGroup, FormGroupDirective, NgForm, Validators } from '@angular/forms'; |
31 | import { Router } from '@angular/router'; | 23 | import { Router } from '@angular/router'; |
32 | import { DialogComponent } from '@app/shared/components/dialog.component'; | 24 | import { DialogComponent } from '@app/shared/components/dialog.component'; |
33 | -import { AttributeData } from '@shared/models/telemetry/telemetry.models'; | ||
34 | -import { EntityAlias, EntityAliases, EntityAliasFilter } from '@shared/models/alias.models'; | ||
35 | -import { DatasourceType, Widget, widgetType } from '@shared/models/widget.models'; | ||
36 | -import { AliasEntityType, EntityType } from '@shared/models/entity-type.models'; | ||
37 | -import { UtilsService } from '@core/services/utils.service'; | ||
38 | -import { TranslateService } from '@ngx-translate/core'; | ||
39 | import { ActionNotificationShow } from '@core/notification/notification.actions'; | 25 | import { ActionNotificationShow } from '@core/notification/notification.actions'; |
40 | -import { DialogService } from '@core/services/dialog.service'; | ||
41 | -import { EntityService } from '@core/http/entity.service'; | ||
42 | -import { Observable, of } from 'rxjs'; | ||
43 | 26 | ||
44 | export interface ImportDialogData { | 27 | export interface ImportDialogData { |
45 | importTitle: string; | 28 | importTitle: string; |
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | 17 | ||
18 | mat-form-field.resource-field { | 18 | mat-form-field.resource-field { |
19 | max-height: 40px; | 19 | max-height: 40px; |
20 | - margin: 10px 0px 0px 0px; | 20 | + margin: 10px 0 0; |
21 | .mat-form-field-wrapper { | 21 | .mat-form-field-wrapper { |
22 | padding-bottom: 0; | 22 | padding-bottom: 0; |
23 | .mat-form-field-flex { | 23 | .mat-form-field-flex { |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Injectable, Injector, NgModule } from '@angular/core'; | 17 | +import { Injectable, NgModule } from '@angular/core'; |
18 | import { Observable } from 'rxjs'; | 18 | import { Observable } from 'rxjs'; |
19 | import { MatDialog } from '@angular/material/dialog'; | 19 | import { MatDialog } from '@angular/material/dialog'; |
20 | import { TranslateService } from '@ngx-translate/core'; | 20 | import { TranslateService } from '@ngx-translate/core'; |
@@ -36,7 +36,6 @@ export class CustomDialogService { | @@ -36,7 +36,6 @@ export class CustomDialogService { | ||
36 | private translate: TranslateService, | 36 | private translate: TranslateService, |
37 | private authService: AuthService, | 37 | private authService: AuthService, |
38 | private dynamicComponentFactoryService: DynamicComponentFactoryService, | 38 | private dynamicComponentFactoryService: DynamicComponentFactoryService, |
39 | - private injector: Injector, | ||
40 | public dialog: MatDialog | 39 | public dialog: MatDialog |
41 | ) { | 40 | ) { |
42 | } | 41 | } |
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import { Component, Inject, InjectionToken, OnInit, ViewContainerRef } from '@angular/core'; | 17 | import { Component, Inject, InjectionToken, OnInit, ViewContainerRef } from '@angular/core'; |
18 | -import { Overlay, OverlayRef } from '@angular/cdk/overlay'; | 18 | +import { OverlayRef } from '@angular/cdk/overlay'; |
19 | import { PageComponent } from '@shared/components/page.component'; | 19 | import { PageComponent } from '@shared/components/page.component'; |
20 | import { Store } from '@ngrx/store'; | 20 | import { Store } from '@ngrx/store'; |
21 | import { AppState } from '@core/core.state'; | 21 | import { AppState } from '@core/core.state'; |
@@ -60,7 +60,6 @@ export class LegendConfigPanelComponent extends PageComponent implements OnInit | @@ -60,7 +60,6 @@ export class LegendConfigPanelComponent extends PageComponent implements OnInit | ||
60 | public overlayRef: OverlayRef, | 60 | public overlayRef: OverlayRef, |
61 | protected store: Store<AppState>, | 61 | protected store: Store<AppState>, |
62 | public fb: FormBuilder, | 62 | public fb: FormBuilder, |
63 | - private overlay: Overlay, | ||
64 | public viewContainerRef: ViewContainerRef) { | 63 | public viewContainerRef: ViewContainerRef) { |
65 | super(store); | 64 | super(store); |
66 | } | 65 | } |
@@ -37,8 +37,7 @@ import { deepClone, isDefined, isNumber } from '@core/utils'; | @@ -37,8 +37,7 @@ import { deepClone, isDefined, isNumber } from '@core/utils'; | ||
37 | import cssjs from '@core/css/css'; | 37 | import cssjs from '@core/css/css'; |
38 | import { PageLink } from '@shared/models/page/page-link'; | 38 | import { PageLink } from '@shared/models/page/page-link'; |
39 | import { Direction, SortOrder, sortOrderFromString } from '@shared/models/page/sort-order'; | 39 | import { Direction, SortOrder, sortOrderFromString } from '@shared/models/page/sort-order'; |
40 | -import { DataSource } from '@angular/cdk/collections'; | ||
41 | -import { CollectionViewer, SelectionModel } from '@angular/cdk/collections'; | 40 | +import { CollectionViewer, DataSource, SelectionModel } from '@angular/cdk/collections'; |
42 | import { BehaviorSubject, forkJoin, fromEvent, merge, Observable, of } from 'rxjs'; | 41 | import { BehaviorSubject, forkJoin, fromEvent, merge, Observable, of } from 'rxjs'; |
43 | import { emptyPageData, PageData } from '@shared/models/page/page-data'; | 42 | import { emptyPageData, PageData } from '@shared/models/page/page-data'; |
44 | import { entityTypeTranslations } from '@shared/models/entity-type.models'; | 43 | import { entityTypeTranslations } from '@shared/models/entity-type.models'; |
@@ -59,7 +58,8 @@ import { | @@ -59,7 +58,8 @@ import { | ||
59 | getColumnWidth, | 58 | getColumnWidth, |
60 | TableWidgetDataKeySettings, | 59 | TableWidgetDataKeySettings, |
61 | TableWidgetSettings, | 60 | TableWidgetSettings, |
62 | - toAlarmColumnDef, widthStyle | 61 | + toAlarmColumnDef, |
62 | + widthStyle | ||
63 | } from '@home/components/widget/lib/table-widget.models'; | 63 | } from '@home/components/widget/lib/table-widget.models'; |
64 | import { ConnectedPosition, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay'; | 64 | import { ConnectedPosition, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay'; |
65 | import { ComponentPortal, PortalInjector } from '@angular/cdk/portal'; | 65 | import { ComponentPortal, PortalInjector } from '@angular/cdk/portal'; |
@@ -16,7 +16,8 @@ | @@ -16,7 +16,8 @@ | ||
16 | 16 | ||
17 | import * as CanvasGauges from 'canvas-gauges'; | 17 | import * as CanvasGauges from 'canvas-gauges'; |
18 | import { | 18 | import { |
19 | - AnalogueRadialGaugeSettings, getAnalogueRadialGaugeSettingsSchema | 19 | + AnalogueRadialGaugeSettings, |
20 | + getAnalogueRadialGaugeSettingsSchema | ||
20 | } from '@home/components/widget/lib/analogue-radial-gauge.models'; | 21 | } from '@home/components/widget/lib/analogue-radial-gauge.models'; |
21 | import { JsonSettingsSchema } from '@shared/models/widget.models'; | 22 | import { JsonSettingsSchema } from '@shared/models/widget.models'; |
22 | import { WidgetContext } from '@home/models/widget-component.models'; | 23 | import { WidgetContext } from '@home/models/widget-component.models'; |
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | [ngClass]="{'short-mode':ctx.width < 400, 'labels-hidden': settings.hideLabels, 'long-mode': ctx.width >= 400}"> | 19 | [ngClass]="{'short-mode':ctx.width < 400, 'labels-hidden': settings.hideLabels, 'long-mode': ctx.width >= 400}"> |
20 | <mat-form-field class="mat-block" [fxHide]="settings.hidePicker" (click)="openNavigatorPanel($event)"> | 20 | <mat-form-field class="mat-block" [fxHide]="settings.hidePicker" (click)="openNavigatorPanel($event)"> |
21 | <mat-label *ngIf="!settings.hideLabels" translate>widgets.date-range-navigator.localizationMap.Date picker</mat-label> | 21 | <mat-label *ngIf="!settings.hideLabels" translate>widgets.date-range-navigator.localizationMap.Date picker</mat-label> |
22 | - <mat-select #datePicker [ngModel]="advancedModel.chosenLabel" matInput> | 22 | + <mat-select #datePicker [ngModel]="advancedModel.chosenLabel"> |
23 | <mat-option [value]="advancedModel.chosenLabel"> | 23 | <mat-option [value]="advancedModel.chosenLabel"> |
24 | {{advancedModel.chosenLabel}} | 24 | {{advancedModel.chosenLabel}} |
25 | </mat-option> | 25 | </mat-option> |
@@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
27 | </mat-form-field> | 27 | </mat-form-field> |
28 | <mat-form-field class="mat-block" [fxHide]="settings.hideInterval"> | 28 | <mat-form-field class="mat-block" [fxHide]="settings.hideInterval"> |
29 | <mat-label translate *ngIf="!settings.hideLabels">widgets.date-range-navigator.localizationMap.Interval</mat-label> | 29 | <mat-label translate *ngIf="!settings.hideLabels">widgets.date-range-navigator.localizationMap.Interval</mat-label> |
30 | - <mat-select matInput [(ngModel)]="selectedDateInterval" (ngModelChange)="changeInterval()"> | 30 | + <mat-select [(ngModel)]="selectedDateInterval" (ngModelChange)="changeInterval()"> |
31 | <mat-option *ngIf="customInterval" [value]="customInterval.ts"> | 31 | <mat-option *ngIf="customInterval" [value]="customInterval.ts"> |
32 | {{'widgets.date-range-navigator.localizationMap.' + customInterval.label | translate}} | 32 | {{'widgets.date-range-navigator.localizationMap.' + customInterval.label | translate}} |
33 | </mat-option> | 33 | </mat-option> |
@@ -43,7 +43,7 @@ | @@ -43,7 +43,7 @@ | ||
43 | </button> | 43 | </button> |
44 | <mat-form-field class="mat-block" fxFlex.gt-sm> | 44 | <mat-form-field class="mat-block" fxFlex.gt-sm> |
45 | <mat-label translate *ngIf="!settings.hideLabels">widgets.date-range-navigator.localizationMap.Step size</mat-label> | 45 | <mat-label translate *ngIf="!settings.hideLabels">widgets.date-range-navigator.localizationMap.Step size</mat-label> |
46 | - <mat-select matInput [(ngModel)]="selectedStepSize"> | 46 | + <mat-select [(ngModel)]="selectedStepSize"> |
47 | <mat-option *ngFor="let date of datesMap | keyvalue: originalOrder" [value]="date.value.ts"> | 47 | <mat-option *ngFor="let date of datesMap | keyvalue: originalOrder" [value]="date.value.ts"> |
48 | {{'widgets.date-range-navigator.localizationMap.' + date.value.label | translate}} | 48 | {{'widgets.date-range-navigator.localizationMap.' + date.value.label | translate}} |
49 | </mat-option> | 49 | </mat-option> |
@@ -34,12 +34,6 @@ | @@ -34,12 +34,6 @@ | ||
34 | margin: 4px 0; | 34 | margin: 4px 0; |
35 | } | 35 | } |
36 | 36 | ||
37 | - .navigation { | ||
38 | - md-input-container { | ||
39 | - margin: 0; | ||
40 | - } | ||
41 | - } | ||
42 | - | ||
43 | .picker { | 37 | .picker { |
44 | .picker__wrapper { | 38 | .picker__wrapper { |
45 | position: relative; | 39 | position: relative; |
@@ -74,10 +68,6 @@ | @@ -74,10 +68,6 @@ | ||
74 | 68 | ||
75 | .drn__element { | 69 | .drn__element { |
76 | width: 100%; | 70 | width: 100%; |
77 | - | ||
78 | - md-input-container { | ||
79 | - flex: 1; | ||
80 | - } | ||
81 | } | 71 | } |
82 | 72 | ||
83 | .picker { | 73 | .picker { |
@@ -38,7 +38,7 @@ import { | @@ -38,7 +38,7 @@ import { | ||
38 | DateRangeNavigatorSettings, | 38 | DateRangeNavigatorSettings, |
39 | getFormattedDate | 39 | getFormattedDate |
40 | } from '@home/components/widget/lib/date-range-navigator/date-range-navigator.models'; | 40 | } from '@home/components/widget/lib/date-range-navigator/date-range-navigator.models'; |
41 | -import { DatePipe, KeyValue } from '@angular/common'; | 41 | +import { KeyValue } from '@angular/common'; |
42 | import * as _moment from 'moment'; | 42 | import * as _moment from 'moment'; |
43 | import { ConnectedPosition, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay'; | 43 | import { ConnectedPosition, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay'; |
44 | import { ComponentPortal, PortalInjector } from '@angular/cdk/portal'; | 44 | import { ComponentPortal, PortalInjector } from '@angular/cdk/portal'; |
@@ -43,9 +43,8 @@ import { deepClone, isDefined, isNumber } from '@core/utils'; | @@ -43,9 +43,8 @@ import { deepClone, isDefined, isNumber } from '@core/utils'; | ||
43 | import cssjs from '@core/css/css'; | 43 | import cssjs from '@core/css/css'; |
44 | import { PageLink } from '@shared/models/page/page-link'; | 44 | import { PageLink } from '@shared/models/page/page-link'; |
45 | import { Direction, SortOrder, sortOrderFromString } from '@shared/models/page/sort-order'; | 45 | import { Direction, SortOrder, sortOrderFromString } from '@shared/models/page/sort-order'; |
46 | -import { DataSource } from '@angular/cdk/collections'; | 46 | +import { CollectionViewer, DataSource } from '@angular/cdk/collections'; |
47 | import { DataKeyType } from '@shared/models/telemetry/telemetry.models'; | 47 | import { DataKeyType } from '@shared/models/telemetry/telemetry.models'; |
48 | -import { CollectionViewer } from '@angular/cdk/collections'; | ||
49 | import { BehaviorSubject, fromEvent, merge, Observable, of } from 'rxjs'; | 48 | import { BehaviorSubject, fromEvent, merge, Observable, of } from 'rxjs'; |
50 | import { emptyPageData, PageData } from '@shared/models/page/page-data'; | 49 | import { emptyPageData, PageData } from '@shared/models/page/page-data'; |
51 | import { EntityId } from '@shared/models/id/entity-id'; | 50 | import { EntityId } from '@shared/models/id/entity-id'; |
@@ -55,20 +54,21 @@ import { MatPaginator } from '@angular/material/paginator'; | @@ -55,20 +54,21 @@ import { MatPaginator } from '@angular/material/paginator'; | ||
55 | import { MatSort } from '@angular/material/sort'; | 54 | import { MatSort } from '@angular/material/sort'; |
56 | import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; | 55 | import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; |
57 | import { | 56 | import { |
58 | - CellContentInfo, | ||
59 | - CellStyleInfo, | ||
60 | - constructTableCssString, | ||
61 | - DisplayColumn, | ||
62 | - EntityColumn, | ||
63 | - EntityData, | ||
64 | - fromEntityColumnDef, | ||
65 | - getCellContentInfo, | ||
66 | - getCellStyleInfo, | ||
67 | - getColumnWidth, | ||
68 | - getEntityValue, | ||
69 | - TableWidgetDataKeySettings, | ||
70 | - TableWidgetSettings, | ||
71 | - toEntityColumnDef, widthStyle | 57 | + CellContentInfo, |
58 | + CellStyleInfo, | ||
59 | + constructTableCssString, | ||
60 | + DisplayColumn, | ||
61 | + EntityColumn, | ||
62 | + EntityData, | ||
63 | + fromEntityColumnDef, | ||
64 | + getCellContentInfo, | ||
65 | + getCellStyleInfo, | ||
66 | + getColumnWidth, | ||
67 | + getEntityValue, | ||
68 | + TableWidgetDataKeySettings, | ||
69 | + TableWidgetSettings, | ||
70 | + toEntityColumnDef, | ||
71 | + widthStyle | ||
72 | } from '@home/components/widget/lib/table-widget.models'; | 72 | } from '@home/components/widget/lib/table-widget.models'; |
73 | import { ConnectedPosition, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay'; | 73 | import { ConnectedPosition, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay'; |
74 | import { ComponentPortal, PortalInjector } from '@angular/cdk/portal'; | 74 | import { ComponentPortal, PortalInjector } from '@angular/cdk/portal'; |
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | // tslint:disable-next-line:no-reference | 17 | // tslint:disable-next-line:no-reference |
18 | /// <reference path="../../../../../../../src/typings/jquery.flot.typings.d.ts" /> | 18 | /// <reference path="../../../../../../../src/typings/jquery.flot.typings.d.ts" /> |
19 | 19 | ||
20 | -import { JsonSettingsSchema, DataKey, DatasourceData, Datasource } from '@shared/models/widget.models'; | 20 | +import { DataKey, Datasource, DatasourceData, JsonSettingsSchema } from '@shared/models/widget.models'; |
21 | import * as moment_ from 'moment'; | 21 | import * as moment_ from 'moment'; |
22 | 22 | ||
23 | export declare type ChartType = 'line' | 'pie' | 'bar' | 'state' | 'graph'; | 23 | export declare type ChartType = 'line' | 'pie' | 'bar' | 'state' | 'graph'; |
@@ -14,16 +14,23 @@ | @@ -14,16 +14,23 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import L, { LatLngTuple, LatLngBounds, Point } from 'leaflet'; | 17 | +import L, { LatLngBounds, LatLngTuple } from 'leaflet'; |
18 | 18 | ||
19 | import 'leaflet-providers'; | 19 | import 'leaflet-providers'; |
20 | import 'leaflet.markercluster/dist/MarkerCluster.css'; | 20 | import 'leaflet.markercluster/dist/MarkerCluster.css'; |
21 | import 'leaflet.markercluster/dist/MarkerCluster.Default.css'; | 21 | import 'leaflet.markercluster/dist/MarkerCluster.Default.css'; |
22 | import LM from 'leaflet.markercluster/dist/leaflet.markercluster'; | 22 | import LM from 'leaflet.markercluster/dist/leaflet.markercluster'; |
23 | 23 | ||
24 | -import { MapSettings, MarkerSettings, FormattedData, UnitedMapSettings, PolygonSettings, PolylineSettings } from './map-models'; | 24 | +import { |
25 | + FormattedData, | ||
26 | + MapSettings, | ||
27 | + MarkerSettings, | ||
28 | + PolygonSettings, | ||
29 | + PolylineSettings, | ||
30 | + UnitedMapSettings | ||
31 | +} from './map-models'; | ||
25 | import { Marker } from './markers'; | 32 | import { Marker } from './markers'; |
26 | -import { Observable, BehaviorSubject } from 'rxjs'; | 33 | +import { BehaviorSubject, Observable } from 'rxjs'; |
27 | import { filter } from 'rxjs/operators'; | 34 | import { filter } from 'rxjs/operators'; |
28 | import { Polyline } from './polyline'; | 35 | import { Polyline } from './polyline'; |
29 | import { Polygon } from './polygon'; | 36 | import { Polygon } from './polygon'; |
@@ -17,22 +17,22 @@ | @@ -17,22 +17,22 @@ | ||
17 | import { MapProviders, UnitedMapSettings } from './map-models'; | 17 | import { MapProviders, UnitedMapSettings } from './map-models'; |
18 | import LeafletMap from './leaflet-map'; | 18 | import LeafletMap from './leaflet-map'; |
19 | import { | 19 | import { |
20 | - openstreetMapSettingsSchema, | ||
21 | - googleMapSettingsSchema, | ||
22 | - imageMapSettingsSchema, | ||
23 | - tencentMapSettingsSchema, | ||
24 | - commonMapSettingsSchema, | ||
25 | - routeMapSettingsSchema, | ||
26 | - markerClusteringSettingsSchema, | ||
27 | - markerClusteringSettingsSchemaLeaflet, | ||
28 | - hereMapSettingsSchema, | ||
29 | - mapProviderSchema, | ||
30 | - mapPolygonSchema | 20 | + commonMapSettingsSchema, |
21 | + googleMapSettingsSchema, | ||
22 | + hereMapSettingsSchema, | ||
23 | + imageMapSettingsSchema, | ||
24 | + mapPolygonSchema, | ||
25 | + mapProviderSchema, | ||
26 | + markerClusteringSettingsSchema, | ||
27 | + markerClusteringSettingsSchemaLeaflet, | ||
28 | + openstreetMapSettingsSchema, | ||
29 | + routeMapSettingsSchema, | ||
30 | + tencentMapSettingsSchema | ||
31 | } from './schemes'; | 31 | } from './schemes'; |
32 | -import { MapWidgetStaticInterface, MapWidgetInterface } from './map-widget.interface'; | ||
33 | -import { OpenStreetMap, TencentMap, GoogleMap, HEREMap, ImageMap } from './providers'; | ||
34 | -import { parseFunction, parseArray, parseData, safeExecute, parseWithTranslation } from '@core/utils'; | ||
35 | -import { initSchema, addToSchema, mergeSchemes, addCondition, addGroupInfo } from '@core/schema-utils'; | 32 | +import { MapWidgetInterface, MapWidgetStaticInterface } from './map-widget.interface'; |
33 | +import { GoogleMap, HEREMap, ImageMap, OpenStreetMap, TencentMap } from './providers'; | ||
34 | +import { parseArray, parseData, parseFunction, parseWithTranslation } from '@core/utils'; | ||
35 | +import { addCondition, addGroupInfo, addToSchema, initSchema, mergeSchemes } from '@core/schema-utils'; | ||
36 | import { forkJoin } from 'rxjs'; | 36 | import { forkJoin } from 'rxjs'; |
37 | import { WidgetContext } from '@app/modules/home/models/widget-component.models'; | 37 | import { WidgetContext } from '@app/modules/home/models/widget-component.models'; |
38 | import { getDefCenterPosition } from './maps-utils'; | 38 | import { getDefCenterPosition } from './maps-utils'; |
@@ -15,9 +15,7 @@ | @@ -15,9 +15,7 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import L from 'leaflet'; | 17 | import L from 'leaflet'; |
18 | -import _ from 'lodash'; | ||
19 | -import { MarkerSettings, PolylineSettings, PolygonSettings } from './map-models'; | ||
20 | -import { parseWithTranslation } from '@app/core/utils'; | 18 | +import { MarkerSettings, PolygonSettings, PolylineSettings } from './map-models'; |
21 | 19 | ||
22 | export function createTooltip(target: L.Layer, | 20 | export function createTooltip(target: L.Layer, |
23 | settings: MarkerSettings | PolylineSettings | PolygonSettings, | 21 | settings: MarkerSettings | PolylineSettings | PolygonSettings, |
@@ -63,4 +61,4 @@ export function getDefCenterPosition(position) { | @@ -63,4 +61,4 @@ export function getDefCenterPosition(position) { | ||
63 | if (typeof (position) === 'object') | 61 | if (typeof (position) === 'object') |
64 | return position; | 62 | return position; |
65 | return [0, 0]; | 63 | return [0, 0]; |
66 | -} | ||
64 | +} |
@@ -16,10 +16,8 @@ | @@ -16,10 +16,8 @@ | ||
16 | .arrow { | 16 | .arrow { |
17 | height: 30px; | 17 | height: 30px; |
18 | width: 30px; | 18 | width: 30px; |
19 | - background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAtCAMAAAANxBKoAAACAVBMVEUAAAAAqv9AgP8ggP8udP8qgP8ndv8kbf8kgP8eeP8rcf8mc/8jdP8hev8me/8kdv8jcv8pcP8ic/8neP8leP8ofP8mef8pev8nef8oe/8nef8pef8qfv8qgf8qe/8mev8off8oev8oef8oe/8pev8qe/8oe/8off8pfP8oev8pev8qe/8qfP8pev8pe/8qfP8pe/8oev8pe/8qe/8qfP8qfP8qff8qff8qfP8qff8pe/8qff8qfP8qfP8pev8pev8JYf8KYP8UY/8UZf8WY/8WZv8YZP8bZP8fZv8fZ/8gZv8gZ/8hZP8iZ/8jaf8jav8kaP8kav8ka/8kbP8kbf8kb/8lbP8lbf8lbv8lb/8lcP8mb/8mcP8mcf8ncf8ncv8nc/8ndP8ndf8ocv4odP8odf8odv8od/8oeP8peP8pef8pev8qev8qe/8qfP8rbP8rfP8rff8tc/4vcP4xbv4zcf42dP49df4+gP4/fv5Rif5biP1ul/14mvx4nvyMrfuMrvuWsfuctvuguPuww/vD0fnH1vrI1frK2PrL2fnV3vnb4vnc5fnd5fnd5vne5fnj6vnl6/jm7Pno7fXo7fbo7ffo7fjp7fnp7vjq7vjs8fnt8Pjt8fjw8fXw8fbw8fjy8/jz9fn5+fj7+/f++/j/+/X/+/b/+/f/+/j//Pj//vhoUaHMAAAAQHRSTlMAAwQICwwNDg4REhQWFxscHTI1QkRGSktOU1RdYWFscXJzhYWKqre6wMHDw8PHx8rN09TW1uLi7e/x8vLz9fj5hfwW0QAAAnVJREFUSMeV1fdb00AYB/BzoQjurSjuvQcuFLcgWqTVtLVpL0GS2GuDuLeouPeAiLOuwOFf6WU0ucvq4/d52v6Qz/M+18u97wHgyfh5m5vUYlHt2rV8BojOqGUqonNhVgTegfxZE2JXoMAUFgXYsSoKy3YfnoIiUqxm8UwUnSoaT0WVUuPi6lCUz+ft/+pqNYwqsiwrlm8s45XBVpE7BQgFyeZLbB1ihVwmefjpDSjbi7HwziArCdlU/MArjDHfaestBh4dZs9/JBb/4kVbo5FEr/JaWRL4VPvZ39jMVV4q63qiCx7bIfDJtst/LYt/JnLldaNuACbS9JwiQj4Zu/3HlDr5nEyJivMcgPn0Nogwfaq1Z9igQ7pO9AuqNEJzQINTV5ZghjvywLFG6dYMVRptAF3uPvBc8xPsWH0Q44ccpEqjvaBoa0lI7/ts2kHdCsbDJ5jSSC2/SEU8856x+hDGd+JZujQquvp6ieT7Nyel0o/jCSgzTefq0y81I30f7PRr2i1fbWrd+98yXtMGfOt29wTyiebHpu83dZ+m3U969qSBeje5DHeod8Dx5PeYZ7/rPO8y0XLvk+1J8UcJyLzLScw5kTsgz8Xu2vXJV0uaOSfsGcznZZGcwdi1L5qV13HmDILV3tY1z3fbxa8Wv+Se74VEj/H3jmz0TvuVN4Z+x/ZORF8efU64s/CtUT0vCbk0d/DZTSgxPQ/WhswTSYTZrDNPllaaVQo1q/Y4k63mv+YgmFZxxk6gR/LsCngcO+6nR9lCrfcqqQ2/dxqD7rT1IXhxyB24O8BuCr9eq9axU7F7wYjoy3ty3TZVLaCC2rRxru/hPwVgtEdFK5vOAAAAAElFTkSuQmCC"); | ||
20 | background-size: cover; | 19 | background-size: cover; |
21 | - background-repeat: no-repeat; | ||
22 | - background-position: center center; | 20 | + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAtCAMAAAANxBKoAAACAVBMVEUAAAAAqv9AgP8ggP8udP8qgP8ndv8kbf8kgP8eeP8rcf8mc/8jdP8hev8me/8kdv8jcv8pcP8ic/8neP8leP8ofP8mef8pev8nef8oe/8nef8pef8qfv8qgf8qe/8mev8off8oev8oef8oe/8pev8qe/8oe/8off8pfP8oev8pev8qe/8qfP8pev8pe/8qfP8pe/8oev8pe/8qe/8qfP8qfP8qff8qff8qfP8qff8pe/8qff8qfP8qfP8pev8pev8JYf8KYP8UY/8UZf8WY/8WZv8YZP8bZP8fZv8fZ/8gZv8gZ/8hZP8iZ/8jaf8jav8kaP8kav8ka/8kbP8kbf8kb/8lbP8lbf8lbv8lb/8lcP8mb/8mcP8mcf8ncf8ncv8nc/8ndP8ndf8ocv4odP8odf8odv8od/8oeP8peP8pef8pev8qev8qe/8qfP8rbP8rfP8rff8tc/4vcP4xbv4zcf42dP49df4+gP4/fv5Rif5biP1ul/14mvx4nvyMrfuMrvuWsfuctvuguPuww/vD0fnH1vrI1frK2PrL2fnV3vnb4vnc5fnd5fnd5vne5fnj6vnl6/jm7Pno7fXo7fbo7ffo7fjp7fnp7vjq7vjs8fnt8Pjt8fjw8fXw8fbw8fjy8/jz9fn5+fj7+/f++/j/+/X/+/b/+/f/+/j//Pj//vhoUaHMAAAAQHRSTlMAAwQICwwNDg4REhQWFxscHTI1QkRGSktOU1RdYWFscXJzhYWKqre6wMHDw8PHx8rN09TW1uLi7e/x8vLz9fj5hfwW0QAAAnVJREFUSMeV1fdb00AYB/BzoQjurSjuvQcuFLcgWqTVtLVpL0GS2GuDuLeouPeAiLOuwOFf6WU0ucvq4/d52v6Qz/M+18u97wHgyfh5m5vUYlHt2rV8BojOqGUqonNhVgTegfxZE2JXoMAUFgXYsSoKy3YfnoIiUqxm8UwUnSoaT0WVUuPi6lCUz+ft/+pqNYwqsiwrlm8s45XBVpE7BQgFyeZLbB1ihVwmefjpDSjbi7HwziArCdlU/MArjDHfaestBh4dZs9/JBb/4kVbo5FEr/JaWRL4VPvZ39jMVV4q63qiCx7bIfDJtst/LYt/JnLldaNuACbS9JwiQj4Zu/3HlDr5nEyJivMcgPn0Nogwfaq1Z9igQ7pO9AuqNEJzQINTV5ZghjvywLFG6dYMVRptAF3uPvBc8xPsWH0Q44ccpEqjvaBoa0lI7/ts2kHdCsbDJ5jSSC2/SEU8856x+hDGd+JZujQquvp6ieT7Nyel0o/jCSgzTefq0y81I30f7PRr2i1fbWrd+98yXtMGfOt29wTyiebHpu83dZ+m3U969qSBeje5DHeod8Dx5PeYZ7/rPO8y0XLvk+1J8UcJyLzLScw5kTsgz8Xu2vXJV0uaOSfsGcznZZGcwdi1L5qV13HmDILV3tY1z3fbxa8Wv+Se74VEj/H3jmz0TvuVN4Z+x/ZORF8efU64s/CtUT0vCbk0d/DZTSgxPQ/WhswTSYTZrDNPllaaVQo1q/Y4k63mv+YgmFZxxk6gR/LsCngcO+6nR9lCrfcqqQ2/dxqD7rT1IXhxyB24O8BuCr9eq9axU7F7wYjoy3ty3TZVLaCC2rRxru/hPwVgtEdFK5vOAAAAAElFTkSuQmCC") no-repeat center center; |
23 | } | 21 | } |
24 | 22 | ||
25 | .leaflet-div-icon, | 23 | .leaflet-div-icon, |
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | 17 | ||
18 | import L from 'leaflet'; | 18 | import L from 'leaflet'; |
19 | import LeafletMap from '../leaflet-map'; | 19 | import LeafletMap from '../leaflet-map'; |
20 | -import { MapSettings, UnitedMapSettings } from '../map-models'; | 20 | +import { UnitedMapSettings } from '../map-models'; |
21 | import 'leaflet.gridlayer.googlemutant'; | 21 | import 'leaflet.gridlayer.googlemutant'; |
22 | 22 | ||
23 | let googleLoaded = false; | 23 | let googleLoaded = false; |
@@ -54,4 +54,4 @@ export class GoogleMap extends LeafletMap { | @@ -54,4 +54,4 @@ export class GoogleMap extends LeafletMap { | ||
54 | document.getElementsByTagName('head')[0].appendChild(script); | 54 | document.getElementsByTagName('head')[0].appendChild(script); |
55 | } | 55 | } |
56 | } | 56 | } |
57 | -} | ||
57 | +} |
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | 16 | ||
17 | import L from 'leaflet'; | 17 | import L from 'leaflet'; |
18 | import LeafletMap from '../leaflet-map'; | 18 | import LeafletMap from '../leaflet-map'; |
19 | -import { MapSettings, UnitedMapSettings } from '../map-models'; | 19 | +import { UnitedMapSettings } from '../map-models'; |
20 | 20 | ||
21 | export class HEREMap extends LeafletMap { | 21 | export class HEREMap extends LeafletMap { |
22 | constructor($container, options: UnitedMapSettings) { | 22 | constructor($container, options: UnitedMapSettings) { |
@@ -27,4 +27,4 @@ export class HEREMap extends LeafletMap { | @@ -27,4 +27,4 @@ export class HEREMap extends LeafletMap { | ||
27 | super.setMap(map); | 27 | super.setMap(map); |
28 | super.initSettings(options); | 28 | super.initSettings(options); |
29 | } | 29 | } |
30 | -} | ||
30 | +} |
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | 16 | ||
17 | import L, { LatLngLiteral } from 'leaflet'; | 17 | import L, { LatLngLiteral } from 'leaflet'; |
18 | import LeafletMap from '../leaflet-map'; | 18 | import LeafletMap from '../leaflet-map'; |
19 | -import { MapSettings, UnitedMapSettings } from '../map-models'; | 19 | +import { UnitedMapSettings } from '../map-models'; |
20 | import { aspectCache } from '@app/core/utils'; | 20 | import { aspectCache } from '@app/core/utils'; |
21 | 21 | ||
22 | const maxZoom = 4;// ? | 22 | const maxZoom = 4;// ? |
@@ -135,4 +135,4 @@ export class ImageMap extends LeafletMap { | @@ -135,4 +135,4 @@ export class ImageMap extends LeafletMap { | ||
135 | [this.options.yPosKeyName]: (position.lat + 180) / 360 | 135 | [this.options.yPosKeyName]: (position.lat + 180) / 360 |
136 | } | 136 | } |
137 | }*/ | 137 | }*/ |
138 | -} | ||
138 | +} |
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | 16 | ||
17 | import L from 'leaflet'; | 17 | import L from 'leaflet'; |
18 | import LeafletMap from '../leaflet-map'; | 18 | import LeafletMap from '../leaflet-map'; |
19 | -import { MapSettings, UnitedMapSettings } from '../map-models'; | 19 | +import { UnitedMapSettings } from '../map-models'; |
20 | 20 | ||
21 | export class OpenStreetMap extends LeafletMap { | 21 | export class OpenStreetMap extends LeafletMap { |
22 | constructor($container, options: UnitedMapSettings) { | 22 | constructor($container, options: UnitedMapSettings) { |
@@ -27,4 +27,4 @@ export class OpenStreetMap extends LeafletMap { | @@ -27,4 +27,4 @@ export class OpenStreetMap extends LeafletMap { | ||
27 | super.setMap(map); | 27 | super.setMap(map); |
28 | super.initSettings(options); | 28 | super.initSettings(options); |
29 | } | 29 | } |
30 | -} | ||
30 | +} |
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | 17 | ||
18 | import L from 'leaflet'; | 18 | import L from 'leaflet'; |
19 | import LeafletMap from '../leaflet-map'; | 19 | import LeafletMap from '../leaflet-map'; |
20 | -import { MapSettings, UnitedMapSettings } from '../map-models'; | 20 | +import { UnitedMapSettings } from '../map-models'; |
21 | 21 | ||
22 | export class TencentMap extends LeafletMap { | 22 | export class TencentMap extends LeafletMap { |
23 | constructor($container, options: UnitedMapSettings) { | 23 | constructor($container, options: UnitedMapSettings) { |
@@ -29,4 +29,4 @@ export class TencentMap extends LeafletMap { | @@ -29,4 +29,4 @@ export class TencentMap extends LeafletMap { | ||
29 | super.setMap(map); | 29 | super.setMap(map); |
30 | super.initSettings(options); | 30 | super.initSettings(options); |
31 | } | 31 | } |
32 | -} | ||
32 | +} |
@@ -23,8 +23,8 @@ import { AppState } from '@core/core.state'; | @@ -23,8 +23,8 @@ import { AppState } from '@core/core.state'; | ||
23 | import { isDefined, isNumber } from '@core/utils'; | 23 | import { isDefined, isNumber } from '@core/utils'; |
24 | import { CanvasDigitalGauge, CanvasDigitalGaugeOptions } from '@home/components/widget/lib/canvas-digital-gauge'; | 24 | import { CanvasDigitalGauge, CanvasDigitalGaugeOptions } from '@home/components/widget/lib/canvas-digital-gauge'; |
25 | import * as tinycolor_ from 'tinycolor2'; | 25 | import * as tinycolor_ from 'tinycolor2'; |
26 | -import GenericOptions = CanvasGauges.GenericOptions; | ||
27 | import { ResizeObserver } from '@juggle/resize-observer'; | 26 | import { ResizeObserver } from '@juggle/resize-observer'; |
27 | +import GenericOptions = CanvasGauges.GenericOptions; | ||
28 | 28 | ||
29 | const tinycolor = tinycolor_; | 29 | const tinycolor = tinycolor_; |
30 | 30 |
@@ -32,16 +32,16 @@ | @@ -32,16 +32,16 @@ | ||
32 | 32 | ||
33 | .mat-row:not(.mat-row-select), .mat-header-row:not(.mat-row-select) { | 33 | .mat-row:not(.mat-row-select), .mat-header-row:not(.mat-row-select) { |
34 | mat-cell:nth-child(n+2):nth-last-child(n+2), mat-footer-cell:nth-child(n+2):nth-last-child(n+2), mat-header-cell:nth-child(n+2):nth-last-child(n+2) { | 34 | mat-cell:nth-child(n+2):nth-last-child(n+2), mat-footer-cell:nth-child(n+2):nth-last-child(n+2), mat-header-cell:nth-child(n+2):nth-last-child(n+2) { |
35 | - padding: 0px 5px; | 35 | + padding: 0 5px; |
36 | } | 36 | } |
37 | } | 37 | } |
38 | 38 | ||
39 | .mat-row.mat-row-select, .mat-header-row.mat-row-select { | 39 | .mat-row.mat-row-select, .mat-header-row.mat-row-select { |
40 | mat-cell:nth-child(2), mat-footer-cell:nth-child(2), mat-header-cell:nth-child(2) { | 40 | mat-cell:nth-child(2), mat-footer-cell:nth-child(2), mat-header-cell:nth-child(2) { |
41 | - padding: 0px 5px; | 41 | + padding: 0 5px; |
42 | } | 42 | } |
43 | mat-cell:nth-child(n+3):nth-last-child(n+2), mat-footer-cell:nth-child(n+3):nth-last-child(n+2), mat-header-cell:nth-child(n+3):nth-last-child(n+2) { | 43 | mat-cell:nth-child(n+3):nth-last-child(n+2), mat-footer-cell:nth-child(n+3):nth-last-child(n+2), mat-header-cell:nth-child(n+3):nth-last-child(n+2) { |
44 | - padding: 0px 5px; | 44 | + padding: 0 5px; |
45 | } | 45 | } |
46 | } | 46 | } |
47 | } | 47 | } |
@@ -44,8 +44,7 @@ import { isDefined, isNumber } from '@core/utils'; | @@ -44,8 +44,7 @@ import { isDefined, isNumber } from '@core/utils'; | ||
44 | import cssjs from '@core/css/css'; | 44 | import cssjs from '@core/css/css'; |
45 | import { PageLink } from '@shared/models/page/page-link'; | 45 | import { PageLink } from '@shared/models/page/page-link'; |
46 | import { Direction, SortOrder, sortOrderFromString } from '@shared/models/page/sort-order'; | 46 | import { Direction, SortOrder, sortOrderFromString } from '@shared/models/page/sort-order'; |
47 | -import { DataSource } from '@angular/cdk/collections'; | ||
48 | -import { CollectionViewer } from '@angular/cdk/collections'; | 47 | +import { CollectionViewer, DataSource } from '@angular/cdk/collections'; |
49 | import { BehaviorSubject, fromEvent, merge, Observable, of } from 'rxjs'; | 48 | import { BehaviorSubject, fromEvent, merge, Observable, of } from 'rxjs'; |
50 | import { emptyPageData, PageData } from '@shared/models/page/page-data'; | 49 | import { emptyPageData, PageData } from '@shared/models/page/page-data'; |
51 | import { catchError, debounceTime, distinctUntilChanged, map, tap } from 'rxjs/operators'; | 50 | import { catchError, debounceTime, distinctUntilChanged, map, tap } from 'rxjs/operators'; |
@@ -19,15 +19,15 @@ import _ from 'lodash'; | @@ -19,15 +19,15 @@ import _ from 'lodash'; | ||
19 | import tinycolor from 'tinycolor2'; | 19 | import tinycolor from 'tinycolor2'; |
20 | import { interpolateOnPointSegment } from 'leaflet-geometryutil'; | 20 | import { interpolateOnPointSegment } from 'leaflet-geometryutil'; |
21 | 21 | ||
22 | -import { Component, OnInit, Input, ViewChild, AfterViewInit, ChangeDetectorRef, SecurityContext } from '@angular/core'; | 22 | +import { AfterViewInit, ChangeDetectorRef, Component, Input, OnInit, SecurityContext, ViewChild } from '@angular/core'; |
23 | import { MapWidgetController, TbMapWidgetV2 } from '../lib/maps/map-widget2'; | 23 | import { MapWidgetController, TbMapWidgetV2 } from '../lib/maps/map-widget2'; |
24 | import { MapProviders } from '../lib/maps/map-models'; | 24 | import { MapProviders } from '../lib/maps/map-models'; |
25 | -import { parseArray, parseWithTranslation, safeExecute, parseTemplate } from '@app/core/utils'; | ||
26 | -import { initSchema, addToSchema, addGroupInfo } from '@app/core/schema-utils'; | 25 | +import { parseArray, parseWithTranslation, safeExecute } from '@app/core/utils'; |
26 | +import { addGroupInfo, addToSchema, initSchema } from '@app/core/schema-utils'; | ||
27 | import { tripAnimationSchema } from '../lib/maps/schemes'; | 27 | import { tripAnimationSchema } from '../lib/maps/schemes'; |
28 | import { DomSanitizer } from '@angular/platform-browser'; | 28 | import { DomSanitizer } from '@angular/platform-browser'; |
29 | import { WidgetContext } from '@app/modules/home/models/widget-component.models'; | 29 | import { WidgetContext } from '@app/modules/home/models/widget-component.models'; |
30 | -import { getRatio, findAngle } from '../lib/maps/maps-utils'; | 30 | +import { findAngle, getRatio } from '../lib/maps/maps-utils'; |
31 | import { JsonSettingsSchema, WidgetConfig } from '@shared/models/widget.models'; | 31 | import { JsonSettingsSchema, WidgetConfig } from '@shared/models/widget.models'; |
32 | import moment from 'moment'; | 32 | import moment from 'moment'; |
33 | 33 |
@@ -23,7 +23,9 @@ import { | @@ -23,7 +23,9 @@ import { | ||
23 | Datasource, | 23 | Datasource, |
24 | DatasourceType, | 24 | DatasourceType, |
25 | datasourceTypeTranslationMap, | 25 | datasourceTypeTranslationMap, |
26 | - defaultLegendConfig, GroupInfo, JsonSchema, | 26 | + defaultLegendConfig, |
27 | + GroupInfo, | ||
28 | + JsonSchema, | ||
27 | widgetType | 29 | widgetType |
28 | } from '@shared/models/widget.models'; | 30 | } from '@shared/models/widget.models'; |
29 | import { | 31 | import { |
@@ -120,16 +120,12 @@ export class AddEntitiesToCustomerDialogComponent extends | @@ -120,16 +120,12 @@ export class AddEntitiesToCustomerDialogComponent extends | ||
120 | switch (this.data.entityType) { | 120 | switch (this.data.entityType) { |
121 | case EntityType.DEVICE: | 121 | case EntityType.DEVICE: |
122 | return this.deviceService.assignDeviceToCustomer(customerId, entityId); | 122 | return this.deviceService.assignDeviceToCustomer(customerId, entityId); |
123 | - break; | ||
124 | case EntityType.ASSET: | 123 | case EntityType.ASSET: |
125 | return this.assetService.assignAssetToCustomer(customerId, entityId); | 124 | return this.assetService.assignAssetToCustomer(customerId, entityId); |
126 | - break; | ||
127 | case EntityType.ENTITY_VIEW: | 125 | case EntityType.ENTITY_VIEW: |
128 | return this.entityViewService.assignEntityViewToCustomer(customerId, entityId); | 126 | return this.entityViewService.assignEntityViewToCustomer(customerId, entityId); |
129 | - break; | ||
130 | case EntityType.DASHBOARD: | 127 | case EntityType.DASHBOARD: |
131 | return this.dashboardService.assignDashboardToCustomer(customerId, entityId); | 128 | return this.dashboardService.assignDashboardToCustomer(customerId, entityId); |
132 | - break; | ||
133 | } | 129 | } |
134 | } | 130 | } |
135 | 131 |
@@ -114,13 +114,10 @@ export class AssignToCustomerDialogComponent extends | @@ -114,13 +114,10 @@ export class AssignToCustomerDialogComponent extends | ||
114 | switch (this.data.entityType) { | 114 | switch (this.data.entityType) { |
115 | case EntityType.DEVICE: | 115 | case EntityType.DEVICE: |
116 | return this.deviceService.assignDeviceToCustomer(customerId, entityId); | 116 | return this.deviceService.assignDeviceToCustomer(customerId, entityId); |
117 | - break; | ||
118 | case EntityType.ASSET: | 117 | case EntityType.ASSET: |
119 | return this.assetService.assignAssetToCustomer(customerId, entityId); | 118 | return this.assetService.assignAssetToCustomer(customerId, entityId); |
120 | - break; | ||
121 | case EntityType.ENTITY_VIEW: | 119 | case EntityType.ENTITY_VIEW: |
122 | return this.entityViewService.assignEntityViewToCustomer(customerId, entityId); | 120 | return this.entityViewService.assignEntityViewToCustomer(customerId, entityId); |
123 | - break; | ||
124 | } | 121 | } |
125 | } | 122 | } |
126 | 123 |
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import { NgModule } from '@angular/core'; | 17 | import { NgModule } from '@angular/core'; |
18 | -import { Routes, RouterModule } from '@angular/router'; | 18 | +import { RouterModule, Routes } from '@angular/router'; |
19 | 19 | ||
20 | import { HomeComponent } from './home.component'; | 20 | import { HomeComponent } from './home.component'; |
21 | import { AuthGuard } from '@core/guards/auth.guard'; | 21 | import { AuthGuard } from '@core/guards/auth.guard'; |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, Input, OnInit, ViewEncapsulation } from '@angular/core'; | 17 | +import { Component, Input, OnInit } from '@angular/core'; |
18 | import { MenuSection } from '@core/services/menu.models'; | 18 | import { MenuSection } from '@core/services/menu.models'; |
19 | 19 | ||
20 | @Component({ | 20 | @Component({ |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, Input, OnInit, ViewEncapsulation } from '@angular/core'; | 17 | +import { Component, Input, OnInit } from '@angular/core'; |
18 | import { MenuSection } from '@core/services/menu.models'; | 18 | import { MenuSection } from '@core/services/menu.models'; |
19 | import { Router } from '@angular/router'; | 19 | import { Router } from '@angular/router'; |
20 | 20 |
@@ -15,13 +15,13 @@ | @@ -15,13 +15,13 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import { GridsterComponent, GridsterConfig, GridsterItem, GridsterItemComponentInterface } from 'angular-gridster2'; | 17 | import { GridsterComponent, GridsterConfig, GridsterItem, GridsterItemComponentInterface } from 'angular-gridster2'; |
18 | -import { Widget, widgetType, WidgetPosition } from '@app/shared/models/widget.models'; | 18 | +import { Widget, WidgetPosition, widgetType } from '@app/shared/models/widget.models'; |
19 | import { WidgetLayout, WidgetLayouts } from '@app/shared/models/dashboard.models'; | 19 | import { WidgetLayout, WidgetLayouts } from '@app/shared/models/dashboard.models'; |
20 | import { IDashboardWidget, WidgetAction, WidgetContext, WidgetHeaderAction } from './widget-component.models'; | 20 | import { IDashboardWidget, WidgetAction, WidgetContext, WidgetHeaderAction } from './widget-component.models'; |
21 | import { Timewindow } from '@shared/models/time/time.models'; | 21 | import { Timewindow } from '@shared/models/time/time.models'; |
22 | import { Observable, of, Subject } from 'rxjs'; | 22 | import { Observable, of, Subject } from 'rxjs'; |
23 | import { guid, isDefined, isEqual, isUndefined } from '@app/core/utils'; | 23 | import { guid, isDefined, isEqual, isUndefined } from '@app/core/utils'; |
24 | -import { IterableDiffer, KeyValueDiffer, NgZone } from '@angular/core'; | 24 | +import { IterableDiffer, KeyValueDiffer } from '@angular/core'; |
25 | import { IAliasController, IStateController } from '@app/core/api/widget-api.models'; | 25 | import { IAliasController, IStateController } from '@app/core/api/widget-api.models'; |
26 | 26 | ||
27 | export interface WidgetsData { | 27 | export interface WidgetsData { |
@@ -14,10 +14,9 @@ | @@ -14,10 +14,9 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { CollectionViewer, DataSource } from '@angular/cdk/collections'; | 17 | +import { CollectionViewer, DataSource, SelectionModel } from '@angular/cdk/collections'; |
18 | import { BehaviorSubject, Observable, of, ReplaySubject } from 'rxjs'; | 18 | import { BehaviorSubject, Observable, of, ReplaySubject } from 'rxjs'; |
19 | import { emptyPageData, PageData } from '@shared/models/page/page-data'; | 19 | import { emptyPageData, PageData } from '@shared/models/page/page-data'; |
20 | -import { SelectionModel } from '@angular/cdk/collections'; | ||
21 | import { PageLink } from '@shared/models/page/page-link'; | 20 | import { PageLink } from '@shared/models/page/page-link'; |
22 | import { catchError, map, publishReplay, refCount, take, tap } from 'rxjs/operators'; | 21 | import { catchError, map, publishReplay, refCount, take, tap } from 'rxjs/operators'; |
23 | import { EntityId } from '@app/shared/models/id/entity-id'; | 22 | import { EntityId } from '@app/shared/models/id/entity-id'; |
@@ -26,8 +25,8 @@ import { | @@ -26,8 +25,8 @@ import { | ||
26 | AttributeData, | 25 | AttributeData, |
27 | AttributeScope, | 26 | AttributeScope, |
28 | isClientSideTelemetryType, | 27 | isClientSideTelemetryType, |
29 | - TelemetryType, | ||
30 | - TelemetrySubscriber | 28 | + TelemetrySubscriber, |
29 | + TelemetryType | ||
31 | } from '@shared/models/telemetry/telemetry.models'; | 30 | } from '@shared/models/telemetry/telemetry.models'; |
32 | import { AttributeService } from '@core/http/attribute.service'; | 31 | import { AttributeService } from '@core/http/attribute.service'; |
33 | import { TelemetryWebsocketService } from '@core/ws/telemetry-websocket.service'; | 32 | import { TelemetryWebsocketService } from '@core/ws/telemetry-websocket.service'; |
@@ -14,8 +14,8 @@ | @@ -14,8 +14,8 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {BaseData, HasId} from '@shared/models/base-data'; | ||
18 | -import {EntityTableConfig} from './entities-table-config.models'; | 17 | +import { BaseData, HasId } from '@shared/models/base-data'; |
18 | +import { EntityTableConfig } from './entities-table-config.models'; | ||
19 | 19 | ||
20 | export interface AddEntityDialogData<T extends BaseData<HasId>> { | 20 | export interface AddEntityDialogData<T extends BaseData<HasId>> { |
21 | entitiesTableConfig: EntityTableConfig<T>; | 21 | entitiesTableConfig: EntityTableConfig<T>; |
@@ -17,7 +17,10 @@ | @@ -17,7 +17,10 @@ | ||
17 | import { IDashboardComponent } from '@home/models/dashboard-component.models'; | 17 | import { IDashboardComponent } from '@home/models/dashboard-component.models'; |
18 | import { | 18 | import { |
19 | DataSet, | 19 | DataSet, |
20 | - Datasource, DatasourceData, | 20 | + Datasource, |
21 | + DatasourceData, | ||
22 | + JsonSettingsSchema, | ||
23 | + Widget, | ||
21 | WidgetActionDescriptor, | 24 | WidgetActionDescriptor, |
22 | WidgetActionSource, | 25 | WidgetActionSource, |
23 | WidgetConfig, | 26 | WidgetConfig, |
@@ -25,8 +28,7 @@ import { | @@ -25,8 +28,7 @@ import { | ||
25 | WidgetType, | 28 | WidgetType, |
26 | widgetType, | 29 | widgetType, |
27 | WidgetTypeDescriptor, | 30 | WidgetTypeDescriptor, |
28 | - WidgetTypeParameters, | ||
29 | - Widget, JsonSettingsSchema | 31 | + WidgetTypeParameters |
30 | } from '@shared/models/widget.models'; | 32 | } from '@shared/models/widget.models'; |
31 | import { Timewindow, WidgetTimewindow } from '@shared/models/time/time.models'; | 33 | import { Timewindow, WidgetTimewindow } from '@shared/models/time/time.models'; |
32 | import { | 34 | import { |
@@ -34,10 +36,11 @@ import { | @@ -34,10 +36,11 @@ import { | ||
34 | IStateController, | 36 | IStateController, |
35 | IWidgetSubscription, | 37 | IWidgetSubscription, |
36 | IWidgetUtils, | 38 | IWidgetUtils, |
37 | - RpcApi, SubscriptionEntityInfo, SubscriptionInfo, | 39 | + RpcApi, |
40 | + SubscriptionEntityInfo, | ||
38 | TimewindowFunctions, | 41 | TimewindowFunctions, |
39 | WidgetActionsApi, | 42 | WidgetActionsApi, |
40 | - WidgetSubscriptionApi, WidgetSubscriptionContext, WidgetSubscriptionOptions | 43 | + WidgetSubscriptionApi |
41 | } from '@core/api/widget-api.models'; | 44 | } from '@core/api/widget-api.models'; |
42 | import { ChangeDetectorRef, ComponentFactory, Injector, NgZone, Type } from '@angular/core'; | 45 | import { ChangeDetectorRef, ComponentFactory, Injector, NgZone, Type } from '@angular/core'; |
43 | import { HttpErrorResponse } from '@angular/common/http'; | 46 | import { HttpErrorResponse } from '@angular/common/http'; |
@@ -45,13 +48,8 @@ import { RafService } from '@core/services/raf.service'; | @@ -45,13 +48,8 @@ import { RafService } from '@core/services/raf.service'; | ||
45 | import { WidgetTypeId } from '@shared/models/id/widget-type-id'; | 48 | import { WidgetTypeId } from '@shared/models/id/widget-type-id'; |
46 | import { TenantId } from '@shared/models/id/tenant-id'; | 49 | import { TenantId } from '@shared/models/id/tenant-id'; |
47 | import { WidgetLayout } from '@shared/models/dashboard.models'; | 50 | import { WidgetLayout } from '@shared/models/dashboard.models'; |
48 | -import { DeviceService } from '@core/http/device.service'; | ||
49 | -import { AssetService } from '@app/core/http/asset.service'; | ||
50 | -import { DialogService } from '@core/services/dialog.service'; | ||
51 | -import { CustomDialogService } from '@home/components/widget/dialog/custom-dialog.service'; | ||
52 | -import { isDefined, formatValue } from '@core/utils'; | ||
53 | -import { forkJoin, Observable, of, ReplaySubject } from 'rxjs'; | ||
54 | -import { WidgetSubscription } from '@core/api/widget-subscription'; | 51 | +import { formatValue, isDefined } from '@core/utils'; |
52 | +import { forkJoin, of } from 'rxjs'; | ||
55 | import { Store } from '@ngrx/store'; | 53 | import { Store } from '@ngrx/store'; |
56 | import { AppState } from '@core/core.state'; | 54 | import { AppState } from '@core/core.state'; |
57 | import { | 55 | import { |
@@ -26,8 +26,10 @@ import { | @@ -26,8 +26,10 @@ import { | ||
26 | DashboardConfiguration, | 26 | DashboardConfiguration, |
27 | DashboardLayoutId, | 27 | DashboardLayoutId, |
28 | DashboardLayoutInfo, | 28 | DashboardLayoutInfo, |
29 | - DashboardLayoutsInfo, DashboardState, | ||
30 | - DashboardStateLayouts, GridSettings, | 29 | + DashboardLayoutsInfo, |
30 | + DashboardState, | ||
31 | + DashboardStateLayouts, | ||
32 | + GridSettings, | ||
31 | WidgetLayout | 33 | WidgetLayout |
32 | } from '@app/shared/models/dashboard.models'; | 34 | } from '@app/shared/models/dashboard.models'; |
33 | import { WINDOW } from '@core/services/window.service'; | 35 | import { WINDOW } from '@core/services/window.service'; |
@@ -70,7 +70,6 @@ export declare type DashboardPageLayouts = {[key in DashboardLayoutId]: Dashboar | @@ -70,7 +70,6 @@ export declare type DashboardPageLayouts = {[key in DashboardLayoutId]: Dashboar | ||
70 | export class LayoutWidgetsArray implements Iterable<Widget> { | 70 | export class LayoutWidgetsArray implements Iterable<Widget> { |
71 | 71 | ||
72 | private widgetIds: string[] = []; | 72 | private widgetIds: string[] = []; |
73 | - private pointer = 0; | ||
74 | 73 | ||
75 | private loaded = false; | 74 | private loaded = false; |
76 | 75 |
@@ -14,23 +14,12 @@ | @@ -14,23 +14,12 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { | ||
18 | - Component, | ||
19 | - OnDestroy, | ||
20 | - OnInit, | ||
21 | - ViewEncapsulation, | ||
22 | - Input, | ||
23 | - Output, | ||
24 | - EventEmitter, | ||
25 | - OnChanges, | ||
26 | - SimpleChanges | ||
27 | -} from '@angular/core'; | ||
28 | -import { PageComponent } from '@shared/components/page.component'; | 17 | +import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; |
29 | import { WidgetsBundle } from '@shared/models/widgets-bundle.model'; | 18 | import { WidgetsBundle } from '@shared/models/widgets-bundle.model'; |
30 | import { IAliasController } from '@core/api/widget-api.models'; | 19 | import { IAliasController } from '@core/api/widget-api.models'; |
31 | import { NULL_UUID } from '@shared/models/id/has-uuid'; | 20 | import { NULL_UUID } from '@shared/models/id/has-uuid'; |
32 | import { WidgetService } from '@core/http/widget.service'; | 21 | import { WidgetService } from '@core/http/widget.service'; |
33 | -import { widgetType, Widget } from '@shared/models/widget.models'; | 22 | +import { Widget, widgetType } from '@shared/models/widget.models'; |
34 | import { toWidgetInfo } from '@home/models/widget-component.models'; | 23 | import { toWidgetInfo } from '@home/models/widget-component.models'; |
35 | import { DashboardCallbacks } from '../../models/dashboard-component.models'; | 24 | import { DashboardCallbacks } from '../../models/dashboard-component.models'; |
36 | 25 |
@@ -14,35 +14,18 @@ | @@ -14,35 +14,18 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, OnInit, Input, OnChanges, SimpleChanges, ViewChild, ChangeDetectionStrategy } from '@angular/core'; | 17 | +import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core'; |
18 | import { PageComponent } from '@shared/components/page.component'; | 18 | import { PageComponent } from '@shared/components/page.component'; |
19 | import { Store } from '@ngrx/store'; | 19 | import { Store } from '@ngrx/store'; |
20 | import { AppState } from '@core/core.state'; | 20 | import { AppState } from '@core/core.state'; |
21 | -import { ActivatedRoute, Router } from '@angular/router'; | ||
22 | -import { WidgetService } from '@core/http/widget.service'; | ||
23 | -import { DialogService } from '@core/services/dialog.service'; | ||
24 | import { MatDialog } from '@angular/material/dialog'; | 21 | import { MatDialog } from '@angular/material/dialog'; |
25 | -import { TranslateService } from '@ngx-translate/core'; | ||
26 | import { Dashboard, WidgetLayout } from '@shared/models/dashboard.models'; | 22 | import { Dashboard, WidgetLayout } from '@shared/models/dashboard.models'; |
27 | import { IAliasController } from '@core/api/widget-api.models'; | 23 | import { IAliasController } from '@core/api/widget-api.models'; |
28 | -import { Widget, WidgetActionSource, WidgetTypeParameters } from '@shared/models/widget.models'; | 24 | +import { Widget } from '@shared/models/widget.models'; |
29 | import { WidgetComponentService } from '@home/components/widget/widget-component.service'; | 25 | import { WidgetComponentService } from '@home/components/widget/widget-component.service'; |
30 | import { WidgetConfigComponentData } from '../../models/widget-component.models'; | 26 | import { WidgetConfigComponentData } from '../../models/widget-component.models'; |
31 | -import { deepClone, isDefined, isString } from '@core/utils'; | ||
32 | -import { FormBuilder, FormGroup, NgForm, Validators } from '@angular/forms'; | ||
33 | -import { EntityType } from '@shared/models/entity-type.models'; | ||
34 | -import { Observable, of } from 'rxjs'; | ||
35 | -import { EntityAlias, EntityAliases } from '@shared/models/alias.models'; | ||
36 | -import { WidgetConfigCallbacks } from '@home/components/widget/widget-config.component.models'; | ||
37 | -import { | ||
38 | - EntityAliasesDialogComponent, | ||
39 | - EntityAliasesDialogData | ||
40 | -} from '@home/components/alias/entity-aliases-dialog.component'; | ||
41 | -import { | ||
42 | - EntityAliasDialogComponent, | ||
43 | - EntityAliasDialogData | ||
44 | -} from '@home/components/alias/entity-alias-dialog.component'; | ||
45 | -import { tap } from 'rxjs/operators'; | 27 | +import { isDefined, isString } from '@core/utils'; |
28 | +import { FormBuilder, FormGroup, NgForm } from '@angular/forms'; | ||
46 | 29 | ||
47 | @Component({ | 30 | @Component({ |
48 | selector: 'tb-edit-widget', | 31 | selector: 'tb-edit-widget', |
@@ -14,19 +14,15 @@ | @@ -14,19 +14,15 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {Component, Inject, OnInit, SkipSelf} from '@angular/core'; | ||
18 | -import { ErrorStateMatcher } from '@angular/material/core'; | 17 | +import { Component, Inject, OnInit } from '@angular/core'; |
19 | import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; | 18 | import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; |
20 | -import {PageComponent} from '@shared/components/page.component'; | ||
21 | -import {Store} from '@ngrx/store'; | ||
22 | -import {AppState} from '@core/core.state'; | ||
23 | -import {FormBuilder, FormControl, FormGroup, FormGroupDirective, NgForm} from '@angular/forms'; | ||
24 | -import {EntityType} from '@shared/models/entity-type.models'; | ||
25 | -import {DashboardService} from '@core/http/dashboard.service'; | ||
26 | -import {forkJoin, Observable} from 'rxjs'; | ||
27 | -import {DashboardInfo} from '@app/shared/models/dashboard.models'; | ||
28 | -import {ActionNotificationShow} from '@core/notification/notification.actions'; | ||
29 | -import {TranslateService} from '@ngx-translate/core'; | 19 | +import { Store } from '@ngrx/store'; |
20 | +import { AppState } from '@core/core.state'; | ||
21 | +import { FormBuilder } from '@angular/forms'; | ||
22 | +import { DashboardService } from '@core/http/dashboard.service'; | ||
23 | +import { DashboardInfo } from '@app/shared/models/dashboard.models'; | ||
24 | +import { ActionNotificationShow } from '@core/notification/notification.actions'; | ||
25 | +import { TranslateService } from '@ngx-translate/core'; | ||
30 | import { DialogComponent } from '@shared/components/dialog.component'; | 26 | import { DialogComponent } from '@shared/components/dialog.component'; |
31 | import { Router } from '@angular/router'; | 27 | import { Router } from '@angular/router'; |
32 | 28 |
@@ -14,16 +14,15 @@ | @@ -14,16 +14,15 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {Component, Inject, OnInit, SkipSelf} from '@angular/core'; | 17 | +import { Component, Inject, OnInit, SkipSelf } from '@angular/core'; |
18 | import { ErrorStateMatcher } from '@angular/material/core'; | 18 | import { ErrorStateMatcher } from '@angular/material/core'; |
19 | import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; | 19 | import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; |
20 | -import {PageComponent} from '@shared/components/page.component'; | ||
21 | -import {Store} from '@ngrx/store'; | ||
22 | -import {AppState} from '@core/core.state'; | ||
23 | -import {FormBuilder, FormControl, FormGroup, FormGroupDirective, NgForm} from '@angular/forms'; | ||
24 | -import {EntityType} from '@shared/models/entity-type.models'; | ||
25 | -import {DashboardService} from '@core/http/dashboard.service'; | ||
26 | -import {forkJoin, Observable} from 'rxjs'; | 20 | +import { Store } from '@ngrx/store'; |
21 | +import { AppState } from '@core/core.state'; | ||
22 | +import { FormBuilder, FormControl, FormGroup, FormGroupDirective, NgForm } from '@angular/forms'; | ||
23 | +import { EntityType } from '@shared/models/entity-type.models'; | ||
24 | +import { DashboardService } from '@core/http/dashboard.service'; | ||
25 | +import { forkJoin, Observable } from 'rxjs'; | ||
27 | import { DialogComponent } from '@shared/components/dialog.component'; | 26 | import { DialogComponent } from '@shared/components/dialog.component'; |
28 | import { Router } from '@angular/router'; | 27 | import { Router } from '@angular/router'; |
29 | 28 | ||
@@ -122,13 +121,10 @@ export class ManageDashboardCustomersDialogComponent extends | @@ -122,13 +121,10 @@ export class ManageDashboardCustomersDialogComponent extends | ||
122 | switch (this.data.actionType) { | 121 | switch (this.data.actionType) { |
123 | case 'assign': | 122 | case 'assign': |
124 | return this.dashboardService.addDashboardCustomers(dashboardId, customerIds); | 123 | return this.dashboardService.addDashboardCustomers(dashboardId, customerIds); |
125 | - break; | ||
126 | case 'manage': | 124 | case 'manage': |
127 | return this.dashboardService.updateDashboardCustomers(dashboardId, customerIds); | 125 | return this.dashboardService.updateDashboardCustomers(dashboardId, customerIds); |
128 | - break; | ||
129 | case 'unassign': | 126 | case 'unassign': |
130 | return this.dashboardService.removeDashboardCustomers(dashboardId, customerIds); | 127 | return this.dashboardService.removeDashboardCustomers(dashboardId, customerIds); |
131 | - break; | ||
132 | } | 128 | } |
133 | } | 129 | } |
134 | } | 130 | } |
@@ -19,7 +19,7 @@ import { IDashboardController } from '../dashboard-page.models'; | @@ -19,7 +19,7 @@ import { IDashboardController } from '../dashboard-page.models'; | ||
19 | import { DashboardState } from '@app/shared/models/dashboard.models'; | 19 | import { DashboardState } from '@app/shared/models/dashboard.models'; |
20 | import { Subscription } from 'rxjs'; | 20 | import { Subscription } from 'rxjs'; |
21 | import { NgZone, OnDestroy, OnInit } from '@angular/core'; | 21 | import { NgZone, OnDestroy, OnInit } from '@angular/core'; |
22 | -import { ActivatedRoute, Router, Params } from '@angular/router'; | 22 | +import { ActivatedRoute, Params, Router } from '@angular/router'; |
23 | import { StatesControllerService } from '@home/pages/dashboard/states/states-controller.service'; | 23 | import { StatesControllerService } from '@home/pages/dashboard/states/states-controller.service'; |
24 | import { EntityId } from '@app/shared/models/id/entity-id'; | 24 | import { EntityId } from '@app/shared/models/id/entity-id'; |
25 | import { StateParams } from '@app/core/api/widget-api.models'; | 25 | import { StateParams } from '@app/core/api/widget-api.models'; |
@@ -18,8 +18,8 @@ import { Component } from '@angular/core'; | @@ -18,8 +18,8 @@ import { Component } from '@angular/core'; | ||
18 | import { Store } from '@ngrx/store'; | 18 | import { Store } from '@ngrx/store'; |
19 | import { AppState } from '@core/core.state'; | 19 | import { AppState } from '@core/core.state'; |
20 | import { EntityTableHeaderComponent } from '../../components/entity/entity-table-header.component'; | 20 | import { EntityTableHeaderComponent } from '../../components/entity/entity-table-header.component'; |
21 | -import {DeviceInfo} from '@app/shared/models/device.models'; | ||
22 | -import {EntityType} from '@shared/models/entity-type.models'; | 21 | +import { DeviceInfo } from '@app/shared/models/device.models'; |
22 | +import { EntityType } from '@shared/models/entity-type.models'; | ||
23 | 23 | ||
24 | @Component({ | 24 | @Component({ |
25 | selector: 'tb-device-table-header', | 25 | selector: 'tb-device-table-header', |
@@ -14,11 +14,11 @@ | @@ -14,11 +14,11 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {NgModule} from '@angular/core'; | ||
18 | -import {RouterModule, Routes} from '@angular/router'; | 17 | +import { NgModule } from '@angular/core'; |
18 | +import { RouterModule, Routes } from '@angular/router'; | ||
19 | 19 | ||
20 | -import {HomeLinksComponent} from './home-links.component'; | ||
21 | -import {Authority} from '@shared/models/authority.enum'; | 20 | +import { HomeLinksComponent } from './home-links.component'; |
21 | +import { Authority } from '@shared/models/authority.enum'; | ||
22 | 22 | ||
23 | const routes: Routes = [ | 23 | const routes: Routes = [ |
24 | { | 24 | { |
@@ -15,9 +15,6 @@ | @@ -15,9 +15,6 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import { Component, OnInit } from '@angular/core'; | 17 | import { Component, OnInit } from '@angular/core'; |
18 | -import { Store } from '@ngrx/store'; | ||
19 | -import { AppState } from '@core/core.state'; | ||
20 | -import { PageComponent } from '@shared/components/page.component'; | ||
21 | import { MenuService } from '@core/services/menu.service'; | 18 | import { MenuService } from '@core/services/menu.service'; |
22 | import { BreakpointObserver, BreakpointState } from '@angular/cdk/layout'; | 19 | import { BreakpointObserver, BreakpointState } from '@angular/cdk/layout'; |
23 | import { MediaBreakpoints } from '@shared/models/constants'; | 20 | import { MediaBreakpoints } from '@shared/models/constants'; |
@@ -18,7 +18,7 @@ import { NgModule } from '@angular/core'; | @@ -18,7 +18,7 @@ import { NgModule } from '@angular/core'; | ||
18 | import { CommonModule } from '@angular/common'; | 18 | import { CommonModule } from '@angular/common'; |
19 | 19 | ||
20 | import { HomeLinksRoutingModule } from './home-links-routing.module'; | 20 | import { HomeLinksRoutingModule } from './home-links-routing.module'; |
21 | -import { HomeLinksComponent} from './home-links.component'; | 21 | +import { HomeLinksComponent } from './home-links.component'; |
22 | import { SharedModule } from '@app/shared/shared.module'; | 22 | import { SharedModule } from '@app/shared/shared.module'; |
23 | 23 | ||
24 | @NgModule({ | 24 | @NgModule({ |
@@ -114,7 +114,7 @@ | @@ -114,7 +114,7 @@ | ||
114 | overflow-x: hidden; | 114 | overflow-x: hidden; |
115 | overflow-y: auto; | 115 | overflow-y: auto; |
116 | .mat-expansion-panel { | 116 | .mat-expansion-panel { |
117 | - border-radius: 0px; | 117 | + border-radius: 0; |
118 | &:last-child { | 118 | &:last-child { |
119 | margin-bottom: 5px; | 119 | margin-bottom: 5px; |
120 | } | 120 | } |
@@ -40,10 +40,12 @@ import { DialogService } from '@core/services/dialog.service'; | @@ -40,10 +40,12 @@ import { DialogService } from '@core/services/dialog.service'; | ||
40 | import { AuthService } from '@core/auth/auth.service'; | 40 | import { AuthService } from '@core/auth/auth.service'; |
41 | import { ActivatedRoute, Router } from '@angular/router'; | 41 | import { ActivatedRoute, Router } from '@angular/router'; |
42 | import { | 42 | import { |
43 | - inputNodeComponent, NodeConnectionInfo, | 43 | + inputNodeComponent, |
44 | + NodeConnectionInfo, | ||
44 | ResolvedRuleChainMetaData, | 45 | ResolvedRuleChainMetaData, |
45 | RuleChain, | 46 | RuleChain, |
46 | - RuleChainConnectionInfo, RuleChainImport, | 47 | + RuleChainConnectionInfo, |
48 | + RuleChainImport, | ||
47 | RuleChainMetaData, | 49 | RuleChainMetaData, |
48 | ruleChainNodeComponent | 50 | ruleChainNodeComponent |
49 | } from '@shared/models/rule-chain.models'; | 51 | } from '@shared/models/rule-chain.models'; |
@@ -73,8 +75,8 @@ import { MatMenuTrigger } from '@angular/material/menu'; | @@ -73,8 +75,8 @@ import { MatMenuTrigger } from '@angular/material/menu'; | ||
73 | import { ItemBufferService, RuleNodeConnection } from '@core/services/item-buffer.service'; | 75 | import { ItemBufferService, RuleNodeConnection } from '@core/services/item-buffer.service'; |
74 | import { Hotkey } from 'angular2-hotkeys'; | 76 | import { Hotkey } from 'angular2-hotkeys'; |
75 | import { EntityType } from '@shared/models/entity-type.models'; | 77 | import { EntityType } from '@shared/models/entity-type.models'; |
76 | -import Timeout = NodeJS.Timeout; | ||
77 | import { DebugEventType, EventType } from '@shared/models/event.models'; | 78 | import { DebugEventType, EventType } from '@shared/models/event.models'; |
79 | +import Timeout = NodeJS.Timeout; | ||
78 | 80 | ||
79 | @Component({ | 81 | @Component({ |
80 | selector: 'tb-rulechain-page', | 82 | selector: 'tb-rulechain-page', |
@@ -16,13 +16,16 @@ | @@ -16,13 +16,16 @@ | ||
16 | 16 | ||
17 | import * as AngularCore from '@angular/core'; | 17 | import * as AngularCore from '@angular/core'; |
18 | import { Injectable, NgModule } from '@angular/core'; | 18 | import { Injectable, NgModule } from '@angular/core'; |
19 | +import * as AngularRouter from '@angular/router'; | ||
19 | import { | 20 | import { |
20 | ActivatedRouteSnapshot, | 21 | ActivatedRouteSnapshot, |
21 | CanActivate, | 22 | CanActivate, |
22 | - Resolve, Router, | 23 | + Resolve, |
24 | + Router, | ||
23 | RouterModule, | 25 | RouterModule, |
24 | RouterStateSnapshot, | 26 | RouterStateSnapshot, |
25 | - Routes, UrlTree | 27 | + Routes, |
28 | + UrlTree | ||
26 | } from '@angular/router'; | 29 | } from '@angular/router'; |
27 | 30 | ||
28 | import { EntitiesTableComponent } from '../../components/entity/entities-table.component'; | 31 | import { EntitiesTableComponent } from '../../components/entity/entities-table.component'; |
@@ -40,7 +43,6 @@ import { ConfirmOnExitGuard } from '@core/guards/confirm-on-exit.guard'; | @@ -40,7 +43,6 @@ import { ConfirmOnExitGuard } from '@core/guards/confirm-on-exit.guard'; | ||
40 | 43 | ||
41 | import * as AngularCommon from '@angular/common'; | 44 | import * as AngularCommon from '@angular/common'; |
42 | import * as AngularForms from '@angular/forms'; | 45 | import * as AngularForms from '@angular/forms'; |
43 | -import * as AngularRouter from '@angular/router'; | ||
44 | import * as AngularCdkCoercion from '@angular/cdk/coercion'; | 46 | import * as AngularCdkCoercion from '@angular/cdk/coercion'; |
45 | import * as AngularCdkKeycodes from '@angular/cdk/keycodes'; | 47 | import * as AngularCdkKeycodes from '@angular/cdk/keycodes'; |
46 | import * as AngularMaterialChips from '@angular/material/chips'; | 48 | import * as AngularMaterialChips from '@angular/material/chips'; |
@@ -49,10 +51,10 @@ import * as AngularMaterialDialog from '@angular/material/dialog'; | @@ -49,10 +51,10 @@ import * as AngularMaterialDialog from '@angular/material/dialog'; | ||
49 | import * as NgrxStore from '@ngrx/store'; | 51 | import * as NgrxStore from '@ngrx/store'; |
50 | import * as TranslateCore from '@ngx-translate/core'; | 52 | import * as TranslateCore from '@ngx-translate/core'; |
51 | import * as TbCore from '@core/public-api'; | 53 | import * as TbCore from '@core/public-api'; |
54 | +import { ItemBufferService } from '@core/public-api'; | ||
52 | import * as TbShared from '@shared/public-api'; | 55 | import * as TbShared from '@shared/public-api'; |
53 | import * as TbHomeComponents from '@home/components/public-api'; | 56 | import * as TbHomeComponents from '@home/components/public-api'; |
54 | import * as _moment from 'moment'; | 57 | import * as _moment from 'moment'; |
55 | -import { ItemBufferService } from '@core/public-api'; | ||
56 | 58 | ||
57 | declare const SystemJS; | 59 | declare const SystemJS; |
58 | 60 |
@@ -18,7 +18,6 @@ import { Component } from '@angular/core'; | @@ -18,7 +18,6 @@ import { Component } from '@angular/core'; | ||
18 | import { Store } from '@ngrx/store'; | 18 | import { Store } from '@ngrx/store'; |
19 | import { AppState } from '@core/core.state'; | 19 | import { AppState } from '@core/core.state'; |
20 | import { EntityTabsComponent } from '../../components/entity/entity-tabs.component'; | 20 | import { EntityTabsComponent } from '../../components/entity/entity-tabs.component'; |
21 | -import { AssetInfo } from '@app/shared/models/asset.models'; | ||
22 | import { RuleChain } from '@shared/models/rule-chain.models'; | 21 | import { RuleChain } from '@shared/models/rule-chain.models'; |
23 | 22 | ||
24 | @Component({ | 23 | @Component({ |
@@ -124,7 +124,7 @@ | @@ -124,7 +124,7 @@ | ||
124 | fxLayoutAlign="start center" | 124 | fxLayoutAlign="start center" |
125 | *ngFor="let resource of widget.resources; let i = index" > | 125 | *ngFor="let resource of widget.resources; let i = index" > |
126 | <mat-form-field fxFlex class="mat-block resource-field" floatLabel="never" | 126 | <mat-form-field fxFlex class="mat-block resource-field" floatLabel="never" |
127 | - style="margin: 10px 0px 0px 0px; max-height: 40px;"> | 127 | + style="margin: 10px 0 0 0; max-height: 40px;"> |
128 | <input required matInput [(ngModel)]="resource.url" | 128 | <input required matInput [(ngModel)]="resource.url" |
129 | (ngModelChange)="isDirty = true" | 129 | (ngModelChange)="isDirty = true" |
130 | placeholder="{{ 'widget.resource-url' | translate }}"/> | 130 | placeholder="{{ 'widget.resource-url' | translate }}"/> |
@@ -45,8 +45,8 @@ import { | @@ -45,8 +45,8 @@ import { | ||
45 | SaveWidgetTypeAsDialogResult | 45 | SaveWidgetTypeAsDialogResult |
46 | } from '@home/pages/widget/save-widget-type-as-dialog.component'; | 46 | } from '@home/pages/widget/save-widget-type-as-dialog.component'; |
47 | import { Subscription } from 'rxjs'; | 47 | import { Subscription } from 'rxjs'; |
48 | -import Timeout = NodeJS.Timeout; | ||
49 | import { ResizeObserver } from '@juggle/resize-observer'; | 48 | import { ResizeObserver } from '@juggle/resize-observer'; |
49 | +import Timeout = NodeJS.Timeout; | ||
50 | 50 | ||
51 | // @dynamic | 51 | // @dynamic |
52 | @Component({ | 52 | @Component({ |
@@ -14,12 +14,12 @@ | @@ -14,12 +14,12 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {NgModule} from '@angular/core'; | ||
18 | -import {CommonModule} from '@angular/common'; | ||
19 | -import {SharedModule} from '@shared/shared.module'; | ||
20 | -import {WidgetsBundleComponent} from '@modules/home/pages/widget/widgets-bundle.component'; | ||
21 | -import {WidgetLibraryRoutingModule} from '@modules/home/pages/widget/widget-library-routing.module'; | ||
22 | -import {HomeComponentsModule} from '@modules/home/components/home-components.module'; | 17 | +import { NgModule } from '@angular/core'; |
18 | +import { CommonModule } from '@angular/common'; | ||
19 | +import { SharedModule } from '@shared/shared.module'; | ||
20 | +import { WidgetsBundleComponent } from '@modules/home/pages/widget/widgets-bundle.component'; | ||
21 | +import { WidgetLibraryRoutingModule } from '@modules/home/pages/widget/widget-library-routing.module'; | ||
22 | +import { HomeComponentsModule } from '@modules/home/components/home-components.module'; | ||
23 | import { WidgetLibraryComponent } from './widget-library.component'; | 23 | import { WidgetLibraryComponent } from './widget-library.component'; |
24 | import { WidgetEditorComponent } from '@home/pages/widget/widget-editor.component'; | 24 | import { WidgetEditorComponent } from '@home/pages/widget/widget-editor.component'; |
25 | import { SelectWidgetTypeDialogComponent } from '@home/pages/widget/select-widget-type-dialog.component'; | 25 | import { SelectWidgetTypeDialogComponent } from '@home/pages/widget/select-widget-type-dialog.component'; |
@@ -15,11 +15,11 @@ | @@ -15,11 +15,11 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import { Component, Inject } from '@angular/core'; | 17 | import { Component, Inject } from '@angular/core'; |
18 | -import {Store} from '@ngrx/store'; | ||
19 | -import {AppState} from '@core/core.state'; | ||
20 | -import {EntityComponent} from '../../components/entity/entity.component'; | ||
21 | -import {FormBuilder, FormGroup, Validators} from '@angular/forms'; | ||
22 | -import {WidgetsBundle} from '@shared/models/widgets-bundle.model'; | 18 | +import { Store } from '@ngrx/store'; |
19 | +import { AppState } from '@core/core.state'; | ||
20 | +import { EntityComponent } from '../../components/entity/entity.component'; | ||
21 | +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; | ||
22 | +import { WidgetsBundle } from '@shared/models/widgets-bundle.model'; | ||
23 | import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; | 23 | import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; |
24 | 24 | ||
25 | @Component({ | 25 | @Component({ |
@@ -22,8 +22,7 @@ import { PageComponent } from '@shared/components/page.component'; | @@ -22,8 +22,7 @@ import { PageComponent } from '@shared/components/page.component'; | ||
22 | import { FormBuilder } from '@angular/forms'; | 22 | import { FormBuilder } from '@angular/forms'; |
23 | import { HttpErrorResponse } from '@angular/common/http'; | 23 | import { HttpErrorResponse } from '@angular/common/http'; |
24 | import { Constants } from '@shared/models/constants'; | 24 | import { Constants } from '@shared/models/constants'; |
25 | -import { Router } from '@angular/router'; | ||
26 | -import { ActivatedRoute } from '@angular/router'; | 25 | +import { ActivatedRoute, Router } from '@angular/router'; |
27 | 26 | ||
28 | @Component({ | 27 | @Component({ |
29 | selector: 'tb-login', | 28 | selector: 'tb-login', |
@@ -14,16 +14,7 @@ | @@ -14,16 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { | ||
18 | - animate, | ||
19 | - keyframes, | ||
20 | - query, | ||
21 | - stagger, | ||
22 | - state, | ||
23 | - style, | ||
24 | - transition, | ||
25 | - trigger | ||
26 | -} from '@angular/animations'; | 17 | +import { animate, keyframes, query, stagger, state, style, transition, trigger } from '@angular/animations'; |
27 | 18 | ||
28 | export const speedDialFabAnimations = [ | 19 | export const speedDialFabAnimations = [ |
29 | trigger('fabToggler', [ | 20 | trigger('fabToggler', [ |
@@ -14,9 +14,7 @@ | @@ -14,9 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Directive, ElementRef, ViewContainerRef, ComponentFactoryResolver, ComponentRef, Input } from '@angular/core'; | ||
18 | -import { Overlay } from '@angular/cdk/overlay'; | ||
19 | -import { MatProgressBar } from '@angular/material/progress-bar'; | 17 | +import { ComponentFactoryResolver, ComponentRef, Directive, ElementRef, Input, ViewContainerRef } from '@angular/core'; |
20 | import { MatSpinner } from '@angular/material/progress-spinner'; | 18 | import { MatSpinner } from '@angular/material/progress-spinner'; |
21 | 19 | ||
22 | @Directive({ | 20 | @Directive({ |
@@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
37 | <div formGroupName="payload" fxLayout="column" style="height: 100%;"> | 37 | <div formGroupName="payload" fxLayout="column" style="height: 100%;"> |
38 | <div fxLayout="row"> | 38 | <div fxLayout="row"> |
39 | <tb-message-type-autocomplete | 39 | <tb-message-type-autocomplete |
40 | - style="margin-bottom: 0px; min-width: 300px;" | 40 | + style="margin-bottom: 0; min-width: 300px;" |
41 | formControlName="msgType" | 41 | formControlName="msgType" |
42 | required> | 42 | required> |
43 | </tb-message-type-autocomplete> | 43 | </tb-message-type-autocomplete> |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {Component} from '@angular/core'; | 17 | +import { Component } from '@angular/core'; |
18 | import { MatDialogRef } from '@angular/material/dialog'; | 18 | import { MatDialogRef } from '@angular/material/dialog'; |
19 | 19 | ||
20 | @Component({ | 20 | @Component({ |
@@ -14,16 +14,18 @@ | @@ -14,16 +14,18 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {Directive, ElementRef, forwardRef, HostListener, Renderer2, SkipSelf} from '@angular/core'; | 17 | +import { Directive, ElementRef, forwardRef, HostListener, Renderer2, SkipSelf } from '@angular/core'; |
18 | import { | 18 | import { |
19 | ControlValueAccessor, | 19 | ControlValueAccessor, |
20 | - FormControl, FormGroupDirective, | 20 | + FormControl, |
21 | + FormGroupDirective, | ||
21 | NG_VALIDATORS, | 22 | NG_VALIDATORS, |
22 | - NG_VALUE_ACCESSOR, NgForm, | 23 | + NG_VALUE_ACCESSOR, |
24 | + NgForm, | ||
23 | ValidationErrors, | 25 | ValidationErrors, |
24 | Validator | 26 | Validator |
25 | } from '@angular/forms'; | 27 | } from '@angular/forms'; |
26 | -import {ErrorStateMatcher} from '@angular/material/core'; | 28 | +import { ErrorStateMatcher } from '@angular/material/core'; |
27 | 29 | ||
28 | @Directive({ | 30 | @Directive({ |
29 | selector: '[tb-json-to-string]', | 31 | selector: '[tb-json-to-string]', |
@@ -14,15 +14,15 @@ | @@ -14,15 +14,15 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {AfterViewInit, Component, forwardRef, Input, OnInit} from '@angular/core'; | ||
18 | -import {ControlValueAccessor, FormBuilder, FormGroup, NG_VALUE_ACCESSOR} from '@angular/forms'; | ||
19 | -import {Store} from '@ngrx/store'; | ||
20 | -import {AppState} from '@core/core.state'; | ||
21 | -import {TranslateService} from '@ngx-translate/core'; | ||
22 | -import {AliasEntityType, EntityType, entityTypeTranslations} from '@shared/models/entity-type.models'; | ||
23 | -import {EntityService} from '@core/http/entity.service'; | ||
24 | -import {EntityId} from '@shared/models/id/entity-id'; | ||
25 | -import {coerceBooleanProperty} from '@angular/cdk/coercion'; | 17 | +import { AfterViewInit, Component, forwardRef, Input, OnInit } from '@angular/core'; |
18 | +import { ControlValueAccessor, FormBuilder, FormGroup, NG_VALUE_ACCESSOR } from '@angular/forms'; | ||
19 | +import { Store } from '@ngrx/store'; | ||
20 | +import { AppState } from '@core/core.state'; | ||
21 | +import { TranslateService } from '@ngx-translate/core'; | ||
22 | +import { AliasEntityType, EntityType } from '@shared/models/entity-type.models'; | ||
23 | +import { EntityService } from '@core/http/entity.service'; | ||
24 | +import { EntityId } from '@shared/models/id/entity-id'; | ||
25 | +import { coerceBooleanProperty } from '@angular/cdk/coercion'; | ||
26 | 26 | ||
27 | interface EntityListSelectModel { | 27 | interface EntityListSelectModel { |
28 | entityType: EntityType | AliasEntityType; | 28 | entityType: EntityType | AliasEntityType; |
@@ -15,38 +15,29 @@ | @@ -15,38 +15,29 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import { | 17 | import { |
18 | - AfterContentInit, | ||
19 | AfterViewInit, | 18 | AfterViewInit, |
20 | Component, | 19 | Component, |
21 | ElementRef, | 20 | ElementRef, |
22 | forwardRef, | 21 | forwardRef, |
23 | - Input, OnChanges, | ||
24 | - OnInit, SimpleChanges, | ||
25 | - SkipSelf, | 22 | + Input, |
23 | + OnChanges, | ||
24 | + OnInit, | ||
25 | + SimpleChanges, | ||
26 | ViewChild | 26 | ViewChild |
27 | } from '@angular/core'; | 27 | } from '@angular/core'; |
28 | -import { | ||
29 | - ControlValueAccessor, | ||
30 | - FormBuilder, | ||
31 | - FormControl, | ||
32 | - FormGroup, | ||
33 | - FormGroupDirective, | ||
34 | - NG_VALUE_ACCESSOR, NgForm, Validators | ||
35 | -} from '@angular/forms'; | ||
36 | -import {Observable, of} from 'rxjs'; | ||
37 | -import {map, mergeMap, startWith, tap, share, pairwise, filter} from 'rxjs/operators'; | ||
38 | -import {Store} from '@ngrx/store'; | ||
39 | -import {AppState} from '@app/core/core.state'; | ||
40 | -import {TranslateService} from '@ngx-translate/core'; | ||
41 | -import {AliasEntityType, EntityType} from '@shared/models/entity-type.models'; | ||
42 | -import {BaseData} from '@shared/models/base-data'; | ||
43 | -import {EntityId} from '@shared/models/id/entity-id'; | ||
44 | -import {EntityService} from '@core/http/entity.service'; | ||
45 | -import { MatAutocomplete, MatAutocompleteSelectedEvent } from '@angular/material/autocomplete'; | 28 | +import { ControlValueAccessor, FormBuilder, FormGroup, NG_VALUE_ACCESSOR, Validators } from '@angular/forms'; |
29 | +import { Observable } from 'rxjs'; | ||
30 | +import { filter, map, mergeMap, share, tap } from 'rxjs/operators'; | ||
31 | +import { Store } from '@ngrx/store'; | ||
32 | +import { AppState } from '@app/core/core.state'; | ||
33 | +import { TranslateService } from '@ngx-translate/core'; | ||
34 | +import { EntityType } from '@shared/models/entity-type.models'; | ||
35 | +import { BaseData } from '@shared/models/base-data'; | ||
36 | +import { EntityId } from '@shared/models/id/entity-id'; | ||
37 | +import { EntityService } from '@core/http/entity.service'; | ||
38 | +import { MatAutocomplete } from '@angular/material/autocomplete'; | ||
46 | import { MatChipList } from '@angular/material/chips'; | 39 | import { MatChipList } from '@angular/material/chips'; |
47 | -import { ErrorStateMatcher } from '@angular/material/core'; | ||
48 | import { coerceBooleanProperty } from '@angular/cdk/coercion'; | 40 | import { coerceBooleanProperty } from '@angular/cdk/coercion'; |
49 | -import { emptyPageData } from '@shared/models/page/page-data'; | ||
50 | 41 | ||
51 | @Component({ | 42 | @Component({ |
52 | selector: 'tb-entity-list', | 43 | selector: 'tb-entity-list', |
@@ -14,27 +14,19 @@ | @@ -14,27 +14,19 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {AfterViewInit, Component, ElementRef, forwardRef, Input, OnInit, ViewChild, OnDestroy} from '@angular/core'; | ||
18 | -import {ControlValueAccessor, FormBuilder, FormGroup, NG_VALUE_ACCESSOR} from '@angular/forms'; | ||
19 | -import {Observable, of, throwError, Subscription} from 'rxjs'; | ||
20 | -import {PageLink} from '@shared/models/page/page-link'; | ||
21 | -import {Direction} from '@shared/models/page/sort-order'; | ||
22 | -import {filter, map, mergeMap, publishReplay, refCount, startWith, tap, publish} from 'rxjs/operators'; | ||
23 | -import {PageData, emptyPageData} from '@shared/models/page/page-data'; | ||
24 | -import {DashboardInfo} from '@app/shared/models/dashboard.models'; | ||
25 | -import {DashboardId} from '@app/shared/models/id/dashboard-id'; | ||
26 | -import {DashboardService} from '@core/http/dashboard.service'; | ||
27 | -import {Store} from '@ngrx/store'; | ||
28 | -import {AppState} from '@app/core/core.state'; | ||
29 | -import {getCurrentAuthUser} from '@app/core/auth/auth.selectors'; | ||
30 | -import {Authority} from '@shared/models/authority.enum'; | ||
31 | -import {TranslateService} from '@ngx-translate/core'; | ||
32 | -import {DeviceService} from '@core/http/device.service'; | ||
33 | -import {EntitySubtype, EntityType} from '@app/shared/models/entity-type.models'; | ||
34 | -import {BroadcastService} from '@app/core/services/broadcast.service'; | ||
35 | -import {coerceBooleanProperty} from '@angular/cdk/coercion'; | ||
36 | -import {AssetService} from '@core/http/asset.service'; | ||
37 | -import {EntityViewService} from '@core/http/entity-view.service'; | 17 | +import { AfterViewInit, Component, ElementRef, forwardRef, Input, OnDestroy, OnInit, ViewChild } from '@angular/core'; |
18 | +import { ControlValueAccessor, FormBuilder, FormGroup, NG_VALUE_ACCESSOR } from '@angular/forms'; | ||
19 | +import { Observable, Subscription, throwError } from 'rxjs'; | ||
20 | +import { map, mergeMap, publishReplay, refCount, tap } from 'rxjs/operators'; | ||
21 | +import { Store } from '@ngrx/store'; | ||
22 | +import { AppState } from '@app/core/core.state'; | ||
23 | +import { TranslateService } from '@ngx-translate/core'; | ||
24 | +import { DeviceService } from '@core/http/device.service'; | ||
25 | +import { EntitySubtype, EntityType } from '@app/shared/models/entity-type.models'; | ||
26 | +import { BroadcastService } from '@app/core/services/broadcast.service'; | ||
27 | +import { coerceBooleanProperty } from '@angular/cdk/coercion'; | ||
28 | +import { AssetService } from '@core/http/asset.service'; | ||
29 | +import { EntityViewService } from '@core/http/entity-view.service'; | ||
38 | 30 | ||
39 | @Component({ | 31 | @Component({ |
40 | selector: 'tb-entity-subtype-autocomplete', | 32 | selector: 'tb-entity-subtype-autocomplete', |
@@ -14,44 +14,21 @@ | @@ -14,44 +14,21 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { | ||
18 | - AfterContentInit, | ||
19 | - AfterViewInit, | ||
20 | - Component, | ||
21 | - ElementRef, | ||
22 | - forwardRef, | ||
23 | - Input, OnDestroy, | ||
24 | - OnInit, | ||
25 | - SkipSelf, | ||
26 | - ViewChild | ||
27 | -} from '@angular/core'; | ||
28 | -import { | ||
29 | - ControlValueAccessor, | ||
30 | - FormBuilder, | ||
31 | - FormControl, | ||
32 | - FormGroup, | ||
33 | - FormGroupDirective, | ||
34 | - NG_VALUE_ACCESSOR, NgForm, Validators | ||
35 | -} from '@angular/forms'; | ||
36 | -import { Observable, of, Subscription, throwError } from 'rxjs'; | ||
37 | -import { map, mergeMap, startWith, tap, share, pairwise, filter, publishReplay, refCount } from 'rxjs/operators'; | ||
38 | -import {Store} from '@ngrx/store'; | ||
39 | -import {AppState} from '@app/core/core.state'; | ||
40 | -import {TranslateService} from '@ngx-translate/core'; | ||
41 | -import { AliasEntityType, EntitySubtype, EntityType, entityTypeTranslations } from '@shared/models/entity-type.models'; | ||
42 | -import {BaseData} from '@shared/models/base-data'; | ||
43 | -import {EntityId} from '@shared/models/id/entity-id'; | ||
44 | -import {EntityService} from '@core/http/entity.service'; | 17 | +import { AfterViewInit, Component, ElementRef, forwardRef, Input, OnDestroy, OnInit, ViewChild } from '@angular/core'; |
18 | +import { ControlValueAccessor, FormBuilder, FormGroup, NG_VALUE_ACCESSOR, Validators } from '@angular/forms'; | ||
19 | +import { Observable, Subscription, throwError } from 'rxjs'; | ||
20 | +import { map, mergeMap, publishReplay, refCount, share } from 'rxjs/operators'; | ||
21 | +import { Store } from '@ngrx/store'; | ||
22 | +import { AppState } from '@app/core/core.state'; | ||
23 | +import { TranslateService } from '@ngx-translate/core'; | ||
24 | +import { EntitySubtype, EntityType } from '@shared/models/entity-type.models'; | ||
45 | import { MatAutocomplete, MatAutocompleteSelectedEvent } from '@angular/material/autocomplete'; | 25 | import { MatAutocomplete, MatAutocompleteSelectedEvent } from '@angular/material/autocomplete'; |
46 | -import { MatChipList } from '@angular/material/chips'; | ||
47 | -import { ErrorStateMatcher } from '@angular/material/core'; | 26 | +import { MatChipInputEvent, MatChipList } from '@angular/material/chips'; |
48 | import { coerceBooleanProperty } from '@angular/cdk/coercion'; | 27 | import { coerceBooleanProperty } from '@angular/cdk/coercion'; |
49 | -import { emptyPageData } from '@shared/models/page/page-data'; | ||
50 | import { AssetService } from '@core/http/asset.service'; | 28 | import { AssetService } from '@core/http/asset.service'; |
51 | import { DeviceService } from '@core/http/device.service'; | 29 | import { DeviceService } from '@core/http/device.service'; |
52 | import { EntityViewService } from '@core/http/entity-view.service'; | 30 | import { EntityViewService } from '@core/http/entity-view.service'; |
53 | import { BroadcastService } from '@core/services/broadcast.service'; | 31 | import { BroadcastService } from '@core/services/broadcast.service'; |
54 | -import { MatChipInputEvent } from '@angular/material/chips'; | ||
55 | import { COMMA, ENTER, SEMICOLON } from '@angular/cdk/keycodes'; | 32 | import { COMMA, ENTER, SEMICOLON } from '@angular/cdk/keycodes'; |
56 | 33 | ||
57 | @Component({ | 34 | @Component({ |
@@ -143,7 +143,6 @@ export class FabToolbarComponent extends MatFabToolbarMixinBase implements OnIni | @@ -143,7 +143,6 @@ export class FabToolbarComponent extends MatFabToolbarMixinBase implements OnIni | ||
143 | const actions = element.find('mat-fab-actions').children(); | 143 | const actions = element.find('mat-fab-actions').children(); |
144 | if (triggerElement && backgroundElement) { | 144 | if (triggerElement && backgroundElement) { |
145 | const width = el.offsetWidth; | 145 | const width = el.offsetWidth; |
146 | - const height = el.offsetHeight; | ||
147 | const scale = 2 * (width / triggerElement.offsetWidth); | 146 | const scale = 2 * (width / triggerElement.offsetWidth); |
148 | 147 | ||
149 | backgroundElement.style.borderRadius = width + 'px'; | 148 | backgroundElement.style.borderRadius = width + 'px'; |
@@ -20,7 +20,7 @@ $previewSize: 100px !default; | @@ -20,7 +20,7 @@ $previewSize: 100px !default; | ||
20 | :host { | 20 | :host { |
21 | 21 | ||
22 | .tb-container { | 22 | .tb-container { |
23 | - margin-top: 0px; | 23 | + margin-top: 0; |
24 | label.tb-title { | 24 | label.tb-title { |
25 | display: block; | 25 | display: block; |
26 | padding-bottom: 8px; | 26 | padding-bottom: 8px; |
@@ -22,7 +22,8 @@ import { | @@ -22,7 +22,8 @@ import { | ||
22 | Input, | 22 | Input, |
23 | OnChanges, | 23 | OnChanges, |
24 | OnDestroy, | 24 | OnDestroy, |
25 | - Output, SimpleChanges, | 25 | + Output, |
26 | + SimpleChanges, | ||
26 | ViewChild | 27 | ViewChild |
27 | } from '@angular/core'; | 28 | } from '@angular/core'; |
28 | import { PageComponent } from '@shared/components/page.component'; | 29 | import { PageComponent } from '@shared/components/page.component'; |
@@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
40 | 40 | ||
41 | .tb-btn-footer { | 41 | .tb-btn-footer { |
42 | &.fab-toggler { | 42 | &.fab-toggler { |
43 | - margin-top: 0px; | 43 | + margin-top: 0; |
44 | } | 44 | } |
45 | position: relative !important; | 45 | position: relative !important; |
46 | display: inline-block !important; | 46 | display: inline-block !important; |
@@ -18,8 +18,13 @@ import { | @@ -18,8 +18,13 @@ import { | ||
18 | Directive, | 18 | Directive, |
19 | ElementRef, | 19 | ElementRef, |
20 | EventEmitter, | 20 | EventEmitter, |
21 | - Input, OnChanges, OnDestroy, | ||
22 | - Output, Renderer2, SecurityContext, SimpleChanges, | 21 | + Input, |
22 | + OnChanges, | ||
23 | + OnDestroy, | ||
24 | + Output, | ||
25 | + Renderer2, | ||
26 | + SecurityContext, | ||
27 | + SimpleChanges, | ||
23 | ViewContainerRef | 28 | ViewContainerRef |
24 | } from '@angular/core'; | 29 | } from '@angular/core'; |
25 | import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay'; | 30 | import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay'; |
@@ -14,8 +14,8 @@ | @@ -14,8 +14,8 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {Directive, Input, OnInit, OnDestroy, ElementRef} from '@angular/core'; | ||
18 | -import {Hotkey, ExtendedKeyboardEvent} from 'angular2-hotkeys'; | 17 | +import { Directive, ElementRef, Input, OnDestroy, OnInit } from '@angular/core'; |
18 | +import { Hotkey } from 'angular2-hotkeys'; | ||
19 | import 'mousetrap'; | 19 | import 'mousetrap'; |
20 | import { TbCheatSheetComponent } from '@shared/components/cheatsheet.component'; | 20 | import { TbCheatSheetComponent } from '@shared/components/cheatsheet.component'; |
21 | 21 |
@@ -20,7 +20,7 @@ $previewSize: 100px !default; | @@ -20,7 +20,7 @@ $previewSize: 100px !default; | ||
20 | :host { | 20 | :host { |
21 | 21 | ||
22 | .tb-container { | 22 | .tb-container { |
23 | - margin-top: 0px; | 23 | + margin-top: 0; |
24 | label.tb-title { | 24 | label.tb-title { |
25 | display: block; | 25 | display: block; |
26 | padding-bottom: 8px; | 26 | padding-bottom: 8px; |
@@ -16,10 +16,7 @@ | @@ -16,10 +16,7 @@ | ||
16 | import * as React from 'react'; | 16 | import * as React from 'react'; |
17 | import ThingsboardBaseComponent from './json-form-base-component'; | 17 | import ThingsboardBaseComponent from './json-form-base-component'; |
18 | import DateFnsUtils from '@date-io/date-fns'; | 18 | import DateFnsUtils from '@date-io/date-fns'; |
19 | -import { | ||
20 | - MuiPickersUtilsProvider, | ||
21 | - KeyboardDatePicker | ||
22 | -} from '@material-ui/pickers'; | 19 | +import { KeyboardDatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers'; |
23 | import { JsonFormFieldProps, JsonFormFieldState } from '@shared/components/json-form/react/json-form.models'; | 20 | import { JsonFormFieldProps, JsonFormFieldState } from '@shared/components/json-form/react/json-form.models'; |
24 | 21 | ||
25 | interface ThingsboardDateState extends JsonFormFieldState { | 22 | interface ThingsboardDateState extends JsonFormFieldState { |
@@ -13,10 +13,9 @@ | @@ -13,10 +13,9 @@ | ||
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -import React, {useCallback} from 'react'; | ||
17 | -import { DropzoneState, useDropzone } from 'react-dropzone'; | ||
18 | -import ThingsboardBaseComponent from './json-form-base-component'; | 16 | +import React from 'react'; |
19 | import Dropzone from 'react-dropzone'; | 17 | import Dropzone from 'react-dropzone'; |
18 | +import ThingsboardBaseComponent from './json-form-base-component'; | ||
20 | import { JsonFormFieldProps, JsonFormFieldState } from '@shared/components/json-form/react/json-form.models'; | 19 | import { JsonFormFieldProps, JsonFormFieldState } from '@shared/components/json-form/react/json-form.models'; |
21 | import IconButton from '@material-ui/core/IconButton'; | 20 | import IconButton from '@material-ui/core/IconButton'; |
22 | import ClearIcon from '@material-ui/icons/Clear'; | 21 | import ClearIcon from '@material-ui/icons/Clear'; |
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | import * as React from 'react'; | 16 | import * as React from 'react'; |
17 | import { JsonFormFieldProps, JsonFormFieldState } from '@shared/components/json-form/react/json-form.models'; | 17 | import { JsonFormFieldProps, JsonFormFieldState } from '@shared/components/json-form/react/json-form.models'; |
18 | import FormControlLabel from '@material-ui/core/FormControlLabel'; | 18 | import FormControlLabel from '@material-ui/core/FormControlLabel'; |
19 | -import { Radio, FormLabel, RadioGroup } from '@material-ui/core'; | 19 | +import { FormLabel, Radio, RadioGroup } from '@material-ui/core'; |
20 | import FormControl from '@material-ui/core/FormControl'; | 20 | import FormControl from '@material-ui/core/FormControl'; |
21 | import ThingsboardBaseComponent from '@shared/components/json-form/react/json-form-base-component'; | 21 | import ThingsboardBaseComponent from '@shared/components/json-form/react/json-form-base-component'; |
22 | 22 |
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | */ | 15 | */ |
16 | import * as React from 'react'; | 16 | import * as React from 'react'; |
17 | import ThingsboardBaseComponent from './json-form-base-component'; | 17 | import ThingsboardBaseComponent from './json-form-base-component'; |
18 | -import Select, {Option} from 'rc-select'; | 18 | +import Select, { Option } from 'rc-select'; |
19 | import { | 19 | import { |
20 | JsonFormFieldProps, | 20 | JsonFormFieldProps, |
21 | JsonFormFieldState, | 21 | JsonFormFieldState, |
@@ -33,11 +33,12 @@ import ThingsboardCheckbox from './json-form-checkbox'; | @@ -33,11 +33,12 @@ import ThingsboardCheckbox from './json-form-checkbox'; | ||
33 | import ThingsboardHelp from './json-form-help'; | 33 | import ThingsboardHelp from './json-form-help'; |
34 | import ThingsboardFieldSet from './json-form-fieldset'; | 34 | import ThingsboardFieldSet from './json-form-fieldset'; |
35 | import ThingsboardIcon from './json-form-icon'; | 35 | import ThingsboardIcon from './json-form-icon'; |
36 | -import { JsonFormProps, JsonFormData, onChangeFn, OnColorClickFn, OnIconClickFn } from './json-form.models'; | 36 | +import { JsonFormData, JsonFormProps, onChangeFn, OnColorClickFn, OnIconClickFn } from './json-form.models'; |
37 | 37 | ||
38 | import _ from 'lodash'; | 38 | import _ from 'lodash'; |
39 | import * as tinycolor_ from 'tinycolor2'; | 39 | import * as tinycolor_ from 'tinycolor2'; |
40 | import { GroupInfo } from '@shared/models/widget.models'; | 40 | import { GroupInfo } from '@shared/models/widget.models'; |
41 | + | ||
41 | const tinycolor = tinycolor_; | 42 | const tinycolor = tinycolor_; |
42 | 43 | ||
43 | class ThingsboardSchemaForm extends React.Component<JsonFormProps, any> { | 44 | class ThingsboardSchemaForm extends React.Component<JsonFormProps, any> { |
@@ -14,11 +14,7 @@ | @@ -14,11 +14,7 @@ | ||
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | import * as React from 'react'; | 16 | import * as React from 'react'; |
17 | -import { | ||
18 | - JsonFormFieldProps, | ||
19 | - JsonFormFieldState, | ||
20 | - KeyLabelItem | ||
21 | -} from '@shared/components/json-form/react/json-form.models'; | 17 | +import { JsonFormFieldProps, JsonFormFieldState } from '@shared/components/json-form/react/json-form.models'; |
22 | import MenuItem from '@material-ui/core/MenuItem'; | 18 | import MenuItem from '@material-ui/core/MenuItem'; |
23 | import FormControl from '@material-ui/core/FormControl'; | 19 | import FormControl from '@material-ui/core/FormControl'; |
24 | import InputLabel from '@material-ui/core/InputLabel'; | 20 | import InputLabel from '@material-ui/core/InputLabel'; |
@@ -17,7 +17,6 @@ import * as React from 'react'; | @@ -17,7 +17,6 @@ import * as React from 'react'; | ||
17 | import ThingsboardBaseComponent from './json-form-base-component'; | 17 | import ThingsboardBaseComponent from './json-form-base-component'; |
18 | import TextField from '@material-ui/core/TextField'; | 18 | import TextField from '@material-ui/core/TextField'; |
19 | import { JsonFormFieldProps, JsonFormFieldState } from '@shared/components/json-form/react/json-form.models'; | 19 | import { JsonFormFieldProps, JsonFormFieldState } from '@shared/components/json-form/react/json-form.models'; |
20 | -import { FormControl } from '@material-ui/core'; | ||
21 | 20 | ||
22 | interface ThingsboardTextState extends JsonFormFieldState { | 21 | interface ThingsboardTextState extends JsonFormFieldState { |
23 | focused: boolean; | 22 | focused: boolean; |
@@ -18,11 +18,11 @@ import * as tv from 'tv4'; | @@ -18,11 +18,11 @@ import * as tv from 'tv4'; | ||
18 | import ObjectPath from 'objectpath'; | 18 | import ObjectPath from 'objectpath'; |
19 | import _ from 'lodash'; | 19 | import _ from 'lodash'; |
20 | import { | 20 | import { |
21 | - SchemaValidationResult, | ||
22 | DefaultsFormOptions, | 21 | DefaultsFormOptions, |
23 | FormOption, | 22 | FormOption, |
23 | + JsonFormData, | ||
24 | JsonSchemaData, | 24 | JsonSchemaData, |
25 | - JsonFormData | 25 | + SchemaValidationResult |
26 | } from './json-form.models'; | 26 | } from './json-form.models'; |
27 | import { isDefined, isEqual, isString, isUndefined } from '@core/utils'; | 27 | import { isDefined, isEqual, isString, isUndefined } from '@core/utils'; |
28 | 28 |
@@ -319,7 +319,7 @@ $previewSize: 100px !default; | @@ -319,7 +319,7 @@ $previewSize: 100px !default; | ||
319 | z-index: 100001; | 319 | z-index: 100001; |
320 | background-color: white; | 320 | background-color: white; |
321 | border: 1px solid #d9d9d9; | 321 | border: 1px solid #d9d9d9; |
322 | - box-shadow: 0 0px 4px #d9d9d9; | 322 | + box-shadow: 0 0 4px #d9d9d9; |
323 | border-radius: 4px; | 323 | border-radius: 4px; |
324 | box-sizing: border-box; | 324 | box-sizing: border-box; |
325 | outline: none; | 325 | outline: none; |
@@ -14,21 +14,19 @@ | @@ -14,21 +14,19 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, EventEmitter, forwardRef, Input, OnInit, Output } from '@angular/core'; | 17 | +import { Component, forwardRef, Input, OnInit } from '@angular/core'; |
18 | import { | 18 | import { |
19 | AbstractControl, | 19 | AbstractControl, |
20 | - ControlValueAccessor, FormArray, | ||
21 | - FormBuilder, FormControl, | ||
22 | - FormGroup, NG_VALIDATORS, | ||
23 | - NG_VALUE_ACCESSOR, Validator, | ||
24 | - ValidatorFn, | 20 | + ControlValueAccessor, |
21 | + FormArray, | ||
22 | + FormBuilder, | ||
23 | + FormControl, | ||
24 | + FormGroup, | ||
25 | + NG_VALIDATORS, | ||
26 | + NG_VALUE_ACCESSOR, | ||
27 | + Validator, | ||
25 | Validators | 28 | Validators |
26 | } from '@angular/forms'; | 29 | } from '@angular/forms'; |
27 | -import { AliasFilterType, aliasFilterTypeTranslationMap, EntityAliasFilter } from '@shared/models/alias.models'; | ||
28 | -import { AliasEntityType, EntityType } from '@shared/models/entity-type.models'; | ||
29 | -import { TranslateService } from '@ngx-translate/core'; | ||
30 | -import { EntityService } from '@core/http/entity.service'; | ||
31 | -import { EntitySearchDirection, entitySearchDirectionTranslations, EntityTypeFilter } from '@shared/models/relation.models'; | ||
32 | import { PageComponent } from '@shared/components/page.component'; | 30 | import { PageComponent } from '@shared/components/page.component'; |
33 | import { Store } from '@ngrx/store'; | 31 | import { Store } from '@ngrx/store'; |
34 | import { AppState } from '@core/core.state'; | 32 | import { AppState } from '@core/core.state'; |
@@ -16,8 +16,7 @@ | @@ -16,8 +16,7 @@ | ||
16 | 16 | ||
17 | import { AfterViewInit, Component, ElementRef, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'; | 17 | import { AfterViewInit, Component, ElementRef, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'; |
18 | import { coerceBooleanProperty } from '@angular/cdk/coercion'; | 18 | import { coerceBooleanProperty } from '@angular/cdk/coercion'; |
19 | -import { RaphaelElement, RaphaelPaper, RaphaelSet } from 'raphael'; | ||
20 | -import Raphael from 'raphael'; | 19 | +import Raphael, { RaphaelElement, RaphaelPaper, RaphaelSet } from 'raphael'; |
21 | import * as tinycolor_ from 'tinycolor2'; | 20 | import * as tinycolor_ from 'tinycolor2'; |
22 | 21 | ||
23 | const tinycolor = tinycolor_; | 22 | const tinycolor = tinycolor_; |
@@ -17,18 +17,18 @@ | @@ -17,18 +17,18 @@ | ||
17 | display: inline-block; | 17 | display: inline-block; |
18 | pointer-events: all; | 18 | pointer-events: all; |
19 | .tb-toast { | 19 | .tb-toast { |
20 | - box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12); | 20 | + box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12); |
21 | color: #fff; | 21 | color: #fff; |
22 | font-size: 18px; | 22 | font-size: 18px; |
23 | border-radius: 4px; | 23 | border-radius: 4px; |
24 | - padding: 0px 18px; | 24 | + padding: 0 18px; |
25 | margin: 8px; | 25 | margin: 8px; |
26 | .toast-text { | 26 | .toast-text { |
27 | - padding: 0px 6px; | 27 | + padding: 0 6px; |
28 | width: 100%; | 28 | width: 100%; |
29 | } | 29 | } |
30 | button { | 30 | button { |
31 | - margin: 6px 0px 6px 12px; | 31 | + margin: 6px 0 6px 12px; |
32 | } | 32 | } |
33 | &.info-toast { | 33 | &.info-toast { |
34 | background: #323232; | 34 | background: #323232; |
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import { Component, Input } from '@angular/core'; | 17 | import { Component, Input } from '@angular/core'; |
18 | -import { trigger, state, style, transition, animate } from '@angular/animations'; | 18 | +import { animate, state, style, transition, trigger } from '@angular/animations'; |
19 | 19 | ||
20 | @Component({ | 20 | @Component({ |
21 | selector: 'tb-error', | 21 | selector: 'tb-error', |
@@ -51,16 +51,6 @@ | @@ -51,16 +51,6 @@ | ||
51 | padding: 0 0 2px; | 51 | padding: 0 0 2px; |
52 | margin: 2px; | 52 | margin: 2px; |
53 | line-height: 24px; | 53 | line-height: 24px; |
54 | - | ||
55 | - ng-mat-icon { | ||
56 | - width: 24px; | ||
57 | - height: 24px; | ||
58 | - | ||
59 | - svg { | ||
60 | - width: inherit; | ||
61 | - height: inherit; | ||
62 | - } | ||
63 | - } | ||
64 | } | 54 | } |
65 | } | 55 | } |
66 | 56 |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, OnInit, OnChanges, Input, Output, EventEmitter, ChangeDetectorRef } from '@angular/core'; | 17 | +import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core'; |
18 | import { interval } from 'rxjs'; | 18 | import { interval } from 'rxjs'; |
19 | import { filter } from 'rxjs/operators'; | 19 | import { filter } from 'rxjs/operators'; |
20 | import { HistorySelectSettings } from '@app/modules/home/components/widget/lib/maps/map-models'; | 20 | import { HistorySelectSettings } from '@app/modules/home/components/widget/lib/maps/map-models'; |
@@ -15,12 +15,16 @@ | @@ -15,12 +15,16 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import { | 17 | import { |
18 | - AfterViewInit, ApplicationRef, ChangeDetectorRef, | 18 | + AfterViewInit, |
19 | + ChangeDetectorRef, | ||
19 | Component, | 20 | Component, |
20 | Directive, | 21 | Directive, |
21 | ElementRef, | 22 | ElementRef, |
22 | - Inject, Input, NgZone, | ||
23 | - OnDestroy, ViewChild, | 23 | + Inject, |
24 | + Input, | ||
25 | + NgZone, | ||
26 | + OnDestroy, | ||
27 | + ViewChild, | ||
24 | ViewContainerRef | 28 | ViewContainerRef |
25 | } from '@angular/core'; | 29 | } from '@angular/core'; |
26 | import { MAT_SNACK_BAR_DATA, MatSnackBar, MatSnackBarConfig, MatSnackBarRef } from '@angular/material/snack-bar'; | 30 | import { MAT_SNACK_BAR_DATA, MatSnackBar, MatSnackBarConfig, MatSnackBarRef } from '@angular/material/snack-bar'; |
@@ -30,8 +34,8 @@ import { Subscription } from 'rxjs'; | @@ -30,8 +34,8 @@ import { Subscription } from 'rxjs'; | ||
30 | import { NotificationService } from '@app/core/services/notification.service'; | 34 | import { NotificationService } from '@app/core/services/notification.service'; |
31 | import { BreakpointObserver } from '@angular/cdk/layout'; | 35 | import { BreakpointObserver } from '@angular/cdk/layout'; |
32 | import { MediaBreakpoints } from '@shared/models/constants'; | 36 | import { MediaBreakpoints } from '@shared/models/constants'; |
33 | -import Timeout = NodeJS.Timeout; | ||
34 | import { MatButton } from '@angular/material/button'; | 37 | import { MatButton } from '@angular/material/button'; |
38 | +import Timeout = NodeJS.Timeout; | ||
35 | 39 | ||
36 | @Directive({ | 40 | @Directive({ |
37 | selector: '[tb-toast]' | 41 | selector: '[tb-toast]' |
@@ -55,7 +55,7 @@ | @@ -55,7 +55,7 @@ | ||
55 | </mat-error> | 55 | </mat-error> |
56 | </mat-form-field> | 56 | </mat-form-field> |
57 | <div fxLayout="column" fxLayoutAlign="center" fxFlex="60" *ngIf="valueType === valueTypeEnum.BOOLEAN"> | 57 | <div fxLayout="column" fxLayoutAlign="center" fxFlex="60" *ngIf="valueType === valueTypeEnum.BOOLEAN"> |
58 | - <mat-checkbox [disabled]="disabled" name="value" #value="ngModel" [(ngModel)]="modelValue" (ngModelChange)="onValueChanged()" style="margin-bottom: 0px;"> | 58 | + <mat-checkbox [disabled]="disabled" name="value" #value="ngModel" [(ngModel)]="modelValue" (ngModelChange)="onValueChanged()" style="margin-bottom: 0;"> |
59 | {{ (modelValue ? 'value.true' : 'value.false') | translate }} | 59 | {{ (modelValue ? 'value.true' : 'value.false') | translate }} |
60 | </mat-checkbox> | 60 | </mat-checkbox> |
61 | </div> | 61 | </div> |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, forwardRef, Input, OnChanges, OnInit, ViewEncapsulation, SimpleChanges } from '@angular/core'; | 17 | +import { Component, forwardRef, Input, OnChanges, OnInit, SimpleChanges, ViewEncapsulation } from '@angular/core'; |
18 | import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; | 18 | import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; |
19 | import { Observable } from 'rxjs'; | 19 | import { Observable } from 'rxjs'; |
20 | import { share, tap } from 'rxjs/operators'; | 20 | import { share, tap } from 'rxjs/operators'; |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { AliasEntityType, EntityType } from '@shared/models/entity-type.models'; | 17 | +import { EntityType } from '@shared/models/entity-type.models'; |
18 | import { EntityId } from '@shared/models/id/entity-id'; | 18 | import { EntityId } from '@shared/models/id/entity-id'; |
19 | import { EntitySearchDirection, EntityTypeFilter } from '@shared/models/relation.models'; | 19 | import { EntitySearchDirection, EntityTypeFilter } from '@shared/models/relation.models'; |
20 | import { EntityInfo } from './entity.models'; | 20 | import { EntityInfo } from './entity.models'; |
@@ -14,11 +14,10 @@ | @@ -14,11 +14,10 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {BaseData} from '@shared/models/base-data'; | ||
18 | -import {AssetId} from './id/asset-id'; | ||
19 | -import {TenantId} from '@shared/models/id/tenant-id'; | ||
20 | -import {CustomerId} from '@shared/models/id/customer-id'; | ||
21 | -import {DeviceCredentialsId} from '@shared/models/id/device-credentials-id'; | 17 | +import { BaseData } from '@shared/models/base-data'; |
18 | +import { AssetId } from './id/asset-id'; | ||
19 | +import { TenantId } from '@shared/models/id/tenant-id'; | ||
20 | +import { CustomerId } from '@shared/models/id/customer-id'; | ||
22 | import { EntitySearchQuery } from '@shared/models/relation.models'; | 21 | import { EntitySearchQuery } from '@shared/models/relation.models'; |
23 | 22 | ||
24 | export interface Asset extends BaseData<AssetId> { | 23 | export interface Asset extends BaseData<AssetId> { |
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | 16 | ||
17 | import { CustomerId } from '@shared/models/id/customer-id'; | 17 | import { CustomerId } from '@shared/models/id/customer-id'; |
18 | import { ContactBased } from '@shared/models/contact-based.model'; | 18 | import { ContactBased } from '@shared/models/contact-based.model'; |
19 | -import {TenantId} from './id/tenant-id'; | 19 | +import { TenantId } from './id/tenant-id'; |
20 | 20 | ||
21 | export interface Customer extends ContactBased<CustomerId> { | 21 | export interface Customer extends ContactBased<CustomerId> { |
22 | tenantId: TenantId; | 22 | tenantId: TenantId; |
@@ -20,8 +20,7 @@ import { TenantId } from '@shared/models/id/tenant-id'; | @@ -20,8 +20,7 @@ import { TenantId } from '@shared/models/id/tenant-id'; | ||
20 | import { ShortCustomerInfo } from '@shared/models/customer.model'; | 20 | import { ShortCustomerInfo } from '@shared/models/customer.model'; |
21 | import { Widget } from './widget.models'; | 21 | import { Widget } from './widget.models'; |
22 | import { Timewindow } from '@shared/models/time/time.models'; | 22 | import { Timewindow } from '@shared/models/time/time.models'; |
23 | -import { EntityType } from '@shared/models/entity-type.models'; | ||
24 | -import { EntityAlias, EntityAliases } from './alias.models'; | 23 | +import { EntityAliases } from './alias.models'; |
25 | 24 | ||
26 | export interface DashboardInfo extends BaseData<DashboardId> { | 25 | export interface DashboardInfo extends BaseData<DashboardId> { |
27 | tenantId?: TenantId; | 26 | tenantId?: TenantId; |
@@ -14,11 +14,11 @@ | @@ -14,11 +14,11 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {BaseData} from '@shared/models/base-data'; | ||
18 | -import {DeviceId} from './id/device-id'; | ||
19 | -import {TenantId} from '@shared/models/id/tenant-id'; | ||
20 | -import {CustomerId} from '@shared/models/id/customer-id'; | ||
21 | -import {DeviceCredentialsId} from '@shared/models/id/device-credentials-id'; | 17 | +import { BaseData } from '@shared/models/base-data'; |
18 | +import { DeviceId } from './id/device-id'; | ||
19 | +import { TenantId } from '@shared/models/id/tenant-id'; | ||
20 | +import { CustomerId } from '@shared/models/id/customer-id'; | ||
21 | +import { DeviceCredentialsId } from '@shared/models/id/device-credentials-id'; | ||
22 | import { EntitySearchQuery } from '@shared/models/relation.models'; | 22 | import { EntitySearchQuery } from '@shared/models/relation.models'; |
23 | 23 | ||
24 | export interface Device extends BaseData<DeviceId> { | 24 | export interface Device extends BaseData<DeviceId> { |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {TenantId} from './id/tenant-id'; | 17 | +import { TenantId } from './id/tenant-id'; |
18 | import { BaseData, HasId } from '@shared/models/base-data'; | 18 | import { BaseData, HasId } from '@shared/models/base-data'; |
19 | 19 | ||
20 | /// | 20 | /// |
@@ -14,12 +14,11 @@ | @@ -14,12 +14,11 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {BaseData} from '@shared/models/base-data'; | ||
18 | -import {AssetId} from './id/asset-id'; | ||
19 | -import {TenantId} from '@shared/models/id/tenant-id'; | ||
20 | -import {CustomerId} from '@shared/models/id/customer-id'; | ||
21 | -import {EntityViewId} from '@shared/models/id/entity-view-id'; | ||
22 | -import {EntityId} from '@shared/models/id/entity-id'; | 17 | +import { BaseData } from '@shared/models/base-data'; |
18 | +import { TenantId } from '@shared/models/id/tenant-id'; | ||
19 | +import { CustomerId } from '@shared/models/id/customer-id'; | ||
20 | +import { EntityViewId } from '@shared/models/id/entity-view-id'; | ||
21 | +import { EntityId } from '@shared/models/id/entity-id'; | ||
23 | import { EntitySearchQuery } from '@shared/models/relation.models'; | 22 | import { EntitySearchQuery } from '@shared/models/relation.models'; |
24 | 23 | ||
25 | export interface AttributesEntityView { | 24 | export interface AttributesEntityView { |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {AliasEntityType, EntityType} from '@shared/models/entity-type.models'; | 17 | +import { AliasEntityType, EntityType } from '@shared/models/entity-type.models'; |
18 | import { HasUUID } from '@shared/models/id/has-uuid'; | 18 | import { HasUUID } from '@shared/models/id/has-uuid'; |
19 | 19 | ||
20 | export interface EntityId extends HasUUID { | 20 | export interface EntityId extends HasUUID { |
@@ -15,6 +15,7 @@ | @@ -15,6 +15,7 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import * as tinycolor_ from 'tinycolor2'; | 17 | import * as tinycolor_ from 'tinycolor2'; |
18 | + | ||
18 | const tinycolor = tinycolor_; | 19 | const tinycolor = tinycolor_; |
19 | 20 | ||
20 | export interface MaterialColorItem { | 21 | export interface MaterialColorItem { |
@@ -14,9 +14,6 @@ | @@ -14,9 +14,6 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { PageLink } from '@shared/models/page/page-link'; | ||
18 | -import { Direction, SortOrder } from '@shared/models/page/sort-order'; | ||
19 | - | ||
20 | export interface PageData<T> { | 17 | export interface PageData<T> { |
21 | data: Array<T>; | 18 | data: Array<T>; |
22 | totalPages: number; | 19 | totalPages: number; |
@@ -16,7 +16,6 @@ | @@ -16,7 +16,6 @@ | ||
16 | 16 | ||
17 | import { EntityId } from '@shared/models/id/entity-id'; | 17 | import { EntityId } from '@shared/models/id/entity-id'; |
18 | import { EntityType } from '@shared/models/entity-type.models'; | 18 | import { EntityType } from '@shared/models/entity-type.models'; |
19 | -import { ActionStatus } from '@shared/models/audit-log.models'; | ||
20 | 19 | ||
21 | export const CONTAINS_TYPE = 'Contains'; | 20 | export const CONTAINS_TYPE = 'Contains'; |
22 | export const MANAGES_TYPE = 'Manages'; | 21 | export const MANAGES_TYPE = 'Manages'; |
@@ -14,9 +14,8 @@ | @@ -14,9 +14,8 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { CustomerId } from '@shared/models/id/customer-id'; | ||
18 | import { ContactBased } from '@shared/models/contact-based.model'; | 17 | import { ContactBased } from '@shared/models/contact-based.model'; |
19 | -import {TenantId} from './id/tenant-id'; | 18 | +import { TenantId } from './id/tenant-id'; |
20 | 19 | ||
21 | export interface Tenant extends ContactBased<TenantId> { | 20 | export interface Tenant extends ContactBased<TenantId> { |
22 | title: string; | 21 | title: string; |
@@ -18,7 +18,7 @@ import { BaseData } from './base-data'; | @@ -18,7 +18,7 @@ import { BaseData } from './base-data'; | ||
18 | import { UserId } from './id/user-id'; | 18 | import { UserId } from './id/user-id'; |
19 | import { CustomerId } from './id/customer-id'; | 19 | import { CustomerId } from './id/customer-id'; |
20 | import { Authority } from './authority.enum'; | 20 | import { Authority } from './authority.enum'; |
21 | -import {TenantId} from './id/tenant-id'; | 21 | +import { TenantId } from './id/tenant-id'; |
22 | 22 | ||
23 | export interface User extends BaseData<UserId> { | 23 | export interface User extends BaseData<UserId> { |
24 | tenantId: TenantId; | 24 | tenantId: TenantId; |
@@ -14,9 +14,9 @@ | @@ -14,9 +14,9 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {BaseData} from '@shared/models/base-data'; | ||
18 | -import {TenantId} from '@shared/models/id/tenant-id'; | ||
19 | -import {WidgetsBundleId} from '@shared/models/id/widgets-bundle-id'; | 17 | +import { BaseData } from '@shared/models/base-data'; |
18 | +import { TenantId } from '@shared/models/id/tenant-id'; | ||
19 | +import { WidgetsBundleId } from '@shared/models/id/widgets-bundle-id'; | ||
20 | 20 | ||
21 | export interface WidgetsBundle extends BaseData<WidgetsBundleId> { | 21 | export interface WidgetsBundle extends BaseData<WidgetsBundleId> { |
22 | tenantId: TenantId; | 22 | tenantId: TenantId; |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {Pipe, PipeTransform} from '@angular/core'; | 17 | +import { Pipe, PipeTransform } from '@angular/core'; |
18 | 18 | ||
19 | @Pipe({ name: 'highlight' }) | 19 | @Pipe({ name: 'highlight' }) |
20 | export class HighlightPipe implements PipeTransform { | 20 | export class HighlightPipe implements PipeTransform { |
@@ -14,8 +14,8 @@ | @@ -14,8 +14,8 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {Pipe, PipeTransform} from '@angular/core'; | ||
18 | -import {isObject, isNumber} from '@core/utils'; | 17 | +import { Pipe, PipeTransform } from '@angular/core'; |
18 | +import { isNumber, isObject } from '@core/utils'; | ||
19 | 19 | ||
20 | @Pipe({name: 'tbJson'}) | 20 | @Pipe({name: 'tbJson'}) |
21 | export class TbJsonPipe implements PipeTransform { | 21 | export class TbJsonPipe implements PipeTransform { |
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import { Pipe, PipeTransform } from '@angular/core'; | 17 | import { Pipe, PipeTransform } from '@angular/core'; |
18 | -import { parseTemplate, parseWithTranslation } from '@app/core/utils'; | 18 | +import { parseWithTranslation } from '@app/core/utils'; |
19 | 19 | ||
20 | @Pipe({ name: 'tbParseTemplate' }) | 20 | @Pipe({ name: 'tbParseTemplate' }) |
21 | export class TbTemplatePipe implements PipeTransform { | 21 | export class TbTemplatePipe implements PipeTransform { |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import {Pipe, PipeTransform} from '@angular/core'; | 17 | +import { Pipe, PipeTransform } from '@angular/core'; |
18 | import { isString } from '@core/utils'; | 18 | import { isString } from '@core/utils'; |
19 | 19 | ||
20 | @Pipe({ name: 'truncate' }) | 20 | @Pipe({ name: 'truncate' }) |
@@ -20,7 +20,7 @@ import { FooterComponent } from '@shared/components/footer.component'; | @@ -20,7 +20,7 @@ import { FooterComponent } from '@shared/components/footer.component'; | ||
20 | import { LogoComponent } from '@shared/components/logo.component'; | 20 | import { LogoComponent } from '@shared/components/logo.component'; |
21 | import { TbSnackBarComponent, ToastDirective } from '@shared/components/toast.directive'; | 21 | import { TbSnackBarComponent, ToastDirective } from '@shared/components/toast.directive'; |
22 | import { BreadcrumbComponent } from '@shared/components/breadcrumb.component'; | 22 | import { BreadcrumbComponent } from '@shared/components/breadcrumb.component'; |
23 | -import { NgxFlowModule, FlowInjectionToken } from '@flowjs/ngx-flow'; | 23 | +import { FlowInjectionToken, NgxFlowModule } from '@flowjs/ngx-flow'; |
24 | import { NgxFlowchartModule } from 'ngx-flowchart/dist/ngx-flowchart'; | 24 | import { NgxFlowchartModule } from 'ngx-flowchart/dist/ngx-flowchart'; |
25 | import Flow from '@flowjs/flow.js'; | 25 | import Flow from '@flowjs/flow.js'; |
26 | 26 | ||
@@ -94,7 +94,11 @@ import { EntityListSelectComponent } from '@shared/components/entity/entity-list | @@ -94,7 +94,11 @@ import { EntityListSelectComponent } from '@shared/components/entity/entity-list | ||
94 | import { JsonObjectEditComponent } from '@shared/components/json-object-edit.component'; | 94 | import { JsonObjectEditComponent } from '@shared/components/json-object-edit.component'; |
95 | import { FooterFabButtonsComponent } from '@shared/components/footer-fab-buttons.component'; | 95 | import { FooterFabButtonsComponent } from '@shared/components/footer-fab-buttons.component'; |
96 | import { CircularProgressDirective } from '@shared/components/circular-progress.directive'; | 96 | import { CircularProgressDirective } from '@shared/components/circular-progress.directive'; |
97 | -import { FabToolbarComponent, FabActionsDirective, FabTriggerDirective } from '@shared/components/fab-toolbar.component'; | 97 | +import { |
98 | + FabActionsDirective, | ||
99 | + FabToolbarComponent, | ||
100 | + FabTriggerDirective | ||
101 | +} from '@shared/components/fab-toolbar.component'; | ||
98 | import { DashboardSelectPanelComponent } from '@shared/components/dashboard-select-panel.component'; | 102 | import { DashboardSelectPanelComponent } from '@shared/components/dashboard-select-panel.component'; |
99 | import { DashboardSelectComponent } from '@shared/components/dashboard-select.component'; | 103 | import { DashboardSelectComponent } from '@shared/components/dashboard-select.component'; |
100 | import { WidgetsBundleSelectComponent } from '@shared/components/widgets-bundle-select.component'; | 104 | import { WidgetsBundleSelectComponent } from '@shared/components/widgets-bundle-select.component'; |
@@ -527,11 +527,10 @@ mat-label { | @@ -527,11 +527,10 @@ mat-label { | ||
527 | .mat-table { | 527 | .mat-table { |
528 | width: 100%; | 528 | width: 100%; |
529 | max-width: 100%; | 529 | max-width: 100%; |
530 | - margin-bottom: 1rem; | ||
531 | display: table; | 530 | display: table; |
532 | table-layout: auto; | 531 | table-layout: auto; |
533 | border-collapse: separate; | 532 | border-collapse: separate; |
534 | - margin: 0px; | 533 | + margin: 0; |
535 | } | 534 | } |
536 | 535 | ||
537 | mat-footer-row::after, mat-header-row::after, mat-row::after { | 536 | mat-footer-row::after, mat-header-row::after, mat-row::after { |