@innovastudio/contentbox 1.3.21 → 1.3.24

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbox",
3
- "version": "1.3.21",
3
+ "version": "1.3.24",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "public/contentbox/contentbox.esm.js",
@@ -46,7 +46,7 @@
46
46
  "webpack-dev-server": "^4.0.0"
47
47
  },
48
48
  "dependencies": {
49
- "@innovastudio/contentbuilder": "^1.2.18",
49
+ "@innovastudio/contentbuilder": "^1.2.20",
50
50
  "js-beautify": "^1.14.0"
51
51
  }
52
52
  }
@@ -2612,7 +2612,7 @@ class EditSection {
2612
2612
  this.builder = builder;
2613
2613
  const builderStuff = this.builder.builderStuff;
2614
2614
  this.builderStuff = builderStuff;
2615
- let html = '<div class="is-modal delsectionconfirm" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">' + '<div style="max-width: 400px;">' + '<p style="margin-bottom: 25px;text-align:center;">' + out('Are you sure you want to delete this section?') + '</p>' + '<button title="' + out('Delete') + '" class="input-ok classic">' + out('Delete') + '</button>' + '</div>' + '</div>' + '' + '<div class="is-modal editsection" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">' + '<div class="is-modal-content" style="max-width:313px;padding:0;">' + '<div class="is-modal-bar is-draggable">' + out('Section Settings') + '</div>' + '<div class="is-tabs clearfix" style="padding-top:37px;" data-group="sectionsettings">' + '<a id="tabSectionGeneral" title="' + out('General') + '" href="" data-content="divSectionGeneral" class="active">' + out('General') + '</a>' + '<a id="tabSectionAnimation" title="' + out('Animation') + '" href="" data-content="divSectionAnimation">' + out('Animation') + '</a>' + '<a id="tabSectionScrollButton" title="' + out('Scroll') + '" href="" data-content="divSectionScrollButton">' + out('Scroll') + '</a>' + '</div>';
2615
+ let html = '<div class="is-modal delsectionconfirm" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">' + '<div style="max-width: 450px;">' + '<div style="margin: 20px 0 30px;text-align:center;font-size: 14px;">' + out('Are you sure you want to delete this section?') + '</div>' + '<button title="' + out('Delete') + '" class="input-ok classic">' + out('Delete') + '</button>' + '</div>' + '</div>' + '' + '<div class="is-modal editsection" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">' + '<div class="is-modal-content" style="max-width:313px;padding:0;">' + '<div class="is-modal-bar is-draggable">' + out('Section Settings') + '</div>' + '<div class="is-tabs clearfix" style="padding-top:37px;" data-group="sectionsettings">' + '<a id="tabSectionGeneral" title="' + out('General') + '" href="" data-content="divSectionGeneral" class="active">' + out('General') + '</a>' + '<a id="tabSectionAnimation" title="' + out('Animation') + '" href="" data-content="divSectionAnimation">' + out('Animation') + '</a>' + '<a id="tabSectionScrollButton" title="' + out('Scroll') + '" href="" data-content="divSectionScrollButton">' + out('Scroll') + '</a>' + '</div>';
2616
2616
  html += '<div id="divSectionGeneral" class="is-tab-content active" data-group="sectionsettings" style="display:flex;padding-top:0">' + '<div style="display:flex;flex-direction:column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Move Section') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Move Up') + '" class="cmd-section-up" style="">&#8593;</button>' + '<button title="' + out('Move Down') + '" class="cmd-section-down">&#8595;</button>' + '<button title="' + out('Move to Top') + '" class="cmd-section-top"><span style="transform:rotate(90deg);position:absolute;top:13px;left:15px;">&#8676;</span></button>' + '<button title="' + out('Move to Bottom') + '" class="cmd-section-bottom"><span style="transform:rotate(90deg);position:absolute;top:13px;left:15px;">&#8677;</span></button>' + '<button title="' + out('Duplicate') + '" class="cmd-section-duplicate" style="margin-left:20px;"><svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#ion-ios-copy-outline"></use></svg></button>' + '</div>' + '</div>';
