@innovastudio/contentbuilder 1.4.63 → 1.4.65
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -5479,6 +5479,7 @@ class Util {
|
|
5479
5479
|
localStorage.removeItem('_dictation');
|
5480
5480
|
localStorage.removeItem('_mic');
|
5481
5481
|
localStorage.removeItem('_autosendcommand');
|
5482
|
+
localStorage.removeItem('_sampleshown');
|
5482
5483
|
|
5483
5484
|
//NOT USED
|
5484
5485
|
localStorage.removeItem('_scrollableeditor');
|
@@ -14708,7 +14709,7 @@ class HtmlUtil {
|
|
14708
14709
|
}
|
14709
14710
|
return html;
|
14710
14711
|
}
|
14711
|
-
readHtml(content, view, multiple) {
|
14712
|
+
readHtml(content, view, multiple, excludeCustomBlock) {
|
14712
14713
|
//view = true (hide internal attributes). view = false (actual html)
|
14713
14714
|
|
14714
14715
|
//Make absolute
|
@@ -15001,6 +15002,12 @@ class HtmlUtil {
|
|
15001
15002
|
}
|
15002
15003
|
}
|
15003
15004
|
});
|
15005
|
+
if (excludeCustomBlock) {
|
15006
|
+
const elmCustomBlocks = tmp.querySelectorAll('[data-html]');
|
15007
|
+
elmCustomBlocks.forEach(elm => {
|
15008
|
+
elm.innerHTML = '';
|
15009
|
+
});
|
15010
|
+
}
|
15004
15011
|
html = '';
|
15005
15012
|
if (multiple) {
|
15006
15013
|
//ContentBox
|
@@ -77298,6 +77305,10 @@ class Dictation {
|
|
77298
77305
|
this.util = util;
|
77299
77306
|
const builderStuff = this.builder.builderStuff;
|
77300
77307
|
this.builderStuff = builderStuff;
|
77308
|
+
if (localStorage.getItem('_mic') === null) {
|
77309
|
+
localStorage.setItem('_mic', '0'); // make mic disable by default
|
77310
|
+
}
|
77311
|
+
|
77301
77312
|
const commandInfo = this.builder.commandInfo;
|
77302
77313
|
let htmlList = '';
|
77303
77314
|
for (const key in commandInfo) {
|
@@ -77480,7 +77491,7 @@ class Dictation {
|
|
77480
77491
|
align-items: center;">
|
77481
77492
|
${util.out('Send a Command')}</span>
|
77482
77493
|
<button class="is-modal-close" tabindex="-1" title="${util.out('Close')}">
|
77483
|
-
<svg class="is-icon-flex"><use xlink:href="#ion-ios-close-empty"></use></svg>
|
77494
|
+
<svg class="is-icon-flex"style="width:20px;height:20px"><use xlink:href="#ion-ios-close-empty"></use></svg>
|
77484
77495
|
</button>
|
77485
77496
|
</div>
|
77486
77497
|
<div style="display:flex;flex-direction:column;justify-content:space-between;position:absolute;box-sizing:border-box;top:0;left:0;width:100%;height:100%;border-top:transparent 35px solid;overflow-y:hidden;overflow-x:auto;">
|
@@ -77527,6 +77538,11 @@ class Dictation {
|
|
77527
77538
|
const btnClear = builderStuff.querySelector('.cmd-clear-command');
|
77528
77539
|
const chkAutoSend = builderStuff.querySelector('#chkAutoSendCommand');
|
77529
77540
|
const btnCommandList = builderStuff.querySelector('.cmd-command-list');
|
77541
|
+
const inpCommand = this.builderStuff.querySelector('.inp-command');
|
77542
|
+
if (localStorage.getItem('_sampleshown') === null) {
|
77543
|
+
inpCommand.setAttribute('placeholder', this.builder.sampleCommand);
|
77544
|
+
localStorage.setItem('_sampleshown', true);
|
77545
|
+
}
|
77530
77546
|
this.builder.commandText = '';
|
77531
77547
|
this.builder.autoSendCommand = false;
|
77532
77548
|
if (localStorage.getItem('_dictation') !== null) {
|
@@ -77637,7 +77653,6 @@ class Dictation {
|
|
77637
77653
|
|
77638
77654
|
this.opts.send(question);
|
77639
77655
|
});
|
77640
|
-
const inpCommand = this.builderStuff.querySelector('.inp-command');
|
77641
77656
|
inpCommand.addEventListener('keydown', e => {
|
77642
77657
|
if (e.keyCode === 13 && !e.shiftKey) {
|
77643
77658
|
e.preventDefault();
|
@@ -77671,7 +77686,17 @@ class Dictation {
|
|
77671
77686
|
}
|
77672
77687
|
}
|
77673
77688
|
openDictation() {
|
77689
|
+
if (this.modalCommand.classList.contains('active')) {
|
77690
|
+
setTimeout(() => {
|
77691
|
+
// Needed if opens programmatically on builder start (wait until all loaded)
|
77692
|
+
const inpCommand = this.modalCommand.querySelector('.inp-command');
|
77693
|
+
inpCommand.focus();
|
77694
|
+
}, 600);
|
77695
|
+
return;
|
77696
|
+
}
|
77674
77697
|
this.modalCommand.classList.add('active');
|
77698
|
+
const inpCommand = this.modalCommand.querySelector('.inp-command');
|
77699
|
+
inpCommand.focus();
|
77675
77700
|
localStorage.setItem('_dictation', '1');
|
77676
77701
|
const chkAutoSend = this.builderStuff.querySelector('#chkAutoSendCommand');
|
77677
77702
|
const btnClear = this.builderStuff.querySelector('.cmd-clear-command');
|
@@ -78499,6 +78524,7 @@ class ContentBuilder {
|
|
78499
78524
|
/* Prompt/Command Stuff */
|
78500
78525
|
isContentBox: false,
|
78501
78526
|
sendCommandUrl: 'http://localhost:8081/answer',
|
78527
|
+
//sampleCommand: '',
|
78502
78528
|
speechRecognitionLang: 'en-US',
|
78503
78529
|
headlineList: ['We create simple and effective designs.', 'Ultimate Experiences With Story, Emotion, And Purpose.', 'Build Anything Beautifully', 'With Less Stuff and More Compassion', 'We\'re [CompanyName]. Full stack development with a spark of creativity.', 'Transforming your digital experience with [CompanyName]. Achieve your online goals with our customized solutions.', 'Revolutionizing web development with [CompanyName]. Unleash your digital potential with our high-performance solutions.', 'Creative and Inspiring'],
|
78504
78530
|
shortCommandList: {
|
@@ -79773,9 +79799,9 @@ class ContentBuilder {
|
|
79773
79799
|
const htmlutil = new HtmlUtil(this);
|
79774
79800
|
htmlutil.viewHtmlExternal();
|
79775
79801
|
}
|
79776
|
-
readHtml(content, view, multiple) {
|
79802
|
+
readHtml(content, view, multiple, excludeCustomBlock) {
|
79777
79803
|
const htmlutil = new HtmlUtil(this);
|
79778
|
-
return htmlutil.readHtml(content, view, multiple);
|
79804
|
+
return htmlutil.readHtml(content, view, multiple, excludeCustomBlock);
|
79779
79805
|
}
|
79780
79806
|
fromViewToActual(html) {
|
79781
79807
|
const htmlutil = new HtmlUtil(this);
|