diff --git a/packages/editor-ui/public/static/schema-mapping-gif.gif b/packages/editor-ui/public/static/schema-mapping-gif.gif new file mode 100644 index 000000000..6d3d79fd9 Binary files /dev/null and b/packages/editor-ui/public/static/schema-mapping-gif.gif differ diff --git a/packages/editor-ui/src/Interface.ts b/packages/editor-ui/src/Interface.ts index 7ad5d44da..e13b0e8f1 100644 --- a/packages/editor-ui/src/Interface.ts +++ b/packages/editor-ui/src/Interface.ts @@ -1026,8 +1026,8 @@ export interface NestedRecord { [key: string]: T | NestedRecord; } -export type IRunDataDisplayMode = 'table' | 'json' | 'binary'; -export type nodePanelType = 'input' | 'output'; +export type IRunDataDisplayMode = 'table' | 'json' | 'binary' | 'schema'; +export type NodePanelType = 'input' | 'output'; export interface TargetItem { nodeName: string; @@ -1290,3 +1290,21 @@ export interface CurlToJSONResponse { "parameters.sendQuery": boolean; "parameters.sendBody": boolean; } + +export type Basic = string | number | boolean; +export type Primitives = Basic | bigint | symbol; + +export type Optional = T | undefined | null; + +export type SchemaType = + | 'string' + | 'number' + | 'boolean' + | 'bigint' + | 'symbol' + | 'array' + | 'object' + | 'function' + | 'null' + | 'undefined'; +export type Schema = { type: SchemaType, key?: string, value: string | Schema[], path: string }; diff --git a/packages/editor-ui/src/__tests__/setup.ts b/packages/editor-ui/src/__tests__/setup.ts index 95a38f121..01855f1dd 100644 --- a/packages/editor-ui/src/__tests__/setup.ts +++ b/packages/editor-ui/src/__tests__/setup.ts @@ -1,5 +1,6 @@ import '@testing-library/jest-dom'; import Vue from 'vue'; +import '../plugins'; Vue.config.productionTip = false; Vue.config.devtools = false; diff --git a/packages/editor-ui/src/components/Draggable.vue b/packages/editor-ui/src/components/Draggable.vue index 33405f7ca..fe796d12c 100644 --- a/packages/editor-ui/src/components/Draggable.vue +++ b/packages/editor-ui/src/components/Draggable.vue @@ -90,7 +90,11 @@ export default Vue.extend({ } this.draggingEl = e.target as HTMLElement; - if (this.targetDataKey && this.draggingEl && this.draggingEl.dataset.target !== this.targetDataKey) { + if (this.targetDataKey && this.draggingEl.dataset?.target !== this.targetDataKey) { + this.draggingEl = this.draggingEl.closest(`[data-target="${this.targetDataKey}"]`) as HTMLElement; + } + + if (this.targetDataKey && this.draggingEl?.dataset?.target !== this.targetDataKey) { return; } diff --git a/packages/editor-ui/src/components/NDVDraggablePanels.vue b/packages/editor-ui/src/components/NDVDraggablePanels.vue index b444bdbdb..cb72316ef 100644 --- a/packages/editor-ui/src/components/NDVDraggablePanels.vue +++ b/packages/editor-ui/src/components/NDVDraggablePanels.vue @@ -51,7 +51,7 @@ import mixins from 'vue-typed-mixins'; import { debounceHelper } from '@/mixins/debounce'; import { mapStores } from 'pinia'; import { useNDVStore } from '@/stores/ndv'; -import { nodePanelType } from '@/Interface'; +import { NodePanelType } from '@/Interface'; const SIDE_MARGIN = 24; @@ -127,7 +127,7 @@ export default mixins(debounceHelper).extend({ relativeLeft: number, relativeRight: number } { - return this.ndvStore.getMainPanelDimensions(this.currentNodePaneType as nodePanelType); + return this.ndvStore.getMainPanelDimensions(this.currentNodePaneType); }, supportedResizeDirections(): string[] { const supportedDirections = ['right']; @@ -278,7 +278,7 @@ export default mixins(debounceHelper).extend({ if(isMaxRight) { this.ndvStore.setMainPanelDimensions({ - panelType: this.currentNodePaneType as nodePanelType, + panelType: this.currentNodePaneType, dimensions: { relativeLeft: 1 - this.mainPanelDimensions.relativeWidth - this.maximumRightPosition, relativeRight: this.maximumRightPosition as number, @@ -288,7 +288,7 @@ export default mixins(debounceHelper).extend({ } this.ndvStore.setMainPanelDimensions({ - panelType: this.currentNodePaneType as nodePanelType, + panelType: this.currentNodePaneType, dimensions: { relativeLeft: isInputless ? this.minimumLeftPosition : mainPanelRelativeLeft, relativeRight: mainPanelRelativeRight, diff --git a/packages/editor-ui/src/components/ParameterInput.vue b/packages/editor-ui/src/components/ParameterInput.vue index 6ea6df739..c7753f63d 100644 --- a/packages/editor-ui/src/components/ParameterInput.vue +++ b/packages/editor-ui/src/components/ParameterInput.vue @@ -1165,18 +1165,23 @@ export default mixins( .droppable { - --input-border-color: var(--color-secondary-tint-1); - --input-background-color: var(--color-secondary-tint-3); + --input-border-color: var(--color-secondary); + --input-background-color: var(--color-foreground-xlight); --input-border-style: dashed; + + textarea, input { + border-width: 1.5px; + } } .activeDrop { --input-border-color: var(--color-success); - --input-background-color: var(--color-success-tint-2); + --input-background-color: var(--color-foreground-xlight); --input-border-style: solid; textarea, input { cursor: grabbing !important; + border-width: 1px; } } diff --git a/packages/editor-ui/src/components/ParameterInputFull.vue b/packages/editor-ui/src/components/ParameterInputFull.vue index 7f7480899..daebb3dad 100644 --- a/packages/editor-ui/src/components/ParameterInputFull.vue +++ b/packages/editor-ui/src/components/ParameterInputFull.vue @@ -24,7 +24,7 @@ type="mapping" :disabled="isDropDisabled" :sticky="true" - :stickyOffset="4" + :stickyOffset="3" @drop="onDrop" >