From aa4de08869b16e88dfcc9318df7a84cd191627a2 Mon Sep 17 00:00:00 2001 From: Luc Patiny Date: Tue, 12 Aug 2025 09:58:27 +0200 Subject: [PATCH 1/5] fix: remove shadow when printing to allow nice looking copy / paste in publications --- src/css/main.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/css/main.css b/src/css/main.css index 27f5001f3..e681cdf6f 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -1249,3 +1249,10 @@ span.superimpose sub { -moz-box-sizing: border-box; box-sizing: border-box; } + +/* Print styles - suppress box-shadows for printing */ +@media print { + * { + box-shadow: none !important; + } +} From e0fcf871ec7afafa54828fecf9c31be100ba8a52 Mon Sep 17 00:00:00 2001 From: Luc Patiny Date: Tue, 12 Aug 2025 09:59:28 +0200 Subject: [PATCH 2/5] test: add twig timing test --- testcase/data/twig-form-timing/data.json | 1 + testcase/data/twig-form-timing/view.json | 627 +++++++++++++++++++++++ testcase/index.html | 1 + 3 files changed, 629 insertions(+) create mode 100644 testcase/data/twig-form-timing/data.json create mode 100644 testcase/data/twig-form-timing/view.json diff --git a/testcase/data/twig-form-timing/data.json b/testcase/data/twig-form-timing/data.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/testcase/data/twig-form-timing/data.json @@ -0,0 +1 @@ +{} diff --git a/testcase/data/twig-form-timing/view.json b/testcase/data/twig-form-timing/view.json new file mode 100644 index 000000000..bd1230dd0 --- /dev/null +++ b/testcase/data/twig-form-timing/view.json @@ -0,0 +1,627 @@ +{ + "version": "2.172.1-0", + "grid": { + "layers": { + "Default layer": { + "name": "Default layer" + } + }, + "xWidth": 10, + "yHeight": 10 + }, + "modules": [ + { + "url": "modules/types/edition/object_editor/", + "configuration": { + "sections": {}, + "groups": { + "group": [ + { + "editable": [ + "text" + ], + "expanded": [ + [] + ], + "storeObject": [ + [ + "expand" + ] + ], + "displayValue": [ + [] + ], + "searchBox": [ + [ + "search" + ] + ], + "sendButton": [ + [ + "send" + ] + ], + "output": [ + "new" + ], + "storedObject": [ + "{\"title\":\"abfddc\",\"kind\":\"A\"}" + ] + } + ] + } + }, + "layers": { + "Default layer": { + "position": { + "left": 54, + "top": 24 + }, + "size": { + "width": 40, + "height": 54 + }, + "zIndex": 0, + "display": true, + "title": "Input", + "bgColor": [ + 255, + 255, + 255, + 0 + ], + "wrapper": true, + "created": true, + "name": "Default layer" + } + }, + "id": 1, + "vars_in": [ + { + "rel": "value", + "name": "data" + } + ], + "actions_in": [ + {} + ], + "vars_out": [ + { + "jpath": [] + } + ], + "actions_out": [ + { + "jpath": [] + } + ], + "toolbar": { + "custom": [ + [ + { + "title": "", + "icon": "", + "action": "", + "position": "begin", + "color": [ + 100, + 100, + 100, + 1 + ] + } + ] + ], + "common": [ + { + "toolbar": [ + [ + "Open Preferences" + ] + ] + } + ] + }, + "css": [ + { + "fontSize": [ + "" + ], + "fontFamily": [ + "" + ] + } + ], + "title": "Input" + }, + { + "url": "modules/types/display/template-twig/", + "configuration": { + "sections": {}, + "groups": { + "group": [ + { + "selectable": [ + [] + ], + "template": [ + "" + ], + "modifyInForm": [ + [ + "yes" + ] + ], + "debouncing": [ + 100 + ], + "formOptions": [ + [ + "keepFormValueIfDataUndefined" + ] + ], + "templateOptions": [ + [ + "removeTemplateLeadingSpaces" + ] + ] + } + ] + } + }, + "layers": { + "Default layer": { + "position": { + "left": 54, + "top": 0 + }, + "size": { + "width": 40, + "height": 23 + }, + "zIndex": 0, + "display": true, + "title": "", + "bgColor": [ + 255, + 255, + 255, + 0 + ], + "wrapper": true, + "created": true, + "name": "Default layer" + } + }, + "id": 2, + "vars_in": [ + { + "rel": "tpl", + "name": "template" + }, + { + "rel": "form", + "name": "data" + } + ], + "actions_in": [ + {} + ], + "vars_out": [ + { + "jpath": [] + } + ], + "actions_out": [ + { + "jpath": [] + } + ], + "toolbar": { + "custom": [ + [ + { + "title": "", + "icon": "", + "action": "", + "position": "begin", + "color": [ + 100, + 100, + 100, + 1 + ] + } + ] + ], + "common": [ + { + "toolbar": [ + [ + "Open Preferences" + ] + ] + } + ] + }, + "css": [ + { + "fontSize": [ + "" + ], + "fontFamily": [ + "" + ] + } + ], + "title": "" + }, + { + "url": "modules/types/edition/quill_editor/", + "configuration": { + "sections": {}, + "groups": { + "group": [ + { + "editable": [ + [ + "isEditable" + ] + ], + "toolbarMode": [ + "minimal" + ], + "debouncing": [ + 0 + ], + "storeInView": [ + [ + "yes" + ] + ], + "modifyVarIn": [ + [] + ], + "className": [ + "quill" + ], + "css": [ + ".quill {}" + ] + } + ] + } + }, + "layers": { + "Default layer": { + "position": { + "left": 0, + "top": 0 + }, + "size": { + "width": 53, + "height": 23 + }, + "zIndex": 0, + "display": true, + "title": "", + "bgColor": [ + 255, + 255, + 255, + 0 + ], + "wrapper": true, + "created": true, + "name": "Default layer" + } + }, + "id": 3, + "vars_in": [ + {} + ], + "actions_in": [ + {} + ], + "vars_out": [ + { + "jpath": [] + } + ], + "actions_out": [ + { + "jpath": [] + } + ], + "toolbar": { + "custom": [ + [ + { + "title": "", + "icon": "", + "action": "", + "position": "begin", + "color": [ + 100, + 100, + 100, + 1 + ] + } + ] + ], + "common": [ + { + "toolbar": [ + [ + "Open Preferences" + ] + ] + } + ] + }, + "css": [ + { + "fontSize": [ + "" + ], + "fontFamily": [ + "" + ] + } + ], + "title": "", + "richtext": { + "ops": [ + { + "insert": "\n" + } + ] + } + }, + { + "url": "modules/types/client_interaction/code_executor/", + "configuration": { + "sections": {}, + "groups": { + "group": [ + { + "display": [ + [ + "editor", + "buttons" + ] + ], + "execOnLoad": [ + [ + "yes" + ] + ], + "asyncAwait": [ + [ + "top" + ] + ], + "script": [ + "const template = `\nTitle:
\n\n\n`;\n\nconst data = {\n \"title\": \"abfddc\",\n \"kind\": \"A\"\n};\n\n\n//await delay(1000);\n\nAPI.createData('data', data);\n\n\nawait delay(1000);\n\nAPI.createData('template', template);" + ] + } + ], + "libs": [ + [ + { + "lib": "delay", + "alias": "delay" + } + ] + ], + "buttons": [ + [ + { + "name": "button1", + "label": "Execute", + "hide": [], + "disable": [] + } + ] + ] + } + }, + "layers": { + "Default layer": { + "position": { + "left": 0, + "top": 24 + }, + "size": { + "width": 53, + "height": 54 + }, + "zIndex": 0, + "display": true, + "title": "", + "bgColor": [ + 255, + 255, + 255, + 0 + ], + "wrapper": true, + "created": true, + "name": "Default layer" + } + }, + "id": 4, + "vars_in": [ + {} + ], + "actions_in": [ + {} + ], + "vars_out": [ + { + "jpath": [] + } + ], + "actions_out": [ + { + "jpath": [] + } + ], + "toolbar": { + "custom": [ + [ + { + "title": "", + "icon": "", + "action": "", + "position": "begin", + "color": [ + 100, + 100, + 100, + 1 + ] + } + ] + ], + "common": [ + { + "toolbar": [ + [ + "Open Preferences" + ] + ] + } + ] + }, + "css": [ + { + "fontSize": [ + "" + ], + "fontFamily": [ + "" + ] + } + ], + "title": "" + } + ], + "variables": [ + { + "jpath": [ + "" + ] + } + ], + "aliases": [ + { + "path": "https://www.lactame.com/github/cheminfo-js/visualizer-helper/fede69d611616d26d5f70a4fc053eceac6612b68", + "alias": "vh" + }, + { + "path": "http://localhost:9898/cheminfo-js/visualizer-helper", + "alias": "vhxx" + } + ], + "configuration": { + "title": "Twig dynamic form experiments" + }, + "actionscripts": [ + { + "sections": {}, + "groups": { + "action": [ + { + "name": [ + null + ], + "script": [ + null + ] + } + ] + } + } + ], + "init_script": [ + { + "sections": {}, + "groups": { + "general": [ + { + "script": [ + "\n\nconst track = await API.require('vh/util/track');\nawait track('emdbPreferences', {\n \"title\": \"abfddc\",\n \"kind\": \"A\"\n}, { varName: 'data' });\n" + ] + } + ] + } + } + ], + "custom_filters": [ + { + "sections": { + "modules": [ + { + "sections": {}, + "groups": { + "modules": [ + [ + {} + ] + ] + } + } + ], + "filtersLib": [ + { + "sections": {}, + "groups": { + "filters": [ + [ + {} + ] + ] + } + } + ], + "filters": [ + { + "sections": {}, + "groups": { + "filter": [ + { + "name": [ + null + ], + "script": [ + null + ] + } + ], + "libs": [ + [ + {} + ] + ] + } + } + ] + }, + "groups": {} + } + ], + "actionfiles": [ + { + "sections": {}, + "groups": { + "action": [ + [ + {} + ] + ] + } + } + ] +} \ No newline at end of file diff --git a/testcase/index.html b/testcase/index.html index 55eb5d359..0da28f597 100644 --- a/testcase/index.html +++ b/testcase/index.html @@ -287,6 +287,7 @@ { description: 'Twig template', folder: 'twig' }, { description: 'Twig form', folder: 'twig-form' }, { description: 'Twig form light', folder: 'twig-form-light' }, + { description: 'Twig form timing', folder: 'twig-form-timing' }, { description: 'SVG Editor (Bioreactor)', folder: 'svgEditor' }, { description: 'House monitoring', folder: 'houseMonitoring' }, { From d9db26542fda689021b3b11a9c23f36313af255d Mon Sep 17 00:00:00 2001 From: Luc Patiny Date: Tue, 12 Aug 2025 09:59:38 +0200 Subject: [PATCH 3/5] wip: add debug info in twig --- .../types/display/template-twig/view.js | 36 ++++++++++++------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/src/modules/types/display/template-twig/view.js b/src/modules/types/display/template-twig/view.js index 95528dc3a..b32461b07 100644 --- a/src/modules/types/display/template-twig/view.js +++ b/src/modules/types/display/template-twig/view.js @@ -137,10 +137,19 @@ define([ }, getForm() { - return (this.currentForm = this.form.getData(false)); + this.currentForm = this.form.getData(false); + // print the stack trace for debugging purposes + try { + throw new Error('Stack trace for debugging'); + } catch (error) { + console.error(error.stack); + } + console.table(this.currentForm); + return this.currentForm; }, submitChange(event, noChange) { + console.log('submitChange', event, noChange); event = event || { target: {} }; const toSend = { data: this.getForm(), @@ -199,6 +208,7 @@ define([ }, update: { value(value, name) { + console.log('Updating value', name, value); /* Convert special DataObjects (twig does some check depending on the filter used @@ -218,6 +228,7 @@ define([ } }, tpl(value) { + console.log('Updating template', value); var tpl = value.get().toString(); return this.renderPromise .then(() => { @@ -235,21 +246,22 @@ define([ }, async form(value, name) { + console.log('Updating form', name, value); this.formName = name; this.formObject = value; // fill form should execute when the template exists // It doesn't make sense otherwise - this.hasTemplate.then(() => { - this.fillForm(true); - if ( - this.module.getConfigurationCheckbox( - 'formOptions', - 'rerenderIfFormValueChanges', - ) - ) { - this.rerender(); - } - }); + await this.hasTemplate; + + this.fillForm(true); + if ( + this.module.getConfigurationCheckbox( + 'formOptions', + 'rerenderIfFormValueChanges', + ) + ) { + this.rerender(); + } }, style(value) { From 3d7ed860459e46ce4bd576fc2b1a0390a265e262 Mon Sep 17 00:00:00 2001 From: Luc Patiny Date: Wed, 20 Aug 2025 14:15:10 +0200 Subject: [PATCH 4/5] test: add view --- testcase/data/twig-form-timing/view.json | 231 +++++++++++------------ 1 file changed, 111 insertions(+), 120 deletions(-) diff --git a/testcase/data/twig-form-timing/view.json b/testcase/data/twig-form-timing/view.json index bd1230dd0..7f5b8e69d 100644 --- a/testcase/data/twig-form-timing/view.json +++ b/testcase/data/twig-form-timing/view.json @@ -11,41 +11,35 @@ }, "modules": [ { - "url": "modules/types/edition/object_editor/", + "url": "modules/types/display/template-twig/", "configuration": { "sections": {}, "groups": { "group": [ { - "editable": [ - "text" - ], - "expanded": [ + "selectable": [ [] ], - "storeObject": [ + "template": [ + "" + ], + "modifyInForm": [ [ - "expand" + "yes" ] ], - "displayValue": [ - [] + "debouncing": [ + 100 ], - "searchBox": [ + "formOptions": [ [ - "search" + "keepFormValueIfDataUndefined" ] ], - "sendButton": [ + "templateOptions": [ [ - "send" + "removeTemplateLeadingSpaces" ] - ], - "output": [ - "new" - ], - "storedObject": [ - "{\"title\":\"abfddc\",\"kind\":\"A\"}" ] } ] @@ -55,15 +49,15 @@ "Default layer": { "position": { "left": 54, - "top": 24 + "top": 0 }, "size": { "width": 40, - "height": 54 + "height": 23 }, "zIndex": 0, "display": true, - "title": "Input", + "title": "", "bgColor": [ 255, 255, @@ -78,7 +72,11 @@ "id": 1, "vars_in": [ { - "rel": "value", + "rel": "tpl", + "name": "template" + }, + { + "rel": "form", "name": "data" } ], @@ -132,38 +130,39 @@ ] } ], - "title": "Input" + "title": "" }, { - "url": "modules/types/display/template-twig/", + "url": "modules/types/edition/quill_editor/", "configuration": { "sections": {}, "groups": { "group": [ { - "selectable": [ - [] - ], - "template": [ - "" - ], - "modifyInForm": [ + "editable": [ [ - "yes" + "isEditable" ] ], + "toolbarMode": [ + "minimal" + ], "debouncing": [ - 100 + 0 ], - "formOptions": [ + "storeInView": [ [ - "keepFormValueIfDataUndefined" + "yes" ] ], - "templateOptions": [ - [ - "removeTemplateLeadingSpaces" - ] + "modifyVarIn": [ + [] + ], + "className": [ + "quill" + ], + "css": [ + ".quill {}" ] } ] @@ -172,11 +171,11 @@ "layers": { "Default layer": { "position": { - "left": 54, + "left": 0, "top": 0 }, "size": { - "width": 40, + "width": 53, "height": 23 }, "zIndex": 0, @@ -195,14 +194,7 @@ }, "id": 2, "vars_in": [ - { - "rel": "tpl", - "name": "template" - }, - { - "rel": "form", - "name": "data" - } + {} ], "actions_in": [ {} @@ -254,41 +246,60 @@ ] } ], - "title": "" + "title": "", + "richtext": { + "ops": [ + { + "insert": "\n" + } + ] + } }, { - "url": "modules/types/edition/quill_editor/", + "url": "modules/types/client_interaction/code_executor/", "configuration": { "sections": {}, "groups": { "group": [ { - "editable": [ + "display": [ [ - "isEditable" + "editor", + "buttons" ] ], - "toolbarMode": [ - "minimal" - ], - "debouncing": [ - 0 - ], - "storeInView": [ + "execOnLoad": [ [ "yes" ] ], - "modifyVarIn": [ - [] - ], - "className": [ - "quill" + "asyncAwait": [ + [ + "top" + ] ], - "css": [ - ".quill {}" + "script": [ + "const template = `\nTitle:
\n\n
\n\nSubvalue:
\nOther subvalue:
\n`;\n\nconst data = {\n title: 'abfddc',\n kind: 'A',\n ab: [{ cd: [{ e: 'subfield' }] }],\n cd: { ef: { g: 'subfield' } },\n};\n\nawait delay(1000);\nAPI.createData('template', template);\nAPI.createData('data', data);\n\n\n" ] } + ], + "libs": [ + [ + { + "lib": "delay", + "alias": "delay" + } + ] + ], + "buttons": [ + [ + { + "name": "button1", + "label": "Execute", + "hide": [], + "disable": [] + } + ] ] } }, @@ -296,11 +307,11 @@ "Default layer": { "position": { "left": 0, - "top": 0 + "top": 24 }, "size": { "width": 53, - "height": 23 + "height": 54 }, "zIndex": 0, "display": true, @@ -370,71 +381,55 @@ ] } ], - "title": "", - "richtext": { - "ops": [ - { - "insert": "\n" - } - ] - } + "title": "" }, { - "url": "modules/types/client_interaction/code_executor/", + "url": "modules/types/edition/object_editor/", "configuration": { "sections": {}, "groups": { "group": [ { - "display": [ - [ - "editor", - "buttons" - ] + "editable": [ + "view" ], - "execOnLoad": [ + "expanded": [ [ - "yes" + "expand" ] ], - "asyncAwait": [ + "storeObject": [ + [] + ], + "displayValue": [ + [] + ], + "searchBox": [ [ - "top" + "search" ] ], - "script": [ - "const template = `\nTitle:
\n\n\n`;\n\nconst data = {\n \"title\": \"abfddc\",\n \"kind\": \"A\"\n};\n\n\n//await delay(1000);\n\nAPI.createData('data', data);\n\n\nawait delay(1000);\n\nAPI.createData('template', template);" + "sendButton": [ + [] + ], + "output": [ + "new" + ], + "storedObject": [ + "{}" ] } - ], - "libs": [ - [ - { - "lib": "delay", - "alias": "delay" - } - ] - ], - "buttons": [ - [ - { - "name": "button1", - "label": "Execute", - "hide": [], - "disable": [] - } - ] ] } }, "layers": { "Default layer": { "position": { - "left": 0, + "left": 54, "top": 24 }, "size": { - "width": 53, + "width": 40, "height": 54 }, "zIndex": 0, @@ -453,7 +448,10 @@ }, "id": 4, "vars_in": [ - {} + { + "rel": "value", + "name": "data" + } ], "actions_in": [ {} @@ -516,14 +514,7 @@ } ], "aliases": [ - { - "path": "https://www.lactame.com/github/cheminfo-js/visualizer-helper/fede69d611616d26d5f70a4fc053eceac6612b68", - "alias": "vh" - }, - { - "path": "http://localhost:9898/cheminfo-js/visualizer-helper", - "alias": "vhxx" - } + {} ], "configuration": { "title": "Twig dynamic form experiments" @@ -552,7 +543,7 @@ "general": [ { "script": [ - "\n\nconst track = await API.require('vh/util/track');\nawait track('emdbPreferences', {\n \"title\": \"abfddc\",\n \"kind\": \"A\"\n}, { varName: 'data' });\n" + "" ] } ] From ffe841657ee23b2e5d94de0013eae4f711d17127 Mon Sep 17 00:00:00 2001 From: Luc Patiny Date: Thu, 21 Aug 2025 15:43:44 +0200 Subject: [PATCH 5/5] feat: in twig form only change value from user activity --- .../types/display/template-twig/view.js | 22 +-- src/src/util/Form.js | 1 + testcase/data/twig-form-timing/view.json | 145 ++++++++++-------- 3 files changed, 88 insertions(+), 80 deletions(-) diff --git a/src/modules/types/display/template-twig/view.js b/src/modules/types/display/template-twig/view.js index b32461b07..8f662b5e5 100644 --- a/src/modules/types/display/template-twig/view.js +++ b/src/modules/types/display/template-twig/view.js @@ -138,18 +138,11 @@ define([ getForm() { this.currentForm = this.form.getData(false); - // print the stack trace for debugging purposes - try { - throw new Error('Stack trace for debugging'); - } catch (error) { - console.error(error.stack); - } - console.table(this.currentForm); return this.currentForm; }, submitChange(event, noChange) { - console.log('submitChange', event, noChange); + if (!event) return; event = event || { target: {} }; const toSend = { data: this.getForm(), @@ -208,12 +201,11 @@ define([ }, update: { value(value, name) { - console.log('Updating value', name, value); /* - Convert special DataObjects - (twig does some check depending on the filter used - and the values need to be native) - */ + Convert special DataObjects + (twig does some check depending on the filter used + and the values need to be native) + */ this._values[name] = DataObject.resurrect(value.get()); this.rerender(); @@ -228,7 +220,6 @@ define([ } }, tpl(value) { - console.log('Updating template', value); var tpl = value.get().toString(); return this.renderPromise .then(() => { @@ -245,8 +236,9 @@ define([ .then(() => this.submitChange()); }, + // we want to set the values based on an object + // we should take care that the template is maybe not yet there async form(value, name) { - console.log('Updating form', name, value); this.formName = name; this.formObject = value; // fill form should execute when the template exists diff --git a/src/src/util/Form.js b/src/src/util/Form.js index 82c376239..c37478480 100644 --- a/src/src/util/Form.js +++ b/src/src/util/Form.js @@ -24,6 +24,7 @@ define(['jquery', 'lodash', 'src/util/debug'], function ($, _, Debug) { this.bind(); this.changeCb = null; this.submitCb = null; + this.data = null; } // maps each dom input elements to a plain object diff --git a/testcase/data/twig-form-timing/view.json b/testcase/data/twig-form-timing/view.json index 7f5b8e69d..880c0b3f8 100644 --- a/testcase/data/twig-form-timing/view.json +++ b/testcase/data/twig-form-timing/view.json @@ -256,61 +256,52 @@ } }, { - "url": "modules/types/client_interaction/code_executor/", + "url": "modules/types/edition/object_editor/", "configuration": { "sections": {}, "groups": { "group": [ { - "display": [ - [ - "editor", - "buttons" - ] + "editable": [ + "view" ], - "execOnLoad": [ + "expanded": [ [ - "yes" + "expand" ] ], - "asyncAwait": [ + "storeObject": [ + [] + ], + "displayValue": [ + [] + ], + "searchBox": [ [ - "top" + "search" ] ], - "script": [ - "const template = `\nTitle:
\n\n
\n\nSubvalue:
\nOther subvalue:
\n`;\n\nconst data = {\n title: 'abfddc',\n kind: 'A',\n ab: [{ cd: [{ e: 'subfield' }] }],\n cd: { ef: { g: 'subfield' } },\n};\n\nawait delay(1000);\nAPI.createData('template', template);\nAPI.createData('data', data);\n\n\n" + "sendButton": [ + [] + ], + "output": [ + "new" + ], + "storedObject": [ + "{}" ] } - ], - "libs": [ - [ - { - "lib": "delay", - "alias": "delay" - } - ] - ], - "buttons": [ - [ - { - "name": "button1", - "label": "Execute", - "hide": [], - "disable": [] - } - ] ] } }, "layers": { "Default layer": { "position": { - "left": 0, + "left": 54, "top": 24 }, "size": { - "width": 53, + "width": 40, "height": 54 }, "zIndex": 0, @@ -327,9 +318,12 @@ "name": "Default layer" } }, - "id": 3, + "id": 4, "vars_in": [ - {} + { + "rel": "value", + "name": "data" + } ], "actions_in": [ {} @@ -384,39 +378,67 @@ "title": "" }, { - "url": "modules/types/edition/object_editor/", + "url": "modules/types/display/single_value/", "configuration": { "sections": {}, "groups": { "group": [ { - "editable": [ - "view" + "append": [ + [] ], - "expanded": [ - [ - "expand" - ] + "maxEntries": [ + 1 ], - "storeObject": [ + "editable": [ [] ], - "displayValue": [ - [] + "editSearchRegexp": [ + null ], - "searchBox": [ + "editReplace": [ + null + ], + "debounce": [ + 0 + ], + "defaultvalue": [ + "

The data are created in the general preferences before the module is loaded to trigger possible problems

\n" + ], + "font": [ + "Arial" + ], + "fontcolor": [ [ - "search" + 0, + 0, + 0, + 1 ] ], - "sendButton": [ - [] + "fontsize": [ + null ], - "output": [ - "new" + "align": [ + "left" ], - "storedObject": [ - "{}" + "valign": [ + "top" + ], + "rendererOptions": [ + "" + ], + "forceType": [ + "" + ], + "sprintf": [ + null + ], + "sprintfOrder": [ + null + ], + "preformatted": [ + [] ] } ] @@ -425,11 +447,11 @@ "layers": { "Default layer": { "position": { - "left": 54, + "left": 0, "top": 24 }, "size": { - "width": 40, + "width": 53, "height": 54 }, "zIndex": 0, @@ -446,21 +468,14 @@ "name": "Default layer" } }, - "id": 4, + "id": 5, "vars_in": [ - { - "rel": "value", - "name": "data" - } + {} ], "actions_in": [ {} ], - "vars_out": [ - { - "jpath": [] - } - ], + "vars_out": [], "actions_out": [ { "jpath": [] @@ -543,7 +558,7 @@ "general": [ { "script": [ - "" + "//const delay = await API.require('delay');\n\nconst template = `\nTitle:
\n\n
\n\nSubvalue:
\nOther subvalue:
\n`;\n\nconst data = {\n title: 'abfddc',\n kind: 'A',\n ab: [{ cd: [{ e: 'subfield' }] }],\n cd: { ef: { g: 'subfield' } },\n};\n\n//await delay(1000);\n\nAPI.createData('template', template);\nAPI.createData('data', data);\n\n\n" ] } ]