@12-apps/payments-frontend 3.35.0 → 3.37.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/package.json +1 -1
- package/src/card/fields.tsx +33 -14
- package/src/components/checkout/card-view.tsx +19 -6
- package/src/components/checkout/cart-changed.tsx +24 -3
- package/src/components/checkout/checkout-flow.tsx +63 -79
- package/src/components/checkout/checkout-frame.tsx +175 -0
- package/src/components/checkout/checkout-steps.tsx +34 -66
- package/src/components/checkout/icons.tsx +5 -0
- package/src/components/checkout/method-tabs.tsx +249 -0
- package/src/components/checkout/payment-status-parts.tsx +13 -3
- package/src/components/checkout/payment-step-frame.tsx +206 -0
- package/src/components/checkout/payment-step-layout.tsx +169 -14
- package/src/components/checkout/payment-summary-phone.tsx +158 -0
- package/src/components/checkout/payment-summary.tsx +290 -0
- package/src/components/checkout/pix-after-copy.tsx +11 -4
- package/src/components/checkout/pix-pane.tsx +197 -161
- package/src/components/checkout/pix-parts.tsx +53 -5
- package/src/components/checkout/pix-view.tsx +37 -17
- package/src/components/checkout/screens-copy.ts +38 -3
- package/src/components/checkout/screens-en-US.ts +12 -0
- package/src/components/checkout/screens-pt-BR.ts +12 -0
- package/src/index.ts +2 -0
|
@@ -133,17 +133,22 @@ export interface PixPaneCopy {
|
|
|
133
133
|
preferCardAction: string;
|
|
134
134
|
/** The after-copy state's poll line. */
|
|
135
135
|
verifying: string;
|
|
136
|
-
/**
|
|
136
|
+
/** @deprecated Unread since FUT-3525, which took the narrow layout's Copia/QR tabs out. */
|
|
137
137
|
tabsLabel: string;
|
|
138
|
+
/** @deprecated Unread since FUT-3525 — see {@link PixPaneCopy.tabsLabel}. */
|
|
138
139
|
copyPasteTab: string;
|
|
140
|
+
/** @deprecated Unread since FUT-3525 — see {@link PixPaneCopy.tabsLabel}. */
|
|
139
141
|
qrTab: string;
|
|
140
|
-
/** The wide layout's two column headings
|
|
142
|
+
/** The wide layout's two column headings. */
|
|
141
143
|
qrHeading: string;
|
|
144
|
+
/** The phone's heading over the QR, under the code (FUT-3525). */
|
|
145
|
+
otherDeviceHeading: string;
|
|
142
146
|
copyPasteHeading: string;
|
|
147
|
+
/** @deprecated Unread since FUT-3525, which took the "ou" between the wide columns out. */
|
|
143
148
|
or: string;
|
|
144
149
|
/** Under the QR in the wide layout; `**…**` marks the bold span. */
|
|
145
150
|
qrInstructions: string;
|
|
146
|
-
/** Under the QR in the narrow layout
|
|
151
|
+
/** Under the QR in the narrow layout (a tab until FUT-3525, hence the name). */
|
|
147
152
|
qrTabCaption: string;
|
|
148
153
|
/** Under the copy button: narrow and wide. `**…**` marks the bold span. */
|
|
149
154
|
copyPasteHint: string;
|
|
@@ -279,6 +284,12 @@ export interface CartChangedCopy {
|
|
|
279
284
|
refreshAction: string;
|
|
280
285
|
/** The heading over a refresh that failed; the host's own sentence is the body. */
|
|
281
286
|
refreshFailed: string;
|
|
287
|
+
/**
|
|
288
|
+
* Drawn over a PIX's QR and code while they are veiled (FUT-3535): the code
|
|
289
|
+
* on screen asks for the old amount, so it cannot be copied or scanned until
|
|
290
|
+
* the payment is updated.
|
|
291
|
+
*/
|
|
292
|
+
pixVeil: string;
|
|
282
293
|
}
|
|
283
294
|
|
|
284
295
|
/** What the browser says when the wire itself failed. */
|
|
@@ -301,6 +312,29 @@ export interface CheckoutValidationCopy {
|
|
|
301
312
|
required: string;
|
|
302
313
|
}
|
|
303
314
|
|
|
315
|
+
/**
|
|
316
|
+
* The Pagamento step's own frame (FUT-3525): the order summary beside the
|
|
317
|
+
* payment on a computer, and the phone's header, total and pay bar.
|
|
318
|
+
*/
|
|
319
|
+
export interface PaymentLayoutCopy {
|
|
320
|
+
/** Over the method tabs on a computer. */
|
|
321
|
+
payHeading: string;
|
|
322
|
+
/** The summary card's title. */
|
|
323
|
+
summaryTitle: string;
|
|
324
|
+
/** The summary's and the pay bar's label over the amount. */
|
|
325
|
+
total: string;
|
|
326
|
+
/** The phone's caption over the big amount — "Total a pagar · 2 itens". */
|
|
327
|
+
totalDueCaption(items: number): string;
|
|
328
|
+
/** One cart line in the summary — "2× X-Burger". */
|
|
329
|
+
lineLabel(quantity: number, name: string): string;
|
|
330
|
+
/** The phone's payer chip, for a CPF the store already holds — "CPF ✓". A typed one is shown masked. */
|
|
331
|
+
taxIdOnFileShort: string;
|
|
332
|
+
/** The address control's accessible name; its visible word is {@link PayerSummaryCopy.changeAction}. */
|
|
333
|
+
changeAddress: string;
|
|
334
|
+
/** The phone's step line — "Etapa 2 de 3 · Pagamento". */
|
|
335
|
+
stepProgress(step: number, steps: number, label: string): string;
|
|
336
|
+
}
|
|
337
|
+
|
|
304
338
|
/** Everything above, in the shape the checkout context carries. */
|
|
305
339
|
export interface CheckoutScreensCopy {
|
|
306
340
|
method: MethodPickerCopy;
|
|
@@ -308,6 +342,7 @@ export interface CheckoutScreensCopy {
|
|
|
308
342
|
pix: PixPaneCopy;
|
|
309
343
|
card: CardPaneCopy;
|
|
310
344
|
payer: PayerSummaryCopy;
|
|
345
|
+
layout: PaymentLayoutCopy;
|
|
311
346
|
error: PaymentErrorCopy;
|
|
312
347
|
wallet: WalletCopy;
|
|
313
348
|
hosted: HostedHandoverCopy;
|
|
@@ -54,6 +54,7 @@ export const EN_US_CHECKOUT_SCREENS_COPY: CheckoutScreensCopy = {
|
|
|
54
54
|
copyPasteTab: 'Copy and paste',
|
|
55
55
|
qrTab: 'QR code',
|
|
56
56
|
qrHeading: 'On your phone',
|
|
57
|
+
otherDeviceHeading: 'Or pay from another device',
|
|
57
58
|
copyPasteHeading: 'Pix copy and paste',
|
|
58
59
|
or: 'or',
|
|
59
60
|
qrInstructions: 'Open your banking app on your phone, choose **Pix › Scan QR code** and point it at the screen.',
|
|
@@ -99,6 +100,16 @@ export const EN_US_CHECKOUT_SCREENS_COPY: CheckoutScreensCopy = {
|
|
|
99
100
|
payingWithSavedDetails: 'Paying with your saved details',
|
|
100
101
|
changeAction: 'Change',
|
|
101
102
|
},
|
|
103
|
+
layout: {
|
|
104
|
+
payHeading: 'How would you like to pay?',
|
|
105
|
+
summaryTitle: 'Order summary',
|
|
106
|
+
total: 'Total',
|
|
107
|
+
totalDueCaption: (items) => `Total due · ${items} ${items === 1 ? 'item' : 'items'}`,
|
|
108
|
+
lineLabel: (quantity, name) => `${quantity}× ${name}`,
|
|
109
|
+
taxIdOnFileShort: 'CPF ✓',
|
|
110
|
+
changeAddress: 'Change address',
|
|
111
|
+
stepProgress: (step, steps, label) => `Step ${step} of ${steps} · ${label}`,
|
|
112
|
+
},
|
|
102
113
|
error: {
|
|
103
114
|
confirming: 'We are confirming your payment',
|
|
104
115
|
cannotContinue: 'Could not continue',
|
|
@@ -148,6 +159,7 @@ export const EN_US_CHECKOUT_SCREENS_COPY: CheckoutScreensCopy = {
|
|
|
148
159
|
support: 'This payment was prepared for your previous cart. Update it to pay the right amount.',
|
|
149
160
|
refreshAction: 'Update payment',
|
|
150
161
|
refreshFailed: 'Could not update the payment',
|
|
162
|
+
pixVeil: 'Update to get a new Pix code',
|
|
151
163
|
},
|
|
152
164
|
validation: {
|
|
153
165
|
taxIdInvalid: 'That CPF is not valid.',
|
|
@@ -43,6 +43,7 @@ export const PT_BR_CHECKOUT_SCREENS_COPY: CheckoutScreensCopy = {
|
|
|
43
43
|
copyPasteTab: 'Copia e cola',
|
|
44
44
|
qrTab: 'QR code',
|
|
45
45
|
qrHeading: 'Pelo celular',
|
|
46
|
+
otherDeviceHeading: 'Ou pague de outro aparelho',
|
|
46
47
|
copyPasteHeading: 'Pix Copia e Cola',
|
|
47
48
|
or: 'ou',
|
|
48
49
|
qrInstructions: 'Abra o app do seu banco no celular, escolha **Pix › Ler QR code** e aponte para a tela.',
|
|
@@ -88,6 +89,16 @@ export const PT_BR_CHECKOUT_SCREENS_COPY: CheckoutScreensCopy = {
|
|
|
88
89
|
payingWithSavedDetails: 'Pagando com os seus dados salvos',
|
|
89
90
|
changeAction: 'Alterar',
|
|
90
91
|
},
|
|
92
|
+
layout: {
|
|
93
|
+
payHeading: 'Como você quer pagar?',
|
|
94
|
+
summaryTitle: 'Resumo do pedido',
|
|
95
|
+
total: 'Total',
|
|
96
|
+
totalDueCaption: (items) => `Total a pagar · ${items} ${items === 1 ? 'item' : 'itens'}`,
|
|
97
|
+
lineLabel: (quantity, name) => `${quantity}× ${name}`,
|
|
98
|
+
taxIdOnFileShort: 'CPF ✓',
|
|
99
|
+
changeAddress: 'Alterar endereço',
|
|
100
|
+
stepProgress: (step, steps, label) => `Etapa ${step} de ${steps} · ${label}`,
|
|
101
|
+
},
|
|
91
102
|
error: {
|
|
92
103
|
confirming: 'Estamos confirmando seu pagamento',
|
|
93
104
|
cannotContinue: 'Não foi possível continuar',
|
|
@@ -134,6 +145,7 @@ export const PT_BR_CHECKOUT_SCREENS_COPY: CheckoutScreensCopy = {
|
|
|
134
145
|
support: 'O pagamento foi preparado para o carrinho anterior. Atualize para pagar o valor certo.',
|
|
135
146
|
refreshAction: 'Atualizar pagamento',
|
|
136
147
|
refreshFailed: 'Não foi possível atualizar o pagamento',
|
|
148
|
+
pixVeil: 'Atualize para gerar um novo Pix',
|
|
137
149
|
},
|
|
138
150
|
validation: {
|
|
139
151
|
taxIdInvalid: 'CPF inválido.',
|
package/src/index.ts
CHANGED
|
@@ -60,6 +60,7 @@ export {
|
|
|
60
60
|
type CheckoutFlowProps,
|
|
61
61
|
} from './components/checkout/checkout-flow';
|
|
62
62
|
export type { BackActionEmphasis } from './components/checkout/payment-status-parts';
|
|
63
|
+
export type { CheckoutDeliverySummary, CheckoutSummaryLine } from './components/checkout/payment-summary';
|
|
63
64
|
|
|
64
65
|
// ---------------------------------------------------------------------------
|
|
65
66
|
// The MOUNTED buyer checkout (FUT-741) and the checkout PIPELINE (FUT-1240).
|
|
@@ -126,6 +127,7 @@ export type {
|
|
|
126
127
|
MethodPickerCopy,
|
|
127
128
|
PayerSummaryCopy,
|
|
128
129
|
PaymentErrorCopy,
|
|
130
|
+
PaymentLayoutCopy,
|
|
129
131
|
PixAfterCopyCopy,
|
|
130
132
|
PixPaneCopy,
|
|
131
133
|
SettlingCopy,
|