@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,1367 @@
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 ValuesApi_createCompleteStatus () {
13
+ return ValuesApi_createCompleteStatus;
14
+ },
15
+ get ValuesApi_createDraftStatus () {
16
+ return ValuesApi_createDraftStatus;
17
+ },
18
+ get ValuesApi_createFieldAnswer () {
19
+ return ValuesApi_createFieldAnswer;
20
+ },
21
+ get ValuesApi_createMatrixFieldValue () {
22
+ return ValuesApi_createMatrixFieldValue;
23
+ },
24
+ get ValuesApi_createMultipleFieldValue () {
25
+ return ValuesApi_createMultipleFieldValue;
26
+ },
27
+ get ValuesApi_createPendingStatus () {
28
+ return ValuesApi_createPendingStatus;
29
+ },
30
+ get ValuesApi_createSingleFieldValue () {
31
+ return ValuesApi_createSingleFieldValue;
32
+ },
33
+ get ValuesApi_deserializeDynamicFormResultData () {
34
+ return ValuesApi_deserializeDynamicFormResultData;
35
+ },
36
+ get ValuesApi_dynamicFormFromTypeScript () {
37
+ return ValuesApi_dynamicFormFromTypeScript;
38
+ },
39
+ get ValuesApi_dynamicFormResultDataFromTypeScript () {
40
+ return ValuesApi_dynamicFormResultDataFromTypeScript;
41
+ },
42
+ get ValuesApi_dynamicFormResultDataToTypeScript () {
43
+ return ValuesApi_dynamicFormResultDataToTypeScript;
44
+ },
45
+ get ValuesApi_dynamicFormToTypeScript () {
46
+ return ValuesApi_dynamicFormToTypeScript;
47
+ },
48
+ get ValuesApi_serializeDynamicFormResultData () {
49
+ return ValuesApi_serializeDynamicFormResultData;
50
+ },
51
+ get ValuesApi_validateAndConvertDynamicFormResultData () {
52
+ return ValuesApi_validateAndConvertDynamicFormResultData;
53
+ },
54
+ get ValuesApi_validateDynamicForm () {
55
+ return ValuesApi_validateDynamicForm;
56
+ },
57
+ get ValuesApi_validateDynamicFormResultData () {
58
+ return ValuesApi_validateDynamicFormResultData;
59
+ },
60
+ get ValuesApi_validateFieldAnswer () {
61
+ return ValuesApi_validateFieldAnswer;
62
+ },
63
+ get ValuesApi_validateFieldValue () {
64
+ return ValuesApi_validateFieldValue;
65
+ },
66
+ get ValuesBuilders_createCompleteStatus () {
67
+ return ValuesBuilders_createCompleteStatus;
68
+ },
69
+ get ValuesBuilders_createDraftStatus () {
70
+ return ValuesBuilders_createDraftStatus;
71
+ },
72
+ get ValuesBuilders_createFieldAnswer () {
73
+ return ValuesBuilders_createFieldAnswer;
74
+ },
75
+ get ValuesBuilders_createMatrixFieldValue () {
76
+ return ValuesBuilders_createMatrixFieldValue;
77
+ },
78
+ get ValuesBuilders_createMultipleFieldValue () {
79
+ return ValuesBuilders_createMultipleFieldValue;
80
+ },
81
+ get ValuesBuilders_createPendingStatus () {
82
+ return ValuesBuilders_createPendingStatus;
83
+ },
84
+ get ValuesBuilders_createSingleFieldValue () {
85
+ return ValuesBuilders_createSingleFieldValue;
86
+ },
87
+ get ValuesConverters_dynamicFormFromTS () {
88
+ return ValuesConverters_dynamicFormFromTS;
89
+ },
90
+ get ValuesConverters_dynamicFormResultDataFromTS () {
91
+ return ValuesConverters_dynamicFormResultDataFromTS;
92
+ },
93
+ get ValuesConverters_dynamicFormResultDataToTS () {
94
+ return ValuesConverters_dynamicFormResultDataToTS;
95
+ },
96
+ get ValuesConverters_dynamicFormSpecDetailsFromTS () {
97
+ return ValuesConverters_dynamicFormSpecDetailsFromTS;
98
+ },
99
+ get ValuesConverters_dynamicFormSpecDetailsToTS () {
100
+ return ValuesConverters_dynamicFormSpecDetailsToTS;
101
+ },
102
+ get ValuesConverters_dynamicFormToTS () {
103
+ return ValuesConverters_dynamicFormToTS;
104
+ },
105
+ get ValuesConverters_dynamicStepValuesFromTS () {
106
+ return ValuesConverters_dynamicStepValuesFromTS;
107
+ },
108
+ get ValuesConverters_dynamicStepValuesToTS () {
109
+ return ValuesConverters_dynamicStepValuesToTS;
110
+ },
111
+ get ValuesConverters_errorTrackingFromTS () {
112
+ return ValuesConverters_errorTrackingFromTS;
113
+ },
114
+ get ValuesConverters_errorTrackingToTS () {
115
+ return ValuesConverters_errorTrackingToTS;
116
+ },
117
+ get ValuesConverters_fableFormModelFromTS () {
118
+ return ValuesConverters_fableFormModelFromTS;
119
+ },
120
+ get ValuesConverters_fableFormModelToTS () {
121
+ return ValuesConverters_fableFormModelToTS;
122
+ },
123
+ get ValuesConverters_fableFormStateFromTS () {
124
+ return ValuesConverters_fableFormStateFromTS;
125
+ },
126
+ get ValuesConverters_fableFormStateToTS () {
127
+ return ValuesConverters_fableFormStateToTS;
128
+ },
129
+ get ValuesConverters_fieldAnswerFromTS () {
130
+ return ValuesConverters_fieldAnswerFromTS;
131
+ },
132
+ get ValuesConverters_fieldAnswerToTS () {
133
+ return ValuesConverters_fieldAnswerToTS;
134
+ },
135
+ get ValuesConverters_fieldDetailsFromTS () {
136
+ return ValuesConverters_fieldDetailsFromTS;
137
+ },
138
+ get ValuesConverters_fieldDetailsToTS () {
139
+ return ValuesConverters_fieldDetailsToTS;
140
+ },
141
+ get ValuesConverters_fieldValueFromTS () {
142
+ return ValuesConverters_fieldValueFromTS;
143
+ },
144
+ get ValuesConverters_fieldValueToTS () {
145
+ return ValuesConverters_fieldValueToTS;
146
+ },
147
+ get ValuesConverters_formStatusFromTS () {
148
+ return ValuesConverters_formStatusFromTS;
149
+ },
150
+ get ValuesConverters_formStatusToTS () {
151
+ return ValuesConverters_formStatusToTS;
152
+ },
153
+ get ValuesConverters_matrixAnswerFromTS () {
154
+ return ValuesConverters_matrixAnswerFromTS;
155
+ },
156
+ get ValuesConverters_matrixAnswerToTS () {
157
+ return ValuesConverters_matrixAnswerToTS;
158
+ },
159
+ get ValuesConverters_signatureFromTS () {
160
+ return ValuesConverters_signatureFromTS;
161
+ },
162
+ get ValuesConverters_signatureToTS () {
163
+ return ValuesConverters_signatureToTS;
164
+ },
165
+ get ValuesConverters_signatureTypeFromTS () {
166
+ return ValuesConverters_signatureTypeFromTS;
167
+ },
168
+ get ValuesConverters_signatureTypeToTS () {
169
+ return ValuesConverters_signatureTypeToTS;
170
+ },
171
+ get ValuesTypes_DynamicFormResultDataTS () {
172
+ return ValuesTypes_DynamicFormResultDataTS;
173
+ },
174
+ get ValuesTypes_DynamicFormResultDataTS_$reflection () {
175
+ return ValuesTypes_DynamicFormResultDataTS_$reflection;
176
+ },
177
+ get ValuesTypes_DynamicFormSpecDetailsTS () {
178
+ return ValuesTypes_DynamicFormSpecDetailsTS;
179
+ },
180
+ get ValuesTypes_DynamicFormSpecDetailsTS_$reflection () {
181
+ return ValuesTypes_DynamicFormSpecDetailsTS_$reflection;
182
+ },
183
+ get ValuesTypes_DynamicFormTS () {
184
+ return ValuesTypes_DynamicFormTS;
185
+ },
186
+ get ValuesTypes_DynamicFormTS_$reflection () {
187
+ return ValuesTypes_DynamicFormTS_$reflection;
188
+ },
189
+ get ValuesTypes_ErrorTrackingTS () {
190
+ return ValuesTypes_ErrorTrackingTS;
191
+ },
192
+ get ValuesTypes_ErrorTrackingTS_$reflection () {
193
+ return ValuesTypes_ErrorTrackingTS_$reflection;
194
+ },
195
+ get ValuesTypes_FableFormModelTS () {
196
+ return ValuesTypes_FableFormModelTS;
197
+ },
198
+ get ValuesTypes_FableFormModelTS_$reflection () {
199
+ return ValuesTypes_FableFormModelTS_$reflection;
200
+ },
201
+ get ValuesTypes_FableFormStateTS () {
202
+ return ValuesTypes_FableFormStateTS;
203
+ },
204
+ get ValuesTypes_FableFormStateTS_$reflection () {
205
+ return ValuesTypes_FableFormStateTS_$reflection;
206
+ },
207
+ get ValuesTypes_FieldAnswerTS () {
208
+ return ValuesTypes_FieldAnswerTS;
209
+ },
210
+ get ValuesTypes_FieldAnswerTS_$reflection () {
211
+ return ValuesTypes_FieldAnswerTS_$reflection;
212
+ },
213
+ get ValuesTypes_FieldDetailsTS () {
214
+ return ValuesTypes_FieldDetailsTS;
215
+ },
216
+ get ValuesTypes_FieldDetailsTS_$reflection () {
217
+ return ValuesTypes_FieldDetailsTS_$reflection;
218
+ },
219
+ get ValuesTypes_FieldValueTS () {
220
+ return ValuesTypes_FieldValueTS;
221
+ },
222
+ get ValuesTypes_FieldValueTS_$reflection () {
223
+ return ValuesTypes_FieldValueTS_$reflection;
224
+ },
225
+ get ValuesTypes_FormStatusTS () {
226
+ return ValuesTypes_FormStatusTS;
227
+ },
228
+ get ValuesTypes_FormStatusTS_$reflection () {
229
+ return ValuesTypes_FormStatusTS_$reflection;
230
+ },
231
+ get ValuesTypes_MatrixAnswerTS () {
232
+ return ValuesTypes_MatrixAnswerTS;
233
+ },
234
+ get ValuesTypes_MatrixAnswerTS_$reflection () {
235
+ return ValuesTypes_MatrixAnswerTS_$reflection;
236
+ },
237
+ get ValuesTypes_SignatureTS () {
238
+ return ValuesTypes_SignatureTS;
239
+ },
240
+ get ValuesTypes_SignatureTS_$reflection () {
241
+ return ValuesTypes_SignatureTS_$reflection;
242
+ },
243
+ get ValuesValidators_validateAndConvertDynamicFormResultData () {
244
+ return ValuesValidators_validateAndConvertDynamicFormResultData;
245
+ },
246
+ get ValuesValidators_validateDynamicForm () {
247
+ return ValuesValidators_validateDynamicForm;
248
+ },
249
+ get ValuesValidators_validateDynamicFormResultData () {
250
+ return ValuesValidators_validateDynamicFormResultData;
251
+ },
252
+ get ValuesValidators_validateFieldAnswer () {
253
+ return ValuesValidators_validateFieldAnswer;
254
+ },
255
+ get ValuesValidators_validateFieldValue () {
256
+ return ValuesValidators_validateFieldValue;
257
+ }
258
+ });
259
+ const _Types = require("@fable-org/fable-library-js/Types.js");
260
+ const _FormSpecApiOption = require("./FormSpec.Api.Option.js");
261
+ const _Util = require("@fable-org/fable-library-js/Util.js");
262
+ const _Reflection = require("@fable-org/fable-library-js/Reflection.js");
263
+ const _Option = require("@fable-org/fable-library-js/Option.js");
264
+ const _FormSpec = require("../FormSpec.js");
265
+ const _List = require("@fable-org/fable-library-js/List.js");
266
+ const _Map = require("@fable-org/fable-library-js/Map.js");
267
+ const _Array = require("@fable-org/fable-library-js/Array.js");
268
+ const _Guid = require("@fable-org/fable-library-js/Guid.js");
269
+ const _Set = require("@fable-org/fable-library-js/Set.js");
270
+ const _Date = require("@fable-org/fable-library-js/Date.js");
271
+ const _Encodefs = require("../fable_modules/Thoth.Json.10.4.1/Encode.fs.js");
272
+ const _Result = require("@fable-org/fable-library-js/Result.js");
273
+ const _Decodefs = require("../fable_modules/Thoth.Json.10.4.1/Decode.fs.js");
274
+ class ValuesTypes_FieldAnswerTS extends _Types.Record {
275
+ constructor(FieldKey, Description, Value){
276
+ super();
277
+ this.FieldKey = FieldKey;
278
+ this.Description = Description;
279
+ this.Value = Value;
280
+ }
281
+ }
282
+ function ValuesTypes_FieldAnswerTS_$reflection() {
283
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.ValuesTypes.FieldAnswerTS", [], ValuesTypes_FieldAnswerTS, ()=>[
284
+ [
285
+ "FieldKey",
286
+ (0, _FormSpecApiOption.Types_FieldKeyTS_$reflection)()
287
+ ],
288
+ [
289
+ "Description",
290
+ _Reflection.string_type
291
+ ],
292
+ [
293
+ "Value",
294
+ _Reflection.string_type
295
+ ]
296
+ ]);
297
+ }
298
+ class ValuesTypes_MatrixAnswerTS extends _Types.Record {
299
+ constructor(FieldKey, Description, Values){
300
+ super();
301
+ this.FieldKey = FieldKey;
302
+ this.Description = Description;
303
+ this.Values = Values;
304
+ }
305
+ }
306
+ function ValuesTypes_MatrixAnswerTS_$reflection() {
307
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.ValuesTypes.MatrixAnswerTS", [], ValuesTypes_MatrixAnswerTS, ()=>[
308
+ [
309
+ "FieldKey",
310
+ (0, _FormSpecApiOption.Types_FieldKeyTS_$reflection)()
311
+ ],
312
+ [
313
+ "Description",
314
+ _Reflection.string_type
315
+ ],
316
+ [
317
+ "Values",
318
+ (0, _Reflection.array_type)((0, _Reflection.tuple_type)((0, _FormSpecApiOption.Types_MatrixItemKeyTS_$reflection)(), _Reflection.string_type))
319
+ ]
320
+ ]);
321
+ }
322
+ class ValuesTypes_FieldValueTS extends _Types.Record {
323
+ constructor(Type, FieldAnswer, FieldAnswers, MatrixAnswer){
324
+ super();
325
+ this.Type = Type;
326
+ this.FieldAnswer = FieldAnswer;
327
+ this.FieldAnswers = FieldAnswers;
328
+ this.MatrixAnswer = MatrixAnswer;
329
+ }
330
+ }
331
+ function ValuesTypes_FieldValueTS_$reflection() {
332
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.ValuesTypes.FieldValueTS", [], ValuesTypes_FieldValueTS, ()=>[
333
+ [
334
+ "Type",
335
+ _Reflection.string_type
336
+ ],
337
+ [
338
+ "FieldAnswer",
339
+ (0, _Reflection.option_type)(ValuesTypes_FieldAnswerTS_$reflection())
340
+ ],
341
+ [
342
+ "FieldAnswers",
343
+ (0, _Reflection.option_type)((0, _Reflection.array_type)(ValuesTypes_FieldAnswerTS_$reflection()))
344
+ ],
345
+ [
346
+ "MatrixAnswer",
347
+ (0, _Reflection.option_type)(ValuesTypes_MatrixAnswerTS_$reflection())
348
+ ]
349
+ ]);
350
+ }
351
+ class ValuesTypes_FieldDetailsTS extends _Types.Record {
352
+ constructor(FieldOrder, Key, Label, FieldValue, FieldType, Options){
353
+ super();
354
+ this.FieldOrder = FieldOrder | 0;
355
+ this.Key = Key;
356
+ this.Label = Label;
357
+ this.FieldValue = FieldValue;
358
+ this.FieldType = FieldType;
359
+ this.Options = Options;
360
+ }
361
+ }
362
+ function ValuesTypes_FieldDetailsTS_$reflection() {
363
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.ValuesTypes.FieldDetailsTS", [], ValuesTypes_FieldDetailsTS, ()=>[
364
+ [
365
+ "FieldOrder",
366
+ _Reflection.int32_type
367
+ ],
368
+ [
369
+ "Key",
370
+ (0, _FormSpecApiOption.Types_FieldKeyTS_$reflection)()
371
+ ],
372
+ [
373
+ "Label",
374
+ _Reflection.string_type
375
+ ],
376
+ [
377
+ "FieldValue",
378
+ ValuesTypes_FieldValueTS_$reflection()
379
+ ],
380
+ [
381
+ "FieldType",
382
+ (0, _FormSpecApiOption.Types_FieldTypeTS_$reflection)()
383
+ ],
384
+ [
385
+ "Options",
386
+ (0, _Reflection.array_type)((0, _FormSpecApiOption.Types_FieldOptionTS_$reflection)())
387
+ ]
388
+ ]);
389
+ }
390
+ class ValuesTypes_FormStatusTS extends _Types.Record {
391
+ constructor(Type, DraftId){
392
+ super();
393
+ this.Type = Type;
394
+ this.DraftId = DraftId;
395
+ }
396
+ }
397
+ function ValuesTypes_FormStatusTS_$reflection() {
398
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.ValuesTypes.FormStatusTS", [], ValuesTypes_FormStatusTS, ()=>[
399
+ [
400
+ "Type",
401
+ _Reflection.string_type
402
+ ],
403
+ [
404
+ "DraftId",
405
+ (0, _Reflection.option_type)(_Reflection.string_type)
406
+ ]
407
+ ]);
408
+ }
409
+ class ValuesTypes_SignatureTS extends _Types.Record {
410
+ constructor(ApprovedById, ApprovedByFullName, ApprovedByDate, ApprovalSignature, SignatureType){
411
+ super();
412
+ this.ApprovedById = ApprovedById;
413
+ this.ApprovedByFullName = ApprovedByFullName;
414
+ this.ApprovedByDate = ApprovedByDate;
415
+ this.ApprovalSignature = ApprovalSignature;
416
+ this.SignatureType = SignatureType | 0;
417
+ }
418
+ }
419
+ function ValuesTypes_SignatureTS_$reflection() {
420
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.ValuesTypes.SignatureTS", [], ValuesTypes_SignatureTS, ()=>[
421
+ [
422
+ "ApprovedById",
423
+ _Reflection.string_type
424
+ ],
425
+ [
426
+ "ApprovedByFullName",
427
+ _Reflection.string_type
428
+ ],
429
+ [
430
+ "ApprovedByDate",
431
+ _Reflection.string_type
432
+ ],
433
+ [
434
+ "ApprovalSignature",
435
+ _Reflection.string_type
436
+ ],
437
+ [
438
+ "SignatureType",
439
+ (0, _Reflection.enum_type)("F1.Studio.FormSpec.Interop.OptionBased.ValuesTypes.SignatureTypeTS", _Reflection.int32_type, [
440
+ [
441
+ "Review",
442
+ 0
443
+ ],
444
+ [
445
+ "Approval",
446
+ 1
447
+ ]
448
+ ])
449
+ ]
450
+ ]);
451
+ }
452
+ class ValuesTypes_DynamicFormSpecDetailsTS extends _Types.Record {
453
+ constructor(FormSpecId, FormSpecCode, FormSpecVersion, DynamicVersion, MaxScore, Status, Signatures){
454
+ super();
455
+ this.FormSpecId = FormSpecId;
456
+ this.FormSpecCode = FormSpecCode;
457
+ this.FormSpecVersion = FormSpecVersion;
458
+ this.DynamicVersion = DynamicVersion;
459
+ this.MaxScore = MaxScore;
460
+ this.Status = Status;
461
+ this.Signatures = Signatures;
462
+ }
463
+ }
464
+ function ValuesTypes_DynamicFormSpecDetailsTS_$reflection() {
465
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.ValuesTypes.DynamicFormSpecDetailsTS", [], ValuesTypes_DynamicFormSpecDetailsTS, ()=>[
466
+ [
467
+ "FormSpecId",
468
+ _Reflection.string_type
469
+ ],
470
+ [
471
+ "FormSpecCode",
472
+ (0, _Reflection.option_type)(_Reflection.string_type)
473
+ ],
474
+ [
475
+ "FormSpecVersion",
476
+ _Reflection.string_type
477
+ ],
478
+ [
479
+ "DynamicVersion",
480
+ _Reflection.string_type
481
+ ],
482
+ [
483
+ "MaxScore",
484
+ (0, _Reflection.option_type)((0, _FormSpecApiOption.Types_ScoreTS_$reflection)())
485
+ ],
486
+ [
487
+ "Status",
488
+ ValuesTypes_FormStatusTS_$reflection()
489
+ ],
490
+ [
491
+ "Signatures",
492
+ (0, _Reflection.array_type)(ValuesTypes_SignatureTS_$reflection())
493
+ ]
494
+ ]);
495
+ }
496
+ class ValuesTypes_FableFormStateTS extends _Types.Record {
497
+ constructor(Type, Error$, Success){
498
+ super();
499
+ this.Type = Type;
500
+ this.Error = Error$;
501
+ this.Success = Success;
502
+ }
503
+ }
504
+ function ValuesTypes_FableFormStateTS_$reflection() {
505
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.ValuesTypes.FableFormStateTS", [], ValuesTypes_FableFormStateTS, ()=>[
506
+ [
507
+ "Type",
508
+ _Reflection.string_type
509
+ ],
510
+ [
511
+ "Error",
512
+ (0, _Reflection.option_type)(_Reflection.string_type)
513
+ ],
514
+ [
515
+ "Success",
516
+ (0, _Reflection.option_type)(_Reflection.string_type)
517
+ ]
518
+ ]);
519
+ }
520
+ class ValuesTypes_ErrorTrackingTS extends _Types.Record {
521
+ constructor(Type, ShowAllErrors, ShowFieldError){
522
+ super();
523
+ this.Type = Type;
524
+ this.ShowAllErrors = ShowAllErrors;
525
+ this.ShowFieldError = ShowFieldError;
526
+ }
527
+ }
528
+ function ValuesTypes_ErrorTrackingTS_$reflection() {
529
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.ValuesTypes.ErrorTrackingTS", [], ValuesTypes_ErrorTrackingTS, ()=>[
530
+ [
531
+ "Type",
532
+ _Reflection.string_type
533
+ ],
534
+ [
535
+ "ShowAllErrors",
536
+ _Reflection.bool_type
537
+ ],
538
+ [
539
+ "ShowFieldError",
540
+ (0, _Reflection.array_type)(_Reflection.string_type)
541
+ ]
542
+ ]);
543
+ }
544
+ class ValuesTypes_FableFormModelTS extends _Types.Record {
545
+ constructor(Values, State, ErrorTracking){
546
+ super();
547
+ this.Values = Values;
548
+ this.State = State;
549
+ this.ErrorTracking = ErrorTracking;
550
+ }
551
+ }
552
+ function ValuesTypes_FableFormModelTS_$reflection() {
553
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.ValuesTypes.FableFormModelTS", [], ValuesTypes_FableFormModelTS, ()=>[
554
+ [
555
+ "Values",
556
+ (0, _Reflection.array_type)((0, _Reflection.tuple_type)((0, _FormSpecApiOption.Types_FieldKeyTS_$reflection)(), ValuesTypes_FieldDetailsTS_$reflection()))
557
+ ],
558
+ [
559
+ "State",
560
+ ValuesTypes_FableFormStateTS_$reflection()
561
+ ],
562
+ [
563
+ "ErrorTracking",
564
+ ValuesTypes_ErrorTrackingTS_$reflection()
565
+ ]
566
+ ]);
567
+ }
568
+ class ValuesTypes_DynamicFormTS extends _Types.Record {
569
+ constructor(DynamicFormSpecDetails, Steps){
570
+ super();
571
+ this.DynamicFormSpecDetails = DynamicFormSpecDetails;
572
+ this.Steps = Steps;
573
+ }
574
+ }
575
+ function ValuesTypes_DynamicFormTS_$reflection() {
576
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.ValuesTypes.DynamicFormTS", [], ValuesTypes_DynamicFormTS, ()=>[
577
+ [
578
+ "DynamicFormSpecDetails",
579
+ ValuesTypes_DynamicFormSpecDetailsTS_$reflection()
580
+ ],
581
+ [
582
+ "Steps",
583
+ (0, _Reflection.array_type)((0, _Reflection.tuple_type)(_Reflection.int32_type, ValuesTypes_FableFormModelTS_$reflection()))
584
+ ]
585
+ ]);
586
+ }
587
+ class ValuesTypes_DynamicFormResultDataTS extends _Types.Record {
588
+ constructor(ResultFormSpecDetails, ResultSteps){
589
+ super();
590
+ this.ResultFormSpecDetails = ResultFormSpecDetails;
591
+ this.ResultSteps = ResultSteps;
592
+ }
593
+ }
594
+ function ValuesTypes_DynamicFormResultDataTS_$reflection() {
595
+ return (0, _Reflection.record_type)("F1.Studio.FormSpec.Interop.OptionBased.ValuesTypes.DynamicFormResultDataTS", [], ValuesTypes_DynamicFormResultDataTS, ()=>[
596
+ [
597
+ "ResultFormSpecDetails",
598
+ ValuesTypes_DynamicFormSpecDetailsTS_$reflection()
599
+ ],
600
+ [
601
+ "ResultSteps",
602
+ (0, _Reflection.array_type)((0, _Reflection.tuple_type)(_Reflection.int32_type, (0, _Reflection.array_type)((0, _Reflection.tuple_type)((0, _FormSpecApiOption.Types_FieldKeyTS_$reflection)(), ValuesTypes_FieldDetailsTS_$reflection()))))
603
+ ]
604
+ ]);
605
+ }
606
+ function ValuesConverters_fieldAnswerToTS(answer) {
607
+ return new ValuesTypes_FieldAnswerTS((0, _FormSpecApiOption.Converters_fieldKeyToTS)(answer.FieldKey), answer.Description, answer.Value);
608
+ }
609
+ function ValuesConverters_fieldAnswerFromTS(answer) {
610
+ const matchValue = (0, _FormSpecApiOption.Converters_fieldKeyFromTS)(answer.FieldKey);
611
+ if (matchValue == null) {
612
+ return undefined;
613
+ } else {
614
+ return new _FormSpec.Shared_FieldAnswer((0, _Option.value)(matchValue), answer.Description, answer.Value);
615
+ }
616
+ }
617
+ function ValuesConverters_matrixAnswerToTS(answer) {
618
+ return new ValuesTypes_MatrixAnswerTS((0, _FormSpecApiOption.Converters_fieldKeyToTS)(answer.FieldKey), answer.Description, (0, _List.toArray)((0, _List.map)((tupledArg)=>[
619
+ new _FormSpecApiOption.Types_MatrixItemKeyTS(tupledArg[0].fields[0]),
620
+ tupledArg[1]
621
+ ], (0, _Map.toList)(answer.Values))));
622
+ }
623
+ function ValuesConverters_matrixAnswerFromTS(answer) {
624
+ const matchValue = (0, _FormSpecApiOption.Converters_fieldKeyFromTS)(answer.FieldKey);
625
+ if (matchValue == null) {
626
+ return undefined;
627
+ } else {
628
+ const fieldKey = (0, _Option.value)(matchValue);
629
+ let valuesMap;
630
+ const array_1 = (0, _Array.map)((tupledArg)=>{
631
+ let matchValue_1;
632
+ let outArg = "00000000-0000-0000-0000-000000000000";
633
+ matchValue_1 = [
634
+ (0, _Guid.tryParse)(tupledArg[0].Value, new _Types.FSharpRef(()=>outArg, (v)=>{
635
+ outArg = v;
636
+ })),
637
+ outArg
638
+ ];
639
+ if (matchValue_1[0]) {
640
+ return [
641
+ new _FormSpec.Shared_MatrixItemKey(matchValue_1[1]),
642
+ tupledArg[1]
643
+ ];
644
+ } else {
645
+ return undefined;
646
+ }
647
+ }, answer.Values);
648
+ valuesMap = (0, _Array.fold)((acc, item)=>{
649
+ let matchResult, key, map, value_1;
650
+ if (acc != null) {
651
+ if (item != null) {
652
+ matchResult = 0;
653
+ key = (0, _Option.value)(item)[0];
654
+ map = (0, _Option.value)(acc);
655
+ value_1 = (0, _Option.value)(item)[1];
656
+ } else {
657
+ matchResult = 1;
658
+ }
659
+ } else {
660
+ matchResult = 1;
661
+ }
662
+ switch(matchResult){
663
+ case 0:
664
+ return (0, _Map.add)(key, value_1, map);
665
+ default:
666
+ return undefined;
667
+ }
668
+ }, (0, _Map.empty)({
669
+ Compare: _Util.compare
670
+ }), array_1);
671
+ if (valuesMap == null) {
672
+ return undefined;
673
+ } else {
674
+ return new _FormSpec.Shared_MatrixAnswer(fieldKey, answer.Description, (0, _Option.value)(valuesMap));
675
+ }
676
+ }
677
+ }
678
+ function ValuesConverters_fieldValueToTS(value) {
679
+ switch(value.tag){
680
+ case /* Multiple */ 1:
681
+ return new ValuesTypes_FieldValueTS("Multiple", undefined, (0, _List.toArray)((0, _List.map)(ValuesConverters_fieldAnswerToTS, (0, _Set.toList)(value.fields[0]))), undefined);
682
+ case /* Matrix */ 2:
683
+ return new ValuesTypes_FieldValueTS("Matrix", undefined, undefined, ValuesConverters_matrixAnswerToTS(value.fields[0]));
684
+ case /* PluginData */ 3:
685
+ {
686
+ const pluginData = value.fields[0];
687
+ return new ValuesTypes_FieldValueTS("PluginData", undefined, undefined, undefined);
688
+ }
689
+ default:
690
+ return new ValuesTypes_FieldValueTS("Single", ValuesConverters_fieldAnswerToTS(value.fields[0]), undefined, undefined);
691
+ }
692
+ }
693
+ function ValuesConverters_fieldValueFromTS(value) {
694
+ const matchValue = value.Type;
695
+ switch(matchValue){
696
+ case "Single":
697
+ {
698
+ const matchValue_1 = value.FieldAnswer;
699
+ if (matchValue_1 == null) {
700
+ return undefined;
701
+ } else {
702
+ const matchValue_2 = ValuesConverters_fieldAnswerFromTS((0, _Option.value)(matchValue_1));
703
+ if (matchValue_2 == null) {
704
+ return undefined;
705
+ } else {
706
+ return (0, _FormSpec.Shared_FieldValue_Single)((0, _Option.value)(matchValue_2));
707
+ }
708
+ }
709
+ }
710
+ case "Multiple":
711
+ {
712
+ const matchValue_3 = value.FieldAnswers;
713
+ if (matchValue_3 == null) {
714
+ return undefined;
715
+ } else {
716
+ let convertedAnswers;
717
+ const array_1 = (0, _Array.map)(ValuesConverters_fieldAnswerFromTS, (0, _Option.value)(matchValue_3));
718
+ convertedAnswers = (0, _Array.fold)((acc, answer_2)=>{
719
+ let matchResult, item, set$;
720
+ if (acc != null) {
721
+ if (answer_2 != null) {
722
+ matchResult = 0;
723
+ item = (0, _Option.value)(answer_2);
724
+ set$ = (0, _Option.value)(acc);
725
+ } else {
726
+ matchResult = 1;
727
+ }
728
+ } else {
729
+ matchResult = 1;
730
+ }
731
+ switch(matchResult){
732
+ case 0:
733
+ return (0, _Set.add)(item, set$);
734
+ default:
735
+ return undefined;
736
+ }
737
+ }, (0, _Set.empty)({
738
+ Compare: _Util.compare
739
+ }), array_1);
740
+ if (convertedAnswers == null) {
741
+ return undefined;
742
+ } else {
743
+ return (0, _FormSpec.Shared_FieldValue_Multiple)((0, _Option.value)(convertedAnswers));
744
+ }
745
+ }
746
+ }
747
+ case "Matrix":
748
+ {
749
+ const matchValue_5 = value.MatrixAnswer;
750
+ if (matchValue_5 == null) {
751
+ return undefined;
752
+ } else {
753
+ const matchValue_6 = ValuesConverters_matrixAnswerFromTS((0, _Option.value)(matchValue_5));
754
+ if (matchValue_6 == null) {
755
+ return undefined;
756
+ } else {
757
+ return (0, _FormSpec.Shared_FieldValue_Matrix)((0, _Option.value)(matchValue_6));
758
+ }
759
+ }
760
+ }
761
+ default:
762
+ return undefined;
763
+ }
764
+ }
765
+ function ValuesConverters_fieldDetailsToTS(details) {
766
+ return new ValuesTypes_FieldDetailsTS(details.FieldOrder, (0, _FormSpecApiOption.Converters_fieldKeyToTS)(details.Key), details.Label, ValuesConverters_fieldValueToTS(details.FieldValue), (0, _FormSpecApiOption.Converters_fieldTypeToTS)(details.FieldType), (0, _List.toArray)((0, _List.map)(_FormSpecApiOption.Converters_fieldOptionToTS, details.Options)));
767
+ }
768
+ function ValuesConverters_fieldDetailsFromTS(details) {
769
+ const matchValue = (0, _FormSpecApiOption.Converters_fieldKeyFromTS)(details.Key);
770
+ const matchValue_1 = ValuesConverters_fieldValueFromTS(details.FieldValue);
771
+ const matchValue_2 = (0, _FormSpecApiOption.Converters_fieldTypeFromTS)(details.FieldType);
772
+ let matchResult, fieldType, fieldValue, key;
773
+ if (matchValue != null) {
774
+ if (matchValue_1 != null) {
775
+ if (matchValue_2 != null) {
776
+ matchResult = 0;
777
+ fieldType = (0, _Option.value)(matchValue_2);
778
+ fieldValue = (0, _Option.value)(matchValue_1);
779
+ key = (0, _Option.value)(matchValue);
780
+ } else {
781
+ matchResult = 1;
782
+ }
783
+ } else {
784
+ matchResult = 1;
785
+ }
786
+ } else {
787
+ matchResult = 1;
788
+ }
789
+ switch(matchResult){
790
+ case 0:
791
+ {
792
+ const options = (0, _Array.fold)((acc, opt)=>{
793
+ let matchResult_1, item, list;
794
+ if (acc != null) {
795
+ if (opt != null) {
796
+ matchResult_1 = 0;
797
+ item = (0, _Option.value)(opt);
798
+ list = (0, _Option.value)(acc);
799
+ } else {
800
+ matchResult_1 = 1;
801
+ }
802
+ } else {
803
+ matchResult_1 = 1;
804
+ }
805
+ switch(matchResult_1){
806
+ case 0:
807
+ return (0, _List.cons)(item, list);
808
+ default:
809
+ return undefined;
810
+ }
811
+ }, (0, _List.empty)(), (0, _Array.map)(_FormSpecApiOption.Converters_fieldOptionFromTS, details.Options));
812
+ if (options == null) {
813
+ return undefined;
814
+ } else {
815
+ return new _FormSpec.Values_FieldDetails$1(details.FieldOrder, key, details.Label, fieldValue, fieldType, (0, _List.reverse)((0, _Option.value)(options)));
816
+ }
817
+ }
818
+ default:
819
+ return undefined;
820
+ }
821
+ }
822
+ function ValuesConverters_formStatusToTS(status) {
823
+ switch(status.tag){
824
+ case /* Draft */ 1:
825
+ return new ValuesTypes_FormStatusTS("Draft", status.fields[0]);
826
+ case /* WaitingForReview */ 2:
827
+ return new ValuesTypes_FormStatusTS("WaitingForReview", undefined);
828
+ case /* WaitingForApproval */ 3:
829
+ return new ValuesTypes_FormStatusTS("WaitingForApproval", undefined);
830
+ case /* Complete */ 4:
831
+ return new ValuesTypes_FormStatusTS("Complete", undefined);
832
+ default:
833
+ return new ValuesTypes_FormStatusTS("Pending", undefined);
834
+ }
835
+ }
836
+ function ValuesConverters_formStatusFromTS(status) {
837
+ const matchValue = status.Type;
838
+ switch(matchValue){
839
+ case "Pending":
840
+ return (0, _FormSpec.Values_FormStatus_Pending)();
841
+ case "Draft":
842
+ {
843
+ const matchValue_1 = status.DraftId;
844
+ if (matchValue_1 == null) {
845
+ return undefined;
846
+ } else {
847
+ let matchValue_2;
848
+ let outArg = "00000000-0000-0000-0000-000000000000";
849
+ matchValue_2 = [
850
+ (0, _Guid.tryParse)((0, _Option.value)(matchValue_1), new _Types.FSharpRef(()=>outArg, (v)=>{
851
+ outArg = v;
852
+ })),
853
+ outArg
854
+ ];
855
+ if (matchValue_2[0]) {
856
+ return (0, _FormSpec.Values_FormStatus_Draft)(matchValue_2[1]);
857
+ } else {
858
+ return undefined;
859
+ }
860
+ }
861
+ }
862
+ case "WaitingForReview":
863
+ return (0, _FormSpec.Values_FormStatus_WaitingForReview)();
864
+ case "WaitingForApproval":
865
+ return (0, _FormSpec.Values_FormStatus_WaitingForApproval)();
866
+ case "Complete":
867
+ return (0, _FormSpec.Values_FormStatus_Complete)();
868
+ default:
869
+ return undefined;
870
+ }
871
+ }
872
+ function ValuesConverters_signatureTypeToTS(sigType) {
873
+ if (sigType.tag === /* Approval */ 1) {
874
+ return 1;
875
+ } else {
876
+ return 0;
877
+ }
878
+ }
879
+ function ValuesConverters_signatureTypeFromTS(sigType) {
880
+ switch(sigType){
881
+ case 0:
882
+ return (0, _FormSpec.Values_SignatureType_Review)();
883
+ case 1:
884
+ return (0, _FormSpec.Values_SignatureType_Approval)();
885
+ default:
886
+ return undefined;
887
+ }
888
+ }
889
+ function ValuesConverters_signatureToTS(signature) {
890
+ return new ValuesTypes_SignatureTS(signature.ApprovedById, signature.ApprovedByFullName, (0, _Date.toString)(signature.ApprovedByDate, "O"), signature.ApprovalSignature, ValuesConverters_signatureTypeToTS(signature.SignatureType));
891
+ }
892
+ function ValuesConverters_signatureFromTS(signature) {
893
+ let matchValue;
894
+ let outArg = "00000000-0000-0000-0000-000000000000";
895
+ matchValue = [
896
+ (0, _Guid.tryParse)(signature.ApprovedById, new _Types.FSharpRef(()=>outArg, (v)=>{
897
+ outArg = v;
898
+ })),
899
+ outArg
900
+ ];
901
+ let matchValue_1;
902
+ let outArg_1 = (0, _Date.minValue)();
903
+ matchValue_1 = [
904
+ (0, _Date.tryParse)(signature.ApprovedByDate, new _Types.FSharpRef(()=>outArg_1, (v_1)=>{
905
+ outArg_1 = v_1;
906
+ })),
907
+ outArg_1
908
+ ];
909
+ const matchValue_2 = ValuesConverters_signatureTypeFromTS(signature.SignatureType);
910
+ let matchResult;
911
+ if (matchValue[0]) {
912
+ if (matchValue_1[0]) {
913
+ if (matchValue_2 != null) {
914
+ matchResult = 0;
915
+ } else {
916
+ matchResult = 1;
917
+ }
918
+ } else {
919
+ matchResult = 1;
920
+ }
921
+ } else {
922
+ matchResult = 1;
923
+ }
924
+ switch(matchResult){
925
+ case 0:
926
+ return new _FormSpec.Values_Signature(matchValue[1], signature.ApprovedByFullName, matchValue_1[1], signature.ApprovalSignature, (0, _Option.value)(matchValue_2));
927
+ default:
928
+ return undefined;
929
+ }
930
+ }
931
+ function ValuesConverters_dynamicStepValuesToTS(stepValues) {
932
+ return (0, _List.toArray)((0, _List.map)((tupledArg)=>[
933
+ (0, _FormSpecApiOption.Converters_fieldKeyToTS)(tupledArg[0]),
934
+ ValuesConverters_fieldDetailsToTS(tupledArg[1])
935
+ ], (0, _Map.toList)(stepValues)));
936
+ }
937
+ function ValuesConverters_dynamicStepValuesFromTS(stepValues) {
938
+ const array_1 = (0, _Array.map)((tupledArg)=>{
939
+ const matchValue = (0, _FormSpecApiOption.Converters_fieldKeyFromTS)(tupledArg[0]);
940
+ const matchValue_1 = ValuesConverters_fieldDetailsFromTS(tupledArg[1]);
941
+ let matchResult, details, key;
942
+ if (matchValue != null) {
943
+ if (matchValue_1 != null) {
944
+ matchResult = 0;
945
+ details = (0, _Option.value)(matchValue_1);
946
+ key = (0, _Option.value)(matchValue);
947
+ } else {
948
+ matchResult = 1;
949
+ }
950
+ } else {
951
+ matchResult = 1;
952
+ }
953
+ switch(matchResult){
954
+ case 0:
955
+ return [
956
+ key,
957
+ details
958
+ ];
959
+ default:
960
+ return undefined;
961
+ }
962
+ }, stepValues);
963
+ return (0, _Array.fold)((acc, item)=>{
964
+ let matchResult_1, details_1, key_1, map;
965
+ if (acc != null) {
966
+ if (item != null) {
967
+ matchResult_1 = 0;
968
+ details_1 = (0, _Option.value)(item)[1];
969
+ key_1 = (0, _Option.value)(item)[0];
970
+ map = (0, _Option.value)(acc);
971
+ } else {
972
+ matchResult_1 = 1;
973
+ }
974
+ } else {
975
+ matchResult_1 = 1;
976
+ }
977
+ switch(matchResult_1){
978
+ case 0:
979
+ return (0, _Map.add)(key_1, details_1, map);
980
+ default:
981
+ return undefined;
982
+ }
983
+ }, (0, _Map.empty)({
984
+ Compare: _Util.compare
985
+ }), array_1);
986
+ }
987
+ function ValuesConverters_dynamicFormSpecDetailsToTS(details) {
988
+ return new ValuesTypes_DynamicFormSpecDetailsTS(details.FormSpecId, details.FormSpecCode, details.FormSpecVersion, details.DynamicVersion, (0, _Option.map)(_FormSpecApiOption.Converters_scoreToTS, details.MaxScore), ValuesConverters_formStatusToTS(details.Status), (0, _List.toArray)((0, _List.map)(ValuesConverters_signatureToTS, details.Signatures)));
989
+ }
990
+ function ValuesConverters_dynamicFormSpecDetailsFromTS(details) {
991
+ let matchValue;
992
+ let outArg = "00000000-0000-0000-0000-000000000000";
993
+ matchValue = [
994
+ (0, _Guid.tryParse)(details.FormSpecId, new _Types.FSharpRef(()=>outArg, (v)=>{
995
+ outArg = v;
996
+ })),
997
+ outArg
998
+ ];
999
+ if (matchValue[0]) {
1000
+ const statusResult = ValuesConverters_formStatusFromTS(details.Status);
1001
+ const signaturesResult = (0, _Array.fold)((acc, sigOpt)=>{
1002
+ let matchResult, item, list;
1003
+ if (acc != null) {
1004
+ if (sigOpt != null) {
1005
+ matchResult = 0;
1006
+ item = (0, _Option.value)(sigOpt);
1007
+ list = (0, _Option.value)(acc);
1008
+ } else {
1009
+ matchResult = 1;
1010
+ }
1011
+ } else {
1012
+ matchResult = 1;
1013
+ }
1014
+ switch(matchResult){
1015
+ case 0:
1016
+ return (0, _List.cons)(item, list);
1017
+ default:
1018
+ return undefined;
1019
+ }
1020
+ }, (0, _List.empty)(), (0, _Array.map)(ValuesConverters_signatureFromTS, details.Signatures));
1021
+ let maxScoreResult;
1022
+ const matchValue_2 = details.MaxScore;
1023
+ maxScoreResult = matchValue_2 == null ? undefined : (0, _FormSpecApiOption.Converters_scoreFromTS)((0, _Option.value)(matchValue_2));
1024
+ let matchResult_1, signatures, status;
1025
+ if (statusResult != null) {
1026
+ if (signaturesResult != null) {
1027
+ matchResult_1 = 0;
1028
+ signatures = (0, _Option.value)(signaturesResult);
1029
+ status = (0, _Option.value)(statusResult);
1030
+ } else {
1031
+ matchResult_1 = 1;
1032
+ }
1033
+ } else {
1034
+ matchResult_1 = 1;
1035
+ }
1036
+ switch(matchResult_1){
1037
+ case 0:
1038
+ return new _FormSpec.Values_DynamicFormSpecDetails(matchValue[1], details.FormSpecCode, details.FormSpecVersion, details.DynamicVersion, maxScoreResult, status, (0, _List.reverse)(signatures));
1039
+ default:
1040
+ return undefined;
1041
+ }
1042
+ } else {
1043
+ return undefined;
1044
+ }
1045
+ }
1046
+ function ValuesConverters_fableFormStateToTS(state) {
1047
+ return undefined;
1048
+ }
1049
+ function ValuesConverters_fableFormStateFromTS(state) {
1050
+ const matchValue = state.Type;
1051
+ switch(matchValue){
1052
+ case "Idle":
1053
+ return (0, _Option.some)("Idle");
1054
+ case "Loading":
1055
+ return (0, _Option.some)("Loading");
1056
+ case "Error":
1057
+ {
1058
+ const matchValue_1 = state.Error;
1059
+ if (matchValue_1 == null) {
1060
+ return undefined;
1061
+ } else {
1062
+ return (0, _Option.some)({
1063
+ Error: (0, _Option.value)(matchValue_1)
1064
+ });
1065
+ }
1066
+ }
1067
+ case "Success":
1068
+ {
1069
+ const matchValue_2 = state.Success;
1070
+ if (matchValue_2 == null) {
1071
+ return undefined;
1072
+ } else {
1073
+ return (0, _Option.some)({
1074
+ Success: (0, _Option.value)(matchValue_2)
1075
+ });
1076
+ }
1077
+ }
1078
+ default:
1079
+ return undefined;
1080
+ }
1081
+ }
1082
+ function ValuesConverters_errorTrackingToTS(tracking) {
1083
+ return undefined;
1084
+ }
1085
+ function ValuesConverters_errorTrackingFromTS(tracking) {
1086
+ return (0, _Option.some)({
1087
+ ShowAllErrors: tracking.ShowAllErrors,
1088
+ ShowFieldError: (0, _Set.ofArray)(tracking.ShowFieldError, {
1089
+ Compare: _Util.comparePrimitives
1090
+ })
1091
+ });
1092
+ }
1093
+ function ValuesConverters_fableFormModelToTS(model) {
1094
+ return undefined;
1095
+ }
1096
+ function ValuesConverters_fableFormModelFromTS(model) {
1097
+ const matchValue = ValuesConverters_dynamicStepValuesFromTS(model.Values);
1098
+ const matchValue_1 = ValuesConverters_fableFormStateFromTS(model.State);
1099
+ const matchValue_2 = ValuesConverters_errorTrackingFromTS(model.ErrorTracking);
1100
+ let matchResult, errorTracking, state, values;
1101
+ if (matchValue != null) {
1102
+ if (matchValue_1 != null) {
1103
+ if (matchValue_2 != null) {
1104
+ matchResult = 0;
1105
+ errorTracking = (0, _Option.value)(matchValue_2);
1106
+ state = (0, _Option.value)(matchValue_1);
1107
+ values = (0, _Option.value)(matchValue);
1108
+ } else {
1109
+ matchResult = 1;
1110
+ }
1111
+ } else {
1112
+ matchResult = 1;
1113
+ }
1114
+ } else {
1115
+ matchResult = 1;
1116
+ }
1117
+ switch(matchResult){
1118
+ case 0:
1119
+ return (0, _Option.some)({
1120
+ ErrorTracking: errorTracking,
1121
+ State: state,
1122
+ Values: values
1123
+ });
1124
+ default:
1125
+ return undefined;
1126
+ }
1127
+ }
1128
+ function ValuesConverters_dynamicFormToTS(form) {
1129
+ try {
1130
+ const detailsTS = ValuesConverters_dynamicFormSpecDetailsToTS(form.DynamicFormSpecDetails);
1131
+ const stepsTS = (0, _List.fold)((acc, item)=>{
1132
+ let matchResult, list_1, model_1, order;
1133
+ if (acc != null) {
1134
+ if (item != null) {
1135
+ matchResult = 0;
1136
+ list_1 = (0, _Option.value)(acc);
1137
+ model_1 = (0, _Option.value)(item)[1];
1138
+ order = (0, _Option.value)(item)[0];
1139
+ } else {
1140
+ matchResult = 1;
1141
+ }
1142
+ } else {
1143
+ matchResult = 1;
1144
+ }
1145
+ switch(matchResult){
1146
+ case 0:
1147
+ return (0, _List.cons)([
1148
+ order,
1149
+ model_1
1150
+ ], list_1);
1151
+ default:
1152
+ return undefined;
1153
+ }
1154
+ }, (0, _List.empty)(), (0, _List.map)((tupledArg)=>{
1155
+ const stepOrder = tupledArg[0].fields[0] | 0;
1156
+ const matchValue = ValuesConverters_fableFormModelToTS(tupledArg[1]);
1157
+ if (matchValue == null) {
1158
+ return undefined;
1159
+ } else {
1160
+ return [
1161
+ stepOrder,
1162
+ (0, _Option.value)(matchValue)
1163
+ ];
1164
+ }
1165
+ }, (0, _Map.toList)(form.Steps)));
1166
+ return stepsTS == null ? undefined : new ValuesTypes_DynamicFormTS(detailsTS, (0, _List.toArray)((0, _List.reverse)((0, _Option.value)(stepsTS))));
1167
+ } catch (matchValue_2) {
1168
+ return undefined;
1169
+ }
1170
+ }
1171
+ function ValuesConverters_dynamicFormFromTS(form) {
1172
+ const matchValue = ValuesConverters_dynamicFormSpecDetailsFromTS(form.DynamicFormSpecDetails);
1173
+ if (matchValue == null) {
1174
+ return undefined;
1175
+ } else {
1176
+ const details = (0, _Option.value)(matchValue);
1177
+ let steps;
1178
+ const array_1 = (0, _Array.map)((tupledArg)=>{
1179
+ const matchValue_1 = ValuesConverters_fableFormModelFromTS(tupledArg[1]);
1180
+ if (matchValue_1 == null) {
1181
+ return undefined;
1182
+ } else {
1183
+ return [
1184
+ new _FormSpec.Values_StepOrder(tupledArg[0]),
1185
+ (0, _Option.value)(matchValue_1)
1186
+ ];
1187
+ }
1188
+ }, form.Steps);
1189
+ steps = (0, _Array.fold)((acc, item)=>{
1190
+ let matchResult, map, model_1, order;
1191
+ if (acc != null) {
1192
+ if (item != null) {
1193
+ matchResult = 0;
1194
+ map = (0, _Option.value)(acc);
1195
+ model_1 = (0, _Option.value)(item)[1];
1196
+ order = (0, _Option.value)(item)[0];
1197
+ } else {
1198
+ matchResult = 1;
1199
+ }
1200
+ } else {
1201
+ matchResult = 1;
1202
+ }
1203
+ switch(matchResult){
1204
+ case 0:
1205
+ return (0, _Map.add)(order, model_1, map);
1206
+ default:
1207
+ return undefined;
1208
+ }
1209
+ }, (0, _Map.empty)({
1210
+ Compare: _Util.compare
1211
+ }), array_1);
1212
+ if (steps == null) {
1213
+ return undefined;
1214
+ } else {
1215
+ return (0, _Option.some)({
1216
+ DynamicFormSpecDetails: details,
1217
+ Steps: (0, _Option.value)(steps)
1218
+ });
1219
+ }
1220
+ }
1221
+ }
1222
+ function ValuesConverters_dynamicFormResultDataToTS(data) {
1223
+ return new ValuesTypes_DynamicFormResultDataTS(ValuesConverters_dynamicFormSpecDetailsToTS(data.ResultFormSpecDetails), (0, _List.toArray)((0, _List.map)((tupledArg)=>[
1224
+ tupledArg[0].fields[0],
1225
+ ValuesConverters_dynamicStepValuesToTS(tupledArg[1])
1226
+ ], (0, _Map.toList)(data.ResultSteps))));
1227
+ }
1228
+ function ValuesConverters_dynamicFormResultDataFromTS(data) {
1229
+ const matchValue = ValuesConverters_dynamicFormSpecDetailsFromTS(data.ResultFormSpecDetails);
1230
+ if (matchValue == null) {
1231
+ return undefined;
1232
+ } else {
1233
+ const details = (0, _Option.value)(matchValue);
1234
+ let resultSteps;
1235
+ const array_1 = (0, _Array.map)((tupledArg)=>{
1236
+ const matchValue_1 = ValuesConverters_dynamicStepValuesFromTS(tupledArg[1]);
1237
+ if (matchValue_1 == null) {
1238
+ return undefined;
1239
+ } else {
1240
+ return [
1241
+ new _FormSpec.Values_StepOrder(tupledArg[0]),
1242
+ (0, _Option.value)(matchValue_1)
1243
+ ];
1244
+ }
1245
+ }, data.ResultSteps);
1246
+ resultSteps = (0, _Array.fold)((acc, item)=>{
1247
+ let matchResult, map, order, values;
1248
+ if (acc != null) {
1249
+ if (item != null) {
1250
+ matchResult = 0;
1251
+ map = (0, _Option.value)(acc);
1252
+ order = (0, _Option.value)(item)[0];
1253
+ values = (0, _Option.value)(item)[1];
1254
+ } else {
1255
+ matchResult = 1;
1256
+ }
1257
+ } else {
1258
+ matchResult = 1;
1259
+ }
1260
+ switch(matchResult){
1261
+ case 0:
1262
+ return (0, _Map.add)(order, values, map);
1263
+ default:
1264
+ return undefined;
1265
+ }
1266
+ }, (0, _Map.empty)({
1267
+ Compare: _Util.compare
1268
+ }), array_1);
1269
+ if (resultSteps == null) {
1270
+ return undefined;
1271
+ } else {
1272
+ return new _FormSpec.Values_DynamicFormResultData$1(details, (0, _Option.value)(resultSteps));
1273
+ }
1274
+ }
1275
+ }
1276
+ function ValuesValidators_validateDynamicFormResultData(input) {
1277
+ const stringified = (0, _Encodefs.toString)(4, (0, _Encodefs.Auto_generateBoxedEncoder_437914C6)(_Reflection.obj_type, undefined, undefined, undefined)(input));
1278
+ return (0, _Result.Result_ToOption)((0, _Decodefs.fromString)((0, _Util.uncurry2)((0, _Decodefs.Auto_generateBoxedDecoder_Z6670B51)(ValuesTypes_DynamicFormResultDataTS_$reflection(), undefined, undefined)), stringified));
1279
+ }
1280
+ function ValuesValidators_validateAndConvertDynamicFormResultData(input) {
1281
+ const matchValue = ValuesValidators_validateDynamicFormResultData(input);
1282
+ if (matchValue == null) {
1283
+ return undefined;
1284
+ } else {
1285
+ return ValuesConverters_dynamicFormResultDataFromTS((0, _Option.value)(matchValue));
1286
+ }
1287
+ }
1288
+ function ValuesValidators_validateDynamicForm(input) {
1289
+ const stringified = (0, _Encodefs.toString)(4, (0, _Encodefs.Auto_generateBoxedEncoder_437914C6)(_Reflection.obj_type, undefined, undefined, undefined)(input));
1290
+ return (0, _Result.Result_ToOption)((0, _Decodefs.fromString)((0, _Util.uncurry2)((0, _Decodefs.Auto_generateBoxedDecoder_Z6670B51)(ValuesTypes_DynamicFormTS_$reflection(), undefined, undefined)), stringified));
1291
+ }
1292
+ function ValuesValidators_validateFieldAnswer(input) {
1293
+ const stringified = (0, _Encodefs.toString)(4, (0, _Encodefs.Auto_generateBoxedEncoder_437914C6)(_Reflection.obj_type, undefined, undefined, undefined)(input));
1294
+ return (0, _Result.Result_ToOption)((0, _Decodefs.fromString)((0, _Util.uncurry2)((0, _Decodefs.Auto_generateBoxedDecoder_Z6670B51)(ValuesTypes_FieldAnswerTS_$reflection(), undefined, undefined)), stringified));
1295
+ }
1296
+ function ValuesValidators_validateFieldValue(input) {
1297
+ const stringified = (0, _Encodefs.toString)(4, (0, _Encodefs.Auto_generateBoxedEncoder_437914C6)(_Reflection.obj_type, undefined, undefined, undefined)(input));
1298
+ return (0, _Result.Result_ToOption)((0, _Decodefs.fromString)((0, _Util.uncurry2)((0, _Decodefs.Auto_generateBoxedDecoder_Z6670B51)(ValuesTypes_FieldValueTS_$reflection(), undefined, undefined)), stringified));
1299
+ }
1300
+ function ValuesBuilders_createFieldAnswer(fieldKey, description, value) {
1301
+ return new ValuesTypes_FieldAnswerTS(fieldKey, description, value);
1302
+ }
1303
+ function ValuesBuilders_createSingleFieldValue(answer) {
1304
+ return new ValuesTypes_FieldValueTS("Single", answer, undefined, undefined);
1305
+ }
1306
+ function ValuesBuilders_createMultipleFieldValue(answers) {
1307
+ return new ValuesTypes_FieldValueTS("Multiple", undefined, answers, undefined);
1308
+ }
1309
+ function ValuesBuilders_createMatrixFieldValue(answer) {
1310
+ return new ValuesTypes_FieldValueTS("Matrix", undefined, undefined, answer);
1311
+ }
1312
+ function ValuesBuilders_createPendingStatus() {
1313
+ return new ValuesTypes_FormStatusTS("Pending", undefined);
1314
+ }
1315
+ function ValuesBuilders_createDraftStatus(draftId) {
1316
+ return new ValuesTypes_FormStatusTS("Draft", draftId);
1317
+ }
1318
+ function ValuesBuilders_createCompleteStatus() {
1319
+ return new ValuesTypes_FormStatusTS("Complete", undefined);
1320
+ }
1321
+ function ValuesApi_validateDynamicFormResultData() {
1322
+ return ValuesValidators_validateDynamicFormResultData;
1323
+ }
1324
+ function ValuesApi_validateAndConvertDynamicFormResultData() {
1325
+ return ValuesValidators_validateAndConvertDynamicFormResultData;
1326
+ }
1327
+ function ValuesApi_validateDynamicForm() {
1328
+ return ValuesValidators_validateDynamicForm;
1329
+ }
1330
+ function ValuesApi_validateFieldAnswer() {
1331
+ return ValuesValidators_validateFieldAnswer;
1332
+ }
1333
+ function ValuesApi_validateFieldValue() {
1334
+ return ValuesValidators_validateFieldValue;
1335
+ }
1336
+ function ValuesApi_dynamicFormResultDataToTypeScript(data) {
1337
+ return ValuesConverters_dynamicFormResultDataToTS(data);
1338
+ }
1339
+ function ValuesApi_dynamicFormResultDataFromTypeScript(data) {
1340
+ return ValuesConverters_dynamicFormResultDataFromTS(data);
1341
+ }
1342
+ function ValuesApi_dynamicFormToTypeScript(form) {
1343
+ return ValuesConverters_dynamicFormToTS(form);
1344
+ }
1345
+ function ValuesApi_dynamicFormFromTypeScript(form) {
1346
+ return ValuesConverters_dynamicFormFromTS(form);
1347
+ }
1348
+ const ValuesApi_createFieldAnswer = (fieldKey)=>(description)=>(value)=>ValuesBuilders_createFieldAnswer(fieldKey, description, value);
1349
+ const ValuesApi_createSingleFieldValue = ValuesBuilders_createSingleFieldValue;
1350
+ const ValuesApi_createMultipleFieldValue = ValuesBuilders_createMultipleFieldValue;
1351
+ const ValuesApi_createMatrixFieldValue = ValuesBuilders_createMatrixFieldValue;
1352
+ const ValuesApi_createPendingStatus = ValuesBuilders_createPendingStatus;
1353
+ const ValuesApi_createDraftStatus = ValuesBuilders_createDraftStatus;
1354
+ const ValuesApi_createCompleteStatus = ValuesBuilders_createCompleteStatus;
1355
+ function ValuesApi_serializeDynamicFormResultData(data) {
1356
+ return (0, _Encodefs.toString)(2, (0, _Encodefs.Auto_generateBoxedEncoder_437914C6)(ValuesTypes_DynamicFormResultDataTS_$reflection(), undefined, undefined, undefined)(data));
1357
+ }
1358
+ function ValuesApi_deserializeDynamicFormResultData(json) {
1359
+ const matchValue = (0, _Decodefs.fromString)((0, _Util.uncurry2)((0, _Decodefs.Auto_generateBoxedDecoder_Z6670B51)(ValuesTypes_DynamicFormResultDataTS_$reflection(), undefined, undefined)), json);
1360
+ if (matchValue.tag === /* Error */ 1) {
1361
+ return undefined;
1362
+ } else {
1363
+ return matchValue.fields[0];
1364
+ }
1365
+ } //# sourceMappingURL=FormSpec.Values.Api.Option.ts.map
1366
+
1367
+ //# sourceMappingURL=FormSpec.Values.Api.Option.js.map