From adfb39d75374fcb479b564f23b501d4ed87fd31a Mon Sep 17 00:00:00 2001 From: sulmo Date: Mon, 16 Dec 2024 17:32:01 +0900 Subject: [PATCH 1/3] docs: update dynamic layout documentation - Corrected the table entry for `fields` to reflect accurate options - Added detailed explanation and example for item type using `p-definition-table` component Signed-off-by: sulmo --- .../dynamic/dynamic-layout/PDynamicLayout.mdx | 4 ++-- .../dynamic/dynamic-layout/templates/item/item.mdx | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/mirinae/src/data-display/dynamic/dynamic-layout/PDynamicLayout.mdx b/packages/mirinae/src/data-display/dynamic/dynamic-layout/PDynamicLayout.mdx index 126f880dab..600a0dd625 100644 --- a/packages/mirinae/src/data-display/dynamic/dynamic-layout/PDynamicLayout.mdx +++ b/packages/mirinae/src/data-display/dynamic/dynamic-layout/PDynamicLayout.mdx @@ -56,7 +56,7 @@ So, `options` is fixed, and `type-options` can be changed by the user's behavior |----------------|------|--------------|-------|-----------|--------------------|-----|----------|------|-------|------| | root_path | O | O | O | O | O | O | O | O | O | O | | translation_id | O | O | O | O | O | O | O | O | O | O | -| fields | X | O | O | X | O | X | X | X | X | X | +| fields | O | O | O | X | O | X | X | X | X | X | | markdown | X | X | X | X | X | X | O | X | X | X | | layouts | X | X | X | X | X | X | X | X | X | O | | search | X | X | X | X | O | X | X | X | X | X | @@ -246,4 +246,4 @@ interface DynamicLayoutEventListeners {
-
\ No newline at end of file +
diff --git a/packages/mirinae/src/data-display/dynamic/dynamic-layout/templates/item/item.mdx b/packages/mirinae/src/data-display/dynamic/dynamic-layout/templates/item/item.mdx index 7d3494dd28..63deb746b5 100644 --- a/packages/mirinae/src/data-display/dynamic/dynamic-layout/templates/item/item.mdx +++ b/packages/mirinae/src/data-display/dynamic/dynamic-layout/templates/item/item.mdx @@ -7,6 +7,19 @@ import * as itemStories from './item.stories'; # Item Type + This is an item type implemented with the `p-definition-table` component. The layout is dynamically generated according to the `options.fields` defined in the schema. For the options of `options.fields`, please refer to the `Dynamic Field` component. + +If `options.fields` is not provided, the layout is generated as a key-value pair of 1 depth by default. Therefore, it can be used when the data is in the following code. + +```json +{ + "key1": "value1", + "key2": "value2", + "key3": "value3" +} +``` + +

From ea582e9cddfe7c8a764c9146d034df11b2d5d5ab Mon Sep 17 00:00:00 2001 From: sulmo Date: Tue, 17 Dec 2024 21:03:32 +0900 Subject: [PATCH 2/3] refactor: update to setup script Signed-off-by: sulmo --- .../dynamic-layout/templates/item/index.vue | 216 ++++++++---------- .../dynamic/dynamic-layout/type/index.ts | 12 +- 2 files changed, 104 insertions(+), 124 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 5c7ab878fb..8753c151c7 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 @@ -1,15 +1,105 @@ +