@bpmn-io/form-js-editor 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +19 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +20 -12
- package/dist/index.es.js.map +1 -1
- package/dist/types/FormEditor.d.ts +16 -6
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var formJsViewer = require('@bpmn-io/form-js-viewer');
|
|
5
6
|
var Ids = require('ids');
|
|
6
7
|
var minDash = require('min-dash');
|
|
7
|
-
var formJsViewer = require('@bpmn-io/form-js-viewer');
|
|
8
8
|
var preact = require('preact');
|
|
9
9
|
var hooks$1 = require('preact/hooks');
|
|
10
10
|
var React = require('preact/compat');
|
|
@@ -4665,6 +4665,10 @@ const ids = new Ids__default['default']([32, 36, 1]);
|
|
|
4665
4665
|
* properties: FormEditorProperties,
|
|
4666
4666
|
* schema: Schema
|
|
4667
4667
|
* } } State
|
|
4668
|
+
*
|
|
4669
|
+
* @typedef { (type:string, priority:number, handler:Function) => void } OnEventWithPriority
|
|
4670
|
+
* @typedef { (type:string, handler:Function) => void } OnEventWithOutPriority
|
|
4671
|
+
* @typedef { OnEventWithPriority & OnEventWithOutPriority } OnEventType
|
|
4668
4672
|
*/
|
|
4669
4673
|
|
|
4670
4674
|
/**
|
|
@@ -4677,10 +4681,16 @@ class FormEditor {
|
|
|
4677
4681
|
* @param {FormEditorOptions} options
|
|
4678
4682
|
*/
|
|
4679
4683
|
constructor(options = {}) {
|
|
4684
|
+
/**
|
|
4685
|
+
* @public
|
|
4686
|
+
* @type {OnEventType}
|
|
4687
|
+
*/
|
|
4688
|
+
this.on = this._onEvent;
|
|
4680
4689
|
/**
|
|
4681
4690
|
* @public
|
|
4682
4691
|
* @type {String}
|
|
4683
4692
|
*/
|
|
4693
|
+
|
|
4684
4694
|
this._id = ids.next();
|
|
4685
4695
|
/**
|
|
4686
4696
|
* @private
|
|
@@ -4853,16 +4863,6 @@ class FormEditor {
|
|
|
4853
4863
|
properties
|
|
4854
4864
|
});
|
|
4855
4865
|
}
|
|
4856
|
-
/**
|
|
4857
|
-
* @param {string} type
|
|
4858
|
-
* @param {number} priority
|
|
4859
|
-
* @param {Function} handler
|
|
4860
|
-
*/
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
on(type, priority, handler) {
|
|
4864
|
-
this.get('eventBus').on(type, priority, handler);
|
|
4865
|
-
}
|
|
4866
4866
|
/**
|
|
4867
4867
|
* @param {string} type
|
|
4868
4868
|
* @param {Function} handler
|
|
@@ -4935,6 +4935,14 @@ class FormEditor {
|
|
|
4935
4935
|
_getModules() {
|
|
4936
4936
|
return [ModelingModule, EditorActionsModule, KeyboardModule, SelectionModule];
|
|
4937
4937
|
}
|
|
4938
|
+
/**
|
|
4939
|
+
* @internal
|
|
4940
|
+
*/
|
|
4941
|
+
|
|
4942
|
+
|
|
4943
|
+
_onEvent(type, priority, handler) {
|
|
4944
|
+
this.get('eventBus').on(type, priority, handler);
|
|
4945
|
+
}
|
|
4938
4946
|
|
|
4939
4947
|
} // helpers //////////
|
|
4940
4948
|
|