@dualbox/editor 1.0.64 → 1.0.65
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/js/dist/GraphEditor.js +16888 -16037
- package/js/dist/GraphEditor.min.js +16887 -16036
- package/js/src/GraphEditor.js +1 -1
- package/js/src/c/GraphController.js +1 -1
- package/js/src/m/GraphModel.js +7 -4
- package/js/src/m/History.js +19 -6
- package/js/src/m/Merger.js +1 -1
- package/js/src/v/AppManager.js +1 -1
- package/js/src/v/CanvasSizeHandler.js +1 -1
- package/js/src/v/GraphView.js +1 -1
- package/js/src/v/Translater.js +1 -1
- package/js/src/v/templates/addInput.vue +1 -1
- package/js/src/v/templates/addNode.vue +1 -1
- package/js/src/v/templates/debugNodeInfos.vue +1 -1
- package/js/src/v/templates/displayResult.vue +1 -1
- package/js/src/v/templates/editMainSettings.vue +1 -1
- package/js/src/v/templates/editNodeSettings.vue +1 -1
- package/js/src/v/templates/editType.vue +1 -1
- package/js/src/v/templates/editValue.vue +1 -1
- package/js/src/v/templates/graph.vue +1 -1
- package/js/src/v/templates/graphNode.vue +1 -1
- package/js/src/v/templates/main.vue +1 -1
- package/js/src/v/templates/searchResults.vue +1 -1
- package/package.json +5 -2
package/js/src/GraphEditor.js
CHANGED
package/js/src/m/GraphModel.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import History from './History';
|
|
6
6
|
import AppParser from '@dualbox/dualbox-lib-appparser';
|
|
7
7
|
import utils from './DualboxUtils';
|
|
8
|
-
import _ from 'lodash';
|
|
8
|
+
import _ from 'lodash-es';
|
|
9
9
|
import idx from 'idx';
|
|
10
10
|
import swal from 'sweetalert2';
|
|
11
11
|
|
|
@@ -204,9 +204,12 @@ class GraphModel {
|
|
|
204
204
|
|
|
205
205
|
// save changes into history
|
|
206
206
|
save() {
|
|
207
|
-
let
|
|
208
|
-
if (
|
|
209
|
-
|
|
207
|
+
let diffChange = this.history.save();
|
|
208
|
+
if (diffChange && diffChange.diff && diffChange.hash) {
|
|
209
|
+
let { diff, hash } = diffChange;
|
|
210
|
+
if (this.onChangeCb) {
|
|
211
|
+
this.onChangeCb(diff, hash);
|
|
212
|
+
}
|
|
210
213
|
}
|
|
211
214
|
}
|
|
212
215
|
|
package/js/src/m/History.js
CHANGED
|
@@ -3,14 +3,27 @@
|
|
|
3
3
|
* Manages the different states of the model and is able to restore them
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import _ from 'lodash';
|
|
7
|
-
|
|
6
|
+
import _ from 'lodash-es';
|
|
7
|
+
|
|
8
|
+
String.prototype.hashCode = function() {
|
|
9
|
+
var hash = 0,
|
|
10
|
+
i, chr;
|
|
11
|
+
if (this.length === 0) return hash;
|
|
12
|
+
for (i = 0; i < this.length; i++) {
|
|
13
|
+
chr = this.charCodeAt(i);
|
|
14
|
+
hash = ((hash << 5) - hash) + chr;
|
|
15
|
+
hash |= 0; // Convert to 32bit integer
|
|
16
|
+
}
|
|
17
|
+
return hash;
|
|
18
|
+
};
|
|
8
19
|
|
|
9
20
|
var hash = function(json) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
21
|
+
if (json) {
|
|
22
|
+
var str = JSON.stringify(json);
|
|
23
|
+
return str.hashCode();
|
|
24
|
+
} else {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
14
27
|
}
|
|
15
28
|
|
|
16
29
|
var patcher = window.jsondiffpatch.create(); // must be declared in window
|
package/js/src/m/Merger.js
CHANGED
package/js/src/v/AppManager.js
CHANGED
package/js/src/v/GraphView.js
CHANGED
package/js/src/v/Translater.js
CHANGED
|
@@ -372,7 +372,7 @@ i.fa, i.fas, i.far {
|
|
|
372
372
|
</template>
|
|
373
373
|
|
|
374
374
|
<script>
|
|
375
|
-
import _ from 'lodash';
|
|
375
|
+
import _ from 'lodash-es';
|
|
376
376
|
import swal from 'sweetalert2';
|
|
377
377
|
import DisplayTypeVue from './displayType.vue';
|
|
378
378
|
import DisplayValueVue from './displayValue.vue';
|
|
@@ -468,7 +468,7 @@ span.name {
|
|
|
468
468
|
|
|
469
469
|
<script>
|
|
470
470
|
import ContextMenu from '../ContextMenu';
|
|
471
|
-
import _ from 'lodash';
|
|
471
|
+
import _ from 'lodash-es';
|
|
472
472
|
import dbutils from '../../m/DualboxUtils';
|
|
473
473
|
|
|
474
474
|
// fix inputs types and output types position relatively to the div
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dualbox/editor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.65",
|
|
4
4
|
"description": "Editor of Dualbox apps",
|
|
5
5
|
"browser": "js/dist/GraphEditor.js",
|
|
6
6
|
"main": "js/dist/GraphEditor.js",
|
|
@@ -22,7 +22,10 @@
|
|
|
22
22
|
"rollup-plugin-commonjs": "10.0.0",
|
|
23
23
|
"rollup-plugin-embed-css": "0.4.0",
|
|
24
24
|
"rollup-plugin-eslint": "6.0.0",
|
|
25
|
+
"rollup-plugin-json": "^4.0.0",
|
|
25
26
|
"rollup-plugin-less": "1.1.2",
|
|
27
|
+
"rollup-plugin-node-builtins": "^2.1.2",
|
|
28
|
+
"rollup-plugin-node-globals": "^1.4.0",
|
|
26
29
|
"rollup-plugin-node-resolve": "5.0.1",
|
|
27
30
|
"rollup-plugin-replace": "2.2.0",
|
|
28
31
|
"rollup-plugin-vue": "5.0.0"
|
|
@@ -48,9 +51,9 @@
|
|
|
48
51
|
"jsoneditor": "^5.27.0",
|
|
49
52
|
"jsplumb": "2.10.0",
|
|
50
53
|
"lodash": "^4.17.5",
|
|
54
|
+
"lodash-es": "^4.17.15",
|
|
51
55
|
"moment": "^2.22.2",
|
|
52
56
|
"object-hash": "^2.0.2",
|
|
53
|
-
"rollup-plugin-node-builtins": "2.1.2",
|
|
54
57
|
"rollup-plugin-postcss": "2.0.3",
|
|
55
58
|
"sweetalert2": "^7.19.3",
|
|
56
59
|
"vue": "2.6.10",
|