@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
package/package.json
CHANGED
|
@@ -1029,6 +1029,12 @@ declare class SendEmailComponent implements OnInit {
|
|
|
1029
1029
|
readonly videoDefaults: import("@angular/core").InputSignal<VideoDefaults | null>;
|
|
1030
1030
|
/** false hides Attach Files and "Schedule for later" (for a host whose send function can't deliver them). */
|
|
1031
1031
|
readonly attachmentsAndScheduling: import("@angular/core").InputSignal<boolean>;
|
|
1032
|
+
/** false hides the Subject field (and Send no longer needs one): for a host whose send function has no subject. Default true. */
|
|
1033
|
+
readonly showSubject: import("@angular/core").InputSignal<boolean>;
|
|
1034
|
+
/** false hides the "Use Existing Template" tab: the form is Create Message only, and the template picker (`GET /templates`) is never shown. Default true. */
|
|
1035
|
+
readonly showTemplates: import("@angular/core").InputSignal<boolean>;
|
|
1036
|
+
/** false hides the Video section (and its picker, `GET /video-messages`). Default true. */
|
|
1037
|
+
readonly showVideo: import("@angular/core").InputSignal<boolean>;
|
|
1032
1038
|
readonly sent: import("@angular/core").OutputEmitterRef<void>;
|
|
1033
1039
|
readonly emailAdded: import("@angular/core").OutputEmitterRef<string>;
|
|
1034
1040
|
readonly validChange: import("@angular/core").OutputEmitterRef<boolean>;
|
|
@@ -1340,6 +1346,21 @@ declare class SendEmailComponent implements OnInit {
|
|
|
1340
1346
|
"required": false;
|
|
1341
1347
|
"isSignal": true;
|
|
1342
1348
|
};
|
|
1349
|
+
"showSubject": {
|
|
1350
|
+
"alias": "showSubject";
|
|
1351
|
+
"required": false;
|
|
1352
|
+
"isSignal": true;
|
|
1353
|
+
};
|
|
1354
|
+
"showTemplates": {
|
|
1355
|
+
"alias": "showTemplates";
|
|
1356
|
+
"required": false;
|
|
1357
|
+
"isSignal": true;
|
|
1358
|
+
};
|
|
1359
|
+
"showVideo": {
|
|
1360
|
+
"alias": "showVideo";
|
|
1361
|
+
"required": false;
|
|
1362
|
+
"isSignal": true;
|
|
1363
|
+
};
|
|
1343
1364
|
}, {
|
|
1344
1365
|
"sent": "sent";
|
|
1345
1366
|
"emailAdded": "emailAdded";
|
|
@@ -1348,6 +1369,87 @@ declare class SendEmailComponent implements OnInit {
|
|
|
1348
1369
|
"mapFieldsClick": "mapFieldsClick";
|
|
1349
1370
|
}, never, never, true, never>;
|
|
1350
1371
|
}
|
|
1372
|
+
/** What the in-app form sends to the host's `sendFn`: there is no address, only who it is for and what was written. */
|
|
1373
|
+
interface SendInAppPayload {
|
|
1374
|
+
contactName: string;
|
|
1375
|
+
contactId?: string;
|
|
1376
|
+
/** Only present when the Subject field is shown. */
|
|
1377
|
+
subject?: string;
|
|
1378
|
+
body: string;
|
|
1379
|
+
}
|
|
1380
|
+
/**
|
|
1381
|
+
* The form of a message that is not delivered by email or text but handed to the host's own function (e.g. a client portal message to the
|
|
1382
|
+
* agent): "To" card with the name only, an optional Subject, the Message. No address, templates, video, attachments or scheduling, and it makes
|
|
1383
|
+
* no request of its own: `sendFn` does the sending. Used by `<ui-send-message-panel recipientMode="in-app">`.
|
|
1384
|
+
*/
|
|
1385
|
+
declare class SendInAppComponent implements OnInit {
|
|
1386
|
+
private readonly destroyRef;
|
|
1387
|
+
private readonly toast;
|
|
1388
|
+
readonly contactName: import("@angular/core").InputSignal<string>;
|
|
1389
|
+
readonly contactId: import("@angular/core").InputSignal<string>;
|
|
1390
|
+
/** Prefills Subject / Message. */
|
|
1391
|
+
readonly defaultSubject: import("@angular/core").InputSignal<string>;
|
|
1392
|
+
readonly defaultBody: import("@angular/core").InputSignal<string>;
|
|
1393
|
+
/** false hides the Subject field; Send then needs only a Message. */
|
|
1394
|
+
readonly showSubject: import("@angular/core").InputSignal<boolean>;
|
|
1395
|
+
/** Longest Message the host's backend accepts (the field stops there and shows "Too long"); null = no limit. */
|
|
1396
|
+
readonly maxLength: import("@angular/core").InputSignal<number | null>;
|
|
1397
|
+
/** The host's sender; this form makes no request of its own. */
|
|
1398
|
+
/** `maxLength` when it is a positive number, else 0 (no limit). */
|
|
1399
|
+
protected readonly limit: import("@angular/core").Signal<number>;
|
|
1400
|
+
readonly sendFn: import("@angular/core").InputSignal<((payload: SendInAppPayload) => Observable<unknown>) | null>;
|
|
1401
|
+
readonly sent: import("@angular/core").OutputEmitterRef<void>;
|
|
1402
|
+
readonly validChange: import("@angular/core").OutputEmitterRef<boolean>;
|
|
1403
|
+
readonly MAX_SUBJECT = 255;
|
|
1404
|
+
readonly sending: import("@angular/core").WritableSignal<boolean>;
|
|
1405
|
+
subject: string;
|
|
1406
|
+
body: string;
|
|
1407
|
+
ngOnInit(): void;
|
|
1408
|
+
get canSend(): boolean;
|
|
1409
|
+
notifyValid(): void;
|
|
1410
|
+
submit(): void;
|
|
1411
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SendInAppComponent, never>;
|
|
1412
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SendInAppComponent, "ui-send-in-app", never, {
|
|
1413
|
+
"contactName": {
|
|
1414
|
+
"alias": "contactName";
|
|
1415
|
+
"required": false;
|
|
1416
|
+
"isSignal": true;
|
|
1417
|
+
};
|
|
1418
|
+
"contactId": {
|
|
1419
|
+
"alias": "contactId";
|
|
1420
|
+
"required": false;
|
|
1421
|
+
"isSignal": true;
|
|
1422
|
+
};
|
|
1423
|
+
"defaultSubject": {
|
|
1424
|
+
"alias": "defaultSubject";
|
|
1425
|
+
"required": false;
|
|
1426
|
+
"isSignal": true;
|
|
1427
|
+
};
|
|
1428
|
+
"defaultBody": {
|
|
1429
|
+
"alias": "defaultBody";
|
|
1430
|
+
"required": false;
|
|
1431
|
+
"isSignal": true;
|
|
1432
|
+
};
|
|
1433
|
+
"showSubject": {
|
|
1434
|
+
"alias": "showSubject";
|
|
1435
|
+
"required": false;
|
|
1436
|
+
"isSignal": true;
|
|
1437
|
+
};
|
|
1438
|
+
"maxLength": {
|
|
1439
|
+
"alias": "maxLength";
|
|
1440
|
+
"required": false;
|
|
1441
|
+
"isSignal": true;
|
|
1442
|
+
};
|
|
1443
|
+
"sendFn": {
|
|
1444
|
+
"alias": "sendFn";
|
|
1445
|
+
"required": false;
|
|
1446
|
+
"isSignal": true;
|
|
1447
|
+
};
|
|
1448
|
+
}, {
|
|
1449
|
+
"sent": "sent";
|
|
1450
|
+
"validChange": "validChange";
|
|
1451
|
+
}, never, never, true, never>;
|
|
1452
|
+
}
|
|
1351
1453
|
/** What the text form sends — the default `POST <baseUrl>/text-messages` body, or the host's `sendFn` argument. */
|
|
1352
1454
|
interface SendTextPayload {
|
|
1353
1455
|
contactName: string;
|
|
@@ -1392,6 +1494,10 @@ declare class SendTextComponent implements OnInit {
|
|
|
1392
1494
|
readonly documents: import("@angular/core").InputSignal<boolean>;
|
|
1393
1495
|
/** false hides Attach Image and "Schedule for later" (for a host whose send function can't deliver them). */
|
|
1394
1496
|
readonly attachmentsAndScheduling: import("@angular/core").InputSignal<boolean>;
|
|
1497
|
+
/** false hides the "Use Existing Template" tab: the form is Create Message only. Default true. */
|
|
1498
|
+
readonly showTemplates: import("@angular/core").InputSignal<boolean>;
|
|
1499
|
+
/** false hides the Video section (and its picker, `GET /video-messages`). Default true. */
|
|
1500
|
+
readonly showVideo: import("@angular/core").InputSignal<boolean>;
|
|
1395
1501
|
/** Purposes the app's backend supports for documents (default all). The text form only sends `ESIGN`; without it the section is unavailable. */
|
|
1396
1502
|
readonly documentPurposes: import("@angular/core").InputSignal<DocumentSendPurpose[]>;
|
|
1397
1503
|
/** Documents already chosen in the Documents section when the form opens. */
|
|
@@ -1594,6 +1700,16 @@ declare class SendTextComponent implements OnInit {
|
|
|
1594
1700
|
"required": false;
|
|
1595
1701
|
"isSignal": true;
|
|
1596
1702
|
};
|
|
1703
|
+
"showTemplates": {
|
|
1704
|
+
"alias": "showTemplates";
|
|
1705
|
+
"required": false;
|
|
1706
|
+
"isSignal": true;
|
|
1707
|
+
};
|
|
1708
|
+
"showVideo": {
|
|
1709
|
+
"alias": "showVideo";
|
|
1710
|
+
"required": false;
|
|
1711
|
+
"isSignal": true;
|
|
1712
|
+
};
|
|
1597
1713
|
"documentPurposes": {
|
|
1598
1714
|
"alias": "documentPurposes";
|
|
1599
1715
|
"required": false;
|
|
@@ -1698,6 +1814,24 @@ export declare class SendMessagePanelComponent {
|
|
|
1698
1814
|
readonly documentsEnabled: import("@angular/core").InputSignal<boolean>;
|
|
1699
1815
|
/** Email tab only: adds a CC field; the addresses are sent as `SendEmailPayload.cc`. */
|
|
1700
1816
|
readonly showCc: import("@angular/core").InputSignal<boolean>;
|
|
1817
|
+
/**
|
|
1818
|
+
* `'contact'` (default) = the message goes by email or text to the contact's address. `'in-app'` = the message is NOT delivered by email or
|
|
1819
|
+
* text but handed to the host's `sendMessage` function (e.g. a client portal message to the agent): the contact needs no email or phone, the
|
|
1820
|
+
* panel never shows the "add an email" form, the channel toggle, the contact picker, notices, templates, video, attachments or scheduling,
|
|
1821
|
+
* and makes no request of its own. The `contact` must be passed (its `name` is shown in "To"); the footer button says `Send Message`.
|
|
1822
|
+
*/
|
|
1823
|
+
readonly recipientMode: import("@angular/core").InputSignal<"contact" | "in-app">;
|
|
1824
|
+
/** `recipientMode="in-app"` only: sends the message (the form shows no address; it calls this and then toasts "Message sent"). */
|
|
1825
|
+
readonly sendMessage: import("@angular/core").InputSignal<((payload: SendInAppPayload) => Observable<unknown>) | null>;
|
|
1826
|
+
/** `recipientMode="in-app"` only: the longest Message the host's backend accepts; null (default) = no limit. */
|
|
1827
|
+
readonly maxBodyLength: import("@angular/core").InputSignal<number | null>;
|
|
1828
|
+
/** false hides the Subject field in the email form and the in-app form (Send then needs only a Message). Default true. */
|
|
1829
|
+
readonly showSubject: import("@angular/core").InputSignal<boolean>;
|
|
1830
|
+
/** false hides the "Use Existing Template" tab in the email and text forms (Create Message only; the template picker, `GET /templates`, is never used). Default true. */
|
|
1831
|
+
readonly showTemplates: import("@angular/core").InputSignal<boolean>;
|
|
1832
|
+
/** false hides the Video section (picker, `GET /video-messages`) in the email and text forms. Default true. */
|
|
1833
|
+
readonly showVideo: import("@angular/core").InputSignal<boolean>;
|
|
1834
|
+
protected readonly inApp: import("@angular/core").Signal<boolean>;
|
|
1701
1835
|
/** false hides Attach Files / Attach Image and "Schedule for later" in both forms (a host `sendEmail` / `sendText` that can't deliver them). */
|
|
1702
1836
|
readonly attachmentsAndScheduling: import("@angular/core").InputSignal<boolean>;
|
|
1703
1837
|
/** Purposes the app's backend supports for documents (default all three); `['ESIGN']` hides the purpose select. */
|
|
@@ -1801,6 +1935,7 @@ export declare class SendMessagePanelComponent {
|
|
|
1801
1935
|
readonly phoneAdded: import("@angular/core").OutputEmitterRef<string>;
|
|
1802
1936
|
readonly sendEmailRef: import("@angular/core").Signal<SendEmailComponent | undefined>;
|
|
1803
1937
|
readonly sendTextRef: import("@angular/core").Signal<SendTextComponent | undefined>;
|
|
1938
|
+
readonly sendInAppRef: import("@angular/core").Signal<SendInAppComponent | undefined>;
|
|
1804
1939
|
private readonly destroyRef;
|
|
1805
1940
|
readonly jobSearch$: Subject<string>;
|
|
1806
1941
|
readonly jobOptions: import("@angular/core").WritableSignal<ComboboxOption<unknown>[]>;
|
|
@@ -1913,6 +2048,36 @@ export declare class SendMessagePanelComponent {
|
|
|
1913
2048
|
"required": false;
|
|
1914
2049
|
"isSignal": true;
|
|
1915
2050
|
};
|
|
2051
|
+
"recipientMode": {
|
|
2052
|
+
"alias": "recipientMode";
|
|
2053
|
+
"required": false;
|
|
2054
|
+
"isSignal": true;
|
|
2055
|
+
};
|
|
2056
|
+
"sendMessage": {
|
|
2057
|
+
"alias": "sendMessage";
|
|
2058
|
+
"required": false;
|
|
2059
|
+
"isSignal": true;
|
|
2060
|
+
};
|
|
2061
|
+
"maxBodyLength": {
|
|
2062
|
+
"alias": "maxBodyLength";
|
|
2063
|
+
"required": false;
|
|
2064
|
+
"isSignal": true;
|
|
2065
|
+
};
|
|
2066
|
+
"showSubject": {
|
|
2067
|
+
"alias": "showSubject";
|
|
2068
|
+
"required": false;
|
|
2069
|
+
"isSignal": true;
|
|
2070
|
+
};
|
|
2071
|
+
"showTemplates": {
|
|
2072
|
+
"alias": "showTemplates";
|
|
2073
|
+
"required": false;
|
|
2074
|
+
"isSignal": true;
|
|
2075
|
+
};
|
|
2076
|
+
"showVideo": {
|
|
2077
|
+
"alias": "showVideo";
|
|
2078
|
+
"required": false;
|
|
2079
|
+
"isSignal": true;
|
|
2080
|
+
};
|
|
1916
2081
|
"attachmentsAndScheduling": {
|
|
1917
2082
|
"alias": "attachmentsAndScheduling";
|
|
1918
2083
|
"required": false;
|
|
@@ -2162,4 +2327,4 @@ export declare class DocumentMergeCheckComponent {
|
|
|
2162
2327
|
"warningsChange": "warningsChange";
|
|
2163
2328
|
}, never, never, true, never>;
|
|
2164
2329
|
}
|
|
2165
|
-
export type { CreateDocumentRequestBody, DocuSignSendBody, DocumentSentInfo, DocumentSentMessage, DocumentsPayloadExtras, ExistingEnvelopeSendBody, SendDocumentsPayload, SendEmailPayload, SendTextPayload, VideoDefaults, VideoLinkOptions };
|
|
2330
|
+
export type { CreateDocumentRequestBody, DocuSignSendBody, DocumentSentInfo, DocumentSentMessage, DocumentsPayloadExtras, ExistingEnvelopeSendBody, SendDocumentsPayload, SendEmailPayload, SendInAppPayload, SendTextPayload, VideoDefaults, VideoLinkOptions };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { InjectionToken, Provider } from "@angular/core";
|
|
2
|
+
import { DestroyRef, InjectionToken, Provider, WritableSignal } from "@angular/core";
|
|
3
|
+
import { Observable } from "rxjs";
|
|
3
4
|
/**
|
|
4
5
|
* The small part of Stripe.js the library calls, written as plain structural types so the library has NO compile-time or run-time
|
|
5
6
|
* dependency on `@stripe/stripe-js` outside of the lazy loader (`stripe-loader.ts`). The real `Stripe` object satisfies these; so does a hand-written fake.
|
|
@@ -450,8 +451,10 @@ export declare class StripePaymentComponent {
|
|
|
450
451
|
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
451
452
|
/** The host is still creating the intent: show the loading skeleton. */
|
|
452
453
|
readonly pending: import("@angular/core").InputSignal<boolean>;
|
|
453
|
-
/** Accessible name of the payment form. */
|
|
454
|
+
/** Accessible name of the payment form (also its visible heading when `required` is set). */
|
|
454
455
|
readonly label: import("@angular/core").InputSignal<string>;
|
|
456
|
+
/** The payment details are required (a required wizard step): a visible heading with a red asterisk is shown above the form. Not shown in `mountOnly` mode. */
|
|
457
|
+
readonly required: import("@angular/core").InputSignal<boolean>;
|
|
455
458
|
/** The `id` of the element container (an app's e2e selector such as `#payment-element`). */
|
|
456
459
|
readonly mountId: import("@angular/core").InputSignal<string>;
|
|
457
460
|
/** Extra CSS classes on the element container. */
|
|
@@ -751,6 +754,11 @@ export declare class StripePaymentComponent {
|
|
|
751
754
|
"required": false;
|
|
752
755
|
"isSignal": true;
|
|
753
756
|
};
|
|
757
|
+
"required": {
|
|
758
|
+
"alias": "required";
|
|
759
|
+
"required": false;
|
|
760
|
+
"isSignal": true;
|
|
761
|
+
};
|
|
754
762
|
"mountId": {
|
|
755
763
|
"alias": "mountId";
|
|
756
764
|
"required": false;
|
|
@@ -1141,104 +1149,220 @@ export declare class MicrodepositVerifyComponent {
|
|
|
1141
1149
|
"verifyFailed": "verifyFailed";
|
|
1142
1150
|
}, never, never, true, never>;
|
|
1143
1151
|
}
|
|
1152
|
+
/** What the account-status call answers (the shape of cremo's `GET /organizations/connect/status`). `isComplete` = Stripe accepts charges and payouts. */
|
|
1153
|
+
interface StripeConnectStatus {
|
|
1154
|
+
isComplete: boolean;
|
|
1155
|
+
detailsSubmitted?: boolean;
|
|
1156
|
+
/** The address of Stripe's onboarding page for an unfinished account. */
|
|
1157
|
+
onboardingUrl?: string;
|
|
1158
|
+
}
|
|
1159
|
+
/** What the create-account call answers (cremo's `POST /organizations/connect/create`): the new (or resumed) account and the address of Stripe's onboarding page. */
|
|
1160
|
+
interface StripeConnectAccount {
|
|
1161
|
+
accountId: string;
|
|
1162
|
+
onboardingUrl: string;
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* What happened after the user pressed a button or the page asked for the state. The flow never shows toasts itself (each app has its own): the host words
|
|
1166
|
+
* each outcome, and decides what follows a finished account (for example switching payment collection on).
|
|
1167
|
+
*
|
|
1168
|
+
* - `complete`: Stripe accepts the account. `source: 'check'` = after "Check Status"; `'resume'` = "Complete Setup" found it already complete; `'return'` =
|
|
1169
|
+
* the state was read again when the user came back to this tab (`refreshOnReturn`).
|
|
1170
|
+
* - `verifying`: the details were submitted and Stripe is reviewing them.
|
|
1171
|
+
* - `incomplete`: "Check Status" found an unfinished onboarding (`onboardingUrl` present).
|
|
1172
|
+
* - `link-unavailable`: the answer had no https Stripe address; nothing was opened.
|
|
1173
|
+
* - `failed`: a call failed (`action` says which); `error` is what it threw.
|
|
1174
|
+
*/
|
|
1175
|
+
type StripeConnectOutcome = {
|
|
1176
|
+
kind: 'complete';
|
|
1177
|
+
source: 'check' | 'resume' | 'return';
|
|
1178
|
+
} | {
|
|
1179
|
+
kind: 'verifying';
|
|
1180
|
+
source: 'check' | 'resume' | 'return';
|
|
1181
|
+
} | {
|
|
1182
|
+
kind: 'incomplete';
|
|
1183
|
+
} | {
|
|
1184
|
+
kind: 'link-unavailable';
|
|
1185
|
+
} | {
|
|
1186
|
+
kind: 'failed';
|
|
1187
|
+
action: 'start' | 'check' | 'resume';
|
|
1188
|
+
error: unknown;
|
|
1189
|
+
};
|
|
1190
|
+
/** The state the flow reads and writes: signals owned by the host (or by the card's two-way models). */
|
|
1191
|
+
interface StripeConnectState {
|
|
1192
|
+
accountId: WritableSignal<string | null>;
|
|
1193
|
+
complete: WritableSignal<boolean>;
|
|
1194
|
+
detailsSubmitted: WritableSignal<boolean>;
|
|
1195
|
+
loading: WritableSignal<boolean>;
|
|
1196
|
+
}
|
|
1197
|
+
interface StripeConnectFlowOptions {
|
|
1198
|
+
/** Read at call time, so a host can swap the call. Null = no call yet (`start()` does nothing). */
|
|
1199
|
+
createAccount: () => (() => Observable<StripeConnectAccount>) | null;
|
|
1200
|
+
getStatus: () => (() => Observable<StripeConnectStatus>) | null;
|
|
1201
|
+
state: StripeConnectState;
|
|
1202
|
+
/** Where outcomes go. */
|
|
1203
|
+
emit: (outcome: StripeConnectOutcome) => void;
|
|
1204
|
+
/** The buttons and methods do nothing while this says true (a read-only user). */
|
|
1205
|
+
disabled?: () => boolean;
|
|
1206
|
+
/** How THIS tab is sent to Stripe when the browser refused the new tab (default `window.location.href = url`). */
|
|
1207
|
+
navigate?: (url: string) => void;
|
|
1208
|
+
destroyRef: DestroyRef;
|
|
1209
|
+
}
|
|
1210
|
+
/** Only an https address on stripe.com or a real subdomain (never `evilstripe.com` / `connect.stripe.com.evil.com`, `http:`, `javascript:`). */
|
|
1211
|
+
export declare function isStripeUrl(url: string | undefined): url is string;
|
|
1212
|
+
/**
|
|
1213
|
+
* The Stripe Connect flow of cremo Settings > Payment & Billing, as a plain class: create the account, "Check Status", "Complete Setup", and the "back from Stripe" read.
|
|
1214
|
+
* `ui-stripe-connect` runs it behind its card; a host that has to start the flow from code before any view exists (Settings: the first change-detection pass with
|
|
1215
|
+
* `?connect=return`) creates its own instance over the same state signals. Stripe's page always opens in a NEW tab opened inside the click (a tab opened after the
|
|
1216
|
+
* request is blocked by popup blockers); only an https Stripe address is opened; a failed call closes the empty tab.
|
|
1217
|
+
*/
|
|
1218
|
+
export declare class StripeConnectFlow {
|
|
1219
|
+
private readonly o;
|
|
1220
|
+
/** A Stripe tab was opened: the card reads the state again when the user comes back (`refreshOnReturn`). */
|
|
1221
|
+
tabOpened: boolean;
|
|
1222
|
+
constructor(o: StripeConnectFlowOptions);
|
|
1223
|
+
private get blocked();
|
|
1224
|
+
/** Creates (or resumes) the account and opens Stripe's onboarding page in a new tab. */
|
|
1225
|
+
start(): void;
|
|
1226
|
+
/** "Check Status": reads the state; a finished or submitted account updates the card, an unfinished one is reported. */
|
|
1227
|
+
check(): void;
|
|
1228
|
+
/** "Complete Setup": reads the state and opens the onboarding address of an unfinished account in a new tab (a finished or submitted one just updates the card). */
|
|
1229
|
+
resume(): void;
|
|
1230
|
+
/** The state read when the user came back to this tab: silent unless something finished or was submitted. */
|
|
1231
|
+
readStatusOnReturn(): void;
|
|
1232
|
+
private openStripe;
|
|
1233
|
+
/** The empty tab, opened inside the click and cut from this page (`opener`); null when the browser refused. */
|
|
1234
|
+
openBlankTab(): Window | null;
|
|
1235
|
+
/** The browser refused the new tab: Stripe opens in this one. */
|
|
1236
|
+
private navigateCurrentTab;
|
|
1237
|
+
private closeTab;
|
|
1238
|
+
}
|
|
1239
|
+
/**
|
|
1240
|
+
* The default wording of an outcome (the texts cremo Settings has always used), for apps that just want a toast: `{ variant, message }`, or null when
|
|
1241
|
+
* nothing should be said. `completeText` replaces the sentence of a finished account when the host has more to say about what follows.
|
|
1242
|
+
*/
|
|
1243
|
+
export declare function stripeConnectNotice(outcome: StripeConnectOutcome): {
|
|
1244
|
+
variant: 'success' | 'info' | 'error';
|
|
1245
|
+
message: string;
|
|
1246
|
+
} | null;
|
|
1144
1247
|
/**
|
|
1145
|
-
* "Connect
|
|
1146
|
-
*
|
|
1147
|
-
*
|
|
1148
|
-
* (the backend resumes the same account); a finished one shows Connected with Reconnect.
|
|
1248
|
+
* "Stripe Connect Account": the card where a business connects the Stripe account it collects payments into (cremo Settings > Payment & Billing, built here
|
|
1249
|
+
* once so every app and the setup wizard show and run the SAME flow). The host owns the data (its two calls and the three state values); the component owns
|
|
1250
|
+
* the screen and the flow:
|
|
1149
1251
|
*
|
|
1150
|
-
*
|
|
1252
|
+
* - no account yet (`accountId` empty): nothing is shown (the host has its own entry point and calls `start()`), or with `showWhenNoAccount` a card with
|
|
1253
|
+
* "Set Up Payment Account";;
|
|
1254
|
+
* - account, not complete, nothing submitted: warning "Account setup incomplete" with "Complete Setup" (asks the status for the onboarding address and opens it);
|
|
1255
|
+
* - details submitted, not complete: info "Stripe is verifying your account" with "Check Status";
|
|
1256
|
+
* - complete: success "Account setup complete" with the account id and "View Stripe Dashboard".
|
|
1151
1257
|
*
|
|
1152
|
-
*
|
|
1153
|
-
*
|
|
1154
|
-
*
|
|
1258
|
+
* Stripe's onboarding page always opens in a NEW tab: the empty tab is opened inside the click (a tab opened after the request is blocked by popup
|
|
1259
|
+
* blockers) and receives the address when it arrives; with the tab refused the address opens in the current tab. Only an https Stripe address is ever opened,
|
|
1260
|
+
* never one an answer made up (`javascript:`, `data:`). A failed call closes the empty tab.
|
|
1261
|
+
*
|
|
1262
|
+
* <ui-stripe-connect [(accountId)]="accountId" [(complete)]="complete" [(detailsSubmitted)]="submitted"
|
|
1263
|
+
* [createAccount]="createAccount" [getStatus]="getStatus" [showWhenNoAccount]="true" (outcome)="onOutcome($event)" />
|
|
1264
|
+
*
|
|
1265
|
+
* where `createAccount = () => http.post<StripeConnectAccount>('/connect/create', {})` and `getStatus = () => http.get<StripeConnectStatus>('/connect/status')`.
|
|
1155
1266
|
*/
|
|
1156
1267
|
export declare class StripeConnectComponent {
|
|
1157
|
-
private readonly http;
|
|
1158
1268
|
private readonly destroyRef;
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1269
|
+
/** The call that creates the organization's Stripe account (or resumes it) and answers its id and the onboarding address. Needed for `start()`. */
|
|
1270
|
+
readonly createAccount: import("@angular/core").InputSignal<(() => Observable<StripeConnectAccount>) | null>;
|
|
1271
|
+
/** The call that reads the account's state. Needed for `check()`, `resume()` and `refreshOnReturn`. */
|
|
1272
|
+
readonly getStatus: import("@angular/core").InputSignal<(() => Observable<StripeConnectStatus>) | null>;
|
|
1273
|
+
/** The Stripe account's id (null / empty = no account yet). Two-way: the component sets it when `start()` created the account. */
|
|
1274
|
+
readonly accountId: import("@angular/core").ModelSignal<string | null>;
|
|
1275
|
+
/** Stripe accepts the account (charges and payouts on). Two-way: set by `check()` / `resume()`. */
|
|
1276
|
+
readonly complete: import("@angular/core").ModelSignal<boolean>;
|
|
1277
|
+
/** The details were submitted and Stripe is reviewing them. Two-way: set by `check()` / `resume()`. */
|
|
1278
|
+
readonly detailsSubmitted: import("@angular/core").ModelSignal<boolean>;
|
|
1166
1279
|
readonly title: import("@angular/core").InputSignal<string>;
|
|
1167
|
-
|
|
1168
|
-
readonly
|
|
1169
|
-
|
|
1170
|
-
readonly
|
|
1171
|
-
|
|
1172
|
-
readonly
|
|
1173
|
-
readonly
|
|
1280
|
+
/** No card around the content: the text and the button sit directly in the host's own card (the setup wizard's step card). `title` is not shown then. */
|
|
1281
|
+
readonly bare: import("@angular/core").InputSignal<boolean>;
|
|
1282
|
+
/** Shows the card (with "Set Up Payment Account") while there is no account yet. Default false: hosts with their own entry point show nothing and call `start()`. */
|
|
1283
|
+
readonly showWhenNoAccount: import("@angular/core").InputSignal<boolean>;
|
|
1284
|
+
readonly startTitle: import("@angular/core").InputSignal<string>;
|
|
1285
|
+
readonly startText: import("@angular/core").InputSignal<string>;
|
|
1286
|
+
readonly startLabel: import("@angular/core").InputSignal<string>;
|
|
1287
|
+
/** The buttons cannot be pressed (a read-only user). */
|
|
1174
1288
|
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
1175
|
-
/**
|
|
1176
|
-
readonly
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1289
|
+
/** After a Stripe tab was opened, the state is read again when this tab becomes visible again (the user came back): `(outcome)` then reports `complete` / `verifying` with source `return`. */
|
|
1290
|
+
readonly refreshOnReturn: import("@angular/core").InputSignal<boolean>;
|
|
1291
|
+
/** The page "View Stripe Dashboard" opens. */
|
|
1292
|
+
readonly dashboardUrl: import("@angular/core").InputSignal<string>;
|
|
1293
|
+
/** What happened (see {@link StripeConnectOutcome}); the host words it. */
|
|
1294
|
+
readonly outcome: import("@angular/core").OutputEmitterRef<StripeConnectOutcome>;
|
|
1295
|
+
/** A request is running: the buttons show "Loading..." / "Checking..." and cannot be pressed again. Two-way, so a host that shows the state elsewhere can read it. */
|
|
1296
|
+
readonly loading: import("@angular/core").ModelSignal<boolean>;
|
|
1297
|
+
/** How the current tab is sent to Stripe when the browser refused the new tab (default: `window.location.href = url`); a host can route it through its own method. */
|
|
1298
|
+
readonly navigateTab: import("@angular/core").InputSignal<((url: string) => void) | null>;
|
|
1299
|
+
protected readonly visible: import("@angular/core").Signal<boolean>;
|
|
1300
|
+
private readonly flow;
|
|
1183
1301
|
constructor();
|
|
1184
|
-
/**
|
|
1185
|
-
|
|
1186
|
-
/**
|
|
1187
|
-
|
|
1188
|
-
/**
|
|
1189
|
-
|
|
1190
|
-
/**
|
|
1191
|
-
|
|
1192
|
-
|
|
1302
|
+
/** Creates (or resumes) the account and opens Stripe's onboarding page in a new tab. */
|
|
1303
|
+
start(): void;
|
|
1304
|
+
/** "Check Status": reads the state; a finished or submitted account updates the card, an unfinished one is reported. */
|
|
1305
|
+
check(): void;
|
|
1306
|
+
/** "Complete Setup": reads the state and opens the onboarding address of an unfinished account in a new tab. */
|
|
1307
|
+
resume(): void;
|
|
1308
|
+
/** Opens the Stripe dashboard in a new tab. */
|
|
1309
|
+
openDashboard(): void;
|
|
1310
|
+
/** The browser refused the new tab: Stripe opens in this one (through the host's `navigateTab` when it gave one). */
|
|
1311
|
+
protected navigateCurrentTab(url: string): void;
|
|
1193
1312
|
static ɵfac: i0.ɵɵFactoryDeclaration<StripeConnectComponent, never>;
|
|
1194
1313
|
static ɵcmp: i0.ɵɵComponentDeclaration<StripeConnectComponent, "ui-stripe-connect", never, {
|
|
1195
|
-
"
|
|
1196
|
-
"alias": "
|
|
1314
|
+
"createAccount": {
|
|
1315
|
+
"alias": "createAccount";
|
|
1197
1316
|
"required": false;
|
|
1198
1317
|
"isSignal": true;
|
|
1199
1318
|
};
|
|
1200
|
-
"
|
|
1201
|
-
"alias": "
|
|
1319
|
+
"getStatus": {
|
|
1320
|
+
"alias": "getStatus";
|
|
1202
1321
|
"required": false;
|
|
1203
1322
|
"isSignal": true;
|
|
1204
1323
|
};
|
|
1205
|
-
"
|
|
1206
|
-
"alias": "
|
|
1324
|
+
"accountId": {
|
|
1325
|
+
"alias": "accountId";
|
|
1207
1326
|
"required": false;
|
|
1208
1327
|
"isSignal": true;
|
|
1209
1328
|
};
|
|
1210
|
-
"
|
|
1211
|
-
"alias": "
|
|
1329
|
+
"complete": {
|
|
1330
|
+
"alias": "complete";
|
|
1212
1331
|
"required": false;
|
|
1213
1332
|
"isSignal": true;
|
|
1214
1333
|
};
|
|
1215
|
-
"
|
|
1216
|
-
"alias": "
|
|
1334
|
+
"detailsSubmitted": {
|
|
1335
|
+
"alias": "detailsSubmitted";
|
|
1217
1336
|
"required": false;
|
|
1218
1337
|
"isSignal": true;
|
|
1219
1338
|
};
|
|
1220
|
-
"
|
|
1221
|
-
"alias": "
|
|
1339
|
+
"title": {
|
|
1340
|
+
"alias": "title";
|
|
1222
1341
|
"required": false;
|
|
1223
1342
|
"isSignal": true;
|
|
1224
1343
|
};
|
|
1225
|
-
"
|
|
1226
|
-
"alias": "
|
|
1344
|
+
"bare": {
|
|
1345
|
+
"alias": "bare";
|
|
1227
1346
|
"required": false;
|
|
1228
1347
|
"isSignal": true;
|
|
1229
1348
|
};
|
|
1230
|
-
"
|
|
1231
|
-
"alias": "
|
|
1349
|
+
"showWhenNoAccount": {
|
|
1350
|
+
"alias": "showWhenNoAccount";
|
|
1232
1351
|
"required": false;
|
|
1233
1352
|
"isSignal": true;
|
|
1234
1353
|
};
|
|
1235
|
-
"
|
|
1236
|
-
"alias": "
|
|
1354
|
+
"startTitle": {
|
|
1355
|
+
"alias": "startTitle";
|
|
1237
1356
|
"required": false;
|
|
1238
1357
|
"isSignal": true;
|
|
1239
1358
|
};
|
|
1240
|
-
"
|
|
1241
|
-
"alias": "
|
|
1359
|
+
"startText": {
|
|
1360
|
+
"alias": "startText";
|
|
1361
|
+
"required": false;
|
|
1362
|
+
"isSignal": true;
|
|
1363
|
+
};
|
|
1364
|
+
"startLabel": {
|
|
1365
|
+
"alias": "startLabel";
|
|
1242
1366
|
"required": false;
|
|
1243
1367
|
"isSignal": true;
|
|
1244
1368
|
};
|
|
@@ -1247,8 +1371,32 @@ export declare class StripeConnectComponent {
|
|
|
1247
1371
|
"required": false;
|
|
1248
1372
|
"isSignal": true;
|
|
1249
1373
|
};
|
|
1374
|
+
"refreshOnReturn": {
|
|
1375
|
+
"alias": "refreshOnReturn";
|
|
1376
|
+
"required": false;
|
|
1377
|
+
"isSignal": true;
|
|
1378
|
+
};
|
|
1379
|
+
"dashboardUrl": {
|
|
1380
|
+
"alias": "dashboardUrl";
|
|
1381
|
+
"required": false;
|
|
1382
|
+
"isSignal": true;
|
|
1383
|
+
};
|
|
1384
|
+
"loading": {
|
|
1385
|
+
"alias": "loading";
|
|
1386
|
+
"required": false;
|
|
1387
|
+
"isSignal": true;
|
|
1388
|
+
};
|
|
1389
|
+
"navigateTab": {
|
|
1390
|
+
"alias": "navigateTab";
|
|
1391
|
+
"required": false;
|
|
1392
|
+
"isSignal": true;
|
|
1393
|
+
};
|
|
1250
1394
|
}, {
|
|
1251
|
-
"
|
|
1395
|
+
"accountId": "accountIdChange";
|
|
1396
|
+
"complete": "completeChange";
|
|
1397
|
+
"detailsSubmitted": "detailsSubmittedChange";
|
|
1398
|
+
"outcome": "outcome";
|
|
1399
|
+
"loading": "loadingChange";
|
|
1252
1400
|
}, never, never, true, never>;
|
|
1253
1401
|
}
|
|
1254
|
-
export type { HandleReturnOptions, MicrodepositStartedBy, MicrodepositStepsContext, MicrodepositType, MicrodepositVerifyData, MicrodepositVerifyEvent, ProvideStripePaymentOptions, StripeA11yMessages, StripeAppearance, StripeBillingDetails, StripeConfirmResult, StripeConfirmedEvent, StripeConnection, StripeCreateIntentFn, StripeDeferredIntent, StripeElementChange, StripeElementsLike, StripeErrorDisplay, StripeErrorLike, StripeErrorMessageOptions, StripeFailure, StripeFailureStage, StripeIntentKind, StripeIntentLike, StripeLike, StripeLikeWithBankSetup, StripeLoadOptions, StripeLoaderFn, StripeMicrodepositNextAction, StripeMicrodepositResult, StripeOutcome, StripePaymentDefaults, StripePaymentElementLike, StripeReadyEvent, StripeReturnParams, StripeReturnResult, StripeVerification };
|
|
1402
|
+
export type { HandleReturnOptions, MicrodepositStartedBy, MicrodepositStepsContext, MicrodepositType, MicrodepositVerifyData, MicrodepositVerifyEvent, ProvideStripePaymentOptions, StripeA11yMessages, StripeAppearance, StripeBillingDetails, StripeConfirmResult, StripeConfirmedEvent, StripeConnectAccount, StripeConnectFlowOptions, StripeConnectOutcome, StripeConnectState, StripeConnectStatus, StripeConnection, StripeCreateIntentFn, StripeDeferredIntent, StripeElementChange, StripeElementsLike, StripeErrorDisplay, StripeErrorLike, StripeErrorMessageOptions, StripeFailure, StripeFailureStage, StripeIntentKind, StripeIntentLike, StripeLike, StripeLikeWithBankSetup, StripeLoadOptions, StripeLoaderFn, StripeMicrodepositNextAction, StripeMicrodepositResult, StripeOutcome, StripePaymentDefaults, StripePaymentElementLike, StripeReadyEvent, StripeReturnParams, StripeReturnResult, StripeVerification };
|