@f1studio/form-spec 5.0.0-alpha.101

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 (225) hide show
  1. package/Designer.d.ts +89 -0
  2. package/FormSpec.TS/Components/HelloComponent.js +68 -0
  3. package/FormSpec.TS/Components/HelloComponent.js.map +1 -0
  4. package/FormSpec.TS/Components/HelloComponent.ts.map +1 -0
  5. package/FormSpec.TS/Designer.js +526 -0
  6. package/FormSpec.TS/Designer.js.map +1 -0
  7. package/FormSpec.TS/Designer.ts.map +1 -0
  8. package/FormSpec.TS/FormSpec.js +5400 -0
  9. package/FormSpec.TS/FormSpec.js.map +1 -0
  10. package/FormSpec.TS/FormSpec.ts.map +1 -0
  11. package/FormSpec.TS/FormSpecHelpers.js +382 -0
  12. package/FormSpec.TS/FormSpecHelpers.js.map +1 -0
  13. package/FormSpec.TS/FormSpecHelpers.ts.map +1 -0
  14. package/FormSpec.TS/Helpers.js +732 -0
  15. package/FormSpec.TS/Helpers.js.map +1 -0
  16. package/FormSpec.TS/Helpers.ts.map +1 -0
  17. package/FormSpec.TS/Interfaces.js +257 -0
  18. package/FormSpec.TS/Interfaces.js.map +1 -0
  19. package/FormSpec.TS/Interfaces.ts.map +1 -0
  20. package/FormSpec.TS/Interop/FormSpec.Api.Helpers.js +854 -0
  21. package/FormSpec.TS/Interop/FormSpec.Api.Helpers.js.map +1 -0
  22. package/FormSpec.TS/Interop/FormSpec.Api.Helpers.ts.map +1 -0
  23. package/FormSpec.TS/Interop/FormSpec.Api.Option.js +1961 -0
  24. package/FormSpec.TS/Interop/FormSpec.Api.Option.js.map +1 -0
  25. package/FormSpec.TS/Interop/FormSpec.Api.Option.ts.map +1 -0
  26. package/FormSpec.TS/Interop/FormSpec.Values.Api.Option.js +1367 -0
  27. package/FormSpec.TS/Interop/FormSpec.Values.Api.Option.js.map +1 -0
  28. package/FormSpec.TS/Interop/FormSpec.Values.Api.Option.ts.map +1 -0
  29. package/FormSpec.TS/Logging/LogTypes.js +347 -0
  30. package/FormSpec.TS/Logging/LogTypes.js.map +1 -0
  31. package/FormSpec.TS/Logging/LogTypes.ts.map +1 -0
  32. package/FormSpec.TS/Migrator.js +230 -0
  33. package/FormSpec.TS/Migrator.js.map +1 -0
  34. package/FormSpec.TS/Migrator.ts.map +1 -0
  35. package/FormSpec.TS/PathwayDataExtractor.js +361 -0
  36. package/FormSpec.TS/PathwayDataExtractor.js.map +1 -0
  37. package/FormSpec.TS/PathwayDataExtractor.ts.map +1 -0
  38. package/FormSpec.TS/PathwayExecutor.js +1321 -0
  39. package/FormSpec.TS/PathwayExecutor.js.map +1 -0
  40. package/FormSpec.TS/PathwayExecutor.ts.map +1 -0
  41. package/FormSpec.TS/PathwayValidator.js +346 -0
  42. package/FormSpec.TS/PathwayValidator.js.map +1 -0
  43. package/FormSpec.TS/PathwayValidator.ts.map +1 -0
  44. package/FormSpec.TS/PluginInterface.js +171 -0
  45. package/FormSpec.TS/PluginInterface.js.map +1 -0
  46. package/FormSpec.TS/PluginInterface.ts.map +1 -0
  47. package/FormSpec.TS/Prelude.js +59 -0
  48. package/FormSpec.TS/Prelude.js.map +1 -0
  49. package/FormSpec.TS/Prelude.ts.map +1 -0
  50. package/FormSpec.TS/Renderers/FormSpecMarkdownRenderer.js +958 -0
  51. package/FormSpec.TS/Renderers/FormSpecMarkdownRenderer.js.map +1 -0
  52. package/FormSpec.TS/Renderers/FormSpecMarkdownRenderer.ts.map +1 -0
  53. package/FormSpec.TS/Renderers/MermaidRenderer.js +228 -0
  54. package/FormSpec.TS/Renderers/MermaidRenderer.js.map +1 -0
  55. package/FormSpec.TS/Renderers/MermaidRenderer.ts.map +1 -0
  56. package/FormSpec.TS/Renderers/PathwayRenderers.js +190 -0
  57. package/FormSpec.TS/Renderers/PathwayRenderers.js.map +1 -0
  58. package/FormSpec.TS/Renderers/PathwayRenderers.ts.map +1 -0
  59. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Base.fs +511 -0
  60. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Base.fs.js +437 -0
  61. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Base.fs.js.map +1 -0
  62. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Base.fs.ts.map +1 -0
  63. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Error.fs +16 -0
  64. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Error.fs.js +73 -0
  65. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Error.fs.js.map +1 -0
  66. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Error.fs.ts.map +1 -0
  67. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Extensions.fs +50 -0
  68. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Extensions.fs.js +72 -0
  69. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Extensions.fs.js.map +1 -0
  70. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Extensions.fs.ts.map +1 -0
  71. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Fable.Form.fableproj +28 -0
  72. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Field.fs +24 -0
  73. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Field.fs.js +56 -0
  74. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Field.fs.js.map +1 -0
  75. package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Field.fs.ts.map +1 -0
  76. package/FormSpec.TS/fable_modules/Fable.Form.Simple.5.0.1/Fable.Form.Simple.fableproj +31 -0
  77. package/FormSpec.TS/fable_modules/Fable.Form.Simple.5.0.1/Form.fs +178 -0
  78. package/FormSpec.TS/fable_modules/Fable.Form.Simple.5.0.1/Form.fs.js +464 -0
  79. package/FormSpec.TS/fable_modules/Fable.Form.Simple.5.0.1/Form.fs.js.map +1 -0
  80. package/FormSpec.TS/fable_modules/Fable.Form.Simple.5.0.1/Form.fs.ts.map +1 -0
  81. package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.Extensions.fs +17 -0
  82. package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.Hooks.fs +152 -0
  83. package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.Hooks.fs.js +25 -0
  84. package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.Hooks.fs.js.map +1 -0
  85. package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.Hooks.fs.ts.map +1 -0
  86. package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.Types.fableproj +28 -0
  87. package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.fs +218 -0
  88. package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.fs.js +37 -0
  89. package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.fs.js.map +1 -0
  90. package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.fs.ts.map +1 -0
  91. package/FormSpec.TS/fable_modules/Fable.ReactDom.Types.18.2.0/Fable.ReactDom.Types.fableproj +27 -0
  92. package/FormSpec.TS/fable_modules/Fable.ReactDom.Types.18.2.0/Fable.ReactDom.fs +82 -0
  93. package/FormSpec.TS/fable_modules/Fable.ReactDom.Types.18.2.0/Fable.ReactDom.fs.js +7 -0
  94. package/FormSpec.TS/fable_modules/Fable.ReactDom.Types.18.2.0/Fable.ReactDom.fs.js.map +1 -0
  95. package/FormSpec.TS/fable_modules/Fable.ReactDom.Types.18.2.0/Fable.ReactDom.fs.ts.map +1 -0
  96. package/FormSpec.TS/fable_modules/Feliz.2.7.0/BorderStyle.fs +59 -0
  97. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Colors.fs +154 -0
  98. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Colors.fs.js +32 -0
  99. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Colors.fs.js.map +1 -0
  100. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Colors.fs.ts.map +1 -0
  101. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Feliz.fableproj +42 -0
  102. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Fonts.fs +240 -0
  103. package/FormSpec.TS/fable_modules/Feliz.2.7.0/GridTypes.fs +24 -0
  104. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Html.fs +826 -0
  105. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Interop.fs +83 -0
  106. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Interop.fs.js +292 -0
  107. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Interop.fs.js.map +1 -0
  108. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Interop.fs.ts.map +1 -0
  109. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Key.fs +65 -0
  110. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Key.fs.js +229 -0
  111. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Key.fs.js.map +1 -0
  112. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Key.fs.ts.map +1 -0
  113. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Length.fs +91 -0
  114. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Locale.fs +876 -0
  115. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Properties.fs +4080 -0
  116. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Properties.fs.js +133 -0
  117. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Properties.fs.js.map +1 -0
  118. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Properties.fs.ts.map +1 -0
  119. package/FormSpec.TS/fable_modules/Feliz.2.7.0/React.fs +656 -0
  120. package/FormSpec.TS/fable_modules/Feliz.2.7.0/React.fs.js +561 -0
  121. package/FormSpec.TS/fable_modules/Feliz.2.7.0/React.fs.js.map +1 -0
  122. package/FormSpec.TS/fable_modules/Feliz.2.7.0/React.fs.ts.map +1 -0
  123. package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactDOM.fs +25 -0
  124. package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactDOM.fs.js +46 -0
  125. package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactDOM.fs.js.map +1 -0
  126. package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactDOM.fs.ts.map +1 -0
  127. package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactInterop.js +63 -0
  128. package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactInterop.js.map +1 -0
  129. package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactTypes.fs +41 -0
  130. package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactTypes.fs.js +7 -0
  131. package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactTypes.fs.js.map +1 -0
  132. package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactTypes.fs.ts.map +1 -0
  133. package/FormSpec.TS/fable_modules/Feliz.2.7.0/StyleTypes.fs +53 -0
  134. package/FormSpec.TS/fable_modules/Feliz.2.7.0/StyleTypes.fs.js +7 -0
  135. package/FormSpec.TS/fable_modules/Feliz.2.7.0/StyleTypes.fs.js.map +1 -0
  136. package/FormSpec.TS/fable_modules/Feliz.2.7.0/StyleTypes.fs.ts.map +1 -0
  137. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Styles.fs +5740 -0
  138. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Svg.fs +1455 -0
  139. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Svg.fs.js +39 -0
  140. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Svg.fs.js.map +1 -0
  141. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Svg.fs.ts.map +1 -0
  142. package/FormSpec.TS/fable_modules/Feliz.2.7.0/TextDecorationLine.fs +13 -0
  143. package/FormSpec.TS/fable_modules/Feliz.2.7.0/TextDecorationStyle.fs +33 -0
  144. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Transform.fs +181 -0
  145. package/FormSpec.TS/fable_modules/Feliz.2.7.0/TransformOrigin.fs +17 -0
  146. package/FormSpec.TS/fable_modules/Feliz.2.7.0/TransitionProperty.fs +162 -0
  147. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Types.fs +13 -0
  148. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Types.fs.js +7 -0
  149. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Types.fs.js.map +1 -0
  150. package/FormSpec.TS/fable_modules/Feliz.2.7.0/Types.fs.ts.map +1 -0
  151. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Decode.fs +1768 -0
  152. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Decode.fs.js +2337 -0
  153. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Decode.fs.js.map +1 -0
  154. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Decode.fs.ts.map +1 -0
  155. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs +811 -0
  156. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs.js +465 -0
  157. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs.js.map +1 -0
  158. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs.ts.map +1 -0
  159. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Extra.fs +47 -0
  160. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Extra.fs.js +18 -0
  161. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Extra.fs.js.map +1 -0
  162. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Extra.fs.ts.map +1 -0
  163. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Thoth.Json.fableproj +34 -0
  164. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Types.fs +68 -0
  165. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Types.fs.js +355 -0
  166. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Types.fs.js.map +1 -0
  167. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Types.fs.ts.map +1 -0
  168. package/FormSpec.TS/fable_modules/project_cracked.json +1 -0
  169. package/FormSpec.d.ts +1257 -0
  170. package/FormSpecHelpers.d.ts +50 -0
  171. package/Helpers.d.ts +147 -0
  172. package/Interfaces.d.ts +70 -0
  173. package/Interop/FormSpec.Api.Helpers.d.ts +247 -0
  174. package/Interop/FormSpec.Api.Helpers.d.ts.map +1 -0
  175. package/Interop/FormSpec.Api.Option.d.ts +384 -0
  176. package/Interop/FormSpec.Api.Option.d.ts.map +1 -0
  177. package/Interop/FormSpec.Values.Api.Option.d.ts +324 -0
  178. package/Interop/FormSpec.Values.Api.Option.d.ts.map +1 -0
  179. package/Migrator.d.ts +59 -0
  180. package/PathwayDataExtractor.d.ts +19 -0
  181. package/PathwayExecutor.d.ts +210 -0
  182. package/PathwayValidator.d.ts +52 -0
  183. package/PluginInterface.d.ts +36 -0
  184. package/Prelude.d.ts +11 -0
  185. package/README.TS.md +622 -0
  186. package/README.md +85 -0
  187. package/package.json +39 -0
  188. package/src/Components/HelloComponent.ts +48 -0
  189. package/src/Components/HelloComponent.ts.map +1 -0
  190. package/src/Designer.ts +389 -0
  191. package/src/Designer.ts.map +1 -0
  192. package/src/FormSpec.ts +3114 -0
  193. package/src/FormSpec.ts.map +1 -0
  194. package/src/FormSpecHelpers.ts +374 -0
  195. package/src/FormSpecHelpers.ts.map +1 -0
  196. package/src/Helpers.ts +765 -0
  197. package/src/Helpers.ts.map +1 -0
  198. package/src/Interfaces.ts +166 -0
  199. package/src/Interfaces.ts.map +1 -0
  200. package/src/Interop/FormSpec.Api.Helpers.ts +872 -0
  201. package/src/Interop/FormSpec.Api.Helpers.ts.map +1 -0
  202. package/src/Interop/FormSpec.Api.Option.ts +1618 -0
  203. package/src/Interop/FormSpec.Api.Option.ts.map +1 -0
  204. package/src/Interop/FormSpec.Values.Api.Option.ts +1214 -0
  205. package/src/Interop/FormSpec.Values.Api.Option.ts.map +1 -0
  206. package/src/Logging/LogTypes.ts +212 -0
  207. package/src/Logging/LogTypes.ts.map +1 -0
  208. package/src/Migrator.ts +156 -0
  209. package/src/Migrator.ts.map +1 -0
  210. package/src/PathwayDataExtractor.ts +290 -0
  211. package/src/PathwayDataExtractor.ts.map +1 -0
  212. package/src/PathwayExecutor.ts +1102 -0
  213. package/src/PathwayExecutor.ts.map +1 -0
  214. package/src/PathwayValidator.ts +244 -0
  215. package/src/PathwayValidator.ts.map +1 -0
  216. package/src/PluginInterface.ts +79 -0
  217. package/src/PluginInterface.ts.map +1 -0
  218. package/src/Prelude.ts +21 -0
  219. package/src/Prelude.ts.map +1 -0
  220. package/src/Renderers/FormSpecMarkdownRenderer.ts +874 -0
  221. package/src/Renderers/FormSpecMarkdownRenderer.ts.map +1 -0
  222. package/src/Renderers/MermaidRenderer.ts +218 -0
  223. package/src/Renderers/MermaidRenderer.ts.map +1 -0
  224. package/src/Renderers/PathwayRenderers.ts +200 -0
  225. package/src/Renderers/PathwayRenderers.ts.map +1 -0
