@revolist/vue3-datagrid 4.9.21 → 4.9.23
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/vue3-datagrid.js +53 -49
- package/dist/vue3-datagrid.umd.cjs +1 -1
- package/package.json +2 -2
package/dist/vue3-datagrid.js
CHANGED
|
@@ -1,52 +1,56 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as I, ref as S, getCurrentInstance as C, inject as z, h as L, createVNode as M, render as V, defineAsyncComponent as D } from "vue";
|
|
2
2
|
import { defineCustomElements as G } from "@revolist/revogrid/loader";
|
|
3
3
|
export * from "@revolist/revogrid";
|
|
4
|
-
const
|
|
4
|
+
const v = "routerLink", k = "navManager", N = "router", U = "aria", m = Symbol(), E = { default: m }, P = (t) => (t == null ? void 0 : t.split(" ")) || [], F = (t, e, i = []) => {
|
|
5
5
|
var s;
|
|
6
6
|
return [...Array.from(((s = t.value) == null ? void 0 : s.classList) || []), ...i].filter(
|
|
7
|
-
(o,
|
|
7
|
+
(o, r, n) => !e.has(o) && n.indexOf(o) === r
|
|
8
8
|
);
|
|
9
9
|
}, $ = (t, e, i = [], s, o) => {
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
const { routerLink: p } =
|
|
10
|
+
const r = I((n, { attrs: c, slots: d, emit: B }) => {
|
|
11
|
+
var R;
|
|
12
|
+
n[s];
|
|
13
|
+
const g = S(), y = new Set(P(c.class)), h = C(), b = ((R = h == null ? void 0 : h.appContext) == null ? void 0 : R.provides[k]) ? z(k) : void 0, O = (f) => {
|
|
14
|
+
const { routerLink: p } = n;
|
|
15
15
|
if (p !== m)
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
if (b !== void 0) {
|
|
17
|
+
f.preventDefault();
|
|
18
|
+
let u = { event: f };
|
|
19
|
+
for (const l in n) {
|
|
20
|
+
const a = n[l];
|
|
21
|
+
n.hasOwnProperty(l) && l.startsWith(N) && a !== m && (u[l] = a);
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
+
b.navigate(u);
|
|
23
24
|
} else
|
|
24
25
|
console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.");
|
|
25
26
|
};
|
|
26
27
|
return () => {
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
n[s], P(c.class).forEach((a) => {
|
|
29
|
+
y.add(a);
|
|
29
30
|
});
|
|
30
|
-
const
|
|
31
|
-
|
|
31
|
+
const f = n.onClick, p = (a) => {
|
|
32
|
+
f !== void 0 && f(a), a.defaultPrevented || O(a);
|
|
32
33
|
};
|
|
33
34
|
let u = {
|
|
34
|
-
ref:
|
|
35
|
-
class: F(
|
|
35
|
+
ref: g,
|
|
36
|
+
class: F(g, y),
|
|
36
37
|
onClick: p
|
|
37
38
|
};
|
|
38
|
-
for (const a in
|
|
39
|
-
const
|
|
40
|
-
(
|
|
39
|
+
for (const a in n) {
|
|
40
|
+
const w = n[a];
|
|
41
|
+
(n.hasOwnProperty(a) && w !== m || a.startsWith(U)) && (u[a] = w);
|
|
41
42
|
}
|
|
42
|
-
return
|
|
43
|
+
return n[v] !== m && (u = {
|
|
44
|
+
...u,
|
|
45
|
+
href: n[v]
|
|
46
|
+
}), L(t, u, d.default && d.default());
|
|
43
47
|
};
|
|
44
48
|
});
|
|
45
|
-
return typeof
|
|
46
|
-
[
|
|
47
|
-
}, i.forEach((
|
|
48
|
-
|
|
49
|
-
})),
|
|
49
|
+
return typeof r != "function" && (r.name = t, r.props = {
|
|
50
|
+
[v]: E
|
|
51
|
+
}, i.forEach((n) => {
|
|
52
|
+
r.props[n] = E;
|
|
53
|
+
})), r;
|
|
50
54
|
}, W = /* @__PURE__ */ $("revo-grid", void 0, [
|
|
51
55
|
"rowHeaders",
|
|
52
56
|
"frameSize",
|
|
@@ -120,38 +124,38 @@ const N = "routerLink", V = "navManager", D = "router", U = "aria", m = Symbol()
|
|
|
120
124
|
"additionaldatachanged",
|
|
121
125
|
"afterthemechanged"
|
|
122
126
|
]);
|
|
123
|
-
function
|
|
127
|
+
function T(t, e) {
|
|
124
128
|
e != null && e.appContext && (t.appContext = e.appContext);
|
|
125
129
|
}
|
|
126
|
-
const
|
|
130
|
+
const _ = (t, e, i, s, o = null) => {
|
|
127
131
|
var c;
|
|
128
132
|
if (!e)
|
|
129
133
|
return (c = o == null ? void 0 : o.destroy) == null || c.call(o), { vueInstance: null, destroy: () => null, el: null };
|
|
130
|
-
let
|
|
131
|
-
if (
|
|
132
|
-
|
|
134
|
+
let r = e._vnode;
|
|
135
|
+
if (r) {
|
|
136
|
+
T(r, s);
|
|
133
137
|
for (const d in i)
|
|
134
|
-
|
|
138
|
+
r.component.props[d] = i[d];
|
|
135
139
|
} else
|
|
136
|
-
|
|
137
|
-
return { vueInstance:
|
|
140
|
+
r = M(t, i), T(r, s), V(r, e);
|
|
141
|
+
return { vueInstance: r, destroy: () => V(null, e), el: e };
|
|
138
142
|
}, q = (t, e) => {
|
|
139
|
-
const i =
|
|
140
|
-
return (s, o,
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
+
const i = C();
|
|
144
|
+
return (s, o, r) => {
|
|
145
|
+
const n = e ? { ...e, ...o } : o;
|
|
146
|
+
n.addition = r;
|
|
143
147
|
let c = null;
|
|
144
148
|
return s("span", {
|
|
145
149
|
key: `${o.prop}-${o.rowIndex || 0}`,
|
|
146
150
|
ref: (d) => {
|
|
147
|
-
c =
|
|
151
|
+
c = _(t, d, n, i, c);
|
|
148
152
|
}
|
|
149
153
|
});
|
|
150
154
|
};
|
|
151
155
|
};
|
|
152
156
|
class X {
|
|
153
|
-
constructor(e, i, s, o,
|
|
154
|
-
this.VueEditorConstructor = e, this.column = i, this.save = s, this.close = o, this.vInstance =
|
|
157
|
+
constructor(e, i, s, o, r) {
|
|
158
|
+
this.VueEditorConstructor = e, this.column = i, this.save = s, this.close = o, this.vInstance = r, this.element = null;
|
|
155
159
|
}
|
|
156
160
|
// optional, called after editor rendered
|
|
157
161
|
componentDidRender() {
|
|
@@ -172,7 +176,7 @@ class X {
|
|
|
172
176
|
save: this.save,
|
|
173
177
|
close: this.close
|
|
174
178
|
};
|
|
175
|
-
this.vueEl =
|
|
179
|
+
this.vueEl = _(
|
|
176
180
|
this.VueEditorConstructor,
|
|
177
181
|
s,
|
|
178
182
|
o,
|
|
@@ -183,7 +187,7 @@ class X {
|
|
|
183
187
|
}
|
|
184
188
|
}
|
|
185
189
|
const J = (t) => {
|
|
186
|
-
const e =
|
|
190
|
+
const e = C();
|
|
187
191
|
return function(i, s, o) {
|
|
188
192
|
return new X(
|
|
189
193
|
t,
|
|
@@ -197,12 +201,12 @@ const J = (t) => {
|
|
|
197
201
|
function Y(t) {
|
|
198
202
|
return !!t && (typeof t == "object" || typeof t == "function") && typeof t.then == "function";
|
|
199
203
|
}
|
|
200
|
-
var
|
|
201
|
-
const
|
|
204
|
+
var x;
|
|
205
|
+
const A = (x = G) == null ? void 0 : x(), Q = D(async () => (Y(A) && await A, W));
|
|
202
206
|
export {
|
|
203
207
|
Q as VGrid,
|
|
204
208
|
J as VGridVueEditor,
|
|
205
209
|
q as VGridVueTemplate,
|
|
206
|
-
|
|
210
|
+
_ as VGridVueTemplateConstructor,
|
|
207
211
|
Q as default
|
|
208
212
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(c,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue"),require("@revolist/revogrid/loader"),require("@revolist/revogrid")):typeof define=="function"&&define.amd?define(["exports","vue","@revolist/revogrid/loader","@revolist/revogrid"],d):(c=typeof globalThis<"u"?globalThis:c||self,d(c.Vue3Datagrid={},c.Vue,c.RevogridLoader,c.Revogrid))})(this,function(c,d,
|
|
1
|
+
(function(c,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue"),require("@revolist/revogrid/loader"),require("@revolist/revogrid")):typeof define=="function"&&define.amd?define(["exports","vue","@revolist/revogrid/loader","@revolist/revogrid"],d):(c=typeof globalThis<"u"?globalThis:c||self,d(c.Vue3Datagrid={},c.Vue,c.RevogridLoader,c.Revogrid))})(this,function(c,d,y,R){"use strict";var k;const v="routerLink",V="navManager",L="router",z="aria",h=Symbol(),w={default:h},P=e=>(e==null?void 0:e.split(" "))||[],D=(e,t,i=[])=>{var s;return[...Array.from(((s=e.value)==null?void 0:s.classList)||[]),...i].filter((n,r,o)=>!t.has(n)&&o.indexOf(n)===r)},G=((e,t,i=[],s,n)=>{const r=d.defineComponent((o,{attrs:u,slots:f,emit:q})=>{var S;o[s];const A=d.ref(),_=new Set(P(u.class)),p=d.getCurrentInstance(),I=((S=p==null?void 0:p.appContext)==null?void 0:S.provides[V])?d.inject(V):void 0,F=m=>{const{routerLink:b}=o;if(b!==h)if(I!==void 0){m.preventDefault();let l={event:m};for(const g in o){const a=o[g];o.hasOwnProperty(g)&&g.startsWith(L)&&a!==h&&(l[g]=a)}I.navigate(l)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{o[s],P(u.class).forEach(a=>{_.add(a)});const m=o.onClick,b=a=>{m!==void 0&&m(a),a.defaultPrevented||F(a)};let l={ref:A,class:D(A,_),onClick:b};for(const a in o){const M=o[a];(o.hasOwnProperty(a)&&M!==h||a.startsWith(z))&&(l[a]=M)}return o[v]!==h&&(l={...l,href:o[v]}),d.h(e,l,f.default&&f.default())}});return typeof r!="function"&&(r.name=e,r.props={[v]:w},i.forEach(o=>{r.props[o]=w})),r})("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","accessible","contentsizechanged","beforeedit","beforerangeedit","afteredit","beforeautofill","beforerange","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","additionaldatachanged","afterthemechanged"]);function E(e,t){t!=null&&t.appContext&&(e.appContext=t.appContext)}const C=(e,t,i,s,n=null)=>{var u;if(!t)return(u=n==null?void 0:n.destroy)==null||u.call(n),{vueInstance:null,destroy:()=>null,el:null};let r=t._vnode;if(r){E(r,s);for(const f in i)r.component.props[f]=i[f]}else r=d.createVNode(e,i),E(r,s),d.render(r,t);return{vueInstance:r,destroy:()=>d.render(null,t),el:t}},x=(e,t)=>{const i=d.getCurrentInstance();return(s,n,r)=>{const o=t?{...t,...n}:n;o.addition=r;let u=null;return s("span",{key:`${n.prop}-${n.rowIndex||0}`,ref:f=>{u=C(e,f,o,i,u)}})}};class N{constructor(t,i,s,n,r){this.VueEditorConstructor=t,this.column=i,this.save=s,this.close=n,this.vInstance=r,this.element=null}componentDidRender(){}disconnectedCallback(){var t;(t=this.vueEl)==null||t.destroy(),this.vueEl=void 0}render(t){var i;return t("span",{key:`${this.column.prop}-${((i=this.editCell)==null?void 0:i.rowIndex)||0}`,ref:s=>{const n={...this.editCell,column:this.column,save:this.save,close:this.close};this.vueEl=C(this.VueEditorConstructor,s,n,this.vInstance)}})}}const j=e=>{const t=d.getCurrentInstance();return function(i,s,n){return new N(e,i,s,n,t)}};function U(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}const T=(k=y.defineCustomElements)==null?void 0:k.call(y),O=d.defineAsyncComponent(async()=>(U(T)&&await T,G));c.VGrid=O,c.VGridVueEditor=j,c.VGridVueTemplate=x,c.VGridVueTemplateConstructor=C,c.default=O,Object.keys(R).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(c,e)&&Object.defineProperty(c,e,{enumerable:!0,get:()=>R[e]})}),Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revolist/vue3-datagrid",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.23",
|
|
4
4
|
"description": "Vue 3 DataGrid Spreadsheet component with native Vue 3 cell render support",
|
|
5
5
|
"main": "./dist/vue3-datagrid.umd.cjs",
|
|
6
6
|
"module": "./dist/vue3-datagrid.js",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"homepage": "https://github.com/revolist/revogrid#readme",
|
|
66
66
|
"license": "MIT",
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@revolist/revogrid": "4.9.
|
|
68
|
+
"@revolist/revogrid": "4.9.23"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@stencil/core": "^4.19.2",
|