mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-24 06:54:03 +03:00
Remove unused.
This commit is contained in:
parent
60a5ef19da
commit
9d8320d5fd
@ -8,7 +8,7 @@ import Date exposing (Date)
|
||||
import Dict exposing (Dict)
|
||||
import Effect exposing (Effect)
|
||||
import ErrorPage exposing (ErrorPage)
|
||||
import Form exposing (Form)
|
||||
import Form
|
||||
import Form.Field as Field
|
||||
import Form.FieldView
|
||||
import Form.Validation as Validation exposing (Validation)
|
||||
|
@ -132,7 +132,7 @@ formParser =
|
||||
let
|
||||
errors field =
|
||||
info.errors
|
||||
|> Form.errorsForField field
|
||||
|> Form.errorsForField2 field
|
||||
|
||||
errorsView field =
|
||||
(-- TODO
|
||||
|
69
src/Form.elm
69
src/Form.elm
@ -1,13 +1,11 @@
|
||||
module Form exposing
|
||||
( Form(..), FieldErrors, HtmlForm, StyledHtmlForm
|
||||
, ParsedField
|
||||
( Form(..), FieldErrors
|
||||
, andThen
|
||||
, Context, ViewField
|
||||
, Context
|
||||
, renderHtml, renderStyledHtml
|
||||
, FinalForm, withGetMethod
|
||||
, Errors, errorsForField
|
||||
, Errors
|
||||
, parse, runOneOfServerSide, runServerSide
|
||||
, HtmlSubForm
|
||||
, runOneOfServerSideWithServerValidations
|
||||
, AppContext
|
||||
, FieldDefinition(..)
|
||||
@ -359,16 +357,6 @@ field2 name (Field fieldParser kind) (FormNew definitions parseFn toInitialValue
|
||||
parsedField =
|
||||
Pages.Internal.Form.Validation (Just thing) (Just name) ( maybeParsed, Dict.empty )
|
||||
|
||||
rawField : ViewField error parsed kind
|
||||
rawField =
|
||||
{ name = name
|
||||
, value = rawFieldValue
|
||||
, status = fieldStatus
|
||||
, kind = ( kind, fieldParser.properties )
|
||||
, parsed = maybeParsed
|
||||
, errors = errors
|
||||
}
|
||||
|
||||
myFn :
|
||||
{ result : Dict String (List error)
|
||||
, parsedAndView : Validation error parsed kind -> parsedAndView
|
||||
@ -574,14 +562,6 @@ type Errors error
|
||||
= Errors (Dict String (List error))
|
||||
|
||||
|
||||
{-| -}
|
||||
errorsForField : ViewField error parsed kind -> Errors error -> List error
|
||||
errorsForField viewField (Errors errorsDict) =
|
||||
errorsDict
|
||||
|> Dict.get viewField.name
|
||||
|> Maybe.withDefault []
|
||||
|
||||
|
||||
{-| -}
|
||||
errorsForField2 : Validation error parsed kind -> Errors error -> List error
|
||||
errorsForField2 field_ (Errors errorsDict) =
|
||||
@ -1538,15 +1518,6 @@ toResult ( maybeParsed, fieldErrors ) =
|
||||
Err fieldErrors
|
||||
|
||||
|
||||
{-| -}
|
||||
type alias HtmlForm error parsed data msg =
|
||||
Form
|
||||
error
|
||||
(Validation error parsed Never)
|
||||
data
|
||||
(Context error data -> List (Html (Pages.Msg.Msg msg)))
|
||||
|
||||
|
||||
{-| -}
|
||||
type alias HtmlFormNew error parsed data msg =
|
||||
FormNew
|
||||
@ -1557,24 +1528,6 @@ type alias HtmlFormNew error parsed data msg =
|
||||
data
|
||||
|
||||
|
||||
{-| -}
|
||||
type alias HtmlSubForm error parsed data msg =
|
||||
Form
|
||||
error
|
||||
(Validation error parsed Never)
|
||||
data
|
||||
(Context error data -> List (Html (Pages.Msg.Msg msg)))
|
||||
|
||||
|
||||
{-| -}
|
||||
type alias StyledHtmlForm error parsed data msg =
|
||||
Form
|
||||
error
|
||||
(Validation error parsed Never)
|
||||
data
|
||||
(Context error data -> List (Html.Styled.Html (Pages.Msg.Msg msg)))
|
||||
|
||||
|
||||
{-| -}
|
||||
type alias StyledHtmlFormNew error parsed data msg =
|
||||
FormNew
|
||||
@ -1654,22 +1607,6 @@ type FieldDefinition
|
||||
| HiddenField
|
||||
|
||||
|
||||
{-| -}
|
||||
type alias ParsedField error parsed =
|
||||
Validation error parsed Named
|
||||
|
||||
|
||||
{-| -}
|
||||
type alias ViewField error parsed kind =
|
||||
{ name : String
|
||||
, value : Maybe String
|
||||
, status : Form.FieldStatus
|
||||
, kind : ( kind, List ( String, Encode.Value ) )
|
||||
, parsed : Maybe parsed
|
||||
, errors : List error
|
||||
}
|
||||
|
||||
|
||||
{-| -}
|
||||
addErrorsInternal : String -> List error -> Dict String (List error) -> Dict String (List error)
|
||||
addErrorsInternal name newErrors allErrors =
|
||||
|
Loading…
Reference in New Issue
Block a user