@node-red/editor-client
Advanced tools
Comparing version 2.0.0-beta.1 to 2.0.0-beta.2
@@ -203,4 +203,4 @@ { | ||
"$fromMillis": { | ||
"args": "number", | ||
"desc": "Convert a number representing milliseconds since the Unix Epoch (1 January, 1970 UTC) to a timestamp string in the ISO 8601 format." | ||
"args": "number, [, picture [, timezone]]", | ||
"desc": "Convert the `number` representing milliseconds since the Unix Epoch (1 January, 1970 UTC) to a formatted string representation of the timestamp as specified by the picture string.\n\nIf the optional `picture` parameter is omitted, then the timestamp is formatted in the ISO 8601 format.\n\nIf the optional `picture` string is supplied, then the timestamp is formatted occording to the representation specified in that string. The behaviour of this function is consistent with the two-argument version of the XPath/XQuery function `format-dateTime` as defined in the XPath F&O 3.1 specification. The picture string parameter defines how the timestamp is formatted and has the same syntax as `format-dateTime`.\n\nIf the optional `timezone` string is supplied, then the formatted timestamp will be in that timezone. The `timezone` string should be in the format '±HHMM', where ± is either the plus or minus sign and HHMM is the offset in hours and minutes from UTC. Positive offset for timezones east of UTC, negative offset for timezones west of UTC." | ||
}, | ||
@@ -207,0 +207,0 @@ "$formatNumber": { |
@@ -114,2 +114,3 @@ { | ||
"showNodeLabelDefault": "追加したノードのラベルを表示", | ||
"codeEditor": "コードエディタ", | ||
"groups": "グループ", | ||
@@ -889,2 +890,5 @@ "groupSelection": "選択部分をグループ化", | ||
}, | ||
"monaco": { | ||
"setTheme": "テーマを設定:" | ||
}, | ||
"jsEditor": { | ||
@@ -891,0 +895,0 @@ "title": "JavaScriptエディタ" |
@@ -55,4 +55,4 @@ { | ||
"$now": { | ||
"args": "", | ||
"desc": "ISO 8601互換形式の時刻を生成し、文字列として返します。" | ||
"args": "$[picture [, timezone]]", | ||
"desc": "ISO 8601互換形式の時刻を生成し、文字列として返します。pictureおよびtimezoneパラメータが指定されている場合、現在時刻を`$fromMillis()`関数の説明に従ってフォーマットします。" | ||
}, | ||
@@ -204,4 +204,4 @@ "$base64encode": { | ||
"$fromMillis": { | ||
"args": "number", | ||
"desc": "Unixエポック(1 January, 1970 UTC)からの経過ミリ秒を表す数値を、ISO 8601形式のタイムスタンプの文字列に変換します。" | ||
"args": "number, [, picture [, timezone]]", | ||
"desc": "Unixエポック(1 January, 1970 UTC)からの経過ミリ秒を表す数値を、`picture`の指定に従ってタイムスタンプの文字列に変換します。\n\n`picture`パラメータが指定されない場合、ISO 8601形式に変換します。\n\n`picture`を指定すると、指定した文字列に従って変換を行います。この変換はXPath F&O 3.1仕様におけるXPath/XQueryの2引数形式`format-dateTime`と同様です。`picture`パラメータはタイムスタンプの変換形式を定義し、その書式は`format-dateTime`と同じです。\n\n`timezone`を指定すると、指定タイムゾーンで変換します。`timezone`は'±HHMM'という形式で指定します。ここで、±は+もしくは-記号を表し、HHMMはUTCからの差分時間と分を表します。正の差分はUTCの東、負の差分は西のタイムゾーンとなります。" | ||
}, | ||
@@ -208,0 +208,0 @@ "$formatNumber": { |
{ | ||
"name": "@node-red/editor-client", | ||
"version": "2.0.0-beta.1", | ||
"version": "2.0.0-beta.2", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -30,3 +30,3 @@ | ||
/** The text to display */ | ||
text?: string | ||
text?: string|boolean|number | ||
} | ||
@@ -39,17 +39,5 @@ | ||
* @param {Boolean} [clone=true] Flag to indicate the `msg` should be cloned. Default = `true` | ||
* @example Send 1 msg to output 1 | ||
* ```javascript | ||
* node.send({ payload: "a" }); | ||
* ``` | ||
* @example Send 2 msg to 2 outputs | ||
* ```javascript | ||
* node.send([{ payload: "output1" }, { payload: "output2" }]); | ||
* ``` | ||
* @example Send 3 msg to output 1 | ||
* ```javascript | ||
* node.send([[{ payload: 1 }, { payload: 2 }, { payload: 3 }]]); | ||
* ``` | ||
* @see node-red documentation [writing-functions: sending messages asynchronously](https://nodered.org/docs/user-guide/writing-functions#sending-messages-asynchronously) | ||
*/ | ||
static send(msg:object, clone?:Boolean); | ||
static send(msg:object|object[], clone?:Boolean): void; | ||
/** Inform runtime this instance has completed its operation */ | ||
@@ -60,18 +48,15 @@ static done(); | ||
/** Log a warn message to the console and debug sidebar */ | ||
static warn(warning:string|Object); | ||
static warn(warning:string|object); | ||
/** Log an info message to the console (not sent to sidebar)' */ | ||
static log(info:string|Object); | ||
/** Set the status icon and text underneath the node. | ||
static log(info:string|object); | ||
/** Sets the status icon and text underneath the node. | ||
* @param {NodeStatus} status - The status object `{fill, shape, text}` | ||
* @example clear node status | ||
* ```javascript | ||
* node.status({}); | ||
* ``` | ||
* @example set node status to red ring with text | ||
* ```javascript | ||
* node.status({fill:"red",shape:"ring",text:"error"}) | ||
* ``` | ||
* @see node-red documentation [writing-functions: adding-status](https://nodered.org/docs/user-guide/writing-functions#adding-status) | ||
*/ | ||
static status(status:NodeStatus); | ||
/** Sets the status text underneath the node. | ||
* @param {string} status - The status to display | ||
* @see node-red documentation [writing-functions: adding-status](https://nodered.org/docs/user-guide/writing-functions#adding-status) | ||
*/ | ||
static status(status:string|boolean|number); | ||
/** the id of this node */ | ||
@@ -82,27 +67,200 @@ public readonly id:string; | ||
/** the number of outputs of this node */ | ||
public readonly outputCount:Number; | ||
public readonly outputCount:number; | ||
} | ||
declare class context { | ||
/** Get a value from context */ | ||
static get(name:string, store?:string); | ||
/** Store a value in context */ | ||
static set(name:string, value:any, store?:string); | ||
/** | ||
* Get one or multiple values from context (synchronous). | ||
* @param name - Name of context variable | ||
*/ | ||
static get(name: string | string[]); | ||
/** | ||
* Get one or multiple values from context (asynchronous). | ||
* @param name - Name (or array of names) to get from context | ||
* @param {function} callback - (optional) Callback function (`(err,value) => {}`) | ||
*/ | ||
static get(name: string | string[], callback: Function); | ||
/** | ||
* Get one or multiple values from context (synchronous). | ||
* @param name - Name (or array of names) to get from context | ||
* @param store - Name of context store | ||
*/ | ||
static get(name: string | string[], store: string); | ||
/** | ||
* Get one or multiple values from context (asynchronous). | ||
* @param name - Name (or array of names) to get from context | ||
* @param store - Name of context store | ||
* @param {function} callback - (optional) Callback function (`(err,value) => {}`) | ||
*/ | ||
static get(name: string | string[], store: string, callback: Function); | ||
/** | ||
* Set one or multiple values in context (synchronous). | ||
* @param name - Name (or array of names) to set in context | ||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed. | ||
*/ | ||
static set(name: string | string[], value?: any | any[]); | ||
/** | ||
* Set one or multiple values in context (asynchronous). | ||
* @param name - Name (or array of names) to set in context | ||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed. | ||
* @param callback - (optional) Callback function (`(err) => {}`) | ||
*/ | ||
static set(name: string | string[], value?: any | any[], callback?: Function); | ||
/** | ||
* Set one or multiple values in context (synchronous). | ||
* @param name - Name (or array of names) to set in context | ||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed. | ||
* @param store - (optional) Name of context store | ||
*/ | ||
static set(name: string | string[], value?: any | any[], store?: string); | ||
/** | ||
* Set one or multiple values in context (asynchronous). | ||
* @param name - Name (or array of names) to set in context | ||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed. | ||
* @param store - (optional) Name of context store | ||
* @param callback - (optional) Callback function (`(err) => {}`) | ||
*/ | ||
static set(name: string | string[], value?: any | any[], store?: string, callback?: Function); | ||
/** Get an array of the keys in the context store */ | ||
static keys(store?:string):Array<string> ; | ||
static keys(): Array<string>; | ||
/** Get an array of the keys in the context store */ | ||
static keys(store: string): Array<string>; | ||
/** Get an array of the keys in the context store */ | ||
static keys(callback: Function); | ||
/** Get an array of the keys in the context store */ | ||
static keys(store: string, callback: Function); | ||
} | ||
declare class flow { | ||
/** Get a value from flow context */ | ||
static get(name:string, store?:string); | ||
/** Store a value in flow context */ | ||
static set(name:string, value:any, store?:string); | ||
/** Get an array of the keys in the flow context store */ | ||
static keys(store?:string):Array<string> ; | ||
/** | ||
* Get one or multiple values from context (synchronous). | ||
* @param name - Name of context variable | ||
*/ | ||
static get(name: string | string[]); | ||
/** | ||
* Get one or multiple values from context (asynchronous). | ||
* @param name - Name (or array of names) to get from context | ||
* @param {function} callback - (optional) Callback function (`(err,value) => {}`) | ||
*/ | ||
static get(name: string | string[], callback: Function); | ||
/** | ||
* Get one or multiple values from context (synchronous). | ||
* @param name - Name (or array of names) to get from context | ||
* @param store - Name of context store | ||
*/ | ||
static get(name: string | string[], store: string); | ||
/** | ||
* Get one or multiple values from context (asynchronous). | ||
* @param name - Name (or array of names) to get from context | ||
* @param store - Name of context store | ||
* @param {function} callback - (optional) Callback function (`(err,value) => {}`) | ||
*/ | ||
static get(name: string | string[], store: string, callback: Function); | ||
/** | ||
* Set one or multiple values in context (synchronous). | ||
* @param name - Name (or array of names) to set in context | ||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed. | ||
*/ | ||
static set(name: string | string[], value?: any | any[]); | ||
/** | ||
* Set one or multiple values in context (asynchronous). | ||
* @param name - Name (or array of names) to set in context | ||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed. | ||
* @param callback - (optional) Callback function (`(err) => {}`) | ||
*/ | ||
static set(name: string | string[], value?: any | any[], callback?: Function); | ||
/** | ||
* Set one or multiple values in context (synchronous). | ||
* @param name - Name (or array of names) to set in context | ||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed. | ||
* @param store - (optional) Name of context store | ||
*/ | ||
static set(name: string | string[], value?: any | any[], store?: string); | ||
/** | ||
* Set one or multiple values in context (asynchronous). | ||
* @param name - Name (or array of names) to set in context | ||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed. | ||
* @param store - (optional) Name of context store | ||
* @param callback - (optional) Callback function (`(err) => {}`) | ||
*/ | ||
static set(name: string | string[], value?: any | any[], store?: string, callback?: Function); | ||
/** Get an array of the keys in the context store */ | ||
static keys(): Array<string>; | ||
/** Get an array of the keys in the context store */ | ||
static keys(store: string): Array<string>; | ||
/** Get an array of the keys in the context store */ | ||
static keys(callback: Function); | ||
/** Get an array of the keys in the context store */ | ||
static keys(store: string, callback: Function); | ||
} | ||
// @ts-ignore | ||
declare class global { | ||
/** Get a value from global context */ | ||
static get(name:string, store?:string); | ||
/** Store a value in global context */ | ||
static set(name:string, value:any, store?:string); | ||
/** Get an array of the keys in the global context store */ | ||
static keys(store?:string):Array<string> ; | ||
/** | ||
* Get one or multiple values from context (synchronous). | ||
* @param name - Name of context variable | ||
*/ | ||
static get(name: string | string[]); | ||
/** | ||
* Get one or multiple values from context (asynchronous). | ||
* @param name - Name (or array of names) to get from context | ||
* @param {function} callback - (optional) Callback function (`(err,value) => {}`) | ||
*/ | ||
static get(name: string | string[], callback: Function); | ||
/** | ||
* Get one or multiple values from context (synchronous). | ||
* @param name - Name (or array of names) to get from context | ||
* @param store - Name of context store | ||
*/ | ||
static get(name: string | string[], store: string); | ||
/** | ||
* Get one or multiple values from context (asynchronous). | ||
* @param name - Name (or array of names) to get from context | ||
* @param store - Name of context store | ||
* @param {function} callback - (optional) Callback function (`(err,value) => {}`) | ||
*/ | ||
static get(name: string | string[], store: string, callback: Function); | ||
/** | ||
* Set one or multiple values in context (synchronous). | ||
* @param name - Name (or array of names) to set in context | ||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed. | ||
*/ | ||
static set(name: string | string[], value?: any | any[]); | ||
/** | ||
* Set one or multiple values in context (asynchronous). | ||
* @param name - Name (or array of names) to set in context | ||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed. | ||
* @param callback - (optional) Callback function (`(err) => {}`) | ||
*/ | ||
static set(name: string | string[], value?: any | any[], callback?: Function); | ||
/** | ||
* Set one or multiple values in context (synchronous). | ||
* @param name - Name (or array of names) to set in context | ||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed. | ||
* @param store - (optional) Name of context store | ||
*/ | ||
static set(name: string | string[], value?: any | any[], store?: string); | ||
/** | ||
* Set one or multiple values in context (asynchronous). | ||
* @param name - Name (or array of names) to set in context | ||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed. | ||
* @param store - (optional) Name of context store | ||
* @param callback - (optional) Callback function (`(err) => {}`) | ||
*/ | ||
static set(name: string | string[], value?: any | any[], store?: string, callback?: Function); | ||
/** Get an array of the keys in the context store */ | ||
static keys(): Array<string>; | ||
/** Get an array of the keys in the context store */ | ||
static keys(store: string): Array<string>; | ||
/** Get an array of the keys in the context store */ | ||
static keys(callback: Function); | ||
/** Get an array of the keys in the context store */ | ||
static keys(store: string, callback: Function); | ||
} | ||
@@ -109,0 +267,0 @@ declare class env { |
@@ -5,5 +5,4 @@ (function() { | ||
if(_isIE === false) { | ||
var defaultLanguage = 'en-gb'; | ||
var userLocale = (localStorage.getItem("editor-language") + "") | ||
var browserLocale = typeof navigator === "undefined" ? "" : (navigator.language || navigator.userLanguage); | ||
var browserLocale = typeof navigator === "undefined" ? "" : (navigator.language || navigator.userLanguage || ""); | ||
var cultureDists = { | ||
@@ -19,5 +18,8 @@ "zh-cn":"zh-hans", | ||
"ru":"ru", | ||
"en-us":"en-gb" | ||
"tr":"tr", | ||
"pl":"pl", | ||
"pt-br":"pt-br", | ||
"cs":"cs" | ||
}; | ||
var uiLanguage = cultureDists[userLocale.toLowerCase()] || cultureDists[browserLocale.toLowerCase()] || defaultLanguage; | ||
var uiLanguage = cultureDists[userLocale.toLowerCase()] || cultureDists[browserLocale.toLowerCase()]; | ||
if(uiLanguage) document.write('<script src="vendor/monaco/dist/locale/' + uiLanguage + '.js"><\/script>'); | ||
@@ -24,0 +26,0 @@ document.write('<script src="vendor/monaco/dist/editor.js"><\/script>'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21560012
206
98666