igniteui-angular 13.2.11 → 13.2.12

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.
@@ -7,7 +7,7 @@ import { NgModel, FormControlName, NG_VALUE_ACCESSOR, NG_VALIDATORS, CheckboxReq
7
7
  import * as i4 from '@angular/common';
8
8
  import { isPlatformBrowser, formatDate as formatDate$1, CurrencyPipe, formatPercent, formatNumber, getLocaleCurrencyCode, DatePipe, DOCUMENT, CommonModule, FormatWidth, getLocaleDateFormat, getLocaleNumberFormat, NumberFormatStyle, getCurrencySymbol } from '@angular/common';
9
9
  import { Observable, Subject, fromEvent, interval, animationFrameScheduler, noop, merge, Subscription, timer, pipe } from 'rxjs';
10
- import { takeUntil, filter, first as first$1, throttleTime, take, throttle, debounce, tap, switchMap, skipLast, map, debounceTime, shareReplay, takeWhile, pluck } from 'rxjs/operators';
10
+ import { takeUntil, filter, first as first$1, throttleTime, take, throttle, startWith, debounce, tap, switchMap, skipLast, map, debounceTime, shareReplay, takeWhile, pluck } from 'rxjs/operators';
11
11
  import mergeWith from 'lodash.mergewith';
12
12
  import { __awaiter, __decorate, __param } from 'tslib';
13
13
  import * as JSZip from 'jszip';
@@ -17465,6 +17465,11 @@ let nextId$3 = 0;
17465
17465
  class IgxRadioComponent {
17466
17466
  constructor(cdr) {
17467
17467
  this.cdr = cdr;
17468
+ /**
17469
+ * @hidden
17470
+ * @internal
17471
+ */
17472
+ this.destroy$ = new Subject();
17468
17473
  /**
17469
17474
  * Sets/gets the `id` of the radio component.
17470
17475
  * If not set, the `id` of the first radio component will be `"igx-radio-0"`.
@@ -17638,6 +17643,14 @@ class IgxRadioComponent {
17638
17643
  set disabled(value) {
17639
17644
  this._disabled = (value === '') || value;
17640
17645
  }
17646
+ /**
17647
+ * @hidden
17648
+ * @internal
17649
+ */
17650
+ ngOnDestroy() {
17651
+ this.destroy$.next(true);
17652
+ this.destroy$.complete();
17653
+ }
17641
17654
  /**
17642
17655
  * @hidden
17643
17656
  * @internal
@@ -17937,6 +17950,11 @@ class IgxRadioGroupDirective {
17937
17950
  * @internal
17938
17951
  */
17939
17952
  this.destroy$ = new Subject();
17953
+ /**
17954
+ * @hidden
17955
+ * @internal
17956
+ */
17957
+ this.queryChange$ = new Subject();
17940
17958
  }
17941
17959
  /**
17942
17960
  * Sets/gets the `value` attribute.
@@ -18082,8 +18100,9 @@ class IgxRadioGroupDirective {
18082
18100
  // The initial value can possibly be set by NgModel and it is possible that
18083
18101
  // the OnInit of the NgModel occurs after the OnInit of this class.
18084
18102
  this._isInitialized = true;
18085
- setTimeout(() => {
18086
- this._initRadioButtons();
18103
+ this.radioButtons.changes.pipe(startWith(0), takeUntil(this.destroy$)).subscribe(() => {
18104
+ this.queryChange$.next();
18105
+ setTimeout(() => this._initRadioButtons());
18087
18106
  });
18088
18107
  }
18089
18108
  /**
@@ -18161,7 +18180,7 @@ class IgxRadioGroupDirective {
18161
18180
  button.checked = true;
18162
18181
  this._selected = button;
18163
18182
  }
18164
- button.change.pipe(takeUntil(this.destroy$)).subscribe((ev) => this._selectedRadioButtonChanged(ev));
18183
+ button.change.pipe(takeUntil(button.destroy$), takeUntil(this.destroy$), takeUntil(this.queryChange$)).subscribe((ev) => this._selectedRadioButtonChanged(ev));
18165
18184
  });
18166
18185
  }
18167
18186
  }
@@ -23771,9 +23790,13 @@ class IgxGridSelectionService {
23771
23790
  */
23772
23791
  this.pointerEventInGridBody = false;
23773
23792
  this._ranges = new Set();
23774
- this.pointerOriginHandler = () => {
23793
+ this.pointerOriginHandler = (event) => {
23775
23794
  this.pointerEventInGridBody = false;
23776
23795
  document.body.removeEventListener('pointerup', this.pointerOriginHandler);
23796
+ const targetTagName = event.target.tagName.toLowerCase();
23797
+ if (targetTagName !== 'igx-grid-cell' && targetTagName !== 'igx-tree-grid-cell') {
23798
+ this.pointerUp(this._lastSelectedNode, this.grid.rangeSelected, true);
23799
+ }
23777
23800
  };
23778
23801
  this.initPointerState();
23779
23802
  this.initKeyboardState();
@@ -23890,6 +23913,7 @@ class IgxGridSelectionService {
23890
23913
  * and the start node of the `state`.
23891
23914
  */
23892
23915
  generateRange(node, state) {
23916
+ this._lastSelectedNode = node;
23893
23917
  if (!state) {
23894
23918
  return {
23895
23919
  rowStart: node.row,
@@ -24007,8 +24031,8 @@ class IgxGridSelectionService {
24007
24031
  }
24008
24032
  return true;
24009
24033
  }
24010
- pointerUp(node, emitter) {
24011
- if (this.dragMode) {
24034
+ pointerUp(node, emitter, firedOutsideGrid) {
24035
+ if (this.dragMode || firedOutsideGrid) {
24012
24036
  this.restoreTextSelection();
24013
24037
  this.addRangeMeta(node, this.pointerState);
24014
24038
  this.mergeMap(this.selection, this.temp);
@@ -58337,8 +58361,13 @@ class IgxGridNavigationService {
58337
58361
  this.grid.clearCellSelection();
58338
58362
  this.grid.navigateTo(this.activeNode.row, this.activeNode.column, (obj) => {
58339
58363
  var _a;
58340
- (_a = obj.target) === null || _a === void 0 ? void 0 : _a.activate(event);
58341
- this.grid.cdr.detectChanges();
58364
+ if (this.activeNode.row === obj.target.row.index) {
58365
+ (_a = obj.target) === null || _a === void 0 ? void 0 : _a.activate(event);
58366
+ this.grid.cdr.detectChanges();
58367
+ }
58368
+ else {
58369
+ this.grid.navigateTo(this.activeNode.row, this.activeNode.column);
58370
+ }
58342
58371
  });
58343
58372
  }
58344
58373
  else {