igniteui-angular 12.3.32 → 12.3.35

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.
@@ -6,7 +6,7 @@ import { NG_VALUE_ACCESSOR, NG_VALIDATORS, CheckboxRequiredValidator, NgModel, F
6
6
  import * as i2 from '@angular/common';
7
7
  import { isPlatformBrowser, CommonModule, DOCUMENT, DatePipe, formatDate, FormatWidth, getLocaleDateFormat, getLocaleCurrencyCode, DecimalPipe, CurrencyPipe, PercentPipe, getLocaleNumberFormat, NumberFormatStyle, getCurrencySymbol } from '@angular/common';
8
8
  import { Observable, noop, Subject, fromEvent, interval, animationFrameScheduler, merge, pipe, Subscription, timer } from 'rxjs';
9
- import { throttleTime, takeUntil, filter, first as first$1, take, throttle, debounce, tap, switchMap, skipLast, map, shareReplay, takeWhile, debounceTime, pluck } from 'rxjs/operators';
9
+ import { throttleTime, takeUntil, filter, first as first$1, take, throttle, startWith, debounce, tap, switchMap, skipLast, map, shareReplay, takeWhile, debounceTime, pluck } from 'rxjs/operators';
10
10
  import mergeWith from 'lodash.mergewith';
11
11
  import { ResizeObserver } from '@juggle/resize-observer';
12
12
  import { __decorate, __awaiter } from 'tslib';
@@ -7345,9 +7345,13 @@ class IgxGridSelectionService {
7345
7345
  */
7346
7346
  this.pointerEventInGridBody = false;
7347
7347
  this._ranges = new Set();
7348
- this.pointerOriginHandler = () => {
7348
+ this.pointerOriginHandler = (event) => {
7349
7349
  this.pointerEventInGridBody = false;
7350
7350
  document.body.removeEventListener('pointerup', this.pointerOriginHandler);
7351
+ const targetTagName = event.target.tagName.toLowerCase();
7352
+ if (targetTagName !== 'igx-grid-cell' && targetTagName !== 'igx-tree-grid-cell') {
7353
+ this.pointerUp(this._lastSelectedNode, this.grid.rangeSelected, true);
7354
+ }
7351
7355
  };
7352
7356
  this.initPointerState();
7353
7357
  this.initKeyboardState();
@@ -7464,6 +7468,7 @@ class IgxGridSelectionService {
7464
7468
  * and the start node of the `state`.
7465
7469
  */
7466
7470
  generateRange(node, state) {
7471
+ this._lastSelectedNode = node;
7467
7472
  if (!state) {
7468
7473
  return {
7469
7474
  rowStart: node.row,
@@ -7581,8 +7586,8 @@ class IgxGridSelectionService {
7581
7586
  }
7582
7587
  return true;
7583
7588
  }
7584
- pointerUp(node, emitter) {
7585
- if (this.dragMode) {
7589
+ pointerUp(node, emitter, firedOutsideGrid) {
7590
+ if (this.dragMode || firedOutsideGrid) {
7586
7591
  this.restoreTextSelection();
7587
7592
  this.addRangeMeta(node, this.pointerState);
7588
7593
  this.mergeMap(this.selection, this.temp);
@@ -21412,7 +21417,7 @@ class IgxDragDirective {
21412
21417
  // Check for shadowRoot instance and use it if present
21413
21418
  for (const elFromPoint of elementsFromPoint) {
21414
21419
  if (!!(elFromPoint === null || elFromPoint === void 0 ? void 0 : elFromPoint.shadowRoot)) {
21415
- targetElements = targetElements.concat(this.getFromShadowRoot(elFromPoint, pageX, pageY));
21420
+ targetElements = targetElements.concat(this.getFromShadowRoot(elFromPoint, pageX, pageY, elementsFromPoint));
21416
21421
  }
21417
21422
  else if (targetElements.indexOf(elFromPoint) === -1) {
21418
21423
  targetElements.push(elFromPoint);
@@ -21446,13 +21451,15 @@ class IgxDragDirective {
21446
21451
  * @hidden
21447
21452
  * Traverse shadow dom in depth.
21448
21453
  */
21449
- getFromShadowRoot(elem, pageX, pageY) {
21454
+ getFromShadowRoot(elem, pageX, pageY, parentDomElems) {
21450
21455
  const elementsFromPoint = elem.shadowRoot.elementsFromPoint(pageX, pageY);
21451
- let res = elementsFromPoint;
21452
- for (const elFromPoint of elementsFromPoint) {
21456
+ const shadowElements = elementsFromPoint.filter(cur => parentDomElems.indexOf(cur) === -1);
21457
+ let res = [];
21458
+ for (const elFromPoint of shadowElements) {
21453
21459
  if (!!(elFromPoint === null || elFromPoint === void 0 ? void 0 : elFromPoint.shadowRoot) && elFromPoint.shadowRoot !== elem.shadowRoot) {
21454
- res = res.concat(this.getFromShadowRoot(elFromPoint, pageX, pageY));
21460
+ res = res.concat(this.getFromShadowRoot(elFromPoint, pageX, pageY, elementsFromPoint));
21455
21461
  }
21462
+ res.push(elFromPoint);
21456
21463
  }
21457
21464
  return res;
21458
21465
  }
@@ -23125,6 +23132,11 @@ class IgxRadioComponent {
23125
23132
  * @hidden
23126
23133
  */
23127
23134
  this.inputId = `${this.id}-input`;
23135
+ /**
23136
+ * @hidden
23137
+ * @internal
23138
+ */
23139
+ this.destroy$ = new Subject();
23128
23140
  /**
23129
23141
  * @hidden
23130
23142
  * @internal
@@ -23204,6 +23216,14 @@ class IgxRadioComponent {
23204
23216
  _clicked() {
23205
23217
  this.select();
23206
23218
  }
23219
+ /**
23220
+ * @hidden
23221
+ * @internal
23222
+ */
23223
+ ngOnDestroy() {
23224
+ this.destroy$.next(true);
23225
+ this.destroy$.complete();
23226
+ }
23207
23227
  /**
23208
23228
  * Selects the current radio button.
23209
23229
  * ```typescript
@@ -23439,6 +23459,11 @@ class IgxRadioGroupDirective {
23439
23459
  * @internal
23440
23460
  */
23441
23461
  this.destroy$ = new Subject();
23462
+ /**
23463
+ * @hidden
23464
+ * @internal
23465
+ */
23466
+ this.queryChange$ = new Subject();
23442
23467
  }
23443
23468
  /**
23444
23469
  * Sets/gets the `value` attribute.
@@ -23584,8 +23609,9 @@ class IgxRadioGroupDirective {
23584
23609
  // The initial value can possibly be set by NgModel and it is possible that
23585
23610
  // the OnInit of the NgModel occurs after the OnInit of this class.
23586
23611
  this._isInitialized = true;
23587
- setTimeout(() => {
23588
- this._initRadioButtons();
23612
+ this.radioButtons.changes.pipe(startWith(0), takeUntil(this.destroy$)).subscribe(() => {
23613
+ this.queryChange$.next();
23614
+ setTimeout(() => this._initRadioButtons());
23589
23615
  });
23590
23616
  }
23591
23617
  /**
@@ -23657,7 +23683,7 @@ class IgxRadioGroupDirective {
23657
23683
  button.checked = true;
23658
23684
  this._selected = button;
23659
23685
  }
23660
- button.change.pipe(takeUntil(this.destroy$)).subscribe((ev) => this._selectedRadioButtonChanged(ev));
23686
+ button.change.pipe(takeUntil(button.destroy$), takeUntil(this.destroy$), takeUntil(this.queryChange$)).subscribe((ev) => this._selectedRadioButtonChanged(ev));
23661
23687
  });
23662
23688
  }
23663
23689
  }
@@ -43845,8 +43871,13 @@ class IgxGridNavigationService {
43845
43871
  this.grid.clearCellSelection();
43846
43872
  this.grid.navigateTo(this.activeNode.row, this.activeNode.column, (obj) => {
43847
43873
  var _a;
43848
- (_a = obj.target) === null || _a === void 0 ? void 0 : _a.activate(event);
43849
- this.grid.cdr.detectChanges();
43874
+ if (this.activeNode.row === obj.target.row.index) {
43875
+ (_a = obj.target) === null || _a === void 0 ? void 0 : _a.activate(event);
43876
+ this.grid.cdr.detectChanges();
43877
+ }
43878
+ else {
43879
+ this.grid.navigateTo(this.activeNode.row, this.activeNode.column);
43880
+ }
43850
43881
  });
43851
43882
  }
43852
43883
  else {
@@ -53655,6 +53686,9 @@ class IgxGridBaseDirective extends DisplayDensityBase {
53655
53686
  * @internal
53656
53687
  */
53657
53688
  copyHandler(event) {
53689
+ if (this.isFilterInput(event)) {
53690
+ return;
53691
+ }
53658
53692
  const selectedColumns = this.gridAPI.grid.selectedColumns();
53659
53693
  const columnData = this.getSelectedColumnsData(this.clipboardOptions.copyFormatters, this.clipboardOptions.copyHeaders);
53660
53694
  let selectedData;
@@ -55264,6 +55298,18 @@ class IgxGridBaseDirective extends DisplayDensityBase {
55264
55298
  return !rec.expression && !rec.summaries && !rec.childGridsData && !rec.detailsData &&
55265
55299
  !this.isGhostRecordAtIndex(dataViewIndex);
55266
55300
  }
55301
+ isFilterInput(event) {
55302
+ const eventComposedPath = event.composedPath ? event.composedPath() : [];
55303
+ if (!eventComposedPath.length) {
55304
+ let target = event.target;
55305
+ while (target.parentNode !== null) {
55306
+ eventComposedPath.push(target);
55307
+ target = target.parentNode;
55308
+ }
55309
+ }
55310
+ const eventPathElements = eventComposedPath.map(el => { var _a; return (_a = el.tagName) === null || _a === void 0 ? void 0 : _a.toLowerCase(); });
55311
+ return eventPathElements.includes('igx-grid-filtering-row') || eventPathElements.includes('igx-grid-filtering-cell');
55312
+ }
55267
55313
  /**
55268
55314
  * Returns if the record at the specified data view index is a ghost.
55269
55315
  * If record is pinned but is not in pinned area then it is a ghost record.
@@ -57420,7 +57466,7 @@ class IgxPageNavigationComponent {
57420
57466
  IgxPageNavigationComponent.decorators = [
57421
57467
  { type: Component, args: [{
57422
57468
  selector: 'igx-page-nav',
57423
- template: "<button\n [title]=\"paginator.resourceStrings.igx_paginator_first_page_button_text\"\n [disabled]=\"paginator.isFirstPageDisabled\"\n [attr.aria-disabled]=\"paginator.isFirstPageDisabled\"\n (click)=\"paginator.paginate(0)\"\n igxButton=\"icon\"\n igxRipple\n [igxRippleCentered]=\"true\"\n>\n <igx-icon>first_page</igx-icon>\n</button>\n<button\n [title]=\"paginator.resourceStrings.igx_paginator_previous_page_button_text\"\n [disabled]=\"paginator.isFirstPageDisabled\"\n [attr.aria-disabled]=\"paginator.isFirstPageDisabled\"\n (click)=\"paginator.previousPage()\"\n igxButton=\"icon\"\n igxRipple\n [igxRippleCentered]=\"true\"\n>\n <igx-icon>chevron_left</igx-icon>\n</button>\n<div class=\"igx-page-nav__text\" aria-current=\"page\">\n <span>{{ paginator.page + 1 }}</span>\n <span\n >&nbsp;{{\n paginator.resourceStrings.igx_paginator_pager_text\n }}&nbsp;</span\n >\n <span>{{ paginator.totalPages }}</span>\n</div>\n<button\n [title]=\"paginator.resourceStrings.igx_paginator_next_page_button_text\"\n [disabled]=\"paginator.isLastPageDisabled\"\n [attr.aria-disabled]=\"paginator.isLastPageDisabled\"\n (click)=\"paginator.nextPage()\"\n igxRipple\n [igxRippleCentered]=\"true\"\n igxButton=\"icon\"\n>\n <igx-icon>chevron_right</igx-icon>\n</button>\n<button\n [title]=\"paginator.resourceStrings.igx_paginator_last_page_button_text\"\n [disabled]=\"paginator.isLastPageDisabled\"\n [attr.aria-disabled]=\"paginator.isLastPageDisabled\"\n (click)=\"paginator.paginate(paginator.totalPages - 1)\"\n igxButton=\"icon\"\n igxRipple\n [igxRippleCentered]=\"true\"\n>\n <igx-icon>last_page</igx-icon>\n</button>\n\n"
57469
+ template: "<button\n [title]=\"paginator.resourceStrings.igx_paginator_first_page_button_text\"\n [disabled]=\"paginator.isFirstPageDisabled\"\n [attr.aria-disabled]=\"paginator.isFirstPageDisabled\"\n (click)=\"paginator.paginate(0)\"\n igxButton=\"icon\"\n igxRipple\n [igxRippleCentered]=\"true\"\n type=\"button\"\n>\n <igx-icon>first_page</igx-icon>\n</button>\n<button\n [title]=\"paginator.resourceStrings.igx_paginator_previous_page_button_text\"\n [disabled]=\"paginator.isFirstPageDisabled\"\n [attr.aria-disabled]=\"paginator.isFirstPageDisabled\"\n (click)=\"paginator.previousPage()\"\n igxButton=\"icon\"\n igxRipple\n [igxRippleCentered]=\"true\"\n type=\"button\"\n>\n <igx-icon>chevron_left</igx-icon>\n</button>\n<div class=\"igx-page-nav__text\" aria-current=\"page\">\n <span>{{ paginator.page + 1 }}</span>\n <span\n >&nbsp;{{\n paginator.resourceStrings.igx_paginator_pager_text\n }}&nbsp;</span\n >\n <span>{{ paginator.totalPages }}</span>\n</div>\n<button\n [title]=\"paginator.resourceStrings.igx_paginator_next_page_button_text\"\n [disabled]=\"paginator.isLastPageDisabled\"\n [attr.aria-disabled]=\"paginator.isLastPageDisabled\"\n (click)=\"paginator.nextPage()\"\n igxRipple\n [igxRippleCentered]=\"true\"\n igxButton=\"icon\"\n type=\"button\"\n>\n <igx-icon>chevron_right</igx-icon>\n</button>\n<button\n [title]=\"paginator.resourceStrings.igx_paginator_last_page_button_text\"\n [disabled]=\"paginator.isLastPageDisabled\"\n [attr.aria-disabled]=\"paginator.isLastPageDisabled\"\n (click)=\"paginator.paginate(paginator.totalPages - 1)\"\n igxButton=\"icon\"\n igxRipple\n [igxRippleCentered]=\"true\"\n type=\"button\"\n>\n <igx-icon>last_page</igx-icon>\n</button>\n\n"
57424
57470
  },] }
57425
57471
  ];
57426
57472
  IgxPageNavigationComponent.ctorParameters = () => [
@@ -62533,7 +62579,6 @@ class IgxGridComponent extends IgxGridBaseDirective {
62533
62579
  if (this.groupTemplate) {
62534
62580
  this._groupRowTemplate = this.groupTemplate.template;
62535
62581
  }
62536
- this.detailTemplate.changes.subscribe(() => this.trackChanges = (_, rec) => ((rec === null || rec === void 0 ? void 0 : rec.detailsData) !== undefined ? rec.detailsData : rec));
62537
62582
  if (this.hideGroupedColumns && this._columns && this.groupingExpressions) {
62538
62583
  this._setGroupColsVisibility(this.hideGroupedColumns);
62539
62584
  }
@@ -62572,6 +62617,7 @@ class IgxGridComponent extends IgxGridBaseDirective {
62572
62617
  */
62573
62618
  ngOnInit() {
62574
62619
  super.ngOnInit();
62620
+ this.trackChanges = (_, rec) => ((rec === null || rec === void 0 ? void 0 : rec.detailsData) !== undefined ? rec.detailsData : rec);
62575
62621
  this.onGroupingDone.pipe(takeUntil(this.destroy$)).subscribe((args) => {
62576
62622
  this.crudService.endEdit(false);
62577
62623
  this.summaryService.updateSummaryCache(args);