-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5007da2
commit 21317e1
Showing
14 changed files
with
331 additions
and
324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
54
packages/components/src/lib/components/doma/domainInput.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.