Refactor common methods in in-memory data providers (#9308)
* Refactor common methods of InMemoryHierarchicalDataProvider and ListDataProvider to a single interface
* Rename HierarchyData and InMemoryHierarchicalDataProvider, introduce HasHierarchicalDataProvider
* Additionally adds a helper method for recursive constructing
TreeData with a child item provider.
Refactor Html5 DnD feature based on API review (#9306)
* Refactor Html5 DnD client side based on API review
- Moved classes to "correct" packages.
- Removed method DragSourceExtension.clearDataTransferText()
- Remove ButtonDragSource in favor of more generic API
Add mobile html5 dnd support using polyfill (#9282)
First step of mobile DND support.
- Add mobile html5 dnd support using polyfill
- Adds a switch for enabling mobile html5 dnd support
- Adds polyfill only when needed
- Ignore native Android Chrome drag start because doesn't work properly
(no dragend event fired)
- Add documentation on enabling mobile HTML5 DnD support
- Add mention of drag-drop-polyfill license
- Fixed issue in polyfill when not using "snapback"
- Add mention of forked polyfill
Fixes #9174
Fix the missing focus and blur implementations (#9269)
Add (FieldEvents.FocusNotifier & FieldEvents.BlurNotifier) in AbstractTextField.
The fields TextField, TextArea and PasswordField are the only focusable input fields where this Implementation is missing.
- Always set some drag data
- Set the dropEffect on dragEnter and dragOver events on drop target
- Send the dropEffect to server on drop event with disclaimer of current support
- Remove _dragOverCriteria_ and use _dropCriteria_ for `dragenter`, `dragover` and `drop` criteria
Tested manually basic DnD and Grid DnD on Mac with Chrome, Firefox, Safari.
Safari is still missing drag image (regression).
Tested manually basic DnD and Grid Dnd on Windows IE11 and Edge.
Drop event for both is still not working properly #9174.
This patch introduces a Tree component, implemented as a Composite
using TreeGrid. As initial version of the component, some functionality
of the old Tree component has been left out for now.
Partly addresses #8617
Improve expand and collapse of items in TreeGrid (#9159)
Fixes a race condition when expanding multiple items.
Only one expand or collapse request should be sent from
the client before waiting for a response, otherwise the
indexing in subsequent requests will be incorrect.
Adds API to collapse and expand multiple items from the
server, reducing the amount of round trips with multiple
item expands and collapses.
HierarchyMapper now correctly keeps expanded nodes expanded
if their parent is collapsed.
Fix problem when reading a nested Design based on a GridLayout (#9092)
The parent Design must leave child handling to the nested design, when
there are no children defined in the parent Design. This fixes a problem
with com.vaadin.ui.GridLayout$OutOfBoundsException when the reading
operation of the parent design tries to set number of rows according to
its empty content.
A composite is included in the server side hierarchy and in the connector
hierarchy on the client side but does not have its own widget or DOM.
To ensure that captions etc are renderer correctly for the root contents,
the client side connector returns both the widget and state for the content
connector.
Server side API related to width and height are automatically forwarded to
the root component to enable easy use of the composite inside different
layout configurations.
Other server side API inherited from AbstractComponent is unwanted, should be
optional and therefore throw an exception by default.
Resolves #2458
Use setCaption Javadocs inherited from Component (#9066)
Component.setCaption has thorough Javadocs that are shadowed by a very
brief snippet in AbstractComponent and an erroneous description in
Panel. By removing those snippets, component classes will instead
inherit a much more useful description of the method.
Add server-side expand and collapse to TreeGrid (#9021)
* Add server-side expand and collapse to TreeGrid
* Add javadocs
* Fix variable naming in TreeGridHugeTreeTest
* Fix review comments
* Merge remote-tracking branch 'github/master' into 8759-server-expand
* Clear pending expands when all data is dropped
* Add documentation
Make getValueProvider return ValueProvider (#8983)
* Make getValueProvider return ValueProvider
The instance can only be a ValueProvider, but the getter previously
returned a less specific type. Making the getter return ValueProvider
makes it easier to reuse the provider in other contexts that require
ValueProvider, e.g. when adding filters to a ListDataProvider.