@f1studio/form-spec 5.0.0-alpha.149 → 5.0.0-alpha.152
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 +5 -3
- package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.d.ts.map +1 -1
- package/FormSpec.FS/Integrations/CorEMR/ItemTriggerConverter.d.ts +19 -0
- package/FormSpec.FS/Integrations/CorEMR/ItemTriggerConverter.d.ts.map +1 -0
- package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.d.ts +39 -2
- package/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.d.ts.map +1 -1
- package/FormSpec.FS/Interop/Facade/BlueprintFilledForm.d.ts +16 -0
- package/FormSpec.FS/Interop/Facade/BlueprintFilledForm.d.ts.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.js +3 -3
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.js +2 -2
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js +23 -21
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.js +16 -7
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/ItemTriggerConverter.js +580 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/ItemTriggerConverter.js.map +1 -0
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.js +199 -8
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.js.map +1 -1
- package/FormSpec.TS/FormSpec.FS/Interop/Facade/BlueprintFilledForm.js +25 -1
- package/FormSpec.TS/FormSpec.FS/Interop/Facade/BlueprintFilledForm.js.map +1 -1
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Encode.js.map +1 -1
- package/README.md +7 -7
- package/package.json +13 -15
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.ts +3 -3
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.ts +3 -3
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.ts +1 -1
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.ts +25 -23
- package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.ts +19 -13
- package/src/FormSpec.FS/Integrations/CorEMR/ItemTriggerConverter.ts +545 -0
- package/src/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.ts +120 -14
- package/src/FormSpec.FS/Interop/Facade/BlueprintFilledForm.ts +29 -1
- package/FormSpec.TS/FormSpec.FS/BitmaskHelpers.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/BlueprintValidation.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Components/HelloComponent.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Designer.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/FormSpec.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/FormSpecHelpers.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/FormSpecValues.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Helpers.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFieldTypeMapper.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRFormSpecValidator.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSectioning.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRSemanticReportBuilder.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRStepsBuilder.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTriggerConverter.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/FormSpecToCoreMRInsert.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/FormSystemAdapter.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormAdapter.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/ReactHookForm/ReactHookFormTypes.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/CoreMRTypes.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateDecodeTypes.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/CorEMR/TemplateManifestDecoder.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Integrations/OpenFda/OpenFdaTypes.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Interfaces.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Interop/Facade/BlueprintFilledForm.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Interop/Facade/FormAnswersGate.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Helpers.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Option.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Values.Api.Option.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Logging/LogTypes.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Migrator.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/PathwayDataExtractor.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/PathwayExecutor.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/PathwayValidator.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/PluginInterface.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Prelude.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Provenance.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Renderers/FormSpecMarkdownRenderer.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Renderers/MermaidRenderer.ts.map +0 -1
- package/FormSpec.TS/FormSpec.FS/Renderers/PathwayRenderers.ts.map +0 -1
- package/FormSpec.TS/PluginRegistration.ts.map +0 -1
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Decode.ts.map +0 -1
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Encode.ts.map +0 -1
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Extra.ts.map +0 -1
- package/FormSpec.TS/Thoth.Json/packages/Thoth.Json/Types.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Base.fs +0 -511
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Base.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Error.fs +0 -16
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Error.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Extensions.fs +0 -50
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Extensions.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Fable.Form.fableproj +0 -28
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Field.fs +0 -24
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Field.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.5.0.1/Fable.Form.Simple.fableproj +0 -31
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.5.0.1/Form.fs +0 -178
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.5.0.1/Form.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/CheckboxField.fs +0 -47
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/CheckboxField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/ColorField.fs +0 -49
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/ColorField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/DateField.fs +0 -52
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/DateField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/DateTimeLocalField.fs +0 -54
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/DateTimeLocalField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/EmailField.fs +0 -48
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/EmailField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Fable.Form.Simple.Bulma.fableproj +0 -53
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/FileField.fs +0 -132
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/FileField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Form.fs +0 -537
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Form.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/FormList.fs +0 -361
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/FormList.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Group.fs +0 -52
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Group.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Html.View.fs +0 -246
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Html.View.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/InputField.fs +0 -52
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/InputField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/NumberField.fs +0 -56
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/NumberField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/PasswordField.fs +0 -46
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/PasswordField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/RadioField.fs +0 -51
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/RadioField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/SearchField.fs +0 -49
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/SearchField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Section.fs +0 -60
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Section.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/SelectField.fs +0 -79
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/SelectField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/TelField.fs +0 -44
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/TelField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/TextField.fs +0 -49
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/TextField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/TextareaField.fs +0 -59
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/TextareaField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/TimeField.fs +0 -44
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/TimeField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Types.fs +0 -143
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Bulma.5.0.1/Types.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/CheckboxField.fs +0 -36
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/CheckboxField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/ColorField.fs +0 -49
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/ColorField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/DateField.fs +0 -67
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/DateField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/DateTimeLocalField.fs +0 -70
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/DateTimeLocalField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/EmailField.fs +0 -76
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/EmailField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/Fable.Form.Simple.Fields.Html.fableproj +0 -45
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/NumberField.fs +0 -105
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/NumberField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/PasswordField.fs +0 -66
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/PasswordField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/RadioField.fs +0 -72
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/RadioField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/RangeField.fs +0 -102
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/RangeField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/SearchField.fs +0 -83
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/SearchField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/SelectField.fs +0 -83
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/SelectField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/TelField.fs +0 -63
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/TelField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/TextField.fs +0 -83
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/TextField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/TextareaField.fs +0 -92
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/TextareaField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/TimeField.fs +0 -108
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.Fields.Html.1.0.1/TimeField.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs +0 -57
- package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/Fable.Promise.fableproj +0 -20
- package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/Promise.fs +0 -766
- package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/Promise.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs +0 -31
- package/FormSpec.TS/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.Extensions.fs +0 -17
- package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.Hooks.fs +0 -152
- package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.Hooks.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.Types.fableproj +0 -28
- package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.fs +0 -218
- package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Fable.ReactDom.Types.18.2.0/Fable.ReactDom.Types.fableproj +0 -27
- package/FormSpec.TS/fable_modules/Fable.ReactDom.Types.18.2.0/Fable.ReactDom.fs +0 -82
- package/FormSpec.TS/fable_modules/Fable.ReactDom.Types.18.2.0/Fable.ReactDom.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/BorderStyle.fs +0 -59
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Colors.fs +0 -154
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Colors.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/DateParsing.fs +0 -52
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/DateParsing.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Feliz.fableproj +0 -53
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Fonts.fs +0 -240
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/GridTypes.fs +0 -24
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Helpers.fs +0 -11
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Helpers.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Html.fs +0 -826
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Internal.fs +0 -176
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Internal.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Interop.fs +0 -29
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Interop.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Key.fs +0 -65
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Key.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Length.fs +0 -145
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Locale.fs +0 -876
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Properties.fs +0 -4085
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Properties.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/React.fs +0 -494
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/ReactDOM.fs +0 -25
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/ReactDOM.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/ReactInterop.fs +0 -20
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/ReactTypes.fs +0 -42
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/ReactTypes.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/StyleTypes.fs +0 -57
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/StyleTypes.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Styles.fs +0 -6378
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Svg.fs +0 -1455
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Svg.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/TextDecorationLine.fs +0 -13
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/TextDecorationStyle.fs +0 -33
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Transform.fs +0 -181
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/TransformOrigin.fs +0 -17
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/TransitionProperty.fs +0 -162
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/TransitionTimingFunction.fs +0 -62
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Types.fs +0 -13
- package/FormSpec.TS/fable_modules/Feliz.2.8.0/Types.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Feliz.Bulma.3.0.0/Bulma.fs +0 -990
- package/FormSpec.TS/fable_modules/Feliz.Bulma.3.0.0/ElementBuilders.fs +0 -179
- package/FormSpec.TS/fable_modules/Feliz.Bulma.3.0.0/ElementBuilders.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Feliz.Bulma.3.0.0/Feliz.Bulma.fableproj +0 -32
- package/FormSpec.TS/fable_modules/Feliz.Bulma.3.0.0/Modifiers.fs +0 -1986
- package/FormSpec.TS/fable_modules/Feliz.Bulma.3.0.0/Modifiers.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Feliz.Bulma.3.0.0/Operators.fs +0 -7
- package/FormSpec.TS/fable_modules/Feliz.Bulma.3.0.0/Operators.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/Feliz.Bulma.3.0.0/PropertyBuilders.fs +0 -8
- package/FormSpec.TS/fable_modules/Glutinum.Feliz.ReactSignaturePadWrapper.1.0.2/Exports.fs +0 -14
- package/FormSpec.TS/fable_modules/Glutinum.Feliz.ReactSignaturePadWrapper.1.0.2/Glutinum.Feliz.ReactSignaturePadWrapper.fableproj +0 -18
- package/FormSpec.TS/fable_modules/Glutinum.Feliz.ReactSignaturePadWrapper.1.0.2/Interop.fs +0 -6
- package/FormSpec.TS/fable_modules/Glutinum.Feliz.ReactSignaturePadWrapper.1.0.2/ReactSignaturePadWrapper.fs +0 -32
- package/FormSpec.TS/fable_modules/Glutinum.Feliz.ReactSignaturePadWrapper.1.0.2/Types.fs +0 -3
- package/FormSpec.TS/fable_modules/Glutinum.Feliz.ReactSignaturePadWrapper.1.0.2/Types.fs.ts.map +0 -1
- package/FormSpec.TS/fable_modules/project_cracked.json +0 -1
- package/FormSpec.TS/plugins/allergyfinder/src/AllergyFinderField.ts.map +0 -1
- package/FormSpec.TS/plugins/allergyfinder/src/AllergyLogic.ts.map +0 -1
- package/FormSpec.TS/plugins/allergyfinder/src/OpenFdaClient.ts.map +0 -1
- package/FormSpec.TS/plugins/bmi/src/BMIField.ts.map +0 -1
- package/FormSpec.TS/plugins/demographics/src/DemographicsField.ts.map +0 -1
- package/FormSpec.TS/plugins/likert/src/LikertField.ts.map +0 -1
- package/FormSpec.TS/plugins/signature/src/SignatureField.ts.map +0 -1
- package/FormSpec.TS/plugins/vitals/src/VitalsField.ts.map +0 -1
- package/FormSpec.TS/plugins/vitals/src/VitalsLogic.ts.map +0 -1
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
namespace Fable.Form.Simple.Bulma.Fields
|
|
2
|
-
|
|
3
|
-
open Fable.Form
|
|
4
|
-
open Feliz
|
|
5
|
-
open Feliz.Bulma
|
|
6
|
-
open Fable.Form.Simple.Bulma
|
|
7
|
-
|
|
8
|
-
module FileField =
|
|
9
|
-
|
|
10
|
-
[<RequireQualifiedAccess>]
|
|
11
|
-
type FileType =
|
|
12
|
-
| Any
|
|
13
|
-
| Specific of string list
|
|
14
|
-
|
|
15
|
-
type FileIconClassName =
|
|
16
|
-
| DefaultIcon
|
|
17
|
-
| CustomIcon of string
|
|
18
|
-
|
|
19
|
-
type Attributes =
|
|
20
|
-
{
|
|
21
|
-
FieldId: string
|
|
22
|
-
Label: string
|
|
23
|
-
InputLabel: string
|
|
24
|
-
Accept: FileType
|
|
25
|
-
FileIconClassName: FileIconClassName
|
|
26
|
-
Multiple: bool
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
interface Field.IAttributes with
|
|
30
|
-
|
|
31
|
-
member this.GetFieldId() = this.FieldId
|
|
32
|
-
|
|
33
|
-
type InnerField<'Values> = Field.Field<Attributes, Browser.Types.File array, 'Values>
|
|
34
|
-
|
|
35
|
-
let form<'Values, 'Field, 'Output>
|
|
36
|
-
: ((InnerField<'Values> -> 'Field)
|
|
37
|
-
-> Base.FieldConfig<Attributes, Browser.Types.File array, 'Values, 'Output>
|
|
38
|
-
-> Base.Form<'Values, 'Output, 'Field>) =
|
|
39
|
-
Base.field Array.isEmpty
|
|
40
|
-
|
|
41
|
-
type Field<'Values>(innerField: InnerField<'Values>) =
|
|
42
|
-
|
|
43
|
-
inherit IStandardField<'Values, Browser.Types.File array, Attributes>(innerField)
|
|
44
|
-
|
|
45
|
-
interface IField<'Values> with
|
|
46
|
-
|
|
47
|
-
member _.MapFieldValues(update: 'Values -> 'NewValues) : IField<'NewValues> =
|
|
48
|
-
|
|
49
|
-
Field(Field.mapValues update innerField)
|
|
50
|
-
|
|
51
|
-
override _.RenderField
|
|
52
|
-
(config: StandardRenderFieldConfig<Browser.Types.File array, Attributes>)
|
|
53
|
-
=
|
|
54
|
-
|
|
55
|
-
let fileInput =
|
|
56
|
-
Bulma.file [
|
|
57
|
-
if not (config.Value |> Array.isEmpty) then
|
|
58
|
-
file.hasName
|
|
59
|
-
|
|
60
|
-
prop.children [
|
|
61
|
-
Bulma.fileLabel.label [
|
|
62
|
-
// File input don't support readonly so we need to prevent the pointer events
|
|
63
|
-
if config.IsReadOnly then
|
|
64
|
-
prop.style [
|
|
65
|
-
style.pointerEvents.none
|
|
66
|
-
]
|
|
67
|
-
prop.children [
|
|
68
|
-
Bulma.fileInput [
|
|
69
|
-
prop.onInput (fun x ->
|
|
70
|
-
let files =
|
|
71
|
-
(x.currentTarget :?> Browser.Types.HTMLInputElement)
|
|
72
|
-
.files
|
|
73
|
-
|
|
74
|
-
let files = Array.init files.length (fun i -> files[i])
|
|
75
|
-
|
|
76
|
-
files |> config.OnChange
|
|
77
|
-
)
|
|
78
|
-
|
|
79
|
-
prop.multiple config.Attributes.Multiple
|
|
80
|
-
|
|
81
|
-
match config.Attributes.Accept with
|
|
82
|
-
| FileType.Any -> ()
|
|
83
|
-
| FileType.Specific fileTypes ->
|
|
84
|
-
prop.accept (fileTypes |> String.concat ",")
|
|
85
|
-
|
|
86
|
-
prop.disabled config.Disabled
|
|
87
|
-
]
|
|
88
|
-
Bulma.fileCta [
|
|
89
|
-
match config.Attributes.FileIconClassName with
|
|
90
|
-
| DefaultIcon ->
|
|
91
|
-
Bulma.fileIcon [
|
|
92
|
-
prop.innerHtml
|
|
93
|
-
"""<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-upload">
|
|
94
|
-
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
|
|
95
|
-
<polyline points="17 8 12 3 7 8"/>
|
|
96
|
-
<line x1="12" x2="12" y1="3" y2="15"/>
|
|
97
|
-
</svg>
|
|
98
|
-
<!--
|
|
99
|
-
This icon has been taken from Lucide icons project
|
|
100
|
-
|
|
101
|
-
See: https://lucide.dev/license
|
|
102
|
-
-->"""
|
|
103
|
-
]
|
|
104
|
-
|
|
105
|
-
| CustomIcon className ->
|
|
106
|
-
Bulma.fileIcon [
|
|
107
|
-
Html.i [
|
|
108
|
-
prop.className className
|
|
109
|
-
]
|
|
110
|
-
]
|
|
111
|
-
|
|
112
|
-
Bulma.fileLabel.span [
|
|
113
|
-
prop.text config.Attributes.InputLabel
|
|
114
|
-
prop.onClick (fun ev ->
|
|
115
|
-
ev.stopPropagation ()
|
|
116
|
-
ev.stopImmediatePropagation ()
|
|
117
|
-
)
|
|
118
|
-
]
|
|
119
|
-
]
|
|
120
|
-
|
|
121
|
-
if not (config.Value |> Array.isEmpty) then
|
|
122
|
-
Bulma.fileName [
|
|
123
|
-
prop.text (config.Value |> Array.head).name
|
|
124
|
-
]
|
|
125
|
-
]
|
|
126
|
-
]
|
|
127
|
-
|
|
128
|
-
]
|
|
129
|
-
]
|
|
130
|
-
|
|
131
|
-
fileInput
|
|
132
|
-
|> Html.View.withLabelAndError config.Attributes.Label config.ShowError config.Error
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["./FileField.fs","../Feliz.2.8.0/Interop.fs","../Feliz.2.8.0/Html.fs","../Feliz.Bulma.3.0.0/ElementBuilders.fs","../Feliz.Bulma.3.0.0/Bulma.fs","../Feliz.Bulma.3.0.0/PropertyBuilders.fs","../Feliz.Bulma.3.0.0/Modifiers.fs","../Feliz.2.8.0/Properties.fs","../Feliz.2.8.0/Styles.fs"],"names":["this","array","build","config","innerField","elems","files","x","i","matchValue","children","content","ev","_","\u0060\u0060.ctor\u0060\u0060","update"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BmBA,kCAAAA;AAAoB,eAAA,AAAAA;;;;;;;;;2QAQ/B,8EAAW,AAAAC,qBAAXC,OAAAC;;;;;;cAIsEC;AAFtD,4BAAAA;;;eA2FT,kBAA4B,AAAAD,yBAAwB,AAAAA,kBAAiB,AAAAA,cC1HhB,mBCuLZ,iBCpKc,uBCqPN,QJ1NrC,uBACP,sDAAA,uBAAA,AAAG,EAAqB,AAAhB,AAAAA,6BACJ,2BKrD2B,aCy6CS,gCNr3CxC,yBAGA;gBOsXeE;mBPtXf,2BOsXeA,WNxaiC,mBC0aV,mBC5Xc,uBCklBD,cJ7kBzB,uBAElB,sDAAA,uBAAA,AAAG,AAAAF,oBACC,2BOyoDoD;\u002BBCggHhB;mCR1oKxC,yBAIA;oBO\u002BWOE;uBP/WP,2BO\u002BWOA,UP/WO,qBACV,kDAAA,qBAAA,wBC1DoC,mBC0ZV,mBCpWtC,MIw2H\u002BB,QAAO,0BJx2H/B,uBCiJoD,cJ7I/B,uBACZ,sDAAA,uBAAA,2BO\u002BkCuC;AP9kC/BC,4CACA,CAAC,AAAAC;AAKL,AAAS,AAAAJ,oCAFG,iBAAW,AAAAG,mCAAuB,AAAAA,MAAME;sCAKxD,sDAAA,uBAAA,2BO44B6B,YP54Bf,AAAAL,\u002BCAEd;wBAAMM;2BAAN,wBAAMA,aAAA,AAAAN,0BAAA,CAAA,AAAAM,uCAGF,2BO4ByB,UP5BC,KAAc,KAAxC,AAAAA,4CAFc,2BAIlB,sDAAA,2BO2e6B,YP3ef,AAAAN;8BAElB;wBGRKO;2BHQL,qBAAA,yBGRKA,aHQS,qBACV;4BAAMD,wCGTLC,kCI2tBDC;\u002BBPltBA,sBAAMF,eAAA,AAAAN,qCAAA,CAAA,AAAAM,2CAiBF,yBG1BHC,YFtE\u002BB,mBC2Yd;uCF3Sd,AAAAD;6BChG4B,mBCipBX;uCE7bmC;sCGoNS,qCJlWWC;\u002BBHWxE,wBCjF4B,mBCipBX,kBC5kBc,uBC8IF,aJlId,aOgtBnBC,UP9sBY,oeO8sBsB;oCAAoDA;oDP3rBtF,kDAAA,wBCtGgC,mBCipBX,kBC5kBc,uBCikBF,cJhiBZ,UOwoDM,YPvoDb,AAAAR,iDOs9B8B;APp9BpC,AAAAS;AACA,AAAAA;;yBC1GwB,mBCipBX;mCEvckC;kCG8NU,qCJlWWF;0BHyChF,mDAAA,AAAG,EAAqB,AAAhB,AAAAP,6BACJ,wBChHgC,mBCipBX,kBC5kBc,uBCwIF,aJ7FlB,aO8nDY,YP7nDb,AAAiB,WAAhB,AAAAA,4CAFnB;wBOyTyD,YAAY,qCAA\u002BCE;wBAA3D,YAAY,qCAA\u002BCA;;;;APnYjIQ,mCAAAA;AAEH,eAAA,AAAAC,4BAAM,0CAAgBC,QAAO,AAAAF","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -1,537 +0,0 @@
|
|
|
1
|
-
namespace Fable.Form.Simple.Bulma
|
|
2
|
-
|
|
3
|
-
open Fable.Form
|
|
4
|
-
open Fable.Form.Simple.Fields.Html
|
|
5
|
-
open Fable.Form.Simple.Bulma.Fields
|
|
6
|
-
|
|
7
|
-
[<RequireQualifiedAccess>]
|
|
8
|
-
module Form =
|
|
9
|
-
|
|
10
|
-
module View =
|
|
11
|
-
|
|
12
|
-
open Fable.Form.Simple
|
|
13
|
-
|
|
14
|
-
let asHtml
|
|
15
|
-
(config: Form.View.ViewConfig<'Values, 'Output, Feliz.ReactElement>)
|
|
16
|
-
: Form<'Values, 'Output> -> Form.View.Model<'Values> -> Feliz.ReactElement
|
|
17
|
-
=
|
|
18
|
-
Form.View.custom config Html.View.form Html.View.renderField
|
|
19
|
-
|
|
20
|
-
(*
|
|
21
|
-
Combinators functions are used to combine multiple forms together to create a more complex form.
|
|
22
|
-
|
|
23
|
-
Below, we redefine some functions from the Base module so the user can access them transparently,
|
|
24
|
-
and they are also specifically typed for the Fable.Form.Simple.Bulma abstraction
|
|
25
|
-
*)
|
|
26
|
-
|
|
27
|
-
/// <summary>
|
|
28
|
-
/// Create a form that always succeeds when filled.
|
|
29
|
-
/// </summary>
|
|
30
|
-
/// <param name="output">The value to return when the form is filled</param>
|
|
31
|
-
/// <returns>The given <c>Output</c></returns>
|
|
32
|
-
let succeed (output: 'Output) : Form<'Values, 'Output> = Base.succeed output
|
|
33
|
-
|
|
34
|
-
/// <summary>
|
|
35
|
-
/// Append a form to another one while <b>capturing</b> the output of the first one
|
|
36
|
-
/// </summary>
|
|
37
|
-
/// <param name="newForm">Form to append</param>
|
|
38
|
-
/// <param name="currentForm">Form to append to</param>
|
|
39
|
-
/// <returns>A new form resulting in the combination of <c>newForm</c> and <c>currentForm</c></returns>
|
|
40
|
-
/// <example>
|
|
41
|
-
/// <code lang="fsharp">
|
|
42
|
-
/// let emailField =
|
|
43
|
-
/// Form.emailField
|
|
44
|
-
/// {
|
|
45
|
-
/// // ...
|
|
46
|
-
/// }
|
|
47
|
-
///
|
|
48
|
-
/// let passwordField =
|
|
49
|
-
/// Form.passwordField
|
|
50
|
-
/// {
|
|
51
|
-
/// // ...
|
|
52
|
-
/// }
|
|
53
|
-
///
|
|
54
|
-
/// let onSubmit =
|
|
55
|
-
/// fun email password ->
|
|
56
|
-
/// LogIn (email, password)
|
|
57
|
-
///
|
|
58
|
-
/// Form.succeed onSubmit
|
|
59
|
-
/// |> Form.append emailField
|
|
60
|
-
/// |> Form.append passwordField
|
|
61
|
-
/// </code>
|
|
62
|
-
///
|
|
63
|
-
/// In this example, <c>append</c> is used to feed <c>onSubmit</c> function and combine it into a <c>Login</c> message when submitted.
|
|
64
|
-
/// </example>
|
|
65
|
-
let append
|
|
66
|
-
(newForm: Form<'Values, 'A>)
|
|
67
|
-
(currentForm: Form<'Values, 'A -> 'B>)
|
|
68
|
-
: Form<'Values, 'B>
|
|
69
|
-
=
|
|
70
|
-
|
|
71
|
-
Base.append newForm currentForm
|
|
72
|
-
|
|
73
|
-
/// <summary>
|
|
74
|
-
/// Disable a form
|
|
75
|
-
///
|
|
76
|
-
/// You can combine this with meta to disable parts of a form based on its own values.
|
|
77
|
-
/// </summary>
|
|
78
|
-
/// <param name="form">The form to disable</param>
|
|
79
|
-
/// <returns>A new form which has been marked as disabled</returns>
|
|
80
|
-
let disable (form: Form<'Values, 'A>) : Form<'Values, 'A> =
|
|
81
|
-
|
|
82
|
-
Base.disable form
|
|
83
|
-
|
|
84
|
-
/// <summary>
|
|
85
|
-
/// Disable a form based on a condition
|
|
86
|
-
///
|
|
87
|
-
/// You can combine this with meta to disable parts of a form based on its own values.
|
|
88
|
-
/// </summary>
|
|
89
|
-
/// <param name="condition">The condition to check</param>
|
|
90
|
-
/// <param name="form">The form to disable</param>
|
|
91
|
-
/// <returns>A new form which has been marked as disabled if the condition is <c>true</c></returns>
|
|
92
|
-
let disableIf (condition: bool) (form: Form<'Values, 'A>) : Form<'Values, 'A> =
|
|
93
|
-
Base.disableIf condition form
|
|
94
|
-
|
|
95
|
-
/// <summary>
|
|
96
|
-
/// Make a form read-only
|
|
97
|
-
///
|
|
98
|
-
/// You can combine this with meta to make parts of a form read-only based on its own values.
|
|
99
|
-
/// </summary>
|
|
100
|
-
/// <param name="form">The form to make read-only</param>
|
|
101
|
-
/// <returns>A new form which has been marked as read-only</returns>
|
|
102
|
-
let readOnly (form: Form<'Values, 'A>) : Form<'Values, 'A> = Base.readOnly form
|
|
103
|
-
|
|
104
|
-
/// <summary>
|
|
105
|
-
/// Make a form read-only based on a condition
|
|
106
|
-
///
|
|
107
|
-
/// You can combine this with meta to make parts of a form read-only based on its own values.
|
|
108
|
-
/// </summary>
|
|
109
|
-
/// <param name="condition">The condition to check</param>
|
|
110
|
-
/// <param name="form">The form to make read-only</param>
|
|
111
|
-
/// <returns>A new form which has been marked as read-only if the condition is <c>true</c></returns>
|
|
112
|
-
let readOnlyIf (condition: bool) (form: Form<'Values, 'A>) : Form<'Values, 'A> =
|
|
113
|
-
Base.readOnlyIf condition form
|
|
114
|
-
|
|
115
|
-
/// <summary>
|
|
116
|
-
/// Fill a form <c>andThen</c> fill another one.
|
|
117
|
-
///
|
|
118
|
-
/// This type of form is useful when some part of your form can dynamically change based on the value of another field.
|
|
119
|
-
/// </summary>
|
|
120
|
-
/// <param name="child">The child form</param>
|
|
121
|
-
/// <param name="parent">The parent form which is filled first</param>
|
|
122
|
-
/// <returns>A new form which is the result of filling the <c>parent</c> and then filling the <c>child</c> form</returns>
|
|
123
|
-
/// <example>
|
|
124
|
-
/// <para>Imagine you have a form to create a student or a teacher. Based on the type of user selected you can show the student form or the teacher form.</para>
|
|
125
|
-
/// <code lang="fsharp">
|
|
126
|
-
/// Form.selectField
|
|
127
|
-
/// {
|
|
128
|
-
/// Parser = function
|
|
129
|
-
/// | "student" ->
|
|
130
|
-
/// Ok Student
|
|
131
|
-
///
|
|
132
|
-
/// | "teacher" ->
|
|
133
|
-
/// Ok Teacher
|
|
134
|
-
///
|
|
135
|
-
/// | _ ->
|
|
136
|
-
/// Error "Invalid user type"
|
|
137
|
-
/// Value =
|
|
138
|
-
/// fun values -> values.UserType
|
|
139
|
-
/// Update =
|
|
140
|
-
/// fun newValue values ->
|
|
141
|
-
/// { values with UserType = newValue }
|
|
142
|
-
/// Error =
|
|
143
|
-
/// fun _ -> None
|
|
144
|
-
/// Attributes =
|
|
145
|
-
/// {
|
|
146
|
-
/// Label = "Type of user"
|
|
147
|
-
/// Placeholder = "Choose a user type"
|
|
148
|
-
/// Options =
|
|
149
|
-
/// [
|
|
150
|
-
/// "student", "Student"
|
|
151
|
-
/// "teacher", "Teacher"
|
|
152
|
-
/// ]
|
|
153
|
-
/// }
|
|
154
|
-
/// }
|
|
155
|
-
/// |> Form.andThen (
|
|
156
|
-
/// function
|
|
157
|
-
/// | Student ->
|
|
158
|
-
/// let nameField =
|
|
159
|
-
/// Form.textField
|
|
160
|
-
/// {
|
|
161
|
-
/// // ...
|
|
162
|
-
/// }
|
|
163
|
-
///
|
|
164
|
-
/// Form.succeed NewStudent
|
|
165
|
-
/// |> Form.append nameField
|
|
166
|
-
///
|
|
167
|
-
/// | Teacher ->
|
|
168
|
-
/// let nameField =
|
|
169
|
-
/// Form.textField
|
|
170
|
-
/// {
|
|
171
|
-
/// // ...
|
|
172
|
-
/// }
|
|
173
|
-
///
|
|
174
|
-
/// let subjectField =
|
|
175
|
-
/// Form.textField
|
|
176
|
-
/// {
|
|
177
|
-
/// // ...
|
|
178
|
-
/// }
|
|
179
|
-
///
|
|
180
|
-
/// let onSubmit name subject =
|
|
181
|
-
/// NewTeacher (name, subject)
|
|
182
|
-
///
|
|
183
|
-
/// Form.succeed onSubmit
|
|
184
|
-
/// |> Form.append nameField
|
|
185
|
-
/// |> Form.append subjectField
|
|
186
|
-
/// )
|
|
187
|
-
/// </code>
|
|
188
|
-
/// </example>
|
|
189
|
-
let andThen (child: 'A -> Form<'Values, 'B>) (parent: Form<'Values, 'A>) : Form<'Values, 'B> =
|
|
190
|
-
|
|
191
|
-
Base.andThen child parent
|
|
192
|
-
|
|
193
|
-
/// <summary>
|
|
194
|
-
/// Make a form be <b>optional</b>
|
|
195
|
-
///
|
|
196
|
-
/// If the form has values set, it will return <c>Some 'Value</c>.
|
|
197
|
-
///
|
|
198
|
-
/// Otherwise, it returns <c>None</c>.
|
|
199
|
-
/// </summary>
|
|
200
|
-
/// <param name="form">Form to make optional</param>
|
|
201
|
-
/// <example>
|
|
202
|
-
/// <code lang="fsharp">
|
|
203
|
-
/// let emailField =
|
|
204
|
-
/// Form.emailField
|
|
205
|
-
/// {
|
|
206
|
-
/// // ...
|
|
207
|
-
/// }
|
|
208
|
-
///
|
|
209
|
-
/// let ageField =
|
|
210
|
-
/// Form.numberField
|
|
211
|
-
/// {
|
|
212
|
-
/// // ...
|
|
213
|
-
/// }
|
|
214
|
-
///
|
|
215
|
-
/// let onSubmit =
|
|
216
|
-
/// fun email ageOpt ->
|
|
217
|
-
/// LogIn (email, ageOpt)
|
|
218
|
-
///
|
|
219
|
-
/// Form.succeed onSubmit
|
|
220
|
-
/// |> Form.append emailField
|
|
221
|
-
/// |> Form.append (Form.optional ageField)
|
|
222
|
-
/// </code>
|
|
223
|
-
/// </example>
|
|
224
|
-
/// <returns>An optional form</returns>
|
|
225
|
-
let optional (form: Form<'Values, 'A>) : Form<'Values, 'A option> =
|
|
226
|
-
|
|
227
|
-
Base.optional form
|
|
228
|
-
|
|
229
|
-
/// <summary>
|
|
230
|
-
/// Build a form that depends on its own <c>'Values</c>
|
|
231
|
-
///
|
|
232
|
-
/// This is useful when a field need to checks it's value against another field value.
|
|
233
|
-
///
|
|
234
|
-
/// The classic example for using <c>meta</c> is when dealing with a repeat password field.
|
|
235
|
-
/// </summary>
|
|
236
|
-
/// <param name="fn">Function to apply to transform the form values</param>
|
|
237
|
-
/// <returns>A new form resulting of the application of <c>fn</c> when filling it</returns>
|
|
238
|
-
/// <example>
|
|
239
|
-
/// The classic example for using <c>Base.meta</c> is when dealing with a repeat password field.
|
|
240
|
-
/// <code lang="fsharp">
|
|
241
|
-
/// Form.meta
|
|
242
|
-
/// (fun values ->
|
|
243
|
-
/// Form.passwordField
|
|
244
|
-
/// {
|
|
245
|
-
/// Parser =
|
|
246
|
-
/// fun value ->
|
|
247
|
-
/// if value = values.Password then
|
|
248
|
-
/// Ok ()
|
|
249
|
-
///
|
|
250
|
-
/// else
|
|
251
|
-
/// Error "The passwords do not match"
|
|
252
|
-
/// Value = fun values -> values.RepeatPassword
|
|
253
|
-
/// Update =
|
|
254
|
-
/// fun newValue values_ ->
|
|
255
|
-
/// { values_ with RepeatPassword = newValue }
|
|
256
|
-
/// Error =
|
|
257
|
-
/// fun _ -> None
|
|
258
|
-
/// Attributes =
|
|
259
|
-
/// {
|
|
260
|
-
/// Label = "Repeat password"
|
|
261
|
-
/// Placeholder = "Your password again..."
|
|
262
|
-
/// }
|
|
263
|
-
/// }
|
|
264
|
-
/// )
|
|
265
|
-
/// </code>
|
|
266
|
-
/// </example>
|
|
267
|
-
let meta (fn: 'Values -> Form<'Values, 'Output>) : Form<'Values, 'Output> =
|
|
268
|
-
|
|
269
|
-
Base.meta fn
|
|
270
|
-
|
|
271
|
-
[<NoComparison; NoEquality>]
|
|
272
|
-
type MapValuesConfig<'A, 'B> =
|
|
273
|
-
{
|
|
274
|
-
Value: 'A -> 'B
|
|
275
|
-
Update: 'B -> 'A -> 'A
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
/// <summary>
|
|
279
|
-
/// Transform the values of a form.
|
|
280
|
-
///
|
|
281
|
-
/// This function is useful when you want to re-use existing form or nest them.
|
|
282
|
-
/// </summary>
|
|
283
|
-
/// <param name="config">A record used to configure the mapping behaviour.
|
|
284
|
-
/// <para>
|
|
285
|
-
/// See <see cref="T:Fable.Form.Simple.Bulma.Form.MapValuesConfig`2"/> for more informations
|
|
286
|
-
/// </para>
|
|
287
|
-
/// </param>
|
|
288
|
-
/// <param name="form">The form to which we want to pass the result of the transformation</param>
|
|
289
|
-
/// <returns>
|
|
290
|
-
/// A new form resulting of <c>fn >> fill form</c>
|
|
291
|
-
/// </returns>
|
|
292
|
-
let mapValues
|
|
293
|
-
({
|
|
294
|
-
Value = value
|
|
295
|
-
Update = update
|
|
296
|
-
}: MapValuesConfig<'A, 'B>)
|
|
297
|
-
(form: Form<'B, 'Output>)
|
|
298
|
-
: Form<'A, 'Output>
|
|
299
|
-
=
|
|
300
|
-
|
|
301
|
-
Base.meta (fun values ->
|
|
302
|
-
form
|
|
303
|
-
|> Base.mapValues value
|
|
304
|
-
|> Base.mapField (fun field ->
|
|
305
|
-
let newUpdate oldValues = update oldValues values
|
|
306
|
-
|
|
307
|
-
field.MapFieldValues newUpdate
|
|
308
|
-
)
|
|
309
|
-
)
|
|
310
|
-
|
|
311
|
-
(*
|
|
312
|
-
Field functions are used to create fields that can be used in a form.
|
|
313
|
-
*)
|
|
314
|
-
|
|
315
|
-
let textField
|
|
316
|
-
(config: Base.FieldConfig<TextField.Attributes, string, 'Values, 'Output>)
|
|
317
|
-
: Form<'Values, 'Output>
|
|
318
|
-
=
|
|
319
|
-
TextField.form (fun field -> TextField.Field field) config
|
|
320
|
-
|
|
321
|
-
let colorField
|
|
322
|
-
(config: Base.FieldConfig<ColorField.Attributes, string, 'Values, 'Output>)
|
|
323
|
-
: Form<'Values, 'Output>
|
|
324
|
-
=
|
|
325
|
-
ColorField.form (fun field -> ColorField.Field field) config
|
|
326
|
-
|
|
327
|
-
let dateField
|
|
328
|
-
(config: Base.FieldConfig<DateField.Attributes, string, 'Values, 'Output>)
|
|
329
|
-
: Form<'Values, 'Output>
|
|
330
|
-
=
|
|
331
|
-
DateField.form (fun field -> DateField.Field field) config
|
|
332
|
-
|
|
333
|
-
let dateTimeLocalField
|
|
334
|
-
(config: Base.FieldConfig<DateTimeLocalField.Attributes, string, 'Values, 'Output>)
|
|
335
|
-
: Form<'Values, 'Output>
|
|
336
|
-
=
|
|
337
|
-
DateTimeLocalField.form (fun field -> DateTimeLocalField.Field field) config
|
|
338
|
-
|
|
339
|
-
let emailField
|
|
340
|
-
(config: Base.FieldConfig<EmailField.Attributes, string, 'Values, 'Output>)
|
|
341
|
-
: Form<'Values, 'Output>
|
|
342
|
-
=
|
|
343
|
-
EmailField.form (fun field -> EmailField.Field field) config
|
|
344
|
-
|
|
345
|
-
let numberField
|
|
346
|
-
(config: Base.FieldConfig<NumberField.Attributes, string, 'Values, 'Output>)
|
|
347
|
-
: Form<'Values, 'Output>
|
|
348
|
-
=
|
|
349
|
-
NumberField.form (fun field -> NumberField.Field field) config
|
|
350
|
-
|
|
351
|
-
let passwordField
|
|
352
|
-
(config: Base.FieldConfig<PasswordField.Attributes, string, 'Values, 'Output>)
|
|
353
|
-
: Form<'Values, 'Output>
|
|
354
|
-
=
|
|
355
|
-
PasswordField.form (fun field -> PasswordField.Field field) config
|
|
356
|
-
|
|
357
|
-
let searchField
|
|
358
|
-
(config: Base.FieldConfig<SearchField.Attributes, string, 'Values, 'Output>)
|
|
359
|
-
: Form<'Values, 'Output>
|
|
360
|
-
=
|
|
361
|
-
SearchField.form (fun field -> SearchField.Field field) config
|
|
362
|
-
|
|
363
|
-
let telField
|
|
364
|
-
(config: Base.FieldConfig<TelField.Attributes, string, 'Values, 'Output>)
|
|
365
|
-
: Form<'Values, 'Output>
|
|
366
|
-
=
|
|
367
|
-
TelField.form (fun field -> TelField.Field field) config
|
|
368
|
-
|
|
369
|
-
let timeField
|
|
370
|
-
(config: Base.FieldConfig<TimeField.Attributes, string, 'Values, 'Output>)
|
|
371
|
-
: Form<'Values, 'Output>
|
|
372
|
-
=
|
|
373
|
-
TimeField.form (fun field -> TimeField.Field field) config
|
|
374
|
-
|
|
375
|
-
let textareaField
|
|
376
|
-
(config: Base.FieldConfig<TextareaField.Attributes, string, 'Values, 'Output>)
|
|
377
|
-
: Form<'Values, 'Output>
|
|
378
|
-
=
|
|
379
|
-
TextareaField.form (fun field -> TextareaField.Field field) config
|
|
380
|
-
|
|
381
|
-
let checkboxField
|
|
382
|
-
(config: Base.FieldConfig<CheckboxField.Attributes, bool, 'Values, 'Output>)
|
|
383
|
-
: Form<'Values, 'Output>
|
|
384
|
-
=
|
|
385
|
-
CheckboxField.form (fun field -> CheckboxField.Field field) config
|
|
386
|
-
|
|
387
|
-
let radioField
|
|
388
|
-
(config:
|
|
389
|
-
Base.FieldConfig<RadioField.Attributes, RadioField.OptionItem option, 'Values, 'Output>)
|
|
390
|
-
: Form<'Values, 'Output>
|
|
391
|
-
=
|
|
392
|
-
RadioField.form (fun field -> RadioField.Field field) config
|
|
393
|
-
|
|
394
|
-
let selectField
|
|
395
|
-
(config:
|
|
396
|
-
Base.FieldConfig<SelectField.Attributes, SelectField.OptionItem option, 'Values, 'Output>)
|
|
397
|
-
: Form<'Values, 'Output>
|
|
398
|
-
=
|
|
399
|
-
SelectField.form (fun field -> SelectField.Field field) config
|
|
400
|
-
|
|
401
|
-
let fileField
|
|
402
|
-
(config: Base.FieldConfig<FileField.Attributes, Browser.Types.File array, 'Values, 'Output>)
|
|
403
|
-
: Form<'Values, 'Output>
|
|
404
|
-
=
|
|
405
|
-
FileField.form (fun field -> FileField.Field field) config
|
|
406
|
-
|
|
407
|
-
/// <summary>
|
|
408
|
-
/// Build a variable list of forms
|
|
409
|
-
///
|
|
410
|
-
/// An example is available <a href="https://mangelmaxime.github.io/Fable.Form/#form-list">on this page</a>
|
|
411
|
-
/// </summary>
|
|
412
|
-
/// <param name="config">A record used to configure the field behaviour.
|
|
413
|
-
/// <para>
|
|
414
|
-
/// See <see cref="T:Fable.Form.Base.FormList.Config"/> for more informations
|
|
415
|
-
/// </para>
|
|
416
|
-
/// </param>
|
|
417
|
-
/// <param name="elementForIndex">A function taking an index and returning a new form</param>
|
|
418
|
-
/// <returns>A form representing the list of form as a single form</returns>
|
|
419
|
-
/// <example>
|
|
420
|
-
/// <code lang="fsharp">
|
|
421
|
-
/// let bookForm (index : int) : Form.Form>BookValues,Book< =
|
|
422
|
-
/// // ...
|
|
423
|
-
///
|
|
424
|
-
/// Form.succeed onSubmit
|
|
425
|
-
/// |> Form.append (
|
|
426
|
-
/// Form.list
|
|
427
|
-
/// {
|
|
428
|
-
/// Default =
|
|
429
|
-
/// {
|
|
430
|
-
/// Title = ""
|
|
431
|
-
/// Author = ""
|
|
432
|
-
/// Summary = ""
|
|
433
|
-
/// }
|
|
434
|
-
/// Value =
|
|
435
|
-
/// fun values -> values.Books
|
|
436
|
-
/// Update =
|
|
437
|
-
/// fun newValue values ->
|
|
438
|
-
/// { values with Books = newValue }
|
|
439
|
-
/// Attributes =
|
|
440
|
-
/// {
|
|
441
|
-
/// Label = "Books"
|
|
442
|
-
/// Add = Some "Add book"
|
|
443
|
-
/// Delete = Some "Remove book"
|
|
444
|
-
/// }
|
|
445
|
-
/// }
|
|
446
|
-
/// bookForm
|
|
447
|
-
/// )
|
|
448
|
-
/// </code>
|
|
449
|
-
///
|
|
450
|
-
/// In this example, <c>append</c> is used to feed <c>onSubmit</c> function and combine it into a <c>Login</c> message when submitted.
|
|
451
|
-
/// </example>
|
|
452
|
-
let list
|
|
453
|
-
(config: FormList.Config<'Values, 'ElementValues>)
|
|
454
|
-
(elementForIndex: FormList.ElementContext -> Form<'ElementValues, 'Output>)
|
|
455
|
-
: Form<'Values, 'Output list>
|
|
456
|
-
=
|
|
457
|
-
|
|
458
|
-
let fillElement
|
|
459
|
-
(elementState: FormList.ElementState<'Values, 'ElementValues>)
|
|
460
|
-
: Base.FilledForm<'Output, IField<'Values>>
|
|
461
|
-
=
|
|
462
|
-
let filledElement =
|
|
463
|
-
let context: FormList.ElementContext =
|
|
464
|
-
{
|
|
465
|
-
FieldIdPrefix = elementState.FieldIdPrefix
|
|
466
|
-
Index = elementState.Index
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
Base.fill (elementForIndex context) elementState.ElementValues
|
|
470
|
-
|
|
471
|
-
{
|
|
472
|
-
Fields =
|
|
473
|
-
filledElement.Fields
|
|
474
|
-
|> List.map (fun filledField ->
|
|
475
|
-
{
|
|
476
|
-
State =
|
|
477
|
-
filledField.State.MapFieldValues(fun oldValues ->
|
|
478
|
-
elementState.Update oldValues elementState.Values
|
|
479
|
-
)
|
|
480
|
-
Error = filledField.Error
|
|
481
|
-
IsDisabled = filledField.IsDisabled
|
|
482
|
-
IsReadOnly = filledField.IsReadOnly
|
|
483
|
-
}
|
|
484
|
-
)
|
|
485
|
-
Result = filledElement.Result
|
|
486
|
-
IsEmpty = filledElement.IsEmpty
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
let tagger (formList: FormList.InnerField<'Values, IField<'Values>>) : IField<'Values> =
|
|
490
|
-
FormList.Field formList
|
|
491
|
-
|
|
492
|
-
FormList.form tagger config fillElement
|
|
493
|
-
|
|
494
|
-
/// <summary>
|
|
495
|
-
/// Wrap a form in a section
|
|
496
|
-
///
|
|
497
|
-
/// The behaviour of the form is not altered but it can be rendered differently.
|
|
498
|
-
///
|
|
499
|
-
/// For example, Fable.Form.Simple.Bulma will the form in section with a border and the title display above.
|
|
500
|
-
///
|
|
501
|
-
/// An example is available <a href="https://mangelmaxime.github.io/Fable.Form/#dynamic-form">on this page</a>
|
|
502
|
-
/// </summary>
|
|
503
|
-
/// <param name="title">The title to display on the section</param>
|
|
504
|
-
/// <param name="form">The form to group</param>
|
|
505
|
-
/// <returns>A form marked as a <c>Section</c> field</returns>
|
|
506
|
-
let section (title: string) (form: Form<'Values, 'Output>) : Form<'Values, 'Output> =
|
|
507
|
-
Base.custom (fun values ->
|
|
508
|
-
let res = Base.fill form values
|
|
509
|
-
|
|
510
|
-
{
|
|
511
|
-
State = SectionField.Field(title, res.Fields)
|
|
512
|
-
Result = res.Result
|
|
513
|
-
IsEmpty = res.IsEmpty
|
|
514
|
-
}
|
|
515
|
-
)
|
|
516
|
-
|
|
517
|
-
/// <summary>
|
|
518
|
-
/// Wrap a form in a group
|
|
519
|
-
///
|
|
520
|
-
/// The behaviour of the form is not altered but it can be rendered differently.
|
|
521
|
-
///
|
|
522
|
-
/// For example, Fable.Form.Simple.Bulma will render the groups horizontally.
|
|
523
|
-
///
|
|
524
|
-
/// See the fields password and repeat password <a href="https://mangelmaxime.github.io/Fable.Form/#sign-up">on this page</a>
|
|
525
|
-
/// </summary>
|
|
526
|
-
/// <param name="form">The form to group</param>
|
|
527
|
-
/// <returns>A form marked as a <c>Group</c> field</returns>
|
|
528
|
-
let group (form: Form<'Values, 'Output>) : Form<'Values, 'Output> =
|
|
529
|
-
Base.custom (fun values ->
|
|
530
|
-
let res = Base.fill form values
|
|
531
|
-
|
|
532
|
-
{
|
|
533
|
-
State = Group.Field res.Fields
|
|
534
|
-
Result = res.Result
|
|
535
|
-
IsEmpty = res.IsEmpty
|
|
536
|
-
}
|
|
537
|
-
)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["./Form.fs"],"names":["config","form","model","output","newForm","currentForm","condition","child","parent","fn","field","_arg1","oldValues","values","filledElement","elementForIndex","elementState","filledField","res","title"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qJAiBY,uDAAAA,\u002BBAAAC,MAAAC;;;;;;;WAciD,4CAAaC;;;;;;;WAuClE,yCAAYC,SAAQC;;;;;;;;;WAWpB,uCAAaJ;;;;;;;;;WAWb,yCAAeK,WAAUL;;;;;;;;;WASgC,wCAAcA;;;;;;;;;WAWvE,0CAAgBK,WAAUL;;;;;;;;;WA8E1B,0CAAaM,OAAMC;;;;;;;;;;;WAoCnB,wCAAcP;;;;;;;;;;;WA0Cd,yCAAUQ;;;;;;;;;;;;;;;;;;;;;;;WAgCV,8EAGO,mFAGC,AAAAC,6CAF0B,AAZjC,AAAAC,YAYwCC,WAAUC,UAF5C,uCAVN,AAAAF,YASGV;;;;WAiBJ,AAAgB,kFAAoCD;;;;WAMpD,AAAiB,kFAAqCA;;;;WAMtD,AAAgB,iFAAoCA;;;;WAMpD,AAAyB,2FAA6CA;;;;WAMtE,AAAiB,mFAAqCA;;;;WAMtD,AAAkB,mFAAsCA;;;;WAMxD,AAAoB,qFAAwCA;;;;WAM5D,AAAkB,gFAAsCA;;;;WAMxD,AAAe,iFAAmCA;;;;WAMlD,AAAgB,iFAAoCA;;;;WAMpD,AAAoB,qFAAwCA;;;;WAM5D,AAAoB,sFAAwCA;;;;WAO5D,AAAiB,mFAAqCA;;;;WAOtD,AAAkB,oFAAsCA;;;;WAMxD,AAAgB,oEAAoCA;;;;;;;;;WAuFpD,6GAAqBA;AA9Bbc,6EAOA,qDAAW,AAAAC,gBALP,kCACoB,AAAAC,4BACR,AAAAA,sBAGoB,AAAAA;AAExC,eAAA,iBAGW,wKACC,kBAEQ,AAAAC,\u002BEACI,AAAAD,oBAAoBJ,WAAU,AAAAI,uBAE9B,AAAAC,mBACK,AAAAA,wBACA,AAAAA,0BATrB,AAAAH,uBAYK,AAAAA,sBACC,AAAAA;;;;;;;;;;;;;;WAqBlB;AACQI,4DAAM,uCAAUjB,MAAKY;AAEzB,eAAA,kBACY,\u002BBAAmBM,OAAO,AAAAD,aACzB,AAAAA,YACC,AAAAA;;;;;;;;;;;;;;WAgBlB;AACQA,4DAAM,uCAAUjB,MAAKY;AAEzB,eAAA,kBACY,\u002BBAAY,AAAAK,aACX,AAAAA,YACC,AAAAA","file":null,"sourcesContent":null,"sourceRoot":null}
|