@innovastudio/contentbox 1.5.76 → 1.5.78

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/contentbox",
3
3
  "type": "module",
4
- "version": "1.5.76",
4
+ "version": "1.5.78",
5
5
  "description": "",
6
6
  "main": "public/contentbox/contentbox.esm.js",
7
7
  "files": [
@@ -51,7 +51,7 @@
51
51
  "ws": "^8.13.0"
52
52
  },
53
53
  "dependencies": {
54
- "@innovastudio/contentbuilder": "^1.4.97",
54
+ "@innovastudio/contentbuilder": "^1.4.99",
55
55
  "js-beautify": "^1.14.0"
56
56
  }
57
57
  }
@@ -19333,14 +19333,16 @@ class Util$1 {
19333
19333
  Note:
19334
19334
  - hideModal will remove the modal element, so calling show modal multiple times won't attach multiple events (safe).
19335
19335
  */
19336
- showModal(modal, overlayStay, cancelCallback, animated) {
19336
+ showModal(modal, overlayStay, cancelCallback, animated, overflowHidden) {
19337
19337
  const dom = this.dom;
19338
19338
  dom.addClass(modal, 'active');
19339
19339
  modal.setAttribute('aria-hidden', false);
19340
+ if (overflowHidden) document.body.style.overflow = 'hidden';
19340
19341
  const handleKeyDown = e => {
19341
19342
  if (e.keyCode === 27) {
19342
19343
  // escape key
19343
19344
 
19345
+ if (overflowHidden) document.body.style.overflow = '';
19344
19346
  if (dom.hasClass(modal, 'active')) this.hideModal(modal); // check first in case programmatically ESC key that already call hideModal is triggered (see _hideModal)
19345
19347
 
19346
19348
  modal.removeEventListener('keydown', handleKeyDown);
@@ -19404,6 +19406,7 @@ class Util$1 {
19404
19406
  if (!overlayStay) {
19405
19407
  let overlay = modal.querySelector('.is-modal-overlay');
19406
19408
  dom.addEventListener(overlay, 'click', () => {
19409
+ if (overflowHidden) document.body.style.overflow = '';
19407
19410
  this.hideModal(modal);
19408
19411
  modal.removeEventListener('keydown', handleKeyDown);
19409
19412
  const btnClose = modal.querySelector('.is-modal-close');
@@ -19413,6 +19416,7 @@ class Util$1 {
19413
19416
  }
19414
19417
  }
19415
19418
  const close = () => {
19419
+ if (overflowHidden) document.body.style.overflow = '';
19416
19420
  if (dom.hasClass(modal, 'active')) this.hideModal(modal); // check first in case programmatically ESC key that already call hideModal is triggered (see _hideModal)
19417
19421
 
19418
19422
  modal.removeEventListener('keydown', handleKeyDown);
@@ -65044,7 +65048,7 @@ class Image$1 {
65044
65048
  util.showModal(modalFileSelect, false, () => {
65045
65049
  inputSelectOther.removeAttribute('data-focus');
65046
65050
  inputSelectOther.focus();
65047
- }, false);
65051
+ }, false, this.builder.assetPanelFullScreen);
65048
65052
  inputSelectOther.setAttribute('data-focus', true);
65049
65053
  }
65050
65054
  this.builder.targetInput = modalImageLink.querySelector('.input-link'); // used by selectAsset() (see contentbuilder.js)
@@ -65264,7 +65268,7 @@ class Image$1 {
65264
65268
  util.showModal(modalImageSelect, false, () => {
65265
65269
  btnImageSelect.removeAttribute('data-focus');
65266
65270
  btnImageSelect.focus();
65267
- });
65271
+ }, false, this.builder.assetPanelFullScreen);
65268
65272
  btnImageSelect.setAttribute('data-focus', true);
65269
65273
  }
65270
65274
  this.builder.targetInput = modalImageLink.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
@@ -65319,7 +65323,7 @@ class Image$1 {
65319
65323
  util.showModal(modalFileSelect, false, () => {
65320
65324
  btnImageSelect2.removeAttribute('data-focus');
65321
65325
  btnImageSelect2.focus();
65322
- }, true);
65326
+ }, false, this.builder.assetPanelFullScreen);
65323
65327
  btnImageSelect2.setAttribute('data-focus', true);
65324
65328
  this.builder.targetInput = modalImageLink.querySelector('.input-link'); // used by selectAsset() (see contentbuilder.js)
65325
65329
  this.builder.targetCallback = null;
@@ -65345,7 +65349,7 @@ class Image$1 {
65345
65349
  util.showModal(modalImageSelect, false, () => {
65346
65350
  btnImageSelect2.removeAttribute('data-focus');
65347
65351
  btnImageSelect2.focus();
65348
- });
65352
+ }, false, this.builder.assetPanelFullScreen);
65349
65353
  btnImageSelect2.setAttribute('data-focus', true);
65350
65354
  this.builder.targetInput = modalImageLink.querySelector('.input-link'); // used by selectAsset() (see contentbuilder.js)
65351
65355
  this.builder.targetCallback = null;
@@ -68130,7 +68134,7 @@ class Hyperlink {
68130
68134
  util.showModal(modalFileSelect, false, () => {
68131
68135
  inputSelectOther.removeAttribute('data-focus');
68132
68136
  inputSelectOther.focus();
68133
- }, false);
68137
+ }, false, this.builder.assetPanelFullScreen);
68134
68138
  inputSelectOther.setAttribute('data-focus', true);
68135
68139
  }
68136
68140
  this.builder.targetInput = modal.querySelector('.input-url'); // used by selectAsset() (see contentbuilder.js)
@@ -68159,7 +68163,7 @@ class Hyperlink {
68159
68163
  if (modalFileSelect.querySelector('iframe').src === 'about:blank') {
68160
68164
  modalFileSelect.querySelector('iframe').src = this.builder.opts.fileselect;
68161
68165
  }
68162
- util.showModal(modalFileSelect, false, null, false);
68166
+ util.showModal(modalFileSelect, false, null, false, this.builder.assetPanelFullScreen);
68163
68167
  }
68164
68168
  this.builder.targetInput = modal.querySelector('.input-url'); // used by selectAsset() (see contentbuilder.js)
68165
68169
  this.builder.targetCallback = null;
@@ -70049,7 +70053,7 @@ class Video {
70049
70053
  util.showModal(modalVideoSelect, false, () => {
70050
70054
  inpSelectVideo.removeAttribute('data-focus');
70051
70055
  inpSelectVideo.focus();
70052
- });
70056
+ }, false, this.builder.assetPanelFullScreen);
70053
70057
  inpSelectVideo.setAttribute('data-focus', true);
