-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IMPROV: Isolate dmnjs typescript typings
- Loading branch information
Showing
10 changed files
with
94 additions
and
81 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
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export interface DmnColumn { | ||
label: string; | ||
id: string; | ||
index: number; | ||
type: string; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { JsonDatatype } from '../json/jsonDatatypes'; | ||
|
||
export class DmnDatatypeMapping { | ||
static string = JsonDatatype.STRING; | ||
static integer = JsonDatatype.INTEGER; | ||
static long = JsonDatatype.INTEGER; | ||
static double = JsonDatatype.NUMBER; | ||
static boolean = JsonDatatype.BOOLEAN; | ||
static date = JsonDatatype.DATETIME; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { DmnModelerView } from './dmnModelerView'; | ||
import { MyDmnModdle } from './dmnModdle'; | ||
|
||
export interface DMNJS { | ||
_viewers: any; | ||
_activeView: DmnModelerView; | ||
_moddle: MyDmnModdle; | ||
importXML(xml: string, callback: (error: any) => void); | ||
saveXML(options: any, callback: (error: any, xml: string) => void); | ||
getViews(): DmnModelerView[]; | ||
on(eventname: string, eventCallback: (event) => void); | ||
_updateViews(): void; | ||
_switchView(tableId: string); | ||
getActiveViewer(): DmnModelerView; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { DmnModdleElement } from './dmnModdleElement'; | ||
import { DmnModelingType } from './dmnModelingType'; | ||
import { Modeling } from './modeling'; | ||
|
||
export interface DmnModelerView { | ||
element: DmnModdleElement; | ||
get(value: DmnModelingType): Modeling; | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export type DmnModelingType = 'modeling'; |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { DmnBusinessObject } from './dmnBusinessObject'; | ||
import { DmnModdleRule } from './dmnModdleRule'; | ||
import { DmnModdleElement } from './dmnModdleElement'; | ||
|
||
export interface Modeling { | ||
editAllowedValues(businessObject: DmnBusinessObject, restrictionSet: string[]); | ||
editAnnotation(rule: DmnModdleRule, value: string); | ||
editCell(cell: any, value: string); | ||
editDecisionTableId(newId: string); | ||
editDecisionTableName(newName); | ||
editExpressionLanguage(element: DmnModdleElement, language: string); | ||
editHitPolicy(hitPolicy: string, aggregation: string); | ||
editInputExpression(inputExpression: unknown, value); | ||
editInputExpressionTypeRef(inputExpression: unknown, typeRef: string); | ||
editOutputName(output: DmnModdleElement, newName: string); | ||
editOutputTypeRef(output: DmnModdleElement, typeRef: string); | ||
|
||
addRow(ruleConfig: Object): { cells: DmnBusinessObject[] }; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface Shape { | ||
id: string; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { ShapeEventContext } from './shapeEventContext'; | ||
|
||
export interface ShapeEvent { | ||
context: ShapeEventContext; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Shape } from './shape'; | ||
|
||
export interface ShapeEventContext { | ||
shape: Shape; | ||
} |