@innovastudio/contentbuilder 1.2.4-rc6 → 1.2.4-rc8

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/contentbuilder",
3
- "version": "1.2.4-rc6",
3
+ "version": "1.2.4-rc8",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
@@ -226,6 +226,11 @@ button:focus {
226
226
  .is-ui p {
227
227
  font-size: 13px;
228
228
  }
229
+ #_cbhtml .focus-warning:focus,
230
+ .is-ui .focus-warning:focus {
231
+ outline: #f43f5e 2px solid !important;
232
+ outline-offset: 2px;
233
+ }
229
234
  #_cbhtml .style-helper,
230
235
  .is-ui .style-helper {
231
236
  display: none;
@@ -3109,6 +3114,10 @@ button:focus {
3109
3114
  margin-top: 0;
3110
3115
  margin-bottom: 0;
3111
3116
  }
3117
+ #_cbhtml input[type=radio]:focus,
3118
+ .is-ui input[type=radio]:focus {
3119
+ outline: #3e93f7 1px solid;
3120
+ }
3112
3121
  #_cbhtml label,
3113
3122
  .is-ui label {
3114
3123
  font-size: 13px;
@@ -4109,7 +4109,7 @@ class Util {
4109
4109
  html = `<div class="is-modal is-confirm" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
4110
4110
  <div class="is-modal-content" style="padding-bottom:20px;">
4111
4111
  <p>${message}</p>
4112
- <button title="${this.out('Delete')}" class="input-ok classic">${this.out('Delete')}</button>
4112
+ <button title="${this.out('Delete')}" class="input-ok classic focus-warning">${this.out('Delete')}</button>
4113
4113
  </div>
4114
4114
  </div>`;
4115
4115
 
@@ -4341,6 +4341,9 @@ class Util {
4341
4341
  }
4342
4342
  }
4343
4343
 
4344
+ const ovl = modal.querySelector('.is-modal-overlay');
4345
+ if (ovl) ovl.parentNode.removeChild(ovl); // new
4346
+
4344
4347
  if (!modal.querySelector('.is-modal-overlay')) {
4345
4348
  let html;
4346
4349
 
@@ -16186,7 +16189,6 @@ class Snippets {
16186
16189
  activeItem.focus();
16187
16190
  } else {
16188
16191
  firstItem.focus();
16189
- console.log(firstItem)
16190
16192
  }
16191
16193
  return;
16192
16194
 
@@ -16227,7 +16229,6 @@ class Snippets {
16227
16229
  activeItem.focus();
16228
16230
  } else {
16229
16231
  firstItem.focus();
16230
- console.log(firstItem)
16231
16232
  }
16232
16233
 
16233
16234
  }
@@ -16347,7 +16348,7 @@ class Snippets {
16347
16348
  });
16348
16349
 
16349
16350
  newitem.addEventListener('keydown', (e)=>{
16350
- console.log(e.which)
16351
+
16351
16352
  if ((e.which === 9 && !e.shiftKey)) { // tab
16352
16353
  let last = false;
16353
16354
  if(e.target.nextElementSibling) {
@@ -21277,6 +21278,7 @@ class Select {
21277
21278
  } else if (e.keyCode === 27) {
21278
21279
  // escape key
21279
21280
  this.toggle(false);
21281
+ toggler.focus();
21280
21282
  } else if (e.keyCode === 13 || e.keyCode === 32) {
21281
21283
  // enter or spacebar key
21282
21284
  setValue(e.target);
@@ -21284,14 +21286,14 @@ class Select {
21284
21286
  };
21285
21287
 
21286
21288
  const handleToggleKeyPress = e => {
21287
- e.preventDefault();
21288
-
21289
21289
  if (e.keyCode === 27) {
21290
21290
  // escape key
21291
21291
  this.toggle(false);
21292
+ e.preventDefault();
21292
21293
  } else if (e.keyCode === 13 || e.keyCode === 32) {
21293
21294
  // enter or spacebar key
21294
21295
  this.toggle(true);
21296
+ e.preventDefault();
21295
21297
  }
21296
21298
  };
21297
21299
 
@@ -52143,9 +52145,9 @@ class RowTool {
52143
52145
  if (!rowMore) {
52144
52146
  let html = `<div class="is-pop rowmore" style="z-index:10002;" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
52145
52147
  <div style="display:flex;flex-flow:wrap;">
52146
- <button type="button" tabindex="-1" title="${util.out('Move Up')}" class="row-up"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-up"></use></svg></span>${util.out('Move Up')}</button>
52147
- <button type="button" tabindex="-1" title="${util.out('Move Down')}" class="row-down"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-down"></use></svg></span>${util.out('Move Down')}</button>
52148
- <button type="button" tabindex="-1" title="${util.out('Duplicate')}" class="row-duplicate"><span><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-ios-photos-outline"></use></svg></span>${util.out('Duplicate')}</button>
52148
+ <button type="button" title="${util.out('Move Up')}" class="row-up"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-up"></use></svg></span>${util.out('Move Up')}</button>
52149
+ <button type="button" title="${util.out('Move Down')}" class="row-down"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-down"></use></svg></span>${util.out('Move Down')}</button>
52150
+ <button type="button" title="${util.out('Duplicate')}" class="row-duplicate"><span><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-ios-photos-outline"></use></svg></span>${util.out('Duplicate')}</button>
52149
52151
  ${htmlbutton}
52150
52152
  </div>
52151
52153
  </div>`;
@@ -54849,11 +54851,11 @@ class ColumnTool {
54849
54851
  const inpSrc = this.imageSource.querySelector('.input-src');
54850
54852
  const url = inpSrc.value;
54851
54853
  if (this.builder.imageSelectedCallback) this.builder.imageSelectedCallback(url);
54852
- util.hideModal(imageSource);
54854
+ this.builder.hideModal(imageSource);
54853
54855
  });
54854
54856
  const btnImageCancel = imageSource.querySelector('.input-cancel');
54855
54857
  dom$n.addEventListener(btnImageCancel, 'click', () => {
54856
- util.hideModal(imageSource);
54858
+ this.builder.hideModal(imageSource);
54857
54859
  }); // Scale
54858
54860
 
54859
54861
  const inpImageScaleSlider = imageAdjust.querySelector('.image-scale-slider');
@@ -63787,9 +63789,8 @@ class Rte {
63787
63789
  this.inpZoomSlider.onfocus = () => {
63788
63790
  if (this.builder.onZoomStart) {
63789
63791
  this.builder.onZoomStart();
63790
- }
63792
+ } // this.inpZoomSlider.blur();
63791
63793
 
63792
- this.inpZoomSlider.blur();
63793
63794
  };
63794
63795
 
63795
63796
  this.inpZoomSlider.oninput = () => {
@@ -67234,8 +67235,11 @@ class Rte {
67234
67235
  viewZoom() {
67235
67236
  if (this.builder.onZoomOpen) this.builder.onZoomOpen();
67236
67237
  this.inpZoomSlider.value = this.builder.opts.zoom * 100;
67238
+ if (document.activeElement) this.elmFocus = document.activeElement;
67237
67239
  const modal = this.builderStuff.querySelector('.viewzoom');
67238
- this.util.showModal(modal, false, null, false);
67240
+ this.util.showModal(modal, false, () => {
67241
+ if (this.elmFocus) this.elmFocus.focus();
67242
+ }, false);
67239
67243
  }
67240
67244
 
67241
67245
  }
@@ -71217,10 +71221,10 @@ class ContentBuilder {
71217
71221
  const activeCol = this.activeCol;
71218
71222
 
71219
71223
  if (!activeCol) {
71220
- col.click();
71224
+ if (col.firstElementChild) col.firstElementChild.click();else col.click();
71221
71225
  } else {
71222
71226
  if (col !== activeCol) {
71223
- col.click();
71227
+ if (col.firstElementChild) col.firstElementChild.click();else col.click();
71224
71228
  }
71225
71229
  }
71226
71230
  }