Handle JSON viewer empty states (#10750)
- Display the number of descendants for object and array elements - Display an empty state for arrays and objects - Make the input and output visualizer scrollable horizontally - Prevent JSON visualizer's text to wrap ## Demo: input https://github.com/user-attachments/assets/d6bd6acf-a779-4fc7-a8b1-12b857cee7f9 Closes https://github.com/twentyhq/core-team-issues/issues/497
This commit is contained in:
committed by
GitHub
parent
dc55fac1d5
commit
dd26001372
@ -1218,6 +1218,14 @@ msgstr "Werknemers"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Leeg"
|
msgstr "Leeg"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "Eindpunt URL"
|
msgstr "Eindpunt URL"
|
||||||
|
|||||||
@ -1218,6 +1218,14 @@ msgstr "الموظفون"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "فارغ"
|
msgstr "فارغ"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "عنوان URL للواجهة النهائية"
|
msgstr "عنوان URL للواجهة النهائية"
|
||||||
|
|||||||
@ -1221,6 +1221,14 @@ msgstr "Empleats"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Buit"
|
msgstr "Buit"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "URL de l'endpoint"
|
msgstr "URL de l'endpoint"
|
||||||
|
|||||||
@ -1218,6 +1218,14 @@ msgstr "Zaměstnanci"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Prázdné"
|
msgstr "Prázdné"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "URL koncového bodu"
|
msgstr "URL koncového bodu"
|
||||||
|
|||||||
@ -1221,6 +1221,14 @@ msgstr "Medarbejdere"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Tom"
|
msgstr "Tom"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "Endpoint-URL"
|
msgstr "Endpoint-URL"
|
||||||
|
|||||||
@ -1221,6 +1221,14 @@ msgstr "Mitarbeiter"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Leer"
|
msgstr "Leer"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "Endpunkt-URL"
|
msgstr "Endpunkt-URL"
|
||||||
|
|||||||
@ -1221,6 +1221,14 @@ msgstr "Εργαζόμενοι"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Κενό"
|
msgstr "Κενό"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "URL τελικού σημείου"
|
msgstr "URL τελικού σημείου"
|
||||||
|
|||||||
@ -1216,6 +1216,14 @@ msgstr "Employees"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Empty"
|
msgstr "Empty"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr "Empty Array"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr "Empty Object"
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "Endpoint URL"
|
msgstr "Endpoint URL"
|
||||||
|
|||||||
@ -1221,6 +1221,14 @@ msgstr "Empleados"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Vacío"
|
msgstr "Vacío"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "URL del endpoint"
|
msgstr "URL del endpoint"
|
||||||
|
|||||||
@ -1218,6 +1218,14 @@ msgstr "Ty\\u00f6ntekij\\u00e4t"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Tyhj\\u00e4"
|
msgstr "Tyhj\\u00e4"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "P\\u00e4\\u00e4tetunnisteen URL"
|
msgstr "P\\u00e4\\u00e4tetunnisteen URL"
|
||||||
|
|||||||
@ -1218,6 +1218,14 @@ msgstr "Employés"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Vide"
|
msgstr "Vide"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "URL du point de terminaison"
|
msgstr "URL du point de terminaison"
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1218,6 +1218,14 @@ msgstr "עובדים"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "ריק"
|
msgstr "ריק"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "URL של נקודת קצה"
|
msgstr "URL של נקודת קצה"
|
||||||
|
|||||||
@ -1221,6 +1221,14 @@ msgstr "Alkalmazottak"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "\\u00dcres"
|
msgstr "\\u00dcres"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "V\\u00e9gpont URL"
|
msgstr "V\\u00e9gpont URL"
|
||||||
|
|||||||
@ -1218,6 +1218,14 @@ msgstr "Dipendenti"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Vuoto"
|
msgstr "Vuoto"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "URL endpoint"
|
msgstr "URL endpoint"
|
||||||
|
|||||||
@ -1218,6 +1218,14 @@ msgstr "従業員"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "空"
|
msgstr "空"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "エンドポイントURL"
|
msgstr "エンドポイントURL"
|
||||||
|
|||||||
@ -1218,6 +1218,14 @@ msgstr "직원"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "비어 있음"
|
msgstr "비어 있음"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "엔드포인트 URL"
|
msgstr "엔드포인트 URL"
|
||||||
|
|||||||
@ -1218,6 +1218,14 @@ msgstr "Werknemers"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Leeg"
|
msgstr "Leeg"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "Endpoint-URL"
|
msgstr "Endpoint-URL"
|
||||||
|
|||||||
@ -1221,6 +1221,14 @@ msgstr "Ansatte"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Tom"
|
msgstr "Tom"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "Endepunkts-URL"
|
msgstr "Endepunkts-URL"
|
||||||
|
|||||||
@ -1218,6 +1218,14 @@ msgstr "Pracownicy"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Puste"
|
msgstr "Puste"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "URL punktu końcowego"
|
msgstr "URL punktu końcowego"
|
||||||
|
|||||||
@ -1213,6 +1213,14 @@ msgstr ""
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
@ -1218,6 +1218,14 @@ msgstr "Funcionários"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Vazio"
|
msgstr "Vazio"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "URL do endpoint"
|
msgstr "URL do endpoint"
|
||||||
|
|||||||
@ -1221,6 +1221,14 @@ msgstr "Funcionários"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Vazio"
|
msgstr "Vazio"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "URL do Endpoint"
|
msgstr "URL do Endpoint"
|
||||||
|
|||||||
@ -1218,6 +1218,14 @@ msgstr "Angajați"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Gol"
|
msgstr "Gol"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "URL endpoint"
|
msgstr "URL endpoint"
|
||||||
|
|||||||
Binary file not shown.
@ -1218,6 +1218,14 @@ msgstr "Запослени"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Празно"
|
msgstr "Празно"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "Ендпоинт УРЛ"
|
msgstr "Ендпоинт УРЛ"
|
||||||
|
|||||||
@ -1218,6 +1218,14 @@ msgstr "Anställda"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Tom"
|
msgstr "Tom"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "Slutpunkts-URL"
|
msgstr "Slutpunkts-URL"
|
||||||
|
|||||||
@ -1218,6 +1218,14 @@ msgstr "Çalışanlar"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Boş"
|
msgstr "Boş"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "Uç Noktası URL"
|
msgstr "Uç Noktası URL"
|
||||||
|
|||||||
@ -1271,6 +1271,14 @@ msgstr ""
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Порожньо"
|
msgstr "Порожньо"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
@ -1221,6 +1221,14 @@ msgstr "Nhân viên"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "Trống"
|
msgstr "Trống"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "URL điểm cuối"
|
msgstr "URL điểm cuối"
|
||||||
|
|||||||
@ -1218,6 +1218,14 @@ msgstr "员工"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "空"
|
msgstr "空"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "端点 URL"
|
msgstr "端点 URL"
|
||||||
|
|||||||
@ -1218,6 +1218,14 @@ msgstr "員工"
|
|||||||
msgid "Empty"
|
msgid "Empty"
|
||||||
msgstr "空"
|
msgstr "空"
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonArrayNode.tsx
|
||||||
|
msgid "Empty Array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/modules/workflow/components/json-visualizer/components/JsonObjectNode.tsx
|
||||||
|
msgid "Empty Object"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
#: src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx
|
||||||
msgid "Endpoint URL"
|
msgid "Endpoint URL"
|
||||||
msgstr "端點 URL"
|
msgstr "端點 URL"
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import { useWorkflowRunIdOrThrow } from '@/workflow/hooks/useWorkflowRunIdOrThro
|
|||||||
import { WorkflowVersionComponentInstanceContext } from '@/workflow/states/context/WorkflowVersionComponentInstanceContext';
|
import { WorkflowVersionComponentInstanceContext } from '@/workflow/states/context/WorkflowVersionComponentInstanceContext';
|
||||||
import { useWorkflowSelectedNodeOrThrow } from '@/workflow/workflow-diagram/hooks/useWorkflowSelectedNodeOrThrow';
|
import { useWorkflowSelectedNodeOrThrow } from '@/workflow/workflow-diagram/hooks/useWorkflowSelectedNodeOrThrow';
|
||||||
import { WorkflowRunStepInputDetail } from '@/workflow/workflow-steps/components/WorkflowRunStepInputDetail';
|
import { WorkflowRunStepInputDetail } from '@/workflow/workflow-steps/components/WorkflowRunStepInputDetail';
|
||||||
|
import { WorkflowRunStepOutputDetail } from '@/workflow/workflow-steps/components/WorkflowRunStepOutputDetail';
|
||||||
import { WorkflowStepDetail } from '@/workflow/workflow-steps/components/WorkflowStepDetail';
|
import { WorkflowStepDetail } from '@/workflow/workflow-steps/components/WorkflowStepDetail';
|
||||||
import { WORKFLOW_RUN_STEP_SIDE_PANEL_TAB_LIST_COMPONENT_ID } from '@/workflow/workflow-steps/constants/WorkflowRunStepSidePanelTabListComponentId';
|
import { WORKFLOW_RUN_STEP_SIDE_PANEL_TAB_LIST_COMPONENT_ID } from '@/workflow/workflow-steps/constants/WorkflowRunStepSidePanelTabListComponentId';
|
||||||
import { getWorkflowRunStepExecutionStatus } from '@/workflow/workflow-steps/utils/getWorkflowRunStepExecutionStatus';
|
import { getWorkflowRunStepExecutionStatus } from '@/workflow/workflow-steps/utils/getWorkflowRunStepExecutionStatus';
|
||||||
@ -39,7 +40,7 @@ export const CommandMenuWorkflowRunViewStep = () => {
|
|||||||
})
|
})
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
const isInputTabDisabled =
|
const areInputAndOutputTabsDisabled =
|
||||||
workflowSelectedNode === TRIGGER_STEP_ID ||
|
workflowSelectedNode === TRIGGER_STEP_ID ||
|
||||||
stepExecutionStatus === 'running' ||
|
stepExecutionStatus === 'running' ||
|
||||||
stepExecutionStatus === 'not-executed';
|
stepExecutionStatus === 'not-executed';
|
||||||
@ -50,9 +51,14 @@ export const CommandMenuWorkflowRunViewStep = () => {
|
|||||||
id: 'input',
|
id: 'input',
|
||||||
title: 'Input',
|
title: 'Input',
|
||||||
Icon: IconLogin2,
|
Icon: IconLogin2,
|
||||||
disabled: isInputTabDisabled,
|
disabled: areInputAndOutputTabsDisabled,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'output',
|
||||||
|
title: 'Output',
|
||||||
|
Icon: IconLogout,
|
||||||
|
disabled: areInputAndOutputTabsDisabled,
|
||||||
},
|
},
|
||||||
{ id: 'output', title: 'Output', Icon: IconLogout },
|
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!isDefined(workflowRun)) {
|
if (!isDefined(workflowRun)) {
|
||||||
@ -83,6 +89,10 @@ export const CommandMenuWorkflowRunViewStep = () => {
|
|||||||
{activeTabId === 'input' ? (
|
{activeTabId === 'input' ? (
|
||||||
<WorkflowRunStepInputDetail stepId={workflowSelectedNode} />
|
<WorkflowRunStepInputDetail stepId={workflowSelectedNode} />
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
|
{activeTabId === 'output' ? (
|
||||||
|
<WorkflowRunStepOutputDetail stepId={workflowSelectedNode} />
|
||||||
|
) : null}
|
||||||
</WorkflowVersionComponentInstanceContext.Provider>
|
</WorkflowVersionComponentInstanceContext.Provider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,7 +6,6 @@ import {
|
|||||||
waitForElementToBeRemoved,
|
waitForElementToBeRemoved,
|
||||||
within,
|
within,
|
||||||
} from '@storybook/test';
|
} from '@storybook/test';
|
||||||
import { ComponentDecorator } from 'twenty-ui';
|
|
||||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||||
|
|
||||||
const meta: Meta<typeof JsonTree> = {
|
const meta: Meta<typeof JsonTree> = {
|
||||||
@ -14,7 +13,7 @@ const meta: Meta<typeof JsonTree> = {
|
|||||||
component: JsonTree,
|
component: JsonTree,
|
||||||
args: {},
|
args: {},
|
||||||
argTypes: {},
|
argTypes: {},
|
||||||
decorators: [ComponentDecorator, I18nFrontDecorator],
|
decorators: [I18nFrontDecorator],
|
||||||
};
|
};
|
||||||
|
|
||||||
export default meta;
|
export default meta;
|
||||||
@ -51,10 +50,47 @@ export const ArraySimple: Story = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const ArrayEmpty: Story = {
|
||||||
|
args: {
|
||||||
|
value: [],
|
||||||
|
},
|
||||||
|
play: async ({ canvasElement }) => {
|
||||||
|
const canvas = within(canvasElement);
|
||||||
|
|
||||||
|
const emptyState = await canvas.findByText('Empty Array');
|
||||||
|
|
||||||
|
expect(emptyState).toBeVisible();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
export const ArrayNested: Story = {
|
export const ArrayNested: Story = {
|
||||||
args: {
|
args: {
|
||||||
value: [1, 2, ['a', 'b', 'c'], 3],
|
value: [1, 2, ['a', 'b', 'c'], 3],
|
||||||
},
|
},
|
||||||
|
play: async ({ canvasElement }) => {
|
||||||
|
const canvas = within(canvasElement);
|
||||||
|
|
||||||
|
const nestedArrayElements = await canvas.findByText('[3]');
|
||||||
|
|
||||||
|
expect(nestedArrayElements).toBeVisible();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export const ArrayNestedEmpty: Story = {
|
||||||
|
args: {
|
||||||
|
value: [1, 2, [], 3],
|
||||||
|
},
|
||||||
|
play: async ({ canvasElement }) => {
|
||||||
|
const canvas = within(canvasElement);
|
||||||
|
|
||||||
|
const nestedArrayElements = await canvas.findByText('[0]');
|
||||||
|
|
||||||
|
expect(nestedArrayElements).toBeVisible();
|
||||||
|
|
||||||
|
const emptyState = await canvas.findByText('Empty Array');
|
||||||
|
|
||||||
|
expect(emptyState).toBeVisible();
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ArrayWithObjects: Story = {
|
export const ArrayWithObjects: Story = {
|
||||||
@ -70,6 +106,13 @@ export const ArrayWithObjects: Story = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
play: async ({ canvasElement }) => {
|
||||||
|
const canvas = within(canvasElement);
|
||||||
|
|
||||||
|
const nestedObjectItemsCounts = await canvas.findAllByText('{2}');
|
||||||
|
|
||||||
|
expect(nestedObjectItemsCounts).toHaveLength(2);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ObjectSimple: Story = {
|
export const ObjectSimple: Story = {
|
||||||
@ -81,6 +124,19 @@ export const ObjectSimple: Story = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const ObjectEmpty: Story = {
|
||||||
|
args: {
|
||||||
|
value: {},
|
||||||
|
},
|
||||||
|
play: async ({ canvasElement }) => {
|
||||||
|
const canvas = within(canvasElement);
|
||||||
|
|
||||||
|
const emptyState = await canvas.findByText('Empty Object');
|
||||||
|
|
||||||
|
expect(emptyState).toBeVisible();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
export const ObjectNested: Story = {
|
export const ObjectNested: Story = {
|
||||||
args: {
|
args: {
|
||||||
value: {
|
value: {
|
||||||
@ -94,6 +150,32 @@ export const ObjectNested: Story = {
|
|||||||
isActive: true,
|
isActive: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
play: async ({ canvasElement }) => {
|
||||||
|
const canvas = within(canvasElement);
|
||||||
|
|
||||||
|
const nestedObjectItemsCounts = await canvas.findAllByText('{2}');
|
||||||
|
|
||||||
|
expect(nestedObjectItemsCounts).toHaveLength(2);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export const ObjectNestedEmpty: Story = {
|
||||||
|
args: {
|
||||||
|
value: {
|
||||||
|
person: {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
play: async ({ canvasElement }) => {
|
||||||
|
const canvas = within(canvasElement);
|
||||||
|
|
||||||
|
const nestedObjectItemsCount = await canvas.findByText('{0}');
|
||||||
|
|
||||||
|
expect(nestedObjectItemsCount).toBeVisible();
|
||||||
|
|
||||||
|
const emptyState = await canvas.findByText('Empty Object');
|
||||||
|
|
||||||
|
expect(emptyState).toBeVisible();
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ObjectWithArray: Story = {
|
export const ObjectWithArray: Story = {
|
||||||
@ -187,3 +269,123 @@ export const ExpandingElementExpandsAllItsDescendants: Story = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const ReallyDeepNestedObject: Story = {
|
||||||
|
args: {
|
||||||
|
value: {
|
||||||
|
a: {
|
||||||
|
b: {
|
||||||
|
c: {
|
||||||
|
d: {
|
||||||
|
e: {
|
||||||
|
f: {
|
||||||
|
g: {
|
||||||
|
h: {
|
||||||
|
i: {
|
||||||
|
j: {
|
||||||
|
k: {
|
||||||
|
l: {
|
||||||
|
m: {
|
||||||
|
n: {
|
||||||
|
o: {
|
||||||
|
p: {
|
||||||
|
q: {
|
||||||
|
r: {
|
||||||
|
s: {
|
||||||
|
t: {
|
||||||
|
u: {
|
||||||
|
v: {
|
||||||
|
w: {
|
||||||
|
x: {
|
||||||
|
y: {
|
||||||
|
z: {
|
||||||
|
end: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
bis: {
|
||||||
|
c: {
|
||||||
|
d: {
|
||||||
|
e: {
|
||||||
|
f: {
|
||||||
|
g: {
|
||||||
|
h: {
|
||||||
|
i: {
|
||||||
|
j: {
|
||||||
|
k: {
|
||||||
|
l: {
|
||||||
|
m: {
|
||||||
|
n: {
|
||||||
|
o: {
|
||||||
|
p: {
|
||||||
|
q: {
|
||||||
|
r: {
|
||||||
|
s: {
|
||||||
|
t: {
|
||||||
|
u: {
|
||||||
|
v: {
|
||||||
|
w: {
|
||||||
|
x: {
|
||||||
|
y: {
|
||||||
|
z: {
|
||||||
|
end: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export const LongText: Story = {
|
||||||
|
args: {
|
||||||
|
value: {
|
||||||
|
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum iaculis est tincidunt, sagittis neque vitae, sodales purus.':
|
||||||
|
'Ut lobortis ultricies purus, sit amet porta eros. Suspendisse efficitur quam vitae diam imperdiet feugiat. Etiam vel bibendum elit.',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { JsonNestedNode } from '@/workflow/components/json-visualizer/components/JsonNestedNode';
|
import { JsonNestedNode } from '@/workflow/components/json-visualizer/components/JsonNestedNode';
|
||||||
|
import { useLingui } from '@lingui/react/macro';
|
||||||
import { IconBrackets } from 'twenty-ui';
|
import { IconBrackets } from 'twenty-ui';
|
||||||
import { JsonArray } from 'type-fest';
|
import { JsonArray } from 'type-fest';
|
||||||
|
|
||||||
@ -11,6 +12,8 @@ export const JsonArrayNode = ({
|
|||||||
value: JsonArray;
|
value: JsonArray;
|
||||||
depth: number;
|
depth: number;
|
||||||
}) => {
|
}) => {
|
||||||
|
const { t } = useLingui();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<JsonNestedNode
|
<JsonNestedNode
|
||||||
elements={[...value.entries()].map(([key, value]) => ({
|
elements={[...value.entries()].map(([key, value]) => ({
|
||||||
@ -18,9 +21,11 @@ export const JsonArrayNode = ({
|
|||||||
label: String(key),
|
label: String(key),
|
||||||
value,
|
value,
|
||||||
}))}
|
}))}
|
||||||
|
renderElementsCount={(count) => `[${count}]`}
|
||||||
label={label}
|
label={label}
|
||||||
Icon={IconBrackets}
|
Icon={IconBrackets}
|
||||||
depth={depth}
|
depth={depth}
|
||||||
|
emptyElementsText={t`Empty Array`}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -20,15 +20,27 @@ const StyledLabelContainer = styled.div`
|
|||||||
gap: ${({ theme }) => theme.spacing(2)};
|
gap: ${({ theme }) => theme.spacing(2)};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
const StyledElementsCount = styled.span`
|
||||||
|
color: ${({ theme }) => theme.font.color.tertiary};
|
||||||
|
`;
|
||||||
|
|
||||||
|
const StyledEmptyState = styled.div`
|
||||||
|
color: ${({ theme }) => theme.font.color.tertiary};
|
||||||
|
`;
|
||||||
|
|
||||||
export const JsonNestedNode = ({
|
export const JsonNestedNode = ({
|
||||||
label,
|
label,
|
||||||
Icon,
|
Icon,
|
||||||
elements,
|
elements,
|
||||||
|
renderElementsCount,
|
||||||
|
emptyElementsText,
|
||||||
depth,
|
depth,
|
||||||
}: {
|
}: {
|
||||||
label?: string;
|
label?: string;
|
||||||
Icon: IconComponent;
|
Icon: IconComponent;
|
||||||
elements: Array<{ id: string | number; label: string; value: JsonValue }>;
|
elements: Array<{ id: string | number; label: string; value: JsonValue }>;
|
||||||
|
renderElementsCount?: (count: number) => string;
|
||||||
|
emptyElementsText: string;
|
||||||
depth: number;
|
depth: number;
|
||||||
}) => {
|
}) => {
|
||||||
const hideRoot = !isDefined(label);
|
const hideRoot = !isDefined(label);
|
||||||
@ -37,9 +49,13 @@ export const JsonNestedNode = ({
|
|||||||
|
|
||||||
const renderedChildren = (
|
const renderedChildren = (
|
||||||
<JsonList depth={depth}>
|
<JsonList depth={depth}>
|
||||||
{elements.map(({ id, label, value }) => (
|
{elements.length === 0 ? (
|
||||||
<JsonNode key={id} label={label} value={value} depth={depth + 1} />
|
<StyledEmptyState>{emptyElementsText}</StyledEmptyState>
|
||||||
))}
|
) : (
|
||||||
|
elements.map(({ id, label, value }) => (
|
||||||
|
<JsonNode key={id} label={label} value={value} depth={depth + 1} />
|
||||||
|
))
|
||||||
|
)}
|
||||||
</JsonList>
|
</JsonList>
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -57,6 +73,12 @@ export const JsonNestedNode = ({
|
|||||||
<JsonArrow isOpen={isOpen} onClick={handleArrowClick} />
|
<JsonArrow isOpen={isOpen} onClick={handleArrowClick} />
|
||||||
|
|
||||||
<JsonNodeLabel label={label} Icon={Icon} />
|
<JsonNodeLabel label={label} Icon={Icon} />
|
||||||
|
|
||||||
|
{renderElementsCount && (
|
||||||
|
<StyledElementsCount>
|
||||||
|
{renderElementsCount(elements.length)}
|
||||||
|
</StyledElementsCount>
|
||||||
|
)}
|
||||||
</StyledLabelContainer>
|
</StyledLabelContainer>
|
||||||
|
|
||||||
{isOpen && renderedChildren}
|
{isOpen && renderedChildren}
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { JsonNestedNode } from '@/workflow/components/json-visualizer/components/JsonNestedNode';
|
import { JsonNestedNode } from '@/workflow/components/json-visualizer/components/JsonNestedNode';
|
||||||
|
import { useLingui } from '@lingui/react/macro';
|
||||||
import { IconCube } from 'twenty-ui';
|
import { IconCube } from 'twenty-ui';
|
||||||
import { JsonObject } from 'type-fest';
|
import { JsonObject } from 'type-fest';
|
||||||
|
|
||||||
@ -11,6 +12,8 @@ export const JsonObjectNode = ({
|
|||||||
value: JsonObject;
|
value: JsonObject;
|
||||||
depth: number;
|
depth: number;
|
||||||
}) => {
|
}) => {
|
||||||
|
const { t } = useLingui();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<JsonNestedNode
|
<JsonNestedNode
|
||||||
elements={Object.entries(value).map(([key, value]) => ({
|
elements={Object.entries(value).map(([key, value]) => ({
|
||||||
@ -18,9 +21,11 @@ export const JsonObjectNode = ({
|
|||||||
label: key,
|
label: key,
|
||||||
value,
|
value,
|
||||||
}))}
|
}))}
|
||||||
|
renderElementsCount={(count) => `{${count}}`}
|
||||||
label={label}
|
label={label}
|
||||||
Icon={IconCube}
|
Icon={IconCube}
|
||||||
depth={depth}
|
depth={depth}
|
||||||
|
emptyElementsText={t`Empty Object`}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -4,6 +4,7 @@ const StyledListItem = styled.li`
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
|
white-space: nowrap;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export { StyledListItem as JsonListItem };
|
export { StyledListItem as JsonListItem };
|
||||||
|
|||||||
@ -7,6 +7,8 @@ import { isDefined } from 'twenty-shared';
|
|||||||
import { IconBrackets } from 'twenty-ui';
|
import { IconBrackets } from 'twenty-ui';
|
||||||
|
|
||||||
const StyledContainer = styled.div`
|
const StyledContainer = styled.div`
|
||||||
|
display: grid;
|
||||||
|
overflow-x: auto;
|
||||||
padding-block: ${({ theme }) => theme.spacing(4)};
|
padding-block: ${({ theme }) => theme.spacing(4)};
|
||||||
padding-inline: ${({ theme }) => theme.spacing(3)};
|
padding-inline: ${({ theme }) => theme.spacing(3)};
|
||||||
`;
|
`;
|
||||||
@ -31,6 +33,10 @@ export const WorkflowRunStepInputDetail = ({ stepId }: { stepId: string }) => {
|
|||||||
stepId,
|
stepId,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (stepContext.length === 0) {
|
||||||
|
throw new Error('The input tab must be rendered with a non-empty context.');
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledContainer>
|
<StyledContainer>
|
||||||
<JsonNestedNode
|
<JsonNestedNode
|
||||||
@ -40,6 +46,7 @@ export const WorkflowRunStepInputDetail = ({ stepId }: { stepId: string }) => {
|
|||||||
value: context,
|
value: context,
|
||||||
}))}
|
}))}
|
||||||
Icon={IconBrackets}
|
Icon={IconBrackets}
|
||||||
|
emptyElementsText=""
|
||||||
depth={0}
|
depth={0}
|
||||||
/>
|
/>
|
||||||
</StyledContainer>
|
</StyledContainer>
|
||||||
|
|||||||
@ -5,6 +5,8 @@ import styled from '@emotion/styled';
|
|||||||
import { isDefined } from 'twenty-shared';
|
import { isDefined } from 'twenty-shared';
|
||||||
|
|
||||||
const StyledContainer = styled.div`
|
const StyledContainer = styled.div`
|
||||||
|
display: grid;
|
||||||
|
overflow-x: auto;
|
||||||
padding-block: ${({ theme }) => theme.spacing(4)};
|
padding-block: ${({ theme }) => theme.spacing(4)};
|
||||||
padding-inline: ${({ theme }) => theme.spacing(3)};
|
padding-inline: ${({ theme }) => theme.spacing(3)};
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user