@miso.ai/client-sdk-ui 1.9.6-beta.0 → 1.9.6-beta.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/dist/cjs/version.js +1 -1
- package/dist/cjs/workflow/ask.js +4 -2
- package/package.json +2 -2
- package/src/version.js +1 -1
- package/src/workflow/ask.js +3 -2
package/dist/cjs/version.js
CHANGED
package/dist/cjs/workflow/ask.js
CHANGED
|
@@ -194,7 +194,8 @@ class Ask extends _base.default {
|
|
|
194
194
|
_defaultProcessData(data) {
|
|
195
195
|
data = super._defaultProcessData(data);
|
|
196
196
|
const {
|
|
197
|
-
value
|
|
197
|
+
value,
|
|
198
|
+
request
|
|
198
199
|
} = data;
|
|
199
200
|
if (!value) {
|
|
200
201
|
return data;
|
|
@@ -203,6 +204,7 @@ class Ask extends _base.default {
|
|
|
203
204
|
question_id: questionId,
|
|
204
205
|
question
|
|
205
206
|
} = value;
|
|
207
|
+
const organic = request && request.payload && request.payload._meta && request.payload._meta.question_source === _constants.ORGANIC_QUESTION_SOURCE;
|
|
206
208
|
|
|
207
209
|
// capture question ID and register at context
|
|
208
210
|
if (!this._questionId && questionId) {
|
|
@@ -215,7 +217,7 @@ class Ask extends _base.default {
|
|
|
215
217
|
const url = new URL(window.location);
|
|
216
218
|
const currentQuestion = url.searchParams.get('q');
|
|
217
219
|
// TODO: review this, handle &s=
|
|
218
|
-
if (question !== currentQuestion && (
|
|
220
|
+
if (question !== currentQuestion && (!organic || this._autoQuery.updateUrl === true)) {
|
|
219
221
|
url.searchParams.set('q', question);
|
|
220
222
|
window.history.replaceState({}, '', url);
|
|
221
223
|
}
|
package/package.json
CHANGED
package/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.9.6-beta.
|
|
1
|
+
export default '1.9.6-beta.2';
|
package/src/workflow/ask.js
CHANGED
|
@@ -157,11 +157,12 @@ export default class Ask extends Workflow {
|
|
|
157
157
|
|
|
158
158
|
_defaultProcessData(data) {
|
|
159
159
|
data = super._defaultProcessData(data);
|
|
160
|
-
const { value } = data;
|
|
160
|
+
const { value, request } = data;
|
|
161
161
|
if (!value) {
|
|
162
162
|
return data;
|
|
163
163
|
}
|
|
164
164
|
const { question_id: questionId, question } = value;
|
|
165
|
+
const organic = request && request.payload && request.payload._meta && request.payload._meta.question_source === ORGANIC_QUESTION_SOURCE;
|
|
165
166
|
|
|
166
167
|
// capture question ID and register at context
|
|
167
168
|
if (!this._questionId && questionId) {
|
|
@@ -174,7 +175,7 @@ export default class Ask extends Workflow {
|
|
|
174
175
|
const url = new URL(window.location);
|
|
175
176
|
const currentQuestion = url.searchParams.get('q');
|
|
176
177
|
// TODO: review this, handle &s=
|
|
177
|
-
if (question !== currentQuestion && (
|
|
178
|
+
if (question !== currentQuestion && (!organic || this._autoQuery.updateUrl === true)) {
|
|
178
179
|
url.searchParams.set('q', question);
|
|
179
180
|
window.history.replaceState({}, '', url);
|
|
180
181
|
}
|