Skip to content

Commit

Permalink
fix(#2651): Change import to platform-service
Browse files Browse the repository at this point in the history
  • Loading branch information
tenthe committed Apr 5, 2024
1 parent 5b845e8 commit 901016d
Show file tree
Hide file tree
Showing 19 changed files with 37 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ export class DataType {
public static readonly BOOLEAN = this.XSD + 'boolean';
public static readonly STRING = this.XSD + 'string';
public static readonly DOUBLE = this.XSD + 'double';

// Should we support data type number?
public static readonly NUMBER = this.XSD + 'number';

public static isNumberType(datatype: string): boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export class SemanticType {
return property.domainProperties.includes(SemanticType.IMAGE);
}

// TODO should we move this to DataType, and check for the data type instead of domain properties?
public static isNumber(property: EventProperty): boolean {
return property.domainProperties.includes(SemanticType.SO_NUMBER);
}
Expand Down
3 changes: 3 additions & 0 deletions ui/projects/streampipes/platform-services/src/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,6 @@ export * from './lib/model/user/user.model';

export * from './lib/model/assets/asset.model';
export * from './lib/model/labels/labels.model';

export * from './lib/model/types/data-type';
export * from './lib/model/types/semantic-type';
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import { Component, EventEmitter, Input, Output } from '@angular/core';
import { SpServiceConfiguration } from '@streampipes/platform-services';
import { SemanticTypeService } from '../../../../core-services/types/semantic-type.service';

@Component({
selector: 'sp-service-configs',
Expand All @@ -29,7 +28,7 @@ export class ServiceConfigsComponent {
@Output() updateServiceConfiguration: EventEmitter<SpServiceConfiguration> =
new EventEmitter<SpServiceConfiguration>();

constructor(public semanticTypeService: SemanticTypeService) {}
constructor() {}

updateConfiguration(): void {
this.updateServiceConfiguration.emit(this.serviceConfiguration);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { TreeNode } from '@ali-hm/angular-tree-component';
import {
DataType,
EventProperty,
EventPropertyList,
EventPropertyNested,
EventPropertyPrimitive,
EventPropertyUnion,
EventSchema,
SemanticType,
FieldStatusInfo,
} from '@streampipes/platform-services';
import { EditEventPropertyComponent } from '../../../../dialog/edit-event-property/edit-event-property.component';
Expand All @@ -33,8 +35,6 @@ import { StaticValueTransformService } from '../../../../services/static-value-t
import { EventPropertyUtilsService } from '../../../../services/event-property-utils.service';
import { ShepherdService } from '../../../../../services/tour/shepherd.service';
import { IdGeneratorService } from '../../../../../core-services/id-generator/id-generator.service';
import { SemanticType } from '../../../../../../../projects/streampipes/platform-services/src/lib/model/types/semantic-type';
import { DataType } from '../../../../../../../projects/streampipes/platform-services/src/lib/model/types/data-type';

@Component({
selector: 'sp-event-property-row',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { RestService } from '../../../../services/rest.service';
import { ITreeOptions, TreeComponent } from '@ali-hm/angular-tree-component';
import {
AdapterDescription,
DataType,
EventPropertyNested,
EventPropertyPrimitive,
EventPropertyUnion,
Expand All @@ -42,8 +43,7 @@ import { UserErrorMessage } from '../../../../../core-model/base/UserErrorMessag
import { TransformationRuleService } from '../../../../services/transformation-rule.service';
import { StaticValueTransformService } from '../../../../services/static-value-transform.service';
import { IdGeneratorService } from '../../../../../core-services/id-generator/id-generator.service';
import { SemanticType } from '../../../../../../../projects/streampipes/platform-services/src/lib/model/types/semantic-type';
import { DataType } from '../../../../../../../projects/streampipes/platform-services/src/lib/model/types/data-type';
import { SemanticType } from '@streampipes/platform-services';

@Component({
selector: 'sp-event-schema',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ import {
import { UntypedFormControl } from '@angular/forms';
import { Observable } from 'rxjs';
import { ShepherdService } from '../../../../../services/tour/shepherd.service';
import { SemanticTypesRestService } from '../../../../../../../projects/streampipes/platform-services/src/lib/apis/semantic-types-rest.service';
import { SemanticType } from '../../../../../../../projects/streampipes/platform-services/src/lib/model/types/semantic-type';
import { DataType } from '../../../../../../../projects/streampipes/platform-services/src/lib/model/types/data-type';
import {
DataType,
SemanticType,
SemanticTypesRestService,
} from '@streampipes/platform-services';

@Component({
selector: 'sp-edit-schema-transformation',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ import {
EventPropertyNested,
EventPropertyPrimitive,
EventPropertyUnion,
SemanticType,
} from '@streampipes/platform-services';
import { DataTypesService } from '../../services/data-type.service';
import { DialogRef } from '@streampipes/shared-ui';
import { EditSchemaTransformationComponent } from './components/edit-schema-transformation/edit-schema-transformation.component';
import { EditValueTransformationComponent } from './components/edit-value-transformation/edit-value-transformation.component';
import { EditUnitTransformationComponent } from './components/edit-unit-transformation/edit-unit-transformation.component';
import { ShepherdService } from '../../../services/tour/shepherd.service';
import { SemanticType } from '../../../../../projects/streampipes/platform-services/src/lib/model/types/semantic-type';

@Component({
selector: 'sp-edit-event-property',
Expand Down
6 changes: 4 additions & 2 deletions ui/src/app/connect/filter/timestamp.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
*/

import { Pipe, PipeTransform } from '@angular/core';
import { EventPropertyUnion } from '@streampipes/platform-services';
import { SemanticType } from '../../../../projects/streampipes/platform-services/src/lib/model/types/semantic-type';
import {
EventPropertyUnion,
SemanticType,
} from '@streampipes/platform-services';

@Pipe({
name: 'timestampFilter',
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/connect/services/transformation-rule.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ import {
EventSchema,
MoveRuleDescription,
RenameRuleDescription,
SemanticType,
TimestampTranfsformationRuleDescription,
TransformationRuleDescriptionUnion,
UnitTransformRuleDescription,
} from '@streampipes/platform-services';
import { TimestampTransformationRuleMode } from '../model/TimestampTransformationRuleMode';
import { StaticValueTransformService } from './static-value-transform.service';
import { SemanticType } from '../../../../projects/streampipes/platform-services/src/lib/model/types/semantic-type';

@Injectable({ providedIn: 'root' })
export class TransformationRuleService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
*/

import { Component, Input } from '@angular/core';
import { EventSchema } from '@streampipes/platform-services';
import { DataType } from '../../../../../projects/streampipes/platform-services/src/lib/model/types/data-type';
import { DataType, EventSchema } from '@streampipes/platform-services';

@Component({
selector: 'sp-field-names-table',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
*/

import { Component, Input } from '@angular/core';
import { EventSchema } from '@streampipes/platform-services';
import { SemanticType } from '../../../../../projects/streampipes/platform-services/src/lib/model/types/semantic-type';
import { EventSchema, SemanticType } from '@streampipes/platform-services';

@Component({
selector: 'sp-live-preview-table',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { ValidatorFn, Validators } from '@angular/forms';
import { ConfigurationInfo } from '../../../connect/model/ConfigurationInfo';
import { FreeTextStaticProperty } from '@streampipes/platform-services';
import {
DataType,
FreeTextStaticProperty,
SemanticType,
} from '@streampipes/platform-services';
import {
ValidateNumber,
ValidateString,
ValidateUrl,
} from '../input.validator';
import { AbstractValidatedStaticPropertyRenderer } from '../base/abstract-validated-static-property';
import { QuillEditorComponent } from 'ngx-quill';
import { SemanticType } from '../../../../../projects/streampipes/platform-services/src/lib/model/types/semantic-type';
import { DataType } from '../../../../../projects/streampipes/platform-services/src/lib/model/types/data-type';

@Component({
selector: 'sp-app-static-free-input',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ import { StaticPropertyExtractor } from '../../../sdk/extractor/static-property-
import { MatTableDataSource } from '@angular/material/table';
import { TableConfig } from './table-config';
import { ResizeService } from '../../../services/resize.service';
import { DatalakeRestService } from '@streampipes/platform-services';
import {
DatalakeRestService,
SemanticType,
} from '@streampipes/platform-services';
import { WidgetConfigBuilder } from '../../../registry/widget-config-builder';
import { SemanticType } from '../../../../../../projects/streampipes/platform-services/src/lib/model/types/semantic-type';

@Component({
selector: 'sp-table-widget',
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/dashboard/registry/widget-config-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
*/

import { CollectedSchemaRequirements } from '../sdk/collected-schema-requirements';
import { DataType } from '../../../../projects/streampipes/platform-services/src/lib/model/types/data-type';
import { Tuple2 } from '../../core-model/base/Tuple2';
import {
ColorPickerStaticProperty,
DashboardWidgetSettings,
DataType,
FreeTextStaticProperty,
OneOfStaticProperty,
Option,
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/dashboard/sdk/ep-requirements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
*
*/

import { DataType } from '../../../../projects/streampipes/platform-services/src/lib/model/types/data-type';
import { DataType } from '@streampipes/platform-services';
import {
EventPropertyList,
EventPropertyNested,
EventPropertyPrimitive,
EventPropertyUnion,
SemanticType,
} from '@streampipes/platform-services';
import { SemanticType } from '../../../../projects/streampipes/platform-services/src/lib/model/types/semantic-type';

export class EpRequirements {
private static ep(): EventPropertyPrimitive {
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/dashboard/sdk/matching/datatype-match.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
*/

import { DataType } from '../../../../../projects/streampipes/platform-services/src/lib/model/types/data-type';
import { DataType } from '@streampipes/platform-services';

export class DatatypeMatch {
match(datatypeRequirement: string, datatypeOffer: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ import { Injectable } from '@angular/core';
import { FieldProvider } from '../models/dataview-dashboard.model';
import {
DataExplorerField,
DataType,
EventProperty,
EventPropertyPrimitive,
EventPropertyUnion,
FieldConfig,
SemanticType,
SourceConfig,
} from '@streampipes/platform-services';
import { SemanticType } from '../../../../projects/streampipes/platform-services/src/lib/model/types/semantic-type';
import { DataType } from '../../../../projects/streampipes/platform-services/src/lib/model/types/data-type';

@Injectable({ providedIn: 'root' })
export class DataExplorerFieldProviderService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
import { Component, OnInit } from '@angular/core';
import { BaseOutputStrategy } from '../base/BaseOutputStrategy';
import {
DataType,
EventPropertyPrimitive,
UserDefinedOutputStrategy,
} from '@streampipes/platform-services';
import { UntypedFormControl } from '@angular/forms';
import { IdGeneratorService } from '../../../../core-services/id-generator/id-generator.service';
import { DataType } from '../../../../../../projects/streampipes/platform-services/src/lib/model/types/data-type';

@Component({
selector: 'sp-user-defined-output-strategy',
Expand Down

0 comments on commit 901016d

Please sign in to comment.