From 73f8de84801e77dc251660b153b4430b783c03d8 Mon Sep 17 00:00:00 2001 From: clysss <55925546+clysss@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:37:20 +0200 Subject: [PATCH 1/6] Update uischema.json --- src/uischema.json | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) diff --git a/src/uischema.json b/src/uischema.json index 9e57a63..b6e13e6 100644 --- a/src/uischema.json +++ b/src/uischema.json @@ -1,55 +1,9 @@ { "type": "VerticalLayout", "elements": [ - { - "type": "Control", - "label": "Completed", - "scope": "#/properties/done" - }, { "type": "Control", "scope": "#/properties/name" - }, - { - "type": "HorizontalLayout", - "elements": [ - { - "type": "Control", - "scope": "#/properties/due_date" - }, - { - "type": "Control", - "scope": "#/properties/rating" - } - ] - }, - { - "type": "HorizontalLayout", - "elements": [ - { - "type": "Control", - "scope": "#/properties/recurrence" - }, - { - "type": "Control", - "scope": "#/properties/recurrence_interval", - "rule": { - "effect": "HIDE", - "condition": { - "type": "LEAF", - "scope": "#/properties/recurrence", - "expectedValue": "Never" - } - } - } - ] - }, - { - "type": "Control", - "scope": "#/properties/description", - "options": { - "multi": true - } } ] } From 7cd4ea1e3b4c816d99caee64c1f8f042f77b633e Mon Sep 17 00:00:00 2001 From: clysss <55925546+clysss@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:37:45 +0200 Subject: [PATCH 2/6] Update schema.json --- src/schema.json | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/schema.json b/src/schema.json index 68c5e37..01ebd5b 100644 --- a/src/schema.json +++ b/src/schema.json @@ -4,29 +4,6 @@ "name": { "type": "string", "minLength": 1 - }, - "description": { - "title": "Long Description", - "type": "string" - }, - "done": { - "type": "boolean" - }, - "due_date": { - "type": "string", - "format": "date" - }, - "rating": { - "type": "integer", - "maximum": 5 - }, - "recurrence": { - "type": "string", - "enum": ["Never", "Daily", "Weekly", "Monthly"] - }, - "recurrence_interval": { - "type": "integer" - } }, "required": ["name", "due_date"] } From 85b28d7260ce904456ed37301b08f910a32e6eed Mon Sep 17 00:00:00 2001 From: clysss <55925546+clysss@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:49:42 +0200 Subject: [PATCH 3/6] Update schema.json --- src/schema.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/schema.json b/src/schema.json index 01ebd5b..37a27d9 100644 --- a/src/schema.json +++ b/src/schema.json @@ -4,6 +4,7 @@ "name": { "type": "string", "minLength": 1 + } }, "required": ["name", "due_date"] } From 6fc957424db24910e6901db99e3cc55b3fc5ad89 Mon Sep 17 00:00:00 2001 From: clysss <55925546+clysss@users.noreply.github.com> Date: Tue, 11 Jun 2024 14:06:32 +0200 Subject: [PATCH 4/6] Update JsonFormsDemo.tsx --- src/components/JsonFormsDemo.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/components/JsonFormsDemo.tsx b/src/components/JsonFormsDemo.tsx index a8c8d7f..df45ef9 100644 --- a/src/components/JsonFormsDemo.tsx +++ b/src/components/JsonFormsDemo.tsx @@ -7,8 +7,8 @@ import { materialCells, materialRenderers, } from '@jsonforms/material-renderers'; -import RatingControl from './RatingControl'; -import ratingControlTester from '../ratingControlTester'; +//import RatingControl from './RatingControl'; +//import ratingControlTester from '../ratingControlTester'; import schema from '../schema.json'; import uischema from '../uischema.json'; @@ -41,16 +41,12 @@ const classes = { const initialData = { name: 'Send email to Adrian', description: 'Confirm if you have passed the subject\nHereby ...', - done: true, - recurrence: 'Daily', - rating: 3, }; const renderers = [ ...materialRenderers, //register custom renderers - { tester: ratingControlTester, renderer: RatingControl }, -]; + ]; export const JsonFormsDemo: FC = () => { const [data, setData] = useState(initialData); From 0df1c39807c14a597ac0990059ac9910137ae0da Mon Sep 17 00:00:00 2001 From: clysss <55925546+clysss@users.noreply.github.com> Date: Tue, 11 Jun 2024 14:16:12 +0200 Subject: [PATCH 5/6] Update JsonFormsDemo.tsx --- src/components/JsonFormsDemo.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/JsonFormsDemo.tsx b/src/components/JsonFormsDemo.tsx index df45ef9..2ba5f66 100644 --- a/src/components/JsonFormsDemo.tsx +++ b/src/components/JsonFormsDemo.tsx @@ -44,7 +44,7 @@ const initialData = { }; const renderers = [ - ...materialRenderers, + ...materialRenderers //register custom renderers ]; From b62db49f2cf830bcfa06d15a013c02cabd01f216 Mon Sep 17 00:00:00 2001 From: clysss <55925546+clysss@users.noreply.github.com> Date: Tue, 11 Jun 2024 14:22:47 +0200 Subject: [PATCH 6/6] Update JsonFormsDemo.tsx --- src/components/JsonFormsDemo.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/JsonFormsDemo.tsx b/src/components/JsonFormsDemo.tsx index 2ba5f66..df45ef9 100644 --- a/src/components/JsonFormsDemo.tsx +++ b/src/components/JsonFormsDemo.tsx @@ -44,7 +44,7 @@ const initialData = { }; const renderers = [ - ...materialRenderers + ...materialRenderers, //register custom renderers ];