@ea-lab/reactive-json-docs 0.1.2

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 (93) hide show
  1. package/README-npm.md +49 -0
  2. package/README.md +86 -0
  3. package/package.json +79 -0
  4. package/public/rjbuild/component-doc/chartjs/components.yaml +252 -0
  5. package/public/rjbuild/component-doc/chartjs/overview.yaml +51 -0
  6. package/public/rjbuild/component-doc/core/action/HashChangeListener.md +90 -0
  7. package/public/rjbuild/component-doc/core/action/HashChangeListener.yaml +124 -0
  8. package/public/rjbuild/component-doc/core/action/Hide.md +22 -0
  9. package/public/rjbuild/component-doc/core/action/Hide.yaml +60 -0
  10. package/public/rjbuild/component-doc/core/action/MessageListener.md +93 -0
  11. package/public/rjbuild/component-doc/core/action/MessageListener.yaml +153 -0
  12. package/public/rjbuild/component-doc/core/action/Popover.md +26 -0
  13. package/public/rjbuild/component-doc/core/action/Popover.yaml +100 -0
  14. package/public/rjbuild/component-doc/core/action/ReactOnEvent.md +81 -0
  15. package/public/rjbuild/component-doc/core/action/ReactOnEvent.yaml +133 -0
  16. package/public/rjbuild/component-doc/core/action/Redirect.md +20 -0
  17. package/public/rjbuild/component-doc/core/action/Redirect.yaml +68 -0
  18. package/public/rjbuild/component-doc/core/action/Tooltip.md +22 -0
  19. package/public/rjbuild/component-doc/core/action/Tooltip.yaml +90 -0
  20. package/public/rjbuild/component-doc/core/action/VisuallyHide.md +21 -0
  21. package/public/rjbuild/component-doc/core/action/VisuallyHide.yaml +62 -0
  22. package/public/rjbuild/component-doc/core/action/index.md +214 -0
  23. package/public/rjbuild/component-doc/core/action/index.yaml +278 -0
  24. package/public/rjbuild/component-doc/core/element/form/CheckBoxField.md +276 -0
  25. package/public/rjbuild/component-doc/core/element/form/CheckBoxField.yaml +338 -0
  26. package/public/rjbuild/component-doc/core/element/form/DateField.md +189 -0
  27. package/public/rjbuild/component-doc/core/element/form/DateField.yaml +264 -0
  28. package/public/rjbuild/component-doc/core/element/form/NumberField.md +136 -0
  29. package/public/rjbuild/component-doc/core/element/form/NumberField.yaml +103 -0
  30. package/public/rjbuild/component-doc/core/element/form/SelectField.md +304 -0
  31. package/public/rjbuild/component-doc/core/element/form/SelectField.yaml +360 -0
  32. package/public/rjbuild/component-doc/core/element/form/TextAreaField.md +134 -0
  33. package/public/rjbuild/component-doc/core/element/form/TextAreaField.yaml +146 -0
  34. package/public/rjbuild/component-doc/core/element/form/TextField.md +129 -0
  35. package/public/rjbuild/component-doc/core/element/form/TextField.yaml +147 -0
  36. package/public/rjbuild/component-doc/core/element/form/formElementsCommon.md +106 -0
  37. package/public/rjbuild/component-doc/core/element/form/index.md +50 -0
  38. package/public/rjbuild/component-doc/core/element/form/index.yaml +96 -0
  39. package/public/rjbuild/component-doc/core/element/html/AccordionItem.yaml +47 -0
  40. package/public/rjbuild/component-doc/core/element/html/FolderSortableTree.yaml +81 -0
  41. package/public/rjbuild/component-doc/core/element/html/FormatNumeral.yaml +58 -0
  42. package/public/rjbuild/component-doc/core/element/html/Html.yaml +67 -0
  43. package/public/rjbuild/component-doc/core/element/html/LabelFromValue.yaml +54 -0
  44. package/public/rjbuild/component-doc/core/element/html/Modal.yaml +93 -0
  45. package/public/rjbuild/component-doc/core/element/html/PreformattedMarkup.yaml +37 -0
  46. package/public/rjbuild/component-doc/core/element/html/SortableTreeItemCollapseButton.yaml +92 -0
  47. package/public/rjbuild/component-doc/core/element/html/Tabs.yaml +57 -0
  48. package/public/rjbuild/component-doc/core/element/special/BootstrapElement.md +17 -0
  49. package/public/rjbuild/component-doc/core/element/special/BootstrapElement.yaml +18 -0
  50. package/public/rjbuild/component-doc/core/element/special/Count.md +37 -0
  51. package/public/rjbuild/component-doc/core/element/special/Count.yaml +325 -0
  52. package/public/rjbuild/component-doc/core/element/special/DataFilter.md +149 -0
  53. package/public/rjbuild/component-doc/core/element/special/DataFilter.yaml +315 -0
  54. package/public/rjbuild/component-doc/core/element/special/DelayedActions.md +51 -0
  55. package/public/rjbuild/component-doc/core/element/special/DelayedActions.yaml +55 -0
  56. package/public/rjbuild/component-doc/core/element/special/PageControls.md +126 -0
  57. package/public/rjbuild/component-doc/core/element/special/PageControls.yaml +133 -0
  58. package/public/rjbuild/component-doc/core/element/special/Phantom.md +31 -0
  59. package/public/rjbuild/component-doc/core/element/special/Phantom.yaml +34 -0
  60. package/public/rjbuild/component-doc/core/element/special/ReactiveJsonSubroot.md +27 -0
  61. package/public/rjbuild/component-doc/core/element/special/ReactiveJsonSubroot.yaml +51 -0
  62. package/public/rjbuild/component-doc/core/element/special/Switch.md +262 -0
  63. package/public/rjbuild/component-doc/core/element/special/Switch.yaml +348 -0
  64. package/public/rjbuild/component-doc/core/example/accordion.md +96 -0
  65. package/public/rjbuild/component-doc/core/example/accordion.yaml +64 -0
  66. package/public/rjbuild/component-doc/core/example/dynamic-content.md +197 -0
  67. package/public/rjbuild/component-doc/core/example/dynamic-content.yaml +237 -0
  68. package/public/rjbuild/component-doc/core/example/html.md +66 -0
  69. package/public/rjbuild/component-doc/core/example/html.yaml +83 -0
  70. package/public/rjbuild/component-doc/core/example/website.yaml +1663 -0
  71. package/public/rjbuild/component-doc/core/reaction/addData.md +96 -0
  72. package/public/rjbuild/component-doc/core/reaction/addData.yaml +133 -0
  73. package/public/rjbuild/component-doc/core/reaction/fetchData.md +60 -0
  74. package/public/rjbuild/component-doc/core/reaction/fetchData.yaml +156 -0
  75. package/public/rjbuild/component-doc/core/reaction/index.md +236 -0
  76. package/public/rjbuild/component-doc/core/reaction/index.yaml +254 -0
  77. package/public/rjbuild/component-doc/core/reaction/moveData.md +68 -0
  78. package/public/rjbuild/component-doc/core/reaction/moveData.yaml +71 -0
  79. package/public/rjbuild/component-doc/core/reaction/postMessage.md +63 -0
  80. package/public/rjbuild/component-doc/core/reaction/postMessage.yaml +68 -0
  81. package/public/rjbuild/component-doc/core/reaction/redirectNow.md +37 -0
  82. package/public/rjbuild/component-doc/core/reaction/redirectNow.yaml +37 -0
  83. package/public/rjbuild/component-doc/core/reaction/removeData.md +78 -0
  84. package/public/rjbuild/component-doc/core/reaction/removeData.yaml +56 -0
  85. package/public/rjbuild/component-doc/core/reaction/setClipboardData.md +44 -0
  86. package/public/rjbuild/component-doc/core/reaction/setClipboardData.yaml +41 -0
  87. package/public/rjbuild/component-doc/core/reaction/setData.md +93 -0
  88. package/public/rjbuild/component-doc/core/reaction/setData.yaml +85 -0
  89. package/public/rjbuild/component-doc/core/reaction/submitData.md +138 -0
  90. package/public/rjbuild/component-doc/core/reaction/submitData.yaml +141 -0
  91. package/public/rjbuild/component-doc/core/reaction/triggerEvent.md +59 -0
  92. package/public/rjbuild/component-doc/core/reaction/triggerEvent.yaml +59 -0
  93. package/public/rjbuild/component-doc/index.yaml +13 -0
