@ea-lab/reactive-json-docs 2.7.0 → 2.10.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 (65) hide show
  1. package/package.json +2 -2
  2. package/public/rjbuild/docs/advanced-concepts/forward-update.yaml +1 -1
  3. package/public/rjbuild/docs/advanced-concepts/plugins/component-development.yaml +1 -1
  4. package/public/rjbuild/docs/advanced-concepts/plugins/index.yaml +1 -1
  5. package/public/rjbuild/docs/core/action/CustomEventListener.yaml +1 -1
  6. package/public/rjbuild/docs/core/element/form/AutocompleteField.yaml +1 -1
  7. package/public/rjbuild/docs/core/element/form/CheckBoxField.md +142 -18
  8. package/public/rjbuild/docs/core/element/form/CheckBoxField.yaml +133 -8
  9. package/public/rjbuild/docs/core/element/form/DateField.md +79 -0
  10. package/public/rjbuild/docs/core/element/form/DateField.yaml +115 -0
  11. package/public/rjbuild/docs/core/element/form/DateTimeField.md +60 -0
  12. package/public/rjbuild/docs/core/element/form/DateTimeField.yaml +97 -0
  13. package/public/rjbuild/docs/core/element/form/Input.yaml +1 -1
  14. package/public/rjbuild/docs/core/element/form/SelectField.md +36 -10
  15. package/public/rjbuild/docs/core/element/form/SelectField.yaml +38 -4
  16. package/public/rjbuild/docs/core/element/form/TextAreaField.yaml +1 -1
  17. package/public/rjbuild/docs/core/element/form/formElementsCommon.md +32 -0
  18. package/public/rjbuild/docs/core/element/html/Html.yaml +47 -0
  19. package/public/rjbuild/docs/core/element/html/Join.yaml +1 -1
  20. package/public/rjbuild/docs/core/element/html/LabelFromValue.md +159 -0
  21. package/public/rjbuild/docs/core/element/html/LabelFromValue.yaml +163 -10
  22. package/public/rjbuild/docs/core/element/special/PageControls.yaml +1 -1
  23. package/public/rjbuild/docs/core/example/native-html-forms.md +19 -2
  24. package/public/rjbuild/docs/core/hook/index.yaml +1 -1
  25. package/public/rjbuild/docs/core/hook/usePagination.yaml +1 -1
  26. package/public/rjbuild/docs/core/hook/useTransformedAttributes.yaml +1 -1
  27. package/public/rjbuild/docs/core/reaction/collectField.md +51 -0
  28. package/public/rjbuild/docs/core/reaction/collectField.yaml +81 -0
  29. package/public/rjbuild/docs/core/reaction/fetchData.md +21 -1
  30. package/public/rjbuild/docs/core/reaction/fetchData.yaml +2 -2
  31. package/public/rjbuild/docs/core/reaction/index.md +5 -0
  32. package/public/rjbuild/docs/core/reaction/index.yaml +5 -0
  33. package/public/rjbuild/docs/core/reaction/joinData.md +51 -0
  34. package/public/rjbuild/docs/core/reaction/joinData.yaml +87 -0
  35. package/public/rjbuild/docs/core/reaction/printPage.md +22 -0
  36. package/public/rjbuild/docs/core/reaction/printPage.yaml +29 -0
  37. package/public/rjbuild/docs/core/reaction/redirectNow.md +20 -2
  38. package/public/rjbuild/docs/core/reaction/redirectNow.yaml +24 -3
  39. package/public/rjbuild/docs/core/reaction/setClipboardData.md +35 -6
  40. package/public/rjbuild/docs/core/reaction/setClipboardData.yaml +18 -6
  41. package/public/rjbuild/docs/core/reaction/stringifyData.md +45 -0
  42. package/public/rjbuild/docs/core/reaction/stringifyData.yaml +58 -0
  43. package/public/rjbuild/docs/core/reaction/submitData.md +1 -1
  44. package/public/rjbuild/docs/core/reaction/submitData.yaml +4 -2
  45. package/public/rjbuild/docs/core/reaction/toggleData.md +72 -0
  46. package/public/rjbuild/docs/core/reaction/toggleData.yaml +77 -0
  47. package/public/rjbuild/docs/docs-components/Mermaid.yaml +1 -1
  48. package/public/rjbuild/docs/docs-components/SyntaxHighlighter.yaml +1 -1
  49. package/public/rjbuild/docs/docs-components/index.yaml +1 -1
  50. package/public/rjbuild/docs/getting-started/reactions.md +5 -0
  51. package/public/rjbuild/docs/getting-started/reactions.yaml +5 -0
  52. package/public/rjbuild/docs/getting-started/rjbuild-structure.md +19 -1
  53. package/public/rjbuild/docs/getting-started/rjbuild-structure.yaml +21 -1
  54. package/public/rjbuild/docs/getting-started/template-contexts-data-binding.yaml +1 -1
  55. package/public/rjbuild/docs/index.yaml +1 -1
  56. package/public/rjbuild/docs/install.yaml +1 -1
  57. package/public/rjbuild/docs/integration/bootstrap/element/form/CheckBoxField.yaml +1 -1
  58. package/public/rjbuild/docs/integration/bootstrap/element/form/DateField.yaml +1 -1
  59. package/public/rjbuild/docs/integration/bootstrap/element/form/NumberField.yaml +1 -1
  60. package/public/rjbuild/docs/integration/bootstrap/element/form/SelectField.yaml +1 -1
  61. package/public/rjbuild/docs/integration/bootstrap/element/form/TextAreaField.yaml +1 -1
  62. package/public/rjbuild/docs/integration/bootstrap/element/form/TextField.yaml +1 -1
  63. package/public/rjbuild/docs/integration/bootstrap/element/form/index.yaml +1 -1
  64. package/public/rjbuild/docs/integration/bootstrap/example/accordion.yaml +1 -1
  65. package/public/rjbuild/docs/integration/bootstrap/example/dynamic-content.yaml +1 -1