70054
70058
  }
70055
70059
  this.builder.targetInput = videoModal.querySelector('.input-url'); // used by selectAsset() (see contentbuilder.js)
@@ -70242,7 +70246,7 @@ class Audio {
70242
70246
  util.showModal(modalAudioSelect, false, () => {
70243
70247
  inpSelectAudio.removeAttribute('data-focus');
70244
70248
  inpSelectAudio.focus();
70245
- });
70249
+ }, false, this.builder.assetPanelFullScreen);
70246
70250
  inpSelectAudio.setAttribute('data-focus', true);
70247
70251
  }
70248
70252
  this.builder.targetInput = audioModal.querySelector('.input-url'); // used by selectAsset() (see contentbuilder.js)
@@ -74375,7 +74379,7 @@ class ColumnTool {
74375
74379
  util.showModal(modalImageSelect, false, () => {
74376
74380
  elm.removeAttribute('data-focus');
74377
74381
  elm.focus();
74378
- });
74382
+ }, false, this.builder.assetPanelFullScreen);
74379
74383
  elm.setAttribute('data-focus', true);
74380
74384
  }
74381
74385
  this.builder.targetInput = imageSource.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
@@ -75218,7 +75222,7 @@ class ColumnTool {
75218
75222
  util.showModal(modalFileSelect, false, () => {
75219
75223
  inputSelectOther.removeAttribute('data-focus');
75220
75224
  inputSelectOther.focus();
75221
- }, false);
75225
+ }, false, this.builder.assetPanelFullScreen);
75222
75226
  inputSelectOther.setAttribute('data-focus', true);
75223
75227
  }
75224
75228
  this.builder.targetInput = this.cellSettings.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
@@ -75283,7 +75287,7 @@ class ColumnTool {
75283
75287
  util.showModal(modalMediaSelect, false, () => {
75284
75288
  elm.removeAttribute('data-focus');
75285
75289
  elm.focus();
75286
- });
75290
+ }, false, this.builder.assetPanelFullScreen);
75287
75291
  elm.setAttribute('data-focus', true);
75288
75292
  this.builder.targetInput = inpSrc; // used by selectAsset() (see contentbuilder.js)
