@fullsession.io/fs-feedback-widget 1.4.6 → 1.4.7

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.4.6",
3
+ "version": "1.4.7",
4
4
  "scripts": {
5
5
  "build": "rollup -c",
6
6
  "dev": "rollup -c -w",
package/src/App.svelte CHANGED
@@ -2,7 +2,6 @@
2
2
  import MainIcon from "./Icons/mainIcon.svelte";
3
3
  import ReactionPage from "./widgetPages/reactionPage.svelte";
4
4
  export let feedback;
5
- export let containerState;
6
5
  console.log(feedback);
7
6
  import { fly } from "svelte/transition";
8
7
  import "../src/widgetPages/App.css";
@@ -177,7 +176,6 @@
177
176
  };
178
177
 
179
178
  </script>
180
- {#if containerState == 0}
181
179
  <fsContainer>
182
180
  {#if buttonVisible}
183
181
  <div class="fsWidget" on:click={openWidget}>
@@ -219,48 +217,5 @@
219
217
  </div>
220
218
  {/if}
221
219
  </fsContainer>
222
- {/if}
223
220
 
224
- {#if containerState == 1}
225
- <fsContainerApp>
226
- {#if buttonVisible}
227
- <div class="fsWidget" on:click={openWidget}>
228
- <div id="fsFeedbackTxt">{widgetName}</div>
229
- <div id="fsMainIcon">
230
- <MainIcon bind:fill={iconColor} />
231
- </div>
232
- </div>
233
- {/if}
234
221
 
235
- {#if visible}
236
- <div class="fsCont" in:fly={{ x: inTransitionX, duration: 500 }}>
237
- <div class="fsCloseCont" on:click={closeWidget}>
238
- <p id="fsCloseIcon">X</p>
239
- </div>
240
- <ReactionPage
241
- closeHandler={closeOne}
242
- bind:feedbackData={feedback}
243
- closeHandlerBeforeFinishing={closeBeforeFinsihing}
244
- />
245
- </div>
246
- {/if}
247
- {#if thanksMessageVisible}
248
- <div
249
- class="fsThanksMessageCont"
250
- out:fly={{ x: outTransitionX, duration: 300 }}
251
- >
252
- <div class="fsCloseCont" on:click={closeThanksMessage}>
253
- <p id="fsCloseIcon">X</p>
254
- </div>
255
- <div
256
- style=" width: 61%;
257
- text-align: center;
258
- margin-top: 7%;
259
- margin-left: 20%;"
260
- >
261
- {feedback.wgThanksMsg}
262
- </div>
263
- </div>
264
- {/if}
265
- </fsContainerApp>
266
- {/if}
package/src/main.js CHANGED
@@ -2,12 +2,18 @@ import App from './App.svelte';
2
2
 
3
3
 
4
4
 
5
- export function feedbackCreator(response,containerState) {
5
+ export function feedbackCreator(response,htmlElement) {
6
+ let view;
7
+ if(htmlElement == null || htmlElement == undefined){
8
+ view = document.body
9
+ }
10
+ else{
11
+ view = document.body.htmlElement
12
+ }
6
13
  new App({
7
- target: document.body,
14
+ target: view,
8
15
  props: {
9
- feedback: response,
10
- containerState: containerState
16
+ feedback: response
11
17
  }
12
18
  });
13
19
  }