surveysparrow-ionic-plugin 2.0.2-beta.3 → 2.0.2-beta.5

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/plugin.js CHANGED
@@ -51692,7 +51692,12 @@ Please check that 1) the type for the parameter at index ${index} is correct and
51692
51692
  this.isVisible = false;
51693
51693
  this.isMiniCard = false;
51694
51694
  this.stroke = 'black';
51695
+ this.isClosing = false;
51695
51696
  this.onClick = async () => {
51697
+ if (this.isClosing) {
51698
+ return;
51699
+ }
51700
+ this.isClosing = true;
51696
51701
  await closeSpotCheck();
51697
51702
  handleSurveyEnd();
51698
51703
  this.ngZone.run(() => {
@@ -51702,6 +51707,8 @@ Please check that 1) the type for the parameter at index ${index} is correct and
51702
51707
  this.stateService = getSpotcheckStateService();
51703
51708
  this.state = this.stateService.getState();
51704
51709
  this.updateComponentState();
51710
+ }
51711
+ ngOnInit() {
51705
51712
  this.stateSubscription = this.stateService.state$.subscribe((newState) => {
51706
51713
  this.ngZone.run(() => {
51707
51714
  this.state = newState;
@@ -51727,6 +51734,9 @@ Please check that 1) the type for the parameter at index ${index} is correct and
51727
51734
  this.state.spotCheckType === 'chat'))));
51728
51735
  this.isMiniCard = this.state.spotChecksMode === 'miniCard';
51729
51736
  this.stroke = this.isMiniCard ? 'black' : ((_a = this.state.closeButtonStyle) === null || _a === void 0 ? void 0 : _a['ctaButton']) || 'black';
51737
+ if (this.isVisible) {
51738
+ this.isClosing = false;
51739
+ }
51730
51740
  }
51731
51741
  };
51732
51742
  __decorate$1([
@@ -51799,6 +51809,8 @@ Please check that 1) the type for the parameter at index ${index} is correct and
51799
51809
  this.spotcheckStateService = getSpotcheckStateService();
51800
51810
  this.state = this.spotcheckStateService.getState();
51801
51811
  this.updateComponentStyles();
51812
+ }
51813
+ ngOnInit() {
51802
51814
  this.stateSubscription = this.spotcheckStateService.state$.subscribe((newState) => {
51803
51815
  this.ngZone.run(() => {
51804
51816
  this.state = newState;
@@ -51807,8 +51819,6 @@ Please check that 1) the type for the parameter at index ${index} is correct and
51807
51819
  this.cdr.detectChanges();
51808
51820
  });
51809
51821
  });
51810
- }
51811
- ngOnInit() {
51812
51822
  this.initializeComponent();
51813
51823
  }
51814
51824
  ngOnDestroy() {