dmn-js-literal-expression
Advanced tools
Comparing version 6.3.3 to 7.0.0
@@ -1,5 +0,7 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
/** | ||
@@ -11,3 +13,5 @@ * A single decision element registry. | ||
*/ | ||
var ElementRegistry = function () { | ||
var ElementRegistry = | ||
/*#__PURE__*/ | ||
function () { | ||
function ElementRegistry(viewer, eventBus) { | ||
@@ -21,3 +25,3 @@ _classCallCheck(this, ElementRegistry); | ||
_createClass(ElementRegistry, [{ | ||
key: 'getDecision', | ||
key: "getDecision", | ||
value: function getDecision() { | ||
@@ -27,5 +31,4 @@ return this._viewer.getDecision(); | ||
}, { | ||
key: 'updateId', | ||
key: "updateId", | ||
value: function updateId(element, newId) { | ||
var decision = this.getDecision(); | ||
@@ -49,6 +52,4 @@ | ||
export default ElementRegistry; | ||
export { ElementRegistry as default }; | ||
ElementRegistry.$inject = ['viewer', 'eventBus']; | ||
//# sourceMappingURL=ElementRegistry.js.map |
import ElementRegistry from './ElementRegistry'; | ||
export default { | ||
@@ -4,0 +3,0 @@ __init__: ['elementRegistry'], |
@@ -1,13 +0,28 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } | ||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } | ||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } | ||
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } | ||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
import Viewer from './Viewer'; | ||
import DecisionPropertiesEditorModule from './features/decision-properties/editor'; | ||
@@ -19,3 +34,5 @@ import KeyboardModule from './features/keyboard'; | ||
var Editor = function (_Viewer) { | ||
var Editor = | ||
/*#__PURE__*/ | ||
function (_Viewer) { | ||
_inherits(Editor, _Viewer); | ||
@@ -26,7 +43,7 @@ | ||
return _possibleConstructorReturn(this, (Editor.__proto__ || Object.getPrototypeOf(Editor)).apply(this, arguments)); | ||
return _possibleConstructorReturn(this, _getPrototypeOf(Editor).apply(this, arguments)); | ||
} | ||
_createClass(Editor, [{ | ||
key: 'getModules', | ||
key: "getModules", | ||
value: function getModules() { | ||
@@ -36,3 +53,3 @@ return [].concat(_toConsumableArray(Viewer._getModules()), _toConsumableArray(Editor._getModules())); | ||
}], [{ | ||
key: '_getModules', | ||
key: "_getModules", | ||
value: function _getModules() { | ||
@@ -46,3 +63,3 @@ return [DecisionPropertiesEditorModule, KeyboardModule, LiteralExpressionPropertiesEditorModule, ModelingModule, TextareaEditorComponent]; | ||
export default Editor; | ||
export { Editor as default }; | ||
//# sourceMappingURL=Editor.js.map |
@@ -1,21 +0,34 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
import { createVNode } from "inferno"; | ||
import { createVNode } from 'inferno'; | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
import { Component } from 'inferno'; | ||
var DecisionPropertiesComponent = function (_Component) { | ||
var DecisionPropertiesComponent = | ||
/*#__PURE__*/ | ||
function (_Component) { | ||
_inherits(DecisionPropertiesComponent, _Component); | ||
function DecisionPropertiesComponent(props, context) { | ||
var _this; | ||
_classCallCheck(this, DecisionPropertiesComponent); | ||
var _this = _possibleConstructorReturn(this, (DecisionPropertiesComponent.__proto__ || Object.getPrototypeOf(DecisionPropertiesComponent)).call(this, props, context)); | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(DecisionPropertiesComponent).call(this, props, context)); | ||
_this._viewer = context.injector.get('viewer'); | ||
@@ -26,11 +39,10 @@ return _this; | ||
_createClass(DecisionPropertiesComponent, [{ | ||
key: 'render', | ||
key: "render", | ||
value: function render() { | ||
// there is only one single element | ||
var _viewer$getDecision = this._viewer.getDecision(), | ||
name = _viewer$getDecision.name, | ||
id = _viewer$getDecision.id; | ||
var _this$_viewer$getDeci = this._viewer.getDecision(), | ||
name = _this$_viewer$getDeci.name, | ||
id = _this$_viewer$getDeci.id; | ||
return createVNode(1, 'div', 'decision-properties', [createVNode(1, 'h3', 'decision-name', name, 0), createVNode(1, 'h5', 'decision-id', id, 0)], 4); | ||
return createVNode(1, "div", "decision-properties", [createVNode(1, "h3", "decision-name", name, 0), createVNode(1, "h5", "decision-id", id, 0)], 4); | ||
} | ||
@@ -42,3 +54,3 @@ }]); | ||
export default DecisionPropertiesComponent; | ||
export { DecisionPropertiesComponent as default }; | ||
//# sourceMappingURL=DecisionPropertiesComponent.js.map |
@@ -1,34 +0,48 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
import { createVNode, createComponentVNode } from "inferno"; | ||
import { createVNode, createComponentVNode } from 'inferno'; | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
import { Component } from 'inferno'; | ||
import { validateId } from 'dmn-js-shared/lib/util/IdsUtil'; | ||
import EditableComponent from 'dmn-js-shared/lib/components/EditableComponent'; | ||
var DecisionPropertiesEditorComponent = function (_Component) { | ||
var DecisionPropertiesEditorComponent = | ||
/*#__PURE__*/ | ||
function (_Component) { | ||
_inherits(DecisionPropertiesEditorComponent, _Component); | ||
function DecisionPropertiesEditorComponent(props, context) { | ||
var _this; | ||
_classCallCheck(this, DecisionPropertiesEditorComponent); | ||
var _this = _possibleConstructorReturn(this, (DecisionPropertiesEditorComponent.__proto__ || Object.getPrototypeOf(DecisionPropertiesEditorComponent)).call(this, props, context)); | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(DecisionPropertiesEditorComponent).call(this, props, context)); | ||
_this.onElementsChanged = function () { | ||
_defineProperty(_assertThisInitialized(_this), "onElementsChanged", function () { | ||
_this.forceUpdate(); | ||
}; | ||
}); | ||
_this.setDecisionName = function (name) { | ||
_defineProperty(_assertThisInitialized(_this), "setDecisionName", function (name) { | ||
_this._modeling.editDecisionName(name); | ||
}; | ||
}); | ||
_this.setDecisionId = function (id) { | ||
_defineProperty(_assertThisInitialized(_this), "setDecisionId", function (id) { | ||
var oldId = _this.getDecision().id; | ||
@@ -41,7 +55,7 @@ | ||
_this._modeling.editDecisionId(id); | ||
}; | ||
}); | ||
_this.validateId = function (id) { | ||
_defineProperty(_assertThisInitialized(_this), "validateId", function (id) { | ||
return validateId(_this.getDecision(), id); | ||
}; | ||
}); | ||
@@ -54,2 +68,3 @@ _this._viewer = context.injector.get('viewer'); | ||
}); | ||
return _this; | ||
@@ -59,3 +74,3 @@ } | ||
_createClass(DecisionPropertiesEditorComponent, [{ | ||
key: 'componentWillUnmount', | ||
key: "componentWillUnmount", | ||
value: function componentWillUnmount() { | ||
@@ -67,3 +82,3 @@ this.setupChangeListeners({ | ||
}, { | ||
key: 'getDecision', | ||
key: "getDecision", | ||
value: function getDecision() { | ||
@@ -73,3 +88,3 @@ return this._viewer.getDecision(); | ||
}, { | ||
key: 'setupChangeListeners', | ||
key: "setupChangeListeners", | ||
value: function setupChangeListeners(_ref) { | ||
@@ -80,3 +95,2 @@ var bind = _ref.bind, | ||
if (typeof unbind === 'string') { | ||
@@ -91,17 +105,17 @@ changeSupport.offElementsChanged(unbind, this.onElementsChanged); | ||
}, { | ||
key: 'render', | ||
key: "render", | ||
value: function render() { | ||
var _getDecision = this.getDecision(), | ||
name = _getDecision.name, | ||
id = _getDecision.id; | ||
var _this$getDecision = this.getDecision(), | ||
name = _this$getDecision.name, | ||
id = _this$getDecision.id; | ||
return createVNode(1, 'header', 'decision-properties', [createComponentVNode(2, DecisionName, { | ||
'className': 'decision-name editor', | ||
'value': name, | ||
'onChange': this.setDecisionName | ||
return createVNode(1, "header", "decision-properties", [createComponentVNode(2, DecisionName, { | ||
"className": "decision-name editor", | ||
"value": name, | ||
"onChange": this.setDecisionName | ||
}), createComponentVNode(2, DecisionId, { | ||
'className': 'decision-id editor', | ||
'value': id, | ||
'validate': this.validateId, | ||
'onChange': this.setDecisionId | ||
"className": "decision-id editor", | ||
"value": id, | ||
"validate": this.validateId, | ||
"onChange": this.setDecisionId | ||
})], 4); | ||
@@ -114,5 +128,7 @@ } | ||
export default DecisionPropertiesEditorComponent; | ||
export { DecisionPropertiesEditorComponent as default }; | ||
var DecisionName = function (_EditableComponent) { | ||
var DecisionName = | ||
/*#__PURE__*/ | ||
function (_EditableComponent) { | ||
_inherits(DecisionName, _EditableComponent); | ||
@@ -123,10 +139,9 @@ | ||
return _possibleConstructorReturn(this, (DecisionName.__proto__ || Object.getPrototypeOf(DecisionName)).apply(this, arguments)); | ||
return _possibleConstructorReturn(this, _getPrototypeOf(DecisionName).apply(this, arguments)); | ||
} | ||
_createClass(DecisionName, [{ | ||
key: 'render', | ||
key: "render", | ||
value: function render() { | ||
return createVNode(1, 'h3', this.getClassName(), this.getEditor(), 0); | ||
return createVNode(1, "h3", this.getClassName(), this.getEditor(), 0); | ||
} | ||
@@ -138,3 +153,5 @@ }]); | ||
var DecisionId = function (_EditableComponent2) { | ||
var DecisionId = | ||
/*#__PURE__*/ | ||
function (_EditableComponent2) { | ||
_inherits(DecisionId, _EditableComponent2); | ||
@@ -145,10 +162,9 @@ | ||
return _possibleConstructorReturn(this, (DecisionId.__proto__ || Object.getPrototypeOf(DecisionId)).apply(this, arguments)); | ||
return _possibleConstructorReturn(this, _getPrototypeOf(DecisionId).apply(this, arguments)); | ||
} | ||
_createClass(DecisionId, [{ | ||
key: 'render', | ||
key: "render", | ||
value: function render() { | ||
return createVNode(1, 'h5', this.getClassName(), this.getEditor(), 0); | ||
return createVNode(1, "h5", this.getClassName(), this.getEditor(), 0); | ||
} | ||
@@ -155,0 +171,0 @@ }]); |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
import DecisionPropertiesComponent from './components/DecisionPropertiesComponent'; | ||
var HIGH_PRIORITY = 2000; | ||
@@ -15,6 +14,4 @@ | ||
export default DecisionProperties; | ||
export { DecisionProperties as default }; | ||
DecisionProperties.$inject = ['components']; | ||
//# sourceMappingURL=DecisionProperties.js.map |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
import DecisionPropertiesEditorComponent from './components/DecisionPropertiesEditorComponent'; | ||
var HIGH_PRIORITY = 2000; | ||
@@ -15,6 +14,4 @@ | ||
export default DecisionPropertiesEditor; | ||
export { DecisionPropertiesEditor as default }; | ||
DecisionPropertiesEditor.$inject = ['components']; | ||
//# sourceMappingURL=DecisionPropertiesEditor.js.map |
import DecisionPropertiesEditor from './DecisionPropertiesEditor'; | ||
import DebounceInput from 'dmn-js-shared/lib/features/debounce-input'; | ||
export default { | ||
@@ -5,0 +4,0 @@ __depends__: [DebounceInput], |
import DecisionProperties from './DecisionProperties'; | ||
export default { | ||
@@ -4,0 +3,0 @@ __init__: ['decisionProperties'], |
@@ -1,10 +0,10 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
import { forEach } from 'min-dash'; | ||
var NOT_REGISTERED_ERROR = 'is not a registered action', | ||
IS_REGISTERED_ERROR = 'is already registered'; | ||
/** | ||
@@ -19,3 +19,5 @@ * An interface that provides access to modeling actions by decoupling | ||
var EditorActions = function () { | ||
var EditorActions = | ||
/*#__PURE__*/ | ||
function () { | ||
function EditorActions(commandStack, eventBus) { | ||
@@ -33,3 +35,2 @@ _classCallCheck(this, EditorActions); | ||
} | ||
/** | ||
@@ -46,3 +47,3 @@ * Triggers a registered action | ||
_createClass(EditorActions, [{ | ||
key: 'trigger', | ||
key: "trigger", | ||
value: function trigger(action, opts) { | ||
@@ -55,3 +56,2 @@ if (!this._actions[action]) { | ||
} | ||
/** | ||
@@ -65,3 +65,3 @@ * Registers a collections of actions. | ||
}, { | ||
key: 'register', | ||
key: "register", | ||
value: function register(actions, listener) { | ||
@@ -78,3 +78,2 @@ var _this = this; | ||
} | ||
/** | ||
@@ -88,3 +87,3 @@ * Registers a listener to an action key | ||
}, { | ||
key: '_registerAction', | ||
key: "_registerAction", | ||
value: function _registerAction(action, listener) { | ||
@@ -97,3 +96,2 @@ if (this.isRegistered(action)) { | ||
} | ||
/** | ||
@@ -106,3 +104,3 @@ * Unregister an existing action | ||
}, { | ||
key: 'unregister', | ||
key: "unregister", | ||
value: function unregister(action) { | ||
@@ -115,3 +113,2 @@ if (!this.isRegistered(action)) { | ||
} | ||
/** | ||
@@ -126,3 +123,3 @@ * Checks wether the given action is registered | ||
}, { | ||
key: 'isRegistered', | ||
key: "isRegistered", | ||
value: function isRegistered(action) { | ||
@@ -136,9 +133,5 @@ return !!this._actions[action]; | ||
export default EditorActions; | ||
export { EditorActions as default }; | ||
EditorActions.$inject = ['commandStack', 'eventBus']; // helpers ///////////// | ||
EditorActions.$inject = ['commandStack', 'eventBus']; | ||
// helpers ///////////// | ||
function error(action, message) { | ||
@@ -145,0 +138,0 @@ return new Error(action + ' ' + message); |
import EditorActions from './EditorActions'; | ||
export default { | ||
@@ -4,0 +3,0 @@ __init__: ['editorActions'], |
import EditorActions from '../editor-actions'; | ||
import Keyboard from './Keyboard'; | ||
export default { | ||
@@ -6,0 +4,0 @@ __depends__: [EditorActions], |
@@ -1,9 +0,11 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
import { event as domEvent } from 'min-dom'; | ||
import { isCmd, isShift } from './KeyboardUtil'; | ||
/** | ||
@@ -32,3 +34,5 @@ * A keyboard abstraction that may be activated and | ||
var Keyboard = function () { | ||
var Keyboard = | ||
/*#__PURE__*/ | ||
function () { | ||
function Keyboard(config, eventBus, editorActions) { | ||
@@ -39,17 +43,17 @@ var _this = this; | ||
this._init = function () { | ||
_defineProperty(this, "_init", function () { | ||
_this._registerDefaultBindings(); | ||
_this._fire('init'); | ||
}; | ||
}); | ||
this._destroy = function () { | ||
_defineProperty(this, "_destroy", function () { | ||
_this._fire('destroy'); | ||
_this.unbind(); | ||
_this._listeners = null; | ||
}; | ||
}); | ||
this._keyHandler = function (event) { | ||
_defineProperty(this, "_keyHandler", function (event) { | ||
var i, | ||
@@ -64,15 +68,14 @@ l, | ||
event.stopPropagation(); | ||
return; | ||
} | ||
} | ||
}; | ||
}); | ||
this.unbind = function () { | ||
_defineProperty(this, "unbind", function () { | ||
var node = _this._node; | ||
if (node) { | ||
_this._fire('unbind'); | ||
_this._fire('unbind'); // unbind key events | ||
// unbind key events | ||
domEvent.unbind(node, 'keydown', _this._keyHandler, true); | ||
@@ -82,3 +85,3 @@ } | ||
_this._node = null; | ||
}; | ||
}); | ||
@@ -88,10 +91,6 @@ this._config = config || {}; | ||
this._editorActions = editorActions; | ||
this._listeners = []; | ||
eventBus.on('viewer.destroy', this._destroy); | ||
eventBus.on('viewer.init', this._init); | ||
eventBus.on('attach', function () { | ||
if (_this._config.bindTo) { | ||
@@ -101,23 +100,12 @@ _this.bind(config.bindTo); | ||
}); | ||
eventBus.on('detach', this.unbind); | ||
} | ||
// our key handler is a singleton that passes | ||
// (keycode, modifiers) to each listener. | ||
// | ||
// listeners must indicate that they handled a key event | ||
// by returning true. This stops the event propagation. | ||
// | ||
_createClass(Keyboard, [{ | ||
key: 'bind', | ||
key: "bind", | ||
value: function bind(node) { | ||
// make sure that the keyboard is only bound once to the DOM | ||
this.unbind(); | ||
this._node = node; // bind key events | ||
this._node = node; | ||
// bind key events | ||
domEvent.bind(node, 'keydown', this._keyHandler, true); | ||
@@ -128,3 +116,3 @@ | ||
}, { | ||
key: 'getBinding', | ||
key: "getBinding", | ||
value: function getBinding() { | ||
@@ -134,3 +122,3 @@ return this._node; | ||
}, { | ||
key: '_fire', | ||
key: "_fire", | ||
value: function _fire(event) { | ||
@@ -143,30 +131,22 @@ this._eventBus.fire('keyboard.' + event, { | ||
}, { | ||
key: '_registerDefaultBindings', | ||
key: "_registerDefaultBindings", | ||
value: function _registerDefaultBindings() { | ||
var listeners = this._listeners; | ||
var editorActions = this._editorActions; | ||
// init default listeners | ||
var editorActions = this._editorActions; // init default listeners | ||
// undo | ||
// (CTRL|CMD) + Z | ||
function undo(key, modifiers) { | ||
if (isCmd(modifiers) && !isShift(modifiers) && key === 90) { | ||
editorActions.trigger('undo'); | ||
return true; | ||
} | ||
} | ||
// redo | ||
} // redo | ||
// CTRL + Y | ||
// CMD + SHIFT + Z | ||
function redo(key, modifiers) { | ||
if (isCmd(modifiers) && (key === 89 || key === 90 && isShift(modifiers))) { | ||
editorActions.trigger('redo'); | ||
return true; | ||
@@ -179,3 +159,2 @@ } | ||
} | ||
/** | ||
@@ -189,3 +168,3 @@ * Add a listener function that is notified with (key, modifiers) whenever | ||
}, { | ||
key: 'addListener', | ||
key: "addListener", | ||
value: function addListener(listenerFn) { | ||
@@ -195,3 +174,3 @@ this._listeners.unshift(listenerFn); | ||
}, { | ||
key: 'removeListener', | ||
key: "removeListener", | ||
value: function removeListener(listenerFn) { | ||
@@ -207,6 +186,4 @@ this._listeners = this._listeners.filter(function (l) { | ||
export default Keyboard; | ||
export { Keyboard as default }; | ||
Keyboard.$inject = ['config.keyboard', 'eventBus', 'editorActions']; | ||
//# sourceMappingURL=Keyboard.js.map |
export function hasModifier(modifiers) { | ||
return modifiers.ctrlKey || modifiers.metaKey || modifiers.shiftKey || modifiers.altKey; | ||
} | ||
export function isCmd(modifiers) { | ||
@@ -14,3 +13,2 @@ // ensure we don't react to AltGr | ||
} | ||
export function isShift(modifiers) { | ||
@@ -17,0 +15,0 @@ return modifiers.shiftKey; |
@@ -1,21 +0,34 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
import { createVNode, createTextVNode } from "inferno"; | ||
import { createVNode, createTextVNode } from 'inferno'; | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
import { Component } from 'inferno'; | ||
var LiteralExpressionPropertiesComponent = function (_Component) { | ||
var LiteralExpressionPropertiesComponent = | ||
/*#__PURE__*/ | ||
function (_Component) { | ||
_inherits(LiteralExpressionPropertiesComponent, _Component); | ||
function LiteralExpressionPropertiesComponent(props, context) { | ||
var _this; | ||
_classCallCheck(this, LiteralExpressionPropertiesComponent); | ||
var _this = _possibleConstructorReturn(this, (LiteralExpressionPropertiesComponent.__proto__ || Object.getPrototypeOf(LiteralExpressionPropertiesComponent)).call(this, props, context)); | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(LiteralExpressionPropertiesComponent).call(this, props, context)); | ||
_this._viewer = context.injector.get('viewer'); | ||
@@ -26,9 +39,9 @@ return _this; | ||
_createClass(LiteralExpressionPropertiesComponent, [{ | ||
key: 'render', | ||
key: "render", | ||
value: function render() { | ||
var _viewer$getDecision = this._viewer.getDecision(), | ||
literalExpression = _viewer$getDecision.literalExpression, | ||
variable = _viewer$getDecision.variable; | ||
var _this$_viewer$getDeci = this._viewer.getDecision(), | ||
literalExpression = _this$_viewer$getDeci.literalExpression, | ||
variable = _this$_viewer$getDeci.variable; | ||
return createVNode(1, 'div', 'literal-expression-properties', createVNode(1, 'table', null, [createVNode(1, 'tr', null, [createVNode(1, 'td', null, createTextVNode('Variable Name:'), 2), createVNode(1, 'td', null, createVNode(1, 'span', null, variable.name || '-', 0), 2)], 4), createVNode(1, 'tr', null, [createVNode(1, 'td', null, createTextVNode('Variable Type:'), 2), createVNode(1, 'td', null, createVNode(1, 'span', null, variable.typeRef || '-', 0), 2)], 4), createVNode(1, 'tr', null, [createVNode(1, 'td', null, createTextVNode('Expression Language:'), 2), createVNode(1, 'td', null, createVNode(1, 'span', null, literalExpression.expressionLanguage || '-', 0), 2)], 4)], 4), 2); | ||
return createVNode(1, "div", "literal-expression-properties", createVNode(1, "table", null, [createVNode(1, "tr", null, [createVNode(1, "td", null, createTextVNode("Variable Name:"), 2), createVNode(1, "td", null, createVNode(1, "span", null, variable.name || '-', 0), 2)], 4), createVNode(1, "tr", null, [createVNode(1, "td", null, createTextVNode("Variable Type:"), 2), createVNode(1, "td", null, createVNode(1, "span", null, variable.typeRef || '-', 0), 2)], 4), createVNode(1, "tr", null, [createVNode(1, "td", null, createTextVNode("Expression Language:"), 2), createVNode(1, "td", null, createVNode(1, "span", null, literalExpression.expressionLanguage || '-', 0), 2)], 4)], 4), 2); | ||
} | ||
@@ -40,3 +53,3 @@ }]); | ||
export default LiteralExpressionPropertiesComponent; | ||
export { LiteralExpressionPropertiesComponent as default }; | ||
//# sourceMappingURL=LiteralExpressionPropertiesComponent.js.map |
@@ -1,16 +0,24 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
import { createVNode, createComponentVNode, createTextVNode } from "inferno"; | ||
import { createVNode, createComponentVNode, createTextVNode } from 'inferno'; | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
import { Component } from 'inferno'; | ||
import Input from 'dmn-js-shared/lib/components/Input'; | ||
import InputSelect from 'dmn-js-shared/lib/components/InputSelect'; | ||
var EXPRESSION_LANGUAGE_OPTIONS = [{ | ||
@@ -35,3 +43,2 @@ label: 'FEEL', | ||
}]; | ||
var TYPE_REF_OPTIONS = [{ | ||
@@ -57,10 +64,13 @@ label: 'string', | ||
var LiteralExpressionPropertiesComponent = function (_Component) { | ||
var LiteralExpressionPropertiesComponent = | ||
/*#__PURE__*/ | ||
function (_Component) { | ||
_inherits(LiteralExpressionPropertiesComponent, _Component); | ||
function LiteralExpressionPropertiesComponent(props, context) { | ||
var _this; | ||
_classCallCheck(this, LiteralExpressionPropertiesComponent); | ||
var _this = _possibleConstructorReturn(this, (LiteralExpressionPropertiesComponent.__proto__ || Object.getPrototypeOf(LiteralExpressionPropertiesComponent)).call(this, props, context)); | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(LiteralExpressionPropertiesComponent).call(this, props, context)); | ||
_this._viewer = context.injector.get('viewer'); | ||
@@ -76,6 +86,5 @@ _this._modeling = context.injector.get('modeling'); | ||
}; | ||
_this.setVariableName = _this.setVariableName.bind(_this); | ||
_this.setVariableType = _this.setVariableType.bind(_this); | ||
_this.setExpressionLanguage = _this.setExpressionLanguage.bind(_this); | ||
_this.setVariableName = _this.setVariableName.bind(_assertThisInitialized(_this)); | ||
_this.setVariableType = _this.setVariableType.bind(_assertThisInitialized(_this)); | ||
_this.setExpressionLanguage = _this.setExpressionLanguage.bind(_assertThisInitialized(_this)); | ||
return _this; | ||
@@ -85,3 +94,3 @@ } | ||
_createClass(LiteralExpressionPropertiesComponent, [{ | ||
key: 'setVariableName', | ||
key: "setVariableName", | ||
value: function setVariableName(name) { | ||
@@ -95,3 +104,3 @@ this._modeling.editVariableName(name); | ||
}, { | ||
key: 'setVariableType', | ||
key: "setVariableType", | ||
value: function setVariableType(typeRef) { | ||
@@ -113,3 +122,3 @@ if (typeRef === '') { | ||
}, { | ||
key: 'setExpressionLanguage', | ||
key: "setExpressionLanguage", | ||
value: function setExpressionLanguage(expressionLanguage) { | ||
@@ -131,25 +140,23 @@ if (expressionLanguage === '') { | ||
}, { | ||
key: 'render', | ||
key: "render", | ||
value: function render() { | ||
var _state = this.state, | ||
expressionLanguage = _state.expressionLanguage, | ||
name = _state.name, | ||
typeRef = _state.typeRef; | ||
return createVNode(1, 'div', 'literal-expression-properties', createVNode(1, 'table', null, [createVNode(1, 'tr', null, [createVNode(1, 'td', null, createTextVNode('Variable Name:'), 2), createVNode(1, 'td', null, createComponentVNode(2, Input, { | ||
'className': 'variable-name-input', | ||
'onInput': this.setVariableName, | ||
'placeholder': 'name', | ||
'value': name || '' | ||
}), 2)], 4), createVNode(1, 'tr', null, [createVNode(1, 'td', null, createTextVNode('Variable Type:'), 2), createVNode(1, 'td', null, createVNode(1, 'div', 'dms-fill-row', createComponentVNode(2, InputSelect, { | ||
'onChange': this.setVariableType, | ||
'options': TYPE_REF_OPTIONS, | ||
'value': typeRef, | ||
'className': 'variable-type-select dms-block' | ||
}), 2), 2)], 4), createVNode(1, 'tr', null, [createVNode(1, 'td', null, createTextVNode('Expression Language:'), 2), createVNode(1, 'td', null, createVNode(1, 'div', 'dms-fill-row', createComponentVNode(2, InputSelect, { | ||
'onChange': this.setExpressionLanguage, | ||
'options': EXPRESSION_LANGUAGE_OPTIONS, | ||
'value': expressionLanguage, | ||
'className': 'expression-language-select dms-block' | ||
var _this$state = this.state, | ||
expressionLanguage = _this$state.expressionLanguage, | ||
name = _this$state.name, | ||
typeRef = _this$state.typeRef; | ||
return createVNode(1, "div", "literal-expression-properties", createVNode(1, "table", null, [createVNode(1, "tr", null, [createVNode(1, "td", null, createTextVNode("Variable Name:"), 2), createVNode(1, "td", null, createComponentVNode(2, Input, { | ||
"className": "variable-name-input", | ||
"onInput": this.setVariableName, | ||
"placeholder": 'name', | ||
"value": name || '' | ||
}), 2)], 4), createVNode(1, "tr", null, [createVNode(1, "td", null, createTextVNode("Variable Type:"), 2), createVNode(1, "td", null, createVNode(1, "div", "dms-fill-row", createComponentVNode(2, InputSelect, { | ||
"onChange": this.setVariableType, | ||
"options": TYPE_REF_OPTIONS, | ||
"value": typeRef, | ||
"className": "variable-type-select dms-block" | ||
}), 2), 2)], 4), createVNode(1, "tr", null, [createVNode(1, "td", null, createTextVNode("Expression Language:"), 2), createVNode(1, "td", null, createVNode(1, "div", "dms-fill-row", createComponentVNode(2, InputSelect, { | ||
"onChange": this.setExpressionLanguage, | ||
"options": EXPRESSION_LANGUAGE_OPTIONS, | ||
"value": expressionLanguage, | ||
"className": "expression-language-select dms-block" | ||
}), 2), 2)], 4)], 4), 2); | ||
@@ -160,7 +167,7 @@ } | ||
return LiteralExpressionPropertiesComponent; | ||
}(Component); | ||
}(Component); // helpers ////////////////////// | ||
// helpers ////////////////////// | ||
export default LiteralExpressionPropertiesComponent; | ||
export { LiteralExpressionPropertiesComponent as default }; | ||
function getExpressionLanguage(literalExpression) { | ||
@@ -167,0 +174,0 @@ return literalExpression && literalExpression.expressionLanguage ? literalExpression.expressionLanguage.toLowerCase() : undefined; |
import LiteralExpressionPropertiesEditor from './LiteralExpressionPropertiesEditor'; | ||
import DebounceInput from 'dmn-js-shared/lib/features/debounce-input'; | ||
import Keyboard from '../keyboard'; | ||
export default { | ||
@@ -6,0 +5,0 @@ __depends__: [DebounceInput, Keyboard], |
import LiteralExpressionProperties from './LiteralExpressionProperties'; | ||
export default { | ||
@@ -4,0 +3,0 @@ __init__: ['literalExpressionProperties'], |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
import LiteralExpressionPropertiesComponent from './components/LiteralExpressionPropertiesComponent'; | ||
var LOW_PRIORITY = 500; | ||
@@ -15,6 +14,4 @@ | ||
export default DecisionProperties; | ||
export { DecisionProperties as default }; | ||
DecisionProperties.$inject = ['components']; | ||
//# sourceMappingURL=LiteralExpressionProperties.js.map |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
import LiteralExpressionPropertiesEditorComponent from './components/LiteralExpressionPropertiesEditorComponent'; | ||
var LOW_PRIORITY = 500; | ||
@@ -15,6 +14,4 @@ | ||
export default LiteralExpressionPropertiesEditor; | ||
export { LiteralExpressionPropertiesEditor as default }; | ||
LiteralExpressionPropertiesEditor.$inject = ['components']; | ||
//# sourceMappingURL=LiteralExpressionPropertiesEditor.js.map |
import CommandStack from 'diagram-js/lib/command/CommandStack'; | ||
import IdChangeBehavior from 'dmn-js-shared/lib/features/modeling/behavior/IdChangeBehavior'; | ||
import Modeling from './Modeling'; | ||
export default { | ||
@@ -7,0 +5,0 @@ __init__: ['idChangeBehavior', 'modeling'], |
@@ -1,10 +0,13 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
import { forEach } from 'min-dash'; | ||
import UpdatePropertiesHandler from 'dmn-js-shared/lib/features/modeling/cmd/UpdatePropertiesHandler'; | ||
var Modeling = function () { | ||
var Modeling = | ||
/*#__PURE__*/ | ||
function () { | ||
function Modeling(commandStack, viewer, eventBus) { | ||
@@ -18,5 +21,3 @@ var _this = this; | ||
this._eventBus = eventBus; | ||
eventBus.on('viewer.init', function () { | ||
// register modeling handlers | ||
@@ -28,3 +29,3 @@ registerHandlers(_this.getHandlers(), commandStack); | ||
_createClass(Modeling, [{ | ||
key: 'getHandlers', | ||
key: "getHandlers", | ||
value: function getHandlers() { | ||
@@ -34,3 +35,3 @@ return Modeling._getHandlers(); | ||
}, { | ||
key: 'getDecision', | ||
key: "getDecision", | ||
value: function getDecision() { | ||
@@ -40,6 +41,5 @@ return this._viewer.getDecision(); | ||
}, { | ||
key: 'editDecisionName', | ||
key: "editDecisionName", | ||
value: function editDecisionName(name) { | ||
var decision = this.getDecision(); | ||
var context = { | ||
@@ -55,6 +55,5 @@ element: decision, | ||
}, { | ||
key: 'editDecisionId', | ||
key: "editDecisionId", | ||
value: function editDecisionId(id) { | ||
var decision = this.getDecision(); | ||
var context = { | ||
@@ -70,7 +69,6 @@ element: decision, | ||
}, { | ||
key: 'editLiteralExpressionText', | ||
key: "editLiteralExpressionText", | ||
value: function editLiteralExpressionText(text) { | ||
var decision = this.getDecision(), | ||
literalExpression = decision.literalExpression; | ||
var context = { | ||
@@ -86,7 +84,6 @@ element: literalExpression, | ||
}, { | ||
key: 'editExpressionLanguage', | ||
key: "editExpressionLanguage", | ||
value: function editExpressionLanguage(expressionLanguage) { | ||
var decision = this.getDecision(), | ||
literalExpression = decision.literalExpression; | ||
var context = { | ||
@@ -102,7 +99,6 @@ element: literalExpression, | ||
}, { | ||
key: 'editVariableName', | ||
key: "editVariableName", | ||
value: function editVariableName(name) { | ||
var decision = this.getDecision(), | ||
variable = decision.variable; | ||
var context = { | ||
@@ -118,7 +114,6 @@ element: variable, | ||
}, { | ||
key: 'editVariableType', | ||
key: "editVariableType", | ||
value: function editVariableType(typeRef) { | ||
var decision = this.getDecision(), | ||
variable = decision.variable; | ||
var context = { | ||
@@ -134,3 +129,3 @@ element: variable, | ||
}], [{ | ||
key: '_getHandlers', | ||
key: "_getHandlers", | ||
value: function _getHandlers() { | ||
@@ -146,9 +141,5 @@ return { | ||
export default Modeling; | ||
export { Modeling as default }; | ||
Modeling.$inject = ['commandStack', 'viewer', 'eventBus']; // helpers ////////////////////// | ||
Modeling.$inject = ['commandStack', 'viewer', 'eventBus']; | ||
// helpers ////////////////////// | ||
/** | ||
@@ -160,2 +151,3 @@ * Register handlers with the command stack | ||
*/ | ||
function registerHandlers(handlers, commandStack) { | ||
@@ -162,0 +154,0 @@ forEach(handlers, function (handler, id) { |
@@ -1,31 +0,44 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
import { createVNode } from "inferno"; | ||
import { createVNode } from 'inferno'; | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
import { Component } from 'inferno'; | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
// eslint-disable-next-line | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
import { Component } from 'inferno'; // eslint-disable-next-line | ||
var logo = 'iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAMAAADypuvZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRFiMte9PrwldFwfcZPqtqN0+zEyOe1XLgjvuKncsJAZ70y6fXh3vDT////UrQV////G2zN+AAAABB0Uk5T////////////////////AOAjXRkAAAHDSURBVHjavJZJkoUgDEBJmAX8979tM8u3E6x20VlYJfFFMoL4vBDxATxZcakIOJTWSmxvKWVIkJ8jHvlRv1F2LFrVISCZI+tCtQx+XfewgVTfyY3plPiQEAzI3zWy+kR6NBhFBYeBuscJLOUuA2WVLpCjVIaFzrNQZArxAZKUQm6gsj37L9Cb7dnIBUKxENaaMJQqMpDXvSL+ktxdGRm2IsKgJGGPg7atwUG5CcFUEuSv+CwQqizTrvDTNXdMU2bMiDWZd8d7QIySWVRsb2vBBioxOFt4OinPBapL+neAb5KL5IJ8szOza2/DYoipUCx+CjO0Bpsv0V6mktNZ+k8rlABlWG0FrOpKYVo8DT3dBeLEjUBAj7moDogVii7nSS9QzZnFcOVBp1g2PyBQ3Vr5aIapN91VJy33HTJLC1iX2FY6F8gRdaAeIEfVONgtFCzZTmoLEdOjBDfsIOA6128gw3eu1shAajdZNAORxuQDJN5A5PbEG6gNIu24QJD5iNyRMZIr6bsHbCtCU/OaOaSvgkUyDMdDa1BXGf5HJ1To+/Ym6mCKT02Y+/Sa126ZKyd3jxhzpc1r8zVL6YM1Qy/kR4ABAFJ6iQUnivhAAAAAAElFTkSuQmCC'; | ||
var PoweredByLogoComponent = function (_Component) { | ||
var PoweredByLogoComponent = | ||
/*#__PURE__*/ | ||
function (_Component) { | ||
_inherits(PoweredByLogoComponent, _Component); | ||
function PoweredByLogoComponent(props, context) { | ||
var _this; | ||
_classCallCheck(this, PoweredByLogoComponent); | ||
var _this = _possibleConstructorReturn(this, (PoweredByLogoComponent.__proto__ || Object.getPrototypeOf(PoweredByLogoComponent)).call(this, props, context)); | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(PoweredByLogoComponent).call(this, props, context)); | ||
_this.onClick = function () { | ||
_defineProperty(_assertThisInitialized(_this), "onClick", function () { | ||
_this._eventBus.fire('poweredBy.show'); | ||
}; | ||
}); | ||
var injector = context.injector; | ||
_this._eventBus = injector.get('eventBus'); | ||
@@ -36,11 +49,11 @@ return _this; | ||
_createClass(PoweredByLogoComponent, [{ | ||
key: 'render', | ||
key: "render", | ||
value: function render() { | ||
var _this2 = this; | ||
return createVNode(1, 'div', 'powered-by-logo', createVNode(1, 'img', 'logo', null, 1, { | ||
'src': 'data:image/png;base64,' + logo | ||
return createVNode(1, "div", "powered-by-logo", createVNode(1, "img", "logo", null, 1, { | ||
"src": "data:image/png;base64,".concat(logo) | ||
}), 2, { | ||
'onClick': this.onClick, | ||
'title': 'Powered by bpmn.io' | ||
"onClick": this.onClick, | ||
"title": "Powered by bpmn.io" | ||
}, null, function (node) { | ||
@@ -55,3 +68,3 @@ return _this2.node = node; | ||
export default PoweredByLogoComponent; | ||
export { PoweredByLogoComponent as default }; | ||
//# sourceMappingURL=PoweredByLogoComponent.js.map |
@@ -1,30 +0,41 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
import { createVNode, createTextVNode } from "inferno"; | ||
import { createVNode, createTextVNode } from 'inferno'; | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
import { Component } from 'inferno'; | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
// eslint-disable-next-line | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
import { Component } from 'inferno'; // eslint-disable-next-line | ||
var logo = 'iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAMAAADypuvZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRFiMte9PrwldFwfcZPqtqN0+zEyOe1XLgjvuKncsJAZ70y6fXh3vDT////UrQV////G2zN+AAAABB0Uk5T////////////////////AOAjXRkAAAHDSURBVHjavJZJkoUgDEBJmAX8979tM8u3E6x20VlYJfFFMoL4vBDxATxZcakIOJTWSmxvKWVIkJ8jHvlRv1F2LFrVISCZI+tCtQx+XfewgVTfyY3plPiQEAzI3zWy+kR6NBhFBYeBuscJLOUuA2WVLpCjVIaFzrNQZArxAZKUQm6gsj37L9Cb7dnIBUKxENaaMJQqMpDXvSL+ktxdGRm2IsKgJGGPg7atwUG5CcFUEuSv+CwQqizTrvDTNXdMU2bMiDWZd8d7QIySWVRsb2vBBioxOFt4OinPBapL+neAb5KL5IJ8szOza2/DYoipUCx+CjO0Bpsv0V6mktNZ+k8rlABlWG0FrOpKYVo8DT3dBeLEjUBAj7moDogVii7nSS9QzZnFcOVBp1g2PyBQ3Vr5aIapN91VJy33HTJLC1iX2FY6F8gRdaAeIEfVONgtFCzZTmoLEdOjBDfsIOA6128gw3eu1shAajdZNAORxuQDJN5A5PbEG6gNIu24QJD5iNyRMZIr6bsHbCtCU/OaOaSvgkUyDMdDa1BXGf5HJ1To+/Ym6mCKT02Y+/Sa126ZKyd3jxhzpc1r8zVL6YM1Qy/kR4ABAFJ6iQUnivhAAAAAAElFTkSuQmCC'; | ||
var PoweredByOverlayComponent = function (_Component) { | ||
var PoweredByOverlayComponent = | ||
/*#__PURE__*/ | ||
function (_Component) { | ||
_inherits(PoweredByOverlayComponent, _Component); | ||
function PoweredByOverlayComponent(props) { | ||
var _this; | ||
_classCallCheck(this, PoweredByOverlayComponent); | ||
var _this = _possibleConstructorReturn(this, (PoweredByOverlayComponent.__proto__ || Object.getPrototypeOf(PoweredByOverlayComponent)).call(this, props)); | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(PoweredByOverlayComponent).call(this, props)); | ||
_this.state = { | ||
show: false | ||
}; | ||
_this.onClick = _this.onClick.bind(_this); | ||
_this.onShow = _this.onShow.bind(_this); | ||
_this.onClick = _this.onClick.bind(_assertThisInitialized(_this)); | ||
_this.onShow = _this.onShow.bind(_assertThisInitialized(_this)); | ||
return _this; | ||
@@ -34,3 +45,3 @@ } | ||
_createClass(PoweredByOverlayComponent, [{ | ||
key: 'onClick', | ||
key: "onClick", | ||
value: function onClick() { | ||
@@ -42,3 +53,3 @@ this.setState({ | ||
}, { | ||
key: 'onShow', | ||
key: "onShow", | ||
value: function onShow() { | ||
@@ -50,10 +61,9 @@ this.setState({ | ||
}, { | ||
key: 'componentWillMount', | ||
key: "componentWillMount", | ||
value: function componentWillMount() { | ||
var eventBus = this._eventBus = this.context.injector.get('eventBus'); | ||
eventBus.on('poweredBy.show', this.onShow); | ||
} | ||
}, { | ||
key: 'componentWillUnmount', | ||
key: "componentWillUnmount", | ||
value: function componentWillUnmount() { | ||
@@ -63,18 +73,16 @@ this._eventBus.off('poweredBy.show', this.onShow); | ||
}, { | ||
key: 'render', | ||
key: "render", | ||
value: function render() { | ||
var show = this.state.show; | ||
return show && createVNode(1, 'div', 'powered-by-overlay', createVNode(1, 'div', 'powered-by-overlay-content', [createVNode(1, 'div', null, createVNode(1, 'img', 'logo', null, 1, { | ||
'src': 'data:image/png;base64,' + logo | ||
}), 2), createVNode(1, 'div', null, [createTextVNode('Web-based tooling for BPMN, DMN and CMMN diagrams powered by '), createVNode(1, 'a', null, createTextVNode('bpmn.io'), 2, { | ||
'href': 'http://bpmn.io', | ||
'target': '_blank' | ||
}), createTextVNode('.')], 4)], 4, { | ||
'onClick': function onClick(e) { | ||
return show && createVNode(1, "div", "powered-by-overlay", createVNode(1, "div", "powered-by-overlay-content", [createVNode(1, "div", null, createVNode(1, "img", "logo", null, 1, { | ||
"src": "data:image/png;base64,".concat(logo) | ||
}), 2), createVNode(1, "div", null, [createTextVNode("Web-based tooling for BPMN, DMN and CMMN diagrams powered by "), createVNode(1, "a", null, createTextVNode("bpmn.io"), 2, { | ||
"href": "http://bpmn.io", | ||
"target": "_blank" | ||
}), createTextVNode(".")], 4)], 4, { | ||
"onClick": function onClick(e) { | ||
return e.stopPropagation(); | ||
} | ||
}), 2, { | ||
'onClick': this.onClick | ||
"onClick": this.onClick | ||
}); | ||
@@ -87,3 +95,3 @@ } | ||
export default PoweredByOverlayComponent; | ||
export { PoweredByOverlayComponent as default }; | ||
//# sourceMappingURL=PoweredByOverlayComponent.js.map |
import PoweredBy from './PoweredBy'; | ||
export default { | ||
@@ -4,0 +3,0 @@ __init__: ['poweredBy'], |
@@ -5,3 +5,2 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
import PoweredByOverlayComponent from './components/PoweredByOverlayComponent'; | ||
var HIGHER_PRIORITY = 2000; | ||
@@ -15,3 +14,2 @@ | ||
}); | ||
components.onGetComponent('viewer', function () { | ||
@@ -22,6 +20,4 @@ return PoweredByOverlayComponent; | ||
export default PoweredBy; | ||
export { PoweredBy as default }; | ||
PoweredBy.$inject = ['components', 'eventBus']; | ||
//# sourceMappingURL=PoweredBy.js.map |
@@ -1,21 +0,34 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
import { createVNode } from "inferno"; | ||
import { createVNode } from 'inferno'; | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
import { Component } from 'inferno'; | ||
var TextareaComponent = function (_Component) { | ||
var TextareaComponent = | ||
/*#__PURE__*/ | ||
function (_Component) { | ||
_inherits(TextareaComponent, _Component); | ||
function TextareaComponent(props, context) { | ||
var _this; | ||
_classCallCheck(this, TextareaComponent); | ||
var _this = _possibleConstructorReturn(this, (TextareaComponent.__proto__ || Object.getPrototypeOf(TextareaComponent)).call(this, props, context)); | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(TextareaComponent).call(this, props, context)); | ||
_this._viewer = context.injector.get('viewer'); | ||
@@ -26,7 +39,7 @@ return _this; | ||
_createClass(TextareaComponent, [{ | ||
key: 'render', | ||
key: "render", | ||
value: function render() { | ||
var text = this._viewer.getDecision().literalExpression.text; | ||
return createVNode(1, 'div', 'textarea', createVNode(1, 'div', 'content', text, 0), 2); | ||
return createVNode(1, "div", "textarea", createVNode(1, "div", "content", text, 0), 2); | ||
} | ||
@@ -38,3 +51,3 @@ }]); | ||
export default TextareaComponent; | ||
export { TextareaComponent as default }; | ||
//# sourceMappingURL=TextareaComponent.js.map |
@@ -1,32 +0,40 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
import { createVNode, createComponentVNode } from "inferno"; | ||
import { createVNode, createComponentVNode } from 'inferno'; | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
import { Component } from 'inferno'; | ||
import EditableComponent from 'dmn-js-shared/lib/components/EditableComponent'; | ||
var TextareaEditorComponent = function (_Component) { | ||
var TextareaEditorComponent = | ||
/*#__PURE__*/ | ||
function (_Component) { | ||
_inherits(TextareaEditorComponent, _Component); | ||
function TextareaEditorComponent(props, context) { | ||
var _this; | ||
_classCallCheck(this, TextareaEditorComponent); | ||
var _this = _possibleConstructorReturn(this, (TextareaEditorComponent.__proto__ || Object.getPrototypeOf(TextareaEditorComponent)).call(this, props, context)); | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(TextareaEditorComponent).call(this, props, context)); | ||
_this._modeling = context.injector.get('modeling'); | ||
_this._viewer = context.injector.get('viewer'); | ||
_this.editLiteralExpressionText = _this.editLiteralExpressionText.bind(_assertThisInitialized(_this)); | ||
_this.onElementsChanged = _this.onElementsChanged.bind(_assertThisInitialized(_this)); // there is only one single element | ||
_this.editLiteralExpressionText = _this.editLiteralExpressionText.bind(_this); | ||
_this.onElementsChanged = _this.onElementsChanged.bind(_this); | ||
// there is only one single element | ||
var _this$getLiteralExpre = _this.getLiteralExpression(), | ||
@@ -40,3 +48,3 @@ id = _this$getLiteralExpre.id; | ||
_createClass(TextareaEditorComponent, [{ | ||
key: 'getLiteralExpression', | ||
key: "getLiteralExpression", | ||
value: function getLiteralExpression() { | ||
@@ -46,3 +54,3 @@ return this._viewer.getDecision().literalExpression; | ||
}, { | ||
key: 'onElementsChanged', | ||
key: "onElementsChanged", | ||
value: function onElementsChanged() { | ||
@@ -52,3 +60,3 @@ this.forceUpdate(); | ||
}, { | ||
key: 'editLiteralExpressionText', | ||
key: "editLiteralExpressionText", | ||
value: function editLiteralExpressionText(text) { | ||
@@ -58,13 +66,12 @@ this._modeling.editLiteralExpressionText(text); | ||
}, { | ||
key: 'render', | ||
key: "render", | ||
value: function render() { | ||
// there is only one single element | ||
var _getLiteralExpression = this.getLiteralExpression(), | ||
text = _getLiteralExpression.text; | ||
var _this$getLiteralExpre2 = this.getLiteralExpression(), | ||
text = _this$getLiteralExpre2.text; | ||
return createComponentVNode(2, Editor, { | ||
'className': 'textarea editor', | ||
'value': text, | ||
'onChange': this.editLiteralExpressionText | ||
"className": "textarea editor", | ||
"value": text, | ||
"onChange": this.editLiteralExpressionText | ||
}); | ||
@@ -77,5 +84,7 @@ } | ||
export default TextareaEditorComponent; | ||
export { TextareaEditorComponent as default }; | ||
var Editor = function (_EditableComponent) { | ||
var Editor = | ||
/*#__PURE__*/ | ||
function (_EditableComponent) { | ||
_inherits(Editor, _EditableComponent); | ||
@@ -86,10 +95,9 @@ | ||
return _possibleConstructorReturn(this, (Editor.__proto__ || Object.getPrototypeOf(Editor)).apply(this, arguments)); | ||
return _possibleConstructorReturn(this, _getPrototypeOf(Editor).apply(this, arguments)); | ||
} | ||
_createClass(Editor, [{ | ||
key: 'render', | ||
key: "render", | ||
value: function render() { | ||
return createVNode(1, 'div', this.getClassName(), this.getEditor(), 0); | ||
return createVNode(1, "div", this.getClassName(), this.getEditor(), 0); | ||
} | ||
@@ -96,0 +104,0 @@ }]); |
import TextareaEditor from './TextareaEditor'; | ||
import DebounceInput from 'dmn-js-shared/lib/features/debounce-input'; | ||
export default { | ||
@@ -5,0 +4,0 @@ __depends__: [DebounceInput], |
import Textarea from './Textarea'; | ||
export default { | ||
@@ -4,0 +3,0 @@ __init__: ['textarea'], |
@@ -13,6 +13,4 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
export default Textarea; | ||
export { Textarea as default }; | ||
Textarea.$inject = ['components']; | ||
//# sourceMappingURL=Textarea.js.map |
@@ -13,6 +13,4 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
export default Textarea; | ||
export { Textarea as default }; | ||
Textarea.$inject = ['components']; | ||
//# sourceMappingURL=TextareaEditor.js.map |
@@ -1,28 +0,42 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
import { createVNode, createTextVNode } from "inferno"; | ||
import { createVNode, createTextVNode } from 'inferno'; | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
import { Component } from 'inferno'; | ||
var ViewDrdComponent = function (_Component) { | ||
var ViewDrdComponent = | ||
/*#__PURE__*/ | ||
function (_Component) { | ||
_inherits(ViewDrdComponent, _Component); | ||
function ViewDrdComponent(props, context) { | ||
var _this; | ||
_classCallCheck(this, ViewDrdComponent); | ||
var _this = _possibleConstructorReturn(this, (ViewDrdComponent.__proto__ || Object.getPrototypeOf(ViewDrdComponent)).call(this, props, context)); | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(ViewDrdComponent).call(this, props, context)); | ||
_this.onClick = function () { | ||
_defineProperty(_assertThisInitialized(_this), "onClick", function () { | ||
_this._eventBus.fire('showDrd'); | ||
}; | ||
}); | ||
var injector = context.injector; | ||
_this._eventBus = injector.get('eventBus'); | ||
@@ -33,8 +47,8 @@ return _this; | ||
_createClass(ViewDrdComponent, [{ | ||
key: 'render', | ||
key: "render", | ||
value: function render() { | ||
var _this2 = this; | ||
return createVNode(1, 'div', 'view-drd', createVNode(1, 'button', 'view-drd-button', createTextVNode('View DRD'), 2, { | ||
'onClick': this.onClick | ||
return createVNode(1, "div", "view-drd", createVNode(1, "button", "view-drd-button", createTextVNode("View DRD"), 2, { | ||
"onClick": this.onClick | ||
}), 2, null, null, function (node) { | ||
@@ -49,3 +63,3 @@ return _this2.node = node; | ||
export default ViewDrdComponent; | ||
export { ViewDrdComponent as default }; | ||
//# sourceMappingURL=ViewDrdComponent.js.map |
import ViewDrd from './ViewDrd'; | ||
export default { | ||
@@ -4,0 +3,0 @@ __init__: ['viewDrd'], |
@@ -1,10 +0,13 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
import ViewDrdComponent from './components/ViewDrdComponent'; | ||
var HIGH_PRIORITY = 1500; | ||
var ViewDrd = function () { | ||
var ViewDrd = | ||
/*#__PURE__*/ | ||
function () { | ||
function ViewDrd(components, viewer, eventBus, injector) { | ||
@@ -17,3 +20,2 @@ var _this = this; | ||
this._viewer = viewer; | ||
components.onGetComponent('viewer', HIGH_PRIORITY, function () { | ||
@@ -24,12 +26,9 @@ if (_this.canViewDrd()) { | ||
}); | ||
eventBus.on('showDrd', function () { | ||
var parent = injector.get('_parent', false); | ||
var parent = injector.get('_parent', false); // there is only one single element | ||
// there is only one single element | ||
var definitions = _this.getDefinitions(); | ||
var definitions = _this.getDefinitions(); // open definitions | ||
// open definitions | ||
var view = parent.getView(definitions); | ||
parent.open(view); | ||
@@ -40,3 +39,3 @@ }); | ||
_createClass(ViewDrd, [{ | ||
key: 'canViewDrd', | ||
key: "canViewDrd", | ||
value: function canViewDrd() { | ||
@@ -47,11 +46,10 @@ var parent = this._injector.get('_parent', false); | ||
return; | ||
} | ||
} // there is only one single element | ||
// there is only one single element | ||
var definitions = this.getDefinitions(); | ||
return !!parent.getView(definitions); | ||
} | ||
}, { | ||
key: 'getDefinitions', | ||
key: "getDefinitions", | ||
value: function getDefinitions() { | ||
@@ -65,14 +63,9 @@ return _getDefinitions(this._viewer.getDecision()); | ||
export default ViewDrd; | ||
export { ViewDrd as default }; | ||
ViewDrd.$inject = ['components', 'viewer', 'eventBus', 'injector']; // helpers ////////////////////// | ||
ViewDrd.$inject = ['components', 'viewer', 'eventBus', 'injector']; | ||
// helpers ////////////////////// | ||
function _getDefinitions(decision) { | ||
var definitions = decision.$parent; | ||
return definitions; | ||
} | ||
//# sourceMappingURL=ViewDrd.js.map |
@@ -1,21 +0,38 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; | ||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } | ||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } | ||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } | ||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } | ||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
import BaseViewer from 'dmn-js-shared/lib/base/viewer/Viewer'; | ||
import { assign } from 'min-dash'; | ||
import { domify, remove as domRemove } from 'min-dom'; | ||
import CoreModule from './core'; | ||
@@ -28,6 +45,10 @@ import DecisionPropertiesModule from './features/decision-properties'; | ||
var Viewer = function (_BaseViewer) { | ||
var Viewer = | ||
/*#__PURE__*/ | ||
function (_BaseViewer) { | ||
_inherits(Viewer, _BaseViewer); | ||
function Viewer() { | ||
var _this; | ||
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
@@ -39,3 +60,3 @@ | ||
var _this = _possibleConstructorReturn(this, (Viewer.__proto__ || Object.getPrototypeOf(Viewer)).call(this, assign(options, { | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(Viewer).call(this, assign(options, { | ||
renderer: { | ||
@@ -45,3 +66,2 @@ container: container | ||
}))); | ||
_this._container = container; | ||
@@ -52,35 +72,27 @@ return _this; | ||
_createClass(Viewer, [{ | ||
key: 'open', | ||
key: "open", | ||
value: function open(decision, done) { | ||
var err; // use try/catch to not swallow synchronous exceptions | ||
// that may be raised during model parsing | ||
var err; | ||
// use try/catch to not swallow synchronous exceptions | ||
// that may be raised during model parsing | ||
try { | ||
if (this._decision) { | ||
// clear existing literal expression | ||
this.clear(); | ||
this.clear(); // unmount first | ||
// unmount first | ||
this.get('eventBus').fire('renderer.unmount'); | ||
} | ||
} // update literal expression | ||
// update literal expression | ||
this._decision = decision; | ||
// let others know about import | ||
this._decision = decision; // let others know about import | ||
this.get('eventBus').fire('import', decision); | ||
this.get('eventBus').fire('renderer.mount'); | ||
} catch (e) { | ||
err = e; | ||
} | ||
} // handle synchronously thrown exception | ||
// handle synchronously thrown exception | ||
return done(err); | ||
} | ||
/** | ||
@@ -95,7 +107,7 @@ * Initialize the literal expression, returning { modules: [], config }. | ||
}, { | ||
key: '_init', | ||
key: "_init", | ||
value: function _init(options) { | ||
var modules = options.modules, | ||
additionalModules = options.additionalModules, | ||
config = _objectWithoutProperties(options, ['modules', 'additionalModules']); | ||
config = _objectWithoutProperties(options, ["modules", "additionalModules"]); | ||
@@ -107,5 +119,3 @@ var baseModules = modules || this.getModules(); | ||
}]; | ||
var allModules = [].concat(_toConsumableArray(baseModules), _toConsumableArray(extraModules), staticModules); | ||
return { | ||
@@ -116,3 +126,2 @@ modules: allModules, | ||
} | ||
/** | ||
@@ -130,7 +139,6 @@ * Register an event listener | ||
}, { | ||
key: 'on', | ||
key: "on", | ||
value: function on(event, priority, callback, target) { | ||
return this.get('eventBus').on(event, priority, callback, target); | ||
} | ||
/** | ||
@@ -144,7 +152,6 @@ * De-register an event listener | ||
}, { | ||
key: 'off', | ||
key: "off", | ||
value: function off(event, callback) { | ||
this.get('eventBus').off(event, callback); | ||
} | ||
/** | ||
@@ -160,7 +167,6 @@ * Emit an event on the underlying {@link EventBus} | ||
}, { | ||
key: '_emit', | ||
key: "_emit", | ||
value: function _emit(type, event) { | ||
return this.get('eventBus').fire(type, event); | ||
} | ||
/** | ||
@@ -173,7 +179,6 @@ * Returns the currently displayed decision. | ||
}, { | ||
key: 'getDecision', | ||
key: "getDecision", | ||
value: function getDecision() { | ||
return this._decision; | ||
} | ||
/** | ||
@@ -186,13 +191,11 @@ * Attach viewer to given parent node. | ||
}, { | ||
key: 'attachTo', | ||
key: "attachTo", | ||
value: function attachTo(parentNode) { | ||
if (!parentNode) { | ||
throw new Error('parentNode required'); | ||
} | ||
} // ensure we detach from the | ||
// previous, old parent | ||
// ensure we detach from the | ||
// previous, old parent | ||
this.detach(); | ||
parentNode.appendChild(this._container); | ||
@@ -202,3 +205,2 @@ | ||
} | ||
/** | ||
@@ -209,5 +211,4 @@ * Detach viewer from parent node, if attached. | ||
}, { | ||
key: 'detach', | ||
key: "detach", | ||
value: function detach() { | ||
var container = this._container, | ||
@@ -225,5 +226,5 @@ parentNode = container.parentNode; | ||
}, { | ||
key: 'destroy', | ||
key: "destroy", | ||
value: function destroy() { | ||
_get(Viewer.prototype.__proto__ || Object.getPrototypeOf(Viewer.prototype), 'destroy', this).call(this); | ||
_get(_getPrototypeOf(Viewer.prototype), "destroy", this).call(this); | ||
@@ -233,3 +234,3 @@ this.detach(); | ||
}, { | ||
key: 'getModules', | ||
key: "getModules", | ||
value: function getModules() { | ||
@@ -239,3 +240,3 @@ return Viewer._getModules(); | ||
}], [{ | ||
key: '_getModules', | ||
key: "_getModules", | ||
value: function _getModules() { | ||
@@ -245,3 +246,3 @@ return [CoreModule, DecisionPropertiesModule, LiteralExpressionPropertiesModule, PoweredByModule, TextareaModule, ViewDrdModule]; | ||
}, { | ||
key: '_createContainer', | ||
key: "_createContainer", | ||
value: function _createContainer() { | ||
@@ -255,3 +256,3 @@ return domify('<div class="dmn-literal-expression-container"></div>'); | ||
export default Viewer; | ||
export { Viewer as default }; | ||
//# sourceMappingURL=Viewer.js.map |
{ | ||
"name": "dmn-js-literal-expression", | ||
"description": "A literal expression view for dmn-js", | ||
"version": "6.3.3", | ||
"version": "7.0.0", | ||
"scripts": { | ||
@@ -29,4 +29,4 @@ "test": "karma start", | ||
"dependencies": { | ||
"diagram-js": "^3.2.0", | ||
"dmn-js-shared": "^6.3.3", | ||
"diagram-js": "^4.0.1", | ||
"dmn-js-shared": "^7.0.0", | ||
"escape-html": "^1.0.3", | ||
@@ -36,8 +36,3 @@ "inferno": "~5.0.5", | ||
"min-dom": "^3.1.1" | ||
}, | ||
"babel": { | ||
"presets": [ | ||
"env" | ||
] | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
160761
1683
+ Addeddiagram-js@4.0.36.8.2(transitive)
+ Addeddmn-js-shared@7.5.1(transitive)
+ Addedids@1.0.5(transitive)
+ Addedpath-intersection@2.2.1(transitive)
+ Addedtable-js@6.1.0(transitive)
- Removeddiagram-js@3.3.1(transitive)
- Removeddmn-js-shared@6.3.3(transitive)
- Removedtable-js@5.1.0(transitive)
Updateddiagram-js@^4.0.1
Updateddmn-js-shared@^7.0.0