@tsed/schema-formio 8.11.0 → 8.11.2-rc.1

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 (277) hide show
  1. package/lib/esm/components/anyToComponent.js +0 -1
  2. package/lib/esm/components/arrayToComponent.js +0 -1
  3. package/lib/esm/components/booleanToComponent.js +0 -1
  4. package/lib/esm/components/dateToComponent.js +0 -1
  5. package/lib/esm/components/defaultToComponent.js +0 -1
  6. package/lib/esm/components/enumToComponent.js +0 -1
  7. package/lib/esm/components/mapToComponent.js +0 -1
  8. package/lib/esm/components/nestedToComponent.js +0 -1
  9. package/lib/esm/components/numberToComponent.js +0 -1
  10. package/lib/esm/components/objectToEditGrid.js +0 -1
  11. package/lib/esm/components/panelToComponent.js +0 -1
  12. package/lib/esm/components/propertiesToComponents.js +0 -1
  13. package/lib/esm/components/stringToComponent.js +0 -1
  14. package/lib/esm/decorators/component.js +0 -1
  15. package/lib/esm/decorators/conditional.js +0 -1
  16. package/lib/esm/decorators/currency.js +0 -1
  17. package/lib/esm/decorators/customClass.js +0 -1
  18. package/lib/esm/decorators/customConditional.js +0 -1
  19. package/lib/esm/decorators/dataSourceJson.js +0 -1
  20. package/lib/esm/decorators/dataSourceUrl.js +0 -1
  21. package/lib/esm/decorators/errorLabel.js +0 -1
  22. package/lib/esm/decorators/errorMessage.js +0 -1
  23. package/lib/esm/decorators/form.js +0 -1
  24. package/lib/esm/decorators/hidden.js +0 -1
  25. package/lib/esm/decorators/inputTags.js +0 -1
  26. package/lib/esm/decorators/label.js +0 -1
  27. package/lib/esm/decorators/mask.js +0 -1
  28. package/lib/esm/decorators/maxWords.js +0 -1
  29. package/lib/esm/decorators/minWords.js +0 -1
  30. package/lib/esm/decorators/modalEdit.js +0 -1
  31. package/lib/esm/decorators/multiple.js +0 -1
  32. package/lib/esm/decorators/openWhenEmpty.js +0 -1
  33. package/lib/esm/decorators/password.js +0 -1
  34. package/lib/esm/decorators/placeholder.js +0 -1
  35. package/lib/esm/decorators/prefix.js +0 -1
  36. package/lib/esm/decorators/select.js +0 -1
  37. package/lib/esm/decorators/suffix.js +0 -1
  38. package/lib/esm/decorators/tableView.js +0 -1
  39. package/lib/esm/decorators/tabs.js +0 -1
  40. package/lib/esm/decorators/textCase.js +0 -1
  41. package/lib/esm/decorators/textarea.js +0 -1
  42. package/lib/esm/decorators/tooltip.js +0 -1
  43. package/lib/esm/decorators/validate.js +0 -1
  44. package/lib/esm/index.js +0 -1
  45. package/lib/esm/interfaces/FormioDataResolver.js +0 -1
  46. package/lib/esm/registries/FormioMappersContainer.js +0 -1
  47. package/lib/esm/registries/FormsContainer.js +0 -1
  48. package/lib/esm/utils/getFormioProps.js +0 -1
  49. package/lib/esm/utils/getFormioSchema.js +0 -1
  50. package/lib/esm/utils/getRef.js +0 -1
  51. package/package.json +14 -12
  52. package/lib/browser/components/anyToComponent.js +0 -23
  53. package/lib/browser/components/anyToComponent.js.map +0 -1
  54. package/lib/browser/components/arrayToComponent.js +0 -36
  55. package/lib/browser/components/arrayToComponent.js.map +0 -1
  56. package/lib/browser/components/booleanToComponent.js +0 -12
  57. package/lib/browser/components/booleanToComponent.js.map +0 -1
  58. package/lib/browser/components/dateToComponent.js +0 -57
  59. package/lib/browser/components/dateToComponent.js.map +0 -1
  60. package/lib/browser/components/defaultToComponent.js +0 -17
  61. package/lib/browser/components/defaultToComponent.js.map +0 -1
  62. package/lib/browser/components/enumToComponent.js +0 -27
  63. package/lib/browser/components/enumToComponent.js.map +0 -1
  64. package/lib/browser/components/mapToComponent.js +0 -19
  65. package/lib/browser/components/mapToComponent.js.map +0 -1
  66. package/lib/browser/components/nestedToComponent.js +0 -24
  67. package/lib/browser/components/nestedToComponent.js.map +0 -1
  68. package/lib/browser/components/numberToComponent.js +0 -20
  69. package/lib/browser/components/numberToComponent.js.map +0 -1
  70. package/lib/browser/components/objectToEditGrid.js +0 -15
  71. package/lib/browser/components/objectToEditGrid.js.map +0 -1
  72. package/lib/browser/components/panelToComponent.js +0 -15
  73. package/lib/browser/components/panelToComponent.js.map +0 -1
  74. package/lib/browser/components/propertiesToComponents.js +0 -66
  75. package/lib/browser/components/propertiesToComponents.js.map +0 -1
  76. package/lib/browser/components/stringToComponent.js +0 -42
  77. package/lib/browser/components/stringToComponent.js.map +0 -1
  78. package/lib/browser/decorators/component.js +0 -18
  79. package/lib/browser/decorators/component.js.map +0 -1
  80. package/lib/browser/decorators/conditional.js +0 -26
  81. package/lib/browser/decorators/conditional.js.map +0 -1
  82. package/lib/browser/decorators/currency.js +0 -16
  83. package/lib/browser/decorators/currency.js.map +0 -1
  84. package/lib/browser/decorators/customClass.js +0 -10
  85. package/lib/browser/decorators/customClass.js.map +0 -1
  86. package/lib/browser/decorators/customConditional.js +0 -16
  87. package/lib/browser/decorators/customConditional.js.map +0 -1
  88. package/lib/browser/decorators/dataSourceJson.js +0 -20
  89. package/lib/browser/decorators/dataSourceJson.js.map +0 -1
  90. package/lib/browser/decorators/dataSourceUrl.js +0 -15
  91. package/lib/browser/decorators/dataSourceUrl.js.map +0 -1
  92. package/lib/browser/decorators/errorLabel.js +0 -10
  93. package/lib/browser/decorators/errorLabel.js.map +0 -1
  94. package/lib/browser/decorators/errorMessage.js +0 -8
  95. package/lib/browser/decorators/errorMessage.js.map +0 -1
  96. package/lib/browser/decorators/form.js +0 -20
  97. package/lib/browser/decorators/form.js.map +0 -1
  98. package/lib/browser/decorators/hidden.js +0 -10
  99. package/lib/browser/decorators/hidden.js.map +0 -1
  100. package/lib/browser/decorators/inputTags.js +0 -18
  101. package/lib/browser/decorators/inputTags.js.map +0 -1
  102. package/lib/browser/decorators/label.js +0 -11
  103. package/lib/browser/decorators/label.js.map +0 -1
  104. package/lib/browser/decorators/mask.js +0 -17
  105. package/lib/browser/decorators/mask.js.map +0 -1
  106. package/lib/browser/decorators/maxWords.js +0 -8
  107. package/lib/browser/decorators/maxWords.js.map +0 -1
  108. package/lib/browser/decorators/minWords.js +0 -8
  109. package/lib/browser/decorators/minWords.js.map +0 -1
  110. package/lib/browser/decorators/modalEdit.js +0 -10
  111. package/lib/browser/decorators/modalEdit.js.map +0 -1
  112. package/lib/browser/decorators/multiple.js +0 -10
  113. package/lib/browser/decorators/multiple.js.map +0 -1
  114. package/lib/browser/decorators/openWhenEmpty.js +0 -10
  115. package/lib/browser/decorators/openWhenEmpty.js.map +0 -1
  116. package/lib/browser/decorators/password.js +0 -12
  117. package/lib/browser/decorators/password.js.map +0 -1
  118. package/lib/browser/decorators/placeholder.js +0 -10
  119. package/lib/browser/decorators/placeholder.js.map +0 -1
  120. package/lib/browser/decorators/prefix.js +0 -10
  121. package/lib/browser/decorators/prefix.js.map +0 -1
  122. package/lib/browser/decorators/select.js +0 -14
  123. package/lib/browser/decorators/select.js.map +0 -1
  124. package/lib/browser/decorators/suffix.js +0 -10
  125. package/lib/browser/decorators/suffix.js.map +0 -1
  126. package/lib/browser/decorators/tableView.js +0 -10
  127. package/lib/browser/decorators/tableView.js.map +0 -1
  128. package/lib/browser/decorators/tabs.js +0 -14
  129. package/lib/browser/decorators/tabs.js.map +0 -1
  130. package/lib/browser/decorators/textCase.js +0 -10
  131. package/lib/browser/decorators/textCase.js.map +0 -1
  132. package/lib/browser/decorators/textarea.js +0 -12
  133. package/lib/browser/decorators/textarea.js.map +0 -1
  134. package/lib/browser/decorators/tooltip.js +0 -10
  135. package/lib/browser/decorators/tooltip.js.map +0 -1
  136. package/lib/browser/decorators/validate.js +0 -12
  137. package/lib/browser/decorators/validate.js.map +0 -1
  138. package/lib/browser/index.js +0 -102
  139. package/lib/browser/index.js.map +0 -1
  140. package/lib/browser/registries/FormioMappersContainer.js +0 -18
  141. package/lib/browser/registries/FormioMappersContainer.js.map +0 -1
  142. package/lib/browser/registries/FormsContainer.js +0 -5
  143. package/lib/browser/registries/FormsContainer.js.map +0 -1
  144. package/lib/browser/utils/getFormioProps.js +0 -10
  145. package/lib/browser/utils/getFormioProps.js.map +0 -1
  146. package/lib/browser/utils/getFormioSchema.js +0 -45
  147. package/lib/browser/utils/getFormioSchema.js.map +0 -1
  148. package/lib/browser/utils/getRef.js +0 -8
  149. package/lib/browser/utils/getRef.js.map +0 -1
  150. package/lib/esm/components/anyToComponent.js.map +0 -1
  151. package/lib/esm/components/arrayToComponent.js.map +0 -1
  152. package/lib/esm/components/booleanToComponent.js.map +0 -1
  153. package/lib/esm/components/dateToComponent.js.map +0 -1
  154. package/lib/esm/components/defaultToComponent.js.map +0 -1
  155. package/lib/esm/components/enumToComponent.js.map +0 -1
  156. package/lib/esm/components/mapToComponent.js.map +0 -1
  157. package/lib/esm/components/nestedToComponent.js.map +0 -1
  158. package/lib/esm/components/numberToComponent.js.map +0 -1
  159. package/lib/esm/components/objectToEditGrid.js.map +0 -1
  160. package/lib/esm/components/panelToComponent.js.map +0 -1
  161. package/lib/esm/components/propertiesToComponents.js.map +0 -1
  162. package/lib/esm/components/stringToComponent.js.map +0 -1
  163. package/lib/esm/decorators/component.js.map +0 -1
  164. package/lib/esm/decorators/conditional.js.map +0 -1
  165. package/lib/esm/decorators/currency.js.map +0 -1
  166. package/lib/esm/decorators/customClass.js.map +0 -1
  167. package/lib/esm/decorators/customConditional.js.map +0 -1
  168. package/lib/esm/decorators/dataSourceJson.js.map +0 -1
  169. package/lib/esm/decorators/dataSourceUrl.js.map +0 -1
  170. package/lib/esm/decorators/errorLabel.js.map +0 -1
  171. package/lib/esm/decorators/errorMessage.js.map +0 -1
  172. package/lib/esm/decorators/form.js.map +0 -1
  173. package/lib/esm/decorators/hidden.js.map +0 -1
  174. package/lib/esm/decorators/inputTags.js.map +0 -1
  175. package/lib/esm/decorators/label.js.map +0 -1
  176. package/lib/esm/decorators/mask.js.map +0 -1
  177. package/lib/esm/decorators/maxWords.js.map +0 -1
  178. package/lib/esm/decorators/minWords.js.map +0 -1
  179. package/lib/esm/decorators/modalEdit.js.map +0 -1
  180. package/lib/esm/decorators/multiple.js.map +0 -1
  181. package/lib/esm/decorators/openWhenEmpty.js.map +0 -1
  182. package/lib/esm/decorators/password.js.map +0 -1
  183. package/lib/esm/decorators/placeholder.js.map +0 -1
  184. package/lib/esm/decorators/prefix.js.map +0 -1
  185. package/lib/esm/decorators/select.js.map +0 -1
  186. package/lib/esm/decorators/suffix.js.map +0 -1
  187. package/lib/esm/decorators/tableView.js.map +0 -1
  188. package/lib/esm/decorators/tabs.js.map +0 -1
  189. package/lib/esm/decorators/textCase.js.map +0 -1
  190. package/lib/esm/decorators/textarea.js.map +0 -1
  191. package/lib/esm/decorators/tooltip.js.map +0 -1
  192. package/lib/esm/decorators/validate.js.map +0 -1
  193. package/lib/esm/index.js.map +0 -1
  194. package/lib/esm/interfaces/FormioDataResolver.js.map +0 -1
  195. package/lib/esm/registries/FormioMappersContainer.js.map +0 -1
  196. package/lib/esm/registries/FormsContainer.js.map +0 -1
  197. package/lib/esm/utils/getFormioProps.js.map +0 -1
  198. package/lib/esm/utils/getFormioSchema.js.map +0 -1
  199. package/lib/esm/utils/getRef.js.map +0 -1
  200. package/src/components/anyToComponent.ts +0 -28
  201. package/src/components/arrayToComponent.ts +0 -43
  202. package/src/components/booleanToComponent.ts +0 -15
  203. package/src/components/dateToComponent.ts +0 -66
  204. package/src/components/defaultToComponent.ts +0 -17
  205. package/src/components/enumToComponent.ts +0 -33
  206. package/src/components/mapToComponent.ts +0 -17
  207. package/src/components/nestedToComponent.ts +0 -23
  208. package/src/components/numberToComponent.ts +0 -20
  209. package/src/components/objectToEditGrid.ts +0 -13
  210. package/src/components/panelToComponent.ts +0 -13
  211. package/src/components/propertiesToComponents.ts +0 -106
  212. package/src/components/stringToComponent.ts +0 -44
  213. package/src/decorators/component.ts +0 -34
  214. package/src/decorators/conditional.spec.ts +0 -73
  215. package/src/decorators/conditional.ts +0 -49
  216. package/src/decorators/currency.spec.ts +0 -40
  217. package/src/decorators/currency.ts +0 -19
  218. package/src/decorators/customClass.spec.ts +0 -35
  219. package/src/decorators/customClass.ts +0 -14
  220. package/src/decorators/customConditional.spec.ts +0 -95
  221. package/src/decorators/customConditional.ts +0 -85
  222. package/src/decorators/dataSourceJson.spec.ts +0 -88
  223. package/src/decorators/dataSourceJson.ts +0 -26
  224. package/src/decorators/dataSourceUrl.spec.ts +0 -111
  225. package/src/decorators/dataSourceUrl.ts +0 -19
  226. package/src/decorators/errorLabel.spec.ts +0 -35
  227. package/src/decorators/errorLabel.ts +0 -14
  228. package/src/decorators/errorMessage.spec.ts +0 -35
  229. package/src/decorators/errorMessage.ts +0 -13
  230. package/src/decorators/form.ts +0 -25
  231. package/src/decorators/hidden.spec.ts +0 -35
  232. package/src/decorators/hidden.ts +0 -18
  233. package/src/decorators/inputTags.spec.ts +0 -36
  234. package/src/decorators/inputTags.ts +0 -22
  235. package/src/decorators/label.spec.ts +0 -34
  236. package/src/decorators/label.ts +0 -21
  237. package/src/decorators/mask.spec.ts +0 -105
  238. package/src/decorators/mask.ts +0 -46
  239. package/src/decorators/maxWords.spec.ts +0 -35
  240. package/src/decorators/maxWords.ts +0 -13
  241. package/src/decorators/minWords.spec.ts +0 -35
  242. package/src/decorators/minWords.ts +0 -13
  243. package/src/decorators/modalEdit.spec.ts +0 -35
  244. package/src/decorators/modalEdit.ts +0 -14
  245. package/src/decorators/multiple.spec.ts +0 -35
  246. package/src/decorators/multiple.ts +0 -14
  247. package/src/decorators/openWhenEmpty.ts +0 -14
  248. package/src/decorators/password.spec.ts +0 -35
  249. package/src/decorators/password.ts +0 -20
  250. package/src/decorators/placeholder.spec.ts +0 -35
  251. package/src/decorators/placeholder.ts +0 -15
  252. package/src/decorators/prefix.spec.ts +0 -35
  253. package/src/decorators/prefix.ts +0 -14
  254. package/src/decorators/select.spec.ts +0 -82
  255. package/src/decorators/select.ts +0 -25
  256. package/src/decorators/suffix.spec.ts +0 -35
  257. package/src/decorators/suffix.ts +0 -14
  258. package/src/decorators/tableView.spec.ts +0 -35
  259. package/src/decorators/tableView.ts +0 -15
  260. package/src/decorators/tabs.ts +0 -18
  261. package/src/decorators/textCase.spec.ts +0 -35
  262. package/src/decorators/textCase.ts +0 -15
  263. package/src/decorators/textarea.spec.ts +0 -35
  264. package/src/decorators/textarea.ts +0 -21
  265. package/src/decorators/tooltip.spec.ts +0 -35
  266. package/src/decorators/tooltip.ts +0 -15
  267. package/src/decorators/validate.ts +0 -18
  268. package/src/index.ts +0 -52
  269. package/src/interfaces/FormioDataResolver.ts +0 -5
  270. package/src/registries/FormioMappersContainer.ts +0 -21
  271. package/src/registries/FormsContainer.ts +0 -4
  272. package/src/utils/getFormioProps.ts +0 -12
  273. package/src/utils/getFormioSchema.spec.ts +0 -84
  274. package/src/utils/getFormioSchema.ts +0 -62
  275. package/src/utils/getRef.ts +0 -8
  276. package/vite.config.mts +0 -45
  277. package/vitest.config.mts +0 -21
