Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
purescript-gargantext
Commits
69ef0930
Verified
Commit
69ef0930
authored
Sep 13, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into dev-frame-calc-corpus-csv-upload
parents
f19c6e37
fc5f4032
Pipeline
#1816
canceled with stage
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
90 additions
and
37 deletions
+90
-37
package.json
package.json
+1
-1
shell.nix
shell.nix
+10
-1
DocsTable.purs
src/Gargantext/Components/DocsTable.purs
+4
-2
Types.purs
...ext/Components/Forest/Tree/Node/Action/Contact/Types.purs
+13
-6
Move.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Move.purs
+46
-18
Types.purs
...text/Components/Forest/Tree/Node/Action/Update/Types.purs
+12
-4
SubTree.purs
...Gargantext/Components/Forest/Tree/Node/Tools/SubTree.purs
+1
-1
Public.purs
src/Gargantext/Components/Nodes/Home/Public.purs
+3
-4
No files found.
package.json
View file @
69ef0930
{
{
"name"
:
"Gargantext"
,
"name"
:
"Gargantext"
,
"version"
:
"0.0.3.
3
"
,
"version"
:
"0.0.3.
4
"
,
"scripts"
:
{
"scripts"
:
{
"generate-purs-packages-nix"
:
"./nix/generate-purs-packages.nix"
,
"generate-purs-packages-nix"
:
"./nix/generate-purs-packages.nix"
,
"generate-psc-packages-nix"
:
"./nix/generate-packages-json.bash"
,
"generate-psc-packages-nix"
:
"./nix/generate-packages-json.bash"
,
...
...
shell.nix
View file @
69ef0930
...
@@ -52,6 +52,13 @@ let
...
@@ -52,6 +52,13 @@ let
pulp browserify --skip-compile -t dist/bundle.js --src-path output
pulp browserify --skip-compile -t dist/bundle.js --src-path output
''
;
''
;
minify-bundle
=
pkgs
.
writeShellScriptBin
"minify-bundle"
''
#!/usr/bin/env bash
set -e
minify dist/bundle.js > dist/bundle.min.js
''
;
repl
=
pkgs
.
writeShellScriptBin
"repl"
''
repl
=
pkgs
.
writeShellScriptBin
"repl"
''
#!/usr/bin/env bash
#!/usr/bin/env bash
...
@@ -76,10 +83,12 @@ pkgs.mkShell {
...
@@ -76,10 +83,12 @@ pkgs.mkShell {
easy-ps
.
psc-package
easy-ps
.
psc-package
easy-ps
.
dhall-json-simple
easy-ps
.
dhall-json-simple
browserify
browserify
build-css
build-purs
build-purs
build-watch
build-watch
build
build
build-css
minify-bundle
pkgs
.
minify
pkgs
.
nodejs
pkgs
.
nodejs
repl
repl
pkgs
.
pulp
pkgs
.
pulp
...
...
src/Gargantext/Components/DocsTable.purs
View file @
69ef0930
...
@@ -275,8 +275,10 @@ pageLayoutCpt = here.component "pageLayout" cpt where
...
@@ -275,8 +275,10 @@ pageLayoutCpt = here.component "pageLayout" cpt where
handleResponse :: HashedResponse (TableResult Response) -> Tuple Int (Array DocumentsView)
handleResponse :: HashedResponse (TableResult Response) -> Tuple Int (Array DocumentsView)
handleResponse (HashedResponse { hash, value: res }) = ret
handleResponse (HashedResponse { hash, value: res }) = ret
where
where
filterDocs' q ds = case cacheState' of
filters = filterDocs query
NT.CacheOff -> ds
NT.CacheOn -> filterDocs q ds
filters = filterDocs' query
>>> \res' -> case yearFilter' of
>>> \res' -> case yearFilter' of
Nothing -> res'
Nothing -> res'
Just year -> filterDocsByYear year res'
Just year -> filterDocsByYear year res'
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Contact/Types.purs
View file @
69ef0930
module Gargantext.Components.Forest.Tree.Node.Action.Contact.Types where
module Gargantext.Components.Forest.Tree.Node.Action.Contact.Types where
import Data.Generic.Rep (class Generic)
import Data.Generic.Rep (class Generic)
import Data.Newtype (class Newtype)
import Data.Show.Generic (genericShow)
import Data.Show.Generic (genericShow)
import Gargantext.Utils.SimpleJSON as GUSJ
import Simple.JSON as JSON
import Simple.JSON as JSON
import Gargantext.Prelude (class Eq, class Show)
import Gargantext.Prelude (class Eq, class Show)
newtype AddContactParams =
data AddContactParams =
AddContactParams { firstname :: String, lastname :: String }
AddContactParams { firstname :: String, lastname :: String }
| AddContactParamsAdvanced { firstname :: String, lastname :: String }
derive instance Eq AddContactParams
derive instance Eq AddContactParams
derive instance Generic AddContactParams _
derive instance Generic AddContactParams _
derive instance Newtype AddContactParams _
instance Show AddContactParams where show = genericShow
instance Show AddContactParams where show = genericShow
derive newtype instance JSON.ReadForeign AddContactParams
instance JSON.ReadForeign AddContactParams where readImpl = GUSJ.taggedSumRep
derive newtype instance JSON.WriteForeign AddContactParams
instance JSON.WriteForeign AddContactParams where
writeImpl (AddContactParams { firstname, lastname }) =
JSON.writeImpl { type: "AddContactParams"
, values: { firstname, lastname } }
writeImpl (AddContactParamsAdvanced { firstname, lastname }) =
JSON.writeImpl { type: "AddContactParamsAdvanced"
, values: { firstname, lastname } }
src/Gargantext/Components/Forest/Tree/Node/Action/Move.purs
View file @
69ef0930
module Gargantext.Components.Forest.Tree.Node.Action.Move where
module Gargantext.Components.Forest.Tree.Node.Action.Move
( moveNodeReq
, moveNode
) where
import Data.Either (Either)
import Data.Either (Either)
import Data.Maybe (Maybe(..))
import Data.Maybe (Maybe(..))
import Effect.Aff (Aff)
import Effect.Aff (Aff)
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 (submitButton, panel)
import Gargantext.Components.Forest.Tree.Node.Tools (submitButton, panel)
import Gargantext.Components.Forest.Tree.Node.Tools.SubTree (
subTreeView, SubTreeParamsIn
)
import Gargantext.Components.Forest.Tree.Node.Tools.SubTree (
SubTreeParamsIn, subTreeView
)
import Gargantext.Config.REST (RESTError)
import Gargantext.Config.REST (RESTError)
import Gargantext.Prelude
import Gargantext.Prelude
import Gargantext.Routes (SessionRoute(..))
import Gargantext.Routes (SessionRoute(..))
...
@@ -30,22 +33,47 @@ moveNodeCpt = here.component "moveNode" cpt
...
@@ -30,22 +33,47 @@ moveNodeCpt = here.component "moveNode" cpt
where
where
cpt { boxes, dispatch, id, nodeType, session, subTreeParams } _ = do
cpt { boxes, dispatch, id, nodeType, session, subTreeParams } _ = do
action :: T.Box Action <- T.useBox (MoveNode {params: Nothing})
action :: T.Box Action <- T.useBox (MoveNode {params: Nothing})
action' <- T.useLive T.unequal action
let button = case action' of
MoveNode { params } -> case params of
Just val -> submitButton (MoveNode {params: Just val}) dispatch
Nothing -> H.div {} []
_ -> H.div {} []
pure $
pure $
panel [ subTreeView { action
moveNode' { action
, boxes
, boxes
, dispatch
, dispatch
, id
, id
, nodeType
, nodeType
, session
, session
, subTreeParams
, subTreeParams
} []
} []
] button
type Props =
( action :: T.Box Action
| SubTreeParamsIn
)
-- @XXX re-render issue -> clone component
moveNode' :: R2.Component Props
moveNode' = R.createElement moveNodeCpt'
moveNodeCpt' :: R.Component Props
moveNodeCpt' = here.component "foo" cpt where
cpt { boxes, dispatch, id, nodeType, session, subTreeParams, action } _ = do
action' <- T.useLive T.unequal action
let button = case action' of
MoveNode { params } -> case params of
Just val -> submitButton (MoveNode {params: Just val}) dispatch
Nothing -> H.div {} []
_ -> H.div {} []
pure $
panel
[ subTreeView { action
, boxes
, dispatch
, id
, nodeType
, session
, subTreeParams
} []
] button
src/Gargantext/Components/Forest/Tree/Node/Action/Update/Types.purs
View file @
69ef0930
...
@@ -18,10 +18,18 @@ derive instance Generic UpdateNodeParams _
...
@@ -18,10 +18,18 @@ derive instance Generic UpdateNodeParams _
instance Show UpdateNodeParams where show = genericShow
instance Show UpdateNodeParams where show = genericShow
instance JSON.ReadForeign UpdateNodeParams where readImpl = JSONG.untaggedSumRep
instance JSON.ReadForeign UpdateNodeParams where readImpl = JSONG.untaggedSumRep
instance JSON.WriteForeign UpdateNodeParams where
instance JSON.WriteForeign UpdateNodeParams where
writeImpl (UpdateNodeParamsList { methodList }) = JSON.writeImpl { methodList }
writeImpl (UpdateNodeParamsList { methodList }) =
writeImpl (UpdateNodeParamsGraph { methodGraph }) = JSON.writeImpl { methodGraph }
JSON.writeImpl { type: "UpdateNodeParamsList"
writeImpl (UpdateNodeParamsTexts { methodTexts }) = JSON.writeImpl { methodTexts }
, values: methodList }
writeImpl (UpdateNodeParamsBoard { methodBoard }) = JSON.writeImpl { methodBoard }
writeImpl (UpdateNodeParamsGraph { methodGraph }) =
JSON.writeImpl { type: "UpdateNodeParamsGraph"
, methodGraph }
writeImpl (UpdateNodeParamsTexts { methodTexts }) =
JSON.writeImpl { type: "UpdateNodeParamsTexts"
, methodTexts }
writeImpl (UpdateNodeParamsBoard { methodBoard }) =
JSON.writeImpl { type: "UpdateNodeParamsBoard"
, methodBoard }
----------------------------------------------------------------------
----------------------------------------------------------------------
data Method = Basic | Advanced | WithModel
data Method = Basic | Advanced | WithModel
...
...
src/Gargantext/Components/Forest/Tree/Node/Tools/SubTree.purs
View file @
69ef0930
...
@@ -44,7 +44,7 @@ type SubTreeParamsProps =
...
@@ -44,7 +44,7 @@ type SubTreeParamsProps =
)
)
subTreeView :: R2.Component SubTreeParamsProps
subTreeView :: R2.Component SubTreeParamsProps
subTreeView = R.createElement subTreeViewCpt
subTreeView = R.createElement
$ R.memo'
subTreeViewCpt
subTreeViewCpt :: R.Component SubTreeParamsProps
subTreeViewCpt :: R.Component SubTreeParamsProps
subTreeViewCpt = here.component "subTreeView" cpt
subTreeViewCpt = here.component "subTreeView" cpt
where
where
...
...
src/Gargantext/Components/Nodes/Home/Public.purs
View file @
69ef0930
...
@@ -9,7 +9,6 @@ import Effect.Aff (Aff)
...
@@ -9,7 +9,6 @@ import Effect.Aff (Aff)
import Reactix as R
import Reactix as R
import Reactix.DOM.HTML as H
import Reactix.DOM.HTML as H
import Simple.JSON as JSON
import Simple.JSON as JSON
import Simple.JSON.Generics as JSONG
import Gargantext.Config (publicBackend)
import Gargantext.Config (publicBackend)
import Gargantext.Config.REST (get, RESTError)
import Gargantext.Config.REST (get, RESTError)
...
@@ -17,6 +16,7 @@ import Gargantext.Ends (backendUrl)
...
@@ -17,6 +16,7 @@ import Gargantext.Ends (backendUrl)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Prelude
import Gargantext.Prelude
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.SimpleJSON as GUSJ
here :: R2.Here
here :: R2.Here
here = R2.here "Gargantext.Components.Nodes.Home.Public"
here = R2.here "Gargantext.Components.Nodes.Home.Public"
...
@@ -35,9 +35,8 @@ data PublicData = PublicData
...
@@ -35,9 +35,8 @@ data PublicData = PublicData
derive instance Eq PublicData
derive instance Eq PublicData
derive instance Generic PublicData _
derive instance Generic PublicData _
instance JSON.ReadForeign PublicData where readImpl = JSONG.untaggedSumRep
instance JSON.ReadForeign PublicData where readImpl = GUSJ.taggedSumRep
instance Show PublicData where
instance Show PublicData where show = genericShow
show = genericShow
------------------------------------------------------------------------
------------------------------------------------------------------------
type LoadData :: forall k. Row k
type LoadData :: forall k. Row k
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment