@chief-editor/flow
Version:
Old核心数据流
1 lines • 1.4 kB
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0});var base_1=require("@chief-editor/base"),nest_watcher_1=require("@co-hooks/nest-watcher");function getRelativeKeys(e){return e.getPathKeys((function(e){var t=e.getValue();return t.type===base_1.NodeType.BRICK||t.type===base_1.NodeType.VIRTUAL?t.field?t.field:null:t.type===base_1.NodeType.REPEAT?e.parentNode?String(e.parentNode.getIndex(e)):t.field:null}))}function getRelativeKey(e){return nest_watcher_1.NestWatcher.combineKeys(getRelativeKeys(e.getNode()))}function getAbsoluteKeys(e){return e.getPathKeys((function(e){var t=e.getValue();return(t.type===base_1.NodeType.BRICK||t.type===base_1.NodeType.VIRTUAL||t.type===base_1.NodeType.REPEAT)&&t.field?t.field:null}))}function getAbsoluteKey(e){return nest_watcher_1.NestWatcher.combineKeys(getAbsoluteKeys(e.getNode()))}function getWatchableKeys(e){var t=[];return e.getPathKeys((function(e){var s=e.getValue();return s.type===base_1.NodeType.VIRTUAL&&s.field?(t=[],null):(s.type===base_1.NodeType.BRICK&&s.field&&t.unshift(s.field),null)})),t}function getWatchableKey(e){return nest_watcher_1.NestWatcher.combineKeys(getWatchableKeys(e))}exports.getRelativeKeys=getRelativeKeys,exports.getRelativeKey=getRelativeKey,exports.getAbsoluteKeys=getAbsoluteKeys,exports.getAbsoluteKey=getAbsoluteKey,exports.getWatchableKeys=getWatchableKeys,exports.getWatchableKey=getWatchableKey;