This epic refactoring unifies the draggable sorting logic by promoting it from Neo.toolbar.Base to Neo.container.Base.
Key Changes:
- Neo.container.Base:
- Added
sortable_ (reactive), sortZone, and sortZoneConfig.
- Implemented
loadSortZoneModule() for lazy loading.
- Implemented
createSortZone(config) to handle instantiation and allow subclasses to inject instance-specific configs.
- Implemented
afterSetSortable to orchestrate lazy loading and creation, using Neo.merge for config flexibility.
- Neo.toolbar.Base:
- Removed redundant sortable logic (now inherited).
- Neo.dashboard.Container:
- Removed duplicated logic.
- Overrode
loadSortZoneModule to use dashboard/SortZone.
- Overrode
createSortZone to inject instance-specific configs (dragProxyConfig, dragProxyExtraCls) and listener implementations.
- SortZones:
- Deleted
src/draggable/toolbar/SortZone.mjs and DragZone.mjs.
- Subclasses (
Grid, Table, Tab) updated to extend Neo.draggable.container.SortZone (via BaseSortZone alias).
- Subclasses:
- Updated
Neo.grid.Container, Neo.table.Container, Neo.tab.Container to use sortable (non-reactive) for overrides to avoid conflicts.
Goal: Reduce code duplication, improve maintainability, and provide a consistent sorting capability for all Containers.
This epic refactoring unifies the draggable sorting logic by promoting it from
Neo.toolbar.BasetoNeo.container.Base.Key Changes:
sortable_(reactive),sortZone, andsortZoneConfig.loadSortZoneModule()for lazy loading.createSortZone(config)to handle instantiation and allow subclasses to inject instance-specific configs.afterSetSortableto orchestrate lazy loading and creation, usingNeo.mergefor config flexibility.loadSortZoneModuleto usedashboard/SortZone.createSortZoneto inject instance-specific configs (dragProxyConfig,dragProxyExtraCls) and listener implementations.src/draggable/toolbar/SortZone.mjsandDragZone.mjs.Grid,Table,Tab) updated to extendNeo.draggable.container.SortZone(viaBaseSortZonealias).Neo.grid.Container,Neo.table.Container,Neo.tab.Containerto usesortable(non-reactive) for overrides to avoid conflicts.Goal: Reduce code duplication, improve maintainability, and provide a consistent sorting capability for all Containers.