@base316/react 0.2.0 → 0.5.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.
- package/CHANGELOG.md +115 -0
- package/README.md +14 -0
- package/dist/index.cjs +4440 -2021
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5380 -2959
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +396 -14
- package/dist/src/AcceptInvitation.d.ts +15 -1
- package/dist/src/AcceptInvitation.d.ts.map +1 -1
- package/dist/src/BillingDetailsForm.d.ts +33 -0
- package/dist/src/BillingDetailsForm.d.ts.map +1 -0
- package/dist/src/BillingPortal.d.ts +45 -0
- package/dist/src/BillingPortal.d.ts.map +1 -0
- package/dist/src/CreditBalances.d.ts +19 -0
- package/dist/src/CreditBalances.d.ts.map +1 -0
- package/dist/src/Invoices.d.ts +10 -6
- package/dist/src/Invoices.d.ts.map +1 -1
- package/dist/src/PaymentMethod.d.ts +25 -0
- package/dist/src/PaymentMethod.d.ts.map +1 -0
- package/dist/src/PlanChangeReview.d.ts +29 -0
- package/dist/src/PlanChangeReview.d.ts.map +1 -0
- package/dist/src/PricingTable.d.ts +13 -1
- package/dist/src/PricingTable.d.ts.map +1 -1
- package/dist/src/SeatManager.d.ts +24 -0
- package/dist/src/SeatManager.d.ts.map +1 -0
- package/dist/src/SecondFactorStep.d.ts +83 -0
- package/dist/src/SecondFactorStep.d.ts.map +1 -0
- package/dist/src/SignIn.d.ts +16 -3
- package/dist/src/SignIn.d.ts.map +1 -1
- package/dist/src/SignUp.d.ts +51 -3
- package/dist/src/SignUp.d.ts.map +1 -1
- package/dist/src/SubscriptionManager.d.ts +7 -1
- package/dist/src/SubscriptionManager.d.ts.map +1 -1
- package/dist/src/TeamMembers.d.ts.map +1 -1
- package/dist/src/TwoFactorManager.d.ts +14 -5
- package/dist/src/TwoFactorManager.d.ts.map +1 -1
- package/dist/src/UpcomingInvoice.d.ts +21 -0
- package/dist/src/UpcomingInvoice.d.ts.map +1 -0
- package/dist/src/appearance.d.ts +2 -2
- package/dist/src/appearance.d.ts.map +1 -1
- package/dist/src/manifest.d.ts.map +1 -1
- package/dist/src/provider.d.ts +13 -1
- package/dist/src/provider.d.ts.map +1 -1
- package/dist/src/usePlans.d.ts +17 -0
- package/dist/src/usePlans.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/manifest.json
CHANGED
|
@@ -44,6 +44,11 @@
|
|
|
44
44
|
"summary": "Colours, radius and font as tokens. Restyles everything at once.",
|
|
45
45
|
"required": false
|
|
46
46
|
},
|
|
47
|
+
{
|
|
48
|
+
"name": "tenant",
|
|
49
|
+
"summary": "White-label everything inside for one tenant — `{ organizationId }` or `{ organizationExternalId }`. A firm's name, logo and colours on the screens it runs its clients on; its own branding, then its parent's, then the environment's. Change it when the user switches team.",
|
|
50
|
+
"required": false
|
|
51
|
+
},
|
|
47
52
|
{
|
|
48
53
|
"name": "className",
|
|
49
54
|
"summary": "Your own classes on the wrapper.",
|
|
@@ -82,7 +87,7 @@
|
|
|
82
87
|
{
|
|
83
88
|
"name": "SignIn",
|
|
84
89
|
"kind": "component",
|
|
85
|
-
"summary": "Password, passkey
|
|
90
|
+
"summary": "Password, passkey, magic-link and text-message sign-in in one form.",
|
|
86
91
|
"useWhen": "The application renders its own sign-in rather than redirecting to the hosted page.",
|
|
87
92
|
"requires": [],
|
|
88
93
|
"props": [
|
|
@@ -101,6 +106,16 @@
|
|
|
101
106
|
"summary": "Where an emailed link lands, which must be registered on the environment. Without it, magic link is not offered at all.",
|
|
102
107
|
"required": false
|
|
103
108
|
},
|
|
109
|
+
{
|
|
110
|
+
"name": "phone",
|
|
111
|
+
"summary": "Offer signing in with a code sent by text message. Needs text messages switched on for the environment, and its own Twilio account in production.",
|
|
112
|
+
"required": false
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "secondFactorLabels",
|
|
116
|
+
"summary": "Wording for the second-factor step (code box, or enrolment when the environment requires a factor and the user has none), for translation. English when omitted.",
|
|
117
|
+
"required": false
|
|
118
|
+
},
|
|
104
119
|
{
|
|
105
120
|
"name": "className",
|
|
106
121
|
"summary": "Your own classes on the wrapper.",
|
|
@@ -114,19 +129,84 @@
|
|
|
114
129
|
],
|
|
115
130
|
"seeAlso": [
|
|
116
131
|
"SignUp",
|
|
117
|
-
"ForgotPassword"
|
|
132
|
+
"ForgotPassword",
|
|
133
|
+
"SecondFactorStep"
|
|
118
134
|
]
|
|
119
135
|
},
|
|
120
136
|
{
|
|
121
137
|
"name": "SignUp",
|
|
122
138
|
"kind": "component",
|
|
123
|
-
"summary": "Create an account with an email and a password.",
|
|
139
|
+
"summary": "Create an account with an email and a password, showing the environment's password rules, then sign in — through the second-factor step when one is owed or must be enrolled.",
|
|
124
140
|
"useWhen": "Alongside SignIn, on a page that registers new users.",
|
|
125
141
|
"requires": [],
|
|
126
142
|
"props": [
|
|
127
143
|
{
|
|
128
144
|
"name": "onSignedUp",
|
|
129
|
-
"summary": "Called
|
|
145
|
+
"summary": "Called once the account is created and signed in, or created and waiting on email confirmation.",
|
|
146
|
+
"required": false
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "invitationToken",
|
|
150
|
+
"summary": "The invitation this sign-up accepts; read from `?invitation=` when omitted, `null` to ignore the URL. The account joins the inviting team instead of getting a personal workspace, and its address counts as verified.",
|
|
151
|
+
"required": false
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "onJoined",
|
|
155
|
+
"summary": "Called with the team's organizationId when the sign-up accepted an invitation.",
|
|
156
|
+
"required": false
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"name": "labels",
|
|
160
|
+
"summary": "Wording for the form, for translation.",
|
|
161
|
+
"required": false
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"name": "secondFactorLabels",
|
|
165
|
+
"summary": "Wording for the second-factor step, for translation.",
|
|
166
|
+
"required": false
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"name": "className",
|
|
170
|
+
"summary": "Your own classes on the wrapper.",
|
|
171
|
+
"required": false
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "style",
|
|
175
|
+
"summary": "Inline styles on the wrapper.",
|
|
176
|
+
"required": false
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
"seeAlso": [
|
|
180
|
+
"SignIn",
|
|
181
|
+
"VerifyEmail",
|
|
182
|
+
"SecondFactorStep"
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"name": "SecondFactorStep",
|
|
187
|
+
"kind": "component",
|
|
188
|
+
"summary": "The second half of a sign-in that returned `mfaRequired`: a code box for an existing factor, or — when the environment requires a factor and the user has none — choosing an authenticator app (QR code and key), an emailed code or a text, confirming it, and showing the recovery codes once.",
|
|
189
|
+
"useWhen": "Your own first step (a custom form, a magic-link landing) got a `SignInPending` back. SignIn and SignUp already include it.",
|
|
190
|
+
"requires": [],
|
|
191
|
+
"props": [
|
|
192
|
+
{
|
|
193
|
+
"name": "pending",
|
|
194
|
+
"summary": "The `SignInPending` from signIn, magicLink.verify or phone.verify.",
|
|
195
|
+
"required": true
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "onSignedIn",
|
|
199
|
+
"summary": "Called once the session is handed to the provider.",
|
|
200
|
+
"required": false
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"name": "onRestart",
|
|
204
|
+
"summary": "Back to the start, for a challenge that expired or ran out of attempts. Without it no Start over button is drawn.",
|
|
205
|
+
"required": false
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"name": "labels",
|
|
209
|
+
"summary": "Wording, for translation. English when omitted.",
|
|
130
210
|
"required": false
|
|
131
211
|
},
|
|
132
212
|
{
|
|
@@ -142,7 +222,7 @@
|
|
|
142
222
|
],
|
|
143
223
|
"seeAlso": [
|
|
144
224
|
"SignIn",
|
|
145
|
-
"
|
|
225
|
+
"TwoFactorManager"
|
|
146
226
|
]
|
|
147
227
|
},
|
|
148
228
|
{
|
|
@@ -373,8 +453,8 @@
|
|
|
373
453
|
{
|
|
374
454
|
"name": "TwoFactorManager",
|
|
375
455
|
"kind": "component",
|
|
376
|
-
"summary": "Turn two-factor authentication on or off, by authenticator app
|
|
377
|
-
"useWhen": "A security settings page.
|
|
456
|
+
"summary": "Turn two-factor authentication on or off, by authenticator app, a code to the inbox or a code by text message.",
|
|
457
|
+
"useWhen": "A security settings page. The app is strongest; the emailed or texted code is the one people who will not install an app actually use.",
|
|
378
458
|
"requires": [
|
|
379
459
|
"session"
|
|
380
460
|
],
|
|
@@ -384,6 +464,11 @@
|
|
|
384
464
|
"summary": "Whether a factor already exists, which decides which side is shown.",
|
|
385
465
|
"required": false
|
|
386
466
|
},
|
|
467
|
+
{
|
|
468
|
+
"name": "allowSms",
|
|
469
|
+
"summary": "Offer a code by text message. Off by default: it only works once the environment can send one.",
|
|
470
|
+
"required": false
|
|
471
|
+
},
|
|
387
472
|
{
|
|
388
473
|
"name": "onEnabled",
|
|
389
474
|
"summary": "Called once a factor is confirmed.",
|
|
@@ -444,7 +529,7 @@
|
|
|
444
529
|
{
|
|
445
530
|
"name": "Branding",
|
|
446
531
|
"kind": "component",
|
|
447
|
-
"summary": "The
|
|
532
|
+
"summary": "The logo, name and tagline — the environment's, or the tenant's when the provider is given a `tenant`.",
|
|
448
533
|
"useWhen": "Above a sign-in form, so your pages match the hosted ones.",
|
|
449
534
|
"requires": [],
|
|
450
535
|
"props": [
|
|
@@ -468,7 +553,7 @@
|
|
|
468
553
|
{
|
|
469
554
|
"name": "TeamMembers",
|
|
470
555
|
"kind": "component",
|
|
471
|
-
"summary": "Who is in a team, who has been invited, and the way in and out.",
|
|
556
|
+
"summary": "Who is in a team, who has been invited, and the way in and out. A team reached only through the organization that manages it says so, and offers nothing to leave.",
|
|
472
557
|
"useWhen": "A Team or Members settings page. One component covers the list, the pending invitations, the invite box and leaving.",
|
|
473
558
|
"requires": [
|
|
474
559
|
"session"
|
|
@@ -529,7 +614,7 @@
|
|
|
529
614
|
},
|
|
530
615
|
{
|
|
531
616
|
"name": "signUpUrl",
|
|
532
|
-
"summary": "For somebody with no account yet.",
|
|
617
|
+
"summary": "For somebody with no account yet: a page with SignUp. The link carries `?invitation=`, so the account is created inside this team without a personal workspace.",
|
|
533
618
|
"required": false
|
|
534
619
|
},
|
|
535
620
|
{
|
|
@@ -617,14 +702,31 @@
|
|
|
617
702
|
{
|
|
618
703
|
"name": "SubscriptionManager",
|
|
619
704
|
"kind": "component",
|
|
620
|
-
"summary": "The current plan, its renewal date, and
|
|
705
|
+
"summary": "The current plan, its renewal date, a scheduled plan change with its undo, cancelling at the period end (confirmed in the page) and resuming a cancelled one.",
|
|
621
706
|
"useWhen": "A billing settings page.",
|
|
622
707
|
"requires": [
|
|
623
708
|
"session"
|
|
624
709
|
],
|
|
625
|
-
"props": [
|
|
710
|
+
"props": [
|
|
711
|
+
{
|
|
712
|
+
"name": "onChange",
|
|
713
|
+
"summary": "Called after a cancel, a resume or an undone plan change, so a sibling showing the same subscription can refresh.",
|
|
714
|
+
"required": false
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
"name": "className",
|
|
718
|
+
"summary": "Your own classes on the wrapper.",
|
|
719
|
+
"required": false
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
"name": "style",
|
|
723
|
+
"summary": "Inline styles on the wrapper.",
|
|
724
|
+
"required": false
|
|
725
|
+
}
|
|
726
|
+
],
|
|
626
727
|
"whenUnmet": "Renders nothing without a session.",
|
|
627
728
|
"seeAlso": [
|
|
729
|
+
"BillingPortal",
|
|
628
730
|
"PricingTable",
|
|
629
731
|
"Invoices"
|
|
630
732
|
]
|
|
@@ -632,17 +734,297 @@
|
|
|
632
734
|
{
|
|
633
735
|
"name": "Invoices",
|
|
634
736
|
"kind": "component",
|
|
635
|
-
"summary": "The signed-in user's invoices, newest first.",
|
|
737
|
+
"summary": "The signed-in user's invoices, newest first: view one, download its PDF, and pay one that is still open on the hosted pay page.",
|
|
636
738
|
"useWhen": "A billing settings page.",
|
|
637
739
|
"requires": [
|
|
638
740
|
"session"
|
|
639
741
|
],
|
|
640
|
-
"props": [
|
|
742
|
+
"props": [
|
|
743
|
+
{
|
|
744
|
+
"name": "className",
|
|
745
|
+
"summary": "Your own classes on the wrapper.",
|
|
746
|
+
"required": false
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
"name": "style",
|
|
750
|
+
"summary": "Inline styles on the wrapper.",
|
|
751
|
+
"required": false
|
|
752
|
+
}
|
|
753
|
+
],
|
|
641
754
|
"whenUnmet": "Renders nothing without a session.",
|
|
642
755
|
"seeAlso": [
|
|
756
|
+
"BillingPortal",
|
|
757
|
+
"SubscriptionManager",
|
|
758
|
+
"UpcomingInvoice"
|
|
759
|
+
]
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
"name": "BillingPortal",
|
|
763
|
+
"kind": "component",
|
|
764
|
+
"summary": "A whole billing page for the signed-in user: plan and status, next invoice, scheduled change with undo, plan change with a review step, seats, credit balances with auto-recharge, saved cards, invoices with PDFs and pay, cancel and resume, and a Billing details slot.",
|
|
765
|
+
"useWhen": "You want a complete self-service billing screen inside your own application. For a page you do not host at all, mint a hosted billing portal session from your server instead (`billingPortal.createSession`). For a different layout, compose the pieces it is made of.",
|
|
766
|
+
"requires": [
|
|
767
|
+
"session",
|
|
768
|
+
"plans"
|
|
769
|
+
],
|
|
770
|
+
"props": [
|
|
771
|
+
{
|
|
772
|
+
"name": "returnUrl",
|
|
773
|
+
"summary": "Where the browser comes back to after updating the card on Stripe's page. Must be an environment redirect URI. The current page when omitted.",
|
|
774
|
+
"required": false
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
"name": "featuredPlanKey",
|
|
778
|
+
"summary": "The plan to present as the default choice in the plan picker.",
|
|
779
|
+
"required": false
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
"name": "unitLabel",
|
|
783
|
+
"summary": "What a seat is called, plural. \"seats\" by default.",
|
|
784
|
+
"required": false
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
"name": "billingDetails",
|
|
788
|
+
"summary": "Your own Billing details section (address, tax IDs). By default it is BillingDetailsForm — the address and tax IDs, EU VAT numbers checked with VIES; pass null to leave it out.",
|
|
789
|
+
"required": false
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
"name": "className",
|
|
793
|
+
"summary": "Your own classes on the wrapper.",
|
|
794
|
+
"required": false
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
"name": "style",
|
|
798
|
+
"summary": "Inline styles on the wrapper.",
|
|
799
|
+
"required": false
|
|
800
|
+
}
|
|
801
|
+
],
|
|
802
|
+
"whenUnmet": "Asks the user to sign in without a session. With no subscription it offers the plans through checkout. A managed tenant sees the firm's plan read-only and its own invoices.",
|
|
803
|
+
"seeAlso": [
|
|
804
|
+
"SubscriptionManager",
|
|
805
|
+
"UpcomingInvoice",
|
|
806
|
+
"PlanChangeReview",
|
|
807
|
+
"SeatManager",
|
|
808
|
+
"CreditBalances",
|
|
809
|
+
"PaymentMethod",
|
|
810
|
+
"Invoices"
|
|
811
|
+
]
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
"name": "CreditBalances",
|
|
815
|
+
"kind": "component",
|
|
816
|
+
"summary": "The signed-in user's credit balances: what is left of each metered feature sold in packs, buying a pack now, and auto-recharge (threshold, pack, monthly maximum).",
|
|
817
|
+
"useWhen": "A billing or usage page in a product that sells credit packs. `BillingPortal` includes it. Buying goes to the hosted pay page; auto-recharge charges the card on file.",
|
|
818
|
+
"requires": [
|
|
819
|
+
"session"
|
|
820
|
+
],
|
|
821
|
+
"props": [
|
|
822
|
+
{
|
|
823
|
+
"name": "onChange",
|
|
824
|
+
"summary": "Called after auto-recharge is saved.",
|
|
825
|
+
"required": false
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
"name": "className",
|
|
829
|
+
"summary": "Your own classes on the wrapper.",
|
|
830
|
+
"required": false
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
"name": "style",
|
|
834
|
+
"summary": "Inline styles on the wrapper.",
|
|
835
|
+
"required": false
|
|
836
|
+
}
|
|
837
|
+
],
|
|
838
|
+
"whenUnmet": "Renders nothing without a session or when no credit packs are on sale. A managed tenant sees the balance it spends, read-only.",
|
|
839
|
+
"seeAlso": [
|
|
840
|
+
"BillingPortal",
|
|
841
|
+
"PaymentMethod"
|
|
842
|
+
]
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
"name": "PlanChangeReview",
|
|
846
|
+
"kind": "component",
|
|
847
|
+
"summary": "The review step before a plan change: features gained and lost, the prorated credit and charge or the date it waits for, then confirm.",
|
|
848
|
+
"useWhen": "Your own plan picker, between choosing a plan and changing to it. `BillingPortal` opens it when a subscriber picks a plan.",
|
|
849
|
+
"requires": [
|
|
850
|
+
"session"
|
|
851
|
+
],
|
|
852
|
+
"props": [
|
|
853
|
+
{
|
|
854
|
+
"name": "planVersionId",
|
|
855
|
+
"summary": "The plan version to move to — a PublicPlan's planVersionId. Required in practice.",
|
|
856
|
+
"required": false
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
"name": "onDone",
|
|
860
|
+
"summary": "Called once the change is made or scheduled.",
|
|
861
|
+
"required": false
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
"name": "onCancel",
|
|
865
|
+
"summary": "Called when the user keeps their plan. Without it there is no back button.",
|
|
866
|
+
"required": false
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
"name": "onNeedsCard",
|
|
870
|
+
"summary": "Called when a change now needs a card the account lacks. Without it the review starts a card update itself.",
|
|
871
|
+
"required": false
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
"name": "className",
|
|
875
|
+
"summary": "Your own classes on the wrapper.",
|
|
876
|
+
"required": false
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
"name": "style",
|
|
880
|
+
"summary": "Inline styles on the wrapper.",
|
|
881
|
+
"required": false
|
|
882
|
+
}
|
|
883
|
+
],
|
|
884
|
+
"whenUnmet": "Says the change is not available when the plan cannot be moved to, and that the plan is provided by their organization for a managed tenant.",
|
|
885
|
+
"seeAlso": [
|
|
886
|
+
"BillingPortal",
|
|
887
|
+
"PricingTable",
|
|
888
|
+
"usePlans"
|
|
889
|
+
]
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
"name": "PaymentMethod",
|
|
893
|
+
"kind": "component",
|
|
894
|
+
"summary": "The card the signed-in user's invoices are charged against, a button that replaces it on a Stripe-hosted page, and their other saved cards to make default or remove.",
|
|
895
|
+
"useWhen": "A billing page. The card is entered on Stripe's page on your connected account, never in your page or Base316, so it adds nothing to your PCI scope.",
|
|
896
|
+
"requires": [
|
|
897
|
+
"session",
|
|
898
|
+
"paymentAccount"
|
|
899
|
+
],
|
|
900
|
+
"props": [
|
|
901
|
+
{
|
|
902
|
+
"name": "returnUrl",
|
|
903
|
+
"summary": "Where the browser comes back to once the card is stored. Must be an environment redirect URI. The current page when omitted.",
|
|
904
|
+
"required": false
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
"name": "className",
|
|
908
|
+
"summary": "Your own classes on the wrapper.",
|
|
909
|
+
"required": false
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
"name": "style",
|
|
913
|
+
"summary": "Inline styles on the wrapper.",
|
|
914
|
+
"required": false
|
|
915
|
+
}
|
|
916
|
+
],
|
|
917
|
+
"whenUnmet": "Asks the user to sign in without a session; says cards cannot be updated when the environment has no connected payment account; says the plan is paid for by their organization for a managed tenant.",
|
|
918
|
+
"seeAlso": [
|
|
919
|
+
"BillingPortal",
|
|
920
|
+
"Invoices"
|
|
921
|
+
]
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
"name": "UpcomingInvoice",
|
|
925
|
+
"kind": "component",
|
|
926
|
+
"summary": "The signed-in user's next bill: when it is issued, its lines, discount, tax, wallet balance and the amount due.",
|
|
927
|
+
"useWhen": "A billing or account page that answers 'what will I be charged next'. Computed on request and stored nowhere, so it is safe to show on every visit.",
|
|
928
|
+
"requires": [
|
|
929
|
+
"session"
|
|
930
|
+
],
|
|
931
|
+
"props": [
|
|
932
|
+
{
|
|
933
|
+
"name": "showLines",
|
|
934
|
+
"summary": "Show the breakdown. Off gives one line: the amount due and the date. On by default.",
|
|
935
|
+
"required": false
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
"name": "className",
|
|
939
|
+
"summary": "Your own classes on the wrapper.",
|
|
940
|
+
"required": false
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
"name": "style",
|
|
944
|
+
"summary": "Inline styles on the wrapper.",
|
|
945
|
+
"required": false
|
|
946
|
+
}
|
|
947
|
+
],
|
|
948
|
+
"whenUnmet": "Asks the user to sign in without a session; says there is no upcoming invoice when nothing will bill them; says the plan is provided by their organization for a managed tenant.",
|
|
949
|
+
"seeAlso": [
|
|
950
|
+
"Invoices",
|
|
951
|
+
"SubscriptionManager"
|
|
952
|
+
]
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
"name": "BillingDetailsForm",
|
|
956
|
+
"kind": "component",
|
|
957
|
+
"summary": "The signed-in user's billing address and tax ids, with EU VAT numbers checked against VIES as they are saved.",
|
|
958
|
+
"useWhen": "A billing or account page where a business customer enters the address its invoices are made out to and its VAT, GST or similar number. Saved against the session's own account only.",
|
|
959
|
+
"requires": [
|
|
960
|
+
"session"
|
|
961
|
+
],
|
|
962
|
+
"props": [
|
|
963
|
+
{
|
|
964
|
+
"name": "taxIdTypes",
|
|
965
|
+
"summary": "The tax id types to offer, as Stripe type names with a label and example. Defaults to the EU, UK, Switzerland, Norway, Australia, New Zealand, Canada, India and the US.",
|
|
966
|
+
"required": false
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
"name": "onSave",
|
|
970
|
+
"summary": "Called after a save, with the details as stored — each tax id with its check result.",
|
|
971
|
+
"required": false
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
"name": "className",
|
|
975
|
+
"summary": "Your own classes on the wrapper.",
|
|
976
|
+
"required": false
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
"name": "style",
|
|
980
|
+
"summary": "Inline styles on the wrapper.",
|
|
981
|
+
"required": false
|
|
982
|
+
}
|
|
983
|
+
],
|
|
984
|
+
"whenUnmet": "Asks the user to sign in without a session; says there is no billing account when the user has none; says billing is managed by their organization for a managed tenant, and offers nothing to change.",
|
|
985
|
+
"seeAlso": [
|
|
986
|
+
"Invoices",
|
|
987
|
+
"UpcomingInvoice",
|
|
643
988
|
"SubscriptionManager"
|
|
644
989
|
]
|
|
645
990
|
},
|
|
991
|
+
{
|
|
992
|
+
"name": "SeatManager",
|
|
993
|
+
"kind": "component",
|
|
994
|
+
"summary": "Change how many seats the signed-in user's subscription is for, with the prorated price previewed before anything is charged.",
|
|
995
|
+
"useWhen": "A billing or team page on a plan sold per seat. Adding seats is charged now for the rest of the period; removing them takes effect at the period end with no refund. The user picks only the number.",
|
|
996
|
+
"requires": [
|
|
997
|
+
"session"
|
|
998
|
+
],
|
|
999
|
+
"props": [
|
|
1000
|
+
{
|
|
1001
|
+
"name": "unitLabel",
|
|
1002
|
+
"summary": "What a unit is called, plural. \"seats\" by default.",
|
|
1003
|
+
"required": false
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
"name": "onChange",
|
|
1007
|
+
"summary": "Called after a change is made, with what it did (amount, invoice, when it applies).",
|
|
1008
|
+
"required": false
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
"name": "className",
|
|
1012
|
+
"summary": "Your own classes on the wrapper.",
|
|
1013
|
+
"required": false
|
|
1014
|
+
},
|
|
1015
|
+
{
|
|
1016
|
+
"name": "style",
|
|
1017
|
+
"summary": "Inline styles on the wrapper.",
|
|
1018
|
+
"required": false
|
|
1019
|
+
}
|
|
1020
|
+
],
|
|
1021
|
+
"whenUnmet": "Asks the user to sign in without a session; says there is no plan when they have no subscription; says the plan is provided by their organization for a managed tenant, and offers no change.",
|
|
1022
|
+
"seeAlso": [
|
|
1023
|
+
"SubscriptionManager",
|
|
1024
|
+
"UpcomingInvoice",
|
|
1025
|
+
"TeamMembers"
|
|
1026
|
+
]
|
|
1027
|
+
},
|
|
646
1028
|
{
|
|
647
1029
|
"name": "PayInvoice",
|
|
648
1030
|
"kind": "component",
|
|
@@ -13,11 +13,25 @@ import { type CSSProperties } from "react";
|
|
|
13
13
|
* means the page survives a sign-in round trip that navigates away and back —
|
|
14
14
|
* which is the normal path for somebody who has just created an account.
|
|
15
15
|
*/
|
|
16
|
+
/**
|
|
17
|
+
* The sign-up link, carrying the invitation.
|
|
18
|
+
*
|
|
19
|
+
* `<SignUp />` reads `?invitation=` and sends it with the sign-up, which is
|
|
20
|
+
* what creates the account inside this team instead of in a personal
|
|
21
|
+
* workspace nobody asked for. A link the caller already gave a token is left
|
|
22
|
+
* alone; a fragment stays at the end, where it belongs.
|
|
23
|
+
*/
|
|
24
|
+
export declare function signUpUrlWithInvitation(url: string, token: string): string;
|
|
16
25
|
export interface AcceptInvitationProps {
|
|
17
26
|
/** Supply the token directly. Read from `?invitation=` when omitted. */
|
|
18
27
|
token?: string;
|
|
19
28
|
onAccepted?: (organizationId: string) => void;
|
|
20
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Where to send somebody who needs an account first — a page with
|
|
31
|
+
* `<SignUp />`. The invitation is appended as `?invitation=`, so the
|
|
32
|
+
* account is created inside this team rather than in a workspace of its
|
|
33
|
+
* own.
|
|
34
|
+
*/
|
|
21
35
|
signUpUrl?: string;
|
|
22
36
|
signInUrl?: string;
|
|
23
37
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcceptInvitation.d.ts","sourceRoot":"","sources":["../../src/AcceptInvitation.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAKhE;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,qBAAqB;IACrC,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C
|
|
1
|
+
{"version":3,"file":"AcceptInvitation.d.ts","sourceRoot":"","sources":["../../src/AcceptInvitation.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAKhE;;;;;;;;;;;;;GAaG;AAEH;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAW1E;AAED,MAAM,WAAW,qBAAqB;IACrC,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAAC,EAChC,KAAK,EAAE,QAAQ,EACf,UAAU,EACV,SAAS,EACT,SAAS,EACT,SAAS,EACT,KAAK,GACL,EAAE,qBAAqB,+BA+IvB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { BillingDetails } from "@base316/sdk";
|
|
2
|
+
import { type CSSProperties } from "react";
|
|
3
|
+
export interface BillingDetailsFormProps {
|
|
4
|
+
/**
|
|
5
|
+
* The tax id types to offer, in order. Stripe's type names; the defaults
|
|
6
|
+
* cover the EU, UK, Switzerland, Norway, Australia, New Zealand, Canada,
|
|
7
|
+
* India and the US.
|
|
8
|
+
*/
|
|
9
|
+
taxIdTypes?: {
|
|
10
|
+
type: string;
|
|
11
|
+
label: string;
|
|
12
|
+
example: string;
|
|
13
|
+
}[];
|
|
14
|
+
/** Called after a save, with the details as stored — tax ids with their check result. */
|
|
15
|
+
onSave?: (details: BillingDetails) => void;
|
|
16
|
+
className?: string;
|
|
17
|
+
style?: CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The signed-in user's billing address and tax ids.
|
|
21
|
+
*
|
|
22
|
+
* Saved against their own account only — the session decides which, never
|
|
23
|
+
* anything the page sends. An EU VAT number is checked with the EU's VIES
|
|
24
|
+
* service as it is saved, and its result shown: a number VIES does not know is
|
|
25
|
+
* kept and marked, never silently dropped, and one VIES cannot reach right now
|
|
26
|
+
* is checked again later. Invoices are made out to this address, and a valid
|
|
27
|
+
* EU VAT number lets a cross-border business purchase be reverse charged.
|
|
28
|
+
*
|
|
29
|
+
* A client company whose plan a firm pays for is told so instead: the firm's
|
|
30
|
+
* account is the one invoiced.
|
|
31
|
+
*/
|
|
32
|
+
export declare function BillingDetailsForm({ taxIdTypes, onSave, className, style, }: BillingDetailsFormProps): import("react").JSX.Element;
|
|
33
|
+
//# sourceMappingURL=BillingDetailsForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BillingDetailsForm.d.ts","sourceRoot":"","sources":["../../src/BillingDetailsForm.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAA+B,MAAM,cAAc,CAAC;AAChF,OAAO,EAAoC,KAAK,aAAa,EAAkB,MAAM,OAAO,CAAC;AAgD7F,MAAM,WAAW,uBAAuB;IACvC;;;;OAIG;IACH,UAAU,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAChE,yFAAyF;IACzF,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACtB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,EAClC,UAAiC,EACjC,MAAM,EACN,SAAS,EACT,KAAK,GACL,EAAE,uBAAuB,+BAiOzB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from "react";
|
|
2
|
+
export interface BillingPortalProps {
|
|
3
|
+
/**
|
|
4
|
+
* Where the browser comes back to after updating the card on Stripe's page.
|
|
5
|
+
* Must be one of the environment's redirect URIs. Defaults to the current
|
|
6
|
+
* page.
|
|
7
|
+
*/
|
|
8
|
+
returnUrl?: string;
|
|
9
|
+
/** The plan to present as the default choice in the plan picker, by key. */
|
|
10
|
+
featuredPlanKey?: string;
|
|
11
|
+
/** What a seat is called, plural. "seats" by default. */
|
|
12
|
+
unitLabel?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The "Billing details" section: the billing address and tax IDs.
|
|
15
|
+
*
|
|
16
|
+
* Replace it with your own form, or pass `null` to leave it out. By default
|
|
17
|
+
* it is `<BillingDetailsForm />`: the address invoices are made out to and
|
|
18
|
+
* the tax IDs on them, EU VAT numbers checked with VIES as they are saved.
|
|
19
|
+
*/
|
|
20
|
+
billingDetails?: ReactNode;
|
|
21
|
+
className?: string;
|
|
22
|
+
style?: CSSProperties;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A whole billing page for the signed-in user, in one component.
|
|
26
|
+
*
|
|
27
|
+
* The embeddable counterpart to the hosted billing portal: plan and status,
|
|
28
|
+
* the next invoice, a scheduled change with its undo, a plan picker whose
|
|
29
|
+
* choice opens a review step, seats when the plan is priced per seat, credit
|
|
30
|
+
* balances with buying and auto-recharge when the product sells credit packs,
|
|
31
|
+
* the saved cards, invoices with their PDFs and a way to pay an open one, and cancel
|
|
32
|
+
* and resume. Everything goes through the signed-in user's session and the
|
|
33
|
+
* `/v1/me` routes, which apply the same rules as the hosted page.
|
|
34
|
+
*
|
|
35
|
+
* It is the existing pieces composed — `SubscriptionManager`,
|
|
36
|
+
* `UpcomingInvoice`, `PricingTable`, `PlanChangeReview`, `SeatManager`,
|
|
37
|
+
* `CreditBalances`, `PaymentMethod` and `Invoices` — so a page that wants a different layout
|
|
38
|
+
* uses those directly. After any change the pieces are re-read together, so
|
|
39
|
+
* the invoice preview never disagrees with the plan above it.
|
|
40
|
+
*
|
|
41
|
+
* A client company billed by the firm that manages it sees the firm's plan,
|
|
42
|
+
* read-only and named, and its own invoices — nothing it could change.
|
|
43
|
+
*/
|
|
44
|
+
export declare function BillingPortal({ returnUrl, featuredPlanKey, unitLabel, billingDetails, className, style, }: BillingPortalProps): import("react").JSX.Element;
|
|
45
|
+
//# sourceMappingURL=BillingPortal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BillingPortal.d.ts","sourceRoot":"","sources":["../../src/BillingPortal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAoC,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAc7F,MAAM,WAAW,kBAAkB;IAClC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACtB;AASD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,aAAa,CAAC,EAC7B,SAAS,EACT,eAAe,EACf,SAAS,EACT,cAAc,EACd,SAAS,EACT,KAAK,GACL,EAAE,kBAAkB,+BAsIpB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type CSSProperties } from "react";
|
|
2
|
+
export interface CreditBalancesProps {
|
|
3
|
+
/** Called after auto-recharge is saved. */
|
|
4
|
+
onChange?: () => void;
|
|
5
|
+
className?: string;
|
|
6
|
+
style?: CSSProperties;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The signed-in user's credit balances: what is left of each metered feature
|
|
10
|
+
* sold in packs, a way to buy a pack now, and auto-recharge — a threshold, the
|
|
11
|
+
* pack to buy, and a monthly maximum.
|
|
12
|
+
*
|
|
13
|
+
* Buying goes to the hosted pay page; auto-recharge charges the card on file
|
|
14
|
+
* (`PaymentMethod`). A client company whose credits a firm pays for sees the
|
|
15
|
+
* pool it spends, with nothing to change. Renders nothing when the product
|
|
16
|
+
* sells no credit packs.
|
|
17
|
+
*/
|
|
18
|
+
export declare function CreditBalances({ onChange, className, style }: CreditBalancesProps): import("react").JSX.Element | null;
|
|
19
|
+
//# sourceMappingURL=CreditBalances.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreditBalances.d.ts","sourceRoot":"","sources":["../../src/CreditBalances.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAuB,KAAK,aAAa,EAAkC,MAAM,OAAO,CAAC;AAOhG,MAAM,WAAW,mBAAmB;IACnC,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACtB;AAsOD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,mBAAmB,sCAoEjF"}
|