@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,958 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderFormSpecToMarkdown", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return renderFormSpecToMarkdown;
9
+ }
10
+ });
11
+ const _String = require("@fable-org/fable-library-js/String.js");
12
+ const _Option = require("@fable-org/fable-library-js/Option.js");
13
+ const _FormSpec = require("../FormSpec.js");
14
+ const _List = require("@fable-org/fable-library-js/List.js");
15
+ const _Set = require("@fable-org/fable-library-js/Set.js");
16
+ const _Seq = require("@fable-org/fable-library-js/Seq.js");
17
+ const _Util = require("@fable-org/fable-library-js/Util.js");
18
+ const _Map = require("@fable-org/fable-library-js/Map.js");
19
+ const _PathwayRenderers = require("./PathwayRenderers.js");
20
+ const _MermaidRenderer = require("./MermaidRenderer.js");
21
+ function generateHeadingLevel(level) {
22
+ return (0, _String.replicate)(level, "#");
23
+ }
24
+ function formatFieldValue(fieldType, fieldValue, field) {
25
+ let matchResult, answer, answer_1, answer_2, answer_3, answer_4, answer_5, answer_6, answer_7, answer_8, answer_9, answer_10, answer_11, answer_12, info, answer_13, info_1, answer_14, info_2, answer_15, info_3, answers, info_4, answers_1, info_5, answers_2, info_6, answer_19, answer_20, answer_21, pluginData;
26
+ switch(fieldType.tag){
27
+ case /* TextArea */ 1:
28
+ {
29
+ switch(fieldValue.tag){
30
+ case /* Multiple */ 1:
31
+ {
32
+ matchResult = 23;
33
+ break;
34
+ }
35
+ case /* Matrix */ 2:
36
+ {
37
+ matchResult = 25;
38
+ break;
39
+ }
40
+ case /* PluginData */ 3:
41
+ {
42
+ matchResult = 26;
43
+ pluginData = fieldValue.fields[0];
44
+ break;
45
+ }
46
+ default:
47
+ {
48
+ matchResult = 1;
49
+ answer_1 = fieldValue.fields[0];
50
+ }
51
+ }
52
+ break;
53
+ }
54
+ case /* Email */ 2:
55
+ {
56
+ switch(fieldValue.tag){
57
+ case /* Multiple */ 1:
58
+ {
59
+ matchResult = 23;
60
+ break;
61
+ }
62
+ case /* Matrix */ 2:
63
+ {
64
+ matchResult = 25;
65
+ break;
66
+ }
67
+ case /* PluginData */ 3:
68
+ {
69
+ matchResult = 26;
70
+ pluginData = fieldValue.fields[0];
71
+ break;
72
+ }
73
+ default:
74
+ {
75
+ matchResult = 2;
76
+ answer_2 = fieldValue.fields[0];
77
+ }
78
+ }
79
+ break;
80
+ }
81
+ case /* Password */ 3:
82
+ {
83
+ switch(fieldValue.tag){
84
+ case /* Multiple */ 1:
85
+ {
86
+ matchResult = 23;
87
+ break;
88
+ }
89
+ case /* Matrix */ 2:
90
+ {
91
+ matchResult = 25;
92
+ break;
93
+ }
94
+ case /* PluginData */ 3:
95
+ {
96
+ matchResult = 26;
97
+ pluginData = fieldValue.fields[0];
98
+ break;
99
+ }
100
+ default:
101
+ {
102
+ matchResult = 3;
103
+ answer_3 = fieldValue.fields[0];
104
+ }
105
+ }
106
+ break;
107
+ }
108
+ case /* Search */ 4:
109
+ {
110
+ switch(fieldValue.tag){
111
+ case /* Multiple */ 1:
112
+ {
113
+ matchResult = 23;
114
+ break;
115
+ }
116
+ case /* Matrix */ 2:
117
+ {
118
+ matchResult = 25;
119
+ break;
120
+ }
121
+ case /* PluginData */ 3:
122
+ {
123
+ matchResult = 26;
124
+ pluginData = fieldValue.fields[0];
125
+ break;
126
+ }
127
+ default:
128
+ {
129
+ matchResult = 4;
130
+ answer_4 = fieldValue.fields[0];
131
+ }
132
+ }
133
+ break;
134
+ }
135
+ case /* Color */ 5:
136
+ {
137
+ switch(fieldValue.tag){
138
+ case /* Multiple */ 1:
139
+ {
140
+ matchResult = 23;
141
+ break;
142
+ }
143
+ case /* Matrix */ 2:
144
+ {
145
+ matchResult = 25;
146
+ break;
147
+ }
148
+ case /* PluginData */ 3:
149
+ {
150
+ matchResult = 26;
151
+ pluginData = fieldValue.fields[0];
152
+ break;
153
+ }
154
+ default:
155
+ {
156
+ matchResult = 5;
157
+ answer_5 = fieldValue.fields[0];
158
+ }
159
+ }
160
+ break;
161
+ }
162
+ case /* Number */ 6:
163
+ {
164
+ switch(fieldValue.tag){
165
+ case /* Multiple */ 1:
166
+ {
167
+ matchResult = 23;
168
+ break;
169
+ }
170
+ case /* Matrix */ 2:
171
+ {
172
+ matchResult = 25;
173
+ break;
174
+ }
175
+ case /* PluginData */ 3:
176
+ {
177
+ matchResult = 26;
178
+ pluginData = fieldValue.fields[0];
179
+ break;
180
+ }
181
+ default:
182
+ {
183
+ matchResult = 6;
184
+ answer_6 = fieldValue.fields[0];
185
+ }
186
+ }
187
+ break;
188
+ }
189
+ case /* Tel */ 7:
190
+ {
191
+ switch(fieldValue.tag){
192
+ case /* Multiple */ 1:
193
+ {
194
+ matchResult = 23;
195
+ break;
196
+ }
197
+ case /* Matrix */ 2:
198
+ {
199
+ matchResult = 25;
200
+ break;
201
+ }
202
+ case /* PluginData */ 3:
203
+ {
204
+ matchResult = 26;
205
+ pluginData = fieldValue.fields[0];
206
+ break;
207
+ }
208
+ default:
209
+ {
210
+ matchResult = 7;
211
+ answer_7 = fieldValue.fields[0];
212
+ }
213
+ }
214
+ break;
215
+ }
216
+ case /* Date */ 8:
217
+ {
218
+ switch(fieldValue.tag){
219
+ case /* Multiple */ 1:
220
+ {
221
+ matchResult = 23;
222
+ break;
223
+ }
224
+ case /* Matrix */ 2:
225
+ {
226
+ matchResult = 25;
227
+ break;
228
+ }
229
+ case /* PluginData */ 3:
230
+ {
231
+ matchResult = 26;
232
+ pluginData = fieldValue.fields[0];
233
+ break;
234
+ }
235
+ default:
236
+ {
237
+ matchResult = 8;
238
+ answer_8 = fieldValue.fields[0];
239
+ }
240
+ }
241
+ break;
242
+ }
243
+ case /* DateTimeLocal */ 9:
244
+ {
245
+ switch(fieldValue.tag){
246
+ case /* Multiple */ 1:
247
+ {
248
+ matchResult = 23;
249
+ break;
250
+ }
251
+ case /* Matrix */ 2:
252
+ {
253
+ matchResult = 25;
254
+ break;
255
+ }
256
+ case /* PluginData */ 3:
257
+ {
258
+ matchResult = 26;
259
+ pluginData = fieldValue.fields[0];
260
+ break;
261
+ }
262
+ default:
263
+ {
264
+ matchResult = 9;
265
+ answer_9 = fieldValue.fields[0];
266
+ }
267
+ }
268
+ break;
269
+ }
270
+ case /* Time */ 10:
271
+ {
272
+ switch(fieldValue.tag){
273
+ case /* Multiple */ 1:
274
+ {
275
+ matchResult = 23;
276
+ break;
277
+ }
278
+ case /* Matrix */ 2:
279
+ {
280
+ matchResult = 25;
281
+ break;
282
+ }
283
+ case /* PluginData */ 3:
284
+ {
285
+ matchResult = 26;
286
+ pluginData = fieldValue.fields[0];
287
+ break;
288
+ }
289
+ default:
290
+ {
291
+ matchResult = 10;
292
+ answer_10 = fieldValue.fields[0];
293
+ }
294
+ }
295
+ break;
296
+ }
297
+ case /* Checkbox */ 11:
298
+ {
299
+ switch(fieldValue.tag){
300
+ case /* Multiple */ 1:
301
+ {
302
+ matchResult = 23;
303
+ break;
304
+ }
305
+ case /* Matrix */ 2:
306
+ {
307
+ matchResult = 25;
308
+ break;
309
+ }
310
+ case /* PluginData */ 3:
311
+ {
312
+ matchResult = 26;
313
+ pluginData = fieldValue.fields[0];
314
+ break;
315
+ }
316
+ default:
317
+ {
318
+ matchResult = 11;
319
+ answer_11 = fieldValue.fields[0];
320
+ }
321
+ }
322
+ break;
323
+ }
324
+ case /* SingleChoice */ 13:
325
+ {
326
+ switch(fieldValue.tag){
327
+ case /* Multiple */ 1:
328
+ {
329
+ matchResult = 23;
330
+ break;
331
+ }
332
+ case /* Matrix */ 2:
333
+ {
334
+ matchResult = 25;
335
+ break;
336
+ }
337
+ case /* PluginData */ 3:
338
+ {
339
+ matchResult = 26;
340
+ pluginData = fieldValue.fields[0];
341
+ break;
342
+ }
343
+ default:
344
+ {
345
+ matchResult = 12;
346
+ answer_12 = fieldValue.fields[0];
347
+ info = fieldType.fields[0];
348
+ }
349
+ }
350
+ break;
351
+ }
352
+ case /* Radio */ 12:
353
+ {
354
+ switch(fieldValue.tag){
355
+ case /* Multiple */ 1:
356
+ {
357
+ matchResult = 23;
358
+ break;
359
+ }
360
+ case /* Matrix */ 2:
361
+ {
362
+ matchResult = 25;
363
+ break;
364
+ }
365
+ case /* PluginData */ 3:
366
+ {
367
+ matchResult = 26;
368
+ pluginData = fieldValue.fields[0];
369
+ break;
370
+ }
371
+ default:
372
+ {
373
+ matchResult = 13;
374
+ answer_13 = fieldValue.fields[0];
375
+ info_1 = fieldType.fields[0];
376
+ }
377
+ }
378
+ break;
379
+ }
380
+ case /* Dropdown */ 14:
381
+ {
382
+ switch(fieldValue.tag){
383
+ case /* Multiple */ 1:
384
+ {
385
+ matchResult = 23;
386
+ break;
387
+ }
388
+ case /* Matrix */ 2:
389
+ {
390
+ matchResult = 25;
391
+ break;
392
+ }
393
+ case /* PluginData */ 3:
394
+ {
395
+ matchResult = 26;
396
+ pluginData = fieldValue.fields[0];
397
+ break;
398
+ }
399
+ default:
400
+ {
401
+ matchResult = 14;
402
+ answer_14 = fieldValue.fields[0];
403
+ info_2 = fieldType.fields[0];
404
+ }
405
+ }
406
+ break;
407
+ }
408
+ case /* TextAutoComplete */ 18:
409
+ {
410
+ switch(fieldValue.tag){
411
+ case /* Multiple */ 1:
412
+ {
413
+ matchResult = 23;
414
+ break;
415
+ }
416
+ case /* Matrix */ 2:
417
+ {
418
+ matchResult = 25;
419
+ break;
420
+ }
421
+ case /* PluginData */ 3:
422
+ {
423
+ matchResult = 26;
424
+ pluginData = fieldValue.fields[0];
425
+ break;
426
+ }
427
+ default:
428
+ {
429
+ matchResult = 15;
430
+ answer_15 = fieldValue.fields[0];
431
+ info_3 = fieldType.fields[0];
432
+ }
433
+ }
434
+ break;
435
+ }
436
+ case /* MultiChoice */ 15:
437
+ {
438
+ switch(fieldValue.tag){
439
+ case /* Single */ 0:
440
+ {
441
+ matchResult = 24;
442
+ answer_21 = fieldValue.fields[0];
443
+ break;
444
+ }
445
+ case /* Matrix */ 2:
446
+ {
447
+ matchResult = 25;
448
+ break;
449
+ }
450
+ case /* PluginData */ 3:
451
+ {
452
+ matchResult = 26;
453
+ pluginData = fieldValue.fields[0];
454
+ break;
455
+ }
456
+ default:
457
+ {
458
+ matchResult = 16;
459
+ answers = fieldValue.fields[0];
460
+ info_4 = fieldType.fields[0];
461
+ }
462
+ }
463
+ break;
464
+ }
465
+ case /* CheckboxList */ 16:
466
+ {
467
+ switch(fieldValue.tag){
468
+ case /* Single */ 0:
469
+ {
470
+ matchResult = 24;
471
+ answer_21 = fieldValue.fields[0];
472
+ break;
473
+ }
474
+ case /* Matrix */ 2:
475
+ {
476
+ matchResult = 25;
477
+ break;
478
+ }
479
+ case /* PluginData */ 3:
480
+ {
481
+ matchResult = 26;
482
+ pluginData = fieldValue.fields[0];
483
+ break;
484
+ }
485
+ default:
486
+ {
487
+ matchResult = 17;
488
+ answers_1 = fieldValue.fields[0];
489
+ info_5 = fieldType.fields[0];
490
+ }
491
+ }
492
+ break;
493
+ }
494
+ case /* TagList */ 17:
495
+ {
496
+ switch(fieldValue.tag){
497
+ case /* Single */ 0:
498
+ {
499
+ matchResult = 24;
500
+ answer_21 = fieldValue.fields[0];
501
+ break;
502
+ }
503
+ case /* Matrix */ 2:
504
+ {
505
+ matchResult = 25;
506
+ break;
507
+ }
508
+ case /* PluginData */ 3:
509
+ {
510
+ matchResult = 26;
511
+ pluginData = fieldValue.fields[0];
512
+ break;
513
+ }
514
+ default:
515
+ {
516
+ matchResult = 18;
517
+ answers_2 = fieldValue.fields[0];
518
+ info_6 = fieldType.fields[0];
519
+ }
520
+ }
521
+ break;
522
+ }
523
+ case /* Signature */ 20:
524
+ {
525
+ switch(fieldValue.tag){
526
+ case /* Multiple */ 1:
527
+ {
528
+ matchResult = 23;
529
+ break;
530
+ }
531
+ case /* Matrix */ 2:
532
+ {
533
+ matchResult = 25;
534
+ break;
535
+ }
536
+ case /* PluginData */ 3:
537
+ {
538
+ matchResult = 26;
539
+ pluginData = fieldValue.fields[0];
540
+ break;
541
+ }
542
+ default:
543
+ {
544
+ matchResult = 19;
545
+ answer_19 = fieldValue.fields[0];
546
+ }
547
+ }
548
+ break;
549
+ }
550
+ case /* Message */ 21:
551
+ {
552
+ matchResult = 20;
553
+ break;
554
+ }
555
+ case /* PluginField */ 22:
556
+ {
557
+ switch(fieldValue.tag){
558
+ case /* Multiple */ 1:
559
+ {
560
+ matchResult = 23;
561
+ break;
562
+ }
563
+ case /* Matrix */ 2:
564
+ {
565
+ matchResult = 25;
566
+ break;
567
+ }
568
+ case /* PluginData */ 3:
569
+ {
570
+ matchResult = 26;
571
+ pluginData = fieldValue.fields[0];
572
+ break;
573
+ }
574
+ default:
575
+ {
576
+ matchResult = 21;
577
+ answer_20 = fieldValue.fields[0];
578
+ }
579
+ }
580
+ break;
581
+ }
582
+ case /* Matrix */ 19:
583
+ {
584
+ matchResult = 22;
585
+ break;
586
+ }
587
+ default:
588
+ switch(fieldValue.tag){
589
+ case /* Multiple */ 1:
590
+ {
591
+ matchResult = 23;
592
+ break;
593
+ }
594
+ case /* Matrix */ 2:
595
+ {
596
+ matchResult = 25;
597
+ break;
598
+ }
599
+ case /* PluginData */ 3:
600
+ {
601
+ matchResult = 26;
602
+ pluginData = fieldValue.fields[0];
603
+ break;
604
+ }
605
+ default:
606
+ {
607
+ matchResult = 0;
608
+ answer = fieldValue.fields[0];
609
+ }
610
+ }
611
+ }
612
+ switch(matchResult){
613
+ case 0:
614
+ return answer.Value;
615
+ case 1:
616
+ return answer_1.Value;
617
+ case 2:
618
+ return answer_2.Value;
619
+ case 3:
620
+ return "***";
621
+ case 4:
622
+ return answer_4.Value;
623
+ case 5:
624
+ return answer_5.Value;
625
+ case 6:
626
+ return answer_6.Value;
627
+ case 7:
628
+ return answer_7.Value;
629
+ case 8:
630
+ return answer_8.Value;
631
+ case 9:
632
+ return answer_9.Value;
633
+ case 10:
634
+ return answer_10.Value;
635
+ case 11:
636
+ {
637
+ const matchValue_1 = answer_11.Value.toLowerCase();
638
+ switch(matchValue_1){
639
+ case "true":
640
+ case "yes":
641
+ case "1":
642
+ return "Yes";
643
+ default:
644
+ return "No";
645
+ }
646
+ }
647
+ case 12:
648
+ return (0, _Option.defaultArg)((0, _Option.map)((opt_1)=>opt_1.Description, (0, _List.tryFind)((opt)=>opt.Value === answer_12.Value, info.Options)), answer_12.Value);
649
+ case 13:
650
+ return (0, _Option.defaultArg)((0, _Option.map)((opt_3)=>opt_3.Description, (0, _List.tryFind)((opt_2)=>opt_2.Value === answer_13.Value, info_1.Options)), answer_13.Value);
651
+ case 14:
652
+ return (0, _Option.defaultArg)((0, _Option.map)((opt_5)=>opt_5.Description, (0, _List.tryFind)((opt_4)=>opt_4.Value === answer_14.Value, info_2.Options)), answer_14.Value);
653
+ case 15:
654
+ return (0, _Option.defaultArg)((0, _Option.map)((opt_7)=>opt_7.Description, (0, _List.tryFind)((opt_6)=>opt_6.Value === answer_15.Value, info_3.Options)), answer_15.Value);
655
+ case 16:
656
+ return (0, _String.join)(", ", (0, _List.choose)((answer_16)=>(0, _Option.map)((opt_9)=>opt_9.Description, (0, _List.tryFind)((opt_8)=>opt_8.Value === answer_16.Value, info_4.Options)), (0, _Set.toList)(answers)));
657
+ case 17:
658
+ return (0, _String.join)(", ", (0, _List.choose)((answer_17)=>(0, _Option.map)((opt_11)=>opt_11.Description, (0, _List.tryFind)((opt_10)=>opt_10.Value === answer_17.Value, info_5.Options)), (0, _Set.toList)(answers_1)));
659
+ case 18:
660
+ return (0, _String.join)(", ", (0, _List.choose)((answer_18)=>(0, _Option.map)((opt_13)=>opt_13.Description, (0, _List.tryFind)((opt_12)=>opt_12.Value === answer_18.Value, info_6.Options)), (0, _Set.toList)(answers_2)));
661
+ case 19:
662
+ if (!(0, _String.isNullOrWhiteSpace)(answer_19.Value)) {
663
+ return "*Signature provided*";
664
+ } else {
665
+ return "*No signature*";
666
+ }
667
+ case 20:
668
+ return "";
669
+ case 21:
670
+ return answer_20.Value;
671
+ case 22:
672
+ return "";
673
+ case 23:
674
+ return "*Type mismatch: Expected single value*";
675
+ case 24:
676
+ return answer_21.Value;
677
+ case 25:
678
+ return "";
679
+ default:
680
+ return (0, _String.join)(", ", (0, _List.map)((prop)=>{
681
+ const matchValue_2 = prop.DisplayName;
682
+ if (matchValue_2 == null) {
683
+ return (0, _String.toText)((0, _String.printf)("%s: %s"))(prop.Name)(prop.Value);
684
+ } else {
685
+ const displayName = (0, _Option.value)(matchValue_2);
686
+ return (0, _String.toText)((0, _String.printf)("%s: %s"))(displayName)(prop.Value);
687
+ }
688
+ }, pluginData));
689
+ }
690
+ }
691
+ function formatMatrixFieldAsTable(fieldLabel, matrixInfo, matrixAnswer) {
692
+ let arg_3, arg_4, arg_6, sv_1, arg_5;
693
+ const items = matrixInfo.Items;
694
+ const options = matrixInfo.Options;
695
+ if ((0, _List.isEmpty)(items) ? true : (0, _List.isEmpty)(options)) {
696
+ return "";
697
+ } else {
698
+ const lines = [];
699
+ void lines.push((0, _String.toText)((0, _String.printf)("#### %s"))(fieldLabel));
700
+ void lines.push("");
701
+ const headerCells = (0, _Seq.toList)((0, _Seq.delay)(()=>(0, _Seq.append)((0, _Seq.singleton)("Symptom"), (0, _Seq.delay)(()=>(0, _List.map)((opt)=>(0, _String.toText)((0, _String.printf)("%s (%s)"))(opt.Description)(opt.Value), options)))));
702
+ void lines.push((arg_3 = (0, _String.join)(" | ", headerCells), (0, _String.toText)((0, _String.printf)("| %s |"))(arg_3)));
703
+ const separators = (0, _Seq.toList)((0, _Seq.delay)(()=>(0, _Seq.append)((0, _Seq.singleton)("---"), (0, _Seq.delay)(()=>(0, _List.map)((_arg)=>"---", options)))));
704
+ void lines.push((arg_4 = (0, _String.join)(" | ", separators), (0, _String.toText)((0, _String.printf)("| %s |"))(arg_4)));
705
+ if (matrixAnswer == null) {
706
+ const enumerator_2 = (0, _Util.getEnumerator)(items);
707
+ try {
708
+ while(enumerator_2["System.Collections.IEnumerator.MoveNext"]()){
709
+ const item_1 = enumerator_2["System.Collections.Generic.IEnumerator`1.get_Current"]();
710
+ const rowCells_1 = (0, _Seq.toList)((0, _Seq.delay)(()=>(0, _Seq.append)((0, _Seq.singleton)(item_1.Description), (0, _Seq.delay)(()=>(0, _List.map)((_arg_1)=>"", options)))));
711
+ void lines.push((arg_6 = (0, _String.join)(" | ", rowCells_1), (0, _String.toText)((0, _String.printf)("| %s |"))(arg_6)));
712
+ }
713
+ } finally{
714
+ (0, _Util.disposeSafe)(enumerator_2);
715
+ }
716
+ } else {
717
+ const answer = (0, _Option.value)(matrixAnswer);
718
+ const enumerator = (0, _Util.getEnumerator)(items);
719
+ try {
720
+ while(enumerator["System.Collections.IEnumerator.MoveNext"]()){
721
+ const item = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
722
+ const selectedValue = (0, _Map.FSharpMap__TryFind)(answer.Values, new _FormSpec.Shared_MatrixItemKey(item.OptionKey.fields[0]));
723
+ const rowCells = [];
724
+ void rowCells.push(item.Description);
725
+ const enumerator_1 = (0, _Util.getEnumerator)(options);
726
+ try {
727
+ while(enumerator_1["System.Collections.IEnumerator.MoveNext"]()){
728
+ const option = enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"]();
729
+ if (selectedValue != null && (0, _Option.value)(selectedValue) === option.Value && (sv_1 = (0, _Option.value)(selectedValue), true)) {
730
+ void rowCells.push("✔️");
731
+ } else {
732
+ void rowCells.push("");
733
+ }
734
+ }
735
+ } finally{
736
+ (0, _Util.disposeSafe)(enumerator_1);
737
+ }
738
+ void lines.push((arg_5 = (0, _String.join)(" | ", rowCells), (0, _String.toText)((0, _String.printf)("| %s |"))(arg_5)));
739
+ }
740
+ } finally{
741
+ (0, _Util.disposeSafe)(enumerator);
742
+ }
743
+ }
744
+ void lines.push("");
745
+ return (0, _String.join)("\n", lines);
746
+ }
747
+ }
748
+ function getFieldTypeName(fieldType) {
749
+ switch(fieldType.tag){
750
+ case /* TextArea */ 1:
751
+ return "TextArea";
752
+ case /* Email */ 2:
753
+ return "Email";
754
+ case /* Password */ 3:
755
+ return "Password";
756
+ case /* Search */ 4:
757
+ return "Search";
758
+ case /* Color */ 5:
759
+ return "Color";
760
+ case /* Number */ 6:
761
+ return "Number";
762
+ case /* Tel */ 7:
763
+ return "Tel";
764
+ case /* Date */ 8:
765
+ return "Date";
766
+ case /* DateTimeLocal */ 9:
767
+ return "DateTimeLocal";
768
+ case /* Time */ 10:
769
+ return "Time";
770
+ case /* Checkbox */ 11:
771
+ return "Checkbox";
772
+ case /* SingleChoice */ 13:
773
+ return "SingleChoice";
774
+ case /* Radio */ 12:
775
+ return "Radio";
776
+ case /* Dropdown */ 14:
777
+ return "Dropdown";
778
+ case /* TextAutoComplete */ 18:
779
+ return "TextAutoComplete";
780
+ case /* MultiChoice */ 15:
781
+ return "MultiChoice";
782
+ case /* CheckboxList */ 16:
783
+ return "CheckboxList";
784
+ case /* TagList */ 17:
785
+ return "TagList";
786
+ case /* Signature */ 20:
787
+ return "Signature";
788
+ case /* Message */ 21:
789
+ return "Message";
790
+ case /* Matrix */ 19:
791
+ return "Matrix";
792
+ case /* PluginField */ 22:
793
+ return "PluginField";
794
+ default:
795
+ return "Text";
796
+ }
797
+ }
798
+ function generatePathwayMermaid(pathway, formSpec) {
799
+ return (0, _PathwayRenderers.pathwaySpecToGraph)((0, _MermaidRenderer.MermaidRenderer_$ctor_Z1FBCCD16)(true), pathway, formSpec);
800
+ }
801
+ function renderFormSpecToMarkdown(startHeading, withPathway, formSpec, formValues) {
802
+ let matchValue_4, matchValue_5;
803
+ const lines = [];
804
+ const titleHeading = generateHeadingLevel(startHeading);
805
+ void lines.push(`${titleHeading} ${formSpec.Title}`);
806
+ void lines.push("");
807
+ const matchValue = formSpec.Code;
808
+ if (matchValue == null) {} else {
809
+ const code = (0, _Option.value)(matchValue);
810
+ void lines.push(`**Code:** ${code}`);
811
+ }
812
+ void lines.push(`**Version:** ${formSpec.Version}`);
813
+ void lines.push("");
814
+ if (!(0, _String.isNullOrWhiteSpace)(formSpec.Abstract)) {
815
+ void lines.push(formSpec.Abstract);
816
+ void lines.push("");
817
+ }
818
+ if (!(0, _List.isEmpty)(formSpec.CategoryTags)) {
819
+ const categoryHeading = generateHeadingLevel(startHeading + 1);
820
+ void lines.push(`${categoryHeading} Categories`);
821
+ void lines.push("");
822
+ const enumerator = (0, _Util.getEnumerator)(formSpec.CategoryTags);
823
+ try {
824
+ while(enumerator["System.Collections.IEnumerator.MoveNext"]()){
825
+ const tag = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
826
+ void lines.push(`- ${tag}`);
827
+ }
828
+ } finally{
829
+ (0, _Util.disposeSafe)(enumerator);
830
+ }
831
+ void lines.push("");
832
+ }
833
+ if (!(0, _List.isEmpty)(formSpec.AssociatedCodes)) {
834
+ const codesHeading = generateHeadingLevel(startHeading + 1);
835
+ void lines.push(`${codesHeading} Associated Codes`);
836
+ void lines.push("");
837
+ const enumerator_1 = (0, _Util.getEnumerator)(formSpec.AssociatedCodes);
838
+ try {
839
+ while(enumerator_1["System.Collections.IEnumerator.MoveNext"]()){
840
+ const code_1 = enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"]();
841
+ void lines.push(`- \`${code_1}\``);
842
+ }
843
+ } finally{
844
+ (0, _Util.disposeSafe)(enumerator_1);
845
+ }
846
+ void lines.push("");
847
+ }
848
+ const stepHeading = generateHeadingLevel(startHeading + 1);
849
+ const enumerator_2 = (0, _Util.getEnumerator)(formSpec.Steps);
850
+ try {
851
+ while(enumerator_2["System.Collections.IEnumerator.MoveNext"]()){
852
+ const step = enumerator_2["System.Collections.Generic.IEnumerator`1.get_Current"]();
853
+ const stepLabel = (0, _String.isNullOrWhiteSpace)(step.StepLabel) ? `Step ${step.StepOrder}` : step.StepLabel;
854
+ void lines.push(`${stepHeading} ${stepLabel}`);
855
+ void lines.push("");
856
+ const patternInput = (0, _List.partition)((field)=>{
857
+ if (field.FieldType.tag === /* Matrix */ 19) {
858
+ return true;
859
+ } else {
860
+ return false;
861
+ }
862
+ }, step.Fields);
863
+ const regularFields = patternInput[1];
864
+ const matrixFields = patternInput[0];
865
+ if (formValues == null) {
866
+ if (!(0, _List.isEmpty)(regularFields)) {
867
+ void lines.push("**Fields:**");
868
+ const enumerator_5 = (0, _Util.getEnumerator)(regularFields);
869
+ try {
870
+ while(enumerator_5["System.Collections.IEnumerator.MoveNext"]()){
871
+ const field_3 = enumerator_5["System.Collections.Generic.IEnumerator`1.get_Current"]();
872
+ const fieldTypeName = getFieldTypeName(field_3.FieldType);
873
+ const requiredText = field_3.IsOptional ? "" : " *(required)*";
874
+ void lines.push((0, _String.toText)((0, _String.printf)("- %s%s [%s]"))(field_3.Label)(requiredText)(fieldTypeName));
875
+ }
876
+ } finally{
877
+ (0, _Util.disposeSafe)(enumerator_5);
878
+ }
879
+ void lines.push("");
880
+ }
881
+ const enumerator_6 = (0, _Util.getEnumerator)(matrixFields);
882
+ try {
883
+ while(enumerator_6["System.Collections.IEnumerator.MoveNext"]()){
884
+ const field_4 = enumerator_6["System.Collections.Generic.IEnumerator`1.get_Current"]();
885
+ const fieldTypeName_1 = getFieldTypeName(field_4.FieldType);
886
+ const requiredText_1 = field_4.IsOptional ? "" : " *(required)*";
887
+ void lines.push((0, _String.toText)((0, _String.printf)("- %s%s [%s]"))(field_4.Label)(requiredText_1)(fieldTypeName_1));
888
+ }
889
+ } finally{
890
+ (0, _Util.disposeSafe)(enumerator_6);
891
+ }
892
+ } else {
893
+ const stepValues = (0, _Option.defaultArg)((0, _Map.FSharpMap__TryFind)((0, _Option.value)(formValues), new _FormSpec.Values_StepOrder(step.StepOrder)), (0, _Map.empty)({
894
+ Compare: _Util.compare
895
+ }));
896
+ const enumerator_3 = (0, _Util.getEnumerator)(regularFields);
897
+ try {
898
+ while(enumerator_3["System.Collections.IEnumerator.MoveNext"]()){
899
+ const field_1 = enumerator_3["System.Collections.Generic.IEnumerator`1.get_Current"]();
900
+ const matchValue_2 = (0, _Map.FSharpMap__TryFind)(stepValues, field_1.FieldKey);
901
+ if (matchValue_2 == null) {
902
+ void lines.push((0, _String.toText)((0, _String.printf)("- **%s**: *No response provided*"))(field_1.Label));
903
+ } else {
904
+ const formattedValue = formatFieldValue(field_1.FieldType, (0, _Option.value)(matchValue_2).FieldValue, field_1);
905
+ if (!(0, _String.isNullOrWhiteSpace)(formattedValue)) {
906
+ void lines.push((0, _String.toText)((0, _String.printf)("- **%s**: %s"))(field_1.Label)(formattedValue));
907
+ }
908
+ }
909
+ }
910
+ } finally{
911
+ (0, _Util.disposeSafe)(enumerator_3);
912
+ }
913
+ const enumerator_4 = (0, _Util.getEnumerator)(matrixFields);
914
+ try {
915
+ while(enumerator_4["System.Collections.IEnumerator.MoveNext"]()){
916
+ const field_2 = enumerator_4["System.Collections.Generic.IEnumerator`1.get_Current"]();
917
+ const matchValue_3 = field_2.FieldType;
918
+ if (matchValue_3.tag === /* Matrix */ 19) {
919
+ const tableMarkdown = formatMatrixFieldAsTable(field_2.Label, matchValue_3.fields[0], (matchValue_4 = (0, _Map.FSharpMap__TryFind)(stepValues, field_2.FieldKey), matchValue_4 == null ? undefined : (matchValue_5 = (0, _Option.value)(matchValue_4).FieldValue, matchValue_5.tag === /* Single */ 0 ? undefined : matchValue_5.tag === /* Multiple */ 1 ? undefined : matchValue_5.tag === /* PluginData */ 3 ? undefined : matchValue_5.fields[0])));
920
+ if (!(0, _String.isNullOrWhiteSpace)(tableMarkdown)) {
921
+ void lines.push("");
922
+ void lines.push(tableMarkdown);
923
+ }
924
+ }
925
+ }
926
+ } finally{
927
+ (0, _Util.disposeSafe)(enumerator_4);
928
+ }
929
+ }
930
+ void lines.push("");
931
+ }
932
+ } finally{
933
+ (0, _Util.disposeSafe)(enumerator_2);
934
+ }
935
+ if (withPathway) {
936
+ const matchValue_6 = formSpec.ClinicalPathway;
937
+ if (matchValue_6 == null) {} else {
938
+ const pathway = (0, _Option.value)(matchValue_6);
939
+ const pathwayHeading = generateHeadingLevel(startHeading + 1);
940
+ void lines.push(`${pathwayHeading} Clinical Pathway`);
941
+ void lines.push("");
942
+ const mermaid = generatePathwayMermaid(pathway, formSpec);
943
+ void lines.push(mermaid);
944
+ void lines.push("");
945
+ }
946
+ }
947
+ const reviewHeading = generateHeadingLevel(startHeading + 1);
948
+ void lines.push(`${reviewHeading} Review Requirements`);
949
+ void lines.push("");
950
+ const requiresReviewText = formSpec.RequiresReview ? "Yes" : "No";
951
+ const requiresReviewAndApprovalText = formSpec.RequiresReviewAndApproval ? "Yes" : "No";
952
+ void lines.push((0, _String.toText)((0, _String.printf)("- **Requires Review:** %s"))(requiresReviewText));
953
+ void lines.push((0, _String.toText)((0, _String.printf)("- **Requires Review and Approval:** %s"))(requiresReviewAndApprovalText));
954
+ void lines.push("");
955
+ return (0, _String.join)("\n", lines);
956
+ } //# sourceMappingURL=FormSpecMarkdownRenderer.ts.map
957
+
958
+ //# sourceMappingURL=FormSpecMarkdownRenderer.js.map