commons-shared-web-ui 0.0.50 → 0.0.51

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 (186) hide show
  1. package/fesm2022/commons-shared-web-ui.mjs +13828 -0
  2. package/fesm2022/commons-shared-web-ui.mjs.map +1 -0
  3. package/index.d.ts +4258 -0
  4. package/package.json +34 -53
  5. package/.claude/settings.local.json +0 -10
  6. package/documentation/alert.md +0 -123
  7. package/documentation/button-dropdown.md +0 -126
  8. package/documentation/button.md +0 -184
  9. package/documentation/cards-usage-guidelines.md +0 -131
  10. package/documentation/configurable-form.md +0 -605
  11. package/documentation/confirmation-modal.md +0 -250
  12. package/documentation/filter-sidebar.md +0 -178
  13. package/documentation/filter-table-selector.md +0 -228
  14. package/documentation/form-builder.md +0 -597
  15. package/documentation/form-components.md +0 -384
  16. package/documentation/nav.md +0 -427
  17. package/documentation/pagination.md +0 -181
  18. package/documentation/side-nav-documentation.md +0 -169
  19. package/documentation/smart-form.md +0 -2405
  20. package/documentation/smart-table.md +0 -1221
  21. package/documentation/snackbar.md +0 -118
  22. package/documentation/style-externalization.md +0 -88
  23. package/documentation/summary-card.md +0 -279
  24. package/ng-package.json +0 -28
  25. package/src/lib/modules/alert/alert.models.ts +0 -6
  26. package/src/lib/modules/alert/alert.module.ts +0 -16
  27. package/src/lib/modules/alert/components/alert/alert.component.html +0 -27
  28. package/src/lib/modules/alert/components/alert/alert.component.scss +0 -92
  29. package/src/lib/modules/alert/components/alert/alert.component.ts +0 -81
  30. package/src/lib/modules/button/button.models.ts +0 -13
  31. package/src/lib/modules/button/button.module.ts +0 -16
  32. package/src/lib/modules/button/components/button/button.component.html +0 -22
  33. package/src/lib/modules/button/components/button/button.component.scss +0 -88
  34. package/src/lib/modules/button/components/button/button.component.ts +0 -67
  35. package/src/lib/modules/button-dropdown/button-dropdown.models.ts +0 -26
  36. package/src/lib/modules/button-dropdown/button-dropdown.module.ts +0 -22
  37. package/src/lib/modules/button-dropdown/button-dropdown.theme.scss +0 -87
  38. package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.html +0 -41
  39. package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.scss +0 -135
  40. package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.ts +0 -160
  41. package/src/lib/modules/configurable-form/component/configurable-form.component.html +0 -294
  42. package/src/lib/modules/configurable-form/component/configurable-form.component.scss +0 -503
  43. package/src/lib/modules/configurable-form/component/configurable-form.component.ts +0 -628
  44. package/src/lib/modules/configurable-form/configurable-form.examples.ts +0 -154
  45. package/src/lib/modules/configurable-form/configurable-form.model.ts +0 -131
  46. package/src/lib/modules/configurable-form/configurable-form.module.ts +0 -19
  47. package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.html +0 -77
  48. package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.scss +0 -395
  49. package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.ts +0 -266
  50. package/src/lib/modules/confirmation-modal/confirmation-modal.models.ts +0 -71
  51. package/src/lib/modules/confirmation-modal/confirmation-modal.module.ts +0 -20
  52. package/src/lib/modules/filter/components/filter/filter.component.html +0 -131
  53. package/src/lib/modules/filter/components/filter/filter.component.scss +0 -245
  54. package/src/lib/modules/filter/components/filter/filter.component.ts +0 -216
  55. package/src/lib/modules/filter/filter.models.ts +0 -88
  56. package/src/lib/modules/filter/filter.module.ts +0 -24
  57. package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.html +0 -112
  58. package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.scss +0 -186
  59. package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.ts +0 -163
  60. package/src/lib/modules/filter-sidebar/filter-sidebar.models.ts +0 -95
  61. package/src/lib/modules/filter-sidebar/filter-sidebar.module.ts +0 -24
  62. package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.html +0 -73
  63. package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.scss +0 -321
  64. package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.ts +0 -361
  65. package/src/lib/modules/filter-table-selector/filter-table-selector.models.ts +0 -91
  66. package/src/lib/modules/filter-table-selector/filter-table-selector.module.ts +0 -22
  67. package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.html +0 -63
  68. package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.scss +0 -496
  69. package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.ts +0 -445
  70. package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.html +0 -75
  71. package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.scss +0 -210
  72. package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.ts +0 -55
  73. package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.html +0 -25
  74. package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.scss +0 -82
  75. package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.ts +0 -95
  76. package/src/lib/modules/form-builder/components/field-selection/field-selection.component.html +0 -20
  77. package/src/lib/modules/form-builder/components/field-selection/field-selection.component.scss +0 -37
  78. package/src/lib/modules/form-builder/components/field-selection/field-selection.component.ts +0 -94
  79. package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.html +0 -46
  80. package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.scss +0 -102
  81. package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.ts +0 -50
  82. package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.html +0 -35
  83. package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.scss +0 -67
  84. package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.ts +0 -34
  85. package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.html +0 -68
  86. package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.scss +0 -113
  87. package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.ts +0 -74
  88. package/src/lib/modules/form-builder/configs/field-type-schema.map.ts +0 -533
  89. package/src/lib/modules/form-builder/form-builder.module.ts +0 -36
  90. package/src/lib/modules/form-builder/index.ts +0 -9
  91. package/src/lib/modules/form-builder/models/builder.models.ts +0 -7
  92. package/src/lib/modules/form-builder/models/field-configurator.models.ts +0 -38
  93. package/src/lib/modules/form-builder/models/field-selection.models.ts +0 -51
  94. package/src/lib/modules/form-builder/services/field-configurator.service.ts +0 -258
  95. package/src/lib/modules/form-builder/services/field-selection.service.ts +0 -299
  96. package/src/lib/modules/form-builder/services/form-schema-tree.service.ts +0 -670
  97. package/src/lib/modules/form-builder/tokens/builder.tokens.ts +0 -10
  98. package/src/lib/modules/form-builder/utils/constants.ts +0 -43
  99. package/src/lib/modules/form-components/components/checkbox/checkbox.component.html +0 -29
  100. package/src/lib/modules/form-components/components/checkbox/checkbox.component.scss +0 -111
  101. package/src/lib/modules/form-components/components/checkbox/checkbox.component.ts +0 -207
  102. package/src/lib/modules/form-components/components/checkbox/checkbox.models.ts +0 -35
  103. package/src/lib/modules/form-components/components/datepicker/datepicker.component.html +0 -42
  104. package/src/lib/modules/form-components/components/datepicker/datepicker.component.scss +0 -115
  105. package/src/lib/modules/form-components/components/datepicker/datepicker.component.ts +0 -267
  106. package/src/lib/modules/form-components/components/datepicker/datepicker.models.ts +0 -45
  107. package/src/lib/modules/form-components/components/dropdown/dropdown.component.html +0 -74
  108. package/src/lib/modules/form-components/components/dropdown/dropdown.component.scss +0 -252
  109. package/src/lib/modules/form-components/components/dropdown/dropdown.component.ts +0 -377
  110. package/src/lib/modules/form-components/components/dropdown/dropdown.models.ts +0 -53
  111. package/src/lib/modules/form-components/components/input/input.component.html +0 -51
  112. package/src/lib/modules/form-components/components/input/input.component.scss +0 -128
  113. package/src/lib/modules/form-components/components/input/input.component.ts +0 -250
  114. package/src/lib/modules/form-components/components/input/input.models.ts +0 -55
  115. package/src/lib/modules/form-components/components/radio/radio.component.html +0 -22
  116. package/src/lib/modules/form-components/components/radio/radio.component.scss +0 -107
  117. package/src/lib/modules/form-components/components/radio/radio.component.ts +0 -181
  118. package/src/lib/modules/form-components/components/radio/radio.models.ts +0 -39
  119. package/src/lib/modules/form-components/components/search/search.component.html +0 -15
  120. package/src/lib/modules/form-components/components/search/search.component.scss +0 -87
  121. package/src/lib/modules/form-components/components/search/search.component.ts +0 -213
  122. package/src/lib/modules/form-components/components/search/search.models.ts +0 -40
  123. package/src/lib/modules/form-components/components/toggle/toggle.component.html +0 -15
  124. package/src/lib/modules/form-components/components/toggle/toggle.component.scss +0 -81
  125. package/src/lib/modules/form-components/components/toggle/toggle.component.ts +0 -166
  126. package/src/lib/modules/form-components/components/toggle/toggle.models.ts +0 -27
  127. package/src/lib/modules/form-components/directives/click-outside.directive.ts +0 -22
  128. package/src/lib/modules/form-components/form-components.module.ts +0 -41
  129. package/src/lib/modules/material/material.module.ts +0 -94
  130. package/src/lib/modules/nav/components/nav/nav.component.html +0 -34
  131. package/src/lib/modules/nav/components/nav/nav.component.scss +0 -171
  132. package/src/lib/modules/nav/components/nav/nav.component.ts +0 -82
  133. package/src/lib/modules/nav/nav.models.ts +0 -31
  134. package/src/lib/modules/nav/nav.module.ts +0 -17
  135. package/src/lib/modules/pagination/components/pagination/pagination.component.html +0 -52
  136. package/src/lib/modules/pagination/components/pagination/pagination.component.scss +0 -155
  137. package/src/lib/modules/pagination/components/pagination/pagination.component.ts +0 -109
  138. package/src/lib/modules/pagination/pagination.module.ts +0 -17
  139. package/src/lib/modules/side-nav/components/side-nav/side-nav.component.html +0 -56
  140. package/src/lib/modules/side-nav/components/side-nav/side-nav.component.scss +0 -342
  141. package/src/lib/modules/side-nav/components/side-nav/side-nav.component.ts +0 -135
  142. package/src/lib/modules/side-nav/side-nav.models.ts +0 -38
  143. package/src/lib/modules/side-nav/side-nav.module.ts +0 -16
  144. package/src/lib/modules/smart-form/components/form-field/form-field.component.html +0 -1196
  145. package/src/lib/modules/smart-form/components/form-field/form-field.component.scss +0 -2014
  146. package/src/lib/modules/smart-form/components/form-field/form-field.component.ts +0 -2525
  147. package/src/lib/modules/smart-form/components/form-section/form-section.component.html +0 -65
  148. package/src/lib/modules/smart-form/components/form-section/form-section.component.scss +0 -209
  149. package/src/lib/modules/smart-form/components/form-section/form-section.component.ts +0 -131
  150. package/src/lib/modules/smart-form/components/smart-form/smart-form.component.html +0 -253
  151. package/src/lib/modules/smart-form/components/smart-form/smart-form.component.scss +0 -689
  152. package/src/lib/modules/smart-form/components/smart-form/smart-form.component.ts +0 -1124
  153. package/src/lib/modules/smart-form/index.ts +0 -10
  154. package/src/lib/modules/smart-form/models/form-schema.model.ts +0 -733
  155. package/src/lib/modules/smart-form/models/hierarchy-config.model.ts +0 -21
  156. package/src/lib/modules/smart-form/services/expression.service.ts +0 -75
  157. package/src/lib/modules/smart-form/services/smart-form-controller.service.ts +0 -65
  158. package/src/lib/modules/smart-form/smart-form.examples.ts +0 -1324
  159. package/src/lib/modules/smart-form/smart-form.module.ts +0 -36
  160. package/src/lib/modules/smart-form/utils/translation.utils.ts +0 -82
  161. package/src/lib/modules/smart-form/utils/trusted-url.pipe.ts +0 -25
  162. package/src/lib/modules/smart-form/utils/validation.utils.ts +0 -98
  163. package/src/lib/modules/smart-table/components/smart-table/smart-table.component.html +0 -283
  164. package/src/lib/modules/smart-table/components/smart-table/smart-table.component.scss +0 -685
  165. package/src/lib/modules/smart-table/components/smart-table/smart-table.component.ts +0 -1128
  166. package/src/lib/modules/smart-table/models/table-config.model.ts +0 -207
  167. package/src/lib/modules/smart-table/smart-table.module.ts +0 -30
  168. package/src/lib/modules/smart-table/utils/safe-html.pipe.ts +0 -28
  169. package/src/lib/modules/smart-table/utils/smart-table.utils.ts +0 -18
  170. package/src/lib/modules/snackbar/components/snackbar.component.html +0 -41
  171. package/src/lib/modules/snackbar/components/snackbar.component.scss +0 -99
  172. package/src/lib/modules/snackbar/components/snackbar.component.ts +0 -18
  173. package/src/lib/modules/snackbar/models/snackbar.models.ts +0 -10
  174. package/src/lib/modules/snackbar/services/snackbar.service.ts +0 -40
  175. package/src/lib/modules/snackbar/snackbar.module.ts +0 -11
  176. package/src/lib/modules/summary-card/components/summary-card/summary-card.component.html +0 -47
  177. package/src/lib/modules/summary-card/components/summary-card/summary-card.component.scss +0 -199
  178. package/src/lib/modules/summary-card/components/summary-card/summary-card.component.ts +0 -126
  179. package/src/lib/modules/summary-card/summary-card.module.ts +0 -18
  180. package/src/lib/shared-ui.module.ts +0 -44
  181. package/src/lib/utils/constants.ts +0 -11
  182. package/src/lib/utils/storage.utils.ts +0 -37
  183. package/src/lib/utils/string.utils.ts +0 -23
  184. package/src/lib/utils/translation.utils.ts +0 -87
  185. package/src/public-api.ts +0 -104
  186. package/tsconfig.lib.json +0 -15
