@qwik.dev/devtools 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/plugin/index.js +8 -5
- package/dist/ui/_virtual/index.qwik.cjs +5 -4
- package/dist/ui/_virtual/index.qwik.mjs +5 -3
- package/dist/ui/components/Tree/Tree.qwik.cjs +36 -16
- package/dist/ui/components/Tree/Tree.qwik.mjs +36 -16
- package/dist/ui/devtools.qwik.cjs +0 -20
- package/dist/ui/devtools.qwik.mjs +1 -21
- package/dist/ui/features/RenderTree/RenderTree.qwik.cjs +125 -62
- package/dist/ui/features/RenderTree/RenderTree.qwik.mjs +125 -62
- package/dist/ui/features/RenderTree/formatTreeData.qwik.cjs +3 -0
- package/dist/ui/features/RenderTree/formatTreeData.qwik.mjs +3 -0
- package/dist/ui/global.css.qwik.cjs +101 -28
- package/dist/ui/global.css.qwik.mjs +101 -28
- package/dist/ui/node_modules/.pnpm/@qwikest_icons@0.0.13_@builder.io_qwik@1.11.0_vite@7.1.3_@types_node@20.14.11_jiti@2.4.2_tsx@4.19.2_yaml@2.7.0__/node_modules/@qwikest/icons/lib/hi.qwik.qwik.cjs +0 -17
- package/dist/ui/node_modules/.pnpm/@qwikest_icons@0.0.13_@builder.io_qwik@1.11.0_vite@7.1.3_@types_node@20.14.11_jiti@2.4.2_tsx@4.19.2_yaml@2.7.0__/node_modules/@qwikest/icons/lib/hi.qwik.qwik.mjs +0 -17
- package/dist/ui/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/index.qwik.cjs +1 -1
- package/dist/ui/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/index.qwik.mjs +1 -1
- package/package.json +4 -1
- package/dist/ui/_virtual/client.qwik.cjs +0 -5
- package/dist/ui/_virtual/client.qwik.mjs +0 -5
- package/dist/ui/_virtual/client.qwik2.cjs +0 -4
- package/dist/ui/_virtual/client.qwik2.mjs +0 -4
- package/dist/ui/_virtual/index.qwik2.cjs +0 -8
- package/dist/ui/_virtual/index.qwik2.mjs +0 -8
- package/dist/ui/_virtual/index.qwik3.cjs +0 -4
- package/dist/ui/_virtual/index.qwik3.mjs +0 -4
- package/dist/ui/_virtual/index.qwik4.cjs +0 -4
- package/dist/ui/_virtual/index.qwik4.mjs +0 -4
- package/dist/ui/_virtual/index.qwik5.cjs +0 -6
- package/dist/ui/_virtual/index.qwik5.mjs +0 -7
- package/dist/ui/_virtual/index.qwik6.cjs +0 -4
- package/dist/ui/_virtual/index.qwik6.mjs +0 -4
- package/dist/ui/_virtual/jsx-runtime.qwik.cjs +0 -5
- package/dist/ui/_virtual/jsx-runtime.qwik.mjs +0 -5
- package/dist/ui/_virtual/jsx-runtime.qwik2.cjs +0 -4
- package/dist/ui/_virtual/jsx-runtime.qwik2.mjs +0 -4
- package/dist/ui/_virtual/react-dom-server-legacy.node.development.qwik.cjs +0 -4
- package/dist/ui/_virtual/react-dom-server-legacy.node.development.qwik.mjs +0 -4
- package/dist/ui/_virtual/react-dom-server-legacy.node.production.min.qwik.cjs +0 -4
- package/dist/ui/_virtual/react-dom-server-legacy.node.production.min.qwik.mjs +0 -4
- package/dist/ui/_virtual/react-dom-server.node.development.qwik.cjs +0 -4
- package/dist/ui/_virtual/react-dom-server.node.development.qwik.mjs +0 -4
- package/dist/ui/_virtual/react-dom-server.node.production.min.qwik.cjs +0 -4
- package/dist/ui/_virtual/react-dom-server.node.production.min.qwik.mjs +0 -4
- package/dist/ui/_virtual/react-dom.development.qwik.cjs +0 -4
- package/dist/ui/_virtual/react-dom.development.qwik.mjs +0 -4
- package/dist/ui/_virtual/react-dom.production.min.qwik.cjs +0 -4
- package/dist/ui/_virtual/react-dom.production.min.qwik.mjs +0 -4
- package/dist/ui/_virtual/react-jsx-runtime.development.qwik.cjs +0 -4
- package/dist/ui/_virtual/react-jsx-runtime.development.qwik.mjs +0 -4
- package/dist/ui/_virtual/react-jsx-runtime.production.min.qwik.cjs +0 -4
- package/dist/ui/_virtual/react-jsx-runtime.production.min.qwik.mjs +0 -4
- package/dist/ui/_virtual/react.development.qwik.cjs +0 -4
- package/dist/ui/_virtual/react.development.qwik.mjs +0 -4
- package/dist/ui/_virtual/react.production.min.qwik.cjs +0 -4
- package/dist/ui/_virtual/react.production.min.qwik.mjs +0 -4
- package/dist/ui/_virtual/scheduler.development.qwik.cjs +0 -4
- package/dist/ui/_virtual/scheduler.development.qwik.mjs +0 -4
- package/dist/ui/_virtual/scheduler.production.min.qwik.cjs +0 -4
- package/dist/ui/_virtual/scheduler.production.min.qwik.mjs +0 -4
- package/dist/ui/_virtual/server.node.qwik.cjs +0 -5
- package/dist/ui/_virtual/server.node.qwik.mjs +0 -5
- package/dist/ui/_virtual/server.node.qwik2.cjs +0 -4
- package/dist/ui/_virtual/server.node.qwik2.mjs +0 -4
- package/dist/ui/features/Components/Components.qwik.cjs +0 -108
- package/dist/ui/features/Components/Components.qwik.mjs +0 -108
- package/dist/ui/features/Components/components/Tree.qwik.cjs +0 -60
- package/dist/ui/features/Components/components/Tree.qwik.mjs +0 -60
- package/dist/ui/features/Components/styles.css.qwik.cjs +0 -3
- package/dist/ui/features/Components/styles.css.qwik.mjs +0 -4
- package/dist/ui/lib-types/ui/src/features/Components/Components.d.ts +0 -19
- package/dist/ui/lib-types/ui/src/features/Components/components/Tree.d.ts +0 -1
- package/dist/ui/node_modules/.pnpm/@qwik.dev_react@2.0.0-beta.9_@qwik.dev_core@2.0.0-beta.9_prettier@3.3.3_vite@7.1.3_@typ_acdb3a1fab641cc17ee740fd3c684547/node_modules/@qwik.dev/react/lib/index.qwik.qwik.cjs +0 -269
- package/dist/ui/node_modules/.pnpm/@qwik.dev_react@2.0.0-beta.9_@qwik.dev_core@2.0.0-beta.9_prettier@3.3.3_vite@7.1.3_@typ_acdb3a1fab641cc17ee740fd3c684547/node_modules/@qwik.dev/react/lib/index.qwik.qwik.mjs +0 -269
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/EventEmitter.qwik.cjs +0 -162
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/EventEmitter.qwik.mjs +0 -162
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/controlledEnvironment/ControlledTreeEnvironment.qwik.cjs +0 -48
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/controlledEnvironment/ControlledTreeEnvironment.qwik.mjs +0 -48
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/controlledEnvironment/InteractionManagerProvider.qwik.cjs +0 -29
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/controlledEnvironment/InteractionManagerProvider.qwik.mjs +0 -29
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/controlledEnvironment/buildInteractionMode.qwik.cjs +0 -19
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/controlledEnvironment/buildInteractionMode.qwik.mjs +0 -19
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/controlledEnvironment/layoutUtils.qwik.cjs +0 -17
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/controlledEnvironment/layoutUtils.qwik.mjs +0 -17
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/controlledEnvironment/mergeInteractionManagers.qwik.cjs +0 -22
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/controlledEnvironment/mergeInteractionManagers.qwik.mjs +0 -22
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/controlledEnvironment/useControlledTreeEnvironmentProps.qwik.cjs +0 -127
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/controlledEnvironment/useControlledTreeEnvironmentProps.qwik.mjs +0 -127
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/controlledEnvironment/useLinearItems.qwik.cjs +0 -7
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/controlledEnvironment/useLinearItems.qwik.mjs +0 -7
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/drag/DragAndDropProvider.qwik.cjs +0 -231
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/drag/DragAndDropProvider.qwik.mjs +0 -231
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/drag/DraggingPositionEvaluation.qwik.cjs +0 -179
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/drag/DraggingPositionEvaluation.qwik.mjs +0 -179
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/drag/useCanDropAt.qwik.cjs +0 -30
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/drag/useCanDropAt.qwik.mjs +0 -30
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/drag/useDraggingPosition.qwik.cjs +0 -87
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/drag/useDraggingPosition.qwik.mjs +0 -87
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/drag/useGetParentOfLinearItem.qwik.cjs +0 -21
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/drag/useGetParentOfLinearItem.qwik.mjs +0 -21
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/drag/useGetViableDragPositions.qwik.cjs +0 -90
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/drag/useGetViableDragPositions.qwik.mjs +0 -90
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/environmentActions/EnvironmentActionsProvider.qwik.cjs +0 -321
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/environmentActions/EnvironmentActionsProvider.qwik.mjs +0 -321
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/environmentActions/useCreatedEnvironmentRef.qwik.cjs +0 -24
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/environmentActions/useCreatedEnvironmentRef.qwik.mjs +0 -24
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/hotkeys/defaultKeyboardBindings.qwik.cjs +0 -18
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/hotkeys/defaultKeyboardBindings.qwik.mjs +0 -18
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/hotkeys/useHotkey.qwik.cjs +0 -76
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/hotkeys/useHotkey.qwik.mjs +0 -76
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/hotkeys/useKey.qwik.cjs +0 -15
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/hotkeys/useKey.qwik.mjs +0 -15
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/hotkeys/useKeyboardBindings.qwik.cjs +0 -26
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/hotkeys/useKeyboardBindings.qwik.mjs +0 -26
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/interactionMode/ClickArrowToExpandInteractionManager.qwik.cjs +0 -49
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/interactionMode/ClickArrowToExpandInteractionManager.qwik.mjs +0 -49
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/interactionMode/ClickItemToExpandInteractionManager.qwik.cjs +0 -52
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/interactionMode/ClickItemToExpandInteractionManager.qwik.mjs +0 -52
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/interactionMode/DoubleClickItemToExpandInteractionManager.qwik.cjs +0 -56
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/interactionMode/DoubleClickItemToExpandInteractionManager.qwik.mjs +0 -56
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/isControlKey.qwik.cjs +0 -6
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/isControlKey.qwik.mjs +0 -6
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/renderers/createDefaultRenderers.qwik.cjs +0 -136
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/renderers/createDefaultRenderers.qwik.mjs +0 -136
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/renderers/useRenderers.qwik.cjs +0 -42
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/renderers/useRenderers.qwik.mjs +0 -42
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/search/SearchInput.qwik.cjs +0 -69
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/search/SearchInput.qwik.mjs +0 -69
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/search/defaultMatcher.qwik.cjs +0 -6
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/search/defaultMatcher.qwik.mjs +0 -6
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/search/useSearchMatchFocus.qwik.cjs +0 -37
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/search/useSearchMatchFocus.qwik.mjs +0 -37
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/DragBetweenLine.qwik.cjs +0 -31
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/DragBetweenLine.qwik.mjs +0 -31
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/LiveDescription.qwik.cjs +0 -52
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/LiveDescription.qwik.mjs +0 -52
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/MaybeLiveDescription.qwik.cjs +0 -14
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/MaybeLiveDescription.qwik.mjs +0 -14
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/Tree.qwik.cjs +0 -87
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/Tree.qwik.mjs +0 -87
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/TreeManager.qwik.cjs +0 -62
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/TreeManager.qwik.mjs +0 -62
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/defaultLiveDescriptors.qwik.cjs +0 -10
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/defaultLiveDescriptors.qwik.mjs +0 -10
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/getItemsLinearly.qwik.cjs +0 -19
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/getItemsLinearly.qwik.mjs +0 -19
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/resolveLiveDescriptor.qwik.cjs +0 -41
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/resolveLiveDescriptor.qwik.mjs +0 -41
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/scrollIntoView.qwik.cjs +0 -19
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/scrollIntoView.qwik.mjs +0 -19
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/useCreatedTreeInformation.qwik.cjs +0 -37
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/useCreatedTreeInformation.qwik.mjs +0 -37
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/useFocusWithin.qwik.cjs +0 -31
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/useFocusWithin.qwik.mjs +0 -31
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/useMoveFocusToIndex.qwik.cjs +0 -25
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/useMoveFocusToIndex.qwik.mjs +0 -25
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/useSelectUpTo.qwik.cjs +0 -82
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/useSelectUpTo.qwik.mjs +0 -82
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/useTreeKeyboardBindings.qwik.cjs +0 -164
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/useTreeKeyboardBindings.qwik.mjs +0 -164
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/useViewState.qwik.cjs +0 -11
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/tree/useViewState.qwik.mjs +0 -11
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/treeActions/TreeActionsProvider.qwik.cjs +0 -87
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/treeActions/TreeActionsProvider.qwik.mjs +0 -87
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/treeActions/useCreatedTreeRef.qwik.cjs +0 -26
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/treeActions/useCreatedTreeRef.qwik.mjs +0 -26
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/treeItem/TreeItemChildren.qwik.cjs +0 -27
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/treeItem/TreeItemChildren.qwik.mjs +0 -27
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/treeItem/TreeItemElement.qwik.cjs +0 -53
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/treeItem/TreeItemElement.qwik.mjs +0 -53
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/treeItem/TreeItemRenamingInput.qwik.cjs +0 -78
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/treeItem/TreeItemRenamingInput.qwik.mjs +0 -78
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/treeItem/useTreeItemRenderContext.qwik.cjs +0 -200
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/treeItem/useTreeItemRenderContext.qwik.mjs +0 -200
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/types.qwik.cjs +0 -8
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/types.qwik.mjs +0 -9
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/uncontrolledEnvironment/CompleteTreeDataProvider.qwik.cjs +0 -145
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/uncontrolledEnvironment/CompleteTreeDataProvider.qwik.mjs +0 -145
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/uncontrolledEnvironment/StaticTreeDataProvider.qwik.cjs +0 -152
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/uncontrolledEnvironment/StaticTreeDataProvider.qwik.mjs +0 -152
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/uncontrolledEnvironment/UncontrolledTreeEnvironment.qwik.cjs +0 -320
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/uncontrolledEnvironment/UncontrolledTreeEnvironment.qwik.mjs +0 -320
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/useCallSoon.qwik.cjs +0 -29
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/useCallSoon.qwik.mjs +0 -29
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/useGetOriginalItemOrder.qwik.cjs +0 -27
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/useGetOriginalItemOrder.qwik.mjs +0 -27
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/useHtmlElementEventListener.qwik.cjs +0 -18
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/useHtmlElementEventListener.qwik.mjs +0 -18
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/useIsMounted.qwik.cjs +0 -14
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/useIsMounted.qwik.mjs +0 -14
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/useRefCopy.qwik.cjs +0 -9
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/useRefCopy.qwik.mjs +0 -9
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/useSideEffect.qwik.cjs +0 -30
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/useSideEffect.qwik.mjs +0 -30
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/useStableHandler.qwik.cjs +0 -17
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/useStableHandler.qwik.mjs +0 -17
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/utils.qwik.cjs +0 -27
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/utils.qwik.mjs +0 -27
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/waitFor.qwik.cjs +0 -30
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/esm/waitFor.qwik.mjs +0 -30
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/style-modern.css.qwik.cjs +0 -3
- package/dist/ui/node_modules/.pnpm/react-complex-tree@2.4.6_react@18.2.0/node_modules/react-complex-tree/lib/style-modern.css.qwik.mjs +0 -4
- package/dist/ui/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.qwik.cjs +0 -5418
- package/dist/ui/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.qwik.mjs +0 -5418
- package/dist/ui/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.qwik.cjs +0 -1531
- package/dist/ui/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.qwik.mjs +0 -1531
- package/dist/ui/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs/react-dom-server.node.development.qwik.cjs +0 -5432
- package/dist/ui/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs/react-dom-server.node.development.qwik.mjs +0 -5432
- package/dist/ui/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs/react-dom-server.node.production.min.qwik.cjs +0 -1595
- package/dist/ui/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs/react-dom-server.node.production.min.qwik.mjs +0 -1595
- package/dist/ui/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs/react-dom.development.qwik.cjs +0 -21128
- package/dist/ui/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs/react-dom.development.qwik.mjs +0 -21128
- package/dist/ui/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs/react-dom.production.min.qwik.cjs +0 -6420
- package/dist/ui/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs/react-dom.production.min.qwik.mjs +0 -6420
- package/dist/ui/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/client.qwik.cjs +0 -34
- package/dist/ui/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/client.qwik.mjs +0 -34
- package/dist/ui/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/index.qwik.cjs +0 -31
- package/dist/ui/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/index.qwik.mjs +0 -31
- package/dist/ui/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/server.node.qwik.cjs +0 -28
- package/dist/ui/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/server.node.qwik.mjs +0 -28
- package/dist/ui/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.development.qwik.cjs +0 -875
- package/dist/ui/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.development.qwik.mjs +0 -875
- package/dist/ui/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.qwik.cjs +0 -33
- package/dist/ui/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.qwik.mjs +0 -33
- package/dist/ui/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react.development.qwik.cjs +0 -1887
- package/dist/ui/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react.development.qwik.mjs +0 -1887
- package/dist/ui/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react.production.min.qwik.cjs +0 -265
- package/dist/ui/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react.production.min.qwik.mjs +0 -265
- package/dist/ui/node_modules/.pnpm/react@18.2.0/node_modules/react/index.qwik.cjs +0 -17
- package/dist/ui/node_modules/.pnpm/react@18.2.0/node_modules/react/index.qwik.mjs +0 -17
- package/dist/ui/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.qwik.cjs +0 -17
- package/dist/ui/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.qwik.mjs +0 -17
- package/dist/ui/node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.development.qwik.cjs +0 -453
- package/dist/ui/node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.development.qwik.mjs +0 -453
- package/dist/ui/node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.qwik.cjs +0 -248
- package/dist/ui/node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.qwik.mjs +0 -248
- package/dist/ui/node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/index.qwik.cjs +0 -17
- package/dist/ui/node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/index.qwik.mjs +0 -17
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
var DraggingPositionEvaluation = (
|
|
2
|
-
/** @class */
|
|
3
|
-
function() {
|
|
4
|
-
function DraggingPositionEvaluation2(env, e, treeId, hoveringPosition, draggingItems, getParentOfLinearItem) {
|
|
5
|
-
this.env = env;
|
|
6
|
-
this.e = e;
|
|
7
|
-
this.treeId = treeId;
|
|
8
|
-
this.linearIndex = hoveringPosition.linearIndex;
|
|
9
|
-
this.offset = hoveringPosition.offset;
|
|
10
|
-
this.indentation = hoveringPosition.indentation;
|
|
11
|
-
this.targetItem = this.env.linearItems[this.treeId][this.linearIndex];
|
|
12
|
-
this.getParentOfLinearItem = getParentOfLinearItem;
|
|
13
|
-
this.draggingItems = draggingItems;
|
|
14
|
-
}
|
|
15
|
-
DraggingPositionEvaluation2.prototype.getEmptyTreeDragPosition = function() {
|
|
16
|
-
return {
|
|
17
|
-
targetType: "root",
|
|
18
|
-
treeId: this.treeId,
|
|
19
|
-
depth: 0,
|
|
20
|
-
linearIndex: 0,
|
|
21
|
-
targetItem: this.env.trees[this.treeId].rootItem
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
DraggingPositionEvaluation2.prototype.maybeRedirectToParent = function() {
|
|
25
|
-
var redirectTargetToParent = !this.env.canReorderItems && !this.env.canDropOnNonFolder && !this.env.items[this.targetItem.item].isFolder;
|
|
26
|
-
if (redirectTargetToParent) {
|
|
27
|
-
var _a = this.getParentOfLinearItem(this.linearIndex, this.treeId), parentLinearIndex = _a.parentLinearIndex, parent_1 = _a.parent;
|
|
28
|
-
this.targetItem = parent_1;
|
|
29
|
-
this.linearIndex = parentLinearIndex;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
DraggingPositionEvaluation2.prototype.maybeReparentUpwards = function() {
|
|
33
|
-
var _a, _b;
|
|
34
|
-
if (this.indentation === void 0) {
|
|
35
|
-
return void 0;
|
|
36
|
-
}
|
|
37
|
-
var treeLinearItems = this.env.linearItems[this.treeId];
|
|
38
|
-
var deepestDepth = treeLinearItems[this.linearIndex].depth;
|
|
39
|
-
var legalDropDepthCount = (
|
|
40
|
-
// itemDepthDifferenceToNextItem/isLastInGroup
|
|
41
|
-
deepestDepth - ((_b = (_a = treeLinearItems[this.linearIndex + 1]) === null || _a === void 0 ? void 0 : _a.depth) !== null && _b !== void 0 ? _b : 0)
|
|
42
|
-
);
|
|
43
|
-
var canReparentUpwards = this.offset === "bottom" && legalDropDepthCount > 0;
|
|
44
|
-
if (!canReparentUpwards) {
|
|
45
|
-
return void 0;
|
|
46
|
-
}
|
|
47
|
-
var droppingIndent = Math.max(deepestDepth - legalDropDepthCount, this.indentation);
|
|
48
|
-
var newParent = {
|
|
49
|
-
parentLinearIndex: this.linearIndex,
|
|
50
|
-
parent: this.targetItem
|
|
51
|
-
};
|
|
52
|
-
var insertionItemAbove;
|
|
53
|
-
for (var i = deepestDepth; i >= droppingIndent; i -= 1) {
|
|
54
|
-
insertionItemAbove = newParent;
|
|
55
|
-
newParent = this.getParentOfLinearItem(newParent.parentLinearIndex, this.treeId);
|
|
56
|
-
}
|
|
57
|
-
if (this.indentation === treeLinearItems[this.linearIndex].depth) {
|
|
58
|
-
return void 0;
|
|
59
|
-
}
|
|
60
|
-
if (!insertionItemAbove) {
|
|
61
|
-
return void 0;
|
|
62
|
-
}
|
|
63
|
-
var reparentedChildIndex = this.env.items[newParent.parent.item].children.indexOf(insertionItemAbove.parent.item) + 1;
|
|
64
|
-
if (this.draggingItems && this.isDescendant(this.treeId, newParent.parentLinearIndex + 1, this.draggingItems)) {
|
|
65
|
-
return void 0;
|
|
66
|
-
}
|
|
67
|
-
return {
|
|
68
|
-
targetType: "between-items",
|
|
69
|
-
treeId: this.treeId,
|
|
70
|
-
parentItem: newParent.parent.item,
|
|
71
|
-
depth: droppingIndent,
|
|
72
|
-
linearIndex: this.linearIndex + 1,
|
|
73
|
-
childIndex: reparentedChildIndex,
|
|
74
|
-
linePosition: "bottom"
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
DraggingPositionEvaluation2.prototype.maybeRedirectInsideOpenFolder = function() {
|
|
78
|
-
var nextItem = this.env.linearItems[this.treeId][this.linearIndex + 1];
|
|
79
|
-
var redirectInsideOpenFolder = !this.env.canDropBelowOpenFolders && nextItem && this.targetItem.depth === nextItem.depth - 1 && this.offset === "bottom";
|
|
80
|
-
if (redirectInsideOpenFolder) {
|
|
81
|
-
this.targetItem = nextItem;
|
|
82
|
-
this.linearIndex += 1;
|
|
83
|
-
this.offset = "top";
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
DraggingPositionEvaluation2.prototype.maybeMapToBottomOffset = function() {
|
|
87
|
-
var priorItem = this.env.linearItems[this.treeId][this.linearIndex - 1];
|
|
88
|
-
if (!priorItem || (priorItem === null || priorItem === void 0 ? void 0 : priorItem.depth) === void 0)
|
|
89
|
-
return;
|
|
90
|
-
var depthDistanceToPrior = priorItem.depth - this.targetItem.depth;
|
|
91
|
-
if (this.offset === "top" && (depthDistanceToPrior === 0 || depthDistanceToPrior > 0 && this.indentation !== void 0)) {
|
|
92
|
-
this.offset = "bottom";
|
|
93
|
-
this.linearIndex -= 1;
|
|
94
|
-
this.targetItem = this.env.linearItems[this.treeId][this.linearIndex];
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
DraggingPositionEvaluation2.prototype.canDropAtCurrentTarget = function() {
|
|
98
|
-
var _this = this;
|
|
99
|
-
var _a;
|
|
100
|
-
var targetItemData = this.env.items[this.targetItem.item];
|
|
101
|
-
if (!this.offset && !this.env.canDropOnNonFolder && !targetItemData.isFolder) {
|
|
102
|
-
return false;
|
|
103
|
-
}
|
|
104
|
-
if (!this.offset && !this.env.canDropOnFolder && targetItemData.isFolder) {
|
|
105
|
-
return false;
|
|
106
|
-
}
|
|
107
|
-
if (this.offset && !this.env.canReorderItems) {
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
110
|
-
if ((_a = this.draggingItems) === null || _a === void 0 ? void 0 : _a.some(function(draggingItem) {
|
|
111
|
-
return draggingItem.index === _this.targetItem.item;
|
|
112
|
-
})) {
|
|
113
|
-
return false;
|
|
114
|
-
}
|
|
115
|
-
return true;
|
|
116
|
-
};
|
|
117
|
-
DraggingPositionEvaluation2.prototype.getDraggingPosition = function() {
|
|
118
|
-
if (this.env.linearItems[this.treeId].length === 0) {
|
|
119
|
-
return this.getEmptyTreeDragPosition();
|
|
120
|
-
}
|
|
121
|
-
if (!this.draggingItems || this.linearIndex < 0 || this.linearIndex >= this.env.linearItems[this.treeId].length) {
|
|
122
|
-
return void 0;
|
|
123
|
-
}
|
|
124
|
-
this.maybeRedirectToParent();
|
|
125
|
-
this.maybeRedirectInsideOpenFolder();
|
|
126
|
-
this.maybeMapToBottomOffset();
|
|
127
|
-
var reparented = this.maybeReparentUpwards();
|
|
128
|
-
if (reparented) {
|
|
129
|
-
return reparented;
|
|
130
|
-
}
|
|
131
|
-
if (this.areDraggingItemsDescendantOfTarget()) {
|
|
132
|
-
return "invalid";
|
|
133
|
-
}
|
|
134
|
-
if (!this.canDropAtCurrentTarget()) {
|
|
135
|
-
return "invalid";
|
|
136
|
-
}
|
|
137
|
-
var parent = this.getParentOfLinearItem(this.linearIndex, this.treeId).parent;
|
|
138
|
-
var newChildIndex = this.env.items[parent.item].children.indexOf(this.targetItem.item) + (this.offset === "top" ? 0 : 1);
|
|
139
|
-
if (this.offset) {
|
|
140
|
-
return {
|
|
141
|
-
targetType: "between-items",
|
|
142
|
-
treeId: this.treeId,
|
|
143
|
-
parentItem: parent.item,
|
|
144
|
-
depth: this.targetItem.depth,
|
|
145
|
-
linearIndex: this.linearIndex + (this.offset === "top" ? 0 : 1),
|
|
146
|
-
childIndex: newChildIndex,
|
|
147
|
-
linePosition: this.offset
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
return {
|
|
151
|
-
targetType: "item",
|
|
152
|
-
treeId: this.treeId,
|
|
153
|
-
parentItem: parent.item,
|
|
154
|
-
targetItem: this.targetItem.item,
|
|
155
|
-
depth: this.targetItem.depth,
|
|
156
|
-
linearIndex: this.linearIndex
|
|
157
|
-
};
|
|
158
|
-
};
|
|
159
|
-
DraggingPositionEvaluation2.prototype.isDescendant = function(treeId, itemLinearIndex, potentialParents) {
|
|
160
|
-
var _a = this.getParentOfLinearItem(itemLinearIndex, treeId), parentLinearIndex = _a.parentLinearIndex, parent = _a.parent;
|
|
161
|
-
if (potentialParents.some(function(p) {
|
|
162
|
-
return p.index === parent.item;
|
|
163
|
-
})) {
|
|
164
|
-
return true;
|
|
165
|
-
}
|
|
166
|
-
if (parent.depth === 0) {
|
|
167
|
-
return false;
|
|
168
|
-
}
|
|
169
|
-
return this.isDescendant(treeId, parentLinearIndex, potentialParents);
|
|
170
|
-
};
|
|
171
|
-
DraggingPositionEvaluation2.prototype.areDraggingItemsDescendantOfTarget = function() {
|
|
172
|
-
return this.draggingItems && this.isDescendant(this.treeId, this.linearIndex, this.draggingItems);
|
|
173
|
-
};
|
|
174
|
-
return DraggingPositionEvaluation2;
|
|
175
|
-
}()
|
|
176
|
-
);
|
|
177
|
-
export {
|
|
178
|
-
DraggingPositionEvaluation
|
|
179
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../../../../../../../../_virtual/index.qwik2.cjs");
|
|
4
|
-
const ControlledTreeEnvironment = require("../controlledEnvironment/ControlledTreeEnvironment.qwik.cjs");
|
|
5
|
-
var useCanDropAt = function() {
|
|
6
|
-
var environment = ControlledTreeEnvironment.useTreeEnvironment();
|
|
7
|
-
return index.reactExports.useCallback(function(draggingPosition, draggingItems) {
|
|
8
|
-
if (draggingPosition.targetType === "between-items") {
|
|
9
|
-
if (!environment.canReorderItems) {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
} else if (draggingPosition.targetType === "root") {
|
|
13
|
-
if (!environment.canDropOnFolder) {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
} else {
|
|
17
|
-
var resolvedItem = environment.items[draggingPosition.targetItem];
|
|
18
|
-
if (!resolvedItem || !environment.canDropOnFolder && resolvedItem.isFolder || !environment.canDropOnNonFolder && !resolvedItem.isFolder || draggingItems.some(function(draggingItem) {
|
|
19
|
-
return draggingItem.index === draggingPosition.targetItem;
|
|
20
|
-
})) {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
if (environment.canDropAt && (!draggingItems || !environment.canDropAt(draggingItems, draggingPosition))) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
return true;
|
|
28
|
-
}, [environment]);
|
|
29
|
-
};
|
|
30
|
-
exports.useCanDropAt = useCanDropAt;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { r as reactExports } from "../../../../../../../../_virtual/index.qwik2.mjs";
|
|
2
|
-
import { useTreeEnvironment } from "../controlledEnvironment/ControlledTreeEnvironment.qwik.mjs";
|
|
3
|
-
var useCanDropAt = function() {
|
|
4
|
-
var environment = useTreeEnvironment();
|
|
5
|
-
return reactExports.useCallback(function(draggingPosition, draggingItems) {
|
|
6
|
-
if (draggingPosition.targetType === "between-items") {
|
|
7
|
-
if (!environment.canReorderItems) {
|
|
8
|
-
return false;
|
|
9
|
-
}
|
|
10
|
-
} else if (draggingPosition.targetType === "root") {
|
|
11
|
-
if (!environment.canDropOnFolder) {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
} else {
|
|
15
|
-
var resolvedItem = environment.items[draggingPosition.targetItem];
|
|
16
|
-
if (!resolvedItem || !environment.canDropOnFolder && resolvedItem.isFolder || !environment.canDropOnNonFolder && !resolvedItem.isFolder || draggingItems.some(function(draggingItem) {
|
|
17
|
-
return draggingItem.index === draggingPosition.targetItem;
|
|
18
|
-
})) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
if (environment.canDropAt && (!draggingItems || !environment.canDropAt(draggingItems, draggingPosition))) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
return true;
|
|
26
|
-
}, [environment]);
|
|
27
|
-
};
|
|
28
|
-
export {
|
|
29
|
-
useCanDropAt
|
|
30
|
-
};
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../../../../../../../../_virtual/index.qwik2.cjs");
|
|
4
|
-
const layoutUtils = require("../controlledEnvironment/layoutUtils.qwik.cjs");
|
|
5
|
-
const ControlledTreeEnvironment = require("../controlledEnvironment/ControlledTreeEnvironment.qwik.cjs");
|
|
6
|
-
const useStableHandler = require("../useStableHandler.qwik.cjs");
|
|
7
|
-
const DraggingPositionEvaluation = require("./DraggingPositionEvaluation.qwik.cjs");
|
|
8
|
-
const useGetParentOfLinearItem = require("./useGetParentOfLinearItem.qwik.cjs");
|
|
9
|
-
var useDraggingPosition = function() {
|
|
10
|
-
var dragCode = index.reactExports.useRef("initial");
|
|
11
|
-
var _a = index.reactExports.useState(void 0), draggingItems = _a[0], setDraggingItems = _a[1];
|
|
12
|
-
var itemHeight = index.reactExports.useRef(0);
|
|
13
|
-
var env = ControlledTreeEnvironment.useTreeEnvironment();
|
|
14
|
-
var getParentOfLinearItem = useGetParentOfLinearItem.useGetGetParentOfLinearItem();
|
|
15
|
-
var isNewDragPosition = useStableHandler.useStableHandler(function(e, treeId, hoveringPosition) {
|
|
16
|
-
if (!hoveringPosition) {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
var offset = hoveringPosition.offset, linearIndex = hoveringPosition.linearIndex;
|
|
20
|
-
var newDragCode = "".concat(treeId, "__").concat(linearIndex, "__").concat(offset !== null && offset !== void 0 ? offset : "", "__").concat(hoveringPosition.indentation);
|
|
21
|
-
if (newDragCode !== dragCode.current) {
|
|
22
|
-
dragCode.current = newDragCode;
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
return false;
|
|
26
|
-
});
|
|
27
|
-
var getHoveringPosition = useStableHandler.useStableHandler(function(e, treeId, containerRef) {
|
|
28
|
-
if (!containerRef.current) {
|
|
29
|
-
return void 0;
|
|
30
|
-
}
|
|
31
|
-
var treeBb = containerRef.current.getBoundingClientRect();
|
|
32
|
-
if (layoutUtils.isOutsideOfContainer(e, treeBb)) {
|
|
33
|
-
return void 0;
|
|
34
|
-
}
|
|
35
|
-
var hoveringPosition = (e.clientY - treeBb.top) / itemHeight.current;
|
|
36
|
-
var treeLinearItems = env.linearItems[treeId];
|
|
37
|
-
var linearIndex = Math.min(Math.max(0, Math.floor(hoveringPosition)), treeLinearItems.length - 1);
|
|
38
|
-
if (treeLinearItems.length === 0) {
|
|
39
|
-
return {
|
|
40
|
-
linearIndex: 0,
|
|
41
|
-
offset: "bottom",
|
|
42
|
-
indentation: 0
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
var targetLinearItem = treeLinearItems[linearIndex];
|
|
46
|
-
var targetItem = env.items[targetLinearItem.item];
|
|
47
|
-
var indentation = !env.renderDepthOffset ? void 0 : Math.max(Math.floor((e.clientX - treeBb.left) / env.renderDepthOffset), 0);
|
|
48
|
-
var offset;
|
|
49
|
-
var lineThreshold = !env.canReorderItems ? 0 : (targetItem === null || targetItem === void 0 ? void 0 : targetItem.isFolder) && env.canDropOnFolder || env.canDropOnNonFolder ? 0.2 : 0.5;
|
|
50
|
-
if (hoveringPosition - 0.5 >= treeLinearItems.length - 1) {
|
|
51
|
-
offset = "bottom";
|
|
52
|
-
} else if (hoveringPosition % 1 < lineThreshold) {
|
|
53
|
-
offset = "top";
|
|
54
|
-
} else if (hoveringPosition % 1 > 1 - lineThreshold) {
|
|
55
|
-
offset = "bottom";
|
|
56
|
-
}
|
|
57
|
-
return { linearIndex, offset, indentation };
|
|
58
|
-
});
|
|
59
|
-
var getDraggingPosition = useStableHandler.useStableHandler(function(e, treeId, containerRef) {
|
|
60
|
-
var hoveringPosition = getHoveringPosition(e, treeId, containerRef);
|
|
61
|
-
if (!isNewDragPosition(e, treeId, hoveringPosition)) {
|
|
62
|
-
return void 0;
|
|
63
|
-
}
|
|
64
|
-
if (!draggingItems || !env.canDragAndDrop || !hoveringPosition || e.clientX < 0 || e.clientY < 0) {
|
|
65
|
-
return "invalid";
|
|
66
|
-
}
|
|
67
|
-
return new DraggingPositionEvaluation.DraggingPositionEvaluation(env, e, treeId, hoveringPosition, draggingItems, getParentOfLinearItem).getDraggingPosition();
|
|
68
|
-
});
|
|
69
|
-
var initiateDraggingPosition = useStableHandler.useStableHandler(function(treeId, items) {
|
|
70
|
-
setDraggingItems(items);
|
|
71
|
-
dragCode.current = "initial";
|
|
72
|
-
itemHeight.current = layoutUtils.computeItemHeight(treeId);
|
|
73
|
-
});
|
|
74
|
-
var resetDraggingPosition = useStableHandler.useStableHandler(function() {
|
|
75
|
-
setDraggingItems(void 0);
|
|
76
|
-
dragCode.current = "initial";
|
|
77
|
-
itemHeight.current = 0;
|
|
78
|
-
});
|
|
79
|
-
return {
|
|
80
|
-
initiateDraggingPosition,
|
|
81
|
-
resetDraggingPosition,
|
|
82
|
-
draggingItems,
|
|
83
|
-
getDraggingPosition,
|
|
84
|
-
itemHeight
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
exports.useDraggingPosition = useDraggingPosition;
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { r as reactExports } from "../../../../../../../../_virtual/index.qwik2.mjs";
|
|
2
|
-
import { computeItemHeight, isOutsideOfContainer } from "../controlledEnvironment/layoutUtils.qwik.mjs";
|
|
3
|
-
import { useTreeEnvironment } from "../controlledEnvironment/ControlledTreeEnvironment.qwik.mjs";
|
|
4
|
-
import { useStableHandler } from "../useStableHandler.qwik.mjs";
|
|
5
|
-
import { DraggingPositionEvaluation } from "./DraggingPositionEvaluation.qwik.mjs";
|
|
6
|
-
import { useGetGetParentOfLinearItem } from "./useGetParentOfLinearItem.qwik.mjs";
|
|
7
|
-
var useDraggingPosition = function() {
|
|
8
|
-
var dragCode = reactExports.useRef("initial");
|
|
9
|
-
var _a = reactExports.useState(void 0), draggingItems = _a[0], setDraggingItems = _a[1];
|
|
10
|
-
var itemHeight = reactExports.useRef(0);
|
|
11
|
-
var env = useTreeEnvironment();
|
|
12
|
-
var getParentOfLinearItem = useGetGetParentOfLinearItem();
|
|
13
|
-
var isNewDragPosition = useStableHandler(function(e, treeId, hoveringPosition) {
|
|
14
|
-
if (!hoveringPosition) {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
var offset = hoveringPosition.offset, linearIndex = hoveringPosition.linearIndex;
|
|
18
|
-
var newDragCode = "".concat(treeId, "__").concat(linearIndex, "__").concat(offset !== null && offset !== void 0 ? offset : "", "__").concat(hoveringPosition.indentation);
|
|
19
|
-
if (newDragCode !== dragCode.current) {
|
|
20
|
-
dragCode.current = newDragCode;
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
return false;
|
|
24
|
-
});
|
|
25
|
-
var getHoveringPosition = useStableHandler(function(e, treeId, containerRef) {
|
|
26
|
-
if (!containerRef.current) {
|
|
27
|
-
return void 0;
|
|
28
|
-
}
|
|
29
|
-
var treeBb = containerRef.current.getBoundingClientRect();
|
|
30
|
-
if (isOutsideOfContainer(e, treeBb)) {
|
|
31
|
-
return void 0;
|
|
32
|
-
}
|
|
33
|
-
var hoveringPosition = (e.clientY - treeBb.top) / itemHeight.current;
|
|
34
|
-
var treeLinearItems = env.linearItems[treeId];
|
|
35
|
-
var linearIndex = Math.min(Math.max(0, Math.floor(hoveringPosition)), treeLinearItems.length - 1);
|
|
36
|
-
if (treeLinearItems.length === 0) {
|
|
37
|
-
return {
|
|
38
|
-
linearIndex: 0,
|
|
39
|
-
offset: "bottom",
|
|
40
|
-
indentation: 0
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
var targetLinearItem = treeLinearItems[linearIndex];
|
|
44
|
-
var targetItem = env.items[targetLinearItem.item];
|
|
45
|
-
var indentation = !env.renderDepthOffset ? void 0 : Math.max(Math.floor((e.clientX - treeBb.left) / env.renderDepthOffset), 0);
|
|
46
|
-
var offset;
|
|
47
|
-
var lineThreshold = !env.canReorderItems ? 0 : (targetItem === null || targetItem === void 0 ? void 0 : targetItem.isFolder) && env.canDropOnFolder || env.canDropOnNonFolder ? 0.2 : 0.5;
|
|
48
|
-
if (hoveringPosition - 0.5 >= treeLinearItems.length - 1) {
|
|
49
|
-
offset = "bottom";
|
|
50
|
-
} else if (hoveringPosition % 1 < lineThreshold) {
|
|
51
|
-
offset = "top";
|
|
52
|
-
} else if (hoveringPosition % 1 > 1 - lineThreshold) {
|
|
53
|
-
offset = "bottom";
|
|
54
|
-
}
|
|
55
|
-
return { linearIndex, offset, indentation };
|
|
56
|
-
});
|
|
57
|
-
var getDraggingPosition = useStableHandler(function(e, treeId, containerRef) {
|
|
58
|
-
var hoveringPosition = getHoveringPosition(e, treeId, containerRef);
|
|
59
|
-
if (!isNewDragPosition(e, treeId, hoveringPosition)) {
|
|
60
|
-
return void 0;
|
|
61
|
-
}
|
|
62
|
-
if (!draggingItems || !env.canDragAndDrop || !hoveringPosition || e.clientX < 0 || e.clientY < 0) {
|
|
63
|
-
return "invalid";
|
|
64
|
-
}
|
|
65
|
-
return new DraggingPositionEvaluation(env, e, treeId, hoveringPosition, draggingItems, getParentOfLinearItem).getDraggingPosition();
|
|
66
|
-
});
|
|
67
|
-
var initiateDraggingPosition = useStableHandler(function(treeId, items) {
|
|
68
|
-
setDraggingItems(items);
|
|
69
|
-
dragCode.current = "initial";
|
|
70
|
-
itemHeight.current = computeItemHeight(treeId);
|
|
71
|
-
});
|
|
72
|
-
var resetDraggingPosition = useStableHandler(function() {
|
|
73
|
-
setDraggingItems(void 0);
|
|
74
|
-
dragCode.current = "initial";
|
|
75
|
-
itemHeight.current = 0;
|
|
76
|
-
});
|
|
77
|
-
return {
|
|
78
|
-
initiateDraggingPosition,
|
|
79
|
-
resetDraggingPosition,
|
|
80
|
-
draggingItems,
|
|
81
|
-
getDraggingPosition,
|
|
82
|
-
itemHeight
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
export {
|
|
86
|
-
useDraggingPosition
|
|
87
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../../../../../../../../_virtual/index.qwik2.cjs");
|
|
4
|
-
const ControlledTreeEnvironment = require("../controlledEnvironment/ControlledTreeEnvironment.qwik.cjs");
|
|
5
|
-
var useGetGetParentOfLinearItem = function() {
|
|
6
|
-
var environment = ControlledTreeEnvironment.useTreeEnvironment();
|
|
7
|
-
return index.reactExports.useCallback(function(itemLinearIndex, treeId) {
|
|
8
|
-
var linearItems = environment.linearItems[treeId];
|
|
9
|
-
var depth = linearItems[itemLinearIndex].depth;
|
|
10
|
-
var parentLinearIndex = itemLinearIndex;
|
|
11
|
-
for (; !!linearItems[parentLinearIndex] && linearItems[parentLinearIndex].depth !== depth - 1; parentLinearIndex -= 1)
|
|
12
|
-
;
|
|
13
|
-
var parent = linearItems[parentLinearIndex];
|
|
14
|
-
if (!parent) {
|
|
15
|
-
parent = { item: environment.trees[treeId].rootItem, depth: 0 };
|
|
16
|
-
parentLinearIndex = 0;
|
|
17
|
-
}
|
|
18
|
-
return { parent, parentLinearIndex };
|
|
19
|
-
}, [environment.linearItems, environment.trees]);
|
|
20
|
-
};
|
|
21
|
-
exports.useGetGetParentOfLinearItem = useGetGetParentOfLinearItem;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { r as reactExports } from "../../../../../../../../_virtual/index.qwik2.mjs";
|
|
2
|
-
import { useTreeEnvironment } from "../controlledEnvironment/ControlledTreeEnvironment.qwik.mjs";
|
|
3
|
-
var useGetGetParentOfLinearItem = function() {
|
|
4
|
-
var environment = useTreeEnvironment();
|
|
5
|
-
return reactExports.useCallback(function(itemLinearIndex, treeId) {
|
|
6
|
-
var linearItems = environment.linearItems[treeId];
|
|
7
|
-
var depth = linearItems[itemLinearIndex].depth;
|
|
8
|
-
var parentLinearIndex = itemLinearIndex;
|
|
9
|
-
for (; !!linearItems[parentLinearIndex] && linearItems[parentLinearIndex].depth !== depth - 1; parentLinearIndex -= 1)
|
|
10
|
-
;
|
|
11
|
-
var parent = linearItems[parentLinearIndex];
|
|
12
|
-
if (!parent) {
|
|
13
|
-
parent = { item: environment.trees[treeId].rootItem, depth: 0 };
|
|
14
|
-
parentLinearIndex = 0;
|
|
15
|
-
}
|
|
16
|
-
return { parent, parentLinearIndex };
|
|
17
|
-
}, [environment.linearItems, environment.trees]);
|
|
18
|
-
};
|
|
19
|
-
export {
|
|
20
|
-
useGetGetParentOfLinearItem
|
|
21
|
-
};
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../../../../../../../../_virtual/index.qwik2.cjs");
|
|
4
|
-
const useGetParentOfLinearItem = require("./useGetParentOfLinearItem.qwik.cjs");
|
|
5
|
-
const ControlledTreeEnvironment = require("../controlledEnvironment/ControlledTreeEnvironment.qwik.cjs");
|
|
6
|
-
const useCanDropAt = require("./useCanDropAt.qwik.cjs");
|
|
7
|
-
var useGetViableDragPositions = function() {
|
|
8
|
-
var environment = ControlledTreeEnvironment.useTreeEnvironment();
|
|
9
|
-
var getParentOfLinearItem = useGetParentOfLinearItem.useGetGetParentOfLinearItem();
|
|
10
|
-
var canDropAt = useCanDropAt.useCanDropAt();
|
|
11
|
-
var isDescendant = index.reactExports.useCallback(function(treeId, itemLinearIndex, potentialParents) {
|
|
12
|
-
var _a = getParentOfLinearItem(itemLinearIndex, treeId), parent = _a.parent, parentLinearIndex = _a.parentLinearIndex;
|
|
13
|
-
if (potentialParents.some(function(p) {
|
|
14
|
-
return p.index === parent.item;
|
|
15
|
-
}))
|
|
16
|
-
return true;
|
|
17
|
-
if (parent.depth === 0)
|
|
18
|
-
return false;
|
|
19
|
-
return isDescendant(treeId, parentLinearIndex, potentialParents);
|
|
20
|
-
}, [getParentOfLinearItem]);
|
|
21
|
-
return index.reactExports.useCallback(function(treeId, draggingItems) {
|
|
22
|
-
var _a, _b;
|
|
23
|
-
var linearItems = environment.linearItems[treeId];
|
|
24
|
-
var targets = [];
|
|
25
|
-
var skipUntilDepthIsLowerThan = -1;
|
|
26
|
-
for (
|
|
27
|
-
var linearIndex = 0;
|
|
28
|
-
linearIndex < linearItems.length;
|
|
29
|
-
// eslint-disable-next-line no-plusplus
|
|
30
|
-
linearIndex++
|
|
31
|
-
) {
|
|
32
|
-
var _c = linearItems[linearIndex], item = _c.item, depth = _c.depth;
|
|
33
|
-
if (skipUntilDepthIsLowerThan !== -1 && depth > skipUntilDepthIsLowerThan) {
|
|
34
|
-
continue;
|
|
35
|
-
} else {
|
|
36
|
-
skipUntilDepthIsLowerThan = -1;
|
|
37
|
-
}
|
|
38
|
-
var parent_1 = getParentOfLinearItem(linearIndex, treeId).parent;
|
|
39
|
-
var childIndex = environment.items[parent_1.item].children.indexOf(item);
|
|
40
|
-
if (isDescendant(treeId, linearIndex, draggingItems)) {
|
|
41
|
-
skipUntilDepthIsLowerThan = depth + 1;
|
|
42
|
-
continue;
|
|
43
|
-
}
|
|
44
|
-
var itemPosition = {
|
|
45
|
-
targetType: "item",
|
|
46
|
-
parentItem: parent_1.item,
|
|
47
|
-
targetItem: item,
|
|
48
|
-
linearIndex,
|
|
49
|
-
depth,
|
|
50
|
-
treeId
|
|
51
|
-
};
|
|
52
|
-
var topPosition = {
|
|
53
|
-
targetType: "between-items",
|
|
54
|
-
parentItem: parent_1.item,
|
|
55
|
-
linePosition: "top",
|
|
56
|
-
childIndex,
|
|
57
|
-
depth,
|
|
58
|
-
treeId,
|
|
59
|
-
linearIndex
|
|
60
|
-
};
|
|
61
|
-
var bottomPosition = {
|
|
62
|
-
targetType: "between-items",
|
|
63
|
-
parentItem: parent_1.item,
|
|
64
|
-
linePosition: "bottom",
|
|
65
|
-
linearIndex: linearIndex + 1,
|
|
66
|
-
childIndex: childIndex + 1,
|
|
67
|
-
depth,
|
|
68
|
-
treeId
|
|
69
|
-
};
|
|
70
|
-
var skipTopPosition = depth === ((_b = (_a = linearItems[linearIndex - 1]) === null || _a === void 0 ? void 0 : _a.depth) !== null && _b !== void 0 ? _b : -1);
|
|
71
|
-
if (!skipTopPosition && canDropAt(topPosition, draggingItems)) {
|
|
72
|
-
targets.push(topPosition);
|
|
73
|
-
}
|
|
74
|
-
if (canDropAt(itemPosition, draggingItems)) {
|
|
75
|
-
targets.push(itemPosition);
|
|
76
|
-
}
|
|
77
|
-
if (canDropAt(bottomPosition, draggingItems)) {
|
|
78
|
-
targets.push(bottomPosition);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return targets;
|
|
82
|
-
}, [
|
|
83
|
-
canDropAt,
|
|
84
|
-
environment.items,
|
|
85
|
-
environment.linearItems,
|
|
86
|
-
getParentOfLinearItem,
|
|
87
|
-
isDescendant
|
|
88
|
-
]);
|
|
89
|
-
};
|
|
90
|
-
exports.useGetViableDragPositions = useGetViableDragPositions;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { r as reactExports } from "../../../../../../../../_virtual/index.qwik2.mjs";
|
|
2
|
-
import { useGetGetParentOfLinearItem } from "./useGetParentOfLinearItem.qwik.mjs";
|
|
3
|
-
import { useTreeEnvironment } from "../controlledEnvironment/ControlledTreeEnvironment.qwik.mjs";
|
|
4
|
-
import { useCanDropAt } from "./useCanDropAt.qwik.mjs";
|
|
5
|
-
var useGetViableDragPositions = function() {
|
|
6
|
-
var environment = useTreeEnvironment();
|
|
7
|
-
var getParentOfLinearItem = useGetGetParentOfLinearItem();
|
|
8
|
-
var canDropAt = useCanDropAt();
|
|
9
|
-
var isDescendant = reactExports.useCallback(function(treeId, itemLinearIndex, potentialParents) {
|
|
10
|
-
var _a = getParentOfLinearItem(itemLinearIndex, treeId), parent = _a.parent, parentLinearIndex = _a.parentLinearIndex;
|
|
11
|
-
if (potentialParents.some(function(p) {
|
|
12
|
-
return p.index === parent.item;
|
|
13
|
-
}))
|
|
14
|
-
return true;
|
|
15
|
-
if (parent.depth === 0)
|
|
16
|
-
return false;
|
|
17
|
-
return isDescendant(treeId, parentLinearIndex, potentialParents);
|
|
18
|
-
}, [getParentOfLinearItem]);
|
|
19
|
-
return reactExports.useCallback(function(treeId, draggingItems) {
|
|
20
|
-
var _a, _b;
|
|
21
|
-
var linearItems = environment.linearItems[treeId];
|
|
22
|
-
var targets = [];
|
|
23
|
-
var skipUntilDepthIsLowerThan = -1;
|
|
24
|
-
for (
|
|
25
|
-
var linearIndex = 0;
|
|
26
|
-
linearIndex < linearItems.length;
|
|
27
|
-
// eslint-disable-next-line no-plusplus
|
|
28
|
-
linearIndex++
|
|
29
|
-
) {
|
|
30
|
-
var _c = linearItems[linearIndex], item = _c.item, depth = _c.depth;
|
|
31
|
-
if (skipUntilDepthIsLowerThan !== -1 && depth > skipUntilDepthIsLowerThan) {
|
|
32
|
-
continue;
|
|
33
|
-
} else {
|
|
34
|
-
skipUntilDepthIsLowerThan = -1;
|
|
35
|
-
}
|
|
36
|
-
var parent_1 = getParentOfLinearItem(linearIndex, treeId).parent;
|
|
37
|
-
var childIndex = environment.items[parent_1.item].children.indexOf(item);
|
|
38
|
-
if (isDescendant(treeId, linearIndex, draggingItems)) {
|
|
39
|
-
skipUntilDepthIsLowerThan = depth + 1;
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
var itemPosition = {
|
|
43
|
-
targetType: "item",
|
|
44
|
-
parentItem: parent_1.item,
|
|
45
|
-
targetItem: item,
|
|
46
|
-
linearIndex,
|
|
47
|
-
depth,
|
|
48
|
-
treeId
|
|
49
|
-
};
|
|
50
|
-
var topPosition = {
|
|
51
|
-
targetType: "between-items",
|
|
52
|
-
parentItem: parent_1.item,
|
|
53
|
-
linePosition: "top",
|
|
54
|
-
childIndex,
|
|
55
|
-
depth,
|
|
56
|
-
treeId,
|
|
57
|
-
linearIndex
|
|
58
|
-
};
|
|
59
|
-
var bottomPosition = {
|
|
60
|
-
targetType: "between-items",
|
|
61
|
-
parentItem: parent_1.item,
|
|
62
|
-
linePosition: "bottom",
|
|
63
|
-
linearIndex: linearIndex + 1,
|
|
64
|
-
childIndex: childIndex + 1,
|
|
65
|
-
depth,
|
|
66
|
-
treeId
|
|
67
|
-
};
|
|
68
|
-
var skipTopPosition = depth === ((_b = (_a = linearItems[linearIndex - 1]) === null || _a === void 0 ? void 0 : _a.depth) !== null && _b !== void 0 ? _b : -1);
|
|
69
|
-
if (!skipTopPosition && canDropAt(topPosition, draggingItems)) {
|
|
70
|
-
targets.push(topPosition);
|
|
71
|
-
}
|
|
72
|
-
if (canDropAt(itemPosition, draggingItems)) {
|
|
73
|
-
targets.push(itemPosition);
|
|
74
|
-
}
|
|
75
|
-
if (canDropAt(bottomPosition, draggingItems)) {
|
|
76
|
-
targets.push(bottomPosition);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return targets;
|
|
80
|
-
}, [
|
|
81
|
-
canDropAt,
|
|
82
|
-
environment.items,
|
|
83
|
-
environment.linearItems,
|
|
84
|
-
getParentOfLinearItem,
|
|
85
|
-
isDescendant
|
|
86
|
-
]);
|
|
87
|
-
};
|
|
88
|
-
export {
|
|
89
|
-
useGetViableDragPositions
|
|
90
|
-
};
|