diff --git a/packages/design-system/src/css/_tokens.dark.scss b/packages/design-system/src/css/_tokens.dark.scss index 72963efcf5040..a92964f57adba 100644 --- a/packages/design-system/src/css/_tokens.dark.scss +++ b/packages/design-system/src/css/_tokens.dark.scss @@ -462,6 +462,8 @@ --color-configurable-node-name: var(--color-text-dark); --color-secondary-link: var(--prim-color-secondary-tint-200); --color-secondary-link-hover: var(--prim-color-secondary-tint-100); + //Params + --color-icon-base: var(--prim-gray-320); } body[data-theme='dark'] { diff --git a/packages/design-system/src/css/_tokens.scss b/packages/design-system/src/css/_tokens.scss index 56d5142c87e86..0953bb5bc811c 100644 --- a/packages/design-system/src/css/_tokens.scss +++ b/packages/design-system/src/css/_tokens.scss @@ -615,6 +615,9 @@ --spacing-3xl: 4rem; --spacing-4xl: 8rem; --spacing-5xl: 16rem; + + //Params + --color-icon-base: var(--prim-gray-420); } :root { diff --git a/packages/editor-ui/package.json b/packages/editor-ui/package.json index f6498d6ca5eb1..82921bf7f8508 100644 --- a/packages/editor-ui/package.json +++ b/packages/editor-ui/package.json @@ -79,6 +79,7 @@ "vue-markdown-render": "catalog:frontend", "vue-router": "catalog:frontend", "vue3-touch-events": "^4.1.3", + "vuedraggable": "4.1.0", "xss": "catalog:" }, "devDependencies": { diff --git a/packages/editor-ui/src/components/FixedCollectionParameter.vue b/packages/editor-ui/src/components/FixedCollectionParameter.vue index de7359dfddb9a..3356c4a8aa9ad 100644 --- a/packages/editor-ui/src/components/FixedCollectionParameter.vue +++ b/packages/editor-ui/src/components/FixedCollectionParameter.vue @@ -17,6 +17,7 @@ import { N8nButton, } from 'n8n-design-system'; import ParameterInputList from './ParameterInputList.vue'; +import Draggable from 'vuedraggable'; const locale = useI18n(); @@ -126,42 +127,6 @@ const getOptionProperties = (optionName: string) => { return undefined; }; -const moveOptionDown = (optionName: string, index: number) => { - if (Array.isArray(mutableValues.value[optionName])) { - mutableValues.value[optionName].splice( - index + 1, - 0, - mutableValues.value[optionName].splice(index, 1)[0], - ); - } - - const parameterData: ValueChangedEvent = { - name: getPropertyPath(optionName), - value: mutableValues.value[optionName], - type: 'optionsOrderChanged', - }; - - emit('valueChanged', parameterData); -}; - -const moveOptionUp = (optionName: string, index: number) => { - if (Array.isArray(mutableValues.value[optionName])) { - mutableValues.value?.[optionName].splice( - index - 1, - 0, - mutableValues.value[optionName].splice(index, 1)[0], - ); - } - - const parameterData: ValueChangedEvent = { - name: getPropertyPath(optionName), - value: mutableValues.value[optionName], - type: 'optionsOrderChanged', - }; - - emit('valueChanged', parameterData); -}; - const optionSelected = (optionName: string) => { const option = getOptionProperties(optionName); if (option === undefined) { @@ -219,6 +184,15 @@ const optionSelected = (optionName: string) => { const valueChanged = (parameterData: IUpdateInformation) => { emit('valueChanged', parameterData); }; +const onDragChange = (optionName: string) => { + const parameterData: ValueChangedEvent = { + name: getPropertyPath(optionName), + value: mutableValues.value[optionName], + type: 'optionsOrderChanged', + }; + + emit('valueChanged', parameterData); +};