@node-projects/web-component-designer-visualization-addons 0.1.87 → 0.1.89
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.
|
@@ -15,7 +15,7 @@ export class ScriptRefactorService {
|
|
|
15
15
|
if (cp != null && typeof cp === 'object') {
|
|
16
16
|
let mp = cp;
|
|
17
17
|
if (mp.source === 'signal') {
|
|
18
|
-
refactorings.push({ name: mp.name, itemType: '
|
|
18
|
+
refactorings.push({ name: mp.name, itemType: 'signal', target: BindingTarget.event, targetName: a[0], service: this, designItem: d, type: 'script', sourceObject: script, display: c.type + '/' + p + '[property]', refactor: newValue => mp.name = newValue });
|
|
19
19
|
}
|
|
20
20
|
else if (mp.source === 'property') {
|
|
21
21
|
refactorings.push({ name: mp.name, itemType: 'property', target: BindingTarget.event, targetName: a[0], service: this, designItem: d, type: 'script', sourceObject: script, display: c.type + '/' + p + '[signal]', refactor: newValue => mp.name = newValue });
|
|
@@ -34,7 +34,7 @@ export class ScriptRefactorService {
|
|
|
34
34
|
refactorings.push({ name: nm, itemType: 'property', target: BindingTarget.event, targetName: a[0], service: this, designItem: d, type: 'script', sourceObject: script, display: c.type + '/' + p + '[complexString]->property', refactor: newValue => mp.name = mp.name.replace(full, '{' + prefix + newValue + '}') });
|
|
35
35
|
}
|
|
36
36
|
else {
|
|
37
|
-
refactorings.push({ name: nm, itemType: '
|
|
37
|
+
refactorings.push({ name: nm, itemType: 'signal', target: BindingTarget.event, targetName: a[0], service: this, designItem: d, type: 'script', sourceObject: script, display: c.type + '/' + p + '[complexString]->signal', refactor: newValue => mp.name = mp.name.replace(full, '{' + newValue + '}') });
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -43,55 +43,55 @@ export class ScriptRefactorService {
|
|
|
43
43
|
switch (c.type) {
|
|
44
44
|
case 'SetSignalValue':
|
|
45
45
|
if (c.signal && typeof c.signal === 'string')
|
|
46
|
-
refactorings.push({ name: c.signal, itemType: '
|
|
46
|
+
refactorings.push({ name: c.signal, itemType: 'signal', target: BindingTarget.event, targetName: a[0], display: c.type + '/signal', service: this, designItem: d, type: 'script', sourceObject: script, refactor: newValue => c.signal = newValue });
|
|
47
47
|
break;
|
|
48
48
|
case 'ToggleSignalValue':
|
|
49
49
|
if (c.signal && typeof c.signal === 'string')
|
|
50
|
-
refactorings.push({ name: c.signal, itemType: '
|
|
50
|
+
refactorings.push({ name: c.signal, itemType: 'signal', target: BindingTarget.event, targetName: a[0], display: c.type + '/signal', service: this, designItem: d, type: 'script', sourceObject: script, refactor: newValue => c.signal = newValue });
|
|
51
51
|
break;
|
|
52
52
|
case 'IncrementSignalValue':
|
|
53
53
|
if (c.signal && typeof c.signal === 'string')
|
|
54
|
-
refactorings.push({ name: c.signal, itemType: '
|
|
54
|
+
refactorings.push({ name: c.signal, itemType: 'signal', target: BindingTarget.event, targetName: a[0], display: c.type + '/signal', service: this, designItem: d, type: 'script', sourceObject: script, refactor: newValue => c.signal = newValue });
|
|
55
55
|
break;
|
|
56
56
|
case 'DecrementSignalValue':
|
|
57
57
|
if (c.signal && typeof c.signal === 'string')
|
|
58
|
-
refactorings.push({ name: c.signal, itemType: '
|
|
58
|
+
refactorings.push({ name: c.signal, itemType: 'signal', target: BindingTarget.event, targetName: a[0], display: c.type + '/signal', service: this, designItem: d, type: 'script', sourceObject: script, refactor: newValue => c.signal = newValue });
|
|
59
59
|
break;
|
|
60
60
|
case 'SetBitInSignal':
|
|
61
61
|
if (c.signal && typeof c.signal === 'string')
|
|
62
|
-
refactorings.push({ name: c.signal, itemType: '
|
|
62
|
+
refactorings.push({ name: c.signal, itemType: 'signal', target: BindingTarget.event, targetName: a[0], display: c.type + '/signal', service: this, designItem: d, type: 'script', sourceObject: script, refactor: newValue => c.signal = newValue });
|
|
63
63
|
break;
|
|
64
64
|
case 'ClearBitInSignal':
|
|
65
65
|
if (c.signal && typeof c.signal === 'string')
|
|
66
|
-
refactorings.push({ name: c.signal, itemType: '
|
|
66
|
+
refactorings.push({ name: c.signal, itemType: 'signal', target: BindingTarget.event, targetName: a[0], display: c.type + '/signal', service: this, designItem: d, type: 'script', sourceObject: script, refactor: newValue => c.signal = newValue });
|
|
67
67
|
break;
|
|
68
68
|
case 'ToggleBitInSignal':
|
|
69
69
|
if (c.signal && typeof c.signal === 'string')
|
|
70
|
-
refactorings.push({ name: c.signal, itemType: '
|
|
70
|
+
refactorings.push({ name: c.signal, itemType: 'signal', target: BindingTarget.event, targetName: a[0], display: c.type + '/signal', service: this, designItem: d, type: 'script', sourceObject: script, refactor: newValue => c.signal = newValue });
|
|
71
71
|
break;
|
|
72
72
|
case 'OpenScreen':
|
|
73
73
|
if (c.screen && typeof c.screen === 'string')
|
|
74
|
-
refactorings.push({ name: c.screen, itemType: '
|
|
74
|
+
refactorings.push({ name: c.screen, itemType: 'screen', target: BindingTarget.event, targetName: a[0], display: c.type + '/screen', service: this, designItem: d, type: 'script', sourceObject: script, refactor: newValue => c.screen = newValue });
|
|
75
75
|
break;
|
|
76
76
|
case 'OpenDialog':
|
|
77
77
|
if (c.screen && typeof c.screen === 'string')
|
|
78
|
-
refactorings.push({ name: c.screen, itemType: '
|
|
78
|
+
refactorings.push({ name: c.screen, itemType: 'screen', target: BindingTarget.event, targetName: a[0], display: c.type + '/screen', service: this, designItem: d, type: 'script', sourceObject: script, refactor: newValue => c.screen = newValue });
|
|
79
79
|
break;
|
|
80
80
|
case 'CalculateSignalValue':
|
|
81
81
|
if (c.targetSignal && typeof c.targetSignal === 'string')
|
|
82
|
-
refactorings.push({ name: c.targetSignal, itemType: '
|
|
82
|
+
refactorings.push({ name: c.targetSignal, itemType: 'signal', target: BindingTarget.event, targetName: a[0], display: c.type + '/targetSignal', service: this, designItem: d, type: 'script', sourceObject: script, refactor: newValue => c.targetSignal = newValue });
|
|
83
83
|
break;
|
|
84
84
|
case 'SubscribeSignal':
|
|
85
85
|
if (c.signal && typeof c.signal === 'string')
|
|
86
|
-
refactorings.push({ name: c.signal, itemType: '
|
|
86
|
+
refactorings.push({ name: c.signal, itemType: 'signal', target: BindingTarget.event, targetName: a[0], display: c.type + '/signal', service: this, designItem: d, type: 'script', sourceObject: script, refactor: newValue => c.signal = newValue });
|
|
87
87
|
break;
|
|
88
88
|
case 'UnsubscribeSignal':
|
|
89
89
|
if (c.signal && typeof c.signal === 'string')
|
|
90
|
-
refactorings.push({ name: c.signal, itemType: '
|
|
90
|
+
refactorings.push({ name: c.signal, itemType: 'signal', target: BindingTarget.event, targetName: a[0], display: c.type + '/signal', service: this, designItem: d, type: 'script', sourceObject: script, refactor: newValue => c.signal = newValue });
|
|
91
91
|
break;
|
|
92
92
|
case 'ShowMessageBox':
|
|
93
93
|
if (c.resultSignal && typeof c.resultSignal === 'string')
|
|
94
|
-
refactorings.push({ name: c.resultSignal, itemType: '
|
|
94
|
+
refactorings.push({ name: c.resultSignal, itemType: 'signal', target: BindingTarget.event, targetName: a[0], display: c.type + '/resultSignal', service: this, designItem: d, type: 'script', sourceObject: script, refactor: newValue => c.resultSignal = newValue });
|
|
95
95
|
break;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -6,7 +6,7 @@ export class VisualizationBindingsRefactorService {
|
|
|
6
6
|
if (bindings) {
|
|
7
7
|
for (let b of bindings) {
|
|
8
8
|
for (let s of b.bindableObjectNames) {
|
|
9
|
-
let itemType = '
|
|
9
|
+
let itemType = 'signal';
|
|
10
10
|
let prefix = "";
|
|
11
11
|
if (s.includes(':')) {
|
|
12
12
|
let nm = s.split(':')[0];
|
|
@@ -43,9 +43,9 @@ export class VisualizationBindingsRefactorService {
|
|
|
43
43
|
refactor(refactoring, oldValue, newValue) {
|
|
44
44
|
let binding = refactoring.sourceObject;
|
|
45
45
|
if (refactoring.shortName)
|
|
46
|
-
binding.bindableObjectNames = binding.bindableObjectNames.map(x => x == refactoring.shortName + ':' + oldValue ? refactoring.shortName + ':' + refactoring.prefix + newValue : x);
|
|
46
|
+
binding.bindableObjectNames = binding.bindableObjectNames.map(x => x == refactoring.shortName + ':' + refactoring.prefix + oldValue ? refactoring.shortName + ':' + refactoring.prefix + newValue : x);
|
|
47
47
|
else
|
|
48
|
-
binding.bindableObjectNames = binding.bindableObjectNames.map(x => x == oldValue ? refactoring.prefix + newValue : x);
|
|
48
|
+
binding.bindableObjectNames = binding.bindableObjectNames.map(x => x == refactoring.prefix + oldValue ? refactoring.prefix + newValue : x);
|
|
49
49
|
refactoring.designItem.serviceContainer.bindingService.setBinding(refactoring.designItem, binding);
|
|
50
50
|
}
|
|
51
51
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "web-component-designer addon for visualizations",
|
|
3
3
|
"name": "@node-projects/web-component-designer-visualization-addons",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.89",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"author": "jochen.kuehner@gmx.de",
|