@revolist/vue-datagrid 3.2.9 → 3.2.15

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.
@@ -1,8 +1,10 @@
1
1
  import Vue, { CreateElement } from "vue";
2
+ import { RevoGrid as RevoGridComponent } from "@revolist/revogrid/custom-element";
2
3
  declare type WatchFunction = (this: Vue, newVal: any, oldVal: any) => void;
3
4
  declare type WatchResult = {
4
5
  [prop: string]: WatchFunction;
5
6
  };
7
+ export { RevoGridComponent };
6
8
  declare const _default: {
7
9
  name: string;
8
10
  props: string[];
package/dist/vgrid.d.ts CHANGED
@@ -1,9 +1,15 @@
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: {
6
+ name: string;
7
+ props: string[];
8
+ watch: {
9
+ [prop: string]: (this: 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>>, newVal: any, oldVal: any) => void;
10
+ };
11
+ render(this: 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>>, h: import("vue").CreateElement): JSX.Element;
12
+ };
7
13
  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
14
  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
15
  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"),require("vue")):"function"==typeof define&&define.amd?define("VGrid",["@revolist/revogrid/custom-element","vue"],r):"object"==typeof exports?exports.VGrid=r(require("@revolist/revogrid/custom-element"),require("vue")):e.VGrid=r(e["@revolist/revogrid/custom-element"],e.vue)}(self,((e,r)=>(()=>{"use strict";var t={239:r=>{r.exports=e},748:e=>{e.exports=r}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{o.r(i),o.d(i,{VGrid:()=>m,VGridPlugin:()=>g,VGridVueEditor:()=>j,VGridVueTemplate:()=>b,VGridVueTemplateConstructor:()=>w,default:()=>C});var e=o(239),r=function(){return r=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},r.apply(this,arguments)},t=["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"],n={},u=[];t.forEach((function(e){var r=e;n[r]=e,u.push(r),r=e.toLowerCase(),n[r]=e,u.push(r),r=e.split(/(?=[A-Z])/).join("-"),n[r]=e,u.push(r)}));var s=t.reduce((function(e,r){return e[r]=function(e){this.$refs.grid[r]=e},e}),{});const l={name:"vue-data-grid",props:u,watch:s,render:function(e){var t={};for(var n in this.$props)t[n]=this.$props[n];return e("revo-grid",{ref:"grid",domProps:t,on:r({},this.$listeners)})}};var c=o(748),a=o.n(c),d=function(){return d=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},d.apply(this,arguments)},p=function(e,r,t){if(!r)return null;var n;if((null==r?void 0:r.childNodes.length)&&(n=r.childNodes[0]),!n)return n=document.createElement("span"),r.appendChild(n),"object"==typeof e&&(e=a().extend(e)),new e({el:n,propsData:t});var o=n.__vue__;if(o)for(var i in t)o.$props[i]=t[i];return o};var f=function(){return f=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},f.apply(this,arguments)};const v=function(){function e(e,r,t,n){this.VueEditorConstructor=e,this.column=r,this.save=t,this.close=n,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=p(this.VueEditorConstructor,e,f(f({},this.editCell),{save:this.save,close:this.close}));r&&(this.vueEl=r)}},e}();var h=!1,m=function(r){!h&&(null==e?void 0:e.defineCustomElements)&&(null==e||e.defineCustomElements(),h=!0),r(l)},y=!1,g={install:function(e){y||(y=!0,e.component("vue-data-grid",m))}},b=function(e,r){return function(t,n){var o=r?d(d({},r),n):n;return t("span",{ref:function(r){return p(e,r,o)}})}},w=p,j=function(e){return function(r,t,n){return new v(e,r,t,n)}},V=null;"undefined"!=typeof window?V=window.Vue:void 0!==o.g&&(V=o.g.Vue),V&&V.use(g);const C=m})(),i})()));
1
+ !function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("@revolist/revogrid/custom-element"),require("vue")):"function"==typeof define&&define.amd?define("VGrid",["@revolist/revogrid/custom-element","vue"],r):"object"==typeof exports?exports.VGrid=r(require("@revolist/revogrid/custom-element"),require("vue")):e.VGrid=r(e["@revolist/revogrid/custom-element"],e.vue)}(self,((e,r)=>(()=>{"use strict";var t={239:r=>{r.exports=e},748:e=>{e.exports=r}},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}),n(239);var e=function(){return e=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},e.apply(this,arguments)},r=["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"],t={},o=[];r.forEach((function(e){var r=e;t[r]=e,o.push(r),r=e.toLowerCase(),t[r]=e,o.push(r),r=e.split(/(?=[A-Z])/).join("-"),t[r]=e,o.push(r)}));var u=r.reduce((function(e,r){return e[r]=function(e){this.$refs.grid[r]=e},e}),{});const s={name:"vue-data-grid",props:o,watch:u,render:function(r){var t={};for(var o in this.$props)t[o]=this.$props[o];return r("revo-grid",{ref:"grid",domProps:t,on:e({},this.$listeners)})}};var l=n(748),c=n.n(l),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,r,t){if(!r)return null;var o;if((null==r?void 0:r.childNodes.length)&&(o=r.childNodes[0]),!o)return o=document.createElement("span"),r.appendChild(o),"object"==typeof e&&(e=c().extend(e)),new e({el:o,propsData:t});var n=o.__vue__;if(n)for(var i in t)n.$props[i]=t[i];return n};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=s,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.9",
3
+ "version": "3.2.15",
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.8",
34
+ "@revolist/revogrid": "^3.2.15",
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,6 +61,7 @@ const watch = props.reduce((res: WatchResult, p: Prop) => {
60
61
  return res;
61
62
  }, {});
62
63
 
64
+ export { RevoGridComponent };
63
65
  export default {
64
66
  name: "vue-data-grid",
65
67
  props: propsExtended,
package/src/vgrid.ts CHANGED
@@ -1,33 +1,20 @@
1
- import { Component } from "vue";
2
- import * as loader from "@revolist/revogrid/custom-element";
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('vue-data-grid', VGrid);
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 !== 'undefined') {
43
- GlobalVue = window.Vue
44
- } else if (typeof global !== 'undefined') {
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;