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