ag-grid-community 34.1.0 → 34.1.2

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.
@@ -15812,7 +15812,7 @@ class LargeTextCellEditor extends agAbstractCellEditor_1.AgAbstractCellEditor {
15812
15812
  }
15813
15813
  initialiseEditor(params) {
15814
15814
  const { eEditor } = this;
15815
- const { cellStartedEdit, eventKey, value, maxLength, cols, rows } = params;
15815
+ const { cellStartedEdit, eventKey, maxLength, cols, rows } = params;
15816
15816
  this.focusAfterAttached = cellStartedEdit;
15817
15817
  // disable initial tooltips added to the input field
15818
15818
  // let the validation handle tooltips.
@@ -15832,7 +15832,7 @@ class LargeTextCellEditor extends agAbstractCellEditor_1.AgAbstractCellEditor {
15832
15832
  startValue = eventKey;
15833
15833
  }
15834
15834
  else {
15835
- startValue = value.toString();
15835
+ startValue = this.getStartValue(params);
15836
15836
  if (eventKey !== keyCode_1.KeyCode.F2) {
15837
15837
  this.highlightAllOnFocus = true;
15838
15838
  }
@@ -15840,7 +15840,7 @@ class LargeTextCellEditor extends agAbstractCellEditor_1.AgAbstractCellEditor {
15840
15840
  }
15841
15841
  else {
15842
15842
  this.focusAfterAttached = false;
15843
- startValue = value.toString();
15843
+ startValue = this.getStartValue(params);
15844
15844
  }
15845
15845
  if (startValue != null) {
15846
15846
  eEditor.setValue(startValue, true);
@@ -15848,6 +15848,10 @@ class LargeTextCellEditor extends agAbstractCellEditor_1.AgAbstractCellEditor {
15848
15848
  this.addGuiEventListener('keydown', this.onKeyDown.bind(this));
15849
15849
  this.activateTabIndex();
15850
15850
  }
15851
+ getStartValue(params) {
15852
+ const { value } = params;
15853
+ return value?.toString() ?? value;
15854
+ }
15851
15855
  onKeyDown(event) {
15852
15856
  const key = event.key;
15853
15857
  if (key === keyCode_1.KeyCode.LEFT ||
@@ -16988,13 +16992,14 @@ const controllers_1 = __webpack_require__(1081);
16988
16992
  const editors_1 = __webpack_require__(78994);
16989
16993
  const refresh_1 = __webpack_require__(11539);
16990
16994
  // these are event sources for setDataValue that will not cause the editors to close
16991
- const KEEP_EDITOR_SOURCES = new Set(['undo', 'redo']);
16995
+ const KEEP_EDITOR_SOURCES = new Set(['undo', 'redo', 'paste', 'bulk']);
16992
16996
  // stop editing sources that we treat as UI-originated so we follow standard processing.
16993
16997
  const STOP_EDIT_SOURCE_TRANSFORM = {
16994
- paste: 'ui',
16995
- rangeSvc: 'ui',
16998
+ paste: 'api',
16999
+ rangeSvc: 'api',
16996
17000
  fillHandle: 'api',
16997
17001
  cellClear: 'api',
17002
+ bulk: 'api',
16998
17003
  };
16999
17004
  const STOP_EDIT_SOURCE_TRANSFORM_KEYS = new Set(Object.keys(STOP_EDIT_SOURCE_TRANSFORM));
17000
17005
  // These are sources that we treat as API-originated so we presume API behaviour.
@@ -17015,6 +17020,8 @@ class EditService extends beanStub_1.BeanStub {
17015
17020
  super(...arguments);
17016
17021
  this.beanName = 'editSvc';
17017
17022
  this.batch = false;
17023
+ this.stopping = false;
17024
+ this.committing = false;
17018
17025
  }
17019
17026
  postConstruct() {
17020
17027
  const { beans } = this;
@@ -17109,7 +17116,7 @@ class EditService extends beanStub_1.BeanStub {
17109
17116
  }
17110
17117
  /** @returns whether to prevent default on event */
17111
17118
  startEditing(position, params) {
17112
- const { startedEdit = true, event = null, source = 'ui', ignoreEventKey = false } = params;
17119
+ const { startedEdit = true, event = null, source = 'ui', ignoreEventKey = false, silent } = params;
17113
17120
  this.strategy ?? (this.strategy = this.createStrategy());
17114
17121
  if (!this.isCellEditable(position, 'api')) {
17115
17122
  return;
@@ -17132,7 +17139,14 @@ class EditService extends beanStub_1.BeanStub {
17132
17139
  if (res && this.isBatchEditing()) {
17133
17140
  this.dispatchBatchEvent('batchEditingStarted', new Map());
17134
17141
  }
17135
- this.strategy.start(position, event, source, ignoreEventKey);
17142
+ this.strategy.start({
17143
+ position,
17144
+ event,
17145
+ source,
17146
+ ignoreEventKey,
17147
+ startedEdit,
17148
+ silent,
17149
+ });
17136
17150
  return;
17137
17151
  }
17138
17152
  stopEditing(position, params) {
@@ -17144,9 +17158,11 @@ class EditService extends beanStub_1.BeanStub {
17144
17158
  this.bulkRefresh(position);
17145
17159
  return false;
17146
17160
  }
17147
- return this.stopEditing(position, { ...params, source: STOP_EDIT_SOURCE_TRANSFORM[source] });
17148
17161
  }
17149
- const isEditingOrBatchWithEdits = this.isEditing(position) || (this.isBatchEditing() && model.hasEdits(position, CHECK_SIBLING));
17162
+ const treatAsSource = this.committing ? STOP_EDIT_SOURCE_TRANSFORM[source] : source;
17163
+ const isEditingOrBatchWithEdits = this.committing ||
17164
+ this.isEditing(position) ||
17165
+ (this.isBatchEditing() && model.hasEdits(position, CHECK_SIBLING));
17150
17166
  if (!isEditingOrBatchWithEdits || !this.strategy) {
17151
17167
  return false;
17152
17168
  }
@@ -17156,12 +17172,12 @@ class EditService extends beanStub_1.BeanStub {
17156
17172
  }
17157
17173
  let edits = model.getEditMap(true);
17158
17174
  let res = false;
17159
- const willStop = !cancel && !!this.shouldStopEditing(position, event, source);
17160
- const willCancel = cancel && !!this.shouldCancelEditing(position, event, source);
17175
+ const willStop = !cancel && (!!this.shouldStopEditing(position, event, treatAsSource) || (this.committing && !this.batch));
17176
+ const willCancel = cancel && !!this.shouldCancelEditing(position, event, treatAsSource);
17161
17177
  if (willStop || willCancel) {
17162
17178
  (0, editors_1._syncFromEditors)(beans, true);
17163
17179
  const freshEdits = model.getEditMap();
17164
- this.processEdits(freshEdits, cancel);
17180
+ this.processEdits(freshEdits, cancel, source);
17165
17181
  this.strategy?.stop(cancel, event);
17166
17182
  this.bulkRefresh(undefined, edits);
17167
17183
  edits = freshEdits;
@@ -17232,7 +17248,7 @@ class EditService extends beanStub_1.BeanStub {
17232
17248
  this.beans.navigation?.navigateToNextCell(null, key, cellPosition, false);
17233
17249
  }
17234
17250
  }
17235
- processEdits(edits, cancel = false) {
17251
+ processEdits(edits, cancel = false, source) {
17236
17252
  const rowNodes = Array.from(edits.keys());
17237
17253
  const { beans } = this;
17238
17254
  const hasValidationErrors = this.model.getCellValidationModel().getCellValidationMap().size > 0 ||
@@ -17247,7 +17263,7 @@ class EditService extends beanStub_1.BeanStub {
17247
17263
  const valueChanged = (0, editors_1._sourceAndPendingDiffer)(editValue);
17248
17264
  const isCancelAfterEnd = cellCtrl?.comp?.getCellEditor()?.isCancelAfterEnd?.();
17249
17265
  if (!cancel && !isCancelAfterEnd && valueChanged && !hasValidationErrors) {
17250
- const success = this.setNodeDataValue(rowNode, column, editValue.pendingValue);
17266
+ const success = this.setNodeDataValue(rowNode, column, editValue.pendingValue, undefined, source);
17251
17267
  if (!success) {
17252
17268
  editsToDelete.push(position);
17253
17269
  }
@@ -17259,7 +17275,7 @@ class EditService extends beanStub_1.BeanStub {
17259
17275
  this.model.clearEditValue(position);
17260
17276
  });
17261
17277
  }
17262
- setNodeDataValue(rowNode, column, newValue, refreshCell) {
17278
+ setNodeDataValue(rowNode, column, newValue, refreshCell, originalSource) {
17263
17279
  const { beans } = this;
17264
17280
  const cellCtrl = (0, controllers_1._getCellCtrl)(beans, { rowNode, column });
17265
17281
  // we suppressRefreshCell because the call to rowNode.setDataValue() results in change detection
@@ -17269,7 +17285,8 @@ class EditService extends beanStub_1.BeanStub {
17269
17285
  if (cellCtrl) {
17270
17286
  cellCtrl.suppressRefreshCell = true;
17271
17287
  }
17272
- const success = rowNode.setDataValue(column, newValue, 'commit');
17288
+ this.commitNextEdit();
17289
+ const success = rowNode.setDataValue(column, newValue, originalSource === 'ui' ? 'edit' : originalSource);
17273
17290
  if (cellCtrl) {
17274
17291
  cellCtrl.suppressRefreshCell = false;
17275
17292
  }
@@ -17487,41 +17504,49 @@ class EditService extends beanStub_1.BeanStub {
17487
17504
  // TODO: find a better place for this
17488
17505
  return new popupEditorWrapper_1.PopupEditorWrapper(params);
17489
17506
  }
17507
+ commitNextEdit() {
17508
+ this.committing = true;
17509
+ }
17490
17510
  setDataValue(position, newValue, eventSource) {
17491
- if ((!this.isEditing() || eventSource === 'commit') && !SET_DATA_SOURCE_AS_API.has(eventSource)) {
17492
- return;
17493
- }
17494
- const { beans } = this;
17495
- this.strategy ?? (this.strategy = this.createStrategy());
17496
- const source = this.isBatchEditing() ? 'ui' : 'api';
17497
- if (!eventSource || KEEP_EDITOR_SOURCES.has(eventSource)) {
17498
- // editApi or undoRedoApi apply change without involving the editor
17499
- (0, editors_1._syncFromEditor)(beans, position, true, newValue, eventSource);
17500
- // a truthy return here indicates the operation succeeded, and if invoked from rowNode.setDataValue, will not result in a cell value change event
17501
- return this.setNodeDataValue(position.rowNode, position.column, newValue, true);
17502
- }
17503
- const existing = this.model.getEdit(position);
17504
- if (existing) {
17505
- if (existing.pendingValue === newValue) {
17506
- return false;
17511
+ try {
17512
+ if ((!this.isEditing() || this.committing) && !SET_DATA_SOURCE_AS_API.has(eventSource)) {
17513
+ return;
17507
17514
  }
17508
- if (existing.sourceValue !== newValue) {
17515
+ const { beans } = this;
17516
+ this.strategy ?? (this.strategy = this.createStrategy());
17517
+ const source = this.isBatchEditing() ? 'ui' : this.committing ? eventSource ?? 'api' : 'api';
17518
+ if (!eventSource || KEEP_EDITOR_SOURCES.has(eventSource)) {
17519
+ // editApi or undoRedoApi apply change without involving the editor
17509
17520
  (0, editors_1._syncFromEditor)(beans, position, true, newValue, eventSource);
17510
- this.stopEditing(position, { source, suppressNavigateAfterEdit: true });
17511
- return true;
17521
+ // a truthy return here indicates the operation succeeded, and if invoked from rowNode.setDataValue, will not result in a cell value change event
17522
+ return this.setNodeDataValue(position.rowNode, position.column, newValue, true, eventSource);
17512
17523
  }
17513
- if (existing.sourceValue === newValue) {
17514
- beans.editModelSvc?.removeEdits(position);
17515
- this.dispatchEditValuesChanged(position, {
17516
- ...existing,
17517
- pendingValue: newValue,
17518
- });
17519
- return true;
17524
+ const existing = this.model.getEdit(position);
17525
+ if (existing) {
17526
+ if (existing.pendingValue === newValue) {
17527
+ return false;
17528
+ }
17529
+ if (existing.sourceValue !== newValue) {
17530
+ (0, editors_1._syncFromEditor)(beans, position, true, newValue, eventSource);
17531
+ this.stopEditing(position, { source: source, suppressNavigateAfterEdit: true });
17532
+ return true;
17533
+ }
17534
+ if (existing.sourceValue === newValue) {
17535
+ beans.editModelSvc?.removeEdits(position);
17536
+ this.dispatchEditValuesChanged(position, {
17537
+ ...existing,
17538
+ pendingValue: newValue,
17539
+ });
17540
+ return true;
17541
+ }
17520
17542
  }
17543
+ (0, editors_1._syncFromEditor)(beans, position, true, newValue, eventSource);
17544
+ this.stopEditing(position, { source: source, suppressNavigateAfterEdit: true });
17545
+ return true;
17546
+ }
17547
+ finally {
17548
+ this.committing = false;
17521
17549
  }
17522
- (0, editors_1._syncFromEditor)(beans, position, true, newValue, eventSource);
17523
- this.stopEditing(position, { source, suppressNavigateAfterEdit: true });
17524
- return true;
17525
17550
  }
17526
17551
  handleColDefChanged(cellCtrl) {
17527
17552
  (0, editors_1._refreshEditorOnColDefChanged)(this.beans, cellCtrl);
@@ -17557,9 +17582,6 @@ class EditService extends beanStub_1.BeanStub {
17557
17582
  dispatchCellEvent(position, event, type, payload) {
17558
17583
  this.strategy?.dispatchCellEvent(position, event, type, payload);
17559
17584
  }
17560
- dispatchRowEvent(position, type) {
17561
- this.strategy?.dispatchRowEvent(position, type);
17562
- }
17563
17585
  dispatchBatchEvent(type, edits) {
17564
17586
  this.eventSvc.dispatchEvent(this.createBatchEditEvent(type, edits));
17565
17587
  }
@@ -17632,7 +17654,8 @@ class EditService extends beanStub_1.BeanStub {
17632
17654
  this.bulkRefresh();
17633
17655
  return;
17634
17656
  }
17635
- this.stopEditing(undefined, { source: 'api' });
17657
+ this.commitNextEdit();
17658
+ this.stopEditing(undefined, { source: 'bulk' });
17636
17659
  this.eventSvc.dispatchEvent({ type: 'bulkEditingStopped', changes: this.toEventChangeList(edits) });
17637
17660
  });
17638
17661
  this.bulkRefresh();
@@ -17859,9 +17882,10 @@ class BaseEditStrategy extends beanStub_1.BeanStub {
17859
17882
  cellCtrl.onEditorAttachedFuncs.push(() => comp?.getCellEditor()?.focusIn?.());
17860
17883
  }
17861
17884
  }
17862
- setupEditors(cells = this.model.getEditPositions(), position, cellStartedEdit, event, ignoreEventKey = false) {
17885
+ setupEditors(params) {
17886
+ const { event, ignoreEventKey = false, startedEdit, position, cells = this.model.getEditPositions() } = params;
17863
17887
  const key = (event instanceof KeyboardEvent && !ignoreEventKey && event.key) || undefined;
17864
- (0, editors_1._setupEditors)(this.beans, cells, position, key, event, cellStartedEdit);
17888
+ (0, editors_1._setupEditors)(this.beans, cells, position, key, event, startedEdit);
17865
17889
  }
17866
17890
  dispatchCellEvent(position, event, type, payload) {
17867
17891
  const cellCtrl = (0, controllers_1._getCellCtrl)(this.beans, position);
@@ -17869,7 +17893,10 @@ class BaseEditStrategy extends beanStub_1.BeanStub {
17869
17893
  this.eventSvc.dispatchEvent({ ...cellCtrl.createEvent(event ?? null, type), ...payload });
17870
17894
  }
17871
17895
  }
17872
- dispatchRowEvent(position, type) {
17896
+ dispatchRowEvent(position, type, silent) {
17897
+ if (silent) {
17898
+ return;
17899
+ }
17873
17900
  const rowCtrl = (0, controllers_1._getRowCtrl)(this.beans, position);
17874
17901
  if (rowCtrl) {
17875
17902
  this.eventSvc.dispatchEvent(rowCtrl.createRowEvent(type));
@@ -17954,10 +17981,10 @@ class BaseEditStrategy extends beanStub_1.BeanStub {
17954
17981
  }
17955
17982
  this.model?.setEditMap(edits);
17956
17983
  if (cells.length > 0) {
17957
- const cell = cells.at(-1);
17958
- const key = cell.pendingValue === editors_1.UNEDITED ? undefined : cell.pendingValue;
17959
- this.start(cell, new KeyboardEvent('keydown', { key }), 'api');
17960
- const cellCtrl = (0, controllers_1._getCellCtrl)(this.beans, cell);
17984
+ const position = cells.at(-1);
17985
+ const key = position.pendingValue === editors_1.UNEDITED ? undefined : position.pendingValue;
17986
+ this.start({ position, event: new KeyboardEvent('keydown', { key }), source: 'api' });
17987
+ const cellCtrl = (0, controllers_1._getCellCtrl)(this.beans, position);
17961
17988
  if (cellCtrl) {
17962
17989
  this.setFocusInOnEditor(cellCtrl);
17963
17990
  }
@@ -18037,12 +18064,13 @@ class FullRowEditStrategy extends baseEditStrategy_1.BaseEditStrategy {
18037
18064
  clearEdits(position) {
18038
18065
  this.model.clearEditValue(position);
18039
18066
  }
18040
- start(position, event, _source = 'ui', ignoreEventKey) {
18067
+ start(params) {
18068
+ const { position, silent, startedEdit, event, ignoreEventKey } = params;
18041
18069
  const { rowNode } = position;
18042
18070
  if (this.rowNode !== rowNode) {
18043
18071
  super.cleanupEditors(position);
18044
18072
  }
18045
- this.dispatchRowEvent({ rowNode }, 'rowEditingStarted');
18073
+ this.dispatchRowEvent({ rowNode }, 'rowEditingStarted', silent);
18046
18074
  this.startedRows.push(rowNode);
18047
18075
  const columns = this.beans.visibleCols.allCols;
18048
18076
  const cells = [];
@@ -18060,7 +18088,7 @@ class FullRowEditStrategy extends baseEditStrategy_1.BaseEditStrategy {
18060
18088
  }
18061
18089
  });
18062
18090
  this.rowNode = rowNode;
18063
- this.setupEditors(cells, position, true, event, ignoreEventKey);
18091
+ this.setupEditors({ cells, position, startedEdit, event, ignoreEventKey });
18064
18092
  }
18065
18093
  processValidationResults(results) {
18066
18094
  const anyFailed = results.fail.length > 0;
@@ -18255,16 +18283,17 @@ class SingleCellEditStrategy extends baseEditStrategy_1.BaseEditStrategy {
18255
18283
  midBatchInputsAllowed(position) {
18256
18284
  return this.model.hasEdits(position);
18257
18285
  }
18258
- start(position, event, _source = 'ui', ignoreEventKey) {
18286
+ start(params) {
18287
+ const { position, startedEdit, event, ignoreEventKey } = params;
18259
18288
  if (this.rowNode !== position.rowNode || this.column !== position.column) {
18260
18289
  super.cleanupEditors();
18261
18290
  }
18262
18291
  this.rowNode = position.rowNode;
18263
18292
  this.column = position.column;
18264
18293
  this.model.start(position);
18265
- this.setupEditors([position], position, true, event, ignoreEventKey);
18294
+ this.setupEditors({ cells: [position], position, startedEdit, event, ignoreEventKey });
18266
18295
  }
18267
- dispatchRowEvent(_position, _type) {
18296
+ dispatchRowEvent(_position, _type, _silent) {
18268
18297
  // NOP - single cell edit strategy does not dispatch row events
18269
18298
  }
18270
18299
  processValidationResults(results) {
@@ -18378,8 +18407,9 @@ class SingleCellEditStrategy extends baseEditStrategy_1.BaseEditStrategy {
18378
18407
  }
18379
18408
  else if (!nextCell.comp?.getCellEditor()) {
18380
18409
  // editor missing because it was outside the viewport during creating phase, attempt to create it now
18381
- (0, editors_1._setupEditor)(this.beans, nextCell, { event, cellStartedEdit: true });
18410
+ (0, editors_1._setupEditor)(this.beans, nextCell, { event, cellStartedEdit: true, silent: true });
18382
18411
  this.setFocusInOnEditor(nextCell);
18412
+ this.cleanupEditors(nextCell);
18383
18413
  }
18384
18414
  }
18385
18415
  else {
@@ -18709,7 +18739,7 @@ function _setupEditors(beans, editingCells, position, key, event, cellStartedEdi
18709
18739
  _setupEditor(beans, { rowNode: rowNode, column: curCellCtrl.column }, {
18710
18740
  key: shouldStartEditing ? key : null,
18711
18741
  event: shouldStartEditing ? event : null,
18712
- cellStartedEdit: shouldStartEditing,
18742
+ cellStartedEdit: shouldStartEditing && cellStartedEdit,
18713
18743
  });
18714
18744
  }
18715
18745
  return;
@@ -18726,10 +18756,9 @@ function _setupEditor(beans, position, params) {
18726
18756
  const { key, event, cellStartedEdit, silent } = params ?? {};
18727
18757
  const cellCtrl = (0, controllers_1._getCellCtrl)(beans, position);
18728
18758
  const editorComp = cellCtrl?.comp?.getCellEditor();
18729
- const editorParams = _createEditorParams(beans, position, key, cellStartedEdit);
18759
+ const editorParams = _createEditorParams(beans, position, key, cellStartedEdit && !silent);
18730
18760
  const previousEdit = beans.editModelSvc?.getEdit(position);
18731
- // if key is a single character, then we treat it as user input
18732
- let newValue = key?.length === 1 ? key : editorParams.value;
18761
+ let newValue = editorParams.value;
18733
18762
  if (newValue === undefined) {
18734
18763
  newValue = previousEdit?.sourceValue;
18735
18764
  }
@@ -18850,7 +18879,7 @@ function _syncFromEditors(beans, persist) {
18850
18879
  if (!cellCtrl) {
18851
18880
  return;
18852
18881
  }
18853
- const editor = cellCtrl.comp.getCellEditor();
18882
+ const editor = cellCtrl.comp?.getCellEditor();
18854
18883
  if (!editor) {
18855
18884
  return;
18856
18885
  }
@@ -18917,7 +18946,8 @@ function _destroyEditor(beans, position, params) {
18917
18946
  }
18918
18947
  const { comp } = cellCtrl;
18919
18948
  if (comp && !comp.getCellEditor()) {
18920
- // no editor, nothing to do
18949
+ // editor already cleaned up, refresh cell
18950
+ cellCtrl?.refreshCell();
18921
18951
  return;
18922
18952
  }
18923
18953
  const errorMessages = comp?.getCellEditor()?.getValidationErrors?.();
@@ -20588,7 +20618,7 @@ class RowNode {
20588
20618
  });
20589
20619
  return false;
20590
20620
  }
20591
- if (editSvc) {
20621
+ if (editSvc && !editSvc.committing) {
20592
20622
  const result = editSvc.setDataValue({ rowNode: this, column }, newValue, eventSource);
20593
20623
  if (result != null) {
20594
20624
  return result;
@@ -45244,7 +45274,7 @@ class CellCtrl extends beanStub_1.BeanStub {
45244
45274
  this.rangeFeature?.setComp(comp);
45245
45275
  this.rowResizeFeature?.refreshRowResizer();
45246
45276
  if (startEditing && this.isCellEditable()) {
45247
- this.editSvc?.startEditing(this, { startedEdit: true, source: 'api' });
45277
+ this.editSvc?.startEditing(this, { startedEdit: false, source: 'api', silent: true });
45248
45278
  }
45249
45279
  else {
45250
45280
  // We can skip refreshing the range handle as this is done in this.rangeFeature.setComp above
@@ -45437,6 +45467,13 @@ class CellCtrl extends beanStub_1.BeanStub {
45437
45467
  else {
45438
45468
  this.refreshCell(params);
45439
45469
  }
45470
+ if (this.hasEdit && this.editCompDetails) {
45471
+ const { editSvc, comp } = this;
45472
+ if (!comp?.getCellEditor() && editSvc.isEditing(this, { withOpenEditor: true })) {
45473
+ // editor was cleaned up by virtualisation, needs to be re-created
45474
+ editSvc.startEditing(this, { startedEdit: false, source: 'api', silent: true });
45475
+ }
45476
+ }
45440
45477
  }
45441
45478
  // + stop editing {force: true, suppressFlash: true}
45442
45479
  // + event cellChanged {}
@@ -46110,13 +46147,14 @@ class CellKeyboardListenerFeature extends beanStub_1.BeanStub {
46110
46147
  onEnterKeyDown(event) {
46111
46148
  const { cellCtrl, beans } = this;
46112
46149
  const { editSvc, navigation } = beans;
46113
- const cellEditing = editSvc?.isEditing(cellCtrl);
46150
+ const cellEditing = editSvc?.isEditing(cellCtrl, { withOpenEditor: true });
46114
46151
  const rowNode = cellCtrl.rowNode;
46115
- const rowEditing = editSvc?.isRowEditing(rowNode);
46152
+ const rowEditing = editSvc?.isRowEditing(rowNode, { withOpenEditor: true });
46116
46153
  const startEditingAction = (cellCtrl) => {
46117
46154
  const started = editSvc?.startEditing(cellCtrl, {
46118
46155
  startedEdit: true,
46119
46156
  event,
46157
+ source: 'edit',
46120
46158
  });
46121
46159
  if (started) {
46122
46160
  // if we started editing, then we need to prevent default, otherwise the Enter action can get
@@ -46140,11 +46178,12 @@ class CellKeyboardListenerFeature extends beanStub_1.BeanStub {
46140
46178
  if (editSvc?.isEditing(cellCtrl, { withOpenEditor: true })) {
46141
46179
  editSvc?.stopEditing(cellCtrl, {
46142
46180
  event,
46181
+ source: 'edit',
46143
46182
  });
46144
46183
  }
46145
46184
  else if (rowEditing && !cellCtrl.isCellEditable()) {
46146
46185
  // must be on a read only cell
46147
- editSvc?.stopEditing({ rowNode }, { event });
46186
+ editSvc?.stopEditing({ rowNode }, { event, source: 'edit' });
46148
46187
  }
46149
46188
  else {
46150
46189
  startEditingAction(cellCtrl);
@@ -46323,7 +46362,19 @@ class CellMouseListenerFeature extends beanStub_1.BeanStub {
46323
46362
  editSvc?.startEditing(cellCtrl, { event });
46324
46363
  }
46325
46364
  else if (editSvc?.shouldStopEditing(cellCtrl, event)) {
46326
- editSvc?.stopEditing(cellCtrl);
46365
+ if (this.beans.gos.get('editType') === 'fullRow') {
46366
+ editSvc?.stopEditing(cellCtrl, {
46367
+ event,
46368
+ source: 'edit',
46369
+ });
46370
+ }
46371
+ else {
46372
+ // stop all editing
46373
+ editSvc?.stopEditing(undefined, {
46374
+ event,
46375
+ source: 'edit',
46376
+ });
46377
+ }
46327
46378
  }
46328
46379
  }
46329
46380
  }
@@ -55408,6 +55459,7 @@ class TestIdService extends beanStub_1.BeanStub {
55408
55459
  displayedRowsChanged: setup,
55409
55460
  displayedColumnsChanged: setup,
55410
55461
  displayedColumnsWidthChanged: setup,
55462
+ virtualColumnsChanged: setup,
55411
55463
  columnMenuVisibleChanged: setup,
55412
55464
  contextMenuVisibleChanged: setup,
55413
55465
  advancedFilterBuilderVisibleChanged: setup,
@@ -60106,7 +60158,7 @@ function _isValidDate(value, bailIfInvalidTime = false) {
60106
60158
  exports._isValidDate = _isValidDate;
60107
60159
  // check if dateTime is a valid date and has time parts
60108
60160
  function _isValidDateTime(value) {
60109
- return !!value && _isValidDate(value, true) && !!value.match(DATE_TIME_REGEXP)?.[1]; // matches the 'T14:22:19' part
60161
+ return _isValidDate(value, true);
60110
60162
  }
60111
60163
  exports._isValidDateTime = _isValidDateTime;
60112
60164
  /**
@@ -60121,6 +60173,9 @@ function _parseDateTimeFromString(value, bailIfInvalidTime = false) {
60121
60173
  if (!value) {
60122
60174
  return null;
60123
60175
  }
60176
+ if (!DATE_TIME_REGEXP.test(value)) {
60177
+ return null;
60178
+ }
60124
60179
  const [dateStr, timeStr] = value.split(DATE_TIME_SEPARATOR);
60125
60180
  if (!dateStr) {
60126
60181
  return null;
@@ -60135,6 +60190,9 @@ function _parseDateTimeFromString(value, bailIfInvalidTime = false) {
60135
60190
  // date was not parsed as expected so must have been invalid
60136
60191
  return null;
60137
60192
  }
60193
+ if (!timeStr && bailIfInvalidTime) {
60194
+ return null;
60195
+ }
60138
60196
  if (!timeStr || timeStr === '00:00:00') {
60139
60197
  return date;
60140
60198
  }
@@ -62250,7 +62308,7 @@ exports.AG_GRID_ERRORS = {
62250
62308
  280: ({ colId }) => `'name' must be provided for custom filter components for column '${colId}`,
62251
62309
  281: ({ colId }) => `Filter for column '${colId}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,
62252
62310
  282: () => 'New filter tool panel requires `enableFilterHandlers: true`.',
62253
- 283: () => 'As of v34, use the same method on the filter handler (`api.getColumnFilterHandler()`) instead.',
62311
+ 283: () => 'As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.',
62254
62312
  284: () => 'As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.',
62255
62313
  285: () => 'As of v34, use (`api.getColumnFilterModel()`) instead.',
62256
62314
  286: () => 'As of v34, use (`api.setColumnFilterModel()`) instead.',
@@ -64752,7 +64810,7 @@ exports.VanillaFrameworkOverrides = VanillaFrameworkOverrides;
64752
64810
  Object.defineProperty(exports, "__esModule", ({ value: true }));
64753
64811
  exports.VERSION = void 0;
64754
64812
  // DO NOT UPDATE MANUALLY: Generated from script during build time
64755
- exports.VERSION = '34.1.0';
64813
+ exports.VERSION = '34.1.2';
64756
64814
 
64757
64815
 
64758
64816
  /***/ }),