refactor(editor): Drop vue-typed-mixins (no-changelog) (#6257)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-05-16 09:43:46 +00:00
committed by GitHub
parent 79d0a0f247
commit ebb3aaf61e
98 changed files with 340 additions and 287 deletions

View File

@@ -69,13 +69,14 @@
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import type { PropType } from 'vue';
import { mapStores } from 'pinia';
import type { IN8nButton, INodeUi, IRunDataDisplayMode, IUpdateInformation } from '@/Interface';
import ParameterOptions from '@/components/ParameterOptions.vue';
import DraggableTarget from '@/components/DraggableTarget.vue';
import mixins from 'vue-typed-mixins';
import { useToast } from '@/composables';
import {
hasExpressionMapping,
@@ -91,18 +92,18 @@ import type {
IParameterLabel,
} from 'n8n-workflow';
import type { BaseTextKey } from '@/plugins/i18n';
import { mapStores } from 'pinia';
import { useNDVStore } from '@/stores/ndv.store';
import { useSegment } from '@/stores/segment.store';
import { externalHooks } from '@/mixins/externalHooks';
import { getMappedResult } from '@/utils/mappingUtils';
type ParamterInputWrapperRef = InstanceType<typeof ParameterInputWrapper>;
type ParameterInputWrapperRef = InstanceType<typeof ParameterInputWrapper>;
const DISPLAY_MODES_WITH_DATA_MAPPING = ['table', 'json', 'schema'];
export default mixins(externalHooks).extend({
export default defineComponent({
name: 'parameter-input-full',
mixins: [externalHooks],
components: {
ParameterOptions,
DraggableTarget,
@@ -231,14 +232,14 @@ export default mixins(externalHooks).extend({
this.menuExpanded = expanded;
},
optionSelected(command: string) {
const paramRef = this.$refs.param as ParamterInputWrapperRef | undefined;
const paramRef = this.$refs.param as ParameterInputWrapperRef | undefined;
paramRef?.$emit('optionSelected', command);
},
valueChanged(parameterData: IUpdateInformation) {
this.$emit('valueChanged', parameterData);
},
onTextInput(parameterData: IUpdateInformation) {
const paramRef = this.$refs.param as ParamterInputWrapperRef | undefined;
const paramRef = this.$refs.param as ParameterInputWrapperRef | undefined;
if (isValueExpression(this.parameter, parameterData.value)) {
paramRef?.$emit('optionSelected', 'addExpression');