@forgeroute/ui 0.4.40 → 0.4.42
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/fesm2022/forgeroute-ui-messaging.mjs +686 -35
- package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-stripe.mjs +566 -190
- package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
- package/fesm2022/forgeroute-ui.mjs +313 -35
- package/fesm2022/forgeroute-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-messaging.d.ts +166 -1
- package/types/forgeroute-ui-stripe.d.ts +212 -64
- package/types/forgeroute-ui.d.ts +134 -18
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injectable, InjectionToken, PLATFORM_ID, ViewEncapsulation, computed, effect, inject, input, output, signal, untracked, viewChild } from "@angular/core";
|
|
3
|
-
import { DOCUMENT, isPlatformBrowser } from "@angular/common";
|
|
4
|
-
import { AlertComponent, BadgeComponent, ButtonComponent,
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injectable, InjectionToken, PLATFORM_ID, ViewEncapsulation, computed, effect, inject, input, model, output, signal, untracked, viewChild } from "@angular/core";
|
|
3
|
+
import { DOCUMENT, NgTemplateOutlet, isPlatformBrowser } from "@angular/common";
|
|
4
|
+
import { AlertComponent, BadgeComponent, ButtonComponent, DetailCardComponent, FormRowComponent, FormSectionComponent, ModalComponent, SkeletonComponent, StackComponent, TextComponent, TextInputComponent } from "@forgeroute/ui";
|
|
5
5
|
import * as i1 from "@angular/forms";
|
|
6
6
|
import { FormsModule } from "@angular/forms";
|
|
7
|
-
import { HttpClient, HttpErrorResponse, HttpParams } from "@angular/common/http";
|
|
8
7
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
9
8
|
const sdkImporter = { load: () => import("@stripe/stripe-js") };
|
|
10
9
|
const defaultStripeLoader = async (publishableKey, options) => {
|
|
@@ -450,6 +449,7 @@ var StripePaymentComponent = class StripePaymentComponent {
|
|
|
450
449
|
this.disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
451
450
|
this.pending = input(false, ...ngDevMode ? [{ debugName: "pending" }] : /* istanbul ignore next */ []);
|
|
452
451
|
this.label = input("Payment details", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
452
|
+
this.required = input(false, ...ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []);
|
|
453
453
|
this.mountId = input("", ...ngDevMode ? [{ debugName: "mountId" }] : /* istanbul ignore next */ []);
|
|
454
454
|
this.mountClass = input("", ...ngDevMode ? [{ debugName: "mountClass" }] : /* istanbul ignore next */ []);
|
|
455
455
|
this.showAchNotice = input(true, ...ngDevMode ? [{ debugName: "showAchNotice" }] : /* istanbul ignore next */ []);
|
|
@@ -1245,6 +1245,13 @@ var StripePaymentComponent = class StripePaymentComponent {
|
|
|
1245
1245
|
isRequired: false,
|
|
1246
1246
|
transformFunction: null
|
|
1247
1247
|
},
|
|
1248
|
+
required: {
|
|
1249
|
+
classPropertyName: "required",
|
|
1250
|
+
publicName: "required",
|
|
1251
|
+
isSignal: true,
|
|
1252
|
+
isRequired: false,
|
|
1253
|
+
transformFunction: null
|
|
1254
|
+
},
|
|
1248
1255
|
mountId: {
|
|
1249
1256
|
classPropertyName: "mountId",
|
|
1250
1257
|
publicName: "mountId",
|
|
@@ -1377,6 +1384,9 @@ var StripePaymentComponent = class StripePaymentComponent {
|
|
|
1377
1384
|
@if (!mountOnly() && loadErrorText(); as text) {
|
|
1378
1385
|
<div class="sp-block" data-testid="stripe-load-error"><ui-alert variant="danger">{{ text }}</ui-alert></div>
|
|
1379
1386
|
}
|
|
1387
|
+
@if (!mountOnly() && required()) {
|
|
1388
|
+
<div class="sp-label" data-testid="stripe-required-label">{{ label() }}<span class="sp-required" aria-hidden="true">*</span></div>
|
|
1389
|
+
}
|
|
1380
1390
|
<div #mount class="sp-mount" [attr.id]="mountId() || null" [class]="mountClass()" [class.sp-mount--hidden]="mountHidden()" [attr.aria-hidden]="mountHidden() ? 'true' : null" [attr.inert]="mountHidden() ? '' : null"
|
|
1381
1391
|
[attr.role]="mountOnly() ? null : 'group'" [attr.aria-label]="mountOnly() ? null : label()" data-testid="stripe-mount"></div>
|
|
1382
1392
|
@if (!mountOnly() && achNoticeVisible()) {
|
|
@@ -1394,7 +1404,7 @@ var StripePaymentComponent = class StripePaymentComponent {
|
|
|
1394
1404
|
</div>
|
|
1395
1405
|
`,
|
|
1396
1406
|
isInline: true,
|
|
1397
|
-
styles: ["ui-stripe-payment{display:block;min-width:0}ui-stripe-payment .sp-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sp-block{margin-top:12px}.sp-actions{margin-top:16px;display:flex;justify-content:flex-end}ui-stripe-payment .sp{position:relative}.sp-mount--hidden{position:absolute;top:0;left:0;right:0;opacity:0;pointer-events:none}@media(max-width:480px){.sp-actions{display:block}.sp-actions ui-button{display:flex}ui-stripe-payment .sp-actions .btn{width:100%}}\n"],
|
|
1407
|
+
styles: ["ui-stripe-payment{display:block;min-width:0}ui-stripe-payment .sp-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sp-block{margin-top:12px}.sp-label{font-size:.875rem;font-weight:500;color:#1e293b;margin-bottom:6px}.sp-required{color:#dc2626;margin-left:2px}.sp-actions{margin-top:16px;display:flex;justify-content:flex-end}ui-stripe-payment .sp{position:relative}.sp-mount--hidden{position:absolute;top:0;left:0;right:0;opacity:0;pointer-events:none}@media(max-width:480px){.sp-actions{display:block}.sp-actions ui-button{display:flex}ui-stripe-payment .sp-actions .btn{width:100%}}\n"],
|
|
1398
1408
|
dependencies: [
|
|
1399
1409
|
{
|
|
1400
1410
|
kind: "component",
|
|
@@ -1407,7 +1417,8 @@ var StripePaymentComponent = class StripePaymentComponent {
|
|
|
1407
1417
|
"dismissAriaLabel",
|
|
1408
1418
|
"quiet",
|
|
1409
1419
|
"compact",
|
|
1410
|
-
"inline"
|
|
1420
|
+
"inline",
|
|
1421
|
+
"fill"
|
|
1411
1422
|
],
|
|
1412
1423
|
outputs: ["dismissed"]
|
|
1413
1424
|
},
|
|
@@ -1492,6 +1503,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1492
1503
|
@if (!mountOnly() && loadErrorText(); as text) {
|
|
1493
1504
|
<div class="sp-block" data-testid="stripe-load-error"><ui-alert variant="danger">{{ text }}</ui-alert></div>
|
|
1494
1505
|
}
|
|
1506
|
+
@if (!mountOnly() && required()) {
|
|
1507
|
+
<div class="sp-label" data-testid="stripe-required-label">{{ label() }}<span class="sp-required" aria-hidden="true">*</span></div>
|
|
1508
|
+
}
|
|
1495
1509
|
<div #mount class="sp-mount" [attr.id]="mountId() || null" [class]="mountClass()" [class.sp-mount--hidden]="mountHidden()" [attr.aria-hidden]="mountHidden() ? 'true' : null" [attr.inert]="mountHidden() ? '' : null"
|
|
1496
1510
|
[attr.role]="mountOnly() ? null : 'group'" [attr.aria-label]="mountOnly() ? null : label()" data-testid="stripe-mount"></div>
|
|
1497
1511
|
@if (!mountOnly() && achNoticeVisible()) {
|
|
@@ -1508,7 +1522,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1508
1522
|
}
|
|
1509
1523
|
</div>
|
|
1510
1524
|
`,
|
|
1511
|
-
styles: ["ui-stripe-payment{display:block;min-width:0}ui-stripe-payment .sp-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sp-block{margin-top:12px}.sp-actions{margin-top:16px;display:flex;justify-content:flex-end}ui-stripe-payment .sp{position:relative}.sp-mount--hidden{position:absolute;top:0;left:0;right:0;opacity:0;pointer-events:none}@media(max-width:480px){.sp-actions{display:block}.sp-actions ui-button{display:flex}ui-stripe-payment .sp-actions .btn{width:100%}}\n"]
|
|
1525
|
+
styles: ["ui-stripe-payment{display:block;min-width:0}ui-stripe-payment .sp-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sp-block{margin-top:12px}.sp-label{font-size:.875rem;font-weight:500;color:#1e293b;margin-bottom:6px}.sp-required{color:#dc2626;margin-left:2px}.sp-actions{margin-top:16px;display:flex;justify-content:flex-end}ui-stripe-payment .sp{position:relative}.sp-mount--hidden{position:absolute;top:0;left:0;right:0;opacity:0;pointer-events:none}@media(max-width:480px){.sp-actions{display:block}.sp-actions ui-button{display:flex}ui-stripe-payment .sp-actions .btn{width:100%}}\n"]
|
|
1512
1526
|
}]
|
|
1513
1527
|
}],
|
|
1514
1528
|
ctorParameters: () => [],
|
|
@@ -1769,6 +1783,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1769
1783
|
required: false
|
|
1770
1784
|
}]
|
|
1771
1785
|
}],
|
|
1786
|
+
required: [{
|
|
1787
|
+
type: i0.Input,
|
|
1788
|
+
args: [{
|
|
1789
|
+
isSignal: true,
|
|
1790
|
+
alias: "required",
|
|
1791
|
+
required: false
|
|
1792
|
+
}]
|
|
1793
|
+
}],
|
|
1772
1794
|
mountId: [{
|
|
1773
1795
|
type: i0.Input,
|
|
1774
1796
|
args: [{
|
|
@@ -2393,7 +2415,8 @@ var MicrodepositVerifyComponent = class MicrodepositVerifyComponent {
|
|
|
2393
2415
|
"dismissAriaLabel",
|
|
2394
2416
|
"quiet",
|
|
2395
2417
|
"compact",
|
|
2396
|
-
"inline"
|
|
2418
|
+
"inline",
|
|
2419
|
+
"fill"
|
|
2397
2420
|
],
|
|
2398
2421
|
outputs: ["dismissed"]
|
|
2399
2422
|
},
|
|
@@ -2824,90 +2847,240 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2824
2847
|
}]
|
|
2825
2848
|
}
|
|
2826
2849
|
});
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
this.
|
|
2839
|
-
this.
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
this.
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
this.
|
|
2848
|
-
|
|
2849
|
-
this.
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2850
|
+
function isStripeUrl(url) {
|
|
2851
|
+
if (!url) return false;
|
|
2852
|
+
try {
|
|
2853
|
+
const u = new URL(url);
|
|
2854
|
+
return u.protocol === "https:" && (u.hostname === "stripe.com" || u.hostname.endsWith(".stripe.com"));
|
|
2855
|
+
} catch {
|
|
2856
|
+
return false;
|
|
2857
|
+
}
|
|
2858
|
+
}
|
|
2859
|
+
var StripeConnectFlow = class {
|
|
2860
|
+
constructor(o) {
|
|
2861
|
+
this.o = o;
|
|
2862
|
+
this.tabOpened = false;
|
|
2863
|
+
}
|
|
2864
|
+
get blocked() {
|
|
2865
|
+
return this.o.state.loading() || !!this.o.disabled?.();
|
|
2866
|
+
}
|
|
2867
|
+
start() {
|
|
2868
|
+
const create = this.o.createAccount();
|
|
2869
|
+
if (!create || this.blocked) return;
|
|
2870
|
+
this.o.state.loading.set(true);
|
|
2871
|
+
const tab = this.openBlankTab();
|
|
2872
|
+
create().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({
|
|
2873
|
+
next: (result) => {
|
|
2874
|
+
this.o.state.accountId.set(result.accountId);
|
|
2875
|
+
this.o.state.loading.set(false);
|
|
2876
|
+
this.openStripe(tab, result.onboardingUrl);
|
|
2877
|
+
},
|
|
2878
|
+
error: (error) => {
|
|
2879
|
+
this.closeTab(tab);
|
|
2880
|
+
this.o.state.loading.set(false);
|
|
2881
|
+
this.o.emit({
|
|
2882
|
+
kind: "failed",
|
|
2883
|
+
action: "start",
|
|
2884
|
+
error
|
|
2885
|
+
});
|
|
2886
|
+
}
|
|
2858
2887
|
});
|
|
2859
2888
|
}
|
|
2860
|
-
|
|
2861
|
-
this.
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
this.
|
|
2867
|
-
this.
|
|
2889
|
+
check() {
|
|
2890
|
+
const status = this.o.getStatus();
|
|
2891
|
+
if (!status || this.blocked) return;
|
|
2892
|
+
this.o.state.loading.set(true);
|
|
2893
|
+
status().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({
|
|
2894
|
+
next: (s) => {
|
|
2895
|
+
this.o.state.complete.set(s.isComplete);
|
|
2896
|
+
this.o.state.detailsSubmitted.set(s.detailsSubmitted ?? false);
|
|
2897
|
+
this.o.state.loading.set(false);
|
|
2898
|
+
if (s.isComplete) this.o.emit({
|
|
2899
|
+
kind: "complete",
|
|
2900
|
+
source: "check"
|
|
2901
|
+
});
|
|
2902
|
+
else if (s.detailsSubmitted) this.o.emit({
|
|
2903
|
+
kind: "verifying",
|
|
2904
|
+
source: "check"
|
|
2905
|
+
});
|
|
2906
|
+
else if (s.onboardingUrl) this.o.emit({ kind: "incomplete" });
|
|
2868
2907
|
},
|
|
2869
|
-
error: (
|
|
2870
|
-
this.
|
|
2871
|
-
this.
|
|
2908
|
+
error: (error) => {
|
|
2909
|
+
this.o.state.loading.set(false);
|
|
2910
|
+
this.o.emit({
|
|
2911
|
+
kind: "failed",
|
|
2912
|
+
action: "check",
|
|
2913
|
+
error
|
|
2914
|
+
});
|
|
2872
2915
|
}
|
|
2873
2916
|
});
|
|
2874
2917
|
}
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
this.
|
|
2878
|
-
this.
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
this.
|
|
2886
|
-
this.
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2918
|
+
resume() {
|
|
2919
|
+
const status = this.o.getStatus();
|
|
2920
|
+
if (!status || this.blocked) return;
|
|
2921
|
+
this.o.state.loading.set(true);
|
|
2922
|
+
const tab = this.openBlankTab();
|
|
2923
|
+
status().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({
|
|
2924
|
+
next: (s) => {
|
|
2925
|
+
this.o.state.loading.set(false);
|
|
2926
|
+
if (s.isComplete) {
|
|
2927
|
+
this.closeTab(tab);
|
|
2928
|
+
this.o.state.complete.set(true);
|
|
2929
|
+
this.o.emit({
|
|
2930
|
+
kind: "complete",
|
|
2931
|
+
source: "resume"
|
|
2932
|
+
});
|
|
2933
|
+
} else if (s.detailsSubmitted) {
|
|
2934
|
+
this.closeTab(tab);
|
|
2935
|
+
this.o.state.detailsSubmitted.set(true);
|
|
2936
|
+
this.o.emit({
|
|
2937
|
+
kind: "verifying",
|
|
2938
|
+
source: "resume"
|
|
2939
|
+
});
|
|
2940
|
+
} else this.openStripe(tab, s.onboardingUrl);
|
|
2890
2941
|
},
|
|
2891
|
-
error: (
|
|
2892
|
-
this.
|
|
2893
|
-
this.
|
|
2942
|
+
error: (error) => {
|
|
2943
|
+
this.closeTab(tab);
|
|
2944
|
+
this.o.state.loading.set(false);
|
|
2945
|
+
this.o.emit({
|
|
2946
|
+
kind: "failed",
|
|
2947
|
+
action: "resume",
|
|
2948
|
+
error
|
|
2949
|
+
});
|
|
2894
2950
|
}
|
|
2895
2951
|
});
|
|
2896
2952
|
}
|
|
2897
|
-
|
|
2898
|
-
|
|
2953
|
+
readStatusOnReturn() {
|
|
2954
|
+
const status = this.o.getStatus();
|
|
2955
|
+
if (!status) return;
|
|
2956
|
+
status().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({
|
|
2957
|
+
next: (s) => {
|
|
2958
|
+
this.o.state.complete.set(s.isComplete);
|
|
2959
|
+
this.o.state.detailsSubmitted.set(s.detailsSubmitted ?? false);
|
|
2960
|
+
if (s.isComplete) this.o.emit({
|
|
2961
|
+
kind: "complete",
|
|
2962
|
+
source: "return"
|
|
2963
|
+
});
|
|
2964
|
+
else if (s.detailsSubmitted) this.o.emit({
|
|
2965
|
+
kind: "verifying",
|
|
2966
|
+
source: "return"
|
|
2967
|
+
});
|
|
2968
|
+
},
|
|
2969
|
+
error: () => {}
|
|
2970
|
+
});
|
|
2971
|
+
}
|
|
2972
|
+
openStripe(tab, url) {
|
|
2973
|
+
if (isStripeUrl(url) && tab) {
|
|
2974
|
+
tab.location.href = url;
|
|
2975
|
+
this.tabOpened = true;
|
|
2976
|
+
} else if (isStripeUrl(url)) this.navigateCurrentTab(url);
|
|
2977
|
+
else {
|
|
2978
|
+
this.closeTab(tab);
|
|
2979
|
+
this.o.emit({ kind: "link-unavailable" });
|
|
2980
|
+
}
|
|
2981
|
+
}
|
|
2982
|
+
openBlankTab() {
|
|
2983
|
+
const tab = window.open("about:blank", "_blank");
|
|
2984
|
+
if (tab) try {
|
|
2985
|
+
tab.opener = null;
|
|
2986
|
+
} catch {}
|
|
2987
|
+
return tab;
|
|
2899
2988
|
}
|
|
2900
|
-
|
|
2989
|
+
navigateCurrentTab(url) {
|
|
2990
|
+
if (this.o.navigate) this.o.navigate(url);
|
|
2991
|
+
else window.location.href = url;
|
|
2992
|
+
}
|
|
2993
|
+
closeTab(tab) {
|
|
2901
2994
|
try {
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2995
|
+
tab?.close();
|
|
2996
|
+
} catch {}
|
|
2997
|
+
}
|
|
2998
|
+
};
|
|
2999
|
+
function stripeConnectNotice(outcome) {
|
|
3000
|
+
switch (outcome.kind) {
|
|
3001
|
+
case "complete": return {
|
|
3002
|
+
variant: "success",
|
|
3003
|
+
message: outcome.source === "resume" ? "Payment account setup is already complete!" : "Payment account setup complete!"
|
|
3004
|
+
};
|
|
3005
|
+
case "verifying": return {
|
|
3006
|
+
variant: "success",
|
|
3007
|
+
message: "Setup submitted! Stripe is verifying your account. This usually takes a few minutes. Click \"Check Status\" to refresh."
|
|
3008
|
+
};
|
|
3009
|
+
case "incomplete": return {
|
|
3010
|
+
variant: "error",
|
|
3011
|
+
message: "Payment account setup is not yet complete. Please continue setup."
|
|
3012
|
+
};
|
|
3013
|
+
case "link-unavailable": return {
|
|
3014
|
+
variant: "error",
|
|
3015
|
+
message: "Unable to retrieve onboarding link. Please try again."
|
|
3016
|
+
};
|
|
3017
|
+
case "failed": return {
|
|
3018
|
+
variant: "error",
|
|
3019
|
+
message: outcome.action === "start" ? "Failed to start payment account setup" : outcome.action === "check" ? "Failed to check payment account status" : "Failed to retrieve onboarding link"
|
|
3020
|
+
};
|
|
3021
|
+
}
|
|
3022
|
+
}
|
|
3023
|
+
var StripeConnectComponent = class StripeConnectComponent {
|
|
3024
|
+
constructor() {
|
|
3025
|
+
this.destroyRef = inject(DestroyRef);
|
|
3026
|
+
this.createAccount = input(null, ...ngDevMode ? [{ debugName: "createAccount" }] : /* istanbul ignore next */ []);
|
|
3027
|
+
this.getStatus = input(null, ...ngDevMode ? [{ debugName: "getStatus" }] : /* istanbul ignore next */ []);
|
|
3028
|
+
this.accountId = model(null, ...ngDevMode ? [{ debugName: "accountId" }] : /* istanbul ignore next */ []);
|
|
3029
|
+
this.complete = model(false, ...ngDevMode ? [{ debugName: "complete" }] : /* istanbul ignore next */ []);
|
|
3030
|
+
this.detailsSubmitted = model(false, ...ngDevMode ? [{ debugName: "detailsSubmitted" }] : /* istanbul ignore next */ []);
|
|
3031
|
+
this.title = input("Stripe Connect Account", ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
|
|
3032
|
+
this.bare = input(false, ...ngDevMode ? [{ debugName: "bare" }] : /* istanbul ignore next */ []);
|
|
3033
|
+
this.showWhenNoAccount = input(false, ...ngDevMode ? [{ debugName: "showWhenNoAccount" }] : /* istanbul ignore next */ []);
|
|
3034
|
+
this.startTitle = input("Connect your Stripe account", ...ngDevMode ? [{ debugName: "startTitle" }] : /* istanbul ignore next */ []);
|
|
3035
|
+
this.startText = input("Collect your customers' payments online. You finish setting up your account on Stripe, then come back here.", ...ngDevMode ? [{ debugName: "startText" }] : /* istanbul ignore next */ []);
|
|
3036
|
+
this.startLabel = input("Set Up Payment Account", ...ngDevMode ? [{ debugName: "startLabel" }] : /* istanbul ignore next */ []);
|
|
3037
|
+
this.disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
3038
|
+
this.refreshOnReturn = input(false, ...ngDevMode ? [{ debugName: "refreshOnReturn" }] : /* istanbul ignore next */ []);
|
|
3039
|
+
this.dashboardUrl = input("https://dashboard.stripe.com", ...ngDevMode ? [{ debugName: "dashboardUrl" }] : /* istanbul ignore next */ []);
|
|
3040
|
+
this.outcome = output();
|
|
3041
|
+
this.loading = model(false, ...ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []);
|
|
3042
|
+
this.navigateTab = input(null, ...ngDevMode ? [{ debugName: "navigateTab" }] : /* istanbul ignore next */ []);
|
|
3043
|
+
this.visible = computed(() => !!this.accountId() || this.showWhenNoAccount(), ...ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []);
|
|
3044
|
+
this.flow = new StripeConnectFlow({
|
|
3045
|
+
createAccount: () => this.createAccount(),
|
|
3046
|
+
getStatus: () => this.getStatus(),
|
|
3047
|
+
state: {
|
|
3048
|
+
accountId: this.accountId,
|
|
3049
|
+
complete: this.complete,
|
|
3050
|
+
detailsSubmitted: this.detailsSubmitted,
|
|
3051
|
+
loading: this.loading
|
|
3052
|
+
},
|
|
3053
|
+
emit: (outcome) => this.outcome.emit(outcome),
|
|
3054
|
+
disabled: () => this.disabled(),
|
|
3055
|
+
navigate: (url) => this.navigateCurrentTab(url),
|
|
3056
|
+
destroyRef: this.destroyRef
|
|
3057
|
+
});
|
|
3058
|
+
if (typeof document !== "undefined") {
|
|
3059
|
+
const onVisible = () => {
|
|
3060
|
+
if (document.visibilityState !== "visible" || !this.flow.tabOpened || !this.refreshOnReturn() || this.loading()) return;
|
|
3061
|
+
this.flow.tabOpened = false;
|
|
3062
|
+
this.flow.readStatusOnReturn();
|
|
3063
|
+
};
|
|
3064
|
+
document.addEventListener("visibilitychange", onVisible);
|
|
3065
|
+
this.destroyRef.onDestroy(() => document.removeEventListener("visibilitychange", onVisible));
|
|
2906
3066
|
}
|
|
2907
3067
|
}
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
3068
|
+
start() {
|
|
3069
|
+
this.flow.start();
|
|
3070
|
+
}
|
|
3071
|
+
check() {
|
|
3072
|
+
this.flow.check();
|
|
3073
|
+
}
|
|
3074
|
+
resume() {
|
|
3075
|
+
this.flow.resume();
|
|
3076
|
+
}
|
|
3077
|
+
openDashboard() {
|
|
3078
|
+
window.open(this.dashboardUrl(), "_blank", "noopener,noreferrer");
|
|
3079
|
+
}
|
|
3080
|
+
navigateCurrentTab(url) {
|
|
3081
|
+
const navigate = this.navigateTab();
|
|
3082
|
+
if (navigate) navigate(url);
|
|
3083
|
+
else window.location.href = url;
|
|
2911
3084
|
}
|
|
2912
3085
|
static {
|
|
2913
3086
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
@@ -2927,72 +3100,79 @@ var StripeConnectComponent = class StripeConnectComponent {
|
|
|
2927
3100
|
isStandalone: true,
|
|
2928
3101
|
selector: "ui-stripe-connect",
|
|
2929
3102
|
inputs: {
|
|
2930
|
-
|
|
2931
|
-
classPropertyName: "
|
|
2932
|
-
publicName: "
|
|
3103
|
+
createAccount: {
|
|
3104
|
+
classPropertyName: "createAccount",
|
|
3105
|
+
publicName: "createAccount",
|
|
2933
3106
|
isSignal: true,
|
|
2934
3107
|
isRequired: false,
|
|
2935
3108
|
transformFunction: null
|
|
2936
3109
|
},
|
|
2937
|
-
|
|
2938
|
-
classPropertyName: "
|
|
2939
|
-
publicName: "
|
|
3110
|
+
getStatus: {
|
|
3111
|
+
classPropertyName: "getStatus",
|
|
3112
|
+
publicName: "getStatus",
|
|
2940
3113
|
isSignal: true,
|
|
2941
3114
|
isRequired: false,
|
|
2942
3115
|
transformFunction: null
|
|
2943
3116
|
},
|
|
2944
|
-
|
|
2945
|
-
classPropertyName: "
|
|
2946
|
-
publicName: "
|
|
3117
|
+
accountId: {
|
|
3118
|
+
classPropertyName: "accountId",
|
|
3119
|
+
publicName: "accountId",
|
|
2947
3120
|
isSignal: true,
|
|
2948
3121
|
isRequired: false,
|
|
2949
3122
|
transformFunction: null
|
|
2950
3123
|
},
|
|
2951
|
-
|
|
2952
|
-
classPropertyName: "
|
|
2953
|
-
publicName: "
|
|
3124
|
+
complete: {
|
|
3125
|
+
classPropertyName: "complete",
|
|
3126
|
+
publicName: "complete",
|
|
3127
|
+
isSignal: true,
|
|
3128
|
+
isRequired: false,
|
|
3129
|
+
transformFunction: null
|
|
3130
|
+
},
|
|
3131
|
+
detailsSubmitted: {
|
|
3132
|
+
classPropertyName: "detailsSubmitted",
|
|
3133
|
+
publicName: "detailsSubmitted",
|
|
2954
3134
|
isSignal: true,
|
|
2955
3135
|
isRequired: false,
|
|
2956
3136
|
transformFunction: null
|
|
2957
3137
|
},
|
|
2958
|
-
|
|
2959
|
-
classPropertyName: "
|
|
2960
|
-
publicName: "
|
|
3138
|
+
title: {
|
|
3139
|
+
classPropertyName: "title",
|
|
3140
|
+
publicName: "title",
|
|
2961
3141
|
isSignal: true,
|
|
2962
3142
|
isRequired: false,
|
|
2963
3143
|
transformFunction: null
|
|
2964
3144
|
},
|
|
2965
|
-
|
|
2966
|
-
classPropertyName: "
|
|
2967
|
-
publicName: "
|
|
3145
|
+
bare: {
|
|
3146
|
+
classPropertyName: "bare",
|
|
3147
|
+
publicName: "bare",
|
|
2968
3148
|
isSignal: true,
|
|
2969
3149
|
isRequired: false,
|
|
2970
3150
|
transformFunction: null
|
|
2971
3151
|
},
|
|
2972
|
-
|
|
2973
|
-
classPropertyName: "
|
|
2974
|
-
publicName: "
|
|
3152
|
+
showWhenNoAccount: {
|
|
3153
|
+
classPropertyName: "showWhenNoAccount",
|
|
3154
|
+
publicName: "showWhenNoAccount",
|
|
2975
3155
|
isSignal: true,
|
|
2976
3156
|
isRequired: false,
|
|
2977
3157
|
transformFunction: null
|
|
2978
3158
|
},
|
|
2979
|
-
|
|
2980
|
-
classPropertyName: "
|
|
2981
|
-
publicName: "
|
|
3159
|
+
startTitle: {
|
|
3160
|
+
classPropertyName: "startTitle",
|
|
3161
|
+
publicName: "startTitle",
|
|
2982
3162
|
isSignal: true,
|
|
2983
3163
|
isRequired: false,
|
|
2984
3164
|
transformFunction: null
|
|
2985
3165
|
},
|
|
2986
|
-
|
|
2987
|
-
classPropertyName: "
|
|
2988
|
-
publicName: "
|
|
3166
|
+
startText: {
|
|
3167
|
+
classPropertyName: "startText",
|
|
3168
|
+
publicName: "startText",
|
|
2989
3169
|
isSignal: true,
|
|
2990
3170
|
isRequired: false,
|
|
2991
3171
|
transformFunction: null
|
|
2992
3172
|
},
|
|
2993
|
-
|
|
2994
|
-
classPropertyName: "
|
|
2995
|
-
publicName: "
|
|
3173
|
+
startLabel: {
|
|
3174
|
+
classPropertyName: "startLabel",
|
|
3175
|
+
publicName: "startLabel",
|
|
2996
3176
|
isSignal: true,
|
|
2997
3177
|
isRequired: false,
|
|
2998
3178
|
transformFunction: null
|
|
@@ -3003,60 +3183,103 @@ var StripeConnectComponent = class StripeConnectComponent {
|
|
|
3003
3183
|
isSignal: true,
|
|
3004
3184
|
isRequired: false,
|
|
3005
3185
|
transformFunction: null
|
|
3186
|
+
},
|
|
3187
|
+
refreshOnReturn: {
|
|
3188
|
+
classPropertyName: "refreshOnReturn",
|
|
3189
|
+
publicName: "refreshOnReturn",
|
|
3190
|
+
isSignal: true,
|
|
3191
|
+
isRequired: false,
|
|
3192
|
+
transformFunction: null
|
|
3193
|
+
},
|
|
3194
|
+
dashboardUrl: {
|
|
3195
|
+
classPropertyName: "dashboardUrl",
|
|
3196
|
+
publicName: "dashboardUrl",
|
|
3197
|
+
isSignal: true,
|
|
3198
|
+
isRequired: false,
|
|
3199
|
+
transformFunction: null
|
|
3200
|
+
},
|
|
3201
|
+
loading: {
|
|
3202
|
+
classPropertyName: "loading",
|
|
3203
|
+
publicName: "loading",
|
|
3204
|
+
isSignal: true,
|
|
3205
|
+
isRequired: false,
|
|
3206
|
+
transformFunction: null
|
|
3207
|
+
},
|
|
3208
|
+
navigateTab: {
|
|
3209
|
+
classPropertyName: "navigateTab",
|
|
3210
|
+
publicName: "navigateTab",
|
|
3211
|
+
isSignal: true,
|
|
3212
|
+
isRequired: false,
|
|
3213
|
+
transformFunction: null
|
|
3006
3214
|
}
|
|
3007
3215
|
},
|
|
3008
|
-
outputs: {
|
|
3216
|
+
outputs: {
|
|
3217
|
+
accountId: "accountIdChange",
|
|
3218
|
+
complete: "completeChange",
|
|
3219
|
+
detailsSubmitted: "detailsSubmittedChange",
|
|
3220
|
+
outcome: "outcome",
|
|
3221
|
+
loading: "loadingChange"
|
|
3222
|
+
},
|
|
3009
3223
|
ngImport: i0,
|
|
3010
3224
|
template: `
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
[
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
@if (!statusKnown()) {
|
|
3019
|
-
<ui-button class="sc-retry" variant="secondary" size="sm" data-testid="stripe-connect-retry" (click)="refresh()">Try again</ui-button>
|
|
3020
|
-
}
|
|
3225
|
+
@if (visible()) {
|
|
3226
|
+
@if (bare()) {
|
|
3227
|
+
<ng-container *ngTemplateOutlet="body" />
|
|
3228
|
+
} @else {
|
|
3229
|
+
<ui-detail-card [collapsible]="false" [title]="title()" [headingLevel]="3" data-testid="connect-account-card">
|
|
3230
|
+
<ng-container *ngTemplateOutlet="body" />
|
|
3231
|
+
</ui-detail-card>
|
|
3021
3232
|
}
|
|
3022
|
-
|
|
3233
|
+
}
|
|
3234
|
+
|
|
3235
|
+
<ng-template #body>
|
|
3236
|
+
@if (!accountId()) {
|
|
3237
|
+
<ui-stack gap="sm" data-testid="connect-status-none">
|
|
3238
|
+
<strong class="sc-title">{{ startTitle() }}</strong>
|
|
3239
|
+
<ui-text size="sm" [text]="startText()" />
|
|
3240
|
+
<ui-stack direction="horizontal">
|
|
3241
|
+
<ui-button variant="primary" size="sm" data-testid="connect-start-button" [disabled]="loading() || disabled()" (click)="start()">{{ loading() ? 'Loading...' : startLabel() }}</ui-button>
|
|
3242
|
+
</ui-stack>
|
|
3243
|
+
</ui-stack>
|
|
3244
|
+
} @else if (complete()) {
|
|
3245
|
+
<ui-stack gap="sm" data-testid="connect-status-complete">
|
|
3246
|
+
<strong class="sc-title">Account setup complete</strong>
|
|
3247
|
+
<ui-text size="sm" tone="muted" [text]="'Account ID: ' + accountId()" />
|
|
3248
|
+
<ui-stack direction="horizontal">
|
|
3249
|
+
<ui-button variant="secondary" size="sm" data-testid="connect-dashboard-button" (click)="openDashboard()">View Stripe Dashboard</ui-button>
|
|
3250
|
+
</ui-stack>
|
|
3251
|
+
</ui-stack>
|
|
3252
|
+
} @else if (detailsSubmitted()) {
|
|
3253
|
+
<ui-stack gap="sm" data-testid="connect-status-verifying">
|
|
3254
|
+
<strong class="sc-title">Stripe is verifying your account</strong>
|
|
3255
|
+
<ui-text size="sm" text="Your setup has been submitted. Stripe is reviewing your information — this usually takes a few minutes. Payment collection will be enabled automatically once approved." />
|
|
3256
|
+
<ui-stack direction="horizontal">
|
|
3257
|
+
<ui-button variant="primary" size="sm" data-testid="connect-check-status-button" [disabled]="loading() || disabled()" (click)="check()">{{ loading() ? 'Checking...' : 'Check Status' }}</ui-button>
|
|
3258
|
+
</ui-stack>
|
|
3259
|
+
</ui-stack>
|
|
3260
|
+
} @else {
|
|
3261
|
+
<ui-stack gap="sm" data-testid="connect-status-incomplete">
|
|
3262
|
+
<strong class="sc-title">Account setup incomplete</strong>
|
|
3263
|
+
<ui-text size="sm" text="Complete your Stripe account setup to start collecting payments from customers." />
|
|
3264
|
+
<ui-stack direction="horizontal">
|
|
3265
|
+
<ui-button variant="primary" size="sm" data-testid="connect-complete-setup-button" [disabled]="loading() || disabled()" (click)="resume()">{{ loading() ? 'Loading...' : 'Complete Setup' }}</ui-button>
|
|
3266
|
+
</ui-stack>
|
|
3267
|
+
</ui-stack>
|
|
3268
|
+
}
|
|
3269
|
+
</ng-template>
|
|
3023
3270
|
`,
|
|
3024
3271
|
isInline: true,
|
|
3025
|
-
styles: ["ui-stripe-connect{display:block;min-width:0}ui-stripe-connect .sc-
|
|
3272
|
+
styles: ["ui-stripe-connect{display:block;min-width:0}ui-stripe-connect .sc-title{font-size:.9375rem;font-weight:600;color:#1e293b}\n"],
|
|
3026
3273
|
dependencies: [
|
|
3027
3274
|
{
|
|
3028
|
-
kind: "
|
|
3029
|
-
type:
|
|
3030
|
-
selector: "
|
|
3031
|
-
inputs: [
|
|
3032
|
-
"title",
|
|
3033
|
-
"description",
|
|
3034
|
-
"letter",
|
|
3035
|
-
"icon",
|
|
3036
|
-
"color",
|
|
3037
|
-
"actionLabel",
|
|
3038
|
-
"actionVariant",
|
|
3039
|
-
"actionAriaLabel",
|
|
3040
|
-
"actionTestId",
|
|
3041
|
-
"actionLoading",
|
|
3042
|
-
"disabled"
|
|
3043
|
-
],
|
|
3044
|
-
outputs: ["action"]
|
|
3045
|
-
},
|
|
3046
|
-
{
|
|
3047
|
-
kind: "component",
|
|
3048
|
-
type: AlertComponent,
|
|
3049
|
-
selector: "ui-alert",
|
|
3275
|
+
kind: "directive",
|
|
3276
|
+
type: NgTemplateOutlet,
|
|
3277
|
+
selector: "[ngTemplateOutlet]",
|
|
3050
3278
|
inputs: [
|
|
3051
|
-
"
|
|
3052
|
-
"
|
|
3053
|
-
"
|
|
3054
|
-
|
|
3055
|
-
"quiet",
|
|
3056
|
-
"compact",
|
|
3057
|
-
"inline"
|
|
3058
|
-
],
|
|
3059
|
-
outputs: ["dismissed"]
|
|
3279
|
+
"ngTemplateOutletContext",
|
|
3280
|
+
"ngTemplateOutlet",
|
|
3281
|
+
"ngTemplateOutletInjector"
|
|
3282
|
+
]
|
|
3060
3283
|
},
|
|
3061
3284
|
{
|
|
3062
3285
|
kind: "component",
|
|
@@ -3087,6 +3310,72 @@ var StripeConnectComponent = class StripeConnectComponent {
|
|
|
3087
3310
|
"modal-footer-left",
|
|
3088
3311
|
"modal-footer-right"
|
|
3089
3312
|
]
|
|
3313
|
+
},
|
|
3314
|
+
{
|
|
3315
|
+
kind: "component",
|
|
3316
|
+
type: DetailCardComponent,
|
|
3317
|
+
selector: "ui-detail-card",
|
|
3318
|
+
inputs: [
|
|
3319
|
+
"title",
|
|
3320
|
+
"uppercaseTitle",
|
|
3321
|
+
"headingLevel",
|
|
3322
|
+
"titleId",
|
|
3323
|
+
"ariaLabel",
|
|
3324
|
+
"subtitle",
|
|
3325
|
+
"background",
|
|
3326
|
+
"headerBackground",
|
|
3327
|
+
"footerBackground",
|
|
3328
|
+
"textColor",
|
|
3329
|
+
"showHeader",
|
|
3330
|
+
"collapsible",
|
|
3331
|
+
"expanded",
|
|
3332
|
+
"showEdit",
|
|
3333
|
+
"editLabel",
|
|
3334
|
+
"editTestId",
|
|
3335
|
+
"editIcon",
|
|
3336
|
+
"editAriaLabel",
|
|
3337
|
+
"fill",
|
|
3338
|
+
"maxBodyHeight",
|
|
3339
|
+
"selectable",
|
|
3340
|
+
"selected",
|
|
3341
|
+
"selectedColor",
|
|
3342
|
+
"selectedBackground"
|
|
3343
|
+
],
|
|
3344
|
+
outputs: [
|
|
3345
|
+
"expandedChange",
|
|
3346
|
+
"editClick",
|
|
3347
|
+
"selectedChange"
|
|
3348
|
+
]
|
|
3349
|
+
},
|
|
3350
|
+
{
|
|
3351
|
+
kind: "component",
|
|
3352
|
+
type: StackComponent,
|
|
3353
|
+
selector: "ui-stack",
|
|
3354
|
+
inputs: [
|
|
3355
|
+
"gap",
|
|
3356
|
+
"direction",
|
|
3357
|
+
"align",
|
|
3358
|
+
"justify",
|
|
3359
|
+
"wrap",
|
|
3360
|
+
"minHeight",
|
|
3361
|
+
"width",
|
|
3362
|
+
"maxWidth",
|
|
3363
|
+
"padding",
|
|
3364
|
+
"centered"
|
|
3365
|
+
]
|
|
3366
|
+
},
|
|
3367
|
+
{
|
|
3368
|
+
kind: "component",
|
|
3369
|
+
type: TextComponent,
|
|
3370
|
+
selector: "ui-text",
|
|
3371
|
+
inputs: [
|
|
3372
|
+
"text",
|
|
3373
|
+
"size",
|
|
3374
|
+
"tone",
|
|
3375
|
+
"color",
|
|
3376
|
+
"strong",
|
|
3377
|
+
"weight"
|
|
3378
|
+
]
|
|
3090
3379
|
}
|
|
3091
3380
|
],
|
|
3092
3381
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
@@ -3106,107 +3395,159 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3106
3395
|
standalone: true,
|
|
3107
3396
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3108
3397
|
imports: [
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3398
|
+
NgTemplateOutlet,
|
|
3399
|
+
ButtonComponent,
|
|
3400
|
+
DetailCardComponent,
|
|
3401
|
+
StackComponent,
|
|
3402
|
+
TextComponent
|
|
3112
3403
|
],
|
|
3113
3404
|
template: `
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
[
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
@if (!statusKnown()) {
|
|
3122
|
-
<ui-button class="sc-retry" variant="secondary" size="sm" data-testid="stripe-connect-retry" (click)="refresh()">Try again</ui-button>
|
|
3123
|
-
}
|
|
3405
|
+
@if (visible()) {
|
|
3406
|
+
@if (bare()) {
|
|
3407
|
+
<ng-container *ngTemplateOutlet="body" />
|
|
3408
|
+
} @else {
|
|
3409
|
+
<ui-detail-card [collapsible]="false" [title]="title()" [headingLevel]="3" data-testid="connect-account-card">
|
|
3410
|
+
<ng-container *ngTemplateOutlet="body" />
|
|
3411
|
+
</ui-detail-card>
|
|
3124
3412
|
}
|
|
3125
|
-
|
|
3413
|
+
}
|
|
3414
|
+
|
|
3415
|
+
<ng-template #body>
|
|
3416
|
+
@if (!accountId()) {
|
|
3417
|
+
<ui-stack gap="sm" data-testid="connect-status-none">
|
|
3418
|
+
<strong class="sc-title">{{ startTitle() }}</strong>
|
|
3419
|
+
<ui-text size="sm" [text]="startText()" />
|
|
3420
|
+
<ui-stack direction="horizontal">
|
|
3421
|
+
<ui-button variant="primary" size="sm" data-testid="connect-start-button" [disabled]="loading() || disabled()" (click)="start()">{{ loading() ? 'Loading...' : startLabel() }}</ui-button>
|
|
3422
|
+
</ui-stack>
|
|
3423
|
+
</ui-stack>
|
|
3424
|
+
} @else if (complete()) {
|
|
3425
|
+
<ui-stack gap="sm" data-testid="connect-status-complete">
|
|
3426
|
+
<strong class="sc-title">Account setup complete</strong>
|
|
3427
|
+
<ui-text size="sm" tone="muted" [text]="'Account ID: ' + accountId()" />
|
|
3428
|
+
<ui-stack direction="horizontal">
|
|
3429
|
+
<ui-button variant="secondary" size="sm" data-testid="connect-dashboard-button" (click)="openDashboard()">View Stripe Dashboard</ui-button>
|
|
3430
|
+
</ui-stack>
|
|
3431
|
+
</ui-stack>
|
|
3432
|
+
} @else if (detailsSubmitted()) {
|
|
3433
|
+
<ui-stack gap="sm" data-testid="connect-status-verifying">
|
|
3434
|
+
<strong class="sc-title">Stripe is verifying your account</strong>
|
|
3435
|
+
<ui-text size="sm" text="Your setup has been submitted. Stripe is reviewing your information — this usually takes a few minutes. Payment collection will be enabled automatically once approved." />
|
|
3436
|
+
<ui-stack direction="horizontal">
|
|
3437
|
+
<ui-button variant="primary" size="sm" data-testid="connect-check-status-button" [disabled]="loading() || disabled()" (click)="check()">{{ loading() ? 'Checking...' : 'Check Status' }}</ui-button>
|
|
3438
|
+
</ui-stack>
|
|
3439
|
+
</ui-stack>
|
|
3440
|
+
} @else {
|
|
3441
|
+
<ui-stack gap="sm" data-testid="connect-status-incomplete">
|
|
3442
|
+
<strong class="sc-title">Account setup incomplete</strong>
|
|
3443
|
+
<ui-text size="sm" text="Complete your Stripe account setup to start collecting payments from customers." />
|
|
3444
|
+
<ui-stack direction="horizontal">
|
|
3445
|
+
<ui-button variant="primary" size="sm" data-testid="connect-complete-setup-button" [disabled]="loading() || disabled()" (click)="resume()">{{ loading() ? 'Loading...' : 'Complete Setup' }}</ui-button>
|
|
3446
|
+
</ui-stack>
|
|
3447
|
+
</ui-stack>
|
|
3448
|
+
}
|
|
3449
|
+
</ng-template>
|
|
3126
3450
|
`,
|
|
3127
3451
|
encapsulation: ViewEncapsulation.None,
|
|
3128
|
-
styles: ["ui-stripe-connect{display:block;min-width:0}ui-stripe-connect .sc-
|
|
3452
|
+
styles: ["ui-stripe-connect{display:block;min-width:0}ui-stripe-connect .sc-title{font-size:.9375rem;font-weight:600;color:#1e293b}\n"]
|
|
3129
3453
|
}]
|
|
3130
3454
|
}],
|
|
3131
3455
|
ctorParameters: () => [],
|
|
3132
3456
|
propDecorators: {
|
|
3133
|
-
|
|
3457
|
+
createAccount: [{
|
|
3134
3458
|
type: i0.Input,
|
|
3135
3459
|
args: [{
|
|
3136
3460
|
isSignal: true,
|
|
3137
|
-
alias: "
|
|
3461
|
+
alias: "createAccount",
|
|
3138
3462
|
required: false
|
|
3139
3463
|
}]
|
|
3140
3464
|
}],
|
|
3141
|
-
|
|
3465
|
+
getStatus: [{
|
|
3142
3466
|
type: i0.Input,
|
|
3143
3467
|
args: [{
|
|
3144
3468
|
isSignal: true,
|
|
3145
|
-
alias: "
|
|
3469
|
+
alias: "getStatus",
|
|
3146
3470
|
required: false
|
|
3147
3471
|
}]
|
|
3148
3472
|
}],
|
|
3149
|
-
|
|
3473
|
+
accountId: [{
|
|
3150
3474
|
type: i0.Input,
|
|
3151
3475
|
args: [{
|
|
3152
3476
|
isSignal: true,
|
|
3153
|
-
alias: "
|
|
3477
|
+
alias: "accountId",
|
|
3154
3478
|
required: false
|
|
3155
3479
|
}]
|
|
3480
|
+
}, {
|
|
3481
|
+
type: i0.Output,
|
|
3482
|
+
args: ["accountIdChange"]
|
|
3156
3483
|
}],
|
|
3157
|
-
|
|
3484
|
+
complete: [{
|
|
3158
3485
|
type: i0.Input,
|
|
3159
3486
|
args: [{
|
|
3160
3487
|
isSignal: true,
|
|
3161
|
-
alias: "
|
|
3488
|
+
alias: "complete",
|
|
3489
|
+
required: false
|
|
3490
|
+
}]
|
|
3491
|
+
}, {
|
|
3492
|
+
type: i0.Output,
|
|
3493
|
+
args: ["completeChange"]
|
|
3494
|
+
}],
|
|
3495
|
+
detailsSubmitted: [{
|
|
3496
|
+
type: i0.Input,
|
|
3497
|
+
args: [{
|
|
3498
|
+
isSignal: true,
|
|
3499
|
+
alias: "detailsSubmitted",
|
|
3162
3500
|
required: false
|
|
3163
3501
|
}]
|
|
3502
|
+
}, {
|
|
3503
|
+
type: i0.Output,
|
|
3504
|
+
args: ["detailsSubmittedChange"]
|
|
3164
3505
|
}],
|
|
3165
|
-
|
|
3506
|
+
title: [{
|
|
3166
3507
|
type: i0.Input,
|
|
3167
3508
|
args: [{
|
|
3168
3509
|
isSignal: true,
|
|
3169
|
-
alias: "
|
|
3510
|
+
alias: "title",
|
|
3170
3511
|
required: false
|
|
3171
3512
|
}]
|
|
3172
3513
|
}],
|
|
3173
|
-
|
|
3514
|
+
bare: [{
|
|
3174
3515
|
type: i0.Input,
|
|
3175
3516
|
args: [{
|
|
3176
3517
|
isSignal: true,
|
|
3177
|
-
alias: "
|
|
3518
|
+
alias: "bare",
|
|
3178
3519
|
required: false
|
|
3179
3520
|
}]
|
|
3180
3521
|
}],
|
|
3181
|
-
|
|
3522
|
+
showWhenNoAccount: [{
|
|
3182
3523
|
type: i0.Input,
|
|
3183
3524
|
args: [{
|
|
3184
3525
|
isSignal: true,
|
|
3185
|
-
alias: "
|
|
3526
|
+
alias: "showWhenNoAccount",
|
|
3186
3527
|
required: false
|
|
3187
3528
|
}]
|
|
3188
3529
|
}],
|
|
3189
|
-
|
|
3530
|
+
startTitle: [{
|
|
3190
3531
|
type: i0.Input,
|
|
3191
3532
|
args: [{
|
|
3192
3533
|
isSignal: true,
|
|
3193
|
-
alias: "
|
|
3534
|
+
alias: "startTitle",
|
|
3194
3535
|
required: false
|
|
3195
3536
|
}]
|
|
3196
3537
|
}],
|
|
3197
|
-
|
|
3538
|
+
startText: [{
|
|
3198
3539
|
type: i0.Input,
|
|
3199
3540
|
args: [{
|
|
3200
3541
|
isSignal: true,
|
|
3201
|
-
alias: "
|
|
3542
|
+
alias: "startText",
|
|
3202
3543
|
required: false
|
|
3203
3544
|
}]
|
|
3204
3545
|
}],
|
|
3205
|
-
|
|
3546
|
+
startLabel: [{
|
|
3206
3547
|
type: i0.Input,
|
|
3207
3548
|
args: [{
|
|
3208
3549
|
isSignal: true,
|
|
3209
|
-
alias: "
|
|
3550
|
+
alias: "startLabel",
|
|
3210
3551
|
required: false
|
|
3211
3552
|
}]
|
|
3212
3553
|
}],
|
|
@@ -3218,12 +3559,47 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3218
3559
|
required: false
|
|
3219
3560
|
}]
|
|
3220
3561
|
}],
|
|
3221
|
-
|
|
3562
|
+
refreshOnReturn: [{
|
|
3563
|
+
type: i0.Input,
|
|
3564
|
+
args: [{
|
|
3565
|
+
isSignal: true,
|
|
3566
|
+
alias: "refreshOnReturn",
|
|
3567
|
+
required: false
|
|
3568
|
+
}]
|
|
3569
|
+
}],
|
|
3570
|
+
dashboardUrl: [{
|
|
3571
|
+
type: i0.Input,
|
|
3572
|
+
args: [{
|
|
3573
|
+
isSignal: true,
|
|
3574
|
+
alias: "dashboardUrl",
|
|
3575
|
+
required: false
|
|
3576
|
+
}]
|
|
3577
|
+
}],
|
|
3578
|
+
outcome: [{
|
|
3222
3579
|
type: i0.Output,
|
|
3223
|
-
args: ["
|
|
3580
|
+
args: ["outcome"]
|
|
3581
|
+
}],
|
|
3582
|
+
loading: [{
|
|
3583
|
+
type: i0.Input,
|
|
3584
|
+
args: [{
|
|
3585
|
+
isSignal: true,
|
|
3586
|
+
alias: "loading",
|
|
3587
|
+
required: false
|
|
3588
|
+
}]
|
|
3589
|
+
}, {
|
|
3590
|
+
type: i0.Output,
|
|
3591
|
+
args: ["loadingChange"]
|
|
3592
|
+
}],
|
|
3593
|
+
navigateTab: [{
|
|
3594
|
+
type: i0.Input,
|
|
3595
|
+
args: [{
|
|
3596
|
+
isSignal: true,
|
|
3597
|
+
alias: "navigateTab",
|
|
3598
|
+
required: false
|
|
3599
|
+
}]
|
|
3224
3600
|
}]
|
|
3225
3601
|
}
|
|
3226
3602
|
});
|
|
3227
|
-
export { MICRODEPOSIT_COPY, MicrodepositVerifyComponent, STRIPE_A11Y_MESSAGES, STRIPE_ACH_NOTICE, STRIPE_DEFAULT_ERROR_MESSAGE, STRIPE_ERROR_MESSAGES, STRIPE_LOADER, STRIPE_PAYMENT_DEFAULTS, STRIPE_TECHNICAL_ERROR_MESSAGES, StripeConnectComponent, StripePaymentComponent, StripePaymentService, buildLoadOptions, defaultStripeLoader, depositAmountError, descriptorCodeError, getStripeErrorMessage, isDarkPage, microdepositArrivalText, microdepositCancelMessage, microdepositKeepsActiveText, microdepositProcessingText, microdepositStepsText, normalizeDescriptorCode, normalizeIntent, outcomeOf, paymentMethodIdOf, provideStripePayment, readStripeAppearance, readStripeReturnParams, retrieveIntent, verificationOf, verifyMicrodeposits };
|
|
3603
|
+
export { MICRODEPOSIT_COPY, MicrodepositVerifyComponent, STRIPE_A11Y_MESSAGES, STRIPE_ACH_NOTICE, STRIPE_DEFAULT_ERROR_MESSAGE, STRIPE_ERROR_MESSAGES, STRIPE_LOADER, STRIPE_PAYMENT_DEFAULTS, STRIPE_TECHNICAL_ERROR_MESSAGES, StripeConnectComponent, StripeConnectFlow, StripePaymentComponent, StripePaymentService, buildLoadOptions, defaultStripeLoader, depositAmountError, descriptorCodeError, getStripeErrorMessage, isDarkPage, isStripeUrl, microdepositArrivalText, microdepositCancelMessage, microdepositKeepsActiveText, microdepositProcessingText, microdepositStepsText, normalizeDescriptorCode, normalizeIntent, outcomeOf, paymentMethodIdOf, provideStripePayment, readStripeAppearance, readStripeReturnParams, retrieveIntent, stripeConnectNotice, verificationOf, verifyMicrodeposits };
|
|
3228
3604
|
|
|
3229
3605
|
//# sourceMappingURL=forgeroute-ui-stripe.mjs.map
|