igniteui-angular 12.3.34 → 12.3.37

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);
@@ -21371,7 +21376,7 @@ class IgxDragDirective {
21371
21376
  const ghostMarginLeft = parseInt(document.defaultView.getComputedStyle(this.ghostElement)['margin-left'], 10);
21372
21377
  const ghostMarginTop = parseInt(document.defaultView.getComputedStyle(this.ghostElement)['margin-top'], 10);
21373
21378
  this.ghostElement.style.left = (this._ghostStartX - ghostMarginLeft + totalMovedX - this._ghostHostX) + 'px';
21374
- this.ghostElement.style.top = (this._ghostStartY - ghostMarginTop + totalMovedY - this._ghostHostX) + 'px';
21379
+ this.ghostElement.style.top = (this._ghostStartY - ghostMarginTop + totalMovedY - this._ghostHostY) + 'px';
21375
21380
  if (this.pointerEventsEnabled) {
21376
21381
  // The ghostElement takes control for moving and dragging after it has been rendered.
21377
21382
  if (this._pointerDownId !== null) {
@@ -23127,6 +23132,11 @@ class IgxRadioComponent {
23127
23132
  * @hidden
23128
23133
  */
23129
23134
  this.inputId = `${this.id}-input`;
23135
+ /**
23136
+ * @hidden
23137
+ * @internal
23138
+ */
23139
+ this.destroy$ = new Subject();
23130
23140
  /**
23131
23141
  * @hidden
23132
23142
  * @internal
@@ -23206,6 +23216,14 @@ class IgxRadioComponent {
23206
23216
  _clicked() {
23207
23217
  this.select();
23208
23218
  }
23219
+ /**
23220
+ * @hidden
23221
+ * @internal
23222
+ */
23223
+ ngOnDestroy() {
23224
+ this.destroy$.next(true);
23225
+ this.destroy$.complete();
23226
+ }
23209
23227
  /**
23210
23228
  * Selects the current radio button.
23211
23229
  * ```typescript
@@ -23441,6 +23459,11 @@ class IgxRadioGroupDirective {
23441
23459
  * @internal
23442
23460
  */
23443
23461
  this.destroy$ = new Subject();
23462
+ /**
23463
+ * @hidden
23464
+ * @internal
23465
+ */
23466
+ this.queryChange$ = new Subject();
23444
23467
  }
23445
23468
  /**
23446
23469
  * Sets/gets the `value` attribute.
@@ -23586,8 +23609,9 @@ class IgxRadioGroupDirective {
23586
23609
  // The initial value can possibly be set by NgModel and it is possible that
23587
23610
  // the OnInit of the NgModel occurs after the OnInit of this class.
23588
23611
  this._isInitialized = true;
23589
- setTimeout(() => {
23590
- this._initRadioButtons();
23612
+ this.radioButtons.changes.pipe(startWith(0), takeUntil(this.destroy$)).subscribe(() => {
23613
+ this.queryChange$.next();
23614
+ setTimeout(() => this._initRadioButtons());
23591
23615
  });
23592
23616
  }
23593
23617
  /**
@@ -23659,7 +23683,7 @@ class IgxRadioGroupDirective {
23659
23683
  button.checked = true;
23660
23684
  this._selected = button;
23661
23685
  }
23662
- 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));
23663
23687
  });
23664
23688
  }
23665
23689
  }
@@ -37167,7 +37191,12 @@ class IgxSimpleComboComponent extends IgxComboBaseDirective {
37167
37191
  }
37168
37192
  return current === this.selection[0];
37169
37193
  });
37170
- this.dropdown.navigateItem(index);
37194
+ if (!this.isRemote) {
37195
+ // navigate to item only if we have local data
37196
+ // as with remote data this will fiddle with igxFor's scroll handler
37197
+ // and will trigger another chunk load which will break the visualization
37198
+ this.dropdown.navigateItem(index);
37199
+ }
37171
37200
  }
37172
37201
  });
37173
37202
  this.dropdown.opening.pipe(takeUntil(this.destroy$)).subscribe(() => {
@@ -37926,6 +37955,7 @@ class IgxDatePickerComponent extends PickerBaseDirective {
37926
37955
  this._onTouchedCallback = noop;
37927
37956
  this._onValidatorChange = noop;
37928
37957
  this.onStatusChanged = () => {
37958
+ this.disabled = this._ngControl.disabled;
37929
37959
  this.updateValidity();
37930
37960
  this.inputGroup.isRequired = this.required;
37931
37961
  };
@@ -43847,8 +43877,13 @@ class IgxGridNavigationService {
43847
43877
  this.grid.clearCellSelection();
43848
43878
  this.grid.navigateTo(this.activeNode.row, this.activeNode.column, (obj) => {
43849
43879
  var _a;
43850
- (_a = obj.target) === null || _a === void 0 ? void 0 : _a.activate(event);
43851
- this.grid.cdr.detectChanges();
43880
+ if (this.activeNode.row === obj.target.row.index) {
43881
+ (_a = obj.target) === null || _a === void 0 ? void 0 : _a.activate(event);
43882
+ this.grid.cdr.detectChanges();
43883
+ }
43884
+ else {
43885
+ this.grid.navigateTo(this.activeNode.row, this.activeNode.column);
43886
+ }
43852
43887
  });
43853
43888
  }
43854
43889
  else {
@@ -60318,7 +60353,8 @@ class IgxTimePickerComponent extends PickerBaseDirective {
60318
60353
  }
60319
60354
  onStatusChanged() {
60320
60355
  if ((this._ngControl.control.touched || this._ngControl.control.dirty) &&
60321
- (this._ngControl.control.validator || this._ngControl.control.asyncValidator)) {
60356
+ (this._ngControl.control.validator || this._ngControl.control.asyncValidator) &&
60357
+ !this._ngControl.disabled) {
60322
60358
  if (this._inputGroup.isFocused) {
60323
60359
  this.inputDirective.valid = this._ngControl.valid ? IgxInputState.VALID : IgxInputState.INVALID;
60324
60360
  }
@@ -74818,14 +74854,14 @@ class IgxDateRangePickerComponent extends PickerBaseDirective {
74818
74854
  this.onValidatorChange = noop;
74819
74855
  this.onStatusChanged = () => {
74820
74856
  if (this.inputGroup) {
74821
- this.inputDirective.valid = this.isTouchedOrDirty
74857
+ this.inputDirective.valid = this.isTouchedOrDirty && !this._ngControl.disabled
74822
74858
  ? this.getInputState(this.inputGroup.isFocused)
74823
74859
  : IgxInputState.INITIAL;
74824
74860
  }
74825
74861
  else if (this.hasProjectedInputs) {
74826
74862
  this.projectedInputs
74827
74863
  .forEach(i => {
74828
- i.inputDirective.valid = this.isTouchedOrDirty
74864
+ i.inputDirective.valid = this.isTouchedOrDirty && !this._ngControl.disabled
74829
74865
  ? this.getInputState(i.isFocused)
74830
74866
  : IgxInputState.INITIAL;
74831
74867
  ;