fs-feedback-creator
Advanced tools
Comparing version 1.0.21 to 1.0.22
@@ -13,3 +13,4 @@ import { FeedbackResource } from "./resources/feedback.resource"; | ||
responseData: ResponseResource; | ||
constructor(fb: FeedbackResource); | ||
constructor(fb: FeedbackResource, parentElement: HTMLDivElement); | ||
setFbData(data: FeedbackResource): void; | ||
renderButton(): void; | ||
@@ -16,0 +17,0 @@ renderModal(): void; |
export class FeedbackCreator { | ||
constructor(fb) { | ||
constructor(fb, parentElement) { | ||
this.language_map = new Map(); | ||
@@ -13,6 +13,14 @@ this.style_map = new Map(); | ||
this.root.id = "fb-root"; | ||
document.body.appendChild(this.root); | ||
if (typeof parentElement === 'undefined' || parentElement === null) { | ||
document.body.appendChild(this.root); | ||
} | ||
else { | ||
parentElement.appendChild(this.root); | ||
} | ||
this.setMapsValues(); | ||
this._addStyle(); | ||
} | ||
setFbData(data) { | ||
this.fb = data; | ||
} | ||
renderButton() { | ||
@@ -19,0 +27,0 @@ if (!this.root) |
{ | ||
"name": "fs-feedback-creator", | ||
"version": "1.0.21", | ||
"version": "1.0.22", | ||
"description": "web-based module that's responsible to inject fullsession feedback modal", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
35050
577