mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-28 06:05:31 +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 Dict exposing (Dict)
|
||||||
import Effect exposing (Effect)
|
import Effect exposing (Effect)
|
||||||
import ErrorPage exposing (ErrorPage)
|
import ErrorPage exposing (ErrorPage)
|
||||||
import Form exposing (Form)
|
import Form
|
||||||
import Form.Field as Field
|
import Form.Field as Field
|
||||||
import Form.FieldView
|
import Form.FieldView
|
||||||
import Form.Validation as Validation exposing (Validation)
|
import Form.Validation as Validation exposing (Validation)
|
||||||
|
@ -132,7 +132,7 @@ formParser =
|
|||||||
let
|
let
|
||||||
errors field =
|
errors field =
|
||||||
info.errors
|
info.errors
|
||||||
|> Form.errorsForField field
|
|> Form.errorsForField2 field
|
||||||
|
|
||||||
errorsView field =
|
errorsView field =
|
||||||
(-- TODO
|
(-- TODO
|
||||||
|
69
src/Form.elm
69
src/Form.elm
@ -1,13 +1,11 @@
|
|||||||
module Form exposing
|
module Form exposing
|
||||||
( Form(..), FieldErrors, HtmlForm, StyledHtmlForm
|
( Form(..), FieldErrors
|
||||||
, ParsedField
|
|
||||||
, andThen
|
, andThen
|
||||||
, Context, ViewField
|
, Context
|
||||||
, renderHtml, renderStyledHtml
|
, renderHtml, renderStyledHtml
|
||||||
, FinalForm, withGetMethod
|
, FinalForm, withGetMethod
|
||||||
, Errors, errorsForField
|
, Errors
|
||||||
, parse, runOneOfServerSide, runServerSide
|
, parse, runOneOfServerSide, runServerSide
|
||||||
, HtmlSubForm
|
|
||||||
, runOneOfServerSideWithServerValidations
|
, runOneOfServerSideWithServerValidations
|
||||||
, AppContext
|
, AppContext
|
||||||
, FieldDefinition(..)
|
, FieldDefinition(..)
|
||||||
@ -359,16 +357,6 @@ field2 name (Field fieldParser kind) (FormNew definitions parseFn toInitialValue
|
|||||||
parsedField =
|
parsedField =
|
||||||
Pages.Internal.Form.Validation (Just thing) (Just name) ( maybeParsed, Dict.empty )
|
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 :
|
myFn :
|
||||||
{ result : Dict String (List error)
|
{ result : Dict String (List error)
|
||||||
, parsedAndView : Validation error parsed kind -> parsedAndView
|
, parsedAndView : Validation error parsed kind -> parsedAndView
|
||||||
@ -574,14 +562,6 @@ type Errors error
|
|||||||
= Errors (Dict String (List 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 : Validation error parsed kind -> Errors error -> List error
|
||||||
errorsForField2 field_ (Errors errorsDict) =
|
errorsForField2 field_ (Errors errorsDict) =
|
||||||
@ -1538,15 +1518,6 @@ toResult ( maybeParsed, fieldErrors ) =
|
|||||||
Err 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 =
|
type alias HtmlFormNew error parsed data msg =
|
||||||
FormNew
|
FormNew
|
||||||
@ -1557,24 +1528,6 @@ type alias HtmlFormNew error parsed data msg =
|
|||||||
data
|
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 =
|
type alias StyledHtmlFormNew error parsed data msg =
|
||||||
FormNew
|
FormNew
|
||||||
@ -1654,22 +1607,6 @@ type FieldDefinition
|
|||||||
| HiddenField
|
| 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 : String -> List error -> Dict String (List error) -> Dict String (List error)
|
||||||
addErrorsInternal name newErrors allErrors =
|
addErrorsInternal name newErrors allErrors =
|
||||||
|
Loading…
Reference in New Issue
Block a user