@innovastudio/contentbuilder 1.5.54 → 1.5.56
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
|
@@ -77255,7 +77255,7 @@ class Dictation {
|
|
|
77255
77255
|
const btnOk = this.modalDisclaimer.querySelector('.input-ok');
|
|
77256
77256
|
btnOk.addEventListener('click', () => {
|
|
77257
77257
|
this.builder.util.hideModal(this.modalDisclaimer);
|
|
77258
|
-
this.
|
|
77258
|
+
this.openDictation_();
|
|
77259
77259
|
});
|
|
77260
77260
|
let info = `
|
|
77261
77261
|
<div style="font-weight:500;margin: 25px 0 7px;">${util.out('Dictation')}</div>
|
|
@@ -80729,14 +80729,12 @@ ${answer}
|
|
|
80729
80729
|
};
|
|
80730
80730
|
try {
|
|
80731
80731
|
/*
|
|
80732
|
-
let headers = {
|
|
80733
|
-
...this.builder.headers,
|
|
80734
|
-
...this.builder.defaultHeaders
|
|
80735
|
-
};
|
|
80736
80732
|
const response = await fetch(this.builder.sendCommandUrl, {
|
|
80737
80733
|
signal: this.signal, // Abort
|
|
80738
80734
|
method: 'POST',
|
|
80739
|
-
headers
|
|
80735
|
+
headers: {
|
|
80736
|
+
'Content-Type': 'application/json',
|
|
80737
|
+
},
|
|
80740
80738
|
body: JSON.stringify(messages),
|
|
80741
80739
|
});
|
|
80742
80740
|
const data = await response.json();
|
|
@@ -80746,15 +80744,13 @@ ${answer}
|
|
|
80746
80744
|
if (this.builder.sendCommand) {
|
|
80747
80745
|
data = await this.builder.sendCommand(messages);
|
|
80748
80746
|
} else {
|
|
80749
|
-
let headers = {
|
|
80750
|
-
...this.builder.headers,
|
|
80751
|
-
...this.builder.defaultHeaders
|
|
80752
|
-
};
|
|
80753
80747
|
const response = await fetch(this.builder.sendCommandUrl, {
|
|
80754
80748
|
signal: this.signal,
|
|
80755
80749
|
// Abort
|
|
80756
80750
|
method: 'POST',
|
|
80757
|
-
headers
|
|
80751
|
+
headers: {
|
|
80752
|
+
'Content-Type': 'application/json'
|
|
80753
|
+
},
|
|
80758
80754
|
body: JSON.stringify(messages)
|
|
80759
80755
|
});
|
|
80760
80756
|
data = await response.json();
|
|
@@ -80818,13 +80814,11 @@ ${answer}
|
|
|
80818
80814
|
if (this.builder.consoleLog) {
|
|
80819
80815
|
if (!(error + '').includes('Failed to fetch')) {
|
|
80820
80816
|
// Only if not CORS error
|
|
80821
|
-
let headers = {
|
|
80822
|
-
...this.builder.headers,
|
|
80823
|
-
...this.builder.defaultHeaders
|
|
80824
|
-
};
|
|
80825
80817
|
const response = await fetch(this.builder.sendCommandUrl, {
|
|
80826
80818
|
method: 'POST',
|
|
80827
|
-
headers
|
|
80819
|
+
headers: {
|
|
80820
|
+
'Content-Type': 'application/json'
|
|
80821
|
+
},
|
|
80828
80822
|
body: JSON.stringify(messages)
|
|
80829
80823
|
});
|
|
80830
80824
|
const data = await response.text();
|