@ea-lab/reactive-json-docs 0.7.0 → 1.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/package.json +7 -5
  2. package/public/rjbuild/docs/advanced-concepts/data-processors.md +2 -2
  3. package/public/rjbuild/docs/advanced-concepts/plugins/component-development-guide-llm.md +14 -14
  4. package/public/rjbuild/docs/advanced-concepts/plugins/plugin-system.md +47 -1
  5. package/public/rjbuild/docs/advanced-concepts/plugins/plugin-system.yaml +53 -1
  6. package/public/rjbuild/docs/core/action/HashChangeListener.md +1 -1
  7. package/public/rjbuild/docs/core/action/HashChangeListener.yaml +24 -6
  8. package/public/rjbuild/docs/core/action/Hide.md +2 -2
  9. package/public/rjbuild/docs/core/action/Hide.yaml +4 -3
  10. package/public/rjbuild/docs/core/action/MessageListener.md +4 -4
  11. package/public/rjbuild/docs/core/action/MessageListener.yaml +18 -6
  12. package/public/rjbuild/docs/core/action/ReactOnEvent.md +4 -4
  13. package/public/rjbuild/docs/core/action/ReactOnEvent.yaml +4 -4
  14. package/public/rjbuild/docs/core/action/Redirect.md +2 -2
  15. package/public/rjbuild/docs/core/action/Redirect.yaml +8 -2
  16. package/public/rjbuild/docs/core/action/VisuallyHide.md +2 -2
  17. package/public/rjbuild/docs/core/action/VisuallyHide.yaml +2 -2
  18. package/public/rjbuild/docs/core/dataMapping/simpleMapping.md +5 -5
  19. package/public/rjbuild/docs/core/dataMapping/simpleMapping.yaml +90 -60
  20. package/public/rjbuild/docs/core/element/debug/VariablesDebug.md +59 -0
  21. package/public/rjbuild/docs/core/element/debug/VariablesDebug.yaml +71 -0
  22. package/public/rjbuild/docs/core/element/form/Input.md +307 -0
  23. package/public/rjbuild/docs/core/element/form/Input.yaml +572 -0
  24. package/public/rjbuild/docs/core/element/html/FolderSortableTree.yaml +40 -12
  25. package/public/rjbuild/docs/core/element/html/FormatNumeral.yaml +21 -7
  26. package/public/rjbuild/docs/core/element/html/Html.yaml +26 -9
  27. package/public/rjbuild/docs/core/element/html/LabelFromValue.yaml +25 -8
  28. package/public/rjbuild/docs/core/element/html/PreformattedMarkup.yaml +23 -7
  29. package/public/rjbuild/docs/core/element/html/SortableTreeItemCollapseButton.yaml +7 -6
  30. package/public/rjbuild/docs/core/element/html/SyntaxHighlighter.yaml +56 -20
  31. package/public/rjbuild/docs/core/element/special/Count.md +8 -10
  32. package/public/rjbuild/docs/core/element/special/Count.yaml +121 -40
  33. package/public/rjbuild/docs/core/element/special/DataFilter.md +40 -41
  34. package/public/rjbuild/docs/core/element/special/DataFilter.yaml +197 -81
  35. package/public/rjbuild/docs/core/element/special/DelayedActions.md +13 -15
  36. package/public/rjbuild/docs/core/element/special/DelayedActions.yaml +32 -13
  37. package/public/rjbuild/docs/core/element/special/PageControls.md +8 -10
  38. package/public/rjbuild/docs/core/element/special/PageControls.yaml +9 -8
  39. package/public/rjbuild/docs/core/element/special/Phantom.md +9 -11
  40. package/public/rjbuild/docs/core/element/special/Phantom.yaml +22 -9
  41. package/public/rjbuild/docs/core/element/special/ReactiveJsonSubroot.md +7 -9
  42. package/public/rjbuild/docs/core/element/special/ReactiveJsonSubroot.yaml +167 -49
  43. package/public/rjbuild/docs/core/element/special/Switch.md +36 -38
  44. package/public/rjbuild/docs/core/element/special/Switch.yaml +68 -40
  45. package/public/rjbuild/docs/core/example/html.md +2 -2
  46. package/public/rjbuild/docs/core/example/html.yaml +2 -3
  47. package/public/rjbuild/docs/core/example/native-html-forms.md +245 -0
  48. package/public/rjbuild/docs/core/example/native-html-forms.yaml +393 -0
  49. package/public/rjbuild/docs/core/reaction/addData.md +17 -5
  50. package/public/rjbuild/docs/core/reaction/addData.yaml +70 -11
  51. package/public/rjbuild/docs/core/reaction/fetchData.md +1 -2
  52. package/public/rjbuild/docs/core/reaction/fetchData.yaml +84 -19
  53. package/public/rjbuild/docs/core/reaction/moveData.md +0 -4
  54. package/public/rjbuild/docs/core/reaction/moveData.yaml +28 -6
  55. package/public/rjbuild/docs/core/reaction/postMessage.md +0 -4
  56. package/public/rjbuild/docs/core/reaction/postMessage.yaml +29 -6
  57. package/public/rjbuild/docs/core/reaction/redirectNow.md +0 -4
  58. package/public/rjbuild/docs/core/reaction/redirectNow.yaml +10 -3
  59. package/public/rjbuild/docs/core/reaction/removeData.md +2 -6
  60. package/public/rjbuild/docs/core/reaction/removeData.yaml +40 -2
  61. package/public/rjbuild/docs/core/reaction/setClipboardData.md +0 -4
  62. package/public/rjbuild/docs/core/reaction/setClipboardData.yaml +10 -3
  63. package/public/rjbuild/docs/core/reaction/setData.md +18 -8
  64. package/public/rjbuild/docs/core/reaction/setData.yaml +43 -11
  65. package/public/rjbuild/docs/core/reaction/submitData.md +2 -3
  66. package/public/rjbuild/docs/core/reaction/submitData.yaml +43 -7
  67. package/public/rjbuild/docs/core/reaction/triggerEvent.md +0 -4
  68. package/public/rjbuild/docs/core/reaction/triggerEvent.yaml +25 -11
  69. package/public/rjbuild/docs/docs-components/Mermaid.md +254 -0
  70. package/public/rjbuild/docs/docs-components/Mermaid.yaml +339 -0
  71. package/public/rjbuild/docs/docs-components/index.yaml +1 -0
  72. package/public/rjbuild/docs/getting-started/actions.md +1 -1
  73. package/public/rjbuild/docs/index.yaml +2 -1
  74. package/public/rjbuild/docs/install.md +26 -29
  75. package/public/rjbuild/docs/install.yaml +4 -10
  76. package/public/rjbuild/docs/integration/bootstrap/action/Popover.md +26 -0
  77. package/public/rjbuild/docs/{core → integration/bootstrap}/action/Popover.yaml +28 -5
  78. package/public/rjbuild/docs/{core → integration/bootstrap}/action/Tooltip.md +4 -4
  79. package/public/rjbuild/docs/{core → integration/bootstrap}/action/Tooltip.yaml +16 -3
  80. package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/CheckBoxField.md +8 -8
  81. package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/CheckBoxField.yaml +40 -8
  82. package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/DateField.md +5 -5
  83. package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/DateField.yaml +27 -5
  84. package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/NumberField.md +7 -7
  85. package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/NumberField.yaml +32 -7
  86. package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/SelectField.md +9 -9
  87. package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/SelectField.yaml +46 -9
  88. package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/TextAreaField.md +8 -8
  89. package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/TextAreaField.yaml +36 -8
  90. package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/TextField.md +8 -8
  91. package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/TextField.yaml +38 -8
  92. package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/formElementsCommon.md +2 -4
  93. package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/index.md +0 -2
  94. package/public/rjbuild/docs/integration/bootstrap/element/html/AccordionItem.md +69 -0
  95. package/public/rjbuild/docs/{core → integration/bootstrap}/element/html/AccordionItem.yaml +19 -7
  96. package/public/rjbuild/docs/integration/bootstrap/element/html/Modal.md +127 -0
  97. package/public/rjbuild/docs/{core → integration/bootstrap}/element/html/Modal.yaml +35 -12
  98. package/public/rjbuild/docs/integration/bootstrap/element/html/Tabs.md +150 -0
  99. package/public/rjbuild/docs/{core → integration/bootstrap}/element/html/Tabs.yaml +24 -15
  100. package/public/rjbuild/docs/integration/bootstrap/element/html/index.md +13 -0
  101. package/public/rjbuild/docs/{core → integration/bootstrap}/element/special/BootstrapElement.md +4 -6
  102. package/public/rjbuild/docs/integration/bootstrap/element/special/BootstrapElement.yaml +29 -0
  103. package/public/rjbuild/docs/integration/bootstrap/element/special/index.md +19 -0
  104. package/public/rjbuild/docs/integration/bootstrap/example/website.md +41 -0
  105. package/public/rjbuild/docs/integration/bootstrap/overview.md +69 -0
  106. package/public/rjbuild/docs/integration/bootstrap/overview.yaml +87 -0
  107. package/public/rjbuild/docs/core/action/Popover.md +0 -26
  108. package/public/rjbuild/docs/core/element/special/BootstrapElement.yaml +0 -18
  109. /package/public/rjbuild/docs/{core → integration/bootstrap}/element/form/index.yaml +0 -0
  110. /package/public/rjbuild/docs/{core → integration/bootstrap}/example/accordion.md +0 -0
  111. /package/public/rjbuild/docs/{core → integration/bootstrap}/example/accordion.yaml +0 -0
  112. /package/public/rjbuild/docs/{core → integration/bootstrap}/example/dynamic-content.md +0 -0
  113. /package/public/rjbuild/docs/{core → integration/bootstrap}/example/dynamic-content.yaml +0 -0
  114. /package/public/rjbuild/docs/{core → integration/bootstrap}/example/website.yaml +0 -0
  115. /package/public/rjbuild/docs/{chartjs → integration/chartjs}/components.yaml +0 -0
  116. /package/public/rjbuild/docs/{chartjs → integration/chartjs}/overview.yaml +0 -0
