@innovastudio/contentbuilder 1.4.63 → 1.4.64

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
3
  "type": "module",
4
- "version": "1.4.63",
4
+ "version": "1.4.64",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "files": [
@@ -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
@@ -77480,7 +77487,7 @@ class Dictation {
77480
77487
  align-items: center;">
77481
77488
  ${util.out('Send a Command')}</span>
77482
77489
  <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>
77490
+ <svg class="is-icon-flex"style="width:20px;height:20px"><use xlink:href="#ion-ios-close-empty"></use></svg>
77484
77491
  </button>
77485
77492
  </div>
77486
77493
  <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 +77534,11 @@ class Dictation {
77527
77534
  const btnClear = builderStuff.querySelector('.cmd-clear-command');
77528
77535
  const chkAutoSend = builderStuff.querySelector('#chkAutoSendCommand');
77529
77536
  const btnCommandList = builderStuff.querySelector('.cmd-command-list');
77537
+ const inpCommand = this.builderStuff.querySelector('.inp-command');
77538
+ if (localStorage.getItem('_sampleshown') === null) {
77539
+ inpCommand.setAttribute('placeholder', this.builder.sampleCommand);
77540
+ localStorage.setItem('_sampleshown', true);
77541
+ }
77530
77542
  this.builder.commandText = '';
77531
77543
  this.builder.autoSendCommand = false;
77532
77544
  if (localStorage.getItem('_dictation') !== null) {
@@ -77637,7 +77649,6 @@ class Dictation {
77637
77649
 
77638
77650
  this.opts.send(question);
77639
77651
  });
77640
- const inpCommand = this.builderStuff.querySelector('.inp-command');
77641
77652
  inpCommand.addEventListener('keydown', e => {
77642
77653
  if (e.keyCode === 13 && !e.shiftKey) {
77643
77654
  e.preventDefault();
@@ -77671,7 +77682,17 @@ class Dictation {
77671
77682
  }
77672
77683
  }
77673
77684
  openDictation() {
77685
+ if (this.modalCommand.classList.contains('active')) {
77686
+ setTimeout(() => {
77687
+ // Needed if opens programmatically on builder start (wait until all loaded)
77688
+ const inpCommand = this.modalCommand.querySelector('.inp-command');
77689
+ inpCommand.focus();
77690
+ }, 600);
77691
+ return;
77692
+ }
77674
77693
  this.modalCommand.classList.add('active');
77694
+ const inpCommand = this.modalCommand.querySelector('.inp-command');
77695
+ inpCommand.focus();
77675
77696
  localStorage.setItem('_dictation', '1');
77676
77697
  const chkAutoSend = this.builderStuff.querySelector('#chkAutoSendCommand');
77677
77698
  const btnClear = this.builderStuff.querySelector('.cmd-clear-command');
@@ -78499,6 +78520,7 @@ class ContentBuilder {
78499
78520
  /* Prompt/Command Stuff */
78500
78521
  isContentBox: false,
78501
78522
  sendCommandUrl: 'http://localhost:8081/answer',
78523
+ //sampleCommand: '',
78502
78524
  speechRecognitionLang: 'en-US',
78503
78525
  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
78526
  shortCommandList: {
@@ -79773,9 +79795,9 @@ class ContentBuilder {
79773
79795
  const htmlutil = new HtmlUtil(this);
79774
79796
  htmlutil.viewHtmlExternal();
79775
79797
  }
79776
- readHtml(content, view, multiple) {
79798
+ readHtml(content, view, multiple, excludeCustomBlock) {
79777
79799
  const htmlutil = new HtmlUtil(this);
79778
- return htmlutil.readHtml(content, view, multiple);
79800
+ return htmlutil.readHtml(content, view, multiple, excludeCustomBlock);
79779
79801
  }
79780
79802
  fromViewToActual(html) {
79781
79803
  const htmlutil = new HtmlUtil(this);