@@ -0,0 +1,237 @@
1
+ renderView:
2
+ - type: RjBuildDescriber
3
+ title: Dynamic content
4
+ description:
5
+ - type: div
6
+ content: The following demonstrated content is a table with edit modals, select/unselect and delete buttons.
7
+ toDescribe:
8
+ renderView:
9
+ - type: DataFilter
10
+ context: global
11
+ filters:
12
+ - subjectsWithProperty: dynamicContentRow
13
+ andConditions:
14
+ - orConditions:
15
+ - when: ~~._search
16
+ isEmpty:
17
+ - whenFilterableData: dynamicContentRow.title
18
+ contains: ~~._search
19
+
20
+ content:
21
+ load: mainContent
22
+
23
+ - type: div
24
+ attributes:
25
+ style:
26
+ paddingTop: 10em
27
+ templates:
28
+ mainContent:
29
+ - type: h2
30
+ content: Dynamic content
31
+ - type: div
32
+ content: We will now demonstrate how to build dynamic interfaces.
33
+
34
+
35
+ - type: TextField
36
+ placeholder: Insert some text to search here...
37
+ dataLocation: ~~._search
38
+
39
+ - type: BsButton
40
+ attributes:
41
+ class: btn btn-link
42
+ content: Select All
43
+ actions:
44
+ - what: postMessage
45
+ on: click
46
+ message:
47
+ actor: select_all
48
+
49
+ - type: BsButton
50
+ attributes:
51
+ class: btn btn-link
52
+ content: Unselect All
53
+ actions:
54
+ - what: postMessage
55
+ on: click
56
+ message:
57
+ actor: unselect_all
58
+
59
+ - type: BsButton
60
+ content: Bulk delete
61
+ actions:
62
+ - what: hide
63
+ whenDataCountOf: $.rows[*][?(@.selected == true)]
64
+ inContext: global
65
+ is: 0
66
+ - what: postMessage
67
+ on: click
68
+ message:
69
+ actor: bulk_delete_selected
70
+
71
+
72
+ - type: table
73
+ attributes:
74
+ class: table
75
+ content:
76
+ type: tbody
77
+ content:
78
+ - type: Switch
79
+ content: ~~.rows
80
+ paginated: true
81
+ paginationProps:
82
+ maxPageButtonsCount: 5
83
+ pageMaxItemCount: 7
84
+ options:
85
+ dynamicContentRow:
86
+ load: dynamicContentRow
87
+ after:
88
+ type: tr
89
+ content:
90
+ type: td
91
+ attributes:
92
+ colSpan: 3
93
+ content:
94
+ type: PageControls
95
+
96
+ - type: BsButton
97
+ content: Add a row
98
+ actions:
99
+ - what: addData
100
+ on: click
101
+ path: ~~.rows
102
+ value:
103
+ dynamicContentRow:
104
+ selected: false
105
+ title: Please edit the title
106
+
107
+ dynamicContentRow:
108
+ type: tr
109
+ actions:
110
+ - what: removeData
111
+ on: message
112
+ whenMessageIs:
113
+ actor: bulk_delete_selected
114
+ when: ~.selected
115
+ is: true
116
+ target: currentTemplateData
117
+ parentLevel: 1
118
+ content:
119
+ select:
120
+ type: td
121
+ content:
122
+ type: CheckBoxField
123
+ dataLocation: ~.selected
124
+ options:
125
+ - value: true
126
+ actions:
127
+ - what: setData
128
+ path: ~.selected
129
+ value: true
130
+ on: message
131
+ whenMessageIs:
132
+ actor: select_all
133
+ - what: setData
134
+ path: ~.selected
135
+ value: false
136
+ on: message
137
+ whenMessageIs:
138
+ actor: unselect_all
139
+ title:
140
+ type: td
141
+ content:
142
+ type: div
143
+ content: ~.title
144
+ actions:
145
+ type: td
146
+ content:
147
+ - type: BsButton
148
+ content: Edit
149
+ actions:
150
+ - what: setData
151
+ on: click
152
+ path: ~._openEditModal
153
+ value: true
154
+ - type: Modal
155
+ showBoolPath: ~._openEditModal
156
+ headerTitle:
157
+ - "Edit the content "
158
+ - type: em
159
+ content: ~.title
160
+ body:
161
+ - type: TextField
162
+ dataLocation: ~.title
163
+ label: Content title
164
+ - type: BsButton
165
+ content: OK
166
+ actions:
167
+ - what: setData
168
+ on: click
169
+ path: ~._openEditModal
170
+
171
+ data:
172
+ rows:
173
+ - dynamicContentRow:
174
+ selected: false
175
+ title: Content name A
176
+ - dynamicContentRow:
177
+ selected: false
178
+ title: Content name B
179
+ - dynamicContentRow:
180
+ selected: false
181
+ title: Content name C
182
+ - dynamicContentRow:
183
+ selected: false
184
+ title: Content name D
185
+ - dynamicContentRow:
186
+ selected: false
187
+ title: Content name E
188
+ - dynamicContentRow:
189
+ selected: false
190
+ title: Content name F
191
+ - dynamicContentRow:
192
+ selected: false
193
+ title: Content name G
194
+ - dynamicContentRow:
195
+ selected: false
196
+ title: Content name H
197
+ - dynamicContentRow:
198
+ selected: false
199
+ title: Content name I
200
+ - dynamicContentRow:
201
+ selected: false
202
+ title: Content name J
203
+ - dynamicContentRow:
204
+ selected: false
205
+ title: Content name K
206
+ - dynamicContentRow:
207
+ selected: false
208
+ title: Content name L
209
+ - dynamicContentRow:
210
+ selected: false
211
+ title: Content name M
212
+ - dynamicContentRow:
213
+ selected: false
214
+ title: Content name N
215
+ - dynamicContentRow:
216
+ selected: false
217
+ title: Content name O
218
+ - dynamicContentRow:
219
+ selected: false
220
+ title: Content name P
221
+ - dynamicContentRow:
222
+ selected: false
223
+ title: Content name Q
224
+ - dynamicContentRow:
225
+ selected: false
226
+ title: Content name R
227
+ - dynamicContentRow:
228
+ selected: false
229
+ title: Content name S
230
+ - dynamicContentRow:
231
+ selected: false
232
+ title: Content name T
233
+
234
+
235
+ templates:
236
+
237
+ data: {}
@@ -0,0 +1,66 @@
1
+ # HTML Components Examples
2
+
3
+ ## Basic HTML Usage
4
+
5
+ All HTML tags can be added to an RjBuild. To use an HTML tag, simply add an object to your RjBuild with the HTML tag name as the `type` property in lowercase. The content of the tag is set using the `content` property.
6
+
7
+ ### Basic Example
8
+ ```yaml
9
+ renderView:
10
+ - type: p
11
+ content: This is a paragraph using the HTML component.
12
+ ```
13
+
14
+ ## Nesting Content
15
+
16
+ HTML components can be nested within each other to create complex structures.
17
+
18
+ ### Nested Elements Example
19
+ ```yaml
20
+ renderView:
21
+ - type: div
22
+ content:
23
+ - "This is a text value. "
24
+ - type: strong
25
+ content:
26
+ - "This text is strong. "
27
+ - type: em
28
+ content: "This text is strong and slanted/italic."
29
+ ```
30
+
31
+ ## HTML Attributes
32
+
33
+ HTML attributes are supported through the `attributes` property. Each attribute can be assigned a string value.
34
+
35
+ ### Styling with Attributes
36
+
37
+ > **Important Note about Inline Styles**
38
+ >
39
+ > When using inline styles, you must use a specific structure:
40
+ > - Use an object with CSS properties as keys
41
+ > - Use camelCase for property names instead of hyphen-based CSS casing
42
+ > - For example, use `backgroundColor` instead of `background-color`
43
+
44
+ ### Example with Attributes and Styles
45
+ ```yaml
46
+ renderView:
47
+ - type: div
48
+ attributes:
49
+ data-attr: Hello!
50
+ style:
51
+ backgroundColor: rgb(250,242,0)
52
+ padding: 0.5em
53
+ content:
54
+ - "This is a "
55
+ - type: code
56
+ content: div
57
+ - " with a yellow background and padding set as style attributes."
58
+ ```
59
+
60
+ ## Key Points
61
+
62
+ 1. Use lowercase HTML tag names as the `type`
63
+ 2. Set content using the `content` property
64
+ 3. Nest elements by adding them to the content array
65
+ 4. Use `attributes` for HTML attributes
66
+ 5. Use camelCase for style property names
@@ -0,0 +1,83 @@
1
+ renderView:
2
+ - type: RjBuildDescriber
3
+ title: HTML
4
+ description:
5
+ - type: p
6
+ content: All the HTML tags can be added to an RjBuild.
7
+ - type: p
8
+ content:
9
+ - "Add an object to an RjBuild with the HTML tag as the "
10
+ - type: code
11
+ content: type
12
+ - " property, in lowercase."
13
+ - type: p
14
+ content:
15
+ - "To set the content of the tag, set the value into the "
16
+ - type: code
17
+ content: content
18
+ - " property."
19
+ toDescribe:
20
+ renderView:
21
+ - type: p
22
+ content: This is a paragraph using the HTML component.
23
+ templates:
24
+ data: { }
25
+
26
+ - type: RjBuildDescriber
27
+ title: Nesting content
28
+ description:
29
+ - type: p
30
+ content: "Of course, you can nest HTML into HTML."
31
+ toDescribe:
32
+ renderView:
33
+ - type: div
34
+ content:
35
+ - "This is a text value. "
36
+ - type: strong
37
+ content:
38
+ - "This text is strong. "
39
+ - type: em
40
+ content: "This text is strong and slanted/italic."
41
+ templates:
42
+ data: { }
43
+
44
+ - type: RjBuildDescriber
45
+ title: HTML attributes
46
+ description:
47
+ - type: Markdown
48
+ content: |
49
+ HTML attributes are also supported.
50
+
51
+ Attributes may be added through the `attributes` property. Assign a string
52
+ value to each attribute.
53
+ - type: BsAlert
54
+ attributes:
55
+ variant: warning
56
+ content:
57
+ type: Markdown
58
+ content:
59
+ Inline styles have a specific structure. Instead of the string value, you must
60
+ specify an object with the CSS property as the key, and CSS value as the value.
61
+ Each key must be using **camelCase** instead of the usual hyphen-based CSS casing.
62
+
63
+ In the following example, `backgroundColor` is used for the `background-color`
64
+ CSS property.
65
+ toDescribe:
66
+ renderView:
67
+ - type: div
68
+ attributes:
69
+ data-attr: Hello!
70
+ style:
71
+ backgroundColor: rgb(250,242,0)
72
+ padding: 0.5em
73
+ content:
74
+ - "This is a "
75
+ - type: code
76
+ content: div
77
+ - " with a yellow background and padding set as style attributes."
78
+ templates:
79
+ data: { }
80
+
81
+ templates:
82
+
83
+ data: { }