@rivet-health/design-system 41.0.0 → 41.0.1

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.
@@ -1,8 +1,8 @@
1
1
  import * as i0 from "@angular/core";
2
- import { ChangeDetectionStrategy, Component, ContentChild, ContentChildren, DOCUMENT, Directive, ElementRef, EventEmitter, HostBinding, HostListener, Inject, Injectable, Input, NgModule, Optional, Output, Pipe, Self, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation } from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, ContentChild, ContentChildren, DOCUMENT, Directive, ElementRef, EventEmitter, HostBinding, HostListener, Inject, Injectable, Input, NgModule, Optional, Output, Pipe, Self, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation, afterEveryRender } from "@angular/core";
3
3
  import * as i1 from "@angular/common";
4
4
  import { CommonModule, CurrencyPipe, DatePipe as DatePipe$1, DecimalPipe, PercentPipe } from "@angular/common";
5
- import { BehaviorSubject, ReplaySubject, Subject, combineLatest, concatWith, connectable, distinctUntilChanged, filter, from, fromEvent, map, merge, mergeScan, of, scan, share, shareReplay, skip, skipUntil, startWith, switchMap, take, takeUntil, tap } from "rxjs";
5
+ import { BehaviorSubject, ReplaySubject, Subject, combineLatest, concatWith, connectable, distinctUntilChanged, filter, from, fromEvent, map, merge, mergeScan, of, scan, share, shareReplay, skip, skipUntil, startWith, switchMap, takeUntil, tap } from "rxjs";
6
6
  import { timeDay, timeDays, timeMonth, timeMonths, timeSunday, timeWeek, timeYear, timeYears, utcDay, utcMonth, utcWeek, utcYear } from "d3-time";
7
7
  import { timeFormat, utcFormat } from "d3-time-format";
8
8
  import { cloneDeep, debounce, defaultsDeep, difference, flattenDeep, isEqual, isNumber, orderBy, partition, range, sortBy, sum, sumBy, toInteger, union, uniq, uniqueId } from "lodash";
@@ -12443,7 +12443,6 @@ i0.ɵɵngDeclareClassMetadata({
12443
12443
  var FormDialogComponent = class FormDialogComponent {
12444
12444
  constructor(dialogStack, zone) {
12445
12445
  this.dialogStack = dialogStack;
12446
- this.zone = zone;
12447
12446
  this.customBody = false;
12448
12447
  this.submitText = "Submit";
12449
12448
  this.submittingText = "Submitting...";
@@ -12458,12 +12457,15 @@ var FormDialogComponent = class FormDialogComponent {
12458
12457
  this.titleId = uniqueId("riv-form-dialog-title-");
12459
12458
  this.hook = ANIMATION_CONSTANTS.DIALOG.HOOK;
12460
12459
  this.stackKey = dialogStack.register();
12461
- }
12462
- ngAfterViewInit() {
12463
- this.initialFocus = this.zone.onStable.pipe(map(() => this.dialog?.nativeElement), filter((dialog) => dialog?.isConnected ?? false), take(1)).subscribe((dialog) => this.zone.run(() => FormDialogComponent.focusInitial(dialog)));
12460
+ const initialFocus = afterEveryRender(() => {
12461
+ const dialog = this.dialog?.nativeElement;
12462
+ if (dialog?.isConnected) {
12463
+ initialFocus.destroy();
12464
+ zone.run(() => FormDialogComponent.focusInitial(dialog));
12465
+ }
12466
+ });
12464
12467
  }
12465
12468
  ngOnDestroy() {
12466
- this.initialFocus?.unsubscribe();
12467
12469
  this.dialogStack.unregister(this.stackKey);
12468
12470
  }
12469
12471
  handleKeydown(event) {