@revolist/vue3-datagrid 4.0.0-next.1 → 4.0.0
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/LICENSE +1 -1
- package/dist/index.d.ts +59 -13
- package/dist/vue3-datagrid.js +207 -0
- package/dist/vue3-datagrid.umd.cjs +1 -0
- package/package.json +59 -34
- package/.eslintrc.json +0 -30
- package/.github/ISSUE_TEMPLATE/issue-template.md +0 -19
- package/.github/workflows/publish.yml +0 -31
- package/.webpack/webpack.config.js +0 -32
- package/.webpack/webpack.dev.js +0 -68
- package/dist/index.js +0 -1
- package/dist/revogrid.d.ts +0 -15
- package/dist/vue-component-lib/utils.d.ts +0 -18
- package/dist/vue-editor-adapter.d.ts +0 -16
- package/dist/vue-editor.d.ts +0 -4
- package/dist/vue-template.d.ts +0 -12
- package/public/App.vue +0 -91
- package/public/Cell.vue +0 -9
- package/public/Editor.vue +0 -19
- package/public/dataService.ts +0 -49
- package/public/index.html +0 -80
- package/public/index.ts +0 -6
- package/public/style.css +0 -42
- package/shims-tsx.d.ts +0 -11
- package/shims-vue.d.ts +0 -5
- package/src/index.ts +0 -29
- package/src/revogrid.ts +0 -281
- package/src/vue-component-lib/utils.ts +0 -207
- package/src/vue-editor-adapter.tsx +0 -53
- package/src/vue-editor.tsx +0 -23
- package/src/vue-template.tsx +0 -63
- package/tsconfig.json +0 -29
package/LICENSE
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,59 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { ColumnDataSchemaModel } from '@revolist/revogrid';
|
|
2
|
+
import { ComponentInternalInstance } from 'vue';
|
|
3
|
+
import { ComponentPublicInstance } from 'vue';
|
|
4
|
+
import { DefineComponent } from 'vue';
|
|
5
|
+
import { DefineSetupFnComponent } from 'vue';
|
|
6
|
+
import { EditorCtr } from '@revolist/revogrid';
|
|
7
|
+
import { HyperFunc } from '@revolist/revogrid';
|
|
8
|
+
import { JSX as JSX_2 } from '@revolist/revogrid';
|
|
9
|
+
import { PublicProps } from 'vue';
|
|
10
|
+
import { VNode } from '@revolist/revogrid';
|
|
11
|
+
|
|
12
|
+
declare interface InputProps<T> {
|
|
13
|
+
modelValue?: T;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare const VGrid: DefineSetupFnComponent<JSX_2.RevoGrid & InputProps<string | number | boolean>, {}, {}, JSX_2.RevoGrid & InputProps<string | number | boolean> & {}, PublicProps>;
|
|
17
|
+
export { VGrid }
|
|
18
|
+
export default VGrid;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Create editor constructor.
|
|
22
|
+
* This function creates editor constructor by wrapping it with VueEditorAdapter
|
|
23
|
+
* which is responsible for connecting editor with Vue lifecycle events
|
|
24
|
+
* @param vueConstructor editor Vue constructor
|
|
25
|
+
* @returns editor constructor
|
|
26
|
+
*/
|
|
27
|
+
export declare const VGridVueEditor: (vueConstructor: any) => EditorCtr;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Render Vue component in Grid column template.
|
|
31
|
+
*/
|
|
32
|
+
export declare const VGridVueTemplate: (vueConstructor: DefineComponent<any, any, any, any>, customProps?: any) => (h: HyperFunc<VNode>, p: ColumnDataSchemaModel, addition?: any) => JSX.Element;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Convert Vue component to VNode and render it into HTMLElement.
|
|
36
|
+
*
|
|
37
|
+
* @param vueConstructor Vue component constructor
|
|
38
|
+
* @param el HTMLElement where VNode will be rendered
|
|
39
|
+
* @param p Props to pass to component
|
|
40
|
+
* @param vueInstance Vue 3 app instance
|
|
41
|
+
* @param lastEl Previous rendered VNode or null
|
|
42
|
+
* @returns Vue instance, destroy method and HTMLElement
|
|
43
|
+
*/
|
|
44
|
+
export declare const VGridVueTemplateConstructor: (vueConstructor: DefineComponent<any, any, any, any>, el: VueElement | null, p: Record<string, any>, vueInstance: ComponentInternalInstance | null, lastEl?: {
|
|
45
|
+
destroy: () => void;
|
|
46
|
+
} | null) => {
|
|
47
|
+
vueInstance: ComponentPublicInstance<any>;
|
|
48
|
+
destroy: () => void;
|
|
49
|
+
el: VueElement | null;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
declare interface VueElement extends HTMLElement {
|
|
53
|
+
_vnode?: ComponentPublicInstance<any>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
export * from "@revolist/revogrid";
|
|
58
|
+
|
|
59
|
+
export { }
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
var S = Object.defineProperty;
|
|
2
|
+
var z = (t, e, n) => e in t ? S(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var v = (t, e, n) => (z(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
4
|
+
import { defineComponent as I, ref as L, getCurrentInstance as C, inject as M, h as G, createVNode as N, render as w, defineAsyncComponent as U } from "vue";
|
|
5
|
+
import { defineCustomElements as D } from "@revolist/revogrid/loader";
|
|
6
|
+
const F = "routerLink", E = "navManager", W = "router", X = "aria", m = Symbol(), P = { default: m }, k = (t) => (t == null ? void 0 : t.split(" ")) || [], Y = (t, e, n = []) => {
|
|
7
|
+
var i;
|
|
8
|
+
return [...Array.from(((i = t.value) == null ? void 0 : i.classList) || []), ...n].filter(
|
|
9
|
+
(s, o, r) => !e.has(s) && r.indexOf(s) === o
|
|
10
|
+
);
|
|
11
|
+
}, B = (t, e, n = [], i, s) => {
|
|
12
|
+
const o = I((r, { attrs: c, slots: u, emit: q }) => {
|
|
13
|
+
var R;
|
|
14
|
+
r[i];
|
|
15
|
+
const g = L(), b = new Set(k(c.class)), h = C(), y = ((R = h == null ? void 0 : h.appContext) == null ? void 0 : R.provides[E]) ? M(E) : void 0, x = (f) => {
|
|
16
|
+
const { routerLink: p } = r;
|
|
17
|
+
if (p !== m)
|
|
18
|
+
if (y !== void 0) {
|
|
19
|
+
let d = { event: f };
|
|
20
|
+
for (const l in r) {
|
|
21
|
+
const a = r[l];
|
|
22
|
+
r.hasOwnProperty(l) && l.startsWith(W) && a !== m && (d[l] = a);
|
|
23
|
+
}
|
|
24
|
+
y.navigate(d);
|
|
25
|
+
} else
|
|
26
|
+
console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.");
|
|
27
|
+
};
|
|
28
|
+
return () => {
|
|
29
|
+
r[i], k(c.class).forEach((a) => {
|
|
30
|
+
b.add(a);
|
|
31
|
+
});
|
|
32
|
+
const f = r.onClick, p = (a) => {
|
|
33
|
+
f !== void 0 && f(a), a.defaultPrevented || x(a);
|
|
34
|
+
};
|
|
35
|
+
let d = {
|
|
36
|
+
ref: g,
|
|
37
|
+
class: Y(g, b),
|
|
38
|
+
onClick: p
|
|
39
|
+
};
|
|
40
|
+
for (const a in r) {
|
|
41
|
+
const V = r[a];
|
|
42
|
+
(r.hasOwnProperty(a) && V !== m || a.startsWith(X)) && (d[a] = V);
|
|
43
|
+
}
|
|
44
|
+
return G(t, d, u.default && u.default());
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
return typeof o != "function" && (o.name = t, o.props = {
|
|
48
|
+
[F]: P
|
|
49
|
+
}, n.forEach((r) => {
|
|
50
|
+
o.props[r] = P;
|
|
51
|
+
})), o;
|
|
52
|
+
}, H = /* @__PURE__ */ B("revo-grid", void 0, [
|
|
53
|
+
"rowHeaders",
|
|
54
|
+
"frameSize",
|
|
55
|
+
"rowSize",
|
|
56
|
+
"colSize",
|
|
57
|
+
"range",
|
|
58
|
+
"readonly",
|
|
59
|
+
"resize",
|
|
60
|
+
"canFocus",
|
|
61
|
+
"useClipboard",
|
|
62
|
+
"columns",
|
|
63
|
+
"source",
|
|
64
|
+
"pinnedTopSource",
|
|
65
|
+
"pinnedBottomSource",
|
|
66
|
+
"rowDefinitions",
|
|
67
|
+
"editors",
|
|
68
|
+
"applyOnClose",
|
|
69
|
+
"plugins",
|
|
70
|
+
"columnTypes",
|
|
71
|
+
"theme",
|
|
72
|
+
"rowClass",
|
|
73
|
+
"autoSizeColumn",
|
|
74
|
+
"filter",
|
|
75
|
+
"focusTemplate",
|
|
76
|
+
"canMoveColumns",
|
|
77
|
+
"trimmedRows",
|
|
78
|
+
"exporting",
|
|
79
|
+
"grouping",
|
|
80
|
+
"stretch",
|
|
81
|
+
"additionalData",
|
|
82
|
+
"disableVirtualX",
|
|
83
|
+
"disableVirtualY",
|
|
84
|
+
"hideAttribution",
|
|
85
|
+
"jobsBeforeRender",
|
|
86
|
+
"registerVNode",
|
|
87
|
+
"contentsizechanged",
|
|
88
|
+
"beforeedit",
|
|
89
|
+
"beforerangeedit",
|
|
90
|
+
"afteredit",
|
|
91
|
+
"beforeautofill",
|
|
92
|
+
"beforeange",
|
|
93
|
+
"afterfocus",
|
|
94
|
+
"roworderchanged",
|
|
95
|
+
"beforesortingapply",
|
|
96
|
+
"beforesorting",
|
|
97
|
+
"rowdragstart",
|
|
98
|
+
"headerclick",
|
|
99
|
+
"beforecellfocus",
|
|
100
|
+
"beforefocuslost",
|
|
101
|
+
"beforesourceset",
|
|
102
|
+
"beforeanysource",
|
|
103
|
+
"aftersourceset",
|
|
104
|
+
"afteranysource",
|
|
105
|
+
"beforecolumnsset",
|
|
106
|
+
"beforecolumnapplied",
|
|
107
|
+
"aftercolumnsset",
|
|
108
|
+
"beforefilterapply",
|
|
109
|
+
"beforefiltertrimmed",
|
|
110
|
+
"beforetrimmed",
|
|
111
|
+
"aftertrimmed",
|
|
112
|
+
"viewportscroll",
|
|
113
|
+
"beforeexport",
|
|
114
|
+
"beforeeditstart",
|
|
115
|
+
"aftercolumnresize",
|
|
116
|
+
"beforerowdefinition",
|
|
117
|
+
"filterconfigchanged",
|
|
118
|
+
"rowheaderschanged",
|
|
119
|
+
"beforegridrender",
|
|
120
|
+
"aftergridinit"
|
|
121
|
+
]);
|
|
122
|
+
function T(t, e) {
|
|
123
|
+
e != null && e.appContext && (t.appContext = e.appContext);
|
|
124
|
+
}
|
|
125
|
+
const O = (t, e, n, i, s = null) => {
|
|
126
|
+
var c;
|
|
127
|
+
if (!e)
|
|
128
|
+
return (c = s == null ? void 0 : s.destroy) == null || c.call(s), {
|
|
129
|
+
vueInstance: null,
|
|
130
|
+
destroy: () => null,
|
|
131
|
+
el: null
|
|
132
|
+
};
|
|
133
|
+
let o = e._vnode;
|
|
134
|
+
if (o) {
|
|
135
|
+
T(o, i);
|
|
136
|
+
for (const u in n)
|
|
137
|
+
o.component.props[u] = n[u];
|
|
138
|
+
} else
|
|
139
|
+
o = N(t, n), T(o, i), w(o, e);
|
|
140
|
+
return {
|
|
141
|
+
vueInstance: o,
|
|
142
|
+
destroy: () => w(null, e),
|
|
143
|
+
el: e
|
|
144
|
+
};
|
|
145
|
+
}, ee = (t, e) => {
|
|
146
|
+
const n = C();
|
|
147
|
+
return (i, s, o) => {
|
|
148
|
+
const r = e ? {
|
|
149
|
+
...e,
|
|
150
|
+
...s
|
|
151
|
+
} : s;
|
|
152
|
+
r.addition = o;
|
|
153
|
+
let c = null;
|
|
154
|
+
return i("span", {
|
|
155
|
+
ref: (u) => {
|
|
156
|
+
c = O(t, u, r, n, c);
|
|
157
|
+
}
|
|
158
|
+
}, null);
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
class K {
|
|
162
|
+
constructor(e, n, i, s, o) {
|
|
163
|
+
v(this, "element", null);
|
|
164
|
+
v(this, "editCell", null);
|
|
165
|
+
this.VueEditorConstructor = e, this.column = n, this.save = i, this.close = s, this.vInstance = o;
|
|
166
|
+
}
|
|
167
|
+
// optional, called after editor rendered
|
|
168
|
+
componentDidRender() {
|
|
169
|
+
}
|
|
170
|
+
// optional, called after editor destroyed
|
|
171
|
+
disconnectedCallback() {
|
|
172
|
+
this.vueEl && (this.vueEl.destroy(), this.vueEl = void 0);
|
|
173
|
+
}
|
|
174
|
+
render(e) {
|
|
175
|
+
return e("span", {
|
|
176
|
+
ref: (n) => {
|
|
177
|
+
this.vueEl = O(this.VueEditorConstructor, n, {
|
|
178
|
+
...this.editCell,
|
|
179
|
+
column: this.column,
|
|
180
|
+
save: this.save,
|
|
181
|
+
close: this.close
|
|
182
|
+
}, this.vInstance);
|
|
183
|
+
}
|
|
184
|
+
}, null);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
const te = (t) => function(e, n, i) {
|
|
188
|
+
return new K(
|
|
189
|
+
t,
|
|
190
|
+
e,
|
|
191
|
+
n,
|
|
192
|
+
i,
|
|
193
|
+
C()
|
|
194
|
+
);
|
|
195
|
+
};
|
|
196
|
+
function j(t) {
|
|
197
|
+
return !!t && (typeof t == "object" || typeof t == "function") && typeof t.then == "function";
|
|
198
|
+
}
|
|
199
|
+
var _;
|
|
200
|
+
const A = (_ = D) == null ? void 0 : _(), ne = U(async () => (j(A) && await A, H));
|
|
201
|
+
export {
|
|
202
|
+
ne as VGrid,
|
|
203
|
+
te as VGridVueEditor,
|
|
204
|
+
ee as VGridVueTemplate,
|
|
205
|
+
O as VGridVueTemplateConstructor,
|
|
206
|
+
ne as default
|
|
207
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(r,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@revolist/revogrid/loader")):typeof define=="function"&&define.amd?define(["exports","vue","@revolist/revogrid/loader"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r.Vue3Datagrid={},r.Vue,r.RevogridLoader))})(this,function(r,e,a){"use strict";var X=Object.defineProperty;var Y=(r,e,a)=>e in r?X(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a;var b=(r,e,a)=>(Y(r,typeof e!="symbol"?e+"":e,a),a);var k;const M="routerLink",R="navManager",L="router",z="aria",C=Symbol(),V={default:C},w=t=>(t==null?void 0:t.split(" "))||[],G=(t,n,s=[])=>{var d;return[...Array.from(((d=t.value)==null?void 0:d.classList)||[]),...s].filter((u,o,i)=>!n.has(u)&&i.indexOf(u)===o)},x=((t,n,s=[],d,u)=>{const o=e.defineComponent((i,{attrs:f,slots:l,emit:q})=>{var S;i[d];const A=e.ref(),_=new Set(w(f.class)),v=e.getCurrentInstance(),O=((S=v==null?void 0:v.appContext)==null?void 0:S.provides[R])?e.inject(R):void 0,W=g=>{const{routerLink:y}=i;if(y!==C)if(O!==void 0){let m={event:g};for(const h in i){const c=i[h];i.hasOwnProperty(h)&&h.startsWith(L)&&c!==C&&(m[h]=c)}O.navigate(m)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{i[d],w(f.class).forEach(c=>{_.add(c)});const g=i.onClick,y=c=>{g!==void 0&&g(c),c.defaultPrevented||W(c)};let m={ref:A,class:G(A,_),onClick:y};for(const c in i){const I=i[c];(i.hasOwnProperty(c)&&I!==C||c.startsWith(z))&&(m[c]=I)}return e.h(t,m,l.default&&l.default())}});return typeof o!="function"&&(o.name=t,o.props={[M]:V},s.forEach(i=>{o.props[i]=V})),o})("revo-grid",void 0,["rowHeaders","frameSize","rowSize","colSize","range","readonly","resize","canFocus","useClipboard","columns","source","pinnedTopSource","pinnedBottomSource","rowDefinitions","editors","applyOnClose","plugins","columnTypes","theme","rowClass","autoSizeColumn","filter","focusTemplate","canMoveColumns","trimmedRows","exporting","grouping","stretch","additionalData","disableVirtualX","disableVirtualY","hideAttribution","jobsBeforeRender","registerVNode","contentsizechanged","beforeedit","beforerangeedit","afteredit","beforeautofill","beforeange","afterfocus","roworderchanged","beforesortingapply","beforesorting","rowdragstart","headerclick","beforecellfocus","beforefocuslost","beforesourceset","beforeanysource","aftersourceset","afteranysource","beforecolumnsset","beforecolumnapplied","aftercolumnsset","beforefilterapply","beforefiltertrimmed","beforetrimmed","aftertrimmed","viewportscroll","beforeexport","beforeeditstart","aftercolumnresize","beforerowdefinition","filterconfigchanged","rowheaderschanged","beforegridrender","aftergridinit"]);function E(t,n){n!=null&&n.appContext&&(t.appContext=n.appContext)}const p=(t,n,s,d,u=null)=>{var f;if(!n)return(f=u==null?void 0:u.destroy)==null||f.call(u),{vueInstance:null,destroy:()=>null,el:null};let o=n._vnode;if(o){E(o,d);for(const l in s)o.component.props[l]=s[l]}else o=e.createVNode(t,s),E(o,d),e.render(o,n);return{vueInstance:o,destroy:()=>e.render(null,n),el:n}},N=(t,n)=>{const s=e.getCurrentInstance();return(d,u,o)=>{const i=n?{...n,...u}:u;i.addition=o;let f=null;return d("span",{ref:l=>{f=p(t,l,i,s,f)}},null)}};class D{constructor(n,s,d,u,o){b(this,"element",null);b(this,"editCell",null);this.VueEditorConstructor=n,this.column=s,this.save=d,this.close=u,this.vInstance=o}componentDidRender(){}disconnectedCallback(){this.vueEl&&(this.vueEl.destroy(),this.vueEl=void 0)}render(n){return n("span",{ref:s=>{this.vueEl=p(this.VueEditorConstructor,s,{...this.editCell,column:this.column,save:this.save,close:this.close},this.vInstance)}},null)}}const U=t=>function(n,s,d){return new D(t,n,s,d,e.getCurrentInstance())};function F(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}const T=(k=a.defineCustomElements)==null?void 0:k.call(a),P=e.defineAsyncComponent(async()=>(F(T)&&await T,x));r.VGrid=P,r.VGridVueEditor=U,r.VGridVueTemplate=N,r.VGridVueTemplateConstructor=p,r.default=P,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,27 +1,57 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revolist/vue3-datagrid",
|
|
3
|
-
"version": "4.0.0
|
|
4
|
-
"description": "Vue 3 DataGrid Spreadsheet",
|
|
5
|
-
"main": "dist/
|
|
6
|
-
"
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "Vue 3 DataGrid Spreadsheet component with native Vue 3 cell render support",
|
|
5
|
+
"main": "./dist/vue3-datagrid.umd.cjs",
|
|
6
|
+
"module": "./dist/vue3-datagrid.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/vue3-datagrid.js",
|
|
11
|
+
"require": "./dist/vue3-datagrid.umd.cjs",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
7
19
|
"scripts": {
|
|
8
|
-
"
|
|
9
|
-
"
|
|
20
|
+
"dev": "vite",
|
|
21
|
+
"build": "vue-tsc && vite build",
|
|
22
|
+
"preview": "vite preview"
|
|
10
23
|
},
|
|
11
24
|
"keywords": [
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
25
|
+
"revo-grid",
|
|
26
|
+
"revolist",
|
|
27
|
+
"csv",
|
|
15
28
|
"datagrid",
|
|
16
|
-
"
|
|
29
|
+
"datalist",
|
|
30
|
+
"datamanager",
|
|
31
|
+
"editable",
|
|
17
32
|
"excel",
|
|
18
|
-
"
|
|
33
|
+
"excel-grid",
|
|
34
|
+
"export",
|
|
35
|
+
"fast-grid",
|
|
36
|
+
"filtering",
|
|
37
|
+
"grid",
|
|
19
38
|
"gridjs",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"datalist",
|
|
39
|
+
"grouping",
|
|
40
|
+
"infinity-grid",
|
|
23
41
|
"rangeedit",
|
|
24
|
-
"
|
|
42
|
+
"reactive",
|
|
43
|
+
"spreadsheet",
|
|
44
|
+
"stenciljs",
|
|
45
|
+
"storybook",
|
|
46
|
+
"treeview",
|
|
47
|
+
"virtualgrid",
|
|
48
|
+
"virtual",
|
|
49
|
+
"virtual-scroll",
|
|
50
|
+
"vue",
|
|
51
|
+
"vue-grid",
|
|
52
|
+
"vue-datagrid",
|
|
53
|
+
"vue3",
|
|
54
|
+
"vue3-datagrid"
|
|
25
55
|
],
|
|
26
56
|
"author": "revolist",
|
|
27
57
|
"repository": {
|
|
@@ -29,29 +59,24 @@
|
|
|
29
59
|
"url": "git+https://github.com/revolist/vue3-datagrid.git"
|
|
30
60
|
},
|
|
31
61
|
"bugs": {
|
|
32
|
-
"url": "https://github.com/revolist/
|
|
62
|
+
"url": "https://github.com/revolist/revogrid/issues"
|
|
33
63
|
},
|
|
34
|
-
"homepage": "https://github.com/revolist/
|
|
64
|
+
"homepage": "https://github.com/revolist/revogrid#readme",
|
|
35
65
|
"license": "MIT",
|
|
36
66
|
"dependencies": {
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
67
|
+
"@stencil/core": "^4.17.1",
|
|
68
|
+
"@revolist/revogrid": "^4.0.0",
|
|
69
|
+
"vue": "^3.4.21"
|
|
39
70
|
},
|
|
40
71
|
"devDependencies": {
|
|
41
|
-
"@
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
"vue": "^3.4.15",
|
|
51
|
-
"vue-loader": "^17.4.2",
|
|
52
|
-
"vue-style-loader": "^4.1.3",
|
|
53
|
-
"webpack": "^5.90.0",
|
|
54
|
-
"webpack-cli": "^5.1.4",
|
|
55
|
-
"webpack-dev-server": "^4.15.1"
|
|
72
|
+
"@vitejs/plugin-vue": "^5.0.4",
|
|
73
|
+
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
74
|
+
"typescript": "^5.2.2",
|
|
75
|
+
"vite": "^5.2.0",
|
|
76
|
+
"vite-plugin-dts": "^3.9.0",
|
|
77
|
+
"vue-tsc": "^2.0.14"
|
|
78
|
+
},
|
|
79
|
+
"publishConfig": {
|
|
80
|
+
"access": "public"
|
|
56
81
|
}
|
|
57
82
|
}
|
package/.eslintrc.json
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"browser": true,
|
|
4
|
-
"commonjs": true,
|
|
5
|
-
"es6": true,
|
|
6
|
-
"node": true
|
|
7
|
-
},
|
|
8
|
-
"extends": "eslint:recommended",
|
|
9
|
-
"parserOptions": {
|
|
10
|
-
"sourceType": "module"
|
|
11
|
-
},
|
|
12
|
-
"rules": {
|
|
13
|
-
"indent": [
|
|
14
|
-
"error",
|
|
15
|
-
4
|
|
16
|
-
],
|
|
17
|
-
"linebreak-style": [
|
|
18
|
-
"error",
|
|
19
|
-
"unix"
|
|
20
|
-
],
|
|
21
|
-
"quotes": [
|
|
22
|
-
"error",
|
|
23
|
-
"single"
|
|
24
|
-
],
|
|
25
|
-
"semi": [
|
|
26
|
-
"error",
|
|
27
|
-
"always"
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Issue template
|
|
3
|
-
about: Create a report to help us improve
|
|
4
|
-
title: ''
|
|
5
|
-
labels: ''
|
|
6
|
-
assignees: ''
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
**Check if issue exists**
|
|
11
|
-
Search the repo and ensure your issue doesn't already exist. If so, it may:
|
|
12
|
-
- Have already been fixed in an unreleased version.
|
|
13
|
-
- Have been closed without a solution. Please create a new issue instead of commenting on the old one.
|
|
14
|
-
|
|
15
|
-
**Describe the issue**
|
|
16
|
-
A clear and concise description of what the issue is.
|
|
17
|
-
|
|
18
|
-
**To Reproduce**
|
|
19
|
-
Create a minimal reproduction to illustrate the issue. Here's a [template](https://codesandbox.io/s/revo-grid-vue3-thry7) to start you off.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
name: Node.js Package
|
|
2
|
-
on:
|
|
3
|
-
release:
|
|
4
|
-
types: [created]
|
|
5
|
-
jobs:
|
|
6
|
-
build:
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
steps:
|
|
9
|
-
- uses: actions/checkout@v2
|
|
10
|
-
# Setup .npmrc file to publish to npm
|
|
11
|
-
- uses: actions/setup-node@v1
|
|
12
|
-
with:
|
|
13
|
-
node-version: '12.x'
|
|
14
|
-
registry-url: 'https://registry.npmjs.org'
|
|
15
|
-
- run: npm install
|
|
16
|
-
# Build
|
|
17
|
-
- run: npm run build
|
|
18
|
-
# Publish to npm
|
|
19
|
-
- run: npm publish --access public
|
|
20
|
-
env:
|
|
21
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
22
|
-
# Setup .npmrc file to publish to GitHub Packages
|
|
23
|
-
- uses: actions/setup-node@v1
|
|
24
|
-
with:
|
|
25
|
-
registry-url: 'https://npm.pkg.github.com'
|
|
26
|
-
# Defaults to the user or organization that owns the workflow file
|
|
27
|
-
scope: '@revolist'
|
|
28
|
-
# Publish to GitHub Packages
|
|
29
|
-
- run: npm publish
|
|
30
|
-
env:
|
|
31
|
-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
entry: {
|
|
5
|
-
index: './src/index.ts'
|
|
6
|
-
},
|
|
7
|
-
output: {
|
|
8
|
-
path: path.resolve(__dirname, '../dist'),
|
|
9
|
-
publicPath: 'none',
|
|
10
|
-
filename: '[name].js',
|
|
11
|
-
libraryTarget: 'umd',
|
|
12
|
-
umdNamedDefine: true
|
|
13
|
-
},
|
|
14
|
-
externals: [
|
|
15
|
-
'vue',
|
|
16
|
-
'@revolist/revogrid',
|
|
17
|
-
/^@revolist\/revogrid\//,
|
|
18
|
-
'@stencil/core',
|
|
19
|
-
],
|
|
20
|
-
resolve: {
|
|
21
|
-
extensions: [ '.tsx', '.ts', '.js' ],
|
|
22
|
-
},
|
|
23
|
-
module: {
|
|
24
|
-
rules: [
|
|
25
|
-
{
|
|
26
|
-
test: /\.tsx?$/,
|
|
27
|
-
use: 'ts-loader',
|
|
28
|
-
exclude: /node_modules/,
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
};
|
package/.webpack/webpack.dev.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
const path = require("path");
|
|
2
|
-
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
|
3
|
-
const { VueLoaderPlugin } = require("vue-loader");
|
|
4
|
-
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
|
|
5
|
-
|
|
6
|
-
module.exports = {
|
|
7
|
-
mode: "development",
|
|
8
|
-
entry: {
|
|
9
|
-
app: "./public/index.ts",
|
|
10
|
-
},
|
|
11
|
-
devtool: "inline-source-map",
|
|
12
|
-
devServer: {
|
|
13
|
-
port: 3332,
|
|
14
|
-
},
|
|
15
|
-
output: {
|
|
16
|
-
path: path.resolve(__dirname, "../distServe"),
|
|
17
|
-
filename: "[name].js",
|
|
18
|
-
libraryTarget: "umd",
|
|
19
|
-
umdNamedDefine: true,
|
|
20
|
-
},
|
|
21
|
-
plugins: [
|
|
22
|
-
new CleanWebpackPlugin({ cleanStaleWebpackAssets: false }),
|
|
23
|
-
new VueLoaderPlugin(),
|
|
24
|
-
new HtmlWebpackPlugin({
|
|
25
|
-
title: "Development",
|
|
26
|
-
template: "./public/index.html",
|
|
27
|
-
appMountId: "app",
|
|
28
|
-
inject: true,
|
|
29
|
-
exJs: [], //"dist/vgrid.js"
|
|
30
|
-
}),
|
|
31
|
-
],
|
|
32
|
-
resolve: {
|
|
33
|
-
extensions: [".tsx", ".ts", ".js", ".vue"],
|
|
34
|
-
alias: {
|
|
35
|
-
vue$: "vue/dist/vue.esm-bundler.js",
|
|
36
|
-
"@revolist/vue3-datagrid": path.resolve(__dirname, "../dist/"),
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
module: {
|
|
40
|
-
rules: [
|
|
41
|
-
{
|
|
42
|
-
test: /\.vue$/,
|
|
43
|
-
use: "vue-loader",
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
test: /\.tsx?$/,
|
|
47
|
-
loader: "ts-loader",
|
|
48
|
-
options: {
|
|
49
|
-
appendTsSuffixTo: [/\.vue$/],
|
|
50
|
-
},
|
|
51
|
-
exclude: /node_modules/,
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
test: /\.scss$/,
|
|
55
|
-
use: [
|
|
56
|
-
"vue-style-loader",
|
|
57
|
-
{
|
|
58
|
-
loader: "css-loader",
|
|
59
|
-
options: {
|
|
60
|
-
esModule: false,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
"sass-loader",
|
|
64
|
-
],
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
},
|
|
68
|
-
};
|
package/dist/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("vue"),require("@revolist/revogrid/loader"));else if("function"==typeof define&&define.amd)define(["vue","@revolist/revogrid/loader"],r);else{var t="object"==typeof exports?r(require("vue"),require("@revolist/revogrid/loader")):r(e.vue,e["@revolist/revogrid/loader"]);for(var o in t)("object"==typeof exports?exports:e)[o]=t[o]}}(self,((e,r)=>(()=>{"use strict";var t={829: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 s=o[e]={exports:{}};return t[e](s,s.exports,n),s.exports}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.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 s={};return(()=>{n.r(s),n.d(s,{VGrid:()=>v,VGridPlugin:()=>b,VGridVueEditor:()=>y,VGridVueTemplate:()=>g,VGridVueTemplateConstructor:()=>h,default:()=>C});var e=n(748);const r="update:modelValue",t="modelValue",o="navManager",i=Symbol(),a={default:i},l=e=>(null==e?void 0:e.split(" "))||[],u=(e,r,t=[])=>{var o;return[...Array.from((null===(o=e.value)||void 0===o?void 0:o.classList)||[]),...t].filter(((e,t,o)=>!r.has(e)&&o.indexOf(e)===t))},d=(n,s,d=[],c,f,p)=>{void 0!==s&&s();const v=(0,e.defineComponent)(((s,{attrs:a,slots:d,emit:v})=>{var m;let b=s[c];const g=(0,e.ref)(),h=new Set(l(a.class)),y=e=>{e.el&&(Array.isArray(f)?f:[f]).forEach((t=>{e.el.addEventListener(t.toLowerCase(),(e=>{b=(null==e?void 0:e.target)[c],v(r,b),p&&v(p,e)}))}))},C=(0,e.getCurrentInstance)(),x=(null===(m=null==C?void 0:C.appContext)||void 0===m?void 0:m.provides[o])?(0,e.inject)(o):void 0;return()=>{b=s[c],l(a.class).forEach((e=>{h.add(e)}));const r=s.onClick;let o={ref:g,class:u(g,h),onClick:e=>{void 0!==r&&r(e),e.defaultPrevented||(e=>{const{routerLink:r}=s;if(r!==i)if(void 0!==x){let r={event:e};for(const e in s){const t=s[e];s.hasOwnProperty(e)&&e.startsWith("router")&&t!==i&&(r[e]=t)}x.navigate(r)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")})(e)},onVnodeBeforeMount:f?y:void 0};for(const e in s){const r=s[e];(s.hasOwnProperty(e)&&r!==i||e.startsWith("aria"))&&(o[e]=r)}return c&&(s[t]!==i?o=Object.assign(Object.assign({},o),{[c]:s[t]}):b!==i&&(o=Object.assign(Object.assign({},o),{[c]:b}))),(0,e.h)(n,o,d.default&&d.default())}}));return"function"!=typeof v&&(v.name=n,v.props={routerLink:a},d.forEach((e=>{v.props[e]=a})),c&&(v.props[t]=a,v.emits=[r,p])),v};(0,n(829).defineCustomElements)();const c=d("revo-grid",void 0,["rowHeaders","frameSize","rowSize","colSize","range","readonly","resize","canFocus","useClipboard","columns","source","pinnedTopSource","pinnedBottomSource","rowDefinitions","editors","applyOnClose","plugins","columnTypes","theme","rowClass","autoSizeColumn","filter","focusTemplate","canMoveColumns","trimmedRows","exporting","grouping","stretch","additionalData","disableVirtualX","disableVirtualY","jobsBeforeRender","contentsizechanged","beforeedit","beforerangeedit","afteredit","beforeautofill","beforeange","afterfocus","roworderchanged","beforesourcesortingapply","beforesortingapply","beforesorting","rowdragstart","headerclick","beforecellfocus","beforefocuslost","beforesourceset","before-any-source","aftersourceset","after-any-source","beforecolumnsset","beforecolumnapplied","aftercolumnsset","beforefilterapply","beforefiltertrimmed","beforetrimmed","aftertrimmed","viewportscroll","beforeexport","beforeeditstart","aftercolumnresize","beforerowdefinition","filterconfigchanged","rowheaderschanged"]),f=(r,t,o,n,s)=>{if(!t)return null;let i=t._vnode;if(i){n&&(i.appContext=n);for(const e in o)i.component.props[e]=o[e]}else i=(0,e.createVNode)(r,o),n&&(i.appContext=n),(0,e.render)(i,t);return{vueInstance:i,destroy:()=>(0,e.render)(null,t),el:t}};class p{constructor(e,r,t,o,n){this.VueEditorConstructor=e,this.column=r,this.save=t,this.close=o,this.appContext=n,this.element=null,this.editCell=null}componentDidRender(){}disconnectedCallback(){this.vueEl&&(this.vueEl.destroy(),this.vueEl=void 0)}render(e){return e("span",{ref:e=>{this.vueEl=f(this.VueEditorConstructor,e,Object.assign(Object.assign({},this.editCell),{column:this.column,save:this.save,close:this.close}),this.appContext)}})}}const v=c;let m=!1;const b={install(e){m||(m=!0,e.component("vue-data-grid",v))}},g=(r,t)=>{const o=(0,e.getCurrentInstance)(),n=null==o?void 0:o.appContext;return(e,o,s)=>{const i=t?Object.assign(Object.assign({},t),o):o;return e("span",{ref:e=>f(r,e,i,n)})}},h=f,y=r=>{const t=(0,e.getCurrentInstance)(),o=null==t?void 0:t.appContext;return function(e,t,n){return new p(r,e,t,n,o)}},C=c})(),s})()));
|
package/dist/revogrid.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { JSX } from '@revolist/revogrid';
|
|
2
|
-
export declare const RevoGrid: (props: JSX.RevoGrid & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
3
|
-
export declare const RevogrCell: (props: JSX.RevogrCell & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
4
|
-
export declare const RevogrClipboard: (props: JSX.RevogrClipboard & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
5
|
-
export declare const RevogrData: (props: JSX.RevogrData & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
6
|
-
export declare const RevogrEdit: (props: JSX.RevogrEdit & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
7
|
-
export declare const RevogrFilterPanel: (props: JSX.RevogrFilterPanel & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
8
|
-
export declare const RevogrFocus: (props: JSX.RevogrFocus & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
9
|
-
export declare const RevogrHeader: (props: JSX.RevogrHeader & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
10
|
-
export declare const RevogrOrderEditor: (props: JSX.RevogrOrderEditor & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
11
|
-
export declare const RevogrOverlaySelection: (props: JSX.RevogrOverlaySelection & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
12
|
-
export declare const RevogrRowHeaders: (props: JSX.RevogrRowHeaders & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
13
|
-
export declare const RevogrScrollVirtual: (props: JSX.RevogrScrollVirtual & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
14
|
-
export declare const RevogrTempRange: (props: JSX.RevogrTempRange & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
15
|
-
export declare const RevogrViewportScroll: (props: JSX.RevogrViewportScroll & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export interface InputProps<T> {
|
|
2
|
-
modelValue?: T;
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* Create a callback to define a Vue component wrapper around a Web Component.
|
|
6
|
-
*
|
|
7
|
-
* @prop name - The component tag name (i.e. `ion-button`)
|
|
8
|
-
* @prop componentProps - An array of properties on the
|
|
9
|
-
* component. These usually match up with the @Prop definitions
|
|
10
|
-
* in each component's TSX file.
|
|
11
|
-
* @prop customElement - An option custom element instance to pass
|
|
12
|
-
* to customElements.define. Only set if `includeImportCustomElements: true` in your config.
|
|
13
|
-
* @prop modelProp - The prop that v-model binds to (i.e. value)
|
|
14
|
-
* @prop modelUpdateEvent - The event that is fired from your Web Component when the value changes (i.e. ionChange)
|
|
15
|
-
* @prop externalModelUpdateEvent - The external event to fire from your Vue component when modelUpdateEvent fires. This is used for ensuring that v-model references have been
|
|
16
|
-
* correctly updated when a user's event callback fires.
|
|
17
|
-
*/
|
|
18
|
-
export declare const defineContainer: <Props, VModelType = string | number | boolean>(name: string, defineCustomElement: any, componentProps?: string[], modelProp?: string, modelUpdateEvent?: string, externalModelUpdateEvent?: string) => (props: Props & InputProps<VModelType> & {}) => any;
|