From f33d74a7d0e9961ff3982d452a89b835b55e3e51 Mon Sep 17 00:00:00 2001 From: sulmo <50662170+sulmoJ@users.noreply.github.com> Date: Thu, 25 Apr 2024 13:39:35 +0900 Subject: [PATCH] feat(mirinae): add boolean type to jsonSchemaForm (#3608) * fix(mirinae): fix build error Signed-off-by: sulmo * feat(mirinae): add boolean type to jsonSchemaForm Signed-off-by: sulmo * fix: fix badge setting of text input Signed-off-by: sulmo --------- Signed-off-by: sulmo --- .../dynamic/dynamic-layout/templates/item/index.vue | 2 +- .../forms/json-schema-form/PJsonSchemaForm.stories.mdx | 5 +++-- .../inputs/forms/json-schema-form/PJsonSchemaForm.vue | 9 +++++++++ .../json-schema-form/helpers/form-data-refine-helper.ts | 1 + .../json-schema-form/helpers/inner-schema-helper.ts | 1 + .../mirinae/src/inputs/forms/json-schema-form/mock.ts | 7 ++++++- .../mirinae/src/inputs/forms/json-schema-form/type.ts | 2 +- .../mirinae/src/inputs/input/text-input/PTextInput.vue | 3 ++- 8 files changed, 24 insertions(+), 6 deletions(-) diff --git a/packages/mirinae/src/data-display/dynamic/dynamic-layout/templates/item/index.vue b/packages/mirinae/src/data-display/dynamic/dynamic-layout/templates/item/index.vue index d82f99460c..e83dae9486 100644 --- a/packages/mirinae/src/data-display/dynamic/dynamic-layout/templates/item/index.vue +++ b/packages/mirinae/src/data-display/dynamic/dynamic-layout/templates/item/index.vue @@ -7,7 +7,7 @@ diff --git a/packages/mirinae/src/inputs/forms/json-schema-form/PJsonSchemaForm.stories.mdx b/packages/mirinae/src/inputs/forms/json-schema-form/PJsonSchemaForm.stories.mdx index 6745115d3b..8be6611c81 100644 --- a/packages/mirinae/src/inputs/forms/json-schema-form/PJsonSchemaForm.stories.mdx +++ b/packages/mirinae/src/inputs/forms/json-schema-form/PJsonSchemaForm.stories.mdx @@ -101,8 +101,9 @@ It internally uses [Ajv JSON schema validator](https://ajv.js.org/) and [ajv-for |string|ajv|[Text Input](?path=/docs/inputs-input--basic)| |number|ajv|[Text Input](?path=/docs/inputs-input--basic)| |integer|ajv|[Text Input](?path=/docs/inputs-input--basic)| -|array|ajv|[Text Input](?path=/docs/inputs-input--basic) or [Filterable Dropdown](?path=/docs/inputs-dropdown-select-dropdown--basic)(with enum keyword)|| -|object|self| Json Schema Form || +|array|ajv|[Text Input](?path=/docs/inputs-input--basic) or [Filterable Dropdown](?path=/docs/inputs-dropdown-select-dropdown--basic)(with enum keyword)| +|boolean|ajv|[Toggle](?path=/docs/inputs-buttons-toggle-button--toggle-button-basic)| +|object|self| Json Schema Form | ### Formats **string type only** diff --git a/packages/mirinae/src/inputs/forms/json-schema-form/PJsonSchemaForm.vue b/packages/mirinae/src/inputs/forms/json-schema-form/PJsonSchemaForm.vue index 1dc8ed8750..651889af9c 100644 --- a/packages/mirinae/src/inputs/forms/json-schema-form/PJsonSchemaForm.vue +++ b/packages/mirinae/src/inputs/forms/json-schema-form/PJsonSchemaForm.vue @@ -117,6 +117,13 @@ /> +