@@ -4,14 +4,14 @@ The `TextAreaField` component renders a multi-line text input field using React
4
4
 
5
5
  ## Properties
6
6
 
7
- - `dataLocation` (string, optional): Path to bind the field value in the data context
8
- - `defaultFieldValue` (string, optional): Default value when no data is present
9
- - `label` (string, optional): Field label text (supports template evaluation)
10
- - `placeholder` (string, optional): Placeholder text (supports template evaluation)
11
- - `rows` (number, optional): Number of visible text lines (default: 3)
12
- - `attributes` (object, optional): Attributes applied to the Form.Group container
13
- - `inputAttributes` (object, optional): Attributes applied directly to the textarea element
14
- - `actions` (array, optional): Actions to execute based on field state
7
+ - `dataLocation` (string, optional): Path to bind the field value in the data context.
8
+ - `defaultFieldValue` (string, optional): Default value when no data is present.
9
+ - `label` (string, optional): Field label text (supports template evaluation).
10
+ - `placeholder` (string, optional): Placeholder text (supports template evaluation).
11
+ - `rows` (number, optional): Number of visible text lines (default: 3).
12
+ - `attributes` (object, optional): Attributes applied to the Form.Group container.
13
+ - `inputAttributes` (object, optional): Attributes applied directly to the textarea element.
14
+ - `actions` (array, optional): Actions to execute based on field state.
15
15
 
