Skip to content

Commit

Permalink
fix: add compatConfig to all components
Browse files Browse the repository at this point in the history
  • Loading branch information
snoozbuster committed Feb 15, 2023
1 parent ea0696c commit ba84f20
Show file tree
Hide file tree
Showing 39 changed files with 69 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/background/src/Background.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const d = computed(
<script lang="ts">
export default {
name: 'Background',
compatConfig: { MODE: 3 },
}
</script>

Expand Down
1 change: 1 addition & 0 deletions packages/controls/src/ControlButton.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script lang="ts">
export default {
name: 'ControlButton',
compatConfig: { MODE: 3 },
}
</script>

Expand Down
1 change: 1 addition & 0 deletions packages/controls/src/Controls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const onInteractiveChangeHandler = () => {
<script lang="ts">
export default {
name: 'Controls',
compatConfig: { MODE: 3 },
}
</script>

Expand Down
6 changes: 6 additions & 0 deletions packages/core/src/components/A11y/A11yDescriptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ const ariaLiveStyle: CSSProperties = {
}
</script>

<script lang="ts">
export default {
compatConfig: { MODE: 3 },
}
</script>

<template>
<div :id="`${ARIA_NODE_DESC_KEY}-${id}`" style="display: none">
Press enter or space to select a node.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ const dAttr = computed(() => {
<script lang="ts">
export default {
name: 'ConnectionLine',
compatConfig: { MODE: 3 },
}
</script>

Expand Down
1 change: 1 addition & 0 deletions packages/core/src/components/Edges/BaseEdge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,6 @@ BaseEdge.props = [
]

BaseEdge.inheritAttrs = false
BaseEdge.compatConfig = { MODE: 3 }

export default BaseEdge
1 change: 1 addition & 0 deletions packages/core/src/components/Edges/BezierEdge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ BezierEdge.props = [
]

BezierEdge.inheritAttrs = false
BezierEdge.compatConfig = { MODE: 3 }

export default BezierEdge
1 change: 1 addition & 0 deletions packages/core/src/components/Edges/EdgeAnchor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@ const EdgeAnchor: FunctionalComponent<Props> = function ({ radius = 10, centerX
}

EdgeAnchor.props = ['radius', 'centerX', 'centerY', 'position']
EdgeAnchor.compatConfig = { MODE: 3 }

export default EdgeAnchor
1 change: 1 addition & 0 deletions packages/core/src/components/Edges/EdgeLabelRenderer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const teleportTarget = computed(() => viewportRef.value?.getElementsByClassName(
<script lang="ts">
export default {
name: 'EdgeLabelRenderer',
compatConfig: { MODE: 3 },
}
</script>

Expand Down
1 change: 1 addition & 0 deletions packages/core/src/components/Edges/EdgeText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function getBox() {
<script lang="ts">
export default {
name: 'EdgeText',
compatConfig: { MODE: 3 },
}
</script>

Expand Down
1 change: 1 addition & 0 deletions packages/core/src/components/Edges/EdgeWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ interface Props {

const EdgeWrapper = defineComponent({
name: 'Edge',
compatConfig: { MODE: 3 },
props: ['name', 'type', 'id', 'updatable', 'selectable', 'focusable', 'edge'],
setup(props: Props) {
const {
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/components/Edges/SimpleBezierEdge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ SimpleBezierEdge.props = [
]

SimpleBezierEdge.inheritAttrs = false
SimpleBezierEdge.compatConfig = { MODE: 3 }

export default SimpleBezierEdge
1 change: 1 addition & 0 deletions packages/core/src/components/Edges/SmoothStepEdge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ SmoothStepEdge.props = [
]

SmoothStepEdge.inheritAttrs = false
SmoothStepEdge.compatConfig = { MODE: 3 }

export default SmoothStepEdge
1 change: 1 addition & 0 deletions packages/core/src/components/Edges/StepEdge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ StepEdge.props = [
]

StepEdge.inheritAttrs = false
StepEdge.compatConfig = { MODE: 3 }

export default StepEdge
1 change: 1 addition & 0 deletions packages/core/src/components/Edges/StraightEdge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ StraightEdge.props = [
]

StraightEdge.inheritAttrs = false
StraightEdge.compatConfig = { MODE: 3 }

export default StraightEdge
1 change: 1 addition & 0 deletions packages/core/src/components/Handle/Handle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ onMounted(() => {
<script lang="ts">
export default {
name: 'Handle',
compatConfig: { MODE: 3 },
}
</script>

Expand Down
1 change: 1 addition & 0 deletions packages/core/src/components/Nodes/DefaultNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ const DefaultNode: FunctionalComponent<NodeProps> = function ({

DefaultNode.props = ['sourcePosition', 'targetPosition', 'label', 'isValidTargetPos', 'isValidSourcePos', 'connectable']
DefaultNode.inheritAttrs = false
DefaultNode.compatConfig = { MODE: 3 }

export default DefaultNode
1 change: 1 addition & 0 deletions packages/core/src/components/Nodes/InputNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ const InputNode: FunctionalComponent<NodeProps> = function ({

InputNode.props = ['sourcePosition', 'label', 'isValidSourcePos', 'connectable']
InputNode.inheritAttrs = false
InputNode.compatConfig = { MODE: 3 }

export default InputNode
1 change: 1 addition & 0 deletions packages/core/src/components/Nodes/NodeWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ function onKeyDown(event: KeyboardEvent) {
export default {
name: 'Node',
inheritAttrs: false,
compatConfig: { MODE: 3 },
}
</script>

Expand Down
1 change: 1 addition & 0 deletions packages/core/src/components/Nodes/OutputNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ const OutputNode: FunctionalComponent<NodeProps> = function ({

OutputNode.props = ['targetPosition', 'label', 'isValidTargetPos', 'connectable']
OutputNode.inheritAttrs = false
OutputNode.compatConfig = { MODE: 3 }

export default OutputNode
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ function onKeyDown(event: KeyboardEvent) {
<script lang="ts">
export default {
name: 'NodesSelection',
compatConfig: { MODE: 3 },
}
</script>

Expand Down
9 changes: 8 additions & 1 deletion packages/core/src/components/Panel/Panel.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { PanelProps } from '../../types'
import type { PanelProps } from '../../types/panel'
const props = defineProps<PanelProps>()
Expand All @@ -8,6 +8,13 @@ const { userSelectionActive } = useVueFlow()
const positionClasses = computed(() => `${props.position}`.split('-'))
</script>

<script lang="ts">
export default {
name: 'Panel',
compatConfig: { MODE: 3 },
}
</script>

<template>
<div class="vue-flow__panel" :class="positionClasses" :style="{ pointerEvents: userSelectionActive ? 'none' : 'all' }">
<slot />
Expand Down
7 changes: 7 additions & 0 deletions packages/core/src/components/UserSelection/UserSelection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
const { userSelectionRect } = useVueFlow()
</script>

<script lang="ts">
export default {
name: 'UserSelection',
compatConfig: { MODE: 3 },
}
</script>

<template>
<div
class="vue-flow__selection vue-flow__container"
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/container/EdgeRenderer/EdgeRenderer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ function getType(type?: string, template?: GraphEdge['template']) {
<script lang="ts">
export default {
name: 'Edges',
compatConfig: { MODE: 3 },
}
</script>

Expand Down
1 change: 1 addition & 0 deletions packages/core/src/container/EdgeRenderer/Marker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const {
<script lang="ts">
export default {
name: 'MarkerType',
compatConfig: { MODE: 3 },
}
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const markers = computed(() => {
<script lang="ts">
export default {
name: 'MarkerDefinitions',
compatConfig: { MODE: 3 },
}
</script>

Expand Down
1 change: 1 addition & 0 deletions packages/core/src/container/NodeRenderer/NodeRenderer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ function getType(type?: string, template?: GraphNode['template']) {
<script lang="ts">
export default {
name: 'Nodes',
compatConfig: { MODE: 3 },
}
</script>

Expand Down
1 change: 1 addition & 0 deletions packages/core/src/container/Pane/Pane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ function onMouseEnter(event: MouseEvent) {
<script lang="ts">
export default {
name: 'Pane',
compatConfig: { MODE: 3 },
}
</script>

Expand Down
1 change: 1 addition & 0 deletions packages/core/src/container/Viewport/Transform.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ onMounted(async () => {
<script lang="ts">
export default {
name: 'Transform',
compatConfig: { MODE: 3 },
}
</script>

Expand Down
1 change: 1 addition & 0 deletions packages/core/src/container/Viewport/Viewport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ function isWrappedWithClass(event: Event, className: string | undefined) {
<script lang="ts">
export default {
name: 'Viewport',
compatConfig: { MODE: 3 },
}
</script>

Expand Down
1 change: 1 addition & 0 deletions packages/core/src/container/VueFlow/VueFlow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ defineExpose<VueFlowStore>({
<script lang="ts">
export default {
name: 'VueFlow',
compatConfig: { MODE: 3 },
}
</script>

Expand Down
1 change: 1 addition & 0 deletions packages/minimap/src/MiniMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ const onNodeMouseLeave = (event: MouseEvent, node: GraphNode) => {
<script lang="ts">
export default {
name: 'MiniMap',
compatConfig: { MODE: 3 },
}
</script>

Expand Down
1 change: 1 addition & 0 deletions packages/minimap/src/MiniMapNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { MiniMapSlots } from './types'

export default defineComponent({
name: 'MiniMapNode',
compatConfig: { MODE: 3 },
props: ['id', 'position', 'dimensions', 'strokeWidth', 'strokeColor', 'borderRadius', 'color', 'shapeRendering', 'type'],
emits: ['click', 'dblclick', 'mouseenter', 'mousemove', 'mouseleave'],
setup(props: MiniMapNodeProps, { attrs, emit }) {
Expand Down
1 change: 1 addition & 0 deletions packages/node-resizer/src/NodeResizer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const lineControls: ControlLinePosition[] = ['top', 'right', 'bottom', 'left']
<script lang="ts">
export default {
name: 'NodeResizer',
compatConfig: { MODE: 3 },
inheritAttrs: false,
}
</script>
Expand Down
7 changes: 7 additions & 0 deletions packages/node-resizer/src/ResizeControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,13 @@ const colorStyleProp = computed(() => (props.variant === ResizeControlVariant.Li
const controlStyle = computed(() => (props.color ? { [colorStyleProp.value]: props.color } : {}))
</script>

<script lang="ts">
export default {
name: 'ResizeControl',
compatConfig: { MODE: 3 },
}
</script>

<template>
<div
ref="resizeControlRef"
Expand Down
7 changes: 7 additions & 0 deletions packages/node-resizer/src/ResizeControlLine.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ const emits = defineEmits<{
}>()
</script>

<script lang="ts">
export default {
name: 'ResizeControlLine',
compatConfig: { MODE: 3 },
}
</script>

<template>
<ResizeControl
v-bind="props"
Expand Down
1 change: 1 addition & 0 deletions packages/node-toolbar/src/NodeToolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const wrapperStyle = computed<CSSProperties>(() => ({
<script lang="ts">
export default {
name: 'NodeToolbar',
compatConfig: { MODE: 3 },
inheritAttrs: false,
}
</script>
Expand Down
1 change: 1 addition & 0 deletions packages/pathfinding-edge/src/arrow/PerfectArrow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const attrs = useAttrs() as { style: CSSProperties }
<script lang="ts">
export default {
name: 'PerfectArrow',
compatConfig: { MODE: 3 },
inheritAttrs: false,
}
</script>
Expand Down
1 change: 1 addition & 0 deletions packages/pathfinding-edge/src/edge/PathFindingEdge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const attrs: any = useAttrs()
<script lang="ts">
export default {
name: 'PathFindingEdge',
compatConfig: { MODE: 3 },
inheritAttrs: false,
}
</script>
Expand Down

0 comments on commit ba84f20

Please sign in to comment.