@fullsession.io/fs-feedback-widget 1.7.2 → 1.7.4
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/README.md +109 -109
- 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 +31 -31
- package/src/App.svelte +247 -246
- package/src/Icons/mainIcon.svelte +25 -25
- package/src/Icons/reactionIcons.svelte +94 -96
- package/src/Icons/reactionSvgs/icons.js +276 -476
- package/src/main.js +56 -56
- package/src/widgetPages/App.css +157 -157
- package/src/widgetPages/reactionPage.svelte +383 -383
- package/src/widgetPages/reactionpage.css +273 -273
- package/src/Icons/reactionSvgs/images/images.js +0 -37
package/package.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@fullsession.io/fs-feedback-widget",
|
|
3
|
-
"version": "1.7.
|
|
4
|
-
"scripts": {
|
|
5
|
-
"build": "rollup -c",
|
|
6
|
-
"dev": "rollup -c -w",
|
|
7
|
-
"start": "sirv public --no-clear",
|
|
8
|
-
"prepublish": "npm run build",
|
|
9
|
-
"prepublishOnly": "npm run build"
|
|
10
|
-
},
|
|
11
|
-
"devDependencies": {
|
|
12
|
-
"@rollup/plugin-commonjs": "^17.0.0",
|
|
13
|
-
"@rollup/plugin-node-resolve": "^11.0.0",
|
|
14
|
-
"rollup": "^2.3.4",
|
|
15
|
-
"rollup-plugin-css-only": "^3.1.0",
|
|
16
|
-
"rollup-plugin-livereload": "^2.0.0",
|
|
17
|
-
"rollup-plugin-svelte": "^7.0.0",
|
|
18
|
-
"rollup-plugin-terser": "^7.0.0",
|
|
19
|
-
"svelte": "^3.0.0"
|
|
20
|
-
},
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
23
|
-
"sirv-cli": "^2.0.2"
|
|
24
|
-
},
|
|
25
|
-
"files": [
|
|
26
|
-
"src",
|
|
27
|
-
"dist"
|
|
28
|
-
],
|
|
29
|
-
"main": "dist/index.js",
|
|
30
|
-
"module": "dist/index.mjs",
|
|
31
|
-
"unpkg": "dist/index.js"
|
|
1
|
+
{
|
|
2
|
+
"name": "@fullsession.io/fs-feedback-widget",
|
|
3
|
+
"version": "1.7.4",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"build": "rollup -c",
|
|
6
|
+
"dev": "rollup -c -w",
|
|
7
|
+
"start": "sirv public --no-clear",
|
|
8
|
+
"prepublish": "npm run build",
|
|
9
|
+
"prepublishOnly": "npm run build"
|
|
10
|
+
},
|
|
11
|
+
"devDependencies": {
|
|
12
|
+
"@rollup/plugin-commonjs": "^17.0.0",
|
|
13
|
+
"@rollup/plugin-node-resolve": "^11.0.0",
|
|
14
|
+
"rollup": "^2.3.4",
|
|
15
|
+
"rollup-plugin-css-only": "^3.1.0",
|
|
16
|
+
"rollup-plugin-livereload": "^2.0.0",
|
|
17
|
+
"rollup-plugin-svelte": "^7.0.0",
|
|
18
|
+
"rollup-plugin-terser": "^7.0.0",
|
|
19
|
+
"svelte": "^3.0.0"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
23
|
+
"sirv-cli": "^2.0.2"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"src",
|
|
27
|
+
"dist"
|
|
28
|
+
],
|
|
29
|
+
"main": "dist/index.js",
|
|
30
|
+
"module": "dist/index.mjs",
|
|
31
|
+
"unpkg": "dist/index.js"
|
|
32
32
|
}
|
package/src/App.svelte
CHANGED
|
@@ -1,246 +1,247 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import MainIcon from "./Icons/mainIcon.svelte";
|
|
3
|
-
import ReactionPage from "./widgetPages/reactionPage.svelte";
|
|
4
|
-
export let feedback;
|
|
5
|
-
export let widgetPosition;
|
|
6
|
-
import { fly } from "svelte/transition";
|
|
7
|
-
import "../src/widgetPages/App.css";
|
|
8
|
-
|
|
9
|
-
$: widgetColor = feedback.wgAccentColor;
|
|
10
|
-
$: widgetDisplayMode = feedback.wgDisplayMode;
|
|
11
|
-
$: widgetType = feedback.wgType;
|
|
12
|
-
$: widgetLanguage = feedback.wgLanguage;
|
|
13
|
-
$: widgetAlternateColor = feedback.wgAlternateColor;
|
|
14
|
-
$: wgPosition = feedback.wgPosition;
|
|
15
|
-
$: widgetThanksMsg = feedback.wgThanksMsg;
|
|
16
|
-
$: document.documentElement.style.setProperty("--widgetColor", widgetColor);
|
|
17
|
-
|
|
18
|
-
let widgetTextColor = "";
|
|
19
|
-
let iconColor = "";
|
|
20
|
-
let widgetName = "Feedback";
|
|
21
|
-
$: if (widgetLanguage == "en") {
|
|
22
|
-
widgetName = " Feedback";
|
|
23
|
-
} else if (widgetLanguage == "ar") {
|
|
24
|
-
widgetName = "رأي";
|
|
25
|
-
} else {
|
|
26
|
-
widgetName = "Rétroaction";
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
$: if (widgetAlternateColor === true) {
|
|
30
|
-
widgetTextColor = "white";
|
|
31
|
-
iconColor = "white";
|
|
32
|
-
} else {
|
|
33
|
-
widgetTextColor = "black";
|
|
34
|
-
iconColor = "black";
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
$: document.documentElement.style.setProperty(
|
|
38
|
-
"--widgetTextColor",
|
|
39
|
-
widgetTextColor
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
let wgPositionHorizintal = "";
|
|
43
|
-
let wgPositionVertical = "";
|
|
44
|
-
let widgetLeftSideBorder = 0;
|
|
45
|
-
let widgetRightSideBorder = 0;
|
|
46
|
-
let widgetMarginRight = 0;
|
|
47
|
-
let widgetMarginLeft = 0;
|
|
48
|
-
let visible = false;
|
|
49
|
-
let buttonVisible = true;
|
|
50
|
-
let thanksMessageVisible = false;
|
|
51
|
-
let inTransitionX = 0;
|
|
52
|
-
let outTransitionX = 0;
|
|
53
|
-
let positionState = "";
|
|
54
|
-
|
|
55
|
-
if (widgetPosition == "fixed") {
|
|
56
|
-
positionState = "fixed";
|
|
57
|
-
} else {
|
|
58
|
-
positionState = "absolute";
|
|
59
|
-
}
|
|
60
|
-
$: document.documentElement.style.setProperty(
|
|
61
|
-
"--positionState",
|
|
62
|
-
positionState
|
|
63
|
-
);
|
|
64
|
-
$: if (Number(wgPosition) == 0) {
|
|
65
|
-
wgPositionHorizintal = "center";
|
|
66
|
-
wgPositionVertical = "row-reverse";
|
|
67
|
-
widgetLeftSideBorder = 5;
|
|
68
|
-
widgetRightSideBorder = 0;
|
|
69
|
-
widgetMarginRight = 30;
|
|
70
|
-
widgetMarginLeft = 0;
|
|
71
|
-
inTransitionX = -100;
|
|
72
|
-
outTransitionX = 20;
|
|
73
|
-
} else if (Number(wgPosition) == 1) {
|
|
74
|
-
wgPositionHorizintal = "center";
|
|
75
|
-
wgPositionVertical = "row";
|
|
76
|
-
widgetLeftSideBorder = 0;
|
|
77
|
-
widgetRightSideBorder = 5;
|
|
78
|
-
widgetMarginRight = 0;
|
|
79
|
-
widgetMarginLeft = 30;
|
|
80
|
-
inTransitionX = 100;
|
|
81
|
-
outTransitionX = -20;
|
|
82
|
-
} else if (Number(wgPosition) == 2) {
|
|
83
|
-
wgPositionHorizintal = "flex-end";
|
|
84
|
-
wgPositionVertical = "row-reverse";
|
|
85
|
-
widgetLeftSideBorder = 5;
|
|
86
|
-
widgetMarginRight = 30;
|
|
87
|
-
widgetMarginLeft = 0;
|
|
88
|
-
inTransitionX = -100;
|
|
89
|
-
outTransitionX = 20;
|
|
90
|
-
} else if (Number(wgPosition) == 3) {
|
|
91
|
-
wgPositionHorizintal = "flex-end";
|
|
92
|
-
wgPositionVertical = "row";
|
|
93
|
-
widgetLeftSideBorder = 0;
|
|
94
|
-
widgetRightSideBorder = 5;
|
|
95
|
-
widgetMarginRight = 0;
|
|
96
|
-
widgetMarginLeft = 30;
|
|
97
|
-
inTransitionX = 100;
|
|
98
|
-
outTransitionX = -20;
|
|
99
|
-
}
|
|
100
|
-
$: document.documentElement.style.setProperty(
|
|
101
|
-
"--wgPositionHorizintal",
|
|
102
|
-
wgPositionHorizintal
|
|
103
|
-
);
|
|
104
|
-
$: document.documentElement.style.setProperty(
|
|
105
|
-
"--wgPositionVertical",
|
|
106
|
-
wgPositionVertical
|
|
107
|
-
);
|
|
108
|
-
$: document.documentElement.style.setProperty(
|
|
109
|
-
"--widgetLeftSideBorder",
|
|
110
|
-
widgetLeftSideBorder + "px"
|
|
111
|
-
);
|
|
112
|
-
$: document.documentElement.style.setProperty(
|
|
113
|
-
"--widgetRightSideBorder",
|
|
114
|
-
widgetRightSideBorder + "px"
|
|
115
|
-
);
|
|
116
|
-
$: document.documentElement.style.setProperty(
|
|
117
|
-
"--widgetMarginRight",
|
|
118
|
-
widgetMarginRight + "px"
|
|
119
|
-
);
|
|
120
|
-
$: document.documentElement.style.setProperty(
|
|
121
|
-
"--widgetMarginLeft",
|
|
122
|
-
widgetMarginLeft + "px"
|
|
123
|
-
);
|
|
124
|
-
|
|
125
|
-
let userClosedWidget = 0;
|
|
126
|
-
let emailx = "";
|
|
127
|
-
let commentx = "";
|
|
128
|
-
let reactionTypex = "";
|
|
129
|
-
const closeOne = (email, comment, reactionType, questionAnswer) => {
|
|
130
|
-
let widgetResponse;
|
|
131
|
-
if (widgetType === 0) {
|
|
132
|
-
widgetResponse = {
|
|
133
|
-
email: email,
|
|
134
|
-
comment: comment,
|
|
135
|
-
reaction: Number(reactionType),
|
|
136
|
-
type: widgetType,
|
|
137
|
-
};
|
|
138
|
-
} else {
|
|
139
|
-
widgetResponse = {
|
|
140
|
-
email: email,
|
|
141
|
-
questionAnswer: questionAnswer,
|
|
142
|
-
type: widgetType,
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
let event = new CustomEvent("fbEvent", {
|
|
147
|
-
bubbles: false,
|
|
148
|
-
detail: widgetResponse,
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
window.dispatchEvent(event);
|
|
152
|
-
openThanksMessage();
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
// const closeBeforeFinsihing = (email, comment, reactionType) => {
|
|
156
|
-
// emailx = email;
|
|
157
|
-
// commentx = comment;
|
|
158
|
-
// reactionTypex = Number(reactionType);
|
|
159
|
-
// let widgetResponse = {
|
|
160
|
-
// email: email,
|
|
161
|
-
// comment: comment,
|
|
162
|
-
// reaction: reactionType,
|
|
163
|
-
// };
|
|
164
|
-
// if (userClosedWidget == 1) {
|
|
165
|
-
// console.log("hi", widgetResponse);
|
|
166
|
-
// let event = new CustomEvent("fbEvent", {
|
|
167
|
-
// bubbles: false,
|
|
168
|
-
// detail: widgetResponse,
|
|
169
|
-
// });
|
|
170
|
-
// window.dispatchEvent(event);
|
|
171
|
-
// console.log(widgetResponse);
|
|
172
|
-
// }
|
|
173
|
-
// };
|
|
174
|
-
|
|
175
|
-
const openThanksMessage = () => {
|
|
176
|
-
visible = !visible;
|
|
177
|
-
thanksMessageVisible = !thanksMessageVisible;
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
const closeThanksMessage = () => {
|
|
181
|
-
thanksMessageVisible = !thanksMessageVisible;
|
|
182
|
-
setTimeout(function () {
|
|
183
|
-
buttonVisible = !buttonVisible;
|
|
184
|
-
}, 350);
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
const openWidget = () => {
|
|
188
|
-
visible = !visible;
|
|
189
|
-
buttonVisible = !buttonVisible;
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
const closeWidget = () => {
|
|
193
|
-
userClosedWidget = 1;
|
|
194
|
-
if (reactionTypex != 0) {
|
|
195
|
-
closeBeforeFinsihing(emailx, commentx, reactionTypex);
|
|
196
|
-
}
|
|
197
|
-
visible = !visible;
|
|
198
|
-
setTimeout(function () {
|
|
199
|
-
buttonVisible = !buttonVisible;
|
|
200
|
-
}, 350);
|
|
201
|
-
};
|
|
202
|
-
</script>
|
|
203
|
-
|
|
204
|
-
<fsContainer
|
|
205
|
-
class={!buttonVisible && widgetDisplayMode == 1 ? "modal" : "side"}
|
|
206
|
-
style="position: 10px"
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
<div id="
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
class
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
bind:
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
{
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
1
|
+
<script>
|
|
2
|
+
import MainIcon from "./Icons/mainIcon.svelte";
|
|
3
|
+
import ReactionPage from "./widgetPages/reactionPage.svelte";
|
|
4
|
+
export let feedback;
|
|
5
|
+
export let widgetPosition;
|
|
6
|
+
import { fly } from "svelte/transition";
|
|
7
|
+
import "../src/widgetPages/App.css";
|
|
8
|
+
|
|
9
|
+
$: widgetColor = feedback.wgAccentColor;
|
|
10
|
+
$: widgetDisplayMode = feedback.wgDisplayMode;
|
|
11
|
+
$: widgetType = feedback.wgType;
|
|
12
|
+
$: widgetLanguage = feedback.wgLanguage;
|
|
13
|
+
$: widgetAlternateColor = feedback.wgAlternateColor;
|
|
14
|
+
$: wgPosition = feedback.wgPosition;
|
|
15
|
+
$: widgetThanksMsg = feedback.wgThanksMsg;
|
|
16
|
+
$: document.documentElement.style.setProperty("--widgetColor", widgetColor);
|
|
17
|
+
|
|
18
|
+
let widgetTextColor = "";
|
|
19
|
+
let iconColor = "";
|
|
20
|
+
let widgetName = "Feedback";
|
|
21
|
+
$: if (widgetLanguage == "en") {
|
|
22
|
+
widgetName = " Feedback";
|
|
23
|
+
} else if (widgetLanguage == "ar") {
|
|
24
|
+
widgetName = "رأي";
|
|
25
|
+
} else {
|
|
26
|
+
widgetName = "Rétroaction";
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
$: if (widgetAlternateColor === true) {
|
|
30
|
+
widgetTextColor = "white";
|
|
31
|
+
iconColor = "white";
|
|
32
|
+
} else {
|
|
33
|
+
widgetTextColor = "black";
|
|
34
|
+
iconColor = "black";
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
$: document.documentElement.style.setProperty(
|
|
38
|
+
"--widgetTextColor",
|
|
39
|
+
widgetTextColor
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
let wgPositionHorizintal = "";
|
|
43
|
+
let wgPositionVertical = "";
|
|
44
|
+
let widgetLeftSideBorder = 0;
|
|
45
|
+
let widgetRightSideBorder = 0;
|
|
46
|
+
let widgetMarginRight = 0;
|
|
47
|
+
let widgetMarginLeft = 0;
|
|
48
|
+
let visible = false;
|
|
49
|
+
let buttonVisible = true;
|
|
50
|
+
let thanksMessageVisible = false;
|
|
51
|
+
let inTransitionX = 0;
|
|
52
|
+
let outTransitionX = 0;
|
|
53
|
+
let positionState = "";
|
|
54
|
+
|
|
55
|
+
if (widgetPosition == "fixed") {
|
|
56
|
+
positionState = "fixed";
|
|
57
|
+
} else {
|
|
58
|
+
positionState = "absolute";
|
|
59
|
+
}
|
|
60
|
+
$: document.documentElement.style.setProperty(
|
|
61
|
+
"--positionState",
|
|
62
|
+
positionState
|
|
63
|
+
);
|
|
64
|
+
$: if (Number(wgPosition) == 0) {
|
|
65
|
+
wgPositionHorizintal = "center";
|
|
66
|
+
wgPositionVertical = "row-reverse";
|
|
67
|
+
widgetLeftSideBorder = 5;
|
|
68
|
+
widgetRightSideBorder = 0;
|
|
69
|
+
widgetMarginRight = 30;
|
|
70
|
+
widgetMarginLeft = 0;
|
|
71
|
+
inTransitionX = -100;
|
|
72
|
+
outTransitionX = 20;
|
|
73
|
+
} else if (Number(wgPosition) == 1) {
|
|
74
|
+
wgPositionHorizintal = "center";
|
|
75
|
+
wgPositionVertical = "row";
|
|
76
|
+
widgetLeftSideBorder = 0;
|
|
77
|
+
widgetRightSideBorder = 5;
|
|
78
|
+
widgetMarginRight = 0;
|
|
79
|
+
widgetMarginLeft = 30;
|
|
80
|
+
inTransitionX = 100;
|
|
81
|
+
outTransitionX = -20;
|
|
82
|
+
} else if (Number(wgPosition) == 2) {
|
|
83
|
+
wgPositionHorizintal = "flex-end";
|
|
84
|
+
wgPositionVertical = "row-reverse";
|
|
85
|
+
widgetLeftSideBorder = 5;
|
|
86
|
+
widgetMarginRight = 30;
|
|
87
|
+
widgetMarginLeft = 0;
|
|
88
|
+
inTransitionX = -100;
|
|
89
|
+
outTransitionX = 20;
|
|
90
|
+
} else if (Number(wgPosition) == 3) {
|
|
91
|
+
wgPositionHorizintal = "flex-end";
|
|
92
|
+
wgPositionVertical = "row";
|
|
93
|
+
widgetLeftSideBorder = 0;
|
|
94
|
+
widgetRightSideBorder = 5;
|
|
95
|
+
widgetMarginRight = 0;
|
|
96
|
+
widgetMarginLeft = 30;
|
|
97
|
+
inTransitionX = 100;
|
|
98
|
+
outTransitionX = -20;
|
|
99
|
+
}
|
|
100
|
+
$: document.documentElement.style.setProperty(
|
|
101
|
+
"--wgPositionHorizintal",
|
|
102
|
+
wgPositionHorizintal
|
|
103
|
+
);
|
|
104
|
+
$: document.documentElement.style.setProperty(
|
|
105
|
+
"--wgPositionVertical",
|
|
106
|
+
wgPositionVertical
|
|
107
|
+
);
|
|
108
|
+
$: document.documentElement.style.setProperty(
|
|
109
|
+
"--widgetLeftSideBorder",
|
|
110
|
+
widgetLeftSideBorder + "px"
|
|
111
|
+
);
|
|
112
|
+
$: document.documentElement.style.setProperty(
|
|
113
|
+
"--widgetRightSideBorder",
|
|
114
|
+
widgetRightSideBorder + "px"
|
|
115
|
+
);
|
|
116
|
+
$: document.documentElement.style.setProperty(
|
|
117
|
+
"--widgetMarginRight",
|
|
118
|
+
widgetMarginRight + "px"
|
|
119
|
+
);
|
|
120
|
+
$: document.documentElement.style.setProperty(
|
|
121
|
+
"--widgetMarginLeft",
|
|
122
|
+
widgetMarginLeft + "px"
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
let userClosedWidget = 0;
|
|
126
|
+
let emailx = "";
|
|
127
|
+
let commentx = "";
|
|
128
|
+
let reactionTypex = "";
|
|
129
|
+
const closeOne = (email, comment, reactionType, questionAnswer) => {
|
|
130
|
+
let widgetResponse;
|
|
131
|
+
if (widgetType === 0) {
|
|
132
|
+
widgetResponse = {
|
|
133
|
+
email: email,
|
|
134
|
+
comment: comment,
|
|
135
|
+
reaction: Number(reactionType),
|
|
136
|
+
type: widgetType,
|
|
137
|
+
};
|
|
138
|
+
} else {
|
|
139
|
+
widgetResponse = {
|
|
140
|
+
email: email,
|
|
141
|
+
questionAnswer: questionAnswer,
|
|
142
|
+
type: widgetType,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
let event = new CustomEvent("fbEvent", {
|
|
147
|
+
bubbles: false,
|
|
148
|
+
detail: widgetResponse,
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
window.dispatchEvent(event);
|
|
152
|
+
openThanksMessage();
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
// const closeBeforeFinsihing = (email, comment, reactionType) => {
|
|
156
|
+
// emailx = email;
|
|
157
|
+
// commentx = comment;
|
|
158
|
+
// reactionTypex = Number(reactionType);
|
|
159
|
+
// let widgetResponse = {
|
|
160
|
+
// email: email,
|
|
161
|
+
// comment: comment,
|
|
162
|
+
// reaction: reactionType,
|
|
163
|
+
// };
|
|
164
|
+
// if (userClosedWidget == 1) {
|
|
165
|
+
// console.log("hi", widgetResponse);
|
|
166
|
+
// let event = new CustomEvent("fbEvent", {
|
|
167
|
+
// bubbles: false,
|
|
168
|
+
// detail: widgetResponse,
|
|
169
|
+
// });
|
|
170
|
+
// window.dispatchEvent(event);
|
|
171
|
+
// console.log(widgetResponse);
|
|
172
|
+
// }
|
|
173
|
+
// };
|
|
174
|
+
|
|
175
|
+
const openThanksMessage = () => {
|
|
176
|
+
visible = !visible;
|
|
177
|
+
thanksMessageVisible = !thanksMessageVisible;
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
const closeThanksMessage = () => {
|
|
181
|
+
thanksMessageVisible = !thanksMessageVisible;
|
|
182
|
+
setTimeout(function () {
|
|
183
|
+
buttonVisible = !buttonVisible;
|
|
184
|
+
}, 350);
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
const openWidget = () => {
|
|
188
|
+
visible = !visible;
|
|
189
|
+
buttonVisible = !buttonVisible;
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
const closeWidget = () => {
|
|
193
|
+
userClosedWidget = 1;
|
|
194
|
+
if (reactionTypex != 0) {
|
|
195
|
+
closeBeforeFinsihing(emailx, commentx, reactionTypex);
|
|
196
|
+
}
|
|
197
|
+
visible = !visible;
|
|
198
|
+
setTimeout(function () {
|
|
199
|
+
buttonVisible = !buttonVisible;
|
|
200
|
+
}, 350);
|
|
201
|
+
};
|
|
202
|
+
</script>
|
|
203
|
+
|
|
204
|
+
<fsContainer
|
|
205
|
+
class={!buttonVisible && widgetDisplayMode == 1 ? "modal" : "side"}
|
|
206
|
+
style="position: 10px"
|
|
207
|
+
dir="ltr"
|
|
208
|
+
>
|
|
209
|
+
{#if buttonVisible}
|
|
210
|
+
<div class="fsWidget" on:click={openWidget}>
|
|
211
|
+
<div id="fsFeedbackTxt">{widgetName}</div>
|
|
212
|
+
<div id="fsMainIcon">
|
|
213
|
+
<MainIcon bind:fill={iconColor} />
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
{/if}
|
|
217
|
+
|
|
218
|
+
{#if visible}
|
|
219
|
+
<div
|
|
220
|
+
class="fsCont"
|
|
221
|
+
class:fsContModal={widgetDisplayMode === 1}
|
|
222
|
+
in:fly={{ x: inTransitionX, duration: 500 }}
|
|
223
|
+
>
|
|
224
|
+
<div class="fsCloseCont" on:click={closeWidget}>
|
|
225
|
+
<p id="fsCloseIcon">X</p>
|
|
226
|
+
</div>
|
|
227
|
+
<ReactionPage
|
|
228
|
+
closeHandler={closeOne}
|
|
229
|
+
bind:feedbackData={feedback}
|
|
230
|
+
bind:wgType={widgetType}
|
|
231
|
+
/>
|
|
232
|
+
</div>
|
|
233
|
+
{/if}
|
|
234
|
+
{#if thanksMessageVisible}
|
|
235
|
+
<div
|
|
236
|
+
class="fsThanksMessageCont"
|
|
237
|
+
out:fly={{ x: outTransitionX, duration: 300 }}
|
|
238
|
+
>
|
|
239
|
+
<div class="fsCloseCont" on:click={closeThanksMessage}>
|
|
240
|
+
<p id="fsCloseIcon">X</p>
|
|
241
|
+
</div>
|
|
242
|
+
<div class="thanks-txt">
|
|
243
|
+
{widgetThanksMsg}
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
{/if}
|
|
247
|
+
</fsContainer>
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export let fill = "";
|
|
3
|
-
</script>
|
|
4
|
-
<svg
|
|
5
|
-
fill={fill}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
version="1.1"
|
|
9
|
-
id="Layer_1"
|
|
10
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
12
|
-
x="0px"
|
|
13
|
-
y="0px"
|
|
14
|
-
viewBox="0 0 458 458"
|
|
15
|
-
style="enable-background:new 0 0 458 458;"
|
|
16
|
-
xml:space="preserve"
|
|
17
|
-
><g
|
|
18
|
-
><g
|
|
19
|
-
><path
|
|
20
|
-
d="M428,41.534H30c-16.569,0-30,13.431-30,30v252c0,16.568,13.432,30,30,30h132.1l43.942,52.243 c5.7,6.777,14.103,10.69,22.959,10.69c8.856,0,17.258-3.912,22.959-10.69l43.942-52.243H428c16.568,0,30-13.432,30-30v-252 C458,54.965,444.568,41.534,428,41.534z M323.916,281.534H82.854c-8.284,0-15-6.716-15-15s6.716-15,15-15h241.062 c8.284,0,15,6.716,15,15S332.2,281.534,323.916,281.534z M67.854,198.755c0-8.284,6.716-15,15-15h185.103c8.284,0,15,6.716,15,15 s-6.716,15-15,15H82.854C74.57,213.755,67.854,207.039,67.854,198.755z M375.146,145.974H82.854c-8.284,0-15-6.716-15-15 s6.716-15,15-15h292.291c8.284,0,15,6.716,15,15C390.146,139.258,383.43,145.974,375.146,145.974z"
|
|
21
|
-
/></g
|
|
22
|
-
></g
|
|
23
|
-
><g /><g /><g /><g /><g /><g /><g /><g /><g /><g /><g /><g /><g /><g /><g
|
|
24
|
-
/></svg
|
|
25
|
-
>
|
|
1
|
+
<script>
|
|
2
|
+
export let fill = "";
|
|
3
|
+
</script>
|
|
4
|
+
<svg
|
|
5
|
+
fill={fill}
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
version="1.1"
|
|
9
|
+
id="Layer_1"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
12
|
+
x="0px"
|
|
13
|
+
y="0px"
|
|
14
|
+
viewBox="0 0 458 458"
|
|
15
|
+
style="enable-background:new 0 0 458 458;"
|
|
16
|
+
xml:space="preserve"
|
|
17
|
+
><g
|
|
18
|
+
><g
|
|
19
|
+
><path
|
|
20
|
+
d="M428,41.534H30c-16.569,0-30,13.431-30,30v252c0,16.568,13.432,30,30,30h132.1l43.942,52.243 c5.7,6.777,14.103,10.69,22.959,10.69c8.856,0,17.258-3.912,22.959-10.69l43.942-52.243H428c16.568,0,30-13.432,30-30v-252 C458,54.965,444.568,41.534,428,41.534z M323.916,281.534H82.854c-8.284,0-15-6.716-15-15s6.716-15,15-15h241.062 c8.284,0,15,6.716,15,15S332.2,281.534,323.916,281.534z M67.854,198.755c0-8.284,6.716-15,15-15h185.103c8.284,0,15,6.716,15,15 s-6.716,15-15,15H82.854C74.57,213.755,67.854,207.039,67.854,198.755z M375.146,145.974H82.854c-8.284,0-15-6.716-15-15 s6.716-15,15-15h292.291c8.284,0,15,6.716,15,15C390.146,139.258,383.43,145.974,375.146,145.974z"
|
|
21
|
+
/></g
|
|
22
|
+
></g
|
|
23
|
+
><g /><g /><g /><g /><g /><g /><g /><g /><g /><g /><g /><g /><g /><g /><g
|
|
24
|
+
/></svg
|
|
25
|
+
>
|