From f60a59e414ded93d5e3d0ca71c012e9e0a91da7b Mon Sep 17 00:00:00 2001 From: Daniel Kestler Date: Mon, 17 Sep 2018 10:40:37 +0200 Subject: [PATCH] Add Neos 4 compatibility, smaller improvements (#10) --- Configuration/Settings.yaml | 15 +- Resources/Private/FlatNav/src/FlatNav.js | 13 +- Resources/Private/FlatNav/src/style.css | 19 + Resources/Private/FlatNav/yarn.lock | 3374 ++++++----------- Resources/Public/JavaScript/FlatNav/Plugin.js | 124 +- .../Public/JavaScript/FlatNav/Plugin.js.map | 2 +- composer.json | 2 +- 7 files changed, 1247 insertions(+), 2302 deletions(-) diff --git a/Configuration/Settings.yaml b/Configuration/Settings.yaml index 2a1478f..2b49f4f 100644 --- a/Configuration/Settings.yaml +++ b/Configuration/Settings.yaml @@ -12,7 +12,7 @@ Neos: type: tree label: Tree icon: tree - # # Example using ElasticSearch + ## Example using ElasticSearch # news: # label: News # icon: newspaper @@ -20,7 +20,17 @@ Neos: # query: 'Search.query(node).nodeType("Your.Namespace:News").sortDesc("date").from((page - 1) * 20).limit(20).execute().toArray()' # newReferenceNodePath: '/sites/site' # newNodeType: 'Your.Namespace:News' - # # Example using FlowQuery + # disablePagination: false + ## Example without pagination + # newsWithoutPagination: + # label: News + # icon: newspaper + # type: flat + # query: 'q(node).find("[instanceof Your.Namespace:News]").sort("date", "ASC").get()' + # newReferenceNodePath: '/sites/site' + # newNodeType: 'Your.Namespace:News' + # disablePagination: true + ## Example using FlowQuery # tags: # label: Tags # icon: tag @@ -28,6 +38,7 @@ Neos: # query: 'q(node).find("[instanceof Your.Namespace:Tag]").sort("title", "ASC").slice((page - 1) * 20, page * 20).get()' # newReferenceNodePath: 'q(node).find("[instanceof Your.Namespace:NewsList]").first().get(0).path' # newNodeType: 'Your.Namespace:Tag' + # disablePagination: false Flow: security: diff --git a/Resources/Private/FlatNav/src/FlatNav.js b/Resources/Private/FlatNav/src/FlatNav.js index 5adee13..32323f0 100644 --- a/Resources/Private/FlatNav/src/FlatNav.js +++ b/Resources/Private/FlatNav/src/FlatNav.js @@ -228,7 +228,14 @@ class FlatNav extends Component { }} role="button" > - {$get('label', item)} +
+ +
+ + {$get('label', item)} + ); } @@ -246,10 +253,10 @@ class FlatNav extends Component { -
+
{this.renderNodes()}
- {this.props.moreNodesAvailable && (