apps-sdk 1.1.58 → 1.1.59
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
|
@@ -13,7 +13,6 @@ class AdaptyOnboarding extends React.Component {
|
|
|
13
13
|
isLoading: true,
|
|
14
14
|
};
|
|
15
15
|
this.remoteConfig = null;
|
|
16
|
-
this.termsAccepted = false;
|
|
17
16
|
this.currentStep = 0;
|
|
18
17
|
this.totalSteps = 0;
|
|
19
18
|
}
|
|
@@ -62,13 +61,6 @@ class AdaptyOnboarding extends React.Component {
|
|
|
62
61
|
|
|
63
62
|
// --------------------------------------- Event Handlers ---------------------------------------
|
|
64
63
|
handleCustom = (actionId, meta) => {
|
|
65
|
-
config.DEBUG_MODE && console.log('Onboarding custom action:', actionId, meta);
|
|
66
|
-
|
|
67
|
-
if (actionId === 'accept_terms') {
|
|
68
|
-
this.termsAccepted = true;
|
|
69
|
-
config.DEBUG_MODE && console.log('Terms accepted');
|
|
70
|
-
}
|
|
71
|
-
|
|
72
64
|
if (this.props.onCustom) {
|
|
73
65
|
this.props.onCustom(actionId, meta, this.remoteConfig);
|
|
74
66
|
}
|
|
@@ -76,33 +68,16 @@ class AdaptyOnboarding extends React.Component {
|
|
|
76
68
|
|
|
77
69
|
handleClose = (actionId, meta) => {
|
|
78
70
|
const isLastStep = this.totalSteps > 0 && this.currentStep === this.totalSteps - 1;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
actionId,
|
|
83
|
-
meta,
|
|
84
|
-
termsAccepted: this.termsAccepted,
|
|
85
|
-
currentStep: this.currentStep,
|
|
86
|
-
totalSteps: this.totalSteps,
|
|
87
|
-
isLastStep,
|
|
88
|
-
canClose
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
if (!canClose) {
|
|
92
|
-
config.DEBUG_MODE && console.log('Close prevented');
|
|
93
|
-
return false;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
config.DEBUG_MODE && console.log('Close allowed');
|
|
97
|
-
|
|
71
|
+
|
|
72
|
+
config.DEBUG_MODE && console.log('Onboarding close attempt AdaptyOnboarding:', {actionId, meta, currentStep: this.currentStep, totalSteps: this.totalSteps, isLastStep });
|
|
73
|
+
|
|
98
74
|
if (this.props.onClose) {
|
|
99
75
|
this.props.onClose(actionId, meta, this.remoteConfig);
|
|
100
76
|
}
|
|
101
|
-
|
|
102
|
-
this.termsAccepted = false;
|
|
77
|
+
|
|
103
78
|
this.currentStep = 0;
|
|
104
79
|
this.totalSteps = 0;
|
|
105
|
-
|
|
80
|
+
|
|
106
81
|
return true;
|
|
107
82
|
}
|
|
108
83
|
|
|
@@ -111,13 +86,7 @@ class AdaptyOnboarding extends React.Component {
|
|
|
111
86
|
this.currentStep = meta.screen_index ?? this.currentStep;
|
|
112
87
|
this.totalSteps = meta.total_screens ?? this.totalSteps;
|
|
113
88
|
|
|
114
|
-
config.DEBUG_MODE && console.log('State updated:', {
|
|
115
|
-
action,
|
|
116
|
-
meta,
|
|
117
|
-
currentStep: this.currentStep,
|
|
118
|
-
totalSteps: this.totalSteps,
|
|
119
|
-
termsAccepted: this.termsAccepted
|
|
120
|
-
});
|
|
89
|
+
config.DEBUG_MODE && console.log('State updated AdaptyOnboarding:', {action, meta, currentStep: this.currentStep, totalSteps: this.totalSteps});
|
|
121
90
|
}
|
|
122
91
|
|
|
123
92
|
if (this.props.onStateUpdated) {
|
|
@@ -135,7 +104,7 @@ class AdaptyOnboarding extends React.Component {
|
|
|
135
104
|
}
|
|
136
105
|
|
|
137
106
|
handleAnalytics = (event, data) => {
|
|
138
|
-
config.DEBUG_MODE && console.log('Onboarding analytics:', event, data);
|
|
107
|
+
config.DEBUG_MODE && console.log('Onboarding analytics AdaptyOnboarding:', event, data);
|
|
139
108
|
|
|
140
109
|
if (this.props.onAnalytics) {
|
|
141
110
|
this.props.onAnalytics(event, data, this.remoteConfig);
|
|
@@ -143,7 +112,7 @@ class AdaptyOnboarding extends React.Component {
|
|
|
143
112
|
}
|
|
144
113
|
|
|
145
114
|
handlePaywall = (actionId, meta) => {
|
|
146
|
-
config.DEBUG_MODE && console.log('Onboarding paywall:', actionId, meta);
|
|
115
|
+
config.DEBUG_MODE && console.log('Onboarding paywall AdaptyOnboarding:', actionId, meta);
|
|
147
116
|
|
|
148
117
|
if (this.props.onPaywall) {
|
|
149
118
|
this.props.onPaywall(this.remoteConfig);
|
|
@@ -151,7 +120,7 @@ class AdaptyOnboarding extends React.Component {
|
|
|
151
120
|
}
|
|
152
121
|
|
|
153
122
|
handleFinishedLoading = (meta) => {
|
|
154
|
-
config.DEBUG_MODE && console.log('Onboarding finished loading', meta);
|
|
123
|
+
config.DEBUG_MODE && console.log('Onboarding finished loading AdaptyOnboarding:', meta);
|
|
155
124
|
|
|
156
125
|
if (this.props.onFinishedLoading) {
|
|
157
126
|
this.props.onFinishedLoading(meta, this.remoteConfig);
|