@bpmn-io/feel-editor 1.8.0 → 1.9.1
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.
- package/dist/index.es.js +18 -1
- package/dist/index.js +18 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -983,6 +983,22 @@ var camundaTags = [
|
|
|
983
983
|
{
|
|
984
984
|
name: "last day of month(date)",
|
|
985
985
|
description: "<p><em>Camunda Extension</em></p>\n<p>Takes the month of the given date or date-time value and returns the last day of this month.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">last day of month(date: date): date\n</code></pre>\n<pre><code class=\"language-feel\">last day of month(date: date and time): date\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">last day of month(date("2022-10-01"))\n// date("2022-10-31"))\n\nlast day of month(date and time("2022-10-16T12:00:00"))\n// date("2022-10-31"))\n</code></pre>\n"
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
name: "is empty(list)",
|
|
989
|
+
description: "<p><em>Camunda Extension</em></p>\n<p>Returns true if the given list is empty. Otherwise, returns false.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">is empty(list: list): boolean</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">is empty([])\n// true\n\nis empty([1,2,3])\n// false\n</code></pre>"
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
name: "trim(string)",
|
|
993
|
+
description: "<p><em>Camunda Extension</em></p>\n<p>Returns the given string without leading and trailing spaces.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">trim(string: string): string</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">trim(\" hello world \")\n// \"hello world\"\n\ntrim(\"hello world \")\n// \"hello world\"\n</code></pre>"
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
name: "uuid()",
|
|
997
|
+
description: "<p><em>Camunda Extension</em></p>\n<p>Returns a UUID (Universally Unique Identifier) with 36 characters.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">uuid(): string</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">uuid()\n// \"7793aab1-d761-4d38-916b-b7270e309894\"\n</code></pre>"
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
name: "to base64(string)",
|
|
1001
|
+
description: "<p><em>Camunda Extension</em></p>\n<p>Returns the given string encoded in Base64 format.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">to base64(value: string): string</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">to base64(\"FEEL\")\n// \"RkVFTA==\"\n</code></pre>"
|
|
986
1002
|
}
|
|
987
1003
|
];
|
|
988
1004
|
|
|
@@ -1011,7 +1027,8 @@ function parseBuiltin(builtin) {
|
|
|
1011
1027
|
const functionName = match[1];
|
|
1012
1028
|
const functionArguments = match[2];
|
|
1013
1029
|
|
|
1014
|
-
|
|
1030
|
+
// parameterless function matches as empty string
|
|
1031
|
+
const params = functionArguments ? functionArguments.split(', ').map(name => ({ name })) : [];
|
|
1015
1032
|
|
|
1016
1033
|
return {
|
|
1017
1034
|
name: functionName,
|
package/dist/index.js
CHANGED
|
@@ -985,6 +985,22 @@ var camundaTags = [
|
|
|
985
985
|
{
|
|
986
986
|
name: "last day of month(date)",
|
|
987
987
|
description: "<p><em>Camunda Extension</em></p>\n<p>Takes the month of the given date or date-time value and returns the last day of this month.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">last day of month(date: date): date\n</code></pre>\n<pre><code class=\"language-feel\">last day of month(date: date and time): date\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">last day of month(date("2022-10-01"))\n// date("2022-10-31"))\n\nlast day of month(date and time("2022-10-16T12:00:00"))\n// date("2022-10-31"))\n</code></pre>\n"
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
name: "is empty(list)",
|
|
991
|
+
description: "<p><em>Camunda Extension</em></p>\n<p>Returns true if the given list is empty. Otherwise, returns false.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">is empty(list: list): boolean</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">is empty([])\n// true\n\nis empty([1,2,3])\n// false\n</code></pre>"
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
name: "trim(string)",
|
|
995
|
+
description: "<p><em>Camunda Extension</em></p>\n<p>Returns the given string without leading and trailing spaces.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">trim(string: string): string</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">trim(\" hello world \")\n// \"hello world\"\n\ntrim(\"hello world \")\n// \"hello world\"\n</code></pre>"
|
|
996
|
+
},
|
|
997
|
+
{
|
|
998
|
+
name: "uuid()",
|
|
999
|
+
description: "<p><em>Camunda Extension</em></p>\n<p>Returns a UUID (Universally Unique Identifier) with 36 characters.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">uuid(): string</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">uuid()\n// \"7793aab1-d761-4d38-916b-b7270e309894\"\n</code></pre>"
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
name: "to base64(string)",
|
|
1003
|
+
description: "<p><em>Camunda Extension</em></p>\n<p>Returns the given string encoded in Base64 format.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">to base64(value: string): string</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">to base64(\"FEEL\")\n// \"RkVFTA==\"\n</code></pre>"
|
|
988
1004
|
}
|
|
989
1005
|
];
|
|
990
1006
|
|
|
@@ -1013,7 +1029,8 @@ function parseBuiltin(builtin) {
|
|
|
1013
1029
|
const functionName = match[1];
|
|
1014
1030
|
const functionArguments = match[2];
|
|
1015
1031
|
|
|
1016
|
-
|
|
1032
|
+
// parameterless function matches as empty string
|
|
1033
|
+
const params = functionArguments ? functionArguments.split(', ').map(name => ({ name })) : [];
|
|
1017
1034
|
|
|
1018
1035
|
return {
|
|
1019
1036
|
name: functionName,
|