dmn-js-drd
Advanced tools
Comparing version 2.1.0 to 3.0.0
@@ -1,8 +0,9 @@ | ||
'use strict'; | ||
import DrawModule from '../draw'; | ||
import ImportModule from '../import'; | ||
module.exports = { | ||
export default { | ||
__depends__: [ | ||
require('../draw'), | ||
require('../import') | ||
DrawModule, | ||
ImportModule | ||
] | ||
}; |
@@ -1,27 +0,35 @@ | ||
'use strict'; | ||
import inherits from 'inherits'; | ||
var inherits = require('inherits'), | ||
isArray = require('min-dash').isArray, | ||
isObject = require('min-dash').isObject, | ||
assign = require('min-dash').assign; | ||
import { | ||
isArray, | ||
isObject, | ||
assign | ||
} from 'min-dash'; | ||
var domAttr = require('min-dom').attr, | ||
domQuery = require('min-dom').query; | ||
import { | ||
attr as domAttr, | ||
query as domQuery | ||
} from 'min-dom'; | ||
var svgAppend = require('tiny-svg/lib/append'), | ||
svgAttr = require('tiny-svg/lib/attr'), | ||
svgCreate = require('tiny-svg/lib/create'); | ||
import { | ||
append as svgAppend, | ||
attr as svgAttr, | ||
create as svgCreate | ||
} from 'tiny-svg'; | ||
var BaseRenderer = require('diagram-js/lib/draw/BaseRenderer'), | ||
RenderUtil = require('diagram-js/lib/util/RenderUtil'), | ||
TextUtil = require('diagram-js/lib/util/Text'), | ||
ModelUtil = require('dmn-js-shared/lib/util/ModelUtil'); | ||
import BaseRenderer from 'diagram-js/lib/draw/BaseRenderer'; | ||
import TextUtil from 'diagram-js/lib/util/Text'; | ||
var is = ModelUtil.is, | ||
getName = ModelUtil.getName; | ||
import { | ||
createLine | ||
} from 'diagram-js/lib/util/RenderUtil'; | ||
var createLine = RenderUtil.createLine; | ||
import { | ||
is, | ||
getName | ||
} from 'dmn-js-shared/lib/util/ModelUtil'; | ||
function DrdRenderer(eventBus, pathMap, styles) { | ||
export default function DrdRenderer(eventBus, pathMap, styles) { | ||
BaseRenderer.call(this, eventBus); | ||
@@ -437,7 +445,9 @@ | ||
DrdRenderer.$inject = [ 'eventBus', 'pathMap', 'styles' ]; | ||
DrdRenderer.$inject = [ | ||
'eventBus', | ||
'pathMap', | ||
'styles' | ||
]; | ||
module.exports = DrdRenderer; | ||
// helper functions ////////////////////// | ||
@@ -444,0 +454,0 @@ |
@@ -1,7 +0,8 @@ | ||
'use strict'; | ||
import DrdRenderer from './DrdRenderer'; | ||
import PathMap from './PathMap'; | ||
module.exports = { | ||
export default { | ||
__init__: [ 'drdRenderer' ], | ||
drdRenderer: [ 'type', require('./DrdRenderer') ], | ||
pathMap: [ 'type', require('./PathMap')] | ||
drdRenderer: [ 'type', DrdRenderer ], | ||
pathMap: [ 'type', PathMap ] | ||
}; |
@@ -1,3 +0,1 @@ | ||
'use strict'; | ||
/* eslint-disable max-len */ | ||
@@ -9,3 +7,3 @@ | ||
function PathMap() { | ||
export default function PathMap() { | ||
@@ -176,5 +174,3 @@ /** | ||
module.exports = PathMap; | ||
// helpers ////////////////////// | ||
@@ -181,0 +177,0 @@ |
@@ -1,11 +0,15 @@ | ||
'use strict'; | ||
import { | ||
assign, | ||
isArray | ||
} from 'min-dash'; | ||
import { | ||
is, | ||
isAny | ||
} from 'dmn-js-shared/lib/util/ModelUtil'; | ||
var assign = require('min-dash').assign, | ||
isArray = require('min-dash').isArray; | ||
import { | ||
hasPrimaryModifier | ||
} from 'diagram-js/lib/util/Mouse'; | ||
var ModelUtil = require('dmn-js-shared/lib/util/ModelUtil'), | ||
is = ModelUtil.is, | ||
isAny = ModelUtil.isAny, | ||
hasPrimaryModifier = require('diagram-js/lib/util/Mouse').hasPrimaryModifier; | ||
@@ -15,3 +19,3 @@ /** | ||
*/ | ||
function ContextPadProvider( | ||
export default function ContextPadProvider( | ||
eventBus, contextPad, modeling, | ||
@@ -65,5 +69,3 @@ elementFactory, connect, create, | ||
module.exports = ContextPadProvider; | ||
ContextPadProvider.prototype.getContextPadEntries = function(element) { | ||
@@ -70,0 +72,0 @@ |
@@ -1,14 +0,21 @@ | ||
'use strict'; | ||
import DiagramTranslate from 'diagram-js/lib/i18n/translate'; | ||
import DiagramContextPad from 'diagram-js/lib/features/context-pad'; | ||
import DiagramSelection from 'diagram-js/lib/features/selection'; | ||
import DiagramConnect from 'diagram-js/lib/features/connect'; | ||
import DiagramCreate from 'diagram-js/lib/features/create'; | ||
import PopupMenu from '../popup-menu'; | ||
module.exports = { | ||
import ContextPadProvider from './ContextPadProvider'; | ||
export default { | ||
__depends__: [ | ||
require('diagram-js/lib/i18n/translate'), | ||
require('diagram-js/lib/features/context-pad'), | ||
require('diagram-js/lib/features/selection'), | ||
require('diagram-js/lib/features/connect'), | ||
require('diagram-js/lib/features/create'), | ||
require('../popup-menu') | ||
DiagramTranslate, | ||
DiagramContextPad, | ||
DiagramSelection, | ||
DiagramConnect, | ||
DiagramCreate, | ||
PopupMenu | ||
], | ||
__init__: [ 'contextPadProvider' ], | ||
contextPadProvider: [ 'type', require('./ContextPadProvider') ] | ||
contextPadProvider: [ 'type', ContextPadProvider ] | ||
}; |
@@ -1,11 +0,13 @@ | ||
'use strict'; | ||
import { | ||
debounce | ||
} from 'min-dash'; | ||
var debounce = require('min-dash').debounce; | ||
var DEBOUNCE_DELAY = 300; | ||
var domQuery = require('min-dom').query; | ||
import { | ||
query as domQuery | ||
} from 'min-dom'; | ||
function DefinitionIdEdit(eventBus, modeling, canvas) { | ||
export default function DefinitionIdEdit(eventBus, modeling, canvas) { | ||
this._eventBus = eventBus; | ||
@@ -25,5 +27,8 @@ this._modeling = modeling; | ||
DefinitionIdEdit.$inject = [ 'eventBus', 'modeling', 'canvas' ]; | ||
DefinitionIdEdit.$inject = [ | ||
'eventBus', | ||
'modeling', | ||
'canvas' | ||
]; | ||
module.exports = DefinitionIdEdit; | ||
@@ -30,0 +35,0 @@ DefinitionIdEdit.prototype.update = function(type, newValue) { |
@@ -1,8 +0,9 @@ | ||
'use strict'; | ||
import { | ||
domify, | ||
query as domQuery, | ||
delegate as domDelegate | ||
} from 'min-dom'; | ||
var domify = require('min-dom').domify, | ||
domQuery = require('min-dom').query, | ||
domDelegate = require('min-dom').delegate; | ||
function DefinitionIdView(eventBus, canvas) { | ||
export default function DefinitionIdView(eventBus, canvas) { | ||
this._eventBus = eventBus; | ||
@@ -22,4 +23,2 @@ this._canvas = canvas; | ||
module.exports = DefinitionIdView; | ||
/** | ||
@@ -26,0 +25,0 @@ * Initialize |
@@ -1,3 +0,5 @@ | ||
module.exports = { | ||
__depends__: [ ], | ||
import DefinitionPropertiesEdit from './DefinitionPropertiesEdit'; | ||
import PaletteAdapter from './PaletteAdapter'; | ||
export default { | ||
__init__: [ | ||
@@ -7,4 +9,4 @@ 'definitionPropertiesEdit', | ||
], | ||
definitionPropertiesEdit: [ 'type', require('./DefinitionPropertiesEdit') ], | ||
definitionPropertiesPaletteAdapter: [ 'type', require('./PaletteAdapter') ] | ||
definitionPropertiesEdit: [ 'type', DefinitionPropertiesEdit ], | ||
definitionPropertiesPaletteAdapter: [ 'type', PaletteAdapter ] | ||
}; |
@@ -1,5 +0,7 @@ | ||
var domClasses = require('min-dom').classes; | ||
import { | ||
classes as domClasses | ||
} from 'min-dom'; | ||
function PaletteAdapter(eventBus, canvas) { | ||
export default function PaletteAdapter(eventBus, canvas) { | ||
@@ -22,4 +24,5 @@ function toggleMarker(cls, on) { | ||
PaletteAdapter.$inject = [ 'eventBus', 'canvas' ]; | ||
module.exports = PaletteAdapter; | ||
PaletteAdapter.$inject = [ | ||
'eventBus', | ||
'canvas' | ||
]; |
@@ -1,3 +0,5 @@ | ||
module.exports = { | ||
__depends__: [ ], | ||
import DefinitionPropertiesView from './DefinitionPropertiesView'; | ||
import PaletteAdapter from './PaletteAdapter'; | ||
export default { | ||
__init__: [ | ||
@@ -7,4 +9,4 @@ 'definitionPropertiesView', | ||
], | ||
definitionPropertiesView: [ 'type', require('./DefinitionPropertiesView') ], | ||
definitionPropertiesPaletteAdapter: [ 'type', require('./PaletteAdapter') ] | ||
definitionPropertiesView: [ 'type', DefinitionPropertiesView ], | ||
definitionPropertiesPaletteAdapter: [ 'type', PaletteAdapter ] | ||
}; |
import DrillDown from './DrillDown'; | ||
module.exports = { | ||
export default { | ||
__init__: [ 'drillDown' ], | ||
drillDown: [ 'type', DrillDown ] | ||
}; |
@@ -1,9 +0,7 @@ | ||
'use strict'; | ||
import inherits from 'inherits'; | ||
var inherits = require('inherits'); | ||
import EditorActions from 'diagram-js/lib/features/editor-actions/EditorActions'; | ||
var EditorActions = require('diagram-js/lib/features/editor-actions/EditorActions'); | ||
function DrdEditorActions( | ||
export default function DrdEditorActions( | ||
injector, | ||
@@ -53,3 +51,1 @@ canvas, | ||
]; | ||
module.exports = DrdEditorActions; |
@@ -1,9 +0,12 @@ | ||
'use strict'; | ||
import DiagramEditorActions from 'diagram-js/lib/features/editor-actions'; | ||
import DiagramLassoTool from 'diagram-js/lib/features/lasso-tool'; | ||
module.exports = { | ||
import DrdEditorActions from './DrdEditorActions'; | ||
export default { | ||
__depends__: [ | ||
require('diagram-js/lib/features/editor-actions'), | ||
require('diagram-js/lib/features/lasso-tool') | ||
DiagramEditorActions, | ||
DiagramLassoTool | ||
], | ||
editorActions: [ 'type', require('./DrdEditorActions') ] | ||
editorActions: [ 'type', DrdEditorActions ] | ||
}; |
@@ -16,3 +16,3 @@ import { forEach } from 'min-dash'; | ||
*/ | ||
function DiGenerator(eventBus, drdFactory, elementFactory) { | ||
export default function DiGenerator(eventBus, drdFactory, elementFactory) { | ||
@@ -74,4 +74,2 @@ // ensure the definitions contains DI information | ||
module.exports = DiGenerator; | ||
DiGenerator.$inject = [ | ||
@@ -78,0 +76,0 @@ 'eventBus', |
@@ -1,6 +0,6 @@ | ||
'use strict'; | ||
import DiGenerator from './DiGenerator'; | ||
module.exports = { | ||
export default { | ||
__init__: [ 'diGenerator' ], | ||
diGenerator: [ 'type', require('./DiGenerator') ] | ||
diGenerator: [ 'type', DiGenerator ] | ||
}; |
@@ -1,3 +0,1 @@ | ||
'use strict'; | ||
/** | ||
@@ -9,3 +7,3 @@ * DRD specific key bindings. | ||
*/ | ||
function DrdKeyBindings(keyboard, editorActions) { | ||
export default function DrdKeyBindings(keyboard, editorActions) { | ||
@@ -44,4 +42,2 @@ keyboard.addListener(function(key, modifiers) { | ||
'editorActions' | ||
]; | ||
module.exports = DrdKeyBindings; | ||
]; |
@@ -1,9 +0,11 @@ | ||
'use strict'; | ||
import DiagramKeyboard from 'diagram-js/lib/features/keyboard'; | ||
module.exports = { | ||
import DrdKeyBindings from './DrdKeyBindings'; | ||
export default { | ||
__depends__: [ | ||
require('diagram-js/lib/features/keyboard') | ||
DiagramKeyboard | ||
], | ||
__init__: [ 'drdKeyBindings' ], | ||
drdKeyBindings: [ 'type', require('./DrdKeyBindings') ] | ||
drdKeyBindings: [ 'type', DrdKeyBindings ] | ||
}; |
@@ -1,10 +0,11 @@ | ||
'use strict'; | ||
import { | ||
getLabel, | ||
setLabel | ||
} from '../LabelUtil'; | ||
var LabelUtil = require('../LabelUtil'); | ||
/** | ||
* A handler that updates the name of a DMN element. | ||
*/ | ||
function UpdateLabelHandler() { | ||
export default function UpdateLabelHandler() { | ||
@@ -26,3 +27,3 @@ /** | ||
LabelUtil.setLabel(label, text, labelTarget !== label); | ||
setLabel(label, text, labelTarget !== label); | ||
@@ -33,3 +34,3 @@ return [ label, labelTarget ]; | ||
function execute(ctx) { | ||
ctx.oldLabel = LabelUtil.getLabel(ctx.element); | ||
ctx.oldLabel = getLabel(ctx.element); | ||
return setText(ctx.element, ctx.newLabel); | ||
@@ -47,3 +48,1 @@ } | ||
} | ||
module.exports = UpdateLabelHandler; |
@@ -1,9 +0,15 @@ | ||
module.exports = { | ||
import DiagramCommand from 'diagram-js/lib/command'; | ||
import DiagramChangeSupport from 'diagram-js/lib/features/change-support'; | ||
import DiagramDirectEditing from 'diagram-js-direct-editing'; | ||
import LabelEditingProvider from './LabelEditingProvider'; | ||
export default { | ||
__depends__: [ | ||
require('diagram-js/lib/command'), | ||
require('diagram-js/lib/features/change-support'), | ||
require('diagram-js-direct-editing') | ||
DiagramCommand, | ||
DiagramChangeSupport, | ||
DiagramDirectEditing | ||
], | ||
__init__: [ 'labelEditingProvider' ], | ||
labelEditingProvider: [ 'type', require('./LabelEditingProvider') ] | ||
labelEditingProvider: [ 'type', LabelEditingProvider ] | ||
}; |
@@ -1,10 +0,15 @@ | ||
'use strict'; | ||
import UpdateLabelHandler from './cmd/UpdateLabelHandler'; | ||
var UpdateLabelHandler = require('./cmd/UpdateLabelHandler'); | ||
import { | ||
getLabel | ||
} from './LabelUtil'; | ||
var LabelUtil = require('./LabelUtil'); | ||
import { | ||
is | ||
} from 'dmn-js-shared/lib/util/ModelUtil'; | ||
var is = require('dmn-js-shared/lib/util/ModelUtil').is; | ||
function LabelEditingProvider(eventBus, canvas, directEditing, commandStack) { | ||
export default function LabelEditingProvider( | ||
eventBus, canvas, directEditing, commandStack | ||
) { | ||
@@ -51,5 +56,3 @@ this._canvas = canvas; | ||
module.exports = LabelEditingProvider; | ||
/** | ||
@@ -64,3 +67,3 @@ * Activate direct editing for drgs and text annotations. | ||
var text = LabelUtil.getLabel(element); | ||
var text = getLabel(element); | ||
@@ -67,0 +70,0 @@ if (text === undefined) { |
@@ -1,4 +0,5 @@ | ||
'use strict'; | ||
import { | ||
is | ||
} from 'dmn-js-shared/lib/util/ModelUtil'; | ||
var is = require('dmn-js-shared/lib/util/ModelUtil').is; | ||
@@ -19,3 +20,3 @@ function getLabelAttr(semantic) { | ||
module.exports.getLabel = function(element) { | ||
export function getLabel(element) { | ||
var semantic = element.businessObject, | ||
@@ -27,6 +28,6 @@ attr = getLabelAttr(semantic); | ||
} | ||
}; | ||
} | ||
module.exports.setLabel = function(element, text, isExternal) { | ||
export function setLabel(element, text, isExternal) { | ||
var semantic = element.businessObject, | ||
@@ -45,2 +46,2 @@ attr = getLabelAttr(semantic); | ||
return element; | ||
}; | ||
} |
@@ -1,12 +0,14 @@ | ||
'use strict'; | ||
import inherits from 'inherits'; | ||
var inherits = require('inherits'); | ||
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor'; | ||
var CommandInterceptor = require('diagram-js/lib/command/CommandInterceptor'); | ||
import { | ||
getMid | ||
} from 'diagram-js/lib/layout/LayoutUtil'; | ||
var getMid = require('diagram-js/lib/layout/LayoutUtil').getMid; | ||
import { | ||
is | ||
} from 'dmn-js-shared/lib/util/ModelUtil'; | ||
var is = require('dmn-js-shared/lib/util/ModelUtil').is; | ||
var getRequirementType = function(source) { | ||
function getRequirementType(source) { | ||
switch (source.type) { | ||
@@ -22,6 +24,7 @@ case 'dmn:InputData': | ||
} | ||
}; | ||
} | ||
function CreateConnectionBehavior(eventBus, drdFactory, drdRules) { | ||
export default function CreateConnectionBehavior(eventBus, drdFactory, drdRules) { | ||
CommandInterceptor.call(this, eventBus); | ||
@@ -78,6 +81,8 @@ | ||
CreateConnectionBehavior.$inject = [ 'eventBus', 'drdFactory', 'drdRules' ]; | ||
CreateConnectionBehavior.$inject = [ | ||
'eventBus', | ||
'drdFactory', | ||
'drdRules' | ||
]; | ||
inherits(CreateConnectionBehavior, CommandInterceptor); | ||
module.exports = CreateConnectionBehavior; |
@@ -1,2 +0,6 @@ | ||
module.exports = { | ||
import CreateConnectionBehavior from './CreateConnectionBehavior'; | ||
import ReplaceConnectionBehavior from './ReplaceConnectionBehavior'; | ||
import ReplaceElementBehavior from './ReplaceElementBehavior'; | ||
export default { | ||
__init__: [ | ||
@@ -7,5 +11,5 @@ 'createConnectionBehavior', | ||
], | ||
createConnectionBehavior: [ 'type', require('./CreateConnectionBehavior') ], | ||
replaceConnectionBehavior: [ 'type', require('./ReplaceConnectionBehavior') ], | ||
replaceElementBehavior: [ 'type', require('./ReplaceElementBehavior') ] | ||
createConnectionBehavior: [ 'type', CreateConnectionBehavior ], | ||
replaceConnectionBehavior: [ 'type', ReplaceConnectionBehavior ], | ||
replaceElementBehavior: [ 'type', ReplaceElementBehavior ] | ||
}; |
@@ -1,12 +0,12 @@ | ||
'use strict'; | ||
import inherits from 'inherits'; | ||
var inherits = require('inherits'); | ||
import { | ||
filter | ||
} from 'min-dash'; | ||
var filter = require('min-dash').filter; | ||
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor'; | ||
var CommandInterceptor = require('diagram-js/lib/command/CommandInterceptor'); | ||
export default function ReplaceConnectionBehavior(eventBus, modeling, drdRules) { | ||
function ReplaceConnectionBehavior(eventBus, modeling, drdRules) { | ||
CommandInterceptor.call(this, eventBus); | ||
@@ -73,3 +73,1 @@ | ||
]; | ||
module.exports = ReplaceConnectionBehavior; |
@@ -1,9 +0,10 @@ | ||
'use strict'; | ||
import inherits from 'inherits'; | ||
var inherits = require('inherits'); | ||
import { | ||
forEach, | ||
filter | ||
} from 'min-dash'; | ||
var forEach = require('min-dash').forEach, | ||
filter = require('min-dash').filter; | ||
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor'; | ||
var CommandInterceptor = require('diagram-js/lib/command/CommandInterceptor'); | ||
@@ -14,3 +15,3 @@ /** | ||
*/ | ||
function ReplaceElementBehaviour(eventBus, modeling) { | ||
export default function ReplaceElementBehaviour(eventBus, modeling) { | ||
CommandInterceptor.call(this, eventBus); | ||
@@ -58,3 +59,1 @@ | ||
ReplaceElementBehaviour.$inject = [ 'eventBus', 'modeling' ]; | ||
module.exports = ReplaceElementBehaviour; |
@@ -1,5 +0,2 @@ | ||
'use strict'; | ||
function IdClaimHandler(moddle) { | ||
export default function IdClaimHandler(moddle) { | ||
this._moddle = moddle; | ||
@@ -10,5 +7,3 @@ } | ||
module.exports = IdClaimHandler; | ||
IdClaimHandler.prototype.execute = function(context) { | ||
@@ -15,0 +10,0 @@ var ids = this._moddle.ids, |
@@ -1,7 +0,7 @@ | ||
'use strict'; | ||
import { | ||
reduce, | ||
keys, | ||
forEach | ||
} from 'min-dash'; | ||
var reduce = require('min-dash').reduce, | ||
keys = require('min-dash').keys, | ||
forEach = require('min-dash').forEach; | ||
var NAME = 'name', | ||
@@ -20,3 +20,3 @@ ID = 'id'; | ||
*/ | ||
function UpdatePropertiesHandler(elementRegistry, moddle) { | ||
export default function UpdatePropertiesHandler(elementRegistry, moddle) { | ||
this._elementRegistry = elementRegistry; | ||
@@ -28,5 +28,3 @@ this._moddle = moddle; | ||
module.exports = UpdatePropertiesHandler; | ||
/** | ||
@@ -33,0 +31,0 @@ * Updates a DMN element with a list of new properties |
@@ -1,7 +0,7 @@ | ||
'use strict'; | ||
import { | ||
forEach | ||
} from 'min-dash'; | ||
var forEach = require('min-dash').forEach; | ||
function DrdFactory(moddle) { | ||
export default function DrdFactory(moddle) { | ||
this._model = moddle; | ||
@@ -62,5 +62,2 @@ } | ||
return this.create('biodi:Waypoint', waypoint); | ||
}; | ||
module.exports = DrdFactory; | ||
}; |
@@ -1,18 +0,14 @@ | ||
'use strict'; | ||
import inherits from 'inherits'; | ||
var inherits = require('inherits'); | ||
import BaseLayouter from 'diagram-js/lib/layout/BaseLayouter'; | ||
var BaseLayouter = require('diagram-js/lib/layout/BaseLayouter'); | ||
import { | ||
getMid | ||
} from 'diagram-js/lib/layout/LayoutUtil'; | ||
var LayoutUtil = require('diagram-js/lib/layout/LayoutUtil'); | ||
export default function DrdLayouter() {} | ||
var getMid = LayoutUtil.getMid; | ||
function DrdLayouter() {} | ||
inherits(DrdLayouter, BaseLayouter); | ||
module.exports = DrdLayouter; | ||
DrdLayouter.prototype.layoutConnection = function(connection, hints) { | ||
@@ -19,0 +15,0 @@ |
@@ -1,16 +0,20 @@ | ||
'use strict'; | ||
import { | ||
assign, | ||
map, | ||
forEach, | ||
pick | ||
} from 'min-dash'; | ||
var assign = require('min-dash').assign, | ||
map = require('min-dash').map, | ||
forEach = require('min-dash').forEach, | ||
pick = require('min-dash').pick, | ||
inherits = require('inherits'); | ||
import inherits from 'inherits'; | ||
var Collections = require('diagram-js/lib/util/Collections'); | ||
import { | ||
remove as collectionRemove | ||
} from 'diagram-js/lib/util/Collections'; | ||
var ModelUtil = require('dmn-js-shared/lib/util/ModelUtil'), | ||
getBusinessObject = ModelUtil.getBusinessObject, | ||
is = ModelUtil.is; | ||
import { | ||
getBusinessObject, | ||
is | ||
} from 'dmn-js-shared/lib/util/ModelUtil'; | ||
var CommandInterceptor = require('diagram-js/lib/command/CommandInterceptor'); | ||
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor'; | ||
@@ -22,3 +26,3 @@ | ||
*/ | ||
function DrdUpdater( | ||
export default function DrdUpdater( | ||
eventBus, | ||
@@ -247,4 +251,2 @@ drdFactory, | ||
module.exports = DrdUpdater; | ||
DrdUpdater.$inject = [ | ||
@@ -342,3 +344,3 @@ 'eventBus', | ||
Collections.remove(children, businessObject); | ||
collectionRemove(children, businessObject); | ||
} | ||
@@ -345,0 +347,0 @@ |
@@ -1,9 +0,12 @@ | ||
'use strict'; | ||
import { | ||
assign | ||
} from 'min-dash'; | ||
var assign = require('min-dash').assign, | ||
inherits = require('inherits'); | ||
import inherits from 'inherits'; | ||
var is = require('dmn-js-shared/lib/util/ModelUtil').is; | ||
import { | ||
is | ||
} from 'dmn-js-shared/lib/util/ModelUtil'; | ||
var BaseElementFactory = require('diagram-js/lib/core/ElementFactory'); | ||
import BaseElementFactory from 'diagram-js/lib/core/ElementFactory'; | ||
@@ -13,3 +16,3 @@ /** | ||
*/ | ||
function ElementFactory(drdFactory) { | ||
export default function ElementFactory(drdFactory) { | ||
BaseElementFactory.call(this); | ||
@@ -25,4 +28,2 @@ | ||
module.exports = ElementFactory; | ||
ElementFactory.prototype.baseCreate = BaseElementFactory.prototype.create; | ||
@@ -29,0 +30,0 @@ |
@@ -1,22 +0,31 @@ | ||
'use strict'; | ||
import ModelingBehavior from './behavior'; | ||
import Rules from '../rules'; | ||
import DefinitionPropertiesViewer from '../definition-properties/viewer'; | ||
import DiagramCommand from 'diagram-js/lib/command'; | ||
import DiagramSelection from 'diagram-js/lib/features/selection'; | ||
import DiagramChangeSupport from 'diagram-js/lib/features/change-support'; | ||
module.exports = { | ||
import DrdFactory from './DrdFactory'; | ||
import DrdUpdater from './DrdUpdater'; | ||
import ElementFactory from './ElementFactory'; | ||
import Modeling from './Modeling'; | ||
import DrdLayouter from './DrdLayouter'; | ||
import CroppingConnectionDocking from 'diagram-js/lib/layout/CroppingConnectionDocking'; | ||
export default { | ||
__init__: [ 'modeling', 'drdUpdater' ], | ||
__depends__: [ | ||
require('./behavior'), | ||
require('../rules'), | ||
require('../definition-properties/viewer'), | ||
require('diagram-js/lib/command'), | ||
require('diagram-js/lib/features/selection'), | ||
require('diagram-js/lib/features/change-support') | ||
ModelingBehavior, | ||
Rules, | ||
DefinitionPropertiesViewer, | ||
DiagramCommand, | ||
DiagramSelection, | ||
DiagramChangeSupport | ||
], | ||
drdFactory: [ 'type', require('./DrdFactory') ], | ||
drdUpdater: [ 'type', require('./DrdUpdater') ], | ||
elementFactory: [ 'type', require('./ElementFactory') ], | ||
modeling: [ 'type', require('./Modeling') ], | ||
layouter: [ 'type', require('./DrdLayouter') ], | ||
connectionDocking: [ | ||
'type', | ||
require('diagram-js/lib/layout/CroppingConnectionDocking') | ||
] | ||
drdFactory: [ 'type', DrdFactory ], | ||
drdUpdater: [ 'type', DrdUpdater ], | ||
elementFactory: [ 'type', ElementFactory ], | ||
modeling: [ 'type', Modeling ], | ||
layouter: [ 'type', DrdLayouter ], | ||
connectionDocking: [ 'type', CroppingConnectionDocking ] | ||
}; |
@@ -1,9 +0,8 @@ | ||
'use strict'; | ||
import inherits from 'inherits'; | ||
var inherits = require('inherits'); | ||
import BaseModeling from 'diagram-js/lib/features/modeling/Modeling'; | ||
var BaseModeling = require('diagram-js/lib/features/modeling/Modeling'); | ||
import UpdatePropertiesHandler from './cmd/UpdatePropertiesHandler.js'; | ||
import IdClaimHandler from './cmd/IdClaimHandler.js'; | ||
var UpdatePropertiesHandler = require('./cmd/UpdatePropertiesHandler.js'), | ||
IdClaimHandler = require('./cmd/IdClaimHandler.js'); | ||
@@ -19,3 +18,9 @@ /** | ||
*/ | ||
function Modeling(canvas, eventBus, elementFactory, commandStack, drdRules) { | ||
export default function Modeling( | ||
canvas, | ||
eventBus, | ||
elementFactory, | ||
commandStack, | ||
drdRules) { | ||
this._canvas = canvas; | ||
@@ -29,7 +34,10 @@ this._drdRules = drdRules; | ||
Modeling.$inject = [ 'canvas', 'eventBus', 'elementFactory', 'commandStack', 'drdRules' ]; | ||
Modeling.$inject = [ | ||
'canvas', | ||
'eventBus', | ||
'elementFactory', | ||
'commandStack', | ||
'drdRules' | ||
]; | ||
module.exports = Modeling; | ||
Modeling.prototype.getHandlers = function() { | ||
@@ -36,0 +44,0 @@ var handlers = BaseModeling.prototype.getHandlers.call(this); |
@@ -1,10 +0,17 @@ | ||
module.exports = { | ||
import DiagramTranslate from 'diagram-js/lib/i18n/translate'; | ||
import DiagramPalette from 'diagram-js/lib/features/palette'; | ||
import DiagramCreate from 'diagram-js/lib/features/create'; | ||
import DiagramLasso from 'diagram-js/lib/features/lasso-tool'; | ||
import PaletteProvider from './PaletteProvider'; | ||
export default { | ||
__depends__: [ | ||
require('diagram-js/lib/i18n/translate'), | ||
require('diagram-js/lib/features/palette'), | ||
require('diagram-js/lib/features/create'), | ||
require('diagram-js/lib/features/lasso-tool') | ||
DiagramTranslate, | ||
DiagramPalette, | ||
DiagramCreate, | ||
DiagramLasso | ||
], | ||
__init__: [ 'paletteProvider' ], | ||
paletteProvider: [ 'type', require('./PaletteProvider') ] | ||
paletteProvider: [ 'type', PaletteProvider ] | ||
}; |
@@ -1,4 +0,5 @@ | ||
'use strict'; | ||
import { | ||
assign | ||
} from 'min-dash'; | ||
var assign = require('min-dash').assign; | ||
@@ -8,3 +9,5 @@ /** | ||
*/ | ||
function PaletteProvider(palette, create, elementFactory, lassoTool, translate) { | ||
export default function PaletteProvider( | ||
palette, create, elementFactory, | ||
lassoTool, translate) { | ||
@@ -20,4 +23,2 @@ this._palette = palette; | ||
module.exports = PaletteProvider; | ||
PaletteProvider.$inject = [ | ||
@@ -24,0 +25,0 @@ 'palette', |
@@ -1,9 +0,15 @@ | ||
module.exports = { | ||
import DiagramTranslate from 'diagram-js/lib/i18n/translate'; | ||
import DiagramPopupMenu from 'diagram-js/lib/features/popup-menu'; | ||
import Replace from '../replace'; | ||
import ReplaceMenuProvider from './ReplaceMenuProvider'; | ||
export default { | ||
__depends__: [ | ||
require('diagram-js/lib/i18n/translate'), | ||
require('diagram-js/lib/features/popup-menu'), | ||
require('../replace') | ||
DiagramTranslate, | ||
DiagramPopupMenu, | ||
Replace | ||
], | ||
__init__: [ 'replaceMenuProvider' ], | ||
replaceMenuProvider: [ 'type', require('./ReplaceMenuProvider') ] | ||
replaceMenuProvider: [ 'type', ReplaceMenuProvider ] | ||
}; |
@@ -1,15 +0,19 @@ | ||
'use strict'; | ||
import { | ||
is | ||
} from 'dmn-js-shared/lib/util/ModelUtil'; | ||
var is = require('dmn-js-shared/lib/util/ModelUtil').is; | ||
import { | ||
forEach, | ||
filter | ||
} from 'min-dash'; | ||
var forEach = require('min-dash').forEach, | ||
filter = require('min-dash').filter; | ||
import replaceOptions from '../replace/ReplaceOptions'; | ||
var replaceOptions = require ('../replace/ReplaceOptions'); | ||
/** | ||
* This module is an element agnostic replace menu provider for the popup menu. | ||
*/ | ||
function ReplaceMenuProvider(popupMenu, modeling, moddle, drdReplace, rules, translate) { | ||
export default function ReplaceMenuProvider( | ||
popupMenu, modeling, moddle, | ||
drdReplace, rules, translate) { | ||
@@ -143,4 +147,1 @@ this._popupMenu = popupMenu; | ||
}; | ||
module.exports = ReplaceMenuProvider; |
@@ -1,7 +0,5 @@ | ||
'use strict'; | ||
/** | ||
* This module takes care of replacing DRD elements | ||
*/ | ||
function DrdReplace(drdFactory, replace, selection, modeling) { | ||
export default function DrdReplace(drdFactory, replace, selection, modeling) { | ||
@@ -71,4 +69,7 @@ /** | ||
DrdReplace.$inject = [ 'drdFactory', 'replace', 'selection', 'modeling' ]; | ||
module.exports = DrdReplace; | ||
DrdReplace.$inject = [ | ||
'drdFactory', | ||
'replace', | ||
'selection', | ||
'modeling' | ||
]; |
@@ -1,7 +0,12 @@ | ||
module.exports = { | ||
import DiagramReplace from 'diagram-js/lib/features/replace'; | ||
import DiagramSelection from 'diagram-js/lib/features/selection'; | ||
import DrdReplace from './DrdReplace'; | ||
export default { | ||
__depends__: [ | ||
require('diagram-js/lib/features/replace'), | ||
require('diagram-js/lib/features/selection') | ||
DiagramReplace, | ||
DiagramSelection | ||
], | ||
drdReplace: [ 'type', require('./DrdReplace') ] | ||
drdReplace: [ 'type', DrdReplace ] | ||
}; |
@@ -1,34 +0,34 @@ | ||
'use strict'; | ||
module.exports.DECISION = [ | ||
{ | ||
label: 'Empty', | ||
actionName: 'replace-with-empty-decision', | ||
className: 'dmn-icon-clear', | ||
target: { | ||
type: 'dmn:Decision', | ||
table: false, | ||
expression: false | ||
export default { | ||
DECISION: [ | ||
{ | ||
label: 'Empty', | ||
actionName: 'replace-with-empty-decision', | ||
className: 'dmn-icon-clear', | ||
target: { | ||
type: 'dmn:Decision', | ||
table: false, | ||
expression: false | ||
} | ||
}, | ||
{ | ||
label: 'Decision Table', | ||
actionName: 'replace-with-decision-table', | ||
className: 'dmn-icon-decision-table', | ||
target: { | ||
type: 'dmn:Decision', | ||
table: true, | ||
expression: false | ||
} | ||
}, | ||
{ | ||
label: 'Literal Expression', | ||
actionName: 'replace-with-literal-expression', | ||
className: 'dmn-icon-literal-expression', | ||
target: { | ||
type: 'dmn:Decision', | ||
table: false, | ||
expression: true | ||
} | ||
} | ||
}, | ||
{ | ||
label: 'Decision Table', | ||
actionName: 'replace-with-decision-table', | ||
className: 'dmn-icon-decision-table', | ||
target: { | ||
type: 'dmn:Decision', | ||
table: true, | ||
expression: false | ||
} | ||
}, | ||
{ | ||
label: 'Literal Expression', | ||
actionName: 'replace-with-literal-expression', | ||
className: 'dmn-icon-literal-expression', | ||
target: { | ||
type: 'dmn:Decision', | ||
table: false, | ||
expression: true | ||
} | ||
} | ||
]; | ||
] | ||
}; |
@@ -1,15 +0,14 @@ | ||
'use strict'; | ||
import { | ||
is, | ||
isAny | ||
} from 'dmn-js-shared/lib/util/ModelUtil'; | ||
var ModelUtil = require('dmn-js-shared/lib/util/ModelUtil'), | ||
is = ModelUtil.is, | ||
isAny = ModelUtil.isAny; | ||
import inherits from 'inherits'; | ||
var inherits = require('inherits'); | ||
import RuleProvider from 'diagram-js/lib/features/rules/RuleProvider'; | ||
var RuleProvider = require('diagram-js/lib/features/rules/RuleProvider'); | ||
/** | ||
* DRD specific modeling rule | ||
*/ | ||
function DrdRules(eventBus) { | ||
export default function DrdRules(eventBus) { | ||
RuleProvider.call(this, eventBus); | ||
@@ -22,4 +21,2 @@ } | ||
module.exports = DrdRules; | ||
DrdRules.prototype.init = function() { | ||
@@ -26,0 +23,0 @@ |
@@ -1,9 +0,11 @@ | ||
'use strict'; | ||
import DiagramRulesModule from 'diagram-js/lib/features/rules'; | ||
module.exports = { | ||
import DrdRules from './DrdRules'; | ||
export default { | ||
__depends__: [ | ||
require('diagram-js/lib/features/rules') | ||
DiagramRulesModule | ||
], | ||
__init__: [ 'drdRules' ], | ||
drdRules: [ 'type', require('./DrdRules') ] | ||
drdRules: [ 'type', DrdRules ] | ||
}; |
@@ -1,9 +0,10 @@ | ||
'use strict'; | ||
import { | ||
assign, | ||
map | ||
} from 'min-dash'; | ||
var assign = require('min-dash').assign, | ||
map = require('min-dash').map; | ||
import { | ||
is | ||
} from 'dmn-js-shared/lib/util/ModelUtil'; | ||
var ModelUtil = require('dmn-js-shared/lib/util/ModelUtil'), | ||
is = ModelUtil.is; | ||
function elementData(semantic, attrs) { | ||
@@ -33,3 +34,8 @@ return assign({ | ||
function DrdImporter(eventBus, canvas, elementFactory, elementRegistry) { | ||
export default function DrdImporter( | ||
eventBus, | ||
canvas, | ||
elementFactory, | ||
elementRegistry) { | ||
this._eventBus = eventBus; | ||
@@ -41,7 +47,10 @@ this._canvas = canvas; | ||
DrdImporter.$inject = [ 'eventBus', 'canvas', 'elementFactory', 'elementRegistry' ]; | ||
DrdImporter.$inject = [ | ||
'eventBus', | ||
'canvas', | ||
'elementFactory', | ||
'elementRegistry' | ||
]; | ||
module.exports = DrdImporter; | ||
DrdImporter.prototype.root = function(diagram) { | ||
@@ -48,0 +57,0 @@ var element = this._elementFactory.createRoot(elementData(diagram)); |
@@ -1,10 +0,11 @@ | ||
'use strict'; | ||
import { | ||
forEach, | ||
find, | ||
matchPattern | ||
} from 'min-dash'; | ||
var forEach = require('min-dash').forEach, | ||
find = require('min-dash').find, | ||
matchPattern = require('min-dash').matchPattern; | ||
import { | ||
is | ||
} from 'dmn-js-shared/lib/util/ModelUtil'; | ||
var is = require('dmn-js-shared/lib/util/ModelUtil').is; | ||
function parseID(element) { | ||
@@ -14,3 +15,3 @@ return element && element.href.slice(1); | ||
function DRDTreeWalker(handler, options) { | ||
export default function DRDTreeWalker(handler, options) { | ||
@@ -138,3 +139,1 @@ // list of elements to handle deferred to ensure | ||
} | ||
module.exports = DRDTreeWalker; |
@@ -1,6 +0,4 @@ | ||
'use strict'; | ||
import DrdTreeWalker from './DrdTreeWalker'; | ||
var DrdTreeWalker = require('./DrdTreeWalker'); | ||
/** | ||
@@ -16,3 +14,3 @@ * Import the definitions into a diagram. | ||
*/ | ||
function importDRD(drd, definitions, done) { | ||
export function importDRD(drd, definitions, done) { | ||
@@ -58,4 +56,2 @@ var importer = drd.get('drdImporter'), | ||
done(error, warnings); | ||
} | ||
module.exports.importDRD = importDRD; | ||
} |
@@ -1,5 +0,5 @@ | ||
'use strict'; | ||
import DrdImporter from './DrdImporter'; | ||
module.exports = { | ||
drdImporter: [ 'type', require('./DrdImporter') ] | ||
}; | ||
export default { | ||
drdImporter: [ 'type', DrdImporter ] | ||
}; |
@@ -1,7 +0,5 @@ | ||
'use strict'; | ||
import inherits from 'inherits'; | ||
var inherits = require('inherits'); | ||
import NavigatedViewer from './NavigatedViewer'; | ||
var Viewer = require('./Viewer'); | ||
/** | ||
@@ -83,37 +81,37 @@ * A modeler for DMN tables. | ||
*/ | ||
function Modeler(options) { | ||
Viewer.call(this, options); | ||
export default function Modeler(options) { | ||
NavigatedViewer.call(this, options); | ||
} | ||
inherits(Modeler, Viewer); | ||
inherits(Modeler, NavigatedViewer); | ||
module.exports = Modeler; | ||
// modules the modeler is composed of | ||
// | ||
// - viewer modules | ||
// - interaction modules | ||
// - viewer + navigation modules | ||
// - modeling modules | ||
Modeler.prototype._interactionModules = [ | ||
// non-modeling components | ||
require('diagram-js/lib/navigation/movecanvas'), | ||
require('diagram-js/lib/navigation/touch'), | ||
require('diagram-js/lib/navigation/zoomscroll') | ||
]; | ||
import MoveModule from 'diagram-js/lib/features/move'; | ||
import BendpointsModule from 'diagram-js/lib/features/bendpoints'; | ||
import GenerateDiModule from './features/generate-di'; | ||
import EditorActionsModule from './features/editor-actions'; | ||
import ContextPadModule from './features/context-pad'; | ||
import KeyboardModule from './features/keyboard'; | ||
import LabelEditingModule from './features/label-editing'; | ||
import ModelingModule from './features/modeling'; | ||
import PaletteModule from './features/palette'; | ||
import DefinitionPropertiesModule from './features/definition-properties/modeler'; | ||
Modeler.prototype._modelingModules = [ | ||
// modeling components | ||
require('diagram-js/lib/features/move'), | ||
require('diagram-js/lib/features/bendpoints'), | ||
require('diagram-js/lib/features/overlays'), | ||
require('./features/generate-di'), | ||
require('./features/editor-actions'), | ||
require('./features/context-pad'), | ||
require('./features/keyboard'), | ||
require('./features/label-editing'), | ||
require('./features/modeling'), | ||
require('./features/palette'), | ||
require('./features/definition-properties/modeler') | ||
MoveModule, | ||
BendpointsModule, | ||
GenerateDiModule, | ||
EditorActionsModule, | ||
ContextPadModule, | ||
KeyboardModule, | ||
LabelEditingModule, | ||
ModelingModule, | ||
PaletteModule, | ||
DefinitionPropertiesModule | ||
]; | ||
@@ -123,3 +121,3 @@ | ||
Modeler.prototype._modules, | ||
Modeler.prototype._interactionModules, | ||
Modeler.prototype._modelingModules); | ||
Modeler.prototype._modelingModules | ||
); |
@@ -1,8 +0,6 @@ | ||
'use strict'; | ||
import inherits from 'inherits'; | ||
var inherits = require('inherits'); | ||
import Viewer from './Viewer'; | ||
var Viewer = require('./Viewer'); | ||
/** | ||
@@ -13,3 +11,3 @@ * A viewer that includes mouse navigation facilities | ||
*/ | ||
function NavigatedViewer(options) { | ||
export default function NavigatedViewer(options) { | ||
Viewer.call(this, options); | ||
@@ -20,7 +18,10 @@ } | ||
module.exports = NavigatedViewer; | ||
import ZoomScroll from 'diagram-js/lib/navigation/zoomscroll'; | ||
import MoveCanvas from 'diagram-js/lib/navigation/movecanvas'; | ||
import TouchModule from 'diagram-js/lib/navigation/touch'; | ||
NavigatedViewer.prototype._navigationModules = [ | ||
require('diagram-js/lib/navigation/zoomscroll'), | ||
require('diagram-js/lib/navigation/movecanvas') | ||
ZoomScroll, | ||
MoveCanvas, | ||
TouchModule | ||
]; | ||
@@ -30,2 +31,3 @@ | ||
NavigatedViewer.prototype._modules, | ||
NavigatedViewer.prototype._navigationModules); | ||
NavigatedViewer.prototype._navigationModules | ||
); |
@@ -7,8 +7,7 @@ /** | ||
'use strict'; | ||
import { | ||
domify, | ||
delegate as domDelegate | ||
} from 'min-dom'; | ||
var domify = require('min-dom').domify; | ||
var domDelegate = require('min-dom').delegate; | ||
// inlined ../../../../resources/logo.svg | ||
@@ -19,3 +18,3 @@ // eslint-disable-next-line | ||
var BPMNIO_IMG = '<img width="52" height="52" src="' + BPMNIO_LOGO_URL + '" />'; | ||
export var BPMNIO_IMG = '<img width="52" height="52" src="' + BPMNIO_LOGO_URL + '" />'; | ||
@@ -72,3 +71,3 @@ function css(attrs) { | ||
function open() { | ||
export function open() { | ||
@@ -84,6 +83,2 @@ if (!lightbox) { | ||
document.body.appendChild(lightbox); | ||
} | ||
module.exports.open = open; | ||
module.exports.BPMNIO_IMG = BPMNIO_IMG; | ||
} |
@@ -8,13 +8,19 @@ /** | ||
var domify = require('min-dom').domify, | ||
domQuery = require('min-dom').query, | ||
domRemove = require('min-dom').remove; | ||
import { | ||
domify, | ||
query as domQuery, | ||
remove as domRemove | ||
} from 'min-dom'; | ||
var Diagram = require('diagram-js'); | ||
import Diagram from 'diagram-js'; | ||
var inherits = require('inherits'); | ||
import inherits from 'inherits'; | ||
var importDRD = require('./import/Importer').importDRD; | ||
import { | ||
importDRD | ||
} from './import/Importer'; | ||
var innerSVG = require('tiny-svg/lib/innerSVG'); | ||
import { | ||
innerSVG | ||
} from 'tiny-svg'; | ||
@@ -69,3 +75,3 @@ | ||
*/ | ||
function Viewer(options) { | ||
export default function Viewer(options) { | ||
@@ -85,4 +91,2 @@ this._container = this._createContainer(); | ||
module.exports = Viewer; | ||
/** | ||
@@ -292,10 +296,16 @@ * Export the currently displayed DMN 1.1 diagram as | ||
import CoreModule from './core'; | ||
import TranslateModule from 'diagram-js/lib/i18n/translate'; | ||
import SelectionModule from 'diagram-js/lib/features/selection'; | ||
import OverlaysModule from 'diagram-js/lib/features/overlays'; | ||
import DefinitionPropertiesModule from './features/definition-properties/viewer'; | ||
import DrillDownModule from './features/drill-down'; | ||
Viewer.prototype._modules = [ | ||
require('./core'), | ||
require('diagram-js/lib/i18n/translate'), | ||
require('diagram-js/lib/features/selection'), | ||
require('diagram-js/lib/features/overlays'), | ||
require('./features/rules'), | ||
require('./features/definition-properties/viewer'), | ||
require('./features/drill-down') | ||
CoreModule, | ||
TranslateModule, | ||
SelectionModule, | ||
OverlaysModule, | ||
DefinitionPropertiesModule, | ||
DrillDownModule | ||
]; | ||
@@ -305,5 +315,11 @@ | ||
var PoweredBy = require('./util/PoweredByUtil'), | ||
domEvent = require('min-dom').event; | ||
import { | ||
BPMNIO_IMG, | ||
open as openPoweredBy | ||
} from './util/PoweredByUtil'; | ||
import { | ||
event as domEvent | ||
} from 'min-dom'; | ||
/** | ||
@@ -318,3 +334,3 @@ * Adds the project logo to the diagram container as | ||
function addProjectLogo(container) { | ||
var img = PoweredBy.BPMNIO_IMG; | ||
var img = BPMNIO_IMG; | ||
@@ -335,3 +351,3 @@ var linkMarkup = | ||
domEvent.bind(linkElement, 'click', function(event) { | ||
PoweredBy.open(); | ||
openPoweredBy(); | ||
@@ -338,0 +354,0 @@ event.preventDefault(); |
{ | ||
"name": "dmn-js-drd", | ||
"description": "A decision requirements diagram view for dmn-js", | ||
"version": "2.1.0", | ||
"version": "3.0.0", | ||
"scripts": { | ||
@@ -21,10 +21,10 @@ "test": "karma start", | ||
"dependencies": { | ||
"diagram-js": "^0.29.0", | ||
"diagram-js-direct-editing": "^0.23.0", | ||
"dmn-js-shared": "^2.1.0", | ||
"diagram-js": "^1.1.0", | ||
"diagram-js-direct-editing": "^1.2.0", | ||
"dmn-js-shared": "^3.0.0", | ||
"inherits": "^2.0.1", | ||
"min-dash": "^2.2.0", | ||
"min-dom": "^2.0.0", | ||
"tiny-svg": "^0.1.3" | ||
"min-dash": "^3.0.0", | ||
"min-dom": "^3.0.0", | ||
"tiny-svg": "^2.0.0" | ||
} | ||
} |
@@ -1,9 +0,9 @@ | ||
'use strict'; | ||
import { | ||
assign, | ||
isFunction, | ||
forEach | ||
} from 'min-dash'; | ||
var assign = require('min-dash').assign, | ||
isFunction = require('min-dash').isFunction, | ||
forEach = require('min-dash').forEach; | ||
import TestContainer from 'mocha-test-container-support'; | ||
var TestContainer = require('mocha-test-container-support'); | ||
import DrdModeler from './DrdModeler'; | ||
@@ -141,3 +141,3 @@ import DrdViewer from './DrdViewer'; | ||
*/ | ||
function inject(fn) { | ||
export function inject(fn) { | ||
return function() { | ||
@@ -162,3 +162,3 @@ | ||
function injectAsync(doneFn) { | ||
export function injectAsync(doneFn) { | ||
return function(done) { | ||
@@ -200,3 +200,3 @@ var testFn = doneFn(done); | ||
*/ | ||
function bootstrapModeler(diagram, options, locals) { | ||
export function bootstrapModeler(diagram, options, locals) { | ||
return bootstrapDmnJS(DrdModeler, diagram, options, locals); | ||
@@ -233,24 +233,15 @@ } | ||
*/ | ||
function bootstrapViewer(diagram, options, locals) { | ||
export function bootstrapViewer(diagram, options, locals) { | ||
return bootstrapDmnJS(DrdViewer, diagram, options, locals); | ||
} | ||
function getDmnJS() { | ||
export function getDmnJS() { | ||
return DMN_JS; | ||
} | ||
function getDrdJS() { | ||
export function getDrdJS() { | ||
return DMN_JS.getActiveViewer(); | ||
} | ||
module.exports.bootstrapDmnJS = (window || global).bootstrapDmnJS = bootstrapDmnJS; | ||
module.exports.bootstrapModeler = (window || global).bootstrapModeler = bootstrapModeler; | ||
module.exports.bootstrapViewer = (window || global).bootstrapViewer = bootstrapViewer; | ||
module.exports.inject = (window || global).inject = inject; | ||
module.exports.injectAsync = (window || global).injectAsync = injectAsync; | ||
module.exports.getDrdJS = (window || global).getDrdJS = getDrdJS; | ||
module.exports.getDmnJS = (window || global).getDmnJS = getDmnJS; | ||
function insertCSS(name, css) { | ||
export function insertCSS(name, css) { | ||
if (document.querySelector('[data-css-file="' + name + '"]')) { | ||
@@ -274,5 +265,9 @@ return; | ||
module.exports.insertCSS = insertCSS; | ||
global.chai.use(require('diagram-js/test/matchers/BoundsMatchers')); | ||
global.chai.use(require('diagram-js/test/matchers/ConnectionMatchers')); | ||
import BoundsMatchers from 'diagram-js/test/matchers/BoundsMatchers'; | ||
import ConnectionMatchers from 'diagram-js/test/matchers/ConnectionMatchers'; | ||
/* global chai */ | ||
chai.use(BoundsMatchers); | ||
chai.use(ConnectionMatchers); |
@@ -1,8 +0,6 @@ | ||
'use strict'; | ||
import inherits from 'inherits'; | ||
var inherits = require('inherits'); | ||
import RuleProvider from 'diagram-js/lib/features/rules/RuleProvider'; | ||
var RuleProvider = require('diagram-js/lib/features/rules/RuleProvider'); | ||
function CustomRules(eventBus) { | ||
export default function CustomRules(eventBus) { | ||
RuleProvider.call(this, eventBus); | ||
@@ -17,4 +15,2 @@ } | ||
// placeholder | ||
}; | ||
module.exports = CustomRules; | ||
}; |
@@ -1,4 +0,6 @@ | ||
module.exports = { | ||
import CustomRules from './CustomRules'; | ||
export default { | ||
__init__: [ 'customRules' ], | ||
customRules: [ 'type', require('./CustomRules') ] | ||
customRules: [ 'type', CustomRules ] | ||
}; |
@@ -1,9 +0,11 @@ | ||
'use strict'; | ||
import { | ||
getDrdJS | ||
} from '../helper'; | ||
var TestHelper = require('../helper'); | ||
import { | ||
query as domQuery, | ||
queryAll as domQueryAll | ||
} from 'min-dom'; | ||
var domQuery = require('min-dom').query, | ||
domQueryAll = require('min-dom').queryAll; | ||
/** | ||
@@ -19,4 +21,4 @@ * Create an event with global coordinates | ||
*/ | ||
function queryElement(selector, target, queryAll) { | ||
return TestHelper.getDrdJS().invoke(function(canvas) { | ||
export function queryElement(selector, target, queryAll) { | ||
return getDrdJS().invoke(function(canvas) { | ||
@@ -38,9 +40,5 @@ if (typeof target === 'boolean') { | ||
module.exports.queryElement = queryElement; | ||
function getBounds(element) { | ||
export function getBounds(element) { | ||
return element.getBoundingClientRect(); | ||
} | ||
module.exports.getBounds = getBounds; |
@@ -1,8 +0,10 @@ | ||
'use strict'; | ||
import { | ||
getDrdJS | ||
} from '../helper'; | ||
var TestHelper = require('../helper'); | ||
import { | ||
assign | ||
} from 'min-dash'; | ||
var assign = require('min-dash').assign; | ||
function mouseEvent(type, element, opts) { | ||
@@ -52,4 +54,4 @@ var evt, options, | ||
function clickElement(element, isMousedown) { | ||
return TestHelper.getDrdJS().invoke(function(elementRegistry) { | ||
export function clickElement(element, isMousedown) { | ||
return getDrdJS().invoke(function(elementRegistry) { | ||
@@ -70,8 +72,6 @@ var target = elementRegistry.getGraphics(element); | ||
module.exports.clickElement = clickElement; | ||
export function inputEvent(element, value) { | ||
return getDrdJS().invoke(function(elementRegistry) { | ||
function inputEvent(element, value) { | ||
return TestHelper.getDrdJS().invoke(function(elementRegistry) { | ||
var target = elementRegistry.getGraphics(element); | ||
@@ -88,3 +88,1 @@ | ||
} | ||
module.exports.inputEvent = inputEvent; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3713
114255
+ Addedcss.escape@1.5.1(transitive)
+ Addeddiagram-js@1.4.0(transitive)
+ Addeddiagram-js-direct-editing@1.8.0(transitive)
+ Addeddidi@4.0.0(transitive)
+ Addeddmn-js-shared@3.0.0(transitive)
+ Addeddmn-moddle@5.0.0(transitive)
+ Addedinferno@5.6.3(transitive)
+ Addedinferno-shared@5.6.3(transitive)
+ Addedinferno-vnode-flags@5.6.3(transitive)
+ Addedmin-dash@3.8.1(transitive)
+ Addedmin-dom@3.2.1(transitive)
+ Addedmoddle@4.1.0(transitive)
+ Addedmoddle-xml@7.5.0(transitive)
+ Addedobject-refs@0.3.0(transitive)
+ Addedopencollective-postinstall@2.0.3(transitive)
+ Addedsaxen@8.1.2(transitive)
+ Addedselection-ranges@3.0.3(transitive)
+ Addedtiny-svg@2.2.4(transitive)
- Removedansi-escapes@1.4.0(transitive)
- Removedansi-regex@2.1.13.0.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedbabel-polyfill@6.23.0(transitive)
- Removedbabel-runtime@6.26.0(transitive)
- Removedchalk@1.1.3(transitive)
- Removedchardet@0.4.2(transitive)
- Removedcli-cursor@2.1.0(transitive)
- Removedcli-width@2.2.1(transitive)
- Removedclosest@0.0.1(transitive)
- Removedcore-js@2.6.12(transitive)
- Removeddelegate-events@1.1.1(transitive)
- Removeddiagram-js@0.29.2(transitive)
- Removeddiagram-js-direct-editing@0.23.0(transitive)
- Removeddidi@3.2.0(transitive)
- Removeddmn-js-shared@2.1.0(transitive)
- Removeddmn-moddle@3.0.1(transitive)
- Removedencoding@0.1.13(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedexternal-editor@2.2.0(transitive)
- Removedfigures@2.0.0(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removediconv-lite@0.4.240.6.3(transitive)
- Removedinferno@4.0.8(transitive)
- Removedinferno-shared@4.0.8(transitive)
- Removedinferno-vnode-flags@4.0.8(transitive)
- Removedinquirer@3.0.6(transitive)
- Removedis-fullwidth-code-point@2.0.0(transitive)
- Removedis-stream@1.1.0(transitive)
- Removedlodash@4.17.21(transitive)
- Removedmatches-selector@0.0.1(transitive)
- Removedmimic-fn@1.2.0(transitive)
- Removedmin-dash@2.4.0(transitive)
- Removedmin-dom@2.2.0(transitive)
- Removedminimist@1.2.0(transitive)
- Removedmoddle@3.0.0(transitive)
- Removedmoddle-xml@5.0.2(transitive)
- Removedmute-stream@0.0.7(transitive)
- Removednode-fetch@1.6.3(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedobject-refs@0.1.1(transitive)
- Removedonetime@2.0.1(transitive)
- Removedopencollective@1.0.3(transitive)
- Removedopn@4.0.2(transitive)
- Removedos-tmpdir@1.0.2(transitive)
- Removedpinkie@2.0.4(transitive)
- Removedpinkie-promise@2.0.1(transitive)
- Removedregenerator-runtime@0.10.50.11.1(transitive)
- Removedrestore-cursor@2.0.0(transitive)
- Removedrun-async@2.4.1(transitive)
- Removedrx@4.1.0(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsaxen@7.0.1(transitive)
- Removedselection-ranges@1.2.3(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedstring-width@2.1.1(transitive)
- Removedstrip-ansi@3.0.14.0.0(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedthrough@2.3.8(transitive)
- Removedtiny-stack@0.1.0(transitive)
- Removedtiny-svg@0.1.3(transitive)
- Removedtmp@0.0.33(transitive)
Updateddiagram-js@^1.1.0
Updateddmn-js-shared@^3.0.0
Updatedmin-dash@^3.0.0
Updatedmin-dom@^3.0.0
Updatedtiny-svg@^2.0.0