UNPKG

@adyen/adyen-web

Version:

[![npm](https://img.shields.io/npm/v/@adyen/adyen-web.svg)](https://www.npmjs.com/package/@adyen/adyen-web)

3 lines (2 loc) 1.84 kB
import{createElement as t}from"../../external/preact/dist/preact.js";import{UIElement as e}from"../internal/UIElement/UIElement.js";import r from"./components/DokuInput/DokuInput.js";import o from"./components/DokuVoucherResult/DokuVoucherResult.js";import{TxVariants as n}from"../tx-variants.js";function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),o.forEach(function(e){a(t,e,r[e])})}return t}function s(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):function(t){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e.push.apply(e,r)}return e}(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}class u extends e{get isValid(){return!!this.state.isValid}formatData(){return s(i({},this.state.data),{paymentMethod:{type:this.type}})}componentToRender(){return this.props.reference?t(o,s(i({ref:t=>{this.componentRef=t}},this.props),{onActionHandled:this.onActionHandled})):t(r,s(i({setComponentRef:this.setComponentRef},this.props),{onChange:this.setState,onSubmit:this.submit,payButton:this.payButton}))}}a(u,"type",n.doku),a(u,"txVariants",[n.doku,n.doku_alfamart,n.doku_permata_lite_atm,n.doku_indomaret,n.doku_atm_mandiri_va,n.doku_sinarmas_va,n.doku_mandiri_va,n.doku_cimb_va,n.doku_danamon_va,n.doku_bri_va,n.doku_bni_va,n.doku_bca_va,n.doku_wallet]);export{u as DokuElement,u as default}; //# sourceMappingURL=Doku.js.map