@forgeroute/ui 0.5.18 → 0.5.20

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.
Files changed (35) hide show
  1. package/fesm2022/forgeroute-ui-boards.mjs +2 -2
  2. package/fesm2022/forgeroute-ui-boards.mjs.map +1 -1
  3. package/fesm2022/forgeroute-ui-chip.mjs +25 -6
  4. package/fesm2022/forgeroute-ui-chip.mjs.map +1 -1
  5. package/fesm2022/{forgeroute-ui-core-ui-labels.es-Woi3az70.mjs → forgeroute-ui-core-ui-labels.es-ChTmqFlw.mjs} +37 -10
  6. package/fesm2022/forgeroute-ui-core-ui-labels.es-ChTmqFlw.mjs.map +1 -0
  7. package/fesm2022/forgeroute-ui-core.mjs +94 -19
  8. package/fesm2022/forgeroute-ui-core.mjs.map +1 -1
  9. package/fesm2022/forgeroute-ui-data-table-core.mjs +217 -26
  10. package/fesm2022/forgeroute-ui-data-table-core.mjs.map +1 -1
  11. package/fesm2022/forgeroute-ui-messaging.mjs +19 -2
  12. package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
  13. package/fesm2022/forgeroute-ui-more-menu.mjs +61 -8
  14. package/fesm2022/forgeroute-ui-more-menu.mjs.map +1 -1
  15. package/fesm2022/forgeroute-ui-multi-select.mjs +2 -1
  16. package/fesm2022/forgeroute-ui-multi-select.mjs.map +1 -1
  17. package/fesm2022/forgeroute-ui-payments.mjs +870 -57
  18. package/fesm2022/forgeroute-ui-payments.mjs.map +1 -1
  19. package/fesm2022/forgeroute-ui-quickbooks.mjs.map +1 -1
  20. package/fesm2022/forgeroute-ui-square.mjs.map +1 -1
  21. package/fesm2022/forgeroute-ui-stripe.mjs +815 -49
  22. package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
  23. package/fesm2022/forgeroute-ui-table-types.mjs.map +1 -1
  24. package/package.json +2 -6
  25. package/types/forgeroute-ui-chip.d.ts +11 -1
  26. package/types/forgeroute-ui-core.d.ts +65 -12
  27. package/types/forgeroute-ui-data-table-core.d.ts +60 -1
  28. package/types/forgeroute-ui-messaging.d.ts +15 -5
  29. package/types/forgeroute-ui-more-menu.d.ts +7 -0
  30. package/types/forgeroute-ui-payments.d.ts +332 -8
  31. package/types/forgeroute-ui-quickbooks.d.ts +2 -2
  32. package/types/forgeroute-ui-square.d.ts +1 -1
  33. package/types/forgeroute-ui-stripe.d.ts +293 -20
  34. package/types/forgeroute-ui-table-types.d.ts +29 -0
  35. package/fesm2022/forgeroute-ui-core-ui-labels.es-Woi3az70.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from "@angular/core";
2
- import { ApplicationRef, ChangeDetectionStrategy, Component, ElementRef, EnvironmentInjector, Injectable, InjectionToken, Input, PLATFORM_ID, Renderer2, computed, createComponent, effect, forwardRef, inject, input, isDevMode, makeEnvironmentProviders, output, provideAppInitializer, signal, untracked, viewChild } from "@angular/core";
2
+ import { ApplicationRef, ChangeDetectionStrategy, Component, ElementRef, EnvironmentInjector, Injectable, InjectionToken, Injector, Input, PLATFORM_ID, Renderer2, afterNextRender, computed, createComponent, effect, forwardRef, inject, input, isDevMode, makeEnvironmentProviders, output, provideAppInitializer, signal, untracked, viewChild } from "@angular/core";
3
3
  import { HttpErrorResponse } from "@angular/common/http";
4
4
  import { Subject, catchError, throwError } from "rxjs";
5
5
  import { DATE_PIPE_DEFAULT_OPTIONS, DATE_PIPE_DEFAULT_TIMEZONE, DOCUMENT, NgTemplateOutlet, formatDate, isPlatformBrowser } from "@angular/common";