16
16
  ## Data Management
17
17
 
@@ -7,15 +7,43 @@ renderView:
7
7
 
8
8
  ## Properties
9
9
 
10
- - `dataLocation` (string, optional): Path to bind the field value in the data context
11
- - `defaultFieldValue` (string, optional): Default value when no data is present
12
- - `label` (string, optional): Field label text (supports template evaluation)
13
- - `placeholder` (string, optional): Placeholder text (supports template evaluation)
14
- - `rows` (number, optional): Number of visible text lines (default: 3)
15
- - `attributes` (object, optional): Attributes applied to the Form.Group container
16
- - `inputAttributes` (object, optional): Attributes applied directly to the textarea element
17
- - `actions` (array, optional): Actions to execute based on field state
10
+ - type: DefinitionList
11
+ content:
12
+ - term:
13
+ code: dataLocation
14
+ after: "(string, optional)"
15
+ details: "Path to bind the field value in the data context."
16
+ - term:
17
+ code: defaultFieldValue
18
+ after: "(string, optional)"
19
+ details: "Default value when no data is present."
20
+ - term:
21
+ code: label
22
+ after: "(string, optional)"
23
+ details: "Field label text (supports template evaluation)."
24
+ - term:
25
+ code: placeholder
26
+ after: "(string, optional)"
27
+ details: "Placeholder text (supports template evaluation)."
28
+ - term:
29
+ code: rows
30
+ after: "(number, optional)"
31
+ details: "Number of visible text lines (default: 3)."
32
+ - term:
33
+ code: attributes
34
+ after: "(object, optional)"
35
+ details: "Attributes applied to the Form.Group container."
36
+ - term:
37
+ code: inputAttributes
38
+ after: "(object, optional)"
39
+ details: "Attributes applied directly to the textarea element."
40
+ - term:
41
+ code: actions
42
+ after: "(array, optional)"
43
+ details: "Actions to execute based on field state."
18
44
 
