n8n/packages/editor-ui/src/components/ImportParameter.vue

34 lines
690 B
Vue
Raw Normal View History

feat(HTTP Request Node): Redesign and add the ability to import cURL commands (#3860) * :zap: Initial commit * :shirt: Fix linting issue * :zap: Add import button * :zap: Remove ligh versioning * :zap: Improvements * :zap: Improvements * :fire: Remove HttpRequest2 file used for testing * :bug: Fix building issue * :zap: Small improvement * :shirt: Fix linting issue * :fire: Remove HttpRequest2 from loader * :zap: Update package-lock.json * :zap: Improvements * :zap: Small change * :bug: Fix issue retrieving splitIntoItems * :bug: Fix issue retrieving neverError parameter * :bug: Fix issue with displayOptions * :zap: Improvements * :zap: Improvements * :zap: Improvements * :zap: Improvements * :zap: Move cURL section to its own component * :zap: Improvements * :zap: Improvements * :zap: Add fix for batching in all versions * :zap: Add notice to cURL modal * :fire: Remove comments * :zap: Improvements * :zap: Type curl-to-json endpoint * :zap: Fix typo * :fire: Remove console.logs * :zap: Fix typo in curl-to-json endpoint * :zap: Improvements * :zap: Improvements * :zap: Update package-lock.json * :zap: Rename import modal constant * :zap: Add return types to methods * :zap: Add CSS modules to ImportParameter component * :zap: Rename ImportParameter component to use kebab-case * :zap: Improvements * :zap: update package-lock.json * :zap: Fix linting issues * Fix issue with css reference in ImportParameter component * :zap: Small improvements * :zap: Rename redirects to redirect * :zap: Allow to set multiple parameters on valueChanged * :shirt: Fix linting issue * :bug: Add mistakenly removed openExistingCredentials * :zap: Improve curl regex * :zap: Keep headers as defined in the cURL command * :zap: Account for all protocols supported by cURL * :zap: Add tests * :fire: Remove unnecessary lines * :zap: Add more testing * :zap: Add noDataExpression to dependent fields * :bug: Fix bug not handling multipart-form data correctly * :zap: Change error messages * :bug: Fix response format string for empty values * Fix typo
2022-09-29 14:28:02 -07:00
<template>
<div :class="$style.importSection">
<n8n-button
type="secondary"
:label="$locale.baseText('importParameter.label')"
size="mini"
@click="onImportCurlClicked"
/>
</div>
</template>
<script lang="ts">
import { IMPORT_CURL_MODAL_KEY } from '@/constants';
import mixins from 'vue-typed-mixins';
import { showMessage } from './mixins/showMessage';
export default mixins(showMessage).extend({
name: 'import-parameter',
methods: {
onImportCurlClicked() {
this.$store.dispatch('ui/openModal', IMPORT_CURL_MODAL_KEY);
},
},
});
</script>
<style module lang="scss">
.importSection {
display: flex;
flex-direction: row-reverse;
margin-top: 10px;
}
</style>