surveysparrow-ionic-plugin 2.0.2-beta.4 → 2.0.2

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": "surveysparrow-ionic-plugin",
3
- "version": "2.0.2-beta.4",
3
+ "version": "2.0.2",
4
4
  "description": "SurveySparrow SDK enables you to collect feedback from your mobile app. Embed the Classic, Chat & NPS surveys in your ionic application seamlessly with few lines of code.",
5
5
  "type": "module",
6
6
  "main": "dist/plugin.cjs.js",
@@ -226,7 +226,7 @@ export class CloseSVGComponent {
226
226
  standalone: true,
227
227
  imports: [CommonModule, CloseSVGComponent],
228
228
  })
229
- export class CloseButtonComponent implements OnDestroy {
229
+ export class CloseButtonComponent implements OnInit, OnDestroy {
230
230
  @Input() size: number = 30;
231
231
  @Input() strokeWidth: number = 1.2;
232
232
 
@@ -246,7 +246,9 @@ export class CloseButtonComponent implements OnDestroy {
246
246
  this.stateService = getSpotcheckStateService();
247
247
  this.state = this.stateService.getState();
248
248
  this.updateComponentState();
249
+ }
249
250
 
251
+ ngOnInit(): void {
250
252
  this.stateSubscription = this.stateService.state$.subscribe(
251
253
  (newState: SpotcheckState) => {
252
254
  this.ngZone.run(() => {
@@ -304,7 +306,7 @@ export class CloseButtonComponent implements OnDestroy {
304
306
  export class SpotCheckComponent implements OnInit, OnDestroy {
305
307
  state: SpotcheckState;
306
308
  private spotcheckStateService: SpotcheckStateService;
307
- private stateSubscription: Subscription;
309
+ private stateSubscription!: Subscription;
308
310
  componentStyles: any = {};
309
311
  avatarUrl: string = '';
310
312
 
@@ -315,7 +317,9 @@ export class SpotCheckComponent implements OnInit, OnDestroy {
315
317
  this.spotcheckStateService = getSpotcheckStateService();
316
318
  this.state = this.spotcheckStateService.getState();
317
319
  this.updateComponentStyles();
320
+ }
318
321
 
322
+ ngOnInit(): void {
319
323
  this.stateSubscription = this.spotcheckStateService.state$.subscribe(
320
324
  (newState: SpotcheckState) => {
321
325
  this.ngZone.run(() => {
@@ -326,9 +330,6 @@ export class SpotCheckComponent implements OnInit, OnDestroy {
326
330
  });
327
331
  }
328
332
  );
329
- }
330
-
331
- ngOnInit(): void {
332
333
  this.initializeComponent();
333
334
  }
334
335