45
+ - type: Markdown
46
+ content: |
19
47
  ## Data Management
20
48
 
21
49
  The component automatically synchronizes its value with the global data context. When using `dataLocation`, the value is stored at the specified path. Without `dataLocation`, the value is stored in the template context using the component's `datafield`.
@@ -4,14 +4,14 @@ The `TextField` component renders a single-line text input field using React Boo
4
4
 
5
5
  ## Properties
6
6
 
7
- - `dataLocation` (string, optional): Path to bind the field value in the data context
8
- - `defaultFieldValue` (string, optional): Default value when no data is present
9
- - `label` (string, optional): Field label text (supports template evaluation)
10
- - `placeholder` (string, optional): Placeholder text (supports template evaluation)
11
- - `inputType` (string, optional): HTML input type (default: "text", supports template evaluation)
12
- - `attributes` (object, optional): Attributes applied to the Form.Group container
13
- - `inputAttributes` (object, optional): Attributes applied directly to the input element
14
- - `actions` (array, optional): Actions to execute based on field state
7
+ - `dataLocation` (string, optional): Path to bind the field value in the data context.
8
+ - `defaultFieldValue` (string, optional): Default value when no data is present.
9
+ - `label` (string, optional): Field label text (supports template evaluation).
10
+ - `placeholder` (string, optional): Placeholder text (supports template evaluation).
11
+ - `inputType` (string, optional): HTML input type (default: "text", supports template evaluation).
12
+ - `attributes` (object, optional): Attributes applied to the Form.Group container.
13
+ - `inputAttributes` (object, optional): Attributes applied directly to the input element.
14
+ - `actions` (array, optional): Actions to execute based on field state.
15
15
 
16
16
  ## Data Management
17
17
 
@@ -7,15 +7,45 @@ renderView:
7
7
 
8
8
  ## Properties
9
9
 
10
- - `dataLocation` (string, optional): Path to bind the field value in the data context
11
- - `defaultFieldValue` (string, optional): Default value when no data is present
12
- - `label` (string, optional): Field label text (supports template evaluation)
13
- - `placeholder` (string, optional): Placeholder text (supports template evaluation)
14
- - `inputType` (string, optional): HTML input type (default: "text", supports template evaluation)
15
- - `attributes` (object, optional): Attributes applied to the Form.Group container
16
- - `inputAttributes` (object, optional): Attributes applied directly to the input element
17
- - `actions` (array, optional): Actions to execute based on field state
10
+ - type: DefinitionList
11
+ content:
12
+ - term:
13
+ code: dataLocation
14
+ after: "(string, optional)"
15
+ details: "Path to bind the field value in the data context."
16
+ - term:
17
+ code: defaultFieldValue
18
+ after: "(string, optional)"
19
+ details: "Default value when no data is present."
20
+ - term:
21
+ code: label
22
+ after: "(string, optional)"
23
+ details: "Field label text (supports template evaluation)."
24
+ - term:
25
+ code: placeholder
26
+ after: "(string, optional)"
27
+ details: "Placeholder text (supports template evaluation)."
28
+ - term:
29
+ code: inputType
30
+ after: "(string, optional)"
31
+ details:
32
+ type: Markdown
33
+ content: "HTML input type (default: \"text\", supports template evaluation)."
34
+ - term:
35
+ code: attributes
36
+ after: "(object, optional)"
37
+ details: "Attributes applied to the Form.Group container."
38
+ - term:
39
+ code: inputAttributes
40
+ after: "(object, optional)"
41
+ details: "Attributes applied directly to the input element."
42
+ - term:
43
+ code: actions
44
+ after: "(array, optional)"
45
+ details: "Actions to execute based on field state."
18
46
 
47
+ - type: Markdown
48
+ content: |
19
49
  ## Data Management
20
50
 
