@node-projects/web-component-designer-visualization-addons 0.1.113 → 0.1.114

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.
@@ -186,6 +186,16 @@ export class SimpleScriptEditor extends BaseCustomWebComponentConstructorAppend
186
186
  editComplex(data);
187
187
  }
188
188
  },
189
+ {
190
+ title: 'edit string',
191
+ action: async () => {
192
+ const v = prompt("enter value:");
193
+ if (v) {
194
+ this._propertygrid.setPropertyValue(data.propertyPath, v);
195
+ this._propertygrid.refresh();
196
+ }
197
+ }
198
+ },
189
199
  {
190
200
  title: 'remove complex value',
191
201
  action: async () => {
@@ -20,7 +20,13 @@ export class VisualizationPropertyGrid extends PropertyGrid {
20
20
  case 'screen': {
21
21
  let editor = document.createElement('select');
22
22
  editor.style.width = '100%';
23
+ const akop = document.createElement('option');
24
+ akop.value = currentValue ?? '';
25
+ akop.innerText = currentValue ?? '';
26
+ editor.appendChild(akop);
23
27
  for (let v of await this.visualizationHandler.getAllNames('screen')) {
28
+ if (v == currentValue)
29
+ continue;
24
30
  const op = document.createElement('option');
25
31
  op.value = v;
26
32
  op.innerText = v;
@@ -1,5 +1,5 @@
1
1
  import { ScriptCommands, SetElementProperty } from "./ScriptCommands";
2
2
  export declare class ScriptUpgrades {
3
- static upgradeScriptCommand(scriptCommand: ScriptCommands): SetElementProperty | import("./ScriptCommands").OpenScreen | import("./ScriptCommands").OpenUrl | import("./ScriptCommands").OpenDialog | import("./ScriptCommands").CloseDialog | import("./ScriptCommands").ToggleSignalValue | import("./ScriptCommands").SetSignalValue | import("./ScriptCommands").IncrementSignalValue | import("./ScriptCommands").DecrementSignalValue | import("./ScriptCommands").SetBitInSignal | import("./ScriptCommands").ClearBitInSignal | import("./ScriptCommands").ToggleBitInSignal | import("./ScriptCommands").Console | import("./ScriptCommands").CalculateSignalValue | import("./ScriptCommands").Javascript | import("./ScriptCommands").Delay | import("./ScriptCommands").SwitchLanguage | import("./ScriptCommands").Login | import("./ScriptCommands").Logout | import("./ScriptCommands").SubscribeSignal | import("./ScriptCommands").UnsubscribeSignal | import("./ScriptCommands").WriteSignalsInGroup | import("./ScriptCommands").ClearSignalsInGroup | import("./ScriptCommands").RunScript | import("./ScriptCommands").CopySignalValuesFromFolder | import("./ScriptCommands").ShowMessageBox | import("./ScriptCommands").ExportSignalValuesAsJson | import("./ScriptCommands").ImportSignalValuesFromJson | import("./ScriptCommands").Comment | import("./ScriptCommands").Condition | import("./ScriptCommands").Exit | import("./ScriptCommands").Label | import("./ScriptCommands").Goto;
3
+ static upgradeScriptCommand(scriptCommand: ScriptCommands): import("./ScriptCommands").OpenScreen | import("./ScriptCommands").OpenUrl | import("./ScriptCommands").OpenDialog | import("./ScriptCommands").CloseDialog | import("./ScriptCommands").ToggleSignalValue | import("./ScriptCommands").SetSignalValue | import("./ScriptCommands").IncrementSignalValue | import("./ScriptCommands").DecrementSignalValue | import("./ScriptCommands").SetBitInSignal | import("./ScriptCommands").ClearBitInSignal | import("./ScriptCommands").ToggleBitInSignal | import("./ScriptCommands").Console | import("./ScriptCommands").CalculateSignalValue | import("./ScriptCommands").Javascript | SetElementProperty | import("./ScriptCommands").Delay | import("./ScriptCommands").SwitchLanguage | import("./ScriptCommands").Login | import("./ScriptCommands").Logout | import("./ScriptCommands").SubscribeSignal | import("./ScriptCommands").UnsubscribeSignal | import("./ScriptCommands").WriteSignalsInGroup | import("./ScriptCommands").ClearSignalsInGroup | import("./ScriptCommands").RunScript | import("./ScriptCommands").CopySignalValuesFromFolder | import("./ScriptCommands").ShowMessageBox | import("./ScriptCommands").ExportSignalValuesAsJson | import("./ScriptCommands").ImportSignalValuesFromJson | import("./ScriptCommands").Comment | import("./ScriptCommands").Condition | import("./ScriptCommands").Exit | import("./ScriptCommands").Label | import("./ScriptCommands").Goto;
4
4
  static upgradeSetElementProperty(scriptCommand: SetElementProperty): SetElementProperty;
5
5
  }
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.113",
4
+ "version": "0.1.114",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "author": "jochen.kuehner@gmx.de",
File without changes
@@ -1,31 +0,0 @@
1
- "use strict";
2
- //@ts-ignore
3
- Blockly.Blocks['open_screen'] = {
4
- init: function () {
5
- this.appendDummyInput()
6
- .appendField('open screen');
7
- this.appendValueInput('SCREEN')
8
- .setCheck('String')
9
- .appendField('screen');
10
- this.appendValueInput('RELATIVESIGNALSPATH')
11
- .setCheck("String")
12
- .appendField('relativeSignalsPath');
13
- this.appendValueInput('NOHISTORY')
14
- .setCheck("Boolean")
15
- .appendField('noHistory');
16
- this.setPreviousStatement(true, null);
17
- this.setNextStatement(true, null);
18
- this.setColour(230);
19
- }
20
- };
21
- //@ts-ignore
22
- Blockly.JavaScript.forBlock['open_screen'] = function (block) {
23
- //@ts-ignore
24
- const screen = Blockly.JavaScript.valueToCode(block, 'SCREEN', Blockly.JavaScript.ORDER_ATOMIC);
25
- //@ts-ignore
26
- const relativeSignalsPath = Blockly.JavaScript.valueToCode(block, 'RELATIVESIGNALSPATH', Blockly.JavaScript.ORDER_ATOMIC);
27
- //@ts-ignore
28
- const noHistory = Blockly.JavaScript.valueToCode(block, 'NOHISTORY', Blockly.JavaScript.ORDER_ATOMIC);
29
- let code = `RUNTIME.openScreen({screen: ${screen}, relativeSignalsPath: ${relativeSignalsPath}, noHistory: ${noHistory}})`;
30
- return code;
31
- };