@@ -0,0 +1,1961 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get Api_deserializeFormSpecTS () {
13
+ return Api_deserializeFormSpecTS;
14
+ },
15
+ get Api_fieldKeyToTypeScript () {
16
+ return Api_fieldKeyToTypeScript;
17
+ },
18
+ get Api_findFieldByKey () {
19
+ return Api_findFieldByKey;
20
+ },
21
+ get Api_formSpecFromTypeScript () {
22
+ return Api_formSpecFromTypeScript;
23
+ },
24
+ get Api_formSpecToTypeScript () {
25
+ return Api_formSpecToTypeScript;
26
+ },
27
+ get Api_getFieldKeys () {
28
+ return Api_getFieldKeys;
29
+ },
30
+ get Api_getFieldsByType () {
31
+ return Api_getFieldsByType;
32
+ },
33
+ get Api_getFormSpecFSfromFormSpecTSjsonString () {
34
+ return Api_getFormSpecFSfromFormSpecTSjsonString;
35
+ },
36
+ get Api_getFormSpecSummary () {
37
+ return Api_getFormSpecSummary;
38
+ },
39
+ get Api_getFormSpecTSfromFormSpecFSjsonString () {
40
+ return Api_getFormSpecTSfromFormSpecFSjsonString;
41
+ },
42
+ get Api_isValidFormSpec () {
43
+ return Api_isValidFormSpec;
44
+ },
45
+ get Api_serializeFormSpec () {
46
+ return Api_serializeFormSpec;
47
+ },
48
+ get Api_validateAndConvertFormSpec () {
49
+ return Api_validateAndConvertFormSpec;
50
+ },
51
+ get Api_validateFormSpec () {
52
+ return Api_validateFormSpec;
53
+ },
54
+ get Converters_clinicalPathwayFromTS () {
55
+ return Converters_clinicalPathwayFromTS;
56
+ },
57
+ get Converters_clinicalPathwayToTS () {
58
+ return Converters_clinicalPathwayToTS;
59
+ },
60
+ get Converters_dependsOnFromTS () {
61
+ return Converters_dependsOnFromTS;
62
+ },
63
+ get Converters_dependsOnToTS () {
64
+ return Converters_dependsOnToTS;
65
+ },
66
+ get Converters_evaluatorFromTS () {
67
+ return Converters_evaluatorFromTS;
68
+ },
69
+ get Converters_evaluatorToTS () {
70
+ return Converters_evaluatorToTS;
71
+ },
72
+ get Converters_fieldKeyFromTS () {
73
+ return Converters_fieldKeyFromTS;
74
+ },
75
+ get Converters_fieldKeyToTS () {
76
+ return Converters_fieldKeyToTS;
77
+ },
78
+ get Converters_fieldOptionFromTS () {
79
+ return Converters_fieldOptionFromTS;
80
+ },
81
+ get Converters_fieldOptionKeyFromTS () {
82
+ return Converters_fieldOptionKeyFromTS;
83
+ },
84
+ get Converters_fieldOptionKeyToTS () {
85
+ return Converters_fieldOptionKeyToTS;
86
+ },
87
+ get Converters_fieldOptionToTS () {
88
+ return Converters_fieldOptionToTS;
89
+ },
90
+ get Converters_fieldTypeFromTS () {
91
+ return Converters_fieldTypeFromTS;
92
+ },
93
+ get Converters_fieldTypeToTS () {
94
+ return Converters_fieldTypeToTS;
95
+ },
96
+ get Converters_formFieldFromTS () {
97
+ return Converters_formFieldFromTS;
98
+ },
99
+ get Converters_formFieldToTS () {
100
+ return Converters_formFieldToTS;
101
+ },
102
+ get Converters_formSpecFromTS () {
103
+ return Converters_formSpecFromTS;
104
+ },
105
+ get Converters_formSpecToTS () {
106
+ return Converters_formSpecToTS;
107
+ },
108
+ get Converters_formStepFromTS () {
109
+ return Converters_formStepFromTS;
110
+ },
111
+ get Converters_formStepToTS () {
112
+ return Converters_formStepToTS;
113
+ },
114
+ get Converters_matrixItemKeyToTS () {
115
+ return Converters_matrixItemKeyToTS;
116
+ },
117
+ get Converters_messageTypeFromTS () {
118
+ return Converters_messageTypeFromTS;
119
+ },
120
+ get Converters_messageTypeToTS () {
121
+ return Converters_messageTypeToTS;
122
+ },
123
+ get Converters_scoreColorFromTS () {
124
+ return Converters_scoreColorFromTS;
125
+ },
126
+ get Converters_scoreColorToTS () {
127
+ return Converters_scoreColorToTS;
128
+ },
129
+ get Converters_scoreFromTS () {
130
+ return Converters_scoreFromTS;
131
+ },
132
+ get Converters_scoreRangeFromTS () {
133
+ return Converters_scoreRangeFromTS;
134
+ },
135
+ get Converters_scoreRangeToTS () {
136
+ return Converters_scoreRangeToTS;
137
+ },
138
+ get Converters_scoreToTS () {
139
+ return Converters_scoreToTS;
140
+ },
141
+ get Converters_stateKeyFromTS () {
142
+ return Converters_stateKeyFromTS;
143
+ },
144
+ get Converters_stateKeyToTS () {
145
+ return Converters_stateKeyToTS;
146
+ },
147
+ get Converters_transitionKeyToTS () {
148
+ return Converters_transitionKeyToTS;
149
+ },
150
+ get Types_BooleanInfoTS () {
151
+ return Types_BooleanInfoTS;
152
+ },
153
+ get Types_BooleanInfoTS_$reflection () {
154
+ return Types_BooleanInfoTS_$reflection;
155
+ },
156
+ get Types_CheckboxInfoTS () {
157
+ return Types_CheckboxInfoTS;
158
+ },
159
+ get Types_CheckboxInfoTS_$reflection () {
160
+ return Types_CheckboxInfoTS_$reflection;
161
+ },
162
+ get Types_ClinicalPathwaySpecTS () {
163
+ return Types_ClinicalPathwaySpecTS;
164
+ },
165
+ get Types_ClinicalPathwaySpecTS_$reflection () {
166
+ return Types_ClinicalPathwaySpecTS_$reflection;
167
+ },
168
+ get Types_DependsOnTS () {
169
+ return Types_DependsOnTS;
170
+ },
171
+ get Types_DependsOnTS_$reflection () {
172
+ return Types_DependsOnTS_$reflection;
173
+ },
174
+ get Types_FieldKeyTS () {
175
+ return Types_FieldKeyTS;
176
+ },
177
+ get Types_FieldKeyTS_$reflection () {
178
+ return Types_FieldKeyTS_$reflection;
179
+ },
180
+ get Types_FieldOptionKeyTS () {
181
+ return Types_FieldOptionKeyTS;
182
+ },
183
+ get Types_FieldOptionKeyTS_$reflection () {
184
+ return Types_FieldOptionKeyTS_$reflection;
185
+ },
186
+ get Types_FieldOptionTS () {
187
+ return Types_FieldOptionTS;
188
+ },
189
+ get Types_FieldOptionTS_$reflection () {
190
+ return Types_FieldOptionTS_$reflection;
191
+ },
192
+ get Types_FieldTypeTS () {
193
+ return Types_FieldTypeTS;
194
+ },
195
+ get Types_FieldTypeTS_$reflection () {
196
+ return Types_FieldTypeTS_$reflection;
197
+ },
198
+ get Types_FormFieldTS () {
199
+ return Types_FormFieldTS;
200
+ },
201
+ get Types_FormFieldTS_$reflection () {
202
+ return Types_FormFieldTS_$reflection;
203
+ },
204
+ get Types_FormSpecTS () {
205
+ return Types_FormSpecTS;
206
+ },
207
+ get Types_FormSpecTS_$reflection () {
208
+ return Types_FormSpecTS_$reflection;
209
+ },
210
+ get Types_FormStepTS () {
211
+ return Types_FormStepTS;
212
+ },
213
+ get Types_FormStepTS_$reflection () {
214
+ return Types_FormStepTS_$reflection;
215
+ },
216
+ get Types_MatrixInfoTS () {
217
+ return Types_MatrixInfoTS;
218
+ },
219
+ get Types_MatrixInfoTS_$reflection () {
220
+ return Types_MatrixInfoTS_$reflection;
221
+ },
222
+ get Types_MatrixItemKeyTS () {
223
+ return Types_MatrixItemKeyTS;
224
+ },
225
+ get Types_MatrixItemKeyTS_$reflection () {
226
+ return Types_MatrixItemKeyTS_$reflection;
227
+ },
228
+ get Types_MatrixItemTS () {
229
+ return Types_MatrixItemTS;
230
+ },
231
+ get Types_MatrixItemTS_$reflection () {
232
+ return Types_MatrixItemTS_$reflection;
233
+ },
234
+ get Types_MessageInfoTS () {
235
+ return Types_MessageInfoTS;
236
+ },
237
+ get Types_MessageInfoTS_$reflection () {
238
+ return Types_MessageInfoTS_$reflection;
239
+ },
240
+ get Types_MultiChoiceInfoTS () {
241
+ return Types_MultiChoiceInfoTS;
242
+ },
243
+ get Types_MultiChoiceInfoTS_$reflection () {
244
+ return Types_MultiChoiceInfoTS_$reflection;
245
+ },
246
+ get Types_PluginFieldConfigTS () {
247
+ return Types_PluginFieldConfigTS;
248
+ },
249
+ get Types_PluginFieldConfigTS_$reflection () {
250
+ return Types_PluginFieldConfigTS_$reflection;
251
+ },
252
+ get Types_ScoreRangeTS () {
253
+ return Types_ScoreRangeTS;
254
+ },
255
+ get Types_ScoreRangeTS_$reflection () {
256
+ return Types_ScoreRangeTS_$reflection;
257
+ },
258
+ get Types_ScoreTS () {
259
+ return Types_ScoreTS;
260
+ },
261
+ get Types_ScoreTS_$reflection () {
262
+ return Types_ScoreTS_$reflection;
263
+ },
264
+ get Types_SignatureInfoTS () {
265
+ return Types_SignatureInfoTS;
266
+ },
267
+ get Types_SignatureInfoTS_$reflection () {
268
+ return Types_SignatureInfoTS_$reflection;
269
+ },
270
+ get Types_SingleChoiceInfoTS () {
271
+ return Types_SingleChoiceInfoTS;
272
+ },
273
+ get Types_SingleChoiceInfoTS_$reflection () {
274
+ return Types_SingleChoiceInfoTS_$reflection;
275
+ },
276
+ get Types_StateKeyTS () {
277
+ return Types_StateKeyTS;
278
+ },
279
+ get Types_StateKeyTS_$reflection () {
280
+ return Types_StateKeyTS_$reflection;
281
+ },
282
+ get Types_TextInfoTS () {
283
+ return Types_TextInfoTS;
284
+ },
285
+ get Types_TextInfoTS_$reflection () {
286
+ return Types_TextInfoTS_$reflection;
287
+ },
288
+ get Types_TransitionKeyTS () {
289
+ return Types_TransitionKeyTS;
290
+ },
291
+ get Types_TransitionKeyTS_$reflection () {
292
+ return Types_TransitionKeyTS_$reflection;
293
+ },
294
+ get Validators_validateAndConvert () {
295
+ return Validators_validateAndConvert;
296
+ },
297
+ get Validators_validateFormSpec () {
298
+ return Validators_validateFormSpec;
299
+ }
300
+ });
301
+ const _Types = require("@fable-org/fable-library-js/Types.js");
302
+ const _Util = require("@fable-org/fable-library-js/Util.js");
303
+ const _Reflection = require("@fable-org/fable-library-js/Reflection.js");
304
+ const _Option = require("@fable-org/fable-library-js/Option.js");
305
+ const _FormSpec = require("../FormSpec.js");
306
+ const _Guid = require("@fable-org/fable-library-js/Guid.js");
307
+ const _List = require("@fable-org/fable-library-js/List.js");
308
+ const _Array = require("@fable-org/fable-library-js/Array.js");
309
+ const _Encodefs = require("../fable_modules/Thoth.Json.10.4.1/Encode.fs.js");
310
+ const _Result = require("@fable-org/fable-library-js/Result.js");
311
+ const _Decodefs = require("../fable_modules/Thoth.Json.10.4.1/Decode.fs.js");
312
+ const _String = require("@fable-org/fable-library-js/String.js");
313
+ class Types_FieldKeyTS extends _Types.Record {
314
+ constructor(Value){
315
+ super();
316
+ this.Value = Value;
317
+ }
318
+ }
319
+ function Types_FieldKeyTS_$reflection() {
320
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.FieldKeyTS", [], Types_FieldKeyTS, ()=>[
321
+ [
322
+ "Value",
323
+ _Reflection.string_type
324
+ ]
325
+ ]);
326
+ }
327
+ class Types_StateKeyTS extends _Types.Record {
328
+ constructor(Value){
329
+ super();
330
+ this.Value = Value;
331
+ }
332
+ }
333
+ function Types_StateKeyTS_$reflection() {
334
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.StateKeyTS", [], Types_StateKeyTS, ()=>[
335
+ [
336
+ "Value",
337
+ _Reflection.string_type
338
+ ]
339
+ ]);
340
+ }
341
+ class Types_TransitionKeyTS extends _Types.Record {
342
+ constructor(Value){
343
+ super();
344
+ this.Value = Value;
345
+ }
346
+ }
347
+ function Types_TransitionKeyTS_$reflection() {
348
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.TransitionKeyTS", [], Types_TransitionKeyTS, ()=>[
349
+ [
350
+ "Value",
351
+ _Reflection.string_type
352
+ ]
353
+ ]);
354
+ }
355
+ class Types_MatrixItemKeyTS extends _Types.Record {
356
+ constructor(Value){
357
+ super();
358
+ this.Value = Value;
359
+ }
360
+ }
361
+ function Types_MatrixItemKeyTS_$reflection() {
362
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.MatrixItemKeyTS", [], Types_MatrixItemKeyTS, ()=>[
363
+ [
364
+ "Value",
365
+ _Reflection.string_type
366
+ ]
367
+ ]);
368
+ }
369
+ class Types_FieldOptionKeyTS extends _Types.Record {
370
+ constructor(Value){
371
+ super();
372
+ this.Value = Value;
373
+ }
374
+ }
375
+ function Types_FieldOptionKeyTS_$reflection() {
376
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.FieldOptionKeyTS", [], Types_FieldOptionKeyTS, ()=>[
377
+ [
378
+ "Value",
379
+ _Reflection.string_type
380
+ ]
381
+ ]);
382
+ }
383
+ class Types_FieldOptionTS extends _Types.Record {
384
+ constructor(Description, Value, OptionKey){
385
+ super();
386
+ this.Description = Description;
387
+ this.Value = Value;
388
+ this.OptionKey = OptionKey;
389
+ }
390
+ }
391
+ function Types_FieldOptionTS_$reflection() {
392
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.FieldOptionTS", [], Types_FieldOptionTS, ()=>[
393
+ [
394
+ "Description",
395
+ _Reflection.string_type
396
+ ],
397
+ [
398
+ "Value",
399
+ _Reflection.string_type
400
+ ],
401
+ [
402
+ "OptionKey",
403
+ Types_FieldOptionKeyTS_$reflection()
404
+ ]
405
+ ]);
406
+ }
407
+ class Types_TextInfoTS extends _Types.Record {
408
+ constructor(Value){
409
+ super();
410
+ this.Value = Value;
411
+ }
412
+ }
413
+ function Types_TextInfoTS_$reflection() {
414
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.TextInfoTS", [], Types_TextInfoTS, ()=>[
415
+ [
416
+ "Value",
417
+ (0, _Reflection.option_type)(_Reflection.string_type)
418
+ ]
419
+ ]);
420
+ }
421
+ class Types_BooleanInfoTS extends _Types.Record {
422
+ constructor(DefaultValue, Selection$){
423
+ super();
424
+ this.DefaultValue = DefaultValue;
425
+ this.Selection = Selection$;
426
+ }
427
+ }
428
+ function Types_BooleanInfoTS_$reflection() {
429
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.BooleanInfoTS", [], Types_BooleanInfoTS, ()=>[
430
+ [
431
+ "DefaultValue",
432
+ (0, _Reflection.option_type)(_Reflection.bool_type)
433
+ ],
434
+ [
435
+ "Selection",
436
+ (0, _Reflection.option_type)(_Reflection.bool_type)
437
+ ]
438
+ ]);
439
+ }
440
+ class Types_CheckboxInfoTS extends _Types.Record {
441
+ constructor(DefaultValue, Selection$){
442
+ super();
443
+ this.DefaultValue = DefaultValue;
444
+ this.Selection = Selection$;
445
+ }
446
+ }
447
+ function Types_CheckboxInfoTS_$reflection() {
448
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.CheckboxInfoTS", [], Types_CheckboxInfoTS, ()=>[
449
+ [
450
+ "DefaultValue",
451
+ (0, _Reflection.option_type)(_Reflection.bool_type)
452
+ ],
453
+ [
454
+ "Selection",
455
+ (0, _Reflection.option_type)(_Reflection.bool_type)
456
+ ]
457
+ ]);
458
+ }
459
+ class Types_SingleChoiceInfoTS extends _Types.Record {
460
+ constructor(Options){
461
+ super();
462
+ this.Options = Options;
463
+ }
464
+ }
465
+ function Types_SingleChoiceInfoTS_$reflection() {
466
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.SingleChoiceInfoTS", [], Types_SingleChoiceInfoTS, ()=>[
467
+ [
468
+ "Options",
469
+ (0, _Reflection.array_type)(Types_FieldOptionTS_$reflection())
470
+ ]
471
+ ]);
472
+ }
473
+ class Types_MultiChoiceInfoTS extends _Types.Record {
474
+ constructor(Options){
475
+ super();
476
+ this.Options = Options;
477
+ }
478
+ }
479
+ function Types_MultiChoiceInfoTS_$reflection() {
480
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.MultiChoiceInfoTS", [], Types_MultiChoiceInfoTS, ()=>[
481
+ [
482
+ "Options",
483
+ (0, _Reflection.array_type)(Types_FieldOptionTS_$reflection())
484
+ ]
485
+ ]);
486
+ }
487
+ class Types_MessageInfoTS extends _Types.Record {
488
+ constructor(Heading, MessageType, Message, Footer){
489
+ super();
490
+ this.Heading = Heading;
491
+ this.MessageType = MessageType | 0;
492
+ this.Message = Message;
493
+ this.Footer = Footer;
494
+ }
495
+ }
496
+ function Types_MessageInfoTS_$reflection() {
497
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.MessageInfoTS", [], Types_MessageInfoTS, ()=>[
498
+ [
499
+ "Heading",
500
+ _Reflection.string_type
501
+ ],
502
+ [
503
+ "MessageType",
504
+ (0, _Reflection.enum_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.MessageTypeTS", _Reflection.int32_type, [
505
+ [
506
+ "Warning",
507
+ 0
508
+ ],
509
+ [
510
+ "Success",
511
+ 1
512
+ ],
513
+ [
514
+ "Error",
515
+ 2
516
+ ],
517
+ [
518
+ "Info",
519
+ 3
520
+ ],
521
+ [
522
+ "Danger",
523
+ 4
524
+ ]
525
+ ])
526
+ ],
527
+ [
528
+ "Message",
529
+ _Reflection.string_type
530
+ ],
531
+ [
532
+ "Footer",
533
+ (0, _Reflection.option_type)(_Reflection.string_type)
534
+ ]
535
+ ]);
536
+ }
537
+ class Types_MatrixItemTS extends _Types.Record {
538
+ constructor(ItemKey, ItemLabel){
539
+ super();
540
+ this.ItemKey = ItemKey;
541
+ this.ItemLabel = ItemLabel;
542
+ }
543
+ }
544
+ function Types_MatrixItemTS_$reflection() {
545
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.MatrixItemTS", [], Types_MatrixItemTS, ()=>[
546
+ [
547
+ "ItemKey",
548
+ Types_MatrixItemKeyTS_$reflection()
549
+ ],
550
+ [
551
+ "ItemLabel",
552
+ _Reflection.string_type
553
+ ]
554
+ ]);
555
+ }
556
+ class Types_MatrixInfoTS extends _Types.Record {
557
+ constructor(Items, Options){
558
+ super();
559
+ this.Items = Items;
560
+ this.Options = Options;
561
+ }
562
+ }
563
+ function Types_MatrixInfoTS_$reflection() {
564
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.MatrixInfoTS", [], Types_MatrixInfoTS, ()=>[
565
+ [
566
+ "Items",
567
+ (0, _Reflection.array_type)(Types_FieldOptionTS_$reflection())
568
+ ],
569
+ [
570
+ "Options",
571
+ (0, _Reflection.array_type)(Types_FieldOptionTS_$reflection())
572
+ ]
573
+ ]);
574
+ }
575
+ class Types_SignatureInfoTS extends _Types.Record {
576
+ constructor(Value){
577
+ super();
578
+ this.Value = Value;
579
+ }
580
+ }
581
+ function Types_SignatureInfoTS_$reflection() {
582
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.SignatureInfoTS", [], Types_SignatureInfoTS, ()=>[
583
+ [
584
+ "Value",
585
+ (0, _Reflection.option_type)(_Reflection.string_type)
586
+ ]
587
+ ]);
588
+ }
589
+ class Types_PluginFieldConfigTS extends _Types.Record {
590
+ constructor(PluginId, FieldName){
591
+ super();
592
+ this.PluginId = PluginId;
593
+ this.FieldName = FieldName;
594
+ }
595
+ }
596
+ function Types_PluginFieldConfigTS_$reflection() {
597
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.PluginFieldConfigTS", [], Types_PluginFieldConfigTS, ()=>[
598
+ [
599
+ "PluginId",
600
+ _Reflection.string_type
601
+ ],
602
+ [
603
+ "FieldName",
604
+ _Reflection.string_type
605
+ ]
606
+ ]);
607
+ }
608
+ class Types_FieldTypeTS extends _Types.Record {
609
+ constructor(Type, TextInfo, BooleanInfo, CheckboxInfo, SingleChoiceInfo, MultiChoiceInfo, MessageInfo, MatrixInfo, SignatureInfo, PluginConfig){
610
+ super();
611
+ this.Type = Type;
612
+ this.TextInfo = TextInfo;
613
+ this.BooleanInfo = BooleanInfo;
614
+ this.CheckboxInfo = CheckboxInfo;
615
+ this.SingleChoiceInfo = SingleChoiceInfo;
616
+ this.MultiChoiceInfo = MultiChoiceInfo;
617
+ this.MessageInfo = MessageInfo;
618
+ this.MatrixInfo = MatrixInfo;
619
+ this.SignatureInfo = SignatureInfo;
620
+ this.PluginConfig = PluginConfig;
621
+ }
622
+ }
623
+ function Types_FieldTypeTS_$reflection() {
624
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.FieldTypeTS", [], Types_FieldTypeTS, ()=>[
625
+ [
626
+ "Type",
627
+ _Reflection.string_type
628
+ ],
629
+ [
630
+ "TextInfo",
631
+ (0, _Reflection.option_type)(Types_TextInfoTS_$reflection())
632
+ ],
633
+ [
634
+ "BooleanInfo",
635
+ (0, _Reflection.option_type)(Types_BooleanInfoTS_$reflection())
636
+ ],
637
+ [
638
+ "CheckboxInfo",
639
+ (0, _Reflection.option_type)(Types_CheckboxInfoTS_$reflection())
640
+ ],
641
+ [
642
+ "SingleChoiceInfo",
643
+ (0, _Reflection.option_type)(Types_SingleChoiceInfoTS_$reflection())
644
+ ],
645
+ [
646
+ "MultiChoiceInfo",
647
+ (0, _Reflection.option_type)(Types_MultiChoiceInfoTS_$reflection())
648
+ ],
649
+ [
650
+ "MessageInfo",
651
+ (0, _Reflection.option_type)(Types_MessageInfoTS_$reflection())
652
+ ],
653
+ [
654
+ "MatrixInfo",
655
+ (0, _Reflection.option_type)(Types_MatrixInfoTS_$reflection())
656
+ ],
657
+ [
658
+ "SignatureInfo",
659
+ (0, _Reflection.option_type)(Types_SignatureInfoTS_$reflection())
660
+ ],
661
+ [
662
+ "PluginConfig",
663
+ (0, _Reflection.option_type)(Types_PluginFieldConfigTS_$reflection())
664
+ ]
665
+ ]);
666
+ }
667
+ class Types_DependsOnTS extends _Types.Record {
668
+ constructor(FieldKey, FieldValue, Evaluator){
669
+ super();
670
+ this.FieldKey = FieldKey;
671
+ this.FieldValue = FieldValue;
672
+ this.Evaluator = Evaluator | 0;
673
+ }
674
+ }
675
+ function Types_DependsOnTS_$reflection() {
676
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.DependsOnTS", [], Types_DependsOnTS, ()=>[
677
+ [
678
+ "FieldKey",
679
+ Types_FieldKeyTS_$reflection()
680
+ ],
681
+ [
682
+ "FieldValue",
683
+ _Reflection.string_type
684
+ ],
685
+ [
686
+ "Evaluator",
687
+ (0, _Reflection.enum_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.EvaluatorTS", _Reflection.int32_type, [
688
+ [
689
+ "Equals",
690
+ 0
691
+ ],
692
+ [
693
+ "NotEquals",
694
+ 1
695
+ ],
696
+ [
697
+ "GreaterThan",
698
+ 2
699
+ ],
700
+ [
701
+ "GreaterThanOrEquals",
702
+ 3
703
+ ],
704
+ [
705
+ "LessThan",
706
+ 4
707
+ ],
708
+ [
709
+ "LessThanOrEquals",
710
+ 5
711
+ ],
712
+ [
713
+ "Exists",
714
+ 6
715
+ ],
716
+ [
717
+ "IsEmpty",
718
+ 7
719
+ ],
720
+ [
721
+ "Contains",
722
+ 8
723
+ ]
724
+ ])
725
+ ]
726
+ ]);
727
+ }
728
+ class Types_FormFieldTS extends _Types.Record {
729
+ constructor(FieldOrder, FieldKey, Label, Notes, DependsOn, IsOptional, IsDeprecated, FieldType){
730
+ super();
731
+ this.FieldOrder = FieldOrder | 0;
732
+ this.FieldKey = FieldKey;
733
+ this.Label = Label;
734
+ this.Notes = Notes;
735
+ this.DependsOn = DependsOn;
736
+ this.IsOptional = IsOptional;
737
+ this.IsDeprecated = IsDeprecated;
738
+ this.FieldType = FieldType;
739
+ }
740
+ }
741
+ function Types_FormFieldTS_$reflection() {
742
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.FormFieldTS", [], Types_FormFieldTS, ()=>[
743
+ [
744
+ "FieldOrder",
745
+ _Reflection.int32_type
746
+ ],
747
+ [
748
+ "FieldKey",
749
+ Types_FieldKeyTS_$reflection()
750
+ ],
751
+ [
752
+ "Label",
753
+ _Reflection.string_type
754
+ ],
755
+ [
756
+ "Notes",
757
+ (0, _Reflection.option_type)(_Reflection.string_type)
758
+ ],
759
+ [
760
+ "DependsOn",
761
+ (0, _Reflection.option_type)(Types_DependsOnTS_$reflection())
762
+ ],
763
+ [
764
+ "IsOptional",
765
+ _Reflection.bool_type
766
+ ],
767
+ [
768
+ "IsDeprecated",
769
+ _Reflection.bool_type
770
+ ],
771
+ [
772
+ "FieldType",
773
+ Types_FieldTypeTS_$reflection()
774
+ ]
775
+ ]);
776
+ }
777
+ class Types_FormStepTS extends _Types.Record {
778
+ constructor(StepOrder, StepLabel, Fields){
779
+ super();
780
+ this.StepOrder = StepOrder | 0;
781
+ this.StepLabel = StepLabel;
782
+ this.Fields = Fields;
783
+ }
784
+ }
785
+ function Types_FormStepTS_$reflection() {
786
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.FormStepTS", [], Types_FormStepTS, ()=>[
787
+ [
788
+ "StepOrder",
789
+ _Reflection.int32_type
790
+ ],
791
+ [
792
+ "StepLabel",
793
+ _Reflection.string_type
794
+ ],
795
+ [
796
+ "Fields",
797
+ (0, _Reflection.array_type)(Types_FormFieldTS_$reflection())
798
+ ]
799
+ ]);
800
+ }
801
+ class Types_ScoreRangeTS extends _Types.Record {
802
+ constructor(Id, Min, Max, Label, Tag){
803
+ super();
804
+ this.Id = Id;
805
+ this.Min = Min | 0;
806
+ this.Max = Max | 0;
807
+ this.Label = Label;
808
+ this.Tag = Tag | 0;
809
+ }
810
+ }
811
+ function Types_ScoreRangeTS_$reflection() {
812
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.ScoreRangeTS", [], Types_ScoreRangeTS, ()=>[
813
+ [
814
+ "Id",
815
+ _Reflection.string_type
816
+ ],
817
+ [
818
+ "Min",
819
+ _Reflection.int32_type
820
+ ],
821
+ [
822
+ "Max",
823
+ _Reflection.int32_type
824
+ ],
825
+ [
826
+ "Label",
827
+ _Reflection.string_type
828
+ ],
829
+ [
830
+ "Tag",
831
+ (0, _Reflection.enum_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.ScoreColorTS", _Reflection.int32_type, [
832
+ [
833
+ "Unspecified",
834
+ 0
835
+ ],
836
+ [
837
+ "Primary",
838
+ 1
839
+ ],
840
+ [
841
+ "Link",
842
+ 2
843
+ ],
844
+ [
845
+ "Info",
846
+ 3
847
+ ],
848
+ [
849
+ "Success",
850
+ 4
851
+ ],
852
+ [
853
+ "Warning",
854
+ 5
855
+ ],
856
+ [
857
+ "Danger",
858
+ 6
859
+ ]
860
+ ])
861
+ ]
862
+ ]);
863
+ }
864
+ class Types_ScoreTS extends _Types.Record {
865
+ constructor(MaxScore, ScoreRanges){
866
+ super();
867
+ this.MaxScore = MaxScore | 0;
868
+ this.ScoreRanges = ScoreRanges;
869
+ }
870
+ }
871
+ function Types_ScoreTS_$reflection() {
872
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.ScoreTS", [], Types_ScoreTS, ()=>[
873
+ [
874
+ "MaxScore",
875
+ _Reflection.int32_type
876
+ ],
877
+ [
878
+ "ScoreRanges",
879
+ (0, _Reflection.array_type)(Types_ScoreRangeTS_$reflection())
880
+ ]
881
+ ]);
882
+ }
883
+ class Types_ClinicalPathwaySpecTS extends _Types.Record {
884
+ constructor(PathwayId, PathwayName, Version, ProtocolSource){
885
+ super();
886
+ this.PathwayId = PathwayId;
887
+ this.PathwayName = PathwayName;
888
+ this.Version = Version;
889
+ this.ProtocolSource = ProtocolSource;
890
+ }
891
+ }
892
+ function Types_ClinicalPathwaySpecTS_$reflection() {
893
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.ClinicalPathwaySpecTS", [], Types_ClinicalPathwaySpecTS, ()=>[
894
+ [
895
+ "PathwayId",
896
+ _Reflection.string_type
897
+ ],
898
+ [
899
+ "PathwayName",
900
+ _Reflection.string_type
901
+ ],
902
+ [
903
+ "Version",
904
+ _Reflection.string_type
905
+ ],
906
+ [
907
+ "ProtocolSource",
908
+ _Reflection.string_type
909
+ ]
910
+ ]);
911
+ }
912
+ class Types_FormSpecTS extends _Types.Record {
913
+ constructor(Id, Code, Title, Abstract, Version, FormSpecVersion, Steps, CategoryTags, Score, AssociatedCodes, RequiresReview, RequiresReviewAndApproval, ClinicalPathway){
914
+ super();
915
+ this.Id = Id;
916
+ this.Code = Code;
917
+ this.Title = Title;
918
+ this.Abstract = Abstract;
919
+ this.Version = Version;
920
+ this.FormSpecVersion = FormSpecVersion;
921
+ this.Steps = Steps;
922
+ this.CategoryTags = CategoryTags;
923
+ this.Score = Score;
924
+ this.AssociatedCodes = AssociatedCodes;
925
+ this.RequiresReview = RequiresReview;
926
+ this.RequiresReviewAndApproval = RequiresReviewAndApproval;
927
+ this.ClinicalPathway = ClinicalPathway;
928
+ }
929
+ }
930
+ function Types_FormSpecTS_$reflection() {
931
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.Types.FormSpecTS", [], Types_FormSpecTS, ()=>[
932
+ [
933
+ "Id",
934
+ _Reflection.string_type
935
+ ],
936
+ [
937
+ "Code",
938
+ (0, _Reflection.option_type)(_Reflection.string_type)
939
+ ],
940
+ [
941
+ "Title",
942
+ _Reflection.string_type
943
+ ],
944
+ [
945
+ "Abstract",
946
+ _Reflection.string_type
947
+ ],
948
+ [
949
+ "Version",
950
+ _Reflection.string_type
951
+ ],
952
+ [
953
+ "FormSpecVersion",
954
+ _Reflection.string_type
955
+ ],
956
+ [
957
+ "Steps",
958
+ (0, _Reflection.array_type)(Types_FormStepTS_$reflection())
959
+ ],
960
+ [
961
+ "CategoryTags",
962
+ (0, _Reflection.array_type)(_Reflection.string_type)
963
+ ],
964
+ [
965
+ "Score",
966
+ (0, _Reflection.option_type)(Types_ScoreTS_$reflection())
967
+ ],
968
+ [
969
+ "AssociatedCodes",
970
+ (0, _Reflection.array_type)(_Reflection.string_type)
971
+ ],
972
+ [
973
+ "RequiresReview",
974
+ _Reflection.bool_type
975
+ ],
976
+ [
977
+ "RequiresReviewAndApproval",
978
+ _Reflection.bool_type
979
+ ],
980
+ [
981
+ "ClinicalPathway",
982
+ (0, _Reflection.option_type)(Types_ClinicalPathwaySpecTS_$reflection())
983
+ ]
984
+ ]);
985
+ }
986
+ function Converters_fieldKeyToTS(_arg) {
987
+ return new Types_FieldKeyTS(_arg.fields[0]);
988
+ }
989
+ function Converters_fieldKeyFromTS(key) {
990
+ let matchValue;
991
+ let outArg = "00000000-0000-0000-0000-000000000000";
992
+ matchValue = [
993
+ (0, _Guid.tryParse)(key.Value, new _Types.FSharpRef(()=>outArg, (v)=>{
994
+ outArg = v;
995
+ })),
996
+ outArg
997
+ ];
998
+ if (matchValue[0]) {
999
+ return new _FormSpec.Shared_FieldKey(matchValue[1]);
1000
+ } else {
1001
+ return undefined;
1002
+ }
1003
+ }
1004
+ function Converters_stateKeyToTS(_arg) {
1005
+ return new Types_StateKeyTS(_arg.fields[0]);
1006
+ }
1007
+ function Converters_stateKeyFromTS(key) {
1008
+ let matchValue;
1009
+ let outArg = "00000000-0000-0000-0000-000000000000";
1010
+ matchValue = [
1011
+ (0, _Guid.tryParse)(key.Value, new _Types.FSharpRef(()=>outArg, (v)=>{
1012
+ outArg = v;
1013
+ })),
1014
+ outArg
1015
+ ];
1016
+ if (matchValue[0]) {
1017
+ return new _FormSpec.Shared_StateKey(matchValue[1]);
1018
+ } else {
1019
+ return undefined;
1020
+ }
1021
+ }
1022
+ function Converters_transitionKeyToTS(_arg) {
1023
+ return new Types_TransitionKeyTS(_arg.fields[0]);
1024
+ }
1025
+ function Converters_matrixItemKeyToTS(_arg) {
1026
+ return new Types_MatrixItemKeyTS(_arg.fields[0]);
1027
+ }
1028
+ function Converters_fieldOptionKeyToTS(_arg) {
1029
+ return new Types_FieldOptionKeyTS(_arg.fields[0]);
1030
+ }
1031
+ function Converters_fieldOptionKeyFromTS(key) {
1032
+ let matchValue;
1033
+ let outArg = "00000000-0000-0000-0000-000000000000";
1034
+ matchValue = [
1035
+ (0, _Guid.tryParse)(key.Value, new _Types.FSharpRef(()=>outArg, (v)=>{
1036
+ outArg = v;
1037
+ })),
1038
+ outArg
1039
+ ];
1040
+ if (matchValue[0]) {
1041
+ return new _FormSpec.Shared_FieldOptionKey(matchValue[1]);
1042
+ } else {
1043
+ return undefined;
1044
+ }
1045
+ }
1046
+ function Converters_fieldOptionToTS(option) {
1047
+ return new Types_FieldOptionTS(option.Description, option.Value, Converters_fieldOptionKeyToTS(option.OptionKey));
1048
+ }
1049
+ function Converters_fieldOptionFromTS(option) {
1050
+ const matchValue = Converters_fieldOptionKeyFromTS(option.OptionKey);
1051
+ if (matchValue == null) {
1052
+ return undefined;
1053
+ } else {
1054
+ return new _FormSpec.Shared_FieldOption(option.Description, option.Value, (0, _Option.value)(matchValue));
1055
+ }
1056
+ }
1057
+ function Converters_evaluatorToTS(evaluator) {
1058
+ switch(evaluator.tag){
1059
+ case /* NotEquals */ 1:
1060
+ return 1;
1061
+ case /* GreaterThan */ 2:
1062
+ return 2;
1063
+ case /* GreaterThanOrEquals */ 3:
1064
+ return 3;
1065
+ case /* LessThan */ 4:
1066
+ return 4;
1067
+ case /* LessThanOrEquals */ 5:
1068
+ return 5;
1069
+ case /* Exists */ 6:
1070
+ return 6;
1071
+ case /* IsEmpty */ 7:
1072
+ return 7;
1073
+ case /* Contains */ 8:
1074
+ return 8;
1075
+ default:
1076
+ return 0;
1077
+ }
1078
+ }
1079
+ function Converters_evaluatorFromTS(evaluator) {
1080
+ switch(evaluator){
1081
+ case 0:
1082
+ return (0, _FormSpec.Spec_Evaluator_Equals)();
1083
+ case 1:
1084
+ return (0, _FormSpec.Spec_Evaluator_NotEquals)();
1085
+ case 2:
1086
+ return (0, _FormSpec.Spec_Evaluator_GreaterThan)();
1087
+ case 3:
1088
+ return (0, _FormSpec.Spec_Evaluator_GreaterThanOrEquals)();
1089
+ case 4:
1090
+ return (0, _FormSpec.Spec_Evaluator_LessThan)();
1091
+ case 5:
1092
+ return (0, _FormSpec.Spec_Evaluator_LessThanOrEquals)();
1093
+ case 6:
1094
+ return (0, _FormSpec.Spec_Evaluator_Exists)();
1095
+ case 7:
1096
+ return (0, _FormSpec.Spec_Evaluator_IsEmpty)();
1097
+ case 8:
1098
+ return (0, _FormSpec.Spec_Evaluator_Contains)();
1099
+ default:
1100
+ return undefined;
1101
+ }
1102
+ }
1103
+ function Converters_dependsOnToTS(deps) {
1104
+ return new Types_DependsOnTS(Converters_fieldKeyToTS(deps.FieldKey), deps.FieldValue, Converters_evaluatorToTS(deps.Evaluator));
1105
+ }
1106
+ function Converters_dependsOnFromTS(deps) {
1107
+ const matchValue = Converters_fieldKeyFromTS(deps.FieldKey);
1108
+ const matchValue_1 = Converters_evaluatorFromTS(deps.Evaluator);
1109
+ let matchResult, eval$, key;
1110
+ if (matchValue != null) {
1111
+ if (matchValue_1 != null) {
1112
+ matchResult = 0;
1113
+ eval$ = (0, _Option.value)(matchValue_1);
1114
+ key = (0, _Option.value)(matchValue);
1115
+ } else {
1116
+ matchResult = 1;
1117
+ }
1118
+ } else {
1119
+ matchResult = 1;
1120
+ }
1121
+ switch(matchResult){
1122
+ case 0:
1123
+ return new _FormSpec.Spec_DependsOn(key, deps.FieldValue, eval$);
1124
+ default:
1125
+ return undefined;
1126
+ }
1127
+ }
1128
+ function Converters_messageTypeToTS(msgType) {
1129
+ switch(msgType.tag){
1130
+ case /* Success */ 1:
1131
+ return 1;
1132
+ case /* Error */ 2:
1133
+ return 2;
1134
+ case /* Info */ 3:
1135
+ return 3;
1136
+ case /* Danger */ 4:
1137
+ return 4;
1138
+ default:
1139
+ return 0;
1140
+ }
1141
+ }
1142
+ function Converters_messageTypeFromTS(msgType) {
1143
+ switch(msgType){
1144
+ case 0:
1145
+ return (0, _FormSpec.Spec_MessageType_Warning)();
1146
+ case 1:
1147
+ return (0, _FormSpec.Spec_MessageType_Success)();
1148
+ case 2:
1149
+ return (0, _FormSpec.Spec_MessageType_Error)();
1150
+ case 3:
1151
+ return (0, _FormSpec.Spec_MessageType_Info)();
1152
+ case 4:
1153
+ return (0, _FormSpec.Spec_MessageType_Danger)();
1154
+ default:
1155
+ return undefined;
1156
+ }
1157
+ }
1158
+ function Converters_fieldTypeToTS(fieldType) {
1159
+ switch(fieldType.tag){
1160
+ case /* TextArea */ 1:
1161
+ return new Types_FieldTypeTS("TextArea", new Types_TextInfoTS(fieldType.fields[0].Value), undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
1162
+ case /* Email */ 2:
1163
+ return new Types_FieldTypeTS("Email", new Types_TextInfoTS(fieldType.fields[0].Value), undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
1164
+ case /* Password */ 3:
1165
+ return new Types_FieldTypeTS("Password", new Types_TextInfoTS(fieldType.fields[0].Value), undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
1166
+ case /* Search */ 4:
1167
+ return new Types_FieldTypeTS("Search", new Types_TextInfoTS(fieldType.fields[0].Value), undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
1168
+ case /* Color */ 5:
1169
+ return new Types_FieldTypeTS("Color", new Types_TextInfoTS(fieldType.fields[0].Value), undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
1170
+ case /* Number */ 6:
1171
+ return new Types_FieldTypeTS("Number", new Types_TextInfoTS(fieldType.fields[0].Value), undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
1172
+ case /* Tel */ 7:
1173
+ return new Types_FieldTypeTS("Tel", new Types_TextInfoTS(fieldType.fields[0].Value), undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
1174
+ case /* Date */ 8:
1175
+ return new Types_FieldTypeTS("Date", new Types_TextInfoTS(fieldType.fields[0].Value), undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
1176
+ case /* DateTimeLocal */ 9:
1177
+ return new Types_FieldTypeTS("DateTimeLocal", new Types_TextInfoTS(fieldType.fields[0].Value), undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
1178
+ case /* Time */ 10:
1179
+ return new Types_FieldTypeTS("Time", new Types_TextInfoTS(fieldType.fields[0].Value), undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
1180
+ case /* Checkbox */ 11:
1181
+ {
1182
+ const info_11 = fieldType.fields[0];
1183
+ return new Types_FieldTypeTS("Checkbox", undefined, undefined, new Types_CheckboxInfoTS(info_11.DefaultValue, info_11.Selection), undefined, undefined, undefined, undefined, undefined, undefined);
1184
+ }
1185
+ case /* Radio */ 12:
1186
+ return new Types_FieldTypeTS("Radio", undefined, undefined, undefined, new Types_SingleChoiceInfoTS((0, _List.toArray)((0, _List.map)(Converters_fieldOptionToTS, fieldType.fields[0].Options))), undefined, undefined, undefined, undefined, undefined);
1187
+ case /* SingleChoice */ 13:
1188
+ return new Types_FieldTypeTS("SingleChoice", undefined, undefined, undefined, new Types_SingleChoiceInfoTS((0, _List.toArray)((0, _List.map)(Converters_fieldOptionToTS, fieldType.fields[0].Options))), undefined, undefined, undefined, undefined, undefined);
1189
+ case /* Dropdown */ 14:
1190
+ return new Types_FieldTypeTS("Dropdown", undefined, undefined, undefined, new Types_SingleChoiceInfoTS((0, _List.toArray)((0, _List.map)(Converters_fieldOptionToTS, fieldType.fields[0].Options))), undefined, undefined, undefined, undefined, undefined);
1191
+ case /* MultiChoice */ 15:
1192
+ return new Types_FieldTypeTS("MultiChoice", undefined, undefined, undefined, undefined, new Types_MultiChoiceInfoTS((0, _List.toArray)((0, _List.map)(Converters_fieldOptionToTS, fieldType.fields[0].Options))), undefined, undefined, undefined, undefined);
1193
+ case /* CheckboxList */ 16:
1194
+ return new Types_FieldTypeTS("CheckboxList", undefined, undefined, undefined, undefined, new Types_MultiChoiceInfoTS((0, _List.toArray)((0, _List.map)(Converters_fieldOptionToTS, fieldType.fields[0].Options))), undefined, undefined, undefined, undefined);
1195
+ case /* TagList */ 17:
1196
+ return new Types_FieldTypeTS("TagList", undefined, undefined, undefined, undefined, new Types_MultiChoiceInfoTS((0, _List.toArray)((0, _List.map)(Converters_fieldOptionToTS, fieldType.fields[0].Options))), undefined, undefined, undefined, undefined);
1197
+ case /* TextAutoComplete */ 18:
1198
+ return new Types_FieldTypeTS("TextAutoComplete", undefined, undefined, undefined, new Types_SingleChoiceInfoTS((0, _List.toArray)((0, _List.map)(Converters_fieldOptionToTS, fieldType.fields[0].Options))), undefined, undefined, undefined, undefined, undefined);
1199
+ case /* Matrix */ 19:
1200
+ {
1201
+ const info_19 = fieldType.fields[0];
1202
+ return new Types_FieldTypeTS("Matrix", undefined, undefined, undefined, undefined, undefined, undefined, new Types_MatrixInfoTS((0, _List.toArray)((0, _List.map)(Converters_fieldOptionToTS, info_19.Items)), (0, _List.toArray)((0, _List.map)(Converters_fieldOptionToTS, info_19.Options))), undefined, undefined);
1203
+ }
1204
+ case /* Signature */ 20:
1205
+ return new Types_FieldTypeTS("Signature", undefined, undefined, undefined, undefined, undefined, undefined, undefined, new Types_SignatureInfoTS(fieldType.fields[0].Value), undefined);
1206
+ case /* Message */ 21:
1207
+ {
1208
+ const info_21 = fieldType.fields[0];
1209
+ return new Types_FieldTypeTS("Message", undefined, undefined, undefined, undefined, undefined, new Types_MessageInfoTS(info_21.Heading, Converters_messageTypeToTS(info_21.MessageType), info_21.Message, info_21.Footer), undefined, undefined, undefined);
1210
+ }
1211
+ case /* PluginField */ 22:
1212
+ {
1213
+ const config = fieldType.fields[0];
1214
+ return new Types_FieldTypeTS("PluginField", undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, new Types_PluginFieldConfigTS(config.PluginId, config.FieldName));
1215
+ }
1216
+ default:
1217
+ return new Types_FieldTypeTS("Text", new Types_TextInfoTS(fieldType.fields[0].Value), undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
1218
+ }
1219
+ }
1220
+ function Converters_fieldTypeFromTS(fieldType) {
1221
+ const matchValue = fieldType.Type;
1222
+ switch(matchValue){
1223
+ case "Text":
1224
+ {
1225
+ const matchValue_1 = fieldType.TextInfo;
1226
+ if (matchValue_1 == null) {
1227
+ return undefined;
1228
+ } else {
1229
+ return (0, _FormSpec.Spec_FieldType_Text)(new _FormSpec.Spec_TextInfo((0, _Option.value)(matchValue_1).Value));
1230
+ }
1231
+ }
1232
+ case "TextArea":
1233
+ {
1234
+ const matchValue_2 = fieldType.TextInfo;
1235
+ if (matchValue_2 == null) {
1236
+ return undefined;
1237
+ } else {
1238
+ return (0, _FormSpec.Spec_FieldType_TextArea)(new _FormSpec.Spec_TextInfo((0, _Option.value)(matchValue_2).Value));
1239
+ }
1240
+ }
1241
+ case "Email":
1242
+ {
1243
+ const matchValue_3 = fieldType.TextInfo;
1244
+ if (matchValue_3 == null) {
1245
+ return undefined;
1246
+ } else {
1247
+ return (0, _FormSpec.Spec_FieldType_Email)(new _FormSpec.Spec_TextInfo((0, _Option.value)(matchValue_3).Value));
1248
+ }
1249
+ }
1250
+ case "Password":
1251
+ {
1252
+ const matchValue_4 = fieldType.TextInfo;
1253
+ if (matchValue_4 == null) {
1254
+ return undefined;
1255
+ } else {
1256
+ return (0, _FormSpec.Spec_FieldType_Password)(new _FormSpec.Spec_TextInfo((0, _Option.value)(matchValue_4).Value));
1257
+ }
1258
+ }
1259
+ case "Search":
1260
+ {
1261
+ const matchValue_5 = fieldType.TextInfo;
1262
+ if (matchValue_5 == null) {
1263
+ return undefined;
1264
+ } else {
1265
+ return (0, _FormSpec.Spec_FieldType_Search)(new _FormSpec.Spec_TextInfo((0, _Option.value)(matchValue_5).Value));
1266
+ }
1267
+ }
1268
+ case "Color":
1269
+ {
1270
+ const matchValue_6 = fieldType.TextInfo;
1271
+ if (matchValue_6 == null) {
1272
+ return undefined;
1273
+ } else {
1274
+ return (0, _FormSpec.Spec_FieldType_Color)(new _FormSpec.Spec_TextInfo((0, _Option.value)(matchValue_6).Value));
1275
+ }
1276
+ }
1277
+ case "Number":
1278
+ {
1279
+ const matchValue_7 = fieldType.TextInfo;
1280
+ if (matchValue_7 == null) {
1281
+ return undefined;
1282
+ } else {
1283
+ return (0, _FormSpec.Spec_FieldType_Number)(new _FormSpec.Spec_TextInfo((0, _Option.value)(matchValue_7).Value));
1284
+ }
1285
+ }
1286
+ case "Tel":
1287
+ {
1288
+ const matchValue_8 = fieldType.TextInfo;
1289
+ if (matchValue_8 == null) {
1290
+ return undefined;
1291
+ } else {
1292
+ return (0, _FormSpec.Spec_FieldType_Tel)(new _FormSpec.Spec_TextInfo((0, _Option.value)(matchValue_8).Value));
1293
+ }
1294
+ }
1295
+ case "Date":
1296
+ {
1297
+ const matchValue_9 = fieldType.TextInfo;
1298
+ if (matchValue_9 == null) {
1299
+ return undefined;
1300
+ } else {
1301
+ return (0, _FormSpec.Spec_FieldType_Date)(new _FormSpec.Spec_TextInfo((0, _Option.value)(matchValue_9).Value));
1302
+ }
1303
+ }
1304
+ case "DateTimeLocal":
1305
+ {
1306
+ const matchValue_10 = fieldType.TextInfo;
1307
+ if (matchValue_10 == null) {
1308
+ return undefined;
1309
+ } else {
1310
+ return (0, _FormSpec.Spec_FieldType_DateTimeLocal)(new _FormSpec.Spec_TextInfo((0, _Option.value)(matchValue_10).Value));
1311
+ }
1312
+ }
1313
+ case "Time":
1314
+ {
1315
+ const matchValue_11 = fieldType.TextInfo;
1316
+ if (matchValue_11 == null) {
1317
+ return undefined;
1318
+ } else {
1319
+ return (0, _FormSpec.Spec_FieldType_Time)(new _FormSpec.Spec_TextInfo((0, _Option.value)(matchValue_11).Value));
1320
+ }
1321
+ }
1322
+ case "Checkbox":
1323
+ {
1324
+ const matchValue_12 = fieldType.CheckboxInfo;
1325
+ if (matchValue_12 == null) {
1326
+ return undefined;
1327
+ } else {
1328
+ const info_11 = (0, _Option.value)(matchValue_12);
1329
+ return (0, _FormSpec.Spec_FieldType_Checkbox)(new _FormSpec.Spec_BooleanInfo(info_11.DefaultValue, info_11.Selection));
1330
+ }
1331
+ }
1332
+ case "Radio":
1333
+ {
1334
+ const matchValue_13 = fieldType.SingleChoiceInfo;
1335
+ if (matchValue_13 == null) {
1336
+ return undefined;
1337
+ } else {
1338
+ const convertedOptions = (0, _Array.fold)((acc, opt)=>{
1339
+ let matchResult, item, list;
1340
+ if (acc != null) {
1341
+ if (opt != null) {
1342
+ matchResult = 0;
1343
+ item = (0, _Option.value)(opt);
1344
+ list = (0, _Option.value)(acc);
1345
+ } else {
1346
+ matchResult = 1;
1347
+ }
1348
+ } else {
1349
+ matchResult = 1;
1350
+ }
1351
+ switch(matchResult){
1352
+ case 0:
1353
+ return (0, _List.cons)(item, list);
1354
+ default:
1355
+ return undefined;
1356
+ }
1357
+ }, (0, _List.empty)(), (0, _Array.map)(Converters_fieldOptionFromTS, (0, _Option.value)(matchValue_13).Options));
1358
+ if (convertedOptions == null) {
1359
+ return undefined;
1360
+ } else {
1361
+ return (0, _FormSpec.Spec_FieldType_Radio)(new _FormSpec.Spec_SingleChoiceInfo((0, _List.reverse)((0, _Option.value)(convertedOptions))));
1362
+ }
1363
+ }
1364
+ }
1365
+ case "SingleChoice":
1366
+ {
1367
+ const matchValue_15 = fieldType.SingleChoiceInfo;
1368
+ if (matchValue_15 == null) {
1369
+ return undefined;
1370
+ } else {
1371
+ const convertedOptions_1 = (0, _Array.fold)((acc_1, opt_1)=>{
1372
+ let matchResult_1, item_1, list_1;
1373
+ if (acc_1 != null) {
1374
+ if (opt_1 != null) {
1375
+ matchResult_1 = 0;
1376
+ item_1 = (0, _Option.value)(opt_1);
1377
+ list_1 = (0, _Option.value)(acc_1);
1378
+ } else {
1379
+ matchResult_1 = 1;
1380
+ }
1381
+ } else {
1382
+ matchResult_1 = 1;
1383
+ }
1384
+ switch(matchResult_1){
1385
+ case 0:
1386
+ return (0, _List.cons)(item_1, list_1);
1387
+ default:
1388
+ return undefined;
1389
+ }
1390
+ }, (0, _List.empty)(), (0, _Array.map)(Converters_fieldOptionFromTS, (0, _Option.value)(matchValue_15).Options));
1391
+ if (convertedOptions_1 == null) {
1392
+ return undefined;
1393
+ } else {
1394
+ return (0, _FormSpec.Spec_FieldType_SingleChoice)(new _FormSpec.Spec_SingleChoiceInfo((0, _List.reverse)((0, _Option.value)(convertedOptions_1))));
1395
+ }
1396
+ }
1397
+ }
1398
+ case "Dropdown":
1399
+ {
1400
+ const matchValue_17 = fieldType.SingleChoiceInfo;
1401
+ if (matchValue_17 == null) {
1402
+ return undefined;
1403
+ } else {
1404
+ const convertedOptions_2 = (0, _Array.fold)((acc_2, opt_2)=>{
1405
+ let matchResult_2, item_2, list_2;
1406
+ if (acc_2 != null) {
1407
+ if (opt_2 != null) {
1408
+ matchResult_2 = 0;
1409
+ item_2 = (0, _Option.value)(opt_2);
1410
+ list_2 = (0, _Option.value)(acc_2);
1411
+ } else {
1412
+ matchResult_2 = 1;
1413
+ }
1414
+ } else {
1415
+ matchResult_2 = 1;
1416
+ }
1417
+ switch(matchResult_2){
1418
+ case 0:
1419
+ return (0, _List.cons)(item_2, list_2);
1420
+ default:
1421
+ return undefined;
1422
+ }
1423
+ }, (0, _List.empty)(), (0, _Array.map)(Converters_fieldOptionFromTS, (0, _Option.value)(matchValue_17).Options));
1424
+ if (convertedOptions_2 == null) {
1425
+ return undefined;
1426
+ } else {
1427
+ return (0, _FormSpec.Spec_FieldType_Dropdown)(new _FormSpec.Spec_SingleChoiceInfo((0, _List.reverse)((0, _Option.value)(convertedOptions_2))));
1428
+ }
1429
+ }
1430
+ }
1431
+ case "MultiChoice":
1432
+ {
1433
+ const matchValue_19 = fieldType.MultiChoiceInfo;
1434
+ if (matchValue_19 == null) {
1435
+ return undefined;
1436
+ } else {
1437
+ const convertedOptions_3 = (0, _Array.fold)((acc_3, opt_3)=>{
1438
+ let matchResult_3, item_3, list_3;
1439
+ if (acc_3 != null) {
1440
+ if (opt_3 != null) {
1441
+ matchResult_3 = 0;
1442
+ item_3 = (0, _Option.value)(opt_3);
1443
+ list_3 = (0, _Option.value)(acc_3);
1444
+ } else {
1445
+ matchResult_3 = 1;
1446
+ }
1447
+ } else {
1448
+ matchResult_3 = 1;
1449
+ }
1450
+ switch(matchResult_3){
1451
+ case 0:
1452
+ return (0, _List.cons)(item_3, list_3);
1453
+ default:
1454
+ return undefined;
1455
+ }
1456
+ }, (0, _List.empty)(), (0, _Array.map)(Converters_fieldOptionFromTS, (0, _Option.value)(matchValue_19).Options));
1457
+ if (convertedOptions_3 == null) {
1458
+ return undefined;
1459
+ } else {
1460
+ return (0, _FormSpec.Spec_FieldType_MultiChoice)(new _FormSpec.Spec_MultiChoiceInfo((0, _List.reverse)((0, _Option.value)(convertedOptions_3))));
1461
+ }
1462
+ }
1463
+ }
1464
+ case "CheckboxList":
1465
+ {
1466
+ const matchValue_21 = fieldType.MultiChoiceInfo;
1467
+ if (matchValue_21 == null) {
1468
+ return undefined;
1469
+ } else {
1470
+ const convertedOptions_4 = (0, _Array.fold)((acc_4, opt_4)=>{
1471
+ let matchResult_4, item_4, list_4;
1472
+ if (acc_4 != null) {
1473
+ if (opt_4 != null) {
1474
+ matchResult_4 = 0;
1475
+ item_4 = (0, _Option.value)(opt_4);
1476
+ list_4 = (0, _Option.value)(acc_4);
1477
+ } else {
1478
+ matchResult_4 = 1;
1479
+ }
1480
+ } else {
1481
+ matchResult_4 = 1;
1482
+ }
1483
+ switch(matchResult_4){
1484
+ case 0:
1485
+ return (0, _List.cons)(item_4, list_4);
1486
+ default:
1487
+ return undefined;
1488
+ }
1489
+ }, (0, _List.empty)(), (0, _Array.map)(Converters_fieldOptionFromTS, (0, _Option.value)(matchValue_21).Options));
1490
+ if (convertedOptions_4 == null) {
1491
+ return undefined;
1492
+ } else {
1493
+ return (0, _FormSpec.Spec_FieldType_CheckboxList)(new _FormSpec.Spec_MultiChoiceInfo((0, _List.reverse)((0, _Option.value)(convertedOptions_4))));
1494
+ }
1495
+ }
1496
+ }
1497
+ case "TagList":
1498
+ {
1499
+ const matchValue_23 = fieldType.MultiChoiceInfo;
1500
+ if (matchValue_23 == null) {
1501
+ return undefined;
1502
+ } else {
1503
+ const convertedOptions_5 = (0, _Array.fold)((acc_5, opt_5)=>{
1504
+ let matchResult_5, item_5, list_5;
1505
+ if (acc_5 != null) {
1506
+ if (opt_5 != null) {
1507
+ matchResult_5 = 0;
1508
+ item_5 = (0, _Option.value)(opt_5);
1509
+ list_5 = (0, _Option.value)(acc_5);
1510
+ } else {
1511
+ matchResult_5 = 1;
1512
+ }
1513
+ } else {
1514
+ matchResult_5 = 1;
1515
+ }
1516
+ switch(matchResult_5){
1517
+ case 0:
1518
+ return (0, _List.cons)(item_5, list_5);
1519
+ default:
1520
+ return undefined;
1521
+ }
1522
+ }, (0, _List.empty)(), (0, _Array.map)(Converters_fieldOptionFromTS, (0, _Option.value)(matchValue_23).Options));
1523
+ if (convertedOptions_5 == null) {
1524
+ return undefined;
1525
+ } else {
1526
+ return (0, _FormSpec.Spec_FieldType_TagList)(new _FormSpec.Spec_MultiChoiceInfo((0, _List.reverse)((0, _Option.value)(convertedOptions_5))));
1527
+ }
1528
+ }
1529
+ }
1530
+ case "TextAutoComplete":
1531
+ {
1532
+ const matchValue_25 = fieldType.SingleChoiceInfo;
1533
+ if (matchValue_25 == null) {
1534
+ return undefined;
1535
+ } else {
1536
+ const convertedOptions_6 = (0, _Array.fold)((acc_6, opt_6)=>{
1537
+ let matchResult_6, item_6, list_6;
1538
+ if (acc_6 != null) {
1539
+ if (opt_6 != null) {
1540
+ matchResult_6 = 0;
1541
+ item_6 = (0, _Option.value)(opt_6);
1542
+ list_6 = (0, _Option.value)(acc_6);
1543
+ } else {
1544
+ matchResult_6 = 1;
1545
+ }
1546
+ } else {
1547
+ matchResult_6 = 1;
1548
+ }
1549
+ switch(matchResult_6){
1550
+ case 0:
1551
+ return (0, _List.cons)(item_6, list_6);
1552
+ default:
1553
+ return undefined;
1554
+ }
1555
+ }, (0, _List.empty)(), (0, _Array.map)(Converters_fieldOptionFromTS, (0, _Option.value)(matchValue_25).Options));
1556
+ if (convertedOptions_6 == null) {
1557
+ return undefined;
1558
+ } else {
1559
+ return (0, _FormSpec.Spec_FieldType_TextAutoComplete)(new _FormSpec.Spec_SingleChoiceInfo((0, _List.reverse)((0, _Option.value)(convertedOptions_6))));
1560
+ }
1561
+ }
1562
+ }
1563
+ case "Matrix":
1564
+ {
1565
+ const matchValue_27 = fieldType.MatrixInfo;
1566
+ if (matchValue_27 == null) {
1567
+ return undefined;
1568
+ } else {
1569
+ const info_19 = (0, _Option.value)(matchValue_27);
1570
+ const convertedItems = (0, _Array.fold)((acc_7, opt_7)=>{
1571
+ let matchResult_7, item_7, list_7;
1572
+ if (acc_7 != null) {
1573
+ if (opt_7 != null) {
1574
+ matchResult_7 = 0;
1575
+ item_7 = (0, _Option.value)(opt_7);
1576
+ list_7 = (0, _Option.value)(acc_7);
1577
+ } else {
1578
+ matchResult_7 = 1;
1579
+ }
1580
+ } else {
1581
+ matchResult_7 = 1;
1582
+ }
1583
+ switch(matchResult_7){
1584
+ case 0:
1585
+ return (0, _List.cons)(item_7, list_7);
1586
+ default:
1587
+ return undefined;
1588
+ }
1589
+ }, (0, _List.empty)(), (0, _Array.map)(Converters_fieldOptionFromTS, info_19.Items));
1590
+ const convertedOptions_7 = (0, _Array.fold)((acc_8, opt_8)=>{
1591
+ let matchResult_8, item_8, list_8;
1592
+ if (acc_8 != null) {
1593
+ if (opt_8 != null) {
1594
+ matchResult_8 = 0;
1595
+ item_8 = (0, _Option.value)(opt_8);
1596
+ list_8 = (0, _Option.value)(acc_8);
1597
+ } else {
1598
+ matchResult_8 = 1;
1599
+ }
1600
+ } else {
1601
+ matchResult_8 = 1;
1602
+ }
1603
+ switch(matchResult_8){
1604
+ case 0:
1605
+ return (0, _List.cons)(item_8, list_8);
1606
+ default:
1607
+ return undefined;
1608
+ }
1609
+ }, (0, _List.empty)(), (0, _Array.map)(Converters_fieldOptionFromTS, info_19.Options));
1610
+ let matchResult_9, items, opts_7;
1611
+ if (convertedItems != null) {
1612
+ if (convertedOptions_7 != null) {
1613
+ matchResult_9 = 0;
1614
+ items = (0, _Option.value)(convertedItems);
1615
+ opts_7 = (0, _Option.value)(convertedOptions_7);
1616
+ } else {
1617
+ matchResult_9 = 1;
1618
+ }
1619
+ } else {
1620
+ matchResult_9 = 1;
1621
+ }
1622
+ switch(matchResult_9){
1623
+ case 0:
1624
+ return (0, _FormSpec.Spec_FieldType_Matrix)(new _FormSpec.Spec_MatrixInfo((0, _List.reverse)(items), (0, _List.reverse)(opts_7)));
1625
+ default:
1626
+ return undefined;
1627
+ }
1628
+ }
1629
+ }
1630
+ case "Signature":
1631
+ {
1632
+ const matchValue_31 = fieldType.SignatureInfo;
1633
+ if (matchValue_31 == null) {
1634
+ return undefined;
1635
+ } else {
1636
+ return (0, _FormSpec.Spec_FieldType_Signature)(new _FormSpec.Spec_SignatureInfo((0, _Option.value)(matchValue_31).Value));
1637
+ }
1638
+ }
1639
+ case "Message":
1640
+ {
1641
+ const matchValue_32 = fieldType.MessageInfo;
1642
+ if (matchValue_32 == null) {
1643
+ return undefined;
1644
+ } else {
1645
+ const info_21 = (0, _Option.value)(matchValue_32);
1646
+ const matchValue_33 = Converters_messageTypeFromTS(info_21.MessageType);
1647
+ if (matchValue_33 == null) {
1648
+ return undefined;
1649
+ } else {
1650
+ return (0, _FormSpec.Spec_FieldType_Message)(new _FormSpec.Spec_MessageInfo(info_21.Heading, (0, _Option.value)(matchValue_33), info_21.Message, info_21.Footer));
1651
+ }
1652
+ }
1653
+ }
1654
+ case "PluginField":
1655
+ {
1656
+ const matchValue_34 = fieldType.PluginConfig;
1657
+ if (matchValue_34 == null) {
1658
+ return undefined;
1659
+ } else {
1660
+ const config = (0, _Option.value)(matchValue_34);
1661
+ return (0, _FormSpec.Spec_FieldType_PluginField)(new _FormSpec.Spec_PluginFieldConfig(config.PluginId, config.FieldName));
1662
+ }
1663
+ }
1664
+ default:
1665
+ return undefined;
1666
+ }
1667
+ }
1668
+ function Converters_formFieldToTS(field) {
1669
+ return new Types_FormFieldTS(field.FieldOrder, Converters_fieldKeyToTS(field.FieldKey), field.Label, field.Notes, (0, _Option.map)(Converters_dependsOnToTS, field.DependsOn), field.IsOptional, field.IsDeprecated, Converters_fieldTypeToTS(field.FieldType));
1670
+ }
1671
+ function Converters_formFieldFromTS(field) {
1672
+ let matchValue_3;
1673
+ const matchValue = Converters_fieldKeyFromTS(field.FieldKey);
1674
+ const matchValue_1 = Converters_fieldTypeFromTS(field.FieldType);
1675
+ let matchResult, fieldType, key;
1676
+ if (matchValue != null) {
1677
+ if (matchValue_1 != null) {
1678
+ matchResult = 0;
1679
+ fieldType = (0, _Option.value)(matchValue_1);
1680
+ key = (0, _Option.value)(matchValue);
1681
+ } else {
1682
+ matchResult = 1;
1683
+ }
1684
+ } else {
1685
+ matchResult = 1;
1686
+ }
1687
+ switch(matchResult){
1688
+ case 0:
1689
+ return new _FormSpec.Spec_FormField$1(field.FieldOrder, key, field.Label, field.Notes, (matchValue_3 = field.DependsOn, matchValue_3 == null ? undefined : Converters_dependsOnFromTS((0, _Option.value)(matchValue_3))), field.IsOptional, field.IsDeprecated, fieldType);
1690
+ default:
1691
+ return undefined;
1692
+ }
1693
+ }
1694
+ function Converters_formStepToTS(step) {
1695
+ return new Types_FormStepTS(step.StepOrder, step.StepLabel, (0, _List.toArray)((0, _List.map)(Converters_formFieldToTS, step.Fields)));
1696
+ }
1697
+ function Converters_formStepFromTS(step) {
1698
+ const convertedFields = (0, _Array.fold)((acc, field_1)=>{
1699
+ let matchResult, item, list;
1700
+ if (acc != null) {
1701
+ if (field_1 != null) {
1702
+ matchResult = 0;
1703
+ item = (0, _Option.value)(field_1);
1704
+ list = (0, _Option.value)(acc);
1705
+ } else {
1706
+ matchResult = 1;
1707
+ }
1708
+ } else {
1709
+ matchResult = 1;
1710
+ }
1711
+ switch(matchResult){
1712
+ case 0:
1713
+ return (0, _List.cons)(item, list);
1714
+ default:
1715
+ return undefined;
1716
+ }
1717
+ }, (0, _List.empty)(), (0, _Array.map)(Converters_formFieldFromTS, step.Fields));
1718
+ if (convertedFields == null) {
1719
+ return undefined;
1720
+ } else {
1721
+ return new _FormSpec.Spec_FormStep$1(step.StepOrder, step.StepLabel, (0, _List.reverse)((0, _Option.value)(convertedFields)));
1722
+ }
1723
+ }
1724
+ function Converters_scoreColorToTS(color) {
1725
+ switch(color.tag){
1726
+ case /* Primary */ 1:
1727
+ return 1;
1728
+ case /* Link */ 2:
1729
+ return 2;
1730
+ case /* Info */ 3:
1731
+ return 3;
1732
+ case /* Success */ 4:
1733
+ return 4;
1734
+ case /* Warning */ 5:
1735
+ return 5;
1736
+ case /* Danger */ 6:
1737
+ return 6;
1738
+ default:
1739
+ return 0;
1740
+ }
1741
+ }
1742
+ function Converters_scoreColorFromTS(color) {
1743
+ switch(color){
1744
+ case 0:
1745
+ return (0, _FormSpec.Spec_ScoreColor_Unspecified)();
1746
+ case 1:
1747
+ return (0, _FormSpec.Spec_ScoreColor_Primary)();
1748
+ case 2:
1749
+ return (0, _FormSpec.Spec_ScoreColor_Link)();
1750
+ case 3:
1751
+ return (0, _FormSpec.Spec_ScoreColor_Info)();
1752
+ case 4:
1753
+ return (0, _FormSpec.Spec_ScoreColor_Success)();
1754
+ case 5:
1755
+ return (0, _FormSpec.Spec_ScoreColor_Warning)();
1756
+ case 6:
1757
+ return (0, _FormSpec.Spec_ScoreColor_Danger)();
1758
+ default:
1759
+ return undefined;
1760
+ }
1761
+ }
1762
+ function Converters_scoreRangeToTS(range) {
1763
+ return new Types_ScoreRangeTS(range.Id, range.Min, range.Max, range.Label, Converters_scoreColorToTS(range.Tag));
1764
+ }
1765
+ function Converters_scoreRangeFromTS(range) {
1766
+ let matchValue;
1767
+ let outArg = "00000000-0000-0000-0000-000000000000";
1768
+ matchValue = [
1769
+ (0, _Guid.tryParse)(range.Id, new _Types.FSharpRef(()=>outArg, (v)=>{
1770
+ outArg = v;
1771
+ })),
1772
+ outArg
1773
+ ];
1774
+ const matchValue_1 = Converters_scoreColorFromTS(range.Tag);
1775
+ let matchResult;
1776
+ if (matchValue[0]) {
1777
+ if (matchValue_1 != null) {
1778
+ matchResult = 0;
1779
+ } else {
1780
+ matchResult = 1;
1781
+ }
1782
+ } else {
1783
+ matchResult = 1;
1784
+ }
1785
+ switch(matchResult){
1786
+ case 0:
1787
+ return new _FormSpec.Spec_ScoreRange(matchValue[1], range.Min, range.Max, range.Label, (0, _Option.value)(matchValue_1));
1788
+ default:
1789
+ return undefined;
1790
+ }
1791
+ }
1792
+ function Converters_scoreToTS(score) {
1793
+ return new Types_ScoreTS(score.MaxScore, (0, _List.toArray)((0, _List.map)(Converters_scoreRangeToTS, score.ScoreRanges)));
1794
+ }
1795
+ function Converters_scoreFromTS(score) {
1796
+ const convertedRanges = (0, _Array.fold)((acc, range_1)=>{
1797
+ let matchResult, item, list;
1798
+ if (acc != null) {
1799
+ if (range_1 != null) {
1800
+ matchResult = 0;
1801
+ item = (0, _Option.value)(range_1);
1802
+ list = (0, _Option.value)(acc);
1803
+ } else {
1804
+ matchResult = 1;
1805
+ }
1806
+ } else {
1807
+ matchResult = 1;
1808
+ }
1809
+ switch(matchResult){
1810
+ case 0:
1811
+ return (0, _List.cons)(item, list);
1812
+ default:
1813
+ return undefined;
1814
+ }
1815
+ }, (0, _List.empty)(), (0, _Array.map)(Converters_scoreRangeFromTS, score.ScoreRanges));
1816
+ if (convertedRanges == null) {
1817
+ return undefined;
1818
+ } else {
1819
+ return new _FormSpec.Spec_Score(score.MaxScore, (0, _List.reverse)((0, _Option.value)(convertedRanges)));
1820
+ }
1821
+ }
1822
+ function Converters_clinicalPathwayToTS(pathway) {
1823
+ return new Types_ClinicalPathwaySpecTS(pathway.PathwayId, pathway.PathwayName, pathway.Version, pathway.ProtocolSource);
1824
+ }
1825
+ function Converters_clinicalPathwayFromTS(pathway) {
1826
+ return undefined;
1827
+ }
1828
+ function Converters_formSpecToTS(spec) {
1829
+ return new Types_FormSpecTS(spec.Id, spec.Code, spec.Title, spec.Abstract, spec.Version, spec.FormSpecVersion, (0, _List.toArray)((0, _List.map)(Converters_formStepToTS, spec.Steps)), (0, _List.toArray)(spec.CategoryTags), (0, _Option.map)(Converters_scoreToTS, spec.Score), (0, _List.toArray)(spec.AssociatedCodes), spec.RequiresReview, spec.RequiresReviewAndApproval, (0, _Option.map)(Converters_clinicalPathwayToTS, spec.ClinicalPathway));
1830
+ }
1831
+ function Converters_formSpecFromTS(spec) {
1832
+ let matchValue;
1833
+ let outArg = "00000000-0000-0000-0000-000000000000";
1834
+ matchValue = [
1835
+ (0, _Guid.tryParse)(spec.Id, new _Types.FSharpRef(()=>outArg, (v)=>{
1836
+ outArg = v;
1837
+ })),
1838
+ outArg
1839
+ ];
1840
+ if (matchValue[0]) {
1841
+ const convertedSteps = (0, _Array.fold)((acc, step_1)=>{
1842
+ let matchResult, item, list;
1843
+ if (acc != null) {
1844
+ if (step_1 != null) {
1845
+ matchResult = 0;
1846
+ item = (0, _Option.value)(step_1);
1847
+ list = (0, _Option.value)(acc);
1848
+ } else {
1849
+ matchResult = 1;
1850
+ }
1851
+ } else {
1852
+ matchResult = 1;
1853
+ }
1854
+ switch(matchResult){
1855
+ case 0:
1856
+ return (0, _List.cons)(item, list);
1857
+ default:
1858
+ return undefined;
1859
+ }
1860
+ }, (0, _List.empty)(), (0, _Array.map)(Converters_formStepFromTS, spec.Steps));
1861
+ let scoreResult;
1862
+ const matchValue_2 = spec.Score;
1863
+ scoreResult = matchValue_2 == null ? undefined : Converters_scoreFromTS((0, _Option.value)(matchValue_2));
1864
+ if (convertedSteps == null) {
1865
+ return undefined;
1866
+ } else {
1867
+ return new _FormSpec.Spec_FormSpec$1(matchValue[1], spec.Code, spec.Title, spec.Abstract, spec.Version, spec.FormSpecVersion, (0, _List.reverse)((0, _Option.value)(convertedSteps)), (0, _List.ofArray)(spec.CategoryTags), scoreResult, (0, _List.ofArray)(spec.AssociatedCodes), spec.RequiresReview, spec.RequiresReviewAndApproval, undefined);
1868
+ }
1869
+ } else {
1870
+ return undefined;
1871
+ }
1872
+ }
1873
+ function Validators_validateFormSpec(input) {
1874
+ const stringified = (0, _Encodefs.toString)(4, (0, _Encodefs.Auto_generateBoxedEncoder_437914C6)(_Reflection.obj_type, undefined, undefined, undefined)(input));
1875
+ return (0, _Result.Result_ToOption)((0, _Decodefs.fromString)((0, _Util.uncurry2)((0, _Decodefs.Auto_generateBoxedDecoder_Z6670B51)(Types_FormSpecTS_$reflection(), undefined, undefined)), stringified));
1876
+ }
1877
+ function Validators_validateAndConvert(input) {
1878
+ const matchValue = Validators_validateFormSpec(input);
1879
+ if (matchValue == null) {
1880
+ return undefined;
1881
+ } else {
1882
+ return Converters_formSpecFromTS((0, _Option.value)(matchValue));
1883
+ }
1884
+ }
1885
+ function Api_validateFormSpec() {
1886
+ return Validators_validateFormSpec;
1887
+ }
1888
+ function Api_validateAndConvertFormSpec() {
1889
+ return Validators_validateAndConvert;
1890
+ }
1891
+ function Api_formSpecToTypeScript(spec) {
1892
+ return Converters_formSpecToTS(spec);
1893
+ }
1894
+ function Api_formSpecFromTypeScript(spec) {
1895
+ return Converters_formSpecFromTS(spec);
1896
+ }
1897
+ function Api_getFormSpecTSfromFormSpecFSjsonString(formSpecFSstring) {
1898
+ const matchValue = (0, _Decodefs.fromString)((0, _Util.uncurry2)((0, _Decodefs.Auto_generateBoxedDecoder_Z6670B51)((0, _FormSpec.Spec_FormSpec$1_$reflection)((0, _FormSpec.Spec_FieldType_$reflection)()), undefined, undefined)), formSpecFSstring);
1899
+ if (matchValue.tag === /* Error */ 1) {
1900
+ return undefined;
1901
+ } else {
1902
+ return Api_formSpecToTypeScript(matchValue.fields[0]);
1903
+ }
1904
+ }
1905
+ function Api_getFormSpecFSfromFormSpecTSjsonString(formSpecTSstring) {
1906
+ const matchValue = (0, _Decodefs.fromString)((0, _Util.uncurry2)((0, _Decodefs.Auto_generateBoxedDecoder_Z6670B51)(Types_FormSpecTS_$reflection(), undefined, undefined)), formSpecTSstring);
1907
+ if (matchValue.tag === /* Error */ 1) {
1908
+ return undefined;
1909
+ } else {
1910
+ return Api_formSpecFromTypeScript(matchValue.fields[0]);
1911
+ }
1912
+ }
1913
+ function Api_serializeFormSpec(spec) {
1914
+ return (0, _Encodefs.toString)(2, (0, _Encodefs.Auto_generateBoxedEncoder_437914C6)(Types_FormSpecTS_$reflection(), undefined, undefined, undefined)(spec));
1915
+ }
1916
+ function Api_deserializeFormSpecTS(jsonTS) {
1917
+ (0, _String.toConsole)((0, _String.printf)("API.Option: Deserializing FormSpecTS!"));
1918
+ const matchValue = (0, _Decodefs.fromString)((0, _Util.uncurry2)((0, _Decodefs.Auto_generateBoxedDecoder_Z6670B51)(Types_FormSpecTS_$reflection(), undefined, undefined)), jsonTS);
1919
+ if (matchValue.tag === /* Error */ 1) {
1920
+ return undefined;
1921
+ } else {
1922
+ return matchValue.fields[0];
1923
+ }
1924
+ }
1925
+ function Api_fieldKeyToTypeScript(fieldKey) {
1926
+ return Converters_fieldKeyToTS(fieldKey);
1927
+ }
1928
+ function Api_getFieldKeys(spec) {
1929
+ return (0, _Array.map)((field)=>field.FieldKey, (0, _Array.collect)((step)=>step.Fields, spec.Steps));
1930
+ }
1931
+ function Api_findFieldByKey(spec, key) {
1932
+ return (0, _Array.tryFind)((field)=>field.FieldKey.Value === key.Value, (0, _Array.collect)((step)=>step.Fields, spec.Steps));
1933
+ }
1934
+ function Api_getFieldsByType(spec, fieldType) {
1935
+ const array_1 = (0, _Array.collect)((step)=>step.Fields, spec.Steps);
1936
+ return array_1.filter((field)=>field.FieldType.Type === fieldType);
1937
+ }
1938
+ function Api_isValidFormSpec(spec) {
1939
+ if (spec.Steps.length > 0 && spec.Title.length > 0) {
1940
+ return spec.Version.length > 0;
1941
+ } else {
1942
+ return false;
1943
+ }
1944
+ }
1945
+ function Api_getFormSpecSummary(spec) {
1946
+ let StepCount;
1947
+ return StepCount = spec.Steps.length | 0, {
1948
+ FieldCount: (0, _Array.sumBy)((s)=>s.Fields.length, spec.Steps, {
1949
+ GetZero: ()=>0,
1950
+ Add: (x, y)=>x + y
1951
+ }),
1952
+ Id: spec.Id,
1953
+ RequiresApproval: spec.RequiresReviewAndApproval,
1954
+ RequiresReview: spec.RequiresReview,
1955
+ StepCount: StepCount,
1956
+ Title: spec.Title,
1957
+ Version: spec.Version
1958
+ };
1959
+ } //# sourceMappingURL=FormSpec.Api.Option.ts.map
1960
+
1961
+ //# sourceMappingURL=FormSpec.Api.Option.js.map