@guiexpert/vue3-table 3.1.109 → 3.1.113

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/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("@guiexpert/table"),d=require("vue"),b=d.defineComponent({props:{tableModel:{required:!0,type:Object},tableOptions:{required:!1,default:()=>new c.TableOptions,type:Object},debounceMouseClickDelay:{required:!1,type:Number,default:150},licenseKey:{default:"",required:!1},loading:{required:!1,type:Boolean,default:!1}},emits:["tableReady","mouseClicked","mouseDragging","checkboxChanged","contextmenu","modelChanged","focusChanged","selectionChanged","mouseDraggingEnd","mouseMoved","scroll","stateChanged","rowDragStart","rowDragMove","rowDragEnd","batchEditChanged","detailExpandedChanged","editingChanged","undoStackChanged"],setup(r,{emit:e}){const t=d.ref(null);let a,o,l=!1;const u=s=>{const i=r.debounceMouseClickDelay;if(!i||i<=0){e("mouseClicked",s);return}a&&clearTimeout(a),a=setTimeout(()=>{a=void 0,e("mouseClicked",s)},i)},g=()=>{a&&clearTimeout(a),a=void 0,o==null||o.destroy(),o=void 0};d.onBeforeUnmount(g);const h=s=>{g();const i={onSelectionChanged:n=>{e("selectionChanged",n)},onFocusChanged:n=>{e("focusChanged",n)},onCheckboxChanged:n=>{e("checkboxChanged",n)},onContextmenu:n=>{e("contextmenu",n)},onModelChanged:n=>{e("modelChanged",n)},onMouseClicked:n=>{u(n)},onMouseDragging:n=>{e("mouseDragging",n)},onMouseDraggingEnd:n=>{e("mouseDraggingEnd",n)},onMouseMoved:n=>{e("mouseMoved",n)},onScroll:n=>{e("scroll",n)},onStateChanged:n=>{e("stateChanged",n)},onRowDragStart:n=>{e("rowDragStart",n)},onRowDragMove:n=>{e("rowDragMove",n)},onRowDragEnd:n=>{e("rowDragEnd",n)},onBatchEditChanged:n=>{e("batchEditChanged",n)},onDetailExpandedChanged:n=>{e("detailExpandedChanged",n)},onEditingChanged:n=>{e("editingChanged",n)},onUndoStackChanged:n=>{e("undoStackChanged",n)}},p=new c.TableScope(s,r.tableModel,new c.SimpleDomService,r.tableOptions??new c.TableOptions,i);o=p,p.firstInit(),l=!1,C(),e("tableReady",p.getApi())},C=()=>{r.loading?(o==null||o.showLoadingOverlay(),l=!0):l&&(o==null||o.hideOverlay(),l=!1)};return d.onMounted(()=>{t.value&&h(t.value)}),d.watch([()=>r.tableModel,()=>r.tableOptions],()=>{t.value&&h(t.value)}),d.watch(()=>r.loading,C,{flush:"sync"}),d.watch(()=>r.licenseKey,s=>{s&&c.LicenseManager.getInstance().setLicenseKey(s)},{immediate:!0}),{root:t}}}),m=(r,e)=>{const t=r.__vccOpts||r;for(const[a,o]of e)t[a]=o;return t},v={ref:"root",class:"container-div",style:{width:"100%",height:"100%","background-color":"transparent",padding:"0",margin:"0"}};function w(r,e,t,a,o,l){return d.openBlock(),d.createElementBlock("div",v,null,512)}const f=m(b,[["render",w]]);class x{constructor(e,t){this.component=e,this.appContext=t}render(e,t,a,o,l,u,g){return this.mount(this.component,{cellDiv:e,rowIndex:t,columnIndex:a,areaIdent:o,areaModel:l,cellValue:u},this.appContext,e)}mount(e,t,a,o){let l=d.createVNode(e,t);return l.appContext=a,d.render(l,o),()=>{o&&d.render(null,o)}}}class y{constructor(e,t=null){this.component=e,this.appContext=t}render(e,t,a){const o=d.createVNode(this.component,{row:t,rowIndex:a.rowIndex,tableApi:a.tableApi,context:a});return o.appContext=this.appContext,d.render(o,e),()=>d.render(null,e)}}const M={install:(r,e={img:""})=>{r.component("GuiexpertTable",f)}};exports.ComponentRendererWrapper=x;exports.DetailComponentRendererWrapper=y;exports.GuiexpertTable=f;exports.default=M;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("@guiexpert/table"),d=require("vue"),m=d.defineComponent({props:{tableModel:{required:!0,type:Object},tableOptions:{required:!1,default:()=>new u.TableOptions,type:Object},debounceMouseClickDelay:{required:!1,type:Number,default:150},licenseKey:{default:"",required:!1},loading:{required:!1,type:Boolean,default:!1}},emits:["tableReady","mouseClicked","mouseDragging","checkboxChanged","contextmenu","modelChanged","focusChanged","selectionChanged","mouseDraggingEnd","mouseMoved","scroll","stateChanged","rowDragStart","rowDragMove","rowDragEnd","batchEditChanged","detailExpandedChanged","editingChanged","undoStackChanged","columnResizeStart","columnResizeEnd","columnMoveStart","columnMoveEnd"],setup(r,{emit:n}){const t=d.ref(null);let a,o,l=!1;const i=s=>{const c=r.debounceMouseClickDelay;if(!c||c<=0){n("mouseClicked",s);return}a&&clearTimeout(a),a=setTimeout(()=>{a=void 0,n("mouseClicked",s)},c)},g=()=>{a&&clearTimeout(a),a=void 0,o==null||o.destroy(),o=void 0};d.onBeforeUnmount(g);const h=s=>{g();const c={onSelectionChanged:e=>{n("selectionChanged",e)},onFocusChanged:e=>{n("focusChanged",e)},onCheckboxChanged:e=>{n("checkboxChanged",e)},onContextmenu:e=>{n("contextmenu",e)},onModelChanged:e=>{n("modelChanged",e)},onMouseClicked:e=>{i(e)},onMouseDragging:e=>{n("mouseDragging",e)},onMouseDraggingEnd:e=>{n("mouseDraggingEnd",e)},onMouseMoved:e=>{n("mouseMoved",e)},onScroll:e=>{n("scroll",e)},onStateChanged:e=>{n("stateChanged",e)},onRowDragStart:e=>{n("rowDragStart",e)},onRowDragMove:e=>{n("rowDragMove",e)},onRowDragEnd:e=>{n("rowDragEnd",e)},onBatchEditChanged:e=>{n("batchEditChanged",e)},onDetailExpandedChanged:e=>{n("detailExpandedChanged",e)},onEditingChanged:e=>{n("editingChanged",e)},onUndoStackChanged:e=>{n("undoStackChanged",e)},onColumnResizeStart:e=>{n("columnResizeStart",e)},onColumnResizeEnd:e=>{n("columnResizeEnd",e)},onColumnMoveStart:e=>{n("columnMoveStart",e)},onColumnMoveEnd:e=>{n("columnMoveEnd",e)}},p=new u.TableScope(s,r.tableModel,new u.SimpleDomService,r.tableOptions??new u.TableOptions,c);o=p,p.firstInit(),l=!1,C(),n("tableReady",p.getApi())},C=()=>{r.loading?(o==null||o.showLoadingOverlay(),l=!0):l&&(o==null||o.hideOverlay(),l=!1)};return d.onMounted(()=>{t.value&&h(t.value)}),d.watch([()=>r.tableModel,()=>r.tableOptions],()=>{t.value&&h(t.value)}),d.watch(()=>r.loading,C,{flush:"sync"}),d.watch(()=>r.licenseKey,s=>{s&&u.LicenseManager.getInstance().setLicenseKey(s)},{immediate:!0}),{root:t}}}),b=(r,n)=>{const t=r.__vccOpts||r;for(const[a,o]of n)t[a]=o;return t},v={ref:"root",class:"container-div",style:{width:"100%",height:"100%","background-color":"transparent",padding:"0",margin:"0"}};function M(r,n,t,a,o,l){return d.openBlock(),d.createElementBlock("div",v,null,512)}const f=b(m,[["render",M]]);class w{constructor(n,t){this.component=n,this.appContext=t}render(n,t,a,o,l,i,g){return this.mount(this.component,{cellDiv:n,rowIndex:t,columnIndex:a,areaIdent:o,areaModel:l,cellValue:i},this.appContext,n)}mount(n,t,a,o){let l=d.createVNode(n,t);return l.appContext=a,d.render(l,o),()=>{o&&d.render(null,o)}}}class x{constructor(n,t=null){this.component=n,this.appContext=t}render(n,t,a){const o=d.createVNode(this.component,{row:t,rowIndex:a.rowIndex,tableApi:a.tableApi,context:a});return o.appContext=this.appContext,d.render(o,n),()=>d.render(null,n)}}const y={install:(r,n={img:""})=>{r.component("GuiexpertTable",f)}};exports.ComponentRendererWrapper=w;exports.DetailComponentRendererWrapper=x;exports.GuiexpertTable=f;exports.default=y;
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { TableOptions as f, LicenseManager as b, TableScope as x, SimpleDomService as y } from "@guiexpert/table";
2
- import { defineComponent as v, ref as w, onBeforeUnmount as M, onMounted as k, watch as p, openBlock as D, createElementBlock as E, createVNode as m, render as c } from "vue";
3
- const _ = v({
1
+ import { TableOptions as f, LicenseManager as v, TableScope as M, SimpleDomService as b } from "@guiexpert/table";
2
+ import { defineComponent as x, ref as y, onBeforeUnmount as E, onMounted as w, watch as C, openBlock as k, createElementBlock as D, createVNode as m, render as u } from "vue";
3
+ const S = x({
4
4
  // class, style and other attributes go to the root div (before: inheritAttrs: false dropped them)
5
5
  props: {
6
6
  tableModel: {
@@ -60,160 +60,177 @@ const _ = v({
60
60
  // since 1.1.97 (master/detail)
61
61
  "editingChanged",
62
62
  // since 1.1.99 (Excel-style editing)
63
- "undoStackChanged"
63
+ "undoStackChanged",
64
64
  // since 1.1.99 (undo and redo)
65
+ "columnResizeStart",
66
+ // since 1.1.110 (column drag)
67
+ "columnResizeEnd",
68
+ "columnMoveStart",
69
+ "columnMoveEnd"
65
70
  ],
66
- setup(d, { emit: e }) {
67
- const t = w(null);
71
+ setup(d, { emit: n }) {
72
+ const t = y(null);
68
73
  let a, o, r = !1;
69
- const i = (l) => {
74
+ const c = (l) => {
70
75
  const s = d.debounceMouseClickDelay;
71
76
  if (!s || s <= 0) {
72
- e("mouseClicked", l);
77
+ n("mouseClicked", l);
73
78
  return;
74
79
  }
75
80
  a && clearTimeout(a), a = setTimeout(() => {
76
- a = void 0, e("mouseClicked", l);
81
+ a = void 0, n("mouseClicked", l);
77
82
  }, s);
78
- }, u = () => {
83
+ }, i = () => {
79
84
  a && clearTimeout(a), a = void 0, o == null || o.destroy(), o = void 0;
80
85
  };
81
- M(u);
86
+ E(i);
82
87
  const g = (l) => {
83
- u();
88
+ i();
84
89
  const s = {
85
- onSelectionChanged: (n) => {
86
- e("selectionChanged", n);
90
+ onSelectionChanged: (e) => {
91
+ n("selectionChanged", e);
87
92
  },
88
- onFocusChanged: (n) => {
89
- e("focusChanged", n);
93
+ onFocusChanged: (e) => {
94
+ n("focusChanged", e);
90
95
  },
91
- onCheckboxChanged: (n) => {
92
- e("checkboxChanged", n);
96
+ onCheckboxChanged: (e) => {
97
+ n("checkboxChanged", e);
93
98
  },
94
- onContextmenu: (n) => {
95
- e("contextmenu", n);
99
+ onContextmenu: (e) => {
100
+ n("contextmenu", e);
96
101
  },
97
- onModelChanged: (n) => {
98
- e("modelChanged", n);
102
+ onModelChanged: (e) => {
103
+ n("modelChanged", e);
99
104
  },
100
- onMouseClicked: (n) => {
101
- i(n);
105
+ onMouseClicked: (e) => {
106
+ c(e);
102
107
  },
103
- onMouseDragging: (n) => {
104
- e("mouseDragging", n);
108
+ onMouseDragging: (e) => {
109
+ n("mouseDragging", e);
105
110
  },
106
- onMouseDraggingEnd: (n) => {
107
- e("mouseDraggingEnd", n);
111
+ onMouseDraggingEnd: (e) => {
112
+ n("mouseDraggingEnd", e);
108
113
  },
109
- onMouseMoved: (n) => {
110
- e("mouseMoved", n);
114
+ onMouseMoved: (e) => {
115
+ n("mouseMoved", e);
111
116
  },
112
- onScroll: (n) => {
113
- e("scroll", n);
117
+ onScroll: (e) => {
118
+ n("scroll", e);
114
119
  },
115
- onStateChanged: (n) => {
116
- e("stateChanged", n);
120
+ onStateChanged: (e) => {
121
+ n("stateChanged", e);
117
122
  },
118
- onRowDragStart: (n) => {
119
- e("rowDragStart", n);
123
+ onRowDragStart: (e) => {
124
+ n("rowDragStart", e);
120
125
  },
121
- onRowDragMove: (n) => {
122
- e("rowDragMove", n);
126
+ onRowDragMove: (e) => {
127
+ n("rowDragMove", e);
123
128
  },
124
- onRowDragEnd: (n) => {
125
- e("rowDragEnd", n);
129
+ onRowDragEnd: (e) => {
130
+ n("rowDragEnd", e);
126
131
  },
127
- onBatchEditChanged: (n) => {
128
- e("batchEditChanged", n);
132
+ onBatchEditChanged: (e) => {
133
+ n("batchEditChanged", e);
129
134
  },
130
- onDetailExpandedChanged: (n) => {
131
- e("detailExpandedChanged", n);
135
+ onDetailExpandedChanged: (e) => {
136
+ n("detailExpandedChanged", e);
132
137
  },
133
- onEditingChanged: (n) => {
134
- e("editingChanged", n);
138
+ onEditingChanged: (e) => {
139
+ n("editingChanged", e);
135
140
  },
136
- onUndoStackChanged: (n) => {
137
- e("undoStackChanged", n);
141
+ onUndoStackChanged: (e) => {
142
+ n("undoStackChanged", e);
143
+ },
144
+ onColumnResizeStart: (e) => {
145
+ n("columnResizeStart", e);
146
+ },
147
+ onColumnResizeEnd: (e) => {
148
+ n("columnResizeEnd", e);
149
+ },
150
+ onColumnMoveStart: (e) => {
151
+ n("columnMoveStart", e);
152
+ },
153
+ onColumnMoveEnd: (e) => {
154
+ n("columnMoveEnd", e);
138
155
  }
139
- }, h = new x(
156
+ }, h = new M(
140
157
  l,
141
158
  d.tableModel,
142
- new y(),
159
+ new b(),
143
160
  d.tableOptions ?? new f(),
144
161
  s
145
162
  );
146
- o = h, h.firstInit(), r = !1, C(), e("tableReady", h.getApi());
147
- }, C = () => {
163
+ o = h, h.firstInit(), r = !1, p(), n("tableReady", h.getApi());
164
+ }, p = () => {
148
165
  d.loading ? (o == null || o.showLoadingOverlay(), r = !0) : r && (o == null || o.hideOverlay(), r = !1);
149
166
  };
150
- return k(() => {
167
+ return w(() => {
151
168
  t.value && g(t.value);
152
- }), p([() => d.tableModel, () => d.tableOptions], () => {
169
+ }), C([() => d.tableModel, () => d.tableOptions], () => {
153
170
  t.value && g(t.value);
154
- }), p(() => d.loading, C, { flush: "sync" }), p(() => d.licenseKey, (l) => {
155
- l && b.getInstance().setLicenseKey(l);
171
+ }), C(() => d.loading, p, { flush: "sync" }), C(() => d.licenseKey, (l) => {
172
+ l && v.getInstance().setLicenseKey(l);
156
173
  }, { immediate: !0 }), {
157
174
  root: t
158
175
  };
159
176
  }
160
- }), T = (d, e) => {
177
+ }), _ = (d, n) => {
161
178
  const t = d.__vccOpts || d;
162
- for (const [a, o] of e)
179
+ for (const [a, o] of n)
163
180
  t[a] = o;
164
181
  return t;
165
- }, O = {
182
+ }, R = {
166
183
  ref: "root",
167
184
  class: "container-div",
168
185
  style: { width: "100%", height: "100%", "background-color": "transparent", padding: "0", margin: "0" }
169
186
  };
170
- function S(d, e, t, a, o, r) {
171
- return D(), E("div", O, null, 512);
187
+ function T(d, n, t, a, o, r) {
188
+ return k(), D("div", R, null, 512);
172
189
  }
173
- const R = /* @__PURE__ */ T(_, [["render", S]]);
174
- class F {
175
- constructor(e, t) {
176
- this.component = e, this.appContext = t;
190
+ const O = /* @__PURE__ */ _(S, [["render", T]]);
191
+ class q {
192
+ constructor(n, t) {
193
+ this.component = n, this.appContext = t;
177
194
  }
178
- render(e, t, a, o, r, i, u) {
195
+ render(n, t, a, o, r, c, i) {
179
196
  return this.mount(
180
197
  this.component,
181
198
  {
182
- cellDiv: e,
199
+ cellDiv: n,
183
200
  rowIndex: t,
184
201
  columnIndex: a,
185
202
  areaIdent: o,
186
203
  areaModel: r,
187
- cellValue: i
204
+ cellValue: c
188
205
  },
189
206
  this.appContext,
190
- e
207
+ n
191
208
  );
192
209
  }
193
- mount(e, t, a, o) {
194
- let r = m(e, t);
195
- return r.appContext = a, c(r, o), () => {
196
- o && c(null, o);
210
+ mount(n, t, a, o) {
211
+ let r = m(n, t);
212
+ return r.appContext = a, u(r, o), () => {
213
+ o && u(null, o);
197
214
  };
198
215
  }
199
216
  }
200
- class I {
201
- constructor(e, t = null) {
202
- this.component = e, this.appContext = t;
217
+ class F {
218
+ constructor(n, t = null) {
219
+ this.component = n, this.appContext = t;
203
220
  }
204
- render(e, t, a) {
221
+ render(n, t, a) {
205
222
  const o = m(this.component, { row: t, rowIndex: a.rowIndex, tableApi: a.tableApi, context: a });
206
- return o.appContext = this.appContext, c(o, e), () => c(null, e);
223
+ return o.appContext = this.appContext, u(o, n), () => u(null, n);
207
224
  }
208
225
  }
209
- const L = {
210
- install: (d, e = { img: "" }) => {
211
- d.component("GuiexpertTable", R);
226
+ const I = {
227
+ install: (d, n = { img: "" }) => {
228
+ d.component("GuiexpertTable", O);
212
229
  }
213
230
  };
214
231
  export {
215
- F as ComponentRendererWrapper,
216
- I as DetailComponentRendererWrapper,
217
- R as GuiexpertTable,
218
- L as default
232
+ q as ComponentRendererWrapper,
233
+ F as DetailComponentRendererWrapper,
234
+ O as GuiexpertTable,
235
+ I as default
219
236
  };
@@ -41,7 +41,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
41
41
  };
42
42
  }>, {
43
43
  root: import('vue').Ref<null, null>;
44
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("tableReady" | "mouseClicked" | "mouseDragging" | "checkboxChanged" | "contextmenu" | "modelChanged" | "focusChanged" | "selectionChanged" | "mouseDraggingEnd" | "mouseMoved" | "scroll" | "stateChanged" | "rowDragStart" | "rowDragMove" | "rowDragEnd" | "batchEditChanged" | "detailExpandedChanged" | "editingChanged" | "undoStackChanged")[], "tableReady" | "mouseClicked" | "mouseDragging" | "checkboxChanged" | "contextmenu" | "modelChanged" | "focusChanged" | "selectionChanged" | "mouseDraggingEnd" | "mouseMoved" | "scroll" | "stateChanged" | "rowDragStart" | "rowDragMove" | "rowDragEnd" | "batchEditChanged" | "detailExpandedChanged" | "editingChanged" | "undoStackChanged", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
44
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("tableReady" | "mouseClicked" | "mouseDragging" | "checkboxChanged" | "contextmenu" | "modelChanged" | "focusChanged" | "selectionChanged" | "mouseDraggingEnd" | "mouseMoved" | "scroll" | "stateChanged" | "rowDragStart" | "rowDragMove" | "rowDragEnd" | "batchEditChanged" | "detailExpandedChanged" | "editingChanged" | "undoStackChanged" | "columnResizeStart" | "columnResizeEnd" | "columnMoveStart" | "columnMoveEnd")[], "tableReady" | "mouseClicked" | "mouseDragging" | "checkboxChanged" | "contextmenu" | "modelChanged" | "focusChanged" | "selectionChanged" | "mouseDraggingEnd" | "mouseMoved" | "scroll" | "stateChanged" | "rowDragStart" | "rowDragMove" | "rowDragEnd" | "batchEditChanged" | "detailExpandedChanged" | "editingChanged" | "undoStackChanged" | "columnResizeStart" | "columnResizeEnd" | "columnMoveStart" | "columnMoveEnd", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
45
45
  tableModel: {
46
46
  required: true;
47
47
  type: PropType<TableModelIf>;
@@ -93,6 +93,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
93
93
  onDetailExpandedChanged?: ((...args: any[]) => any) | undefined;
94
94
  onEditingChanged?: ((...args: any[]) => any) | undefined;
95
95
  onUndoStackChanged?: ((...args: any[]) => any) | undefined;
96
+ onColumnResizeStart?: ((...args: any[]) => any) | undefined;
97
+ onColumnResizeEnd?: ((...args: any[]) => any) | undefined;
98
+ onColumnMoveStart?: ((...args: any[]) => any) | undefined;
99
+ onColumnMoveEnd?: ((...args: any[]) => any) | undefined;
96
100
  }>, {
97
101
  tableOptions: TableOptionsIf;
98
102
  debounceMouseClickDelay: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guiexpert/vue3-table",
3
- "version": "3.1.109",
3
+ "version": "3.1.113",
4
4
  "license": "MIT",
5
5
  "author": "Dr. Marc Kronberg <info@gui.expert> (https://gui.expert)",
6
6
  "repository": {
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "tslib": "^2.3.0",
34
- "@guiexpert/table": "^1.1.109"
34
+ "@guiexpert/table": "^1.1.113"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "vue": "^3.0.0"