mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
refactor(editor): Fix Types issues in @n8n/chat (no-changelog) (#9438)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
parent
451e6590d6
commit
48588194b9
|
@ -1,5 +1,4 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
// eslint-disable-next-line import/no-unresolved
|
|
||||||
import Close from 'virtual:icons/mdi/close';
|
import Close from 'virtual:icons/mdi/close';
|
||||||
import { computed, nextTick, onMounted } from 'vue';
|
import { computed, nextTick, onMounted } from 'vue';
|
||||||
import Layout from '@n8n/chat/components/Layout.vue';
|
import Layout from '@n8n/chat/components/Layout.vue';
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
// eslint-disable-next-line import/no-unresolved
|
|
||||||
import IconChat from 'virtual:icons/mdi/chat';
|
import IconChat from 'virtual:icons/mdi/chat';
|
||||||
// eslint-disable-next-line import/no-unresolved
|
|
||||||
import IconChevronDown from 'virtual:icons/mdi/chevron-down';
|
import IconChevronDown from 'virtual:icons/mdi/chevron-down';
|
||||||
import { nextTick, ref } from 'vue';
|
import { nextTick, ref } from 'vue';
|
||||||
import Chat from '@n8n/chat/components/Chat.vue';
|
import Chat from '@n8n/chat/components/Chat.vue';
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
// eslint-disable-next-line import/no-unresolved
|
|
||||||
import IconSend from 'virtual:icons/mdi/send';
|
import IconSend from 'virtual:icons/mdi/send';
|
||||||
import { computed, onMounted, ref } from 'vue';
|
import { computed, onMounted, ref } from 'vue';
|
||||||
import { useI18n, useChat, useOptions } from '@n8n/chat/composables';
|
import { useI18n, useChat, useOptions } from '@n8n/chat/composables';
|
||||||
|
|
5
packages/@n8n/chat/src/types/icons.d.ts
vendored
Normal file
5
packages/@n8n/chat/src/types/icons.d.ts
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
declare module 'virtual:icons/*' {
|
||||||
|
import { FunctionalComponent, SVGAttributes } from 'vue';
|
||||||
|
const component: FunctionalComponent<SVGAttributes>;
|
||||||
|
export default component;
|
||||||
|
}
|
|
@ -14,6 +14,7 @@ const plugins = [
|
||||||
vue(),
|
vue(),
|
||||||
icons({
|
icons({
|
||||||
compiler: 'vue3',
|
compiler: 'vue3',
|
||||||
|
autoInstall: true,
|
||||||
}),
|
}),
|
||||||
dts(),
|
dts(),
|
||||||
];
|
];
|
||||||
|
|
|
@ -361,7 +361,7 @@ const config = (module.exports = {
|
||||||
/**
|
/**
|
||||||
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unresolved.md
|
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unresolved.md
|
||||||
*/
|
*/
|
||||||
'import/no-unresolved': 'error',
|
'import/no-unresolved': ['error', { ignore: ['^virtual:'] }],
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/order.md
|
* https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/order.md
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"rootDir": ".",
|
"rootDirs": [".", "../design-system/src", "../@n8n/chat/src"],
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"target": "esnext",
|
"target": "esnext",
|
||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
|
|
|
@ -73,6 +73,7 @@ const alias = [
|
||||||
const plugins = [
|
const plugins = [
|
||||||
icons({
|
icons({
|
||||||
compiler: 'vue3',
|
compiler: 'vue3',
|
||||||
|
autoInstall: true,
|
||||||
}),
|
}),
|
||||||
vue(),
|
vue(),
|
||||||
];
|
];
|
||||||
|
|
|
@ -4560,7 +4560,7 @@ packages:
|
||||||
resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==}
|
resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==}
|
||||||
engines: {node: '>=6.9.0'}
|
engines: {node: '>=6.9.0'}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/code-frame': 7.22.5
|
'@babel/code-frame': 7.23.5
|
||||||
'@babel/parser': 7.24.0
|
'@babel/parser': 7.24.0
|
||||||
'@babel/types': 7.24.0
|
'@babel/types': 7.24.0
|
||||||
|
|
||||||
|
@ -8883,7 +8883,7 @@ packages:
|
||||||
lodash: 4.17.21
|
lodash: 4.17.21
|
||||||
prettier: 3.2.5
|
prettier: 3.2.5
|
||||||
recast: 0.23.6
|
recast: 0.23.6
|
||||||
tiny-invariant: 1.3.1
|
tiny-invariant: 1.3.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
@ -9261,7 +9261,7 @@ packages:
|
||||||
ts-dedent: 2.2.0
|
ts-dedent: 2.2.0
|
||||||
type-fest: 2.19.0
|
type-fest: 2.19.0
|
||||||
vue: 3.4.21(typescript@5.4.2)
|
vue: 3.4.21(typescript@5.4.2)
|
||||||
vue-component-type-helpers: 2.0.18
|
vue-component-type-helpers: 2.0.19
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- encoding
|
- encoding
|
||||||
- supports-color
|
- supports-color
|
||||||
|
@ -24125,7 +24125,7 @@ packages:
|
||||||
npm-run-path: 4.0.1
|
npm-run-path: 4.0.1
|
||||||
semver: 7.6.0
|
semver: 7.6.0
|
||||||
strip-ansi: 6.0.1
|
strip-ansi: 6.0.1
|
||||||
tiny-invariant: 1.3.1
|
tiny-invariant: 1.3.3
|
||||||
typescript: 5.4.2
|
typescript: 5.4.2
|
||||||
vite: 5.1.6(sass@1.64.1)
|
vite: 5.1.6(sass@1.64.1)
|
||||||
vscode-languageclient: 7.0.0
|
vscode-languageclient: 7.0.0
|
||||||
|
@ -24344,8 +24344,8 @@ packages:
|
||||||
resolution: {integrity: sha512-0vOfAtI67UjeO1G6UiX5Kd76CqaQ67wrRZiOe7UAb9Jm6GzlUr/fC7CV90XfwapJRjpCMaZFhv1V0ajWRmE9Dg==}
|
resolution: {integrity: sha512-0vOfAtI67UjeO1G6UiX5Kd76CqaQ67wrRZiOe7UAb9Jm6GzlUr/fC7CV90XfwapJRjpCMaZFhv1V0ajWRmE9Dg==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/vue-component-type-helpers@2.0.18:
|
/vue-component-type-helpers@2.0.19:
|
||||||
resolution: {integrity: sha512-zi1QaDBhSb3oeHJh55aTCrosFNKEQsOL9j3XCAjpF9dwxDUUtd85RkJVzO+YpJqy1LNoCWLU8gwuZ7HW2iDN/A==}
|
resolution: {integrity: sha512-cN3f1aTxxKo4lzNeQAkVopswuImUrb5Iurll9Gaw5cqpnbTAxtEMM1mgi6ou4X79OCyqYv1U1mzBHJkzmiK82w==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/vue-demi@0.14.5(vue@3.4.21):
|
/vue-demi@0.14.5(vue@3.4.21):
|
||||||
|
|
Loading…
Reference in a new issue