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