75289
75293
  this.builder.targetCallback = () => {
@@ -75303,7 +75307,7 @@ class ColumnTool {
75303
75307
  util.showModal(modalImageSelect, false, () => {
75304
75308
  elm.removeAttribute('data-focus');
75305
75309
  elm.focus();
75306
- });
75310
+ }, false, this.builder.assetPanelFullScreen);
75307
75311
  elm.setAttribute('data-focus', true);
75308
75312
  this.builder.targetInput = inpSrc; // used by selectAsset() (see contentbuilder.js)
75309
75313
  this.builder.targetCallback = () => {
@@ -75716,7 +75720,7 @@ class ColumnTool {
75716
75720
  btn.removeAttribute('data-focus');
75717
75721
  btn.focus();
75718
75722
  }
75719
- });
75723
+ }, false, this.builder.assetPanelFullScreen);
75720
75724
  if (btn) btn.setAttribute('data-focus', true);
75721
75725
  }
75722
75726
  readImageAdjust(elm, useTarget) {
@@ -83968,7 +83972,10 @@ class Rte {
83968
83972
  if (iframe.src === 'about:blank') {
83969
83973
  iframe.src = this.builder.opts.imageselect;
83970
83974
  }
83971
- util.showModal(modalImageSelect);
83975
+ util.showModal(modalImageSelect, false, () => {
83976
+ inputImageSelect.removeAttribute('data-focus');
83977
+ inputImageSelect.focus();
83978
+ }, false, this.builder.assetPanelFullScreen);
83972
83979
  }
83973
83980
  this.builder.targetInput = modalInsertImage.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
83974
83981
  this.builder.targetCallback = null;
@@ -91078,7 +91085,7 @@ class MediaPicker {
91078
91085
  this.builder.util.showModal(modal, false, () => {
91079
91086
  elm.removeAttribute('data-focus');
91080
91087
  elm.focus();
91081
- });
91088
+ }, false, this.builder.assetPanelFullScreen);
91082
91089
  elm.setAttribute('data-focus', true);
91083
91090
  this.builder.targetInput = inpSrc; // used by selectAsset() (see contentbuilder.js)
91084
91091
  this.builder.targetCallback = null;
@@ -91241,7 +91248,7 @@ class MediaPicker {
91241
91248
  btn.removeAttribute('data-focus');
91242
91249
  btn.focus();
91243
91250
  }
91244
- });
91251
+ }, false, this.builder.assetPanelFullScreen);
91245
91252
  if (btn) btn.setAttribute('data-focus', true);
91246
91253
  }
91247
91254
  }
