@revolist/vue-datagrid 3.2.8 → 3.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component.d.ts +4 -11
- package/dist/vgrid.d.ts +1 -2
- package/dist/vgrid.js +1 -1
- package/package.json +2 -2
- package/src/component.tsx +4 -2
- package/src/vgrid.ts +12 -25
package/dist/component.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import Vue
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
declare const _default: {
|
|
7
|
-
name: string;
|
|
8
|
-
props: string[];
|
|
9
|
-
watch: WatchResult;
|
|
10
|
-
render(this: Vue, h: CreateElement): JSX.Element;
|
|
11
|
-
};
|
|
1
|
+
import Vue from "vue";
|
|
2
|
+
import { RevoGrid as RevoGridComponent } from "@revolist/revogrid/custom-element";
|
|
3
|
+
export { RevoGridComponent };
|
|
4
|
+
declare const _default: import("vue/types/vue").ExtendedVue<Vue<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue<Record<string, any>, Record<string, any>, never, never, any>>, unknown, unknown, unknown, Record<string, any>, {}>;
|
|
12
5
|
export default _default;
|
package/dist/vgrid.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { AsyncComponent } from "vue/types/options";
|
|
2
|
-
export declare const VGrid: AsyncComponent;
|
|
3
1
|
declare function install(Vue: any): void;
|
|
4
2
|
export declare const VGridPlugin: {
|
|
5
3
|
install: typeof install;
|
|
6
4
|
};
|
|
5
|
+
export declare const VGrid: import("vue/types/vue").ExtendedVue<import("vue").default<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => import("vue").default<Record<string, any>, Record<string, any>, never, never, any>>, unknown, unknown, unknown, Record<string, any>, {}>;
|
|
7
6
|
export declare const VGridVueTemplate: (cntr: import("vue").VueConstructor<import("vue").default<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => import("vue").default<Record<string, any>, Record<string, any>, never, never, any>>>, customProps?: any) => (h: Function, p: any) => JSX.Element;
|
|
8
7
|
export declare const VGridVueTemplateConstructor: (vueConstructor: import("vue").VueConstructor<import("vue").default<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => import("vue").default<Record<string, any>, Record<string, any>, never, never, any>>>, e: HTMLElement, p: Record<string, any>) => import("vue").default<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => import("vue").default<Record<string, any>, Record<string, any>, never, never, any>> | null | undefined;
|
|
9
8
|
export declare const VGridVueEditor: (vueConstructor: import("vue/types/umd").VueConstructor<import("vue/types/umd")>) => (column: import("@revolist/revogrid/dist/types/interfaces").RevoGrid.ColumnDataSchemaModel, save: Function, close: Function) => import("./vue-editor-adapter").default;
|
package/dist/vgrid.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("@revolist/revogrid/custom-element")
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("vue"),require("@revolist/revogrid/custom-element")):"function"==typeof define&&define.amd?define("VGrid",["vue","@revolist/revogrid/custom-element"],r):"object"==typeof exports?exports.VGrid=r(require("vue"),require("@revolist/revogrid/custom-element")):e.VGrid=r(e.vue,e["@revolist/revogrid/custom-element"])}(self,((e,r)=>(()=>{"use strict";var t={239:e=>{e.exports=r},748:r=>{r.exports=e}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return n.d(r,{a:r}),r},n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{n.r(i),n.d(i,{VGrid:()=>m,VGridPlugin:()=>h,VGridVueEditor:()=>b,VGridVueTemplate:()=>y,VGridVueTemplateConstructor:()=>g,default:()=>j});var e=n(748),r=n.n(e),t=(n(239),function(){return t=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},t.apply(this,arguments)}),o=["rowHeaders","frameSize","rowSize","colSize","range","readonly","resize","canFocus","useClipboard","columns","source","pinnedTopSource","pinnedBottomSource","rowDefinitions","editors","plugins","columnTypes","theme","rowClass","autoSizeColumn","filter","canMoveColumns","trimmedRows","exporting","grouping","stretch"],u={},s=[];o.forEach((function(e){var r=e;u[r]=e,s.push(r),r=e.toLowerCase(),u[r]=e,s.push(r),r=e.split(/(?=[A-Z])/).join("-"),u[r]=e,s.push(r)}));var l=o.reduce((function(e,r){return e[r]=function(e){this.$refs.grid[r]=e},e}),{});const c=r().extend({name:"vue-data-grid",props:s,watch:l,render:function(e){var r={};for(var o in this.$props)r[o]=this.$props[o];return e("revo-grid",{ref:"grid",domProps:r,on:t({},this.$listeners)})}});var a=function(){return a=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},a.apply(this,arguments)},d=function(e,t,o){if(!t)return null;var n;if((null==t?void 0:t.childNodes.length)&&(n=t.childNodes[0]),!n)return n=document.createElement("span"),t.appendChild(n),"object"==typeof e&&(e=r().extend(e)),new e({el:n,propsData:o});var i=n.__vue__;if(i)for(var u in o)i.$props[u]=o[u];return i};var p=function(){return p=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},p.apply(this,arguments)};const f=function(){function e(e,r,t,o){this.VueEditorConstructor=e,this.column=r,this.save=t,this.close=o,this.element=null,this.editCell=null}return e.prototype.componentDidRender=function(){},e.prototype.disconnectedCallback=function(){var e;null===(e=this.vueEl)||void 0===e||e.$destroy(),this.vueEl=void 0},e.prototype.render=function(e){var r=this;return e("span",{ref:function(e){return r.renderAdapter(e)}})},e.prototype.renderAdapter=function(e){if(e){var r=d(this.VueEditorConstructor,e,p(p({},this.editCell),{save:this.save,close:this.close}));r&&(this.vueEl=r)}},e}();var v=!1,h={install:function(e){v||(v=!0,e.component("vue-data-grid",m))}},m=c,y=function(e,r){return function(t,o){var n=r?a(a({},r),o):o;return t("span",{ref:function(r){return d(e,r,n)}})}},g=d,b=function(e){return function(r,t,o){return new f(e,r,t,o)}},w=null;"undefined"!=typeof window?w=window.Vue:void 0!==n.g&&(w=n.g.Vue),w&&w.use(h);const j=m})(),i})()));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revolist/vue-datagrid",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.17",
|
|
4
4
|
"description": "Vue data grid spreadsheet",
|
|
5
5
|
"main": "dist/vgrid.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"homepage": "https://github.com/revolist/vue-datagrid#readme",
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@revolist/revogrid": "^3.2.
|
|
34
|
+
"@revolist/revogrid": "^3.2.17",
|
|
35
35
|
"@stencil/core": "^2.17.3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
package/src/component.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Vue, { CreateElement } from "vue";
|
|
2
2
|
import RevoGrid from "@revolist/revogrid";
|
|
3
|
+
import { RevoGrid as RevoGridComponent } from "@revolist/revogrid/custom-element";
|
|
3
4
|
|
|
4
5
|
type Prop = keyof RevoGrid.Components.RevoGrid;
|
|
5
6
|
type Grid = RevoGrid.Components.RevoGrid;
|
|
@@ -60,7 +61,8 @@ const watch = props.reduce((res: WatchResult, p: Prop) => {
|
|
|
60
61
|
return res;
|
|
61
62
|
}, {});
|
|
62
63
|
|
|
63
|
-
export
|
|
64
|
+
export { RevoGridComponent };
|
|
65
|
+
export default Vue.extend({
|
|
64
66
|
name: "vue-data-grid",
|
|
65
67
|
props: propsExtended,
|
|
66
68
|
watch,
|
|
@@ -79,4 +81,4 @@ export default {
|
|
|
79
81
|
/>
|
|
80
82
|
);
|
|
81
83
|
},
|
|
82
|
-
};
|
|
84
|
+
});
|
package/src/vgrid.ts
CHANGED
|
@@ -1,33 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import vueGrid from './component';
|
|
4
|
-
import { AsyncComponent } from "vue/types/options";
|
|
5
|
-
import vueTemplate, {vueTemplateConstructor} from "./vue-template";
|
|
1
|
+
import vueGrid from "./component";
|
|
2
|
+
import vueTemplate, { vueTemplateConstructor } from "./vue-template";
|
|
6
3
|
import vueEditor from "./vue-editor";
|
|
7
4
|
|
|
8
|
-
let isDefined = false;
|
|
9
|
-
export const VGrid: AsyncComponent = (resolve: (c: Component) => void) => {
|
|
10
|
-
if (!isDefined && loader?.defineCustomElements) {
|
|
11
|
-
loader?.defineCustomElements();
|
|
12
|
-
isDefined = true;
|
|
13
|
-
}
|
|
14
|
-
resolve(vueGrid);
|
|
15
|
-
return;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
5
|
let installed = false;
|
|
19
|
-
|
|
20
|
-
function install (Vue: any) {
|
|
6
|
+
function install(Vue: any) {
|
|
21
7
|
if (installed) {
|
|
22
8
|
return;
|
|
23
9
|
}
|
|
24
10
|
installed = true;
|
|
25
|
-
Vue.component(
|
|
11
|
+
Vue.component("vue-data-grid", VGrid);
|
|
26
12
|
}
|
|
27
13
|
export const VGridPlugin = {
|
|
28
|
-
install
|
|
14
|
+
install,
|
|
29
15
|
};
|
|
30
16
|
|
|
17
|
+
export const VGrid = vueGrid;
|
|
31
18
|
// Vue template wrapper for virtual nodes
|
|
32
19
|
export const VGridVueTemplate = vueTemplate;
|
|
33
20
|
|
|
@@ -38,13 +25,13 @@ export const VGridVueTemplateConstructor = vueTemplateConstructor;
|
|
|
38
25
|
export const VGridVueEditor = vueEditor;
|
|
39
26
|
|
|
40
27
|
// Auto-install
|
|
41
|
-
let GlobalVue = null
|
|
42
|
-
if (typeof window !==
|
|
43
|
-
GlobalVue = window.Vue
|
|
44
|
-
} else if (typeof global !==
|
|
45
|
-
GlobalVue = global.Vue
|
|
28
|
+
let GlobalVue = null;
|
|
29
|
+
if (typeof window !== "undefined") {
|
|
30
|
+
GlobalVue = window.Vue;
|
|
31
|
+
} else if (typeof global !== "undefined") {
|
|
32
|
+
GlobalVue = global.Vue;
|
|
46
33
|
}
|
|
47
34
|
if (GlobalVue) {
|
|
48
|
-
GlobalVue.use(VGridPlugin)
|
|
35
|
+
GlobalVue.use(VGridPlugin);
|
|
49
36
|
}
|
|
50
37
|
export default VGrid;
|