21
51
  The component automatically synchronizes its value with the global data context. When using `dataLocation`, the value is stored at the specified path. Without `dataLocation`, the value is stored in the template context using the component's `datafield`.
@@ -1,7 +1,5 @@
1
1
  # Form Elements Common Utilities
2
2
 
3
- ## Introduction
4
-
5
3
  The `formElementsCommon.jsx` file provides shared utilities for all form components in Reactive-JSON. These utilities handle data location resolution, path calculation, and default value management.
6
4
 
7
5
  ## propsDataLocationToPathAndValue Function
@@ -27,13 +25,13 @@ Returns an object with:
27
25
 
28
26
  The function implements two data binding strategies:
29
27
 
30
- #### 1. Custom Data Location
28
+ #### Custom Data Location
31
29
  When `dataLocation` is provided:
32
30
  - Evaluates the template value at the specified location
33
31
  - Uses the resolved path for data updates
34
32
  - Falls back to `defaultValue` if the location is undefined
35
33
 
36
- #### 2. Template-Scoped Data
34
+ #### Template-Scoped Data
37
35
  When no `dataLocation` is provided:
38
36
  - Uses the component's `datafield` as the key
39
37
  - Stores data in the template context under this key
@@ -1,7 +1,5 @@
1
1
  # Form Elements
2
2
 
3
- ## Introduction
4
-
5
3
  Form elements in Reactive-JSON provide interactive input components based on React Bootstrap. These components automatically manage state through the global data context and support template evaluation for dynamic content.
6
4
 
7
5
  All form elements support:
@@ -0,0 +1,69 @@
1
+ # AccordionItem
2
+
3
+ The `AccordionItem` component provides collapsible content panels using Bootstrap's accordion component. Each item must be used within a parent accordion container and supports dynamic content through Reactive-JSON's template system.
4
+
5
+ ## Properties
6
+
7
+ - `eventKey` (string, required): Unique identifier for this accordion item
8
+ - `header` (string/component, required): The accordion header content (clickable area)
9
+ - `content` (any, optional): The collapsible content area
10
+ - `attributes` (object, optional): Additional HTML attributes for the accordion item
11
+ - `actions` (array, optional): Actions to execute based on field state
12
+
13
+ ## Basic Example
14
+
15
+ ```yaml
16
+ renderView:
17
+ - type: BsAccordion
18
+ attributes:
19
+ defaultActiveKey: "0"
20
+ content:
21
+ - type: AccordionItem
22
+ eventKey: "0"
23
+ header: "Accordion Item #1"
24
+ content: "This is the content for the first accordion item."
25
+ - type: AccordionItem
26
+ eventKey: "1"
27
+ header: "Accordion Item #2"
28
+ content: "This is the content for the second accordion item."
29
+ ```
30
+
31
+ ## Dynamic Content Example
32
+
33
+ ```yaml
34
+ renderView:
35
+ - type: BsAccordion
36
+ content: ~.faqItems
37
+ singleOption:
38
+ load: faqItem
39
+
40
+ templates:
41
+ faqItem:
42
+ type: AccordionItem
43
+ eventKey: ~.id
44
+ header: ~.question
45
+ content: ~.answer
46
+
47
+ data:
48
+ faqItems:
49
+ - id: "q1"
50
+ question: "What is Reactive-JSON?"
51
+ answer: "Reactive-JSON is a declarative framework for building interactive UIs using JSON configurations."
52
+ - id: "q2"
53
+ question: "How do I install it?"
54
+ answer: "You can install it using npm: npm install @ea-lab/reactive-json"
55
+ ```
56
+
57
+
58
+
59
+ ## Limitations
60
+
61
+ - Must be used within a parent `BsAccordion` component
62
+ - Each `eventKey` must be unique within the accordion
63
+ - Header content should be simple text or basic components
64
+
65
+ ## Requirements
66
+
67
+ - Bootstrap CSS must be imported
68
+ - `@ea-lab/reactive-json-bootstrap` plugin must be installed and configured
69
+ - React-Bootstrap dependencies must be available
@@ -8,9 +8,21 @@ renderView:
8
8
  **Important:** `AccordionItem` must be a direct child of `BsAccordion`.
9
9
 
10
10
  ## Properties
