Commit e3e860fe3f67cc2a30b5ac01e772220854772587
Committed by
GitHub
1 parent
e175b571
[3.0] Improvement code style (#2670)
* Clear code and styles * Clear import
Showing
100 changed files
with
272 additions
and
389 deletions
Too many changes to show.
To preserve performance only 100 of 148 files are displayed.
... | ... | @@ -14,11 +14,11 @@ |
14 | 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 | 18 | import { AggregationType } from '@shared/models/time/time.models'; |
19 | 19 | import { UtilsService } from '@core/services/utils.service'; |
20 | -import Timeout = NodeJS.Timeout; | |
21 | 20 | import { deepClone } from '@core/utils'; |
21 | +import Timeout = NodeJS.Timeout; | |
22 | 22 | |
23 | 23 | export declare type onAggregatedData = (data: SubscriptionData, detectChanges: boolean) => void; |
24 | 24 | ... | ... |
... | ... | @@ -28,7 +28,7 @@ import { |
28 | 28 | } from '@shared/models/telemetry/telemetry.models'; |
29 | 29 | import { DatasourceListener } from './datasource.service'; |
30 | 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 | 32 | import { UtilsService } from '@core/services/utils.service'; |
33 | 33 | import { EntityType } from '@shared/models/entity-type.models'; |
34 | 34 | import { DataAggregator } from '@core/api/data-aggregator'; | ... | ... |
... | ... | @@ -28,7 +28,8 @@ import { |
28 | 28 | MissingTranslationHandler, |
29 | 29 | TranslateCompiler, |
30 | 30 | TranslateLoader, |
31 | - TranslateModule, TranslateParser | |
31 | + TranslateModule, | |
32 | + TranslateParser | |
32 | 33 | } from '@ngx-translate/core'; |
33 | 34 | import { TranslateHttpLoader } from '@ngx-translate/http-loader'; |
34 | 35 | import { TbMissingTranslationHandler } from './translate/missing-translate-handler'; | ... | ... |
... | ... | @@ -14,13 +14,10 @@ |
14 | 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 | 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 | 22 | import { initStateFromLocalStorage } from './meta-reducers/init-state-from-local-storage.reducer'; |
26 | 23 | import { debug } from './meta-reducers/debug.reducer'; |
... | ... | @@ -35,7 +32,6 @@ import { SettingsEffects } from '@app/core/settings/settings.effects'; |
35 | 32 | import { NotificationState } from '@app/core/notification/notification.models'; |
36 | 33 | import { notificationReducer } from '@app/core/notification/notification.reducer'; |
37 | 34 | import { NotificationEffects } from '@app/core/notification/notification.effects'; |
38 | -import { take } from 'rxjs/operators'; | |
39 | 35 | |
40 | 36 | export const reducers: ActionReducerMap<AppState> = { |
41 | 37 | load: loadReducer, | ... | ... |
... | ... | @@ -15,12 +15,7 @@ |
15 | 15 | /// |
16 | 16 | |
17 | 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 | 19 | import { AuthService } from '../auth/auth.service'; |
25 | 20 | import { select, Store } from '@ngrx/store'; |
26 | 21 | import { AppState } from '../core.state'; | ... | ... |
... | ... | @@ -15,11 +15,7 @@ |
15 | 15 | /// |
16 | 16 | |
17 | 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 | 19 | import { FormGroup } from '@angular/forms'; |
24 | 20 | import { select, Store } from '@ngrx/store'; |
25 | 21 | import { AppState } from '@core/core.state'; | ... | ... |
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | |
17 | 17 | import { Injectable } from '@angular/core'; |
18 | 18 | import { defaultHttpOptionsFromConfig, RequestConfig } from './http-utils'; |
19 | -import { Observable } from 'rxjs'; | |
19 | +import { EMPTY, Observable } from 'rxjs'; | |
20 | 20 | import { HttpClient } from '@angular/common/http'; |
21 | 21 | import { PageData } from '@shared/models/page/page-data'; |
22 | 22 | import { EntityId } from '@shared/models/id/entity-id'; |
... | ... | @@ -36,9 +36,8 @@ import { UtilsService } from '@core/services/utils.service'; |
36 | 36 | import { TimePageLink } from '@shared/models/page/page-link'; |
37 | 37 | import { Direction, SortOrder } from '@shared/models/page/sort-order'; |
38 | 38 | import { concatMap, expand, map, toArray } from 'rxjs/operators'; |
39 | -import { EMPTY } from 'rxjs'; | |
40 | -import Timeout = NodeJS.Timeout; | |
41 | 39 | import { isDefined } from '@core/utils'; |
40 | +import Timeout = NodeJS.Timeout; | |
42 | 41 | |
43 | 42 | interface AlarmSourceListenerQuery { |
44 | 43 | entityType: EntityType; | ... | ... |
... | ... | @@ -19,8 +19,7 @@ import { HttpClient } from '@angular/common/http'; |
19 | 19 | import { ComponentDescriptor, ComponentType } from '@shared/models/component-descriptor.models'; |
20 | 20 | import { defaultHttpOptionsFromConfig, RequestConfig } from '@core/http/http-utils'; |
21 | 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 | 23 | import { RuleNodeType } from '@shared/models/rule-node.models'; |
25 | 24 | |
26 | 25 | @Injectable({ | ... | ... |
... | ... | @@ -21,7 +21,8 @@ import { HttpClient } from '@angular/common/http'; |
21 | 21 | import { PageLink } from '@shared/models/page/page-link'; |
22 | 22 | import { PageData } from '@shared/models/page/page-data'; |
23 | 23 | import { |
24 | - ClaimRequest, ClaimResult, | |
24 | + ClaimRequest, | |
25 | + ClaimResult, | |
25 | 26 | Device, |
26 | 27 | DeviceCredentials, |
27 | 28 | DeviceInfo, | ... | ... |
... | ... | @@ -642,7 +642,6 @@ export class EntityService { |
642 | 642 | return result; |
643 | 643 | } |
644 | 644 | )); |
645 | - break; | |
646 | 645 | case AliasFilterType.entityList: |
647 | 646 | return this.getEntities(filter.entityType, filter.entityList, {ignoreLoading: true, ignoreErrors: true}).pipe( |
648 | 647 | map((entities) => { |
... | ... | @@ -654,7 +653,6 @@ export class EntityService { |
654 | 653 | } |
655 | 654 | } |
656 | 655 | )); |
657 | - break; | |
658 | 656 | case AliasFilterType.entityName: |
659 | 657 | return this.getEntitiesByNameFilter(filter.entityType, filter.entityNameFilter, maxItems, |
660 | 658 | '', {ignoreLoading: true, ignoreErrors: true}).pipe( |
... | ... | @@ -668,7 +666,6 @@ export class EntityService { |
668 | 666 | } |
669 | 667 | ) |
670 | 668 | ); |
671 | - break; | |
672 | 669 | case AliasFilterType.stateEntity: |
673 | 670 | result.stateEntity = true; |
674 | 671 | if (stateEntityId) { |
... | ... | @@ -681,7 +678,6 @@ export class EntityService { |
681 | 678 | } else { |
682 | 679 | return of(result); |
683 | 680 | } |
684 | - break; | |
685 | 681 | case AliasFilterType.assetType: |
686 | 682 | return this.getEntitiesByNameFilter(EntityType.ASSET, filter.assetNameFilter, maxItems, |
687 | 683 | filter.assetType, {ignoreLoading: true, ignoreErrors: true}).pipe( |
... | ... | @@ -695,7 +691,6 @@ export class EntityService { |
695 | 691 | } |
696 | 692 | ) |
697 | 693 | ); |
698 | - break; | |
699 | 694 | case AliasFilterType.deviceType: |
700 | 695 | return this.getEntitiesByNameFilter(EntityType.DEVICE, filter.deviceNameFilter, maxItems, |
701 | 696 | filter.deviceType, {ignoreLoading: true, ignoreErrors: true}).pipe( |
... | ... | @@ -709,7 +704,6 @@ export class EntityService { |
709 | 704 | } |
710 | 705 | ) |
711 | 706 | ); |
712 | - break; | |
713 | 707 | case AliasFilterType.entityViewType: |
714 | 708 | return this.getEntitiesByNameFilter(EntityType.ENTITY_VIEW, filter.entityViewNameFilter, maxItems, |
715 | 709 | filter.entityViewType, {ignoreLoading: true, ignoreErrors: true}).pipe( |
... | ... | @@ -723,7 +717,6 @@ export class EntityService { |
723 | 717 | } |
724 | 718 | ) |
725 | 719 | ); |
726 | - break; | |
727 | 720 | case AliasFilterType.relationsQuery: |
728 | 721 | result.stateEntity = filter.rootStateEntity; |
729 | 722 | let rootEntityType; |
... | ... | @@ -768,7 +761,6 @@ export class EntityService { |
768 | 761 | } else { |
769 | 762 | return of(result); |
770 | 763 | } |
771 | - break; | |
772 | 764 | case AliasFilterType.assetSearchQuery: |
773 | 765 | case AliasFilterType.deviceSearchQuery: |
774 | 766 | case AliasFilterType.entityViewSearchQuery: |
... | ... | @@ -823,7 +815,6 @@ export class EntityService { |
823 | 815 | } else { |
824 | 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 | 18 | |
19 | 19 | import { AppState } from '../core.state'; |
20 | 20 | import { LoadState } from './load.models'; |
21 | -import { AuthUser } from '@shared/models/user.model'; | |
22 | 21 | import { take } from 'rxjs/operators'; |
23 | -import { selectAuthUser } from '@core/auth/auth.selectors'; | |
24 | 22 | |
25 | 23 | export const selectLoadState = createFeatureSelector<AppState, LoadState>( |
26 | 24 | 'load' | ... | ... |
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | /// |
16 | 16 | |
17 | 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 | 20 | export enum NotificationActionTypes { |
21 | 21 | SHOW_NOTIFICATION = '[Notification] Show', | ... | ... |
... | ... | @@ -16,14 +16,9 @@ |
16 | 16 | |
17 | 17 | import { Injectable } from '@angular/core'; |
18 | 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 | 22 | import { NotificationService } from '@app/core/services/notification.service'; |
28 | 23 | |
29 | 24 | @Injectable() | ... | ... |
... | ... | @@ -14,11 +14,10 @@ |
14 | 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 | 22 | @Injectable({ |
24 | 23 | providedIn: 'root' | ... | ... |
... | ... | @@ -331,7 +331,6 @@ export class DashboardUtilsService { |
331 | 331 | const states = dashboardConfiguration.states; |
332 | 332 | const state = states[targetState]; |
333 | 333 | if (state) { |
334 | - const allWidgets = dashboardConfiguration.widgets; | |
335 | 334 | const result: DashboardLayoutsInfo = {}; |
336 | 335 | for (const l of Object.keys(state.layouts)) { |
337 | 336 | const layout: DashboardLayout = state.layouts[l]; | ... | ... |
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | |
17 | 17 | import { Injectable } from '@angular/core'; |
18 | 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 | 20 | import { DatasourceType, Widget, WidgetPosition, WidgetSize } from '@shared/models/widget.models'; |
21 | 21 | import { DashboardUtilsService } from '@core/services/dashboard-utils.service'; |
22 | 22 | import { deepClone, isEqual } from '@core/utils'; | ... | ... |
... | ... | @@ -23,7 +23,7 @@ import { take } from 'rxjs/operators'; |
23 | 23 | import { HomeSection, MenuSection } from '@core/services/menu.models'; |
24 | 24 | import { BehaviorSubject, Observable, Subject } from 'rxjs'; |
25 | 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 | 28 | @Injectable({ |
29 | 29 | providedIn: 'root' | ... | ... |
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | |
17 | 17 | import { Injectable } from '@angular/core'; |
18 | 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 | 22 | @Injectable( | ... | ... |
... | ... | @@ -15,11 +15,14 @@ |
15 | 15 | /// |
16 | 16 | |
17 | 17 | import { Injectable } from '@angular/core'; |
18 | -import { Observable, of } from 'rxjs'; | |
18 | +import { Observable } from 'rxjs'; | |
19 | 19 | import { RuleChainService } from '@core/http/rule-chain.service'; |
20 | -import { map, switchMap } from 'rxjs/operators'; | |
20 | +import { switchMap } from 'rxjs/operators'; | |
21 | 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 | 27 | @Injectable({ |
25 | 28 | providedIn: 'root' | ... | ... |
... | ... | @@ -15,7 +15,14 @@ |
15 | 15 | /// |
16 | 16 | |
17 | 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 | 26 | import { HttpClient } from '@angular/common/http'; |
20 | 27 | import { Observable } from 'rxjs'; |
21 | 28 | import { defaultHttpOptions } from '@core/http/http-utils'; | ... | ... |
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | |
17 | 17 | |
18 | 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 | 21 | /* Create a new injection token for injecting the window into a component. */ |
22 | 22 | export const WINDOW = new InjectionToken('WindowToken'); | ... | ... |
... | ... | @@ -14,27 +14,16 @@ |
14 | 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 | 18 | import { Injectable } from '@angular/core'; |
19 | 19 | import { select, Store } from '@ngrx/store'; |
20 | 20 | import { Actions, Effect, ofType } from '@ngrx/effects'; |
21 | 21 | import { TranslateService } from '@ngx-translate/core'; |
22 | 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 | 27 | import { AppState } from '@app/core/core.state'; |
39 | 28 | import { LocalStorageService } from '@app/core/local-storage/local-storage.service'; |
40 | 29 | import { TitleService } from '@app/core/services/title.service'; | ... | ... |
... | ... | @@ -14,7 +14,7 @@ |
14 | 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 | 18 | import { customTranslationsPrefix } from '@app/shared/models/constants'; |
19 | 19 | |
20 | 20 | export class TbMissingTranslationHandler implements MissingTranslationHandler { | ... | ... |
... | ... | @@ -15,10 +15,12 @@ |
15 | 15 | /// |
16 | 16 | |
17 | 17 | import { |
18 | - MESSAGE_FORMAT_CONFIG, MessageFormatConfig, | |
18 | + MESSAGE_FORMAT_CONFIG, | |
19 | + MessageFormatConfig, | |
19 | 20 | TranslateMessageFormatCompiler |
20 | 21 | } from 'ngx-translate-messageformat-compiler'; |
21 | 22 | import { Inject, Injectable, Optional } from '@angular/core'; |
23 | + | |
22 | 24 | const parse = require('messageformat-parser').parse; |
23 | 25 | |
24 | 26 | @Injectable({ providedIn: 'root' }) | ... | ... |
... | ... | @@ -15,8 +15,8 @@ |
15 | 15 | /// |
16 | 16 | |
17 | 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 | 20 | import base64js from 'base64-js'; |
21 | 21 | |
22 | 22 | export function onParentScrollOrWindowResize(el: Node): Observable<Event> { | ... | ... |
... | ... | @@ -17,18 +17,12 @@ |
17 | 17 | import { Injectable, NgModule } from '@angular/core'; |
18 | 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 | 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 | 22 | import { Dashboard } from '@app/shared/models/dashboard.models'; |
28 | 23 | import { DashboardService } from '@core/http/dashboard.service'; |
29 | 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 | 26 | import { UtilsService } from '@core/services/utils.service'; |
33 | 27 | import { Widget } from '@app/shared/models/widget.models'; |
34 | 28 | ... | ... |
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | /// |
16 | 16 | |
17 | 17 | import { NgModule } from '@angular/core'; |
18 | -import { Routes, RouterModule } from '@angular/router'; | |
18 | +import { RouterModule, Routes } from '@angular/router'; | |
19 | 19 | |
20 | 20 | import { AuthGuard } from '@core/guards/auth.guard'; |
21 | 21 | import { StoreModule } from '@ngrx/store'; | ... | ... |
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 | </div> |
58 | 58 | <div mat-dialog-actions fxLayoutAlign="end center"> |
59 | 59 | <mat-checkbox formControlName="openDashboard" |
60 | - style="margin-bottom: 0px; padding-right: 20px;"> | |
60 | + style="margin-bottom: 0; padding-right: 20px;"> | |
61 | 61 | {{ 'dashboard.open-dashboard' | translate }} |
62 | 62 | </mat-checkbox> |
63 | 63 | <button mat-raised-button color="primary" | ... | ... |
... | ... | @@ -21,7 +21,7 @@ import { ContactBased } from '@shared/models/contact-based.model'; |
21 | 21 | import { AfterViewInit } from '@angular/core'; |
22 | 22 | import { POSTAL_CODE_PATTERNS } from '@home/models/contact.models'; |
23 | 23 | import { HasId } from '@shared/models/base-data'; |
24 | -import {EntityComponent} from './entity.component'; | |
24 | +import { EntityComponent } from './entity.component'; | |
25 | 25 | import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; |
26 | 26 | |
27 | 27 | export abstract class ContactBasedComponent<T extends ContactBased<HasId>> extends EntityComponent<T> implements AfterViewInit { | ... | ... |
... | ... | @@ -16,12 +16,16 @@ |
16 | 16 | |
17 | 17 | import { |
18 | 18 | AfterViewInit, |
19 | - ChangeDetectionStrategy, ChangeDetectorRef, | |
19 | + ChangeDetectionStrategy, | |
20 | + ChangeDetectorRef, | |
20 | 21 | Component, |
21 | 22 | ComponentFactoryResolver, |
22 | - ElementRef, EventEmitter, | |
23 | - Input, OnChanges, | |
24 | - OnInit, SimpleChanges, | |
23 | + ElementRef, | |
24 | + EventEmitter, | |
25 | + Input, | |
26 | + OnChanges, | |
27 | + OnInit, | |
28 | + SimpleChanges, | |
25 | 29 | ViewChild |
26 | 30 | } from '@angular/core'; |
27 | 31 | import { PageComponent } from '@shared/components/page.component'; | ... | ... |
... | ... | @@ -16,10 +16,13 @@ |
16 | 16 | |
17 | 17 | import { |
18 | 18 | AfterViewInit, |
19 | - ChangeDetectionStrategy, ChangeDetectorRef, | |
19 | + ChangeDetectionStrategy, | |
20 | + ChangeDetectorRef, | |
20 | 21 | Component, |
21 | - ComponentFactoryResolver, ComponentRef, | |
22 | - EventEmitter, Injector, | |
22 | + ComponentFactoryResolver, | |
23 | + ComponentRef, | |
24 | + EventEmitter, | |
25 | + Injector, | |
23 | 26 | Input, |
24 | 27 | OnDestroy, |
25 | 28 | OnInit, | ... | ... |
... | ... | @@ -106,7 +106,7 @@ |
106 | 106 | <ng-template [ngSwitchCase]="aliasFilterType.relationsQuery"> |
107 | 107 | <section fxLayout="column" id="relationsQueryFilter"> |
108 | 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 | 110 | <mat-slide-toggle class="root-state-entity-switch" |
111 | 111 | formControlName="rootStateEntity"> |
112 | 112 | </mat-slide-toggle> |
... | ... | @@ -134,7 +134,7 @@ |
134 | 134 | </div> |
135 | 135 | </div> |
136 | 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 | 138 | <mat-slide-toggle class="root-state-entity-switch" |
139 | 139 | formControlName="fetchLastLevelOnly"> |
140 | 140 | </mat-slide-toggle> | ... | ... |
... | ... | @@ -16,13 +16,14 @@ |
16 | 16 | |
17 | 17 | import { BaseData, HasId } from '@shared/models/base-data'; |
18 | 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 | 20 | import { Store } from '@ngrx/store'; |
21 | 21 | import { AppState } from '@core/core.state'; |
22 | 22 | import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; |
23 | 23 | import { PageLink } from '@shared/models/page/page-link'; |
24 | 24 | |
25 | 25 | @Directive() |
26 | +// tslint:disable-next-line:directive-class-suffix | |
26 | 27 | export abstract class EntityTableHeaderComponent<T extends BaseData<HasId>, |
27 | 28 | P extends PageLink = PageLink, |
28 | 29 | L extends BaseData<HasId> = T, | ... | ... |
... | ... | @@ -16,15 +16,14 @@ |
16 | 16 | |
17 | 17 | import { BaseData, HasId } from '@shared/models/base-data'; |
18 | 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 | 20 | import { Store } from '@ngrx/store'; |
21 | 21 | import { AppState } from '@core/core.state'; |
22 | 22 | import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; |
23 | 23 | import { MatTab } from '@angular/material/tabs'; |
24 | -import { EntityAction } from '@home/models/entity/entity-component.models'; | |
25 | 24 | import { BehaviorSubject } from 'rxjs'; |
26 | 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 | 27 | import { AuthUser } from '@shared/models/user.model'; |
29 | 28 | import { EntityType } from '@shared/models/entity-type.models'; |
30 | 29 | import { AuditLogMode } from '@shared/models/audit-log.models'; |
... | ... | @@ -35,6 +34,7 @@ import { NgForm } from '@angular/forms'; |
35 | 34 | import { PageLink } from '@shared/models/page/page-link'; |
36 | 35 | |
37 | 36 | @Directive() |
37 | +// tslint:disable-next-line:directive-class-suffix | |
38 | 38 | export abstract class EntityTabsComponent<T extends BaseData<HasId>, |
39 | 39 | P extends PageLink = PageLink, |
40 | 40 | L extends BaseData<HasId> = T, | ... | ... |
... | ... | @@ -19,27 +19,10 @@ import { ErrorStateMatcher } from '@angular/material/core'; |
19 | 19 | import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; |
20 | 20 | import { Store } from '@ngrx/store'; |
21 | 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 | 23 | import { Router } from '@angular/router'; |
32 | 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 | 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 | 27 | export interface ImportDialogData { |
45 | 28 | importTitle: string; | ... | ... |
... | ... | @@ -14,7 +14,7 @@ |
14 | 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 | 18 | import { Observable } from 'rxjs'; |
19 | 19 | import { MatDialog } from '@angular/material/dialog'; |
20 | 20 | import { TranslateService } from '@ngx-translate/core'; |
... | ... | @@ -36,7 +36,6 @@ export class CustomDialogService { |
36 | 36 | private translate: TranslateService, |
37 | 37 | private authService: AuthService, |
38 | 38 | private dynamicComponentFactoryService: DynamicComponentFactoryService, |
39 | - private injector: Injector, | |
40 | 39 | public dialog: MatDialog |
41 | 40 | ) { |
42 | 41 | } | ... | ... |
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | /// |
16 | 16 | |
17 | 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 | 19 | import { PageComponent } from '@shared/components/page.component'; |
20 | 20 | import { Store } from '@ngrx/store'; |
21 | 21 | import { AppState } from '@core/core.state'; |
... | ... | @@ -60,7 +60,6 @@ export class LegendConfigPanelComponent extends PageComponent implements OnInit |
60 | 60 | public overlayRef: OverlayRef, |
61 | 61 | protected store: Store<AppState>, |
62 | 62 | public fb: FormBuilder, |
63 | - private overlay: Overlay, | |
64 | 63 | public viewContainerRef: ViewContainerRef) { |
65 | 64 | super(store); |
66 | 65 | } | ... | ... |
... | ... | @@ -37,8 +37,7 @@ import { deepClone, isDefined, isNumber } from '@core/utils'; |
37 | 37 | import cssjs from '@core/css/css'; |
38 | 38 | import { PageLink } from '@shared/models/page/page-link'; |
39 | 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 | 41 | import { BehaviorSubject, forkJoin, fromEvent, merge, Observable, of } from 'rxjs'; |
43 | 42 | import { emptyPageData, PageData } from '@shared/models/page/page-data'; |
44 | 43 | import { entityTypeTranslations } from '@shared/models/entity-type.models'; |
... | ... | @@ -59,7 +58,8 @@ import { |
59 | 58 | getColumnWidth, |
60 | 59 | TableWidgetDataKeySettings, |
61 | 60 | TableWidgetSettings, |
62 | - toAlarmColumnDef, widthStyle | |
61 | + toAlarmColumnDef, | |
62 | + widthStyle | |
63 | 63 | } from '@home/components/widget/lib/table-widget.models'; |
64 | 64 | import { ConnectedPosition, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay'; |
65 | 65 | import { ComponentPortal, PortalInjector } from '@angular/cdk/portal'; | ... | ... |
... | ... | @@ -16,7 +16,8 @@ |
16 | 16 | |
17 | 17 | import * as CanvasGauges from 'canvas-gauges'; |
18 | 18 | import { |
19 | - AnalogueRadialGaugeSettings, getAnalogueRadialGaugeSettingsSchema | |
19 | + AnalogueRadialGaugeSettings, | |
20 | + getAnalogueRadialGaugeSettingsSchema | |
20 | 21 | } from '@home/components/widget/lib/analogue-radial-gauge.models'; |
21 | 22 | import { JsonSettingsSchema } from '@shared/models/widget.models'; |
22 | 23 | import { WidgetContext } from '@home/models/widget-component.models'; | ... | ... |
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | [ngClass]="{'short-mode':ctx.width < 400, 'labels-hidden': settings.hideLabels, 'long-mode': ctx.width >= 400}"> |
20 | 20 | <mat-form-field class="mat-block" [fxHide]="settings.hidePicker" (click)="openNavigatorPanel($event)"> |
21 | 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 | 23 | <mat-option [value]="advancedModel.chosenLabel"> |
24 | 24 | {{advancedModel.chosenLabel}} |
25 | 25 | </mat-option> |
... | ... | @@ -27,7 +27,7 @@ |
27 | 27 | </mat-form-field> |
28 | 28 | <mat-form-field class="mat-block" [fxHide]="settings.hideInterval"> |
29 | 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 | 31 | <mat-option *ngIf="customInterval" [value]="customInterval.ts"> |
32 | 32 | {{'widgets.date-range-navigator.localizationMap.' + customInterval.label | translate}} |
33 | 33 | </mat-option> |
... | ... | @@ -43,7 +43,7 @@ |
43 | 43 | </button> |
44 | 44 | <mat-form-field class="mat-block" fxFlex.gt-sm> |
45 | 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 | 47 | <mat-option *ngFor="let date of datesMap | keyvalue: originalOrder" [value]="date.value.ts"> |
48 | 48 | {{'widgets.date-range-navigator.localizationMap.' + date.value.label | translate}} |
49 | 49 | </mat-option> | ... | ... |
... | ... | @@ -34,12 +34,6 @@ |
34 | 34 | margin: 4px 0; |
35 | 35 | } |
36 | 36 | |
37 | - .navigation { | |
38 | - md-input-container { | |
39 | - margin: 0; | |
40 | - } | |
41 | - } | |
42 | - | |
43 | 37 | .picker { |
44 | 38 | .picker__wrapper { |
45 | 39 | position: relative; |
... | ... | @@ -74,10 +68,6 @@ |
74 | 68 | |
75 | 69 | .drn__element { |
76 | 70 | width: 100%; |
77 | - | |
78 | - md-input-container { | |
79 | - flex: 1; | |
80 | - } | |
81 | 71 | } |
82 | 72 | |
83 | 73 | .picker { | ... | ... |
... | ... | @@ -38,7 +38,7 @@ import { |
38 | 38 | DateRangeNavigatorSettings, |
39 | 39 | getFormattedDate |
40 | 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 | 42 | import * as _moment from 'moment'; |
43 | 43 | import { ConnectedPosition, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay'; |
44 | 44 | import { ComponentPortal, PortalInjector } from '@angular/cdk/portal'; | ... | ... |
... | ... | @@ -43,9 +43,8 @@ import { deepClone, isDefined, isNumber } from '@core/utils'; |
43 | 43 | import cssjs from '@core/css/css'; |
44 | 44 | import { PageLink } from '@shared/models/page/page-link'; |
45 | 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 | 47 | import { DataKeyType } from '@shared/models/telemetry/telemetry.models'; |
48 | -import { CollectionViewer } from '@angular/cdk/collections'; | |
49 | 48 | import { BehaviorSubject, fromEvent, merge, Observable, of } from 'rxjs'; |
50 | 49 | import { emptyPageData, PageData } from '@shared/models/page/page-data'; |
51 | 50 | import { EntityId } from '@shared/models/id/entity-id'; |
... | ... | @@ -55,20 +54,21 @@ import { MatPaginator } from '@angular/material/paginator'; |
55 | 54 | import { MatSort } from '@angular/material/sort'; |
56 | 55 | import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; |
57 | 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 | 72 | } from '@home/components/widget/lib/table-widget.models'; |
73 | 73 | import { ConnectedPosition, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay'; |
74 | 74 | import { ComponentPortal, PortalInjector } from '@angular/cdk/portal'; | ... | ... |
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | // tslint:disable-next-line:no-reference |
18 | 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 | 21 | import * as moment_ from 'moment'; |
22 | 22 | |
23 | 23 | export declare type ChartType = 'line' | 'pie' | 'bar' | 'state' | 'graph'; | ... | ... |
... | ... | @@ -14,16 +14,23 @@ |
14 | 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 | 19 | import 'leaflet-providers'; |
20 | 20 | import 'leaflet.markercluster/dist/MarkerCluster.css'; |
21 | 21 | import 'leaflet.markercluster/dist/MarkerCluster.Default.css'; |
22 | 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 | 32 | import { Marker } from './markers'; |
26 | -import { Observable, BehaviorSubject } from 'rxjs'; | |
33 | +import { BehaviorSubject, Observable } from 'rxjs'; | |
27 | 34 | import { filter } from 'rxjs/operators'; |
28 | 35 | import { Polyline } from './polyline'; |
29 | 36 | import { Polygon } from './polygon'; | ... | ... |
... | ... | @@ -17,22 +17,22 @@ |
17 | 17 | import { MapProviders, UnitedMapSettings } from './map-models'; |
18 | 18 | import LeafletMap from './leaflet-map'; |
19 | 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 | 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 | 36 | import { forkJoin } from 'rxjs'; |
37 | 37 | import { WidgetContext } from '@app/modules/home/models/widget-component.models'; |
38 | 38 | import { getDefCenterPosition } from './maps-utils'; | ... | ... |
... | ... | @@ -15,9 +15,7 @@ |
15 | 15 | /// |
16 | 16 | |
17 | 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 | 20 | export function createTooltip(target: L.Layer, |
23 | 21 | settings: MarkerSettings | PolylineSettings | PolygonSettings, |
... | ... | @@ -63,4 +61,4 @@ export function getDefCenterPosition(position) { |
63 | 61 | if (typeof (position) === 'object') |
64 | 62 | return position; |
65 | 63 | return [0, 0]; |
66 | -} | |
\ No newline at end of file | ||
64 | +} | ... | ... |
... | ... | @@ -16,10 +16,8 @@ |
16 | 16 | .arrow { |
17 | 17 | height: 30px; |
18 | 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 | 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 | 23 | .leaflet-div-icon, | ... | ... |
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | |
18 | 18 | import L from 'leaflet'; |
19 | 19 | import LeafletMap from '../leaflet-map'; |
20 | -import { MapSettings, UnitedMapSettings } from '../map-models'; | |
20 | +import { UnitedMapSettings } from '../map-models'; | |
21 | 21 | import 'leaflet.gridlayer.googlemutant'; |
22 | 22 | |
23 | 23 | let googleLoaded = false; |
... | ... | @@ -54,4 +54,4 @@ export class GoogleMap extends LeafletMap { |
54 | 54 | document.getElementsByTagName('head')[0].appendChild(script); |
55 | 55 | } |
56 | 56 | } |
57 | -} | |
\ No newline at end of file | ||
57 | +} | ... | ... |
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | |
17 | 17 | import L from 'leaflet'; |
18 | 18 | import LeafletMap from '../leaflet-map'; |
19 | -import { MapSettings, UnitedMapSettings } from '../map-models'; | |
19 | +import { UnitedMapSettings } from '../map-models'; | |
20 | 20 | |
21 | 21 | export class HEREMap extends LeafletMap { |
22 | 22 | constructor($container, options: UnitedMapSettings) { |
... | ... | @@ -27,4 +27,4 @@ export class HEREMap extends LeafletMap { |
27 | 27 | super.setMap(map); |
28 | 28 | super.initSettings(options); |
29 | 29 | } |
30 | -} | |
\ No newline at end of file | ||
30 | +} | ... | ... |
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | |
17 | 17 | import L, { LatLngLiteral } from 'leaflet'; |
18 | 18 | import LeafletMap from '../leaflet-map'; |
19 | -import { MapSettings, UnitedMapSettings } from '../map-models'; | |
19 | +import { UnitedMapSettings } from '../map-models'; | |
20 | 20 | import { aspectCache } from '@app/core/utils'; |
21 | 21 | |
22 | 22 | const maxZoom = 4;// ? |
... | ... | @@ -135,4 +135,4 @@ export class ImageMap extends LeafletMap { |
135 | 135 | [this.options.yPosKeyName]: (position.lat + 180) / 360 |
136 | 136 | } |
137 | 137 | }*/ |
138 | -} | |
\ No newline at end of file | ||
138 | +} | ... | ... |
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | |
17 | 17 | import L from 'leaflet'; |
18 | 18 | import LeafletMap from '../leaflet-map'; |
19 | -import { MapSettings, UnitedMapSettings } from '../map-models'; | |
19 | +import { UnitedMapSettings } from '../map-models'; | |
20 | 20 | |
21 | 21 | export class OpenStreetMap extends LeafletMap { |
22 | 22 | constructor($container, options: UnitedMapSettings) { |
... | ... | @@ -27,4 +27,4 @@ export class OpenStreetMap extends LeafletMap { |
27 | 27 | super.setMap(map); |
28 | 28 | super.initSettings(options); |
29 | 29 | } |
30 | -} | |
\ No newline at end of file | ||
30 | +} | ... | ... |
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | |
18 | 18 | import L from 'leaflet'; |
19 | 19 | import LeafletMap from '../leaflet-map'; |
20 | -import { MapSettings, UnitedMapSettings } from '../map-models'; | |
20 | +import { UnitedMapSettings } from '../map-models'; | |
21 | 21 | |
22 | 22 | export class TencentMap extends LeafletMap { |
23 | 23 | constructor($container, options: UnitedMapSettings) { |
... | ... | @@ -29,4 +29,4 @@ export class TencentMap extends LeafletMap { |
29 | 29 | super.setMap(map); |
30 | 30 | super.initSettings(options); |
31 | 31 | } |
32 | -} | |
\ No newline at end of file | ||
32 | +} | ... | ... |
... | ... | @@ -23,8 +23,8 @@ import { AppState } from '@core/core.state'; |
23 | 23 | import { isDefined, isNumber } from '@core/utils'; |
24 | 24 | import { CanvasDigitalGauge, CanvasDigitalGaugeOptions } from '@home/components/widget/lib/canvas-digital-gauge'; |
25 | 25 | import * as tinycolor_ from 'tinycolor2'; |
26 | -import GenericOptions = CanvasGauges.GenericOptions; | |
27 | 26 | import { ResizeObserver } from '@juggle/resize-observer'; |
27 | +import GenericOptions = CanvasGauges.GenericOptions; | |
28 | 28 | |
29 | 29 | const tinycolor = tinycolor_; |
30 | 30 | ... | ... |
... | ... | @@ -32,16 +32,16 @@ |
32 | 32 | |
33 | 33 | .mat-row:not(.mat-row-select), .mat-header-row:not(.mat-row-select) { |
34 | 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 | 39 | .mat-row.mat-row-select, .mat-header-row.mat-row-select { |
40 | 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 | 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 | 44 | import cssjs from '@core/css/css'; |
45 | 45 | import { PageLink } from '@shared/models/page/page-link'; |
46 | 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 | 48 | import { BehaviorSubject, fromEvent, merge, Observable, of } from 'rxjs'; |
50 | 49 | import { emptyPageData, PageData } from '@shared/models/page/page-data'; |
51 | 50 | import { catchError, debounceTime, distinctUntilChanged, map, tap } from 'rxjs/operators'; | ... | ... |
... | ... | @@ -19,15 +19,15 @@ import _ from 'lodash'; |
19 | 19 | import tinycolor from 'tinycolor2'; |
20 | 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 | 23 | import { MapWidgetController, TbMapWidgetV2 } from '../lib/maps/map-widget2'; |
24 | 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 | 27 | import { tripAnimationSchema } from '../lib/maps/schemes'; |
28 | 28 | import { DomSanitizer } from '@angular/platform-browser'; |
29 | 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 | 31 | import { JsonSettingsSchema, WidgetConfig } from '@shared/models/widget.models'; |
32 | 32 | import moment from 'moment'; |
33 | 33 | ... | ... |
... | ... | @@ -23,7 +23,9 @@ import { |
23 | 23 | Datasource, |
24 | 24 | DatasourceType, |
25 | 25 | datasourceTypeTranslationMap, |
26 | - defaultLegendConfig, GroupInfo, JsonSchema, | |
26 | + defaultLegendConfig, | |
27 | + GroupInfo, | |
28 | + JsonSchema, | |
27 | 29 | widgetType |
28 | 30 | } from '@shared/models/widget.models'; |
29 | 31 | import { | ... | ... |
... | ... | @@ -120,16 +120,12 @@ export class AddEntitiesToCustomerDialogComponent extends |
120 | 120 | switch (this.data.entityType) { |
121 | 121 | case EntityType.DEVICE: |
122 | 122 | return this.deviceService.assignDeviceToCustomer(customerId, entityId); |
123 | - break; | |
124 | 123 | case EntityType.ASSET: |
125 | 124 | return this.assetService.assignAssetToCustomer(customerId, entityId); |
126 | - break; | |
127 | 125 | case EntityType.ENTITY_VIEW: |
128 | 126 | return this.entityViewService.assignEntityViewToCustomer(customerId, entityId); |
129 | - break; | |
130 | 127 | case EntityType.DASHBOARD: |
131 | 128 | return this.dashboardService.assignDashboardToCustomer(customerId, entityId); |
132 | - break; | |
133 | 129 | } |
134 | 130 | } |
135 | 131 | ... | ... |
... | ... | @@ -114,13 +114,10 @@ export class AssignToCustomerDialogComponent extends |
114 | 114 | switch (this.data.entityType) { |
115 | 115 | case EntityType.DEVICE: |
116 | 116 | return this.deviceService.assignDeviceToCustomer(customerId, entityId); |
117 | - break; | |
118 | 117 | case EntityType.ASSET: |
119 | 118 | return this.assetService.assignAssetToCustomer(customerId, entityId); |
120 | - break; | |
121 | 119 | case EntityType.ENTITY_VIEW: |
122 | 120 | return this.entityViewService.assignEntityViewToCustomer(customerId, entityId); |
123 | - break; | |
124 | 121 | } |
125 | 122 | } |
126 | 123 | ... | ... |
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | /// |
16 | 16 | |
17 | 17 | import { NgModule } from '@angular/core'; |
18 | -import { Routes, RouterModule } from '@angular/router'; | |
18 | +import { RouterModule, Routes } from '@angular/router'; | |
19 | 19 | |
20 | 20 | import { HomeComponent } from './home.component'; |
21 | 21 | import { AuthGuard } from '@core/guards/auth.guard'; | ... | ... |
... | ... | @@ -14,7 +14,7 @@ |
14 | 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 | 18 | import { MenuSection } from '@core/services/menu.models'; |
19 | 19 | |
20 | 20 | @Component({ | ... | ... |
... | ... | @@ -14,7 +14,7 @@ |
14 | 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 | 18 | import { MenuSection } from '@core/services/menu.models'; |
19 | 19 | import { Router } from '@angular/router'; |
20 | 20 | ... | ... |
... | ... | @@ -15,13 +15,13 @@ |
15 | 15 | /// |
16 | 16 | |
17 | 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 | 19 | import { WidgetLayout, WidgetLayouts } from '@app/shared/models/dashboard.models'; |
20 | 20 | import { IDashboardWidget, WidgetAction, WidgetContext, WidgetHeaderAction } from './widget-component.models'; |
21 | 21 | import { Timewindow } from '@shared/models/time/time.models'; |
22 | 22 | import { Observable, of, Subject } from 'rxjs'; |
23 | 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 | 25 | import { IAliasController, IStateController } from '@app/core/api/widget-api.models'; |
26 | 26 | |
27 | 27 | export interface WidgetsData { | ... | ... |
... | ... | @@ -14,10 +14,9 @@ |
14 | 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 | 18 | import { BehaviorSubject, Observable, of, ReplaySubject } from 'rxjs'; |
19 | 19 | import { emptyPageData, PageData } from '@shared/models/page/page-data'; |
20 | -import { SelectionModel } from '@angular/cdk/collections'; | |
21 | 20 | import { PageLink } from '@shared/models/page/page-link'; |
22 | 21 | import { catchError, map, publishReplay, refCount, take, tap } from 'rxjs/operators'; |
23 | 22 | import { EntityId } from '@app/shared/models/id/entity-id'; |
... | ... | @@ -26,8 +25,8 @@ import { |
26 | 25 | AttributeData, |
27 | 26 | AttributeScope, |
28 | 27 | isClientSideTelemetryType, |
29 | - TelemetryType, | |
30 | - TelemetrySubscriber | |
28 | + TelemetrySubscriber, | |
29 | + TelemetryType | |
31 | 30 | } from '@shared/models/telemetry/telemetry.models'; |
32 | 31 | import { AttributeService } from '@core/http/attribute.service'; |
33 | 32 | import { TelemetryWebsocketService } from '@core/ws/telemetry-websocket.service'; | ... | ... |
... | ... | @@ -14,8 +14,8 @@ |
14 | 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 | 20 | export interface AddEntityDialogData<T extends BaseData<HasId>> { |
21 | 21 | entitiesTableConfig: EntityTableConfig<T>; | ... | ... |
... | ... | @@ -17,7 +17,10 @@ |
17 | 17 | import { IDashboardComponent } from '@home/models/dashboard-component.models'; |
18 | 18 | import { |
19 | 19 | DataSet, |
20 | - Datasource, DatasourceData, | |
20 | + Datasource, | |
21 | + DatasourceData, | |
22 | + JsonSettingsSchema, | |
23 | + Widget, | |
21 | 24 | WidgetActionDescriptor, |
22 | 25 | WidgetActionSource, |
23 | 26 | WidgetConfig, |
... | ... | @@ -25,8 +28,7 @@ import { |
25 | 28 | WidgetType, |
26 | 29 | widgetType, |
27 | 30 | WidgetTypeDescriptor, |
28 | - WidgetTypeParameters, | |
29 | - Widget, JsonSettingsSchema | |
31 | + WidgetTypeParameters | |
30 | 32 | } from '@shared/models/widget.models'; |
31 | 33 | import { Timewindow, WidgetTimewindow } from '@shared/models/time/time.models'; |
32 | 34 | import { |
... | ... | @@ -34,10 +36,11 @@ import { |
34 | 36 | IStateController, |
35 | 37 | IWidgetSubscription, |
36 | 38 | IWidgetUtils, |
37 | - RpcApi, SubscriptionEntityInfo, SubscriptionInfo, | |
39 | + RpcApi, | |
40 | + SubscriptionEntityInfo, | |
38 | 41 | TimewindowFunctions, |
39 | 42 | WidgetActionsApi, |
40 | - WidgetSubscriptionApi, WidgetSubscriptionContext, WidgetSubscriptionOptions | |
43 | + WidgetSubscriptionApi | |
41 | 44 | } from '@core/api/widget-api.models'; |
42 | 45 | import { ChangeDetectorRef, ComponentFactory, Injector, NgZone, Type } from '@angular/core'; |
43 | 46 | import { HttpErrorResponse } from '@angular/common/http'; |
... | ... | @@ -45,13 +48,8 @@ import { RafService } from '@core/services/raf.service'; |
45 | 48 | import { WidgetTypeId } from '@shared/models/id/widget-type-id'; |
46 | 49 | import { TenantId } from '@shared/models/id/tenant-id'; |
47 | 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 | 53 | import { Store } from '@ngrx/store'; |
56 | 54 | import { AppState } from '@core/core.state'; |
57 | 55 | import { | ... | ... |
... | ... | @@ -26,8 +26,10 @@ import { |
26 | 26 | DashboardConfiguration, |
27 | 27 | DashboardLayoutId, |
28 | 28 | DashboardLayoutInfo, |
29 | - DashboardLayoutsInfo, DashboardState, | |
30 | - DashboardStateLayouts, GridSettings, | |
29 | + DashboardLayoutsInfo, | |
30 | + DashboardState, | |
31 | + DashboardStateLayouts, | |
32 | + GridSettings, | |
31 | 33 | WidgetLayout |
32 | 34 | } from '@app/shared/models/dashboard.models'; |
33 | 35 | import { WINDOW } from '@core/services/window.service'; | ... | ... |
... | ... | @@ -14,23 +14,12 @@ |
14 | 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 | 18 | import { WidgetsBundle } from '@shared/models/widgets-bundle.model'; |
30 | 19 | import { IAliasController } from '@core/api/widget-api.models'; |
31 | 20 | import { NULL_UUID } from '@shared/models/id/has-uuid'; |
32 | 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 | 23 | import { toWidgetInfo } from '@home/models/widget-component.models'; |
35 | 24 | import { DashboardCallbacks } from '../../models/dashboard-component.models'; |
36 | 25 | ... | ... |
... | ... | @@ -14,35 +14,18 @@ |
14 | 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 | 18 | import { PageComponent } from '@shared/components/page.component'; |
19 | 19 | import { Store } from '@ngrx/store'; |
20 | 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 | 21 | import { MatDialog } from '@angular/material/dialog'; |
25 | -import { TranslateService } from '@ngx-translate/core'; | |
26 | 22 | import { Dashboard, WidgetLayout } from '@shared/models/dashboard.models'; |
27 | 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 | 25 | import { WidgetComponentService } from '@home/components/widget/widget-component.service'; |
30 | 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 | 30 | @Component({ |
48 | 31 | selector: 'tb-edit-widget', | ... | ... |
... | ... | @@ -14,19 +14,15 @@ |
14 | 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 | 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 | 26 | import { DialogComponent } from '@shared/components/dialog.component'; |
31 | 27 | import { Router } from '@angular/router'; |
32 | 28 | ... | ... |
... | ... | @@ -14,16 +14,15 @@ |
14 | 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 | 18 | import { ErrorStateMatcher } from '@angular/material/core'; |
19 | 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 | 26 | import { DialogComponent } from '@shared/components/dialog.component'; |
28 | 27 | import { Router } from '@angular/router'; |
29 | 28 | |
... | ... | @@ -122,13 +121,10 @@ export class ManageDashboardCustomersDialogComponent extends |
122 | 121 | switch (this.data.actionType) { |
123 | 122 | case 'assign': |
124 | 123 | return this.dashboardService.addDashboardCustomers(dashboardId, customerIds); |
125 | - break; | |
126 | 124 | case 'manage': |
127 | 125 | return this.dashboardService.updateDashboardCustomers(dashboardId, customerIds); |
128 | - break; | |
129 | 126 | case 'unassign': |
130 | 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 | 19 | import { DashboardState } from '@app/shared/models/dashboard.models'; |
20 | 20 | import { Subscription } from 'rxjs'; |
21 | 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 | 23 | import { StatesControllerService } from '@home/pages/dashboard/states/states-controller.service'; |
24 | 24 | import { EntityId } from '@app/shared/models/id/entity-id'; |
25 | 25 | import { StateParams } from '@app/core/api/widget-api.models'; | ... | ... |
... | ... | @@ -18,8 +18,8 @@ import { Component } from '@angular/core'; |
18 | 18 | import { Store } from '@ngrx/store'; |
19 | 19 | import { AppState } from '@core/core.state'; |
20 | 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 | 24 | @Component({ |
25 | 25 | selector: 'tb-device-table-header', | ... | ... |
... | ... | @@ -14,11 +14,11 @@ |
14 | 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 | 23 | const routes: Routes = [ |
24 | 24 | { | ... | ... |
... | ... | @@ -15,9 +15,6 @@ |
15 | 15 | /// |
16 | 16 | |
17 | 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 | 18 | import { MenuService } from '@core/services/menu.service'; |
22 | 19 | import { BreakpointObserver, BreakpointState } from '@angular/cdk/layout'; |
23 | 20 | import { MediaBreakpoints } from '@shared/models/constants'; | ... | ... |
... | ... | @@ -18,7 +18,7 @@ import { NgModule } from '@angular/core'; |
18 | 18 | import { CommonModule } from '@angular/common'; |
19 | 19 | |
20 | 20 | import { HomeLinksRoutingModule } from './home-links-routing.module'; |
21 | -import { HomeLinksComponent} from './home-links.component'; | |
21 | +import { HomeLinksComponent } from './home-links.component'; | |
22 | 22 | import { SharedModule } from '@app/shared/shared.module'; |
23 | 23 | |
24 | 24 | @NgModule({ | ... | ... |
... | ... | @@ -40,10 +40,12 @@ import { DialogService } from '@core/services/dialog.service'; |
40 | 40 | import { AuthService } from '@core/auth/auth.service'; |
41 | 41 | import { ActivatedRoute, Router } from '@angular/router'; |
42 | 42 | import { |
43 | - inputNodeComponent, NodeConnectionInfo, | |
43 | + inputNodeComponent, | |
44 | + NodeConnectionInfo, | |
44 | 45 | ResolvedRuleChainMetaData, |
45 | 46 | RuleChain, |
46 | - RuleChainConnectionInfo, RuleChainImport, | |
47 | + RuleChainConnectionInfo, | |
48 | + RuleChainImport, | |
47 | 49 | RuleChainMetaData, |
48 | 50 | ruleChainNodeComponent |
49 | 51 | } from '@shared/models/rule-chain.models'; |
... | ... | @@ -73,8 +75,8 @@ import { MatMenuTrigger } from '@angular/material/menu'; |
73 | 75 | import { ItemBufferService, RuleNodeConnection } from '@core/services/item-buffer.service'; |
74 | 76 | import { Hotkey } from 'angular2-hotkeys'; |
75 | 77 | import { EntityType } from '@shared/models/entity-type.models'; |
76 | -import Timeout = NodeJS.Timeout; | |
77 | 78 | import { DebugEventType, EventType } from '@shared/models/event.models'; |
79 | +import Timeout = NodeJS.Timeout; | |
78 | 80 | |
79 | 81 | @Component({ |
80 | 82 | selector: 'tb-rulechain-page', | ... | ... |
... | ... | @@ -16,13 +16,16 @@ |
16 | 16 | |
17 | 17 | import * as AngularCore from '@angular/core'; |
18 | 18 | import { Injectable, NgModule } from '@angular/core'; |
19 | +import * as AngularRouter from '@angular/router'; | |
19 | 20 | import { |
20 | 21 | ActivatedRouteSnapshot, |
21 | 22 | CanActivate, |
22 | - Resolve, Router, | |
23 | + Resolve, | |
24 | + Router, | |
23 | 25 | RouterModule, |
24 | 26 | RouterStateSnapshot, |
25 | - Routes, UrlTree | |
27 | + Routes, | |
28 | + UrlTree | |
26 | 29 | } from '@angular/router'; |
27 | 30 | |
28 | 31 | import { EntitiesTableComponent } from '../../components/entity/entities-table.component'; |
... | ... | @@ -40,7 +43,6 @@ import { ConfirmOnExitGuard } from '@core/guards/confirm-on-exit.guard'; |
40 | 43 | |
41 | 44 | import * as AngularCommon from '@angular/common'; |
42 | 45 | import * as AngularForms from '@angular/forms'; |
43 | -import * as AngularRouter from '@angular/router'; | |
44 | 46 | import * as AngularCdkCoercion from '@angular/cdk/coercion'; |
45 | 47 | import * as AngularCdkKeycodes from '@angular/cdk/keycodes'; |
46 | 48 | import * as AngularMaterialChips from '@angular/material/chips'; |
... | ... | @@ -49,10 +51,10 @@ import * as AngularMaterialDialog from '@angular/material/dialog'; |
49 | 51 | import * as NgrxStore from '@ngrx/store'; |
50 | 52 | import * as TranslateCore from '@ngx-translate/core'; |
51 | 53 | import * as TbCore from '@core/public-api'; |
54 | +import { ItemBufferService } from '@core/public-api'; | |
52 | 55 | import * as TbShared from '@shared/public-api'; |
53 | 56 | import * as TbHomeComponents from '@home/components/public-api'; |
54 | 57 | import * as _moment from 'moment'; |
55 | -import { ItemBufferService } from '@core/public-api'; | |
56 | 58 | |
57 | 59 | declare const SystemJS; |
58 | 60 | ... | ... |
... | ... | @@ -18,7 +18,6 @@ import { Component } from '@angular/core'; |
18 | 18 | import { Store } from '@ngrx/store'; |
19 | 19 | import { AppState } from '@core/core.state'; |
20 | 20 | import { EntityTabsComponent } from '../../components/entity/entity-tabs.component'; |
21 | -import { AssetInfo } from '@app/shared/models/asset.models'; | |
22 | 21 | import { RuleChain } from '@shared/models/rule-chain.models'; |
23 | 22 | |
24 | 23 | @Component({ | ... | ... |
... | ... | @@ -124,7 +124,7 @@ |
124 | 124 | fxLayoutAlign="start center" |
125 | 125 | *ngFor="let resource of widget.resources; let i = index" > |
126 | 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 | 128 | <input required matInput [(ngModel)]="resource.url" |
129 | 129 | (ngModelChange)="isDirty = true" |
130 | 130 | placeholder="{{ 'widget.resource-url' | translate }}"/> | ... | ... |
... | ... | @@ -45,8 +45,8 @@ import { |
45 | 45 | SaveWidgetTypeAsDialogResult |
46 | 46 | } from '@home/pages/widget/save-widget-type-as-dialog.component'; |
47 | 47 | import { Subscription } from 'rxjs'; |
48 | -import Timeout = NodeJS.Timeout; | |
49 | 48 | import { ResizeObserver } from '@juggle/resize-observer'; |
49 | +import Timeout = NodeJS.Timeout; | |
50 | 50 | |
51 | 51 | // @dynamic |
52 | 52 | @Component({ | ... | ... |
... | ... | @@ -14,12 +14,12 @@ |
14 | 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 | 23 | import { WidgetLibraryComponent } from './widget-library.component'; |
24 | 24 | import { WidgetEditorComponent } from '@home/pages/widget/widget-editor.component'; |
25 | 25 | import { SelectWidgetTypeDialogComponent } from '@home/pages/widget/select-widget-type-dialog.component'; | ... | ... |
... | ... | @@ -15,11 +15,11 @@ |
15 | 15 | /// |
16 | 16 | |
17 | 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 | 23 | import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; |
24 | 24 | |
25 | 25 | @Component({ | ... | ... |
... | ... | @@ -22,8 +22,7 @@ import { PageComponent } from '@shared/components/page.component'; |
22 | 22 | import { FormBuilder } from '@angular/forms'; |
23 | 23 | import { HttpErrorResponse } from '@angular/common/http'; |
24 | 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 | 27 | @Component({ |
29 | 28 | selector: 'tb-login', | ... | ... |
... | ... | @@ -14,16 +14,7 @@ |
14 | 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 | 19 | export const speedDialFabAnimations = [ |
29 | 20 | trigger('fabToggler', [ | ... | ... |
... | ... | @@ -14,9 +14,7 @@ |
14 | 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 | 18 | import { MatSpinner } from '@angular/material/progress-spinner'; |
21 | 19 | |
22 | 20 | @Directive({ | ... | ... |
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 | <div formGroupName="payload" fxLayout="column" style="height: 100%;"> |
38 | 38 | <div fxLayout="row"> |
39 | 39 | <tb-message-type-autocomplete |
40 | - style="margin-bottom: 0px; min-width: 300px;" | |
40 | + style="margin-bottom: 0; min-width: 300px;" | |
41 | 41 | formControlName="msgType" |
42 | 42 | required> |
43 | 43 | </tb-message-type-autocomplete> | ... | ... |
... | ... | @@ -14,16 +14,18 @@ |
14 | 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 | 18 | import { |
19 | 19 | ControlValueAccessor, |
20 | - FormControl, FormGroupDirective, | |
20 | + FormControl, | |
21 | + FormGroupDirective, | |
21 | 22 | NG_VALIDATORS, |
22 | - NG_VALUE_ACCESSOR, NgForm, | |
23 | + NG_VALUE_ACCESSOR, | |
24 | + NgForm, | |
23 | 25 | ValidationErrors, |
24 | 26 | Validator |
25 | 27 | } from '@angular/forms'; |
26 | -import {ErrorStateMatcher} from '@angular/material/core'; | |
28 | +import { ErrorStateMatcher } from '@angular/material/core'; | |
27 | 29 | |
28 | 30 | @Directive({ |
29 | 31 | selector: '[tb-json-to-string]', | ... | ... |
... | ... | @@ -14,15 +14,15 @@ |
14 | 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 | 27 | interface EntityListSelectModel { |
28 | 28 | entityType: EntityType | AliasEntityType; | ... | ... |
... | ... | @@ -15,38 +15,29 @@ |
15 | 15 | /// |
16 | 16 | |
17 | 17 | import { |
18 | - AfterContentInit, | |
19 | 18 | AfterViewInit, |
20 | 19 | Component, |
21 | 20 | ElementRef, |
22 | 21 | forwardRef, |
23 | - Input, OnChanges, | |
24 | - OnInit, SimpleChanges, | |
25 | - SkipSelf, | |
22 | + Input, | |
23 | + OnChanges, | |
24 | + OnInit, | |
25 | + SimpleChanges, | |
26 | 26 | ViewChild |
27 | 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 | 39 | import { MatChipList } from '@angular/material/chips'; |
47 | -import { ErrorStateMatcher } from '@angular/material/core'; | |
48 | 40 | import { coerceBooleanProperty } from '@angular/cdk/coercion'; |
49 | -import { emptyPageData } from '@shared/models/page/page-data'; | |
50 | 41 | |
51 | 42 | @Component({ |
52 | 43 | selector: 'tb-entity-list', | ... | ... |