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
148
Issues
148
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
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
ec0075ce
Verified
Commit
ec0075ce
authored
May 15, 2025
by
Przemyslaw Kaminski
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[svelte] simple demo of a document layout component
parent
177695a1
Pipeline
#7578
passed with stages
in 21 minutes and 45 seconds
Changes
4
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
4 deletions
+19
-4
index.html
dist/index.html
+1
-0
DocumentLayout.min.js
dist/js/ggtx-svelte/DocumentLayout.min.js
+1
-0
Layout.purs
src/Gargantext/Components/Document/Layout.purs
+14
-4
Reactix.purs
src/Gargantext/Utils/Reactix.purs
+3
-0
No files found.
dist/index.html
View file @
ec0075ce
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
<div
id=
"portal"
></div>
<div
id=
"portal"
></div>
<script
src=
"js/jquery.js"
></script>
<script
src=
"js/jquery.js"
></script>
<script
src=
"js/bootstrap@4.6.2/bootstrap.bundle.min.js"
></script>
<script
src=
"js/bootstrap@4.6.2/bootstrap.bundle.min.js"
></script>
<script
src=
"js/ggtx-svelte/DocumentLayout.min.js"
></script>
<script
src=
"bundle.min.js"
></script>
<script
src=
"bundle.min.js"
></script>
</body>
</body>
</html>
</html>
dist/js/ggtx-svelte/DocumentLayout.min.js
0 → 100644
View file @
ec0075ce
This diff is collapsed.
Click to expand it.
src/Gargantext/Components/Document/Layout.purs
View file @
ec0075ce
...
@@ -22,9 +22,10 @@ import Gargantext.Components.NgramsTable.AutoSync (useAutoSync)
...
@@ -22,9 +22,10 @@ import Gargantext.Components.NgramsTable.AutoSync (useAutoSync)
import Gargantext.Components.Node (NodePoly(..))
import Gargantext.Components.Node (NodePoly(..))
import Gargantext.Core.NgramsTable.Functions (addNewNgramA, applyNgramsPatches, coreDispatch, findNgramRoot, setTermListA, computeCache)
import Gargantext.Core.NgramsTable.Functions (addNewNgramA, applyNgramsPatches, coreDispatch, findNgramRoot, setTermListA, computeCache)
import Gargantext.Core.NgramsTable.Types (CoreAction(..), NgramsTerm, Versioned(..), replace)
import Gargantext.Core.NgramsTable.Types (CoreAction(..), NgramsTerm, Versioned(..), replace)
import Gargantext.Ends (Backend(..))
import Gargantext.Hooks.LinkHandler (useLinkHandler)
import Gargantext.Hooks.LinkHandler (useLinkHandler)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Sessions (Session)
import Gargantext.Sessions (Session
(..)
)
import Gargantext.Utils as U
import Gargantext.Utils as U
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix as R
...
@@ -102,6 +103,7 @@ layoutWithContextNgramsCpt = here.component "layoutWithContextNgrams" cpt
...
@@ -102,6 +103,7 @@ layoutWithContextNgramsCpt = here.component "layoutWithContextNgrams" cpt
, document: NodePoly { hyperdata: Document doc }
, document: NodePoly { hyperdata: Document doc }
}
}
, path
, path
, session
, sideControlsSlot
, sideControlsSlot
}
}
_ = do
_ = do
...
@@ -197,6 +199,8 @@ layoutWithContextNgramsCpt = here.component "layoutWithContextNgrams" cpt
...
@@ -197,6 +199,8 @@ layoutWithContextNgramsCpt = here.component "layoutWithContextNgrams" cpt
-- let NgramsTable { ngrams_repo_elements: nre' } = ngrams'
-- let NgramsTable { ngrams_repo_elements: nre' } = ngrams'
-- here.log2 "[layoutWithContextNgrams] ngrams (after apply patches)" $ A.fromFoldable $ Map.keys nre'
-- here.log2 "[layoutWithContextNgrams] ngrams (after apply patches)" $ A.fromFoldable $ Map.keys nre'
let Session { backend: Backend { baseUrl }, token } = session
-- | Render
-- | Render
-- |
-- |
pure $
pure $
...
@@ -206,9 +210,15 @@ layoutWithContextNgramsCpt = here.component "layoutWithContextNgrams" cpt
...
@@ -206,9 +210,15 @@ layoutWithContextNgramsCpt = here.component "layoutWithContextNgrams" cpt
--[ H.pre { rows: 30 } [
--[ H.pre { rows: 30 } [
-- H.text (stringifyWithIndent 2 (encodeJson (fst state)))
-- H.text (stringifyWithIndent 2 (encodeJson (fst state)))
-- ] ] <>
-- ] ] <>
[
[ R2.ggtxDocumentLayout
-- Header
{ contextId: path.nodeId
H.div
, host: baseUrl
, token
}
[]
-- Header
, H.div
{ className: "document-layout__header" }
{ className: "document-layout__header" }
[ H.div
[ H.div
{ className: "document-layout__main-controls" }
{ className: "document-layout__main-controls" }
...
...
src/Gargantext/Utils/Reactix.purs
View file @
ec0075ce
...
@@ -289,6 +289,9 @@ frameset = createDOM "frameset"
...
@@ -289,6 +289,9 @@ frameset = createDOM "frameset"
keyCode :: forall event. event -> Effect Int
keyCode :: forall event. event -> Effect Int
keyCode = runEffectFn1 _keyCode
keyCode = runEffectFn1 _keyCode
ggtxDocumentLayout :: ElemFactory
ggtxDocumentLayout = createDOM "ggtx-document-layout"
foreign import _keyCode
foreign import _keyCode
:: forall e. EffectFn1 e Int
:: forall e. EffectFn1 e Int
...
...
Przemyslaw Kaminski
@cgenie
mentioned in issue
#741
·
May 15, 2025
mentioned in issue
#741
mentioned in issue #741
Toggle commit list
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