11
- - `header` (object, optional): Content for the accordion header
12
- - `body` (object, optional): Content for the accordion body
13
- - `attributes` (object, optional): Additional attributes for the Accordion.Item
11
+
12
+ - type: DefinitionList
13
+ content:
14
+ - term:
15
+ code: header
16
+ after: "(object, optional)"
17
+ details: "Content for the accordion header."
18
+ - term:
19
+ code: body
20
+ after: "(object, optional)"
21
+ details: "Content for the accordion body."
22
+ - term:
23
+ code: attributes
24
+ after: "(object, optional)"
25
+ details: "Additional attributes for the Accordion.Item."
14
26
 
15
27
  - type: RjBuildDescriber
16
28
  title: "Interactive Example: Accordion with multiple sections"
@@ -41,7 +53,7 @@ renderView:
41
53
  - type: Markdown
42
54
  content: |
43
55
  ## Limitations
44
- - Only works inside a parent BsAccordion component
45
- - No built-in support for nested accordions
46
- - The eventKey is set automatically; custom keys are not supported directly
47
- - No animation customization beyond what react-bootstrap provides
56
+ - Only works inside a parent BsAccordion component.
57
+ - No built-in support for nested accordions.
58
+ - The eventKey is set automatically; custom keys are not supported directly.
59
+ - No animation customization beyond what react-bootstrap provides.
@@ -0,0 +1,127 @@
1
+ # Modal
2
+
3
+ The `Modal` component provides Bootstrap modal dialogs for displaying focused content, forms, or confirmations. It supports dynamic content and integrates with Reactive-JSON's action system for show/hide functionality.
4
+
5
+ ## Properties
6
+
7
+ - `show` (boolean, required): Controls whether the modal is visible
8
+ - `onHide` (reaction, optional): Reaction to execute when modal is closed
9
+ - `size` (string, optional): Modal size (`sm`, `lg`, `xl`)
10
+ - `centered` (boolean, optional): Whether to center the modal vertically
11
+ - `backdrop` (boolean/string, optional): Whether to show backdrop or allow backdrop click to close
12
+ - `header` (component, optional): Modal header content
13
+ - `body` (component, optional): Modal body content
14
+ - `footer` (component, optional): Modal footer content
15
+ - `attributes` (object, optional): Additional HTML attributes
16
+ - `actions` (array, optional): Actions to execute based on modal state
17
+
18
+ ## Basic Example
19
+
20
+ ```yaml
21
+ renderView:
22
+ - type: button
23
+ content: "Open Modal"
24
+ actions:
25
+ - what: setData
26
+ on: click
27
+ path: ~.showModal
28
+ value: true
29
+
30
+ - type: Modal
31
+ show: ~.showModal
32
+ onHide:
33
+ - what: setData
34
+ path: ~.showModal
35
+ value: false
36
+ header: "Modal Title"
37
+ body: "This is the modal content."
38
+ footer:
39
+ - type: button
40
+ content: "Close"
41
+ actions:
42
+ - what: setData
43
+ on: click
44
+ path: ~.showModal
45
+ value: false
46
+
47
+ data:
48
+ showModal: false
49
+ ```
50
+
51
+ ## Form Modal Example
52
+
53
+ ```yaml
54
+ renderView:
55
+ - type: button
56
+ content: "Add User"
57
+ actions:
58
+ - what: setData
59
+ on: click
60
+ path: ~.showUserForm
61
+ value: true
62
+
63
+ - type: Modal
64
+ show: ~.showUserForm
65
+ size: "lg"
66
+ centered: true
67
+ onHide:
68
+ - what: setData
69
+ path: ~.showUserForm
70
+ value: false
71
+ header: "Add New User"
72
+ body:
73
+ - type: TextField
74
+ label: "Name:"
75
+ dataLocation: ~.newUser.name
76
+ - type: TextField
77
+ label: "Email:"
78
+ dataLocation: ~.newUser.email
79
+ inputType: "email"
80
+ footer:
81
+ - type: button
82
+ content: "Cancel"
83
+ actions:
84
+ - what: setData
85
+ on: click
86
+ path: ~.showUserForm
87
+ value: false
88
+ - type: button
89
+ content: "Save User"
90
+ actions:
91
+ - what: addData
92
+ on: click
93
+ path: ~.users
94
+ value: ~.newUser
95
+ - what: setData
96
+ path: ~.showUserForm
97
+ value: false
98
+ - what: setData
99
+ path: ~.newUser
100
+ value: {}
101
+
102
+ data:
103
+ showUserForm: false
104
+ newUser: {}
105
+ users: []
106
+ ```
107
+
108
+
109
+
110
+ ## Modal Sizes
111
+
112
+ - `sm`: Small modal
113
+ - Default: Standard modal width
114
+ - `lg`: Large modal
115
+ - `xl`: Extra large modal
116
+
117
+ ## Limitations
118
+
119
+ - Modal visibility must be controlled through data state
120
+ - Complex animations beyond Bootstrap defaults are not supported
121
+ - Modal stacking (modal over modal) should be avoided
122
+
123
+ ## Requirements
124
+
125
+ - Bootstrap CSS must be imported
126
+ - `@ea-lab/reactive-json-bootstrap` plugin must be installed and configured
127
+ - React-Bootstrap dependencies must be available
@@ -7,12 +7,35 @@ renderView:
7
7
  The `Modal` component displays a dialog that can be controlled by local state or by a boolean in the global data context. It is useful for confirmations, information, or any overlay content.
