@innovastudio/contentbuilder 1.4.68 → 1.4.70

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
3
  "type": "module",
4
- "version": "1.4.68",
4
+ "version": "1.4.70",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "files": [
@@ -3304,7 +3304,7 @@ button:focus-visible {
3304
3304
  padding-left: 25px;
3305
3305
  padding-right: 25px;
3306
3306
  min-width: 110px;
3307
- background: #f7f7f7;
3307
+ background: #f3f3f3;
3308
3308
  border: transparent 1px solid;
3309
3309
  box-shadow: 0px 3px 6px -6px rgba(0, 0, 0, 0.32);
3310
3310
  }
@@ -3312,7 +3312,7 @@ button:focus-visible {
3312
3312
  #_cbhtml .is-btn.classic-primary:hover,
3313
3313
  .is-ui button.classic-primary:hover,
3314
3314
  .is-ui .is-btn.classic-primary:hover {
3315
- background: #f9f9f9;
3315
+ background: #f3f3f3;
3316
3316
  border: transparent 1px solid;
3317
3317
  }
3318
3318
  #_cbhtml button.classic-secondary,
@@ -4924,7 +4924,7 @@ button:focus-visible {
4924
4924
  .is-builder[hidesnippetaddtool] .row-active .is-rowadd-tool {
4925
4925
  display: none;
4926
4926
  }
4927
- .is-builder[hideelementhighlight] .elm-active {
4927
+ .is-builder[hideelementhighlight] .cell-active .elm-active {
4928
4928
  background-color: transparent;
4929
4929
  }
4930
4930
 
@@ -3932,6 +3932,70 @@ class Util {
3932
3932
  return s;
3933
3933
  }
3934
3934
  }
3935
+ showMessage(message) {
3936
+ const dom = this.dom;
3937
+ let html = '';
3938
+ html = `<div class="is-modal modalmessage" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
3939
+ <div class="is-modal-content" style="padding-top: 15px;padding-bottom: 20px;max-width: 450px;">
3940
+ <div style="margin: 20px 0 30px;font-size: 17px;">${message}</div>
3941
+ <button title="${this.out('Ok')}" class="input-ok classic focus-warning">${this.out('Ok')}</button>
3942
+ </div>
3943
+ </div>`;
3944
+ const builderStuff = this.builder.builderStuff;
3945
+ let modalMessage = builderStuff.querySelector('.modalmessage');
3946
+ if (!modalMessage) {
3947
+ dom.appendHtml(builderStuff, html);
3948
+ modalMessage = builderStuff.querySelector('.modalmessage');
3949
+ }
3950
+ this.showModal(modalMessage, true);
3951
+ let buttonok = modalMessage.querySelector('.is-confirm .input-ok');
3952
+ dom.addEventListener(buttonok, 'click', () => {
3953
+ this.hideModal(modalMessage);
3954
+ modalMessage.parentNode.removeChild(modalMessage); //remove modal
3955
+ });
3956
+ }
3957
+
3958
+ showChoice(message, yestext, callback) {
3959
+ const dom = this.dom;
3960
+ let html = '';
3961
+ html = `<div class="is-modal modalmessage" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
3962
+ <div class="is-modal-content" style="padding-top: 15px;padding-bottom: 20px;max-width: 450px;">
3963
+ <div style="margin: 20px 0 30px;font-size: 17px;">${message}</div>
3964
+
3965
+ <div style="display:flex;">
3966
+ <button title="${this.out('Cancel')}" class="input-cancel classic-secondary" style="width:100%;margin-right:4px;">${this.out('Cancel')}</button>
3967
+ <button title="${yestext}" class="input-ok classic-primary" style="width:100%">${yestext}</button>
3968
+ </div>
3969
+ </div>
3970
+ </div>`;
3971
+ const builderStuff = this.builder.builderStuff;
3972
+ let modalMessage = builderStuff.querySelector('.modalmessage');
3973
+ if (!modalMessage) {
3974
+ dom.appendHtml(builderStuff, html);
3975
+ modalMessage = builderStuff.querySelector('.modalmessage');
3976
+ }
3977
+ this.showModal(modalMessage, false, () => {
3978
+ //this function runs when overlay is clicked. Remove modal.
3979
+ modalMessage.parentNode.removeChild(modalMessage);
3980
+ callback(false);
3981
+ });
3982
+ let btnCancel = modalMessage.querySelector('.modalmessage .input-cancel');
3983
+ dom.addEventListener(btnCancel, 'click', () => {
3984
+ this.hideModal(modalMessage);
3985
+ modalMessage.parentNode.removeChild(modalMessage); //remove modal
3986
+
3987
+ callback(false);
3988
+ });
3989
+ btnCancel.focus();
3990
+ let btnOk = modalMessage.querySelector('.modalmessage .input-ok');
3991
+ dom.addEventListener(btnOk, 'click', () => {
3992
+ this.hideModal(modalMessage);
3993
+ modalMessage.parentNode.removeChild(modalMessage); //remove modal
3994
+
3995
+ //do task
3996
+ callback(true);
3997
+ });
3998
+ }
3935
3999
  confirm(message, callback, yesno, yestext) {
3936
4000
  if (!this.builder.deleteConfirm) {
3937
4001
  callback(true);
@@ -5217,6 +5281,9 @@ class Util {
5217
5281
  pop.setAttribute('aria-hidden', true);
5218
5282
  });
5219
5283
  this.builder.colTool.lockIndicator.style.display = '';
5284
+ if (this.builder.resize) {
5285
+ this.builder.resize.destroy(); // destroy previous instance
5286
+ }
5220
5287
 
5221
5288
  // Clear resizable images
5222
5289
  // this.builder.element.image.clearImageResizer();
@@ -77460,7 +77527,7 @@ class Dictation {
77460
77527
  }
77461
77528
  }
77462
77529
  .path {
77463
- stroke: #b7b7b7;
77530
+ stroke: #232323; /* #b7b7b7; */
77464
77531
  stroke-dasharray: 187;
77465
77532
  stroke-dashoffset: 0;
77466
77533
  transform-origin: center;