mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge branch 'dev' into config-in-subflow
This commit is contained in:
@@ -408,7 +408,25 @@
|
||||
}
|
||||
},
|
||||
re: {value:"re",label:"regular expression",icon:"red/images/typedInput/re.svg"},
|
||||
date: {value:"date",label:"timestamp",icon:"fa fa-clock-o",hasValue:false},
|
||||
date: {
|
||||
value:"date",
|
||||
label:"timestamp",
|
||||
icon:"fa fa-clock-o",
|
||||
options:[
|
||||
{
|
||||
label: 'milliseconds since epoch',
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
label: 'YYYY-MM-DDTHH:mm:ss.sssZ',
|
||||
value: 'iso'
|
||||
},
|
||||
{
|
||||
label: 'JavaScript Date Object',
|
||||
value: 'object'
|
||||
}
|
||||
]
|
||||
},
|
||||
jsonata: {
|
||||
value: "jsonata",
|
||||
label: "expression",
|
||||
@@ -709,6 +727,10 @@
|
||||
allOptions.flow.options = contextStoreOptions;
|
||||
allOptions.global.options = contextStoreOptions;
|
||||
}
|
||||
// Translate timestamp options
|
||||
allOptions.date.options.forEach(opt => {
|
||||
opt.label = RED._("typedInput.date.format." + (opt.value || 'timestamp'), {defaultValue: opt.label})
|
||||
})
|
||||
}
|
||||
nlsd = true;
|
||||
var that = this;
|
||||
|
@@ -483,6 +483,16 @@ RED.utils = (function() {
|
||||
$('<span class="red-ui-debug-msg-type-string-swatch"></span>').css('backgroundColor',obj).appendTo(e);
|
||||
}
|
||||
|
||||
let n = RED.nodes.node(obj) ?? RED.nodes.workspace(obj);
|
||||
if (n) {
|
||||
if (options.nodeSelector && "function" == typeof options.nodeSelector) {
|
||||
e.css('cursor', 'pointer').on("click", function(evt) {
|
||||
evt.preventDefault();
|
||||
options.nodeSelector(n.id);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
} else if (typeof obj === 'number') {
|
||||
e = $('<span class="red-ui-debug-msg-type-number"></span>').appendTo(entryObj);
|
||||
|
||||
@@ -589,6 +599,7 @@ RED.utils = (function() {
|
||||
exposeApi: exposeApi,
|
||||
// tools: tools // Do not pass tools down as we
|
||||
// keep them attached to the top-level header
|
||||
nodeSelector: options.nodeSelector,
|
||||
}
|
||||
).appendTo(row);
|
||||
}
|
||||
@@ -619,6 +630,7 @@ RED.utils = (function() {
|
||||
exposeApi: exposeApi,
|
||||
// tools: tools // Do not pass tools down as we
|
||||
// keep them attached to the top-level header
|
||||
nodeSelector: options.nodeSelector,
|
||||
}
|
||||
).appendTo(row);
|
||||
}
|
||||
@@ -675,6 +687,7 @@ RED.utils = (function() {
|
||||
exposeApi: exposeApi,
|
||||
// tools: tools // Do not pass tools down as we
|
||||
// keep them attached to the top-level header
|
||||
nodeSelector: options.nodeSelector,
|
||||
}
|
||||
).appendTo(row);
|
||||
}
|
||||
@@ -906,7 +919,10 @@ RED.utils = (function() {
|
||||
* @returns true if valid, String if invalid
|
||||
*/
|
||||
function validateTypedProperty(propertyValue, propertyType, opt) {
|
||||
|
||||
if (propertyValue && /^\${[^}]+}$/.test(propertyValue)) {
|
||||
// Allow ${ENV_VAR} value
|
||||
return true
|
||||
}
|
||||
let error
|
||||
if (propertyType === 'json') {
|
||||
try {
|
||||
|
@@ -4156,7 +4156,7 @@ RED.view = (function() {
|
||||
}
|
||||
var width = img.width * scaleFactor;
|
||||
if (width > 20) {
|
||||
scalefactor *= 20/width;
|
||||
scaleFactor *= 20/width;
|
||||
width = 20;
|
||||
}
|
||||
var height = img.height * scaleFactor;
|
||||
|
@@ -16,8 +16,20 @@
|
||||
RED.validators = {
|
||||
number: function(blankAllowed,mopt){
|
||||
return function(v, opt) {
|
||||
if ((blankAllowed&&(v===''||v===undefined)) || (v!=='' && !isNaN(v))) {
|
||||
return true;
|
||||
if (blankAllowed && (v === '' || v === undefined)) {
|
||||
return true
|
||||
}
|
||||
if (v !== '') {
|
||||
if (/^NaN$|^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$|^[+-]?(0b|0B)[01]+$|^[+-]?(0o|0O)[0-7]+$|^[+-]?(0x|0X)[0-9a-fA-F]+$/.test(v)) {
|
||||
return true
|
||||
}
|
||||
if (/^\${[^}]+}$/.test(v)) {
|
||||
// Allow ${ENV_VAR} value
|
||||
return true
|
||||
}
|
||||
}
|
||||
if (!isNaN(v)) {
|
||||
return true
|
||||
}
|
||||
if (opt && opt.label) {
|
||||
return RED._("validator.errors.invalid-num-prop", {
|
||||
|
@@ -38,7 +38,7 @@ body {
|
||||
}
|
||||
#red-ui-main-container {
|
||||
position: absolute;
|
||||
top:40px; left:0; bottom: 0; right:0;
|
||||
top: var(--red-ui-header-height); left:0; bottom: 0; right:0;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
|
@@ -259,7 +259,8 @@ $deploy-button-background-disabled-hover: #555;
|
||||
|
||||
$header-background: #000;
|
||||
$header-button-background-active: #121212;
|
||||
$header-menu-color: #C7C7C7;
|
||||
$header-accent: #d41313;
|
||||
$header-menu-color: #eee;
|
||||
$header-menu-color-disabled: #666;
|
||||
$header-menu-heading-color: #fff;
|
||||
$header-menu-sublabel-color: #aeaeae;
|
||||
|
@@ -23,16 +23,20 @@
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
height: var(--red-ui-header-height);
|
||||
background: var(--red-ui-header-background);
|
||||
box-sizing: border-box;
|
||||
padding: 0px 0px 0px 20px;
|
||||
color: var(--red-ui-header-menu-color);
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 2px solid var(--red-ui-header-accent);
|
||||
padding-top: 2px;
|
||||
|
||||
span.red-ui-header-logo {
|
||||
float: left;
|
||||
margin-top: 5px;
|
||||
font-size: 30px;
|
||||
line-height: 30px;
|
||||
text-decoration: none;
|
||||
@@ -42,7 +46,7 @@
|
||||
vertical-align: middle;
|
||||
font-size: 16px !important;
|
||||
&:not(:first-child) {
|
||||
margin-left: 5px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
img {
|
||||
|
17
packages/node_modules/@node-red/editor-client/src/sass/sizes.scss
vendored
Normal file
17
packages/node_modules/@node-red/editor-client/src/sass/sizes.scss
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Copyright JS Foundation and other contributors, http://js.foundation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
**/
|
||||
|
||||
$header-height: 48px;
|
@@ -15,4 +15,5 @@
|
||||
**/
|
||||
|
||||
@import "colors";
|
||||
@import "sizes";
|
||||
@import "variables";
|
@@ -15,6 +15,7 @@
|
||||
**/
|
||||
|
||||
@import "colors";
|
||||
@import "sizes";
|
||||
@import "variables";
|
||||
@import "mixins";
|
||||
|
||||
|
@@ -16,6 +16,9 @@
|
||||
|
||||
--red-ui-shadow: #{$shadow};
|
||||
|
||||
// Header Height
|
||||
--red-ui-header-height: #{$header-height};
|
||||
|
||||
// Main body text
|
||||
--red-ui-primary-text-color: #{$primary-text-color};
|
||||
// UI control label text
|
||||
@@ -240,6 +243,7 @@
|
||||
|
||||
|
||||
--red-ui-header-background: #{$header-background};
|
||||
--red-ui-header-accent: #{$header-accent};
|
||||
--red-ui-header-button-background-active: #{$header-button-background-active};
|
||||
--red-ui-header-menu-color: #{$header-menu-color};
|
||||
--red-ui-header-menu-color-disabled: #{$header-menu-color-disabled};
|
||||
|
Reference in New Issue
Block a user