@revolist/vue3-datagrid 4.9.18 → 4.9.20
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 +33 -30
- package/dist/vue3-datagrid.umd.cjs +1 -1
- package/package.json +2 -2
package/dist/vue3-datagrid.js
CHANGED
|
@@ -4,10 +4,10 @@ export * from "@revolist/revogrid";
|
|
|
4
4
|
const N = "routerLink", V = "navManager", D = "router", U = "aria", m = Symbol(), k = { default: m }, E = (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
|
-
(
|
|
7
|
+
(o, n, r) => !e.has(o) && r.indexOf(o) === n
|
|
8
8
|
);
|
|
9
|
-
}, $ = (t, e, i = [], s,
|
|
10
|
-
const
|
|
9
|
+
}, $ = (t, e, i = [], s, o) => {
|
|
10
|
+
const n = O((r, { attrs: c, slots: d, emit: B }) => {
|
|
11
11
|
var b;
|
|
12
12
|
r[s];
|
|
13
13
|
const C = I(), g = new Set(E(c.class)), h = v(), y = ((b = h == null ? void 0 : h.appContext) == null ? void 0 : b.provides[V]) ? S(V) : void 0, _ = (l) => {
|
|
@@ -42,11 +42,11 @@ const N = "routerLink", V = "navManager", D = "router", U = "aria", m = Symbol()
|
|
|
42
42
|
return z(t, u, d.default && d.default());
|
|
43
43
|
};
|
|
44
44
|
});
|
|
45
|
-
return typeof
|
|
45
|
+
return typeof n != "function" && (n.name = t, n.props = {
|
|
46
46
|
[N]: k
|
|
47
47
|
}, i.forEach((r) => {
|
|
48
|
-
|
|
49
|
-
})),
|
|
48
|
+
n.props[r] = k;
|
|
49
|
+
})), n;
|
|
50
50
|
}, W = /* @__PURE__ */ $("revo-grid", void 0, [
|
|
51
51
|
"rowHeaders",
|
|
52
52
|
"frameSize",
|
|
@@ -123,26 +123,26 @@ const N = "routerLink", V = "navManager", D = "router", U = "aria", m = Symbol()
|
|
|
123
123
|
function P(t, e) {
|
|
124
124
|
e != null && e.appContext && (t.appContext = e.appContext);
|
|
125
125
|
}
|
|
126
|
-
const x = (t, e, i, s,
|
|
126
|
+
const x = (t, e, i, s, o = null) => {
|
|
127
127
|
var c;
|
|
128
128
|
if (!e)
|
|
129
|
-
return (c =
|
|
130
|
-
let
|
|
131
|
-
if (
|
|
132
|
-
P(
|
|
129
|
+
return (c = o == null ? void 0 : o.destroy) == null || c.call(o), { vueInstance: null, destroy: () => null, el: null };
|
|
130
|
+
let n = e._vnode;
|
|
131
|
+
if (n) {
|
|
132
|
+
P(n, s);
|
|
133
133
|
for (const d in i)
|
|
134
|
-
|
|
134
|
+
n.component.props[d] = i[d];
|
|
135
135
|
} else
|
|
136
|
-
|
|
137
|
-
return { vueInstance:
|
|
136
|
+
n = L(t, i), P(n, s), w(n, e);
|
|
137
|
+
return { vueInstance: n, destroy: () => w(null, e), el: e };
|
|
138
138
|
}, q = (t, e) => {
|
|
139
139
|
const i = v();
|
|
140
|
-
return (s,
|
|
141
|
-
const r = e ? { ...e, ...
|
|
142
|
-
r.addition =
|
|
140
|
+
return (s, o, n) => {
|
|
141
|
+
const r = e ? { ...e, ...o } : o;
|
|
142
|
+
r.addition = n;
|
|
143
143
|
let c = null;
|
|
144
144
|
return s("span", {
|
|
145
|
-
key: `${
|
|
145
|
+
key: `${o.prop}-${o.rowIndex || 0}`,
|
|
146
146
|
ref: (d) => {
|
|
147
147
|
c = x(t, d, r, i, c);
|
|
148
148
|
}
|
|
@@ -150,8 +150,8 @@ const x = (t, e, i, s, n = null) => {
|
|
|
150
150
|
};
|
|
151
151
|
};
|
|
152
152
|
class X {
|
|
153
|
-
constructor(e, i, s,
|
|
154
|
-
this.VueEditorConstructor = e, this.column = i, this.save = s, this.close =
|
|
153
|
+
constructor(e, i, s, o, n) {
|
|
154
|
+
this.VueEditorConstructor = e, this.column = i, this.save = s, this.close = o, this.vInstance = n, this.element = null;
|
|
155
155
|
}
|
|
156
156
|
// optional, called after editor rendered
|
|
157
157
|
componentDidRender() {
|
|
@@ -166,7 +166,7 @@ class X {
|
|
|
166
166
|
return e("span", {
|
|
167
167
|
key: `${this.column.prop}-${((i = this.editCell) == null ? void 0 : i.rowIndex) || 0}`,
|
|
168
168
|
ref: (s) => {
|
|
169
|
-
const
|
|
169
|
+
const o = {
|
|
170
170
|
...this.editCell,
|
|
171
171
|
column: this.column,
|
|
172
172
|
save: this.save,
|
|
@@ -175,21 +175,24 @@ class X {
|
|
|
175
175
|
this.vueEl = x(
|
|
176
176
|
this.VueEditorConstructor,
|
|
177
177
|
s,
|
|
178
|
-
|
|
178
|
+
o,
|
|
179
179
|
this.vInstance
|
|
180
180
|
);
|
|
181
181
|
}
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
const J = (t) =>
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
185
|
+
const J = (t) => {
|
|
186
|
+
const e = v();
|
|
187
|
+
return function(i, s, o) {
|
|
188
|
+
return new X(
|
|
189
|
+
t,
|
|
190
|
+
i,
|
|
191
|
+
s,
|
|
192
|
+
o,
|
|
193
|
+
e
|
|
194
|
+
);
|
|
195
|
+
};
|
|
193
196
|
};
|
|
194
197
|
function Y(t) {
|
|
195
198
|
return !!t && (typeof t == "object" || typeof t == "function") && typeof t.then == "function";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(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,p,b){"use strict";var O;const M="routerLink",R="navManager",L="router",z="aria",m=Symbol(),V={default:m},w=e=>(e==null?void 0:e.split(" "))||[],G=(e,t,i=[])=>{var s;return[...Array.from(((s=e.value)==null?void 0:s.classList)||[]),...i].filter((n,o,r)=>!t.has(n)&&r.indexOf(n)===o)},x=((e,t,i=[],s,n)=>{const o=d.defineComponent((r,{attrs:u,slots:f,emit:q})=>{var I;r[s];const k=d.ref(),A=new Set(w(u.class)),v=d.getCurrentInstance(),_=((I=v==null?void 0:v.appContext)==null?void 0:I.provides[R])?d.inject(R):void 0,F=g=>{const{routerLink:C}=r;if(C!==m)if(_!==void 0){let l={event:g};for(const h in r){const a=r[h];r.hasOwnProperty(h)&&h.startsWith(L)&&a!==m&&(l[h]=a)}_.navigate(l)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{r[s],w(u.class).forEach(a=>{A.add(a)});const g=r.onClick,C=a=>{g!==void 0&&g(a),a.defaultPrevented||F(a)};let l={ref:k,class:G(k,A),onClick:C};for(const a in r){const S=r[a];(r.hasOwnProperty(a)&&S!==m||a.startsWith(z))&&(l[a]=S)}return d.h(e,l,f.default&&f.default())}});return typeof o!="function"&&(o.name=e,o.props={[M]:V},i.forEach(r=>{o.props[r]=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","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 P(e,t){t!=null&&t.appContext&&(e.appContext=t.appContext)}const y=(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 o=t._vnode;if(o){P(o,s);for(const f in i)o.component.props[f]=i[f]}else o=d.createVNode(e,i),P(o,s),d.render(o,t);return{vueInstance:o,destroy:()=>d.render(null,t),el:t}},D=(e,t)=>{const i=d.getCurrentInstance();return(s,n,o)=>{const r=t?{...t,...n}:n;r.addition=o;let u=null;return s("span",{key:`${n.prop}-${n.rowIndex||0}`,ref:f=>{u=y(e,f,r,i,u)}})}};class N{constructor(t,i,s,n,o){this.VueEditorConstructor=t,this.column=i,this.save=s,this.close=n,this.vInstance=o,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=y(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 E=(O=p.defineCustomElements)==null?void 0:O.call(p),T=d.defineAsyncComponent(async()=>(U(E)&&await E,x));c.VGrid=T,c.VGridVueEditor=j,c.VGridVueTemplate=D,c.VGridVueTemplateConstructor=y,c.default=T,Object.keys(b).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(c,e)&&Object.defineProperty(c,e,{enumerable:!0,get:()=>b[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.20",
|
|
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.20"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@stencil/core": "^4.19.2",
|