Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePlenkov committed Nov 11, 2024
1 parent 5007da2 commit 21317e1
Show file tree
Hide file tree
Showing 14 changed files with 331 additions and 324 deletions.
8 changes: 4 additions & 4 deletions packages/components/src/lib/components.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from "./components/component";
export * from "./components/devc/package";
export * from "./components/doma/domain";
export * from "./components/dtel/dataElement";
export * from './components/component';
export * from './components/devc/package';
export * from './components/doma/domain';
export * from './components/dtel/dataElement';
6 changes: 3 additions & 3 deletions packages/components/src/lib/components/componentTypes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export enum ComponentType {
dataElement = 'DTEL',
domain = 'DOMA',
}
dataElement = 'DTEL',
domain = 'DOMA',
}
76 changes: 38 additions & 38 deletions packages/components/src/lib/components/doma/dataTypes.ts
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
export enum DataTypes {
ACCP,
CHAR,
CLNT,
CUKY,
CURR,
DF16_DEC,
DECFLOAT16,
DF16_RAW,
DF16_SCL,
DF34_DEC,
DECFLOAT34,
DF34_RAW,
DF34_SCL,
DATN,
DATS,
DEC,
FLTP,
GEOM_EWKB,
INT1,
INT2,
INT4,
INT8,
LANG,
LCHR,
LRAW,
NUMC,
PREC,
QUAN,
RAW,
RAWSTRING,
SSTRING,
STRING,
TIMN,
TIMS,
UNIT,
UTCLONG,
VARC
}
ACCP,
CHAR,
CLNT,
CUKY,
CURR,
DF16_DEC,
DECFLOAT16,
DF16_RAW,
DF16_SCL,
DF34_DEC,
DECFLOAT34,
DF34_RAW,
DF34_SCL,
DATN,
DATS,
DEC,
FLTP,
GEOM_EWKB,
INT1,
INT2,
INT4,
INT8,
LANG,
LCHR,
LRAW,
NUMC,
PREC,
QUAN,
RAW,
RAWSTRING,
SSTRING,
STRING,
TIMN,
TIMS,
UNIT,
UTCLONG,
VARC,
}
52 changes: 26 additions & 26 deletions packages/components/src/lib/components/doma/domain.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
import { Component } from "../component"
import { ComponentType } from "../componentTypes";
import { DomainInput } from "./domainInput";
import { Component } from '../component';
import { ComponentType } from '../componentTypes';
import { DomainInput } from './domainInput';

export class Domain extends Component<DomainInput> {
override get type(): ComponentType {
return ComponentType.domain;
}
override get id(): string {
return this.input.name;
}
override get abapgitSerializer(): string {
return 'LCL_OBJECT_DOMA';
}
override toAbapgit() {
const input = this.input;
return {
DD01V: {
DOMNAME: input.name,
DDLANGUAGE: input.header?.originalLanguage,
DATATYPE: input.dataType,
LENG: input.length,
OUTPUTLEN: input.outputLength,
DDTEXT: input.header?.description,
},
};
}
override get type(): ComponentType {
return ComponentType.domain;
}
override get id(): string {
return this.input.name;
}
override get abapgitSerializer(): string {
return 'LCL_OBJECT_DOMA';
}
override toAbapgit() {
const input = this.input;
return {
DD01V: {
DOMNAME: input.name,
DDLANGUAGE: input.header?.originalLanguage,
DATATYPE: input.dataType,
LENG: input.length,
OUTPUTLEN: input.outputLength,
DDTEXT: input.header?.description,
},
};
}
}

export * from "./domainInput";
export * from './domainInput';
54 changes: 27 additions & 27 deletions packages/components/src/lib/components/doma/domainInput.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
import { DataTypes } from "./dataTypes";
import { OutputStyle } from "./outputStyle";
import { DataTypes } from './dataTypes';
import { OutputStyle } from './outputStyle';

export interface DomainInput {
name: string;
formatVersion: "1";
header?: {
description: string;
originalLanguage: string;
abapLanguageVersion?: "standard" | "keyUser" | "cloudDevelopment";
};
dataType: DataTypes;
length: number;
decimals?: number;
negativeValues?: boolean;
caseSensitive?: boolean;
outputLength?: number;
conversionRoutine?: string;
valueTable?: string;
fixedValues?: Array<{
fixedValue: string;
description: string;
}>;
fixedValueIntervals?: Array<{
lowLimit?: string;
highLimit: string;
description?: string;
}>;
outputStyle?: OutputStyle
name: string;
formatVersion: '1';
header?: {
description: string;
originalLanguage: string;
abapLanguageVersion?: 'standard' | 'keyUser' | 'cloudDevelopment';
};
dataType: DataTypes;
length: number;
decimals?: number;
negativeValues?: boolean;
caseSensitive?: boolean;
outputLength?: number;
conversionRoutine?: string;
valueTable?: string;
fixedValues?: Array<{
fixedValue: string;
description: string;
}>;
fixedValueIntervals?: Array<{
lowLimit?: string;
highLimit: string;
description?: string;
}>;
outputStyle?: OutputStyle;
}
16 changes: 8 additions & 8 deletions packages/components/src/lib/components/doma/outputStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

// generate enum
export enum OutputStyle {
NORMAL = '00',
SIGN_RIGHT = '01',
SCALE_PRESERVING = '02',
SCIENTIFIC = '03',
SCIENTIFIC_WITH_LEADING_ZERO = '04',
SCALE_PRESERVING_SCIENTIFIC = '05',
ENGINEERING = '06'
}
NORMAL = '00',
SIGN_RIGHT = '01',
SCALE_PRESERVING = '02',
SCIENTIFIC = '03',
SCIENTIFIC_WITH_LEADING_ZERO = '04',
SCALE_PRESERVING_SCIENTIFIC = '05',
ENGINEERING = '06',
}
Loading

0 comments on commit 21317e1

Please sign in to comment.