novident_nodes 1.2.4
novident_nodes: ^1.2.4 copied to clipboard
An internal Novident package for export common Nodes
1.2.4 #
- Fix:
moveTocannotunlinkcorrectly a node from itsowner. Now it checks if the element really exist, and use fallbacks if required, to ensure deletion.
1.2.3 #
- Fix:
indexis returning invalid cached values. - Fix:
indexis not being updated or invalidated after any type of movement or update in its owner. - Chore: added testing the issue.
1.2.2 #
- Feat:
indexnow cache the value to avoid make a re-calculation every time it's called usinggetCachedValueandcacheValuemethods inNodeDetails - Revert:
canMoveTorestored to its original API withinside(bool) andisSwapMoveparameters. TheDropPosition/positionAPI introduced in 1.2.1 was over-engineered and caused more edge cases than it solved. Adjacent move validation will be handled at the drag-and-drop layer. - Fix:
moveTo,moveNode, andmoveNodeByIdno longer throw aStateErrorwhenunlinkfails due to a race condition (e.g. double-invocation during drag-and-drop). If the node is already detached, the operation proceeds. - Chore(test): removed DropPosition and position-aware tests.
1.2.1 #
- Feat(breaking changes): replaced
inside(bool) withposition(DropPosition?) inNode.canMoveTo.DropPosition.aboveinserts before the target,DropPosition.insideinserts as a child, andDropPosition.belowinserts after. When null, only structural checks run — backward compatible with the oldinside: truedefault. - Feat(breaking changes): removed deprecated
isSwapMoveparameter fromcanMoveTo. Theposition+insertIndexAPI replaces it fully. - Feat:
DropPositionenum with direction-aware adjacent no-op detection.above/belowdetect no-ops using only the position and target index (noinsertIndexneeded).insidewith same parent requiresinsertIndexfor exact position validation; without it, re-insertion is conservatively blocked. - Feat:
insertIndexincanMoveTois now optional. It is only required forinside+ same-parent reorder validation.above/belowadjacent checks work without it. - Fix:
moveTo,moveNode, andmoveNodeByIdno longer throw aStateErrorwhenunlinkfails due to a race condition (e.g. double-invocation during drag-and-drop). If the node is already detached, the operation proceeds. - Chore(test): 24 total tests covering
moveNode,moveNodeById,canMoveToconstraints, position-aware no-ops, adjacent moves, and depth limits.
1.2.0 #
- Feat(breaking changes): renamed
attachNotifier→attachListenerfor consistency with the newChangeEventCallbacktypedef. - Feat(breaking changes): renamed
hasNotifiersAttached→hasEventListenersand removedhasNoNotifiersAttached(use!hasEventListenersinstead). - Feat(breaking changes): renamed typedef
NodeNotifierChangeCallback→ChangeEventCallback. - Feat(breaking changes): removed deprecated
atRootgetter fromNode. UseisAtRootLevelinstead. - Feat(breaking changes): added
insertIndexparameter toNode.canMoveTo(positioned beforeisSwapMove). All parameters remain named so existing callers are unaffected. - Feat(breaking changes):
NodeContainer.update,updateWhere,updateAtnow acceptshouldNotify(defaulttrue) to suppress notifications during internal operations like re-depting. - Deprecated:
isSwapMoveparameter incanMoveTo. WithinsertIndex, the method can now distinguish no-ops from legitimate reorders without it. - Feat:
canMoveTois now position-aware viainsertIndex, enabling exact insertion position validation that mirrorsmoveTologic (>= length= append). Includes no-op detection for same-owner same-position moves. - Feat:
redepthDescendantsstatic method onNodeand instance method onNodeContainerthat recursively reassigns depth levels to all descendants after moving a container. - Fix:
moveNode,moveNodeById, andNode.moveTonow recursively re-depth all descendant levels when moving aNodeContainer, fixing incorrect depth hierarchies after relocation. - Fix:
canMoveTomaxDepthLevel off-by-one: now validatestarget.level + 1against the limit instead oftarget.level. - Fix:
canMoveTojumpToParent guard prevents unsafe cast whentargetis an ownerless node. - Fix:
update,updateWhere,updateAtnow usechildrenLevelinstead oflevel + 1for correct child depth assignment. - Fix:
findNodePathnull safety: acceptsnullalongside-2as stop signal forownerIndex. - Chore(test): 14 new tests for
moveNode,moveNodeById, andcanMoveTocovering re-depth, insertIndex, no-ops, maxDepthLevel, and edge cases. - Chore(test): 7 new tests for
canMoveTowithinsertIndexcovering no-op detection, directional adjacent moves, and depth limits.
1.1.9 #
- Fix:
elementAtOrNullis always returning null even if theindexis a valid num. - Fix:
unlinkmethod, cannot notify to the listeners when required. - Feat: added
atPathmethod. - Chore: general improvements in the API.
1.1.8 #
- Fix:
removeAtandremoveFirstare throwing exceptions when no required.
1.1.7 #
- Fix:
verticalMoveis not working as expected whendownis true. - Feat: added
nextSibling,previousSibling,hasNextSibling,hasPreviousSiblingmethods. - Feat: added
unlinkmethod to removed aNodedirectly without calling theowner. - Feat: added
createNodeIdstatic method forNodeDetailsclass to create ids that are ready to be used for any newNode - Chore: added
toStringmethod definition forNodeChangeand subclasses. - Chore: general improvements in the
NodeContainerAPI andchildrenmanagement.
1.1.6 #
- Fix: some changes are not being notifier to the attached listeners.
- Feat: added
removeFirstmethod forNodeContainer, - Feat: added
hasNotifiersAttachedto know if there's any listener attached. - Feat: added
findNodePathto Node class to get the exact index path (the list start with index of the hightest owner)
1.1.5 #
- Fix:
attachNotifierdoes not check if the notifier is already added. - Fix: infinite equality method when we use something like:
node.details == other.details; - Fix:
removeAtis giving a wrongoriginalPositionvalue for notifiers. - Fix: bad implementation of equality for
NodeChangeclass implementations. - Feat:
detachNotifiersnow can exclude some callbacks from the deletion usingexcludeFromRemove. - Chore(test): added tests for
NodeChangenotifiers. - Chore(doc): added documentation about attaching and detaching notifiers.
1.1.4 #
- Feat(breaking changes): added
indexproperty toNodeMoveChangeandNodeInsertionchanges.
1.1.3 #
- Fix: cannot attach more than one
NodeNotifierChangeCallback. - Fix:
removeWheredoes not notify withNodeChangetype. - Chore: improved some
NodeChangecalls. - Feat: added
NodeClearchange for when thechildrenare cleaned usingclear(). - Feat(breaking changes): added optional property called
deepforcloneandcloneWithNewLevelmethods.
1.1.2 #
- Fix: moving node operations has not implemented
NodeChangeevents. - Feat: added
childrenLevelgetter, that allow us know what should be the children level. - Chore(breaking changes): removed non used properties in
canMoveTo.
1.1.1 #
- Fix: cannot use
canMoveTocorrectly because it's returningfalsealways. - Fix: insertion methods and related won't work by unconfigurable
canMoveTo. - Chore(test): added tests to avoid error with ancestor checking in a swap operation.
1.1.0 #
- Feat: added
verticalMove()method, to allow moving Nodes between the Tree. - Feat: added
NodeCollectormixin to allow collectingNodes. - Feat: added static methods
canMoveToandverticalMoveintoNodeclass. - Fix:
jumpToParentisn't passingstopAtproperty to its owners. - Chore: removed unnecessary
mustCallSuperannotation forowner,id,level,jumpToParent, andindexgetters. - Chore: added
mustCallSupertonotify()method. - Chore: deprecated
atRootgetter and replaced byisAtRootLevel. - Chore: implemented default functions for
NodeVisitorandNodeCollectorintoNodeto avoid unnecessary implementation in leaf nodes. OnlyNodeContaineroverrides the implementation to include itschildren.
1.0.5 #
- Fix:
moveNode()never move node since is comparing parent index instead Node child index. - Chore(BREAKING CHANGES): changed return Node type in
jumpToParent()method to beNodeContainertype.
1.0.4 #
- Fix:
propagateproperty innotifymethod istrueby default.
1.0.2 #
- Chore: added tests for nodes.
- Fix: recursive
toJson()calls inNodeDetails. - Fix: bad type comparations in
ownersetter intoNodeclass.
1.0.0 #
- First release