From 41ecfb2abcaa53f9d2dd1151f38b87839a7817ef Mon Sep 17 00:00:00 2001 From: Yevhenii Moroziuk Date: Mon, 10 Jun 2024 13:43:37 +0300 Subject: [PATCH] HCK-6345: Min and Max Properties fields should only be available for types Map and Object (#49) * HCK-6345: Fix field level config * HCK-6345: fix typo in localization --- .gitignore | 3 +++ localization/en.json | 2 +- .../field_level/fieldLevelConfig.json | 22 +++++++++++++++++-- types/geography.json | 2 -- 4 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bf7460d --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +.vscode +.idea diff --git a/localization/en.json b/localization/en.json index e13d4c7..538f818 100644 --- a/localization/en.json +++ b/localization/en.json @@ -16,7 +16,7 @@ "TOOLBAR___ADD_ATTRIBUTE": "Add Column", "TOOLBAR___INSERT_FIELD": "Insert Column", "TOOLBAR___APPEND_FIELD": "Append Column", - "TOOLBAR___TOGGLE_FIELD_DETAILS": "Toogle field details", + "TOOLBAR___TOGGLE_FIELD_DETAILS": "Toggle field details", "TOOLBAR___SHOW_FOREIGN_MASTER": "Toggle foreign master", "TOOLBAR___SHOW_MODEL_VIEW": "Toggle model views", "TOOLBAR___DISTRIBUTE_ORTHOGONALLY": "Distribute tables orthogonally", diff --git a/properties_pane/field_level/fieldLevelConfig.json b/properties_pane/field_level/fieldLevelConfig.json index 0f28c6c..bae79a3 100644 --- a/properties_pane/field_level/fieldLevelConfig.json +++ b/properties_pane/field_level/fieldLevelConfig.json @@ -1055,8 +1055,26 @@ making sure that you maintain a proper JSON format. }, "description", "dependencies", - "minProperties", - "maxProperties", + { + "propertyName": "Max Properties", + "propertyKeyword": "maxProperties", + "propertyType": "numeric", + "valueType": "number", + "dependency": { + "key": "subtype", + "value": "object" + } + }, + { + "propertyName": "Min Properties", + "propertyKeyword": "minProperties", + "propertyType": "numeric", + "valueType": "number", + "dependency": { + "key": "subtype", + "value": "object" + } + }, "additionalProperties", "comments" ] diff --git a/types/geography.json b/types/geography.json index ca9a308..ae79abc 100644 --- a/types/geography.json +++ b/types/geography.json @@ -11,8 +11,6 @@ "foreignField": [], "properties": [], "dependencies": [], - "minProperties": "", - "maxProperties": "", "additionalProperties": false, "enum": [] }