@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
package/Designer.d.ts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Record, Union } from "@fable-org/fable-library-js/Types.js";
|
|
2
|
+
import { TypeInfo } from "@fable-org/fable-library-js/Reflection.js";
|
|
3
|
+
import { int32 } from "@fable-org/fable-library-js/Int32.js";
|
|
4
|
+
import { IComparable, IEquatable } from "@fable-org/fable-library-js/Util.js";
|
|
5
|
+
import { FSharpResult$2_$union } from "@fable-org/fable-library-js/Result.js";
|
|
6
|
+
import { FSharpList } from "@fable-org/fable-library-js/List.js";
|
|
7
|
+
import { Spec_FormField$1, Spec_FormSpec$1, Shared_FieldOption, Shared_FieldValue_$union, Shared_FieldKey } from "./FormSpec.js";
|
|
8
|
+
import { Option } from "@fable-org/fable-library-js/Option.js";
|
|
9
|
+
export type FieldState_$union = FieldState<0> | FieldState<1>;
|
|
10
|
+
export type FieldState_$cases = {
|
|
11
|
+
0: ["Idle", []];
|
|
12
|
+
1: ["AddingDependantKeys", []];
|
|
13
|
+
};
|
|
14
|
+
export declare function FieldState_Idle(): FieldState<0>;
|
|
15
|
+
export declare function FieldState_AddingDependantKeys(): FieldState<1>;
|
|
16
|
+
export declare class FieldState<Tag extends keyof FieldState_$cases> extends Union<Tag, FieldState_$cases[Tag][0]> {
|
|
17
|
+
readonly tag: Tag;
|
|
18
|
+
readonly fields: FieldState_$cases[Tag][1];
|
|
19
|
+
constructor(tag: Tag, fields: FieldState_$cases[Tag][1]);
|
|
20
|
+
cases(): string[];
|
|
21
|
+
}
|
|
22
|
+
export declare function FieldState_$reflection(): TypeInfo;
|
|
23
|
+
export declare class ActiveField extends Record implements IEquatable<ActiveField>, IComparable<ActiveField> {
|
|
24
|
+
readonly FormStepNumber: int32;
|
|
25
|
+
readonly FormFieldNumber: int32;
|
|
26
|
+
readonly State: FieldState_$union;
|
|
27
|
+
constructor(FormStepNumber: int32, FormFieldNumber: int32, State: FieldState_$union);
|
|
28
|
+
}
|
|
29
|
+
export declare function ActiveField_$reflection(): TypeInfo;
|
|
30
|
+
export type CategoryTag_$union = CategoryTag<0> | CategoryTag<1> | CategoryTag<2> | CategoryTag<3> | CategoryTag<4> | CategoryTag<5> | CategoryTag<6> | CategoryTag<7> | CategoryTag<8> | CategoryTag<9> | CategoryTag<10> | CategoryTag<11>;
|
|
31
|
+
export type CategoryTag_$cases = {
|
|
32
|
+
0: ["MentalHealth", []];
|
|
33
|
+
1: ["IllicitDrugs", []];
|
|
34
|
+
2: ["Alcohol", []];
|
|
35
|
+
3: ["RiskScore", []];
|
|
36
|
+
4: ["COPD", []];
|
|
37
|
+
5: ["HRA", []];
|
|
38
|
+
6: ["HeartDisease", []];
|
|
39
|
+
7: ["GeneralWellness", []];
|
|
40
|
+
8: ["KidneyDisease", []];
|
|
41
|
+
9: ["Diabetes", []];
|
|
42
|
+
10: ["Hospital", []];
|
|
43
|
+
11: ["MedAdherance", []];
|
|
44
|
+
};
|
|
45
|
+
export declare function CategoryTag_MentalHealth(): CategoryTag<0>;
|
|
46
|
+
export declare function CategoryTag_IllicitDrugs(): CategoryTag<1>;
|
|
47
|
+
export declare function CategoryTag_Alcohol(): CategoryTag<2>;
|
|
48
|
+
export declare function CategoryTag_RiskScore(): CategoryTag<3>;
|
|
49
|
+
export declare function CategoryTag_COPD(): CategoryTag<4>;
|
|
50
|
+
export declare function CategoryTag_HRA(): CategoryTag<5>;
|
|
51
|
+
export declare function CategoryTag_HeartDisease(): CategoryTag<6>;
|
|
52
|
+
export declare function CategoryTag_GeneralWellness(): CategoryTag<7>;
|
|
53
|
+
export declare function CategoryTag_KidneyDisease(): CategoryTag<8>;
|
|
54
|
+
export declare function CategoryTag_Diabetes(): CategoryTag<9>;
|
|
55
|
+
export declare function CategoryTag_Hospital(): CategoryTag<10>;
|
|
56
|
+
export declare function CategoryTag_MedAdherance(): CategoryTag<11>;
|
|
57
|
+
export declare class CategoryTag<Tag extends keyof CategoryTag_$cases> extends Union<Tag, CategoryTag_$cases[Tag][0]> {
|
|
58
|
+
readonly tag: Tag;
|
|
59
|
+
readonly fields: CategoryTag_$cases[Tag][1];
|
|
60
|
+
constructor(tag: Tag, fields: CategoryTag_$cases[Tag][1]);
|
|
61
|
+
cases(): string[];
|
|
62
|
+
}
|
|
63
|
+
export declare function CategoryTag_$reflection(): TypeInfo;
|
|
64
|
+
export declare function CategoryTag__get_toString(x: CategoryTag_$union): string;
|
|
65
|
+
export declare function CategoryTag_fromString_Z721C83C5(s: string): CategoryTag_$union;
|
|
66
|
+
export declare function CategoryTag__get_toIcon(x: CategoryTag_$union): string;
|
|
67
|
+
export declare function CategoryTag__get_toIndex(x: CategoryTag_$union): int32;
|
|
68
|
+
export declare function CategoryTag_fromIndex_Z524259A4(categoryTagIndex: int32): CategoryTag_$union;
|
|
69
|
+
export declare function CategoryTag_validate_Z524259A4(categoryTagIndex: int32): FSharpResult$2_$union<void, string>;
|
|
70
|
+
export declare function categoryTagToString(c: CategoryTag_$union): string;
|
|
71
|
+
export declare const availableCategoryTags: FSharpList<CategoryTag_$union>;
|
|
72
|
+
export declare function CategoryTagModule_getList(): FSharpList<CategoryTag_$union>;
|
|
73
|
+
export declare class FieldDetails extends Record implements IEquatable<FieldDetails>, IComparable<FieldDetails> {
|
|
74
|
+
readonly FieldOrder: int32;
|
|
75
|
+
readonly Key: Shared_FieldKey;
|
|
76
|
+
readonly Label: string;
|
|
77
|
+
readonly FieldValue: Shared_FieldValue_$union;
|
|
78
|
+
readonly Options: FSharpList<Shared_FieldOption>;
|
|
79
|
+
constructor(FieldOrder: int32, Key: Shared_FieldKey, Label: string, FieldValue: Shared_FieldValue_$union, Options: FSharpList<Shared_FieldOption>);
|
|
80
|
+
}
|
|
81
|
+
export declare function FieldDetails_$reflection(): TypeInfo;
|
|
82
|
+
export declare function Converters_fieldKeyToString(key: Shared_FieldKey): string;
|
|
83
|
+
export declare function Converters_stringToFieldKey(s: string): Shared_FieldKey;
|
|
84
|
+
export declare function Converters_tryStringToFieldKey(s: string): Option<Shared_FieldKey>;
|
|
85
|
+
export declare function Converters_formSpecToLibrary<UserField>(spec: Spec_FormSpec$1<UserField>, categoryTags: FSharpList<CategoryTag_$union>): Spec_FormSpec$1<UserField>;
|
|
86
|
+
export declare function Converters_formSpecFromLibrary<UserField>(spec: Spec_FormSpec$1<UserField>): [Spec_FormSpec$1<UserField>, FSharpList<CategoryTag_$union>];
|
|
87
|
+
export declare function Converters_createFormField<UserField>(order: int32, label: string, fieldType: UserField): Spec_FormField$1<UserField>;
|
|
88
|
+
export declare function Converters_fieldToDetails<UserField>(field: Spec_FormField$1<UserField>, value: Shared_FieldValue_$union, options: FSharpList<Shared_FieldOption>): FieldDetails;
|
|
89
|
+
//# sourceMappingURL=Designer.d.ts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get HelloComponentProps () {
|
|
13
|
+
return HelloComponentProps;
|
|
14
|
+
},
|
|
15
|
+
get HelloComponentProps_$reflection () {
|
|
16
|
+
return HelloComponentProps_$reflection;
|
|
17
|
+
},
|
|
18
|
+
get getGreetingMessage () {
|
|
19
|
+
return getGreetingMessage;
|
|
20
|
+
},
|
|
21
|
+
get handleButtonClick () {
|
|
22
|
+
return handleButtonClick;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const _Types = require("@fable-org/fable-library-js/Types.js");
|
|
26
|
+
const _Option = require("@fable-org/fable-library-js/Option.js");
|
|
27
|
+
const _Reflection = require("@fable-org/fable-library-js/Reflection.js");
|
|
28
|
+
const _String = require("@fable-org/fable-library-js/String.js");
|
|
29
|
+
class HelloComponentProps extends _Types.Record {
|
|
30
|
+
constructor(name, message, onButtonClick){
|
|
31
|
+
super();
|
|
32
|
+
this.name = name;
|
|
33
|
+
this.message = message;
|
|
34
|
+
this.onButtonClick = onButtonClick;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function HelloComponentProps_$reflection() {
|
|
38
|
+
return (0, _Reflection.record_type)("FormSpec.Components.HelloComponent.HelloComponentProps", [], HelloComponentProps, ()=>[
|
|
39
|
+
[
|
|
40
|
+
"name",
|
|
41
|
+
_Reflection.string_type
|
|
42
|
+
],
|
|
43
|
+
[
|
|
44
|
+
"message",
|
|
45
|
+
(0, _Reflection.option_type)(_Reflection.string_type)
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
"onButtonClick",
|
|
49
|
+
(0, _Reflection.option_type)((0, _Reflection.lambda_type)(_Reflection.string_type, _Reflection.unit_type))
|
|
50
|
+
]
|
|
51
|
+
]);
|
|
52
|
+
}
|
|
53
|
+
function getGreetingMessage(props) {
|
|
54
|
+
const matchValue = props.message;
|
|
55
|
+
if (matchValue == null) {
|
|
56
|
+
return (0, _String.toText)((0, _String.printf)("Hello from F#! Welcome, %s"))(props.name);
|
|
57
|
+
} else {
|
|
58
|
+
return (0, _Option.value)(matchValue);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function handleButtonClick(props) {
|
|
62
|
+
const matchValue = props.onButtonClick;
|
|
63
|
+
if (matchValue == null) {} else {
|
|
64
|
+
(0, _Option.value)(matchValue)(props.name);
|
|
65
|
+
}
|
|
66
|
+
} //# sourceMappingURL=HelloComponent.ts.map
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=HelloComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../FormSpec.TS/Components/HelloComponent.ts"],"names":["matchValue","props"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgBcA,MAAAA,aAAAC,MAAAA,OAAAA;IAAA,IAAAD,cAAAA,MAAAA;QAEI,WAAA,cAAA,MAAQ,cAAA,EAAA,+BAA6BC,MAAAA,IAAAA;;kCADjCD;;;;IAKRA,MAAAA,aAAAC,MAAAA,aAAAA;IAAA,IAAAD,cAAAA,MAAAA;QACY,IAAA,aAAA,EAAAA,YAAQC,MAAAA,IAAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../FormSpec.FS/Components/HelloComponent.fs"],"names":["matchValue","props"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgBcA,uCAAA,AAAAC;AAAA,QAAA,AAAAD;AAEI,eAAA,OAAQ,OAAA,\u002BBAA6B,AAAAC;;;qBADjCD;;;;;;;;AAKRA,yDAAA,AAAAC;AAAA,QAAA,AAAAD;;;AACY,cAAAA,YAAQ,AAAAC","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get ActiveField () {
|
|
13
|
+
return ActiveField;
|
|
14
|
+
},
|
|
15
|
+
get ActiveField_$reflection () {
|
|
16
|
+
return ActiveField_$reflection;
|
|
17
|
+
},
|
|
18
|
+
get CategoryTag () {
|
|
19
|
+
return CategoryTag;
|
|
20
|
+
},
|
|
21
|
+
get CategoryTagModule_getList () {
|
|
22
|
+
return CategoryTagModule_getList;
|
|
23
|
+
},
|
|
24
|
+
get CategoryTag_$reflection () {
|
|
25
|
+
return CategoryTag_$reflection;
|
|
26
|
+
},
|
|
27
|
+
get CategoryTag_Alcohol () {
|
|
28
|
+
return CategoryTag_Alcohol;
|
|
29
|
+
},
|
|
30
|
+
get CategoryTag_COPD () {
|
|
31
|
+
return CategoryTag_COPD;
|
|
32
|
+
},
|
|
33
|
+
get CategoryTag_Diabetes () {
|
|
34
|
+
return CategoryTag_Diabetes;
|
|
35
|
+
},
|
|
36
|
+
get CategoryTag_GeneralWellness () {
|
|
37
|
+
return CategoryTag_GeneralWellness;
|
|
38
|
+
},
|
|
39
|
+
get CategoryTag_HRA () {
|
|
40
|
+
return CategoryTag_HRA;
|
|
41
|
+
},
|
|
42
|
+
get CategoryTag_HeartDisease () {
|
|
43
|
+
return CategoryTag_HeartDisease;
|
|
44
|
+
},
|
|
45
|
+
get CategoryTag_Hospital () {
|
|
46
|
+
return CategoryTag_Hospital;
|
|
47
|
+
},
|
|
48
|
+
get CategoryTag_IllicitDrugs () {
|
|
49
|
+
return CategoryTag_IllicitDrugs;
|
|
50
|
+
},
|
|
51
|
+
get CategoryTag_KidneyDisease () {
|
|
52
|
+
return CategoryTag_KidneyDisease;
|
|
53
|
+
},
|
|
54
|
+
get CategoryTag_MedAdherance () {
|
|
55
|
+
return CategoryTag_MedAdherance;
|
|
56
|
+
},
|
|
57
|
+
get CategoryTag_MentalHealth () {
|
|
58
|
+
return CategoryTag_MentalHealth;
|
|
59
|
+
},
|
|
60
|
+
get CategoryTag_RiskScore () {
|
|
61
|
+
return CategoryTag_RiskScore;
|
|
62
|
+
},
|
|
63
|
+
get CategoryTag__get_toIcon () {
|
|
64
|
+
return CategoryTag__get_toIcon;
|
|
65
|
+
},
|
|
66
|
+
get CategoryTag__get_toIndex () {
|
|
67
|
+
return CategoryTag__get_toIndex;
|
|
68
|
+
},
|
|
69
|
+
get CategoryTag__get_toString () {
|
|
70
|
+
return CategoryTag__get_toString;
|
|
71
|
+
},
|
|
72
|
+
get CategoryTag_fromIndex_Z524259A4 () {
|
|
73
|
+
return CategoryTag_fromIndex_Z524259A4;
|
|
74
|
+
},
|
|
75
|
+
get CategoryTag_fromString_Z721C83C5 () {
|
|
76
|
+
return CategoryTag_fromString_Z721C83C5;
|
|
77
|
+
},
|
|
78
|
+
get CategoryTag_validate_Z524259A4 () {
|
|
79
|
+
return CategoryTag_validate_Z524259A4;
|
|
80
|
+
},
|
|
81
|
+
get Converters_createFormField () {
|
|
82
|
+
return Converters_createFormField;
|
|
83
|
+
},
|
|
84
|
+
get Converters_fieldKeyToString () {
|
|
85
|
+
return Converters_fieldKeyToString;
|
|
86
|
+
},
|
|
87
|
+
get Converters_fieldToDetails () {
|
|
88
|
+
return Converters_fieldToDetails;
|
|
89
|
+
},
|
|
90
|
+
get Converters_formSpecFromLibrary () {
|
|
91
|
+
return Converters_formSpecFromLibrary;
|
|
92
|
+
},
|
|
93
|
+
get Converters_formSpecToLibrary () {
|
|
94
|
+
return Converters_formSpecToLibrary;
|
|
95
|
+
},
|
|
96
|
+
get Converters_stringToFieldKey () {
|
|
97
|
+
return Converters_stringToFieldKey;
|
|
98
|
+
},
|
|
99
|
+
get Converters_tryStringToFieldKey () {
|
|
100
|
+
return Converters_tryStringToFieldKey;
|
|
101
|
+
},
|
|
102
|
+
get FieldDetails () {
|
|
103
|
+
return FieldDetails;
|
|
104
|
+
},
|
|
105
|
+
get FieldDetails_$reflection () {
|
|
106
|
+
return FieldDetails_$reflection;
|
|
107
|
+
},
|
|
108
|
+
get FieldState () {
|
|
109
|
+
return FieldState;
|
|
110
|
+
},
|
|
111
|
+
get FieldState_$reflection () {
|
|
112
|
+
return FieldState_$reflection;
|
|
113
|
+
},
|
|
114
|
+
get FieldState_AddingDependantKeys () {
|
|
115
|
+
return FieldState_AddingDependantKeys;
|
|
116
|
+
},
|
|
117
|
+
get FieldState_Idle () {
|
|
118
|
+
return FieldState_Idle;
|
|
119
|
+
},
|
|
120
|
+
get availableCategoryTags () {
|
|
121
|
+
return availableCategoryTags;
|
|
122
|
+
},
|
|
123
|
+
get categoryTagToString () {
|
|
124
|
+
return categoryTagToString;
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
const _Types = require("@fable-org/fable-library-js/Types.js");
|
|
128
|
+
const _Reflection = require("@fable-org/fable-library-js/Reflection.js");
|
|
129
|
+
const _Util = require("@fable-org/fable-library-js/Util.js");
|
|
130
|
+
const _String = require("@fable-org/fable-library-js/String.js");
|
|
131
|
+
const _Result = require("@fable-org/fable-library-js/Result.js");
|
|
132
|
+
const _List = require("@fable-org/fable-library-js/List.js");
|
|
133
|
+
const _FormSpec = require("./FormSpec.js");
|
|
134
|
+
const _Guid = require("@fable-org/fable-library-js/Guid.js");
|
|
135
|
+
function FieldState_Idle() {
|
|
136
|
+
return new FieldState(0, []);
|
|
137
|
+
}
|
|
138
|
+
function FieldState_AddingDependantKeys() {
|
|
139
|
+
return new FieldState(1, []);
|
|
140
|
+
}
|
|
141
|
+
class FieldState extends _Types.Union {
|
|
142
|
+
cases() {
|
|
143
|
+
return [
|
|
144
|
+
"Idle",
|
|
145
|
+
"AddingDependantKeys"
|
|
146
|
+
];
|
|
147
|
+
}
|
|
148
|
+
constructor(tag, fields){
|
|
149
|
+
super(), this.tag = tag, this.fields = fields;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
function FieldState_$reflection() {
|
|
153
|
+
return (0, _Reflection.union_type)("F1.Studio.Designer.FieldState", [], FieldState, ()=>[
|
|
154
|
+
[],
|
|
155
|
+
[]
|
|
156
|
+
]);
|
|
157
|
+
}
|
|
158
|
+
class ActiveField extends _Types.Record {
|
|
159
|
+
constructor(FormStepNumber, FormFieldNumber, State){
|
|
160
|
+
super();
|
|
161
|
+
this.FormStepNumber = FormStepNumber | 0;
|
|
162
|
+
this.FormFieldNumber = FormFieldNumber | 0;
|
|
163
|
+
this.State = State;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
function ActiveField_$reflection() {
|
|
167
|
+
return (0, _Reflection.record_type)("F1.Studio.Designer.ActiveField", [], ActiveField, ()=>[
|
|
168
|
+
[
|
|
169
|
+
"FormStepNumber",
|
|
170
|
+
_Reflection.int32_type
|
|
171
|
+
],
|
|
172
|
+
[
|
|
173
|
+
"FormFieldNumber",
|
|
174
|
+
_Reflection.int32_type
|
|
175
|
+
],
|
|
176
|
+
[
|
|
177
|
+
"State",
|
|
178
|
+
FieldState_$reflection()
|
|
179
|
+
]
|
|
180
|
+
]);
|
|
181
|
+
}
|
|
182
|
+
function CategoryTag_MentalHealth() {
|
|
183
|
+
return new CategoryTag(0, []);
|
|
184
|
+
}
|
|
185
|
+
function CategoryTag_IllicitDrugs() {
|
|
186
|
+
return new CategoryTag(1, []);
|
|
187
|
+
}
|
|
188
|
+
function CategoryTag_Alcohol() {
|
|
189
|
+
return new CategoryTag(2, []);
|
|
190
|
+
}
|
|
191
|
+
function CategoryTag_RiskScore() {
|
|
192
|
+
return new CategoryTag(3, []);
|
|
193
|
+
}
|
|
194
|
+
function CategoryTag_COPD() {
|
|
195
|
+
return new CategoryTag(4, []);
|
|
196
|
+
}
|
|
197
|
+
function CategoryTag_HRA() {
|
|
198
|
+
return new CategoryTag(5, []);
|
|
199
|
+
}
|
|
200
|
+
function CategoryTag_HeartDisease() {
|
|
201
|
+
return new CategoryTag(6, []);
|
|
202
|
+
}
|
|
203
|
+
function CategoryTag_GeneralWellness() {
|
|
204
|
+
return new CategoryTag(7, []);
|
|
205
|
+
}
|
|
206
|
+
function CategoryTag_KidneyDisease() {
|
|
207
|
+
return new CategoryTag(8, []);
|
|
208
|
+
}
|
|
209
|
+
function CategoryTag_Diabetes() {
|
|
210
|
+
return new CategoryTag(9, []);
|
|
211
|
+
}
|
|
212
|
+
function CategoryTag_Hospital() {
|
|
213
|
+
return new CategoryTag(10, []);
|
|
214
|
+
}
|
|
215
|
+
function CategoryTag_MedAdherance() {
|
|
216
|
+
return new CategoryTag(11, []);
|
|
217
|
+
}
|
|
218
|
+
class CategoryTag extends _Types.Union {
|
|
219
|
+
cases() {
|
|
220
|
+
return [
|
|
221
|
+
"MentalHealth",
|
|
222
|
+
"IllicitDrugs",
|
|
223
|
+
"Alcohol",
|
|
224
|
+
"RiskScore",
|
|
225
|
+
"COPD",
|
|
226
|
+
"HRA",
|
|
227
|
+
"HeartDisease",
|
|
228
|
+
"GeneralWellness",
|
|
229
|
+
"KidneyDisease",
|
|
230
|
+
"Diabetes",
|
|
231
|
+
"Hospital",
|
|
232
|
+
"MedAdherance"
|
|
233
|
+
];
|
|
234
|
+
}
|
|
235
|
+
constructor(tag, fields){
|
|
236
|
+
super(), this.tag = tag, this.fields = fields;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
function CategoryTag_$reflection() {
|
|
240
|
+
return (0, _Reflection.union_type)("F1.Studio.Designer.CategoryTag", [], CategoryTag, ()=>[
|
|
241
|
+
[],
|
|
242
|
+
[],
|
|
243
|
+
[],
|
|
244
|
+
[],
|
|
245
|
+
[],
|
|
246
|
+
[],
|
|
247
|
+
[],
|
|
248
|
+
[],
|
|
249
|
+
[],
|
|
250
|
+
[],
|
|
251
|
+
[],
|
|
252
|
+
[]
|
|
253
|
+
]);
|
|
254
|
+
}
|
|
255
|
+
function CategoryTag__get_toString(x) {
|
|
256
|
+
switch(x.tag){
|
|
257
|
+
case /* IllicitDrugs */ 1:
|
|
258
|
+
return "Illicit Drugs";
|
|
259
|
+
case /* Alcohol */ 2:
|
|
260
|
+
return "Alcohol";
|
|
261
|
+
case /* RiskScore */ 3:
|
|
262
|
+
return "Risk Score";
|
|
263
|
+
case /* COPD */ 4:
|
|
264
|
+
return "COPD";
|
|
265
|
+
case /* HRA */ 5:
|
|
266
|
+
return "HRA";
|
|
267
|
+
case /* HeartDisease */ 6:
|
|
268
|
+
return "Heart Disease";
|
|
269
|
+
case /* GeneralWellness */ 7:
|
|
270
|
+
return "General Wellness";
|
|
271
|
+
case /* KidneyDisease */ 8:
|
|
272
|
+
return "Kidney Disease";
|
|
273
|
+
case /* Diabetes */ 9:
|
|
274
|
+
return "Diabetes";
|
|
275
|
+
case /* Hospital */ 10:
|
|
276
|
+
return "Hospital";
|
|
277
|
+
case /* MedAdherance */ 11:
|
|
278
|
+
return "Med Adherance";
|
|
279
|
+
default:
|
|
280
|
+
return "Mental Health";
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
function CategoryTag_fromString_Z721C83C5(s) {
|
|
284
|
+
switch(s){
|
|
285
|
+
case "Mental Health":
|
|
286
|
+
return CategoryTag_MentalHealth();
|
|
287
|
+
case "Illicit Drugs":
|
|
288
|
+
return CategoryTag_IllicitDrugs();
|
|
289
|
+
case "Alcohol":
|
|
290
|
+
return CategoryTag_Alcohol();
|
|
291
|
+
case "Risk Score":
|
|
292
|
+
return CategoryTag_RiskScore();
|
|
293
|
+
case "COPD":
|
|
294
|
+
return CategoryTag_COPD();
|
|
295
|
+
case "HRA":
|
|
296
|
+
return CategoryTag_HRA();
|
|
297
|
+
case "Heart Disease":
|
|
298
|
+
return CategoryTag_HeartDisease();
|
|
299
|
+
case "General Wellness":
|
|
300
|
+
return CategoryTag_GeneralWellness();
|
|
301
|
+
case "Kidney Disease":
|
|
302
|
+
return CategoryTag_KidneyDisease();
|
|
303
|
+
case "Diabetes":
|
|
304
|
+
return CategoryTag_Diabetes();
|
|
305
|
+
case "Hospital":
|
|
306
|
+
return CategoryTag_Hospital();
|
|
307
|
+
case "Med Adherance":
|
|
308
|
+
return CategoryTag_MedAdherance();
|
|
309
|
+
default:
|
|
310
|
+
return (0, _String.toFail)((0, _String.printf)("Unknown category tag: %s"))(s);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
function CategoryTag__get_toIcon(x) {
|
|
314
|
+
switch(x.tag){
|
|
315
|
+
case /* IllicitDrugs */ 1:
|
|
316
|
+
return "/images/pills.svg";
|
|
317
|
+
case /* Alcohol */ 2:
|
|
318
|
+
return "/images/alcohol.svg";
|
|
319
|
+
case /* RiskScore */ 3:
|
|
320
|
+
return "/images/speedometer.svg";
|
|
321
|
+
case /* COPD */ 4:
|
|
322
|
+
return "/images/lungs.svg";
|
|
323
|
+
case /* HRA */ 5:
|
|
324
|
+
return "/images/assessment.svg";
|
|
325
|
+
case /* HeartDisease */ 6:
|
|
326
|
+
return "/images/heart.svg";
|
|
327
|
+
case /* GeneralWellness */ 7:
|
|
328
|
+
return "/images/healthcare.svg";
|
|
329
|
+
case /* KidneyDisease */ 8:
|
|
330
|
+
return "/images/kidney.svg";
|
|
331
|
+
case /* Diabetes */ 9:
|
|
332
|
+
return "/images/insulin-pen.svg";
|
|
333
|
+
case /* Hospital */ 10:
|
|
334
|
+
return "/images/medical-kit.svg";
|
|
335
|
+
case /* MedAdherance */ 11:
|
|
336
|
+
return "/images/tablet.svg";
|
|
337
|
+
default:
|
|
338
|
+
return "/images/brain2.svg";
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
function CategoryTag__get_toIndex(x) {
|
|
342
|
+
switch(x.tag){
|
|
343
|
+
case /* IllicitDrugs */ 1:
|
|
344
|
+
return 1;
|
|
345
|
+
case /* Alcohol */ 2:
|
|
346
|
+
return 2;
|
|
347
|
+
case /* RiskScore */ 3:
|
|
348
|
+
return 3;
|
|
349
|
+
case /* COPD */ 4:
|
|
350
|
+
return 4;
|
|
351
|
+
case /* HRA */ 5:
|
|
352
|
+
return 5;
|
|
353
|
+
case /* HeartDisease */ 6:
|
|
354
|
+
return 6;
|
|
355
|
+
case /* GeneralWellness */ 7:
|
|
356
|
+
return 7;
|
|
357
|
+
case /* KidneyDisease */ 8:
|
|
358
|
+
return 8;
|
|
359
|
+
case /* Diabetes */ 9:
|
|
360
|
+
return 9;
|
|
361
|
+
case /* Hospital */ 10:
|
|
362
|
+
return 10;
|
|
363
|
+
case /* MedAdherance */ 11:
|
|
364
|
+
return 11;
|
|
365
|
+
default:
|
|
366
|
+
return 0;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
function CategoryTag_fromIndex_Z524259A4(categoryTagIndex) {
|
|
370
|
+
switch(categoryTagIndex){
|
|
371
|
+
case 0:
|
|
372
|
+
return CategoryTag_MentalHealth();
|
|
373
|
+
case 1:
|
|
374
|
+
return CategoryTag_IllicitDrugs();
|
|
375
|
+
case 2:
|
|
376
|
+
return CategoryTag_Alcohol();
|
|
377
|
+
case 3:
|
|
378
|
+
return CategoryTag_RiskScore();
|
|
379
|
+
case 4:
|
|
380
|
+
return CategoryTag_COPD();
|
|
381
|
+
case 5:
|
|
382
|
+
return CategoryTag_HRA();
|
|
383
|
+
case 6:
|
|
384
|
+
return CategoryTag_HeartDisease();
|
|
385
|
+
case 7:
|
|
386
|
+
return CategoryTag_GeneralWellness();
|
|
387
|
+
case 8:
|
|
388
|
+
return CategoryTag_KidneyDisease();
|
|
389
|
+
case 9:
|
|
390
|
+
return CategoryTag_Diabetes();
|
|
391
|
+
case 10:
|
|
392
|
+
return CategoryTag_Hospital();
|
|
393
|
+
case 11:
|
|
394
|
+
return CategoryTag_MedAdherance();
|
|
395
|
+
default:
|
|
396
|
+
throw new Error(`${categoryTagIndex} is not a valid Category Tag index`);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
function CategoryTag_validate_Z524259A4(categoryTagIndex) {
|
|
400
|
+
switch(categoryTagIndex){
|
|
401
|
+
case 0:
|
|
402
|
+
case 1:
|
|
403
|
+
case 2:
|
|
404
|
+
case 3:
|
|
405
|
+
case 4:
|
|
406
|
+
case 5:
|
|
407
|
+
case 6:
|
|
408
|
+
case 7:
|
|
409
|
+
case 8:
|
|
410
|
+
case 9:
|
|
411
|
+
case 10:
|
|
412
|
+
case 11:
|
|
413
|
+
return (0, _Result.FSharpResult$2_Ok)(undefined);
|
|
414
|
+
default:
|
|
415
|
+
return (0, _Result.FSharpResult$2_Error)("Invalid value for Category Tag index");
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
function categoryTagToString(c) {
|
|
419
|
+
return CategoryTag__get_toString(c);
|
|
420
|
+
}
|
|
421
|
+
const availableCategoryTags = (0, _List.sort)((0, _List.ofArray)([
|
|
422
|
+
CategoryTag_MentalHealth(),
|
|
423
|
+
CategoryTag_IllicitDrugs(),
|
|
424
|
+
CategoryTag_Alcohol(),
|
|
425
|
+
CategoryTag_RiskScore(),
|
|
426
|
+
CategoryTag_COPD(),
|
|
427
|
+
CategoryTag_HRA(),
|
|
428
|
+
CategoryTag_HeartDisease(),
|
|
429
|
+
CategoryTag_GeneralWellness(),
|
|
430
|
+
CategoryTag_KidneyDisease(),
|
|
431
|
+
CategoryTag_Diabetes(),
|
|
432
|
+
CategoryTag_Hospital(),
|
|
433
|
+
CategoryTag_MedAdherance()
|
|
434
|
+
]), {
|
|
435
|
+
Compare: _Util.compare
|
|
436
|
+
});
|
|
437
|
+
function CategoryTagModule_getList() {
|
|
438
|
+
return (0, _List.sort)((0, _List.ofArray)([
|
|
439
|
+
CategoryTag_MentalHealth(),
|
|
440
|
+
CategoryTag_IllicitDrugs(),
|
|
441
|
+
CategoryTag_Alcohol(),
|
|
442
|
+
CategoryTag_RiskScore(),
|
|
443
|
+
CategoryTag_COPD(),
|
|
444
|
+
CategoryTag_HRA(),
|
|
445
|
+
CategoryTag_HeartDisease(),
|
|
446
|
+
CategoryTag_GeneralWellness(),
|
|
447
|
+
CategoryTag_KidneyDisease(),
|
|
448
|
+
CategoryTag_Diabetes(),
|
|
449
|
+
CategoryTag_Hospital(),
|
|
450
|
+
CategoryTag_MedAdherance()
|
|
451
|
+
]), {
|
|
452
|
+
Compare: _Util.compare
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
class FieldDetails extends _Types.Record {
|
|
456
|
+
constructor(FieldOrder, Key, Label, FieldValue, Options){
|
|
457
|
+
super();
|
|
458
|
+
this.FieldOrder = FieldOrder | 0;
|
|
459
|
+
this.Key = Key;
|
|
460
|
+
this.Label = Label;
|
|
461
|
+
this.FieldValue = FieldValue;
|
|
462
|
+
this.Options = Options;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
function FieldDetails_$reflection() {
|
|
466
|
+
return (0, _Reflection.record_type)("F1.Studio.Designer.FieldDetails", [], FieldDetails, ()=>[
|
|
467
|
+
[
|
|
468
|
+
"FieldOrder",
|
|
469
|
+
_Reflection.int32_type
|
|
470
|
+
],
|
|
471
|
+
[
|
|
472
|
+
"Key",
|
|
473
|
+
(0, _FormSpec.Shared_FieldKey_$reflection)()
|
|
474
|
+
],
|
|
475
|
+
[
|
|
476
|
+
"Label",
|
|
477
|
+
_Reflection.string_type
|
|
478
|
+
],
|
|
479
|
+
[
|
|
480
|
+
"FieldValue",
|
|
481
|
+
(0, _FormSpec.Shared_FieldValue_$reflection)()
|
|
482
|
+
],
|
|
483
|
+
[
|
|
484
|
+
"Options",
|
|
485
|
+
(0, _Reflection.list_type)((0, _FormSpec.Shared_FieldOption_$reflection)())
|
|
486
|
+
]
|
|
487
|
+
]);
|
|
488
|
+
}
|
|
489
|
+
function Converters_fieldKeyToString(key) {
|
|
490
|
+
return key.fields[0];
|
|
491
|
+
}
|
|
492
|
+
function Converters_stringToFieldKey(s) {
|
|
493
|
+
return new _FormSpec.Shared_FieldKey((0, _Guid.parse)(s));
|
|
494
|
+
}
|
|
495
|
+
function Converters_tryStringToFieldKey(s) {
|
|
496
|
+
let matchValue;
|
|
497
|
+
let outArg = "00000000-0000-0000-0000-000000000000";
|
|
498
|
+
matchValue = [
|
|
499
|
+
(0, _Guid.tryParse)(s, new _Types.FSharpRef(()=>outArg, (v)=>{
|
|
500
|
+
outArg = v;
|
|
501
|
+
})),
|
|
502
|
+
outArg
|
|
503
|
+
];
|
|
504
|
+
if (matchValue[0]) {
|
|
505
|
+
return new _FormSpec.Shared_FieldKey(matchValue[1]);
|
|
506
|
+
} else {
|
|
507
|
+
return undefined;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
function Converters_formSpecToLibrary(spec, categoryTags) {
|
|
511
|
+
return new _FormSpec.Spec_FormSpec$1(spec.Id, spec.Code, spec.Title, spec.Abstract, spec.Version, spec.FormSpecVersion, spec.Steps, (0, _List.map)(CategoryTag__get_toString, categoryTags), spec.Score, spec.AssociatedCodes, spec.RequiresReview, spec.RequiresReviewAndApproval, spec.ClinicalPathway);
|
|
512
|
+
}
|
|
513
|
+
function Converters_formSpecFromLibrary(spec) {
|
|
514
|
+
return [
|
|
515
|
+
spec,
|
|
516
|
+
(0, _List.map)(CategoryTag_fromString_Z721C83C5, spec.CategoryTags)
|
|
517
|
+
];
|
|
518
|
+
}
|
|
519
|
+
function Converters_createFormField(order, label, fieldType) {
|
|
520
|
+
return new _FormSpec.Spec_FormField$1(order, new _FormSpec.Shared_FieldKey((0, _Guid.newGuid)()), label, undefined, undefined, false, false, fieldType);
|
|
521
|
+
}
|
|
522
|
+
function Converters_fieldToDetails(field, value, options) {
|
|
523
|
+
return new FieldDetails(field.FieldOrder, field.FieldKey, field.Label, value, options);
|
|
524
|
+
} //# sourceMappingURL=Designer.ts.map
|
|
525
|
+
|
|
526
|
+
//# sourceMappingURL=Designer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../FormSpec.TS/Designer.ts"],"names":["x","s","categoryTagIndex","toString","c","key","matchValue","outArg","spec","categoryTags","fromString","order","label","fieldType","field","value","options"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAiCkBA,EAAAA,GAAAA;;mBAEY;;mBACL;;mBACE;;mBACL;;mBACD;;mBACS;;mBACG;;mBACF;;mBACL;;mBACA;;mBACI;;mBAXA;;;;WAcZC;aAAA;;aAAA;;aAAA;;aAAA;;aAAA;;aAAA;;aAAA;;aAAA;;aAAA;;aAAA;;aAAA;;aAAA;;;YAaC,WAAA,cAAA,MAAU,cAAA,EAAA,6BAA2BA;;;;WAGtCD,EAAAA,GAAAA;;mBAEY;;mBACL;;mBACE;;mBACL;;mBACD;;mBACS;;mBACG;;mBACF;;mBACL;;mBACA;;mBACI;;mBAXA;;;;WAcZA,EAAAA,GAAAA;;mBAEY;;mBACL;;mBACE;;mBACL;;mBACD;;mBACS;;mBACG;;mBACF;;mBACL;;mBACA;;mBACI;;mBAXA;;;;WAcZE;aAAA;;aAAA;;aAAA;;aAAA;;aAAA;;aAAA;;aAAA;;aAAA;;aAAA;;aAAA;;aAAA;;aAAA;;;YAaC,MAAA,IAAA,MAAS,GAAGA,iBAAAA,kCAAAA,CAAAA;;;;WAGbA;aAAA;aAAA;aAAA;aAAA;aAAA;aAAA;aAAA;aAAA;aAAA;aAAA;aAAA;aAAA;kDACkD;;qDAC3C;;;;WAGjBC,0BAAAC;;kCAIG,UAAA,MADH,aAAA,EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;CAAA,GAAA;;;;eAMO,UAAA,MADH,aAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA,GAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAyBIC,IAAAA,MAAAA,CAAAA,EAAAA;;;WAIJ,IAAA,yBAAA,CAAA,IAAA,WAAA,EAA2BJ;;;IAGrBK,IAAAA;IAAAC,IAAAA,SAAAA;IAAAD,aAAAA;QAAAA,IAAAA,cAAAA,EAAcL,GAAd,IAAA,gBAAA,CAAA,IAAAM,QAAAA,CAAAA;YAAAA,SAAAA;;QAAAA;KAAAA;IAAA,IAAAD,UAAAA,CAAAA,EAAAA,EAAAA;QACe,OAAA,IAAA,yBAAA,CAALA,UAAAA,CAAAA,EAAAA;;QACF,OAAA;;;;WAQd,IAAA,yBAAA,CAAAE,KAAAA,EAAAA,EAAAA,KAAAA,IAAAA,EAAAA,KAAAA,KAAAA,EAAAA,KAAAA,QAAAA,EAAAA,KAAAA,OAAAA,EAAAA,KAAAA,eAAAA,EAAAA,KAAAA,KAAAA,MACmC,SAAA,EAAmBL,2BAAnCM,eADnBD,KAAAA,KAAAA,EAAAA,KAAAA,eAAAA,EAAAA,KAAAA,cAAAA,EAAAA,KAAAA,yBAAAA,EAAAA,KAAAA,eAAAA;;;;QASAA;YADgC,SAAA,EAASE,kCAA9BF,KAAAA,YAAAA;KAAAA;;;WAUX,IAAA,0BAAA,CACiBG,OACF,IAAA,yBAAA,CAAA,IAAA,aAAA,MACHC,OACA,WACI,WACC,OACE,OACHC;;;WAUhB,IAAA,aACiBC,MAAAA,UAAAA,EACPA,MAAAA,QAAAA,EACEA,MAAAA,KAAAA,EACKC,OACHC"}
|