UNPKG

@securecall/client-component

Version:

SecureCall Core Web Component

110 lines (109 loc) 3.62 kB
import { Host, h } from "@stencil/core"; import { Logger } from "../../utils/logger"; export class SecurecallResponseButton { fieldName; label; action = "retryClearCVV"; responseButtonEvent; log = Logger('SecurecallResponseButton'); handleClick() { this.log.debug("handleClick: field", this.fieldName, "clicked"); this.responseButtonEvent.emit(this.action); } render() { return (h(Host, { key: 'f816c5ae1509e330f91f2f5d3e70b008d1243bdb' }, h("div", { key: '39350d41d8c67e62020a5618ae3f369a1aabe243', class: "response-field-container" }, h("button", { key: '73fbc0e4c7136f4f8cdbe73312d7d4554f8880cc', type: "button", class: "response-button", onClick: () => this.handleClick() }, this.label)))); } static get is() { return "securecall-response-button"; } static get encapsulation() { return "shadow"; } static get originalStyleUrls() { return { "$": ["securecall-response-button.css"] }; } static get styleUrls() { return { "$": ["securecall-response-button.css"] }; } static get properties() { return { "fieldName": { "type": "string", "attribute": "field-name", "mutable": false, "complexType": { "original": "string", "resolved": "string", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "" }, "getter": false, "setter": false, "reflect": false }, "label": { "type": "string", "attribute": "label", "mutable": false, "complexType": { "original": "string", "resolved": "string", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "" }, "getter": false, "setter": false, "reflect": false }, "action": { "type": "string", "attribute": "action", "mutable": false, "complexType": { "original": "string", "resolved": "string", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "" }, "getter": false, "setter": false, "reflect": false, "defaultValue": "\"retryClearCVV\"" } }; } static get events() { return [{ "method": "responseButtonEvent", "name": "responseButtonEvent", "bubbles": true, "cancelable": true, "composed": true, "docs": { "tags": [], "text": "" }, "complexType": { "original": "string", "resolved": "string", "references": {} } }]; } } //# sourceMappingURL=securecall-response-button.js.map