Commit 6f1bdce0 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

Merge branch 'dev' into 476-dev-rest-error-when-adding-ngrams

parents 04fb96c2 5cbaadcc
{ {
"name": "Gargantext", "name": "Gargantext",
"version": "0.0.6.8.5.1", "version": "0.0.6.8.5.7",
"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",
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"react-tooltip": "^4.2.8", "react-tooltip": "^4.2.8",
"secp256k1": "^4.0.2", "secp256k1": "^4.0.2",
"sigma": "^2.3.1", "sigma": "^2.4.0",
"twgl.js": "^5.0.4" "twgl.js": "^5.0.4"
}, },
"devDependencies": { "devDependencies": {
...@@ -77,6 +77,6 @@ ...@@ -77,6 +77,6 @@
"xhr2": "^0.2.1" "xhr2": "^0.2.1"
}, },
"optionalDependencies": { "optionalDependencies": {
"purescript-language-server": "^0.15.2" "purescript-language-server": "^0.17.1"
} }
} }
let upstream = let upstream =
https://github.com/garganscript/package-sets/releases/download/v0.1.6/release.dhall sha256:443a37602d5b9353c4daf4349079a77d5dddf07a7b35219016b167404d1e1138 https://github.com/garganscript/package-sets/releases/download/v0.1.7/release.dhall sha256:52886309e1f0158a85427f80c1e3d47ce747c5f14fcec671a81fe5c2c711a6db
let overrides = let overrides =
{ graphql-client = { graphql-client =
...@@ -98,7 +98,7 @@ let overrides = ...@@ -98,7 +98,7 @@ let overrides =
, "typelevel-prelude" , "typelevel-prelude"
] ]
, repo = "https://github.com/justinwoo/purescript-record-extra" , repo = "https://github.com/justinwoo/purescript-record-extra"
, version = "0.15.0-starter-kit" , version = "v5.0.1"
} }
} }
......
...@@ -124,6 +124,7 @@ pkgs.mkShell { ...@@ -124,6 +124,7 @@ pkgs.mkShell {
pkgs.esbuild pkgs.esbuild
pkgs.minify pkgs.minify
pkgs.nodejs pkgs.nodejs
#pkgs.nodePackages.purescript-language-server
pkgs.python # needed for msgpack etc pkgs.python # needed for msgpack etc
repl repl
serve serve
......
...@@ -70,6 +70,7 @@ to generate this file without the comments in this block. ...@@ -70,6 +70,7 @@ to generate this file without the comments in this block.
, "record" , "record"
, "record-extra" , "record-extra"
, "routing" , "routing"
, "sequences"
, "simple-json" , "simple-json"
, "simple-json-generics" , "simple-json-generics"
, "simplecrypto" , "simplecrypto"
......
...@@ -143,6 +143,45 @@ component = R.hooksComponent "documentFormCreation" cpt where ...@@ -143,6 +143,45 @@ component = R.hooksComponent "documentFormCreation" cpt where
] ]
] ]
, ,
-- Language
H.div
{ className: intercalate " "
[ "form-group"
, (fv.hasError' "language") ?
"form-group--error" $
mempty
]
}
[
H.div { className: "form-group__label"}
[
H.label {} [ H.text "Language" ]
]
,
H.div { className: "form-group__field" }
[
B.formSelect (
bindStateKey "language"
)
[
H.option
{value: "EN"}
[ H.text "EN"]
,
H.option
{ value: "FR" }
[ H.text "FR"]
,
H.option
{ value: "Nothing" }
[ H.text "Nothing"]
, H.option
{ value: "All" }
[ H.text "All"]
]
]
]
,
-- Date -- Date
H.div H.div
{ className: intercalate " " { className: intercalate " "
...@@ -218,6 +257,7 @@ type FormData = ...@@ -218,6 +257,7 @@ type FormData =
, authors :: String , authors :: String
, date :: String , date :: String
, abstract :: String , abstract :: String
, language :: String
) )
defaultData :: Record FormData defaultData :: Record FormData
...@@ -227,6 +267,7 @@ defaultData = ...@@ -227,6 +267,7 @@ defaultData =
, authors : "" , authors : ""
, date : "" , date : ""
, abstract : "" , abstract : ""
, language : "EN"
} }
documentFormValidation :: Record FormData -> Effect VForm documentFormValidation :: Record FormData -> Effect VForm
...@@ -236,6 +277,7 @@ documentFormValidation r = foldl append mempty rules ...@@ -236,6 +277,7 @@ documentFormValidation r = foldl append mempty rules
[ FV.nonEmpty "title" r.title [ FV.nonEmpty "title" r.title
, FV.nonEmpty "source" r.source , FV.nonEmpty "source" r.source
, FV.nonEmpty "authors" r.authors , FV.nonEmpty "authors" r.authors
, FV.nonEmpty "language" r.language
, FV.date "date" r.date , FV.date "date" r.date
] ]
......
...@@ -10,10 +10,14 @@ import Gargantext.Prelude ...@@ -10,10 +10,14 @@ import Gargantext.Prelude
import Data.Either (Either(..)) import Data.Either (Either(..))
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.Nullable (Nullable) import Data.Nullable (Nullable)
import Data.Tuple (Tuple(..)) import Data.Sequence as Seq
import Data.Set as Set
import Data.Traversable (traverse_)
import Data.Tuple (Tuple(..), fst, snd)
import DOM.Simple (window) import DOM.Simple (window)
import DOM.Simple.Types (Element) import DOM.Simple.Types (Element)
import Effect.Class.Console as ECC import Effect.Class.Console as ECC
import Effect.Timer (setTimeout)
import Gargantext.Components.App.Store as AppStore import Gargantext.Components.App.Store as AppStore
import Gargantext.Components.GraphExplorer.Store as GraphStore import Gargantext.Components.GraphExplorer.Store as GraphStore
import Gargantext.Components.GraphExplorer.Types as GET import Gargantext.Components.GraphExplorer.Types as GET
...@@ -45,10 +49,10 @@ type Props sigma forceatlas2 = ...@@ -45,10 +49,10 @@ type Props sigma forceatlas2 =
drawGraph :: forall s fa2. R2.Leaf (Props s fa2) drawGraph :: forall s fa2. R2.Leaf (Props s fa2)
drawGraph = R2.leaf drawGraphCpt drawGraph = R2.leaf drawGraphCpt
drawGraphCpt :: forall s fa2. R.Memo (Props s fa2) -- drawGraphCpt :: forall s fa2. R.Memo (Props s fa2)
drawGraphCpt = R.memo' $ here.component "graph" cpt where -- drawGraphCpt = R.memo' $ here.component "drawGraph" cpt where
-- drawGraphCpt :: forall s fa2. R.Component (Props s fa2) drawGraphCpt :: forall s fa2. R.Component (Props s fa2)
-- drawGraphCpt = here.component "graph" cpt where drawGraphCpt = here.component "drawGraph" cpt where
-- | Component -- | Component
-- | -- |
cpt { elRef cpt { elRef
...@@ -75,10 +79,10 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where ...@@ -75,10 +79,10 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
showEdges' <- R2.useLive' showEdges showEdges' <- R2.useLive' showEdges
edgeConfluence' <- R2.useLive' edgeConfluence edgeConfluence' <- R2.useLive' edgeConfluence
edgeWeight' <- R2.useLive' edgeWeight edgeWeight' <- R2.useLive' edgeWeight
forceAtlasState' <- R2.useLive' forceAtlasState forceAtlasState' <- R2.useLive' forceAtlasState
graphStage' <- R2.useLive' graphStage graphStage' <- R2.useLive' graphStage
startForceAtlas' <- R2.useLive' startForceAtlas startForceAtlas' <- R2.useLive' startForceAtlas
hyperdataGraph' <- R2.useLive' hyperdataGraph --hyperdataGraph' <- R2.useLive' hyperdataGraph
-- | Hooks -- | Hooks
-- | -- |
...@@ -99,9 +103,10 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where ...@@ -99,9 +103,10 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
here.log "[drawGraph (Cleanup)] sigma killed" here.log "[drawGraph (Cleanup)] sigma killed"
-- Stage Init -- Stage Init
R.useEffect2' hyperdataGraph' graphStage' $ case graphStage' of R.useEffect1' graphStage' $ case graphStage' of
GET.Init -> do GET.Init -> do
hyperdataGraph' <- T.read hyperdataGraph
let mCamera = getter _.mCamera hyperdataGraph' let mCamera = getter _.mCamera hyperdataGraph'
let rSigma = R.readRef sigmaRef let rSigma = R.readRef sigmaRef
...@@ -193,18 +198,26 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where ...@@ -193,18 +198,26 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
let tEdgesMap = SigmaxTypes.edgesGraphMap transformedGraph let tEdgesMap = SigmaxTypes.edgesGraphMap transformedGraph
let tNodesMap = SigmaxTypes.nodesGraphMap transformedGraph let tNodesMap = SigmaxTypes.nodesGraphMap transformedGraph
Sigmax.dependOnSigma (R.readRef sigmaRef) "[drawGraph (Ready)] no sigma" $ \sigma -> do let updateSigma _ = do
Sigmax.performDiff sigma transformedGraph Sigmax.dependOnSigma (R.readRef sigmaRef) "[drawGraph (Ready)] no sigma" $ \sigma -> do
-- Sigmax.updateEdges sigma tEdgesMap Sigmax.performDiff sigma transformedGraph
-- Sigmax.updateNodes sigma tNodesMap -- Sigmax.updateEdges sigma tEdgesMap
let edgesState = not $ SigmaxTypes.edgeStateHidden showEdges' -- Sigmax.updateNodes sigma tNodesMap
-- here.log2 "[graphCpt] edgesState" edgesState let edgesState = not $ SigmaxTypes.edgeStateHidden showEdges'
Sigmax.setSigmaEdgesVisibility sigma { edgeConfluence: edgeConfluence' -- here.log2 "[graphCpt] edgesState" edgesState
, edgeWeight: edgeWeight' Sigmax.setSigmaEdgesVisibility sigma { edgeConfluence: edgeConfluence'
, showEdges: showEdges' } , edgeWeight: edgeWeight'
, showEdges: showEdges' }
-- TODO This is a temporary solution that seems to fix
-- blank page of graph when there are too many edges. It
-- still throws error though, just in another thread.
_ <- setTimeout 100 $ updateSigma unit
pure unit
case Tuple forceAtlasState' graphStage' of case Tuple forceAtlasState' graphStage' of
--Tuple SigmaxTypes.InitialLoading GET.Ready -> updateGraph
Tuple SigmaxTypes.InitialRunning GET.Ready -> updateGraph Tuple SigmaxTypes.InitialRunning GET.Ready -> updateGraph
Tuple SigmaxTypes.Paused GET.Ready -> updateGraph Tuple SigmaxTypes.Paused GET.Ready -> updateGraph
......
...@@ -101,7 +101,6 @@ sidebarCpt = here.component "sidebar" cpt where ...@@ -101,7 +101,6 @@ sidebarCpt = here.component "sidebar" cpt where
sideTabLegend :: R2.Leaf Props sideTabLegend :: R2.Leaf Props
sideTabLegend = R2.leaf sideTabLegendCpt sideTabLegend = R2.leaf sideTabLegendCpt
sideTabLegendCpt :: R.Component Props sideTabLegendCpt :: R.Component Props
sideTabLegendCpt = here.component "sideTabLegend" cpt where sideTabLegendCpt = here.component "sideTabLegend" cpt where
cpt { metaData: GET.MetaData { legend } } _ = do cpt { metaData: GET.MetaData { legend } } _ = do
...@@ -165,11 +164,9 @@ sideTabDataCpt = here.component "sideTabData" cpt where ...@@ -165,11 +164,9 @@ sideTabDataCpt = here.component "sideTabData" cpt where
cpt props _ = do cpt props _ = do
-- States -- States
{ selectedNodeIds { selectedNodeIds
, graph
} <- GraphStore.use } <- GraphStore.use
selectedNodeIds' <- R2.useLive' selectedNodeIds selectedNodeIds' <- R2.useLive' selectedNodeIds
graph' <- R2.useLive' graph
-- Computed -- Computed
let let
...@@ -186,39 +183,57 @@ sideTabDataCpt = here.component "sideTabData" cpt where ...@@ -186,39 +183,57 @@ sideTabDataCpt = here.component "sideTabData" cpt where
-- No result -- No result
false -> false ->
B.caveat sideTabDataNoSelection {}
{}
[
H.text "Select one or more nodes to get their informations"
]
-- Nodes have been selected -- Nodes have been selected
true -> true ->
sideTabDataWithSelection props
]
R.fragment
[ sideTabDataNoSelection :: R2.Leaf ()
selectedNodes $ sideTabDataNoSelection = R2.leaf sideTabDataNoSelectionCpt
{ nodesMap: SigmaxT.nodesGraphMap graph' sideTabDataNoSelectionCpt :: R.Component ()
} `Record.merge` props sideTabDataNoSelectionCpt = here.component "sideTabDataNoSelection" cpt where
, cpt {} _ = do
sideBarTabSeparator pure $ B.caveat
, {}
neighborhood [
{} H.text "Select one or more nodes to get their informations"
,
sideBarTabSeparator
,
docListWrapper
{ metaData: props.metaData
}
]
] ]
sideTabDataWithSelection :: R2.Leaf Props
sideTabDataWithSelection = R2.leaf sideTabDataWithSelectionCpt
sideTabDataWithSelectionCpt :: R.Component Props
sideTabDataWithSelectionCpt = here.component "sideTabDataWithSelection" cpt where
cpt props _ = do
-- States
{ graph
} <- GraphStore.use
graph' <- R2.useLive' graph
pure $
R.fragment [
selectedNodes $
{ nodesMap: SigmaxT.nodesGraphMap graph'
} `Record.merge` props
,
sideBarTabSeparator
,
neighborhood
{}
,
sideBarTabSeparator
,
docListWrapper
{ metaData: props.metaData
}
]
------------------------------------------------------------ ------------------------------------------------------------
sideTabCommunity :: R2.Leaf Props sideTabCommunity :: R2.Leaf Props
sideTabCommunity = R2.leaf sideTabCommunityCpt sideTabCommunity = R2.leaf sideTabCommunityCpt
sideTabCommunityCpt :: R.Component Props sideTabCommunityCpt :: R.Component Props
sideTabCommunityCpt = here.component "sideTabCommunity" cpt where sideTabCommunityCpt = here.component "sideTabCommunity" cpt where
cpt props _ = do cpt props _ = do
...@@ -244,33 +259,52 @@ sideTabCommunityCpt = here.component "sideTabCommunity" cpt where ...@@ -244,33 +259,52 @@ sideTabCommunityCpt = here.component "sideTabCommunity" cpt where
-- No result -- No result
false -> false ->
sideTabCommunityNoSelection {}
B.caveat
{}
[
H.text "Select one or more nodes to get their informations"
]
-- Nodes have been selection -- Nodes have been selection
true -> true ->
sideTabCommunityWithSelection props
]
R.fragment sideTabCommunityNoSelection :: R2.Leaf ()
[ sideTabCommunityNoSelection = R2.leaf sideTabCommunityNoSelectionCpt
selectedNodes $ sideTabCommunityNoSelectionCpt :: R.Component ()
{ nodesMap: SigmaxT.nodesGraphMap graph' sideTabCommunityNoSelectionCpt = here.component "sideTabCommunityNoSelection" cpt where
} `Record.merge` props cpt {} _ = do
, pure $ B.caveat
sideBarTabSeparator {}
, [
neighborhood H.text "Select one or more nodes to get their informations"
{} ]
,
sideBarTabSeparator
, sideTabCommunityWithSelection :: R2.Leaf Props
contactListWrapper sideTabCommunityWithSelection = R2.leaf sideTabCommunityWithSelectionCpt
{ metaData: props.metaData sideTabCommunityWithSelectionCpt :: R.Component Props
} sideTabCommunityWithSelectionCpt = here.component "sideTabCommunityWithSelection" cpt where
] cpt props _ = do
{ graph
} <- GraphStore.use
graph' <- R2.useLive' graph
pure $
R.fragment
[
selectedNodes $
{ nodesMap: SigmaxT.nodesGraphMap graph'
} `Record.merge` props
,
sideBarTabSeparator
,
neighborhood
{}
,
sideBarTabSeparator
,
contactListWrapper
{ metaData: props.metaData
}
] ]
------------------------------------------- -------------------------------------------
...@@ -295,7 +329,6 @@ type SelectedNodesProps = ...@@ -295,7 +329,6 @@ type SelectedNodesProps =
selectedNodes :: R2.Leaf SelectedNodesProps selectedNodes :: R2.Leaf SelectedNodesProps
selectedNodes = R2.leaf selectedNodesCpt selectedNodes = R2.leaf selectedNodesCpt
selectedNodesCpt :: R.Component SelectedNodesProps selectedNodesCpt :: R.Component SelectedNodesProps
selectedNodesCpt = here.component "selectedNodes" cpt where selectedNodesCpt = here.component "selectedNodes" cpt where
cpt props _ = do cpt props _ = do
......
...@@ -42,10 +42,12 @@ type Store = ...@@ -42,10 +42,12 @@ type Store =
-- Controls -- Controls
, multiSelectEnabled :: T.Box Boolean , multiSelectEnabled :: T.Box Boolean
, edgeConfluence :: T.Box Range.NumberRange , edgeConfluence :: T.Box Range.NumberRange
, edgeConfluenceRange :: T.Box Range.NumberRange
, edgeWeight :: T.Box Range.NumberRange , edgeWeight :: T.Box Range.NumberRange
, forceAtlasState :: T.Box SigmaxT.ForceAtlasState , forceAtlasState :: T.Box SigmaxT.ForceAtlasState
, graphStage :: T.Box GET.Stage , graphStage :: T.Box GET.Stage
, nodeSize :: T.Box Range.NumberRange , nodeSize :: T.Box Range.NumberRange
, nodeSizeRange :: T.Box Range.NumberRange
, showEdges :: T.Box SigmaxT.ShowEdgesState , showEdges :: T.Box SigmaxT.ShowEdgesState
, showLouvain :: T.Box Boolean , showLouvain :: T.Box Boolean
, labelSize :: T.Box Number , labelSize :: T.Box Number
...@@ -73,10 +75,12 @@ type State = ...@@ -73,10 +75,12 @@ type State =
-- Controls -- Controls
, multiSelectEnabled :: Boolean , multiSelectEnabled :: Boolean
, edgeConfluence :: Range.NumberRange , edgeConfluence :: Range.NumberRange
, edgeConfluenceRange :: Range.NumberRange
, edgeWeight :: Range.NumberRange , edgeWeight :: Range.NumberRange
, forceAtlasState :: SigmaxT.ForceAtlasState , forceAtlasState :: SigmaxT.ForceAtlasState
, graphStage :: GET.Stage , graphStage :: GET.Stage
, nodeSize :: Range.NumberRange , nodeSize :: Range.NumberRange
, nodeSizeRange :: Range.NumberRange
, showEdges :: SigmaxT.ShowEdgesState , showEdges :: SigmaxT.ShowEdgesState
, showLouvain :: Boolean , showLouvain :: Boolean
, labelSize :: Number , labelSize :: Number
......
...@@ -205,6 +205,7 @@ pauseForceAtlasButtonCpt = here.component "pauseForceAtlasButtonButton" cpt ...@@ -205,6 +205,7 @@ pauseForceAtlasButtonCpt = here.component "pauseForceAtlasButtonButton" cpt
vrt SigmaxTypes.Running = ButtonVariant Secondary vrt SigmaxTypes.Running = ButtonVariant Secondary
vrt _ = OutlinedButtonVariant Secondary vrt _ = OutlinedButtonVariant Secondary
--icn SigmaxTypes.InitialLoading = "pause"
icn SigmaxTypes.InitialRunning = "pause" icn SigmaxTypes.InitialRunning = "pause"
icn SigmaxTypes.InitialStopped = "play" icn SigmaxTypes.InitialStopped = "play"
icn SigmaxTypes.Running = "pause" icn SigmaxTypes.Running = "pause"
......
...@@ -51,6 +51,7 @@ controlsCpt = R.memo' $ here.component "controls" cpt where ...@@ -51,6 +51,7 @@ controlsCpt = R.memo' $ here.component "controls" cpt where
-- | States -- | States
-- | -- |
{ edgeConfluence { edgeConfluence
, edgeConfluenceRange
, edgeWeight , edgeWeight
, forceAtlasState , forceAtlasState
, graph , graph
...@@ -60,6 +61,7 @@ controlsCpt = R.memo' $ here.component "controls" cpt where ...@@ -60,6 +61,7 @@ controlsCpt = R.memo' $ here.component "controls" cpt where
, mouseSelectorSize , mouseSelectorSize
, multiSelectEnabled , multiSelectEnabled
, nodeSize , nodeSize
, nodeSizeRange
, selectedNodeIds , selectedNodeIds
, showEdges , showEdges
, showLouvain , showLouvain
...@@ -68,11 +70,13 @@ controlsCpt = R.memo' $ here.component "controls" cpt where ...@@ -68,11 +70,13 @@ controlsCpt = R.memo' $ here.component "controls" cpt where
} <- GraphStore.use } <- GraphStore.use
forceAtlasState' <- R2.useLive' forceAtlasState forceAtlasState' <- R2.useLive' forceAtlasState
graph' <- R2.useLive' graph
graphStage' <- R2.useLive' graphStage graphStage' <- R2.useLive' graphStage
selectedNodeIds' <- R2.useLive' selectedNodeIds selectedNodeIds' <- R2.useLive' selectedNodeIds
showSidebar' <- R2.useLive' showSidebar showSidebar' <- R2.useLive' showSidebar
edgeConfluenceRange' <- R2.useLive' edgeConfluenceRange
nodeSizeRange' <- R2.useLive' nodeSizeRange
session <- useSession session <- useSession
-- ref to track automatic FA pausing -- ref to track automatic FA pausing
...@@ -116,41 +120,19 @@ controlsCpt = R.memo' $ here.component "controls" cpt where ...@@ -116,41 +120,19 @@ controlsCpt = R.memo' $ here.component "controls" cpt where
-- Timer to turn off the initial FA. This is because FA eats up lot of -- Timer to turn off the initial FA. This is because FA eats up lot of
-- CPU, has memory leaks etc. -- CPU, has memory leaks etc.
R.useEffect1' forceAtlasState' $ do R.useEffect1' forceAtlasState' $ do
if forceAtlasState' == SigmaxT.InitialRunning then do case forceAtlasState' of
timeoutId <- setTimeout 9000 $ do SigmaxT.InitialRunning -> do
case forceAtlasState' of timeoutId <- setTimeout 9000 $ do
SigmaxT.InitialRunning -> case forceAtlasState' of
T.write_ SigmaxT.Paused forceAtlasState SigmaxT.InitialRunning ->
_ -> pure unit T.write_ SigmaxT.Paused forceAtlasState
R.setRef mFAPauseRef Nothing _ -> pure unit
R.setRef mFAPauseRef $ Just timeoutId R.setRef mFAPauseRef Nothing
pure unit R.setRef mFAPauseRef $ Just timeoutId
else
pure unit pure unit
_ -> pure unit
-- | Computed
-- |
let edgesConfluenceSorted = A.sortWith (_.confluence) $ Seq.toUnfoldable $ SigmaxT.graphEdges graph'
let edgeConfluenceMin = maybe 0.0 _.confluence $ A.head edgesConfluenceSorted
let edgeConfluenceMax = maybe 100.0 _.confluence $ A.last edgesConfluenceSorted
let edgeConfluenceRange = Range.Closed { min: edgeConfluenceMin, max: edgeConfluenceMax }
--let edgesWeightSorted = A.sortWith (_.weight) $ Seq.toUnfoldable $ SigmaxT.graphEdges graph
--let edgeWeightMin = maybe 0.0 _.weight $ A.head edgesWeightSorted
--let edgeWeightMax = maybe 100.0 _.weight $ A.last edgesWeightSorted
--let edgeWeightRange = Range.Closed { min: edgeWeightMin, max: edgeWeightMax }
let edgeWeightRange = Range.Closed {
min: 0.0
, max: I.toNumber $ Seq.length $ SigmaxT.graphEdges graph'
}
let nodesSorted = A.sortWith (_.size) $ Seq.toUnfoldable $ SigmaxT.graphNodes graph'
let nodeSizeMin = maybe 0.0 _.size $ A.head nodesSorted
let nodeSizeMax = maybe 100.0 _.size $ A.last nodesSorted
let nodeSizeRange = Range.Closed { min: nodeSizeMin, max: nodeSizeMax }
let gap = H.span { className: "graph-toolbar__gap" } [] let gap = H.span { className: "graph-toolbar__gap" } []
-- | Render -- | Render
...@@ -250,7 +232,7 @@ controlsCpt = R.memo' $ here.component "controls" cpt where ...@@ -250,7 +232,7 @@ controlsCpt = R.memo' $ here.component "controls" cpt where
[ [
edgeConfluenceControl edgeConfluenceControl
{ forceAtlasState { forceAtlasState
, range: edgeConfluenceRange , range: edgeConfluenceRange'
, state: edgeConfluence } , state: edgeConfluence }
{- , {- ,
edgeWeightControl edgeWeightControl
...@@ -281,7 +263,7 @@ controlsCpt = R.memo' $ here.component "controls" cpt where ...@@ -281,7 +263,7 @@ controlsCpt = R.memo' $ here.component "controls" cpt where
-- labels size: 1-4 -- labels size: 1-4
nodeSizeControl nodeSizeControl
{ forceAtlasState { forceAtlasState
, range: nodeSizeRange , range: nodeSizeRange'
, state: nodeSize } , state: nodeSize }
] ]
......
...@@ -10,6 +10,7 @@ module Gargantext.Components.NgramsTable ...@@ -10,6 +10,7 @@ module Gargantext.Components.NgramsTable
import Gargantext.Prelude import Gargantext.Prelude
import DOM.Simple.Console (log)
import Data.Array as A import Data.Array as A
import Data.Either (Either(..)) import Data.Either (Either(..))
import Data.FunctorWithIndex (mapWithIndex) import Data.FunctorWithIndex (mapWithIndex)
...@@ -42,7 +43,7 @@ import Gargantext.Components.NgramsTable.Tree (renderNgramsItem, renderNgramsTre ...@@ -42,7 +43,7 @@ import Gargantext.Components.NgramsTable.Tree (renderNgramsItem, renderNgramsTre
import Gargantext.Components.Nodes.Lists.Types as NT import Gargantext.Components.Nodes.Lists.Types as NT
import Gargantext.Components.Table (changePage) import Gargantext.Components.Table (changePage)
import Gargantext.Components.Table as TT import Gargantext.Components.Table as TT
import Gargantext.Components.Table.Types (Params) import Gargantext.Components.Table.Types (Params, orderByToGTOrderBy)
import Gargantext.Components.Table.Types as TT import Gargantext.Components.Table.Types as TT
import Gargantext.Config.REST (AffRESTError, RESTError, logRESTError) import Gargantext.Config.REST (AffRESTError, RESTError, logRESTError)
import Gargantext.Core.NgramsTable.Functions (addNewNgramA, applyNgramsPatches, chartsAfterSync, commitPatch, convOrderBy, coreDispatch, filterTermSize, ngramsRepoElementToNgramsElement, normNgram, patchSetFromMap, singletonNgramsTablePatch, tablePatchHasNgrams, toVersioned) import Gargantext.Core.NgramsTable.Functions (addNewNgramA, applyNgramsPatches, chartsAfterSync, commitPatch, convOrderBy, coreDispatch, filterTermSize, ngramsRepoElementToNgramsElement, normNgram, patchSetFromMap, singletonNgramsTablePatch, tablePatchHasNgrams, toVersioned)
...@@ -56,6 +57,7 @@ import Gargantext.Utils.CacheAPI as GUC ...@@ -56,6 +57,7 @@ import Gargantext.Utils.CacheAPI as GUC
import Gargantext.Utils.Reactix as R2 import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Seq as Seq import Gargantext.Utils.Seq as Seq
import Gargantext.Utils.Toestand as T2 import Gargantext.Utils.Toestand as T2
import Reactix (useEffect)
import Reactix as R import Reactix as R
import Reactix.DOM.HTML as H import Reactix.DOM.HTML as H
import Record as Record import Record as Record
...@@ -1014,19 +1016,18 @@ mainNgramsTableCacheOffCpt = here.component "mainNgramsTableCacheOff" cpt where ...@@ -1014,19 +1016,18 @@ mainNgramsTableCacheOffCpt = here.component "mainNgramsTableCacheOff" cpt where
loader :: PageParams -> AffRESTError VersionedWithCountNgramsTable loader :: PageParams -> AffRESTError VersionedWithCountNgramsTable
loader { listIds loader { listIds
, nodeId , nodeId
, params: { limit, offset } , params: { limit, offset, orderBy }
, searchQuery , searchQuery
, session , session
, tabType , tabType
, termListFilter , termListFilter
, termSizeFilter , termSizeFilter
} = } = get session $ Routes.GetNgrams params (Just nodeId)
get session $ Routes.GetNgrams params (Just nodeId)
where where
params = { limit params = { limit
, listIds , listIds
, offset: Just offset , offset: Just offset
, orderBy: Nothing -- TODO , orderBy: orderByToGTOrderBy orderBy
, searchQuery , searchQuery
, tabType , tabType
, termListFilter , termListFilter
......
...@@ -4,12 +4,13 @@ module Gargantext.Components.Nodes.Graph ...@@ -4,12 +4,13 @@ module Gargantext.Components.Nodes.Graph
import Gargantext.Prelude import Gargantext.Prelude
import DOM.Simple (document, querySelector) import Data.Array as A
import Data.Int as I import Data.Int as I
import Data.Maybe (Maybe(..), fromMaybe, isJust, maybe) import Data.Maybe (Maybe(..), fromMaybe, isJust, maybe)
import Data.Sequence as Seq import Data.Sequence as Seq
import Data.Tuple (Tuple(..)) import Data.Tuple (Tuple(..))
import Data.Tuple.Nested ((/\)) import Data.Tuple.Nested ((/\))
import DOM.Simple (document, querySelector)
import Gargantext.Components.App.Store as AppStore import Gargantext.Components.App.Store as AppStore
import Gargantext.Components.Bootstrap as B import Gargantext.Components.Bootstrap as B
import Gargantext.Components.GraphExplorer.API as GraphAPI import Gargantext.Components.GraphExplorer.API as GraphAPI
...@@ -56,7 +57,7 @@ nodeCpt = here.component "node" cpt where ...@@ -56,7 +57,7 @@ nodeCpt = here.component "node" cpt where
-- | Computed -- | Computed
-- | -- |
let errorHandler = logRESTError here "[explorerLayout]" let errorHandler = logRESTError here "[node]"
-- | Hooks -- | Hooks
-- | -- |
...@@ -151,6 +152,7 @@ hydrateStoreCpt = here.component "hydrateStore" cpt where ...@@ -151,6 +152,7 @@ hydrateStoreCpt = here.component "hydrateStore" cpt where
forceAtlasState forceAtlasState
= if startForceAtlas = if startForceAtlas
--then SigmaxT.InitialLoading
then SigmaxT.InitialRunning then SigmaxT.InitialRunning
else SigmaxT.InitialStopped else SigmaxT.InitialStopped
...@@ -160,6 +162,29 @@ hydrateStoreCpt = here.component "hydrateStore" cpt where ...@@ -160,6 +162,29 @@ hydrateStoreCpt = here.component "hydrateStore" cpt where
sigmaRef <- Sigmax.initSigma >>= R.useRef sigmaRef <- Sigmax.initSigma >>= R.useRef
fa2Ref <- R.useRef (Nothing :: Maybe ForceAtlas.FA2Layout) fa2Ref <- R.useRef (Nothing :: Maybe ForceAtlas.FA2Layout)
-- | Precompute some values
-- |
let edgesConfluenceSorted = A.sortWith (_.confluence) $ Seq.toUnfoldable $ SigmaxT.graphEdges graph
let edgeConfluenceMin = maybe 0.0 _.confluence $ A.head edgesConfluenceSorted
let edgeConfluenceMax = maybe 100.0 _.confluence $ A.last edgesConfluenceSorted
let edgeConfluenceRange = Range.Closed { min: edgeConfluenceMin, max: edgeConfluenceMax }
--let edgesWeightSorted = A.sortWith (_.weight) $ Seq.toUnfoldable $ SigmaxT.graphEdges graph
--let edgeWeightMin = maybe 0.0 _.weight $ A.head edgesWeightSorted
--let edgeWeightMax = maybe 100.0 _.weight $ A.last edgesWeightSorted
--let edgeWeightRange = Range.Closed { min: edgeWeightMin, max: edgeWeightMax }
let edgeWeightRange = Range.Closed {
min: 0.0
, max: I.toNumber $ Seq.length $ SigmaxT.graphEdges graph
}
let nodesSorted = A.sortWith (_.size) $ Seq.toUnfoldable $ SigmaxT.graphNodes graph
let nodeSizeMin = maybe 0.0 _.size $ A.head nodesSorted
let nodeSizeMax = maybe 100.0 _.size $ A.last nodesSorted
let nodeSizeRange = Range.Closed { min: nodeSizeMin, max: nodeSizeMax }
-- Hydrate GraphStore -- Hydrate GraphStore
(state :: Record GraphStore.State) <- pure $ (state :: Record GraphStore.State) <- pure $
-- Data -- Data
...@@ -174,6 +199,8 @@ hydrateStoreCpt = here.component "hydrateStore" cpt where ...@@ -174,6 +199,8 @@ hydrateStoreCpt = here.component "hydrateStore" cpt where
{ min: 0.0 { min: 0.0
, max: I.toNumber $ Seq.length $ SigmaxT.graphEdges graph , max: I.toNumber $ Seq.length $ SigmaxT.graphEdges graph
} }
, edgeConfluenceRange
, nodeSizeRange
-- (cache options) -- (cache options)
, expandSelection: getter _.expandSelection cacheParams , expandSelection: getter _.expandSelection cacheParams
, expandNeighborhood: getter _.expandNeighborhood cacheParams , expandNeighborhood: getter _.expandNeighborhood cacheParams
......
module Gargantext.Components.Table.Types where module Gargantext.Components.Table.Types where
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Show.Generic (genericShow) import Data.Maybe (Maybe(..))
import Data.Maybe (Maybe)
import Data.Sequence as Seq import Data.Sequence as Seq
import Data.Show.Generic (genericShow)
import Gargantext.Components.Search (SearchType)
import Gargantext.Types as GT
import Prelude (class Eq, class Show, (<>))
import Reactix as R import Reactix as R
import Toestand as T import Toestand as T
import Prelude (class Eq, class Show, (<>))
import Gargantext.Components.Search (SearchType)
type Params = { limit :: Int type Params = { limit :: Int
, offset :: Int , offset :: Int
, orderBy :: OrderBy , orderBy :: OrderBy
...@@ -28,6 +27,20 @@ orderByToForm :: OrderByDirection ColumnName -> String ...@@ -28,6 +27,20 @@ orderByToForm :: OrderByDirection ColumnName -> String
orderByToForm (ASC (ColumnName x)) = x <> "Asc" orderByToForm (ASC (ColumnName x)) = x <> "Asc"
orderByToForm (DESC (ColumnName x)) = x <> "Desc" orderByToForm (DESC (ColumnName x)) = x <> "Desc"
orderByToGTOrderBy :: OrderBy -> Maybe GT.OrderBy
orderByToGTOrderBy (Just (ASC (ColumnName "Date"))) = Just GT.DateAsc
orderByToGTOrderBy (Just (DESC (ColumnName "Date"))) = Just GT.DateDesc
orderByToGTOrderBy (Just (ASC (ColumnName "Title"))) = Just GT.TitleAsc
orderByToGTOrderBy (Just (DESC (ColumnName "Title"))) = Just GT.TitleDesc
orderByToGTOrderBy (Just (ASC (ColumnName "Score"))) = Just GT.ScoreAsc
orderByToGTOrderBy (Just (DESC (ColumnName "Score"))) = Just GT.ScoreDesc
orderByToGTOrderBy (Just (ASC (ColumnName "Terms"))) = Just GT.TermAsc
orderByToGTOrderBy (Just (DESC (ColumnName "Terms"))) = Just GT.TermDesc
orderByToGTOrderBy (Just (ASC (ColumnName "Source"))) = Just GT.SourceAsc
orderByToGTOrderBy (Just (DESC (ColumnName "Source"))) = Just GT.SourceDesc
orderByToGTOrderBy (Just _) = Nothing
orderByToGTOrderBy Nothing = Nothing
newtype ColumnName = ColumnName String newtype ColumnName = ColumnName String
derive instance Generic ColumnName _ derive instance Generic ColumnName _
instance Show ColumnName where instance Show ColumnName where
......
...@@ -16,7 +16,7 @@ import Data.Tuple.Nested ((/\)) ...@@ -16,7 +16,7 @@ import Data.Tuple.Nested ((/\))
import DOM.Simple.Types (Element) import DOM.Simple.Types (Element)
import Effect (Effect) import Effect (Effect)
import Effect.Class.Console (error) import Effect.Class.Console (error)
import Effect.Timer (TimeoutId, clearTimeout) import Effect.Timer (TimeoutId, clearTimeout, setTimeout)
import FFI.Simple ((.=)) import FFI.Simple ((.=))
import Gargantext.Hooks.Sigmax.ForceAtlas2 as ForceAtlas import Gargantext.Hooks.Sigmax.ForceAtlas2 as ForceAtlas
import Gargantext.Hooks.Sigmax.Graphology as Graphology import Gargantext.Hooks.Sigmax.Graphology as Graphology
...@@ -24,6 +24,7 @@ import Gargantext.Hooks.Sigmax.Sigma as Sigma ...@@ -24,6 +24,7 @@ import Gargantext.Hooks.Sigmax.Sigma as Sigma
import Gargantext.Hooks.Sigmax.Types as ST import Gargantext.Hooks.Sigmax.Types as ST
import Gargantext.Utils.Console as C import Gargantext.Utils.Console as C
import Gargantext.Utils.Reactix as R2 import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Seq as GSeq
import Gargantext.Utils.Set as GSet import Gargantext.Utils.Set as GSet
import Prelude (Unit, bind, discard, flip, map, not, pure, unit, ($), (&&), (*>), (<<<), (<>), (>>=), (+), (>), negate, (/=), (==), (<$>)) import Prelude (Unit, bind, discard, flip, map, not, pure, unit, ($), (&&), (*>), (<<<), (<>), (>>=), (+), (>), negate, (/=), (==), (<$>))
import Reactix as R import Reactix as R
...@@ -229,7 +230,9 @@ performDiff sigma g = do ...@@ -229,7 +230,9 @@ performDiff sigma g = do
-- console.log2 "[performDiff] removeNodes" removeNodes -- console.log2 "[performDiff] removeNodes" removeNodes
-- console.log2 "[performDiff] removeEdges" removeEdges -- console.log2 "[performDiff] removeEdges" removeEdges
traverse_ (Graphology.addNode sigmaGraph) addNodes traverse_ (Graphology.addNode sigmaGraph) addNodes
traverse_ (Graphology.addEdge sigmaGraph) addEdges --traverse_ (Graphology.addEdge sigmaGraph) addEdges
-- insert edges in batches, otherwise a maximum recursion error is thrown
traverse_ (\edges -> setTimeout 100 $ traverse_ (Graphology.addEdge sigmaGraph) edges) $ GSeq.groupBy 5000 addEdges
traverse_ (Graphology.removeEdge sigmaGraph) removeEdges traverse_ (Graphology.removeEdge sigmaGraph) removeEdges
traverse_ (Graphology.removeNode sigmaGraph) removeNodes traverse_ (Graphology.removeNode sigmaGraph) removeNodes
traverse_ (Graphology.updateEdge sigmaGraph) updateEdges traverse_ (Graphology.updateEdge sigmaGraph) updateEdges
...@@ -249,7 +252,6 @@ performDiff sigma g = do ...@@ -249,7 +252,6 @@ performDiff sigma g = do
, update: Tuple updateEdges updateNodes } = sigmaDiff sigmaGraph g , update: Tuple updateEdges updateNodes } = sigmaDiff sigmaGraph g
-- | Compute a diff between current sigma graph and whatever is set via custom controls -- | Compute a diff between current sigma graph and whatever is set via custom controls
sigmaDiff :: Graphology.Graph -> ST.SGraph -> Record ST.SigmaDiff sigmaDiff :: Graphology.Graph -> ST.SGraph -> Record ST.SigmaDiff
sigmaDiff sigmaGraph gControls = { add, remove, update } sigmaDiff sigmaGraph gControls = { add, remove, update }
...@@ -282,12 +284,17 @@ sigmaDiff sigmaGraph gControls = { add, remove, update } ...@@ -282,12 +284,17 @@ sigmaDiff sigmaGraph gControls = { add, remove, update }
removeNodes = Set.difference sigmaNodeIds (Set.fromFoldable gcNodeIds) removeNodes = Set.difference sigmaNodeIds (Set.fromFoldable gcNodeIds)
commonNodeIds = Set.intersection sigmaNodeIds $ Set.fromFoldable gcNodeIds commonNodeIds = Set.intersection sigmaNodeIds $ Set.fromFoldable gcNodeIds
commonNodes = Seq.filter (\n -> Set.member n.id commonNodeIds) sigmaNodes
commonEdgeIds = Set.intersection sigmaEdgeIds $ Set.fromFoldable gcEdgeIds commonEdgeIds = Set.intersection sigmaEdgeIds $ Set.fromFoldable gcEdgeIds
sigmaNodeIdsMap = Map.fromFoldable $ Seq.map (\n -> Tuple n.id n) sigmaNodes commonEdges = Seq.filter (\e -> Set.member e.id commonEdgeIds) sigmaEdges
sigmaEdgeIdsMap = Map.fromFoldable $ Seq.map (\e -> Tuple e.id e) sigmaEdges sigmaNodeIdsMap = Map.fromFoldable $ Seq.map (\n -> Tuple n.id n) commonNodes --sigmaNodes
updateEdges = Seq.filter (\e -> Just e /= Map.lookup e.id sigmaEdgeIdsMap) gcEdges sigmaEdgeIdsMap = Map.fromFoldable $ Seq.map (\e -> Tuple e.id e) commonEdges --sigmaEdges
-- updateEdges = Seq.filter (\e -> Just e /= Map.lookup e.id sigmaEdgeIdsMap) gcEdges
updateEdges = Seq.empty
-- Find nodes for which `ST.compareNodes` returns `false`, i.e. nodes differ -- Find nodes for which `ST.compareNodes` returns `false`, i.e. nodes differ
updateNodes = Seq.filter (\n -> (ST.compareNodes n <$> (Map.lookup n.id sigmaNodeIdsMap)) == Just false) gcNodes updateNodes = Seq.filter (\n -> (ST.compareNodes n <$> (Map.lookup n.id sigmaNodeIdsMap)) == Just false) gcNodes
-- updateEdges = Seq.empty
-- updateNodes = Seq.empty
-- DEPRECATED -- DEPRECATED
......
...@@ -25,7 +25,9 @@ newtype Graph n e = Graph { edges :: Seq.Seq {|e}, nodes :: Seq.Seq {|n} } ...@@ -25,7 +25,9 @@ newtype Graph n e = Graph { edges :: Seq.Seq {|e}, nodes :: Seq.Seq {|n} }
derive instance Generic (Graph n e) _ derive instance Generic (Graph n e) _
instance (Eq (Record n), Eq (Record e)) => Eq (Graph n e) where instance (Eq (Record n), Eq (Record e)) => Eq (Graph n e) where
eq = genericEq --eq = genericEq
eq (Graph { edges: e1, nodes: n1 }) (Graph { edges: e2, nodes: n2 }) =
(Seq.length e1 == Seq.length e2) && (Seq.length n1 == Seq.length n2)
--instance Eq Graph where --instance Eq Graph where
-- eq (Graph {nodes: n1, edges: e1}) (Graph {nodes: n2, edges: e2}) = n1 == n2 && e1 == e2 -- eq (Graph {nodes: n1, edges: e1}) (Graph {nodes: n2, edges: e2}) = n1 == n2 && e1 == e2
...@@ -162,13 +164,14 @@ eqGraph (Graph {nodes: n1, edges: e1}) (Graph {nodes: n2, edges: e2}) = (n1 == n ...@@ -162,13 +164,14 @@ eqGraph (Graph {nodes: n1, edges: e1}) (Graph {nodes: n2, edges: e2}) = (n1 == n
-- however when graph is loaded initially, forceAtlas is running for a couple of -- however when graph is loaded initially, forceAtlas is running for a couple of
-- seconds and then stops (unless the user alters this by clicking the toggle -- seconds and then stops (unless the user alters this by clicking the toggle
-- button). -- button).
data ForceAtlasState = InitialRunning | InitialStopped | Running | Paused | Killed data ForceAtlasState = {- InitialLoading | -} InitialRunning | InitialStopped | Running | Paused | Killed
derive instance Generic ForceAtlasState _ derive instance Generic ForceAtlasState _
instance Eq ForceAtlasState where instance Eq ForceAtlasState where
eq = genericEq eq = genericEq
toggleForceAtlasState :: ForceAtlasState -> ForceAtlasState toggleForceAtlasState :: ForceAtlasState -> ForceAtlasState
-- toggleForceAtlasState InitialLoading = InitialRunning
toggleForceAtlasState InitialRunning = Paused toggleForceAtlasState InitialRunning = Paused
toggleForceAtlasState InitialStopped = InitialRunning toggleForceAtlasState InitialStopped = InitialRunning
toggleForceAtlasState Running = Paused toggleForceAtlasState Running = Paused
...@@ -177,6 +180,7 @@ toggleForceAtlasState Killed = InitialRunning ...@@ -177,6 +180,7 @@ toggleForceAtlasState Killed = InitialRunning
forceAtlasComponentStatus :: ForceAtlasState -> ComponentStatus forceAtlasComponentStatus :: ForceAtlasState -> ComponentStatus
-- forceAtlasComponentStatus InitialLoading = Disabled
forceAtlasComponentStatus InitialRunning = Disabled forceAtlasComponentStatus InitialRunning = Disabled
forceAtlasComponentStatus InitialStopped = Enabled forceAtlasComponentStatus InitialStopped = Enabled
forceAtlasComponentStatus Running = Disabled forceAtlasComponentStatus Running = Disabled
...@@ -212,6 +216,7 @@ toggleShowEdgesState s = ...@@ -212,6 +216,7 @@ toggleShowEdgesState s =
-- | Return state in which showEdges should be depending on forceAtlasState -- | Return state in which showEdges should be depending on forceAtlasState
forceAtlasEdgeState :: ForceAtlasState -> ShowEdgesState -> ShowEdgesState forceAtlasEdgeState :: ForceAtlasState -> ShowEdgesState -> ShowEdgesState
-- forceAtlasEdgeState InitialLoading _ = ETempHiddenThenShow
forceAtlasEdgeState InitialRunning EShow = ETempHiddenThenShow forceAtlasEdgeState InitialRunning EShow = ETempHiddenThenShow
forceAtlasEdgeState InitialRunning es = es forceAtlasEdgeState InitialRunning es = es
forceAtlasEdgeState InitialStopped es = es forceAtlasEdgeState InitialStopped es = es
......
module Gargantext.Utils.Seq (mapMaybe) where module Gargantext.Utils.Seq (groupBy, mapMaybe) where
import Data.Array ((:))
import Data.Maybe (Maybe, maybe) import Data.Maybe (Maybe, maybe)
import Data.Sequence (Seq, concatMap, empty, singleton) import Data.Sequence (Seq, concatMap, empty, null, singleton, splitAt)
import Data.Tuple (Tuple(..))
import Gargantext.Prelude ((<<<)) import Gargantext.Prelude ((<<<))
mapMaybe :: forall a b. (a -> Maybe b) -> Seq a -> Seq b mapMaybe :: forall a b. (a -> Maybe b) -> Seq a -> Seq b
mapMaybe f = concatMap (maybe empty singleton <<< f) mapMaybe f = concatMap (maybe empty singleton <<< f)
-- | Group a given `Seq` into list of `Seq`'s of length `n` (last one can be shorter)
groupBy :: forall a. Int -> Seq a -> Array (Seq a)
groupBy n s =
if null s
then []
else
let (Tuple hd tl) = splitAt n s in
(hd:groupBy n tl)
module Data.Sequence where module Data.SequenceArr where
import Prelude import Prelude
import Data.Array as A import Data.Array as A
...@@ -27,4 +27,3 @@ singleton = A.singleton ...@@ -27,4 +27,3 @@ singleton = A.singleton
splitAt idx seq = Tuple s.before s.after splitAt idx seq = Tuple s.before s.after
where where
s = A.splitAt idx seq s = A.splitAt idx seq
...@@ -8577,14 +8577,15 @@ punycode@^2.1.0, punycode@^2.1.1: ...@@ -8577,14 +8577,15 @@ punycode@^2.1.0, punycode@^2.1.1:
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
purescript-language-server@^0.15.2: purescript-language-server@^0.17.1:
version "0.15.4" version "0.17.1"
resolved "https://registry.yarnpkg.com/purescript-language-server/-/purescript-language-server-0.15.4.tgz#0707891b0b91a72453d3bfda6a62f29f06b0d32f" resolved "https://registry.yarnpkg.com/purescript-language-server/-/purescript-language-server-0.17.1.tgz#1240dbdf750b9d34fe394560b51d70a5d019e224"
integrity sha512-llUv605I8yvraO98rb5RmmqPdpWBno7IpIlgNlX3Nq3Q4lvB7G0OxGK89JuAoVZ8T/xkTzhjyuzw0sty0DoY3Q== integrity sha512-o/YpvFMOXp5/UqfFjed8+pwZwttg1QpI3iqkHlMB16AW8MRYGVwTAw1zV8MGqazFFat5j3+IJEUHhaeFON0EfA==
dependencies: dependencies:
shell-quote "^1.7.2" shell-quote "^1.7.2"
uuid "^3.3.2" uuid "^3.3.2"
vscode-languageserver "^6.1.1" vscode-jsonrpc "^8.0.0-next.2"
vscode-languageserver "^8.0.0-next.2"
vscode-languageserver-textdocument "^1.0.1" vscode-languageserver-textdocument "^1.0.1"
vscode-uri "^2.1.1" vscode-uri "^2.1.1"
which "^2.0.2" which "^2.0.2"
...@@ -9471,10 +9472,10 @@ side-channel@^1.0.4: ...@@ -9471,10 +9472,10 @@ side-channel@^1.0.4:
get-intrinsic "^1.0.2" get-intrinsic "^1.0.2"
object-inspect "^1.9.0" object-inspect "^1.9.0"
sigma@^2.3.1: sigma@^2.4.0:
version "2.3.1" version "2.4.0"
resolved "https://registry.yarnpkg.com/sigma/-/sigma-2.3.1.tgz#69fd9165479fa49ed84348afcd0432215fdf935f" resolved "https://registry.yarnpkg.com/sigma/-/sigma-2.4.0.tgz#efa213c82e8561138c9237c3a87cf15c0bbaee76"
integrity sha512-YfQsVZf78CeIUv8EYLqp/yvhMwwBXGrbpy+rD1N2X9IqtJ11+VfQRjWfVqHDhjM8oPfWPsaJMtpWFQ8pIflvCA== integrity sha512-spi4C+c3cjlhCklT+RvAxJJcarMmjRpF6RPNvBIBYDduALq8iSNm7FwSpijQNGtI+ryeZ2EfvyBNLp36OFaZiw==
dependencies: dependencies:
"@yomguithereal/helpers" "^1.1.1" "@yomguithereal/helpers" "^1.1.1"
events "^3.3.0" events "^3.3.0"
...@@ -10694,7 +10695,12 @@ vscode-jsonrpc@6.0.0: ...@@ -10694,7 +10695,12 @@ vscode-jsonrpc@6.0.0:
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e" resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e"
integrity sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg== integrity sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg==
vscode-languageserver-protocol@3.16.0, vscode-languageserver-protocol@^3.15.3: vscode-jsonrpc@8.0.2, vscode-jsonrpc@^8.0.0-next.2:
version "8.0.2"
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-8.0.2.tgz#f239ed2cd6004021b6550af9fd9d3e47eee3cac9"
integrity sha512-RY7HwI/ydoC1Wwg4gJ3y6LpU9FJRZAUnTYMXthqhFXXu77ErDd/xkREpGuk4MyYkk4a+XDWAMqe0S3KkelYQEQ==
vscode-languageserver-protocol@3.16.0:
version "3.16.0" version "3.16.0"
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz#34135b61a9091db972188a07d337406a3cdbe821" resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz#34135b61a9091db972188a07d337406a3cdbe821"
integrity sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A== integrity sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A==
...@@ -10702,6 +10708,14 @@ vscode-languageserver-protocol@3.16.0, vscode-languageserver-protocol@^3.15.3: ...@@ -10702,6 +10708,14 @@ vscode-languageserver-protocol@3.16.0, vscode-languageserver-protocol@^3.15.3:
vscode-jsonrpc "6.0.0" vscode-jsonrpc "6.0.0"
vscode-languageserver-types "3.16.0" vscode-languageserver-types "3.16.0"
vscode-languageserver-protocol@3.17.2:
version "3.17.2"
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.2.tgz#beaa46aea06ed061576586c5e11368a9afc1d378"
integrity sha512-8kYisQ3z/SQ2kyjlNeQxbkkTNmVFoQCqkmGrzLH6A9ecPlgTbp3wDTnUNqaUxYr4vlAcloxx8zwy7G5WdguYNg==
dependencies:
vscode-jsonrpc "8.0.2"
vscode-languageserver-types "3.17.2"
vscode-languageserver-textdocument@^1.0.1: vscode-languageserver-textdocument@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.1.tgz#178168e87efad6171b372add1dea34f53e5d330f" resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.1.tgz#178168e87efad6171b372add1dea34f53e5d330f"
...@@ -10712,12 +10726,10 @@ vscode-languageserver-types@3.16.0: ...@@ -10712,12 +10726,10 @@ vscode-languageserver-types@3.16.0:
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247" resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247"
integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA== integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA==
vscode-languageserver@^6.1.1: vscode-languageserver-types@3.17.2:
version "6.1.1" version "3.17.2"
resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-6.1.1.tgz#d76afc68172c27d4327ee74332b468fbc740d762" resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.2.tgz#b2c2e7de405ad3d73a883e91989b850170ffc4f2"
integrity sha512-DueEpkUAkD5XTR4MLYNr6bQIp/UFR0/IPApgXU3YfCBCB08u2sm9hRCs6DxYZELkk++STPjpcjksR2H8qI3cDQ== integrity sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA==
dependencies:
vscode-languageserver-protocol "^3.15.3"
vscode-languageserver@^7.0.0: vscode-languageserver@^7.0.0:
version "7.0.0" version "7.0.0"
...@@ -10726,6 +10738,13 @@ vscode-languageserver@^7.0.0: ...@@ -10726,6 +10738,13 @@ vscode-languageserver@^7.0.0:
dependencies: dependencies:
vscode-languageserver-protocol "3.16.0" vscode-languageserver-protocol "3.16.0"
vscode-languageserver@^8.0.0-next.2:
version "8.0.2"
resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-8.0.2.tgz#cfe2f0996d9dfd40d3854e786b2821604dfec06d"
integrity sha512-bpEt2ggPxKzsAOZlXmCJ50bV7VrxwCS5BI4+egUmure/oI/t4OlFzi/YNtVvY24A2UDOZAgwFGgnZPwqSJubkA==
dependencies:
vscode-languageserver-protocol "3.17.2"
vscode-uri@^2.1.1: vscode-uri@^2.1.1:
version "2.1.2" version "2.1.2"
resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-2.1.2.tgz#c8d40de93eb57af31f3c715dd650e2ca2c096f1c" resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-2.1.2.tgz#c8d40de93eb57af31f3c715dd650e2ca2c096f1c"
......
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