@fullsession.io/fs-feedback-widget 1.7.5 → 1.7.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullsession.io/fs-feedback-widget",
3
- "version": "1.7.5",
3
+ "version": "1.7.6",
4
4
  "scripts": {
5
5
  "build": "rollup -c",
6
6
  "dev": "rollup -c -w",
package/src/App.svelte CHANGED
@@ -8,6 +8,7 @@
8
8
  import { scale } from "svelte/transition";
9
9
  import { onMount } from "svelte";
10
10
 
11
+ $: widgetId = feedback.id;
11
12
  $: widgetColor = feedback.wgAccentColor;
12
13
  $: widgetDisplayMode = feedback.wgDisplayMode;
13
14
  $: widgetType = feedback.wgType;
@@ -133,8 +134,14 @@
133
134
  widgetMarginLeft + "px",
134
135
  );
135
136
 
136
- $: transitionInParams = widgetDisplayMode === 1 ? { duration: 500 } : { x: inTransitionX, duration: 500 };
137
- $: transitionOutParams = widgetDisplayMode === 1? { duration: 500 } : { x: outTransitionX, duration: 300 };
137
+ $: transitionInParams =
138
+ widgetDisplayMode === 1
139
+ ? { duration: 500 }
140
+ : { x: inTransitionX, duration: 500 };
141
+ $: transitionOutParams =
142
+ widgetDisplayMode === 1
143
+ ? { duration: 500 }
144
+ : { x: outTransitionX, duration: 300 };
138
145
 
139
146
  let userClosedWidget = 0;
140
147
  let emailx = "";
@@ -144,6 +151,7 @@
144
151
  let widgetResponse;
145
152
  if (widgetType === 0) {
146
153
  widgetResponse = {
154
+ id: widgetId,
147
155
  email: email,
148
156
  comment: comment,
149
157
  reaction: Number(reactionType),
@@ -151,6 +159,7 @@
151
159
  };
152
160
  } else {
153
161
  widgetResponse = {
162
+ id: widgetId,
154
163
  email: email,
155
164
  questionAnswer: questionAnswer,
156
165
  type: widgetType,
@@ -229,33 +238,30 @@
229
238
  </div>
230
239
  {/if}
231
240
 
232
- {#if visible}
233
- <div
234
- class="fsCont"
235
- class:fsContModal={widgetDisplayMode === 1}
236
- in:transition={transitionInParams}
237
- >
238
- <div class="fsCloseCont" on:click={closeWidget}>
239
- <p id="fsCloseIcon">X</p>
240
- </div>
241
- <ReactionPage
242
- closeHandler={closeOne}
243
- bind:feedbackData={feedback}
244
- bind:wgType={widgetType}
245
- />
241
+ {#if visible}
242
+ <div
243
+ class="fsCont"
244
+ class:fsContModal={widgetDisplayMode === 1}
245
+ in:transition={transitionInParams}
246
+ >
247
+ <div class="fsCloseCont" on:click={closeWidget}>
248
+ <p id="fsCloseIcon">X</p>
246
249
  </div>
247
- {/if}
248
- {#if thanksMessageVisible}
249
- <div
250
- class="fsThanksMessageCont"
251
- out:transition={transitionOutParams}
252
- >
253
- <div class="fsCloseCont" on:click={closeThanksMessage}>
254
- <p id="fsCloseIcon">X</p>
255
- </div>
256
- <div class="thanks-txt">
257
- {widgetThanksMsg}
258
- </div>
250
+ <ReactionPage
251
+ closeHandler={closeOne}
252
+ bind:feedbackData={feedback}
253
+ bind:wgType={widgetType}
254
+ />
255
+ </div>
256
+ {/if}
257
+ {#if thanksMessageVisible}
258
+ <div class="fsThanksMessageCont" out:transition={transitionOutParams}>
259
+ <div class="fsCloseCont" on:click={closeThanksMessage}>
260
+ <p id="fsCloseIcon">X</p>
261
+ </div>
262
+ <div class="thanks-txt">
263
+ {widgetThanksMsg}
259
264
  </div>
260
- {/if}
265
+ </div>
266
+ {/if}
261
267
  </fsContainer>