@base316/react 0.3.0 → 0.5.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.
- package/CHANGELOG.md +102 -0
- package/LICENSE +1 -1
- package/dist/index.cjs +5296 -3082
- 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 +4141 -1929
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +377 -10
- 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 +7 -2
- 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/UpcomingInvoice.d.ts +21 -0
- package/dist/src/UpcomingInvoice.d.ts.map +1 -0
- package/dist/src/appearance.d.ts +1 -1
- package/dist/src/appearance.d.ts.map +1 -1
- package/dist/src/manifest.d.ts.map +1 -1
- package/dist/src/usePlans.d.ts +9 -0
- package/dist/src/usePlans.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/manifest.json
CHANGED
|
@@ -111,6 +111,11 @@
|
|
|
111
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
112
|
"required": false
|
|
113
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
|
+
},
|
|
114
119
|
{
|
|
115
120
|
"name": "className",
|
|
116
121
|
"summary": "Your own classes on the wrapper.",
|
|
@@ -124,19 +129,84 @@
|
|
|
124
129
|
],
|
|
125
130
|
"seeAlso": [
|
|
126
131
|
"SignUp",
|
|
127
|
-
"ForgotPassword"
|
|
132
|
+
"ForgotPassword",
|
|
133
|
+
"SecondFactorStep"
|
|
128
134
|
]
|
|
129
135
|
},
|
|
130
136
|
{
|
|
131
137
|
"name": "SignUp",
|
|
132
138
|
"kind": "component",
|
|
133
|
-
"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.",
|
|
134
140
|
"useWhen": "Alongside SignIn, on a page that registers new users.",
|
|
135
141
|
"requires": [],
|
|
136
142
|
"props": [
|
|
137
143
|
{
|
|
138
144
|
"name": "onSignedUp",
|
|
139
|
-
"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.",
|
|
140
210
|
"required": false
|
|
141
211
|
},
|
|
142
212
|
{
|
|
@@ -152,7 +222,7 @@
|
|
|
152
222
|
],
|
|
153
223
|
"seeAlso": [
|
|
154
224
|
"SignIn",
|
|
155
|
-
"
|
|
225
|
+
"TwoFactorManager"
|
|
156
226
|
]
|
|
157
227
|
},
|
|
158
228
|
{
|
|
@@ -520,7 +590,7 @@
|
|
|
520
590
|
"required": false
|
|
521
591
|
}
|
|
522
592
|
],
|
|
523
|
-
"whenUnmet": "Renders nothing without a session. Inviting and removing appear only for somebody whose role grants team.manage.",
|
|
593
|
+
"whenUnmet": "Renders nothing without a session. Inviting and removing appear only for somebody whose role grants team.manage, and are refused for a role granting anything the viewer does not hold. Addresses are shown only to such a viewer.",
|
|
524
594
|
"seeAlso": [
|
|
525
595
|
"AcceptInvitation"
|
|
526
596
|
]
|
|
@@ -544,7 +614,7 @@
|
|
|
544
614
|
},
|
|
545
615
|
{
|
|
546
616
|
"name": "signUpUrl",
|
|
547
|
-
"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.",
|
|
548
618
|
"required": false
|
|
549
619
|
},
|
|
550
620
|
{
|
|
@@ -632,14 +702,31 @@
|
|
|
632
702
|
{
|
|
633
703
|
"name": "SubscriptionManager",
|
|
634
704
|
"kind": "component",
|
|
635
|
-
"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.",
|
|
636
706
|
"useWhen": "A billing settings page.",
|
|
637
707
|
"requires": [
|
|
638
708
|
"session"
|
|
639
709
|
],
|
|
640
|
-
"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
|
+
],
|
|
641
727
|
"whenUnmet": "Renders nothing without a session.",
|
|
642
728
|
"seeAlso": [
|
|
729
|
+
"BillingPortal",
|
|
643
730
|
"PricingTable",
|
|
644
731
|
"Invoices"
|
|
645
732
|
]
|
|
@@ -647,17 +734,297 @@
|
|
|
647
734
|
{
|
|
648
735
|
"name": "Invoices",
|
|
649
736
|
"kind": "component",
|
|
650
|
-
"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.",
|
|
651
738
|
"useWhen": "A billing settings page.",
|
|
652
739
|
"requires": [
|
|
653
740
|
"session"
|
|
654
741
|
],
|
|
655
|
-
"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
|
+
],
|
|
656
754
|
"whenUnmet": "Renders nothing without a session.",
|
|
657
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",
|
|
658
951
|
"SubscriptionManager"
|
|
659
952
|
]
|
|
660
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",
|
|
988
|
+
"SubscriptionManager"
|
|
989
|
+
]
|
|
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
|
+
},
|
|
661
1028
|
{
|
|
662
1029
|
"name": "PayInvoice",
|
|
663
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"}
|
package/dist/src/Invoices.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { type CSSProperties } from "react";
|
|
2
2
|
/**
|
|
3
|
-
* The signed-in user's invoices,
|
|
3
|
+
* The signed-in user's invoices: view one, download its PDF, and pay one that
|
|
4
|
+
* is still open.
|
|
4
5
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* The PDF is the server's own rendering (`/v1/me/invoices/:id/pdf`) — the same
|
|
7
|
+
* document an operator downloads — fetched with the session and handed to the
|
|
8
|
+
* browser as a download, so nothing about it depends on the host page's print
|
|
9
|
+
* stylesheet. Viewing still opens the printable layout in the page.
|
|
10
|
+
*
|
|
11
|
+
* Paying sends the browser to the hosted pay page, minted on demand for that
|
|
12
|
+
* invoice, where Stripe collects the card; the figure charged is read from the
|
|
13
|
+
* invoice there, never from this list.
|
|
10
14
|
*
|
|
11
15
|
* Drafts never appear. They are the rating engine's working state and can still
|
|
12
16
|
* change, so showing one as a bill would be wrong.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Invoices.d.ts","sourceRoot":"","sources":["../../src/Invoices.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAoC,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Invoices.d.ts","sourceRoot":"","sources":["../../src/Invoices.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAoC,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AA0B7E;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,aAAa,CAAA;CAAE,+BAkM3F"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type CSSProperties } from "react";
|
|
2
|
+
export interface PaymentMethodProps {
|
|
3
|
+
/**
|
|
4
|
+
* Where the browser comes back to once the new card is stored. Must be one
|
|
5
|
+
* of the environment's redirect URIs. Defaults to the current page.
|
|
6
|
+
*/
|
|
7
|
+
returnUrl?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The card the signed-in user's invoices are charged against, and a way to
|
|
13
|
+
* replace it — plus any other saved cards, each of which can be made the
|
|
14
|
+
* default or removed.
|
|
15
|
+
*
|
|
16
|
+
* Replacing it goes to a page hosted by Stripe, on the application's connected
|
|
17
|
+
* account: the card is never typed into this component, the host page or
|
|
18
|
+
* Base316, so adding this to an application adds nothing to its PCI scope.
|
|
19
|
+
* The browser returns to `returnUrl` once the card is stored.
|
|
20
|
+
*
|
|
21
|
+
* A client company whose plan a firm pays for is told so instead — the firm's
|
|
22
|
+
* card is the one charged.
|
|
23
|
+
*/
|
|
24
|
+
export declare function PaymentMethod({ returnUrl, className, style }: PaymentMethodProps): import("react").JSX.Element;
|
|
25
|
+
//# sourceMappingURL=PaymentMethod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentMethod.d.ts","sourceRoot":"","sources":["../../src/PaymentMethod.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAuB,KAAK,aAAa,EAAkB,MAAM,OAAO,CAAC;AAWhF,MAAM,WAAW,kBAAkB;IAClC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACtB;AAQD;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,kBAAkB,+BAkKhF"}
|