2617
2617
  html += '<div style="display:flex;flex-direction:column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Height') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Auto') + '" class="cmd-section-height" data-value="0">' + out('Auto') + '</button>' + '<button title="20%" class="cmd-section-height" data-value="20">20%</button>' + '<button title="25%" class="cmd-section-height" data-value="25">25%</button>' + '<button title="30%" class="cmd-section-height" data-value="30">30%</button>' + '<button title="40%" class="cmd-section-height" data-value="40">40%</button>' + '<button title="50%" class="cmd-section-height" data-value="50">50%</button>' + '</div>' + '<div style="display:flex">' + '<button title="60%" class="cmd-section-height" data-value="60" style="border-left:none;border-top:none;">60%</button>' + '<button title="70%" class="cmd-section-height" data-value="70" style="border-left:none;border-top:none;">70%</button>' + '<button title="75%" class="cmd-section-height" data-value="75" style="border-left:none;border-top:none;">75%</button>' + '<button title="80%" class="cmd-section-height" data-value="80" style="border-left:none;border-top:none;">80%</button>' + '<button title="90%" class="cmd-section-height" data-value="90" style="border-left:none;border-top:none;">90%</button>' + '<button title="100%" class="cmd-section-height" data-value="100" style="border-left:none;border-top:none;">100%</button>' + '</div>' + '</div>' + '<div style="display:flex;flex-direction:column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Spacing') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('xs') + '" class="cmd-box-spacing" data-value="default">' + out('xs') + '</button>' + '<button title="' + out('sm') + '" class="cmd-box-spacing" data-value="sm">' + out('sm') + '</button>' + '<button title="' + out('m') + '" class="cmd-box-spacing" data-value="m">' + out('m') + '</button>' + '<button title="' + out('lg') + '" class="cmd-box-spacing" data-value="lg">' + out('lg') + '</button>' + '<button title="' + out('Clear') + '" class="cmd-box-spacing" data-value=""><svg class="is-icon-flex"><use xlink:href="#icon-clean"></use></svg></button>' + '</div>' + '</div>';
2618
2618
  html += '<div class="div-section-bgcolor" style="display:flex;flex-direction:column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Background Color') + ':</div>' + '<div style="display:flex;">' + '<button title="' + out('Background Color') + '" class="input-section-bgcolor is-btn-color" style="margin-right:15px"></button>' + '<button title="' + out('Gradient') + '" class="input-section-gradient classic" data-value="+">' + out('Gradient') + '</button>' + '</div>' + '</div>' + '</div>' + '<div id="divSectionAnimation" class="is-tab-content" data-group="sectionsettings" style="display:none;padding-top:0">' + '<div style="display:flex;flex-direction:column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Start') + ':</div>' + '<div style="display:flex;flex-flow:wrap;">' + '<button title="' + out('Slide Left') + '" class="cmd-section-anim-start" data-value="slide-left">' + out('Slide Left') + '</button>' + '<button title="' + out('Slide Right') + '" class="cmd-section-anim-start" data-value="slide-right">' + out('Slide Right') + '</button>' + '<button title="' + out('Zoom In') + '" class="cmd-section-anim-start" data-value="zoom-in">' + out('Zoom In') + '</button>' + // '<button title="' + out('Zoom Out') + '" class="cmd-section-anim-start" data-value="zoom-out">' + out('Zoom Out') + '</button>' +
@@ -15527,8 +15527,16 @@ class Util {
15527
15527
  }
15528
15528
 
