@tsed/schema-formio 8.11.1 → 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,24 +0,0 @@
1
- import { sentenceCase as a } from "/home/runner/work/tsed/tsed/node_modules/change-case/dist/index.js";
2
- import { registerFormioMapper as n, execMapper as t } from "../registries/FormioMappersContainer.js";
3
- function p(r, e) {
4
- return {
5
- ...t("default", r, e),
6
- label: !1,
7
- tableView: !1,
8
- type: "form",
9
- display: "form",
10
- input: !0,
11
- components: [
12
- {
13
- key: "panel",
14
- label: e.parentKey && a(e.parentKey),
15
- ...t("panel", r, e)
16
- }
17
- ]
18
- };
19
- }
20
- n("nested", p);
21
- export {
22
- p as nestedToComponent
23
- };
24
- //# sourceMappingURL=nestedToComponent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nestedToComponent.js","sources":["../../../src/components/nestedToComponent.ts"],"sourcesContent":["import {sentenceCase} from \"change-case\";\n\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer.js\";\n\nexport function nestedToComponent(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n label: false,\n tableView: false,\n type: \"form\",\n display: \"form\",\n input: true,\n components: [\n {\n key: \"panel\",\n label: options.parentKey && sentenceCase(options.parentKey),\n ...execMapper(\"panel\", schema, options)\n }\n ]\n };\n}\n\nregisterFormioMapper(\"nested\", nestedToComponent);\n"],"names":["nestedToComponent","schema","options","execMapper","sentenceCase","registerFormioMapper"],"mappings":";;AAIgB,SAAAA,EAAkBC,GAAaC,GAAc;AACpD,SAAA;AAAA,IACL,GAAGC,EAAW,WAAWF,GAAQC,CAAO;AAAA,IACxC,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,IACN,SAAS;AAAA,IACT,OAAO;AAAA,IACP,YAAY;AAAA,MACV;AAAA,QACE,KAAK;AAAA,QACL,OAAOA,EAAQ,aAAaE,EAAaF,EAAQ,SAAS;AAAA,QAC1D,GAAGC,EAAW,SAASF,GAAQC,CAAO;AAAA,MAAA;AAAA,IACxC;AAAA,EAEJ;AACF;AAEAG,EAAqB,UAAUL,CAAiB;"}
@@ -1,20 +0,0 @@
1
- import { cleanObject as o, getValue as r } from "@tsed/core";
2
- import { registerFormioMapper as t, execMapper as a } from "../registries/FormioMappersContainer.js";
3
- function m(n, i) {
4
- const e = a("default", n, i);
5
- return o({
6
- ...e,
7
- input: !0,
8
- delimiter: r(e, "delimiter", !1),
9
- inputFormat: r(e, "inputFormat", "plain"),
10
- mask: r(e, "mask", !1),
11
- requireDecimal: !1,
12
- type: "number"
13
- });
14
- }
15
- t("number", m);
16
- t("integer", m);
17
- export {
18
- m as numberToComponent
19
- };
20
- //# sourceMappingURL=numberToComponent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"numberToComponent.js","sources":["../../../src/components/numberToComponent.ts"],"sourcesContent":["import {cleanObject, getValue} from \"@tsed/core\";\n\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer.js\";\n\nexport function numberToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n\n return cleanObject({\n ...component,\n input: true,\n delimiter: getValue(component, \"delimiter\", false),\n inputFormat: getValue(component, \"inputFormat\", \"plain\"),\n mask: getValue(component, \"mask\", false),\n requireDecimal: false,\n type: \"number\"\n });\n}\n\nregisterFormioMapper(\"number\", numberToComponent);\nregisterFormioMapper(\"integer\", numberToComponent);\n"],"names":["numberToComponent","schema","options","component","execMapper","cleanObject","getValue","registerFormioMapper"],"mappings":";;AAIgB,SAAAA,EAAkBC,GAAaC,GAAc;AAC3D,QAAMC,IAAYC,EAAW,WAAWH,GAAQC,CAAO;AAEvD,SAAOG,EAAY;AAAA,IACjB,GAAGF;AAAA,IACH,OAAO;AAAA,IACP,WAAWG,EAASH,GAAW,aAAa,EAAK;AAAA,IACjD,aAAaG,EAASH,GAAW,eAAe,OAAO;AAAA,IACvD,MAAMG,EAASH,GAAW,QAAQ,EAAK;AAAA,IACvC,gBAAgB;AAAA,IAChB,MAAM;AAAA,EAAA,CACP;AACH;AAEAI,EAAqB,UAAUP,CAAiB;AAChDO,EAAqB,WAAWP,CAAiB;"}
@@ -1,15 +0,0 @@
1
- import { registerFormioMapper as i, execMapper as t } from "../registries/FormioMappersContainer.js";
2
- function o(r, e) {
3
- return {
4
- ...t("default", r, e),
5
- rowDrafts: !1,
6
- type: "editgrid",
7
- input: !0,
8
- components: t("properties", r, e)
9
- };
10
- }
11
- i("editgrid", o);
12
- export {
13
- o as objectToEditGrid
14
- };
15
- //# sourceMappingURL=objectToEditGrid.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"objectToEditGrid.js","sources":["../../../src/components/objectToEditGrid.ts"],"sourcesContent":["import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer.js\";\n\nexport function objectToEditGrid(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n rowDrafts: false,\n type: \"editgrid\",\n input: true,\n components: execMapper(\"properties\", schema, options)\n };\n}\n\nregisterFormioMapper(\"editgrid\", objectToEditGrid);\n"],"names":["objectToEditGrid","schema","options","execMapper","registerFormioMapper"],"mappings":";AAEgB,SAAAA,EAAiBC,GAAaC,GAAc;AACnD,SAAA;AAAA,IACL,GAAGC,EAAW,WAAWF,GAAQC,CAAO;AAAA,IACxC,WAAW;AAAA,IACX,MAAM;AAAA,IACN,OAAO;AAAA,IACP,YAAYC,EAAW,cAAcF,GAAQC,CAAO;AAAA,EACtD;AACF;AAEAE,EAAqB,YAAYJ,CAAgB;"}
@@ -1,15 +0,0 @@
1
- import { registerFormioMapper as o, execMapper as r } from "../registries/FormioMappersContainer.js";
2
- function l(e, p) {
3
- return {
4
- ...r("default", e, p),
5
- collapsible: !1,
6
- input: !1,
7
- tableView: !1,
8
- components: r("properties", e, p)
9
- };
10
- }
11
- o("panel", l);
12
- export {
13
- l as panelToComponent
14
- };
15
- //# sourceMappingURL=panelToComponent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"panelToComponent.js","sources":["../../../src/components/panelToComponent.ts"],"sourcesContent":["import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer.js\";\n\nexport function panelToComponent(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n collapsible: false,\n input: false,\n tableView: false,\n components: execMapper(\"properties\", schema, options)\n };\n}\n\nregisterFormioMapper(\"panel\", panelToComponent);\n"],"names":["panelToComponent","schema","options","execMapper","registerFormioMapper"],"mappings":";AAEgB,SAAAA,EAAiBC,GAAaC,GAAc;AACnD,SAAA;AAAA,IACL,GAAGC,EAAW,WAAWF,GAAQC,CAAO;AAAA,IACxC,aAAa;AAAA,IACb,OAAO;AAAA,IACP,WAAW;AAAA,IACX,YAAYC,EAAW,cAAcF,GAAQC,CAAO;AAAA,EACtD;AACF;AAEAE,EAAqB,SAASJ,CAAgB;"}
@@ -1,66 +0,0 @@
1
- import { cleanObject as u, isFunction as m } from "@tsed/core";
2
- import { sentenceCase as f } from "/home/runner/work/tsed/tsed/node_modules/change-case/dist/index.js";
3
- import { registerFormioMapper as d, execMapper as b } from "../registries/FormioMappersContainer.js";
4
- function c(i, a) {
5
- if (i.data) {
6
- const t = { ...i.data };
7
- return Object.entries(t).forEach(([e, s]) => {
8
- m(s) && a.resolvers.push(async (n) => {
9
- t[e] = await s({ ...a, component: i, form: n });
10
- });
11
- }), {
12
- ...i,
13
- data: t
14
- };
15
- }
16
- return i;
17
- }
18
- function p(i, a, t, e) {
19
- const s = (t.required || []).includes(i), n = {
20
- ...a.validate || {},
21
- required: s,
22
- pattern: e.pattern,
23
- minLength: !s || s && e.minLength > 1 ? e.minLength : void 0,
24
- maxLength: e.maxLength,
25
- min: e.minimum || e.minItems,
26
- max: e.maximum || e.maxItems
27
- };
28
- switch (e.type) {
29
- case "string":
30
- e.minLength === 0 && n.required && (n.minLength = void 0, n.required = !1);
31
- break;
32
- case "boolean":
33
- n.required = !1;
34
- break;
35
- }
36
- return u(n);
37
- }
38
- function g(i, a) {
39
- const t = {
40
- label: "Tabs",
41
- key: "tabs",
42
- type: "tabs",
43
- input: !1,
44
- tableView: !1,
45
- components: /* @__PURE__ */ new Map(),
46
- pushed: !1
47
- }, e = [];
48
- return Object.entries(i.properties).forEach(([s, n]) => {
49
- const r = n["x-formiotabs"], o = b("any", n, { ...a, parentKey: s });
50
- let l = u({
51
- key: s,
52
- ...o,
53
- label: o.label == !1 ? void 0 : o.label || n.title || f(s),
54
- validate: p(s, o, i, n)
55
- });
56
- l = c(l, a), r ? (t.pushed || (e.push(t), t.pushed = !0), t.components.has(r.key) || t.components.set(r.key, {
57
- ...r,
58
- components: []
59
- }), t.components.get(r.key).components.push(l)) : e.push(l);
60
- }), t.components.size && (t.components = [...t.components.values()]), e;
61
- }
62
- d("properties", g);
63
- export {
64
- g as propertiesToComponents
65
- };
66
- //# sourceMappingURL=propertiesToComponents.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"propertiesToComponents.js","sources":["../../../src/components/propertiesToComponents.ts"],"sourcesContent":["import {cleanObject, isFunction} from \"@tsed/core\";\nimport {FormioComponent, FormioForm} from \"@tsed/formio-types\";\nimport {sentenceCase} from \"change-case\";\n\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer.js\";\n\nfunction bindResolvers(component: FormioComponent, options: any) {\n if (component.data) {\n const data = {...component.data};\n\n Object.entries(data).forEach(([key, resolver]) => {\n if (isFunction(resolver)) {\n options.resolvers.push(async (form: FormioForm) => {\n data[key] = await resolver({...options, component, form});\n });\n }\n });\n\n return {\n ...component,\n data\n };\n }\n\n return component;\n}\n\nfunction mapValidation(key: string, base: FormioComponent, schema: any, propSchema: any) {\n const required = (schema.required || []).includes(key);\n const validate = {\n ...(base.validate || {}),\n required,\n pattern: propSchema.pattern,\n minLength: !required || (required && propSchema.minLength > 1) ? propSchema.minLength : undefined,\n maxLength: propSchema.maxLength,\n min: propSchema.minimum || propSchema.minItems,\n max: propSchema.maximum || propSchema.maxItems\n };\n\n switch (propSchema.type) {\n case \"string\":\n if (propSchema.minLength === 0 && validate.required) {\n validate.minLength = undefined;\n validate.required = false;\n }\n break;\n case \"boolean\":\n validate.required = false;\n break;\n }\n\n return cleanObject(validate);\n}\n\nexport function propertiesToComponents(schema: any, options: any): any[] {\n const tabs = {\n label: \"Tabs\",\n key: \"tabs\",\n type: \"tabs\",\n input: false,\n tableView: false,\n components: new Map<string, any>(),\n pushed: false\n };\n const components: any[] = [];\n\n Object.entries(schema.properties).forEach(([key, propSchema]: [string, any]) => {\n const tabsOptions = propSchema[\"x-formiotabs\"];\n const base = execMapper(\"any\", propSchema, {...options, parentKey: key});\n\n let component = cleanObject({\n key,\n ...base,\n label: base.label == false ? undefined : base.label || propSchema.title || sentenceCase(key),\n validate: mapValidation(key, base, schema, propSchema)\n });\n\n component = bindResolvers(component, options);\n\n if (tabsOptions) {\n if (!tabs.pushed) {\n components.push(tabs);\n tabs.pushed = true;\n }\n\n if (!tabs.components.has(tabsOptions.key)) {\n tabs.components.set(tabsOptions.key, {\n ...tabsOptions,\n components: []\n });\n }\n\n tabs.components.get(tabsOptions.key).components.push(component);\n } else {\n components.push(component);\n }\n });\n\n if (tabs.components.size) {\n tabs.components = [...tabs.components.values()] as any;\n }\n\n return components;\n}\n\nregisterFormioMapper(\"properties\", propertiesToComponents);\n"],"names":["bindResolvers","component","options","data","key","resolver","isFunction","form","mapValidation","base","schema","propSchema","required","validate","cleanObject","propertiesToComponents","tabs","components","tabsOptions","execMapper","sentenceCase","registerFormioMapper"],"mappings":";;;AAMA,SAASA,EAAcC,GAA4BC,GAAc;AAC/D,MAAID,EAAU,MAAM;AAClB,UAAME,IAAO,EAAC,GAAGF,EAAU,KAAI;AAExB,kBAAA,QAAQE,CAAI,EAAE,QAAQ,CAAC,CAACC,GAAKC,CAAQ,MAAM;AAC5C,MAAAC,EAAWD,CAAQ,KACbH,EAAA,UAAU,KAAK,OAAOK,MAAqB;AAC5C,QAAAJ,EAAAC,CAAG,IAAI,MAAMC,EAAS,EAAC,GAAGH,GAAS,WAAAD,GAAW,MAAAM,GAAK;AAAA,MAAA,CACzD;AAAA,IACH,CACD,GAEM;AAAA,MACL,GAAGN;AAAA,MACH,MAAAE;AAAA,IACF;AAAA,EAAA;AAGK,SAAAF;AACT;AAEA,SAASO,EAAcJ,GAAaK,GAAuBC,GAAaC,GAAiB;AACvF,QAAMC,KAAYF,EAAO,YAAY,CAAC,GAAG,SAASN,CAAG,GAC/CS,IAAW;AAAA,IACf,GAAIJ,EAAK,YAAY,CAAC;AAAA,IACtB,UAAAG;AAAA,IACA,SAASD,EAAW;AAAA,IACpB,WAAW,CAACC,KAAaA,KAAYD,EAAW,YAAY,IAAKA,EAAW,YAAY;AAAA,IACxF,WAAWA,EAAW;AAAA,IACtB,KAAKA,EAAW,WAAWA,EAAW;AAAA,IACtC,KAAKA,EAAW,WAAWA,EAAW;AAAA,EACxC;AAEA,UAAQA,EAAW,MAAM;AAAA,IACvB,KAAK;AACH,MAAIA,EAAW,cAAc,KAAKE,EAAS,aACzCA,EAAS,YAAY,QACrBA,EAAS,WAAW;AAEtB;AAAA,IACF,KAAK;AACH,MAAAA,EAAS,WAAW;AACpB;AAAA,EAAA;AAGJ,SAAOC,EAAYD,CAAQ;AAC7B;AAEgB,SAAAE,EAAuBL,GAAaR,GAAqB;AACvE,QAAMc,IAAO;AAAA,IACX,OAAO;AAAA,IACP,KAAK;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,WAAW;AAAA,IACX,gCAAgB,IAAiB;AAAA,IACjC,QAAQ;AAAA,EACV,GACMC,IAAoB,CAAC;AAEpB,gBAAA,QAAQP,EAAO,UAAU,EAAE,QAAQ,CAAC,CAACN,GAAKO,CAAU,MAAqB;AACxE,UAAAO,IAAcP,EAAW,cAAc,GACvCF,IAAOU,EAAW,OAAOR,GAAY,EAAC,GAAGT,GAAS,WAAWE,GAAI;AAEvE,QAAIH,IAAYa,EAAY;AAAA,MAC1B,KAAAV;AAAA,MACA,GAAGK;AAAA,MACH,OAAOA,EAAK,SAAS,KAAQ,SAAYA,EAAK,SAASE,EAAW,SAASS,EAAahB,CAAG;AAAA,MAC3F,UAAUI,EAAcJ,GAAKK,GAAMC,GAAQC,CAAU;AAAA,IAAA,CACtD;AAEW,IAAAV,IAAAD,EAAcC,GAAWC,CAAO,GAExCgB,KACGF,EAAK,WACRC,EAAW,KAAKD,CAAI,GACpBA,EAAK,SAAS,KAGXA,EAAK,WAAW,IAAIE,EAAY,GAAG,KACjCF,EAAA,WAAW,IAAIE,EAAY,KAAK;AAAA,MACnC,GAAGA;AAAA,MACH,YAAY,CAAA;AAAA,IAAC,CACd,GAGHF,EAAK,WAAW,IAAIE,EAAY,GAAG,EAAE,WAAW,KAAKjB,CAAS,KAE9DgB,EAAW,KAAKhB,CAAS;AAAA,EAC3B,CACD,GAEGe,EAAK,WAAW,SAClBA,EAAK,aAAa,CAAC,GAAGA,EAAK,WAAW,QAAQ,IAGzCC;AACT;AAEAI,EAAqB,cAAcN,CAAsB;"}
@@ -1,42 +0,0 @@
1
- import { cleanObject as p } from "@tsed/core";
2
- import { registerFormioMapper as o, execMapper as n } from "../registries/FormioMappersContainer.js";
3
- function i(t, r) {
4
- if (t.format) {
5
- const e = n("default", t, r);
6
- switch (t.format) {
7
- case "date":
8
- case "date-time":
9
- return n("date", t, r);
10
- case "uri":
11
- return p({
12
- input: !0,
13
- ...e,
14
- type: e.type || "url"
15
- });
16
- default:
17
- return p({
18
- input: !0,
19
- ...e,
20
- type: e.type || t.format
21
- });
22
- }
23
- }
24
- if (t.enum) {
25
- const e = n("enum", t, r);
26
- return {
27
- ...e,
28
- type: e.type || "radio"
29
- };
30
- }
31
- const u = n("default", t, r);
32
- return p({
33
- input: !0,
34
- type: u.type || "textfield",
35
- ...u
36
- });
37
- }
38
- o("string", i);
39
- export {
40
- i as stringToComponent
41
- };
42
- //# sourceMappingURL=stringToComponent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stringToComponent.js","sources":["../../../src/components/stringToComponent.ts"],"sourcesContent":["import {cleanObject} from \"@tsed/core\";\n\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer.js\";\n\nexport function stringToComponent(schema: any, options: any) {\n if (schema.format) {\n const component = execMapper(\"default\", schema, options);\n switch (schema.format) {\n case \"date\":\n case \"date-time\":\n return execMapper(\"date\", schema, options);\n case \"uri\":\n return cleanObject({\n input: true,\n ...component,\n type: component.type || \"url\"\n });\n default:\n return cleanObject({\n input: true,\n ...component,\n type: component.type || schema.format\n });\n }\n }\n\n if (schema.enum) {\n const component = execMapper(\"enum\", schema, options);\n\n return {\n ...component,\n type: component.type || \"radio\"\n };\n }\n\n const component = execMapper(\"default\", schema, options);\n return cleanObject({\n input: true,\n type: component.type || \"textfield\",\n ...component\n });\n}\n\nregisterFormioMapper(\"string\", stringToComponent);\n"],"names":["stringToComponent","schema","options","component","execMapper","cleanObject","registerFormioMapper"],"mappings":";;AAIgB,SAAAA,EAAkBC,GAAaC,GAAc;AAC3D,MAAID,EAAO,QAAQ;AACjB,UAAME,IAAYC,EAAW,WAAWH,GAAQC,CAAO;AACvD,YAAQD,EAAO,QAAQ;AAAA,MACrB,KAAK;AAAA,MACL,KAAK;AACI,eAAAG,EAAW,QAAQH,GAAQC,CAAO;AAAA,MAC3C,KAAK;AACH,eAAOG,EAAY;AAAA,UACjB,OAAO;AAAA,UACP,GAAGF;AAAAA,UACH,MAAMA,EAAU,QAAQ;AAAA,QAAA,CACzB;AAAA,MACH;AACE,eAAOE,EAAY;AAAA,UACjB,OAAO;AAAA,UACP,GAAGF;AAAAA,UACH,MAAMA,EAAU,QAAQF,EAAO;AAAA,QAAA,CAChC;AAAA,IAAA;AAAA,EACL;AAGF,MAAIA,EAAO,MAAM;AACf,UAAME,IAAYC,EAAW,QAAQH,GAAQC,CAAO;AAE7C,WAAA;AAAA,MACL,GAAGC;AAAAA,MACH,MAAMA,EAAU,QAAQ;AAAA,IAC1B;AAAA,EAAA;AAGF,QAAMA,IAAYC,EAAW,WAAWH,GAAQC,CAAO;AACvD,SAAOG,EAAY;AAAA,IACjB,OAAO;AAAA,IACP,MAAMF,EAAU,QAAQ;AAAA,IACxB,GAAGA;AAAA,EAAA,CACJ;AACH;AAEAG,EAAqB,UAAUN,CAAiB;"}
@@ -1,18 +0,0 @@
1
- import { JsonEntityFn as f } from "@tsed/schema";
2
- function a(e) {
3
- return e = Object.entries(e).reduce((i, [t, r]) => (t === "validate" && (i["x-formio-validate"] = {
4
- ...i["x-formio-validate"] || {},
5
- ...r
6
- }), {
7
- ...i,
8
- [`x-formio-${t}`]: r
9
- }), {}), f((i) => {
10
- Object.entries(e).forEach(([t, r]) => {
11
- i.itemSchema.customKey(t, r), i.isCollection && i.schema.customKey(t, r);
12
- });
13
- });
14
- }
15
- export {
16
- a as Component
17
- };
18
- //# sourceMappingURL=component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component.js","sources":["../../../src/decorators/component.ts"],"sourcesContent":["import {JsonEntityFn, JsonEntityStore} from \"@tsed/schema\";\n\n/**\n * Declare a formio Component schema on the decorated propertyKey.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Component(component: Record<string, any>): PropertyDecorator {\n component = Object.entries(component).reduce((component: Record<string, any>, [key, value]) => {\n if (key === \"validate\") {\n component[\"x-formio-validate\"] = {\n ...(component[\"x-formio-validate\"] || {}),\n ...value\n };\n }\n\n return {\n ...component,\n [`x-formio-${key}`]: value\n };\n }, {});\n\n return JsonEntityFn((store: JsonEntityStore) => {\n Object.entries(component).forEach(([key, value]) => {\n store.itemSchema.customKey(key, value);\n\n if (store.isCollection) {\n store.schema.customKey(key, value);\n }\n });\n });\n}\n"],"names":["Component","component","key","value","JsonEntityFn","store"],"mappings":";AASO,SAASA,EAAUC,GAAmD;AAC/D,SAAAA,IAAA,OAAO,QAAQA,CAAS,EAAE,OAAO,CAACA,GAAgC,CAACC,GAAKC,CAAK,OACnFD,MAAQ,eACVD,EAAU,mBAAmB,IAAI;AAAA,IAC/B,GAAIA,EAAU,mBAAmB,KAAK,CAAC;AAAA,IACvC,GAAGE;AAAA,EACL,IAGK;AAAA,IACL,GAAGF;AAAAA,IACH,CAAC,YAAYC,CAAG,EAAE,GAAGC;AAAA,EACvB,IACC,EAAE,GAEEC,EAAa,CAACC,MAA2B;AACvC,WAAA,QAAQJ,CAAS,EAAE,QAAQ,CAAC,CAACC,GAAKC,CAAK,MAAM;AAC5C,MAAAE,EAAA,WAAW,UAAUH,GAAKC,CAAK,GAEjCE,EAAM,gBACFA,EAAA,OAAO,UAAUH,GAAKC,CAAK;AAAA,IACnC,CACD;AAAA,EAAA,CACF;AACH;"}
@@ -1,26 +0,0 @@
1
- import { Component as t } from "./component.js";
2
- function e(n) {
3
- return t({
4
- conditional: n
5
- });
6
- }
7
- function h(n, o) {
8
- return e({
9
- show: !0,
10
- when: n,
11
- eq: o
12
- });
13
- }
14
- function i(n, o) {
15
- return e({
16
- show: !1,
17
- when: n,
18
- eq: o
19
- });
20
- }
21
- export {
22
- e as Conditional,
23
- i as HideWhen,
24
- h as ShowWhen
25
- };
26
- //# sourceMappingURL=conditional.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conditional.js","sources":["../../../src/decorators/conditional.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * Adds a conditional display rule on the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param conditional\n */\nexport function Conditional(conditional: {show: boolean; when: string; eq: any}) {\n return Component({\n conditional\n });\n}\n\n/**\n * Adds a conditional display rule on the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param property\n * @param eq\n */\nexport function ShowWhen(property: string, eq: any) {\n return Conditional({\n show: true,\n when: property,\n eq\n });\n}\n\n/**\n * Adds a conditional display rule on the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param property\n * @param eq\n */\nexport function HideWhen(property: string, eq: any) {\n return Conditional({\n show: false,\n when: property,\n eq\n });\n}\n"],"names":["Conditional","conditional","Component","ShowWhen","property","eq","HideWhen"],"mappings":";AAUO,SAASA,EAAYC,GAAqD;AAC/E,SAAOC,EAAU;AAAA,IACf,aAAAD;AAAA,EAAA,CACD;AACH;AAWgB,SAAAE,EAASC,GAAkBC,GAAS;AAClD,SAAOL,EAAY;AAAA,IACjB,MAAM;AAAA,IACN,MAAMI;AAAA,IACN,IAAAC;AAAA,EAAA,CACD;AACH;AAWgB,SAAAC,EAASF,GAAkBC,GAAS;AAClD,SAAOL,EAAY;AAAA,IACjB,MAAM;AAAA,IACN,MAAMI;AAAA,IACN,IAAAC;AAAA,EAAA,CACD;AACH;"}
@@ -1,16 +0,0 @@
1
- import { Component as e } from "./component.js";
2
- function n(r = {}) {
3
- return e({
4
- currency: "USD",
5
- inputFormat: "plain",
6
- mask: !1,
7
- spellcheck: !0,
8
- delimiter: !0,
9
- ...r,
10
- type: "currency"
11
- });
12
- }
13
- export {
14
- n as Currency
15
- };
16
- //# sourceMappingURL=currency.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"currency.js","sources":["../../../src/decorators/currency.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n/**\n * Configure the property as Currency component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Currency(props: Record<string, any> = {}): PropertyDecorator {\n return Component({\n currency: \"USD\",\n inputFormat: \"plain\",\n mask: false,\n spellcheck: true,\n delimiter: true,\n ...props,\n type: \"currency\"\n });\n}\n"],"names":["Currency","props","Component"],"mappings":";AAQgB,SAAAA,EAASC,IAA6B,IAAuB;AAC3E,SAAOC,EAAU;AAAA,IACf,UAAU;AAAA,IACV,aAAa;AAAA,IACb,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,GAAGD;AAAA,IACH,MAAM;AAAA,EAAA,CACP;AACH;"}
@@ -1,10 +0,0 @@
1
- import { Component as t } from "./component.js";
2
- function r(o) {
3
- return t({
4
- customClass: o
5
- });
6
- }
7
- export {
8
- r as CustomClass
9
- };
10
- //# sourceMappingURL=customClass.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"customClass.js","sources":["../../../src/decorators/customClass.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * Add a custom css class.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function CustomClass(customClass: string) {\n return Component({\n customClass\n });\n}\n"],"names":["CustomClass","customClass","Component"],"mappings":";AASO,SAASA,EAAYC,GAAqB;AAC/C,SAAOC,EAAU;AAAA,IACf,aAAAD;AAAA,EAAA,CACD;AACH;"}
@@ -1,16 +0,0 @@
1
- import { isArrowFn as o } from "@tsed/core";
2
- import { Component as f } from "./component.js";
3
- function p(r) {
4
- const e = r.toString(), [n, ...i] = e.split("=>");
5
- let t = i.join("=>");
6
- return n.includes("{") || (t = t.replace(new RegExp(`${n.trim()}.`, "gi"), "")), `show = ${t.trim()}`;
7
- }
8
- function c(r) {
9
- return o(r) && (r = p(r)), f({
10
- customConditional: r
11
- });
12
- }
13
- export {
14
- c as CustomConditional
15
- };
16
- //# sourceMappingURL=customConditional.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"customConditional.js","sources":["../../../src/decorators/customConditional.ts"],"sourcesContent":["import {isArrowFn} from \"@tsed/core\";\nimport {FormioComponent, FormioForm, FormioSubmission} from \"@tsed/formio-types\";\nimport type {Utils} from \"formiojs\";\nimport type {LoDashStatic} from \"lodash\";\nimport type {Moment} from \"moment\";\n\nimport {Component} from \"./component.js\";\n\nexport interface CustomConditionalCtx<Value = any, Data = any, Row = any> {\n /**\n * The complete submission object.\n */\n form: FormioForm;\n /**\n * The complete submission object.\n */\n submission: FormioSubmission<Data>;\n /**\n * The complete submission data object.\n */\n data: Data;\n /**\n * Contextual \"row\" data, used within DataGrid, EditGrid, and Container components\n */\n row: Row;\n /**\n * The current component JSON\n */\n component: FormioComponent;\n /**\n * The current component instance.\n */\n instance: any;\n /**\n * The current value of the component.\n */\n value: Value;\n /**\n * The moment.js library for date manipulation.\n */\n moment: Moment;\n /**\n * An instance of Lodash.\n */\n _: LoDashStatic;\n /**\n * An instance of the FormioUtils object.\n */\n utils: typeof Utils;\n /**\n * An alias for \"utils\".\n */\n util: typeof Utils;\n}\n\nfunction sanitize(customConditional: Function) {\n const str = customConditional.toString();\n\n const [signature, ...fn] = str.split(\"=>\");\n let content = fn.join(\"=>\");\n\n if (!signature.includes(\"{\")) {\n content = content.replace(new RegExp(`${signature.trim()}.`, \"gi\"), \"\");\n }\n\n return `show = ${content.trim()}`;\n}\n\n/**\n * Adds custom conditional rule to display or not the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param customConditional\n */\nexport function CustomConditional(customConditional: string | ((ctx: CustomConditionalCtx) => any)) {\n if (isArrowFn(customConditional)) {\n customConditional = sanitize(customConditional);\n }\n\n return Component({\n customConditional\n });\n}\n"],"names":["sanitize","customConditional","str","signature","fn","content","CustomConditional","isArrowFn","Component"],"mappings":";;AAuDA,SAASA,EAASC,GAA6B;AACvC,QAAAC,IAAMD,EAAkB,SAAS,GAEjC,CAACE,GAAW,GAAGC,CAAE,IAAIF,EAAI,MAAM,IAAI;AACrC,MAAAG,IAAUD,EAAG,KAAK,IAAI;AAE1B,SAAKD,EAAU,SAAS,GAAG,MACfE,IAAAA,EAAQ,QAAQ,IAAI,OAAO,GAAGF,EAAU,KAAM,CAAA,KAAK,IAAI,GAAG,EAAE,IAGjE,UAAUE,EAAQ,KAAM,CAAA;AACjC;AAUO,SAASC,EAAkBL,GAAkE;AAC9F,SAAAM,EAAUN,CAAiB,MAC7BA,IAAoBD,EAASC,CAAiB,IAGzCO,EAAU;AAAA,IACf,mBAAAP;AAAA,EAAA,CACD;AACH;"}
@@ -1,20 +0,0 @@
1
- import { isFunction as r } from "@tsed/core";
2
- import { Component as i } from "./component.js";
3
- const s = (n) => async (t) => {
4
- const o = await n(t);
5
- return JSON.stringify(o);
6
- };
7
- function e(n, t = {}) {
8
- return i({
9
- ...t,
10
- dataSrc: "json",
11
- data: {
12
- ...t.data,
13
- json: r(n) ? s(n) : JSON.stringify(n)
14
- }
15
- });
16
- }
17
- export {
18
- e as DataSourceJson
19
- };
20
- //# sourceMappingURL=dataSourceJson.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dataSourceJson.js","sources":["../../../src/decorators/dataSourceJson.ts"],"sourcesContent":["import {isFunction} from \"@tsed/core\";\n\nimport {FormioDataResolver, FormioDataResolverCtx} from \"../interfaces/FormioDataResolver.js\";\nimport {Component} from \"./component.js\";\n\nconst wrap = (resolver: FormioDataResolver) => async (opts: FormioDataResolverCtx) => {\n const result = await resolver(opts);\n return JSON.stringify(result);\n};\n\n/**\n * Set custom json data source\n * @param data\n * @param props\n * @constructor\n */\nexport function DataSourceJson(data: any | FormioDataResolver, props: Record<string, any> = {}) {\n return Component({\n ...props,\n dataSrc: \"json\",\n data: {\n ...props.data,\n json: isFunction(data) ? wrap(data) : JSON.stringify(data)\n }\n });\n}\n"],"names":["wrap","resolver","opts","result","DataSourceJson","data","props","Component","isFunction"],"mappings":";;AAKA,MAAMA,IAAO,CAACC,MAAiC,OAAOC,MAAgC;AAC9E,QAAAC,IAAS,MAAMF,EAASC,CAAI;AAC3B,SAAA,KAAK,UAAUC,CAAM;AAC9B;AAQO,SAASC,EAAeC,GAAgCC,IAA6B,IAAI;AAC9F,SAAOC,EAAU;AAAA,IACf,GAAGD;AAAA,IACH,SAAS;AAAA,IACT,MAAM;AAAA,MACJ,GAAGA,EAAM;AAAA,MACT,MAAME,EAAWH,CAAI,IAAIL,EAAKK,CAAI,IAAI,KAAK,UAAUA,CAAI;AAAA,IAAA;AAAA,EAC3D,CACD;AACH;"}
@@ -1,15 +0,0 @@
1
- import { Component as r } from "./component.js";
2
- function n(a, t = {}) {
3
- return r({
4
- ...t,
5
- dataSrc: "url",
6
- data: {
7
- ...t.data,
8
- url: a
9
- }
10
- });
11
- }
12
- export {
13
- n as DataSourceUrl
14
- };
15
- //# sourceMappingURL=dataSourceUrl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dataSourceUrl.js","sources":["../../../src/decorators/dataSourceUrl.ts"],"sourcesContent":["import {FormioDataResolver} from \"../interfaces/FormioDataResolver.js\";\nimport {Component} from \"./component.js\";\n\n/**\n * Set URL data on the current component.\n * @param url\n * @param props\n * @constructor\n */\nexport function DataSourceUrl(url: string | FormioDataResolver, props: Record<string, any> = {}) {\n return Component({\n ...props,\n dataSrc: \"url\",\n data: {\n ...props.data,\n url\n }\n });\n}\n"],"names":["DataSourceUrl","url","props","Component"],"mappings":";AASO,SAASA,EAAcC,GAAkCC,IAA6B,IAAI;AAC/F,SAAOC,EAAU;AAAA,IACf,GAAGD;AAAA,IACH,SAAS;AAAA,IACT,MAAM;AAAA,MACJ,GAAGA,EAAM;AAAA,MACT,KAAAD;AAAA,IAAA;AAAA,EACF,CACD;AACH;"}
@@ -1,10 +0,0 @@
1
- import { Component as o } from "./component.js";
2
- function n(r) {
3
- return o({
4
- errorLabel: r
5
- });
6
- }
7
- export {
8
- n as ErrorLabel
9
- };
10
- //# sourceMappingURL=errorLabel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errorLabel.js","sources":["../../../src/decorators/errorLabel.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * Set the error label when an error occur.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function ErrorLabel(message: string) {\n return Component({\n errorLabel: message\n });\n}\n"],"names":["ErrorLabel","message","Component"],"mappings":";AASO,SAASA,EAAWC,GAAiB;AAC1C,SAAOC,EAAU;AAAA,IACf,YAAYD;AAAA,EAAA,CACb;AACH;"}
@@ -1,8 +0,0 @@
1
- import { Validate as e } from "./validate.js";
2
- function t(r) {
3
- return e("customMessage", r);
4
- }
5
- export {
6
- t as ErrorMessage
7
- };
8
- //# sourceMappingURL=errorMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errorMessage.js","sources":["../../../src/decorators/errorMessage.ts"],"sourcesContent":["import {Validate} from \"./validate.js\";\n\n/**\n * Add error message when an error occur.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param message\n */\nexport function ErrorMessage(message: string) {\n return Validate(\"customMessage\", message);\n}\n"],"names":["ErrorMessage","message","Validate"],"mappings":";AAUO,SAASA,EAAaC,GAAiB;AACrC,SAAAC,EAAS,iBAAiBD,CAAO;AAC1C;"}
@@ -1,20 +0,0 @@
1
- import { useDecorators as r, nameOf as t, StoreSet as i } from "@tsed/core";
2
- import { Name as s } from "@tsed/schema";
3
- import { kebabCase as p } from "/home/runner/work/tsed/tsed/node_modules/change-case/dist/index.js";
4
- import { FormsContainer as a } from "../registries/FormsContainer.js";
5
- import { Label as b } from "./label.js";
6
- function F(e = {}) {
7
- return r(
8
- (o) => {
9
- const m = e.name || t(o), n = p(m);
10
- a.set(m, o), a.set(n, o);
11
- },
12
- e.name && s(e.name),
13
- e.label && b(e.label),
14
- e && i("formio:form", e)
15
- );
16
- }
17
- export {
18
- F as Form
19
- };
20
- //# sourceMappingURL=form.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form.js","sources":["../../../src/decorators/form.ts"],"sourcesContent":["import {nameOf, StoreSet, useDecorators} from \"@tsed/core\";\nimport {FormioForm} from \"@tsed/formio-types\";\nimport {Name} from \"@tsed/schema\";\nimport {kebabCase} from \"change-case\";\n\nimport {FormsContainer} from \"../registries/FormsContainer.js\";\nimport {Label} from \"./label.js\";\n\n/**\n * Expose the model as Formio Form.\n * @param form\n */\nexport function Form(form: Partial<Omit<FormioForm, \"components\" | \"_id\">> = {}): ClassDecorator {\n return useDecorators(\n (target: any) => {\n const name = form.name || nameOf(target);\n const machineName = kebabCase(name);\n FormsContainer.set(name, target as any);\n FormsContainer.set(machineName, target as any);\n },\n form.name && Name(form.name),\n form.label && Label(form.label),\n form && StoreSet(\"formio:form\", form)\n );\n}\n"],"names":["Form","form","useDecorators","target","name","nameOf","machineName","kebabCase","FormsContainer","Name","Label","StoreSet"],"mappings":";;;;;AAYgB,SAAAA,EAAKC,IAAwD,IAAoB;AACxF,SAAAC;AAAA,IACL,CAACC,MAAgB;AACf,YAAMC,IAAOH,EAAK,QAAQI,EAAOF,CAAM,GACjCG,IAAcC,EAAUH,CAAI;AACnB,MAAAI,EAAA,IAAIJ,GAAMD,CAAa,GACvBK,EAAA,IAAIF,GAAaH,CAAa;AAAA,IAC/C;AAAA,IACAF,EAAK,QAAQQ,EAAKR,EAAK,IAAI;AAAA,IAC3BA,EAAK,SAASS,EAAMT,EAAK,KAAK;AAAA,IAC9BA,KAAQU,EAAS,eAAeV,CAAI;AAAA,EACtC;AACF;"}
@@ -1,10 +0,0 @@
1
- import { Component as e } from "./component.js";
2
- function r(n = !0) {
3
- return e({
4
- hidden: n
5
- });
6
- }
7
- export {
8
- r as Hidden
9
- };
10
- //# sourceMappingURL=hidden.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hidden.js","sources":["../../../src/decorators/hidden.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * Set hidden field.\n *\n * A hidden field is still a part of the form, but is hidden from view.\n *\n * @param bool\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Hidden(bool: boolean = true): PropertyDecorator {\n return Component({\n hidden: bool\n });\n}\n"],"names":["Hidden","bool","Component"],"mappings":";AAagB,SAAAA,EAAOC,IAAgB,IAAyB;AAC9D,SAAOC,EAAU;AAAA,IACf,QAAQD;AAAA,EAAA,CACT;AACH;"}
@@ -1,18 +0,0 @@
1
- import { useDecorators as r } from "@tsed/core";
2
- import { CollectionOf as t } from "@tsed/schema";
3
- import { Component as e } from "./component.js";
4
- function m(o = {}) {
5
- return r(
6
- t(String),
7
- e({
8
- ...o,
9
- tableView: !1,
10
- storeas: "array",
11
- type: "tags"
12
- })
13
- );
14
- }
15
- export {
16
- m as InputTags
17
- };
18
- //# sourceMappingURL=inputTags.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inputTags.js","sources":["../../../src/decorators/inputTags.ts"],"sourcesContent":["import {useDecorators} from \"@tsed/core\";\nimport {CollectionOf} from \"@tsed/schema\";\n\nimport {Component} from \"./component.js\";\n/**\n * Configure the property as Tags component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function InputTags(props: Record<string, any> = {}): PropertyDecorator {\n return useDecorators(\n CollectionOf(String),\n Component({\n ...props,\n tableView: false,\n storeas: \"array\",\n type: \"tags\"\n })\n );\n}\n"],"names":["InputTags","props","useDecorators","CollectionOf","Component"],"mappings":";;;AAWgB,SAAAA,EAAUC,IAA6B,IAAuB;AACrE,SAAAC;AAAA,IACLC,EAAa,MAAM;AAAA,IACnBC,EAAU;AAAA,MACR,GAAGH;AAAA,MACH,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,IACP,CAAA;AAAA,EACH;AACF;"}
@@ -1,11 +0,0 @@
1
- import { JsonEntityFn as t, CustomKey as e } from "@tsed/schema";
2
- import { Component as n } from "./component.js";
3
- function i(o) {
4
- return t((r) => r.decoratorType === "property" ? n({
5
- label: o
6
- }) : e("x-formio-label", o));
7
- }
8
- export {
9
- i as Label
10
- };
11
- //# sourceMappingURL=label.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"label.js","sources":["../../../src/decorators/label.ts"],"sourcesContent":["import {CustomKey, JsonEntityFn} from \"@tsed/schema\";\n\nimport {Component} from \"./component.js\";\n\n/**\n * Change the label field\n * @decorator\n * @formio\n * @property\n * @schema\n * @param label\n */\nexport function Label(label: string) {\n return JsonEntityFn((entity) => {\n return entity.decoratorType === \"property\"\n ? Component({\n label\n })\n : CustomKey(\"x-formio-label\", label);\n });\n}\n"],"names":["Label","label","JsonEntityFn","entity","Component","CustomKey"],"mappings":";;AAYO,SAASA,EAAMC,GAAe;AAC5B,SAAAC,EAAa,CAACC,MACZA,EAAO,kBAAkB,aAC5BC,EAAU;AAAA,IACR,OAAAH;AAAA,EAAA,CACD,IACDI,EAAU,kBAAkBJ,CAAK,CACtC;AACH;"}
@@ -1,17 +0,0 @@
1
- import { Component as o } from "./component.js";
2
- function e(n, r = "") {
3
- return o({
4
- inputMask: n,
5
- inputMaskPlaceholderChar: r
6
- });
7
- }
8
- function u(...n) {
9
- return o({
10
- inputMasks: n
11
- });
12
- }
13
- export {
14
- e as Mask,
15
- u as Masks
16
- };
17
- //# sourceMappingURL=mask.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mask.js","sources":["../../../src/decorators/mask.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * An input mask helps the user with input by ensuring a predefined format.\n *\n * - 9: numeric\n * - a: alphabetical\n * - *: alphanumeric\n *\n * Example telephone mask: (999) 999-9999\n *\n * See the [jquery.inputmask](https://github.com/RobinHerbots/Inputmask) documentation for more information.\n *\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Mask(inputMask: string, inputMaskPlaceholderChar: string = \"\") {\n return Component({\n inputMask,\n inputMaskPlaceholderChar\n });\n}\n\n/**\n * An input mask helps the user with input by ensuring a predefined format.\n *\n * - 9: numeric\n * - a: alphabetical\n * - *: alphanumeric\n *\n * Example telephone mask: (999) 999-9999\n *\n * See the [jquery.inputmask](https://github.com/RobinHerbots/Inputmask) documentation for more information.\n *\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Masks(...inputMasks: {label: string; mask: string}[]) {\n return Component({\n inputMasks\n });\n}\n"],"names":["Mask","inputMask","inputMaskPlaceholderChar","Component","Masks","inputMasks"],"mappings":";AAkBgB,SAAAA,EAAKC,GAAmBC,IAAmC,IAAI;AAC7E,SAAOC,EAAU;AAAA,IACf,WAAAF;AAAA,IACA,0BAAAC;AAAA,EAAA,CACD;AACH;AAkBO,SAASE,KAASC,GAA6C;AACpE,SAAOF,EAAU;AAAA,IACf,YAAAE;AAAA,EAAA,CACD;AACH;"}
@@ -1,8 +0,0 @@
1
- import { Validate as o } from "./validate.js";
2
- function a(r) {
3
- return o("maxWords", r);
4
- }
5
- export {
6
- a as MaxWords
7
- };
8
- //# sourceMappingURL=maxWords.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"maxWords.js","sources":["../../../src/decorators/maxWords.ts"],"sourcesContent":["import {Validate} from \"./validate.js\";\n\n/**\n * Add the minimum amount of words that can be added to this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param value\n */\nexport function MaxWords(value: number) {\n return Validate(\"maxWords\", value);\n}\n"],"names":["MaxWords","value","Validate"],"mappings":";AAUO,SAASA,EAASC,GAAe;AAC/B,SAAAC,EAAS,YAAYD,CAAK;AACnC;"}
@@ -1,8 +0,0 @@
1
- import { Validate as o } from "./validate.js";
2
- function n(r) {
3
- return o("minWords", r);
4
- }
5
- export {
6
- n as MinWords
7
- };
8
- //# sourceMappingURL=minWords.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"minWords.js","sources":["../../../src/decorators/minWords.ts"],"sourcesContent":["import {Validate} from \"./validate.js\";\n\n/**\n * Add the maximum amount of words that can be added to this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param value\n */\nexport function MinWords(value: number) {\n return Validate(\"minWords\", value);\n}\n"],"names":["MinWords","value","Validate"],"mappings":";AAUO,SAASA,EAASC,GAAe;AAC/B,SAAAC,EAAS,YAAYD,CAAK;AACnC;"}
@@ -1,10 +0,0 @@
1
- import { Component as t } from "./component.js";
2
- function n(o = !0) {
3
- return t({
4
- modalEdit: o
5
- });
6
- }
7
- export {
8
- n as ModalEdit
9
- };
10
- //# sourceMappingURL=modalEdit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modalEdit.js","sources":["../../../src/decorators/modalEdit.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * Opens up a modal to edit the value of this component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function ModalEdit(modalEdit = true) {\n return Component({\n modalEdit\n });\n}\n"],"names":["ModalEdit","modalEdit","Component"],"mappings":";AASgB,SAAAA,EAAUC,IAAY,IAAM;AAC1C,SAAOC,EAAU;AAAA,IACf,WAAAD;AAAA,EAAA,CACD;AACH;"}
@@ -1,10 +0,0 @@
1
- import { Component as t } from "./component.js";
2
- function n(o = !1) {
3
- return t({
4
- multiple: o
5
- });
6
- }
7
- export {
8
- n as Multiple
9
- };
10
- //# sourceMappingURL=multiple.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"multiple.js","sources":["../../../src/decorators/multiple.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * Change the multiple value on the decorated property.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Multiple(multiple = false): PropertyDecorator {\n return Component({\n multiple\n });\n}\n"],"names":["Multiple","multiple","Component"],"mappings":";AASgB,SAAAA,EAASC,IAAW,IAA0B;AAC5D,SAAOC,EAAU;AAAA,IACf,UAAAD;AAAA,EAAA,CACD;AACH;"}
@@ -1,10 +0,0 @@
1
- import { Component as t } from "./component.js";
2
- function o(n = !0) {
3
- return t({
4
- openWhenEmpty: n
5
- });
6
- }
7
- export {
8
- o as OpenWhenEmpty
9
- };
10
- //# sourceMappingURL=openWhenEmpty.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"openWhenEmpty.js","sources":["../../../src/decorators/openWhenEmpty.ts"],"sourcesContent":["import {Component} from \"./component.js\";\n\n/**\n * Open automatically the editgrid when the list is empty.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function OpenWhenEmpty(openWhenEmpty = true): PropertyDecorator {\n return Component({\n openWhenEmpty\n });\n}\n"],"names":["OpenWhenEmpty","openWhenEmpty","Component"],"mappings":";AASgB,SAAAA,EAAcC,IAAgB,IAAyB;AACrE,SAAOC,EAAU;AAAA,IACf,eAAAD;AAAA,EAAA,CACD;AACH;"}