@guiexpert/vue3-table 3.1.114 → 3.1.116

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 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","filterChanged"],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)},onFilterChanged:e=>{n("filterChanged",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;
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","filterChanged","cellActivated"],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)},onFilterChanged:e=>{n("filterChanged",e)},onCellActivated:e=>{n("cellActivated",e)}},C=new u.TableScope(s,r.tableModel,new u.SimpleDomService,r.tableOptions??new u.TableOptions,c);o=C,C.firstInit(),l=!1,p(),n("tableReady",C.getApi())},p=()=>{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,p,{flush:"sync"}),d.watch(()=>r.licenseKey,s=>{s&&u.LicenseManager.getInstance().setLicenseKey(s)},{immediate:!0}),{root:t}}}),v=(r,n)=>{const t=r.__vccOpts||r;for(const[a,o]of n)t[a]=o;return t},b={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",b,null,512)}const f=v(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
@@ -67,8 +67,10 @@ const S = x({
67
67
  "columnResizeEnd",
68
68
  "columnMoveStart",
69
69
  "columnMoveEnd",
70
- "filterChanged"
70
+ "filterChanged",
71
71
  // since 1.1.114 (column filters)
72
+ "cellActivated"
73
+ // since 1.1.115 (Enter or double click opens a cell)
72
74
  ],
73
75
  setup(d, { emit: n }) {
74
76
  const t = y(null);
@@ -157,6 +159,9 @@ const S = x({
157
159
  },
158
160
  onFilterChanged: (e) => {
159
161
  n("filterChanged", e);
162
+ },
163
+ onCellActivated: (e) => {
164
+ n("cellActivated", e);
160
165
  }
161
166
  }, h = new M(
162
167
  l,
@@ -193,7 +198,7 @@ function T(d, n, t, a, o, r) {
193
198
  return k(), D("div", R, null, 512);
194
199
  }
195
200
  const O = /* @__PURE__ */ _(S, [["render", T]]);
196
- class F {
201
+ class B {
197
202
  constructor(n, t) {
198
203
  this.component = n, this.appContext = t;
199
204
  }
@@ -219,7 +224,7 @@ class F {
219
224
  };
220
225
  }
221
226
  }
222
- class q {
227
+ class F {
223
228
  constructor(n, t = null) {
224
229
  this.component = n, this.appContext = t;
225
230
  }
@@ -228,14 +233,14 @@ class q {
228
233
  return o.appContext = this.appContext, i(o, n), () => i(null, n);
229
234
  }
230
235
  }
231
- const I = {
236
+ const q = {
232
237
  install: (d, n = { img: "" }) => {
233
238
  d.component("GuiexpertTable", O);
234
239
  }
235
240
  };
236
241
  export {
237
- F as ComponentRendererWrapper,
238
- q as DetailComponentRendererWrapper,
242
+ B as ComponentRendererWrapper,
243
+ F as DetailComponentRendererWrapper,
239
244
  O as GuiexpertTable,
240
- I as default
245
+ q as default
241
246
  };
@@ -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" | "columnResizeStart" | "columnResizeEnd" | "columnMoveStart" | "columnMoveEnd" | "filterChanged")[], "tableReady" | "mouseClicked" | "mouseDragging" | "checkboxChanged" | "contextmenu" | "modelChanged" | "focusChanged" | "selectionChanged" | "mouseDraggingEnd" | "mouseMoved" | "scroll" | "stateChanged" | "rowDragStart" | "rowDragMove" | "rowDragEnd" | "batchEditChanged" | "detailExpandedChanged" | "editingChanged" | "undoStackChanged" | "columnResizeStart" | "columnResizeEnd" | "columnMoveStart" | "columnMoveEnd" | "filterChanged", 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" | "filterChanged" | "cellActivated")[], "tableReady" | "mouseClicked" | "mouseDragging" | "checkboxChanged" | "contextmenu" | "modelChanged" | "focusChanged" | "selectionChanged" | "mouseDraggingEnd" | "mouseMoved" | "scroll" | "stateChanged" | "rowDragStart" | "rowDragMove" | "rowDragEnd" | "batchEditChanged" | "detailExpandedChanged" | "editingChanged" | "undoStackChanged" | "columnResizeStart" | "columnResizeEnd" | "columnMoveStart" | "columnMoveEnd" | "filterChanged" | "cellActivated", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
45
45
  tableModel: {
46
46
  required: true;
47
47
  type: PropType<TableModelIf>;
@@ -98,6 +98,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
98
98
  onColumnMoveStart?: ((...args: any[]) => any) | undefined;
99
99
  onColumnMoveEnd?: ((...args: any[]) => any) | undefined;
100
100
  onFilterChanged?: ((...args: any[]) => any) | undefined;
101
+ onCellActivated?: ((...args: any[]) => any) | undefined;
101
102
  }>, {
102
103
  tableOptions: TableOptionsIf;
103
104
  debounceMouseClickDelay: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guiexpert/vue3-table",
3
- "version": "3.1.114",
3
+ "version": "3.1.116",
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.114"
34
+ "@guiexpert/table": "^1.1.116"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "vue": "^3.0.0"