@qonto/embed-sdk 0.49.0 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth-links/auth-links.d.ts.map +1 -1
- package/dist/beneficiaries/beneficiaries.d.ts.map +1 -1
- package/dist/cards/cards.d.ts +39 -26
- package/dist/cards/cards.d.ts.map +1 -1
- package/dist/common/common.types.d.ts +9 -0
- package/dist/common/common.types.d.ts.map +1 -0
- package/dist/common/common.utils.d.ts +9 -0
- package/dist/common/common.utils.d.ts.map +1 -1
- package/dist/common/network/network.d.ts +7 -2
- package/dist/common/network/network.d.ts.map +1 -1
- package/dist/common/operation-settings/operation-settings.d.ts +3 -0
- package/dist/common/operation-settings/operation-settings.d.ts.map +1 -1
- package/dist/errors/AuthenticationError.d.ts +1 -1
- package/dist/index.umd.js +1632 -18
- package/dist/mocks/handlers.d.ts.map +1 -1
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/base.js +6 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js +6 -0
- package/dist/organizations/organizations.d.ts +11 -6
- package/dist/organizations/organizations.d.ts.map +1 -1
- package/dist/sca/sca.d.ts.map +1 -1
- package/dist/sepa-transfers/bulk-transfers/bulk-transfers.api.d.ts +9 -1
- package/dist/sepa-transfers/bulk-transfers/bulk-transfers.api.d.ts.map +1 -1
- package/dist/sepa-transfers/bulk-transfers/bulk-transfers.d.ts +25 -32
- package/dist/sepa-transfers/bulk-transfers/bulk-transfers.d.ts.map +1 -1
- package/dist/sepa-transfers/sepa-transfers.d.ts +36 -51
- package/dist/sepa-transfers/sepa-transfers.d.ts.map +1 -1
- package/dist/src/auth-links/auth-links.js +1 -1
- package/dist/src/beneficiaries/beneficiaries.js +1 -1
- package/dist/src/cards/cards.js +1 -1
- package/dist/src/common/api-pagination/api-pagination.js +1 -1
- package/dist/src/common/common.utils.js +1 -1
- package/dist/src/common/operation-settings/operation-settings.js +1 -1
- package/dist/src/errors/AuthenticationError.js +1 -1
- package/dist/src/organizations/organizations.js +1 -1
- package/dist/src/sca/sca.js +1 -1
- package/dist/src/sepa-transfers/bulk-transfers/bulk-transfers.api.js +1 -1
- package/dist/src/sepa-transfers/bulk-transfers/bulk-transfers.js +1 -1
- package/dist/src/sepa-transfers/sepa-transfers.js +1 -1
- package/dist/src/sepa-transfers/sepa-transfers.public-api.js +1 -1
- package/dist/src/transactions/transactions.js +1 -1
- package/dist/src/ui/animations/general_success.json.js +1 -0
- package/dist/src/ui/animations/generic_error.json.js +1 -0
- package/dist/src/ui/customizable-components/amount-field/qonto-amount-field.js +29 -0
- package/dist/src/ui/customizable-components/amount-field/qonto-amount-field.styles.js +178 -0
- package/dist/src/ui/customizable-components/amount-field/qonto-amount-field.utils.js +1 -0
- package/dist/src/ui/customizable-components/beneficiary-card/qonto-beneficiary-card.js +10 -0
- package/dist/src/ui/customizable-components/beneficiary-card/qonto-beneficiary-card.styles.js +140 -0
- package/dist/src/ui/customizable-components/select-field/qonto-option.js +5 -0
- package/dist/src/ui/customizable-components/select-field/qonto-select-field.js +73 -0
- package/dist/src/ui/customizable-components/select-field/qonto-select-field.styles.js +307 -0
- package/dist/src/ui/customizable-components/text-field/qonto-text-field.js +24 -0
- package/dist/src/ui/customizable-components/text-field/qonto-text-field.styles.js +139 -0
- package/dist/src/ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.js +3 -3
- package/dist/src/ui/ui-elements/sepa-transfer-creation/create-sepa-transfer-creation-element.js +1 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/beneficiary-selection-page.js +20 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/beneficiary-selection-page.styles.js +70 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/beneficiary-selection-page.utils.js +16 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-details-page-utils.js +1 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-details-page.js +106 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-details-page.styles.js +110 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-error-page.js +11 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-error-page.styles.js +14 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-success-page.js +16 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-success-page.styles.js +21 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-summary-page.js +89 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-summary-page.styles.js +169 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-summary-page.utils.js +15 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.events.js +1 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.js +32 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.styles.js +33 -0
- package/dist/src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.utils.js +1 -0
- package/dist/src/ui/ui-elements.constants.js +1 -1
- package/dist/src/ui/ui-elements.js +1 -1
- package/dist/src/validation/operation-settings-validation.js +1 -1
- package/dist/transactions/transactions.d.ts.map +1 -1
- package/dist/ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.d.ts.map +1 -1
- package/dist/ui/ui-elements/sepa-transfer-creation/pages/transfer-summary-page.d.ts.map +1 -1
- package/dist/ui/ui-elements.constants.d.ts +1 -0
- package/dist/ui/ui-elements.constants.d.ts.map +1 -1
- package/dist/ui/ui-elements.d.ts.map +1 -1
- package/dist/validation/operation-settings-validation.d.ts +27 -1
- package/dist/validation/operation-settings-validation.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import{__decorate as e}from"../../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as o}from"../../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as n}from"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as i}from"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{state as a}from"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";import{msg as s}from"../../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import{localized as r}from"../../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/localized-decorator.js";import"../../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{transferDetailsPageStyles as c}from"./transfer-details-page.styles.js";import{setLocale as l}from"../../localize/configure-localization.js";import{TransferDetailsSubmittedEvent as d}from"../sepa-transfer-creation.events.js";import"../../../customizable-components/styles/styles.css.js";import"../../../customizable-components/text/qonto-text-heading.js";import"../../../customizable-components/button/qonto-button.js";import"../../../customizable-components/skeleton-loader/qonto-skeleton-loader-line.js";import"../../../customizable-components/beneficiary-card/qonto-beneficiary-card.js";import"../../../customizable-components/text-field/qonto-text-field.js";import"../../../customizable-components/select-field/qonto-select-field.js";import"../../../customizable-components/select-field/qonto-option.js";import"../../../customizable-components/amount-field/qonto-amount-field.js";import{iconCheckmarkRoundedFilled as m}from"../../../customizable-components/icons/icon-checkmark-rounded-filled.js";import{iconWarning as p}from"../../../customizable-components/icons/icon-warning.js";import{SEPA_TRANSFER_PAGES as u}from"../sepa-transfer-creation.js";import{getBankAccounts as h}from"../../../../organizations/organizations.js";import{VOP_CHECK_RESULTS as f}from"../../../../common/constants.js";import{getAmountErrorMessage as b,getReferenceErrorMessage as v}from"./transfer-details-page-utils.js";let y=class extends o{constructor(){super(...arguments),this.locale="en",this.transferAmount=0,this.transferReference="",this.isLoadingVop=!1,this.bankAccounts=[],this.isLoading=!1,this.amountTouched=!1,this.referenceTouched=!1}connectedCallback(){super.connectedCallback(),l(this.locale),this.fetchBankAccounts()}updated(e){e.has("locale")&&l(this.locale)}async fetchBankAccounts(){if(this.operationSettings){this.isLoading=!0,this.error=void 0;try{const e=await h(this.operationSettings);this.bankAccounts=e,e.length>0&&!this.accountToDebit&&(this.accountToDebit=e[0])}catch(e){console.error("Failed to load bank accounts:",e),this.error=s("Failed to load bank accounts. Please try again.")}finally{this.isLoading=!1}}else console.error("operationSettings is required to fetch bank accounts")}handleAmountChange(e){this.transferAmount=Number(e.detail.value),this.amountTouched=!0}handleAmountBlur(){this.amountTouched=!0}handleReferenceChange(e){this.transferReference=e.target.value,this.referenceTouched=!0}handleReferenceBlur(){this.referenceTouched=!0}handlePrevious(){this.dispatchEvent(new CustomEvent("go-to-step",{bubbles:!0,composed:!0,detail:{step:u.BENEFICIARY_SELECTION}}))}handleSubmit(){this.transferAmount>0&&this.accountToDebit&&this.dispatchEvent(new d({accountToDebit:this.accountToDebit,amount:this.transferAmount.toString(),reference:this.transferReference}))}render(){const e=this.transferAmount<=0||!this.accountToDebit||this.transferAmount>(this.accountToDebit?.balance??0)||!this.transferReference;return t`
|
|
2
|
+
<div data-step-container>
|
|
3
|
+
<div data-step-header>
|
|
4
|
+
<qonto-text-heading level="2"
|
|
5
|
+
>${s("Enter your transfer details")}</qonto-text-heading
|
|
6
|
+
>
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<qonto-beneficiary-card
|
|
10
|
+
.beneficiaryName=${this.beneficiary?.name||""}
|
|
11
|
+
.iban=${this.beneficiary?.iban||""}
|
|
12
|
+
>
|
|
13
|
+
<div slot="footer" data-vop-check-placeholder>
|
|
14
|
+
${this.isLoadingVop?t`
|
|
15
|
+
<qonto-skeleton-loader-line
|
|
16
|
+
width="250px"
|
|
17
|
+
></qonto-skeleton-loader-line>
|
|
18
|
+
`:this.vopResult?t`
|
|
19
|
+
${this.vopResult.matchResult===f.MATCH_RESULT_MATCH?t`
|
|
20
|
+
<span data-vop-icon data-vop-success>
|
|
21
|
+
${m}
|
|
22
|
+
</span>
|
|
23
|
+
${s("Name and IBAN match the beneficiary's account details.")}
|
|
24
|
+
`:this.vopResult.matchResult===f.MATCH_RESULT_CLOSE_MATCH?t`
|
|
25
|
+
<span data-vop-icon data-vop-warning>
|
|
26
|
+
${p}
|
|
27
|
+
</span>
|
|
28
|
+
${s("Close match:")}
|
|
29
|
+
${this.vopResult.matchedName||this.beneficiary?.name}
|
|
30
|
+
`:t`
|
|
31
|
+
<span data-vop-icon data-vop-warning>
|
|
32
|
+
${p}
|
|
33
|
+
</span>
|
|
34
|
+
${s("No match found. Please verify the details.")}
|
|
35
|
+
`}
|
|
36
|
+
`:t`
|
|
37
|
+
<qonto-skeleton-loader-line
|
|
38
|
+
width="250px"
|
|
39
|
+
></qonto-skeleton-loader-line>
|
|
40
|
+
`}
|
|
41
|
+
</div>
|
|
42
|
+
</qonto-beneficiary-card>
|
|
43
|
+
|
|
44
|
+
<form data-sepa-transfer-form>
|
|
45
|
+
<div data-form-section>
|
|
46
|
+
<qonto-select-field
|
|
47
|
+
id="account-to-debit"
|
|
48
|
+
.label=${s("Account to debit")}
|
|
49
|
+
.value=${this.accountToDebit?.id}
|
|
50
|
+
?disabled=${this.isLoading}
|
|
51
|
+
@change=${e=>{const t=e.detail.value;this.accountToDebit=this.bankAccounts.find((e=>e.id===t))}}
|
|
52
|
+
>
|
|
53
|
+
${this.bankAccounts.map((e=>t`
|
|
54
|
+
<qonto-option value="${e.id}">
|
|
55
|
+
<div data-account-option>
|
|
56
|
+
<span data-account-name>${e.name}</span>
|
|
57
|
+
<span data-account-balance>
|
|
58
|
+
${e.currency} ${e.balance.toFixed(2)}
|
|
59
|
+
</span>
|
|
60
|
+
</div>
|
|
61
|
+
</qonto-option>
|
|
62
|
+
`))}
|
|
63
|
+
</qonto-select-field>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<div data-form-row>
|
|
67
|
+
<div data-form-section>
|
|
68
|
+
<qonto-amount-field
|
|
69
|
+
id="transfer-amount"
|
|
70
|
+
.label=${s("Amount")}
|
|
71
|
+
.value=${this.transferAmount}
|
|
72
|
+
.currency=${this.accountToDebit?.currency||"EUR"}
|
|
73
|
+
.locale=${this.locale}
|
|
74
|
+
.errorMessage=${b({amountTouched:this.amountTouched,transferAmount:this.transferAmount,accountToDebit:this.accountToDebit})}
|
|
75
|
+
placeholder="0.00"
|
|
76
|
+
@change=${this.handleAmountChange}
|
|
77
|
+
@blur=${this.handleAmountBlur}
|
|
78
|
+
></qonto-amount-field>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<qonto-text-field
|
|
83
|
+
id="transfer-reference"
|
|
84
|
+
.value=${this.transferReference}
|
|
85
|
+
.label=${s("Reference (as seen by beneficiary)")}
|
|
86
|
+
.placeholder=${s("Enter the transfer reference")}
|
|
87
|
+
.errorMessage=${v({referenceTouched:this.referenceTouched,transferReference:this.transferReference})}
|
|
88
|
+
@change=${this.handleReferenceChange}
|
|
89
|
+
@blur=${this.handleReferenceBlur}
|
|
90
|
+
></qonto-text-field>
|
|
91
|
+
|
|
92
|
+
<div data-form-actions>
|
|
93
|
+
<qonto-button variant="secondary" @click=${this.handlePrevious}>
|
|
94
|
+
${s("Previous")}
|
|
95
|
+
</qonto-button>
|
|
96
|
+
<qonto-button
|
|
97
|
+
variant="primary"
|
|
98
|
+
?disabled=${e}
|
|
99
|
+
@click=${this.handleSubmit}
|
|
100
|
+
>
|
|
101
|
+
${s("Continue")}
|
|
102
|
+
</qonto-button>
|
|
103
|
+
</div>
|
|
104
|
+
</form>
|
|
105
|
+
</div>
|
|
106
|
+
`}};y.styles=c,e([i({type:Object})],y.prototype,"operationSettings",void 0),e([i({type:String})],y.prototype,"locale",void 0),e([i({type:String})],y.prototype,"beneficiary",void 0),e([i({type:String})],y.prototype,"accountToDebit",void 0),e([i({type:Number})],y.prototype,"transferAmount",void 0),e([i({type:String})],y.prototype,"transferReference",void 0),e([i({type:Object})],y.prototype,"vopResult",void 0),e([i({type:Boolean})],y.prototype,"isLoadingVop",void 0),e([a()],y.prototype,"bankAccounts",void 0),e([a()],y.prototype,"isLoading",void 0),e([a()],y.prototype,"error",void 0),e([a()],y.prototype,"amountTouched",void 0),e([a()],y.prototype,"referenceTouched",void 0),y=e([r(),n("qonto-transfer-details-page")],y);export{y as TransferDetailsPage};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";const t=e`
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
width: 100%;
|
|
5
|
+
font-family: var(--qonto-embed-font-family, 'PolySans Qonto', sans-serif);
|
|
6
|
+
|
|
7
|
+
[data-step-container] {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: 24px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[data-step-header] {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: 8px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
[data-sepa-transfer-form] {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
gap: 16px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
[data-form-section] {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
gap: 8px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[data-form-actions] {
|
|
32
|
+
display: flex;
|
|
33
|
+
gap: 12px;
|
|
34
|
+
justify-content: flex-start;
|
|
35
|
+
margin-top: 16px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
[data-vop-check-placeholder] {
|
|
39
|
+
display: flex;
|
|
40
|
+
gap: 12px;
|
|
41
|
+
align-items: center;
|
|
42
|
+
font-size: var(
|
|
43
|
+
--qonto-embed-content-font-size,
|
|
44
|
+
var(--body-1-font-size, 14px)
|
|
45
|
+
);
|
|
46
|
+
font-weight: 400;
|
|
47
|
+
line-height: 24px;
|
|
48
|
+
color: var(
|
|
49
|
+
--qonto-embed-content-color-secondary,
|
|
50
|
+
var(--content-secondary)
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
[data-vop-icon] {
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
width: 12px;
|
|
59
|
+
height: 12px;
|
|
60
|
+
color: var(
|
|
61
|
+
--qonto-embed-content-color-secondary,
|
|
62
|
+
var(--content-secondary)
|
|
63
|
+
);
|
|
64
|
+
flex-shrink: 0;
|
|
65
|
+
|
|
66
|
+
svg {
|
|
67
|
+
width: 12px;
|
|
68
|
+
height: 12px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&[data-vop-success] {
|
|
72
|
+
color: var(--content-success);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&[data-vop-warning] {
|
|
76
|
+
color: var(--content-warning);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[data-form-row] {
|
|
81
|
+
display: flex;
|
|
82
|
+
gap: 16px;
|
|
83
|
+
width: 100%;
|
|
84
|
+
|
|
85
|
+
[data-form-section] {
|
|
86
|
+
flex: 1;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
[data-account-option] {
|
|
91
|
+
display: flex;
|
|
92
|
+
justify-content: space-between;
|
|
93
|
+
align-items: center;
|
|
94
|
+
width: 100%;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
[data-account-name] {
|
|
98
|
+
font-size: 14px;
|
|
99
|
+
color: var(--qonto-embed-content-color-primary, var(--content-primary-a));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
[data-account-balance] {
|
|
103
|
+
font-size: 14px;
|
|
104
|
+
color: var(
|
|
105
|
+
--qonto-embed-content-color-secondary,
|
|
106
|
+
var(--content-secondary)
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
`;export{t as transferDetailsPageStyles};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{__decorate as e}from"../../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as o}from"../../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{msg as l}from"../../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import{localized as n}from"../../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/localized-decorator.js";import"../../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{customElement as i}from"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as r}from"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{setLocale as s}from"../../localize/configure-localization.js";import{transferErrorPageStyles as m}from"./transfer-error-page.styles.js";import a from"../../../animations/generic_error.json.js";import"../../../customizable-components/text/qonto-text-heading.js";import"../../../customizable-components/lottie-player/qonto-lottie-player.js";let p=class extends o{constructor(){super(...arguments),this.locale="en"}connectedCallback(){super.connectedCallback(),s(this.locale)}handleFinishButtonPress(){const e=new CustomEvent("sepa-transfer-creation-flow-completed",{bubbles:!0,composed:!0});this.dispatchEvent(e)}render(){return t`<div data-step-container>
|
|
2
|
+
<qonto-text-heading level="1">
|
|
3
|
+
${l("Your transfer could not be sent")}
|
|
4
|
+
</qonto-text-heading>
|
|
5
|
+
<qonto-lottie-player
|
|
6
|
+
.animationData=${a}
|
|
7
|
+
></qonto-lottie-player>
|
|
8
|
+
<qonto-button @click=${this.handleFinishButtonPress}
|
|
9
|
+
>${l("Finish")}</qonto-button
|
|
10
|
+
>
|
|
11
|
+
</div>`}};p.styles=m,e([r({type:String})],p.prototype,"locale",void 0),p=e([n(),i("qonto-transfer-error-page")],p);export{p as TransferErrorPage};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";const t=e`
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
width: 100%;
|
|
5
|
+
font-family: var(--qonto-embed-font-family, 'PolySans Qonto', sans-serif);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
[data-step-container] {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: 32px;
|
|
12
|
+
align-items: center;
|
|
13
|
+
}
|
|
14
|
+
`;export{t as transferErrorPageStyles};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{__decorate as e}from"../../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as o}from"../../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{msg as n}from"../../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import{localized as l}from"../../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/localized-decorator.js";import"../../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{customElement as s}from"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as i}from"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{setLocale as r}from"../../localize/configure-localization.js";import{SEPA_TRANSFER_PAGES as a}from"../sepa-transfer-creation.js";import{transferSuccessPageStyles as m}from"./transfer-success-page.styles.js";import p from"../../../animations/general_success.json.js";import"../../../customizable-components/text/qonto-text-heading.js";import"../../../customizable-components/lottie-player/qonto-lottie-player.js";let d=class extends o{constructor(){super(...arguments),this.locale="en"}connectedCallback(){super.connectedCallback(),r(this.locale)}handleOkButtonPress(){const e=new CustomEvent("sepa-transfer-creation-flow-completed",{bubbles:!0,composed:!0});this.dispatchEvent(e)}handleCreateAnotherTransferButtonPress(){this.dispatchEvent(new CustomEvent("go-to-step",{bubbles:!0,composed:!0,detail:{step:a.BENEFICIARY_SELECTION}}))}render(){return t`<div data-step-container>
|
|
2
|
+
<qonto-text-heading level="1">
|
|
3
|
+
${n("Your transfer has been sent")}
|
|
4
|
+
</qonto-text-heading>
|
|
5
|
+
<qonto-lottie-player
|
|
6
|
+
.animationData=${p}
|
|
7
|
+
></qonto-lottie-player>
|
|
8
|
+
<div data-button-container>
|
|
9
|
+
<qonto-button @click=${this.handleCreateAnotherTransferButtonPress}
|
|
10
|
+
>${n("Create another transfer")}</qonto-button
|
|
11
|
+
>
|
|
12
|
+
<qonto-button @click=${this.handleOkButtonPress} variant="tertiary"
|
|
13
|
+
>${n("Finish")}</qonto-button
|
|
14
|
+
>
|
|
15
|
+
</div>
|
|
16
|
+
</div>`}};d.styles=m,e([i({type:String})],d.prototype,"locale",void 0),d=e([l(),s("qonto-transfer-success-page")],d);export{d as TransferSuccessPage};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";const t=e`
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
width: 100%;
|
|
5
|
+
font-family: var(--qonto-embed-font-family, 'PolySans Qonto', sans-serif);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
[data-step-container] {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: 32px;
|
|
12
|
+
align-items: center;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
[data-button-container] {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
gap: 8px;
|
|
19
|
+
align-items: center;
|
|
20
|
+
}
|
|
21
|
+
`;export{t as transferSuccessPageStyles};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import{__decorate as e}from"../../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as o}from"../../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as i}from"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as r}from"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{msg as a}from"../../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import{localized as n}from"../../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/localized-decorator.js";import"../../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{transferSummaryPageStyles as d}from"./transfer-summary-page.styles.js";import{setLocale as s}from"../../localize/configure-localization.js";import"../../../customizable-components/styles/styles.css.js";import"../../../customizable-components/button/qonto-button.js";import{SEPA_TRANSFER_PAGES as l}from"../sepa-transfer-creation.js";import{formatIBAN as m}from"../sepa-transfer-creation.utils.js";import{getVopVerificationResultMarkup as c}from"./transfer-summary-page.utils.js";let p=class extends o{constructor(){super(...arguments),this.locale="en",this.beneficiary=void 0,this.accountToDebit=void 0,this.transferAmount="",this.transferReference="",this.isConfirming=!1}connectedCallback(){super.connectedCallback(),s(this.locale)}updated(e){e.has("locale")&&s(this.locale)}handlePrevious(){this.dispatchEvent(new CustomEvent("go-to-step",{bubbles:!0,composed:!0,detail:{step:l.TRANSFER_DETAILS}}))}handleConfirm(){this.dispatchEvent(new CustomEvent("transfer-confirmed",{bubbles:!0,composed:!0,detail:{amount:this.transferAmount,reference:this.transferReference}}))}render(){const e=this.accountToDebit;return t`
|
|
2
|
+
<div data-step-container>
|
|
3
|
+
<div data-step-header>
|
|
4
|
+
<qonto-text-heading level="2"
|
|
5
|
+
>${a("One last look?")}</qonto-text-heading
|
|
6
|
+
>
|
|
7
|
+
<qonto-text-body>
|
|
8
|
+
${a("Take a moment to double-check that everything is correct.")}
|
|
9
|
+
</qonto-text-body>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div data-summary-section>
|
|
13
|
+
<div data-summary-row>
|
|
14
|
+
<div data-summary-label>${a("Account to debit")}</div>
|
|
15
|
+
<div data-summary-value>
|
|
16
|
+
<qonto-text-body>
|
|
17
|
+
${e?.name||a("Loading...")}
|
|
18
|
+
</qonto-text-body>
|
|
19
|
+
<div data-summary-value-secondary>
|
|
20
|
+
${e?`${e.currency} ${e.balance.toFixed(2)}`:""}
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div data-summary-row>
|
|
26
|
+
<div data-beneficiary-label>
|
|
27
|
+
<div data-summary-label>${a("Beneficiary")}</div>
|
|
28
|
+
<div data-vop-indicator>
|
|
29
|
+
${this.vopResult?c(this.vopResult.matchResult):""}
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<div data-summary-value>
|
|
33
|
+
<div data-beneficiary-info>
|
|
34
|
+
<div data-beneficiary-name-row>
|
|
35
|
+
${this.beneficiary?.currency?t`<span data-currency-badge
|
|
36
|
+
>${this.beneficiary?.currency}</span
|
|
37
|
+
>`:""}
|
|
38
|
+
<qonto-text-body>${this.beneficiary?.name}</qonto-text-body>
|
|
39
|
+
</div>
|
|
40
|
+
<div data-summary-value-secondary>
|
|
41
|
+
${m(this.beneficiary?.iban)}
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div data-summary-row>
|
|
48
|
+
<div data-summary-label>${a("Reference")}</div>
|
|
49
|
+
<div data-summary-value>
|
|
50
|
+
<qonto-text-body>${this.transferReference}</qonto-text-body>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div data-divider></div>
|
|
55
|
+
|
|
56
|
+
<div data-amount-row>
|
|
57
|
+
<div data-amount-label>${a("You're sending")}</div>
|
|
58
|
+
<div data-amount-value>
|
|
59
|
+
${this.accountToDebit?.currency} ${this.transferAmount}
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
${this.error?t`
|
|
65
|
+
<div
|
|
66
|
+
style="color: var(--content-error, #d32f2f); padding: 12px; border: 1px solid var(--border-error, #d32f2f); border-radius: 4px; margin-bottom: 16px;"
|
|
67
|
+
>
|
|
68
|
+
${this.error}
|
|
69
|
+
</div>
|
|
70
|
+
`:""}
|
|
71
|
+
|
|
72
|
+
<div data-form-actions>
|
|
73
|
+
<qonto-button
|
|
74
|
+
variant="secondary"
|
|
75
|
+
?disabled=${this.isConfirming}
|
|
76
|
+
@click=${this.handlePrevious}
|
|
77
|
+
>
|
|
78
|
+
${a("Previous")}
|
|
79
|
+
</qonto-button>
|
|
80
|
+
<qonto-button
|
|
81
|
+
variant="primary"
|
|
82
|
+
?disabled=${this.isConfirming}
|
|
83
|
+
@click=${this.handleConfirm}
|
|
84
|
+
>
|
|
85
|
+
${this.isConfirming?a("Confirming..."):a("Confirm transfer")}
|
|
86
|
+
</qonto-button>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
`}};p.styles=d,e([r({type:Object})],p.prototype,"operationSettings",void 0),e([r({type:String})],p.prototype,"locale",void 0),e([r({type:Object})],p.prototype,"beneficiary",void 0),e([r({type:Object})],p.prototype,"accountToDebit",void 0),e([r({type:String})],p.prototype,"transferAmount",void 0),e([r({type:String})],p.prototype,"transferReference",void 0),e([r({type:Object})],p.prototype,"vopResult",void 0),e([r({type:Boolean})],p.prototype,"isConfirming",void 0),e([r({type:String})],p.prototype,"error",void 0),p=e([n(),i("qonto-transfer-summary-page")],p);export{p as TransferSummaryPage};
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";const t=e`
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
width: 100%;
|
|
5
|
+
font-family: var(--qonto-embed-font-family, 'PolySans Qonto', sans-serif);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
[data-step-container] {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: 32px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
[data-step-header] {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
gap: 16px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
[data-summary-section] {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
gap: 16px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
[data-summary-row] {
|
|
27
|
+
display: flex;
|
|
28
|
+
gap: 24px;
|
|
29
|
+
justify-content: space-between;
|
|
30
|
+
align-items: flex-start;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
[data-summary-label] {
|
|
34
|
+
flex: 1;
|
|
35
|
+
font-size: 14px;
|
|
36
|
+
font-weight: 400;
|
|
37
|
+
line-height: 24px;
|
|
38
|
+
color: var(--qonto-embed-content-color-primary, var(--content-primary-a));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
[data-summary-value] {
|
|
42
|
+
flex: 1;
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
align-items: flex-end;
|
|
46
|
+
text-align: right;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
[data-summary-value-secondary] {
|
|
50
|
+
font-size: 14px;
|
|
51
|
+
font-weight: 400;
|
|
52
|
+
line-height: 24px;
|
|
53
|
+
color: var(--qonto-embed-content-color-secondary, var(--content-secondary));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
[data-beneficiary-info] {
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
gap: 0;
|
|
60
|
+
align-items: flex-end;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[data-beneficiary-name-row] {
|
|
64
|
+
display: flex;
|
|
65
|
+
gap: 8px;
|
|
66
|
+
align-items: center;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
[data-currency-badge] {
|
|
70
|
+
display: inline-flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
padding: 0 4px;
|
|
73
|
+
height: 16px;
|
|
74
|
+
border: 1px solid var(--border-secondary, #cccccc);
|
|
75
|
+
border-radius: 2px;
|
|
76
|
+
font-size: 12px;
|
|
77
|
+
font-weight: 400;
|
|
78
|
+
line-height: 16px;
|
|
79
|
+
color: var(--qonto-embed-content-color-secondary, var(--content-secondary));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
[data-vop-indicator] {
|
|
83
|
+
display: flex;
|
|
84
|
+
gap: 6px;
|
|
85
|
+
align-items: center;
|
|
86
|
+
height: 24px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
[data-vop-icon] {
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
width: 12px;
|
|
94
|
+
height: 12px;
|
|
95
|
+
color: var(--qonto-embed-content-color-secondary, var(--content-secondary));
|
|
96
|
+
flex-shrink: 0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
[data-vop-icon] svg {
|
|
100
|
+
width: 12px;
|
|
101
|
+
height: 12px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
[data-vop-icon][data-vop-success] {
|
|
105
|
+
color: var(--content-success, #0f7a3d);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
[data-vop-icon][data-vop-warning] {
|
|
109
|
+
color: var(--content-warning, #f59e0b);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
[data-vop-text] {
|
|
113
|
+
font-size: 12px;
|
|
114
|
+
font-weight: 400;
|
|
115
|
+
line-height: 16px;
|
|
116
|
+
color: var(--qonto-embed-content-color-secondary, var(--content-secondary));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
[data-divider] {
|
|
120
|
+
height: 18px;
|
|
121
|
+
position: relative;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
[data-divider]::after {
|
|
125
|
+
content: '';
|
|
126
|
+
position: absolute;
|
|
127
|
+
bottom: 44.44%;
|
|
128
|
+
left: 0;
|
|
129
|
+
right: 0;
|
|
130
|
+
border-bottom: 1px solid var(--border-tertiary, #e8e8e8);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
[data-amount-row] {
|
|
134
|
+
display: flex;
|
|
135
|
+
gap: 24px;
|
|
136
|
+
justify-content: space-between;
|
|
137
|
+
align-items: center;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
[data-amount-label] {
|
|
141
|
+
flex: 1;
|
|
142
|
+
font-size: 16px;
|
|
143
|
+
font-weight: 400;
|
|
144
|
+
line-height: 24px;
|
|
145
|
+
color: var(--qonto-embed-content-color-primary, var(--content-primary-a));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
[data-amount-value] {
|
|
149
|
+
flex: 1;
|
|
150
|
+
font-size: 16px;
|
|
151
|
+
font-weight: 400;
|
|
152
|
+
line-height: 24px;
|
|
153
|
+
color: var(--qonto-embed-content-color-primary, var(--content-primary-a));
|
|
154
|
+
text-align: right;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
[data-form-actions] {
|
|
158
|
+
display: flex;
|
|
159
|
+
gap: 12px;
|
|
160
|
+
justify-content: flex-start;
|
|
161
|
+
margin-top: 16px;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
[data-beneficiary-label] {
|
|
165
|
+
display: flex;
|
|
166
|
+
flex-direction: column;
|
|
167
|
+
gap: 0;
|
|
168
|
+
}
|
|
169
|
+
`;export{t as transferSummaryPageStyles};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{msg as e}from"../../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import"../../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{VOP_CHECK_RESULTS as o}from"../../../../common/constants.js";import{iconCheckmarkRoundedFilled as n}from"../../../customizable-components/icons/icon-checkmark-rounded-filled.js";import{iconWarning as a}from"../../../customizable-components/icons/icon-warning.js";function s(s){switch(s){case o.MATCH_RESULT_MATCH:return t`
|
|
2
|
+
<span data-vop-icon data-vop-success>
|
|
3
|
+
${n}
|
|
4
|
+
</span>
|
|
5
|
+
<span data-vop-text>${e("Match")}</span>
|
|
6
|
+
`;case o.MATCH_RESULT_CLOSE_MATCH:return t`
|
|
7
|
+
<span data-vop-icon data-vop-warning> ${a} </span>
|
|
8
|
+
<span data-vop-text>${e("Close match")}</span>
|
|
9
|
+
`;case o.MATCH_RESULT_NO_MATCH:return t`
|
|
10
|
+
<span data-vop-icon data-vop-warning> ${a} </span>
|
|
11
|
+
<span data-vop-text>${e("No match")}</span>
|
|
12
|
+
`;case o.MATCH_RESULT_NOT_POSSIBLE:default:return t`
|
|
13
|
+
<span data-vop-icon data-vop-warning> ${a} </span>
|
|
14
|
+
<span data-vop-text>${e("Not verified")}</span>
|
|
15
|
+
`}}export{s as getVopVerificationResultMarkup};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class e extends CustomEvent{constructor(e){super("recipient-info-submitted",{detail:e,bubbles:!0,composed:!0})}}class s extends CustomEvent{constructor(e){super("transfer-details-submitted",{detail:e,bubbles:!0,composed:!0})}}export{e as RecipientInfoSubmittedEvent,s as TransferDetailsSubmittedEvent};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as r}from"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as s}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as i}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{state as o}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";import{localized as a}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/localized-decorator.js";import"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{sepaTransferCreationStyles as n}from"./sepa-transfer-creation.styles.js";import{setLocale as l}from"../localize/configure-localization.js";import"./pages/beneficiary-selection-page.js";import"./pages/transfer-details-page.js";import"./pages/transfer-summary-page.js";import"./pages/transfer-success-page.js";import"./pages/transfer-error-page.js";import"../../customizable-components/styles/styles.css.js";import{sepaTransfers as c}from"../../../sepa-transfers/sepa-transfers.public-api.js";import{VOP_DECISIONS as m}from"../../../common/constants.js";const p={BENEFICIARY_SELECTION:"beneficiary-selection",TRANSFER_DETAILS:"transfer-details",TRANSFER_SUMMARY:"transfer-summary",TRANSFER_SUCCESS:"transfer-success",TRANSFER_ERROR:"transfer-error"};let f=class extends r{constructor(){super(...arguments),this.locale="en",this.currentPage=p.BENEFICIARY_SELECTION,this.formData={beneficiary:void 0,accountToDebit:void 0,amount:"",reference:""},this.isCreatingTransfer=!1,this.handleRecipientInfoSubmitted=async e=>{const t=e.detail;if(this.formData={...this.formData,beneficiary:t.beneficiary},!this.operationSettings)return console.error("operationSettings is required to create transfer"),void(this.transferError="Missing configuration. Please try again.");this.isCreatingTransfer=!0,this.transferError=void 0;try{this.currentPage=p.TRANSFER_DETAILS,this.transferCreationProcess=c.createSepaTransfer({sepaTransferSettings:{beneficiary:t.beneficiary},operationSettings:{...this.operationSettings,uiParentElementId:()=>{const e=document.querySelector("qonto-sepa-transfer-creation");return e?.shadowRoot?.getElementById("sca-container")}}});const e=await this.transferCreationProcess.next();this.vopResult=e.value}catch(e){console.error("Failed to start transfer creation:",e),this.transferError=e instanceof Error?e.message:"Failed to verify beneficiary. Please try again."}finally{this.isCreatingTransfer=!1}},this.handleTransferDetailsSubmitted=e=>{const t=e.detail;this.formData={...this.formData,accountToDebit:t.accountToDebit,amount:t.amount,reference:t.reference},this.currentPage=p.TRANSFER_SUMMARY},this.handleGoToStep=e=>{this.currentPage=e.detail.step},this.handleTransferConfirmed=async e=>{const t=e.detail;if(!this.transferCreationProcess||!this.formData.accountToDebit)return console.error("Transfer creation process not initialized"),void(this.transferError="Transfer process not initialized. Please try again.");this.isCreatingTransfer=!0,this.transferError=void 0;try{const e=parseFloat(t.amount);if(isNaN(e)||e<=0)throw new Error("Invalid transfer amount");const r=await this.transferCreationProcess.next({vopDecision:m.ACCEPT,sepaTransferSettings:{bankAccountId:this.formData.accountToDebit.id,amount:e,reference:t.reference}});r.value&&(this.dispatchEvent(new CustomEvent("sepa-transfer-created",{detail:r.value,bubbles:!0,composed:!0})),this.currentPage=p.TRANSFER_SUCCESS)}catch(e){this.transferError=e instanceof Error?e.message:"Failed to create transfer. Please try again.",this.currentPage=p.TRANSFER_ERROR}finally{this.isCreatingTransfer=!1}}}connectedCallback(){super.connectedCallback(),l(this.locale),this.addEventListener("recipient-info-submitted",this.handleRecipientInfoSubmitted),this.addEventListener("transfer-details-submitted",this.handleTransferDetailsSubmitted),this.addEventListener("go-to-step",this.handleGoToStep),this.addEventListener("transfer-confirmed",this.handleTransferConfirmed)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("recipient-info-submitted",this.handleRecipientInfoSubmitted),this.removeEventListener("transfer-details-submitted",this.handleTransferDetailsSubmitted),this.removeEventListener("go-to-step",this.handleGoToStep),this.removeEventListener("transfer-confirmed",this.handleTransferConfirmed)}updated(e){e.has("locale")&&l(this.locale)}render(){return t`
|
|
2
|
+
<div data-router-outlet>
|
|
3
|
+
<div id="sca-container" data-sca-modal></div>
|
|
4
|
+
${(()=>{switch(this.currentPage){case p.BENEFICIARY_SELECTION:return t`<qonto-beneficiary-selection-page
|
|
5
|
+
.operationSettings=${this.operationSettings}
|
|
6
|
+
.locale=${this.locale}
|
|
7
|
+
></qonto-beneficiary-selection-page>`;case p.TRANSFER_DETAILS:return t`<qonto-transfer-details-page
|
|
8
|
+
.locale=${this.locale}
|
|
9
|
+
.operationSettings=${this.operationSettings}
|
|
10
|
+
.beneficiary=${this.formData.beneficiary}
|
|
11
|
+
.accountToDebit=${this.formData.accountToDebit}
|
|
12
|
+
.transferAmount=${this.formData.amount}
|
|
13
|
+
.transferReference=${this.formData.reference}
|
|
14
|
+
.vopResult=${this.vopResult}
|
|
15
|
+
.isLoadingVop=${this.isCreatingTransfer}
|
|
16
|
+
></qonto-transfer-details-page>`;case p.TRANSFER_SUMMARY:return t`<qonto-transfer-summary-page
|
|
17
|
+
.locale=${this.locale}
|
|
18
|
+
.operationSettings=${this.operationSettings}
|
|
19
|
+
.beneficiary=${this.formData.beneficiary}
|
|
20
|
+
.accountToDebit=${this.formData.accountToDebit}
|
|
21
|
+
.transferAmount=${this.formData.amount}
|
|
22
|
+
.transferReference=${this.formData.reference}
|
|
23
|
+
.vopResult=${this.vopResult}
|
|
24
|
+
.isConfirming=${this.isCreatingTransfer}
|
|
25
|
+
.error=${this.transferError}
|
|
26
|
+
></qonto-transfer-summary-page>`;case p.TRANSFER_SUCCESS:return t`<qonto-transfer-success-page
|
|
27
|
+
.locale=${this.locale}
|
|
28
|
+
></qonto-transfer-success-page>`;case p.TRANSFER_ERROR:return t`<qonto-transfer-error-page
|
|
29
|
+
.locale=${this.locale}
|
|
30
|
+
></qonto-transfer-error-page>`}})()}
|
|
31
|
+
</div>
|
|
32
|
+
`}};f.styles=n,e([i({type:Object})],f.prototype,"operationSettings",void 0),e([i({type:String})],f.prototype,"locale",void 0),e([o()],f.prototype,"currentPage",void 0),e([o()],f.prototype,"formData",void 0),e([o()],f.prototype,"transferCreationProcess",void 0),e([o()],f.prototype,"vopResult",void 0),e([o()],f.prototype,"isCreatingTransfer",void 0),e([o()],f.prototype,"transferError",void 0),f=e([a(),s("qonto-sepa-transfer-creation")],f);export{p as SEPA_TRANSFER_PAGES,f as SepaTransferCreation};
|