@ea-lab/reactive-json-docs 0.6.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
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
# Reaction: removeData
|
|
2
2
|
|
|
3
|
-
## Introduction
|
|
4
|
-
|
|
5
3
|
The `removeData` reaction deletes data from a specific location in the global data context. It is essential for dynamically managing lists, removing items, or clearing parts of the application state. It can operate in two modes: `path` mode (to target a specific data location) or `target` mode (to target the current template's data).
|
|
6
4
|
|
|
7
5
|
## Properties
|
|
8
6
|
|
|
9
|
-
- `what` (string, required): The name of the reaction, which must be `removeData`.
|
|
10
|
-
- `on` (string, required): The name of the event that triggers the reaction (e.g., `click`).
|
|
11
7
|
- `path` (string, optional): The target location in the data context to delete. Required if `target` is not used.
|
|
12
8
|
- `target` (string, optional): If set to `currentTemplateData`, the reaction will remove the data associated with the current template item.
|
|
13
9
|
- `parentLevel` (number, optional): Used with `target: 'currentTemplateData'`. Specifies how many levels to go up from the current data path before removing. `0` means the current level.
|
|
@@ -22,7 +18,7 @@ The `removeData` reaction deletes data from a specific location in the global da
|
|
|
22
18
|
|
|
23
19
|
## Examples
|
|
24
20
|
|
|
25
|
-
###
|
|
21
|
+
### Using `path` to remove a specific key
|
|
26
22
|
|
|
27
23
|
This example shows how to delete a specific user profile field by clicking a button.
|
|
28
24
|
|
|
@@ -42,7 +38,7 @@ data:
|
|
|
42
38
|
email: "john.doe@example.com"
|
|
43
39
|
```
|
|
44
40
|
|
|
45
|
-
###
|
|
41
|
+
### Using `target` to remove an item from a list
|
|
46
42
|
|
|
47
43
|
This example shows a list of users where each user can be removed by clicking a "Remove" button next to their name. The reaction targets the current item in the iteration.
|
|
48
44
|
|
|
@@ -5,8 +5,46 @@ renderView:
|
|
|
5
5
|
|
|
6
6
|
The `removeData` reaction deletes data from a specific location in the global data context. It can operate in two modes: `path` mode or `target` mode.
|
|
7
7
|
|
|
8
|
+
## Properties
|
|
9
|
+
|
|
10
|
+
- type: DefinitionList
|
|
11
|
+
content:
|
|
12
|
+
- term:
|
|
13
|
+
code: path
|
|
14
|
+
after: "(string, optional)"
|
|
15
|
+
details:
|
|
16
|
+
type: Markdown
|
|
17
|
+
content: "Path to the data to remove. Required if `target` is not used"
|
|
18
|
+
- term:
|
|
19
|
+
code: target
|
|
20
|
+
after: "(string, optional)"
|
|
21
|
+
details:
|
|
22
|
+
type: Markdown
|
|
23
|
+
content: "If set to `currentTemplateData`, the reaction will target the data associated with the current template item"
|
|
24
|
+
- term:
|
|
25
|
+
code: parentLevel
|
|
26
|
+
after: "(number, optional)"
|
|
27
|
+
details:
|
|
28
|
+
type: Markdown
|
|
29
|
+
content: "Used with `target: 'currentTemplateData'`. Specifies how many levels to go up from the current data path before removing. `0` means the current level"
|
|
30
|
+
|
|
31
|
+
- type: Markdown
|
|
32
|
+
content: |
|
|
33
|
+
## Behavior
|
|
34
|
+
|
|
35
|
+
- When triggered, `removeData` deletes the data at the specified location.
|
|
36
|
+
- **Path Mode**: Uses the `path` property to identify what to remove.
|
|
37
|
+
- **Target Mode**: Uses `target: 'currentTemplateData'` to remove the current template data item from its parent array.
|
|
38
|
+
- The reaction has no effect if the target data doesn't exist.
|
|
39
|
+
|
|
40
|
+
## Limitations
|
|
41
|
+
|
|
42
|
+
- Either `path` or `target` must be specified.
|
|
43
|
+
- With `target` mode, the data must be part of an array for removal to work.
|
|
44
|
+
- Removing non-existent data has no effect (no error is thrown).
|
|
45
|
+
|
|
8
46
|
- type: RjBuildDescriber
|
|
9
|
-
title: "
|
|
47
|
+
title: "Using `path` to remove a specific key"
|
|
10
48
|
description: "This example shows how to delete a specific user profile field by clicking a button."
|
|
11
49
|
toDescribe:
|
|
12
50
|
renderView:
|
|
@@ -24,7 +62,7 @@ renderView:
|
|
|
24
62
|
email: "john.doe@example.com"
|
|
25
63
|
|
|
26
64
|
- type: RjBuildDescriber
|
|
27
|
-
title: "
|
|
65
|
+
title: "Using `target` to remove an item from a list"
|
|
28
66
|
description: |
|
|
29
67
|
This example shows a list of users where each user can be removed by clicking a "Remove" button next to their name.
|
|
30
68
|
The reaction uses `target: currentTemplateData` to identify which item to remove from the list.
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
# Reaction: setClipboardData
|
|
2
2
|
|
|
3
|
-
## Introduction
|
|
4
|
-
|
|
5
3
|
The `setClipboardData` reaction copies a specified value to the user's clipboard. This is useful for creating "Copy to clipboard" buttons for sharing information like referral codes, URLs, or any text-based data.
|
|
6
4
|
|
|
7
5
|
## Properties
|
|
8
6
|
|
|
9
|
-
- `what` (string, required): The name of the reaction, which must be `setClipboardData`.
|
|
10
|
-
- `on` (string, required): The name of the event that triggers the reaction (e.g., `click`).
|
|
11
7
|
- `value` (any, required): The value to be copied to the clipboard. The value is evaluated, so it can be a literal string or a path to data.
|
|
12
8
|
|
|
13
9
|
## Behavior
|
|
@@ -7,10 +7,17 @@ renderView:
|
|
|
7
7
|
|
|
8
8
|
## Properties
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
10
|
+
- type: DefinitionList
|
|
11
|
+
content:
|
|
12
|
+
- term:
|
|
13
|
+
code: value
|
|
14
|
+
after: "(any, required)"
|
|
15
|
+
details:
|
|
16
|
+
type: Markdown
|
|
17
|
+
content: "The value to be copied to the clipboard. The value is evaluated, so it can be a literal string or a path to data"
|
|
13
18
|
|
|
19
|
+
- type: Markdown
|
|
20
|
+
content: |
|
|
14
21
|
## Behavior
|
|
15
22
|
|
|
16
23
|
- When triggered, the reaction evaluates the `value` property.
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
# Reaction: setData
|
|
2
2
|
|
|
3
|
-
## Introduction
|
|
4
|
-
|
|
5
3
|
The `setData` reaction updates the data at a specific location in the global data context. It is one of the most fundamental reactions for managing state and making applications interactive. It can be used to set simple values, objects, or the result of a template evaluation.
|
|
6
4
|
|
|
7
5
|
## Properties
|
|
8
6
|
|
|
9
|
-
- `what` (string, required): The name of the reaction, which must be `setData`.
|
|
10
|
-
- `on` (string, required): The name of the event that triggers the reaction (e.g., `click`, `change`).
|
|
11
7
|
- `path` (string, required): The target location in the data context where the value will be set. It supports `~.` notation for relative paths.
|
|
12
8
|
- `value` (any, required): The value to set at the specified path. This value is evaluated, so it can be a literal, a path to other data, or a template string.
|
|
13
9
|
- **Conditional properties** (optional): Like all reactions, `setData` supports conditional execution using `when`, `is`, `isNot`, `isEmpty`, `contains`, `>`, `<`, `>=`, `<=`, `andConditions`, `orConditions`.
|
|
@@ -5,14 +5,32 @@ renderView:
|
|
|
5
5
|
|
|
6
6
|
The `setData` reaction updates the data at a specific location in the global data context. It is one of the most fundamental reactions for managing state and making applications interactive. It can be used to set simple values, objects, or the result of a template evaluation.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
- `what` (string, required): The name of the reaction, which must be `setData`.
|
|
10
|
-
- `on` (string, required): The name of the event that triggers the reaction (e.g., `click`, `change`).
|
|
11
|
-
- `path` (string, required): The target location in the data context where the value will be set. It supports `~.` notation for relative paths.
|
|
12
|
-
- `value` (any, required): The value to set at the specified path. This value is evaluated, so it can be a literal, a path to other data, or a template string.
|
|
13
|
-
- **Conditional properties** (optional): Like all reactions, `setData` supports conditional execution using `when`, `is`, `isNot`, `isEmpty`, `contains`, `>`, `<`, `>=`, `<=`, `andConditions`, `orConditions`.
|
|
8
|
+
## Properties
|
|
14
9
|
|
|
15
|
-
|
|
10
|
+
- type: DefinitionList
|
|
11
|
+
content:
|
|
12
|
+
- term:
|
|
13
|
+
code: path
|
|
14
|
+
after: "(string, required)"
|
|
15
|
+
details:
|
|
16
|
+
type: Markdown
|
|
17
|
+
content: "The target location in the data context where the value will be set. It supports `~.` notation for relative paths"
|
|
18
|
+
- term:
|
|
19
|
+
code: value
|
|
20
|
+
after: "(any, required)"
|
|
21
|
+
details:
|
|
22
|
+
type: Markdown
|
|
23
|
+
content: "The value to set at the specified path. This value is evaluated, so it can be a literal, a path to other data, or a template string"
|
|
24
|
+
- term:
|
|
25
|
+
code: conditionalProperties
|
|
26
|
+
after: "(optional)"
|
|
27
|
+
details:
|
|
28
|
+
type: Markdown
|
|
29
|
+
content: "Like all reactions, `setData` supports conditional execution using `when`, `is`, `isNot`, `isEmpty`, `contains`, `>`, `<`, `>=`, `<=`, `andConditions`, `orConditions`"
|
|
30
|
+
|
|
31
|
+
- type: Markdown
|
|
32
|
+
content: |
|
|
33
|
+
## Behavior
|
|
16
34
|
- When triggered by the specified event (`on`), `setData` evaluates the `value` property within the current context.
|
|
17
35
|
- It then updates the data at the location specified by `path`.
|
|
18
36
|
- If the `value` is an object or an array, it is deep-cloned before being set to prevent shared-state mutations.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# Reactive-JSON submitData Documentation
|
|
2
2
|
|
|
3
|
-
## Introduction
|
|
4
3
|
`submitData` is a reaction that allows sending data to a server via HTTP requests (usually POST). It's especially useful for form submissions and API interactions.
|
|
5
4
|
|
|
6
5
|
- The payload can be customized with the `data` property.
|
|
@@ -44,7 +43,7 @@ This limitation is intentional to avoid data consistency issues but may be restr
|
|
|
44
43
|
### Styling Submitting State (CSS)
|
|
45
44
|
You can visually disable form controls during submission using CSS. There are two main approaches:
|
|
46
45
|
|
|
47
|
-
####
|
|
46
|
+
#### Target only the submitting control (button, input, etc.)
|
|
48
47
|
The element that triggered the submission receives `data-is-submitting="true"` during the request:
|
|
49
48
|
|
|
50
49
|
```css
|
|
@@ -58,7 +57,7 @@ textarea[data-is-submitting="true"] {
|
|
|
58
57
|
}
|
|
59
58
|
```
|
|
60
59
|
|
|
61
|
-
####
|
|
60
|
+
#### Target all controls globally during submission
|
|
62
61
|
While a submission is in progress, the `<body>` receives `data-html-builder-is-submitting="true"`. You can use this to disable all form controls:
|
|
63
62
|
|
|
64
63
|
```css
|
|
@@ -10,14 +10,50 @@ renderView:
|
|
|
10
10
|
- The response can refresh the app (default) or be ignored.
|
|
11
11
|
|
|
12
12
|
## Properties
|
|
13
|
-
- `url` (string, required): The destination URL for the request
|
|
14
|
-
- `httpMethod` (string, optional): The HTTP method to use (default: "post")
|
|
15
|
-
- `data` (object, optional): The data to send. If not specified, data is sent in an object with the structure `{ data: globalDataContext.templateData }`. If `__state` exists in the context, it is automatically added.
|
|
16
|
-
- `refreshAppOnResponse` (boolean, optional): If true (default), reloads the application with the server response. If false, the response is ignored and **no change is made to the application's state or display** (just like `fetchData`).
|
|
17
|
-
- `submitSilently` (boolean, optional): If true, doesn't apply visual disabling styles during submission
|
|
18
|
-
- `updateOnlyData` (boolean, optional): When true and `refreshAppOnResponse` is true, only updates the data section instead of replacing the entire RjBuild. Preserves templates and renderView. Default: false.
|
|
19
|
-
- `updateDataAtLocation` (string, optional): When `updateOnlyData` is true, specifies where to place the response data using template path syntax (e.g., "~~.userProfile", "~.config.settings"). If not specified, replaces the entire data object.
|
|
20
13
|
|
|
14
|
+
- type: DefinitionList
|
|
15
|
+
content:
|
|
16
|
+
- term:
|
|
17
|
+
code: url
|
|
18
|
+
after: "(string, required)"
|
|
19
|
+
details: "The destination URL for the request"
|
|
20
|
+
- term:
|
|
21
|
+
code: httpMethod
|
|
22
|
+
after: "(string, optional)"
|
|
23
|
+
details:
|
|
24
|
+
type: Markdown
|
|
25
|
+
content: "The HTTP method to use (default: \"post\")"
|
|
26
|
+
- term:
|
|
27
|
+
code: data
|
|
28
|
+
after: "(object, optional)"
|
|
29
|
+
details:
|
|
30
|
+
type: Markdown
|
|
31
|
+
content: "The data to send. If not specified, data is sent in an object with the structure `{ data: globalDataContext.templateData }`. If `__state` exists in the context, it is automatically added"
|
|
32
|
+
- term:
|
|
33
|
+
code: refreshAppOnResponse
|
|
34
|
+
after: "(boolean, optional)"
|
|
35
|
+
details:
|
|
36
|
+
type: Markdown
|
|
37
|
+
content: "If true (default), reloads the application with the server response. If false, the response is ignored and **no change is made to the application's state or display** (just like `fetchData`)"
|
|
38
|
+
- term:
|
|
39
|
+
code: submitSilently
|
|
40
|
+
after: "(boolean, optional)"
|
|
41
|
+
details: "If true, doesn't apply visual disabling styles during submission"
|
|
42
|
+
- term:
|
|
43
|
+
code: updateOnlyData
|
|
44
|
+
after: "(boolean, optional)"
|
|
45
|
+
details:
|
|
46
|
+
type: Markdown
|
|
47
|
+
content: "When true and `refreshAppOnResponse` is true, only updates the data section instead of replacing the entire RjBuild. Preserves templates and renderView. Default: false"
|
|
48
|
+
- term:
|
|
49
|
+
code: updateDataAtLocation
|
|
50
|
+
after: "(string, optional)"
|
|
51
|
+
details:
|
|
52
|
+
type: Markdown
|
|
53
|
+
content: "When `updateOnlyData` is true, specifies where to place the response data using template path syntax (e.g., \"~~.userProfile\", \"~.config.settings\"). If not specified, replaces the entire data object"
|
|
54
|
+
|
|
55
|
+
- type: Markdown
|
|
56
|
+
content: |
|
|
21
57
|
## Behavior
|
|
22
58
|
- Only one submission can be active at a time (global lock)
|
|
23
59
|
- The default HTTP method is POST, but can be customized
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
# Reaction: triggerEvent
|
|
2
2
|
|
|
3
|
-
## Introduction
|
|
4
|
-
|
|
5
3
|
The `triggerEvent` reaction programmatically dispatches an event on one or more target elements found via a CSS selector. This allows for indirect interactions, such as one button triggering the `click` event of another element, or simulating user actions on specific components.
|
|
6
4
|
|
|
7
5
|
## Properties
|
|
8
6
|
|
|
9
|
-
- `what` (string, required): The name of the reaction, must be `triggerEvent`.
|
|
10
|
-
- `on` (string, required): The event that triggers this reaction.
|
|
11
7
|
- `eventName` (string, required): The name of the event to dispatch on the target element(s) (e.g., `click`, `focus`).
|
|
12
8
|
- `selector` (string, required): A CSS selector to identify the target element(s) that will receive the event.
|
|
13
9
|
- `selectorBase` (string, optional): Defines the starting point for the `selector` search.
|
|
@@ -7,15 +7,31 @@ renderView:
|
|
|
7
7
|
|
|
8
8
|
## Properties
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
- type: DefinitionList
|
|
11
|
+
content:
|
|
12
|
+
- term:
|
|
13
|
+
code: eventName
|
|
14
|
+
after: "(string, required)"
|
|
15
|
+
details:
|
|
16
|
+
type: Markdown
|
|
17
|
+
content: "The name of the event to dispatch on the target element(s) (e.g., `click`, `focus`)"
|
|
18
|
+
- term:
|
|
19
|
+
code: selector
|
|
20
|
+
after: "(string, required)"
|
|
21
|
+
details: "A CSS selector to identify the target element(s) that will receive the event"
|
|
22
|
+
- term:
|
|
23
|
+
code: selectorBase
|
|
24
|
+
after: "(string, optional)"
|
|
25
|
+
details:
|
|
26
|
+
type: Markdown
|
|
27
|
+
content: |
|
|
28
|
+
Defines the starting point for the `selector` search.
|
|
29
|
+
- If omitted, the search starts from the `document` root.
|
|
30
|
+
- If set to `'currentEventTarget'`, the search starts from the element that triggered the reaction.
|
|
31
|
+
- If set to another CSS selector, the search starts from the closest ancestor matching that selector.
|
|
18
32
|
|
|
33
|
+
- type: Markdown
|
|
34
|
+
content: |
|
|
19
35
|
## Behavior
|
|
20
36
|
|
|
21
37
|
- When triggered, the reaction searches for elements matching the `selector` within the scope defined by `selectorBase`.
|
|
@@ -32,9 +48,7 @@ renderView:
|
|
|
32
48
|
- type: RjBuildDescriber
|
|
33
49
|
title: "Triggering a click on another element"
|
|
34
50
|
description: |
|
|
35
|
-
In this example, clicking the first button does not update the status directly. Instead, it dispatches a `click` event on the second button.
|
|
36
|
-
The second button has its own `click` reaction that updates the status.
|
|
37
|
-
Therefore, clicking either button will result in the same final action: the status text gets updated.
|
|
51
|
+
In this example, clicking the first button (`Trigger a click...`) does not update the status directly. Instead, it dispatches a `click` event on the second button (`Update the status`). The second button has its own `click` reaction that updates the status. Therefore, clicking either button will result in the same final action: the status text gets updated.
|
|
38
52
|
toDescribe:
|
|
39
53
|
renderView:
|
|
40
54
|
- type: button
|
|
@@ -12,22 +12,22 @@ Adapt commands according to the execution environment (Windows, Ubuntu, Mac...).
|
|
|
12
12
|
|
|
13
13
|
## Table of Contents
|
|
14
14
|
|
|
15
|
-
1. [Project Directory Confirmation](#
|
|
16
|
-
2. [Collecting User Information](#
|
|
17
|
-
3. [Documentation Repositories Setup](#
|
|
18
|
-
4. [Cursor Workspace Configuration](#
|
|
19
|
-
5. [Vite Project Initialization](#
|
|
20
|
-
6. [Project Structure Verification](#
|
|
21
|
-
7. [Dependencies Installation](#
|
|
22
|
-
8. [Cursor Project Rules Creation](#
|
|
23
|
-
9. [Generated Project Cleanup](#
|
|
24
|
-
10. [Basic Configuration with ReactiveJsonRoot](#
|
|
25
|
-
11. [Routing Configuration (Optional)](#
|
|
26
|
-
12. [Final Verification](#
|
|
15
|
+
1. [Project Directory Confirmation](#project-directory-confirmation)
|
|
16
|
+
2. [Collecting User Information](#collecting-user-information)
|
|
17
|
+
3. [Documentation Repositories Setup](#documentation-repositories-setup)
|
|
18
|
+
4. [Cursor Workspace Configuration](#cursor-workspace-configuration)
|
|
19
|
+
5. [Vite Project Initialization](#vite-project-initialization)
|
|
20
|
+
6. [Project Structure Verification](#project-structure-verification)
|
|
21
|
+
7. [Dependencies Installation](#dependencies-installation)
|
|
22
|
+
8. [Cursor Project Rules Creation](#cursor-project-rules-creation)
|
|
23
|
+
9. [Generated Project Cleanup](#generated-project-cleanup)
|
|
24
|
+
10. [Basic Configuration with ReactiveJsonRoot](#basic-configuration-with-reactivejsonroot)
|
|
25
|
+
11. [Routing Configuration (Optional)](#routing-configuration-optional)
|
|
26
|
+
12. [Final Verification](#final-verification)
|
|
27
27
|
|
|
28
28
|
## Chronological Steps
|
|
29
29
|
|
|
30
|
-
###
|
|
30
|
+
### Project Directory Confirmation
|
|
31
31
|
|
|
32
32
|
**Action:** Show the user if the IDE is opened in the directory where the project will
|
|
33
33
|
be initialized, then ask for confirmation:
|
|
@@ -51,7 +51,7 @@ be initialized, then ask for confirmation:
|
|
|
51
51
|
|
|
52
52
|
---
|
|
53
53
|
|
|
54
|
-
###
|
|
54
|
+
### Collecting User Information
|
|
55
55
|
|
|
56
56
|
**Action:** Ask the user for the following information:
|
|
57
57
|
|
|
@@ -70,7 +70,7 @@ When invalid, ask again the location with valid suggestions.
|
|
|
70
70
|
|
|
71
71
|
---
|
|
72
72
|
|
|
73
|
-
###
|
|
73
|
+
### Documentation Repositories Setup
|
|
74
74
|
|
|
75
75
|
**Action:** Clone the required documentation repositories
|
|
76
76
|
|
|
@@ -89,7 +89,7 @@ git clone https://github.com/Ealab-collab/reactive-json-docs.git
|
|
|
89
89
|
|
|
90
90
|
---
|
|
91
91
|
|
|
92
|
-
###
|
|
92
|
+
### Cursor Workspace Configuration
|
|
93
93
|
|
|
94
94
|
**Action:** Ask the user to add repositories to the workspace
|
|
95
95
|
|
|
@@ -107,7 +107,7 @@ git clone https://github.com/Ealab-collab/reactive-json-docs.git
|
|
|
107
107
|
|
|
108
108
|
---
|
|
109
109
|
|
|
110
|
-
###
|
|
110
|
+
### Vite Project Initialization
|
|
111
111
|
|
|
112
112
|
**Action:** Create the project with Vite in the current directory
|
|
113
113
|
|
|
@@ -126,7 +126,7 @@ npm create vite@latest . -- --template react
|
|
|
126
126
|
|
|
127
127
|
---
|
|
128
128
|
|
|
129
|
-
###
|
|
129
|
+
### Project Structure Verification
|
|
130
130
|
|
|
131
131
|
**Action:** Verify the project structure is correct
|
|
132
132
|
|
|
@@ -157,7 +157,7 @@ ls -la
|
|
|
157
157
|
|
|
158
158
|
---
|
|
159
159
|
|
|
160
|
-
###
|
|
160
|
+
### Dependencies Installation
|
|
161
161
|
|
|
162
162
|
**Action:** Install required packages
|
|
163
163
|
|
|
@@ -170,7 +170,7 @@ npm install @ea-lab/reactive-json bootstrap react-bootstrap axios clsx dnd-kit-s
|
|
|
170
170
|
|
|
171
171
|
---
|
|
172
172
|
|
|
173
|
-
###
|
|
173
|
+
### Cursor Project Rules Creation
|
|
174
174
|
|
|
175
175
|
**Action:** Copy Cursor rules from documentation repositories
|
|
176
176
|
|
|
@@ -200,7 +200,7 @@ These rules contain all the necessary directives to work effectively with reacti
|
|
|
200
200
|
|
|
201
201
|
---
|
|
202
202
|
|
|
203
|
-
###
|
|
203
|
+
### Generated Project Cleanup
|
|
204
204
|
|
|
205
205
|
**Action:** Remove/clean files generated by Vite
|
|
206
206
|
|
|
@@ -230,7 +230,7 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
|
230
230
|
|
|
231
231
|
---
|
|
232
232
|
|
|
233
|
-
###
|
|
233
|
+
### Basic Configuration with ReactiveJsonRoot
|
|
234
234
|
|
|
235
235
|
**Action:** Configure the base component with an external YAML file
|
|
236
236
|
|
|
@@ -259,7 +259,7 @@ renderView:
|
|
|
259
259
|
|
|
260
260
|
---
|
|
261
261
|
|
|
262
|
-
###
|
|
262
|
+
### Routing Configuration (Optional)
|
|
263
263
|
|
|
264
264
|
**Action:** Ask the user if they want to add routing for application organization
|
|
265
265
|
|
|
@@ -385,7 +385,7 @@ renderView:
|
|
|
385
385
|
|
|
386
386
|
---
|
|
387
387
|
|
|
388
|
-
###
|
|
388
|
+
### Final Verification
|
|
389
389
|
|
|
390
390
|
**Action:** Launch development server
|
|
391
391
|
|