@@ -92709,7 +92716,7 @@ class Dictation {
92709
92716
  <style>
92710
92717
  #_cbhtml .is-modal.page-command {
92711
92718
  width: 25vw;
92712
- min-width: 393px;
92719
+ min-width: 500px;
92713
92720
  max-width: 600px;
92714
92721
  height: 230px;
92715
92722
  top: auto;
@@ -94102,24 +94109,25 @@ class ContentBuilder {
94102
94109
  otherSelectCaption: 'Select Document',
94103
94110
  // otherSelectIcon: '<svg class="is-icon-flex"><use xlink:href="#ion-ios-folder-outline"></use></svg>',
94104
94111
  otherSelectIcon: '<svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#icon-list-search"></use></svg>',
94105
- imageSelectWidth: '80vw',
94106
- imageSelectHeight: '80vh',
94107
- fileSelectWidth: '80vw',
94108
- fileSelectHeight: '80vh',
94109
- videoSelectWidth: '80vw',
94110
- videoSelectHeight: '80vh',
94111
- audioSelectWidth: '80vw',
94112
- audioSelectHeight: '80vh',
94113
- mediaSelectWidth: '80vw',
94114
- mediaSelectHeight: '80vh',
94115
- otherSelectWidth: '80vw',
94116
- otherSelectHeight: '80vh',
94112
+ imageSelectWidth: '88vw',
94113
+ imageSelectHeight: '88vh',
94114
+ fileSelectWidth: '88vw',
94115
+ fileSelectHeight: '88vh',
94116
+ videoSelectWidth: '88vw',
94117
+ videoSelectHeight: '88vh',
94118
+ audioSelectWidth: '88vw',
94119
+ audioSelectHeight: '88vh',
94120
+ mediaSelectWidth: '88vw',
94121
+ mediaSelectHeight: '88vh',
94122
+ otherSelectWidth: '88vw',
94123
+ otherSelectHeight: '88vh',
94117
94124
  imageSelectMaxWidth: '1600px',
94118
94125
  fileSelectMaxWidth: '1600px',
94119
94126
  videoSelectMaxWidth: '1600px',
94120
94127
  audioSelectMaxWidth: '1600px',
94121
94128
  mediaSelectMaxWidth: '1600px',
94122
94129
  otherSelectMaxWidth: '1600px',
94130
+ assetPanelFullScreen: false,
94123
94131
  codeEditorWidth: '80vw',
94124
94132
  codeEditorHeight: '80vh',
94125
94133
  codeEditorMaxWidth: '1600px',
@@ -94808,6 +94816,26 @@ class ContentBuilder {
94808
94816
  } else if (this.opts.videoselect !== '') {
94809
94817
  this.opts.videoSelect = this.opts.videoselect;
94810
94818
  }
94819
+ if (this.assetPanelFullScreen) {
94820
+ this.imageSelectWidth = '100vw';
94821
+ this.imageSelectHeight = '100vh';
94822
+ this.fileSelectWidth = '100vw';
94823
+ this.fileSelectHeight = '100vh';
94824
+ this.videoSelectWidth = '100vw';
94825
+ this.videoSelectHeight = '100vh';
94826
+ this.audioSelectWidth = '100vw';
94827
+ this.audioSelectHeight = '100vh';
94828
+ this.mediaSelectWidth = '100vw';
94829
+ this.mediaSelectHeight = '100vh';
94830
+ this.otherSelectWidth = '100vw';
94831
+ this.otherSelectHeight = '100vh';
94832
+ this.imageSelectMaxWidth = '100vw';
94833
+ this.fileSelectMaxWidth = '100vw';
94834
+ this.videoSelectMaxWidth = '100vw';
94835
+ this.audioSelectMaxWidth = '100vw';
94836
+ this.mediaSelectMaxWidth = '100vw';
94837
+ this.otherSelectMaxWidth = '100vw';
94838
+ }
94811
94839
 
94812
94840
  // if(this.opts.largerImageHandler!=='') {
94813
94841
  // this.opts.mediaHandler = this.opts.largerImageHandler;
@@ -96174,7 +96202,10 @@ class ContentBuilder {
96174
96202
  let modal = this.builderStuff.querySelector('.is-modal.otherselect');
96175
96203
  iframe = modal.querySelector('iframe');
96176
96204
  if (iframe.src === 'about:blank') iframe.src = this.opts.otherSelect;
96177
- this.util.showModal(modal);
96205
+ this.util.showModal(modal, false, () => {
96206
+ theTrigger.removeAttribute('data-focus');
96207
+ theTrigger.focus();
96208
+ }, false, this.assetPanelFullScreen);
96178
96209
  this.targetInput = targetInput; // used by selectAsset() (see contentbuilder.js)
96179
96210
  this.targetCallback = null;
96180
96211
  this.targetAssetType = targetAssetType;
@@ -96239,7 +96270,10 @@ class ContentBuilder {
96239
96270
  iframe = modal.querySelector('iframe');
96240
96271
  if (iframe.src === 'about:blank') iframe.src = this.opts.fileSelect;
96241
96272
  }
96242
- this.util.showModal(modal);
96273
+ this.util.showModal(modal, false, () => {
96274
+ theTrigger.removeAttribute('data-focus');
96275
+ theTrigger.focus();
96276
+ }, false, this.assetPanelFullScreen);
96243
96277
  this.targetInput = targetInput; // used by selectAsset() (see contentbuilder.js)
96244
96278
  this.targetCallback = null;
96245
96279
  this.targetAssetType = targetAssetType;
@@ -96650,8 +96684,8 @@ class ContentBuilder {
96650
96684
  });
96651
96685
  }
96652
96686
  }
96653
- showModal(modal, overlayStay, cancelCallback, animated) {
96654
- this.util.showModal(modal, overlayStay, cancelCallback, animated);
96687
+ showModal(modal, overlayStay, cancelCallback, animated, overflowHidden) {
96688
+ this.util.showModal(modal, overlayStay, cancelCallback, animated, overflowHidden);
96655
96689
  }
96656
96690
  hideModal(modal) {
96657
96691
  this.util._hideModal(modal); // this _hideModal will also trigger cancelCallback defined by showModal. This is done by programmatically click the overlay.
@@ -96662,13 +96696,13 @@ class ContentBuilder {
96662
96696
  selector: selector
96663
96697
  });
96664
96698
  }
