2024-03-08 14:39:50 +00:00
|
|
|
import DomElement from "./DomElement";
|
|
|
|
|
|
|
|
class DomElementCollection {
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
this.gatewayRadioButton = new DomElement({
|
|
|
|
selector: '#payment_method_ppcp-axo-gateway',
|
|
|
|
});
|
|
|
|
|
2024-06-06 01:16:52 +02:00
|
|
|
this.gatewayDescription = new DomElement({
|
|
|
|
selector: '.payment_box.payment_method_ppcp-axo-gateway',
|
|
|
|
});
|
|
|
|
|
2024-03-08 14:39:50 +00:00
|
|
|
this.defaultSubmitButton = new DomElement({
|
|
|
|
selector: '#place_order',
|
|
|
|
});
|
|
|
|
|
|
|
|
this.paymentContainer = new DomElement({
|
|
|
|
id: 'ppcp-axo-payment-container',
|
|
|
|
selector: '#ppcp-axo-payment-container',
|
|
|
|
className: 'ppcp-axo-payment-container'
|
|
|
|
});
|
|
|
|
|
|
|
|
this.watermarkContainer = new DomElement({
|
|
|
|
id: 'ppcp-axo-watermark-container',
|
|
|
|
selector: '#ppcp-axo-watermark-container',
|
2024-05-23 01:30:20 +02:00
|
|
|
className: 'ppcp-axo-watermark-container ppcp-axo-watermark-loading loader'
|
2024-03-08 14:39:50 +00:00
|
|
|
});
|
|
|
|
|
2024-03-14 10:54:15 +00:00
|
|
|
this.customerDetails = new DomElement({
|
|
|
|
selector: '#customer_details > *:not(#ppcp-axo-customer-details)'
|
|
|
|
});
|
|
|
|
|
|
|
|
this.axoCustomerDetails = new DomElement({
|
|
|
|
id: 'ppcp-axo-customer-details',
|
|
|
|
selector: '#ppcp-axo-customer-details',
|
|
|
|
className: 'ppcp-axo-customer-details',
|
|
|
|
anchorSelector: '#customer_details'
|
2024-03-12 09:23:42 +00:00
|
|
|
});
|
|
|
|
|
2024-03-08 14:39:50 +00:00
|
|
|
this.emailWidgetContainer = new DomElement({
|
|
|
|
id: 'ppcp-axo-email-widget',
|
|
|
|
selector: '#ppcp-axo-email-widget',
|
|
|
|
className: 'ppcp-axo-email-widget'
|
|
|
|
});
|
|
|
|
|
|
|
|
this.shippingAddressContainer = new DomElement({
|
|
|
|
id: 'ppcp-axo-shipping-address-container',
|
|
|
|
selector: '#ppcp-axo-shipping-address-container',
|
2024-03-14 10:54:15 +00:00
|
|
|
className: 'ppcp-axo-shipping-address-container'
|
2024-03-08 14:39:50 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
this.billingAddressContainer = new DomElement({
|
|
|
|
id: 'ppcp-axo-billing-address-container',
|
|
|
|
selector: '#ppcp-axo-billing-address-container',
|
2024-03-14 10:54:15 +00:00
|
|
|
className: 'ppcp-axo-billing-address-container'
|
2024-03-08 14:39:50 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
this.fieldBillingEmail = new DomElement({
|
|
|
|
selector: '#billing_email_field'
|
|
|
|
});
|
|
|
|
|
2024-06-07 22:07:21 +02:00
|
|
|
this.billingEmailFieldWrapper = new DomElement({
|
|
|
|
id: 'ppcp-axo-billing-email-field-wrapper',
|
|
|
|
selector: '#ppcp-axo-billing-email-field-wrapper',
|
|
|
|
});
|
|
|
|
|
2024-06-06 16:08:30 +02:00
|
|
|
this.billingEmailSubmitButton = new DomElement({
|
2024-06-07 00:35:55 +02:00
|
|
|
id: 'ppcp-axo-billing-email-submit-button',
|
2024-06-06 16:08:30 +02:00
|
|
|
selector: '#ppcp-axo-billing-email-submit-button',
|
2024-06-07 00:35:55 +02:00
|
|
|
className: 'ppcp-axo-billing-email-submit-button-hidden button alt wp-element-button wc-block-components-button'
|
2024-06-06 16:08:30 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
this.billingEmailSubmitButtonSpinner = new DomElement({
|
2024-06-07 00:35:55 +02:00
|
|
|
id: 'ppcp-axo-billing-email-submit-button-spinner',
|
|
|
|
selector: '#ppcp-axo-billing-email-submit-button-spinner',
|
2024-06-06 16:08:30 +02:00
|
|
|
className: 'loader ppcp-axo-overlay'
|
|
|
|
});
|
|
|
|
|
2024-03-08 14:39:50 +00:00
|
|
|
this.submitButtonContainer = new DomElement({
|
|
|
|
selector: '#ppcp-axo-submit-button-container',
|
2024-03-08 17:41:21 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
this.submitButton = new DomElement({
|
|
|
|
selector: '#ppcp-axo-submit-button-container button'
|
2024-03-08 14:39:50 +00:00
|
|
|
});
|
2024-03-12 09:23:42 +00:00
|
|
|
|
|
|
|
this.changeShippingAddressLink = new DomElement({
|
|
|
|
selector: '*[data-ppcp-axo-change-shipping-address]',
|
|
|
|
attributes: 'data-ppcp-axo-change-shipping-address',
|
|
|
|
});
|
|
|
|
|
|
|
|
this.changeBillingAddressLink = new DomElement({
|
|
|
|
selector: '*[data-ppcp-axo-change-billing-address]',
|
|
|
|
attributes: 'data-ppcp-axo-change-billing-address',
|
|
|
|
});
|
|
|
|
|
|
|
|
this.changeCardLink = new DomElement({
|
|
|
|
selector: '*[data-ppcp-axo-change-card]',
|
|
|
|
attributes: 'data-ppcp-axo-change-card',
|
|
|
|
});
|
|
|
|
|
|
|
|
this.showGatewaySelectionLink = new DomElement({
|
|
|
|
selector: '*[data-ppcp-axo-show-gateway-selection]',
|
|
|
|
attributes: 'data-ppcp-axo-show-gateway-selection',
|
|
|
|
});
|
|
|
|
|
2024-04-08 11:31:12 +01:00
|
|
|
this.axoNonceInput = new DomElement({
|
|
|
|
id: 'ppcp-axo-nonce',
|
|
|
|
selector: '#ppcp-axo-nonce',
|
|
|
|
});
|
|
|
|
|
2024-03-08 14:39:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default DomElementCollection;
|