@fullsession.io/fs-feedback-widget 1.2.8 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/App.svelte +13 -1
- package/src/main.js +32 -32
- package/src/widgetPages/App.css +1 -4
- package/src/widgetPages/reactionPage.svelte +11 -5
package/package.json
CHANGED
package/src/App.svelte
CHANGED
|
@@ -86,7 +86,19 @@
|
|
|
86
86
|
$: document.documentElement.style.setProperty('--widgetMarginRight', widgetMarginRight + 'px')
|
|
87
87
|
$: document.documentElement.style.setProperty('--widgetMarginLeft', widgetMarginLeft + 'px')
|
|
88
88
|
|
|
89
|
-
const closeOne = () =>
|
|
89
|
+
const closeOne = (email,comment,reactionType) => {
|
|
90
|
+
let widgetResponse={
|
|
91
|
+
email:email,
|
|
92
|
+
comment:comment,
|
|
93
|
+
reaction:reactionType
|
|
94
|
+
}
|
|
95
|
+
let event = new CustomEvent("fbEvent", {
|
|
96
|
+
bubbles: false,
|
|
97
|
+
detail: widgetResponse,
|
|
98
|
+
});
|
|
99
|
+
window.dispatchEvent(event);
|
|
100
|
+
console.log(widgetResponse);
|
|
101
|
+
openThanksMessage()};
|
|
90
102
|
|
|
91
103
|
const openThanksMessage = () => {
|
|
92
104
|
visible = !visible;
|
package/src/main.js
CHANGED
|
@@ -11,35 +11,35 @@ export function feedbackCreator(response) {
|
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
14
|
+
let widget ={id: 1,
|
|
15
|
+
wgStatus: 1,
|
|
16
|
+
wgName: "ask",
|
|
17
|
+
wgDescription: "test",
|
|
18
|
+
wgCrtDt: "2021-12-05 10:49:14",
|
|
19
|
+
wgResponses: null,
|
|
20
|
+
wgUpdTime: null,
|
|
21
|
+
SiteId: 98,
|
|
22
|
+
UserId: 262,
|
|
23
|
+
wgLanguage: "en",
|
|
24
|
+
wgPosition: "0",
|
|
25
|
+
wgAccentColor: "#51797b",
|
|
26
|
+
wgAlternateColor: true,
|
|
27
|
+
wgQuestion: "How would you rate your experience?" ,
|
|
28
|
+
wgUserScreenshot: 1,
|
|
29
|
+
wgEmailReqMsg: "We may wish to follow up. Enter your email if you're happy for us to contact you." ,
|
|
30
|
+
wgEmailReqActivation: 1,
|
|
31
|
+
wgAdditionalMsg: "Heads up! This is for feedback only. Need help? Contact us via our [link to Help Center].",
|
|
32
|
+
wgAdditionalMsgActivation: 1,
|
|
33
|
+
wgThanksMsg: "Thank you for sharing your feedback with us",
|
|
34
|
+
wgThanksMsgActivation: 1,
|
|
35
|
+
wgDesktop: 1,
|
|
36
|
+
wgPhone: 1,
|
|
37
|
+
wgTablet:1,
|
|
38
|
+
wgPages: [{"id":0,"name":"*"}],
|
|
39
|
+
wgWidgetToUsers: 0,
|
|
40
|
+
wgPercentage:100,
|
|
41
|
+
wgEmail: "abd@gmail.com",
|
|
42
|
+
wgWidgetToAllPages: 1,
|
|
43
|
+
wgReactionStyle: 0,
|
|
44
|
+
wgResponseViaEmail: 1}
|
|
45
|
+
feedbackCreator(widget);
|
package/src/widgetPages/App.css
CHANGED
|
@@ -38,10 +38,7 @@ container{
|
|
|
38
38
|
writing-mode: vertical-lr;
|
|
39
39
|
transform: rotate(180deg);
|
|
40
40
|
cursor: pointer;
|
|
41
|
-
-
|
|
42
|
-
-ms-text-size-adjust:none;
|
|
43
|
-
-moz-text-size-adjust:none;
|
|
44
|
-
text-size-adjust:none;
|
|
41
|
+
font-size-adjust: 0.40;
|
|
45
42
|
}
|
|
46
43
|
.widget:hover {
|
|
47
44
|
width: 35px;
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
$: widgetComponent = 1;
|
|
7
7
|
let reactionNames = ["hate","dislike","neutral","like","love"];
|
|
8
8
|
let changingReactionNames = reactionNames;
|
|
9
|
-
let reactionType =
|
|
9
|
+
let reactionType = "";
|
|
10
|
+
let comment=""
|
|
11
|
+
let email =""
|
|
10
12
|
let reactionName = "test";
|
|
11
13
|
let reactionState = true;
|
|
12
14
|
$:pointerMargin = 10;
|
|
@@ -31,7 +33,7 @@
|
|
|
31
33
|
let checkTextAreaInterval;
|
|
32
34
|
let checkEmailAreaInterval;
|
|
33
35
|
|
|
34
|
-
export let closeHandler = () => {};
|
|
36
|
+
export let closeHandler = (email,comment,reactionType) => {};
|
|
35
37
|
|
|
36
38
|
|
|
37
39
|
const commentButtonDisable = () =>{
|
|
@@ -61,6 +63,9 @@
|
|
|
61
63
|
} else {
|
|
62
64
|
buttonState = true; //button is enabled
|
|
63
65
|
}
|
|
66
|
+
email = "";
|
|
67
|
+
email = document.getElementById("EmailTextArea").value;
|
|
68
|
+
|
|
64
69
|
}, 500);
|
|
65
70
|
|
|
66
71
|
|
|
@@ -89,7 +94,7 @@
|
|
|
89
94
|
console.log(name)
|
|
90
95
|
|
|
91
96
|
widgetComponent = state;
|
|
92
|
-
reactionType = rating;
|
|
97
|
+
reactionType = String(rating);
|
|
93
98
|
changingReactionNames = ["unSelectedHate","unSelectedDislike","unSelectedNeutral","unSelectedLike","unSelectedLove"];
|
|
94
99
|
|
|
95
100
|
if(count >0){
|
|
@@ -130,6 +135,7 @@
|
|
|
130
135
|
clearInterval(checkTextAreaInterval);
|
|
131
136
|
buttonState = false
|
|
132
137
|
widgetComponent = state;
|
|
138
|
+
comment = document.getElementsByClassName("textArea")[0].value;
|
|
133
139
|
}
|
|
134
140
|
|
|
135
141
|
|
|
@@ -266,13 +272,13 @@
|
|
|
266
272
|
<input type="text" id="EmailTextArea" placeholder="email@domain.com">
|
|
267
273
|
</div>
|
|
268
274
|
<div class="emailFooter">
|
|
269
|
-
<p id="skipText" on:click={() => closeHandler()}><u>Skip</u></p>
|
|
275
|
+
<p id="skipText" on:click={() => closeHandler(email,comment,reactionType)}><u>Skip</u></p>
|
|
270
276
|
{#if buttonState == false}
|
|
271
277
|
<button class="CommentButtonContDisable" disabled>
|
|
272
278
|
<p class="CommentButtonTxtDisable">Send</p>
|
|
273
279
|
</button>
|
|
274
280
|
{:else if buttonState == true}
|
|
275
|
-
<button class="sendButtonContCommentComp" on:click={() => closeHandler()}>
|
|
281
|
+
<button class="sendButtonContCommentComp" on:click={() => closeHandler(email,comment,reactionType)}>
|
|
276
282
|
<p class="SendButtonCommentComponent" >Send</p>
|
|
277
283
|
</button>
|
|
278
284
|
{/if}
|