tabulator-tables 5.1.7 → 5.1.8

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.
@@ -1,4 +1,4 @@
1
- /* Tabulator v5.1.7 (c) Oliver Folkerd 2022 */
1
+ /* Tabulator v5.1.8 (c) Oliver Folkerd 2022 */
2
2
  class CoreFeature{
3
3
 
4
4
  constructor(table){
@@ -7342,6 +7342,7 @@ class Edit extends Module{
7342
7342
  cell.column.definition.cellEditing.call(this.table, component);
7343
7343
  }
7344
7344
 
7345
+ this.dispatch("cell-editing", cell);
7345
7346
  this.dispatchExternal("cellEditing", component);
7346
7347
 
7347
7348
  params = typeof cell.column.modules.edit.params === "function" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params;
@@ -9236,14 +9237,12 @@ function datetime(cell, formatterParams, onRendered){
9236
9237
  var newDatetime = inputFormat === "iso" ? DT.fromISO(String(value)) : DT.fromFormat(String(value), inputFormat);
9237
9238
 
9238
9239
  if(newDatetime.isValid){
9239
-
9240
9240
  if(formatterParams.timezone){
9241
- newDatetime = newDatetime.shiftTimezone(formatterParams.timezone);
9241
+ newDatetime = newDatetime.setZone(formatterParams.timezone);
9242
9242
  }
9243
9243
 
9244
9244
  return newDatetime.toFormat(outputFormat);
9245
9245
  }else {
9246
-
9247
9246
  if(invalid === true || !value){
9248
9247
  return value;
9249
9248
  }else if(typeof invalid === "function"){
@@ -13125,6 +13124,7 @@ class Menu extends Module{
13125
13124
 
13126
13125
  setTimeout(() => {
13127
13126
  this.table.rowManager.element.addEventListener("scroll", this.blurEvent);
13127
+ this.subscribe("cell-editing", this.blurEvent);
13128
13128
  document.body.addEventListener("click", this.blurEvent);
13129
13129
  document.body.addEventListener("contextmenu", this.blurEvent);
13130
13130
  window.addEventListener("resize", this.blurEvent);
@@ -13178,6 +13178,7 @@ class Menu extends Module{
13178
13178
  document.body.removeEventListener("contextmenu", this.blurEvent);
13179
13179
  window.removeEventListener("resize", this.blurEvent);
13180
13180
  this.table.rowManager.element.removeEventListener("scroll", this.blurEvent);
13181
+ this.unsubscribe("cell-editing", this.blurEvent);
13181
13182
 
13182
13183
  if(this.currentComponent){
13183
13184
  this.dispatchExternal("menuClosed", this.currentComponent.getComponent());
@@ -22190,14 +22191,14 @@ class ComponentFunctionBinder{
22190
22191
  }
22191
22192
 
22192
22193
  if(this.bindings[type][funcName]){
22193
- console.warn("Unable to bind component handler, a matching function name is already bound", type, funcName, hanlder);
22194
+ console.warn("Unable to bind component handler, a matching function name is already bound", type, funcName, handler);
22194
22195
  }else {
22195
22196
  this.bindings[type][funcName] = handler;
22196
22197
  }
22197
22198
  }
22198
22199
 
22199
22200
  handle(type, component, name){
22200
- if(this.bindings[type] && this.bindings[type][name]){
22201
+ if(this.bindings[type] && this.bindings[type][name] && typeof this.bindings[type][name].bind === 'function'){
22201
22202
  return this.bindings[type][name].bind(null, component);
22202
22203
  }else {
22203
22204
  if(name !== "then" && typeof name === "string" && !name.startsWith("_")){