From b33e679c8c5533bf5a9eb2b375351df385d6766d Mon Sep 17 00:00:00 2001 From: TJ Date: Tue, 22 Sep 2020 07:39:12 -1000 Subject: [PATCH 1/5] feat: Adds fieldSets to FormUIOptions --- schemas/ui/v1.0/ui.schema | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/schemas/ui/v1.0/ui.schema b/schemas/ui/v1.0/ui.schema index eb8d4b67a4..b0110d83b7 100644 --- a/schemas/ui/v1.0/ui.schema +++ b/schemas/ui/v1.0/ui.schema @@ -50,6 +50,37 @@ "type": "string" } }, + "fieldSets": { + "title": "Field sets", + "description": "An array of field sets.", + "type": "array", + "items": { + "title": "Field set", + "description": "Groups fields into collapsible sections in the UI.", + "type": "object", + "properties": { + "title": { + "title": "Title", + "description": "Field set title", + "type": "string" + }, + "fields": { + "title": "Fields", + "description": "Array of property names", + "type": "array", + "items": { + "type": "string" + } + }, + "defaultExpanded": { + "title": "Default expanded", + "description": "Default expanded state for the field set.", + "type": "boolean", + "default": false + } + } + } + }, "label": { "title": "Label", "description": "Label override. Can either be a string or false to hide the label.", From 6e4e226ff618432ff7368fd22c9df52dcdc26947 Mon Sep 17 00:00:00 2001 From: TJ Date: Tue, 22 Sep 2020 07:51:11 -1000 Subject: [PATCH 2/5] updated property name --- schemas/ui/v1.0/ui.schema | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/ui/v1.0/ui.schema b/schemas/ui/v1.0/ui.schema index b0110d83b7..0b187961b1 100644 --- a/schemas/ui/v1.0/ui.schema +++ b/schemas/ui/v1.0/ui.schema @@ -50,7 +50,7 @@ "type": "string" } }, - "fieldSets": { + "fieldsets": { "title": "Field sets", "description": "An array of field sets.", "type": "array", From 1bd31a4a9c8ba19da56528bfb29c1e5baaf6a75d Mon Sep 17 00:00:00 2001 From: TJ Date: Tue, 22 Sep 2020 07:52:41 -1000 Subject: [PATCH 3/5] updated punctuation --- schemas/ui/v1.0/ui.schema | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schemas/ui/v1.0/ui.schema b/schemas/ui/v1.0/ui.schema index 0b187961b1..74f7e07f7b 100644 --- a/schemas/ui/v1.0/ui.schema +++ b/schemas/ui/v1.0/ui.schema @@ -61,12 +61,12 @@ "properties": { "title": { "title": "Title", - "description": "Field set title", + "description": "Field set title.", "type": "string" }, "fields": { "title": "Fields", - "description": "Array of property names", + "description": "Array of property names.", "type": "array", "items": { "type": "string" From 492a4fec4080e6a7fab54aff608731d29ede6715 Mon Sep 17 00:00:00 2001 From: TJ Date: Tue, 29 Sep 2020 17:25:47 -1000 Subject: [PATCH 4/5] added pivotFieldsets to schema --- schemas/ui/v1.0/ui.schema | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/schemas/ui/v1.0/ui.schema b/schemas/ui/v1.0/ui.schema index 74f7e07f7b..24548b02eb 100644 --- a/schemas/ui/v1.0/ui.schema +++ b/schemas/ui/v1.0/ui.schema @@ -51,7 +51,7 @@ } }, "fieldsets": { - "title": "Field sets", + "title": "Field Sets", "description": "An array of field sets.", "type": "array", "items": { @@ -102,6 +102,11 @@ }, "examples": [["*"]] }, + "pivotFieldsets": { + "title": "Pivot Field Sets", + "description": "If 'pivotFieldsets' is set to true, the field sets render in a tabbed view.", + "type": "boolean" + }, "placeholder": { "title": "Placeholder", "description": "Placeholder override. Default is `examples` property in the schema.", From 2e7b7545a40091808ac0c1d90229d48460c89455 Mon Sep 17 00:00:00 2001 From: TJ Date: Wed, 14 Oct 2020 11:18:48 -1000 Subject: [PATCH 5/5] added nested fieldsets --- schemas/ui/v1.0/ui.schema | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/schemas/ui/v1.0/ui.schema b/schemas/ui/v1.0/ui.schema index 8dc45b7014..cea3a276fc 100644 --- a/schemas/ui/v1.0/ui.schema +++ b/schemas/ui/v1.0/ui.schema @@ -69,7 +69,34 @@ "description": "Array of property names.", "type": "array", "items": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "properties": { + "title": { + "title": "Title", + "description": "Field set title.", + "type": "string" + }, + "fields": { + "title": "Fields", + "description": "Array of property names.", + "type": "array", + "items": { + "type": "string" + } + }, + "defaultExpanded": { + "title": "Default expanded", + "description": "Default expanded state for the field set.", + "type": "boolean", + "default": false + } + } + } + ] } }, "defaultExpanded": {