@securecall/client-component
Version:
SecureCall Core Web Component
110 lines (109 loc) • 3.62 kB
JavaScript
import { Host, h } from "@stencil/core";
import { Logger } from "../../utils/logger";
export class SecurecallResponseButton {
fieldName;
label;
action = "retryClearCVV";
responseButtonEvent;
log = new Logger('SecurecallResponseButton');
handleClick() {
this.log.debug("handleClick: field", this.fieldName, "clicked");
this.responseButtonEvent.emit(this.action);
}
render() {
return (h(Host, { key: '659031854eadfac8ae6a8ad7f71b07b1b4ecb711' }, h("div", { key: 'a75ccbe98bb8a695e38d0f1882e07be31f92d92b', class: "response-field-container" }, h("button", { key: '748b63c60e416fcf13a9c398ab69e087520c7d7d', 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",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "field-name"
},
"label": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "label"
},
"action": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "action",
"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