From 03b02e7c4a572787a60890e659ec1a7fe74db549 Mon Sep 17 00:00:00 2001 From: yevhenii-moroziuk Date: Tue, 4 Mar 2025 14:12:33 +0200 Subject: [PATCH 1/3] HCK-10243: Update the config to render * when the value is marked an not nullable --- central_pane/style.json | 71 +++++++++++++------ .../field_level/fieldLevelConfig.json | 9 +++ 2 files changed, 57 insertions(+), 23 deletions(-) diff --git a/central_pane/style.json b/central_pane/style.json index fa2c2bb..66b7819 100644 --- a/central_pane/style.json +++ b/central_pane/style.json @@ -1,30 +1,55 @@ -/** - * This config changes a visual appearance of entities in the application. { "field": { - "dtd": [{ - // supported css styles - "value": { - "border-style": "dashed", - "background": "#fff", - "color": "#333", - "font-style": "normal", - "font-weight": "normal", - "border-color": "#777", - "border-width": "1px" - }, - "dependency": - }], - // this property adds new columns or changes an order of current columns in the ERD box "erd": [ - "keys", "type", "indexes", { - "value": }>, - "dependency": , - "width": + "keys", + "type", + { + "value": "#", + "title": "Pattern field", + "dependency": { + "key": "isPatternField", + "value": true + }, + "width": 20 + }, + { + "value": " *", + "dependency": { + "type": "or", + "values": [ + { + "key": "required", + "value": true + }, + { + "type": "or", + "values": [ + { + "key": "nullable", + "value": false + }, + { + "type": "and", + "values": [ + { + "value": "collectionReference", + "key": "refType" + }, + { + "key": "nullable", + "exists": false + } + ] + } + ] + } + ] + }, + "override": { + "value": "*" + }, + "width": 20 } ] } } - */ - -{} diff --git a/properties_pane/field_level/fieldLevelConfig.json b/properties_pane/field_level/fieldLevelConfig.json index 9d734f6..6f2b39a 100644 --- a/properties_pane/field_level/fieldLevelConfig.json +++ b/properties_pane/field_level/fieldLevelConfig.json @@ -909,6 +909,15 @@ making sure that you maintain a proper JSON format. "dependency": { "type": "and", "values": [ + { + "type": "or", + "values": [ + { + "key": "nullable", + "value": true + } + ] + }, { "type": "or", "values": [ From 8dab16c0c3ba8f5a0b28f2569ecbe4645d546cb3 Mon Sep 17 00:00:00 2001 From: yevhenii-moroziuk Date: Tue, 4 Mar 2025 16:39:56 +0200 Subject: [PATCH 2/3] HCK-10243: Remove redundant white space --- central_pane/style.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/central_pane/style.json b/central_pane/style.json index 66b7819..fbfaab0 100644 --- a/central_pane/style.json +++ b/central_pane/style.json @@ -13,7 +13,7 @@ "width": 20 }, { - "value": " *", + "value": "*", "dependency": { "type": "or", "values": [ From 23fd01649e5537c298d381fc971a112d89e31949 Mon Sep 17 00:00:00 2001 From: yevhenii-moroziuk Date: Wed, 5 Mar 2025 11:20:56 +0200 Subject: [PATCH 3/3] HCK-10243: restore example --- central_pane/style.json | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/central_pane/style.json b/central_pane/style.json index fbfaab0..ecb91e4 100644 --- a/central_pane/style.json +++ b/central_pane/style.json @@ -1,3 +1,32 @@ +/** + * This config changes a visual appearance of entities in the application. +{ + "field": { + "dtd": [{ + // supported css styles + "value": { + "border-style": "dashed", + "background": "#fff", + "color": "#333", + "font-style": "normal", + "font-weight": "normal", + "border-color": "#777", + "border-width": "1px" + }, + "dependency": + }], + // this property adds new columns or changes an order of current columns in the ERD box + "erd": [ + "keys", "type", "indexes", { + "value": }>, + "dependency": , + "width": + } + ] + } +} + */ + { "field": { "erd": [