Commit a3468265abcaecc97ec7a6d7df4e4be04bf32c23

Authored by Igor Kulikov
1 parent 42c52bfd

Fix UI budget

... ... @@ -14,8 +14,7 @@
14 14 /// limitations under the License.
15 15 ///
16 16
17   -import { JsonSchema, JsonSettingsSchema } from '@app/shared/public-api';
18   -
  17 +import { JsonSettingsSchema } from '@shared/models/widget.models';
19 18
20 19 export function initSchema(): JsonSettingsSchema {
21 20 return {
... ... @@ -63,7 +62,7 @@ export function mergeSchemes(schemes: JsonSettingsSchema[]): JsonSettingsSchema
63 62 }, initSchema());
64 63 }
65 64
66   -export function addCondition(schema: JsonSettingsSchema, condition: String): JsonSettingsSchema {
  65 +export function addCondition(schema: JsonSettingsSchema, condition: string): JsonSettingsSchema {
67 66 schema.form = schema.form.map(element => {
68 67 if (typeof element === 'string') {
69 68 return {
... ... @@ -71,7 +70,7 @@ export function addCondition(schema: JsonSettingsSchema, condition: String): Jso
71 70 condition
72 71 }
73 72 }
74   - if (typeof element == 'object') {
  73 + if (typeof element === 'object') {
75 74 if (element.condition) {
76 75 element.condition += ' && ' + condition
77 76 }
... ... @@ -80,4 +79,4 @@ export function addCondition(schema: JsonSettingsSchema, condition: String): Jso
80 79 return element;
81 80 });
82 81 return schema;
83   -}
\ No newline at end of file
  82 +}
... ...
... ... @@ -14,7 +14,7 @@
14 14 /// limitations under the License.
15 15 ///
16 16
17   -import { JsonSettingsSchema } from '@app/shared/public-api';
  17 +import { JsonSettingsSchema } from '@shared/models/widget.models';
18 18
19 19 export interface MapWidgetInterface {
20 20 resize(),
... ...
... ... @@ -30,13 +30,15 @@ import {
30 30 } from './schemes';
31 31 import { MapWidgetStaticInterface, MapWidgetInterface } from './map-widget.interface';
32 32 import { OpenStreetMap, TencentMap, GoogleMap, HEREMap, ImageMap } from './providers';
33   -import { parseFunction, parseArray, parseData } from '@app/core/utils';
34   -import { initSchema, addToSchema, mergeSchemes, addCondition, addGroupInfo } from '@app/core/schema-utils';
35   -import { AttributeScope, EntityId, JsonSettingsSchema } from '@app/shared/public-api';
  33 +import { parseFunction, parseArray, parseData } from '@core/utils';
  34 +import { initSchema, addToSchema, mergeSchemes, addCondition, addGroupInfo } from '@core/schema-utils';
36 35 import { forkJoin } from 'rxjs';
37 36 import { WidgetContext } from '@app/modules/home/models/widget-component.models';
38   -import { AttributeService } from '@app/core/public-api';
39 37 import { getDefCenterPosition } from './maps-utils';
  38 +import { JsonSettingsSchema } from '@shared/models/widget.models';
  39 +import { EntityId } from '@shared/models/id/entity-id';
  40 +import { AttributeScope } from '@shared/models/telemetry/telemetry.models';
  41 +import { AttributeService } from '@core/http/attribute.service';
40 42
41 43 let providerSets;
42 44 let defaultSettings;
... ... @@ -255,4 +257,4 @@ defaultSettings = {
255 257 credentials: '',
256 258 markerClusteringSetting: null,
257 259 draggableMarker: false
258   -}
\ No newline at end of file
  260 +}
... ...
... ... @@ -26,12 +26,13 @@ import { parseArray, parseTemplate, safeExecute } from '@app/core/utils';
26 26 import { initSchema, addToSchema, addGroupInfo } from '@app/core/schema-utils';
27 27 import { tripAnimationSchema } from '../lib/maps/schemes';
28 28 import { DomSanitizer } from '@angular/platform-browser';
29   -import { WidgetConfig, JsonSchema, JsonSettingsSchema } from '@app/shared/public-api';
30 29 import { WidgetContext } from '@app/modules/home/models/widget-component.models';
31 30 import { getRatio, findAngle } from '../lib/maps/maps-utils';
  31 +import { JsonSettingsSchema, WidgetConfig } from '@shared/models/widget.models';
32 32
33 33
34 34 @Component({
  35 + // tslint:disable-next-line:component-selector
35 36 selector: 'trip-animation',
36 37 templateUrl: './trip-animation.component.html',
37 38 styleUrls: ['./trip-animation.component.scss']
... ...
... ... @@ -128,7 +128,7 @@ import { LedLightComponent } from '@shared/components/led-light.component';
128 128 import { TbJsonToStringDirective } from '@shared/components/directives/tb-json-to-string.directive';
129 129 import { JsonObjectEditDialogComponent } from '@shared/components/dialog/json-object-edit-dialog.component';
130 130 import { HistorySelectorComponent } from './components/time/history-selector/history-selector.component';
131   -import { TbTemplatePipe } from './pipe/public-api';
  131 +import { TbTemplatePipe } from '@shared/pipe/template.pipe';
132 132
133 133 @NgModule({
134 134 providers: [
... ...