8
8
 
9
9
  ## Properties
10
- - `headerTitle` (object, optional): Content for the modal header (any Reactive-JSON view)
11
- - `body` (object, optional): Content for the modal body (any Reactive-JSON view)
12
- - `closeButton` (boolean, optional): Show a close button in the header (default: false)
13
- - `showBoolPath` (string or boolean, optional): If a string, path to a boolean in data controlling visibility; otherwise, local state is used
14
- - `attributes` (object, optional): Additional attributes for the modal (size, centered, etc.)
15
- - `className` (string, optional): Additional CSS classes (always includes `reactive-json`)
10
+
11
+ - type: DefinitionList
12
+ content:
13
+ - term:
14
+ code: headerTitle
15
+ after: "(object, optional)"
16
+ details: "Content for the modal header (any Reactive-JSON view)."
17
+ - term:
18
+ code: body
19
+ after: "(object, optional)"
20
+ details: "Content for the modal body (any Reactive-JSON view)."
21
+ - term:
22
+ code: closeButton
23
+ after: "(boolean, optional)"
24
+ details: "Show a close button in the header (default: false)."
25
+ - term:
26
+ code: showBoolPath
27
+ after: "(string|boolean, optional)"
28
+ details:
29
+ type: Markdown
30
+ content: "If a string, path to a boolean in data controlling visibility; otherwise, local state is used."
31
+ - term:
32
+ code: attributes
33
+ after: "(object, optional)"
34
+ details: "Additional attributes for the modal (size, centered, etc.)."
35
+ - term:
36
+ code: className
37
+ after: "(string, optional)"
38
+ details: "Additional CSS classes (always includes `reactive-json`)."
16
39
 
17
40
  - type: RjBuildDescriber
18
41
  title: "Interactive Example: Modal controlled by data path"
@@ -83,11 +106,11 @@ renderView:
83
106
  - type: Markdown
84
107
  content: |
85
108
  ## Limitations
86
- - No built-in async or loading state
87
- - No advanced accessibility beyond react-bootstrap
88
- - If `showBoolPath` is a data path, it must resolve to a boolean
89
- - No animation customization beyond react-bootstrap
109
+ - No built-in async or loading state.
110
+ - No advanced accessibility beyond react-bootstrap.
111
+ - If `showBoolPath` is a data path, it must resolve to a boolean.
112
+ - No animation customization beyond react-bootstrap.
90
113
 
91
114
  ## Notes
