@forgeroute/ui 0.4.41 → 0.4.43
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 +682 -33
- package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-stripe.mjs +144 -97
- package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
- package/fesm2022/forgeroute-ui.mjs +132 -44
- package/fesm2022/forgeroute-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-messaging.d.ts +170 -5
- package/types/forgeroute-ui-stripe.d.ts +15 -1
- package/types/forgeroute-ui.d.ts +61 -20
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
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, isPlatformBrowser } from "@angular/common";
|
|
3
|
+
import { DOCUMENT, NgTemplateOutlet, isPlatformBrowser } from "@angular/common";
|
|
4
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";
|
|
@@ -449,6 +449,7 @@ var StripePaymentComponent = class StripePaymentComponent {
|
|
|
449
449
|
this.disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
450
450
|
this.pending = input(false, ...ngDevMode ? [{ debugName: "pending" }] : /* istanbul ignore next */ []);
|
|
451
451
|
this.label = input("Payment details", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
452
|
+
this.required = input(false, ...ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []);
|
|
452
453
|
this.mountId = input("", ...ngDevMode ? [{ debugName: "mountId" }] : /* istanbul ignore next */ []);
|
|
453
454
|
this.mountClass = input("", ...ngDevMode ? [{ debugName: "mountClass" }] : /* istanbul ignore next */ []);
|
|
454
455
|
this.showAchNotice = input(true, ...ngDevMode ? [{ debugName: "showAchNotice" }] : /* istanbul ignore next */ []);
|
|
@@ -1244,6 +1245,13 @@ var StripePaymentComponent = class StripePaymentComponent {
|
|
|
1244
1245
|
isRequired: false,
|
|
1245
1246
|
transformFunction: null
|
|
1246
1247
|
},
|
|
1248
|
+
required: {
|
|
1249
|
+
classPropertyName: "required",
|
|
1250
|
+
publicName: "required",
|
|
1251
|
+
isSignal: true,
|
|
1252
|
+
isRequired: false,
|
|
1253
|
+
transformFunction: null
|
|
1254
|
+
},
|
|
1247
1255
|
mountId: {
|
|
1248
1256
|
classPropertyName: "mountId",
|
|
1249
1257
|
publicName: "mountId",
|
|
@@ -1376,6 +1384,9 @@ var StripePaymentComponent = class StripePaymentComponent {
|
|
|
1376
1384
|
@if (!mountOnly() && loadErrorText(); as text) {
|
|
1377
1385
|
<div class="sp-block" data-testid="stripe-load-error"><ui-alert variant="danger">{{ text }}</ui-alert></div>
|
|
1378
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
|
+
}
|
|
1379
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"
|
|
1380
1391
|
[attr.role]="mountOnly() ? null : 'group'" [attr.aria-label]="mountOnly() ? null : label()" data-testid="stripe-mount"></div>
|
|
1381
1392
|
@if (!mountOnly() && achNoticeVisible()) {
|
|
@@ -1393,7 +1404,7 @@ var StripePaymentComponent = class StripePaymentComponent {
|
|
|
1393
1404
|
</div>
|
|
1394
1405
|
`,
|
|
1395
1406
|
isInline: true,
|
|
1396
|
-
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"],
|
|
1397
1408
|
dependencies: [
|
|
1398
1409
|
{
|
|
1399
1410
|
kind: "component",
|
|
@@ -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: [{
|
|
@@ -3007,6 +3029,7 @@ var StripeConnectComponent = class StripeConnectComponent {
|
|
|
3007
3029
|
this.complete = model(false, ...ngDevMode ? [{ debugName: "complete" }] : /* istanbul ignore next */ []);
|
|
3008
3030
|
this.detailsSubmitted = model(false, ...ngDevMode ? [{ debugName: "detailsSubmitted" }] : /* istanbul ignore next */ []);
|
|
3009
3031
|
this.title = input("Stripe Connect Account", ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
|
|
3032
|
+
this.bare = input(false, ...ngDevMode ? [{ debugName: "bare" }] : /* istanbul ignore next */ []);
|
|
3010
3033
|
this.showWhenNoAccount = input(false, ...ngDevMode ? [{ debugName: "showWhenNoAccount" }] : /* istanbul ignore next */ []);
|
|
3011
3034
|
this.startTitle = input("Connect your Stripe account", ...ngDevMode ? [{ debugName: "startTitle" }] : /* istanbul ignore next */ []);
|
|
3012
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 */ []);
|
|
@@ -3119,6 +3142,13 @@ var StripeConnectComponent = class StripeConnectComponent {
|
|
|
3119
3142
|
isRequired: false,
|
|
3120
3143
|
transformFunction: null
|
|
3121
3144
|
},
|
|
3145
|
+
bare: {
|
|
3146
|
+
classPropertyName: "bare",
|
|
3147
|
+
publicName: "bare",
|
|
3148
|
+
isSignal: true,
|
|
3149
|
+
isRequired: false,
|
|
3150
|
+
transformFunction: null
|
|
3151
|
+
},
|
|
3122
3152
|
showWhenNoAccount: {
|
|
3123
3153
|
classPropertyName: "showWhenNoAccount",
|
|
3124
3154
|
publicName: "showWhenNoAccount",
|
|
@@ -3193,65 +3223,69 @@ var StripeConnectComponent = class StripeConnectComponent {
|
|
|
3193
3223
|
ngImport: i0,
|
|
3194
3224
|
template: `
|
|
3195
3225
|
@if (visible()) {
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
</ui-stack>
|
|
3204
|
-
</ui-stack>
|
|
3205
|
-
</ui-alert>
|
|
3206
|
-
} @else if (complete()) {
|
|
3207
|
-
<ui-alert variant="success" [quiet]="true" title="Account setup complete" data-testid="connect-status-complete">
|
|
3208
|
-
<ui-stack gap="sm">
|
|
3209
|
-
<ui-text size="sm" tone="muted" [text]="'Account ID: ' + accountId()" />
|
|
3210
|
-
<ui-stack direction="horizontal">
|
|
3211
|
-
<ui-button variant="secondary" size="sm" data-testid="connect-dashboard-button" (click)="openDashboard()">View Stripe Dashboard</ui-button>
|
|
3212
|
-
</ui-stack>
|
|
3213
|
-
</ui-stack>
|
|
3214
|
-
</ui-alert>
|
|
3215
|
-
} @else if (detailsSubmitted()) {
|
|
3216
|
-
<ui-alert variant="info" [quiet]="true" title="Stripe is verifying your account" data-testid="connect-status-verifying">
|
|
3217
|
-
<ui-stack gap="sm">
|
|
3218
|
-
<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." />
|
|
3219
|
-
<ui-stack direction="horizontal">
|
|
3220
|
-
<ui-button variant="primary" size="sm" data-testid="connect-check-status-button" [disabled]="loading() || disabled()" (click)="check()">{{ loading() ? 'Checking...' : 'Check Status' }}</ui-button>
|
|
3221
|
-
</ui-stack>
|
|
3222
|
-
</ui-stack>
|
|
3223
|
-
</ui-alert>
|
|
3224
|
-
} @else {
|
|
3225
|
-
<ui-alert variant="warning" [quiet]="true" title="Account setup incomplete" data-testid="connect-status-incomplete">
|
|
3226
|
-
<ui-stack gap="sm">
|
|
3227
|
-
<ui-text size="sm" text="Complete your Stripe account setup to start collecting payments from customers." />
|
|
3228
|
-
<ui-stack direction="horizontal">
|
|
3229
|
-
<ui-button variant="primary" size="sm" data-testid="connect-complete-setup-button" [disabled]="loading() || disabled()" (click)="resume()">{{ loading() ? 'Loading...' : 'Complete Setup' }}</ui-button>
|
|
3230
|
-
</ui-stack>
|
|
3231
|
-
</ui-stack>
|
|
3232
|
-
</ui-alert>
|
|
3233
|
-
}
|
|
3234
|
-
</ui-detail-card>
|
|
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>
|
|
3232
|
+
}
|
|
3235
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
|
+
<span class="sc-badge"><ui-badge label="Account setup incomplete" variant="red" data-testid="connect-incomplete-badge" /></span>
|
|
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>
|
|
3236
3270
|
`,
|
|
3237
3271
|
isInline: true,
|
|
3238
|
-
styles: ["ui-stripe-connect{display:block;min-width:0}\n"],
|
|
3272
|
+
styles: ["ui-stripe-connect{display:block;min-width:0}ui-stripe-connect .sc-badge{display:flex}ui-stripe-connect .sc-title{font-size:.9375rem;font-weight:600;color:#1e293b}\n"],
|
|
3239
3273
|
dependencies: [
|
|
3240
3274
|
{
|
|
3241
|
-
kind: "
|
|
3242
|
-
type:
|
|
3243
|
-
selector: "
|
|
3275
|
+
kind: "directive",
|
|
3276
|
+
type: NgTemplateOutlet,
|
|
3277
|
+
selector: "[ngTemplateOutlet]",
|
|
3244
3278
|
inputs: [
|
|
3245
|
-
"
|
|
3246
|
-
"
|
|
3247
|
-
"
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3279
|
+
"ngTemplateOutletContext",
|
|
3280
|
+
"ngTemplateOutlet",
|
|
3281
|
+
"ngTemplateOutletInjector"
|
|
3282
|
+
]
|
|
3283
|
+
},
|
|
3284
|
+
{
|
|
3285
|
+
kind: "component",
|
|
3286
|
+
type: BadgeComponent,
|
|
3287
|
+
selector: "ui-badge",
|
|
3288
|
+
inputs: ["label", "variant"]
|
|
3255
3289
|
},
|
|
3256
3290
|
{
|
|
3257
3291
|
kind: "component",
|
|
@@ -3367,7 +3401,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3367
3401
|
standalone: true,
|
|
3368
3402
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3369
3403
|
imports: [
|
|
3370
|
-
|
|
3404
|
+
NgTemplateOutlet,
|
|
3405
|
+
BadgeComponent,
|
|
3371
3406
|
ButtonComponent,
|
|
3372
3407
|
DetailCardComponent,
|
|
3373
3408
|
StackComponent,
|
|
@@ -3375,49 +3410,53 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3375
3410
|
],
|
|
3376
3411
|
template: `
|
|
3377
3412
|
@if (visible()) {
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
</ui-stack>
|
|
3386
|
-
</ui-stack>
|
|
3387
|
-
</ui-alert>
|
|
3388
|
-
} @else if (complete()) {
|
|
3389
|
-
<ui-alert variant="success" [quiet]="true" title="Account setup complete" data-testid="connect-status-complete">
|
|
3390
|
-
<ui-stack gap="sm">
|
|
3391
|
-
<ui-text size="sm" tone="muted" [text]="'Account ID: ' + accountId()" />
|
|
3392
|
-
<ui-stack direction="horizontal">
|
|
3393
|
-
<ui-button variant="secondary" size="sm" data-testid="connect-dashboard-button" (click)="openDashboard()">View Stripe Dashboard</ui-button>
|
|
3394
|
-
</ui-stack>
|
|
3395
|
-
</ui-stack>
|
|
3396
|
-
</ui-alert>
|
|
3397
|
-
} @else if (detailsSubmitted()) {
|
|
3398
|
-
<ui-alert variant="info" [quiet]="true" title="Stripe is verifying your account" data-testid="connect-status-verifying">
|
|
3399
|
-
<ui-stack gap="sm">
|
|
3400
|
-
<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." />
|
|
3401
|
-
<ui-stack direction="horizontal">
|
|
3402
|
-
<ui-button variant="primary" size="sm" data-testid="connect-check-status-button" [disabled]="loading() || disabled()" (click)="check()">{{ loading() ? 'Checking...' : 'Check Status' }}</ui-button>
|
|
3403
|
-
</ui-stack>
|
|
3404
|
-
</ui-stack>
|
|
3405
|
-
</ui-alert>
|
|
3406
|
-
} @else {
|
|
3407
|
-
<ui-alert variant="warning" [quiet]="true" title="Account setup incomplete" data-testid="connect-status-incomplete">
|
|
3408
|
-
<ui-stack gap="sm">
|
|
3409
|
-
<ui-text size="sm" text="Complete your Stripe account setup to start collecting payments from customers." />
|
|
3410
|
-
<ui-stack direction="horizontal">
|
|
3411
|
-
<ui-button variant="primary" size="sm" data-testid="connect-complete-setup-button" [disabled]="loading() || disabled()" (click)="resume()">{{ loading() ? 'Loading...' : 'Complete Setup' }}</ui-button>
|
|
3412
|
-
</ui-stack>
|
|
3413
|
-
</ui-stack>
|
|
3414
|
-
</ui-alert>
|
|
3415
|
-
}
|
|
3416
|
-
</ui-detail-card>
|
|
3413
|
+
@if (bare()) {
|
|
3414
|
+
<ng-container *ngTemplateOutlet="body" />
|
|
3415
|
+
} @else {
|
|
3416
|
+
<ui-detail-card [collapsible]="false" [title]="title()" [headingLevel]="3" data-testid="connect-account-card">
|
|
3417
|
+
<ng-container *ngTemplateOutlet="body" />
|
|
3418
|
+
</ui-detail-card>
|
|
3419
|
+
}
|
|
3417
3420
|
}
|
|
3421
|
+
|
|
3422
|
+
<ng-template #body>
|
|
3423
|
+
@if (!accountId()) {
|
|
3424
|
+
<ui-stack gap="sm" data-testid="connect-status-none">
|
|
3425
|
+
<strong class="sc-title">{{ startTitle() }}</strong>
|
|
3426
|
+
<ui-text size="sm" [text]="startText()" />
|
|
3427
|
+
<ui-stack direction="horizontal">
|
|
3428
|
+
<ui-button variant="primary" size="sm" data-testid="connect-start-button" [disabled]="loading() || disabled()" (click)="start()">{{ loading() ? 'Loading...' : startLabel() }}</ui-button>
|
|
3429
|
+
</ui-stack>
|
|
3430
|
+
</ui-stack>
|
|
3431
|
+
} @else if (complete()) {
|
|
3432
|
+
<ui-stack gap="sm" data-testid="connect-status-complete">
|
|
3433
|
+
<strong class="sc-title">Account setup complete</strong>
|
|
3434
|
+
<ui-text size="sm" tone="muted" [text]="'Account ID: ' + accountId()" />
|
|
3435
|
+
<ui-stack direction="horizontal">
|
|
3436
|
+
<ui-button variant="secondary" size="sm" data-testid="connect-dashboard-button" (click)="openDashboard()">View Stripe Dashboard</ui-button>
|
|
3437
|
+
</ui-stack>
|
|
3438
|
+
</ui-stack>
|
|
3439
|
+
} @else if (detailsSubmitted()) {
|
|
3440
|
+
<ui-stack gap="sm" data-testid="connect-status-verifying">
|
|
3441
|
+
<strong class="sc-title">Stripe is verifying your account</strong>
|
|
3442
|
+
<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." />
|
|
3443
|
+
<ui-stack direction="horizontal">
|
|
3444
|
+
<ui-button variant="primary" size="sm" data-testid="connect-check-status-button" [disabled]="loading() || disabled()" (click)="check()">{{ loading() ? 'Checking...' : 'Check Status' }}</ui-button>
|
|
3445
|
+
</ui-stack>
|
|
3446
|
+
</ui-stack>
|
|
3447
|
+
} @else {
|
|
3448
|
+
<ui-stack gap="sm" data-testid="connect-status-incomplete">
|
|
3449
|
+
<span class="sc-badge"><ui-badge label="Account setup incomplete" variant="red" data-testid="connect-incomplete-badge" /></span>
|
|
3450
|
+
<ui-text size="sm" text="Complete your Stripe account setup to start collecting payments from customers." />
|
|
3451
|
+
<ui-stack direction="horizontal">
|
|
3452
|
+
<ui-button variant="primary" size="sm" data-testid="connect-complete-setup-button" [disabled]="loading() || disabled()" (click)="resume()">{{ loading() ? 'Loading...' : 'Complete Setup' }}</ui-button>
|
|
3453
|
+
</ui-stack>
|
|
3454
|
+
</ui-stack>
|
|
3455
|
+
}
|
|
3456
|
+
</ng-template>
|
|
3418
3457
|
`,
|
|
3419
3458
|
encapsulation: ViewEncapsulation.None,
|
|
3420
|
-
styles: ["ui-stripe-connect{display:block;min-width:0}\n"]
|
|
3459
|
+
styles: ["ui-stripe-connect{display:block;min-width:0}ui-stripe-connect .sc-badge{display:flex}ui-stripe-connect .sc-title{font-size:.9375rem;font-weight:600;color:#1e293b}\n"]
|
|
3421
3460
|
}]
|
|
3422
3461
|
}],
|
|
3423
3462
|
ctorParameters: () => [],
|
|
@@ -3479,6 +3518,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3479
3518
|
required: false
|
|
3480
3519
|
}]
|
|
3481
3520
|
}],
|
|
3521
|
+
bare: [{
|
|
3522
|
+
type: i0.Input,
|
|
3523
|
+
args: [{
|
|
3524
|
+
isSignal: true,
|
|
3525
|
+
alias: "bare",
|
|
3526
|
+
required: false
|
|
3527
|
+
}]
|
|
3528
|
+
}],
|
|
3482
3529
|
showWhenNoAccount: [{
|
|
3483
3530
|
type: i0.Input,
|
|
3484
3531
|
args: [{
|