@dereekb/dbx-firebase 13.39.0 → 13.40.0

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.
@@ -7835,10 +7835,12 @@ const HIDDEN_NOTIFICATION_DELIVERY_METHODS = new Set([NotificationDeliveryMethod
7835
7835
  * dialog, an admin view). The per-method test message actions are an input for the same reason: the
7836
7836
  * report renders them, whoever owns the store supplies them.
7837
7837
  *
7838
- * The view is client-facing, so it shows only what the user can act on. The check's account-wide
7839
- * findings (`is`), any method the system has no send service for, and the methods in
7840
- * {@link HIDDEN_NOTIFICATION_DELIVERY_METHODS} are left out here — all of them remain on the check
7841
- * itself for an API/callModel consumer.
7838
+ * The view is client-facing, so it shows only what the user can act on. The account-wide findings
7839
+ * (`is`) lead, because they are frequently the whole answer and no method section repeats them — a
7840
+ * global opt-out or a disabled account leaves every method looking correctly configured. Any method
7841
+ * the system has no send service for, and the methods in
7842
+ * {@link HIDDEN_NOTIFICATION_DELIVERY_METHODS}, are left out — both remain on the check itself for an
7843
+ * API/callModel consumer.
7842
7844
  */
7843
7845
  class DbxFirebaseNotificationHealthCheckComponent {
7844
7846
  _presentationService = inject(DbxFirebaseNotificationHealthCheckPresentationService);
@@ -7849,6 +7851,14 @@ class DbxFirebaseNotificationHealthCheckComponent {
7849
7851
  * Left unset the report is read-only, which is what an admin or historical view wants.
7850
7852
  */
7851
7853
  probeActions = input(...(ngDevMode ? [undefined, { debugName: "probeActions" }] : /* istanbul ignore next */ []));
7854
+ /**
7855
+ * The account-wide findings, which apply however each individual method is configured.
7856
+ *
7857
+ * Shown in full rather than filtered: unlike a method section there is no "this channel is off"
7858
+ * noise here, and an account-level finding is often the only explanation the report has — a global
7859
+ * opt-out, a disabled account, or an unreadable auth record leaves every method looking fine.
7860
+ */
7861
+ accountIssuesSignal = computed(() => this.healthCheck()?.is ?? [], ...(ngDevMode ? [{ debugName: "accountIssuesSignal" }] : /* istanbul ignore next */ []));
7852
7862
  statusColorSignal = computed(() => {
7853
7863
  const status = this.healthCheck()?.s;
7854
7864
  return status ? this._presentationService.colorForStatus(status) : 'grey';
@@ -7890,13 +7900,24 @@ class DbxFirebaseNotificationHealthCheckComponent {
7890
7900
  </div>
7891
7901
  </div>
7892
7902
 
7903
+ @if (accountIssuesSignal().length) {
7904
+ <dbx-content-pit class="dbx-mb3">
7905
+ <div class="dbx-text-label-medium dbx-uppercase dbx-tracked-wide dbx-hint">Your Account</div>
7906
+ @for (issue of accountIssuesSignal(); track $index) {
7907
+ <div class="dbx-pt2">
7908
+ <dbx-firebase-notification-healthcheck-issue [issue]="issue"></dbx-firebase-notification-healthcheck-issue>
7909
+ </div>
7910
+ }
7911
+ </dbx-content-pit>
7912
+ }
7913
+
7893
7914
  @for (methodSection of methodSectionsSignal(); track methodSection.result.me) {
7894
7915
  <dbx-content-pit class="dbx-mb3">
7895
7916
  <dbx-firebase-notification-healthcheck-method [result]="methodSection.result" [probeAction]="methodSection.probeAction"></dbx-firebase-notification-healthcheck-method>
7896
7917
  </dbx-content-pit>
7897
7918
  }
7898
7919
  }
7899
- `, isInline: true, dependencies: [{ kind: "directive", type: DbxColorDirective, selector: "[dbxColor]", inputs: ["dbxColor", "dbxColorTone"], outputs: ["dbxColorChange", "dbxColorToneChange"] }, { kind: "directive", type: DbxContentPitDirective, selector: "dbx-content-pit, [dbxContentPit]", inputs: ["scrollable", "square"] }, { kind: "component", type: DbxIconTileComponent, selector: "dbx-icon-tile", inputs: ["icon", "round"] }, { kind: "component", type: DbxFirebaseNotificationHealthCheckMethodComponent, selector: "dbx-firebase-notification-healthcheck-method", inputs: ["result", "probeAction"] }, { kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7920
+ `, isInline: true, dependencies: [{ kind: "directive", type: DbxColorDirective, selector: "[dbxColor]", inputs: ["dbxColor", "dbxColorTone"], outputs: ["dbxColorChange", "dbxColorToneChange"] }, { kind: "directive", type: DbxContentPitDirective, selector: "dbx-content-pit, [dbxContentPit]", inputs: ["scrollable", "square"] }, { kind: "component", type: DbxIconTileComponent, selector: "dbx-icon-tile", inputs: ["icon", "round"] }, { kind: "component", type: DbxFirebaseNotificationHealthCheckIssueComponent, selector: "dbx-firebase-notification-healthcheck-issue", inputs: ["issue", "method"] }, { kind: "component", type: DbxFirebaseNotificationHealthCheckMethodComponent, selector: "dbx-firebase-notification-healthcheck-method", inputs: ["result", "probeAction"] }, { kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7900
7921
  }
7901
7922
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFirebaseNotificationHealthCheckComponent, decorators: [{
7902
7923
  type: Component,
@@ -7913,6 +7934,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
7913
7934
  </div>
7914
7935
  </div>
7915
7936
 
7937
+ @if (accountIssuesSignal().length) {
7938
+ <dbx-content-pit class="dbx-mb3">
7939
+ <div class="dbx-text-label-medium dbx-uppercase dbx-tracked-wide dbx-hint">Your Account</div>
7940
+ @for (issue of accountIssuesSignal(); track $index) {
7941
+ <div class="dbx-pt2">
7942
+ <dbx-firebase-notification-healthcheck-issue [issue]="issue"></dbx-firebase-notification-healthcheck-issue>
7943
+ </div>
7944
+ }
7945
+ </dbx-content-pit>
7946
+ }
7947
+
7916
7948
  @for (methodSection of methodSectionsSignal(); track methodSection.result.me) {
7917
7949
  <dbx-content-pit class="dbx-mb3">
7918
7950
  <dbx-firebase-notification-healthcheck-method [result]="methodSection.result" [probeAction]="methodSection.probeAction"></dbx-firebase-notification-healthcheck-method>
@@ -7924,7 +7956,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
7924
7956
  class: 'd-block dbx-firebase-notification-healthcheck'
7925
7957
  },
7926
7958
  standalone: true,
7927
- imports: [DatePipe, DbxColorDirective, DbxContentPitDirective, DbxIconTileComponent, DbxFirebaseNotificationHealthCheckMethodComponent],
7959
+ imports: [DatePipe, DbxColorDirective, DbxContentPitDirective, DbxIconTileComponent, DbxFirebaseNotificationHealthCheckIssueComponent, DbxFirebaseNotificationHealthCheckMethodComponent],
7928
7960
  changeDetection: ChangeDetectionStrategy.OnPush
7929
7961
  }]
7930
7962
  }], propDecorators: { healthCheck: [{ type: i0.Input, args: [{ isSignal: true, alias: "healthCheck", required: false }] }], probeActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "probeActions", required: false }] }] } });
@@ -8548,7 +8580,13 @@ class DbxFirebaseNotificationHealthCheckViewComponent {
8548
8580
  */
8549
8581
  probeNoticeForMethod(input) {
8550
8582
  const { noun, secondsRemaining, justSent, pending } = input;
8551
- const sent = justSent ? `A ${noun} was just sent.` : secondsRemaining > 0 ? `A ${noun} was sent recently.` : undefined;
8583
+ let sent;
8584
+ if (justSent) {
8585
+ sent = `A ${noun} was just sent.`;
8586
+ }
8587
+ else if (secondsRemaining > 0) {
8588
+ sent = `A ${noun} was sent recently.`;
8589
+ }
8552
8590
  const waiting = pending ? ' The result will appear here on its own as soon as we hear whether it arrived.' : '';
8553
8591
  const nextAllowed = secondsRemaining > 0 ? ` Another can be sent in ${formatSecondsRemaining(secondsRemaining)}.` : '';
8554
8592
  return sent == null ? undefined : `${sent}${waiting}${nextAllowed}`;