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
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Grégoire Locqueville
purescript-gargantext
Commits
7f5bce4a
Commit
7f5bce4a
authored
Jun 22, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[REFACT] SubTree: org of files/modules
parent
69f83025
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
+22
-22
Box.purs
src/Gargantext/Components/Forest/Tree/Node/Box.purs
+4
-4
SubTree.purs
...Gargantext/Components/Forest/Tree/Node/Tools/SubTree.purs
+18
-18
No files found.
src/Gargantext/Components/Forest/Tree/Node/Box.purs
View file @
7f5bce4a
...
...
@@ -8,7 +8,6 @@ import Effect.Aff (Aff)
import Effect.Uncurried (mkEffectFn1)
import Gargantext.Components.Forest.Tree.Node.Action (Action)
import Gargantext.Components.Forest.Tree.Node.Action.Add (NodePopup(..), addNodeView)
import Gargantext.Components.Forest.Tree.Node.Action.CopyFrom (copyFromCorpusView)
import Gargantext.Components.Forest.Tree.Node.Action.Delete (actionDelete)
import Gargantext.Components.Forest.Tree.Node.Action.Documentation (actionDoc)
import Gargantext.Components.Forest.Tree.Node.Action.Download (actionDownload)
...
...
@@ -21,6 +20,7 @@ import Gargantext.Components.Forest.Tree.Node.Action.Upload (actionUpload)
import Gargantext.Components.Forest.Tree.Node.Box.Types (NodePopupProps, NodePopupS)
import Gargantext.Components.Forest.Tree.Node.Settings (NodeAction(..), SettingsBox(..), glyphiconNodeAction, settingsBox, SubTreeParams(..))
import Gargantext.Components.Forest.Tree.Node.Tools (textInputBox, fragmentPT)
import Gargantext.Components.Forest.Tree.Node.Tools.SubTree (subTreeView)
import Gargantext.Prelude (Unit, bind, const, map, pure, show, ($), (<>), (==), (<))
import Gargantext.Sessions (Session)
import Gargantext.Types (Name, ID)
...
...
@@ -240,13 +240,13 @@ panelActionCpt = R.hooksComponent "G.C.F.T.N.B.panelAction" cpt
-----------
cpt {action: Merge {subTreeParams}, dispatch, id, nodeType, session} _ = do
pure $
copyFromCorpus
View {dispatch, id, nodeType, session, subTreeParams}
pure $
subTree
View {dispatch, id, nodeType, session, subTreeParams}
cpt {action: Move {subTreeParams}, dispatch, id, nodeType, session} _ = do
pure $
copyFromCorpus
View {dispatch, id, nodeType, session, subTreeParams}
pure $
subTree
View {dispatch, id, nodeType, session, subTreeParams}
cpt {action: Link {subTreeParams}, dispatch, id, nodeType, session} _ = do
pure $
copyFromCorpus
View {dispatch, id, nodeType, session, subTreeParams}
pure $
subTree
View {dispatch, id, nodeType, session, subTreeParams}
-----------
cpt {action : Share, dispatch, id, name } _ = do
...
...
src/Gargantext/Components/Forest/Tree/Node/
Action/CopyFrom
.purs
→
src/Gargantext/Components/Forest/Tree/Node/
Tools/SubTree
.purs
View file @
7f5bce4a
module Gargantext.Components.Forest.Tree.Node.
Action.CopyFrom
where
module Gargantext.Components.Forest.Tree.Node.
Tools.SubTree
where
import DOM.Simple.Console (log2)
import Data.Array as A
...
...
@@ -24,11 +24,11 @@ type SubTreeParamsProps =
| Props
)
copyFromCorpus
View :: Record SubTreeParamsProps -> R.Element
copyFromCorpusView props = R.createElement copyFromCorpus
ViewCpt props []
subTree
View :: Record SubTreeParamsProps -> R.Element
subTreeView props = R.createElement subTree
ViewCpt props []
copyFromCorpus
ViewCpt :: R.Component SubTreeParamsProps
copyFromCorpusViewCpt = R.hooksComponent "G.C.F.T.N.A.U.copyFromCorpus
View" cpt
subTree
ViewCpt :: R.Component SubTreeParamsProps
subTreeViewCpt = R.hooksComponent "G.C.F.T.N.A.U.subTree
View" cpt
where
cpt params@{ dispatch
, id
...
...
@@ -41,7 +41,7 @@ copyFromCorpusViewCpt = R.hooksComponent "G.C.F.T.N.A.U.copyFromCorpusView" cpt
useLoader session (loadSubTree showtypes) $
\tree ->
copyFromCorpus
ViewLoaded { dispatch
subTree
ViewLoaded { dispatch
, id
, nodeType
, session
...
...
@@ -65,23 +65,23 @@ type CorpusTreeProps =
| SubTreeParamsProps
)
copyFromCorpus
ViewLoaded :: Record CorpusTreeProps -> R.Element
copyFromCorpusViewLoaded props = R.createElement copyFromCorpus
ViewLoadedCpt props []
subTree
ViewLoaded :: Record CorpusTreeProps -> R.Element
subTreeViewLoaded props = R.createElement subTree
ViewLoadedCpt props []
copyFromCorpus
ViewLoadedCpt :: R.Component CorpusTreeProps
copyFromCorpusViewLoadedCpt = R.hooksComponent "G.C.F.T.N.A.U.copyFromCorpus
ViewLoadedCpt" cpt
subTree
ViewLoadedCpt :: R.Component CorpusTreeProps
subTreeViewLoadedCpt = R.hooksComponent "G.C.F.T.N.A.U.subTree
ViewLoadedCpt" cpt
where
cpt p@{dispatch, id, nodeType, session, tree} _ = do
pure $ H.div { className: "copy-from-corpus" }
[ H.div { className: "tree" }
[
copyFromCorpus
TreeView p]
[
subTree
TreeView p]
]
copyFromCorpus
TreeView :: Record CorpusTreeProps -> R.Element
copyFromCorpusTreeView props = R.createElement copyFromCorpus
TreeViewCpt props []
subTree
TreeView :: Record CorpusTreeProps -> R.Element
subTreeTreeView props = R.createElement subTree
TreeViewCpt props []
copyFromCorpus
TreeViewCpt :: R.Component CorpusTreeProps
copyFromCorpusTreeViewCpt = R.hooksComponent "G.C.F.T.N.A.U.copyFromCorpus
TreeViewCpt" cpt
subTree
TreeViewCpt :: R.Component CorpusTreeProps
subTreeTreeViewCpt = R.hooksComponent "G.C.F.T.N.A.U.subTree
TreeViewCpt" cpt
where
cpt p@{id, tree: NTree (LNode { id: sourceId, name, nodeType }) ary, subTreeParams} _ = do
pure $ {- H.div {} [ H.h5 { className: GT.fldr nodeType true} []
...
...
@@ -97,7 +97,7 @@ copyFromCorpusTreeViewCpt = R.hooksComponent "G.C.F.T.N.A.U.copyFromCorpusTreeVi
SubTreeParams { valitypes } = subTreeParams
children = map (\c ->
copyFromCorpus
TreeView (p { tree = c })) ary
children = map (\c ->
subTree
TreeView (p { tree = c })) ary
validNodeType = (A.elem nodeType valitypes) && (id /= sourceId)
...
...
@@ -106,8 +106,8 @@ copyFromCorpusTreeViewCpt = R.hooksComponent "G.C.F.T.N.A.U.copyFromCorpusTreeVi
onClick _ = case validNodeType of
false -> pure unit
true -> do
log2 "[
copyFromCorpus
TreeViewCpt] issue copy into" id
log2 "[
copyFromCorpus
TreeViewCpt] issue copy from" sourceId
log2 "[
subTree
TreeViewCpt] issue copy into" id
log2 "[
subTree
TreeViewCpt] issue copy from" sourceId
--------------------------------------------------------------------------------------------
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