forked from lppedd/bpmnio-typings
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Edoardo Luppi
committed
May 30, 2019
0 parents
commit 704e2ff
Showing
8 changed files
with
1,191 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Created by .ignore support plugin (hsz.mobi) | ||
### JetBrains template | ||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm | ||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
||
# User-specific stuff | ||
.idea | ||
*.iml | ||
|
||
# Sensitive or high-churn files | ||
.idea/**/dataSources/ | ||
.idea/**/dataSources.ids | ||
.idea/**/dataSources.local.xml | ||
.idea/**/sqlDataSources.xml | ||
.idea/**/dynamic.xml | ||
.idea/**/uiDesigner.xml | ||
.idea/**/dbnavigator.xml | ||
|
||
# Gradle | ||
.idea/**/gradle.xml | ||
.idea/**/libraries | ||
|
||
# CMake | ||
cmake-build-debug/ | ||
cmake-build-release/ | ||
|
||
# Mongo Explorer plugin | ||
.idea/**/mongoSettings.xml | ||
|
||
# File-based project format | ||
*.iws | ||
|
||
# IntelliJ | ||
out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Cursive Clojure plugin | ||
.idea/replstate.xml | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
|
||
# Editor-based Rest Client | ||
.idea/httpRequests | ||
|
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 @@ | ||
node_modules | ||
target | ||
package-lock.json |
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 @@ | ||
{ | ||
"printWidth": 90, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"endOfLine": "lf" | ||
} |
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,167 @@ | ||
declare module 'bpmn-js-properties-panel/lib/PropertiesActivator' { | ||
import { Base, ModdleElement } from 'bpmn-js'; | ||
import EventBus from 'diagram-js/lib/core/EventBus'; | ||
|
||
export default class PropertiesActivator { | ||
constructor(eventBus: EventBus, priority?: number); | ||
|
||
isEntryVisible(entry: any, element: ModdleElement): boolean; | ||
|
||
isPropertyEditable(entry: any, propertyName: string, element: ModdleElement): boolean; | ||
|
||
getTabs(element: Base | ModdleElement): Tab[]; | ||
} | ||
|
||
export interface Tab { | ||
id: string; | ||
label: string; | ||
groups: Group[]; | ||
enabled?: (element: Base | ModdleElement) => boolean; | ||
} | ||
|
||
export interface Group { | ||
id: string; | ||
label: string; | ||
entries: Entry[]; | ||
enabled?: (element: Base | ModdleElement) => boolean; | ||
} | ||
|
||
export interface Entry { | ||
id: string; | ||
description: string; | ||
validate: (...args: any[]) => { id: string }; | ||
html: string; | ||
|
||
get?(element: ModdleElement): any; | ||
|
||
set?(element: ModdleElement, values?: { [k: string]: any }): any; | ||
} | ||
} | ||
|
||
declare module 'bpmn-js-properties-panel/lib/factory/EntryFactory' { | ||
import { Base, ModdleElement } from 'bpmn-js'; | ||
import { Entry } from 'bpmn-js-properties-panel/lib/PropertiesActivator'; | ||
|
||
export default class EntryFactory { | ||
static textField(options: TextOptions): Entry; | ||
|
||
static validationAwareTextField(options: ValidationTextOptions): Entry; | ||
|
||
static checkbox(options: CheckBoxOptions): Entry; | ||
|
||
static textBox(options: TextBoxOptions): Entry; | ||
|
||
static selectBox(options: SelectBoxOptions): Entry; | ||
|
||
static comboBox(options: ComboBoxOptions): Entry; | ||
|
||
static table(options: TableOptions): Entry; | ||
|
||
static label(options: LabelOptions): Entry; | ||
|
||
static link(options: LinkOptions): Entry; | ||
} | ||
|
||
type Element = Base | ModdleElement; | ||
|
||
export interface Command { | ||
cmd: string; | ||
context: { | ||
element: Element; | ||
businessObject?: ModdleElement; | ||
currentObject?: ModdleElement; | ||
objectsToAdd?: any; | ||
objectsToRemove?: any; | ||
ny; | ||
updatedObjectList?: any[]; | ||
propertyName?: string; | ||
referencePropertyName?: string; | ||
properties?: { [k: string]: any }; | ||
}; | ||
} | ||
|
||
export interface Options { | ||
id: string; | ||
description?: string; | ||
label?: string; | ||
get?: (element: Element, node) => { formKey: any }; | ||
set?: (element: Element, values, node /* opt */) => Command; | ||
validate?: (element: Element, values: { [k: string]: any }) => any; | ||
modelProperty?: string; | ||
} | ||
|
||
export interface ValidationTextOptions { | ||
getProperty: (element: Element) => string; | ||
setProperty: (element: Element, properties?: { [k: string]: any }) => Command; | ||
} | ||
|
||
export interface TextOptions extends Options { | ||
buttonAction?: { | ||
name: string; | ||
method: () => any; | ||
}; | ||
buttonShow?: { | ||
name: string; | ||
method: () => any; | ||
}; | ||
disabled?: (element: Element) => boolean; | ||
hidden?: (element: Element, node /* opt */) => { formKey: any }; | ||
} | ||
|
||
export interface CheckBoxOptions extends Options { | ||
disabled?: (element: Element) => boolean; | ||
hidden?: (element: Element, node /* opt */) => { formKey: any }; | ||
} | ||
|
||
export interface TextBoxOptions extends Options { | ||
show?: (element: Element, node) => boolean; | ||
} | ||
|
||
export interface SelectBoxOptions extends Options { | ||
selectOptions: { | ||
name: string; | ||
value: string; | ||
}[]; | ||
emptyParameter?: boolean; | ||
disabled?: (element: Element) => boolean; | ||
hidden?: (element: Element, node /* opt */) => { formKey: any }; | ||
} | ||
|
||
export interface ComboBoxOptions extends Options { | ||
selectOptions: { | ||
name: string; | ||
value: string; | ||
}[]; | ||
emptyParameter?: boolean; | ||
customValue?: string; | ||
customName?: string; | ||
disabled?: (element: Element) => boolean; | ||
} | ||
|
||
export interface TableOptions extends Options { | ||
modelProperties: string[]; | ||
labels: string[]; | ||
addLabel: string; | ||
getElements: (element: Element, node) => ModdleElement[]; | ||
addElement: (element: Element, node) => Command | Command[]; | ||
updateElement: ( | ||
element: Element, | ||
value: any | null, | ||
node, | ||
idx: number | ||
) => Command | Command[]; | ||
removeElement: (element: Element, node, idx: number) => Command | Command[]; | ||
show?: (element: Element, node) => boolean; | ||
} | ||
|
||
export interface LabelOptions extends Options { | ||
labelText?: string; | ||
divider?: boolean; | ||
showLabel?: (element: Element, node) => boolean; | ||
} | ||
|
||
export interface LinkOptions extends Options { | ||
handleClick: (element: Element, node, event) => boolean; | ||
showLink?: (element: Element, node) => boolean; | ||
} | ||
} |
Oops, something went wrong.