@@ -1006,6 +1006,19 @@ const UI_DEFAULT_LABELS = {
1006
1006
  "paymentSidePanel.readerTimeout": "The reader did not respond within {{ span }}. Check that the reader is powered on and connected to WiFi.",
1007
1007
  "paymentSidePanel.recordFailed": "Failed to record payment",
1008
1008
  "paymentSidePanel.removeEntry": "Remove {{ method }} {{ amount }}",
1009
+ "paymentBlocked.default": "Payments are not available right now.",
1010
+ "paymentHeld.default": "A payment started from this panel may still be open. Wait for it to finish, or check it, before starting another.",
1011
+ "paymentHeld.check": "Check again",
1012
+ "paymentHeld.retryCancel": "Try canceling again",
1013
+ "paymentHeld.stillOpen": "The payment is still open. Wait for it to finish or cancel it, then check again.",
1014
+ "paymentHeld.inconclusive": "The payment could not be confirmed either way. Check it in your payment processor, then confirm below.",
1015
+ "paymentHeld.checkFailed": "The check could not be completed. Try again.",
1016
+ "paymentHeld.release": "I checked: nothing is open. Continue",
1017
+ "paymentHeld.released": "Checked: no payment is open any more.",
1018
+ "paymentHeld.succeeded": "The payment went through.",
1019
+ "paymentHeld.closedBeforeDone": "The payment was taken but the panel was closed before it was finished. Check the payment before starting another.",
1020
+ "paymentHeld.releasedByUser": "The payment could not be confirmed; the user confirmed that nothing is open.",
1021
+ "paymentSidePanel.cancelUnconfirmed": "The reader payment could not be confirmed as canceled. It may still be open. Check the reader before starting another payment.",
1009
1022
  "paymentSidePanel.removedFromSplit": "Removed {{ method }} {{ amount }} from the split.",
1010
1023
  "paymentSidePanel.selectAtLeastOneCharge": "Select at least one charge to apply this payment to.",
1011
1024
  "paymentSidePanel.span.minute_one": "{{ count }} minute",
@@ -2379,7 +2392,7 @@ const UI_DEFAULT_LABELS = {
2379
2392
  "qboErrors.status.unavailable": "The payment service is unavailable right now. Please try again in a few minutes.",
2380
2393
  "paymentAttempt.checking": "Checking your payment...",
2381
2394
  "paymentAttempt.checkingHelp": "Please wait and do not pay again. We are making sure your payment went through.",
2382
- "paymentAttempt.stillUnknown": "We could not confirm your payment yet. Please check again in a moment and do not pay again.",
2395
+ "paymentAttempt.stillChecking": "We could not confirm your payment yet. Please check again in a moment and do not pay again.",
2383
2396
  "paymentAttempt.checkAgain": "Check again",
2384
2397
  "paymentAttempt.waiting": "Waiting for your payment to be confirmed...",
2385
2398
  "paymentAttempt.startOver": "Start over",
@@ -2419,7 +2432,7 @@ const UI_DEFAULT_LABELS = {
2419
2432
  "paymentReadiness.storageWarning": "Your browser limits storage, so a page reload or a second tab during a payment cannot be recovered automatically. Please do not reload or open this page twice while paying.",
2420
2433
  "paymentSetup.checking": "Checking that your payment method was saved...",
2421
2434
  "paymentSetup.checkingHelp": "Please wait and do not save it again. We are making sure your payment method was saved.",
2422
- "paymentSetup.stillUnknown": "We could not confirm yet that your payment method was saved. Please check again in a moment and do not save it again.",
2435
+ "paymentSetup.stillChecking": "We could not confirm yet that your payment method was saved. Please check again in a moment and do not save it again.",
2423
2436
  "paymentSetup.waiting": "Waiting for your payment method to be confirmed...",
2424
2437
  "paymentSetup.paid": "A payment method was just saved for this. If you need to save another one, please wait a moment or contact support.",
2425
2438
  "paymentSetup.queuedOffline": "You appear to be offline. Your payment method was not saved. Please check your connection and try again.",
@@ -2427,7 +2440,7 @@ const UI_DEFAULT_LABELS = {
2427
2440
  "paymentSetup.awaitingVerification": "Bank verification required: your bank account has NOT been saved yet. Until you verify the small deposits (or descriptor code) from your bank, it cannot be used and nothing will be charged.",
2428
2441
  "paymentSetup.slowConnection": "Your connection is too slow to save your payment method safely. Please try again on a better connection.",
2429
2442
  "paymentSetup.serviceUnavailable": "Saving payment methods is temporarily unavailable. Please try again in a few minutes.",
2430
- "paymentSetup.outcomeUnknown": "We are still confirming the result of an earlier attempt to save a payment method. Please wait and do not save it again.",
2443
+ "paymentSetup.outcomeChecking": "We are still confirming the result of an earlier attempt to save a payment method. Please wait and do not save it again.",
2431
2444
  "paymentSetup.inFlight": "A payment method for this is already being saved. Please wait and check again shortly.",
2432
2445
  "paymentSetup.readinessChecking": "Checking that saving a payment method is available...",
2433
2446
  "paymentSetup.readinessGeneric": "Saving a payment method is not available right now. Please try again shortly.",
@@ -2468,12 +2481,12 @@ const UI_DEFAULT_LABELS = {
2468
2481
  "stripeReader.status.reader_busy.text": "A payment is waiting on {{ reader }}. Finish or cancel it before starting another.",
2469
2482
  "stripeReader.status.merchant_not_ready.title": "Payments are not set up",
2470
2483
  "stripeReader.status.merchant_not_ready.text": "Finish setting up payments before card payments can be taken, including with a card reader.",
2471
- "stripeReader.status.unknown.title": "Could not check the card reader",
2472
- "stripeReader.status.unknown.text": "The card reader could not be checked right now. Nothing was changed. Check again in a moment.",
2484
+ "stripeReader.status.checking.title": "Checking the card reader",
2485
+ "stripeReader.status.checking.text": "The card reader has not been confirmed yet. Nothing was changed. Check again in a moment.",
2473
2486
  "stripeReader.status.reconnect_required.title": "Payment account needs reconnecting",
2474
2487
  "stripeReader.status.reconnect_required.text": "Your payment account needs to be reconnected before card payments can be taken, including with a card reader.",
2475
- "stripeReader.status.unknown_attention.title": "The payment account needs attention",
2476
- "stripeReader.status.unknown_attention.text": "The card reader could not be checked because the payment account needs attention. Nothing was changed. Reconnect payments, then check again.",
2488
+ "stripeReader.status.stale_attention.title": "The payment account needs attention",
2489
+ "stripeReader.status.stale_attention.text": "The card reader could not be checked because the payment account needs attention. Nothing was changed. Reconnect payments, then check again.",
2477
2490
  "stripeReader.status.reader_ready.live": "Card reader ready: {{ reader }}",
2478
2491
  "stripeReader.status.connect": "Connect a reader",
2479
2492
  "stripeReader.status.get": "Get a card reader",
@@ -2482,6 +2495,12 @@ const UI_DEFAULT_LABELS = {
2482
2495
  "stripeReader.status.reconnect": "Reconnect payments",
2483
2496
  "stripeReader.status.cancelBusy": "Cancel that payment",
2484
2497
  "stripeReader.status.manual": "Take a manual payment instead",
2498
+ "stripeReader.status.getInfo": "How to get a card reader",
2499
+ "stripeReaderBanner.getReader": "Get a card reader to take in-person card payments.",
2500
+ "stripeReaderBanner.setupFirst": "Set up payments to take card payments, including in person with a card reader.",
2501
+ "stripeReaderBanner.sandbox": "Card readers are not available in a sandbox account.",
2502
+ "stripeReaderBanner.serviceDisabled": "Card readers are turned off for this account.",
2503
+ "stripeReaderBanner.processorUnsupported": "Card readers are not available with this payment processor.",
2485
2504
  "stripeReader.mode.label": "How is the card paid?",
2486
2505
  "stripeReader.mode.reader": "Card reader",
2487
2506
  "stripeReader.mode.manual": "Enter card manually",
@@ -2546,7 +2565,7 @@ const UI_DEFAULT_LABELS = {
2546
2565
  "stripeReader.refusal.duplicate_suspected": "An identical payment was made moments ago. Check the payments before taking another.",
2547
2566
  "stripeReader.refusal.paid": "A payment for this was already received. Check the payments before taking another one.",
2548
2567
  "stripeReader.refusal.offline": "You are offline. Nothing was sent.",
2549
- "stripeReader.refusal.outcome_unknown": "We are still confirming the result of an earlier payment. Do not start another one.",
2568
+ "stripeReader.refusal.outcome_checking": "We are still confirming the result of an earlier payment. Do not start another one.",
2550
2569
  "stripeReader.refusal.queued_offline": "You appear to be offline. The payment was not sent. Check your connection and try again.",
2551
2570
  "stripeReader.refusal.start_not_received": "We have no record of this payment, so it was not started. You can start again.",
2552
2571
  "stripeReader.refusal.retry_unreachable": "The payment could not be sent to the reader again. It was not changed: check it in a moment.",
@@ -2639,7 +2658,25 @@ const UI_DEFAULT_LABELS = {
2639
2658
  "stripeReader.wait.unconfirmed.text": "We could not confirm whether this payment reached the reader. Check again before taking another payment. If the customer was charged, the payment shows here once it is found.",
2640
2659
  "stripeReader.cancelBusy.timeout": "The payment could not be canceled in time. It may still be open: check the card reader again before taking another payment.",
2641
2660
  "stripeReader.fees.unavailable": "The card reader fees are not available, so nothing can be sent to the reader. Try again in a moment.",
2642
- "stripeReaders.failed.timeout": "The card reader service did not answer in time. The list was checked again: look at it before trying once more."
2661
+ "stripeReaders.failed.timeout": "The card reader service did not answer in time. The list was checked again: look at it before trying once more.",
2662
+ "paymentAttempt.stillUnknown": "We could not confirm your payment yet. Please check again in a moment and do not pay again.",
2663
+ "paymentSetup.stillUnknown": "We could not confirm yet that your payment method was saved. Please check again in a moment and do not save it again.",
2664
+ "paymentSetup.outcomeUnknown": "We are still confirming the result of an earlier attempt to save a payment method. Please wait and do not save it again.",
2665
+ "stripeReader.status.unknown.title": "Checking the card reader",
2666
+ "stripeReader.status.unknown.text": "The card reader has not been confirmed yet. Nothing was changed. Check again in a moment.",
2667
+ "stripeReader.status.unknown_attention.title": "The payment account needs attention",
2668
+ "stripeReader.status.unknown_attention.text": "The card reader could not be checked because the payment account needs attention. Nothing was changed. Reconnect payments, then check again.",
2669
+ "stripeReader.refusal.outcome_unknown": "We are still confirming the result of an earlier payment. Do not start another one."
2670
+ };
2671
+ const DEPRECATED_LABEL_ALIASES = {
2672
+ "paymentAttempt.stillUnknown": "paymentAttempt.stillChecking",
2673
+ "paymentSetup.stillUnknown": "paymentSetup.stillChecking",
2674
+ "paymentSetup.outcomeUnknown": "paymentSetup.outcomeChecking",
2675
+ "stripeReader.status.unknown.title": "stripeReader.status.checking.title",
2676
+ "stripeReader.status.unknown.text": "stripeReader.status.checking.text",
2677
+ "stripeReader.status.unknown_attention.title": "stripeReader.status.stale_attention.title",
2678
+ "stripeReader.status.unknown_attention.text": "stripeReader.status.stale_attention.text",
2679
+ "stripeReader.refusal.outcome_unknown": "stripeReader.refusal.outcome_checking"
2643
2680
  };
2644
2681
  function interpolate$1(text, params) {
2645
2682
  if (!params) return text;
@@ -2677,6 +2714,7 @@ var UiLabelsService = class UiLabelsService {
2677
2714
  setLabels(dictionary) {
2678
2715
  const clean = {};
2679
2716
  for (const [k, v] of Object.entries(dictionary ?? {})) if (k in UI_DEFAULT_LABELS && typeof v === "string" && v.trim() !== "") clean[k] = v;
2717
+ for (const [old, now] of Object.entries(DEPRECATED_LABEL_ALIASES)) if (old in clean && !(dictionary && typeof dictionary[now] === "string" && dictionary[now].trim() !== "")) clean[now] = clean[old];
2680
2718
  this.overrides.set(clean);
2681
2719
  }
2682
2720
  setLocale(locale) {
@@ -2704,7 +2742,8 @@ var UiLabelsService = class UiLabelsService {
2704
2742
  return uiFormatHour(hour, this.locale());
2705
2743
  }
2706
2744
  t(key, params) {
2707
- return interpolate$1(this.overrides()[key] ?? UI_DEFAULT_LABELS[key] ?? key, params);
2745
+ const target = DEPRECATED_LABEL_ALIASES[key] ?? key;
2746
+ return interpolate$1(this.overrides()[target] ?? UI_DEFAULT_LABELS[target] ?? key, params);
2708
2747
  }
2709
2748
  static {
2710
2749
  this.ɵfac = i0.ɵɵngDeclareFactory({
@@ -2995,6 +3034,15 @@ var OverlayStack = class OverlayStack {
2995
3034
  const i = this.stack.indexOf(overlay);
2996
3035
  if (i >= 0) this.stack.splice(i, 1);
2997
3036
  }
3037
+ indexOf(overlay) {
3038
+ return this.stack.indexOf(overlay);
3039
+ }
3040
+ pruneDetached() {
3041
+ for (const overlay of [...this.stack]) {
3042
+ const o = overlay;
3043
+ if (o.isDetached?.()) o.onOrphaned?.();
3044
+ }
3045
+ }
2998
3046
  isTop(overlay) {
2999
3047
  return this.stack.length > 0 && this.stack[this.stack.length - 1] === overlay;
3000
3048
  }
@@ -3447,6 +3495,10 @@ var ModalComponent = class ModalComponent {
3447
3495
  this.el = inject(ElementRef);
3448
3496
  this.ren = inject(Renderer2);
3449
3497
  this.doc = inject(DOCUMENT);
3498
+ this.injector = inject(Injector);
3499
+ this._layer = signal(0, ...ngDevMode ? [{ debugName: "_layer" }] : /* istanbul ignore next */ []);
3500
+ this.backdropZ = computed(() => 200 + 2 * this._layer(), ...ngDevMode ? [{ debugName: "backdropZ" }] : /* istanbul ignore next */ []);
3501
+ this.dialogZ = computed(() => 201 + 2 * this._layer(), ...ngDevMode ? [{ debugName: "dialogZ" }] : /* istanbul ignore next */ []);
3450
3502
  this._overlays = inject(OverlayStack);
3451
3503
  this._prevFocus = null;
3452
3504
  this._scrollLocked = false;
@@ -3457,6 +3509,7 @@ var ModalComponent = class ModalComponent {
3457
3509
  effect(() => {
3458
3510
  if (this.open()) {
3459
3511
  this._overlays.push(this);
3512
+ this._layer.set(this._overlays.indexOf(this));
3460
3513
  this._prevFocus = resolveTrigger(this.doc, this._interaction);
3461
3514
  this._stopIframeKeys?.();
3462
3515
  this._stopIframeKeys = bridgeIframeKeys(this.el.nativeElement, this.doc, {
@@ -3478,6 +3531,7 @@ var ModalComponent = class ModalComponent {
3478
3531
  this._stopIframeKeys = null;
3479
3532
  restoreFocus(untracked(() => this.returnFocusTo()), this._prevFocus);
3480
3533
  this._prevFocus = null;
3534
+ afterNextRender(() => this._overlays.pruneDetached(), { injector: this.injector });
3481
3535
  }
3482
3536
  });
3483
3537
  }
@@ -3519,6 +3573,7 @@ var ModalComponent = class ModalComponent {
3519
3573
  redirectFromGuard(which, this.el.nativeElement, this.el.nativeElement.querySelector(".m-modal"), event?.relatedTarget ?? null);
3520
3574
  }
3521
3575
  _focusFirst() {
3576
+ if (!this._overlays.isTop(this)) return;
3522
3577
  focusInitial(this.el.nativeElement.querySelector(".m-modal"), this.el.nativeElement.querySelector(".m-body"), this.doc);
3523
3578
  }
3524
3579
  _focusable() {
@@ -3668,8 +3723,8 @@ var ModalComponent = class ModalComponent {
3668
3723
  ngImport: i0,
3669
3724
  template: `
3670
3725
  @if (open()) {
3671
- <div class="m-backdrop" [class.m-kiosk-backdrop]="kiosk()" (click)="dismiss('backdrop')"></div>
3672
- <div class="m-modal" [class.m-kiosk]="kiosk()" role="dialog" aria-modal="true" tabindex="-1" [attr.aria-labelledby]="titleId" [attr.aria-describedby]="describedById()" [attr.aria-busy]="busy() ? 'true' : null" [attr.data-testid]="dialogTestId() || null" [style.max-width]="maxWidth()">
3726
+ <div class="m-backdrop" [class.m-kiosk-backdrop]="kiosk()" [style.z-index]="backdropZ()" (click)="dismiss('backdrop')"></div>
3727
+ <div class="m-modal" [class.m-kiosk]="kiosk()" role="dialog" aria-modal="true" tabindex="-1" [attr.aria-labelledby]="titleId" [attr.aria-describedby]="describedById()" [attr.aria-busy]="busy() ? 'true' : null" [attr.data-testid]="dialogTestId() || null" [style.max-width]="maxWidth()" [style.z-index]="dialogZ()">
3673
3728
  <span class="m-focus-guard" data-ui-focus-guard="start" tabindex="0" (focus)="onGuardFocus('start', $event)"></span>
3674
3729
  <div class="m-header">
3675
3730
  <div class="m-header-text">
@@ -3700,7 +3755,7 @@ var ModalComponent = class ModalComponent {
3700
3755
  }
3701
3756
  `,
3702
3757
  isInline: true,
3703
- styles: [".m-backdrop{position:fixed;inset:0;background:#02081773;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);z-index:200;animation:m-fade .18s ease}.m-modal:focus{outline:none}.m-close:disabled{opacity:.4;cursor:not-allowed}.m-focus-guard{position:absolute;width:1px;height:1px;padding:0;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;outline:none}.m-modal{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:#fff;border-radius:16px;border:1px solid rgba(0,0,0,.07);z-index:201;width:calc(100% - 32px);box-shadow:0 4px 6px #0000000a,0 16px 32px #0000001f,0 48px 96px #0000001a;max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);display:flex;flex-direction:column;animation:m-scale .22s cubic-bezier(.16,1,.3,1)}.m-header{display:flex;align-items:flex-start;justify-content:space-between;padding:20px 24px 16px;background:#f8fafc;border-bottom:1px solid #e2e8f0;border-radius:16px 16px 0 0;flex-shrink:0}.m-header-text{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0}.m-title{font-size:1.125rem;font-weight:700;color:#0f172a;margin:0;letter-spacing:-.02em;line-height:1.3}.m-description{font-size:.8125rem;color:#64748b;margin:0;line-height:1.4}.m-close{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:8px;border:none;background:none;cursor:pointer;color:#94a3b8;flex-shrink:0;margin-left:12px;transition:background .13s,color .13s}.m-close:hover{background:#f1f5f9;color:#1e293b}.m-close:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.m-body{padding:20px 24px;overflow-y:auto;flex:1;min-height:0;font-size:.9rem;color:#475569;line-height:1.65}.m-footer{padding:14px 24px 18px;background:#f8fafc;border-top:1px solid #e2e8f0;border-radius:0 0 16px 16px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:8px}.m-footer:not(:has(*)){display:none}.m-footer-left{display:flex;align-items:center;gap:8px}.m-footer-right{display:flex;align-items:center;gap:8px;margin-left:auto}.m-footer-center{display:flex;align-items:center;justify-content:center;gap:8px;flex:1 1 auto;margin:0 8px}.m-footer-center:empty{display:none}@media(max-width:480px){.m-modal:not(.m-kiosk){top:auto;bottom:var(--ui-kb, 0px);left:0;right:0;transform:none;width:100vw;max-width:none!important;max-height:min(85dvh,var(--ui-vvh, 100dvh));border-radius:20px 20px 0 0;animation:m-up .24s cubic-bezier(.16,1,.3,1)}.m-footer{border-radius:0;flex-wrap:wrap;padding-bottom:max(18px,env(safe-area-inset-bottom))}}@media(pointer:coarse),(max-width:480px){.m-close{box-sizing:border-box;width:44px;height:44px;padding:7px;margin:-7px -7px -7px 5px;background-clip:content-box}}.m-backdrop.m-kiosk-backdrop{background:#0f172ab8;backdrop-filter:none;-webkit-backdrop-filter:none}.m-modal.m-kiosk{inset:0;transform:none;margin:auto;width:calc(100% - 32px);height:fit-content;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:hidden;animation:m-fade .18s ease;box-shadow:0 25px 60px #00000040}.m-modal.m-kiosk .m-body{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.m-modal.m-kiosk .m-footer{border-radius:0 0 16px 16px}@media(max-width:480px){.m-modal.m-kiosk{bottom:var(--ui-kb, 0px);max-height:min(calc(100dvh - 32px),var(--ui-vvh, 100dvh));border-radius:16px}.m-modal.m-kiosk .m-footer{flex-wrap:wrap;padding-bottom:max(18px,env(safe-area-inset-bottom))}}@keyframes m-fade{0%{opacity:0}to{opacity:1}}@keyframes m-scale{0%{opacity:0;transform:translate(-50%,-48%) scale(.96)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}@keyframes m-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.m-backdrop,.m-modal{animation:none}}\n"],
3758
+ styles: [".m-backdrop{position:fixed;inset:0;background:#02081773;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);z-index:200;animation:m-fade .18s ease}.m-modal:focus{outline:none}.m-close:disabled{opacity:.4;cursor:not-allowed}.m-focus-guard{position:absolute;width:1px;height:1px;padding:0;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;outline:none}.m-modal{position:fixed;inset:0;margin:auto;height:fit-content;background:#fff;border-radius:16px;border:1px solid rgba(0,0,0,.07);z-index:201;width:calc(100% - 32px);box-shadow:0 4px 6px #0000000a,0 16px 32px #0000001f,0 48px 96px #0000001a;max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);display:flex;flex-direction:column;animation:m-scale .22s cubic-bezier(.16,1,.3,1)}.m-header{display:flex;align-items:flex-start;justify-content:space-between;padding:20px 24px 16px;background:#f8fafc;border-bottom:1px solid #e2e8f0;border-radius:16px 16px 0 0;flex-shrink:0}.m-header-text{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0}.m-title{font-size:1.125rem;font-weight:700;color:#0f172a;margin:0;letter-spacing:-.02em;line-height:1.3}.m-description{font-size:.8125rem;color:#64748b;margin:0;line-height:1.4}.m-close{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:8px;border:none;background:none;cursor:pointer;color:#94a3b8;flex-shrink:0;margin-left:12px;transition:background .13s,color .13s}.m-close:hover{background:#f1f5f9;color:#1e293b}.m-close:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.m-body{padding:20px 24px;overflow-y:auto;flex:1;min-height:0;font-size:.9rem;color:#475569;line-height:1.65}.m-footer{padding:14px 24px 18px;background:#f8fafc;border-top:1px solid #e2e8f0;border-radius:0 0 16px 16px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:8px}.m-footer:not(:has(*)){display:none}.m-footer-left{display:flex;align-items:center;gap:8px}.m-footer-right{display:flex;align-items:center;gap:8px;margin-left:auto}.m-footer-center{display:flex;align-items:center;justify-content:center;gap:8px;flex:1 1 auto;margin:0 8px}.m-footer-center:empty{display:none}@media(max-width:480px){.m-modal:not(.m-kiosk){top:auto;bottom:var(--ui-kb, 0px);left:0;right:0;transform:none;margin:0;height:auto;width:100vw;max-width:none!important;max-height:min(85dvh,var(--ui-vvh, 100dvh));border-radius:20px 20px 0 0;animation:m-up .24s cubic-bezier(.16,1,.3,1)}.m-footer{border-radius:0;flex-wrap:wrap;padding-bottom:max(18px,env(safe-area-inset-bottom))}}@media(pointer:coarse),(max-width:480px){.m-close{box-sizing:border-box;width:44px;height:44px;padding:7px;margin:-7px -7px -7px 5px;background-clip:content-box}}.m-backdrop.m-kiosk-backdrop{background:#0f172ab8;backdrop-filter:none;-webkit-backdrop-filter:none}.m-modal.m-kiosk{inset:0;transform:none;margin:auto;width:calc(100% - 32px);height:fit-content;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:hidden;animation:m-fade .18s ease;box-shadow:0 25px 60px #00000040}.m-modal.m-kiosk .m-body{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.m-modal.m-kiosk .m-footer{border-radius:0 0 16px 16px}@media(max-width:480px){.m-modal.m-kiosk{bottom:var(--ui-kb, 0px);max-height:min(calc(100dvh - 32px),var(--ui-vvh, 100dvh));border-radius:16px}.m-modal.m-kiosk .m-footer{flex-wrap:wrap;padding-bottom:max(18px,env(safe-area-inset-bottom))}}@keyframes m-fade{0%{opacity:0}to{opacity:1}}@keyframes m-scale{0%{opacity:0;transform:translateY(2%) scale(.96)}to{opacity:1;transform:none}}@keyframes m-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.m-backdrop,.m-modal{animation:none}}\n"],
3704
3759
  changeDetection: i0.ChangeDetectionStrategy.OnPush
3705
3760
  });
3706
3761
  }
@@ -3723,8 +3778,8 @@ i0.ɵɵngDeclareClassMetadata({
3723
3778
  }],
3724
3779
  template: `
3725
3780
  @if (open()) {
3726
- <div class="m-backdrop" [class.m-kiosk-backdrop]="kiosk()" (click)="dismiss('backdrop')"></div>
3727
- <div class="m-modal" [class.m-kiosk]="kiosk()" role="dialog" aria-modal="true" tabindex="-1" [attr.aria-labelledby]="titleId" [attr.aria-describedby]="describedById()" [attr.aria-busy]="busy() ? 'true' : null" [attr.data-testid]="dialogTestId() || null" [style.max-width]="maxWidth()">
3781
+ <div class="m-backdrop" [class.m-kiosk-backdrop]="kiosk()" [style.z-index]="backdropZ()" (click)="dismiss('backdrop')"></div>
3782
+ <div class="m-modal" [class.m-kiosk]="kiosk()" role="dialog" aria-modal="true" tabindex="-1" [attr.aria-labelledby]="titleId" [attr.aria-describedby]="describedById()" [attr.aria-busy]="busy() ? 'true' : null" [attr.data-testid]="dialogTestId() || null" [style.max-width]="maxWidth()" [style.z-index]="dialogZ()">
3728
3783
  <span class="m-focus-guard" data-ui-focus-guard="start" tabindex="0" (focus)="onGuardFocus('start', $event)"></span>
3729
3784
  <div class="m-header">
3730
3785
  <div class="m-header-text">
@@ -3754,7 +3809,7 @@ i0.ɵɵngDeclareClassMetadata({
3754
3809
  </div>
3755
3810
  }
3756
3811
  `,
3757
- styles: [".m-backdrop{position:fixed;inset:0;background:#02081773;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);z-index:200;animation:m-fade .18s ease}.m-modal:focus{outline:none}.m-close:disabled{opacity:.4;cursor:not-allowed}.m-focus-guard{position:absolute;width:1px;height:1px;padding:0;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;outline:none}.m-modal{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:#fff;border-radius:16px;border:1px solid rgba(0,0,0,.07);z-index:201;width:calc(100% - 32px);box-shadow:0 4px 6px #0000000a,0 16px 32px #0000001f,0 48px 96px #0000001a;max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);display:flex;flex-direction:column;animation:m-scale .22s cubic-bezier(.16,1,.3,1)}.m-header{display:flex;align-items:flex-start;justify-content:space-between;padding:20px 24px 16px;background:#f8fafc;border-bottom:1px solid #e2e8f0;border-radius:16px 16px 0 0;flex-shrink:0}.m-header-text{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0}.m-title{font-size:1.125rem;font-weight:700;color:#0f172a;margin:0;letter-spacing:-.02em;line-height:1.3}.m-description{font-size:.8125rem;color:#64748b;margin:0;line-height:1.4}.m-close{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:8px;border:none;background:none;cursor:pointer;color:#94a3b8;flex-shrink:0;margin-left:12px;transition:background .13s,color .13s}.m-close:hover{background:#f1f5f9;color:#1e293b}.m-close:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.m-body{padding:20px 24px;overflow-y:auto;flex:1;min-height:0;font-size:.9rem;color:#475569;line-height:1.65}.m-footer{padding:14px 24px 18px;background:#f8fafc;border-top:1px solid #e2e8f0;border-radius:0 0 16px 16px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:8px}.m-footer:not(:has(*)){display:none}.m-footer-left{display:flex;align-items:center;gap:8px}.m-footer-right{display:flex;align-items:center;gap:8px;margin-left:auto}.m-footer-center{display:flex;align-items:center;justify-content:center;gap:8px;flex:1 1 auto;margin:0 8px}.m-footer-center:empty{display:none}@media(max-width:480px){.m-modal:not(.m-kiosk){top:auto;bottom:var(--ui-kb, 0px);left:0;right:0;transform:none;width:100vw;max-width:none!important;max-height:min(85dvh,var(--ui-vvh, 100dvh));border-radius:20px 20px 0 0;animation:m-up .24s cubic-bezier(.16,1,.3,1)}.m-footer{border-radius:0;flex-wrap:wrap;padding-bottom:max(18px,env(safe-area-inset-bottom))}}@media(pointer:coarse),(max-width:480px){.m-close{box-sizing:border-box;width:44px;height:44px;padding:7px;margin:-7px -7px -7px 5px;background-clip:content-box}}.m-backdrop.m-kiosk-backdrop{background:#0f172ab8;backdrop-filter:none;-webkit-backdrop-filter:none}.m-modal.m-kiosk{inset:0;transform:none;margin:auto;width:calc(100% - 32px);height:fit-content;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:hidden;animation:m-fade .18s ease;box-shadow:0 25px 60px #00000040}.m-modal.m-kiosk .m-body{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.m-modal.m-kiosk .m-footer{border-radius:0 0 16px 16px}@media(max-width:480px){.m-modal.m-kiosk{bottom:var(--ui-kb, 0px);max-height:min(calc(100dvh - 32px),var(--ui-vvh, 100dvh));border-radius:16px}.m-modal.m-kiosk .m-footer{flex-wrap:wrap;padding-bottom:max(18px,env(safe-area-inset-bottom))}}@keyframes m-fade{0%{opacity:0}to{opacity:1}}@keyframes m-scale{0%{opacity:0;transform:translate(-50%,-48%) scale(.96)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}@keyframes m-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.m-backdrop,.m-modal{animation:none}}\n"]
3812
+ styles: [".m-backdrop{position:fixed;inset:0;background:#02081773;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);z-index:200;animation:m-fade .18s ease}.m-modal:focus{outline:none}.m-close:disabled{opacity:.4;cursor:not-allowed}.m-focus-guard{position:absolute;width:1px;height:1px;padding:0;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;outline:none}.m-modal{position:fixed;inset:0;margin:auto;height:fit-content;background:#fff;border-radius:16px;border:1px solid rgba(0,0,0,.07);z-index:201;width:calc(100% - 32px);box-shadow:0 4px 6px #0000000a,0 16px 32px #0000001f,0 48px 96px #0000001a;max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);display:flex;flex-direction:column;animation:m-scale .22s cubic-bezier(.16,1,.3,1)}.m-header{display:flex;align-items:flex-start;justify-content:space-between;padding:20px 24px 16px;background:#f8fafc;border-bottom:1px solid #e2e8f0;border-radius:16px 16px 0 0;flex-shrink:0}.m-header-text{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0}.m-title{font-size:1.125rem;font-weight:700;color:#0f172a;margin:0;letter-spacing:-.02em;line-height:1.3}.m-description{font-size:.8125rem;color:#64748b;margin:0;line-height:1.4}.m-close{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:8px;border:none;background:none;cursor:pointer;color:#94a3b8;flex-shrink:0;margin-left:12px;transition:background .13s,color .13s}.m-close:hover{background:#f1f5f9;color:#1e293b}.m-close:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.m-body{padding:20px 24px;overflow-y:auto;flex:1;min-height:0;font-size:.9rem;color:#475569;line-height:1.65}.m-footer{padding:14px 24px 18px;background:#f8fafc;border-top:1px solid #e2e8f0;border-radius:0 0 16px 16px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:8px}.m-footer:not(:has(*)){display:none}.m-footer-left{display:flex;align-items:center;gap:8px}.m-footer-right{display:flex;align-items:center;gap:8px;margin-left:auto}.m-footer-center{display:flex;align-items:center;justify-content:center;gap:8px;flex:1 1 auto;margin:0 8px}.m-footer-center:empty{display:none}@media(max-width:480px){.m-modal:not(.m-kiosk){top:auto;bottom:var(--ui-kb, 0px);left:0;right:0;transform:none;margin:0;height:auto;width:100vw;max-width:none!important;max-height:min(85dvh,var(--ui-vvh, 100dvh));border-radius:20px 20px 0 0;animation:m-up .24s cubic-bezier(.16,1,.3,1)}.m-footer{border-radius:0;flex-wrap:wrap;padding-bottom:max(18px,env(safe-area-inset-bottom))}}@media(pointer:coarse),(max-width:480px){.m-close{box-sizing:border-box;width:44px;height:44px;padding:7px;margin:-7px -7px -7px 5px;background-clip:content-box}}.m-backdrop.m-kiosk-backdrop{background:#0f172ab8;backdrop-filter:none;-webkit-backdrop-filter:none}.m-modal.m-kiosk{inset:0;transform:none;margin:auto;width:calc(100% - 32px);height:fit-content;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:hidden;animation:m-fade .18s ease;box-shadow:0 25px 60px #00000040}.m-modal.m-kiosk .m-body{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.m-modal.m-kiosk .m-footer{border-radius:0 0 16px 16px}@media(max-width:480px){.m-modal.m-kiosk{bottom:var(--ui-kb, 0px);max-height:min(calc(100dvh - 32px),var(--ui-vvh, 100dvh));border-radius:16px}.m-modal.m-kiosk .m-footer{flex-wrap:wrap;padding-bottom:max(18px,env(safe-area-inset-bottom))}}@keyframes m-fade{0%{opacity:0}to{opacity:1}}@keyframes m-scale{0%{opacity:0;transform:translateY(2%) scale(.96)}to{opacity:1;transform:none}}@keyframes m-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.m-backdrop,.m-modal{animation:none}}\n"]
3758
3813
  }]
3759
3814
  }],
3760
3815
  ctorParameters: () => [],
@@ -4819,6 +4874,7 @@ var SidePanelComponent = class SidePanelComponent {
4819
4874
  this._stopViewport = null;
4820
4875
  this._stopIframeKeys = null;
4821
4876
  this._interaction = inject(LastInteraction);
4877
+ this._injector = inject(Injector);
4822
4878
  this._interaction.acquire(this._doc);
4823
4879
  effect(() => {
4824
4880
  const body = this._bodyRef()?.nativeElement ?? null;
@@ -4827,6 +4883,9 @@ var SidePanelComponent = class SidePanelComponent {
4827
4883
  effect(() => {
4828
4884
  if (this.open()) {
4829
4885
  this._overlays.push(this);
4886
+ afterNextRender(() => {
4887
+ if (this.open() && !this._overlays.isTop(this) && this._el.nativeElement.closest(".m-modal")) this._overlays.push(this);
4888
+ }, { injector: this._injector });
4830
4889
  this._prevFocus = resolveTrigger(this._doc, this._interaction);
4831
4890
  this._stopIframeKeys?.();
4832
4891
  this._stopIframeKeys = bridgeIframeKeys(this._el.nativeElement, this._doc, {
@@ -4851,6 +4910,21 @@ var SidePanelComponent = class SidePanelComponent {
4851
4910
  }
4852
4911
  });
4853
4912
  }
4913
+ isDetached() {
4914
+ return this.open() && this._scrollLocked && !this._el.nativeElement.isConnected;
4915
+ }
4916
+ onOrphaned() {
4917
+ if (!this._scrollLocked) return;
4918
+ this._overlays.remove(this);
4919
+ if (this._overlays.isEmpty) this._doc.body.style.overflow = "";
4920
+ this._scrollLocked = false;
4921
+ this._stopViewport?.();
4922
+ this._stopViewport = null;
4923
+ this._stopIframeKeys?.();
4924
+ this._stopIframeKeys = null;
4925
+ this._prevFocus = null;
4926
+ this.closed.emit();
4927
+ }
4854
4928
  refreshScrollable() {
4855
4929
  const el = this._bodyRef()?.nativeElement;
4856
4930
  this.bodyScrollable.set(!!el && el.scrollHeight - el.clientHeight > 1);
@@ -4919,6 +4993,7 @@ var SidePanelComponent = class SidePanelComponent {
4919
4993
  redirectFromGuard(which, this._el.nativeElement, this._el.nativeElement.querySelector(".sp-panel"), event?.relatedTarget ?? null);
4920
4994
  }
4921
4995
  _focusFirst() {
4996
+ if (!this._overlays.isTop(this)) return;
4922
4997
  focusInitial(this._el.nativeElement.querySelector(".sp-panel"), this._el.nativeElement.querySelector(".sp-body"), this._doc);
4923
4998
  }
4924
4999
  _focusable() {
@@ -5383,7 +5458,7 @@ const BUILT_IN_ENDONYMS = {
5383
5458
  ko: "한국어",
5384
5459
  ru: "Русский"
5385
5460
  };
5386
- const BUILT_IN_LOADERS = /* @__PURE__ */ new Map([["es", () => import("./forgeroute-ui-core-ui-labels.es-Woi3az70.mjs").then((m) => m.UI_LABELS_ES)]]);
5461
+ const BUILT_IN_LOADERS = /* @__PURE__ */ new Map([["es", () => import("./forgeroute-ui-core-ui-labels.es-ChTmqFlw.mjs").then((m) => m.UI_LABELS_ES)]]);
5387
5462
  const normalizeTag = (tag) => tag.trim().toLowerCase().replace(/_/g, "-");
5388
5463
  const baseOf = (tag) => normalizeTag(tag).split("-")[0];
5389
5464
  const builtInLoader = (lang) => BUILT_IN_LOADERS.get(normalizeTag(lang)) ?? BUILT_IN_LOADERS.get(baseOf(lang));
@@ -5881,6 +5956,6 @@ function moduleLabelsTesting(options = {}) {
5881
5956
  loadCount: (namespace) => counts[namespace] ?? 0
5882
5957
  };
5883
5958
  }
5884
- export { ButtonComponent, ConfirmOutletComponent, ConfirmService, DEFAULT_LOCALE, EMBEDDING_PARENT, FOCUS_GUARD_ATTR, FORGEROUTE_CONFIG, INTERACTION_WINDOW_MS, LastInteraction, ModalComponent, ModuleLabelsRegistry, OverlayStack, SidePanelComponent, ToastService, UI_DEFAULT_LABELS, UI_FIELD_REVEAL_HOST, UI_LANGUAGE_AUTO, UI_LANGUAGE_CONFIG, UI_NOTES_QUEUE, UiFieldValidity, UiLabelsService, UiLanguageService, assertModuleLabelParity, bridgeIframeKeys, closestFocusable, createFieldReveal, createModuleLabels, defaultLabel, errorContextInterceptor, focusInitial, formatIsoDate, formatIsoDateTime, formatTime, getErrorMessage, injectModuleLabels, isTouchViewport, isUsableField, isoKey, issueToErrors, loadUiLabels, maxLengthIssue, mergeDescribedBy, moduleLabelsTesting, nativeControl, parseIso, parseTime, patternToOptions, provideModuleLabelOverrides, provideUiLanguage, redirectFromGuard, requiredIssue, resolveTrigger, restoreFocus, safeLocale, tabbables, toDate, trackVisualViewport, uiCurrencyFormatter, uiFormatClock, uiFormatCurrency, uiFormatDate, uiFormatHour, uiFormatNumber, uiLocale, uiMonthName, uiText, uiWeekdayName, usdCurrencyDisplay };
5959
+ export { ButtonComponent, ConfirmOutletComponent, ConfirmService, DEFAULT_LOCALE, DEPRECATED_LABEL_ALIASES, EMBEDDING_PARENT, FOCUS_GUARD_ATTR, FORGEROUTE_CONFIG, INTERACTION_WINDOW_MS, LastInteraction, ModalComponent, ModuleLabelsRegistry, OverlayStack, SidePanelComponent, ToastService, UI_DEFAULT_LABELS, UI_FIELD_REVEAL_HOST, UI_LANGUAGE_AUTO, UI_LANGUAGE_CONFIG, UI_NOTES_QUEUE, UiFieldValidity, UiLabelsService, UiLanguageService, assertModuleLabelParity, bridgeIframeKeys, closestFocusable, createFieldReveal, createModuleLabels, defaultLabel, errorContextInterceptor, focusInitial, formatIsoDate, formatIsoDateTime, formatTime, getErrorMessage, injectModuleLabels, isTouchViewport, isUsableField, isoKey, issueToErrors, loadUiLabels, maxLengthIssue, mergeDescribedBy, moduleLabelsTesting, nativeControl, parseIso, parseTime, patternToOptions, provideModuleLabelOverrides, provideUiLanguage, redirectFromGuard, requiredIssue, resolveTrigger, restoreFocus, safeLocale, tabbables, toDate, trackVisualViewport, uiCurrencyFormatter, uiFormatClock, uiFormatCurrency, uiFormatDate, uiFormatHour, uiFormatNumber, uiLocale, uiMonthName, uiText, uiWeekdayName, usdCurrencyDisplay };
5885
5960
 
5886
5961
  //# sourceMappingURL=forgeroute-ui-core.mjs.map