@f1studio/form-spec 5.0.0-alpha.128 → 5.0.0-alpha.130
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/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.d.ts +1 -1
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.d.ts +1 -1
- package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.d.ts.map +1 -1
- package/FormSpec.FS/Interop/FormSpec.Api.Helpers.d.ts +3 -3
- package/FormSpec.FS/Interop/FormSpec.Api.Helpers.d.ts.map +1 -1
- package/FormSpec.FS/Interop/FormSpec.Api.Option.d.ts.map +1 -1
- package/FormSpec.FS/Interop/FormSpec.Values.Api.Option.d.ts.map +1 -1
- package/FormSpec.FS/Migrator.d.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/BlueprintValidation.js +2 -2
- package/FormSpec.TS/FormSpec.FS/BlueprintValidation.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/BlueprintValidation.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/FormSpecHelpers.js +2 -2
- package/FormSpec.TS/FormSpec.FS/FormSpecHelpers.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/FormSpecHelpers.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js +2 -2
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js +31 -20
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.js +20 -20
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.js +21 -21
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.js +109 -41
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Helpers.js +218 -53
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Helpers.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Helpers.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Option.js +15 -8
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Option.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Option.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Values.Api.Option.js +18 -12
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Values.Api.Option.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Values.Api.Option.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Migrator.js +4 -2
- package/FormSpec.TS/FormSpec.FS/Migrator.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Migrator.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/PathwayExecutor.js +4 -4
- package/FormSpec.TS/FormSpec.FS/PathwayExecutor.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/PathwayExecutor.ts.map +1 -1
- package/FormSpec.TS/{fable_modules/Thoth.Json.10.4.1/Decode.fs.js → Thoth.Json/packages/Thoth.Json/Decode.js} +120 -113
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Decode.js.map +1 -0
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Decode.ts.map +1 -0
- package/FormSpec.TS/{fable_modules/Thoth.Json.10.4.1/Encode.fs.js → Thoth.Json/packages/Thoth.Json/Encode.js} +7 -7
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Encode.js.map +1 -0
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Encode.ts.map +1 -0
- package/FormSpec.TS/{fable_modules/Thoth.Json.10.4.1/Extra.fs.js → Thoth.Json/packages/Thoth.Json/Extra.js} +4 -4
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Extra.js.map +1 -0
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Extra.ts.map +1 -0
- package/FormSpec.TS/{fable_modules/Thoth.Json.10.4.1/Types.fs.js → Thoth.Json/packages/Thoth.Json/Types.js} +2 -2
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Types.js.map +1 -0
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Types.ts.map +1 -0
- package/FormSpec.TS/fable_modules/project_cracked.json +1 -1
- package/README.md +7 -7
- package/{fable_modules/Thoth.Json.10.4.1/Decode.fs.d.ts → Thoth.Json/packages/Thoth.Json/Decode.d.ts} +2 -2
- package/Thoth.Json/packages/Thoth.Json/Decode.d.ts.map +1 -0
- package/{fable_modules/Thoth.Json.10.4.1/Encode.fs.d.ts → Thoth.Json/packages/Thoth.Json/Encode.d.ts} +2 -2
- package/Thoth.Json/packages/Thoth.Json/Encode.d.ts.map +1 -0
- package/Thoth.Json/packages/Thoth.Json/Extra.d.ts +3 -0
- package/Thoth.Json/packages/Thoth.Json/Extra.d.ts.map +1 -0
- package/{fable_modules/Thoth.Json.10.4.1/Types.fs.d.ts → Thoth.Json/packages/Thoth.Json/Types.d.ts} +1 -1
- package/Thoth.Json/packages/Thoth.Json/Types.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/FormSpec.FS/BlueprintValidation.ts +1 -1
- package/src/FormSpec.FS/FormSpecHelpers.ts +1 -1
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.ts +1 -1
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.ts +29 -18
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.ts +4 -4
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.ts +3 -3
- package/src/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.ts +100 -17
- package/src/FormSpec.FS/Interop/FormSpec.Api.Helpers.ts +191 -64
- package/src/FormSpec.FS/Interop/FormSpec.Api.Option.ts +14 -7
- package/src/FormSpec.FS/Interop/FormSpec.Values.Api.Option.ts +17 -11
- package/src/FormSpec.FS/Migrator.ts +4 -2
- package/src/FormSpec.FS/PathwayExecutor.ts +1 -1
- package/src/Thoth.Json/packages/Thoth.Json/Decode.ts +1940 -0
- package/src/Thoth.Json/packages/Thoth.Json/Encode.ts +475 -0
- package/src/Thoth.Json/packages/Thoth.Json/Extra.ts +11 -0
- package/src/Thoth.Json/packages/Thoth.Json/Types.ts +176 -0
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Decode.fs +0 -1768
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Decode.fs.js.map +0 -1
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Decode.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs +0 -811
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs.js.map +0 -1
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Extra.fs +0 -47
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Extra.fs.js.map +0 -1
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Extra.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Thoth.Json.fableproj +0 -34
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Types.fs +0 -68
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Types.fs.js.map +0 -1
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Types.fs.ts.map +0 -1
- package/fable_modules/Thoth.Json.10.4.1/Decode.fs.d.ts.map +0 -1
- package/fable_modules/Thoth.Json.10.4.1/Encode.fs.d.ts.map +0 -1
- package/fable_modules/Thoth.Json.10.4.1/Extra.fs.d.ts +0 -3
- package/fable_modules/Thoth.Json.10.4.1/Extra.fs.d.ts.map +0 -1
- package/fable_modules/Thoth.Json.10.4.1/Types.fs.d.ts.map +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { value as
|
|
2
|
-
import { toArray as toArray_1, length as length_1, tryPick, filter, mapIndexed as mapIndexed_1, isEmpty,
|
|
3
|
-
import { isNullOrEmpty, join, printf, toConsole } from "@fable-org/fable-library-js/String.js";
|
|
4
|
-
import { Auto_generateBoxedEncoder_437914C6, toString } from "../../
|
|
5
|
-
import {
|
|
6
|
-
import { Auto_generateBoxedDecoder_Z6670B51, fromString } from "../../
|
|
1
|
+
import { map, unwrap, value as value_19, orElseWith, orElse, defaultArgWith as defaultArgWith_1, Option, defaultArg as defaultArg_1 } from "@fable-org/fable-library-js/Option.js";
|
|
2
|
+
import { toArray as toArray_1, length as length_1, tryPick, filter, mapIndexed as mapIndexed_1, isEmpty, map as map_3, empty, ofArray as ofArray_1, ofSeq, fold, singleton, collect, tryFind, FSharpList } from "@fable-org/fable-library-js/List.js";
|
|
3
|
+
import { toText, isNullOrEmpty, join, isNullOrWhiteSpace, printf, toConsole } from "@fable-org/fable-library-js/String.js";
|
|
4
|
+
import { Auto_generateBoxedEncoder_437914C6, toString } from "../../Thoth.Json/packages/Thoth.Json/Encode.js";
|
|
5
|
+
import { Spec_SingleChoiceInfo, Spec_ClinicalInstrumentInfo, Spec_FormClassification_$union, ClinicalPathway_StateType_$union, ClinicalPathway_TaskPriority_$union, ClinicalPathway_AlertSeverity_$union, ClinicalPathway_ReferralUrgency_$union, ClinicalPathway_ActionInfo_$union, ClinicalPathway_NavigateToFormAction, ClinicalPathway_ProblemAction, ClinicalPathway_AlertAction, ClinicalPathway_EducationAction, ClinicalPathway_ProcedureAction, ClinicalPathway_TestAction, ClinicalPathway_DocumentationAction, ClinicalPathway_FieldValueSource_$union, ClinicalPathway_SetFieldValueAction, ClinicalPathway_PrescriptionAction, ClinicalPathway_MedicationAction, ClinicalPathway_ReferralAction, Shared_FieldValue, Shared_FieldValue_$union, ClinicalPathway_ClinicalPathwaySpec, ClinicalPathway_PathRequirement, ClinicalPathway_ConstraintDefinition, ClinicalPathway_PathwayExecutionMode_SinglePathway, ClinicalPathway_SinglePathwayConfig, ClinicalPathway_SelectionStrategy_HighestPriority, ClinicalPathway_TransitionDefinition, ClinicalPathway_TransitionCondition_FieldCondition, Shared_ConditionValue_Single, ClinicalPathway_FieldEvaluator_Equals, Shared_TransitionKey, ClinicalPathway_StateType_Terminal, ClinicalPathway_TerminalInfo, ClinicalPathway_StateDefinition, ClinicalPathway_StateType_Action, ClinicalPathway_ActionInfo_Task, ClinicalPathway_TaskAction, ClinicalPathway_DueDate_Today, ClinicalPathway_TaskPriority_Medium, ClinicalPathway_TaskPriority_Low, ClinicalPathway_TaskPriority_High, Shared_StateKey, Spec_FieldType_PluginField, Spec_PluginFieldConfig, Spec_FieldType_Matrix, Spec_MatrixInfo, Spec_FormClassification_General, Spec_FormLifecycle_Blueprint, Spec_FieldType_Text, Spec_TextInfo, Spec_FieldType_CheckboxList, Spec_MultiChoiceInfo, Shared_FieldOptionKey, Spec_FieldType_Checkbox, Spec_BooleanInfo, Shared_FieldKey, Shared_FieldOption, Shared_FieldValue_Single, Shared_FieldValue_PluginData, Shared_PluginDataProperty, Shared_PluginPropertyKey, Shared_FieldValue_Matrix, Shared_MatrixAnswer, Shared_MatrixItemKey, Shared_FieldValue_Multiple, Shared_FieldAnswer, Spec_FormStep$1, Spec_FormField$1, Spec_FieldType_$union, Spec_FormSpec$1, Spec_FormSpec$1_$reflection, Spec_FieldType_$reflection } from "../FormSpec.js";
|
|
6
|
+
import { Auto_generateBoxedDecoder_Z6670B51, fromString } from "../../Thoth.Json/packages/Thoth.Json/Decode.js";
|
|
7
7
|
import { comparePrimitives, defaultOf, equals, createObj, stringHash, compare, IDisposable, disposeSafe, IEnumerator, getEnumerator, IMap, isArrayLike, uncurry2 } from "@fable-org/fable-library-js/Util.js";
|
|
8
|
-
import { Spec_ClinicalInstrumentInfo, Spec_FormClassification_$union, ClinicalPathway_StateType_$union, ClinicalPathway_TaskPriority_$union, ClinicalPathway_AlertSeverity_$union, ClinicalPathway_ReferralUrgency_$union, ClinicalPathway_ActionInfo_$union, ClinicalPathway_NavigateToFormAction, ClinicalPathway_ProblemAction, ClinicalPathway_AlertAction, ClinicalPathway_EducationAction, ClinicalPathway_ProcedureAction, ClinicalPathway_TestAction, ClinicalPathway_DocumentationAction, ClinicalPathway_FieldValueSource_$union, ClinicalPathway_SetFieldValueAction, ClinicalPathway_PrescriptionAction, ClinicalPathway_MedicationAction, ClinicalPathway_ReferralAction, Shared_FieldValue, Shared_FieldValue_$union, ClinicalPathway_ClinicalPathwaySpec, ClinicalPathway_PathRequirement, ClinicalPathway_ConstraintDefinition, ClinicalPathway_PathwayExecutionMode_SinglePathway, ClinicalPathway_SinglePathwayConfig, ClinicalPathway_SelectionStrategy_HighestPriority, ClinicalPathway_TransitionDefinition, ClinicalPathway_TransitionCondition_FieldCondition, Shared_ConditionValue_Single, ClinicalPathway_FieldEvaluator_Equals, Shared_TransitionKey, ClinicalPathway_StateType_Terminal, ClinicalPathway_TerminalInfo, ClinicalPathway_StateDefinition, ClinicalPathway_StateType_Action, ClinicalPathway_ActionInfo_Task, ClinicalPathway_TaskAction, ClinicalPathway_DueDate_Today, ClinicalPathway_TaskPriority_Medium, ClinicalPathway_TaskPriority_Low, ClinicalPathway_TaskPriority_High, Shared_StateKey, Spec_FieldType_PluginField, Spec_PluginFieldConfig, Spec_FieldType_Matrix, Spec_MatrixInfo, Spec_FormClassification_General, Spec_FormLifecycle_Blueprint, Spec_FieldType_Text, Spec_TextInfo, Spec_FieldType_CheckboxList, Spec_MultiChoiceInfo, Shared_FieldOptionKey, Spec_FieldType_Checkbox, Spec_BooleanInfo, Shared_FieldKey, Shared_FieldOption, Shared_FieldValue_Single, Shared_FieldValue_PluginData, Shared_PluginDataProperty, Shared_PluginPropertyKey, Shared_FieldValue_Matrix, Shared_MatrixAnswer, Shared_MatrixItemKey, Shared_FieldValue_Multiple, Shared_FieldAnswer, Spec_FormStep$1, Spec_FormField$1, Spec_FieldType_$union, Spec_FormSpec$1, Spec_FormSpec$1_$reflection, Spec_FieldType_$reflection } from "../FormSpec.js";
|
|
9
8
|
import { FSharpResult$2_Ok, FSharpResult$2_Error, FSharpResult$2_$union } from "@fable-org/fable-library-js/Result.js";
|
|
10
9
|
import { newGuid, parse, tryParse } from "@fable-org/fable-library-js/Guid.js";
|
|
11
10
|
import { Union, FSharpRef } from "@fable-org/fable-library-js/Types.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
11
|
+
import { array_type, obj_type, string_type, union_type, TypeInfo } from "@fable-org/fable-library-js/Reflection.js";
|
|
12
|
+
import { array as array_7, at, IOptionalGetter, IGetters, dict as dict_1, string, IRequiredGetter, object, fromString as fromString_1 } from "../../Thoth.Json/packages/Thoth.Json/Decode.js";
|
|
13
|
+
import { ErrorReason_$union } from "../../Thoth.Json/packages/Thoth.Json/Types.js";
|
|
14
14
|
import { tryFind as tryFind_1, empty as empty_2, count, ofSeq as ofSeq_1, toList, FSharpMap } from "@fable-org/fable-library-js/Map.js";
|
|
15
15
|
import { addToDict } from "@fable-org/fable-library-js/MapUtil.js";
|
|
16
16
|
import { int32 } from "@fable-org/fable-library-js/Int32.js";
|
|
17
17
|
import { getFieldDetails as getFieldDetails_1, FieldDetails$1, findStepIndexForField, updateField } from "../FormSpecValues.js";
|
|
18
18
|
import { length, singleton as singleton_1, empty as empty_1, collect as collect_1, delay, toList as toList_1, mapIndexed, map as map_2, choose } from "@fable-org/fable-library-js/Seq.js";
|
|
19
19
|
import { toArray, ofArray } from "@fable-org/fable-library-js/Set.js";
|
|
20
|
-
import { tryFind as tryFind_2, map as map_1 } from "@fable-org/fable-library-js/Array.js";
|
|
20
|
+
import { tryFind as tryFind_2, append, map as map_1 } from "@fable-org/fable-library-js/Array.js";
|
|
21
21
|
import { now } from "@fable-org/fable-library-js/DateOffset.js";
|
|
22
22
|
import { initializeExecution } from "../PathwayExecutor.js";
|
|
23
23
|
import { List_distinct, distinct } from "@fable-org/fable-library-js/Seq2.js";
|
|
@@ -74,15 +74,17 @@ export function normalizeFormValuesForPlatformApi(formValues: any): any {
|
|
|
74
74
|
return formValues;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
export function serializeFormSpec(formSpec:
|
|
77
|
+
export function serializeFormSpec(formSpec: Spec_FormSpec$1<Spec_FieldType_$union>): string {
|
|
78
78
|
toConsole(printf("[API.Helpers] Serializing FormSpec!!"));
|
|
79
|
-
toConsole(`[API.Helpers] FormSpec: ${formSpec}`);
|
|
80
|
-
return toString(0, Auto_generateBoxedEncoder_437914C6(
|
|
79
|
+
toConsole(`[API.Helpers] FormSpec: ${formSpec.Title}`);
|
|
80
|
+
return toString(0, Auto_generateBoxedEncoder_437914C6(Spec_FormSpec$1_$reflection(Spec_FieldType_$reflection()), undefined, undefined, undefined)(formSpec));
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
export function deserializeFormSpec(json: string): Option<Spec_FormSpec$1<Spec_FieldType_$union>> {
|
|
84
84
|
toConsole(printf("[API.Helpers] Deserializing FormSpec"));
|
|
85
|
-
const matchValue: FSharpResult$2_$union<Spec_FormSpec$1<Spec_FieldType_$union>, string> = fromString<Spec_FormSpec$1<Spec_FieldType_$union>>(uncurry2(
|
|
85
|
+
const matchValue: FSharpResult$2_$union<Spec_FormSpec$1<Spec_FieldType_$union>, string> = fromString<Spec_FormSpec$1<Spec_FieldType_$union>>(uncurry2(((() => {
|
|
86
|
+
throw new Error("🚀 LIBERATION FORK CONFIRMED: generateDecoder entry point reached!");
|
|
87
|
+
})(), Auto_generateBoxedDecoder_Z6670B51(Spec_FormSpec$1_$reflection(Spec_FieldType_$reflection()), undefined, undefined))), json);
|
|
86
88
|
if (matchValue.tag === /* Error */ 1) {
|
|
87
89
|
throw new Error(`[API.Helpers] Deserialization failed: ${matchValue.fields[0]}`);
|
|
88
90
|
}
|
|
@@ -204,9 +206,9 @@ export function getExpectedFieldValueType(fieldType: Spec_FieldType_$union): Exp
|
|
|
204
206
|
}
|
|
205
207
|
|
|
206
208
|
export function decodeAsString(fieldKey: string, obj: any): string {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
209
|
+
const matchValue: FSharpResult$2_$union<string, string> = fromString<string>(uncurry2(((() => {
|
|
210
|
+
throw new Error("🚀 LIBERATION FORK CONFIRMED: generateDecoder entry point reached!");
|
|
211
|
+
})(), Auto_generateBoxedDecoder_Z6670B51(string_type, undefined, undefined))), toString(0, Auto_generateBoxedEncoder_437914C6(obj_type, undefined, undefined, undefined)(obj)));
|
|
210
212
|
if (matchValue.tag === /* Error */ 1) {
|
|
211
213
|
if (typeof obj === "string") {
|
|
212
214
|
const str = obj as string;
|
|
@@ -234,9 +236,9 @@ export function decodeAsStringArray(fieldKey: string, obj: any): string[] {
|
|
|
234
236
|
}
|
|
235
237
|
else {
|
|
236
238
|
try {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
239
|
+
const matchValue: FSharpResult$2_$union<string[], string> = fromString<string[]>(uncurry2(((() => {
|
|
240
|
+
throw new Error("🚀 LIBERATION FORK CONFIRMED: generateDecoder entry point reached!");
|
|
241
|
+
})(), Auto_generateBoxedDecoder_Z6670B51(array_type(string_type), undefined, undefined))), toString(0, Auto_generateBoxedEncoder_437914C6(obj_type, undefined, undefined, undefined)(obj)));
|
|
240
242
|
if (matchValue.tag === /* Error */ 1) {
|
|
241
243
|
throw new Error(`Field ${fieldKey}: Expected string array, got ${"Object"}`);
|
|
242
244
|
}
|
|
@@ -329,40 +331,57 @@ export function decodeAsMatrixValue(fieldKey: string, obj: any): { description:
|
|
|
329
331
|
}
|
|
330
332
|
}
|
|
331
333
|
|
|
334
|
+
function decodePropertyKey(get$: IGetters): string {
|
|
335
|
+
let objectArg: IOptionalGetter, objectArg_2: IOptionalGetter;
|
|
336
|
+
const matchValue: Option<string> = orElse(orElseWith<string>((objectArg = get$.Optional, objectArg.Field<string>("PropertyKey", string)), (): Option<string> => {
|
|
337
|
+
const objectArg_1: IOptionalGetter = get$.Optional;
|
|
338
|
+
return objectArg_1.Field<string>("propertyKey", string);
|
|
339
|
+
}), orElseWith<string>((objectArg_2 = get$.Optional, objectArg_2.Field<string>("PropertyKey", (firstPath: string, firstValue: any): FSharpResult$2_$union<string, [string, ErrorReason_$union]> => at<string>(singleton("Value"), string, firstPath, firstValue))), (): Option<string> => {
|
|
340
|
+
const objectArg_3: IOptionalGetter = get$.Optional;
|
|
341
|
+
return objectArg_3.Field<string>("propertyKey", (firstPath_1: string, firstValue_1: any): FSharpResult$2_$union<string, [string, ErrorReason_$union]> => at<string>(singleton("Value"), string, firstPath_1, firstValue_1));
|
|
342
|
+
}));
|
|
343
|
+
let matchResult: int32, s_1: string;
|
|
344
|
+
if (matchValue != null) {
|
|
345
|
+
if (!isNullOrWhiteSpace(value_19(matchValue))) {
|
|
346
|
+
matchResult = 0;
|
|
347
|
+
s_1 = value_19(matchValue);
|
|
348
|
+
}
|
|
349
|
+
else {
|
|
350
|
+
matchResult = 1;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
matchResult = 1;
|
|
355
|
+
}
|
|
356
|
+
switch (matchResult) {
|
|
357
|
+
case 0:
|
|
358
|
+
return parse(s_1!);
|
|
359
|
+
default:
|
|
360
|
+
return newGuid();
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
332
364
|
export function decodeAsPluginDataArray(fieldKey: string, obj: any): { dataType: string, description?: string, displayName?: string, name: string, propertyKey: string, unit?: string, value: string }[] {
|
|
333
365
|
let str: string;
|
|
334
366
|
const objAsString: string = (typeof obj === "string") ? ((str = (obj as string), str)) : toString(0, Auto_generateBoxedEncoder_437914C6(obj_type, undefined, undefined, undefined)(obj));
|
|
335
367
|
try {
|
|
336
|
-
const matchValue: FSharpResult$2_$union<{ dataType: string, description?: string, displayName?: string, name: string, propertyKey: string, unit?: string, value: string }[], string> = fromString_1<{ dataType: string, description?: string, displayName?: string, name: string, propertyKey: string, unit?: string, value: string }[]>((
|
|
337
|
-
let objectArg_6: IOptionalGetter;
|
|
338
|
-
|
|
339
|
-
const
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
const
|
|
343
|
-
name = objectArg_1.Field<string>("name", string);
|
|
344
|
-
let dataType: string;
|
|
345
|
-
const objectArg_2: IRequiredGetter = get$.Required;
|
|
346
|
-
dataType = objectArg_2.Field<string>("dataType", string);
|
|
347
|
-
let value_6: string;
|
|
348
|
-
const objectArg_3: IRequiredGetter = get$.Required;
|
|
349
|
-
value_6 = objectArg_3.Field<string>("value", string);
|
|
350
|
-
let displayName: Option<string>;
|
|
351
|
-
const objectArg_4: IOptionalGetter = get$.Optional;
|
|
352
|
-
displayName = objectArg_4.Field<string>("displayName", string);
|
|
353
|
-
let unit: Option<string>;
|
|
354
|
-
const objectArg_5: IOptionalGetter = get$.Optional;
|
|
355
|
-
unit = objectArg_5.Field<string>("unit", string);
|
|
368
|
+
const matchValue: FSharpResult$2_$union<{ dataType: string, description?: string, displayName?: string, name: string, propertyKey: string, unit?: string, value: string }[], string> = fromString_1<{ dataType: string, description?: string, displayName?: string, name: string, propertyKey: string, unit?: string, value: string }[]>((path_13: string, value_18: any): FSharpResult$2_$union<{ dataType: string, description?: string, displayName?: string, name: string, propertyKey: string, unit?: string, value: string }[], [string, ErrorReason_$union]> => array_7<{ dataType: string, description?: string, displayName?: string, name: string, propertyKey: string, unit?: string, value: string }>((path_12: string, v: any): FSharpResult$2_$union<{ dataType: string, description?: string, displayName?: string, name: string, propertyKey: string, unit?: string, value: string }, [string, ErrorReason_$union]> => object<{ dataType: string, description?: string, displayName?: string, name: string, propertyKey: string, unit?: string, value: string }>((get$: IGetters): { dataType: string, description?: string, displayName?: string, name: string, propertyKey: string, unit?: string, value: string } => {
|
|
369
|
+
let objectArg: IOptionalGetter, objectArg_1: IOptionalGetter, objectArg_2: IOptionalGetter, objectArg_3: IOptionalGetter, objectArg_4: IOptionalGetter, objectArg_5: IOptionalGetter, objectArg_6: IOptionalGetter, objectArg_7: IOptionalGetter, objectArg_8: IOptionalGetter, objectArg_9: IOptionalGetter, objectArg_10: IOptionalGetter, objectArg_11: IOptionalGetter;
|
|
370
|
+
const name: string = defaultArg_1(orElse((objectArg = get$.Optional, objectArg.Field<string>("Name", string)), (objectArg_1 = get$.Optional, objectArg_1.Field<string>("name", string))), "");
|
|
371
|
+
const dataType: string = defaultArg_1(orElse((objectArg_2 = get$.Optional, objectArg_2.Field<string>("DataType", string)), (objectArg_3 = get$.Optional, objectArg_3.Field<string>("dataType", string))), "string");
|
|
372
|
+
const value_11: string = defaultArg_1(orElse((objectArg_4 = get$.Optional, objectArg_4.Field<string>("Value", string)), (objectArg_5 = get$.Optional, objectArg_5.Field<string>("value", string))), "");
|
|
373
|
+
const displayName: Option<string> = orElse((objectArg_6 = get$.Optional, objectArg_6.Field<string>("DisplayName", string)), (objectArg_7 = get$.Optional, objectArg_7.Field<string>("displayName", string)));
|
|
374
|
+
const unitVal: Option<string> = orElse((objectArg_8 = get$.Optional, objectArg_8.Field<string>("Unit", string)), (objectArg_9 = get$.Optional, objectArg_9.Field<string>("unit", string)));
|
|
356
375
|
return {
|
|
357
376
|
dataType: dataType,
|
|
358
|
-
description: unwrap((
|
|
377
|
+
description: unwrap(orElse((objectArg_10 = get$.Optional, objectArg_10.Field<string>("Description", string)), (objectArg_11 = get$.Optional, objectArg_11.Field<string>("description", string)))),
|
|
359
378
|
displayName: unwrap(displayName),
|
|
360
379
|
name: name,
|
|
361
|
-
propertyKey:
|
|
362
|
-
unit: unwrap(
|
|
363
|
-
value:
|
|
380
|
+
propertyKey: decodePropertyKey(get$),
|
|
381
|
+
unit: unwrap(unitVal),
|
|
382
|
+
value: value_11,
|
|
364
383
|
};
|
|
365
|
-
},
|
|
384
|
+
}, path_12, v), path_13, value_18), objAsString);
|
|
366
385
|
if (matchValue.tag === /* Error */ 1) {
|
|
367
386
|
throw new Error(`Field ${fieldKey}: Invalid plugin data format - ${matchValue.fields[0]}`);
|
|
368
387
|
}
|
|
@@ -398,7 +417,7 @@ export function buildFormSpecWithValues(formSpec: Spec_FormSpec$1<Spec_FieldType
|
|
|
398
417
|
return undefined;
|
|
399
418
|
}
|
|
400
419
|
else {
|
|
401
|
-
const field: Spec_FormField$1<Spec_FieldType_$union> =
|
|
420
|
+
const field: Spec_FormField$1<Spec_FieldType_$union> = value_19(matchValue);
|
|
402
421
|
try {
|
|
403
422
|
return [field, new FieldDetails$1(field.FieldOrder, field.FieldKey, field.Label, (matchValue_1 = getExpectedFieldValueType(field.FieldType), (matchValue_1.tag === /* MultipleValues */ 1) ? Shared_FieldValue_Multiple(ofArray<Shared_FieldAnswer>(map_1<string, Shared_FieldAnswer>((value: string): Shared_FieldAnswer => (new Shared_FieldAnswer(field.FieldKey, field.Label, value)), decodeAsStringArray(input.fieldKey, input.objectValue)), {
|
|
404
423
|
Compare: compare,
|
|
@@ -484,7 +503,7 @@ export function createPluginField(fieldKeyString: string, label: string, config:
|
|
|
484
503
|
* TypeScript: createActionState(stateKey: string, label: string, taskDescription: string, priority?: string)
|
|
485
504
|
*/
|
|
486
505
|
export function createActionState(stateKeyString: string, label: string, taskDescription: string, priority: Option<string>): ClinicalPathway_StateDefinition {
|
|
487
|
-
return new ClinicalPathway_StateDefinition(new Shared_StateKey(parse(stateKeyString)), label, 1, ClinicalPathway_StateType_Action(ClinicalPathway_ActionInfo_Task(new ClinicalPathway_TaskAction("Clinical", taskDescription, (priority != null) ? ((
|
|
506
|
+
return new ClinicalPathway_StateDefinition(new Shared_StateKey(parse(stateKeyString)), label, 1, ClinicalPathway_StateType_Action(ClinicalPathway_ActionInfo_Task(new ClinicalPathway_TaskAction("Clinical", taskDescription, (priority != null) ? ((value_19(priority) === "High") ? ClinicalPathway_TaskPriority_High() : ((value_19(priority) === "Low") ? ClinicalPathway_TaskPriority_Low() : ClinicalPathway_TaskPriority_Medium())) : ClinicalPathway_TaskPriority_Medium(), ClinicalPathway_DueDate_Today(), "Clinical Staff", undefined))), undefined);
|
|
488
507
|
}
|
|
489
508
|
|
|
490
509
|
/**
|
|
@@ -755,12 +774,12 @@ export function getFieldMatrixInfo(field: Spec_FormField$1<Spec_FieldType_$union
|
|
|
755
774
|
items: (collection_2 = map_3<Shared_FieldOption, { key: string, label: string }>((item_1: Shared_FieldOption): { key: string, label: string } => ({
|
|
756
775
|
key: item_1.OptionKey.fields[0],
|
|
757
776
|
label: item_1.Description,
|
|
758
|
-
}),
|
|
777
|
+
}), value_19(config_1!.Items)), Array.from(collection_2)),
|
|
759
778
|
options: (collection_3 = map_3<Shared_FieldOption, { description: string, key: string, value: string }>((opt_1: Shared_FieldOption): { description: string, key: string, value: string } => ({
|
|
760
779
|
description: opt_1.Description,
|
|
761
780
|
key: opt_1.OptionKey.fields[0],
|
|
762
781
|
value: opt_1.Value,
|
|
763
|
-
}),
|
|
782
|
+
}), value_19(config_1!.Options)), Array.from(collection_3)),
|
|
764
783
|
};
|
|
765
784
|
default:
|
|
766
785
|
return undefined;
|
|
@@ -777,15 +796,15 @@ export function getFieldMatrixInfoFromValue(field: Spec_FormField$1<Spec_FieldTy
|
|
|
777
796
|
const matchValue: Option<Shared_FieldValue_$union> = field.Value;
|
|
778
797
|
let matchResult: int32, ma: Shared_MatrixAnswer, props: FSharpList<Shared_PluginDataProperty>;
|
|
779
798
|
if (matchValue != null) {
|
|
780
|
-
switch (
|
|
799
|
+
switch (value_19(matchValue).tag) {
|
|
781
800
|
case /* Matrix */ 2: {
|
|
782
801
|
matchResult = 0;
|
|
783
|
-
ma = (
|
|
802
|
+
ma = (value_19(matchValue) as Shared_FieldValue<2>).fields[0];
|
|
784
803
|
break;
|
|
785
804
|
}
|
|
786
805
|
case /* PluginData */ 3: {
|
|
787
806
|
matchResult = 1;
|
|
788
|
-
props = (
|
|
807
|
+
props = (value_19(matchValue) as Shared_FieldValue<3>).fields[0];
|
|
789
808
|
break;
|
|
790
809
|
}
|
|
791
810
|
default:
|
|
@@ -875,7 +894,7 @@ export function extractFormValuesFromFormSpec(spec: Spec_FormSpec$1<Spec_FieldTy
|
|
|
875
894
|
return empty_1<[string, any]>();
|
|
876
895
|
}
|
|
877
896
|
else {
|
|
878
|
-
const fv: Shared_FieldValue_$union =
|
|
897
|
+
const fv: Shared_FieldValue_$union = value_19(matchValue);
|
|
879
898
|
return singleton_1<[string, any]>([getFieldKeyString(field.FieldKey), (fv.tag === /* Multiple */ 1) ? ((arr = map_1<Shared_FieldAnswer, string>((fa_1: Shared_FieldAnswer): string => fa_1.Value, toArray<Shared_FieldAnswer>(fv.fields[0])), Array.from(arr))) : ((fv.tag === /* Matrix */ 2) ? ((ma = fv.fields[0], (dict = (new Map<string, string>([])), ((enumerator = getEnumerator(ma.Values), (() => {
|
|
880
899
|
try {
|
|
881
900
|
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
@@ -1191,7 +1210,7 @@ export function validateAndBuildFormSpec(formSpec: Spec_FormSpec$1<Spec_FieldTyp
|
|
|
1191
1210
|
}));
|
|
1192
1211
|
}
|
|
1193
1212
|
else {
|
|
1194
|
-
const field: Spec_FormField$1<Spec_FieldType_$union> =
|
|
1213
|
+
const field: Spec_FormField$1<Spec_FieldType_$union> = value_19(matchValue);
|
|
1195
1214
|
try {
|
|
1196
1215
|
validFieldCount = ((validFieldCount + 1) | 0);
|
|
1197
1216
|
}
|
|
@@ -1249,7 +1268,7 @@ export function tryEncodeToFormAnswers(provenancePayload: string, filledFormSpec
|
|
|
1249
1268
|
error: result.fields[0],
|
|
1250
1269
|
success: false,
|
|
1251
1270
|
} : {
|
|
1252
|
-
answerCount: (matchValue = result.fields[0].Answers, (matchValue == null) ? 0 : length_1<CoreMRAnswer>(
|
|
1271
|
+
answerCount: (matchValue = result.fields[0].Answers, (matchValue == null) ? 0 : length_1<CoreMRAnswer>(value_19(matchValue))),
|
|
1253
1272
|
error: defaultOf(),
|
|
1254
1273
|
success: true,
|
|
1255
1274
|
};
|
|
@@ -1282,18 +1301,126 @@ export function getFullValidationTelemetry(formSpec: Spec_FormSpec$1<Spec_FieldT
|
|
|
1282
1301
|
const valuesDict: FSharpMap<string, any> = empty_2<string, any>({
|
|
1283
1302
|
Compare: comparePrimitives,
|
|
1284
1303
|
});
|
|
1285
|
-
const fieldTelemetry: { actionHint: string, dataIssues: string[], dataValid: boolean, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }[] = toArray_1<{ actionHint: string, dataIssues: string[], dataValid: boolean, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }>(map_3<Spec_FormField$1<Spec_FieldType_$union>, { actionHint: string, dataIssues: string[], dataValid: boolean, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }>((field: Spec_FormField$1<Spec_FieldType_$union>): { actionHint: string, dataIssues: string[], dataValid: boolean, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean } => {
|
|
1286
|
-
let
|
|
1304
|
+
const fieldTelemetry: { actionHint: string, actualChoices: string[], actualValue: string, dataIssues: string[], dataValid: boolean, expectedChoices: string[], expectedValue: string, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }[] = toArray_1<{ actionHint: string, actualChoices: string[], actualValue: string, dataIssues: string[], dataValid: boolean, expectedChoices: string[], expectedValue: string, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }>(map_3<Spec_FormField$1<Spec_FieldType_$union>, { actionHint: string, actualChoices: string[], actualValue: string, dataIssues: string[], dataValid: boolean, expectedChoices: string[], expectedValue: string, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }>((field: Spec_FormField$1<Spec_FieldType_$union>): { actionHint: string, actualChoices: string[], actualValue: string, dataIssues: string[], dataValid: boolean, expectedChoices: string[], expectedValue: string, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean } => {
|
|
1305
|
+
let matchValue_2: Spec_FieldType_$union;
|
|
1287
1306
|
const fieldKey: string = getFieldKeyString(field.FieldKey);
|
|
1288
1307
|
const fieldLabel: string = isNullOrEmpty(field.Label) ? fieldKey : field.Label;
|
|
1289
1308
|
const fieldTypeInfo: { isRequired: boolean, typeName: string } = getFieldTypeInfo(field);
|
|
1290
|
-
const
|
|
1291
|
-
|
|
1309
|
+
const fieldValue: Option<any> = tryFind_1<string, any>(fieldKey, valuesDict);
|
|
1310
|
+
let patternInput: [boolean, any[], string[], string[]];
|
|
1311
|
+
const matchValue: Spec_FieldType_$union = field.FieldType;
|
|
1312
|
+
let matchResult: int32, info_2: Spec_SingleChoiceInfo;
|
|
1313
|
+
switch (matchValue.tag) {
|
|
1314
|
+
case /* CheckboxList */ 16: {
|
|
1315
|
+
matchResult = 0;
|
|
1316
|
+
break;
|
|
1317
|
+
}
|
|
1318
|
+
case /* Matrix */ 19: {
|
|
1319
|
+
matchResult = 1;
|
|
1320
|
+
break;
|
|
1321
|
+
}
|
|
1322
|
+
case /* Radio */ 12: {
|
|
1323
|
+
matchResult = 2;
|
|
1324
|
+
info_2 = matchValue.fields[0];
|
|
1325
|
+
break;
|
|
1326
|
+
}
|
|
1327
|
+
case /* SingleChoice */ 13: {
|
|
1328
|
+
matchResult = 2;
|
|
1329
|
+
info_2 = matchValue.fields[0];
|
|
1330
|
+
break;
|
|
1331
|
+
}
|
|
1332
|
+
case /* Dropdown */ 14: {
|
|
1333
|
+
matchResult = 2;
|
|
1334
|
+
info_2 = matchValue.fields[0];
|
|
1335
|
+
break;
|
|
1336
|
+
}
|
|
1337
|
+
default:
|
|
1338
|
+
matchResult = 3;
|
|
1339
|
+
}
|
|
1340
|
+
switch (matchResult) {
|
|
1341
|
+
case 0: {
|
|
1342
|
+
const expected: string[] = toArray_1<string>(map_3<Shared_FieldOption, string>((opt: Shared_FieldOption): string => opt.Value, matchValue.fields[0].Options));
|
|
1343
|
+
patternInput = ([true, [], expected, expected] as [boolean, any[], string[], string[]]);
|
|
1344
|
+
break;
|
|
1345
|
+
}
|
|
1346
|
+
case 1: {
|
|
1347
|
+
const info_1: Spec_MatrixInfo = matchValue.fields[0];
|
|
1348
|
+
const expected_1: string[] = append<string>(toArray_1<string>(map_3<Shared_FieldOption, string>((item: Shared_FieldOption): string => item.Value, info_1.Items)), toArray_1<string>(map_3<Shared_FieldOption, string>((opt_1: Shared_FieldOption): string => opt_1.Value, info_1.Options)));
|
|
1349
|
+
patternInput = ([true, [], expected_1, expected_1] as [boolean, any[], string[], string[]]);
|
|
1350
|
+
break;
|
|
1351
|
+
}
|
|
1352
|
+
case 2: {
|
|
1353
|
+
const expected_2: string[] = toArray_1<string>(map_3<Shared_FieldOption, string>((opt_2: Shared_FieldOption): string => opt_2.Value, info_2!.Options));
|
|
1354
|
+
patternInput = ([true, [], expected_2, expected_2] as [boolean, any[], string[], string[]]);
|
|
1355
|
+
break;
|
|
1356
|
+
}
|
|
1357
|
+
default:
|
|
1358
|
+
patternInput = ([true, [], [], []] as [boolean, any[], string[], string[]]);
|
|
1359
|
+
}
|
|
1360
|
+
let patternInput_1: [boolean, string[], string, string];
|
|
1361
|
+
const isRequired: boolean = !field.IsOptional;
|
|
1362
|
+
const hasValue: boolean = fieldValue != null;
|
|
1363
|
+
let expectedValueDesc: string;
|
|
1364
|
+
const matchValue_1: Spec_FieldType_$union = field.FieldType;
|
|
1365
|
+
switch (matchValue_1.tag) {
|
|
1366
|
+
case /* Text */ 0:
|
|
1367
|
+
case /* TextArea */ 1:
|
|
1368
|
+
case /* Email */ 2: {
|
|
1369
|
+
expectedValueDesc = "text";
|
|
1370
|
+
break;
|
|
1371
|
+
}
|
|
1372
|
+
case /* Number */ 6: {
|
|
1373
|
+
expectedValueDesc = "number";
|
|
1374
|
+
break;
|
|
1375
|
+
}
|
|
1376
|
+
case /* Date */ 8: {
|
|
1377
|
+
expectedValueDesc = "date";
|
|
1378
|
+
break;
|
|
1379
|
+
}
|
|
1380
|
+
case /* Checkbox */ 11: {
|
|
1381
|
+
expectedValueDesc = "boolean";
|
|
1382
|
+
break;
|
|
1383
|
+
}
|
|
1384
|
+
case /* Radio */ 12:
|
|
1385
|
+
case /* SingleChoice */ 13:
|
|
1386
|
+
case /* Dropdown */ 14: {
|
|
1387
|
+
expectedValueDesc = "single choice";
|
|
1388
|
+
break;
|
|
1389
|
+
}
|
|
1390
|
+
case /* CheckboxList */ 16:
|
|
1391
|
+
case /* MultiChoice */ 15: {
|
|
1392
|
+
expectedValueDesc = "multiple choices";
|
|
1393
|
+
break;
|
|
1394
|
+
}
|
|
1395
|
+
case /* Matrix */ 19: {
|
|
1396
|
+
expectedValueDesc = "matrix values";
|
|
1397
|
+
break;
|
|
1398
|
+
}
|
|
1399
|
+
case /* Signature */ 20: {
|
|
1400
|
+
expectedValueDesc = "signature";
|
|
1401
|
+
break;
|
|
1402
|
+
}
|
|
1403
|
+
default:
|
|
1404
|
+
expectedValueDesc = "value";
|
|
1405
|
+
}
|
|
1406
|
+
let actualValueDesc: string;
|
|
1407
|
+
if (fieldValue == null) {
|
|
1408
|
+
actualValueDesc = "null";
|
|
1409
|
+
}
|
|
1410
|
+
else {
|
|
1411
|
+
const v: any = value_19(fieldValue);
|
|
1412
|
+
actualValueDesc = toText(printf("present (%A)"))(v);
|
|
1413
|
+
}
|
|
1414
|
+
patternInput_1 = ((isRequired && !hasValue) ? ([false, ["Required field is empty"], expectedValueDesc, actualValueDesc] as [boolean, string[], string, string]) : (hasValue ? ([true, [], expectedValueDesc, actualValueDesc] as [boolean, string[], string, string]) : ([true, [], expectedValueDesc, actualValueDesc] as [boolean, string[], string, string])));
|
|
1292
1415
|
const dataValid: boolean = patternInput_1[0];
|
|
1293
1416
|
return {
|
|
1294
|
-
actionHint: !dataValid ? ((
|
|
1417
|
+
actionHint: !dataValid ? ((matchValue_2 = field.FieldType, (matchValue_2.tag === /* Signature */ 20) ? "Tap to sign" : ((matchValue_2.tag === /* CheckboxList */ 16) ? "Select at least one option" : ((matchValue_2.tag === /* Radio */ 12) ? "Select an option" : ((matchValue_2.tag === /* Text */ 0) ? ("Enter " + fieldLabel) : "Complete this field"))))) : "",
|
|
1418
|
+
actualChoices: patternInput[3],
|
|
1419
|
+
actualValue: patternInput_1[3],
|
|
1295
1420
|
dataIssues: patternInput_1[1],
|
|
1296
1421
|
dataValid: dataValid,
|
|
1422
|
+
expectedChoices: patternInput[2],
|
|
1423
|
+
expectedValue: patternInput_1[2],
|
|
1297
1424
|
fieldKey: fieldKey,
|
|
1298
1425
|
fieldLabel: fieldLabel,
|
|
1299
1426
|
fieldType: fieldTypeInfo.typeName,
|
|
@@ -1304,13 +1431,13 @@ export function getFullValidationTelemetry(formSpec: Spec_FormSpec$1<Spec_FieldT
|
|
|
1304
1431
|
}, collect<Spec_FormStep$1<Spec_FieldType_$union>, Spec_FormField$1<Spec_FieldType_$union>>((step: Spec_FormStep$1<Spec_FieldType_$union>): FSharpList<Spec_FormField$1<Spec_FieldType_$union>> => step.Fields, formSpec.Steps)));
|
|
1305
1432
|
const totalFields: int32 = fieldTelemetry.length | 0;
|
|
1306
1433
|
let validFields: int32;
|
|
1307
|
-
const array_1: { actionHint: string, dataIssues: string[], dataValid: boolean, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }[] = fieldTelemetry.filter((f: { actionHint: string, dataIssues: string[], dataValid: boolean, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }): boolean => f.dataValid);
|
|
1434
|
+
const array_1: { actionHint: string, actualChoices: string[], actualValue: string, dataIssues: string[], dataValid: boolean, expectedChoices: string[], expectedValue: string, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }[] = fieldTelemetry.filter((f: { actionHint: string, actualChoices: string[], actualValue: string, dataIssues: string[], dataValid: boolean, expectedChoices: string[], expectedValue: string, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }): boolean => f.dataValid);
|
|
1308
1435
|
validFields = array_1.length;
|
|
1309
1436
|
let structuralIssues: int32;
|
|
1310
|
-
const array_3: { actionHint: string, dataIssues: string[], dataValid: boolean, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }[] = fieldTelemetry.filter((f_1: { actionHint: string, dataIssues: string[], dataValid: boolean, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }): boolean => !f_1.structureValid);
|
|
1437
|
+
const array_3: { actionHint: string, actualChoices: string[], actualValue: string, dataIssues: string[], dataValid: boolean, expectedChoices: string[], expectedValue: string, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }[] = fieldTelemetry.filter((f_1: { actionHint: string, actualChoices: string[], actualValue: string, dataIssues: string[], dataValid: boolean, expectedChoices: string[], expectedValue: string, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }): boolean => !f_1.structureValid);
|
|
1311
1438
|
structuralIssues = array_3.length;
|
|
1312
1439
|
let dataIssues_1: int32;
|
|
1313
|
-
const array_5: { actionHint: string, dataIssues: string[], dataValid: boolean, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }[] = fieldTelemetry.filter((f_2: { actionHint: string, dataIssues: string[], dataValid: boolean, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }): boolean => !f_2.dataValid);
|
|
1440
|
+
const array_5: { actionHint: string, actualChoices: string[], actualValue: string, dataIssues: string[], dataValid: boolean, expectedChoices: string[], expectedValue: string, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }[] = fieldTelemetry.filter((f_2: { actionHint: string, actualChoices: string[], actualValue: string, dataIssues: string[], dataValid: boolean, expectedChoices: string[], expectedValue: string, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }): boolean => !f_2.dataValid);
|
|
1314
1441
|
dataIssues_1 = array_5.length;
|
|
1315
1442
|
const overallStatus: string = (structuralIssues > 0) ? "critical" : ((dataIssues_1 > 0) ? "incomplete" : "valid");
|
|
1316
1443
|
const progressPercent: int32 = ((totalFields === 0) ? 100 : ~~((validFields * 100) / totalFields)) | 0;
|
|
@@ -1319,7 +1446,7 @@ export function getFullValidationTelemetry(formSpec: Spec_FormSpec$1<Spec_FieldT
|
|
|
1319
1446
|
estimatedTimeToComplete: (dataIssues_1 === 0) ? "Complete" : ((dataIssues_1 <= 2) ? "1-2 minutes" : "3-5 minutes"),
|
|
1320
1447
|
fields: fieldTelemetry,
|
|
1321
1448
|
formValid: (dataIssues_1 === 0) && (structuralIssues === 0),
|
|
1322
|
-
nextCriticalAction: defaultArg_1(map<{ actionHint: string, dataIssues: string[], dataValid: boolean, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }, string>((f_4: { actionHint: string, dataIssues: string[], dataValid: boolean, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }): string => f_4.actionHint, tryFind_2<{ actionHint: string, dataIssues: string[], dataValid: boolean, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }>((f_3: { actionHint: string, dataIssues: string[], dataValid: boolean, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }): boolean => !f_3.dataValid, fieldTelemetry)), ""),
|
|
1449
|
+
nextCriticalAction: defaultArg_1(map<{ actionHint: string, actualChoices: string[], actualValue: string, dataIssues: string[], dataValid: boolean, expectedChoices: string[], expectedValue: string, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }, string>((f_4: { actionHint: string, actualChoices: string[], actualValue: string, dataIssues: string[], dataValid: boolean, expectedChoices: string[], expectedValue: string, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }): string => f_4.actionHint, tryFind_2<{ actionHint: string, actualChoices: string[], actualValue: string, dataIssues: string[], dataValid: boolean, expectedChoices: string[], expectedValue: string, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }>((f_3: { actionHint: string, actualChoices: string[], actualValue: string, dataIssues: string[], dataValid: boolean, expectedChoices: string[], expectedValue: string, fieldKey: string, fieldLabel: string, fieldType: string, severity: string, structureIssues: any[], structureValid: boolean }): boolean => !f_3.dataValid, fieldTelemetry)), ""),
|
|
1323
1450
|
overallStatus: overallStatus,
|
|
1324
1451
|
progressPercent: progressPercent,
|
|
1325
1452
|
structuralIssues: structuralIssues,
|
|
@@ -7,9 +7,9 @@ import { Spec_FormSpec$1_$reflection, Spec_FieldType_$reflection, Spec_FormClass
|
|
|
7
7
|
import { tryParse } from "@fable-org/fable-library-js/Guid.js";
|
|
8
8
|
import { ofArray, reverse, empty, FSharpList, cons, map, toArray } from "@fable-org/fable-library-js/List.js";
|
|
9
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
10
|
import { FSharpResult$2_$union, Result_ToOption } from "@fable-org/fable-library-js/Result.js";
|
|
12
|
-
import { Auto_generateBoxedDecoder_Z6670B51, fromString } from "../../
|
|
11
|
+
import { Auto_generateBoxedDecoder_Z6670B51, fromString } from "../../Thoth.Json/packages/Thoth.Json/Decode.js";
|
|
12
|
+
import { Auto_generateBoxedEncoder_437914C6, toString } from "../../Thoth.Json/packages/Thoth.Json/Encode.js";
|
|
13
13
|
import { printf, toConsole } from "@fable-org/fable-library-js/String.js";
|
|
14
14
|
|
|
15
15
|
export class Types_FieldKeyTS extends Record implements IEquatable<Types_FieldKeyTS>, IComparable<Types_FieldKeyTS> {
|
|
@@ -1469,8 +1469,9 @@ export function Converters_formSpecFromTS(spec: Types_FormSpecTS): Option<Spec_F
|
|
|
1469
1469
|
* Validate a TypeScript FormSpec object from JavaScript/TypeScript
|
|
1470
1470
|
*/
|
|
1471
1471
|
export function Validators_validateFormSpec(input: any): Option<Types_FormSpecTS> {
|
|
1472
|
-
|
|
1473
|
-
|
|
1472
|
+
return Result_ToOption<Types_FormSpecTS, string>(fromString<Types_FormSpecTS>(uncurry2(((() => {
|
|
1473
|
+
throw new Error("🚀 LIBERATION FORK CONFIRMED: generateDecoder entry point reached!");
|
|
1474
|
+
})(), Auto_generateBoxedDecoder_Z6670B51(Types_FormSpecTS_$reflection(), undefined, undefined))), toString(4, Auto_generateBoxedEncoder_437914C6(obj_type, undefined, undefined, undefined)(input))));
|
|
1474
1475
|
}
|
|
1475
1476
|
|
|
1476
1477
|
/**
|
|
@@ -1524,7 +1525,9 @@ export function Api_formSpecFromTypeScript(spec: Types_FormSpecTS): Option<Spec_
|
|
|
1524
1525
|
* - FieldType: ["Text", {}] → { Type: "Text", TextInfo: {...}, ... }
|
|
1525
1526
|
*/
|
|
1526
1527
|
export function Api_getFormSpecTSfromFormSpecFSjsonString(formSpecFSstring: string): Option<Types_FormSpecTS> {
|
|
1527
|
-
const matchValue: FSharpResult$2_$union<Spec_FormSpec$1<Spec_FieldType_$union>, string> = fromString<Spec_FormSpec$1<Spec_FieldType_$union>>(uncurry2(
|
|
1528
|
+
const matchValue: FSharpResult$2_$union<Spec_FormSpec$1<Spec_FieldType_$union>, string> = fromString<Spec_FormSpec$1<Spec_FieldType_$union>>(uncurry2(((() => {
|
|
1529
|
+
throw new Error("🚀 LIBERATION FORK CONFIRMED: generateDecoder entry point reached!");
|
|
1530
|
+
})(), Auto_generateBoxedDecoder_Z6670B51(Spec_FormSpec$1_$reflection(Spec_FieldType_$reflection()), undefined, undefined))), formSpecFSstring);
|
|
1528
1531
|
if (matchValue.tag === /* Error */ 1) {
|
|
1529
1532
|
return undefined;
|
|
1530
1533
|
}
|
|
@@ -1543,7 +1546,9 @@ export function Api_getFormSpecTSfromFormSpecFSjsonString(formSpecFSstring: stri
|
|
|
1543
1546
|
* - { Type: "Text", ... } → FieldType: ["Text", {...}]
|
|
1544
1547
|
*/
|
|
1545
1548
|
export function Api_getFormSpecFSfromFormSpecTSjsonString(formSpecTSstring: string): Option<Spec_FormSpec$1<Spec_FieldType_$union>> {
|
|
1546
|
-
const matchValue: FSharpResult$2_$union<Types_FormSpecTS, string> = fromString<Types_FormSpecTS>(uncurry2(
|
|
1549
|
+
const matchValue: FSharpResult$2_$union<Types_FormSpecTS, string> = fromString<Types_FormSpecTS>(uncurry2(((() => {
|
|
1550
|
+
throw new Error("🚀 LIBERATION FORK CONFIRMED: generateDecoder entry point reached!");
|
|
1551
|
+
})(), Auto_generateBoxedDecoder_Z6670B51(Types_FormSpecTS_$reflection(), undefined, undefined))), formSpecTSstring);
|
|
1547
1552
|
if (matchValue.tag === /* Error */ 1) {
|
|
1548
1553
|
return undefined;
|
|
1549
1554
|
}
|
|
@@ -1564,7 +1569,9 @@ export function Api_serializeFormSpec(spec: Types_FormSpecTS): string {
|
|
|
1564
1569
|
*/
|
|
1565
1570
|
export function Api_deserializeFormSpecTS(jsonTS: string): Option<Types_FormSpecTS> {
|
|
1566
1571
|
toConsole(printf("API.Option: Deserializing FormSpecTS!"));
|
|
1567
|
-
const matchValue: FSharpResult$2_$union<Types_FormSpecTS, string> = fromString<Types_FormSpecTS>(uncurry2(
|
|
1572
|
+
const matchValue: FSharpResult$2_$union<Types_FormSpecTS, string> = fromString<Types_FormSpecTS>(uncurry2(((() => {
|
|
1573
|
+
throw new Error("🚀 LIBERATION FORK CONFIRMED: generateDecoder entry point reached!");
|
|
1574
|
+
})(), Auto_generateBoxedDecoder_Z6670B51(Types_FormSpecTS_$reflection(), undefined, undefined))), jsonTS);
|
|
1568
1575
|
if (matchValue.tag === /* Error */ 1) {
|
|
1569
1576
|
return undefined;
|
|
1570
1577
|
}
|
|
@@ -13,9 +13,9 @@ import { ofArray, empty as empty_1, add as add_1, FSharpSet, toList as toList_1
|
|
|
13
13
|
import { resultStepsMapToFormSpec, formSpecToResultStepsMap, formSpecToMetadata, FormSpecMetadata, FieldDetails$1 } from "../FormSpecValues.js";
|
|
14
14
|
import { tryParse as tryParse_1, minValue, toString } from "@fable-org/fable-library-js/Date.js";
|
|
15
15
|
import { buildFormSpecFromResultStepsMap } from "../FormSpecHelpers.js";
|
|
16
|
-
import { Auto_generateBoxedEncoder_437914C6, toString as toString_1 } from "../../fable_modules/Thoth.Json.10.4.1/Encode.fs.js";
|
|
17
16
|
import { FSharpResult$2_$union, Result_ToOption } from "@fable-org/fable-library-js/Result.js";
|
|
18
|
-
import { Auto_generateBoxedDecoder_Z6670B51, fromString } from "../../
|
|
17
|
+
import { Auto_generateBoxedDecoder_Z6670B51, fromString } from "../../Thoth.Json/packages/Thoth.Json/Decode.js";
|
|
18
|
+
import { Auto_generateBoxedEncoder_437914C6, toString as toString_1 } from "../../Thoth.Json/packages/Thoth.Json/Encode.js";
|
|
19
19
|
|
|
20
20
|
export class ValuesTypes_FieldAnswerTS extends Record implements IEquatable<ValuesTypes_FieldAnswerTS>, IComparable<ValuesTypes_FieldAnswerTS> {
|
|
21
21
|
readonly FieldKey: Types_FieldKeyTS;
|
|
@@ -1042,8 +1042,9 @@ export function ValuesConverters_dynamicFormResultDataFromTSWithoutFormSpec(data
|
|
|
1042
1042
|
* Validate a TypeScript DynamicFormResultData object from JavaScript/TypeScript
|
|
1043
1043
|
*/
|
|
1044
1044
|
export function ValuesValidators_validateDynamicFormResultData(input: any): Option<ValuesTypes_DynamicFormResultDataTS> {
|
|
1045
|
-
|
|
1046
|
-
|
|
1045
|
+
return Result_ToOption<ValuesTypes_DynamicFormResultDataTS, string>(fromString<ValuesTypes_DynamicFormResultDataTS>(uncurry2(((() => {
|
|
1046
|
+
throw new Error("🚀 LIBERATION FORK CONFIRMED: generateDecoder entry point reached!");
|
|
1047
|
+
})(), Auto_generateBoxedDecoder_Z6670B51(ValuesTypes_DynamicFormResultDataTS_$reflection(), undefined, undefined))), toString_1(4, Auto_generateBoxedEncoder_437914C6(obj_type, undefined, undefined, undefined)(input))));
|
|
1047
1048
|
}
|
|
1048
1049
|
|
|
1049
1050
|
/**
|
|
@@ -1063,24 +1064,27 @@ export function ValuesValidators_validateAndConvertDynamicFormResultData(input:
|
|
|
1063
1064
|
* Validate a TypeScript DynamicForm object
|
|
1064
1065
|
*/
|
|
1065
1066
|
export function ValuesValidators_validateDynamicForm(input: any): Option<ValuesTypes_DynamicFormTS> {
|
|
1066
|
-
|
|
1067
|
-
|
|
1067
|
+
return Result_ToOption<ValuesTypes_DynamicFormTS, string>(fromString<ValuesTypes_DynamicFormTS>(uncurry2(((() => {
|
|
1068
|
+
throw new Error("🚀 LIBERATION FORK CONFIRMED: generateDecoder entry point reached!");
|
|
1069
|
+
})(), Auto_generateBoxedDecoder_Z6670B51(ValuesTypes_DynamicFormTS_$reflection(), undefined, undefined))), toString_1(4, Auto_generateBoxedEncoder_437914C6(obj_type, undefined, undefined, undefined)(input))));
|
|
1068
1070
|
}
|
|
1069
1071
|
|
|
1070
1072
|
/**
|
|
1071
1073
|
* Validate a TypeScript FieldAnswer object
|
|
1072
1074
|
*/
|
|
1073
1075
|
export function ValuesValidators_validateFieldAnswer(input: any): Option<ValuesTypes_FieldAnswerTS> {
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
+
return Result_ToOption<ValuesTypes_FieldAnswerTS, string>(fromString<ValuesTypes_FieldAnswerTS>(uncurry2(((() => {
|
|
1077
|
+
throw new Error("🚀 LIBERATION FORK CONFIRMED: generateDecoder entry point reached!");
|
|
1078
|
+
})(), Auto_generateBoxedDecoder_Z6670B51(ValuesTypes_FieldAnswerTS_$reflection(), undefined, undefined))), toString_1(4, Auto_generateBoxedEncoder_437914C6(obj_type, undefined, undefined, undefined)(input))));
|
|
1076
1079
|
}
|
|
1077
1080
|
|
|
1078
1081
|
/**
|
|
1079
1082
|
* Validate a TypeScript FieldValue object
|
|
1080
1083
|
*/
|
|
1081
1084
|
export function ValuesValidators_validateFieldValue(input: any): Option<ValuesTypes_FieldValueTS> {
|
|
1082
|
-
|
|
1083
|
-
|
|
1085
|
+
return Result_ToOption<ValuesTypes_FieldValueTS, string>(fromString<ValuesTypes_FieldValueTS>(uncurry2(((() => {
|
|
1086
|
+
throw new Error("🚀 LIBERATION FORK CONFIRMED: generateDecoder entry point reached!");
|
|
1087
|
+
})(), Auto_generateBoxedDecoder_Z6670B51(ValuesTypes_FieldValueTS_$reflection(), undefined, undefined))), toString_1(4, Auto_generateBoxedEncoder_437914C6(obj_type, undefined, undefined, undefined)(input))));
|
|
1084
1088
|
}
|
|
1085
1089
|
|
|
1086
1090
|
/**
|
|
@@ -1229,7 +1233,9 @@ export function ValuesApi_serializeDynamicFormResultData(data: ValuesTypes_Dynam
|
|
|
1229
1233
|
* Deserialize a DynamicFormResultData from JSON string
|
|
1230
1234
|
*/
|
|
1231
1235
|
export function ValuesApi_deserializeDynamicFormResultData(json: string): Option<ValuesTypes_DynamicFormResultDataTS> {
|
|
1232
|
-
const matchValue: FSharpResult$2_$union<ValuesTypes_DynamicFormResultDataTS, string> = fromString<ValuesTypes_DynamicFormResultDataTS>(uncurry2(
|
|
1236
|
+
const matchValue: FSharpResult$2_$union<ValuesTypes_DynamicFormResultDataTS, string> = fromString<ValuesTypes_DynamicFormResultDataTS>(uncurry2(((() => {
|
|
1237
|
+
throw new Error("🚀 LIBERATION FORK CONFIRMED: generateDecoder entry point reached!");
|
|
1238
|
+
})(), Auto_generateBoxedDecoder_Z6670B51(ValuesTypes_DynamicFormResultDataTS_$reflection(), undefined, undefined))), json);
|
|
1233
1239
|
if (matchValue.tag === /* Error */ 1) {
|
|
1234
1240
|
return undefined;
|
|
1235
1241
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Union } from "@fable-org/fable-library-js/Types.js";
|
|
2
2
|
import { string_type, union_type, TypeInfo } from "@fable-org/fable-library-js/Reflection.js";
|
|
3
3
|
import { Spec_FieldType_$union, Spec_FieldType_$reflection, Spec_FormSpec$1_$reflection, Spec_FormSpec$1 } from "./FormSpec.js";
|
|
4
|
-
import { Auto_generateBoxedDecoder_Z6670B51, fromString } from "../
|
|
4
|
+
import { Auto_generateBoxedDecoder_Z6670B51, fromString } from "../Thoth.Json/packages/Thoth.Json/Decode.js";
|
|
5
5
|
import { uncurry2 } from "@fable-org/fable-library-js/Util.js";
|
|
6
6
|
import { FSharpResult$2_$union } from "@fable-org/fable-library-js/Result.js";
|
|
7
7
|
|
|
@@ -84,7 +84,9 @@ export function FormSpec_migrateTo<FieldType>(outputVersion: FormSpec_FormSpecOu
|
|
|
84
84
|
export function FormSpec_decodeFormSpec<FieldType>(inputVersion: FormSpec_FormSpecInput_$union, formSpecJson: string): FormSpec_FormSpecVersion$1<FieldType> {
|
|
85
85
|
if (inputVersion.tag === /* Latest */ 0) {
|
|
86
86
|
}
|
|
87
|
-
const matchValue: FSharpResult$2_$union<Spec_FormSpec$1<Spec_FieldType_$union>, string> = fromString<Spec_FormSpec$1<Spec_FieldType_$union>>(uncurry2(
|
|
87
|
+
const matchValue: FSharpResult$2_$union<Spec_FormSpec$1<Spec_FieldType_$union>, string> = fromString<Spec_FormSpec$1<Spec_FieldType_$union>>(uncurry2(((() => {
|
|
88
|
+
throw new Error("🚀 LIBERATION FORK CONFIRMED: generateDecoder entry point reached!");
|
|
89
|
+
})(), Auto_generateBoxedDecoder_Z6670B51(Spec_FormSpec$1_$reflection(Spec_FieldType_$reflection()), undefined, undefined))), formSpecJson);
|
|
88
90
|
if (matchValue.tag === /* Error */ 1) {
|
|
89
91
|
const err: string = matchValue.fields[0];
|
|
90
92
|
throw new Error("The input format does not match 3.0.0");
|
|
@@ -10,7 +10,7 @@ import { tryFind as tryFind_1, FSharpMap, ofList, toList as toList_1 } from "@fa
|
|
|
10
10
|
import { updateField, getFieldDetails, FieldDetails$1, fieldToDetails } from "./FormSpecValues.js";
|
|
11
11
|
import { Helpers_generateDeterministicGuidRaw, Helpers_canonicalizeFieldKey } from "./Helpers.js";
|
|
12
12
|
import { printf, toText, isNullOrEmpty, isNullOrWhiteSpace, join } from "@fable-org/fable-library-js/String.js";
|
|
13
|
-
import { Auto_generateBoxedEncoder_437914C6, toString } from "../
|
|
13
|
+
import { Auto_generateBoxedEncoder_437914C6, toString } from "../Thoth.Json/packages/Thoth.Json/Encode.js";
|
|
14
14
|
import { tryParse } from "@fable-org/fable-library-js/Double.js";
|
|
15
15
|
import { create, isMatch } from "@fable-org/fable-library-js/RegExp.js";
|
|
16
16
|
import { map as map_3 } from "@fable-org/fable-library-js/Array.js";
|