igniteui-angular 18.2.1 → 18.2.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.
@@ -1425,7 +1425,9 @@ class ExportUtilities {
1425
1425
  .replace(/</g, '&lt;')
1426
1426
  .replace(/>/g, '&gt;')
1427
1427
  .replace(/"/g, '&quot;')
1428
- .replace(/'/g, '&apos;');
1428
+ .replace(/'/g, '&apos;')
1429
+ // Bug #14944 - Remove the not supported null character (\u0000, \x00)
1430
+ .replace(/\x00/g, '');
1429
1431
  }
1430
1432
  }
1431
1433
  }
@@ -24852,8 +24854,10 @@ class IgxCellCrudState {
24852
24854
  let activeElement;
24853
24855
  if (cellNode) {
24854
24856
  const document = cellNode.getRootNode();
24855
- activeElement = document.activeElement;
24856
- activeElement.blur();
24857
+ if (cellNode.contains(document.activeElement)) {
24858
+ activeElement = document.activeElement;
24859
+ this.grid.tbody.nativeElement.focus();
24860
+ }
24857
24861
  }
24858
24862
  const formControl = this.grid.validation.getFormControl(this.cell.id.rowID, this.cell.column.field);
24859
24863
  if (this.grid.validationTrigger === 'blur' && this.cell.pendingValue !== undefined) {
@@ -61102,6 +61106,21 @@ class IgxGridNavigationService {
61102
61106
  }
61103
61107
  return isChanged;
61104
61108
  }
61109
+ /** Focus the Grid section (header, body, footer) depending on the current activeNode */
61110
+ restoreActiveNodeFocus() {
61111
+ if (!this.activeNode || !Object.keys(this.activeNode).length) {
61112
+ return;
61113
+ }
61114
+ if (this.activeNode.row >= 0 && this.activeNode.row < this.grid.dataView.length) {
61115
+ this.grid.tbody.nativeElement.focus();
61116
+ }
61117
+ if (this.activeNode.row === -1) {
61118
+ this.grid.theadRow.nativeElement.focus();
61119
+ }
61120
+ if (this.activeNode.row === this.grid.dataView.length) {
61121
+ this.grid.tfoot.nativeElement.focus();
61122
+ }
61123
+ }
61105
61124
  getNextPosition(rowIndex, colIndex, key, shift, ctrl, event) {
61106
61125
  if (!this.isDataRow(rowIndex, true) && (key.indexOf('down') < 0 || key.indexOf('up') < 0) && ctrl) {
61107
61126
  return { rowIndex, colIndex };
@@ -64338,16 +64357,14 @@ class IgxGridBaseDirective {
64338
64357
  _setupListeners() {
64339
64358
  const destructor = takeUntil(this.destroy$);
64340
64359
  fromEvent(this.nativeElement, 'focusout').pipe(filter(() => !!this.navigation.activeNode), destructor).subscribe((event) => {
64341
- if (!this.crudService.cell &&
64342
- !!this.navigation.activeNode &&
64343
- ((event.target === this.tbody.nativeElement && this.navigation.activeNode.row >= 0 &&
64344
- this.navigation.activeNode.row < this.dataView.length)
64345
- || (event.target === this.theadRow.nativeElement && this.navigation.activeNode.row === -1)
64346
- || (event.target === this.tfoot.nativeElement && this.navigation.activeNode.row === this.dataView.length)) &&
64360
+ const activeNode = this.navigation.activeNode;
64361
+ if (!this.crudService.cell && !!activeNode &&
64362
+ ((event.target === this.tbody.nativeElement && activeNode.row >= 0 &&
64363
+ activeNode.row < this.dataView.length)
64364
+ || (event.target === this.theadRow.nativeElement && activeNode.row === -1)
64365
+ || (event.target === this.tfoot.nativeElement && activeNode.row === this.dataView.length)) &&
64347
64366
  !(this.rowEditable && this.crudService.rowEditingBlocked && this.crudService.rowInEditMode)) {
64348
- this.navigation.lastActiveNode = this.navigation.activeNode;
64349
- this.navigation.activeNode = {};
64350
- this.notifyChanges();
64367
+ this.clearActiveNode();
64351
64368
  }
64352
64369
  });
64353
64370
  this.rowAddedNotifier.pipe(destructor).subscribe(args => this.refreshGridState(args));
@@ -66544,10 +66561,7 @@ class IgxGridBaseDirective {
66544
66561
  if (canceled) {
66545
66562
  return true;
66546
66563
  }
66547
- const activeCell = this.gridAPI.grid.navigation.activeNode;
66548
- if (activeCell && activeCell.row !== -1) {
66549
- this.tbody.nativeElement.focus();
66550
- }
66564
+ this.navigation.restoreActiveNodeFocus();
66551
66565
  }
66552
66566
  /**
66553
66567
  * @hidden @internal
@@ -66716,7 +66730,18 @@ class IgxGridBaseDirective {
66716
66730
  // TODO: do not remove this, as it is used in rowEditTemplate, but mark is as internal and hidden
66717
66731
  /* blazorCSSuppress */
66718
66732
  endEdit(commit = true, event) {
66719
- return this.crudService.endEdit(commit, event);
66733
+ const document = this.nativeElement?.getRootNode();
66734
+ const focusWithin = this.nativeElement?.contains(document.activeElement);
66735
+ const success = this.crudService.endEdit(commit, event);
66736
+ if (focusWithin) {
66737
+ // restore focus for navigation
66738
+ this.navigation.restoreActiveNodeFocus();
66739
+ }
66740
+ else if (this.navigation.activeNode) {
66741
+ // grid already lost focus, clear active node
66742
+ this.clearActiveNode();
66743
+ }
66744
+ return success;
66720
66745
  }
66721
66746
  /**
66722
66747
  * Enters add mode by spawning the UI under the specified row by rowID.
@@ -68182,6 +68207,14 @@ class IgxGridBaseDirective {
68182
68207
  return false;
68183
68208
  return Object.keys(oldData[0]).join() !== Object.keys(newData[0]).join();
68184
68209
  }
68210
+ /**
68211
+ * Clears the current navigation service active node
68212
+ */
68213
+ clearActiveNode() {
68214
+ this.navigation.lastActiveNode = this.navigation.activeNode;
68215
+ this.navigation.activeNode = {};
68216
+ this.notifyChanges();
68217
+ }
68185
68218
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: IgxGridBaseDirective, deps: [{ token: IgxGridValidationService }, { token: IgxGridSelectionService }, { token: IgxColumnResizingService }, { token: IGX_GRID_SERVICE_BASE }, { token: IgxFlatTransactionFactory }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: DOCUMENT }, { token: i0.ChangeDetectorRef }, { token: i0.IterableDiffers }, { token: i0.ViewContainerRef }, { token: i0.Injector }, { token: i0.EnvironmentInjector }, { token: IgxGridNavigationService }, { token: IgxFilteringService }, { token: IgxTextHighlightService }, { token: IgxOverlayService }, { token: IgxGridSummaryService }, { token: LOCALE_ID }, { token: PlatformUtil }, { token: IgxGridTransaction, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
68186
68219
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.4", type: IgxGridBaseDirective, inputs: { snackbarDisplayTime: "snackbarDisplayTime", autoGenerate: ["autoGenerate", "autoGenerate", booleanAttribute], autoGenerateExclude: "autoGenerateExclude", moving: ["moving", "moving", booleanAttribute], emptyGridTemplate: "emptyGridTemplate", addRowEmptyTemplate: "addRowEmptyTemplate", loadingGridTemplate: "loadingGridTemplate", summaryRowHeight: "summaryRowHeight", dataCloneStrategy: "dataCloneStrategy", clipboardOptions: "clipboardOptions", rowClasses: "rowClasses", rowStyles: "rowStyles", primaryKey: "primaryKey", uniqueColumnValuesStrategy: "uniqueColumnValuesStrategy", dragGhostCustomTemplate: "dragGhostCustomTemplate", rowEditTextTemplate: "rowEditTextTemplate", rowAddTextTemplate: "rowAddTextTemplate", rowEditActionsTemplate: "rowEditActionsTemplate", rowExpandedIndicatorTemplate: "rowExpandedIndicatorTemplate", rowCollapsedIndicatorTemplate: "rowCollapsedIndicatorTemplate", headerExpandedIndicatorTemplate: "headerExpandedIndicatorTemplate", headerCollapsedIndicatorTemplate: "headerCollapsedIndicatorTemplate", excelStyleHeaderIconTemplate: "excelStyleHeaderIconTemplate", sortAscendingHeaderIconTemplate: "sortAscendingHeaderIconTemplate", sortDescendingHeaderIconTemplate: "sortDescendingHeaderIconTemplate", sortHeaderIconTemplate: "sortHeaderIconTemplate", resourceStrings: "resourceStrings", filteringLogic: "filteringLogic", filteringExpressionsTree: "filteringExpressionsTree", advancedFilteringExpressionsTree: "advancedFilteringExpressionsTree", locale: "locale", pagingMode: "pagingMode", hideRowSelectors: ["hideRowSelectors", "hideRowSelectors", booleanAttribute], rowDraggable: ["rowDraggable", "rowDraggable", booleanAttribute], validationTrigger: "validationTrigger", rowEditable: ["rowEditable", "rowEditable", booleanAttribute], height: "height", width: "width", rowHeight: "rowHeight", columnWidth: "columnWidth", emptyGridMessage: "emptyGridMessage", isLoading: ["isLoading", "isLoading", booleanAttribute], emptyFilteredGridMessage: "emptyFilteredGridMessage", pinning: "pinning", allowFiltering: ["allowFiltering", "allowFiltering", booleanAttribute], allowAdvancedFiltering: ["allowAdvancedFiltering", "allowAdvancedFiltering", booleanAttribute], filterMode: "filterMode", summaryPosition: "summaryPosition", summaryCalculationMode: "summaryCalculationMode", showSummaryOnCollapse: ["showSummaryOnCollapse", "showSummaryOnCollapse", booleanAttribute], filterStrategy: "filterStrategy", sortStrategy: "sortStrategy", sortingOptions: "sortingOptions", selectedRows: "selectedRows", headSelectorTemplate: "headSelectorTemplate", rowSelectorTemplate: "rowSelectorTemplate", dragIndicatorIconTemplate: "dragIndicatorIconTemplate", sortingExpressions: "sortingExpressions", batchEditing: ["batchEditing", "batchEditing", booleanAttribute], cellSelection: "cellSelection", rowSelection: "rowSelection", columnSelection: "columnSelection", expansionStates: "expansionStates", outlet: "outlet", totalRecords: "totalRecords", selectRowOnClick: ["selectRowOnClick", "selectRowOnClick", booleanAttribute] }, outputs: { filteringExpressionsTreeChange: "filteringExpressionsTreeChange", advancedFilteringExpressionsTreeChange: "advancedFilteringExpressionsTreeChange", gridScroll: "gridScroll", cellClick: "cellClick", rowClick: "rowClick", formGroupCreated: "formGroupCreated", validationStatusChange: "validationStatusChange", selected: "selected", rowSelectionChanging: "rowSelectionChanging", columnSelectionChanging: "columnSelectionChanging", columnPin: "columnPin", columnPinned: "columnPinned", cellEditEnter: "cellEditEnter", cellEditExit: "cellEditExit", cellEdit: "cellEdit", cellEditDone: "cellEditDone", rowEditEnter: "rowEditEnter", rowEdit: "rowEdit", rowEditDone: "rowEditDone", rowEditExit: "rowEditExit", columnInit: "columnInit", columnsAutogenerated: "columnsAutogenerated", sorting: "sorting", sortingDone: "sortingDone", filtering: "filtering", filteringDone: "filteringDone", rowAdded: "rowAdded", rowDeleted: "rowDeleted", rowDelete: "rowDelete", rowAdd: "rowAdd", columnResized: "columnResized", contextMenu: "contextMenu", doubleClick: "doubleClick", columnVisibilityChanging: "columnVisibilityChanging", columnVisibilityChanged: "columnVisibilityChanged", columnMovingStart: "columnMovingStart", columnMoving: "columnMoving", columnMovingEnd: "columnMovingEnd", gridKeydown: "gridKeydown", rowDragStart: "rowDragStart", rowDragEnd: "rowDragEnd", gridCopy: "gridCopy", expansionStatesChange: "expansionStatesChange", selectedRowsChange: "selectedRowsChange", rowToggle: "rowToggle", rowPinning: "rowPinning", rowPinned: "rowPinned", activeNodeChange: "activeNodeChange", sortingExpressionsChange: "sortingExpressionsChange", toolbarExporting: "toolbarExporting", rangeSelected: "rangeSelected", rendered: "rendered", localeChange: "localeChange", dataChanging: "dataChanging", dataChanged: "dataChanged" }, host: { listeners: { "mouseleave": "hideActionStrip()" }, properties: { "attr.tabindex": "this.tabindex", "attr.role": "this.hostRole", "class.igx-grid": "this.baseClass", "style.height": "this.height", "style.width": "this.hostWidth" } }, queries: [{ propertyName: "excelStyleLoadingValuesTemplateDirective", first: true, predicate: IgxExcelStyleLoadingValuesTemplateDirective, descendants: true, read: IgxExcelStyleLoadingValuesTemplateDirective, static: true }, { propertyName: "rowAddText", first: true, predicate: IgxRowAddTextDirective, descendants: true, read: TemplateRef }, { propertyName: "rowExpandedIndicatorDirectiveTemplate", first: true, predicate: IgxRowExpandedIndicatorDirective, descendants: true, read: TemplateRef }, { propertyName: "rowCollapsedIndicatorDirectiveTemplate", first: true, predicate: IgxRowCollapsedIndicatorDirective, descendants: true, read: TemplateRef }, { propertyName: "headerExpandedIndicatorDirectiveTemplate", first: true, predicate: IgxHeaderExpandedIndicatorDirective, descendants: true, read: TemplateRef }, { propertyName: "headerCollapsedIndicatorDirectiveTemplate", first: true, predicate: IgxHeaderCollapsedIndicatorDirective, descendants: true, read: TemplateRef }, { propertyName: "excelStyleHeaderIconDirectiveTemplate", first: true, predicate: IgxExcelStyleHeaderIconDirective, descendants: true, read: TemplateRef }, { propertyName: "sortAscendingHeaderIconDirectiveTemplate", first: true, predicate: IgxSortAscendingHeaderIconDirective, descendants: true, read: TemplateRef }, { propertyName: "sortDescendingHeaderIconDirectiveTemplate", first: true, predicate: IgxSortDescendingHeaderIconDirective, descendants: true, read: TemplateRef }, { propertyName: "sortHeaderIconDirectiveTemplate", first: true, predicate: IgxSortHeaderIconDirective, descendants: true, read: TemplateRef }, { propertyName: "excelStyleFilteringComponents", predicate: IgxGridExcelStyleFilteringComponent, read: IgxGridExcelStyleFilteringComponent }, { propertyName: "columnList", predicate: IgxColumnComponent, descendants: true, read: IgxColumnComponent }, { propertyName: "actionStripComponents", predicate: IgxActionStripToken }, { propertyName: "headSelectorsTemplates", predicate: IgxHeadSelectorDirective, read: TemplateRef }, { propertyName: "rowSelectorsTemplates", predicate: IgxRowSelectorDirective, read: TemplateRef }, { propertyName: "dragGhostCustomTemplates", predicate: IgxRowDragGhostDirective, read: TemplateRef }, { propertyName: "rowEditCustomDirectives", predicate: IgxRowEditTemplateDirective, read: TemplateRef }, { propertyName: "rowEditTextDirectives", predicate: IgxRowEditTextDirective, read: TemplateRef }, { propertyName: "rowEditActionsDirectives", predicate: IgxRowEditActionsDirective, read: TemplateRef }, { propertyName: "dragIndicatorIconTemplates", predicate: IgxDragIndicatorIconDirective, read: TemplateRef }, { propertyName: "rowEditTabsCUSTOM", predicate: IgxRowEditTabStopDirective, descendants: true }, { propertyName: "toolbar", predicate: IgxToolbarToken }, { propertyName: "paginationComponents", predicate: IgxPaginatorToken }], viewQueries: [{ propertyName: "addRowSnackbar", first: true, predicate: IgxSnackbarComponent, descendants: true }, { propertyName: "resizeLine", first: true, predicate: IgxGridColumnResizerComponent, descendants: true }, { propertyName: "loadingOverlay", first: true, predicate: ["loadingOverlay"], descendants: true, read: IgxToggleDirective, static: true }, { propertyName: "loadingOutlet", first: true, predicate: ["igxLoadingOverlayOutlet"], descendants: true, read: IgxOverlayOutletDirective, static: true }, { propertyName: "emptyFilteredGridTemplate", first: true, predicate: ["emptyFilteredGrid"], descendants: true, read: TemplateRef, static: true }, { propertyName: "emptyGridDefaultTemplate", first: true, predicate: ["defaultEmptyGrid"], descendants: true, read: TemplateRef, static: true }, { propertyName: "loadingGridDefaultTemplate", first: true, predicate: ["defaultLoadingGrid"], descendants: true, read: TemplateRef, static: true }, { propertyName: "parentVirtDir", first: true, predicate: ["scrollContainer"], descendants: true, read: IgxGridForOfDirective, static: true }, { propertyName: "verticalScrollContainer", first: true, predicate: ["verticalScrollContainer"], descendants: true, read: IgxGridForOfDirective, static: true }, { propertyName: "verticalScroll", first: true, predicate: ["verticalScrollHolder"], descendants: true, read: IgxGridForOfDirective, static: true }, { propertyName: "scr", first: true, predicate: ["scr"], descendants: true, read: ElementRef, static: true }, { propertyName: "headerSelectorBaseTemplate", first: true, predicate: ["headSelectorBaseTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "footer", first: true, predicate: ["footer"], descendants: true, read: ElementRef }, { propertyName: "theadRow", first: true, predicate: IgxGridHeaderRowComponent, descendants: true, static: true }, { propertyName: "groupArea", first: true, predicate: IgxGridGroupByAreaComponent, descendants: true }, { propertyName: "tbody", first: true, predicate: ["tbody"], descendants: true, static: true }, { propertyName: "tbodyContainer", first: true, predicate: IgxGridBodyDirective, descendants: true, read: ElementRef, static: true }, { propertyName: "pinContainer", first: true, predicate: ["pinContainer"], descendants: true, read: ElementRef }, { propertyName: "tfoot", first: true, predicate: ["tfoot"], descendants: true, static: true }, { propertyName: "rowEditingOutletDirective", first: true, predicate: ["igxRowEditingOverlayOutlet"], descendants: true, read: IgxOverlayOutletDirective, static: true }, { propertyName: "dragIndicatorIconBase", first: true, predicate: ["dragIndicatorIconBase"], descendants: true, read: TemplateRef, static: true }, { propertyName: "rowEditingOverlay", first: true, predicate: ["rowEditingOverlay"], descendants: true, read: IgxToggleDirective }, { propertyName: "_outletDirective", first: true, predicate: ["igxFilteringOverlayOutlet"], descendants: true, read: IgxOverlayOutletDirective, static: true }, { propertyName: "anchor", first: true, predicate: ["sink"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "defaultExpandedTemplate", first: true, predicate: ["defaultExpandedTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "defaultCollapsedTemplate", first: true, predicate: ["defaultCollapsedTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "defaultESFHeaderIconTemplate", first: true, predicate: ["defaultESFHeaderIcon"], descendants: true, read: TemplateRef, static: true }, { propertyName: "defaultRowEditTemplate", first: true, predicate: ["defaultRowEditTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "tmpOutlets", predicate: IgxTemplateOutletDirective, descendants: true, read: IgxTemplateOutletDirective }, { propertyName: "rowEditTabsDEFAULT", predicate: IgxRowEditTabStopDirective, descendants: true }, { propertyName: "_summaryRowList", predicate: ["summaryRow"], descendants: true, read: IgxSummaryRowComponent }, { propertyName: "_rowList", predicate: ["row"], descendants: true }, { propertyName: "_pinnedRowList", predicate: ["pinnedRow"], descendants: true }, { propertyName: "_dataRowList", predicate: IgxRowDirective, descendants: true, read: IgxRowDirective }], ngImport: i0 }); }
68187
68220
  }