From a323ff05b4a8034e58b071f1b04f514567a0aa69 Mon Sep 17 00:00:00 2001 From: ruben Date: Mon, 5 Aug 2024 17:59:01 +0000 Subject: [PATCH 1/5] [WM] App 'f/examples/rational_app' deployed --- f/examples/rational_app.app/app.yaml | 176 +++++++++++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 f/examples/rational_app.app/app.yaml diff --git a/f/examples/rational_app.app/app.yaml b/f/examples/rational_app.app/app.yaml new file mode 100644 index 0000000..ed18df5 --- /dev/null +++ b/f/examples/rational_app.app/app.yaml @@ -0,0 +1,176 @@ +summary: '' +value: + fullscreen: false + grid: + - '12': + fixed: false + fullHeight: false + h: 2 + w: 12 + x: 0 + y: 0 + '3': + fixed: false + fullHeight: false + h: 2 + w: 6 + x: 0 + y: 0 + id: a + data: + id: a + type: containercomponent + actions: [] + configuration: {} + customCss: + container: + class: '!p-0' + style: '' + numberOfSubgrids: 1 + - '12': + fixed: false + fullHeight: false + h: 12 + w: 8 + x: 0 + y: 2 + '3': + fixed: false + fullHeight: false + h: 8 + w: 3 + x: 0 + y: 2 + id: d + data: + id: d + type: schemaformcomponent + actions: [] + componentInput: + type: static + value: + order: + - first_name + properties: + first_name: + type: object + default: {} + format: resource-gmail + required: [] + fieldType: schema + configuration: + defaultValues: + type: static + value: {} + displayType: + type: static + value: false + dynamicEnums: + type: static + value: {} + largeGap: + type: static + value: false + customCss: + description: + class: '' + style: '' + container: + class: '' + style: '' + label: + class: '' + style: '' + hiddenInlineScripts: [] + hideLegacyTopBar: true + norefreshbar: false + subgrids: + a-0: + - '12': + fixed: false + fullHeight: false + h: 1 + w: 6 + x: 0 + y: 0 + '3': + fixed: false + fullHeight: false + h: 1 + w: 6 + x: 0 + y: 0 + id: b + data: + id: b + type: textcomponent + actions: [] + componentInput: + type: templatev2 + connections: + - id: summary + componentId: ctx + eval: '${ctx.summary}' + fieldType: template + configuration: + copyButton: + type: static + value: false + disableNoText: + type: static + value: true + fieldType: boolean + style: + type: static + value: Body + tooltip: + type: evalv2 + value: '' + connections: + - id: author + componentId: ctx + expr: '`Author: ${ctx.author}`' + fieldType: text + customCss: + container: + class: '' + style: '' + text: + class: text-xl font-semibold whitespace-nowrap truncate + style: '' + horizontalAlignment: left + verticalAlignment: center + - '12': + fixed: false + fullHeight: false + h: 1 + w: 6 + x: 6 + y: 0 + '3': + fixed: false + fullHeight: false + h: 1 + w: 3 + x: 0 + y: 1 + id: c + data: + id: c + type: recomputeallcomponent + actions: [] + configuration: {} + customCss: + container: + class: '' + style: '' + horizontalAlignment: right + menuItems: [] + verticalAlignment: center + theme: + type: path + path: f/app_themes/theme_0 + unusedInlineScripts: [] +policy: + execution_mode: publisher + triggerables_v2: {} From 5f64b7db89ced098ebc3d6ab8175df4451bf58f9 Mon Sep 17 00:00:00 2001 From: ruben Date: Mon, 5 Aug 2024 18:36:45 +0000 Subject: [PATCH 2/5] [WM] App 'f/examples/rational_app' deployed --- f/examples/rational_app.app/app.yaml | 44 +++++++++++++++++-- .../background_runnable_0.inline_script.lock | 5 +++ .../background_runnable_0.inline_script.ts | 5 +++ 3 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 f/examples/rational_app.app/background_runnable_0.inline_script.lock create mode 100644 f/examples/rational_app.app/background_runnable_0.inline_script.ts diff --git a/f/examples/rational_app.app/app.yaml b/f/examples/rational_app.app/app.yaml index ed18df5..71e1866 100644 --- a/f/examples/rational_app.app/app.yaml +++ b/f/examples/rational_app.app/app.yaml @@ -5,7 +5,7 @@ value: - '12': fixed: false fullHeight: false - h: 2 + h: 1 w: 12 x: 0 y: 0 @@ -81,7 +81,40 @@ value: label: class: '' style: '' - hiddenInlineScripts: [] + hiddenInlineScripts: + - type: runnableByName + name: Background Runnable 0 + autoRefresh: true + fields: + x: + type: evalv2 + value: null + allowUserResources: true + connections: + - id: values + componentId: d + expr: d.values.first_name + fieldType: object + format: resource-gmail + inlineScript: + content: '!inline background_runnable_0.inline_script.ts' + lock: '!inline background_runnable_0.inline_script.lock' + language: bun + path: f/examples/rational_app/Background_Runnable_0 + schema: + $schema: 'https://json-schema.org/draft/2020-12/schema' + type: object + properties: + x: + type: object + description: '' + default: null + format: resource-gmail + originalType: string + required: + - x + recomputeIds: [] + recomputeOnInputChanged: true hideLegacyTopBar: true norefreshbar: false subgrids: @@ -173,4 +206,9 @@ value: unusedInlineScripts: [] policy: execution_mode: publisher - triggerables_v2: {} + triggerables_v2: + 'bg_0:rawscript/bcdac2b60283b9d0087af4b6e272ba1afc70a89c17e33e5683aab70b7a7f6220': + allow_user_resources: + - x + one_of_inputs: {} + static_inputs: {} diff --git a/f/examples/rational_app.app/background_runnable_0.inline_script.lock b/f/examples/rational_app.app/background_runnable_0.inline_script.lock new file mode 100644 index 0000000..789f01c --- /dev/null +++ b/f/examples/rational_app.app/background_runnable_0.inline_script.lock @@ -0,0 +1,5 @@ +{ + "dependencies": {} +} +//bun.lockb + \ No newline at end of file diff --git a/f/examples/rational_app.app/background_runnable_0.inline_script.ts b/f/examples/rational_app.app/background_runnable_0.inline_script.ts new file mode 100644 index 0000000..72577de --- /dev/null +++ b/f/examples/rational_app.app/background_runnable_0.inline_script.ts @@ -0,0 +1,5 @@ +// import * as wmill from "windmill-client" + +export async function main(x: gmail) { + return x +} From 0b3e5cbda6f1880a37e5c2746df9c83cda3f8764 Mon Sep 17 00:00:00 2001 From: ruben Date: Mon, 5 Aug 2024 18:47:49 +0000 Subject: [PATCH 3/5] [WM] App 'f/examples/rational_app' deployed --- f/examples/rational_app.app/app.yaml | 278 +++++++++++++++--- .../background_runnable_0.inline_script.ts | 5 - ...ock => inline_script_0.inline_script.lock} | 0 .../inline_script_0.inline_script.ts | 18 ++ 4 files changed, 259 insertions(+), 42 deletions(-) delete mode 100644 f/examples/rational_app.app/background_runnable_0.inline_script.ts rename f/examples/rational_app.app/{background_runnable_0.inline_script.lock => inline_script_0.inline_script.lock} (100%) create mode 100644 f/examples/rational_app.app/inline_script_0.inline_script.ts diff --git a/f/examples/rational_app.app/app.yaml b/f/examples/rational_app.app/app.yaml index 71e1866..ea3171d 100644 --- a/f/examples/rational_app.app/app.yaml +++ b/f/examples/rational_app.app/app.yaml @@ -30,10 +30,10 @@ value: - '12': fixed: false fullHeight: false - h: 12 + h: 2 w: 8 x: 0 - y: 2 + y: 1 '3': fixed: false fullHeight: false @@ -50,9 +50,9 @@ value: type: static value: order: - - first_name + - gmail properties: - first_name: + gmail: type: object default: {} format: resource-gmail @@ -81,40 +81,244 @@ value: label: class: '' style: '' - hiddenInlineScripts: - - type: runnableByName - name: Background Runnable 0 - autoRefresh: true - fields: - x: - type: evalv2 - value: null - allowUserResources: true - connections: - - id: values - componentId: d - expr: d.values.first_name - fieldType: object - format: resource-gmail - inlineScript: - content: '!inline background_runnable_0.inline_script.ts' - lock: '!inline background_runnable_0.inline_script.lock' - language: bun - path: f/examples/rational_app/Background_Runnable_0 - schema: - $schema: 'https://json-schema.org/draft/2020-12/schema' - type: object - properties: + - '12': + fixed: false + fullHeight: false + h: 12 + w: 12 + x: 0 + y: 3 + '3': + fixed: false + fullHeight: false + h: 10 + w: 3 + x: 0 + y: 10 + id: e + data: + id: e + type: aggridcomponent + actions: + - id: e_a + type: buttoncomponent + actions: [] + componentInput: + type: runnable + fields: {} + fieldType: any + configuration: + afterIcon: + type: static + value: '' + beforeIcon: + type: static + value: '' + color: + type: static + value: blue + confirmationModal: + type: oneOf + configuration: + confirmationModal: + description: + type: static + value: Are you sure? + confirmationText: + type: static + value: Confirm + title: + type: static + value: Title + none: {} + selected: none + disabled: + type: static + value: false + fillContainer: + type: static + value: false + label: + type: static + value: Press me + onError: + type: oneOf + configuration: + close: + id: + type: static + value: '' + errorOverlay: {} + gotoUrl: + newTab: + type: static + value: true + url: + type: static + value: '' + open: + id: + type: static + value: '' + sendErrorToast: + appendError: + type: static + value: true + message: + type: static + value: An error occured + setTab: + setTab: + type: static + value: [] + selected: errorOverlay + onSuccess: + type: oneOf + configuration: + clearFiles: + id: + type: static + value: '' + close: + id: + type: static + value: '' + closeModal: + modalId: + type: static + value: '' + gotoUrl: + newTab: + type: static + value: true + url: + type: static + value: '' + none: {} + open: + id: + type: static + value: '' + openModal: + modalId: + type: static + value: '' + sendToast: + message: + type: static + value: Do something + setTab: + setTab: + type: static + value: [] + selected: sendToast + size: + type: static + value: xs + triggerOnAppLoad: + type: static + value: false + customCss: + button: + class: '' + style: '' + container: + class: '' + style: '' + horizontalAlignment: center + recomputeIds: [] + verticalAlignment: center + componentInput: + type: runnable + value: + - id: 1 + name: A cell with a long name + age: 42 + - id: 2 + name: A briefer cell + age: 84 + autoRefresh: true + fields: x: - type: object - description: '' - default: null + type: evalv2 + value: null + allowUserResources: true + connections: + - id: values + componentId: d + expr: d.values.gmail + fieldType: object format: resource-gmail - originalType: string - required: - - x - recomputeIds: [] - recomputeOnInputChanged: true + fieldType: array + recomputeOnInputChanged: true + runnable: + type: runnableByName + name: Inline Script 0 + inlineScript: + content: '!inline inline_script_0.inline_script.ts' + lock: '!inline inline_script_0.inline_script.lock' + language: bun + path: f/examples/rational_app/Inline_Script_0 + schema: + $schema: 'https://json-schema.org/draft/2020-12/schema' + type: object + properties: + x: + type: object + description: '' + default: null + format: resource-gmail + required: + - x + subFieldType: object + configuration: + allEditable: + type: static + value: false + columnDefs: + type: static + value: + - field: id + flex: 1 + - editable: true + field: name + flex: 1 + - field: age + flex: 1 + compactness: + type: static + value: normal + customActionsHeader: + type: static + extraConfig: + type: static + value: {} + flex: + type: static + value: true + footer: + type: static + value: true + multipleSelectable: + type: static + value: false + pagination: + type: static + value: false + rowMultiselectWithClick: + type: static + value: true + selectFirstRowByDefault: + type: static + value: true + wrapActions: + type: static + value: false + customCss: + container: + class: '' + style: '' + hiddenInlineScripts: [] hideLegacyTopBar: true norefreshbar: false subgrids: @@ -207,7 +411,7 @@ value: policy: execution_mode: publisher triggerables_v2: - 'bg_0:rawscript/bcdac2b60283b9d0087af4b6e272ba1afc70a89c17e33e5683aab70b7a7f6220': + 'e:rawscript/0dba1db21e597c80cbd87a7a5bcdf68eff829fb1914fbc1063d0b2c4815d8491': allow_user_resources: - x one_of_inputs: {} diff --git a/f/examples/rational_app.app/background_runnable_0.inline_script.ts b/f/examples/rational_app.app/background_runnable_0.inline_script.ts deleted file mode 100644 index 72577de..0000000 --- a/f/examples/rational_app.app/background_runnable_0.inline_script.ts +++ /dev/null @@ -1,5 +0,0 @@ -// import * as wmill from "windmill-client" - -export async function main(x: gmail) { - return x -} diff --git a/f/examples/rational_app.app/background_runnable_0.inline_script.lock b/f/examples/rational_app.app/inline_script_0.inline_script.lock similarity index 100% rename from f/examples/rational_app.app/background_runnable_0.inline_script.lock rename to f/examples/rational_app.app/inline_script_0.inline_script.lock diff --git a/f/examples/rational_app.app/inline_script_0.inline_script.ts b/f/examples/rational_app.app/inline_script_0.inline_script.ts new file mode 100644 index 0000000..c6f11a8 --- /dev/null +++ b/f/examples/rational_app.app/inline_script_0.inline_script.ts @@ -0,0 +1,18 @@ +type gmail = {} +export async function main(x: gmail) { + if (!x) { + return [] + } + return [ + { + "id": 1, + "name": "A cell with a long name", + "age": 42 + }, + { + "id": 2, + "name": "A briefer cell", + "age": 84 + } + ] +} \ No newline at end of file From 32d16679dbef4177f754178a0a7be88ee9ab00b2 Mon Sep 17 00:00:00 2001 From: ruben Date: Mon, 5 Aug 2024 18:51:06 +0000 Subject: [PATCH 4/5] [WM] App 'f/examples/rational_app' deployed --- f/examples/rational_app.app/app.yaml | 44 ++++++++++++++++++- .../inline_script_0.inline_script.ts | 2 +- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/f/examples/rational_app.app/app.yaml b/f/examples/rational_app.app/app.yaml index ea3171d..f1b8f94 100644 --- a/f/examples/rational_app.app/app.yaml +++ b/f/examples/rational_app.app/app.yaml @@ -318,6 +318,48 @@ value: container: class: '' style: '' + - '12': + fixed: false + fullHeight: false + h: 5 + w: 11 + x: 0 + y: 15 + '3': + fixed: false + fullHeight: false + h: 8 + w: 2 + x: 0 + y: 20 + id: f + data: + id: f + type: displaycomponent + actions: [] + componentInput: + type: evalv2 + value: + foo: 42 + connections: + - id: values + componentId: d + expr: d.values + fieldType: object + configuration: + hideDetails: + type: static + value: false + title: + type: static + value: Result + customCss: + container: + class: '' + style: '' + header: + class: '' + style: '' hiddenInlineScripts: [] hideLegacyTopBar: true norefreshbar: false @@ -411,7 +453,7 @@ value: policy: execution_mode: publisher triggerables_v2: - 'e:rawscript/0dba1db21e597c80cbd87a7a5bcdf68eff829fb1914fbc1063d0b2c4815d8491': + 'e:rawscript/20e7755028be225d6af904ada30500437341e061022716a495b4877fe1957028': allow_user_resources: - x one_of_inputs: {} diff --git a/f/examples/rational_app.app/inline_script_0.inline_script.ts b/f/examples/rational_app.app/inline_script_0.inline_script.ts index c6f11a8..ac7e813 100644 --- a/f/examples/rational_app.app/inline_script_0.inline_script.ts +++ b/f/examples/rational_app.app/inline_script_0.inline_script.ts @@ -1,6 +1,6 @@ type gmail = {} export async function main(x: gmail) { - if (!x) { + if (Object.keys(x ?? {}).length > 0) { return [] } return [ From 196545ed2d3cfd562838688bdbec448f32aaa136 Mon Sep 17 00:00:00 2001 From: ruben Date: Mon, 5 Aug 2024 18:52:23 +0000 Subject: [PATCH 5/5] [WM] App 'f/examples/rational_app' deployed --- f/examples/rational_app.app/app.yaml | 2 +- f/examples/rational_app.app/inline_script_0.inline_script.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/f/examples/rational_app.app/app.yaml b/f/examples/rational_app.app/app.yaml index f1b8f94..5712de6 100644 --- a/f/examples/rational_app.app/app.yaml +++ b/f/examples/rational_app.app/app.yaml @@ -453,7 +453,7 @@ value: policy: execution_mode: publisher triggerables_v2: - 'e:rawscript/20e7755028be225d6af904ada30500437341e061022716a495b4877fe1957028': + 'e:rawscript/094997a84ee8d057b046eb321df55cb1eec1427e95849872a8aeac616fc69ee2': allow_user_resources: - x one_of_inputs: {} diff --git a/f/examples/rational_app.app/inline_script_0.inline_script.ts b/f/examples/rational_app.app/inline_script_0.inline_script.ts index ac7e813..46166e0 100644 --- a/f/examples/rational_app.app/inline_script_0.inline_script.ts +++ b/f/examples/rational_app.app/inline_script_0.inline_script.ts @@ -1,6 +1,6 @@ type gmail = {} export async function main(x: gmail) { - if (Object.keys(x ?? {}).length > 0) { + if (Object.keys(x ?? {}).length == 0) { return [] } return [