@@ -164,4 +164,4 @@ renderView:
164
164
 
165
165
  templates:
166
166
 
167
- data: {}
167
+ data:
@@ -31,4 +31,4 @@ renderView:
31
31
 
32
32
  templates:
33
33
 
34
- data: {}
34
+ data:
@@ -71,6 +71,10 @@ Reactive-JSON provides several built-in reactions:
71
71
  - **addData**: Adds new data to the specified path.
72
72
  - **removeData**: Removes data from the specified path.
73
73
  - **moveData**: Moves data from one path to another.
74
+ - **toggleData**: Adds a value to an array when absent, removes it when present.
75
+ - **collectField**: Writes the values of a field of every item of a collection as an array.
76
+ - **joinData**: Writes a string built from several parts.
77
+ - **stringifyData**: Writes the JSON representation of a value.
74
78
 
75
79
  ### Network Operations
76
80
  - **fetchData**: Fetches data from a URL using GET requests.
@@ -81,6 +85,7 @@ Reactive-JSON provides several built-in reactions:
81
85
  - **redirectNow**: Performs an immediate redirect.
82
86
  - **triggerEvent**: Triggers a custom event.
83
87
  - **postMessage**: Sends a message to another window/frame.
88
+ - **printPage**: Opens the print dialog of the browser.
84
89
 
85
90
  For detailed documentation of each reaction, including properties and examples, see their respective documentation pages.
86
91
 
@@ -96,6 +96,10 @@ renderView:
96
96
  - **[addData](../core/reaction/addData)**: Adds new data to the specified path.
97
97
  - **[removeData](../core/reaction/removeData)**: Removes data from the specified path.
98
98
  - **[moveData](../core/reaction/moveData)**: Moves data from one path to another.
99
+ - **[toggleData](../core/reaction/toggleData)**: Adds a value to an array when absent, removes it when present.
100
+ - **[collectField](../core/reaction/collectField)**: Writes the values of a field of every item of a collection as an array.
101
+ - **[joinData](../core/reaction/joinData)**: Writes a string built from several parts.
102
+ - **[stringifyData](../core/reaction/stringifyData)**: Writes the JSON representation of a value.
99
103
 
100
104
  ### Network Operations
101
105
  - **[fetchData](../core/reaction/fetchData)**: Fetches data from a URL using GET requests.
@@ -106,6 +110,7 @@ renderView:
106
110
  - **[redirectNow](../core/reaction/redirectNow)**: Performs an immediate redirect.
107
111
  - **[triggerEvent](../core/reaction/triggerEvent)**: Triggers a custom event.
108
112
  - **[postMessage](../core/reaction/postMessage)**: Sends a message to another window/frame.
113
+ - **[printPage](../core/reaction/printPage)**: Opens the print dialog of the browser.
109
114
 
110
115
  For detailed documentation of each reaction, including properties and examples, see their respective documentation pages.
111
116
 
@@ -355,7 +355,7 @@ additionalDataSource:
355
355
 
356
356
  #### Mixing all three types
357
357
 
358
- Path parts (plain strings, `~~.`/`~.` strings, and `segment` objects) are concatenated in order. All `param` objects are collected and appended as a query string after the path.
358
+ Path parts (plain strings, `~~.`/`~.` strings, and `segment` objects) are concatenated in order. All `param` objects are collected and appended as a query string after the path. When the path already holds a query string (`/api/items?sort=asc`), the parameters continue it with `&`.
359
359
 
360
360
  ```yaml
361
361
  additionalDataSource:
@@ -400,6 +400,24 @@ data:
400
400
  timeLogs: []
401
401
  ```
402
402
 
