@molecule/app-settings-panel-angular 2.0.1 → 3.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.
Files changed (33) hide show
  1. package/README.md +171 -127
  2. package/dist/account-section.component.js +1 -2
  3. package/dist/account-section.component.js.map +1 -1
  4. package/dist/auth-section.component.d.ts +30 -10
  5. package/dist/auth-section.component.d.ts.map +1 -1
  6. package/dist/auth-section.component.js +159 -116
  7. package/dist/auth-section.component.js.map +1 -1
  8. package/dist/billing-section.component.d.ts +10 -7
  9. package/dist/billing-section.component.d.ts.map +1 -1
  10. package/dist/billing-section.component.js +38 -23
  11. package/dist/billing-section.component.js.map +1 -1
  12. package/dist/container-context.d.ts +7 -4
  13. package/dist/container-context.d.ts.map +1 -1
  14. package/dist/container-context.js +9 -7
  15. package/dist/container-context.js.map +1 -1
  16. package/dist/context.d.ts.map +1 -1
  17. package/dist/context.js +2 -2
  18. package/dist/context.js.map +1 -1
  19. package/dist/controlled-switch.d.ts +0 -2
  20. package/dist/controlled-switch.d.ts.map +1 -1
  21. package/dist/controlled-switch.js +1 -6
  22. package/dist/controlled-switch.js.map +1 -1
  23. package/dist/log-out-delete-section.component.d.ts +8 -4
  24. package/dist/log-out-delete-section.component.d.ts.map +1 -1
  25. package/dist/log-out-delete-section.component.js +24 -14
  26. package/dist/log-out-delete-section.component.js.map +1 -1
  27. package/dist/tiers-upgrade-section.component.d.ts +31 -19
  28. package/dist/tiers-upgrade-section.component.d.ts.map +1 -1
  29. package/dist/tiers-upgrade-section.component.js +180 -141
  30. package/dist/tiers-upgrade-section.component.js.map +1 -1
  31. package/dist/types.d.ts +9 -0
  32. package/dist/types.d.ts.map +1 -1
  33. package/package.json +7 -7
package/README.md CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-11-22T17:17:36.017Z
6
+ Generated: 2026-11-24T16:37:01.091Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-settings-panel-angular
@@ -217,6 +217,21 @@ interface Device {
217
217
  }
218
218
  ```
219
219
 
220
+ #### `AuthSectionProps`
221
+
222
+ Props for `AuthSection`. Same name and meaning as the React component's.
223
+
224
+ ```typescript
225
+ interface AuthSectionProps {
226
+ /**
227
+ * Show the two-factor row. Set false when the API has no two-factor provider
228
+ * (no `POST /users/:id/verify-two-factor` route). Default true. Bound in a template as
229
+ * `[twoFactor]="false"`.
230
+ */
231
+ twoFactor?: boolean
232
+ }
233
+ ```
234
+
220
235
  #### `TiersUpgradeSectionProps`
221
236
 
222
237
  Props for `TiersUpgradeSection` — the same props
@@ -521,7 +536,7 @@ export class AccountSection implements AfterViewInit {
521
536
  * @param error - The field's validation message, or null.
522
537
  */
523
538
  private syncEmailAria(error: string | null): void {
524
- if (!this.emailControl || !this.emailControl.isConnected) this.resolveEmailControl()
539
+ this.resolveEmailControl()
525
540
  const control = this.emailControl
526
541
  if (!control) return
527
542
  if (error) {
@@ -629,9 +644,9 @@ export class AppearanceSection implements AfterViewInit {
629
644
  AuthSection component.
630
645
 
631
646
  Authentication section — change password (modal) + two-factor (TOTP) setup.
632
- React's root is a fragment (the `<section>` plus two modals), so the host is
633
- unwrapped by the DOM normalizer and `display: contents` keeps the layout
634
- fragment-like; an OAuth-only user renders NOTHING (React's `return null`).
647
+ React's root is a fragment (the `<section>` plus two modals) or nothing at
648
+ all for an OAuth-only user (React's `return null`); those nodes render in the
649
+ host's place and the host itself never appears in the page.
635
650
 
636
651
  Two-factor uses the real enrollment flow against the user resource's
637
652
  `POST /users/:id/verify-two-factor` endpoint (`@molecule/api-two-factor`):
@@ -644,8 +659,9 @@ Two-factor uses the real enrollment flow against the user resource's
644
659
  handler deliberately ignores — so it never actually enrolled 2FA.)
645
660
 
646
661
  Auto-hides for OAuth-only users (`user.oauthServer` truthy) since
647
- password / 2FA wouldn't apply. If the app's API has no two-factor
648
- provider bonded, setup fails gracefully with an inline message.
662
+ password / 2FA wouldn't apply. Pass `[twoFactor]="false"` when the app's API
663
+ has no two-factor provider: it then serves no `verify-two-factor` route, so
664
+ the section shows only the password change and reads no 2FA status.
649
665
 
650
666
  `useChangePassword`'s state is a live getter over a plain object (the
651
667
  Angular binding's `usePromise` port), so the pending/error reads are
@@ -655,13 +671,9 @@ mediated by a version signal the handlers bump at React's re-render points.
655
671
  @Component({
656
672
  selector: 'mol-auth-section',
657
673
  standalone: true,
674
+ hostDirectives: [MolPlacement],
658
675
  imports: [Alert, Button, Flex, Input, Modal],
659
- host: {
660
- 'data-parity-unwrap': '',
661
- style: 'display: contents',
662
- },
663
- template: `@if (!isOauthOnly()) {
664
- <section>
676
+ template: `@if (!isOauthOnly()) {<section>
665
677
  <h3 [class]="cm.cn(cm.sectionHeading, cm.sp('mb', 3))">
666
678
  {{ t('settings.authentication', undefined, { defaultValue: 'Authentication' }) }}
667
679
  </h3>
@@ -674,6 +686,7 @@ mediated by a version signal the handlers bump at React's re-render points.
674
686
  >
675
687
  {{ t('settings.changePassword', undefined, { defaultValue: 'Change password' }) }}
676
688
  </button>
689
+ @if (showTwoFactor()) {
677
690
  <div mol-flex [align]="'center'" [justify]="'between'">
678
691
  <span [class]="cm.textSize('sm')">{{ t('settings.twoFactor', undefined, { defaultValue: 'Two-factor authentication' }) }}@if (twoFactorEnabled()) {<span [class]="cm.cn(cm.textSize('xs'), cm.textSubtle, cm.sp('ml', 2))">{{ t('settings.twoFactorOn', undefined, { defaultValue: 'On' }) }}</span>}</span>
679
692
  @if (twoFactorEnabled()) {
@@ -698,6 +711,7 @@ mediated by a version signal the handlers bump at React's re-render points.
698
711
  </button>
699
712
  }
700
713
  </div>
714
+ }
701
715
  </div>
702
716
  </section>
703
717
  <mol-modal
@@ -754,6 +768,7 @@ mediated by a version signal the handlers bump at React's re-render points.
754
768
  </button>
755
769
  </form>
756
770
  </mol-modal>
771
+ @if (showTwoFactor()) {
757
772
  <mol-modal [open]="tfModal() !== null" (close)="closeTf()" [title]="tfTitle()">
758
773
  @if (tfError(); as tfFailure) {
759
774
  <div mol-alert [status]="'error'" [className]="cm.sp('mb', 4)">{{ tfFailure }}</div>
@@ -813,10 +828,15 @@ mediated by a version signal the handlers bump at React's re-render points.
813
828
  </button>
814
829
  </form>
815
830
  }
816
- </mol-modal>
817
- }`,
831
+ </mol-modal>}}`,
818
832
  })
819
- export class AuthSection {
833
+ export class AuthSection implements OnInit {
834
+ @InputProperty() set twoFactor(value: boolean) {
835
+ this.showTwoFactor.set(value)
836
+ }
837
+
838
+ protected readonly showTwoFactor = signal(true)
839
+
820
840
  protected readonly auth = useAuth<UserProfile>()
821
841
 
822
842
  protected readonly i18n = useTranslation()
@@ -859,22 +879,15 @@ export class AuthSection {
859
879
 
860
880
  private readonly twoFactorRead = { cancelled: false }
861
881
 
882
+ private readonly host: ElementRef<HTMLElement> = inject(ElementRef)
883
+
884
+
862
885
  protected readonly cm: UIClassMap = getClassMap()
863
886
 
864
887
  protected isOauthOnly(): boolean {
865
888
  return !!this.auth.user()?.oauthServer
866
889
  }
867
-
868
- protected tfTitle(): string {
869
- return this.tfModal() === 'disable'
870
- ? this.t('settings.twoFactorDisableTitle', undefined, {
871
- defaultValue: 'Disable two-factor authentication',
872
- })
873
- : this.t('settings.twoFactorEnableTitle', undefined, {
874
- defaultValue: 'Enable two-factor authentication',
875
- })
876
- }
877
- // … truncated — 8 more members: constructor, closePasswordModal, openDisableTf, startEnable, submitTf, submitTfForm, closeTf, submitPassword; the full declaration is in node_modules/@molecule/app-settings-panel-angular/dist/auth-section.component.d.ts
890
+ // … truncated — 10 more members: tfTitle, constructor, ngOnInit, closePasswordModal, openDisableTf, startEnable, submitTf, submitTfForm, closeTf, submitPassword; the full declaration is in node_modules/@molecule/app-settings-panel-angular/dist/auth-section.component.d.ts
878
891
  ```
879
892
 
880
893
  _(Member comments are left out to fit; the full declaration is in `node_modules/@molecule/app-settings-panel-angular/dist/auth-section.component.d.ts`.)_
@@ -891,17 +904,20 @@ more accurate label than the parent-supplied default. The `plan` input
891
904
  remains a fallback (e.g. for offline rendering or apps that don't expose
892
905
  `/billing/status`).
893
906
 
894
- The Upgrade button navigates to `upgradeTo` (default `/settings`). Pass
895
- `upgradeTo="/billing"` or `upgradeTo="/pricing"` if your app routes
896
- elsewhere. Apps with a multi-tier checkout flow should use
897
- `TiersUpgradeSection` instead.
907
+ The Upgrade button opens `upgradeTo`, the app's page for choosing a plan
908
+ (`/pricing`, `/billing`). It has no default: no one route is right for
909
+ every app, and the settings page this section sits in has no plans to
910
+ choose. An app with no such page renders `TiersUpgradeSection`, which lists
911
+ the tiers and starts the checkout itself. A section given no `upgradeTo`
912
+ anyway (from JavaScript, or a template the compiler does not check) shows the
913
+ plan without the button.
898
914
 
899
915
  ```typescript
900
916
  @Component({
901
917
  selector: 'section[mol-settings-billing]',
902
918
  standalone: true,
903
919
  imports: [Button, Flex],
904
- inputs: ['plan', 'upgradeTo'],
920
+ inputs: ['plan', { name: 'upgradeTo', required: true }],
905
921
  template: `<h3 [class]="cm.cn(cm.sectionHeading, cm.sp('mb', 3))">
906
922
  {{ t('settings.billing', undefined, { defaultValue: 'Billing' }) }}
907
923
  </h3>
@@ -910,16 +926,18 @@ elsewhere. Apps with a multi-tier checkout flow should use
910
926
  >{{ t('settings.plan', undefined, { defaultValue: 'Plan: ' })
911
927
  }}<strong>{{ planLabel() }}</strong></span
912
928
  >
913
- <button mol-button [variant]="'outline'" [size]="'sm'" (click)="upgrade()">
914
- {{ t('settings.upgrade', undefined, { defaultValue: 'Upgrade' }) }}
915
- </button>
929
+ @if (upgradeTo) {
930
+ <button mol-button [variant]="'outline'" [size]="'sm'" (click)="upgrade()">
931
+ {{ t('settings.upgrade', undefined, { defaultValue: 'Upgrade' }) }}
932
+ </button>
933
+ }
916
934
  </div>`,
917
935
  })
918
936
  export class BillingSection {
919
937
  /** Fallback plan name when `/api/billing/status` is unavailable. */
920
- plan = 'Free'
921
- /** Route the Upgrade button navigates to. */
922
- upgradeTo = '/settings'
938
+ plan?: string
939
+ /** The app's page for choosing a plan, which the Upgrade button opens. */
940
+ upgradeTo!: string
923
941
 
924
942
  /** Reactive translation, read in the injection context. */
925
943
  protected readonly i18n = useTranslation()
@@ -943,7 +961,11 @@ export class BillingSection {
943
961
  * @returns The plan name.
944
962
  */
945
963
  protected planLabel(): string {
946
- return this.livePlan() ?? this.plan
964
+ return (
965
+ this.livePlan() ??
966
+ this.plan ??
967
+ this.t('settings.billing.freePlan', undefined, { defaultValue: 'Free' })
968
+ )
947
969
  }
948
970
 
949
971
  /**
@@ -1199,9 +1221,8 @@ export class DevicesSection {
1199
1221
  LogOutDeleteSection component.
1200
1222
 
1201
1223
  Bottom actions section — Log out + Delete account. React's root is a
1202
- fragment (the `<section>` plus the delete-account modal), so the host is
1203
- unwrapped by the DOM normalizer and `display: contents` keeps the layout
1204
- fragment-like.
1224
+ fragment (the `<section>` plus the delete-account modal), so those nodes
1225
+ render in the host's place and the host itself never appears in the page.
1205
1226
 
1206
1227
  Owns the delete-account modal internally (the trigger lives in the
1207
1228
  same section so the modal lives here too). Reads `onClose` from
@@ -1212,11 +1233,8 @@ action and navigates to `/login`.
1212
1233
  @Component({
1213
1234
  selector: 'mol-log-out-delete-section',
1214
1235
  standalone: true,
1236
+ hostDirectives: [MolPlacement],
1215
1237
  imports: [Alert, Button, Input, Modal],
1216
- host: {
1217
- 'data-parity-unwrap': '',
1218
- style: 'display: contents',
1219
- },
1220
1238
  template: `<section [class]="cm.stack(3)">
1221
1239
  <button
1222
1240
  mol-button
@@ -1310,10 +1328,25 @@ export class LogOutDeleteSection {
1310
1328
  /** The bonded ClassMap (styling tokens resolve at render time). */
1311
1329
  protected readonly cm: UIClassMap = getClassMap()
1312
1330
 
1331
+ private readonly host: ElementRef<HTMLElement> = inject(ElementRef)
1332
+ constructor() {
1333
+ usePlacement(() => {
1334
+ // React's fragment (the section plus the delete-account modal) renders in
1335
+ // the host's place; the host itself leaves the page.
1336
+ placeContentBefore(this.host.nativeElement, this.host.nativeElement)
1337
+ setElementPresent(this.host.nativeElement, false)
1338
+ })
1339
+ }
1340
+
1341
+ /** Closes the settings panel (the container context's callback). */
1342
+ private closePanel(): void {
1343
+ this.panel.onClose()
1344
+ }
1345
+
1313
1346
  /** Signs out, closes the panel and returns to `/login` (React's `handleLogout`). */
1314
1347
  protected async logout(): Promise<void> {
1315
1348
  await this.auth.logout()
1316
- this.panel.onClose()
1349
+ this.closePanel()
1317
1350
  this.router.navigate('/login')
1318
1351
  }
1319
1352
 
@@ -1332,7 +1365,7 @@ export class LogOutDeleteSection {
1332
1365
  data: { password: this.password() },
1333
1366
  })
1334
1367
  await this.auth.logout()
1335
- this.panel.onClose()
1368
+ this.closePanel()
1336
1369
  this.router.navigate('/login')
1337
1370
  } catch (err) {
1338
1371
  this.deleteError.set(
@@ -1691,16 +1724,17 @@ export class ThisDeviceSection {
1691
1724
  TiersUpgradeSection component.
1692
1725
 
1693
1726
  Billing section with full multi-tier upgrade flow. React's root is a
1694
- fragment (the `<section>` plus the upgrade modal), so the host is unwrapped
1695
- by the DOM normalizer and `display: contents` keeps the layout
1696
- fragment-like.
1727
+ fragment (the `<section>` plus the upgrade modal), so those nodes render in
1728
+ the host's place and the host itself never appears in the page.
1697
1729
 
1698
1730
  Replaces the simpler `BillingSection` for apps backed by
1699
1731
  `@molecule/api-payments-stripe` + `@molecule/api-resource-payment` — loads
1700
1732
  the user's current plan from `/api/billing/status`, loads available tiers
1701
1733
  from `/api/billing/tiers`, and renders an Upgrade modal with a Subscribe
1702
- button per tier price. Subscribe POSTs to `/api/billing/checkout` and
1703
- redirects to the Stripe checkout URL; paid users see a Cancel button that
1734
+ button per price that is for sale (one the server lists with a price id).
1735
+ Upgrade appears only for a free user and only when something is for sale.
1736
+ Subscribe POSTs to `/api/billing/checkout` and redirects to the checkout
1737
+ URL; a paid user (`isFree: false` in the status) sees a Cancel button that
1704
1738
  POSTs to `/api/billing/cancel`. A refused request shows the server's
1705
1739
  message.
1706
1740
 
@@ -1708,25 +1742,29 @@ message.
1708
1742
  @Component({
1709
1743
  selector: 'mol-tiers-upgrade-section',
1710
1744
  standalone: true,
1745
+ hostDirectives: [MolPlacement],
1711
1746
  imports: [Alert, Button, ConfirmButton, Flex, Modal],
1712
1747
  inputs: ['redirectToCheckout'],
1713
- host: {
1714
- 'data-parity-unwrap': '',
1715
- style: 'display: contents',
1716
- },
1717
1748
  template: `<section>
1718
1749
  <h3 [class]="cm.cn(cm.sectionHeading, cm.sp('mb', 3))">
1719
1750
  {{ t('settings.billing', undefined, { defaultValue: 'Billing' }) }}
1720
1751
  </h3>
1721
1752
  <div mol-flex [align]="'center'" [justify]="'between'">
1722
- <span [class]="cm.textSize('sm')"
1723
- >{{ t('settings.plan', undefined, { defaultValue: 'Plan: ' })
1724
- }}<strong>{{ plan() }}</strong></span
1725
- >
1726
- @if (planKey() === 'free') {
1727
- <button mol-button [variant]="'outline'" [size]="'sm'" (click)="showUpgrade.set(true)">
1728
- {{ t('settings.upgrade', undefined, { defaultValue: 'Upgrade' }) }}
1729
- </button>
1753
+ <!-- The plan line waits for the server: there is no plan name to guess. -->
1754
+ @if (plan(); as planName) {
1755
+ <span [class]="cm.textSize('sm')"
1756
+ >{{ t('settings.plan', undefined, { defaultValue: 'Plan: ' })
1757
+ }}<strong>{{ planName }}</strong></span
1758
+ >
1759
+ } @else {
1760
+ <span></span>
1761
+ }
1762
+ @if (isFree()) {
1763
+ @if (forSale().length > 0) {
1764
+ <button mol-button [variant]="'outline'" [size]="'sm'" (click)="showUpgrade.set(true)">
1765
+ {{ t('settings.upgrade', undefined, { defaultValue: 'Upgrade' }) }}
1766
+ </button>
1767
+ }
1730
1768
  } @else {
1731
1769
  <button
1732
1770
  mol-confirm-button
@@ -1746,6 +1784,9 @@ message.
1746
1784
  </button>
1747
1785
  }
1748
1786
  </div>
1787
+ @if (cancelError(); as cancelMessage) {
1788
+ <div mol-alert [status]="'error'" [className]="cm.sp('mt', 3)">{{ cancelMessage }}</div>
1789
+ }
1749
1790
  </section>
1750
1791
  <mol-modal
1751
1792
  [open]="showUpgrade()"
@@ -1755,42 +1796,33 @@ message.
1755
1796
  @if (upgradeError(); as checkoutError) {
1756
1797
  <div mol-alert [status]="'error'" [className]="cm.sp('mb', 4)">{{ checkoutError }}</div>
1757
1798
  }
1758
- @if (tiers().length === 0) {
1759
- <p [class]="cm.cn(cm.textSize('sm'), cm.textMuted)">
1760
- {{
1761
- t('settings.billing.noTiers', undefined, { defaultValue: 'No paid plans configured.' })
1762
- }}
1763
- </p>
1764
- } @else {
1765
- <ul [class]="cm.stack(3)">
1766
- @for (entry of subscribeEntries(); track entry.key) {
1767
- <li [class]="cm.sp('p', 4)">
1768
- <div mol-flex [align]="'center'" [justify]="'between'">
1769
- <div>
1770
- <p [class]="cm.fontWeight('semibold')">
1771
- {{ entry.tier.name }} ({{ entry.price.interval }})
1772
- </p>
1773
- <p [class]="cm.cn(cm.textSize('xs'), cm.textMuted)">
1774
- {{ entry.price.priceLabel }}
1775
- </p>
1776
- </div>
1777
- <button
1778
- mol-button
1779
- [size]="'sm'"
1780
- [loading]="upgradeLoading() === entry.price.stripePriceId"
1781
- (click)="startCheckout(entry.price.stripePriceId)"
1782
- >
1783
- {{ t('settings.billing.subscribe', undefined, { defaultValue: 'Subscribe' }) }}
1784
- </button>
1799
+ <ul [class]="cm.stack(3)">
1800
+ @for (entry of forSale(); track entry.key) {
1801
+ <li [class]="cm.sp('p', 4)">
1802
+ <div mol-flex [align]="'center'" [justify]="'between'">
1803
+ <div>
1804
+ <p [class]="cm.fontWeight('semibold')">
1805
+ {{ entry.tier.name }} ({{ entry.price.interval }})
1806
+ </p>
1807
+ <p [class]="cm.cn(cm.textSize('xs'), cm.textMuted)">
1808
+ {{ entry.price.priceLabel }}
1809
+ </p>
1785
1810
  </div>
1786
- </li>
1787
- }
1788
- </ul>
1789
- }
1811
+ <button
1812
+ mol-button
1813
+ [size]="'sm'"
1814
+ [loading]="upgradeLoading() === entry.priceId"
1815
+ (click)="startCheckout(entry.priceId)"
1816
+ >
1817
+ {{ t('settings.billing.subscribe', undefined, { defaultValue: 'Subscribe' }) }}
1818
+ </button>
1819
+ </div>
1820
+ </li>
1821
+ }
1822
+ </ul>
1790
1823
  </mol-modal>`,
1791
1824
  })
1792
1825
  export class TiersUpgradeSection {
1793
- /** How the page leaves for the checkout URL the server returns. */
1794
1826
  redirectToCheckout: (checkoutUrl: string) => void = openUrl
1795
1827
 
1796
1828
  /** Reactive translation, read in the injection context. */
@@ -1801,10 +1833,9 @@ export class TiersUpgradeSection {
1801
1833
 
1802
1834
  private readonly http = useHttpClient()
1803
1835
 
1804
- /** The user's current plan name. */
1805
- protected readonly plan = signal('Free')
1806
- /** The user's current plan key. */
1807
- protected readonly planKey = signal('free')
1836
+ protected readonly plan = signal<string | null>(null)
1837
+ protected readonly planKey = signal<string | null>(null)
1838
+ protected readonly isFree = signal(true)
1808
1839
  /** The tiers loaded from `/api/billing/tiers`. */
1809
1840
  protected readonly tiers = signal<Tier[]>([])
1810
1841
  /** Whether the upgrade modal is open. */
@@ -1813,32 +1844,50 @@ export class TiersUpgradeSection {
1813
1844
  protected readonly upgradeLoading = signal<string | null>(null)
1814
1845
  /** The upgrade modal's error message. */
1815
1846
  protected readonly upgradeError = signal('')
1847
+ protected readonly cancelError = signal('')
1816
1848
 
1817
- /** The bonded ClassMap (styling tokens resolve at render time). */
1818
1849
  protected readonly cm: UIClassMap = getClassMap()
1819
1850
 
1820
- protected subscribeEntries(): { key: string; tier: Tier; price: TierPrice }[] {
1821
- const entries: { key: string; tier: Tier; price: TierPrice }[] = []
1851
+ private readonly host: ElementRef<HTMLElement> = inject(ElementRef)
1852
+
1853
+ private loads = 0
1854
+ private destroyed = false
1855
+
1856
+ protected forSale(): { key: string; tier: Tier; price: TierPrice; priceId: string }[] {
1857
+ const entries: { key: string; tier: Tier; price: TierPrice; priceId: string }[] = []
1822
1858
  for (const tier of this.tiers()) {
1823
- if (tier.planKey === 'free') continue
1859
+ if (tier.planKey === this.planKey()) continue
1824
1860
  for (const price of tier.prices) {
1825
1861
  if (!price.stripePriceId) continue
1826
- entries.push({ key: `${tier.planKey}-${price.stripePriceId}`, tier, price })
1862
+ entries.push({
1863
+ key: `${tier.planKey}-${price.stripePriceId}`,
1864
+ tier,
1865
+ price,
1866
+ priceId: price.stripePriceId,
1867
+ })
1827
1868
  }
1828
1869
  }
1829
1870
  return entries
1830
1871
  }
1831
1872
 
1873
+ /** Loads the current plan and the available tiers on mount. */
1832
1874
  constructor() {
1833
- let cancelled = false
1875
+ usePlacement(() => {
1876
+ // host's place; the host itself leaves the page.
1877
+ placeContentBefore(this.host.nativeElement, this.host.nativeElement)
1878
+ setElementPresent(this.host.nativeElement, false)
1879
+ })
1834
1880
  inject(DestroyRef).onDestroy(() => {
1835
- cancelled = true
1881
+ this.destroyed = true
1836
1882
  })
1883
+ this.load()
1884
+ }
1885
+
1886
+ private load(): void {
1887
+ const seq = ++this.loads
1837
1888
  void Promise.all([
1838
- // Each fetch resolves null on failure; the .then handler then keeps the
1839
- // defaults ('Free', empty tier list) instead of throwing.
1840
1889
  this.http
1841
- .get<{ planKey?: string; name?: string }>('/api/billing/status')
1890
+ .get<{ planKey?: string; name?: string; isFree?: boolean }>('/api/billing/status')
1842
1891
  .catch((_error) => null),
1843
1892
  this.http
1844
1893
  .get<{
@@ -1851,11 +1900,12 @@ export class TiersUpgradeSection {
1851
1900
  .catch((_error) => null),
1852
1901
  ])
1853
1902
  .then(([statusRes, tiersRes]) => {
1854
- if (cancelled) return
1903
+ if (this.destroyed || seq !== this.loads) return
1855
1904
  const status = statusRes?.data ?? null
1856
1905
  if (status?.name) this.plan.set(status.name)
1857
1906
  if (status?.planKey) this.planKey.set(status.planKey)
1858
- const list = tiersRes?.data?.data ?? []
1907
+ if (typeof status?.isFree === 'boolean') this.isFree.set(status.isFree)
1908
+ const list = tiersRes?.data?.data
1859
1909
  if (Array.isArray(list)) {
1860
1910
  this.tiers.set(
1861
1911
  list.map((tier) => ({
@@ -1870,15 +1920,10 @@ export class TiersUpgradeSection {
1870
1920
  )
1871
1921
  }
1872
1922
  })
1873
- .catch((_error) => {
1874
- // Fetch failures already resolve to null above; this only guards the
1875
- // mapping, keeping the section on its defaults rather than throwing.
1876
- })
1923
+ .catch((_error) => {})
1877
1924
  }
1878
1925
 
1879
- /** Starts the checkout for one price (React's `handleStartCheckout`). */
1880
- protected async startCheckout(stripePriceId: string | undefined): Promise<void> {
1881
- if (!stripePriceId) return
1926
+ protected async startCheckout(stripePriceId: string): Promise<void> {
1882
1927
  this.upgradeError.set('')
1883
1928
  this.upgradeLoading.set(stripePriceId)
1884
1929
  try {
@@ -1913,13 +1958,12 @@ export class TiersUpgradeSection {
1913
1958
  }
1914
1959
 
1915
1960
  protected cancelSubscription = async (): Promise<void> => {
1916
- this.upgradeError.set('')
1961
+ this.cancelError.set('')
1917
1962
  try {
1918
1963
  await this.http.post('/api/billing/cancel', {})
1919
- this.plan.set('Free')
1920
- this.planKey.set('free')
1964
+ this.load()
1921
1965
  } catch (err) {
1922
- this.upgradeError.set(
1966
+ this.cancelError.set(
1923
1967
  serverErrorMessage(err) ??
1924
1968
  this.t('settings.billing.cancelFailed', undefined, {
1925
1969
  defaultValue: 'Could not cancel.',
@@ -1930,7 +1974,7 @@ export class TiersUpgradeSection {
1930
1974
  }
1931
1975
  ```
1932
1976
 
1933
- _(Member comments are shortened to their first sentence, and the 3 longest are left out to fit; the full declaration is in `node_modules/@molecule/app-settings-panel-angular/dist/tiers-upgrade-section.component.d.ts`.)_
1977
+ _(The 16 longest member comments are left out to fit; the full declaration is in `node_modules/@molecule/app-settings-panel-angular/dist/tiers-upgrade-section.component.d.ts`.)_
1934
1978
 
1935
1979
  ### Functions
1936
1980
 
@@ -2054,12 +2098,12 @@ Peer dependencies:
2054
2098
  - `@angular/common` ^22.0.0
2055
2099
  - `@angular/core` ^22.0.0
2056
2100
  - `@angular/platform-browser` ^22.0.0
2057
- - `@molecule/app-angular` ^3.11.0
2101
+ - `@molecule/app-angular` ^3.13.0
2058
2102
  - `@molecule/app-auth` ^3.0.0
2059
2103
  - `@molecule/app-http` ^1.8.0
2060
2104
  - `@molecule/app-push` ^1.1.0
2061
2105
  - `@molecule/app-ui` ^1.3.11
2062
- - `@molecule/app-ui-angular` ^1.1.0
2106
+ - `@molecule/app-ui-angular` ^1.5.0
2063
2107
  - `@molecule/app-utilities` ^1.0.6
2064
2108
 
2065
2109
  ### Runtime Dependencies
@@ -202,8 +202,7 @@ export class AccountSection {
202
202
  * @param error - The field's validation message, or null.
203
203
  */
204
204
  syncEmailAria(error) {
205
- if (!this.emailControl || !this.emailControl.isConnected)
206
- this.resolveEmailControl();
205
+ this.resolveEmailControl();
207
206
  const control = this.emailControl;
208
207
  if (!control)
209
208
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"account-section.component.js","sourceRoot":"","sources":["../src/account-section.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,SAAS,EACT,QAAQ,EACR,MAAM,EACN,UAAU,EACV,SAAS,EACT,SAAS,GACV,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAGrF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;;;;;;;;IAwCvD,yBAAqC;;IAApB,2BAAa;;;IAoC5B,6BAIC;IACC,YACF;IAAA,iBAAI;;;IAHF,iGAAgE;IAEhE,cACF;IADE,oCACF;;;IAGA,6BAAiF;IAC/E,YACF;IAAA,iBAAI;;;IAFY,iGAAgE;IAC9E,cACF;IADE,oCACF;;AA/EV;;;;;;;;;;;;;;;;;;;;;;G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B;YAC7E,cAA2B;YAA3B,oCAA2B;YAC7B,cACF;YADE,kGACF;YACA,cAEC;YAFD,qDAEC;YAEG,cAAqB;YAArB,8BAAqB;YAEI,eAA2B;YAA3B,oCAA2B;YAAC,cAErD;YAFqD,oFAErD;YAIA,cAAsB;YAKtB,AADA,AADA,AAHA,oCAAsB,cAGT,0BACQ,gBACN;YAKW,eAA2B;YAA3B,oCAA2B;YAAC,cAEtD;YAFsD,qFAEtD;YAIA,cAAuB;YAKvB,AADA,AADA,AAHA,qCAAuB,cAGV,2BACS,iBACN;YAGlB,eAQC;YARD,mEAQC;YACD,cAIC;YAJD,kEAIC;4BAtDG,IAAI,EAAE,KAAK,EAAE,OAAO;;iFA0DnB,cAAc;cA7D1B,SAAS;eAAC;gBACT,QAAQ,EAAE,+BAA+B;gBACzC,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC;gBAC/B,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAuDA;aACX;;kBAoBE,SAAS;mBAAC,WAAW,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;;kBAE3C,SAAS;mBAAC,YAAY,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;;kFArBlC,cAAc"}
1
+ {"version":3,"file":"account-section.component.js","sourceRoot":"","sources":["../src/account-section.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,SAAS,EACT,QAAQ,EACR,MAAM,EACN,UAAU,EACV,SAAS,EACT,SAAS,GACV,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAGrF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;;;;;;;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