15529
15529
  showPop(pop, cancelCallback, btn) {
15530
- const dom = this.dom;
15531
- if (pop.style.display === 'flex') return; // important
15530
+ const dom = this.dom; // Hide other pops
15531
+
15532
+ let elms = this.builder.doc.querySelectorAll('.is-pop.active');
15533
+ Array.prototype.forEach.call(elms, elm => {
15534
+ if (elm !== pop) {
15535
+ elm.style.display = '';
15536
+ dom.removeClass(elm, 'active');
15537
+ elm.setAttribute('aria-hidden', true);
15538
+ }
15539
+ }); // if(pop.style.display === 'flex') return;
15532
15540
 
15533
15541
  this.clearAllEventListener(pop); // for safety of uncleared events as a result of closing without hidePop()
15534
15542
 
@@ -16486,11 +16494,13 @@ class Util {
16486
16494
  rtepop.style.display = '';
16487
16495
  dom.removeClass(rtepop, 'active');
16488
16496
  dom.removeClass(rtepop, 'deactive'); // dom.addClass(rtepop, 'deactive');
16489
- }); // let pops = builderStuff.querySelectorAll('.is-pop');
16490
- // Array.prototype.forEach.call(pops, (pop) => {
16491
- // pop.style.display = '';
16492
- // });
16493
-
16497
+ });
16498
+ let pops = builderStuff.querySelectorAll('.is-pop');
16499
+ Array.prototype.forEach.call(pops, pop => {
16500
+ pop.style.display = '';
16501
+ dom.removeClass(pop, 'active');
16502
+ pop.setAttribute('aria-hidden', true);
16503
+ });
16494
16504
  this.builder.colTool.lockIndicator.style.display = ''; // Clear resizable images
16495
16505
  // this.builder.element.image.clearImageResizer();
16496
16506
  } // source: http://stackoverflow.com/questions/1349404/generate-a-string-of-5-random-characters-in-javascript
@@ -29221,7 +29231,7 @@ class ColumnTool$1 {
29221
29231
  setTimeout(() => {
29222
29232
  dom$G.removeClass(this.columnMore, 'transition1');
29223
29233
  }, 300);
29224
- }, 300);
29234
+ }, 30);
29225
29235
  }
29226
29236
 
29227
29237
  hide() {
@@ -63972,13 +63982,11 @@ class RowTool {
63972
63982
  rowMore = builderStuff.querySelector('.rowmore');
63973
63983
  let elm = rowMore.querySelector('.row-up');
63974
63984
  if (elm) dom$p.addEventListener(elm, 'click', () => {
63975
- this.grid.moveRowUp();
63976
- util.clearControls();
63985
+ this.grid.moveRowUp(); // util.clearControls();
63977
63986
  });
63978
63987
  elm = rowMore.querySelector('.row-down');
63979
63988
  if (elm) dom$p.addEventListener(elm, 'click', () => {
63980
- this.grid.moveRowDown();
63981
- util.clearControls();
63989
+ this.grid.moveRowDown(); // util.clearControls();
63982
63990
  });
63983
63991
  elm = rowMore.querySelector('.row-duplicate');
63984
63992
  if (elm) dom$p.addEventListener(elm, 'click', () => {
@@ -66418,14 +66426,12 @@ class ColumnTool {
66418
66426
 
66419
66427
  elm = columnMore.querySelector('.cell-prev');
66420
66428
  dom$n.addEventListener(elm, 'click', () => {
66421
- this.grid.moveColumnPrevious();
66422
- util.clearControls();
66429
+ this.grid.moveColumnPrevious(); // util.clearControls();
66423
66430
  }); // Move Next
66424
66431
 
66425
66432
  elm = columnMore.querySelector('.cell-next');
66426
66433
  dom$n.addEventListener(elm, 'click', () => {
66427
- this.grid.moveColumnNext();
66428
- util.clearControls();
66434
+ this.grid.moveColumnNext(); // util.clearControls();
66429
66435
  }); // Move Up
66430
66436
 
66431
66437
  elm = columnMore.querySelector('.cell-up');
@@ -81489,8 +81495,8 @@ class ContentBuilder {
81489
81495
  col.addEventListener('keydown', this.handleCellKeydown.bind(this, col)); // ON KEYUP
81490
81496
 
81491
81497
  col.addEventListener('keyup', this.handleCellKeyup.bind(this, col)); // ON FOCUS
81492
-
81493
- col.addEventListener('focus', this.handleCellFocus.bind(this, col)); // ON PASTE
81498
+ // col.addEventListener('focus', this.handleCellFocus.bind(this, col));
81499
+ // ON PASTE
81494
81500
 
81495
81501
  col.addEventListener('paste', this.handleCellPaste.bind(this));
81496
81502
  col.setAttribute('data-click', true);