92
- - Multiple modals can be displayed simultaneously by using different `showBoolPath` values or state-controlled modals
93
- - Each modal is independently controlled and managed
115
+ - Multiple modals can be displayed simultaneously by using different `showBoolPath` values or state-controlled modals.
116
+ - Each modal is independently controlled and managed.
@@ -0,0 +1,150 @@
1
+ # Tabs
2
+
3
+ The `Tabs` component provides a tabbed interface using React-Bootstrap. Each tab must have a unique `eventKey` and a `title` in its attributes, and can contain any valid Reactive-JSON view content.
4
+
5
+ ## Properties
6
+
7
+ - `defaultActiveKey` (string, optional): The key of the tab that should be active by default
8
+ - `activeKey` (string, optional): The key of the currently active tab (for controlled mode)
9
+ - `onSelect` (reaction, optional): Reaction to execute when a tab is selected
10
+ - `variant` (string, optional): Tab style variant (`tabs`, `pills`)
11
+ - `content` (array, required): Array of tab definitions
12
+ - `attributes` (object, optional): Additional HTML attributes
13
+ - `actions` (array, optional): Actions to execute based on tab state
14
+
15
+ ## Tab Definition
16
+
17
+ Each tab in the `content` array should have:
18
+ - `eventKey` (string, required): Unique identifier for the tab
19
+ - `title` (string, required): Tab header text
20
+ - `content` (any, optional): Tab content (can be any Reactive-JSON components)
21
+ - `disabled` (boolean, optional): Whether the tab is disabled
22
+ - `attributes` (object, optional): Additional attributes for the tab
23
+
24
+ ## Basic Example
25
+
26
+ ```yaml
27
+ renderView:
28
+ - type: Tabs
29
+ defaultActiveKey: "home"
30
+ content:
31
+ - eventKey: "home"
32
+ title: "Home"
33
+ content: "Welcome to the home tab!"
34
+ - eventKey: "profile"
35
+ title: "Profile"
36
+ content: "This is the profile tab content."
37
+ - eventKey: "contact"
38
+ title: "Contact"
39
+ content: "Contact information goes here."
40
+ ```
41
+
42
+ ## Dynamic Tabs Example
43
+
44
+ ```yaml
45
+ renderView:
46
+ - type: Tabs
47
+ defaultActiveKey: ~.activeTab
48
+ onSelect:
49
+ - what: setData
50
+ path: ~.activeTab
51
+ value: "<reactive-json:event-new-value>"
52
+ content: ~.sections
53
+ singleOption:
54
+ load: tabItem
55
+
56
+ templates:
57
+ tabItem:
58
+ eventKey: ~.id
59
+ title: ~.name
60
+ content:
61
+ - type: h3
62
+ content: ~.name
63
+ - type: p
64
+ content: ~.description
65
+
66
+ data:
67
+ activeTab: "overview"
68
+ sections:
69
+ - id: "overview"
70
+ name: "Overview"
71
+ description: "General information about our service."
72
+ - id: "features"
73
+ name: "Features"
74
+ description: "Key features and capabilities."
75
+ - id: "pricing"
76
+ name: "Pricing"
77
+ description: "Pricing plans and options."
78
+ ```
79
+
80
+ ## Pills Variant Example
81
+
82
+ ```yaml
83
+ renderView:
84
+ - type: Tabs
85
+ variant: "pills"
86
+ defaultActiveKey: "tab1"
87
+ content:
88
+ - eventKey: "tab1"
89
+ title: "Tab 1"
90
+ content: "Content for tab 1"
91
+ - eventKey: "tab2"
92
+ title: "Tab 2"
93
+ content: "Content for tab 2"
94
+ - eventKey: "tab3"
95
+ title: "Tab 3"
96
+ disabled: true
97
+ content: "This tab is disabled"
98
+ ```
99
+
100
+ ## Complex Content Example
101
+
102
+ ```yaml
103
+ renderView:
104
+ - type: Tabs
105
+ defaultActiveKey: "dashboard"
106
+ content:
107
+ - eventKey: "dashboard"
108
+ title: "Dashboard"
109
+ content:
110
+ - type: h4
111
+ content: "Dashboard Overview"
112
+ - type: div
113
+ content: "Statistics and metrics go here."
114
+ - eventKey: "settings"
115
+ title: "Settings"
116
+ content:
117
+ - type: TextField
118
+ label: "Username:"
119
+ dataLocation: ~.settings.username
120
+ - type: CheckBoxField
121
+ label: "Enable notifications"
122
+ dataLocation: ~.settings.notifications
123
+ options:
124
+ - value: true
125
+ label: ""
126
+
127
+ data:
128
+ settings:
129
+ username: ""
130
+ notifications: false
131
+ ```
132
+
133
+
134
+
135
+ ## Tab Variants
136
+
137
+ - `tabs`: Traditional tab styling (default)
138
+ - `pills`: Pill-style navigation
139
+
140
+ ## Limitations
141
+
142
+ - Each `eventKey` must be unique within the tabs component
143
+ - Tab switching animations are limited to Bootstrap defaults
144
+ - Complex tab layouts may require custom CSS
145
+
146
+ ## Requirements
147
+
148
+ - Bootstrap CSS must be imported
149
+ - `@ea-lab/reactive-json-bootstrap` plugin must be installed and configured
150
+ - React-Bootstrap dependencies must be available