@revolist/revogrid 3.7.6 → 3.7.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.
@@ -3469,6 +3469,7 @@ const RevoGridComponent = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
3469
3469
  this.columnProvider = new ColumnDataProvider();
3470
3470
  this.dataProvider = new DataProvider(this.dimensionProvider);
3471
3471
  this.uuid = `${new Date().getTime()}-rvgrid`;
3472
+ this.selectionStoreConnector = new SelectionStoreConnector();
3472
3473
  const pluginData = {
3473
3474
  data: this.dataProvider,
3474
3475
  column: this.columnProvider,
@@ -3511,7 +3512,6 @@ const RevoGridComponent = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
3511
3512
  this.trimmedRowsChanged(this.trimmedRows);
3512
3513
  this.rowDefChanged(this.rowDefinitions);
3513
3514
  this.groupingChanged(this.grouping);
3514
- this.selectionStoreConnector = new SelectionStoreConnector();
3515
3515
  this.scrollingService = new GridScrollingService((e) => {
3516
3516
  this.dimensionProvider.setViewPortCoordinate({
3517
3517
  coordinate: e.coordinate,
@@ -474,6 +474,7 @@ const OverlaySelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
474
474
  this.focusCell = createEvent(this, "focusCell", 3);
475
475
  this.internalSelectionChanged = createEvent(this, "internalSelectionChanged", 7);
476
476
  this.internalRangeDataApply = createEvent(this, "internalRangeDataApply", 7);
477
+ this.beforeKeyDown = createEvent(this, "beforekeydown", 7);
477
478
  this.keyboardService = null;
478
479
  this.autoFillService = null;
479
480
  this.clipboardService = null;
@@ -511,7 +512,9 @@ const OverlaySelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
511
512
  /** Recived keyboard down from element */
512
513
  onKeyDown(e) {
513
514
  var _a;
514
- if (e.defaultPrevented) {
515
+ // Emit before key down event and check if default prevention is set.
516
+ const proxy = this.beforeKeyDown.emit(Object.assign(Object.assign({}, e), this.getData()));
517
+ if (e.defaultPrevented || proxy.defaultPrevented) {
515
518
  return;
516
519
  }
517
520
  (_a = this.keyboardService) === null || _a === void 0 ? void 0 : _a.keyDown(e, this.range);
@@ -713,6 +716,9 @@ const OverlaySelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
713
716
  rows: this.dimensionRow.state,
714
717
  cols: this.dimensionCol.state,
715
718
  lastCell: this.lastCell,
719
+ focus: this.selectionStore.get('focus'),
720
+ range: this.selectionStore.get('range'),
721
+ edit: this.selectionStore.get('edit'),
716
722
  };
717
723
  }
718
724
  get element() { return this; }
@@ -25437,6 +25437,7 @@ const RevoGridComponent = class {
25437
25437
  this.columnProvider = new ColumnDataProvider();
25438
25438
  this.dataProvider = new DataProvider(this.dimensionProvider);
25439
25439
  this.uuid = `${new Date().getTime()}-rvgrid`;
25440
+ this.selectionStoreConnector = new SelectionStoreConnector();
25440
25441
  const pluginData = {
25441
25442
  data: this.dataProvider,
25442
25443
  column: this.columnProvider,
@@ -25479,7 +25480,6 @@ const RevoGridComponent = class {
25479
25480
  this.trimmedRowsChanged(this.trimmedRows);
25480
25481
  this.rowDefChanged(this.rowDefinitions);
25481
25482
  this.groupingChanged(this.grouping);
25482
- this.selectionStoreConnector = new SelectionStoreConnector();
25483
25483
  this.scrollingService = new GridScrollingService((e) => {
25484
25484
  this.dimensionProvider.setViewPortCoordinate({
25485
25485
  coordinate: e.coordinate,
@@ -27566,6 +27566,7 @@ const OverlaySelection = class {
27566
27566
  this.focusCell = index.createEvent(this, "focusCell", 3);
27567
27567
  this.internalSelectionChanged = index.createEvent(this, "internalSelectionChanged", 7);
27568
27568
  this.internalRangeDataApply = index.createEvent(this, "internalRangeDataApply", 7);
27569
+ this.beforeKeyDown = index.createEvent(this, "beforekeydown", 7);
27569
27570
  this.keyboardService = null;
27570
27571
  this.autoFillService = null;
27571
27572
  this.clipboardService = null;
@@ -27603,7 +27604,9 @@ const OverlaySelection = class {
27603
27604
  /** Recived keyboard down from element */
27604
27605
  onKeyDown(e) {
27605
27606
  var _a;
27606
- if (e.defaultPrevented) {
27607
+ // Emit before key down event and check if default prevention is set.
27608
+ const proxy = this.beforeKeyDown.emit(Object.assign(Object.assign({}, e), this.getData()));
27609
+ if (e.defaultPrevented || proxy.defaultPrevented) {
27607
27610
  return;
27608
27611
  }
27609
27612
  (_a = this.keyboardService) === null || _a === void 0 ? void 0 : _a.keyDown(e, this.range);
@@ -27805,6 +27808,9 @@ const OverlaySelection = class {
27805
27808
  rows: this.dimensionRow.state,
27806
27809
  cols: this.dimensionCol.state,
27807
27810
  lastCell: this.lastCell,
27811
+ focus: this.selectionStore.get('focus'),
27812
+ range: this.selectionStore.get('range'),
27813
+ edit: this.selectionStore.get('edit'),
27808
27814
  };
27809
27815
  }
27810
27816
  get element() { return index.getElement(this); }
@@ -51,7 +51,9 @@ export class OverlaySelection {
51
51
  /** Recived keyboard down from element */
52
52
  onKeyDown(e) {
53
53
  var _a;
54
- if (e.defaultPrevented) {
54
+ // Emit before key down event and check if default prevention is set.
55
+ const proxy = this.beforeKeyDown.emit(Object.assign(Object.assign({}, e), this.getData()));
56
+ if (e.defaultPrevented || proxy.defaultPrevented) {
55
57
  return;
56
58
  }
57
59
  (_a = this.keyboardService) === null || _a === void 0 ? void 0 : _a.keyDown(e, this.range);
@@ -255,6 +257,9 @@ export class OverlaySelection {
255
257
  rows: this.dimensionRow.state,
256
258
  cols: this.dimensionCol.state,
257
259
  lastCell: this.lastCell,
260
+ focus: this.selectionStore.get('focus'),
261
+ range: this.selectionStore.get('range'),
262
+ edit: this.selectionStore.get('edit'),
258
263
  };
259
264
  }
260
265
  static get is() { return "revogr-overlay-selection"; }
@@ -727,6 +732,21 @@ export class OverlaySelection {
727
732
  }
728
733
  }
729
734
  }
735
+ }, {
736
+ "method": "beforeKeyDown",
737
+ "name": "beforekeydown",
738
+ "bubbles": true,
739
+ "cancelable": true,
740
+ "composed": true,
741
+ "docs": {
742
+ "tags": [],
743
+ "text": "Before key up event proxy, used to prevent key up trigger.\nIf you have some custom behaviour event, use this event to check if it wasn't processed by internal logic.\nCall preventDefault()."
744
+ },
745
+ "complexType": {
746
+ "original": "any",
747
+ "resolved": "any",
748
+ "references": {}
749
+ }
730
750
  }]; }
731
751
  static get elementRef() { return "element"; }
732
752
  static get watchers() { return [{
@@ -494,6 +494,7 @@ export class RevoGridComponent {
494
494
  this.columnProvider = new ColumnDataProvider();
495
495
  this.dataProvider = new DataProvider(this.dimensionProvider);
496
496
  this.uuid = `${new Date().getTime()}-rvgrid`;
497
+ this.selectionStoreConnector = new SelectionStoreConnector();
497
498
  const pluginData = {
498
499
  data: this.dataProvider,
499
500
  column: this.columnProvider,
@@ -536,7 +537,6 @@ export class RevoGridComponent {
536
537
  this.trimmedRowsChanged(this.trimmedRows);
537
538
  this.rowDefChanged(this.rowDefinitions);
538
539
  this.groupingChanged(this.grouping);
539
- this.selectionStoreConnector = new SelectionStoreConnector();
540
540
  this.scrollingService = new GridScrollingService((e) => {
541
541
  this.dimensionProvider.setViewPortCoordinate({
542
542
  coordinate: e.coordinate,
@@ -25433,6 +25433,7 @@ const RevoGridComponent = class {
25433
25433
  this.columnProvider = new ColumnDataProvider();
25434
25434
  this.dataProvider = new DataProvider(this.dimensionProvider);
25435
25435
  this.uuid = `${new Date().getTime()}-rvgrid`;
25436
+ this.selectionStoreConnector = new SelectionStoreConnector();
25436
25437
  const pluginData = {
25437
25438
  data: this.dataProvider,
25438
25439
  column: this.columnProvider,
@@ -25475,7 +25476,6 @@ const RevoGridComponent = class {
25475
25476
  this.trimmedRowsChanged(this.trimmedRows);
25476
25477
  this.rowDefChanged(this.rowDefinitions);
25477
25478
  this.groupingChanged(this.grouping);
25478
- this.selectionStoreConnector = new SelectionStoreConnector();
25479
25479
  this.scrollingService = new GridScrollingService((e) => {
25480
25480
  this.dimensionProvider.setViewPortCoordinate({
25481
25481
  coordinate: e.coordinate,
@@ -27562,6 +27562,7 @@ const OverlaySelection = class {
27562
27562
  this.focusCell = createEvent(this, "focusCell", 3);
27563
27563
  this.internalSelectionChanged = createEvent(this, "internalSelectionChanged", 7);
27564
27564
  this.internalRangeDataApply = createEvent(this, "internalRangeDataApply", 7);
27565
+ this.beforeKeyDown = createEvent(this, "beforekeydown", 7);
27565
27566
  this.keyboardService = null;
27566
27567
  this.autoFillService = null;
27567
27568
  this.clipboardService = null;
@@ -27599,7 +27600,9 @@ const OverlaySelection = class {
27599
27600
  /** Recived keyboard down from element */
27600
27601
  onKeyDown(e) {
27601
27602
  var _a;
27602
- if (e.defaultPrevented) {
27603
+ // Emit before key down event and check if default prevention is set.
27604
+ const proxy = this.beforeKeyDown.emit(Object.assign(Object.assign({}, e), this.getData()));
27605
+ if (e.defaultPrevented || proxy.defaultPrevented) {
27603
27606
  return;
27604
27607
  }
27605
27608
  (_a = this.keyboardService) === null || _a === void 0 ? void 0 : _a.keyDown(e, this.range);
@@ -27801,6 +27804,9 @@ const OverlaySelection = class {
27801
27804
  rows: this.dimensionRow.state,
27802
27805
  cols: this.dimensionCol.state,
27803
27806
  lastCell: this.lastCell,
27807
+ focus: this.selectionStore.get('focus'),
27808
+ range: this.selectionStore.get('range'),
27809
+ edit: this.selectionStore.get('edit'),
27804
27810
  };
27805
27811
  }
27806
27812
  get element() { return getElement(this); }