diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/09.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/09.png deleted file mode 100644 index 247371fe5..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/09.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/09.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/09.svg new file mode 100644 index 000000000..29c54b860 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/09.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/az.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/az.png deleted file mode 100644 index 5f5d2404e..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/az.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/az.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/az.svg new file mode 100644 index 000000000..e0abbdc4a --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/az.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/bin.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/bin.png deleted file mode 100644 index 615c8dd4f..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/bin.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/bin.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/bin.svg new file mode 100644 index 000000000..0ef91aed8 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/bin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/bool.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/bool.png deleted file mode 100644 index 9530983de..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/bool.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/bool.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/bool.svg new file mode 100644 index 000000000..e2e4297c7 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/bool.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/env.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/env.png deleted file mode 100644 index 0ea51da00..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/env.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/env.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/env.svg new file mode 100644 index 000000000..bddd1c082 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/env.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/expr.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/expr.png deleted file mode 100644 index 704105ce5..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/expr.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/expr.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/expr.svg new file mode 100644 index 000000000..c6357af50 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/expr.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/json.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/json.png deleted file mode 100644 index 57ac8761f..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/json.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/json.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/json.svg new file mode 100644 index 000000000..713fe7944 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/json.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/re.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/re.png deleted file mode 100644 index 87deb02ae..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/re.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/re.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/re.svg new file mode 100644 index 000000000..c30cbff55 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/re.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/target.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/target.png deleted file mode 100644 index cc9833b73..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/target.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/target.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/target.svg new file mode 100644 index 000000000..b98996701 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/target.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js index f5fe03890..0ef5b2102 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js @@ -32,6 +32,12 @@ return v; } } + var mapDeprecatedIcon = function(icon) { + if (/^red\/images\/typedInput\/.+\.png$/.test(icon)) { + icon = icon.replace(/.png$/,".svg"); + } + return icon; + } var allOptions = { msg: {value:"msg",label:"msg.",validate:RED.utils.validatePropertyExpression}, flow: {value:"flow",label:"flow.",hasValue:true, @@ -46,13 +52,13 @@ parse: contextParse, export: contextExport }, - str: {value:"str",label:"string",icon:"red/images/typedInput/az.png"}, - num: {value:"num",label:"number",icon:"red/images/typedInput/09.png",validate:/^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/}, - bool: {value:"bool",label:"boolean",icon:"red/images/typedInput/bool.png",options:["true","false"]}, + str: {value:"str",label:"string",icon:"red/images/typedInput/az.svg"}, + num: {value:"num",label:"number",icon:"red/images/typedInput/09.svg",validate:/^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/}, + bool: {value:"bool",label:"boolean",icon:"red/images/typedInput/bool.svg",options:["true","false"]}, json: { value:"json", label:"JSON", - icon:"red/images/typedInput/json.png", + icon:"red/images/typedInput/json.svg", validate: function(v) { try{JSON.parse(v);return true;}catch(e){return false;}}, expand: function() { var that = this; @@ -74,12 +80,12 @@ }) } }, - re: {value:"re",label:"regular expression",icon:"red/images/typedInput/re.png"}, + re: {value:"re",label:"regular expression",icon:"red/images/typedInput/re.svg"}, date: {value:"date",label:"timestamp",hasValue:false}, jsonata: { value: "jsonata", label: "expression", - icon: "red/images/typedInput/expr.png", + icon: "red/images/typedInput/expr.svg", validate: function(v) { try{jsonata(v);return true;}catch(e){return false;}}, expand:function() { var that = this; @@ -94,7 +100,7 @@ bin: { value: "bin", label: "buffer", - icon: "red/images/typedInput/bin.png", + icon: "red/images/typedInput/bin.svg", expand: function() { var that = this; RED.editor.editBuffer({ @@ -108,12 +114,12 @@ env: { value: "env", label: "env variable", - icon: "red/images/typedInput/env.png" + icon: "red/images/typedInput/env.svg" }, node: { value: "node", label: "node", - icon: "red/images/typedInput/target.png", + icon: "red/images/typedInput/target.svg", valueLabel: function(container,value) { var node = RED.nodes.node(value); var nodeDiv = $('