@ea-lab/reactive-json-docs 0.7.0 → 0.8.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.
- package/package.json +2 -2
- package/public/rjbuild/docs/advanced-concepts/data-processors.md +2 -2
- package/public/rjbuild/docs/advanced-concepts/plugins/component-development-guide-llm.md +14 -14
- package/public/rjbuild/docs/core/action/HashChangeListener.md +1 -1
- package/public/rjbuild/docs/core/action/HashChangeListener.yaml +24 -6
- package/public/rjbuild/docs/core/action/Hide.md +2 -2
- package/public/rjbuild/docs/core/action/Hide.yaml +4 -3
- package/public/rjbuild/docs/core/action/MessageListener.md +4 -4
- package/public/rjbuild/docs/core/action/MessageListener.yaml +18 -6
- package/public/rjbuild/docs/core/action/Popover.md +5 -5
- package/public/rjbuild/docs/core/action/Popover.yaml +28 -5
- package/public/rjbuild/docs/core/action/ReactOnEvent.md +4 -4
- package/public/rjbuild/docs/core/action/ReactOnEvent.yaml +4 -4
- package/public/rjbuild/docs/core/action/Redirect.md +2 -2
- package/public/rjbuild/docs/core/action/Redirect.yaml +8 -2
- package/public/rjbuild/docs/core/action/Tooltip.md +3 -3
- package/public/rjbuild/docs/core/action/Tooltip.yaml +16 -3
- package/public/rjbuild/docs/core/action/VisuallyHide.md +2 -2
- package/public/rjbuild/docs/core/action/VisuallyHide.yaml +2 -2
- package/public/rjbuild/docs/core/dataMapping/simpleMapping.md +5 -5
- package/public/rjbuild/docs/core/dataMapping/simpleMapping.yaml +76 -56
- package/public/rjbuild/docs/core/element/debug/VariablesDebug.md +59 -0
- package/public/rjbuild/docs/core/element/debug/VariablesDebug.yaml +71 -0
- package/public/rjbuild/docs/core/element/form/CheckBoxField.md +8 -8
- package/public/rjbuild/docs/core/element/form/CheckBoxField.yaml +40 -8
- package/public/rjbuild/docs/core/element/form/DateField.md +5 -5
- package/public/rjbuild/docs/core/element/form/DateField.yaml +27 -5
- package/public/rjbuild/docs/core/element/form/NumberField.md +7 -7
- package/public/rjbuild/docs/core/element/form/NumberField.yaml +32 -7
- package/public/rjbuild/docs/core/element/form/SelectField.md +9 -9
- package/public/rjbuild/docs/core/element/form/SelectField.yaml +46 -9
- package/public/rjbuild/docs/core/element/form/TextAreaField.md +8 -8
- package/public/rjbuild/docs/core/element/form/TextAreaField.yaml +36 -8
- package/public/rjbuild/docs/core/element/form/TextField.md +8 -8
- package/public/rjbuild/docs/core/element/form/TextField.yaml +38 -8
- package/public/rjbuild/docs/core/element/form/formElementsCommon.md +2 -4
- package/public/rjbuild/docs/core/element/form/index.md +0 -2
- package/public/rjbuild/docs/core/element/html/AccordionItem.yaml +19 -7
- package/public/rjbuild/docs/core/element/html/FolderSortableTree.yaml +40 -12
- package/public/rjbuild/docs/core/element/html/FormatNumeral.yaml +21 -7
- package/public/rjbuild/docs/core/element/html/Html.yaml +26 -9
- package/public/rjbuild/docs/core/element/html/LabelFromValue.yaml +25 -8
- package/public/rjbuild/docs/core/element/html/Modal.yaml +35 -12
- package/public/rjbuild/docs/core/element/html/PreformattedMarkup.yaml +23 -7
- package/public/rjbuild/docs/core/element/html/SortableTreeItemCollapseButton.yaml +7 -6
- package/public/rjbuild/docs/core/element/html/SyntaxHighlighter.yaml +56 -20
- package/public/rjbuild/docs/core/element/html/Tabs.yaml +24 -15
- package/public/rjbuild/docs/core/element/special/BootstrapElement.md +4 -6
- package/public/rjbuild/docs/core/element/special/BootstrapElement.yaml +15 -4
- package/public/rjbuild/docs/core/element/special/Count.md +8 -10
- package/public/rjbuild/docs/core/element/special/Count.yaml +22 -9
- package/public/rjbuild/docs/core/element/special/DataFilter.md +40 -41
- package/public/rjbuild/docs/core/element/special/DataFilter.yaml +79 -43
- package/public/rjbuild/docs/core/element/special/DelayedActions.md +13 -15
- package/public/rjbuild/docs/core/element/special/DelayedActions.yaml +32 -13
- package/public/rjbuild/docs/core/element/special/PageControls.md +8 -10
- package/public/rjbuild/docs/core/element/special/PageControls.yaml +9 -8
- package/public/rjbuild/docs/core/element/special/Phantom.md +9 -11
- package/public/rjbuild/docs/core/element/special/Phantom.yaml +22 -9
- package/public/rjbuild/docs/core/element/special/ReactiveJsonSubroot.md +7 -9
- package/public/rjbuild/docs/core/element/special/ReactiveJsonSubroot.yaml +13 -15
- package/public/rjbuild/docs/core/element/special/Switch.md +31 -33
- package/public/rjbuild/docs/core/element/special/Switch.yaml +59 -22
- package/public/rjbuild/docs/core/reaction/addData.md +0 -2
- package/public/rjbuild/docs/core/reaction/addData.yaml +17 -2
- package/public/rjbuild/docs/core/reaction/fetchData.md +1 -2
- package/public/rjbuild/docs/core/reaction/fetchData.yaml +40 -11
- package/public/rjbuild/docs/core/reaction/moveData.md +0 -4
- package/public/rjbuild/docs/core/reaction/moveData.yaml +28 -6
- package/public/rjbuild/docs/core/reaction/postMessage.md +0 -4
- package/public/rjbuild/docs/core/reaction/postMessage.yaml +29 -6
- package/public/rjbuild/docs/core/reaction/redirectNow.md +0 -4
- package/public/rjbuild/docs/core/reaction/redirectNow.yaml +10 -3
- package/public/rjbuild/docs/core/reaction/removeData.md +2 -6
- package/public/rjbuild/docs/core/reaction/removeData.yaml +40 -2
- package/public/rjbuild/docs/core/reaction/setClipboardData.md +0 -4
- package/public/rjbuild/docs/core/reaction/setClipboardData.yaml +10 -3
- package/public/rjbuild/docs/core/reaction/setData.md +0 -4
- package/public/rjbuild/docs/core/reaction/setData.yaml +25 -7
- package/public/rjbuild/docs/core/reaction/submitData.md +2 -3
- package/public/rjbuild/docs/core/reaction/submitData.yaml +43 -7
- package/public/rjbuild/docs/core/reaction/triggerEvent.md +0 -4
- package/public/rjbuild/docs/core/reaction/triggerEvent.yaml +25 -11
- package/public/rjbuild/docs/install.md +24 -24
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ea-lab/reactive-json-docs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Complete documentation for Reactive-JSON - Components, examples and LLM-parsable guides",
|
|
5
5
|
"main": "public/rjbuild/docs/index.yaml",
|
|
6
6
|
"files": [
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"private": false,
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@craco/craco": "^7.1.0",
|
|
29
|
-
"@ea-lab/reactive-json": "^0.
|
|
29
|
+
"@ea-lab/reactive-json": "^0.7.1",
|
|
30
30
|
"@ea-lab/reactive-json-chartjs": "^0.0.23",
|
|
31
31
|
"@npmcli/fs": "^4.0.0",
|
|
32
32
|
"@reduxjs/toolkit": "^2.6.1",
|
|
@@ -164,7 +164,7 @@ const dateFormatProcessor = ({ requestContext, responseContext, dataToProcess, o
|
|
|
164
164
|
};
|
|
165
165
|
```
|
|
166
166
|
|
|
167
|
-
###
|
|
167
|
+
### Conditional Processing
|
|
168
168
|
|
|
169
169
|
```javascript
|
|
170
170
|
const userDataProcessor = ({ requestContext, responseContext, dataToProcess, originalDataToProcess }) => {
|
|
@@ -268,7 +268,7 @@ const safeProcessor = ({ requestContext, responseContext, dataToProcess, origina
|
|
|
268
268
|
};
|
|
269
269
|
```
|
|
270
270
|
|
|
271
|
-
###
|
|
271
|
+
### Descriptive IDs and Ordering
|
|
272
272
|
Use clear names and logical ordering:
|
|
273
273
|
|
|
274
274
|
```javascript
|
|
@@ -28,7 +28,7 @@ data: # Data used by renderView and templates
|
|
|
28
28
|
|
|
29
29
|
## Component Architecture Patterns
|
|
30
30
|
|
|
31
|
-
###
|
|
31
|
+
### Basic Element Component Structure
|
|
32
32
|
|
|
33
33
|
```jsx
|
|
34
34
|
import {ActionDependant} from "@ea-lab/reactive-json/dist/engine";
|
|
@@ -56,7 +56,7 @@ export const ComponentName = ({props}) => {
|
|
|
56
56
|
};
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
###
|
|
59
|
+
### Form Element Component Structure
|
|
60
60
|
|
|
61
61
|
```jsx
|
|
62
62
|
import {useContext} from 'react';
|
|
@@ -93,7 +93,7 @@ export const FormComponentName = ({props, datafield, path}) => {
|
|
|
93
93
|
};
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
-
###
|
|
96
|
+
### Component with View (Nested Content)
|
|
97
97
|
|
|
98
98
|
```jsx
|
|
99
99
|
import {View} from "@ea-lab/reactive-json/dist/engine";
|
|
@@ -120,7 +120,7 @@ export const WrapperComponent = ({props, path, currentData, datafield}) => {
|
|
|
120
120
|
};
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
###
|
|
123
|
+
### Generic Bootstrap Wrapper
|
|
124
124
|
|
|
125
125
|
```jsx
|
|
126
126
|
import {ActionDependant} from "@ea-lab/reactive-json/dist/engine";
|
|
@@ -151,7 +151,7 @@ export function BootstrapElement({props, currentData, path, bsComponent}) {
|
|
|
151
151
|
}
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
###
|
|
154
|
+
### Action Component Structure
|
|
155
155
|
|
|
156
156
|
```jsx
|
|
157
157
|
import {useContext, useEffect} from "react";
|
|
@@ -200,7 +200,7 @@ Other specialized contexts are available.
|
|
|
200
200
|
|
|
201
201
|
## Component Creation Rules
|
|
202
202
|
|
|
203
|
-
###
|
|
203
|
+
### Import Path Conventions
|
|
204
204
|
|
|
205
205
|
**Consumer application** (package imports - **RECOMMENDED**):
|
|
206
206
|
```jsx
|
|
@@ -219,7 +219,7 @@ import {GlobalDataContext} from "../../../engine/GlobalDataContext.jsx";
|
|
|
219
219
|
|
|
220
220
|
> **Important Note**: The relative path syntax (`../../../engine/`) is reserved for developing internal components within the reactive-json package. For all other use cases, use package imports with `@ea-lab/reactive-json/dist/engine`.
|
|
221
221
|
|
|
222
|
-
###
|
|
222
|
+
### Component Signature Standards
|
|
223
223
|
✅ **Correct**:
|
|
224
224
|
```jsx
|
|
225
225
|
export const Component = ({props}) => {
|
|
@@ -234,17 +234,17 @@ export const Component = ({props, customValue}) => {
|
|
|
234
234
|
}
|
|
235
235
|
```
|
|
236
236
|
|
|
237
|
-
###
|
|
237
|
+
### Error Handling
|
|
238
238
|
- Components should fail silently when misconfigured
|
|
239
239
|
- Return `null` for invalid configurations
|
|
240
240
|
- Don't crash the application
|
|
241
241
|
|
|
242
|
-
###
|
|
242
|
+
### Feature Implementation Priority
|
|
243
243
|
1. **Essential features**: Core functionality
|
|
244
244
|
2. **Requested features**: When explicitly asked
|
|
245
245
|
3. **Optional features**: Keep minimal complexity
|
|
246
246
|
|
|
247
|
-
###
|
|
247
|
+
### Default Behavior
|
|
248
248
|
- Provide sensible defaults
|
|
249
249
|
- Allow overriding via YAML/JSON configuration
|
|
250
250
|
- Keep React components simple
|
|
@@ -289,23 +289,23 @@ export const CustomRoot = (props) => {
|
|
|
289
289
|
|
|
290
290
|
## Best Practices
|
|
291
291
|
|
|
292
|
-
###
|
|
292
|
+
### Code Organization
|
|
293
293
|
- Order imports alphabetically by path
|
|
294
294
|
- Order object properties alphabetically
|
|
295
295
|
- Use JSX for reactive-json library components
|
|
296
296
|
- Export components via `index.js`: `export * from "./ComponentName.jsx";`
|
|
297
297
|
|
|
298
|
-
###
|
|
298
|
+
### Dynamic Values
|
|
299
299
|
- Use `evaluateTemplateValue()` for single values
|
|
300
300
|
- Use `evaluateTemplateValueCollection()` for arrays/objects
|
|
301
301
|
- Always evaluate user-provided content
|
|
302
302
|
|
|
303
|
-
###
|
|
303
|
+
### Attributes & Actions
|
|
304
304
|
- Include attribute support via `useEvaluatedAttributes()`
|
|
305
305
|
- Wrap content with `<ActionDependant {...props}>`
|
|
306
306
|
- Support actions unless explicitly told not to
|
|
307
307
|
|
|
308
|
-
###
|
|
308
|
+
### CSS & Styling
|
|
309
309
|
- Use CSS modules for component-specific styles (`Component.module.css`)
|
|
310
310
|
- For external libraries, mention CSS import requirements
|
|
311
311
|
- Prefer minimal styling approach
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# HashChangeListener
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Listens to hash changes (URL fragment) in the window and executes a reaction function in response. This is an internal action component that is automatically used when you specify `on: "hashchange"` in your actions.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
@@ -3,7 +3,7 @@ renderView:
|
|
|
3
3
|
content: |
|
|
4
4
|
# HashChangeListener
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Listens to hash changes (URL fragment) in the window and executes a reaction function in response. This is an internal action component that is automatically used when you specify `on: "hashchange"` in your actions.
|
|
7
7
|
|
|
8
8
|
## Usage
|
|
9
9
|
|
|
@@ -11,12 +11,30 @@ renderView:
|
|
|
11
11
|
|
|
12
12
|
## Properties
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
- type: DefinitionList
|
|
15
|
+
content:
|
|
16
|
+
- term:
|
|
17
|
+
code: what
|
|
18
|
+
after: "(string, required)"
|
|
19
|
+
details:
|
|
20
|
+
type: Markdown
|
|
21
|
+
content: "name of the reaction function to execute (e.g., `setData`, `fetchData`, `submitData`)"
|
|
22
|
+
- term:
|
|
23
|
+
code: whenHashIs
|
|
24
|
+
after: "(string, optional)"
|
|
25
|
+
details:
|
|
26
|
+
type: Markdown
|
|
27
|
+
content: "hash value that should trigger the reaction (includes the `#` character)"
|
|
28
|
+
- term:
|
|
29
|
+
code: whenHashWas
|
|
30
|
+
after: "(string, optional)"
|
|
31
|
+
details:
|
|
32
|
+
type: Markdown
|
|
33
|
+
content: "previous hash value that should trigger the reaction (includes the `#` character)"
|
|
15
34
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- All other properties are passed as arguments to the reaction function
|
|
35
|
+
- type: Markdown
|
|
36
|
+
content: |
|
|
37
|
+
All other properties are passed as arguments to the reaction function.
|
|
20
38
|
|
|
21
39
|
- type: RjBuildDescriber
|
|
22
40
|
title: "HashChangeListener Example"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Hide
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Completely hides the element and cancels any subsequent actions.
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
|
-
|
|
6
|
+
None.
|
|
7
7
|
|
|
8
8
|
## Behavior
|
|
9
9
|
- The element and its children are not rendered in the DOM.
|
|
@@ -3,10 +3,11 @@ renderView:
|
|
|
3
3
|
content: |
|
|
4
4
|
# Hide
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Completely hides the element and cancels any subsequent actions.
|
|
7
7
|
|
|
8
8
|
## Properties
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
None.
|
|
10
11
|
|
|
11
12
|
## Behavior
|
|
12
13
|
- The element and its children are not rendered in the DOM.
|
|
@@ -18,7 +19,7 @@ renderView:
|
|
|
18
19
|
- type: Markdown
|
|
19
20
|
content: |
|
|
20
21
|
This example shows how the `hide` action completely removes an element from the DOM based on a condition.
|
|
21
|
-
|
|
22
|
+
|
|
22
23
|
Try toggling the visibility to see how the `hide` action works differently from just making something invisible.
|
|
23
24
|
|
|
24
25
|
toDescribe:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MessageListener
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Executes a reaction when receiving a message via `window.postMessage`. This is an internal action component that is automatically used when you specify `on: "message"` in your actions.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
@@ -10,9 +10,9 @@ MessageListener is **not** used directly as an element type. Instead, it is auto
|
|
|
10
10
|
|
|
11
11
|
When using `on: "message"` in actions, you can specify:
|
|
12
12
|
|
|
13
|
-
- `what` (required):
|
|
14
|
-
- `whenMessageIs` (optional):
|
|
15
|
-
- All other properties are passed as arguments to the reaction function
|
|
13
|
+
- `what` (required): Name of the reaction function to execute (e.g., `setData`, `fetchData`, `submitData`, etc.).
|
|
14
|
+
- `whenMessageIs` (optional): Message value to react to (deep comparison with the received message data)
|
|
15
|
+
- All other properties are passed as arguments to the reaction function.
|
|
16
16
|
|
|
17
17
|
## Behavior
|
|
18
18
|
|
|
@@ -3,7 +3,7 @@ renderView:
|
|
|
3
3
|
content: |
|
|
4
4
|
# MessageListener
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Executes a reaction when receiving a message via `window.postMessage`. This is an internal action component that is automatically used when you specify `on: "message"` in your actions.
|
|
7
7
|
|
|
8
8
|
## Usage
|
|
9
9
|
|
|
@@ -11,11 +11,23 @@ renderView:
|
|
|
11
11
|
|
|
12
12
|
## Properties
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
- type: DefinitionList
|
|
15
|
+
content:
|
|
16
|
+
- term:
|
|
17
|
+
code: what
|
|
18
|
+
after: "(string, required)"
|
|
19
|
+
details:
|
|
20
|
+
type: Markdown
|
|
21
|
+
content: "Name of the reaction function to execute (e.g., `setData`, `fetchData`, `submitData`)."
|
|
22
|
+
- term:
|
|
23
|
+
code: whenMessageIs
|
|
24
|
+
after: "(any, optional)"
|
|
25
|
+
details:
|
|
26
|
+
type: Markdown
|
|
27
|
+
content: "Message value to react to. Uses deep comparison with the received message data."
|
|
28
|
+
- type: Markdown
|
|
29
|
+
content: |
|
|
30
|
+
All other properties are passed as arguments to the reaction function.
|
|
19
31
|
|
|
20
32
|
- type: RjBuildDescriber
|
|
21
33
|
title: "MessageListener Example"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Popover
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Displays a Bootstrap popover on click or hover of the element.
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
|
-
- `header` (optional):
|
|
7
|
-
- `body`:
|
|
8
|
-
- `placement` (optional):
|
|
9
|
-
- `trigger` (optional):
|
|
6
|
+
- `header` (optional): Content of the popover header.
|
|
7
|
+
- `body`: Content of the popover body.
|
|
8
|
+
- `placement` (optional): Position (`top`, `bottom`, `left`, `right`).
|
|
9
|
+
- `trigger` (optional): Trigger event (`click`, `hover`, etc.).
|
|
10
10
|
|
|
11
11
|
## Example
|
|
12
12
|
```yaml
|
|
@@ -3,13 +3,36 @@ renderView:
|
|
|
3
3
|
content: |
|
|
4
4
|
# Popover
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Displays a Bootstrap popover on click or hover of the element.
|
|
7
7
|
|
|
8
8
|
## Properties
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
9
|
+
|
|
10
|
+
- type: DefinitionList
|
|
11
|
+
content:
|
|
12
|
+
- term:
|
|
13
|
+
code: header
|
|
14
|
+
after: "(optional)"
|
|
15
|
+
details:
|
|
16
|
+
type: Markdown
|
|
17
|
+
content: "Content of the popover header."
|
|
18
|
+
- term:
|
|
19
|
+
code: body
|
|
20
|
+
after: "(required)"
|
|
21
|
+
details:
|
|
22
|
+
type: Markdown
|
|
23
|
+
content: "Content of the popover body."
|
|
24
|
+
- term:
|
|
25
|
+
code: placement
|
|
26
|
+
after: "(string, optional)"
|
|
27
|
+
details:
|
|
28
|
+
type: Markdown
|
|
29
|
+
content: "Position (`top`, `bottom`, `left`, `right`)."
|
|
30
|
+
- term:
|
|
31
|
+
code: trigger
|
|
32
|
+
after: "(string, optional)"
|
|
33
|
+
details:
|
|
34
|
+
type: Markdown
|
|
35
|
+
content: "Trigger event (`click`, `hover`, etc.)."
|
|
13
36
|
|
|
14
37
|
- type: RjBuildDescriber
|
|
15
38
|
title: "Popover Action Example"
|
|
@@ -8,10 +8,10 @@ ReactOnEvent is an internal action component that is automatically instantiated
|
|
|
8
8
|
|
|
9
9
|
When you define actions with event handlers (like `on: "click"`), the Actions system automatically:
|
|
10
10
|
|
|
11
|
-
1. Collects all reactions with event handlers for the element
|
|
12
|
-
2. Groups them by event type (click, change, mouseover, etc.)
|
|
13
|
-
3. Creates a ReactOnEvent component that attaches the appropriate event listeners
|
|
14
|
-
4. Wraps the target element with these event handlers
|
|
11
|
+
1. Collects all reactions with event handlers for the element.
|
|
12
|
+
2. Groups them by event type (click, change, mouseover, etc.).
|
|
13
|
+
3. Creates a ReactOnEvent component that attaches the appropriate event listeners.
|
|
14
|
+
4. Wraps the target element with these event handlers.
|
|
15
15
|
|
|
16
16
|
## Usage Pattern
|
|
17
17
|
|
|
@@ -11,10 +11,10 @@ renderView:
|
|
|
11
11
|
|
|
12
12
|
When you define actions with event handlers (like `on: "click"`), the Actions system automatically:
|
|
13
13
|
|
|
14
|
-
1. Collects all reactions with event handlers for the element
|
|
15
|
-
2. Groups them by event type (click, change, mouseover, etc.)
|
|
16
|
-
3. Creates a ReactOnEvent component that attaches the appropriate event listeners
|
|
17
|
-
4. Wraps the target element with these event handlers
|
|
14
|
+
1. Collects all reactions with event handlers for the element.
|
|
15
|
+
2. Groups them by event type (click, change, mouseover, etc.).
|
|
16
|
+
3. Creates a ReactOnEvent component that attaches the appropriate event listeners.
|
|
17
|
+
4. Wraps the target element with these event handlers.
|
|
18
18
|
|
|
19
19
|
## Usage Pattern
|
|
20
20
|
|
|
@@ -3,10 +3,16 @@ renderView:
|
|
|
3
3
|
content: |
|
|
4
4
|
# Redirect
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Redirects the user to a given URL if the condition is met.
|
|
7
7
|
|
|
8
8
|
## Properties
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
- type: DefinitionList
|
|
11
|
+
content:
|
|
12
|
+
- term:
|
|
13
|
+
code: to
|
|
14
|
+
after: "(string, required)"
|
|
15
|
+
details: "Destination URL."
|
|
10
16
|
|
|
11
17
|
- type: Markdown
|
|
12
18
|
content: |
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Tooltip
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Displays a Bootstrap tooltip when hovering over the element.
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
|
-
- `content`:
|
|
7
|
-
- `placement` (optional):
|
|
6
|
+
- `content`: Tooltip content (text or component).
|
|
7
|
+
- `placement` (optional): Tooltip position (`top`, `bottom`, `left`, `right`).
|
|
8
8
|
|
|
9
9
|
## Example
|
|
10
10
|
```yaml
|
|
@@ -3,11 +3,24 @@ renderView:
|
|
|
3
3
|
content: |
|
|
4
4
|
# Tooltip
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Displays a Bootstrap tooltip when hovering over the element.
|
|
7
7
|
|
|
8
8
|
## Properties
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
|
|
10
|
+
- type: DefinitionList
|
|
11
|
+
content:
|
|
12
|
+
- term:
|
|
13
|
+
code: content
|
|
14
|
+
after: "(required)"
|
|
15
|
+
details:
|
|
16
|
+
type: Markdown
|
|
17
|
+
content: "Tooltip content (text or component)."
|
|
18
|
+
- term:
|
|
19
|
+
code: placement
|
|
20
|
+
after: "(string, optional)"
|
|
21
|
+
details:
|
|
22
|
+
type: Markdown
|
|
23
|
+
content: "Tooltip position (`top`, `bottom`, `left`, `right`)."
|
|
11
24
|
|
|
12
25
|
- type: RjBuildDescriber
|
|
13
26
|
title: "Tooltip Action Example"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# VisuallyHide
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Visually hides the element but keeps it in the DOM (useful for accessibility or to keep the element reactive to events).
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
|
-
|
|
6
|
+
None.
|
|
7
7
|
|
|
8
8
|
## Behavior
|
|
9
9
|
- The element is rendered in the DOM but with `display: none`.
|
|
@@ -3,10 +3,10 @@ renderView:
|
|
|
3
3
|
content: |
|
|
4
4
|
# VisuallyHide
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Visually hides the element but keeps it in the DOM (useful for accessibility or to keep the element reactive to events).
|
|
7
7
|
|
|
8
8
|
## Properties
|
|
9
|
-
|
|
9
|
+
None.
|
|
10
10
|
|
|
11
11
|
## Behavior
|
|
12
12
|
- The element is rendered in the DOM but with `display: none`.
|
|
@@ -6,14 +6,14 @@ SimpleMapping is the core data mapping processor in Reactive-JSON that enables s
|
|
|
6
6
|
|
|
7
7
|
### stringMap Configuration
|
|
8
8
|
|
|
9
|
-
- `value` (string, required): Source path in the HTTP response (e.g., `user.firstName`)
|
|
10
|
-
- `required` (boolean, optional, default: true): Whether the source value must exist
|
|
11
|
-
- `defaultValue` (any, optional): Fallback value when source is missing and not required
|
|
12
|
-
- `updateMode` (string, optional, default: "replace"): How to apply the value (`replace`, `add`, `move`, `remove`)
|
|
9
|
+
- `value` (string, required): Source path in the HTTP response (e.g., `user.firstName`).
|
|
10
|
+
- `required` (boolean, optional, default: true): Whether the source value must exist.
|
|
11
|
+
- `defaultValue` (any, optional): Fallback value when source is missing and not required.
|
|
12
|
+
- `updateMode` (string, optional, default: "replace"): How to apply the value (`replace`, `add`, `move`, `remove`).
|
|
13
13
|
|
|
14
14
|
### onErrorMap Configuration
|
|
15
15
|
|
|
16
|
-
- `value` (string, required): Can be either static values (e.g., `Error occurred`) or template references (e.g., `~~.errorTimestamp`)
|
|
16
|
+
- `value` (string, required): Can be either static values (e.g., `Error occurred`) or template references (e.g., `~~.errorTimestamp`).
|
|
17
17
|
|
|
18
18
|
## Configuration Structure
|
|
19
19
|
|
|
@@ -5,62 +5,6 @@ renderView:
|
|
|
5
5
|
|
|
6
6
|
SimpleMapping is the core data mapping processor in Reactive-JSON that enables selective dispatch and transformation of HTTP response data to specific locations in your application state.
|
|
7
7
|
|
|
8
|
-
## Properties
|
|
9
|
-
|
|
10
|
-
### stringMap Configuration
|
|
11
|
-
|
|
12
|
-
- type: DefinitionList
|
|
13
|
-
content:
|
|
14
|
-
- term:
|
|
15
|
-
code: value
|
|
16
|
-
after: " (required)"
|
|
17
|
-
details:
|
|
18
|
-
type: Markdown
|
|
19
|
-
content: |
|
|
20
|
-
Source path in the HTTP response (e.g., `user.firstName`)
|
|
21
|
-
- term:
|
|
22
|
-
code: required
|
|
23
|
-
after: " (optional, default: true)"
|
|
24
|
-
details:
|
|
25
|
-
type: Markdown
|
|
26
|
-
content: |
|
|
27
|
-
Whether the source value must exist
|
|
28
|
-
- term:
|
|
29
|
-
code: defaultValue
|
|
30
|
-
after: " (optional)"
|
|
31
|
-
details:
|
|
32
|
-
type: Markdown
|
|
33
|
-
content: |
|
|
34
|
-
Fallback value when source is missing and not required
|
|
35
|
-
- term:
|
|
36
|
-
code: updateMode
|
|
37
|
-
after: " (optional, default: \"replace\")"
|
|
38
|
-
details:
|
|
39
|
-
type: Markdown
|
|
40
|
-
content: |
|
|
41
|
-
How to apply the value (`"replace"`, `"add"`, `"move"`, `"remove"`)
|
|
42
|
-
|
|
43
|
-
- type: Markdown
|
|
44
|
-
content: |
|
|
45
|
-
### onErrorMap Configuration
|
|
46
|
-
|
|
47
|
-
The `onErrorMap` works like `stringMap`, but provides fallback values when main mappings fail.
|
|
48
|
-
|
|
49
|
-
Same key-value structure as `stringMap` (destination → configuration)
|
|
50
|
-
Applied only when corresponding `stringMap` entries fail and are marked as `required: true`.
|
|
51
|
-
|
|
52
|
-
- type: DefinitionList
|
|
53
|
-
content:
|
|
54
|
-
- term:
|
|
55
|
-
code: value
|
|
56
|
-
after: " (required)"
|
|
57
|
-
details:
|
|
58
|
-
type: Markdown
|
|
59
|
-
content: |
|
|
60
|
-
Can be either static values (e.g., `Error occurred`) or template references (e.g., `~~.errorTimestamp`)
|
|
61
|
-
|
|
62
|
-
- type: Markdown
|
|
63
|
-
content: |
|
|
64
8
|
## Basic Syntax
|
|
65
9
|
|
|
66
10
|
- type: TabbedSerializer
|
|
@@ -77,6 +21,82 @@ renderView:
|
|
|
77
21
|
"~~.error.path":
|
|
78
22
|
value: "Error message or ~~.template.reference"
|
|
79
23
|
|
|
24
|
+
- type: Markdown
|
|
25
|
+
content: |
|
|
26
|
+
## Properties
|
|
27
|
+
|
|
28
|
+
- type: DefinitionList
|
|
29
|
+
content:
|
|
30
|
+
- term:
|
|
31
|
+
code: stringMap
|
|
32
|
+
after: " (object, required)"
|
|
33
|
+
details:
|
|
34
|
+
- type: Markdown
|
|
35
|
+
content: |
|
|
36
|
+
The `stringMap` configuration is used to map source paths in the HTTP response to specific locations in your application state.
|
|
37
|
+
|
|
38
|
+
Each key in the `stringMap` object represents a destination path in your application state, e.g. `~~.profile.displayName`.
|
|
39
|
+
|
|
40
|
+
The value associated with each key is an object that defines how to map the source data to that destination.
|
|
41
|
+
Here is the list of properties that can be used in the value object:
|
|
42
|
+
|
|
43
|
+
- type: DefinitionList
|
|
44
|
+
content:
|
|
45
|
+
- term:
|
|
46
|
+
code: value
|
|
47
|
+
after: " (required)"
|
|
48
|
+
details:
|
|
49
|
+
type: Markdown
|
|
50
|
+
content: |
|
|
51
|
+
Source path in the HTTP response (e.g., `user.firstName`).
|
|
52
|
+
- term:
|
|
53
|
+
code: required
|
|
54
|
+
after: " (optional, default: true)"
|
|
55
|
+
details:
|
|
56
|
+
type: Markdown
|
|
57
|
+
content: |
|
|
58
|
+
Whether the source value must exist.
|
|
59
|
+
- term:
|
|
60
|
+
code: defaultValue
|
|
61
|
+
after: " (optional)"
|
|
62
|
+
details:
|
|
63
|
+
type: Markdown
|
|
64
|
+
content: |
|
|
65
|
+
Fallback value when source is missing and not required.
|
|
66
|
+
- term:
|
|
67
|
+
code: updateMode
|
|
68
|
+
after: " (optional, default: \"replace\")"
|
|
69
|
+
details:
|
|
70
|
+
type: Markdown
|
|
71
|
+
content: |
|
|
72
|
+
How to apply the value (`"replace"`, `"add"`, `"move"`, `"remove"`).
|
|
73
|
+
|
|
74
|
+
- type: DefinitionList
|
|
75
|
+
content:
|
|
76
|
+
- term:
|
|
77
|
+
code: onErrorMap
|
|
78
|
+
after: " (object, optional)"
|
|
79
|
+
details:
|
|
80
|
+
- type: Markdown
|
|
81
|
+
content: |
|
|
82
|
+
The `onErrorMap` works like `stringMap`, but provides fallback values when main mappings fail.
|
|
83
|
+
|
|
84
|
+
Same key-value structure as `stringMap` (destination → configuration).
|
|
85
|
+
|
|
86
|
+
Applied only when corresponding `stringMap` entries fail and are marked as `required: true`.
|
|
87
|
+
|
|
88
|
+
Here is the list of properties that can be used in the value object:
|
|
89
|
+
|
|
90
|
+
- type: DefinitionList
|
|
91
|
+
content:
|
|
92
|
+
- term:
|
|
93
|
+
code: value
|
|
94
|
+
after: " (required)"
|
|
95
|
+
details:
|
|
96
|
+
type: Markdown
|
|
97
|
+
content: |
|
|
98
|
+
Can be either static values (e.g., `Error occurred`) or template references (e.g., `~~.errorTimestamp`).
|
|
99
|
+
|
|
80
100
|
- type: Markdown
|
|
81
101
|
content: |
|
|
82
102
|
## Live Example
|