Commit d7ca82bd authored by arturo's avatar arturo

>>> continue

parent b2775d1d
Pipeline #2531 failed with stage
...@@ -10079,6 +10079,31 @@ h3 { ...@@ -10079,6 +10079,31 @@ h3 {
background-color: inherit; background-color: inherit;
} }
.phylo-config-form__row {
position: relative;
display: flex;
flex-wrap: wrap;
}
.phylo-config-form__group {
margin-bottom: 24px;
}
.phylo-config-form .b-fieldset {
margin-left: 1.25rem;
margin-right: 1.25rem;
}
.phylo-config-form__col {
width: 50%;
}
.phylo-config-form__col:first-child {
padding-right: 8px;
}
.phylo-config-form__col:last-child {
padding-left: 8px;
}
.phylo-config-form__submit {
text-align: center;
}
.form-group { .form-group {
position: relative; position: relative;
margin-bottom: 24px; margin-bottom: 24px;
...@@ -10943,6 +10968,20 @@ li .node.node-type-valid .text { ...@@ -10943,6 +10968,20 @@ li .node.node-type-valid .text {
background-color: #000; background-color: #000;
} }
.phylo-config-form {
background-color: #0d0d0d;
color: #cccccc;
}
.phylo-config-form__group {
padding-left: 1.25rem;
padding-right: 1.25rem;
}
.phylo-config-form__submit {
padding: 0.75rem 1.25rem;
background-color: #6f6f6f;
border-top: 1px solid rgba(0, 0, 0, 0.6);
}
.code-editor .editor .code-area { .code-editor .editor .code-area {
flex-grow: 1; flex-grow: 1;
max-height: 200px; max-height: 200px;
......
...@@ -10030,6 +10030,31 @@ h3 { ...@@ -10030,6 +10030,31 @@ h3 {
background-color: inherit; background-color: inherit;
} }
.phylo-config-form__row {
position: relative;
display: flex;
flex-wrap: wrap;
}
.phylo-config-form__group {
margin-bottom: 24px;
}
.phylo-config-form .b-fieldset {
margin-left: 1.25rem;
margin-right: 1.25rem;
}
.phylo-config-form__col {
width: 50%;
}
.phylo-config-form__col:first-child {
padding-right: 8px;
}
.phylo-config-form__col:last-child {
padding-left: 8px;
}
.phylo-config-form__submit {
text-align: center;
}
.form-group { .form-group {
position: relative; position: relative;
margin-bottom: 24px; margin-bottom: 24px;
...@@ -10894,6 +10919,20 @@ li .node.node-type-valid .text { ...@@ -10894,6 +10919,20 @@ li .node.node-type-valid .text {
background-color: #fff; background-color: #fff;
} }
.phylo-config-form {
background-color: #fff;
color: #212529;
}
.phylo-config-form__group {
padding-left: 1.25rem;
padding-right: 1.25rem;
}
.phylo-config-form__submit {
padding: 0.75rem 1.25rem;
background-color: rgba(0, 0, 0, 0.03);
border-top: 1px solid rgba(0, 0, 0, 0.125);
}
.code-editor .editor .code-area { .code-editor .editor .code-area {
flex-grow: 1; flex-grow: 1;
max-height: 200px; max-height: 200px;
......
...@@ -9787,6 +9787,31 @@ h3 { ...@@ -9787,6 +9787,31 @@ h3 {
background-color: inherit; background-color: inherit;
} }
.phylo-config-form__row {
position: relative;
display: flex;
flex-wrap: wrap;
}
.phylo-config-form__group {
margin-bottom: 24px;
}
.phylo-config-form .b-fieldset {
margin-left: 1.25rem;
margin-right: 1.25rem;
}
.phylo-config-form__col {
width: 50%;
}
.phylo-config-form__col:first-child {
padding-right: 8px;
}
.phylo-config-form__col:last-child {
padding-left: 8px;
}
.phylo-config-form__submit {
text-align: center;
}
.form-group { .form-group {
position: relative; position: relative;
margin-bottom: 24px; margin-bottom: 24px;
...@@ -10651,6 +10676,20 @@ li .node.node-type-valid .text { ...@@ -10651,6 +10676,20 @@ li .node.node-type-valid .text {
background-color: #fff; background-color: #fff;
} }
.phylo-config-form {
background-color: #fff;
color: #212529;
}
.phylo-config-form__group {
padding-left: 1.25rem;
padding-right: 1.25rem;
}
.phylo-config-form__submit {
padding: 0.75rem 1.25rem;
background-color: rgba(0, 0, 0, 0.03);
border-top: 1px solid rgba(0, 0, 0, 0.125);
}
.code-editor .editor .code-area { .code-editor .editor .code-area {
flex-grow: 1; flex-grow: 1;
max-height: 200px; max-height: 200px;
......
...@@ -10036,6 +10036,31 @@ h3 { ...@@ -10036,6 +10036,31 @@ h3 {
background-color: inherit; background-color: inherit;
} }
.phylo-config-form__row {
position: relative;
display: flex;
flex-wrap: wrap;
}
.phylo-config-form__group {
margin-bottom: 24px;
}
.phylo-config-form .b-fieldset {
margin-left: 1.25rem;
margin-right: 1.25rem;
}
.phylo-config-form__col {
width: 50%;
}
.phylo-config-form__col:first-child {
padding-right: 8px;
}
.phylo-config-form__col:last-child {
padding-left: 8px;
}
.phylo-config-form__submit {
text-align: center;
}
.form-group { .form-group {
position: relative; position: relative;
margin-bottom: 24px; margin-bottom: 24px;
...@@ -10900,6 +10925,20 @@ li .node.node-type-valid .text { ...@@ -10900,6 +10925,20 @@ li .node.node-type-valid .text {
background-color: #fff; background-color: #fff;
} }
.phylo-config-form {
background-color: #fff;
color: #212529;
}
.phylo-config-form__group {
padding-left: 1.25rem;
padding-right: 1.25rem;
}
.phylo-config-form__submit {
padding: 0.75rem 1.25rem;
background-color: rgba(0, 0, 0, 0.03);
border-top: 1px solid rgba(0, 0, 0, 0.125);
}
.code-editor .editor .code-area { .code-editor .editor .code-area {
flex-grow: 1; flex-grow: 1;
max-height: 200px; max-height: 200px;
......
...@@ -10036,6 +10036,31 @@ h3 { ...@@ -10036,6 +10036,31 @@ h3 {
background-color: inherit; background-color: inherit;
} }
.phylo-config-form__row {
position: relative;
display: flex;
flex-wrap: wrap;
}
.phylo-config-form__group {
margin-bottom: 24px;
}
.phylo-config-form .b-fieldset {
margin-left: 1.25rem;
margin-right: 1.25rem;
}
.phylo-config-form__col {
width: 50%;
}
.phylo-config-form__col:first-child {
padding-right: 8px;
}
.phylo-config-form__col:last-child {
padding-left: 8px;
}
.phylo-config-form__submit {
text-align: center;
}
.form-group { .form-group {
position: relative; position: relative;
margin-bottom: 24px; margin-bottom: 24px;
...@@ -10900,6 +10925,20 @@ li .node.node-type-valid .text { ...@@ -10900,6 +10925,20 @@ li .node.node-type-valid .text {
background-color: #fff; background-color: #fff;
} }
.phylo-config-form {
background-color: #fff;
color: #212529;
}
.phylo-config-form__group {
padding-left: 1.25rem;
padding-right: 1.25rem;
}
.phylo-config-form__submit {
padding: 0.75rem 1.25rem;
background-color: rgba(0, 0, 0, 0.03);
border-top: 1px solid rgba(0, 0, 0, 0.125);
}
.code-editor .editor .code-area { .code-editor .editor .code-area {
flex-grow: 1; flex-grow: 1;
max-height: 200px; max-height: 200px;
......
...@@ -3,36 +3,27 @@ module Gargantext.Components.Forest.Tree.Node.Action.Update where ...@@ -3,36 +3,27 @@ module Gargantext.Components.Forest.Tree.Node.Action.Update where
import Gargantext.Components.Forest.Tree.Node.Action.Update.Types import Gargantext.Components.Forest.Tree.Node.Action.Update.Types
import Gargantext.Prelude import Gargantext.Prelude
import DOM.Simple.Console (log, log3) import DOM.Simple.Console (log3)
import Data.Array as Array
import Data.Either (Either(..)) import Data.Either (Either(..))
import Data.Int as Int import Data.Maybe (Maybe(..))
import Data.Maybe (Maybe(..), fromMaybe)
import Data.Newtype (unwrap)
import Data.Number as Number
import Effect (Effect) import Effect (Effect)
import Effect.Aff (Aff, launchAff, launchAff_) import Effect.Aff (Aff, launchAff_)
import Effect.Class (liftEffect)
import Gargantext.Components.Bootstrap.Types (ComponentStatus(..)) import Gargantext.Components.Bootstrap.Types (ComponentStatus(..))
import Gargantext.Components.Forest.Tree.Node.Action.Types (Action(..)) import Gargantext.Components.Forest.Tree.Node.Action.Types (Action(..))
import Gargantext.Components.Forest.Tree.Node.Tools (formChoiceSafe, submitButton, panel) import Gargantext.Components.Forest.Tree.Node.Tools (formChoiceSafe, submitButton, panel)
import Gargantext.Components.PhyloExplorer.API (Clique(..), CliqueFilter(..), TimeUnit(..), TimeUnitCriteria(..), UpdateData(..), toReflexiveTimeUnit)
import Gargantext.Components.PhyloExplorer.API as Phylo import Gargantext.Components.PhyloExplorer.API as Phylo
import Gargantext.Components.PhyloExplorer.ConfigForm as PhyloForm import Gargantext.Components.PhyloExplorer.ConfigForm as PhyloForm
import Gargantext.Components.PhyloExplorer.ConfigFormParser (useConfigFormParser)
import Gargantext.Components.PhyloExplorer.ConfigFormParser as PhyloHook import Gargantext.Components.PhyloExplorer.ConfigFormParser as PhyloHook
import Gargantext.Config.REST (RESTError, AffRESTError) import Gargantext.Config.REST (RESTError, AffRESTError)
import Gargantext.Routes as GR import Gargantext.Routes as GR
import Gargantext.Sessions (Session, post) import Gargantext.Sessions (Session, post)
import Gargantext.Types (ID, NodeType(..)) import Gargantext.Types (ID, NodeType(..))
import Gargantext.Types as GT import Gargantext.Types as GT
import Gargantext.Utils (getter)
import Gargantext.Utils.Reactix as R2 import Gargantext.Utils.Reactix as R2
import Reactix as R import Reactix as R
import Reactix.DOM.HTML as H import Reactix.DOM.HTML as H
import Record (merge) import Record (merge)
import Toestand as T import Toestand as T
import Unsafe.Coerce (unsafeCoerce)
here :: R2.Here here :: R2.Here
here = R2.here "Gargantext.Components.Forest.Tree.Node.Action.Update" here = R2.here "Gargantext.Components.Forest.Tree.Node.Action.Update"
...@@ -104,21 +95,22 @@ updatePhyloCpt = here.component "updatePhylo" cpt where ...@@ -104,21 +95,22 @@ updatePhyloCpt = here.component "updatePhylo" cpt where
-- Helpers -- Helpers
let let
-- @NOTE #219: use a config property returned by GET phylo route
defaultData :: Phylo.UpdateData defaultData :: Phylo.UpdateData
defaultData = Phylo.UpdateData defaultData = Phylo.UpdateData
{ proximity: 0.1 { proximity: 0.5
, synchrony: 0.1 , synchrony: 0.5
, quality: 0.1 , quality: 0.5
, exportFilter: 0.1 , exportFilter: 0.5
, timeUnit: Phylo.Year $ Phylo.TimeUnitCriteria , timeUnit: Phylo.Year $ Phylo.TimeUnitCriteria
{ period: 3 { period: 3
, step: 1 , step: 1
, matchingFrame: 5 , matchingFrame: 5
} }
, clique: FIS , clique: Phylo.MaxClique
{ support: 1 { size: 5
, size: 2 , threshold: 0.0001
, filter: Phylo.ByThreshold
} }
} }
......
...@@ -3,11 +3,14 @@ module Gargantext.Hooks.FormValidation.Boxed ...@@ -3,11 +3,14 @@ module Gargantext.Hooks.FormValidation.Boxed
, class NonEmpty, nonEmpty , class NonEmpty, nonEmpty
, class Minimum, minimum , class Minimum, minimum
, class Maximum, maximum , class Maximum, maximum
, lowercase, uppercase, email, date , lowercase, uppercase, email, date, number, int
) where ) where
import Gargantext.Prelude import Gargantext.Prelude
import Data.Int as Int
import Data.Maybe (isNothing)
import Data.Number as Number
import Data.String (toLower, toUpper) import Data.String (toLower, toUpper)
import Data.String.CodeUnits (length) import Data.String.CodeUnits (length)
import Data.String.Regex (test) import Data.String.Regex (test)
...@@ -81,3 +84,15 @@ date field = T.read >=> case _ of ...@@ -81,3 +84,15 @@ date field = T.read >=> case _ of
input input
| (not $ test datePattern input) -> pure $ invalid [ field /\ "date" ] | (not $ test datePattern input) -> pure $ invalid [ field /\ "date" ]
| otherwise -> pure $ pure unit | otherwise -> pure $ pure unit
number :: Field -> T.Box String -> Effect VForm
number field = T.read >=> case _ of
input
| (isNothing $ Number.fromString input) -> pure $ invalid [ field /\ "number "]
| otherwise -> pure $ pure unit
int :: Field -> T.Box String -> Effect VForm
int field = T.read >=> case _ of
input
| (isNothing $ Int.fromString input) -> pure $ invalid [ field /\ "int" ]
| otherwise -> pure $ pure unit
...@@ -3,11 +3,14 @@ module Gargantext.Hooks.FormValidation.Unboxed ...@@ -3,11 +3,14 @@ module Gargantext.Hooks.FormValidation.Unboxed
, class NonEmpty, nonEmpty , class NonEmpty, nonEmpty
, class Minimum, minimum , class Minimum, minimum
, class Maximum, maximum , class Maximum, maximum
, lowercase, uppercase, email, date , lowercase, uppercase, email, date, number, int
) where ) where
import Gargantext.Prelude import Gargantext.Prelude
import Data.Maybe (isNothing)
import Data.Number as Number
import Data.Int as Int
import Data.String (toLower, toUpper) import Data.String (toLower, toUpper)
import Data.String.CodeUnits (length) import Data.String.CodeUnits (length)
import Data.String.Regex (test) import Data.String.Regex (test)
...@@ -68,3 +71,13 @@ date :: Field -> String -> Effect VForm ...@@ -68,3 +71,13 @@ date :: Field -> String -> Effect VForm
date field input date field input
| (not $ test datePattern input) = pure $ invalid [ field /\ "date" ] | (not $ test datePattern input) = pure $ invalid [ field /\ "date" ]
| otherwise = pure $ pure unit | otherwise = pure $ pure unit
number :: Field -> String -> Effect VForm
number field input
| (isNothing $ Number.fromString input) = pure $ invalid [ field /\ "number" ]
| otherwise = pure $ pure unit
int :: Field -> String -> Effect VForm
int field input
| (isNothing $ Int.fromString input) = pure $ invalid [ field /\ "int" ]
| otherwise = pure $ pure unit
...@@ -454,3 +454,25 @@ li ...@@ -454,3 +454,25 @@ li
.tile-menu__popover .tile-menu__popover
border-radius: $border-radius border-radius: $border-radius
background-color: $body-bg background-color: $body-bg
/////////////////////////////////////////
.phylo-config-form
// @TODO: manage background color for all node Box popup
background-color: $card-bg
// @TODO: manage the blue color set on all node Box popup
color: $body-color
&__group
padding-left: $card-spacer-x
padding-right: $card-spacer-x
// Apply Bootstrap "cart-footer" rules (see "_card.scss")
&__submit
padding: $card-spacer-y $card-spacer-x
color: $card-cap-color
background-color: $card-cap-bg
border-top: $card-border-width solid $card-border-color
...@@ -136,3 +136,42 @@ ...@@ -136,3 +136,42 @@
background-color: inherit; background-color: inherit;
} }
} }
/// PhyloExplorer.ConfigForm
///-----------------------------------------------------------------------------
.phylo-config-form {
&__row {
position: relative;
display: flex;
flex-wrap: wrap;
}
&__group {
// @TODO: generic "form-group" margin-bottom constant
margin-bottom: space-x(3);
}
.b-fieldset {
margin-left: $card-spacer-x;
margin-right: $card-spacer-x;
}
&__col {
width: 50%;
&:first-child {
padding-right: space-x(1);
}
&:last-child {
padding-left: space-x(1);
}
}
&__submit {
text-align: center;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment