@spare-technologies/spare-link 0.1.0-beta.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/CHANGELOG.md +66 -0
- package/LICENSE +21 -0
- package/README.md +173 -0
- package/assets/fonts/MetroSans-Bold.otf +0 -0
- package/assets/fonts/MetroSans-Light.otf +0 -0
- package/assets/fonts/MetroSans-Medium.otf +0 -0
- package/assets/fonts/MetroSans-Regular.otf +0 -0
- package/assets/fonts/MetroSans-SemiBold.otf +0 -0
- package/assets/images/altareq_logo_mini.png +0 -0
- package/assets/images/altareq_logo_transparent_bg.png +0 -0
- package/assets/images/altareq_logo_white_bg.png +0 -0
- package/assets/images/spare_logo.png +0 -0
- package/lib/commonjs/core/client/link-api-client.js +297 -0
- package/lib/commonjs/core/client/link-api-client.js.map +1 -0
- package/lib/commonjs/core/errors/payment-api-error.js +35 -0
- package/lib/commonjs/core/errors/payment-api-error.js.map +1 -0
- package/lib/commonjs/core/models/index.js +2 -0
- package/lib/commonjs/core/models/index.js.map +1 -0
- package/lib/commonjs/core/models/link-session-status.js +14 -0
- package/lib/commonjs/core/models/link-session-status.js.map +1 -0
- package/lib/commonjs/core/models/payment-return-params.js +42 -0
- package/lib/commonjs/core/models/payment-return-params.js.map +1 -0
- package/lib/commonjs/core/models/payment-type.js +45 -0
- package/lib/commonjs/core/models/payment-type.js.map +1 -0
- package/lib/commonjs/core/models/wire-mappers.js +277 -0
- package/lib/commonjs/core/models/wire-mappers.js.map +1 -0
- package/lib/commonjs/core/services/consent-presenter.js +150 -0
- package/lib/commonjs/core/services/consent-presenter.js.map +1 -0
- package/lib/commonjs/core/services/execute-resume-if-needed.js +216 -0
- package/lib/commonjs/core/services/execute-resume-if-needed.js.map +1 -0
- package/lib/commonjs/core/services/multi-payment-rules-presenter.js +151 -0
- package/lib/commonjs/core/services/multi-payment-rules-presenter.js.map +1 -0
- package/lib/commonjs/core/services/payment-flow-controller.js +547 -0
- package/lib/commonjs/core/services/payment-flow-controller.js.map +1 -0
- package/lib/commonjs/core/services/payment-flow-state.js +110 -0
- package/lib/commonjs/core/services/payment-flow-state.js.map +1 -0
- package/lib/commonjs/core/services/payment-result-mapper.js +49 -0
- package/lib/commonjs/core/services/payment-result-mapper.js.map +1 -0
- package/lib/commonjs/core/services/pending-session-store.js +6 -0
- package/lib/commonjs/core/services/pending-session-store.js.map +1 -0
- package/lib/commonjs/core/services/presentation-utils.js +11 -0
- package/lib/commonjs/core/services/presentation-utils.js.map +1 -0
- package/lib/commonjs/core/services/redirect-buffer.js +40 -0
- package/lib/commonjs/core/services/redirect-buffer.js.map +1 -0
- package/lib/commonjs/core/services/user-friendly-messages.js +46 -0
- package/lib/commonjs/core/services/user-friendly-messages.js.map +1 -0
- package/lib/commonjs/index.js +294 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/internal/bank-redirect.js +53 -0
- package/lib/commonjs/internal/bank-redirect.js.map +1 -0
- package/lib/commonjs/internal/deep-link-listener.js +39 -0
- package/lib/commonjs/internal/deep-link-listener.js.map +1 -0
- package/lib/commonjs/internal/event-emitter.js +36 -0
- package/lib/commonjs/internal/event-emitter.js.map +1 -0
- package/lib/commonjs/internal/index.js +34 -0
- package/lib/commonjs/internal/index.js.map +1 -0
- package/lib/commonjs/internal/logger.js +67 -0
- package/lib/commonjs/internal/logger.js.map +1 -0
- package/lib/commonjs/internal/redact-uri.js +25 -0
- package/lib/commonjs/internal/redact-uri.js.map +1 -0
- package/lib/commonjs/internal/secure-store-pending-session-store.js +92 -0
- package/lib/commonjs/internal/secure-store-pending-session-store.js.map +1 -0
- package/lib/commonjs/internal/telemetry-collector.js +80 -0
- package/lib/commonjs/internal/telemetry-collector.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/public/constants.js +21 -0
- package/lib/commonjs/public/constants.js.map +1 -0
- package/lib/commonjs/public/index.js +152 -0
- package/lib/commonjs/public/index.js.map +1 -0
- package/lib/commonjs/public/payment-result.js +48 -0
- package/lib/commonjs/public/payment-result.js.map +1 -0
- package/lib/commonjs/public/recovery-result.js +40 -0
- package/lib/commonjs/public/recovery-result.js.map +1 -0
- package/lib/commonjs/public/spare-link-callbacks.js +6 -0
- package/lib/commonjs/public/spare-link-callbacks.js.map +1 -0
- package/lib/commonjs/public/spare-link-config.js +62 -0
- package/lib/commonjs/public/spare-link-config.js.map +1 -0
- package/lib/commonjs/public/spare-link-event.js +120 -0
- package/lib/commonjs/public/spare-link-event.js.map +1 -0
- package/lib/commonjs/public/spare-link-host-api.js +6 -0
- package/lib/commonjs/public/spare-link-host-api.js.map +1 -0
- package/lib/commonjs/public/spare-link-instance.js +285 -0
- package/lib/commonjs/public/spare-link-instance.js.map +1 -0
- package/lib/commonjs/public/spare-link-session.js +26 -0
- package/lib/commonjs/public/spare-link-session.js.map +1 -0
- package/lib/commonjs/public/spare-link.js +31 -0
- package/lib/commonjs/public/spare-link.js.map +1 -0
- package/lib/commonjs/ui/consent/charge-bearer-display.js +99 -0
- package/lib/commonjs/ui/consent/charge-bearer-display.js.map +1 -0
- package/lib/commonjs/ui/consent/consent-accordion.js +94 -0
- package/lib/commonjs/ui/consent/consent-accordion.js.map +1 -0
- package/lib/commonjs/ui/consent/consent-summary-section.js +27 -0
- package/lib/commonjs/ui/consent/consent-summary-section.js.map +1 -0
- package/lib/commonjs/ui/consent/cop-information.js +168 -0
- package/lib/commonjs/ui/consent/cop-information.js.map +1 -0
- package/lib/commonjs/ui/consent/international-payment-summary.js +98 -0
- package/lib/commonjs/ui/consent/international-payment-summary.js.map +1 -0
- package/lib/commonjs/ui/consent/label-value-rows.js +59 -0
- package/lib/commonjs/ui/consent/label-value-rows.js.map +1 -0
- package/lib/commonjs/ui/consent/multi-payment-rules-list.js +130 -0
- package/lib/commonjs/ui/consent/multi-payment-rules-list.js.map +1 -0
- package/lib/commonjs/ui/consent/multi-payment-summary.js +99 -0
- package/lib/commonjs/ui/consent/multi-payment-summary.js.map +1 -0
- package/lib/commonjs/ui/consent/single-payment-summary.js +158 -0
- package/lib/commonjs/ui/consent/single-payment-summary.js.map +1 -0
- package/lib/commonjs/ui/consent/terms-link.js +35 -0
- package/lib/commonjs/ui/consent/terms-link.js.map +1 -0
- package/lib/commonjs/ui/hooks/use-payment-flow-state.js +16 -0
- package/lib/commonjs/ui/hooks/use-payment-flow-state.js.map +1 -0
- package/lib/commonjs/ui/payment-flow-page.js +235 -0
- package/lib/commonjs/ui/payment-flow-page.js.map +1 -0
- package/lib/commonjs/ui/screens/bank-selection-screen.js +215 -0
- package/lib/commonjs/ui/screens/bank-selection-screen.js.map +1 -0
- package/lib/commonjs/ui/screens/consent-details-screen.js +124 -0
- package/lib/commonjs/ui/screens/consent-details-screen.js.map +1 -0
- package/lib/commonjs/ui/screens/index.js +48 -0
- package/lib/commonjs/ui/screens/index.js.map +1 -0
- package/lib/commonjs/ui/screens/mandate-setup-success-screen.js +79 -0
- package/lib/commonjs/ui/screens/mandate-setup-success-screen.js.map +1 -0
- package/lib/commonjs/ui/screens/redirect-handoff-screen.js +42 -0
- package/lib/commonjs/ui/screens/redirect-handoff-screen.js.map +1 -0
- package/lib/commonjs/ui/screens/result-screen.js +83 -0
- package/lib/commonjs/ui/screens/result-screen.js.map +1 -0
- package/lib/commonjs/ui/screens/resume-processing-screen.js +109 -0
- package/lib/commonjs/ui/screens/resume-processing-screen.js.map +1 -0
- package/lib/commonjs/ui/spare-link-host.js +354 -0
- package/lib/commonjs/ui/spare-link-host.js.map +1 -0
- package/lib/commonjs/ui/theme/assets.js +20 -0
- package/lib/commonjs/ui/theme/assets.js.map +1 -0
- package/lib/commonjs/ui/theme/colors.js +36 -0
- package/lib/commonjs/ui/theme/colors.js.map +1 -0
- package/lib/commonjs/ui/theme/fonts.js +29 -0
- package/lib/commonjs/ui/theme/fonts.js.map +1 -0
- package/lib/commonjs/ui/theme/index.js +53 -0
- package/lib/commonjs/ui/theme/index.js.map +1 -0
- package/lib/commonjs/ui/theme/typography.js +76 -0
- package/lib/commonjs/ui/theme/typography.js.map +1 -0
- package/lib/commonjs/ui/widgets/footer.js +144 -0
- package/lib/commonjs/ui/widgets/footer.js.map +1 -0
- package/lib/commonjs/ui/widgets/gradient-spinner.js +172 -0
- package/lib/commonjs/ui/widgets/gradient-spinner.js.map +1 -0
- package/lib/commonjs/ui/widgets/handoff-screen-layout.js +77 -0
- package/lib/commonjs/ui/widgets/handoff-screen-layout.js.map +1 -0
- package/lib/commonjs/ui/widgets/index.js +41 -0
- package/lib/commonjs/ui/widgets/index.js.map +1 -0
- package/lib/commonjs/ui/widgets/layout-w-header.js +106 -0
- package/lib/commonjs/ui/widgets/layout-w-header.js.map +1 -0
- package/lib/commonjs/ui/widgets/modal-dismiss-button.js +47 -0
- package/lib/commonjs/ui/widgets/modal-dismiss-button.js.map +1 -0
- package/lib/commonjs/ui/widgets/stepper.js +124 -0
- package/lib/commonjs/ui/widgets/stepper.js.map +1 -0
- package/lib/commonjs/version.js +14 -0
- package/lib/commonjs/version.js.map +1 -0
- package/lib/module/core/client/link-api-client.js +292 -0
- package/lib/module/core/client/link-api-client.js.map +1 -0
- package/lib/module/core/errors/payment-api-error.js +29 -0
- package/lib/module/core/errors/payment-api-error.js.map +1 -0
- package/lib/module/core/models/index.js +2 -0
- package/lib/module/core/models/index.js.map +1 -0
- package/lib/module/core/models/link-session-status.js +10 -0
- package/lib/module/core/models/link-session-status.js.map +1 -0
- package/lib/module/core/models/payment-return-params.js +37 -0
- package/lib/module/core/models/payment-return-params.js.map +1 -0
- package/lib/module/core/models/payment-type.js +36 -0
- package/lib/module/core/models/payment-type.js.map +1 -0
- package/lib/module/core/models/wire-mappers.js +263 -0
- package/lib/module/core/models/wire-mappers.js.map +1 -0
- package/lib/module/core/services/consent-presenter.js +140 -0
- package/lib/module/core/services/consent-presenter.js.map +1 -0
- package/lib/module/core/services/execute-resume-if-needed.js +211 -0
- package/lib/module/core/services/execute-resume-if-needed.js.map +1 -0
- package/lib/module/core/services/multi-payment-rules-presenter.js +146 -0
- package/lib/module/core/services/multi-payment-rules-presenter.js.map +1 -0
- package/lib/module/core/services/payment-flow-controller.js +544 -0
- package/lib/module/core/services/payment-flow-controller.js.map +1 -0
- package/lib/module/core/services/payment-flow-state.js +106 -0
- package/lib/module/core/services/payment-flow-state.js.map +1 -0
- package/lib/module/core/services/payment-result-mapper.js +45 -0
- package/lib/module/core/services/payment-result-mapper.js.map +1 -0
- package/lib/module/core/services/pending-session-store.js +4 -0
- package/lib/module/core/services/pending-session-store.js.map +1 -0
- package/lib/module/core/services/presentation-utils.js +7 -0
- package/lib/module/core/services/presentation-utils.js.map +1 -0
- package/lib/module/core/services/redirect-buffer.js +33 -0
- package/lib/module/core/services/redirect-buffer.js.map +1 -0
- package/lib/module/core/services/user-friendly-messages.js +42 -0
- package/lib/module/core/services/user-friendly-messages.js.map +1 -0
- package/lib/module/index.js +40 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/internal/bank-redirect.js +49 -0
- package/lib/module/internal/bank-redirect.js.map +1 -0
- package/lib/module/internal/deep-link-listener.js +34 -0
- package/lib/module/internal/deep-link-listener.js.map +1 -0
- package/lib/module/internal/event-emitter.js +32 -0
- package/lib/module/internal/event-emitter.js.map +1 -0
- package/lib/module/internal/index.js +7 -0
- package/lib/module/internal/index.js.map +1 -0
- package/lib/module/internal/logger.js +61 -0
- package/lib/module/internal/logger.js.map +1 -0
- package/lib/module/internal/redact-uri.js +21 -0
- package/lib/module/internal/redact-uri.js.map +1 -0
- package/lib/module/internal/secure-store-pending-session-store.js +88 -0
- package/lib/module/internal/secure-store-pending-session-store.js.map +1 -0
- package/lib/module/internal/telemetry-collector.js +75 -0
- package/lib/module/internal/telemetry-collector.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/public/constants.js +17 -0
- package/lib/module/public/constants.js.map +1 -0
- package/lib/module/public/index.js +11 -0
- package/lib/module/public/index.js.map +1 -0
- package/lib/module/public/payment-result.js +41 -0
- package/lib/module/public/payment-result.js.map +1 -0
- package/lib/module/public/recovery-result.js +34 -0
- package/lib/module/public/recovery-result.js.map +1 -0
- package/lib/module/public/spare-link-callbacks.js +4 -0
- package/lib/module/public/spare-link-callbacks.js.map +1 -0
- package/lib/module/public/spare-link-config.js +54 -0
- package/lib/module/public/spare-link-config.js.map +1 -0
- package/lib/module/public/spare-link-event.js +115 -0
- package/lib/module/public/spare-link-event.js.map +1 -0
- package/lib/module/public/spare-link-host-api.js +4 -0
- package/lib/module/public/spare-link-host-api.js.map +1 -0
- package/lib/module/public/spare-link-instance.js +273 -0
- package/lib/module/public/spare-link-instance.js.map +1 -0
- package/lib/module/public/spare-link-session.js +21 -0
- package/lib/module/public/spare-link-session.js.map +1 -0
- package/lib/module/public/spare-link.js +4 -0
- package/lib/module/public/spare-link.js.map +1 -0
- package/lib/module/ui/consent/charge-bearer-display.js +95 -0
- package/lib/module/ui/consent/charge-bearer-display.js.map +1 -0
- package/lib/module/ui/consent/consent-accordion.js +90 -0
- package/lib/module/ui/consent/consent-accordion.js.map +1 -0
- package/lib/module/ui/consent/consent-summary-section.js +23 -0
- package/lib/module/ui/consent/consent-summary-section.js.map +1 -0
- package/lib/module/ui/consent/cop-information.js +165 -0
- package/lib/module/ui/consent/cop-information.js.map +1 -0
- package/lib/module/ui/consent/international-payment-summary.js +94 -0
- package/lib/module/ui/consent/international-payment-summary.js.map +1 -0
- package/lib/module/ui/consent/label-value-rows.js +55 -0
- package/lib/module/ui/consent/label-value-rows.js.map +1 -0
- package/lib/module/ui/consent/multi-payment-rules-list.js +125 -0
- package/lib/module/ui/consent/multi-payment-rules-list.js.map +1 -0
- package/lib/module/ui/consent/multi-payment-summary.js +95 -0
- package/lib/module/ui/consent/multi-payment-summary.js.map +1 -0
- package/lib/module/ui/consent/single-payment-summary.js +154 -0
- package/lib/module/ui/consent/single-payment-summary.js.map +1 -0
- package/lib/module/ui/consent/terms-link.js +31 -0
- package/lib/module/ui/consent/terms-link.js.map +1 -0
- package/lib/module/ui/hooks/use-payment-flow-state.js +12 -0
- package/lib/module/ui/hooks/use-payment-flow-state.js.map +1 -0
- package/lib/module/ui/payment-flow-page.js +232 -0
- package/lib/module/ui/payment-flow-page.js.map +1 -0
- package/lib/module/ui/screens/bank-selection-screen.js +211 -0
- package/lib/module/ui/screens/bank-selection-screen.js.map +1 -0
- package/lib/module/ui/screens/consent-details-screen.js +120 -0
- package/lib/module/ui/screens/consent-details-screen.js.map +1 -0
- package/lib/module/ui/screens/index.js +9 -0
- package/lib/module/ui/screens/index.js.map +1 -0
- package/lib/module/ui/screens/mandate-setup-success-screen.js +75 -0
- package/lib/module/ui/screens/mandate-setup-success-screen.js.map +1 -0
- package/lib/module/ui/screens/redirect-handoff-screen.js +39 -0
- package/lib/module/ui/screens/redirect-handoff-screen.js.map +1 -0
- package/lib/module/ui/screens/result-screen.js +79 -0
- package/lib/module/ui/screens/result-screen.js.map +1 -0
- package/lib/module/ui/screens/resume-processing-screen.js +105 -0
- package/lib/module/ui/screens/resume-processing-screen.js.map +1 -0
- package/lib/module/ui/spare-link-host.js +350 -0
- package/lib/module/ui/spare-link-host.js.map +1 -0
- package/lib/module/ui/theme/assets.js +16 -0
- package/lib/module/ui/theme/assets.js.map +1 -0
- package/lib/module/ui/theme/colors.js +32 -0
- package/lib/module/ui/theme/colors.js.map +1 -0
- package/lib/module/ui/theme/fonts.js +23 -0
- package/lib/module/ui/theme/fonts.js.map +1 -0
- package/lib/module/ui/theme/index.js +13 -0
- package/lib/module/ui/theme/index.js.map +1 -0
- package/lib/module/ui/theme/typography.js +49 -0
- package/lib/module/ui/theme/typography.js.map +1 -0
- package/lib/module/ui/widgets/footer.js +140 -0
- package/lib/module/ui/widgets/footer.js.map +1 -0
- package/lib/module/ui/widgets/gradient-spinner.js +168 -0
- package/lib/module/ui/widgets/gradient-spinner.js.map +1 -0
- package/lib/module/ui/widgets/handoff-screen-layout.js +73 -0
- package/lib/module/ui/widgets/handoff-screen-layout.js.map +1 -0
- package/lib/module/ui/widgets/index.js +8 -0
- package/lib/module/ui/widgets/index.js.map +1 -0
- package/lib/module/ui/widgets/layout-w-header.js +102 -0
- package/lib/module/ui/widgets/layout-w-header.js.map +1 -0
- package/lib/module/ui/widgets/modal-dismiss-button.js +43 -0
- package/lib/module/ui/widgets/modal-dismiss-button.js.map +1 -0
- package/lib/module/ui/widgets/stepper.js +120 -0
- package/lib/module/ui/widgets/stepper.js.map +1 -0
- package/lib/module/version.js +10 -0
- package/lib/module/version.js.map +1 -0
- package/lib/typescript/commonjs/core/client/link-api-client.d.ts +70 -0
- package/lib/typescript/commonjs/core/client/link-api-client.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/errors/payment-api-error.d.ts +15 -0
- package/lib/typescript/commonjs/core/errors/payment-api-error.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/models/index.d.ts +124 -0
- package/lib/typescript/commonjs/core/models/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/models/link-session-status.d.ts +6 -0
- package/lib/typescript/commonjs/core/models/link-session-status.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/models/payment-return-params.d.ts +15 -0
- package/lib/typescript/commonjs/core/models/payment-return-params.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/models/payment-type.d.ts +18 -0
- package/lib/typescript/commonjs/core/models/payment-type.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/models/wire-mappers.d.ts +19 -0
- package/lib/typescript/commonjs/core/models/wire-mappers.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/services/consent-presenter.d.ts +67 -0
- package/lib/typescript/commonjs/core/services/consent-presenter.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/services/execute-resume-if-needed.d.ts +32 -0
- package/lib/typescript/commonjs/core/services/execute-resume-if-needed.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/services/multi-payment-rules-presenter.d.ts +9 -0
- package/lib/typescript/commonjs/core/services/multi-payment-rules-presenter.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/services/payment-flow-controller.d.ts +146 -0
- package/lib/typescript/commonjs/core/services/payment-flow-controller.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/services/payment-flow-state.d.ts +64 -0
- package/lib/typescript/commonjs/core/services/payment-flow-state.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/services/payment-result-mapper.d.ts +5 -0
- package/lib/typescript/commonjs/core/services/payment-result-mapper.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/services/pending-session-store.d.ts +12 -0
- package/lib/typescript/commonjs/core/services/pending-session-store.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/services/presentation-utils.d.ts +5 -0
- package/lib/typescript/commonjs/core/services/presentation-utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/services/redirect-buffer.d.ts +6 -0
- package/lib/typescript/commonjs/core/services/redirect-buffer.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/services/user-friendly-messages.d.ts +6 -0
- package/lib/typescript/commonjs/core/services/user-friendly-messages.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +19 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/internal/bank-redirect.d.ts +6 -0
- package/lib/typescript/commonjs/internal/bank-redirect.d.ts.map +1 -0
- package/lib/typescript/commonjs/internal/deep-link-listener.d.ts +3 -0
- package/lib/typescript/commonjs/internal/deep-link-listener.d.ts.map +1 -0
- package/lib/typescript/commonjs/internal/event-emitter.d.ts +13 -0
- package/lib/typescript/commonjs/internal/event-emitter.d.ts.map +1 -0
- package/lib/typescript/commonjs/internal/index.d.ts +5 -0
- package/lib/typescript/commonjs/internal/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/internal/logger.d.ts +23 -0
- package/lib/typescript/commonjs/internal/logger.d.ts.map +1 -0
- package/lib/typescript/commonjs/internal/redact-uri.d.ts +3 -0
- package/lib/typescript/commonjs/internal/redact-uri.d.ts.map +1 -0
- package/lib/typescript/commonjs/internal/secure-store-pending-session-store.d.ts +33 -0
- package/lib/typescript/commonjs/internal/secure-store-pending-session-store.d.ts.map +1 -0
- package/lib/typescript/commonjs/internal/telemetry-collector.d.ts +2 -0
- package/lib/typescript/commonjs/internal/telemetry-collector.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/public/constants.d.ts +12 -0
- package/lib/typescript/commonjs/public/constants.d.ts.map +1 -0
- package/lib/typescript/commonjs/public/index.d.ts +11 -0
- package/lib/typescript/commonjs/public/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/public/payment-result.d.ts +43 -0
- package/lib/typescript/commonjs/public/payment-result.d.ts.map +1 -0
- package/lib/typescript/commonjs/public/recovery-result.d.ts +36 -0
- package/lib/typescript/commonjs/public/recovery-result.d.ts.map +1 -0
- package/lib/typescript/commonjs/public/spare-link-callbacks.d.ts +14 -0
- package/lib/typescript/commonjs/public/spare-link-callbacks.d.ts.map +1 -0
- package/lib/typescript/commonjs/public/spare-link-config.d.ts +49 -0
- package/lib/typescript/commonjs/public/spare-link-config.d.ts.map +1 -0
- package/lib/typescript/commonjs/public/spare-link-event.d.ts +90 -0
- package/lib/typescript/commonjs/public/spare-link-event.d.ts.map +1 -0
- package/lib/typescript/commonjs/public/spare-link-host-api.d.ts +29 -0
- package/lib/typescript/commonjs/public/spare-link-host-api.d.ts.map +1 -0
- package/lib/typescript/commonjs/public/spare-link-instance.d.ts +89 -0
- package/lib/typescript/commonjs/public/spare-link-instance.d.ts.map +1 -0
- package/lib/typescript/commonjs/public/spare-link-session.d.ts +20 -0
- package/lib/typescript/commonjs/public/spare-link-session.d.ts.map +1 -0
- package/lib/typescript/commonjs/public/spare-link.d.ts +3 -0
- package/lib/typescript/commonjs/public/spare-link.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/consent/charge-bearer-display.d.ts +5 -0
- package/lib/typescript/commonjs/ui/consent/charge-bearer-display.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/consent/consent-accordion.d.ts +10 -0
- package/lib/typescript/commonjs/ui/consent/consent-accordion.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/consent/consent-summary-section.d.ts +6 -0
- package/lib/typescript/commonjs/ui/consent/consent-summary-section.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/consent/cop-information.d.ts +6 -0
- package/lib/typescript/commonjs/ui/consent/cop-information.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/consent/international-payment-summary.d.ts +6 -0
- package/lib/typescript/commonjs/ui/consent/international-payment-summary.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/consent/label-value-rows.d.ts +10 -0
- package/lib/typescript/commonjs/ui/consent/label-value-rows.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/consent/multi-payment-rules-list.d.ts +15 -0
- package/lib/typescript/commonjs/ui/consent/multi-payment-rules-list.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/consent/multi-payment-summary.d.ts +6 -0
- package/lib/typescript/commonjs/ui/consent/multi-payment-summary.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/consent/single-payment-summary.d.ts +6 -0
- package/lib/typescript/commonjs/ui/consent/single-payment-summary.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/consent/terms-link.d.ts +2 -0
- package/lib/typescript/commonjs/ui/consent/terms-link.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/use-payment-flow-state.d.ts +9 -0
- package/lib/typescript/commonjs/ui/hooks/use-payment-flow-state.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/payment-flow-page.d.ts +20 -0
- package/lib/typescript/commonjs/ui/payment-flow-page.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/bank-selection-screen.d.ts +15 -0
- package/lib/typescript/commonjs/ui/screens/bank-selection-screen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/consent-details-screen.d.ts +13 -0
- package/lib/typescript/commonjs/ui/screens/consent-details-screen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/index.d.ts +7 -0
- package/lib/typescript/commonjs/ui/screens/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/mandate-setup-success-screen.d.ts +10 -0
- package/lib/typescript/commonjs/ui/screens/mandate-setup-success-screen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/redirect-handoff-screen.d.ts +3 -0
- package/lib/typescript/commonjs/ui/screens/redirect-handoff-screen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/result-screen.d.ts +7 -0
- package/lib/typescript/commonjs/ui/screens/result-screen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/resume-processing-screen.d.ts +10 -0
- package/lib/typescript/commonjs/ui/screens/resume-processing-screen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/spare-link-host.d.ts +23 -0
- package/lib/typescript/commonjs/ui/spare-link-host.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/theme/assets.d.ts +15 -0
- package/lib/typescript/commonjs/ui/theme/assets.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/theme/colors.d.ts +31 -0
- package/lib/typescript/commonjs/ui/theme/colors.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/theme/fonts.d.ts +12 -0
- package/lib/typescript/commonjs/ui/theme/fonts.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/theme/index.d.ts +11 -0
- package/lib/typescript/commonjs/ui/theme/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/theme/typography.d.ts +12 -0
- package/lib/typescript/commonjs/ui/theme/typography.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/widgets/footer.d.ts +23 -0
- package/lib/typescript/commonjs/ui/widgets/footer.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/widgets/gradient-spinner.d.ts +13 -0
- package/lib/typescript/commonjs/ui/widgets/gradient-spinner.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/widgets/handoff-screen-layout.d.ts +11 -0
- package/lib/typescript/commonjs/ui/widgets/handoff-screen-layout.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/widgets/index.d.ts +6 -0
- package/lib/typescript/commonjs/ui/widgets/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/widgets/layout-w-header.d.ts +20 -0
- package/lib/typescript/commonjs/ui/widgets/layout-w-header.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/widgets/modal-dismiss-button.d.ts +6 -0
- package/lib/typescript/commonjs/ui/widgets/modal-dismiss-button.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/widgets/stepper.d.ts +15 -0
- package/lib/typescript/commonjs/ui/widgets/stepper.d.ts.map +1 -0
- package/lib/typescript/commonjs/version.d.ts +8 -0
- package/lib/typescript/commonjs/version.d.ts.map +1 -0
- package/lib/typescript/module/core/client/link-api-client.d.ts +70 -0
- package/lib/typescript/module/core/client/link-api-client.d.ts.map +1 -0
- package/lib/typescript/module/core/errors/payment-api-error.d.ts +15 -0
- package/lib/typescript/module/core/errors/payment-api-error.d.ts.map +1 -0
- package/lib/typescript/module/core/models/index.d.ts +124 -0
- package/lib/typescript/module/core/models/index.d.ts.map +1 -0
- package/lib/typescript/module/core/models/link-session-status.d.ts +6 -0
- package/lib/typescript/module/core/models/link-session-status.d.ts.map +1 -0
- package/lib/typescript/module/core/models/payment-return-params.d.ts +15 -0
- package/lib/typescript/module/core/models/payment-return-params.d.ts.map +1 -0
- package/lib/typescript/module/core/models/payment-type.d.ts +18 -0
- package/lib/typescript/module/core/models/payment-type.d.ts.map +1 -0
- package/lib/typescript/module/core/models/wire-mappers.d.ts +19 -0
- package/lib/typescript/module/core/models/wire-mappers.d.ts.map +1 -0
- package/lib/typescript/module/core/services/consent-presenter.d.ts +67 -0
- package/lib/typescript/module/core/services/consent-presenter.d.ts.map +1 -0
- package/lib/typescript/module/core/services/execute-resume-if-needed.d.ts +32 -0
- package/lib/typescript/module/core/services/execute-resume-if-needed.d.ts.map +1 -0
- package/lib/typescript/module/core/services/multi-payment-rules-presenter.d.ts +9 -0
- package/lib/typescript/module/core/services/multi-payment-rules-presenter.d.ts.map +1 -0
- package/lib/typescript/module/core/services/payment-flow-controller.d.ts +146 -0
- package/lib/typescript/module/core/services/payment-flow-controller.d.ts.map +1 -0
- package/lib/typescript/module/core/services/payment-flow-state.d.ts +64 -0
- package/lib/typescript/module/core/services/payment-flow-state.d.ts.map +1 -0
- package/lib/typescript/module/core/services/payment-result-mapper.d.ts +5 -0
- package/lib/typescript/module/core/services/payment-result-mapper.d.ts.map +1 -0
- package/lib/typescript/module/core/services/pending-session-store.d.ts +12 -0
- package/lib/typescript/module/core/services/pending-session-store.d.ts.map +1 -0
- package/lib/typescript/module/core/services/presentation-utils.d.ts +5 -0
- package/lib/typescript/module/core/services/presentation-utils.d.ts.map +1 -0
- package/lib/typescript/module/core/services/redirect-buffer.d.ts +6 -0
- package/lib/typescript/module/core/services/redirect-buffer.d.ts.map +1 -0
- package/lib/typescript/module/core/services/user-friendly-messages.d.ts +6 -0
- package/lib/typescript/module/core/services/user-friendly-messages.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +19 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/internal/bank-redirect.d.ts +6 -0
- package/lib/typescript/module/internal/bank-redirect.d.ts.map +1 -0
- package/lib/typescript/module/internal/deep-link-listener.d.ts +3 -0
- package/lib/typescript/module/internal/deep-link-listener.d.ts.map +1 -0
- package/lib/typescript/module/internal/event-emitter.d.ts +13 -0
- package/lib/typescript/module/internal/event-emitter.d.ts.map +1 -0
- package/lib/typescript/module/internal/index.d.ts +5 -0
- package/lib/typescript/module/internal/index.d.ts.map +1 -0
- package/lib/typescript/module/internal/logger.d.ts +23 -0
- package/lib/typescript/module/internal/logger.d.ts.map +1 -0
- package/lib/typescript/module/internal/redact-uri.d.ts +3 -0
- package/lib/typescript/module/internal/redact-uri.d.ts.map +1 -0
- package/lib/typescript/module/internal/secure-store-pending-session-store.d.ts +33 -0
- package/lib/typescript/module/internal/secure-store-pending-session-store.d.ts.map +1 -0
- package/lib/typescript/module/internal/telemetry-collector.d.ts +2 -0
- package/lib/typescript/module/internal/telemetry-collector.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/public/constants.d.ts +12 -0
- package/lib/typescript/module/public/constants.d.ts.map +1 -0
- package/lib/typescript/module/public/index.d.ts +11 -0
- package/lib/typescript/module/public/index.d.ts.map +1 -0
- package/lib/typescript/module/public/payment-result.d.ts +43 -0
- package/lib/typescript/module/public/payment-result.d.ts.map +1 -0
- package/lib/typescript/module/public/recovery-result.d.ts +36 -0
- package/lib/typescript/module/public/recovery-result.d.ts.map +1 -0
- package/lib/typescript/module/public/spare-link-callbacks.d.ts +14 -0
- package/lib/typescript/module/public/spare-link-callbacks.d.ts.map +1 -0
- package/lib/typescript/module/public/spare-link-config.d.ts +49 -0
- package/lib/typescript/module/public/spare-link-config.d.ts.map +1 -0
- package/lib/typescript/module/public/spare-link-event.d.ts +90 -0
- package/lib/typescript/module/public/spare-link-event.d.ts.map +1 -0
- package/lib/typescript/module/public/spare-link-host-api.d.ts +29 -0
- package/lib/typescript/module/public/spare-link-host-api.d.ts.map +1 -0
- package/lib/typescript/module/public/spare-link-instance.d.ts +89 -0
- package/lib/typescript/module/public/spare-link-instance.d.ts.map +1 -0
- package/lib/typescript/module/public/spare-link-session.d.ts +20 -0
- package/lib/typescript/module/public/spare-link-session.d.ts.map +1 -0
- package/lib/typescript/module/public/spare-link.d.ts +3 -0
- package/lib/typescript/module/public/spare-link.d.ts.map +1 -0
- package/lib/typescript/module/ui/consent/charge-bearer-display.d.ts +5 -0
- package/lib/typescript/module/ui/consent/charge-bearer-display.d.ts.map +1 -0
- package/lib/typescript/module/ui/consent/consent-accordion.d.ts +10 -0
- package/lib/typescript/module/ui/consent/consent-accordion.d.ts.map +1 -0
- package/lib/typescript/module/ui/consent/consent-summary-section.d.ts +6 -0
- package/lib/typescript/module/ui/consent/consent-summary-section.d.ts.map +1 -0
- package/lib/typescript/module/ui/consent/cop-information.d.ts +6 -0
- package/lib/typescript/module/ui/consent/cop-information.d.ts.map +1 -0
- package/lib/typescript/module/ui/consent/international-payment-summary.d.ts +6 -0
- package/lib/typescript/module/ui/consent/international-payment-summary.d.ts.map +1 -0
- package/lib/typescript/module/ui/consent/label-value-rows.d.ts +10 -0
- package/lib/typescript/module/ui/consent/label-value-rows.d.ts.map +1 -0
- package/lib/typescript/module/ui/consent/multi-payment-rules-list.d.ts +15 -0
- package/lib/typescript/module/ui/consent/multi-payment-rules-list.d.ts.map +1 -0
- package/lib/typescript/module/ui/consent/multi-payment-summary.d.ts +6 -0
- package/lib/typescript/module/ui/consent/multi-payment-summary.d.ts.map +1 -0
- package/lib/typescript/module/ui/consent/single-payment-summary.d.ts +6 -0
- package/lib/typescript/module/ui/consent/single-payment-summary.d.ts.map +1 -0
- package/lib/typescript/module/ui/consent/terms-link.d.ts +2 -0
- package/lib/typescript/module/ui/consent/terms-link.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/use-payment-flow-state.d.ts +9 -0
- package/lib/typescript/module/ui/hooks/use-payment-flow-state.d.ts.map +1 -0
- package/lib/typescript/module/ui/payment-flow-page.d.ts +20 -0
- package/lib/typescript/module/ui/payment-flow-page.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/bank-selection-screen.d.ts +15 -0
- package/lib/typescript/module/ui/screens/bank-selection-screen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/consent-details-screen.d.ts +13 -0
- package/lib/typescript/module/ui/screens/consent-details-screen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/index.d.ts +7 -0
- package/lib/typescript/module/ui/screens/index.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/mandate-setup-success-screen.d.ts +10 -0
- package/lib/typescript/module/ui/screens/mandate-setup-success-screen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/redirect-handoff-screen.d.ts +3 -0
- package/lib/typescript/module/ui/screens/redirect-handoff-screen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/result-screen.d.ts +7 -0
- package/lib/typescript/module/ui/screens/result-screen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/resume-processing-screen.d.ts +10 -0
- package/lib/typescript/module/ui/screens/resume-processing-screen.d.ts.map +1 -0
- package/lib/typescript/module/ui/spare-link-host.d.ts +23 -0
- package/lib/typescript/module/ui/spare-link-host.d.ts.map +1 -0
- package/lib/typescript/module/ui/theme/assets.d.ts +15 -0
- package/lib/typescript/module/ui/theme/assets.d.ts.map +1 -0
- package/lib/typescript/module/ui/theme/colors.d.ts +31 -0
- package/lib/typescript/module/ui/theme/colors.d.ts.map +1 -0
- package/lib/typescript/module/ui/theme/fonts.d.ts +12 -0
- package/lib/typescript/module/ui/theme/fonts.d.ts.map +1 -0
- package/lib/typescript/module/ui/theme/index.d.ts +11 -0
- package/lib/typescript/module/ui/theme/index.d.ts.map +1 -0
- package/lib/typescript/module/ui/theme/typography.d.ts +12 -0
- package/lib/typescript/module/ui/theme/typography.d.ts.map +1 -0
- package/lib/typescript/module/ui/widgets/footer.d.ts +23 -0
- package/lib/typescript/module/ui/widgets/footer.d.ts.map +1 -0
- package/lib/typescript/module/ui/widgets/gradient-spinner.d.ts +13 -0
- package/lib/typescript/module/ui/widgets/gradient-spinner.d.ts.map +1 -0
- package/lib/typescript/module/ui/widgets/handoff-screen-layout.d.ts +11 -0
- package/lib/typescript/module/ui/widgets/handoff-screen-layout.d.ts.map +1 -0
- package/lib/typescript/module/ui/widgets/index.d.ts +6 -0
- package/lib/typescript/module/ui/widgets/index.d.ts.map +1 -0
- package/lib/typescript/module/ui/widgets/layout-w-header.d.ts +20 -0
- package/lib/typescript/module/ui/widgets/layout-w-header.d.ts.map +1 -0
- package/lib/typescript/module/ui/widgets/modal-dismiss-button.d.ts +6 -0
- package/lib/typescript/module/ui/widgets/modal-dismiss-button.d.ts.map +1 -0
- package/lib/typescript/module/ui/widgets/stepper.d.ts +15 -0
- package/lib/typescript/module/ui/widgets/stepper.d.ts.map +1 -0
- package/lib/typescript/module/version.d.ts +8 -0
- package/lib/typescript/module/version.d.ts.map +1 -0
- package/package.json +124 -0
- package/plugins/with-spare-link.js +98 -0
- package/src/core/client/link-api-client.ts +414 -0
- package/src/core/errors/payment-api-error.ts +35 -0
- package/src/core/models/index.ts +139 -0
- package/src/core/models/link-session-status.ts +7 -0
- package/src/core/models/payment-return-params.ts +34 -0
- package/src/core/models/payment-type.ts +54 -0
- package/src/core/models/wire-mappers.ts +315 -0
- package/src/core/services/consent-presenter.ts +213 -0
- package/src/core/services/execute-resume-if-needed.ts +243 -0
- package/src/core/services/multi-payment-rules-presenter.ts +158 -0
- package/src/core/services/payment-flow-controller.ts +607 -0
- package/src/core/services/payment-flow-state.ts +124 -0
- package/src/core/services/payment-result-mapper.ts +41 -0
- package/src/core/services/pending-session-store.ts +12 -0
- package/src/core/services/presentation-utils.ts +4 -0
- package/src/core/services/redirect-buffer.ts +34 -0
- package/src/core/services/user-friendly-messages.ts +39 -0
- package/src/index.ts +115 -0
- package/src/internal/bank-redirect.ts +61 -0
- package/src/internal/deep-link-listener.ts +31 -0
- package/src/internal/event-emitter.ts +42 -0
- package/src/internal/index.ts +4 -0
- package/src/internal/logger.ts +81 -0
- package/src/internal/redact-uri.ts +18 -0
- package/src/internal/secure-store-pending-session-store.ts +131 -0
- package/src/internal/telemetry-collector.ts +90 -0
- package/src/public/constants.ts +14 -0
- package/src/public/index.ts +80 -0
- package/src/public/payment-result.ts +61 -0
- package/src/public/recovery-result.ts +49 -0
- package/src/public/spare-link-callbacks.ts +20 -0
- package/src/public/spare-link-config.ts +87 -0
- package/src/public/spare-link-event.ts +146 -0
- package/src/public/spare-link-host-api.ts +28 -0
- package/src/public/spare-link-instance.ts +289 -0
- package/src/public/spare-link-session.ts +28 -0
- package/src/public/spare-link.ts +2 -0
- package/src/ui/consent/charge-bearer-display.tsx +68 -0
- package/src/ui/consent/consent-accordion.tsx +89 -0
- package/src/ui/consent/consent-summary-section.tsx +19 -0
- package/src/ui/consent/cop-information.tsx +121 -0
- package/src/ui/consent/international-payment-summary.tsx +83 -0
- package/src/ui/consent/label-value-rows.tsx +50 -0
- package/src/ui/consent/multi-payment-rules-list.tsx +138 -0
- package/src/ui/consent/multi-payment-summary.tsx +82 -0
- package/src/ui/consent/single-payment-summary.tsx +123 -0
- package/src/ui/consent/terms-link.tsx +27 -0
- package/src/ui/hooks/use-payment-flow-state.ts +16 -0
- package/src/ui/payment-flow-page.tsx +254 -0
- package/src/ui/screens/bank-selection-screen.tsx +209 -0
- package/src/ui/screens/consent-details-screen.tsx +106 -0
- package/src/ui/screens/index.ts +12 -0
- package/src/ui/screens/mandate-setup-success-screen.tsx +72 -0
- package/src/ui/screens/redirect-handoff-screen.tsx +33 -0
- package/src/ui/screens/result-screen.tsx +71 -0
- package/src/ui/screens/resume-processing-screen.tsx +111 -0
- package/src/ui/spare-link-host.tsx +394 -0
- package/src/ui/theme/assets.ts +17 -0
- package/src/ui/theme/colors.ts +32 -0
- package/src/ui/theme/fonts.ts +25 -0
- package/src/ui/theme/index.ts +11 -0
- package/src/ui/theme/typography.ts +47 -0
- package/src/ui/widgets/footer.tsx +138 -0
- package/src/ui/widgets/gradient-spinner.tsx +156 -0
- package/src/ui/widgets/handoff-screen-layout.tsx +70 -0
- package/src/ui/widgets/index.ts +5 -0
- package/src/ui/widgets/layout-w-header.tsx +89 -0
- package/src/ui/widgets/modal-dismiss-button.tsx +44 -0
- package/src/ui/widgets/stepper.tsx +126 -0
- package/src/version.ts +7 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
2
|
+
import type { InternationalPaymentSummaryData } from '../../core/services/consent-presenter';
|
|
3
|
+
import { presentField } from '../../core/services/consent-presenter';
|
|
4
|
+
import { Colors, FONT_FAMILY } from '../theme';
|
|
5
|
+
import { ChargeBearerDisplay } from './charge-bearer-display';
|
|
6
|
+
import { ConsentAccordion } from './consent-accordion';
|
|
7
|
+
import { LabelValueRows } from './label-value-rows';
|
|
8
|
+
import { TermsLink } from './terms-link';
|
|
9
|
+
|
|
10
|
+
export interface InternationalPaymentSummaryProps {
|
|
11
|
+
data: InternationalPaymentSummaryData;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function InternationalPaymentSummary(props: InternationalPaymentSummaryProps): JSX.Element {
|
|
15
|
+
const { data } = props;
|
|
16
|
+
return (
|
|
17
|
+
<View testID="international-payment-summary">
|
|
18
|
+
<View style={styles.card}>
|
|
19
|
+
<Text style={styles.title}>Payment Details</Text>
|
|
20
|
+
<LabelValueRows
|
|
21
|
+
paddingHorizontal={0}
|
|
22
|
+
rows={[
|
|
23
|
+
{ label: 'Payment References', value: presentField(data.paymentReference) },
|
|
24
|
+
{ label: 'Amount', value: data.formattedAmount },
|
|
25
|
+
{ label: 'Priority', value: presentField(data.priority) },
|
|
26
|
+
{ label: 'Payment Purpose', value: presentField(data.paymentPurpose) },
|
|
27
|
+
]}
|
|
28
|
+
/>
|
|
29
|
+
</View>
|
|
30
|
+
<ChargeBearerDisplay chargeBearer={data.chargeBearer} />
|
|
31
|
+
<ConsentAccordion
|
|
32
|
+
items={[
|
|
33
|
+
{
|
|
34
|
+
header: 'Payee Information',
|
|
35
|
+
children: (
|
|
36
|
+
<LabelValueRows
|
|
37
|
+
rows={[
|
|
38
|
+
{ label: 'IBAN', value: data.iban },
|
|
39
|
+
{ label: 'Payee Name', value: presentField(data.creditorName) },
|
|
40
|
+
]}
|
|
41
|
+
/>
|
|
42
|
+
),
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
header: 'Payer Information',
|
|
46
|
+
children: (
|
|
47
|
+
<LabelValueRows rows={[{ label: 'Bank', value: presentField(data.bankName) }]} />
|
|
48
|
+
),
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
header: 'Terms',
|
|
52
|
+
initiallyExpanded: false,
|
|
53
|
+
children: <TermsLink />,
|
|
54
|
+
},
|
|
55
|
+
]}
|
|
56
|
+
/>
|
|
57
|
+
</View>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const styles = StyleSheet.create({
|
|
62
|
+
card: {
|
|
63
|
+
backgroundColor: Colors.surfaceCard,
|
|
64
|
+
borderRadius: 16,
|
|
65
|
+
paddingVertical: 14,
|
|
66
|
+
paddingHorizontal: 20,
|
|
67
|
+
marginBottom: 14,
|
|
68
|
+
gap: 12,
|
|
69
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
70
|
+
borderColor: Colors.divider,
|
|
71
|
+
shadowColor: '#000000',
|
|
72
|
+
shadowOpacity: 0.06,
|
|
73
|
+
shadowRadius: 6,
|
|
74
|
+
shadowOffset: { width: 0, height: 2 },
|
|
75
|
+
elevation: 2,
|
|
76
|
+
},
|
|
77
|
+
title: {
|
|
78
|
+
fontFamily: FONT_FAMILY,
|
|
79
|
+
fontSize: 14,
|
|
80
|
+
fontWeight: '700',
|
|
81
|
+
color: Colors.textPrimary,
|
|
82
|
+
},
|
|
83
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
2
|
+
import type { LabelValueRow } from '../../core/services/multi-payment-rules-presenter';
|
|
3
|
+
import { Colors, FONT_FAMILY } from '../theme';
|
|
4
|
+
|
|
5
|
+
export interface LabelValueRowsProps {
|
|
6
|
+
rows: LabelValueRow[];
|
|
7
|
+
/** Horizontal inset; Flutter defaults to 20 and uses 0 inside padded cards. */
|
|
8
|
+
paddingHorizontal?: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function LabelValueRows(props: LabelValueRowsProps): JSX.Element {
|
|
12
|
+
const paddingHorizontal = props.paddingHorizontal ?? 20;
|
|
13
|
+
return (
|
|
14
|
+
<View style={[styles.wrap, { paddingHorizontal }]} testID="label-value-rows">
|
|
15
|
+
{props.rows.map((row, idx) => (
|
|
16
|
+
<View key={`${row.label}-${idx}`} style={styles.row} testID={`label-value-row-${idx}`}>
|
|
17
|
+
<Text style={styles.label}>{row.label}</Text>
|
|
18
|
+
<Text style={styles.value}>{row.value}</Text>
|
|
19
|
+
</View>
|
|
20
|
+
))}
|
|
21
|
+
</View>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const styles = StyleSheet.create({
|
|
26
|
+
wrap: {},
|
|
27
|
+
row: {
|
|
28
|
+
flexDirection: 'row',
|
|
29
|
+
justifyContent: 'space-between',
|
|
30
|
+
alignItems: 'flex-start',
|
|
31
|
+
gap: 12,
|
|
32
|
+
paddingVertical: 4,
|
|
33
|
+
},
|
|
34
|
+
label: { fontFamily: FONT_FAMILY, fontSize: 14, color: Colors.textMuted, flex: 1 },
|
|
35
|
+
value: {
|
|
36
|
+
fontFamily: FONT_FAMILY,
|
|
37
|
+
fontSize: 14,
|
|
38
|
+
color: Colors.textMuted,
|
|
39
|
+
textAlign: 'right',
|
|
40
|
+
flex: 1,
|
|
41
|
+
flexShrink: 1,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
function present(value: string | undefined, fallback = '—'): string {
|
|
46
|
+
const v = value?.trim();
|
|
47
|
+
return v ? v : fallback;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { present };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { ScrollView, StyleSheet, Text, View } from 'react-native';
|
|
2
|
+
import { PaymentType } from '../../core/models/payment-type';
|
|
3
|
+
import type { LabelValueRow } from '../../core/services/multi-payment-rules-presenter';
|
|
4
|
+
import { Colors, FONT_FAMILY } from '../theme';
|
|
5
|
+
import { LabelValueRows } from './label-value-rows';
|
|
6
|
+
|
|
7
|
+
/** Number of defined-schedule entry cards visible before scrolling. */
|
|
8
|
+
export const DEFINED_SCHEDULE_VISIBLE_ENTRY_COUNT = 3;
|
|
9
|
+
|
|
10
|
+
/** Approximate height of one defined-schedule entry card (incl. spacing). */
|
|
11
|
+
export const DEFINED_SCHEDULE_ENTRY_EXTENT = 96;
|
|
12
|
+
|
|
13
|
+
export interface MultiPaymentRulesListProps {
|
|
14
|
+
rulesTitle?: string;
|
|
15
|
+
rules: LabelValueRow[];
|
|
16
|
+
paymentType: PaymentType;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function MultiPaymentRulesList(props: MultiPaymentRulesListProps): JSX.Element {
|
|
20
|
+
const { rules, paymentType } = props;
|
|
21
|
+
|
|
22
|
+
if (rules.length === 0) {
|
|
23
|
+
return (
|
|
24
|
+
<View testID="multi-payment-rules-list">
|
|
25
|
+
{props.rulesTitle ? <Text style={styles.title}>{props.rulesTitle}</Text> : null}
|
|
26
|
+
<Text style={styles.empty}>—</Text>
|
|
27
|
+
</View>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const isDefinedSchedule =
|
|
32
|
+
paymentType === PaymentType.fixedDefinedSchedule ||
|
|
33
|
+
paymentType === PaymentType.variableDefinedSchedule;
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<View testID="multi-payment-rules-list">
|
|
37
|
+
{props.rulesTitle ? <Text style={styles.title}>{props.rulesTitle}</Text> : null}
|
|
38
|
+
{isDefinedSchedule ? (
|
|
39
|
+
<DefinedScheduleEntries rules={rules} />
|
|
40
|
+
) : (
|
|
41
|
+
<LabelValueRows rows={rules} />
|
|
42
|
+
)}
|
|
43
|
+
</View>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function DefinedScheduleEntries(props: { rules: LabelValueRow[] }): JSX.Element {
|
|
48
|
+
const entries = groupDefinedScheduleEntries(props.rules);
|
|
49
|
+
|
|
50
|
+
if (entries.length <= DEFINED_SCHEDULE_VISIBLE_ENTRY_COUNT) {
|
|
51
|
+
return (
|
|
52
|
+
<>
|
|
53
|
+
{entries.map((entry, index) => (
|
|
54
|
+
<DefinedScheduleEntryCard
|
|
55
|
+
key={definedScheduleEntryKey(entry)}
|
|
56
|
+
testID={`payment-schedule-entry-${index}`}
|
|
57
|
+
rows={entry}
|
|
58
|
+
/>
|
|
59
|
+
))}
|
|
60
|
+
</>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<ScrollView
|
|
66
|
+
testID="defined-schedule-scroll"
|
|
67
|
+
style={{ maxHeight: DEFINED_SCHEDULE_ENTRY_EXTENT * DEFINED_SCHEDULE_VISIBLE_ENTRY_COUNT }}
|
|
68
|
+
nestedScrollEnabled
|
|
69
|
+
showsVerticalScrollIndicator
|
|
70
|
+
>
|
|
71
|
+
{entries.map((entry, index) => (
|
|
72
|
+
<DefinedScheduleEntryCard
|
|
73
|
+
key={definedScheduleEntryKey(entry)}
|
|
74
|
+
testID={`payment-schedule-entry-${index}`}
|
|
75
|
+
rows={entry}
|
|
76
|
+
/>
|
|
77
|
+
))}
|
|
78
|
+
</ScrollView>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function DefinedScheduleEntryCard(props: {
|
|
83
|
+
rows: LabelValueRow[];
|
|
84
|
+
testID: string;
|
|
85
|
+
}): JSX.Element {
|
|
86
|
+
return (
|
|
87
|
+
<View style={styles.entryCard} testID={props.testID}>
|
|
88
|
+
<LabelValueRows paddingHorizontal={0} rows={props.rows} />
|
|
89
|
+
</View>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** Groups flat Amount/Date row pairs into per-payment entry lists. */
|
|
94
|
+
export function groupDefinedScheduleEntries(rules: LabelValueRow[]): LabelValueRow[][] {
|
|
95
|
+
const entries: LabelValueRow[][] = [];
|
|
96
|
+
for (const row of rules) {
|
|
97
|
+
if (row.label === 'Amount' || row.label === 'Max Amount') {
|
|
98
|
+
entries.push([row]);
|
|
99
|
+
} else if (row.label === 'Date' && entries.length > 0) {
|
|
100
|
+
entries[entries.length - 1]?.push(row);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return entries;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function definedScheduleEntryKey(entry: LabelValueRow[]): string {
|
|
107
|
+
return entry.map((row) => `${row.label}:${row.value}`).join('|');
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const styles = StyleSheet.create({
|
|
111
|
+
title: {
|
|
112
|
+
fontFamily: FONT_FAMILY,
|
|
113
|
+
fontSize: 16,
|
|
114
|
+
fontWeight: '700',
|
|
115
|
+
color: Colors.textPrimary,
|
|
116
|
+
marginBottom: 8,
|
|
117
|
+
paddingHorizontal: 20,
|
|
118
|
+
},
|
|
119
|
+
empty: {
|
|
120
|
+
fontFamily: FONT_FAMILY,
|
|
121
|
+
fontSize: 14,
|
|
122
|
+
color: Colors.textMuted,
|
|
123
|
+
paddingHorizontal: 20,
|
|
124
|
+
},
|
|
125
|
+
entryCard: {
|
|
126
|
+
backgroundColor: Colors.surfaceCard,
|
|
127
|
+
borderRadius: 8,
|
|
128
|
+
paddingVertical: 10,
|
|
129
|
+
paddingHorizontal: 16,
|
|
130
|
+
marginBottom: 10,
|
|
131
|
+
marginHorizontal: 20,
|
|
132
|
+
shadowColor: '#000000',
|
|
133
|
+
shadowOpacity: 0.06,
|
|
134
|
+
shadowRadius: 4,
|
|
135
|
+
shadowOffset: { width: 0, height: 1 },
|
|
136
|
+
elevation: 1,
|
|
137
|
+
},
|
|
138
|
+
});
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
2
|
+
import type { MultiPaymentSummaryData } from '../../core/services/consent-presenter';
|
|
3
|
+
import { Colors, FONT_FAMILY } from '../theme';
|
|
4
|
+
import { ConsentAccordion } from './consent-accordion';
|
|
5
|
+
import { LabelValueRows, present } from './label-value-rows';
|
|
6
|
+
import { MultiPaymentRulesList } from './multi-payment-rules-list';
|
|
7
|
+
import { TermsLink } from './terms-link';
|
|
8
|
+
|
|
9
|
+
export interface MultiPaymentSummaryProps {
|
|
10
|
+
data: MultiPaymentSummaryData;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function MultiPaymentSummary(props: MultiPaymentSummaryProps): JSX.Element {
|
|
14
|
+
const { data } = props;
|
|
15
|
+
return (
|
|
16
|
+
<View testID="multi-payment-summary">
|
|
17
|
+
<View style={styles.card} testID="multi-payment-setup-card">
|
|
18
|
+
<Text style={styles.setupTitle}>Payment setup</Text>
|
|
19
|
+
<LabelValueRows
|
|
20
|
+
paddingHorizontal={0}
|
|
21
|
+
rows={[
|
|
22
|
+
{ label: 'Payment to', value: present(data.creditorType) },
|
|
23
|
+
{ label: 'Reference', value: present(data.externalReference) },
|
|
24
|
+
{ label: 'Payment Purpose', value: present(data.paymentPurpose) },
|
|
25
|
+
]}
|
|
26
|
+
/>
|
|
27
|
+
</View>
|
|
28
|
+
<ConsentAccordion
|
|
29
|
+
items={[
|
|
30
|
+
{
|
|
31
|
+
header: data.rulesTitle,
|
|
32
|
+
children: <MultiPaymentRulesList rules={data.rules} paymentType={data.paymentType} />,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
header: 'To account',
|
|
36
|
+
children: (
|
|
37
|
+
<LabelValueRows
|
|
38
|
+
rows={[
|
|
39
|
+
{ label: 'IBAN', value: present(data.iban) },
|
|
40
|
+
{ label: 'Payee Name', value: present(data.creditorName) },
|
|
41
|
+
]}
|
|
42
|
+
/>
|
|
43
|
+
),
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
header: 'From account',
|
|
47
|
+
children: <LabelValueRows rows={[{ label: 'Bank', value: present(data.bankName) }]} />,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
header: 'Terms',
|
|
51
|
+
initiallyExpanded: false,
|
|
52
|
+
children: <TermsLink />,
|
|
53
|
+
},
|
|
54
|
+
]}
|
|
55
|
+
/>
|
|
56
|
+
</View>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const styles = StyleSheet.create({
|
|
61
|
+
card: {
|
|
62
|
+
backgroundColor: Colors.surfaceCard,
|
|
63
|
+
borderRadius: 12,
|
|
64
|
+
paddingVertical: 14,
|
|
65
|
+
paddingHorizontal: 20,
|
|
66
|
+
marginBottom: 14,
|
|
67
|
+
gap: 12,
|
|
68
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
69
|
+
borderColor: Colors.divider,
|
|
70
|
+
shadowColor: '#000000',
|
|
71
|
+
shadowOpacity: 0.06,
|
|
72
|
+
shadowRadius: 6,
|
|
73
|
+
shadowOffset: { width: 0, height: 2 },
|
|
74
|
+
elevation: 2,
|
|
75
|
+
},
|
|
76
|
+
setupTitle: {
|
|
77
|
+
fontFamily: FONT_FAMILY,
|
|
78
|
+
fontSize: 14,
|
|
79
|
+
fontWeight: '700',
|
|
80
|
+
color: Colors.textPrimary,
|
|
81
|
+
},
|
|
82
|
+
});
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
2
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
3
|
+
import type { SinglePaymentSummaryData } from '../../core/services/consent-presenter';
|
|
4
|
+
import { Colors, FONT_FAMILY, Spacing } from '../theme';
|
|
5
|
+
import { ConsentAccordion } from './consent-accordion';
|
|
6
|
+
import { CopInformation, CopLoadingPlaceholder } from './cop-information';
|
|
7
|
+
import { LabelValueRows, present } from './label-value-rows';
|
|
8
|
+
|
|
9
|
+
export interface SinglePaymentSummaryProps {
|
|
10
|
+
data: SinglePaymentSummaryData;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function SinglePaymentSummary(props: SinglePaymentSummaryProps): JSX.Element {
|
|
14
|
+
const { data } = props;
|
|
15
|
+
const creditor = data.creditorName?.trim();
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<>
|
|
19
|
+
<PaymentDetailsCard
|
|
20
|
+
amount={data.formattedAmount}
|
|
21
|
+
paymentReference={data.paymentReference}
|
|
22
|
+
paymentPurpose={data.paymentPurpose}
|
|
23
|
+
/>
|
|
24
|
+
<ConsentAccordion
|
|
25
|
+
items={[
|
|
26
|
+
{
|
|
27
|
+
header: 'Payee Information',
|
|
28
|
+
children: (
|
|
29
|
+
<>
|
|
30
|
+
<LabelValueRows rows={[{ label: 'IBAN', value: present(data.iban) }]} />
|
|
31
|
+
{creditor ? (
|
|
32
|
+
<LabelValueRows rows={[{ label: 'Payee Name', value: creditor }]} />
|
|
33
|
+
) : null}
|
|
34
|
+
{data.isCopLoading || data.copDisplay ? (
|
|
35
|
+
<View style={styles.copSection}>
|
|
36
|
+
<View style={styles.copDivider} testID="consent-cop-divider" />
|
|
37
|
+
{data.isCopLoading ? (
|
|
38
|
+
<CopLoadingPlaceholder />
|
|
39
|
+
) : data.copDisplay ? (
|
|
40
|
+
<CopInformation display={data.copDisplay} />
|
|
41
|
+
) : null}
|
|
42
|
+
</View>
|
|
43
|
+
) : null}
|
|
44
|
+
</>
|
|
45
|
+
),
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
header: 'Payer Information',
|
|
49
|
+
children: <LabelValueRows rows={[{ label: 'Bank', value: present(data.bankName) }]} />,
|
|
50
|
+
},
|
|
51
|
+
]}
|
|
52
|
+
/>
|
|
53
|
+
</>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function PaymentDetailsCard(props: {
|
|
58
|
+
amount: string;
|
|
59
|
+
paymentReference: string | undefined;
|
|
60
|
+
paymentPurpose: string | undefined;
|
|
61
|
+
}): JSX.Element {
|
|
62
|
+
return (
|
|
63
|
+
<View style={styles.paymentCard} testID="consent-payment-details">
|
|
64
|
+
<View style={styles.rowBetween}>
|
|
65
|
+
<View style={styles.rowCenter}>
|
|
66
|
+
<Ionicons name="wallet-outline" size={18} color={Colors.textPrimary} />
|
|
67
|
+
<Text style={styles.totalLabel}>Payment Total</Text>
|
|
68
|
+
</View>
|
|
69
|
+
<Text style={styles.totalAmount} testID="consent-details-amount">
|
|
70
|
+
{props.amount}
|
|
71
|
+
</Text>
|
|
72
|
+
</View>
|
|
73
|
+
<View style={styles.rowBetween}>
|
|
74
|
+
<Text style={styles.muted}>Payment References</Text>
|
|
75
|
+
<Text style={styles.muted}>{present(props.paymentReference)}</Text>
|
|
76
|
+
</View>
|
|
77
|
+
<View style={styles.rowBetween}>
|
|
78
|
+
<Text style={styles.muted}>Payment Purpose</Text>
|
|
79
|
+
<Text style={styles.muted}>{present(props.paymentPurpose)}</Text>
|
|
80
|
+
</View>
|
|
81
|
+
</View>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const styles = StyleSheet.create({
|
|
86
|
+
paymentCard: {
|
|
87
|
+
backgroundColor: Colors.surfaceCard,
|
|
88
|
+
borderRadius: 16,
|
|
89
|
+
paddingVertical: 14,
|
|
90
|
+
paddingHorizontal: 20,
|
|
91
|
+
marginBottom: 14,
|
|
92
|
+
gap: 10,
|
|
93
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
94
|
+
borderColor: Colors.divider,
|
|
95
|
+
shadowColor: '#000000',
|
|
96
|
+
shadowOpacity: 0.06,
|
|
97
|
+
shadowRadius: 6,
|
|
98
|
+
shadowOffset: { width: 0, height: 2 },
|
|
99
|
+
elevation: 2,
|
|
100
|
+
},
|
|
101
|
+
rowBetween: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' },
|
|
102
|
+
rowCenter: { flexDirection: 'row', alignItems: 'center', gap: Spacing.sm },
|
|
103
|
+
totalLabel: {
|
|
104
|
+
fontFamily: FONT_FAMILY,
|
|
105
|
+
fontSize: 14,
|
|
106
|
+
fontWeight: '700',
|
|
107
|
+
color: Colors.textPrimary,
|
|
108
|
+
},
|
|
109
|
+
totalAmount: {
|
|
110
|
+
fontFamily: FONT_FAMILY,
|
|
111
|
+
fontSize: 14,
|
|
112
|
+
fontWeight: '700',
|
|
113
|
+
color: Colors.textPrimary,
|
|
114
|
+
},
|
|
115
|
+
muted: { fontFamily: FONT_FAMILY, fontSize: 14, color: Colors.textMuted },
|
|
116
|
+
copSection: { marginTop: 4 },
|
|
117
|
+
copDivider: {
|
|
118
|
+
height: StyleSheet.hairlineWidth,
|
|
119
|
+
backgroundColor: Colors.divider,
|
|
120
|
+
marginHorizontal: 20,
|
|
121
|
+
marginBottom: 8,
|
|
122
|
+
},
|
|
123
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Linking, Pressable, StyleSheet, Text } from 'react-native';
|
|
2
|
+
import { Colors, FONT_FAMILY } from '../theme';
|
|
3
|
+
|
|
4
|
+
const TERMS_URL = 'https://terms.tryspare.com/ae/en';
|
|
5
|
+
|
|
6
|
+
export function TermsLink(): JSX.Element {
|
|
7
|
+
return (
|
|
8
|
+
<Pressable
|
|
9
|
+
accessibilityRole="link"
|
|
10
|
+
onPress={() => void Linking.openURL(TERMS_URL)}
|
|
11
|
+
testID="consent-terms-link"
|
|
12
|
+
style={styles.wrap}
|
|
13
|
+
>
|
|
14
|
+
<Text style={styles.link}>View terms and conditions</Text>
|
|
15
|
+
</Pressable>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const styles = StyleSheet.create({
|
|
20
|
+
wrap: { paddingHorizontal: 20, paddingVertical: 4 },
|
|
21
|
+
link: {
|
|
22
|
+
fontFamily: FONT_FAMILY,
|
|
23
|
+
fontSize: 14,
|
|
24
|
+
color: Colors.spareBlue,
|
|
25
|
+
textDecorationLine: 'underline',
|
|
26
|
+
},
|
|
27
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useSyncExternalStore } from 'react';
|
|
2
|
+
import type { PaymentFlowController } from '../../core/services/payment-flow-controller';
|
|
3
|
+
import type { PaymentFlowState } from '../../core/services/payment-flow-state';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* React hook that bridges {@link PaymentFlowController}'s observable to the
|
|
7
|
+
* component tree via `useSyncExternalStore`. Re-renders when the controller
|
|
8
|
+
* notifies a new state.
|
|
9
|
+
*/
|
|
10
|
+
export function usePaymentFlowState(controller: PaymentFlowController): PaymentFlowState {
|
|
11
|
+
return useSyncExternalStore(
|
|
12
|
+
(notify) => controller.subscribe(notify),
|
|
13
|
+
() => controller.state,
|
|
14
|
+
() => controller.state,
|
|
15
|
+
);
|
|
16
|
+
}
|