@@ -1,1324 +0,0 @@
1
- export const SAMPLE_FORMS = {
2
- // Simple Contact Form
3
- contactForm: `{
4
- "entityType": "CONTACT",
5
- "label": "Contact Us",
6
- "description": "Send us a message",
7
- "formType": "SECTION",
8
- "sectionConfig": {
9
- "children": [
10
- {
11
- "name": "name",
12
- "label": "Full Name",
13
- "type": "TEXT_INPUT",
14
- "subType": "SHORT",
15
- "required": true,
16
- "hint": "Enter your full name"
17
- },
18
- {
19
- "name": "email",
20
- "label": "Email Address",
21
- "type": "TEXT_INPUT",
22
- "subType": "EMAIL",
23
- "required": true,
24
- "hint": "your.email@example.com"
25
- },
26
- {
27
- "name": "meetingTime",
28
- "label": "Meeting Time",
29
- "type": "TIME",
30
- "subType": "SINGLE",
31
- "required": true,
32
- "placeholder": "Select a time"
33
- },
34
- {
35
- "name": "message",
36
- "label": "Message",
37
- "type": "TEXT_INPUT",
38
- "subType": "LONG",
39
- "required": true,
40
- "textConfig": {
41
- "length": {
42
- "min": 10,
43
- "max": 500
44
- }
45
- }
46
- }
47
- ]
48
- }
49
- }`,
50
-
51
- // User Registration with Stepper
52
- registrationForm: `{
53
- "entityType": "USER",
54
- "label": "User Registration",
55
- "description": "Create your account",
56
- "formType": "STEPPER",
57
- "stepperConfig": {
58
- "children": [
59
- {
60
- "type": "GROUP",
61
- "subType": "SECTION",
62
- "sectionConfig": {
63
- "label": "Personal Information",
64
- "children": [
65
- {
66
- "type": "ROW",
67
- "subType": "HORIZONTAL",
68
- "children": [
69
- {
70
- "name": "firstName",
71
- "label": "First Name",
72
- "type": "TEXT_INPUT",
73
- "subType": "SHORT",
74
- "required": true
75
- },
76
- {
77
- "name": "lastName",
78
- "label": "Last Name",
79
- "type": "TEXT_INPUT",
80
- "subType": "SHORT",
81
- "required": true
82
- }
83
- ]
84
- },
85
- {
86
- "name": "fullName",
87
- "label": "Full Name",
88
- "type": "GENERATED",
89
- "subType": "FORMULA",
90
- "generatedConfig": {
91
- "formula": "function fullName(first, last) { return (first || '') + ' ' + (last || ''); }",
92
- "variables": ["firstName", "lastName"]
93
- }
94
- },
95
- {
96
- "name": "dateOfBirth",
97
- "label": "Date of Birth",
98
- "type": "DATE",
99
- "subType": "SINGLE",
100
- "required": true,
101
- "dateConfig": {
102
- "allowFuture": false
103
- }
104
- }
105
- ]
106
- }
107
- },
108
- {
109
- "type": "GROUP",
110
- "subType": "SECTION",
111
- "sectionConfig": {
112
- "label": "Contact Information",
113
- "children": [
114
- {
115
- "name": "email",
116
- "label": "Email",
117
- "type": "TEXT_INPUT",
118
- "subType": "EMAIL",
119
- "required": true
120
- },
121
- {
122
- "name": "phone",
123
- "label": "Phone Number",
124
- "type": "TEXT_INPUT",
125
- "subType": "PHONE",
126
- "required": true
127
- }
128
- ]
129
- }
130
- },
131
- {
132
- "type": "GROUP",
133
- "subType": "SECTION",
134
- "sectionConfig": {
135
- "label": "Preferences",
136
- "children": [
137
- {
138
- "name": "notifications",
139
- "label": "Enable Email Notifications",
140
- "type": "SWITCH",
141
- "subType": "BOOL",
142
- "defaultValue": true
143
- },
144
- {
145
- "name": "interests",
146
- "label": "Interests",
147
- "type": "CHIP",
148
- "subType": "MULTIPLE",
149
- "optionConfig": {
150
- "optionList": [
151
- { "label": "Technology", "code": "TECH" },
152
- { "label": "Sports", "code": "SPORTS" },
153
- { "label": "Music", "code": "MUSIC" },
154
- { "label": "Travel", "code": "TRAVEL" }
155
- ]
156
- }
157
- }
158
- ]
159
- }
160
- }
161
- ],
162
- "showStep": true,
163
- "isHorizontal": true
164
- }
165
- }`,
166
-
167
- // Survey Form with Conditional Fields
168
- surveyForm: `{
169
- "entityType": "SURVEY",
170
- "label": "Customer Satisfaction Survey",
171
- "formType": "SECTION",
172
- "sectionConfig": {
173
- "children": [
174
- {
175
- "name": "overallRating",
176
- "label": "Overall Experience",
177
- "type": "RATING",
178
- "subType": "STAR",
179
- "required": true,
180
- "ratingConfig": {
181
- "maxRating": 5,
182
- "allowHalf": false
183
- }
184
- },
185
- {
186
- "name": "wouldRecommend",
187
- "label": "Would you recommend us?",
188
- "type": "RADIO",
189
- "subType": "SINGLE",
190
- "required": true,
191
- "optionConfig": {
192
- "optionList": [
193
- { "label": "Yes", "code": "YES" },
194
- { "label": "No", "code": "NO" },
195
- { "label": "Maybe", "code": "MAYBE" }
196
- ]
197
- }
198
- },
199
- {
200
- "name": "reasonForNo",
201
- "label": "Why not?",
202
- "type": "TEXT_INPUT",
203
- "subType": "LONG",
204
- "visibilityExpression": "wouldRecommend === 'NO'",
205
- "required": true
206
- },
207
- {
208
- "name": "improvements",
209
- "label": "What can we improve?",
210
- "type": "CHECKBOX",
211
- "subType": "LIST",
212
- "optionConfig": {
213
- "optionList": [
214
- { "label": "Customer Service", "code": "SERVICE" },
215
- { "label": "Product Quality", "code": "QUALITY" },
216
- { "label": "Pricing", "code": "PRICE" },
217
- { "label": "Delivery Speed", "code": "DELIVERY" }
218
- ]
219
- }
220
- },
221
- {
222
- "name": "additionalComments",
223
- "label": "Additional Comments",
224
- "type": "TEXT_INPUT",
225
- "subType": "LONG",
226
- "textConfig": {
227
- "length": {
228
- "max": 1000
229
- }
230
- }
231
- }
232
- ]
233
- }
234
- }`,
235
-
236
- // Job Application Form
237
- jobApplicationForm: `{
238
- "entityType": "JOB_APPLICATION",
239
- "label": "Job Application",
240
- "description": "Apply for a position at our company",
241
- "formType": "STEPPER",
242
- "stepperConfig": {
243
- "children": [
244
- {
245
- "type": "GROUP",
246
- "subType": "SECTION",
247
- "sectionConfig": {
248
- "label": "Personal Details",
249
- "children": [
250
- {
251
- "type": "ROW",
252
- "subType": "HORIZONTAL",
253
- "children": [
254
- {
255
- "name": "firstName",
256
- "label": "First Name",
257
- "type": "TEXT_INPUT",
258
- "subType": "SHORT",
259
- "required": true
260
- },
261
- {
262
- "name": "lastName",
263
- "label": "Last Name",
264
- "type": "TEXT_INPUT",
265
- "subType": "SHORT",
266
- "required": true
267
- }
268
- ]
269
- },
270
- {
271
- "name": "email",
272
- "label": "Email",
273
- "type": "TEXT_INPUT",
274
- "subType": "EMAIL",
275
- "required": true
276
- },
277
- {
278
- "name": "phone",
279
- "label": "Phone",
280
- "type": "TEXT_INPUT",
281
- "subType": "PHONE",
282
- "required": true
283
- }
284
- ]
285
- }
286
- },
287
- {
288
- "type": "GROUP",
289
- "subType": "SECTION",
290
- "sectionConfig": {
291
- "label": "Experience",
292
- "allowMulti": true,
293
- "name": "experienceList",
294
- "children": [
295
- {
296
- "name": "company",
297
- "label": "Company Name",
298
- "type": "TEXT_INPUT",
299
- "subType": "SHORT",
300
- "required": true
301
- },
302
- {
303
- "name": "position",
304
- "label": "Position",
305
- "type": "TEXT_INPUT",
306
- "subType": "SHORT",
307
- "required": true
308
- },
309
- {
310
- "type": "ROW",
311
- "subType": "HORIZONTAL",
312
- "children": [
313
- {
314
- "name": "startDate",
315
- "label": "Start Date",
316
- "type": "DATE",
317
- "subType": "SINGLE",
318
- "required": true
319
- },
320
- {
321
- "name": "endDate",
322
- "label": "End Date",
323
- "type": "DATE",
324
- "subType": "SINGLE"
325
- }
326
- ]
327
- },
328
- {
329
- "name": "responsibilities",
330
- "label": "Key Responsibilities",
331
- "type": "TEXT_INPUT",
332
- "subType": "LONG"
333
- }
334
- ]
335
- }
336
- },
337
- {
338
- "type": "GROUP",
339
- "subType": "SECTION",
340
- "sectionConfig": {
341
- "label": "Skills & Qualifications",
342
- "children": [
343
- {
344
- "name": "skills",
345
- "label": "Technical Skills",
346
- "type": "CHIP",
347
- "subType": "MULTIPLE",
348
- "optionConfig": {
349
- "optionList": [
350
- { "label": "JavaScript", "code": "JS" },
351
- { "label": "TypeScript", "code": "TS" },
352
- { "label": "Angular", "code": "ANGULAR" },
353
- { "label": "React", "code": "REACT" },
354
- { "label": "Node.js", "code": "NODE" },
355
- { "label": "Python", "code": "PYTHON" }
356
- ]
357
- }
358
- },
359
- {
360
- "name": "yearsOfExperience",
361
- "label": "Years of Experience",
362
- "type": "NUMBER_INPUT",
363
- "subType": "INTEGER",
364
- "required": true,
365
- "numberConfig": {
366
- "min": 0,
367
- "max": 50
368
- }
369
- },
370
- {
371
- "name": "availableToStart",
372
- "label": "Available to Start",
373
- "type": "DATE",
374
- "subType": "SINGLE",
375
- "required": true,
376
- "dateConfig": {
377
- "allowFuture": true
378
- }
379
- }
380
- ]
381
- }
382
- }
383
- ],
384
- "showStep": true,
385
- "isHorizontal": true
386
- }
387
- }`,
388
-
389
- // Donor Form based on UI
390
- donorForm: `{
391
- "entityType": "DONOR",
392
- "label": "Donor Form",
393
- "formType": "SECTION",
394
- "sectionConfig": {
395
- "children": [
396
- {
397
- "type": "GROUP",
398
- "subType": "SECTION",
399
- "sectionConfig": {
400
- "label": "Donor Details",
401
- "name": "donorDetails",
402
- "children": [
403
- {
404
- "name": "legalName",
405
- "label": "Donor Legal Name",
406
- "type": "TEXT_INPUT",
407
- "subType": "SHORT",
408
- "required": true,
409
- "placeholder": "Enter the name"
410
- },
411
- {
412
- "type": "ROW",
413
- "subType": "HORIZONTAL",
414
- "children": [
415
- {
416
- "name": "shortCode",
417
- "label": "Donor Short Code",
418
- "type": "TEXT_INPUT",
419
- "subType": "SHORT",
420
- "colSpan": 3,
421
- "disabled": true,
422
- "defaultValue": "DLP-24-L1",
423
- "hint": "System-generated, unique internal code"
424
- },
425
- {
426
- "name": "donorType",
427
- "label": "Donor Type",
428
- "type": "DROPDOWN",
429
- "subType": "SINGLE",
430
- "colSpan": 3,
431
- "required": true,
432
- "placeholder": "Select",
433
- "optionConfig": {
434
- "optionList": [
435
- { "label": "Individual", "code": "INDIVIDUAL" },
436
- { "label": "Corporate", "code": "CORPORATE" },
437
- { "label": "Trust", "code": "TRUST" }
438
- ]
439
- }
440
- },
441
- {
442
- "name": "regNumber",
443
- "label": "Registration / Legal Entity Number",
444
- "type": "TEXT_INPUT",
445
- "subType": "SHORT",
446
- "colSpan": 3,
447
- "placeholder": "Type",
448
- "hint": "CIN / Trust Reg. No / Govt ID (if applicable)"
449
- },
450
- {
451
- "name": "country",
452
- "label": "Country of Incorporation",
453
- "type": "DROPDOWN",
454
- "subType": "SINGLE",
455
- "colSpan": 3,
456
- "required": true,
457
- "placeholder": "Select",
458
- "optionConfig": {
459
- "optionList": [
460
- { "label": "India", "code": "IN" },
461
- { "label": "USA", "code": "US" },
462
- { "label": "UK", "code": "UK" }
463
- ]
464
- }
465
- }
466
- ]
467
- },
468
- {
469
- "type": "ROW",
470
- "subType": "HORIZONTAL",
471
- "children": [
472
- {
473
- "name": "profilePicture",
474
- "label": "Profile Picture",
475
- "type": "FILE_UPLOAD",
476
- "subType": "SINGLE",
477
- "colSpan": 3,
478
- "attachmentConfig": {
479
- "multiple": false,
480
- "maxSizeMB": 2,
481
- "accept": "image/*",
482
- "acceptLabel": "JPG, PNG, SVG (max 2 MB)"
483
- }
484
- },
485
- {
486
- "name": "website",
487
- "label": "Organization Website (Optional)",
488
- "type": "TEXT_INPUT",
489
- "subType": "SHORT",
490
- "colSpan": 9,
491
- "placeholder": "Add your website link or LinkedIn profile",
492
- "hint": "Add your website link to automatically fetch your logo, powered by Clearbit."
493
- }
494
- ]
495
- }
496
- ]
497
- }
498
- },
499
- {
500
- "type": "GROUP",
501
- "subType": "SECTION",
502
- "sectionConfig": {
503
- "label": "Primary Contact",
504
- "allowMulti": true,
505
- "name": "contacts",
506
- "children": [
507
- {
508
- "type": "ROW",
509
- "subType": "HORIZONTAL",
510
- "children": [
511
- {
512
- "name": "contactName",
513
- "label": "Full Name",
514
- "type": "TEXT_INPUT",
515
- "subType": "SHORT",
516
- "colSpan": 6,
517
- "required": true,
518
- "placeholder": "Enter the name"
519
- },
520
- {
521
- "name": "designation",
522
- "label": "Designation/Title",
523
- "type": "DROPDOWN",
524
- "subType": "SINGLE",
525
- "colSpan": 6,
526
- "required": true,
527
- "placeholder": "Select",
528
- "optionConfig": {
529
- "optionList": [
530
- { "label": "CEO", "code": "CEO" },
531
- { "label": "Manager", "code": "MANAGER" },
532
- { "label": "Other", "code": "OTHER" }
533
- ]
534
- }
535
- }
536
- ]
537
- },
538
- {
539
- "type": "ROW",
540
- "subType": "HORIZONTAL",
541
- "children": [
542
- {
543
- "name": "email",
544
- "label": "Email Address",
545
- "type": "TEXT_INPUT",
546
- "subType": "EMAIL",
547
- "colSpan": 4,
548
- "required": true,
549
- "placeholder": "Enter your email address"
550
- },
551
- {
552
- "name": "phone",
553
- "label": "Phone Number",
554
- "type": "TEXT_INPUT",
555
- "subType": "PHONE",
556
- "colSpan": 4,
557
- "required": true,
558
- "placeholder": "+91 7007713990"
559
- },
560
- {
561
- "name": "communicationPreference",
562
- "label": "Communication Preference",
563
- "type": "RADIO",
564
- "subType": "SINGLE",
565
- "colSpan": 4,
566
- "required": true,
567
- "optionConfig": {
568
- "optionList": [
569
- { "label": "Email", "code": "EMAIL" },
570
- { "label": "Phone Number", "code": "PHONE" }
571
- ]
572
- }
573
- }
574
- ]
575
- }
576
- ]
577
- }
578
- }
579
- ]
580
- }
581
- }`,
582
-
583
-
584
- // ──────────────────────────────────────────────────────────────────────────
585
- // User Registration Form — Basic Details / Primary Address / User Role
586
- // ──────────────────────────────────────────────────────────────────────────
587
- userBasicDetailsForm: `{
588
- "entityType": "USER_REGISTRATION",
589
- "label": "User Registration",
590
- "description": "Fill in your details to create a new account",
591
- "formType": "SECTION",
592
- "sectionConfig": {
593
- "children": [
594
-
595
- {
596
- "type": "GROUP",
597
- "subType": "SECTION",
598
- "sectionConfig": {
599
- "label": "Basic Details",
600
- "name": "basicDetails",
601
- "children": [
602
-
603
- {
604
- "type": "ROW",
605
- "subType": "HORIZONTAL",
606
- "children": [
607
- {
608
- "name": "firstName",
609
- "label": "First Name",
610
- "type": "TEXT_INPUT",
611
- "subType": "SHORT",
612
- "required": true,
613
- "placeholder": "Enter first name"
614
- },
615
- {
616
- "name": "lastName",
617
- "label": "Last Name",
618
- "type": "TEXT_INPUT",
619
- "subType": "SHORT",
620
- "required": true,
621
- "placeholder": "Enter last name"
622
- }
623
- ]
624
- },
625
-
626
- {
627
- "type": "ROW",
628
- "subType": "HORIZONTAL",
629
- "children": [
630
- {
631
- "name": "contactNo",
632
- "label": "Contact No",
633
- "type": "TEXT_INPUT",
634
- "subType": "PHONE",
635
- "required": true,
636
- "placeholder": "+91 9999999999",
637
- "hint": "Enter a valid 10-digit mobile number"
638
- },
639
- {
640
- "name": "emailId",
641
- "label": "Email ID",
642
- "type": "TEXT_INPUT",
643
- "subType": "EMAIL",
644
- "required": true,
645
- "placeholder": "example@domain.com"
646
- }
647
- ]
648
- },
649
-
650
- {
651
- "type": "ROW",
652
- "subType": "HORIZONTAL",
653
- "children": [
654
- {
655
- "name": "loginId",
656
- "label": "Login / User ID",
657
- "type": "TEXT_INPUT",
658
- "subType": "SHORT",
659
- "required": true,
660
- "placeholder": "Choose a unique login ID",
661
- "hint": "Alphanumeric, no spaces",
662
- "textConfig": {
663
- "length": { "min": 4, "max": 30 },
664
- "pattern": "^[a-zA-Z0-9_]+$",
665
- "patternMessage": "Only letters, numbers and underscores are allowed"
666
- }
667
- },
668
- {
669
- "name": "password",
670
- "label": "Password",
671
- "type": "TEXT_INPUT",
672
- "subType": "PASSWORD",
673
- "required": true,
674
- "placeholder": "Min. 8 characters",
675
- "hint": "Use at least 8 characters with letters and numbers",
676
- "textConfig": {
677
- "length": { "min": 8, "max": 64 }
678
- }
679
- },
680
- {
681
- "name": "confirmPassword",
682
- "label": "Confirm Password",
683
- "type": "TEXT_INPUT",
684
- "subType": "PASSWORD",
685
- "required": true,
686
- "placeholder": "Re-enter your password",
687
- "textConfig": {
688
- "matchField": "password"
689
- }
690
- }
691
- ]
692
- }
693
-
694
- ]
695
- }
696
- },
697
-
698
- {
699
- "type": "GROUP",
700
- "subType": "SECTION",
701
- "sectionConfig": {
702
- "label": "Primary Address",
703
- "name": "primaryAddress",
704
- "children": [
705
-
706
- {
707
- "type": "ROW",
708
- "subType": "HORIZONTAL",
709
- "children": [
710
- {
711
- "name": "addressLine1",
712
- "label": "Address Line 1",
713
- "type": "TEXT_INPUT",
714
- "subType": "SHORT",
715
- "required": true,
716
- "placeholder": "House / Flat No., Building, Street"
717
- },
718
- {
719
- "name": "addressLine2",
720
- "label": "Address Line 2",
721
- "type": "TEXT_INPUT",
722
- "subType": "SHORT",
723
- "placeholder": "Area / Locality / Colony (optional)"
724
- }
725
- ]
726
- },
727
-
728
- {
729
- "type": "ROW",
730
- "subType": "HORIZONTAL",
731
- "children": [
732
- {
733
- "name": "country",
734
- "label": "Country",
735
- "type": "DROPDOWN",
736
- "subType": "SINGLE",
737
- "required": true,
738
- "placeholder": "Select Country",
739
- "optionConfig": {
740
- "optionList": [
741
- { "label": "India", "code": "REGION_COUNTRY.INDIA" },
742
- { "label": "USA", "code": "REGION_COUNTRY.USA" }
743
- ]
744
- }
745
- },
746
- {
747
- "name": "state",
748
- "label": "State",
749
- "type": "DROPDOWN",
750
- "subType": "SINGLE",
751
- "required": true,
752
- "placeholder": "Select State",
753
- "optionConfig": {
754
- "apiUrl": "https://dev.platformcommons.org/ctld/api/globalrefdata/v1?refClass=GREF.REGION_STATE&parentRefClass=GREF.REGION_COUNTRY",
755
- "labelPath": "label",
756
- "valuePath": "dataCode",
757
- "dependencies": {
758
- "parentRefData": "country"
759
- }
760
- }
761
- },
762
- {
763
- "name": "city",
764
- "label": "City",
765
- "type": "DROPDOWN",
766
- "subType": "SINGLE",
767
- "required": true,
768
- "placeholder": "Select City",
769
- "optionConfig": {
770
- "apiUrl": "https://dev.platformcommons.org/ctld/api/globalrefdata/v1?refClass=GREF.REGION_DISTRICT&parentRefClass=GREF.REGION_STATE",
771
- "labelPath": "label",
772
- "valuePath": "dataCode",
773
- "dependencies": {
774
- "parentRefData": "state"
775
- }
776
- }
777
- }
778
- ]
779
- },
780
-
781
- {
782
- "type": "ROW",
783
- "subType": "HORIZONTAL",
784
- "children": [
785
- {
786
- "name": "block",
787
- "label": "Block / Taluka",
788
- "type": "DROPDOWN",
789
- "subType": "SINGLE",
790
- "placeholder": "Select Block",
791
- "optionConfig": {
792
- "apiUrl": "https://dev.platformcommons.org/ctld/api/globalrefdata/v1?refClass=GREF.REGION_BLOCK&parentRefClass=GREF.REGION_DISTRICT",
793
- "labelPath": "label",
794
- "valuePath": "dataCode",
795
- "dependencies": {
796
- "parentRefData": "city"
797
- }
798
- }
799
- },
800
- {
801
- "name": "pinCode",
802
- "label": "PIN Code",
803
- "type": "TEXT_INPUT",
804
- "subType": "SHORT",
805
- "required": true,
806
- "placeholder": "6-digit PIN code",
807
- "textConfig": {
808
- "length": { "min": 6, "max": 6 },
809
- "pattern": "^[0-9]{6}$",
810
- "patternMessage": "Enter a valid 6-digit PIN code"
811
- }
812
- }
813
- ]
814
- }
815
-
816
- ]
817
- }
818
- },
819
-
820
- {
821
- "type": "GROUP",
822
- "subType": "SECTION",
823
- "sectionConfig": {
824
- "label": "User Role",
825
- "name": "userRole",
826
- "type": "ROW",
827
- "subType": "HORIZONTAL",
828
- "children": [
829
- {
830
- "name": "role",
831
- "label": "User Role",
832
- "type": "DROPDOWN",
833
- "subType": "SINGLE",
834
- "required": true,
835
- "placeholder": "Select a role",
836
- "optionConfig": {
837
- "apiUrl": "https://dev.platformcommons.org/gateway/commons-report-service/api/v1/datasets/name/VMS_GET_TENANT_ROLES/execute?params=TENANT_ID=1823",
838
- "labelPath": "roleName",
839
- "valuePath": "code"
840
- }
841
- },
842
- {
843
- "name": "reportingRole",
844
- "label": "Reporting Role",
845
- "type": "DROPDOWN",
846
- "subType": "SINGLE",
847
- "required": true,
848
- "placeholder": "Select Reporting Role",
849
- "optionConfig": {
850
- "apiUrl": "https://dev.platformcommons.org/ctld/api/rolehierarchy/v1?criteria=roleCode.code='{{userRole}}' and isActive=1&includeAttributes=id,parentRoleCode",
851
- "dataPath": "payload",
852
- "labelPath": "parentRoleCode",
853
- "valuePath": "parentRoleCode",
854
- "dependencies": {
855
- "userRole": "role"
856
- }
857
- }
858
- },
859
- {
860
- "name": "reportingManager",
861
- "label": "Reporting Manager",
862
- "type": "DROPDOWN",
863
- "subType": "SINGLE",
864
- "required": true,
865
- "placeholder": "Select Reporting Manager",
866
- "optionConfig": {
867
- "apiUrl": "https://dev.platformcommons.org/ctld/api/tenant/user/role/criteria/v1?criteria=role.code='{{reportingRole}}' and isActive=1 and user.isActive=1",
868
- "dataPath": "payload",
869
- "labelPath": "user.userName",
870
- "valuePath": "user.id",
871
- "dependencies": {
872
- "reportingRole": "reportingRole"
873
- }
874
- }
875
- }
876
- ]
877
- }
878
- }
879
-
880
- ]
881
- }
882
- }`,
883
-
884
- // ──────────────────────────────────────────────────────────────────────────
885
- // Document Upload Form — demonstrates the FILE_UPLOAD field type
886
- // ──────────────────────────────────────────────────────────────────────────
887
- documentUploadForm: `{
888
- "entityType": "DOCUMENT_UPLOAD",
889
- "label": "Documents",
890
- "description": "Upload the required documents",
891
- "formType": "SECTION",
892
- "sectionConfig": {
893
- "children": [
894
- {
895
- "type": "GROUP",
896
- "subType": "SECTION",
897
- "sectionConfig": {
898
- "label": "Documents",
899
- "name": "documents",
900
- "children": [
901
- {
902
- "name": "profilePicture",
903
- "label": "Profile Picture",
904
- "type": "FILE_UPLOAD",
905
- "subType": "SINGLE",
906
- "required": true,
907
- "attachmentConfig": {
908
- "multiple": false,
909
- "maxSizeMB": 5,
910
- "accept": ".jpg,.jpeg,.png,.webp,image/*",
911
- "acceptLabel": "JPG, PNG, WEBP"
912
- }
913
- },
914
- {
915
- "name": "certificates",
916
- "label": "Certificates",
917
- "type": "FILE_UPLOAD",
918
- "subType": "MULTIPLE",
919
- "attachmentConfig": {
920
- "multiple": true,
921
- "maxFiles": 5,
922
- "maxSizeMB": 10,
923
- "accept": ".pdf,.doc,.docx,.jpg,.jpeg,.png",
924
- "acceptLabel": "PDF, DOCX, JPG, PNG"
925
- }
926
- }
927
- ]
928
- }
929
- }
930
- ]
931
- }
932
- }`,
933
-
934
- // Demand Definition Form (matching user request image)
935
- demandDefinitionForm: `{
936
- "entityType": "DEMAND",
937
- "label": "Demand Definition",
938
- "formType": "SECTION",
939
- "sectionConfig": {
940
- "children": [
941
- {
942
- "type": "ROW",
943
- "subType": "HORIZONTAL",
944
- "children": [
945
- {
946
- "name": "beneficiaries",
947
- "label": "Required Beneficiaries",
948
- "type": "NUMBER_INPUT",
949
- "subType": "INTEGER",
950
- "required": true,
951
- "suffix": "Students",
952
- "placeholder": "0",
953
- "numberConfig": { "min": 0 }
954
- },
955
- {
956
- "name": "deliveryModel",
957
- "label": "Preferred Delivery Model",
958
- "type": "DROPDOWN",
959
- "subType": "SINGLE",
960
- "required": true,
961
- "placeholder": "Select",
962
- "optionConfig": {
963
- "optionList": [
964
- { "label": "Onsite Delivery", "code": "ONSITE" },
965
- { "label": "Hybrid Model", "code": "HYBRID" }
966
- ]
967
- }
968
- }
969
- ]
970
- },
971
- {
972
- "type": "ROW",
973
- "subType": "HORIZONTAL",
974
- "children": [
975
- {
976
- "name": "minAge",
977
- "label": "Min Target Age",
978
- "type": "NUMBER_INPUT",
979
- "subType": "INTEGER",
980
- "required": true,
981
- "placeholder": "0",
982
- "numberConfig": { "min": 0, "max": 100 },
983
- "onValidate": "!maxAge || minAge <= maxAge",
984
- "errorMessage": "Min Age cannot be greater than Max Age"
985
- },
986
- {
987
- "name": "maxAge",
988
- "label": "Max Target Age",
989
- "type": "NUMBER_INPUT",
990
- "subType": "INTEGER",
991
- "required": true,
992
- "placeholder": "100",
993
- "numberConfig": { "min": 0, "max": 100 },
994
- "onValidate": "!minAge || maxAge >= minAge",
995
- "errorMessage": "Max Age cannot be less than Min Age"
996
- }
997
- ]
998
- },
999
- {
1000
- "type": "ROW",
1001
- "subType": "HORIZONTAL",
1002
- "children": [
1003
- {
1004
- "name": "male",
1005
- "label": "Male Split (%)",
1006
- "type": "NUMBER_INPUT",
1007
- "subType": "INTEGER",
1008
- "required": true,
1009
- "suffix": "%",
1010
- "placeholder": "50",
1011
- "numberConfig": { "min": 0, "max": 100 },
1012
- "onValidate": "(male || 0) + (female || 0) === 100",
1013
- "errorMessage": "Male + Female % must equal 100%"
1014
- },
1015
- {
1016
- "name": "female",
1017
- "label": "Female Split (%)",
1018
- "type": "NUMBER_INPUT",
1019
- "subType": "INTEGER",
1020
- "required": true,
1021
- "suffix": "%",
1022
- "placeholder": "50",
1023
- "numberConfig": { "min": 0, "max": 100 },
1024
- "onValidate": "(male || 0) + (female || 0) === 100",
1025
- "errorMessage": "Male + Female % must equal 100%"
1026
- }
1027
- ]
1028
- }
1029
- ]
1030
- }
1031
- }`,
1032
-
1033
-
1034
-
1035
- // Project Info Form (matching user request image)
1036
- // Project Form (Combined Info + Demand)
1037
- projectInfoForm: `{
1038
- "entityType": "PROJECT",
1039
- "label": "UI_PLAYGROUND.SMART_FORM.PROJECT.TITLE",
1040
- "formType": "SECTION",
1041
- "sectionConfig": {
1042
- "children": [
1043
- {
1044
- "type": "GROUP",
1045
- "subType": "SECTION",
1046
- "sectionConfig": {
1047
- "label": "UI_PLAYGROUND.SMART_FORM.PROJECT.SECTION.INFO",
1048
- "children": [
1049
- {
1050
- "type": "ROW",
1051
- "subType": "HORIZONTAL",
1052
- "children": [
1053
- {
1054
- "name": "projectName",
1055
- "label": "UI_PLAYGROUND.SMART_FORM.PROJECT.NAME.LABEL",
1056
- "placeholder": "UI_PLAYGROUND.SMART_FORM.PROJECT.NAME.PH",
1057
- "type": "TEXT_INPUT",
1058
- "subType": "SHORT",
1059
- "required": true,
1060
- "colSpan": 6
1061
- },
1062
- {
1063
- "name": "programId",
1064
- "label": "UI_PLAYGROUND.SMART_FORM.PROJECT.PROG_ID.LABEL",
1065
- "type": "TEXT_INPUT",
1066
- "subType": "SHORT",
1067
- "defaultValue": "DLP-24-L1",
1068
- "readonly": true,
1069
- "colSpan": 6
1070
- }
1071
- ]
1072
- },
1073
- {
1074
- "type": "ROW",
1075
- "subType": "HORIZONTAL",
1076
- "children": [
1077
- {
1078
- "name": "linkedProgram",
1079
- "label": "UI_PLAYGROUND.SMART_FORM.PROJECT.LINKED_PROG.LABEL",
1080
- "type": "TEXT_INPUT",
1081
- "subType": "SHORT",
1082
- "defaultValue": "National Skills Initiative",
1083
- "readonly": true,
1084
- "colSpan": 4
1085
- },
1086
- {
1087
- "name": "linkedContract",
1088
- "label": "UI_PLAYGROUND.SMART_FORM.PROJECT.LINKED_CONTRACT.LABEL",
1089
- "type": "TEXT_INPUT",
1090
- "subType": "SHORT",
1091
- "defaultValue": "NSI-Gov-Oct23",
1092
- "readonly": true,
1093
- "colSpan": 4
1094
- },
1095
- {
1096
- "name": "assignedDistrict",
1097
- "label": "UI_PLAYGROUND.SMART_FORM.PROJECT.DISTRICT.LABEL",
1098
- "type": "TEXT_INPUT",
1099
- "subType": "SHORT",
1100
- "defaultValue": "Bangalore Rural",
1101
- "readonly": true,
1102
- "colSpan": 4
1103
- }
1104
- ]
1105
- }
1106
- ]
1107
- }
1108
- },
1109
- {
1110
- "type": "GROUP",
1111
- "subType": "SECTION",
1112
- "sectionConfig": {
1113
- "label": "UI_PLAYGROUND.SMART_FORM.PROJECT.SECTION.DEMAND",
1114
- "children": [
1115
- {
1116
- "type": "ROW",
1117
- "subType": "HORIZONTAL",
1118
- "children": [
1119
- {
1120
- "name": "requiredBeneficiaries",
1121
- "label": "UI_PLAYGROUND.SMART_FORM.PROJECT.BENEFICIARIES.LABEL",
1122
- "placeholder": "UI_PLAYGROUND.SMART_FORM.PROJECT.BENEFICIARIES.PH",
1123
- "type": "NUMBER_INPUT",
1124
- "subType": "INTEGER",
1125
- "required": true,
1126
- "colSpan": 6,
1127
- "numberConfig": {
1128
- "min": 1
1129
- }
1130
- },
1131
- {
1132
- "name": "deliveryModel",
1133
- "label": "UI_PLAYGROUND.SMART_FORM.PROJECT.DELIVERY_MODEL.LABEL",
1134
- "type": "DROPDOWN",
1135
- "subType": "SINGLE",
1136
- "required": true,
1137
- "colSpan": 6,
1138
- "optionConfig": {
1139
- "optionList": [
1140
- {
1141
- "label": "UI_PLAYGROUND.OPTION.IN_PERSON",
1142
- "code": "IN_PERSON"
1143
- },
1144
- {
1145
- "label": "UI_PLAYGROUND.OPTION.HYBRID",
1146
- "code": "HYBRID"
1147
- },
1148
- {
1149
- "label": "UI_PLAYGROUND.OPTION.ONLINE",
1150
- "code": "ONLINE"
1151
- }
1152
- ]
1153
- }
1154
- }
1155
- ]
1156
- },
1157
- {
1158
- "type": "ROW",
1159
- "subType": "HORIZONTAL",
1160
- "children": [
1161
- {
1162
- "name": "minAge",
1163
- "label": "UI_PLAYGROUND.SMART_FORM.PROJECT.AGE_MIN.LABEL",
1164
- "type": "NUMBER_INPUT",
1165
- "subType": "INTEGER",
1166
- "required": true,
1167
- "placeholder": "UI_PLAYGROUND.SMART_FORM.PROJECT.AGE_MIN.LABEL",
1168
- "numberConfig": {
1169
- "min": 0,
1170
- "max": 100
1171
- },
1172
- "onValidate": "!maxAge || minAge <= maxAge",
1173
- "errorMessage": "UI_PLAYGROUND.SMART_FORM.PROJECT.AGE_MIN.ERR"
1174
- },
1175
- {
1176
- "name": "maxAge",
1177
- "label": "UI_PLAYGROUND.SMART_FORM.PROJECT.AGE_MAX.LABEL",
1178
- "type": "NUMBER_INPUT",
1179
- "subType": "INTEGER",
1180
- "required": true,
1181
- "placeholder": "UI_PLAYGROUND.SMART_FORM.PROJECT.AGE_MAX.LABEL",
1182
- "numberConfig": {
1183
- "min": 0,
1184
- "max": 100
1185
- },
1186
- "onValidate": "!minAge || maxAge >= minAge",
1187
- "errorMessage": "UI_PLAYGROUND.SMART_FORM.PROJECT.AGE_MAX.ERR"
1188
- }
1189
- ]
1190
- },
1191
- {
1192
- "type": "ROW",
1193
- "subType": "HORIZONTAL",
1194
- "children": [
1195
- {
1196
- "name": "maleSplit",
1197
- "label": "UI_PLAYGROUND.SMART_FORM.PROJECT.MALE.LABEL",
1198
- "type": "NUMBER_INPUT",
1199
- "subType": "INTEGER",
1200
- "required": true,
1201
- "suffix": "%",
1202
- "placeholder": "UI_PLAYGROUND.SMART_FORM.PROJECT.MALE.LABEL",
1203
- "numberConfig": {
1204
- "min": 0,
1205
- "max": 100
1206
- },
1207
- "onValidate": "(maleSplit || 0) + (femaleSplit || 0) === 100",
1208
- "errorMessage": "UI_PLAYGROUND.SMART_FORM.PROJECT.GENDER_SPLIT.ERR"
1209
- },
1210
- {
1211
- "name": "femaleSplit",
1212
- "label": "UI_PLAYGROUND.SMART_FORM.PROJECT.FEMALE.LABEL",
1213
- "type": "NUMBER_INPUT",
1214
- "subType": "INTEGER",
1215
- "required": true,
1216
- "suffix": "%",
1217
- "placeholder": "UI_PLAYGROUND.SMART_FORM.PROJECT.FEMALE.LABEL",
1218
- "numberConfig": {
1219
- "min": 0,
1220
- "max": 100
1221
- },
1222
- "onValidate": "(maleSplit || 0) + (femaleSplit || 0) === 100",
1223
- "errorMessage": "UI_PLAYGROUND.SMART_FORM.PROJECT.GENDER_SPLIT.ERR"
1224
- }
1225
- ]
1226
- }
1227
- ]
1228
- }
1229
- }
1230
- ]
1231
- }
1232
- }
1233
- }`,
1234
-
1235
- faqForm: `{
1236
- "entityType": "FAQ",
1237
- "label": "Frequently Asked Questions",
1238
- "description": "Answer attendee questions.",
1239
- "formType": "SECTION",
1240
- "sectionConfig": {
1241
- "children": [
1242
- {
1243
- "type": "GROUP",
1244
- "subType": "SECTION",
1245
- "sectionConfig": {
1246
- "label": "Frequently Asked Questions",
1247
- "allowMulti": true,
1248
- "name": "faqs",
1249
- "multiSaveConfig": {
1250
- "active": true,
1251
- "summaryField": "question",
1252
- "descriptionField": "answer",
1253
- "addLabel": "Add a Question"
1254
- },
1255
- "children": [
1256
- {
1257
- "name": "question",
1258
- "label": "Question",
1259
- "type": "TEXT_INPUT",
1260
- "subType": "SHORT",
1261
- "required": true,
1262
- "placeholder": "What is Lorem Ipsum?"
1263
- },
1264
- {
1265
- "name": "answer",
1266
- "label": "Answer",
1267
- "type": "TEXT_INPUT",
1268
- "subType": "LONG",
1269
- "required": true,
1270
- "placeholder": "Contrary to popular belief..."
1271
- }
1272
- ]
1273
- }
1274
- }
1275
- ]
1276
- }
1277
- }`,
1278
-
1279
- // ── Location field example ──────────────────────────────────────────────
1280
- locationForm: `{
1281
- "entityType": "EVENT",
1282
- "label": "Event Location",
1283
- "formType": "SECTION",
1284
- "sectionConfig": {
1285
- "children": [
1286
- {
1287
- "name": "eventLocation",
1288
- "label": "Location",
1289
- "type": "LOCATION",
1290
- "required": true,
1291
- "hint": "Set where your event takes place",
1292
- "locationConfig": {
1293
- "defaultTab": "VENUE",
1294
- "maxLocations": 5,
1295
- "venuePlaceholder": "Search for a venue address...",
1296
- "onlinePlaceholder": "https://zoom.us/j/meeting-id",
1297
- "showMap": true,
1298
- "mapHeight": "300px",
1299
- "googleMapsApiKey": "YOUR_GOOGLE_MAPS_API_KEY"
1300
- }
1301
- }
1302
- ]
1303
- }
1304
- }`,
1305
- };
1306
-
1307
- /**
1308
- * i18n label keys used by the LOCATION field type.
1309
- * Add these to your labels JSON file(s) for all supported languages.
1310
- *
1311
- * LBL_LOC_VENUE – Tab: "Venue"
1312
- * LBL_LOC_ONLINE – Tab: "Online Event"
1313
- * LBL_LOC_TBA – Tab: "To be Announced"
1314
- * LBL_LOC_ADDRESS – Section heading inside Venue tab: "Location address"
1315
- * LBL_LOC_COUNT_SUFFIX – e.g. "Locations Added!"
1316
- * LBL_LOC_ADD_ANOTHER – "Add another Location" button label
1317
- * LBL_LOC_MAP_HINT – hint below the embedded map
1318
- * LBL_LOC_ONLINE_URL – Label above online URL input: "Event URL"
1319
- * LBL_LOC_TBA_DESC – Message shown inside TBA tab
1320
- * PH_LOC_VENUE – Placeholder for venue search input
1321
- * PH_LOC_ONLINE – Placeholder for online URL input
1322
- */
1323
-
1324
-