From a69a42aade32a6c9bab2ceafdaa9edc79e6e0c19 Mon Sep 17 00:00:00 2001 From: Steffen Lorang Ekeberg Date: Wed, 13 Jul 2022 09:19:46 +0200 Subject: [PATCH] feat: group panel schema (#105) Co-authored-by: EKEBERG Steffen --- schemas/json/layout/layout.schema.v1.json | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/schemas/json/layout/layout.schema.v1.json b/schemas/json/layout/layout.schema.v1.json index 58b1aae791..e708dadb56 100644 --- a/schemas/json/layout/layout.schema.v1.json +++ b/schemas/json/layout/layout.schema.v1.json @@ -338,6 +338,11 @@ "description": "Alternatives for edit view of repeating group", "$ref": "#/definitions/groupEditOptions" }, + "panel": { + "title": "Panel", + "description": "Alternatives for panel view of repeating group", + "$ref": "#/definitions/groupPanelOptions" + }, "maxCount": { "type": "integer", "title": "Maximum count", @@ -394,6 +399,41 @@ } } }, + "groupPanelOptions": { + "additionalProperties": false, + "properties": { + "variant": { + "title": "Variant", + "description": "Variant of the panel", + "type": "string", + "enum": ["info", "success", "warning"] + }, + "iconUrl": { + "title": "Icon url", + "description": "Url of the icon to be shown in panel. Can be relative if hosted by app or full if referencing a cdn or other hosting.", + "type": "string", + "examples": ["fancyIcon.svg", "https://cdn.example.com/fancyIcon.svg"] + }, + "iconAlt": { + "title": "Icon alt", + "description": "Alternative text for the icon. Only applicable if iconUrl is provided. Can be plain text or a text resource reference.", + "type": "string" + }, + "groupReference": { + "title": "Group reference", + "description": "Reference to the group that is being displayed in the panel. Used for referencing another repeating group context.", + "type": "object", + "properties": { + "group" : { + "type": "string", + "title": "Group", + "description": "Group reference. Can be either the group id or the group data model binding.", + "examples": ["the-group-id", "some.model.theGroup"] + } + } + } + } + }, "groupFilterItem": { "properties": { "key": {