@@ -1 +0,0 @@
1
- {"version":3,"file":"textCase.js","sourceRoot":"","sources":["../../../src/decorators/textCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAC,QAAmC;IAC1D,OAAO,SAAS,CAAC;QACf,IAAI,EAAE,QAAQ;KACf,CAAC,CAAC;AACL,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/decorators/textarea.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAOzC;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,QAAsB,EAAE;IAC/C,OAAO,SAAS,CAAC;QACf,UAAU,EAAE,KAAK;QACjB,GAAG,KAAK;QACR,IAAI,EAAE,UAAU;KACjB,CAAC,CAAC;AACL,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../src/decorators/tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC;;;;;;;GAOG;AACH,MAAM,UAAU,OAAO,CAAC,OAAe;IACrC,OAAO,SAAS,CAAC;QACf,OAAO;KACR,CAAC,CAAC;AACL,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/decorators/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC;;;;;;;;GAQG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAW,EAAE,KAAU;IAC9C,OAAO,SAAS,CAAC;QACf,QAAQ,EAAE;YACR,CAAC,GAAG,CAAC,EAAE,KAAK;SACb;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormioDataResolver.js","sourceRoot":"","sources":["../../../src/interfaces/FormioDataResolver.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormioMappersContainer.js","sourceRoot":"","sources":["../../../src/registries/FormioMappersContainer.ts"],"names":[],"mappings":"AAIA,MAAM,sBAAsB,GAA8B,IAAI,GAAG,EAAE,CAAC;AAEpE,MAAM,UAAU,oBAAoB,CAAC,IAAY,EAAE,MAAoB;IACrE,OAAO,sBAAsB,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,uBAAuB;IACvB,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CAAC,UAAU,IAAI,wBAAwB,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,sBAAsB,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,MAAW,EAAE,OAAY;IAChE,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAChD,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormsContainer.js","sourceRoot":"","sources":["../../../src/registries/FormsContainer.ts"],"names":[],"mappings":"AAEA,yCAAyC;AACzC,MAAM,CAAC,MAAM,cAAc,GAAsB,IAAI,GAAG,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getFormioProps.js","sourceRoot":"","sources":["../../../src/utils/getFormioProps.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,cAAc,CAAC,MAAW;IACxC,MAAM,WAAW,GAAQ,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC7E,IAAI,GAAG,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;YAChC,OAAO;gBACL,GAAG,KAAK;gBACR,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK;aACtC,CAAC;QACJ,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,WAAW,CAAC;AACrB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getFormioSchema.js","sourceRoot":"","sources":["../../../src/utils/getFormioSchema.ts"],"names":[],"mappings":"AAAA,OAAO,iCAAiC,CAAC;AACzC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,qCAAqC,CAAC;AAC7C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,qCAAqC,CAAC;AAC7C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,iCAAiC,CAAC;AACzC,OAAO,oCAAoC,CAAC;AAC5C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,mCAAmC,CAAC;AAC3C,OAAO,mCAAmC,CAAC;AAC3C,OAAO,yCAAyC,CAAC;AACjD,OAAO,oCAAoC,CAAC;AAE5C,OAAO,EAAC,QAAQ,EAAO,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAC,aAAa,EAAE,eAAe,EAAoB,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAC,UAAU,EAAC,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAC;AAE/D,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,KAA+B,EAC/B,UAA6B,EAAE;IAE/B,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACpB,OAAO,eAAe,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAc,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;IAED,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,EAAE;QACnC,GAAG,OAAO;QACV,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,IAAI;KACjB,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;IACrC,MAAM,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IACpC,MAAM,SAAS,GAAmB,EAAE,CAAC;IACrC,MAAM,UAAU,GAAG,UAAU,CAAC,YAAY,EAAE,MAAM,EAAE,EAAC,GAAG,OAAO,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,SAAS,EAAC,CAAC,CAAC;IAC9G,MAAM,IAAI,GAAG;QACX,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,MAAM;QACf,IAAI,EAAE,EAAE;QACR,MAAM,EAAE,EAAE;QACV,gBAAgB,EAAE,EAAE;QACpB,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAM,aAAa,EAAE,EAAE,CAAC;QAC3C,IAAI,EAAE,WAAW;QACjB,WAAW;QACX,UAAU;KACX,CAAC;IAEF,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAa,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAE7E,OAAO,IAA6B,CAAC;AACvC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getRef.js","sourceRoot":"","sources":["../../../src/utils/getRef.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEpC,MAAM,UAAU,MAAM,CAAC,MAAW,EAAE,OAAY;IAC9C,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QAChB,OAAO,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,28 +0,0 @@
1
- import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js";
2
- import {getRef} from "../utils/getRef.js";
3
-
4
- export function anyToComponent(schema: any, options: any) {
5
- schema = getRef(schema, options);
6
-
7
- switch (schema?.type) {
8
- case "object":
9
- if (!schema.properties && !schema.$ref) {
10
- return execMapper("map", schema, options);
11
- }
12
-
13
- return execMapper("nested", schema, options);
14
- case "array":
15
- return execMapper("array", schema, options);
16
- case "string":
17
- return execMapper("string", schema, options);
18
- case "boolean":
19
- return execMapper("boolean", schema, options);
20
- case "integer":
21
- case "number":
22
- return execMapper("number", schema, options);
23
- }
24
-
25
- return {};
26
- }
27
-
28
- registerFormioMapper("any", anyToComponent);
@@ -1,43 +0,0 @@
1
- import {cleanObject} from "@tsed/core";
2
-
3
- import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js";
4
- import {getRef} from "../utils/getRef.js";
5
-
6
- export function arrayToComponent(schema: any, options: any) {
7
- const itemSchema = schema.items.$ref ? getRef(schema.items, options) : schema.items;
8
-
9
- const {type} = itemSchema;
10
-
11
- switch (type) {
12
- case "object": // editgrid
13
- return {
14
- ...execMapper("default", schema, options),
15
- ...execMapper("editgrid", itemSchema, options)
16
- };
17
- case "string": // tag or enum?
18
- if (itemSchema.enum) {
19
- const component = execMapper("enum", itemSchema, options);
20
-
21
- return {
22
- ...component,
23
- inline: false,
24
- type: "selectboxes"
25
- };
26
- }
27
-
28
- const component = execMapper(type, itemSchema, options);
29
-
30
- return cleanObject({
31
- ...component,
32
- multiple: component.type === "tags" ? undefined : true
33
- });
34
- default:
35
- case "number":
36
- return {
37
- ...execMapper(type, itemSchema, options),
38
- multiple: true
39
- };
40
- }
41
- }
42
-
43
- registerFormioMapper("array", arrayToComponent);
@@ -1,15 +0,0 @@
1
- import {cleanObject} from "@tsed/core";
2
-
3
- import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js";
4
-
5
- function booleanToComponent(schema: any, options: any) {
6
- const component = execMapper("default", schema, options);
7
-
8
- return cleanObject({
9
- ...component,
10
- input: true,
11
- type: component.type || "checkbox"
12
- });
13
- }
14
-
15
- registerFormioMapper("boolean", booleanToComponent);
@@ -1,66 +0,0 @@
1
- import {getValue} from "@tsed/core";
2
-
3
- import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js";
4
-
5
- function dateToComponent(schema: any, options: any) {
6
- const component = execMapper("default", schema, options);
7
-
8
- const base = {
9
- enableMinDateInput: false,
10
- enableMaxDateInput: false,
11
- input: true,
12
- ...component,
13
- type: "datetime",
14
- datePicker: {
15
- disableWeekends: false,
16
- disableWeekdays: false,
17
- ...getValue(component, "datePicker")
18
- },
19
- widget: {
20
- type: "calendar",
21
- displayInTimezone: "viewer",
22
- locale: "en",
23
- useLocaleSettings: false,
24
- allowInput: true,
25
- mode: "single",
26
- noCalendar: false,
27
- hourIncrement: 1,
28
- minuteIncrement: 1,
29
- minDate: null,
30
- disableWeekends: false,
31
- disableWeekdays: false,
32
- maxDate: null,
33
- ...getValue(component, "widget")
34
- }
35
- };
36
-
37
- if (schema.format === "date") {
38
- return {
39
- ...base,
40
- format: "yyyy-MM-dd",
41
- enableTime: false,
42
- widget: {
43
- ...base.widget,
44
- enableTime: false,
45
- format: "yyyy-MM-dd",
46
- ...getValue(component, "widget")
47
- }
48
- };
49
- }
50
-
51
- return {
52
- ...base,
53
- timePicker: {
54
- showMeridian: false,
55
- ...getValue(component, "timePicker")
56
- },
57
- widget: {
58
- ...base.widget,
59
- enableTime: true,
60
- time_24hr: true,
61
- ...getValue(component, "widget")
62
- }
63
- };
64
- }
65
-
66
- registerFormioMapper("date", dateToComponent);
@@ -1,17 +0,0 @@
1
- import {cleanObject} from "@tsed/core";
2
-
3
- import {registerFormioMapper} from "../registries/FormioMappersContainer.js";
4
- import {getFormioProps} from "../utils/getFormioProps.js";
5
-
6
- export function defaultToComponent(schema: any, options: any): any {
7
- const formioProps = getFormioProps(schema);
8
-
9
- return cleanObject({
10
- ...formioProps,
11
- disabled: !!schema.readOnly,
12
- description: schema.description,
13
- defaultValue: schema.default
14
- });
15
- }
16
-
17
- registerFormioMapper("default", defaultToComponent);
@@ -1,33 +0,0 @@
1
- import {cleanObject} from "@tsed/core";
2
-
3
- import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js";
4
-
5
- export function enumToComponent(schema: any, options: any) {
6
- const component = execMapper("default", schema, options);
7
- const values = schema.enum.map((value: any) => {
8
- return {
9
- label: value,
10
- value
11
- };
12
- });
13
-
14
- if (component.type === "select") {
15
- return cleanObject({
16
- ...component,
17
- data: {
18
- json: component.data?.json || JSON.stringify(values)
19
- },
20
- dataSrc: "json",
21
- idPath: "value",
22
- valueProperty: "value",
23
- template: component.template || "<span>{{ item.label }}</span>"
24
- });
25
- }
26
-
27
- return cleanObject({
28
- ...component,
29
- values: schema["x-values"] || values.map((value: any) => ({...value, shortcut: ""}))
30
- });
31
- }
32
-
33
- registerFormioMapper("enum", enumToComponent);
@@ -1,17 +0,0 @@
1
- import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js";
2
-
3
- export function mapToComponent(schema: any, options: any) {
4
- return {
5
- ...execMapper("default", schema, options),
6
- type: "datamap",
7
- tableView: false,
8
- input: true,
9
- valueComponent: {
10
- ...(schema.additionalProperties ? execMapper("any", schema.additionalProperties, options) : {}),
11
- hideLabel: true,
12
- tableView: true
13
- }
14
- };
15
- }
16
-
17
- registerFormioMapper("map", mapToComponent);
@@ -1,23 +0,0 @@
1
- import {sentenceCase} from "change-case";
2
-
3
- import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js";
4
-
5
- export function nestedToComponent(schema: any, options: any) {
6
- return {
7
- ...execMapper("default", schema, options),
8
- label: false,
9
- tableView: false,
10
- type: "form",
11
- display: "form",
12
- input: true,
13
- components: [
14
- {
15
- key: "panel",
16
- label: options.parentKey && sentenceCase(options.parentKey),
17
- ...execMapper("panel", schema, options)
18
- }
19
- ]
20
- };
21
- }
22
-
23
- registerFormioMapper("nested", nestedToComponent);
@@ -1,20 +0,0 @@
1
- import {cleanObject, getValue} from "@tsed/core";
2
-
3
- import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js";
4
-
5
- export function numberToComponent(schema: any, options: any) {
6
- const component = execMapper("default", schema, options);
7
-
8
- return cleanObject({
9
- ...component,
10
- input: true,
11
- delimiter: getValue(component, "delimiter", false),
12
- inputFormat: getValue(component, "inputFormat", "plain"),
13
- mask: getValue(component, "mask", false),
14
- requireDecimal: false,
15
- type: "number"
16
- });
17
- }
18
-
19
- registerFormioMapper("number", numberToComponent);
20
- registerFormioMapper("integer", numberToComponent);
@@ -1,13 +0,0 @@
1
- import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js";
2
-
3
- export function objectToEditGrid(schema: any, options: any) {
4
- return {
5
- ...execMapper("default", schema, options),
6
- rowDrafts: false,
7
- type: "editgrid",
8
- input: true,
9
- components: execMapper("properties", schema, options)
10
- };
11
- }
12
-
13
- registerFormioMapper("editgrid", objectToEditGrid);
@@ -1,13 +0,0 @@
1
- import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js";
2
-
3
- export function panelToComponent(schema: any, options: any) {
4
- return {
5
- ...execMapper("default", schema, options),
6
- collapsible: false,
7
- input: false,
8
- tableView: false,
9
- components: execMapper("properties", schema, options)
10
- };
11
- }
12
-
13
- registerFormioMapper("panel", panelToComponent);
@@ -1,106 +0,0 @@
1
- import {cleanObject, isFunction} from "@tsed/core";
2
- import {FormioComponent, FormioForm} from "@tsed/formio-types";
3
- import {sentenceCase} from "change-case";
4
-
5
- import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js";
6
-
7
- function bindResolvers(component: FormioComponent, options: any) {
8
- if (component.data) {
9
- const data = {...component.data};
10
-
11
- Object.entries(data).forEach(([key, resolver]) => {
12
- if (isFunction(resolver)) {
13
- options.resolvers.push(async (form: FormioForm) => {
14
- data[key] = await resolver({...options, component, form});
15
- });
16
- }
17
- });
18
-
19
- return {
20
- ...component,
21
- data
22
- };
23
- }
24
-
25
- return component;
26
- }
27
-
28
- function mapValidation(key: string, base: FormioComponent, schema: any, propSchema: any) {
29
- const required = (schema.required || []).includes(key);
30
- const validate = {
31
- ...(base.validate || {}),
32
- required,
33
- pattern: propSchema.pattern,
34
- minLength: !required || (required && propSchema.minLength > 1) ? propSchema.minLength : undefined,
35
- maxLength: propSchema.maxLength,
36
- min: propSchema.minimum || propSchema.minItems,
37
- max: propSchema.maximum || propSchema.maxItems
38
- };
39
-
40
- switch (propSchema.type) {
41
- case "string":
42
- if (propSchema.minLength === 0 && validate.required) {
43
- validate.minLength = undefined;
44
- validate.required = false;
45
- }
46
- break;
47
- case "boolean":
48
- validate.required = false;
49
- break;
50
- }
51
-
52
- return cleanObject(validate);
53
- }
54
-
55
- export function propertiesToComponents(schema: any, options: any): any[] {
56
- const tabs = {
57
- label: "Tabs",
58
- key: "tabs",
59
- type: "tabs",
60
- input: false,
61
- tableView: false,
62
- components: new Map<string, any>(),
63
- pushed: false
64
- };
65
- const components: any[] = [];
66
-
67
- Object.entries(schema.properties).forEach(([key, propSchema]: [string, any]) => {
68
- const tabsOptions = propSchema["x-formiotabs"];
69
- const base = execMapper("any", propSchema, {...options, parentKey: key});
70
-
71
- let component = cleanObject({
72
- key,
73
- ...base,
74
- label: base.label == false ? undefined : base.label || propSchema.title || sentenceCase(key),
75
- validate: mapValidation(key, base, schema, propSchema)
76
- });
77
-
78
- component = bindResolvers(component, options);
79
-
80
- if (tabsOptions) {
81
- if (!tabs.pushed) {
82
- components.push(tabs);
83
- tabs.pushed = true;
84
- }
85
-
86
- if (!tabs.components.has(tabsOptions.key)) {
87
- tabs.components.set(tabsOptions.key, {
88
- ...tabsOptions,
89
- components: []
90
- });
91
- }
92
-
93
- tabs.components.get(tabsOptions.key).components.push(component);
94
- } else {
95
- components.push(component);
96
- }
97
- });
98
-
99
- if (tabs.components.size) {
100
- tabs.components = [...tabs.components.values()] as any;
101
- }
102
-
103
- return components;
104
- }
105
-
106
- registerFormioMapper("properties", propertiesToComponents);
@@ -1,44 +0,0 @@
1
- import {cleanObject} from "@tsed/core";
2
-
3
- import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js";
4
-
5
- export function stringToComponent(schema: any, options: any) {
6
- if (schema.format) {
7
- const component = execMapper("default", schema, options);
8
- switch (schema.format) {
9
- case "date":
10
- case "date-time":
11
- return execMapper("date", schema, options);
12
- case "uri":
13
- return cleanObject({
14
- input: true,
15
- ...component,
16
- type: component.type || "url"
17
- });
18
- default:
19
- return cleanObject({
20
- input: true,
21
- ...component,
22
- type: component.type || schema.format
23
- });
24
- }
25
- }
26
-
27
- if (schema.enum) {
28
- const component = execMapper("enum", schema, options);
29
-
30
- return {
31
- ...component,
32
- type: component.type || "radio"
33
- };
34
- }
35
-
36
- const component = execMapper("default", schema, options);
37
- return cleanObject({
38
- input: true,
39
- type: component.type || "textfield",
40
- ...component
41
- });
42
- }
43
-
44
- registerFormioMapper("string", stringToComponent);
@@ -1,34 +0,0 @@
1
- import {JsonEntityFn, JsonEntityStore} from "@tsed/schema";
2
-
3
- /**
4
- * Declare a formio Component schema on the decorated propertyKey.
5
- * @decorator
6
- * @formio
7
- * @property
8
- * @schema
9
- */
10
- export function Component(component: Record<string, any>): PropertyDecorator {
11
- component = Object.entries(component).reduce((component: Record<string, any>, [key, value]) => {
12
- if (key === "validate") {
13
- component["x-formio-validate"] = {
14
- ...(component["x-formio-validate"] || {}),
15
- ...value
16
- };
17
- }
18
-
19
- return {
20
- ...component,
21
- [`x-formio-${key}`]: value
22
- };
23
- }, {});
24
-
25
- return JsonEntityFn((store: JsonEntityStore) => {
26
- Object.entries(component).forEach(([key, value]) => {
27
- store.itemSchema.customKey(key, value);
28
-
29
- if (store.isCollection) {
30
- store.schema.customKey(key, value);
31
- }
32
- });
33
- });
34
- }
@@ -1,73 +0,0 @@
1
- import {getFormioSchema} from "../utils/getFormioSchema.js";
2
- import {HideWhen, ShowWhen} from "./conditional.js";
3
-
4
- describe("@Conditional", () => {
5
- it("should add conditional rule on field (show)", async () => {
6
- class Model {
7
- @ShowWhen("test2", 1)
8
- test: string;
9
- }
10
-
11
- expect(await getFormioSchema(Model)).toEqual({
12
- access: [],
13
- components: [
14
- {
15
- disabled: false,
16
- input: true,
17
- key: "test",
18
- label: "Test",
19
- type: "textfield",
20
- conditional: {
21
- eq: 1,
22
- show: true,
23
- when: "test2"
24
- },
25
- validate: {
26
- required: false
27
- }
28
- }
29
- ],
30
- display: "form",
31
- machineName: "model",
32
- name: "model",
33
- submissionAccess: [],
34
- tags: [],
35
- title: "Model",
36
- type: "form"
37
- });
38
- });
39
- it("should add conditional rule on field (hide)", async () => {
40
- class Model {
41
- @HideWhen("test2", 1)
42
- test: string;
43
- }
44
-
45
- expect(await getFormioSchema(Model)).toEqual({
46
- access: [],
47
- components: [
48
- {
49
- disabled: false,
50
- input: true,
51
- key: "test",
52
- label: "Test",
53
- type: "textfield",
54
- conditional: {
55
- eq: 1,
56
- show: false,
57
- when: "test2"
58
- },
59
- validate: {
60
- required: false
61
- }
62
- }
63
- ],
64
- display: "form",
65
- machineName: "model",
66
- name: "model",
67
- submissionAccess: [],
68
- tags: [],
69
- title: "Model",
70
- type: "form"
71
- });
72
- });
73
- });
@@ -1,49 +0,0 @@
1
- import {Component} from "./component.js";
2
-
3
- /**
4
- * Adds a conditional display rule on the input form.
5
- * @decorator
6
- * @formio
7
- * @property
8
- * @schema
9
- * @param conditional
10
- */
11
- export function Conditional(conditional: {show: boolean; when: string; eq: any}) {
12
- return Component({
13
- conditional
14
- });
15
- }
16
-
17
- /**
18
- * Adds a conditional display rule on the input form.
19
- * @decorator
20
- * @formio
21
- * @property
22
- * @schema
23
- * @param property
24
- * @param eq
25
- */
26
- export function ShowWhen(property: string, eq: any) {
27
- return Conditional({
28
- show: true,
29
- when: property,
30
- eq
31
- });
32
- }
33
-
34
- /**
35
- * Adds a conditional display rule on the input form.
36
- * @decorator
37
- * @formio
38
- * @property
39
- * @schema
40
- * @param property
41
- * @param eq
42
- */
43
- export function HideWhen(property: string, eq: any) {
44
- return Conditional({
45
- show: false,
46
- when: property,
47
- eq
48
- });
49
- }