403
+ #### The same format elsewhere
404
+
405
+ The segments format is also accepted by:
406
+
407
+ - `url` of the [fetchData](../core/reaction/fetchData.md) and [submitData](../core/reaction/submitData.md) reactions: no request is sent when a required segment is empty;
408
+ - `to` of the [redirectNow](../core/reaction/redirectNow.md) reaction: no navigation when a required segment is empty;
409
+ - the URL attributes (`href`, `src`, `action`, `formAction`, `poster`) of any element: the attribute is omitted when a required segment is empty;
410
+ - `parts` of the [joinData](../core/reaction/joinData.md) reaction, which writes the composed string in the data.
411
+
412
+ There, the references are evaluated in the current template context: `~.slug` reads the current template data (e.g. the current `Switch` item), `~~.` the global data, `~>key` an ancestor. In `additionalDataSource.src`, both `~.` and `~~.` read the root data.
413
+
414
+ ```yaml
415
+ - type: a
416
+ attributes:
417
+ href: ["/article/", ~.year, "/", { segment: ~.slug, required: true }]
418
+ content: ~.title
419
+ ```
420
+
403
421
  ### Fallback Sources
404
422
 
405
423
  The `fallbackDataSource` property defines an alternate source that is tried automatically when the primary source cannot be used. It accepts the same structure as a regular `additionalDataSource` item, including its own `fallbackDataSource` for chaining.
@@ -379,7 +379,7 @@ renderView:
379
379
 
380
380
  #### Mixing all three types
381
381
 
382
- Path parts (plain strings, `~~.`/`~.` strings, and `segment` objects) are concatenated in order. All `param` objects are collected and appended as a query string after the path.
382
+ Path parts (plain strings, `~~.`/`~.` strings, and `segment` objects) are concatenated in order. All `param` objects are collected and appended as a query string after the path. When the path already holds a query string (`/api/items?sort=asc`), the parameters continue it with `&`.
383
383
 
384
384
  - type: TabbedSerializer
385
385
  yamlSerializedContent: |
@@ -428,6 +428,26 @@ renderView:
428
428
  taskId: "" # Will be overridden by dataOverride
429
429
  timeLogs: []
430
430
 
431
+ - type: Markdown
432
+ content: |
433
+ #### The same format elsewhere
434
+
435
+ The segments format is also accepted by:
436
+
437
+ - `url` of the [fetchData](../core/reaction/fetchData) and [submitData](../core/reaction/submitData) reactions: no request is sent when a required segment is empty;
438
+ - `to` of the [redirectNow](../core/reaction/redirectNow) reaction: no navigation when a required segment is empty;
439
+ - the URL attributes (`href`, `src`, `action`, `formAction`, `poster`) of any element: the attribute is omitted when a required segment is empty;
440
+ - `parts` of the [joinData](../core/reaction/joinData) reaction, which writes the composed string in the data.
441
+
442
+ There, the references are evaluated in the current template context: `~.slug` reads the current template data (e.g. the current `Switch` item), `~~.` the global data, `~>key` an ancestor. In `additionalDataSource.src`, both `~.` and `~~.` read the root data.
443
+
444
+ ```yaml
445
+ - type: a
446
+ attributes:
447
+ href: ["/article/", ~.year, "/", { segment: ~.slug, required: true }]
448
+ content: ~.title
449
+ ```
450
+
431
451
  - type: Markdown
432
452
  content: |
433
453
 
@@ -233,4 +233,4 @@ renderView:
233
233
 
234
234
  templates:
235
235
 
236
- data: {}
236
+ data:
@@ -70,4 +70,4 @@ renderView:
70
70
 
71
71
  templates:
72
72
 
73
- data: {}
73
+ data:
@@ -975,4 +975,4 @@ templates:
975
975
  - **Without routing:** "Ready to start!" message
976
976
  - **With routing:** "Welcome to your React + Reactive-JSON app!" message with a navigation bar at the top of the page allowing navigation between pages
977
977
 
978
- data: {}
978
+ data:
@@ -367,4 +367,4 @@ renderView:
367
367
  - Other strings remain as strings
368
368
 
369
369
  templates: {}
370
- data: {}
370
+ data:
@@ -283,4 +283,4 @@ renderView:
283
283
  - Template evaluation for label property
284
284
 
285
285
  templates: {}
286
- data: {}
286
+ data:
@@ -125,4 +125,4 @@ renderView:
125
125
  - No automatic locale-specific number formatting
126
126
 
127
127
  templates: {}
128
- data: {}
128
+ data:
@@ -394,4 +394,4 @@ renderView:
394
394
  ```
395
395
 
396
396
  templates: {}
397
- data: {}
397
+ data:
@@ -171,4 +171,4 @@ renderView:
171
171
  - No built-in spell checking configuration options
172
172
 
173
173
  templates: {}
174
- data: {}
174
+ data:
@@ -174,4 +174,4 @@ renderView:
174
174
  - No support for complex input patterns beyond HTML5 pattern attribute
175
175
 
176
176
  templates: {}
177
- data: {}
177
+ data:
@@ -93,4 +93,4 @@ renderView:
93
93
  formData: ""
94
94
 
95
95
  templates: {}
96
- data: {}
96
+ data:
@@ -61,4 +61,4 @@ renderView:
61
61
 
62
62
  templates:
63
63
 
64
- data: {}
64
+ data:
@@ -234,4 +234,4 @@ renderView:
234
234
 
235
235
  templates:
236
236
 
237
- data: {}
237
+ data: