From cd16a9e3212c29036df7ffef495c6cc1fb8480bf Mon Sep 17 00:00:00 2001 From: Eirik Ola Aksnes Date: Tue, 10 Oct 2023 18:36:34 +0200 Subject: [PATCH] refactor: simply recipe by skipping view creator --- .../readOnlyPrimitives.recipe.json | 50 ++++++------------- .../plugins/form/simple/simple.recipe.json | 24 ++------- 2 files changed, 18 insertions(+), 56 deletions(-) diff --git a/example/app/data/DemoDataSource/recipes/plugins/form/read_only_primitives/readOnlyPrimitives.recipe.json b/example/app/data/DemoDataSource/recipes/plugins/form/read_only_primitives/readOnlyPrimitives.recipe.json index 6737ee846..54acf5ce7 100644 --- a/example/app/data/DemoDataSource/recipes/plugins/form/read_only_primitives/readOnlyPrimitives.recipe.json +++ b/example/app/data/DemoDataSource/recipes/plugins/form/read_only_primitives/readOnlyPrimitives.recipe.json @@ -2,42 +2,22 @@ "type": "CORE:RecipeLink", "_blueprintPath_": "/plugins/form/read_only_primitives/blueprints/ReadOnlyPrimitives", "initialUiRecipe": { - "name": "ViewSelector", + "name": "ReadOnly", "type": "CORE:UiRecipe", - "plugin": "@development-framework/dm-core-plugins/view_selector/tabs", + "plugin": "@development-framework/dm-core-plugins/form", + "category": "edit", "config": { - "type": "PLUGINS:dm-core-plugins/view_selector/ViewSelectorConfig", - "childTabsOnRender": true, - "items": [ - { - "type": "PLUGINS:dm-core-plugins/view_selector/ViewSelectorItem", - "viewConfig": { - "type": "CORE:ReferenceViewConfig", - "recipe": "ReadOnly" - } - } - ] + "type": "PLUGINS:dm-core-plugins/form/FormInput", + "fields": [ + "stringRequired", + "stringOptional", + "numberRequired", + "numberOptional", + "integer", + "checkboxOptional", + "checkboxRequired" + ], + "readOnly": true } - }, - "uiRecipes": [ - { - "name": "ReadOnly", - "type": "CORE:UiRecipe", - "plugin": "@development-framework/dm-core-plugins/form", - "category": "edit", - "config": { - "type": "PLUGINS:dm-core-plugins/form/FormInput", - "fields": [ - "stringRequired", - "stringOptional", - "numberRequired", - "numberOptional", - "integer", - "checkboxOptional", - "checkboxRequired" - ], - "readOnly": true - } - } - ] + } } diff --git a/example/app/data/DemoDataSource/recipes/plugins/form/simple/simple.recipe.json b/example/app/data/DemoDataSource/recipes/plugins/form/simple/simple.recipe.json index d667262ea..2ef195c0a 100644 --- a/example/app/data/DemoDataSource/recipes/plugins/form/simple/simple.recipe.json +++ b/example/app/data/DemoDataSource/recipes/plugins/form/simple/simple.recipe.json @@ -2,27 +2,9 @@ "type": "CORE:RecipeLink", "_blueprintPath_": "/plugins/form/simple/blueprints/Simple", "initialUiRecipe": { - "name": "ViewSelector", + "name": "Edit", "type": "CORE:UiRecipe", - "plugin": "@development-framework/dm-core-plugins/view_selector/tabs", - "config": { - "type": "PLUGINS:dm-core-plugins/view_selector/ViewSelectorConfig", - "childTabsOnRender": true, - "items": [ - { - "type": "PLUGINS:dm-core-plugins/view_selector/ViewSelectorItem", - "viewConfig": { - "type": "CORE:InlineRecipeViewConfig", - "recipe": { - "name": "Edit", - "type": "CORE:UiRecipe", - "description": "Default edit", - "plugin": "@development-framework/dm-core-plugins/form" - }, - "scope": "self" - } - } - ] - } + "description": "Default edit", + "plugin": "@development-framework/dm-core-plugins/form" } }