From 9c565397d0c4614ae633b9642db89fdefdee0259 Mon Sep 17 00:00:00 2001 From: maks Date: Mon, 4 Nov 2024 12:04:25 +0000 Subject: [PATCH] fix: typing SaveData --- lib/editor.adapter.ts | 7 +++---- lib/editor.ts | 4 ++-- package-lock.json | 18 +++++++++--------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/lib/editor.adapter.ts b/lib/editor.adapter.ts index 2a61ac3..144d6e1 100644 --- a/lib/editor.adapter.ts +++ b/lib/editor.adapter.ts @@ -3,13 +3,12 @@ import { ComponentPublicInstance, DefineComponent, } from 'vue'; -import { +import type { EditCell, ColumnDataSchemaModel, HyperFunc, VNode, EditorBase, - SaveData, } from '@revolist/revogrid'; import { VueTemplateConstructor } from './renderer'; @@ -18,7 +17,7 @@ import { VueTemplateConstructor } from './renderer'; */ export type EditorType = { column: ColumnDataSchemaModel; - save: (value: SaveData, preventFocus?: boolean) => void; + save: (value: any, preventFocus?: boolean) => void; close: (focusNext?: boolean) => void; } & Partial; @@ -30,7 +29,7 @@ export class VueEditorAdapter implements EditorBase { constructor( private VueEditorConstructor: DefineComponent, public column: ColumnDataSchemaModel, - private save: (value: SaveData, preventFocus?: boolean) => void, + private save: (value: any, preventFocus?: boolean) => void, private close: (focusNext?: boolean) => void, private vInstance: ComponentInternalInstance | null, ) {} diff --git a/lib/editor.ts b/lib/editor.ts index 9291900..5c3bf20 100644 --- a/lib/editor.ts +++ b/lib/editor.ts @@ -1,4 +1,4 @@ -import { ColumnDataSchemaModel, EditorCtr, SaveData } from '@revolist/revogrid'; +import type { ColumnDataSchemaModel, EditorCtr } from '@revolist/revogrid'; import { getCurrentInstance } from 'vue'; import { VueEditorAdapter } from './editor.adapter'; @@ -18,7 +18,7 @@ export const Editor = (vueConstructor: any): EditorCtr => { const instance = getCurrentInstance(); return function ( column: ColumnDataSchemaModel, - save: (value: SaveData, preventFocus?: boolean) => void, + save: (value: any, preventFocus?: boolean) => void, close: (focusNext?: boolean) => void, ) { return new VueEditorAdapter( diff --git a/package-lock.json b/package-lock.json index 6ce7a0f..aef22c4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@revolist/vue3-datagrid", - "version": "4.8.13", + "version": "4.10.22", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@revolist/vue3-datagrid", - "version": "4.8.13", + "version": "4.10.22", "license": "MIT", "dependencies": { - "@revolist/revogrid": "4.8.13" + "@revolist/revogrid": "4.10.22" }, "devDependencies": { "@stencil/core": "^4.19.2", @@ -615,9 +615,9 @@ } }, "node_modules/@revolist/revogrid": { - "version": "4.8.13", - "resolved": "https://registry.npmjs.org/@revolist/revogrid/-/revogrid-4.8.13.tgz", - "integrity": "sha512-zwMH6S4JExhcYUW0eVN/eodhMSZ8KfRFs1vfDsW+JRXqjAV4C8GyVN53+5pg8E71ehXi+FrVVp5ymOmxM1Cm+g==", + "version": "4.10.22", + "resolved": "https://registry.npmjs.org/@revolist/revogrid/-/revogrid-4.10.22.tgz", + "integrity": "sha512-3BFpYxfHVI0gBJroOfyUp0ZjfdfZBn00NormSnQRdJaGJE3Ny1payCHlWkcih8nSvWbSi6iHTU/eOIhbypnrAQ==", "license": "MIT" }, "node_modules/@rollup/pluginutils": { @@ -2657,9 +2657,9 @@ } }, "@revolist/revogrid": { - "version": "4.8.13", - "resolved": "https://registry.npmjs.org/@revolist/revogrid/-/revogrid-4.8.13.tgz", - "integrity": "sha512-zwMH6S4JExhcYUW0eVN/eodhMSZ8KfRFs1vfDsW+JRXqjAV4C8GyVN53+5pg8E71ehXi+FrVVp5ymOmxM1Cm+g==" + "version": "4.10.22", + "resolved": "https://registry.npmjs.org/@revolist/revogrid/-/revogrid-4.10.22.tgz", + "integrity": "sha512-3BFpYxfHVI0gBJroOfyUp0ZjfdfZBn00NormSnQRdJaGJE3Ny1payCHlWkcih8nSvWbSi6iHTU/eOIhbypnrAQ==" }, "@rollup/pluginutils": { "version": "5.1.0",