96665
- createModal(modal, selector, overlayStay, cancelCallback, animated) {
96699
+ createModal(modal, selector, overlayStay, cancelCallback, animated, overflowHidden) {
96666
96700
  let embeddedModal = this.builderStuff.querySelector(selector);
96667
96701
  if (!embeddedModal) {
96668
96702
  this.builderStuff.appendChild(modal);
96669
96703
  embeddedModal = this.builderStuff.querySelector(selector);
96670
96704
  }
96671
- this.showModal(embeddedModal, overlayStay, cancelCallback, animated);
96705
+ this.showModal(embeddedModal, overlayStay, cancelCallback, animated, overflowHidden);
96672
96706
  new Draggable$1({
96673
96707
  selector: '.is-draggable'
96674
96708
  });
@@ -115349,24 +115383,25 @@ class ContentBox {
115349
115383
  otherSelectCaption: 'Select Document',
115350
115384
  // otherSelectIcon: '<svg class="is-icon-flex"><use xlink:href="#ion-ios-folder-outline"></use></svg>',
115351
115385
  otherSelectIcon: '<svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#icon-list-search"></use></svg>',
115352
- imageSelectWidth: '80vw',
115353
- imageSelectHeight: '80vh',
115354
- fileSelectWidth: '80vw',
115355
- fileSelectHeight: '80vh',
115356
- videoSelectWidth: '80vw',
115357
- videoSelectHeight: '80vh',
115358
- audioSelectWidth: '80vw',
115359
- audioSelectHeight: '80vh',
115360
- mediaSelectWidth: '80vw',
115361
- mediaSelectHeight: '80vh',
115362
- otherSelectWidth: '80vw',
115363
- otherSelectHeight: '80vh',
115386
+ imageSelectWidth: '88vw',
115387
+ imageSelectHeight: '88vh',
115388
+ fileSelectWidth: '88vw',
115389
+ fileSelectHeight: '88vh',
115390
+ videoSelectWidth: '88vw',
115391
+ videoSelectHeight: '88vh',
115392
+ audioSelectWidth: '88vw',
115393
+ audioSelectHeight: '88vh',
115394
+ mediaSelectWidth: '88vw',
115395
+ mediaSelectHeight: '88vh',
115396
+ otherSelectWidth: '88vw',
115397
+ otherSelectHeight: '88vh',
115364
115398
  imageSelectMaxWidth: '1600px',
115365
115399
  fileSelectMaxWidth: '1600px',
115366
115400
  videoSelectMaxWidth: '1600px',
115367
115401
  audioSelectMaxWidth: '1600px',
115368
115402
  mediaSelectMaxWidth: '1600px',
115369
115403
  otherSelectMaxWidth: '1600px',
115404
+ assetPanelFullScreen: false,
115370
115405
  codeEditorWidth: '80vw',
115371
115406
  codeEditorHeight: '80vh',
115372
115407
  codeEditorMaxWidth: '1600px',
@@ -118592,6 +118627,7 @@ Add an image for each feature.`, 'Revise the headline, paragraph, and all the te
118592
118627
  audioSelectMaxWidth: this.settings.audioSelectMaxWidth,
118593
118628
  mediaSelectMaxWidth: this.settings.mediaSelectMaxWidth,
118594
118629
  otherSelectMaxWidth: this.settings.otherSelectMaxWidth,
118630
+ assetPanelFullScreen: this.settings.assetPanelFullScreen,
118595
118631
  codeEditorWidth: this.settings.codeEditorWidth,
118596
118632
  codeEditorHeight: this.settings.codeEditorHeight,
118597
118633
  codeEditorMaxWidth: this.settings.codeEditorMaxWidth,
@@ -120914,8 +120950,8 @@ Add an image for each feature.`, 'Revise the headline, paragraph, and all the te
120914
120950
  this.editor.util.showChoice(message, yestext, callback);
120915
120951
  }
120916
120952
 
120917
- showModal(modal, overlayStay, cancelCallback, animated) {
120918
- this.editor.util.showModal(modal, overlayStay, cancelCallback, animated);
120953
+ showModal(modal, overlayStay, cancelCallback, animated, overflowHidden) {
120954
+ this.editor.util.showModal(modal, overlayStay, cancelCallback, animated, overflowHidden);
120919
120955
  }
120920
120956
 
120921
120957
  hideModal(modal) {