Skip to content

Commit

Permalink
HCK-6361: Min and Max Properties fields should only be available for …
Browse files Browse the repository at this point in the history
…types Map and Object (#105)

* HCK-6361: fix field level config

* HCK-6361: fix typo in localization

* HCK-6361: handle jsonArray case
  • Loading branch information
Nightlngale authored Jun 10, 2024
1 parent 5ae9d93 commit c98f78f
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 3 deletions.
2 changes: 1 addition & 1 deletion localization/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
22 changes: 22 additions & 0 deletions polyglot/adapter.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,27 @@
}
}
]
},
"postConvert": {
"modify": {
"field": [
{
"from": {
"type": "jsonObject"
},
"to": {
"subtype": "object"
}
},
{
"from": {
"type": "jsonArray"
},
"to": {
"subtype": "array"
}
}
]
}
}
}
18 changes: 18 additions & 0 deletions properties_pane/field_level/fieldLevelConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5425,6 +5425,24 @@ making sure that you maintain a proper JSON format.
"propertyType": "details",
"template": "textarea"
},
{
"propertyName": "Min Properties",
"propertyKeyword": "minProperties",
"propertyType": "numeric",
"dependency": {
"key": "subtype",
"value": "object"
}
},
{
"propertyName": "Max Properties",
"propertyKeyword": "maxProperties",
"propertyType": "numeric",
"dependency": {
"key": "subtype",
"value": "object"
}
},
{
"propertyName": "Array type",
"propertyType": "group",
Expand Down
2 changes: 0 additions & 2 deletions types/geometry.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
"foreignCollection": "",
"foreignField": [],
"dependencies": [],
"minProperties": "",
"maxProperties": "",
"additionalProperties": false,
"enum": []
},
Expand Down

0 comments on commit c98f78f

Please sign in to comment.