@innovastudio/contentbuilder 1.4.97 → 1.4.99
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -4215,14 +4215,16 @@ class Util {
|
|
4215
4215
|
Note:
|
4216
4216
|
- hideModal will remove the modal element, so calling show modal multiple times won't attach multiple events (safe).
|
4217
4217
|
*/
|
4218
|
-
showModal(modal, overlayStay, cancelCallback, animated) {
|
4218
|
+
showModal(modal, overlayStay, cancelCallback, animated, overflowHidden) {
|
4219
4219
|
const dom = this.dom;
|
4220
4220
|
dom.addClass(modal, 'active');
|
4221
4221
|
modal.setAttribute('aria-hidden', false);
|
4222
|
+
if (overflowHidden) document.body.style.overflow = 'hidden';
|
4222
4223
|
const handleKeyDown = e => {
|
4223
4224
|
if (e.keyCode === 27) {
|
4224
4225
|
// escape key
|
4225
4226
|
|
4227
|
+
if (overflowHidden) document.body.style.overflow = '';
|
4226
4228
|
if (dom.hasClass(modal, 'active')) this.hideModal(modal); // check first in case programmatically ESC key that already call hideModal is triggered (see _hideModal)
|
4227
4229
|
|
4228
4230
|
modal.removeEventListener('keydown', handleKeyDown);
|
@@ -4286,6 +4288,7 @@ class Util {
|
|
4286
4288
|
if (!overlayStay) {
|
4287
4289
|
let overlay = modal.querySelector('.is-modal-overlay');
|
4288
4290
|
dom.addEventListener(overlay, 'click', () => {
|
4291
|
+
if (overflowHidden) document.body.style.overflow = '';
|
4289
4292
|
this.hideModal(modal);
|
4290
4293
|
modal.removeEventListener('keydown', handleKeyDown);
|
4291
4294
|
const btnClose = modal.querySelector('.is-modal-close');
|
@@ -4295,6 +4298,7 @@ class Util {
|
|
4295
4298
|
}
|
4296
4299
|
}
|
4297
4300
|
const close = () => {
|
4301
|
+
if (overflowHidden) document.body.style.overflow = '';
|
4298
4302
|
if (dom.hasClass(modal, 'active')) this.hideModal(modal); // check first in case programmatically ESC key that already call hideModal is triggered (see _hideModal)
|
4299
4303
|
|
4300
4304
|
modal.removeEventListener('keydown', handleKeyDown);
|
@@ -49926,7 +49930,7 @@ class Image$1 {
|
|
49926
49930
|
util.showModal(modalFileSelect, false, () => {
|
49927
49931
|
inputSelectOther.removeAttribute('data-focus');
|
49928
49932
|
inputSelectOther.focus();
|
49929
|
-
}, false);
|
49933
|
+
}, false, this.builder.assetPanelFullScreen);
|
49930
49934
|
inputSelectOther.setAttribute('data-focus', true);
|
49931
49935
|
}
|
49932
49936
|
this.builder.targetInput = modalImageLink.querySelector('.input-link'); // used by selectAsset() (see contentbuilder.js)
|
@@ -50146,7 +50150,7 @@ class Image$1 {
|
|
50146
50150
|
util.showModal(modalImageSelect, false, () => {
|
50147
50151
|
btnImageSelect.removeAttribute('data-focus');
|
50148
50152
|
btnImageSelect.focus();
|
50149
|
-
});
|
50153
|
+
}, false, this.builder.assetPanelFullScreen);
|
50150
50154
|
btnImageSelect.setAttribute('data-focus', true);
|
50151
50155
|
}
|
50152
50156
|
this.builder.targetInput = modalImageLink.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
|
@@ -50201,7 +50205,7 @@ class Image$1 {
|
|
50201
50205
|
util.showModal(modalFileSelect, false, () => {
|
50202
50206
|
btnImageSelect2.removeAttribute('data-focus');
|
50203
50207
|
btnImageSelect2.focus();
|
50204
|
-
},
|
50208
|
+
}, false, this.builder.assetPanelFullScreen);
|
50205
50209
|
btnImageSelect2.setAttribute('data-focus', true);
|
50206
50210
|
this.builder.targetInput = modalImageLink.querySelector('.input-link'); // used by selectAsset() (see contentbuilder.js)
|
50207
50211
|
this.builder.targetCallback = null;
|
@@ -50227,7 +50231,7 @@ class Image$1 {
|
|
50227
50231
|
util.showModal(modalImageSelect, false, () => {
|
50228
50232
|
btnImageSelect2.removeAttribute('data-focus');
|
50229
50233
|
btnImageSelect2.focus();
|
50230
|
-
});
|
50234
|
+
}, false, this.builder.assetPanelFullScreen);
|
50231
50235
|
btnImageSelect2.setAttribute('data-focus', true);
|
50232
50236
|
this.builder.targetInput = modalImageLink.querySelector('.input-link'); // used by selectAsset() (see contentbuilder.js)
|
50233
50237
|
this.builder.targetCallback = null;
|
@@ -53012,7 +53016,7 @@ class Hyperlink {
|
|
53012
53016
|
util.showModal(modalFileSelect, false, () => {
|
53013
53017
|
inputSelectOther.removeAttribute('data-focus');
|
53014
53018
|
inputSelectOther.focus();
|
53015
|
-
}, false);
|
53019
|
+
}, false, this.builder.assetPanelFullScreen);
|
53016
53020
|
inputSelectOther.setAttribute('data-focus', true);
|
53017
53021
|
}
|
53018
53022
|
this.builder.targetInput = modal.querySelector('.input-url'); // used by selectAsset() (see contentbuilder.js)
|
@@ -53041,7 +53045,7 @@ class Hyperlink {
|
|
53041
53045
|
if (modalFileSelect.querySelector('iframe').src === 'about:blank') {
|
53042
53046
|
modalFileSelect.querySelector('iframe').src = this.builder.opts.fileselect;
|
53043
53047
|
}
|
53044
|
-
util.showModal(modalFileSelect, false, null, false);
|
53048
|
+
util.showModal(modalFileSelect, false, null, false, this.builder.assetPanelFullScreen);
|
53045
53049
|
}
|
53046
53050
|
this.builder.targetInput = modal.querySelector('.input-url'); // used by selectAsset() (see contentbuilder.js)
|
53047
53051
|
this.builder.targetCallback = null;
|
@@ -54931,7 +54935,7 @@ class Video {
|
|
54931
54935
|
util.showModal(modalVideoSelect, false, () => {
|
54932
54936
|
inpSelectVideo.removeAttribute('data-focus');
|
54933
54937
|
inpSelectVideo.focus();
|
54934
|
-
});
|
54938
|
+
}, false, this.builder.assetPanelFullScreen);
|
54935
54939
|
inpSelectVideo.setAttribute('data-focus', true);
|
54936
54940
|
}
|
54937
54941
|
this.builder.targetInput = videoModal.querySelector('.input-url'); // used by selectAsset() (see contentbuilder.js)
|
@@ -55124,7 +55128,7 @@ class Audio {
|
|
55124
55128
|
util.showModal(modalAudioSelect, false, () => {
|
55125
55129
|
inpSelectAudio.removeAttribute('data-focus');
|
55126
55130
|
inpSelectAudio.focus();
|
55127
|
-
});
|
55131
|
+
}, false, this.builder.assetPanelFullScreen);
|
55128
55132
|
inpSelectAudio.setAttribute('data-focus', true);
|
55129
55133
|
}
|
55130
55134
|
this.builder.targetInput = audioModal.querySelector('.input-url'); // used by selectAsset() (see contentbuilder.js)
|
@@ -59257,7 +59261,7 @@ class ColumnTool {
|
|
59257
59261
|
util.showModal(modalImageSelect, false, () => {
|
59258
59262
|
elm.removeAttribute('data-focus');
|
59259
59263
|
elm.focus();
|
59260
|
-
});
|
59264
|
+
}, false, this.builder.assetPanelFullScreen);
|
59261
59265
|
elm.setAttribute('data-focus', true);
|
59262
59266
|
}
|
59263
59267
|
this.builder.targetInput = imageSource.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
|
@@ -60100,7 +60104,7 @@ class ColumnTool {
|
|
60100
60104
|
util.showModal(modalFileSelect, false, () => {
|
60101
60105
|
inputSelectOther.removeAttribute('data-focus');
|
60102
60106
|
inputSelectOther.focus();
|
60103
|
-
}, false);
|
60107
|
+
}, false, this.builder.assetPanelFullScreen);
|
60104
60108
|
inputSelectOther.setAttribute('data-focus', true);
|
60105
60109
|
}
|
60106
60110
|
this.builder.targetInput = this.cellSettings.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
|
@@ -60165,7 +60169,7 @@ class ColumnTool {
|
|
60165
60169
|
util.showModal(modalMediaSelect, false, () => {
|
60166
60170
|
elm.removeAttribute('data-focus');
|
60167
60171
|
elm.focus();
|
60168
|
-
});
|
60172
|
+
}, false, this.builder.assetPanelFullScreen);
|
60169
60173
|
elm.setAttribute('data-focus', true);
|
60170
60174
|
this.builder.targetInput = inpSrc; // used by selectAsset() (see contentbuilder.js)
|
60171
60175
|
this.builder.targetCallback = () => {
|
@@ -60185,7 +60189,7 @@ class ColumnTool {
|
|
60185
60189
|
util.showModal(modalImageSelect, false, () => {
|
60186
60190
|
elm.removeAttribute('data-focus');
|
60187
60191
|
elm.focus();
|
60188
|
-
});
|
60192
|
+
}, false, this.builder.assetPanelFullScreen);
|
60189
60193
|
elm.setAttribute('data-focus', true);
|
60190
60194
|
this.builder.targetInput = inpSrc; // used by selectAsset() (see contentbuilder.js)
|
60191
60195
|
this.builder.targetCallback = () => {
|
@@ -60598,7 +60602,7 @@ class ColumnTool {
|
|
60598
60602
|
btn.removeAttribute('data-focus');
|
60599
60603
|
btn.focus();
|
60600
60604
|
}
|
60601
|
-
});
|
60605
|
+
}, false, this.builder.assetPanelFullScreen);
|
60602
60606
|
if (btn) btn.setAttribute('data-focus', true);
|
60603
60607
|
}
|
60604
60608
|
readImageAdjust(elm, useTarget) {
|
@@ -68850,7 +68854,10 @@ class Rte {
|
|
68850
68854
|
if (iframe.src === 'about:blank') {
|
68851
68855
|
iframe.src = this.builder.opts.imageselect;
|
68852
68856
|
}
|
68853
|
-
util.showModal(modalImageSelect)
|
68857
|
+
util.showModal(modalImageSelect, false, () => {
|
68858
|
+
inputImageSelect.removeAttribute('data-focus');
|
68859
|
+
inputImageSelect.focus();
|
68860
|
+
}, false, this.builder.assetPanelFullScreen);
|
68854
68861
|
}
|
68855
68862
|
this.builder.targetInput = modalInsertImage.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
|
68856
68863
|
this.builder.targetCallback = null;
|
@@ -75960,7 +75967,7 @@ class MediaPicker {
|
|
75960
75967
|
this.builder.util.showModal(modal, false, () => {
|
75961
75968
|
elm.removeAttribute('data-focus');
|
75962
75969
|
elm.focus();
|
75963
|
-
});
|
75970
|
+
}, false, this.builder.assetPanelFullScreen);
|
75964
75971
|
elm.setAttribute('data-focus', true);
|
75965
75972
|
this.builder.targetInput = inpSrc; // used by selectAsset() (see contentbuilder.js)
|
75966
75973
|
this.builder.targetCallback = null;
|
@@ -76123,7 +76130,7 @@ class MediaPicker {
|
|
76123
76130
|
btn.removeAttribute('data-focus');
|
76124
76131
|
btn.focus();
|
76125
76132
|
}
|
76126
|
-
});
|
76133
|
+
}, false, this.builder.assetPanelFullScreen);
|
76127
76134
|
if (btn) btn.setAttribute('data-focus', true);
|
76128
76135
|
}
|
76129
76136
|
}
|
@@ -77591,7 +77598,7 @@ class Dictation {
|
|
77591
77598
|
<style>
|
77592
77599
|
#_cbhtml .is-modal.page-command {
|
77593
77600
|
width: 25vw;
|
77594
|
-
min-width:
|
77601
|
+
min-width: 500px;
|
77595
77602
|
max-width: 600px;
|
77596
77603
|
height: 230px;
|
77597
77604
|
top: auto;
|
@@ -78984,24 +78991,25 @@ class ContentBuilder {
|
|
78984
78991
|
otherSelectCaption: 'Select Document',
|
78985
78992
|
// otherSelectIcon: '<svg class="is-icon-flex"><use xlink:href="#ion-ios-folder-outline"></use></svg>',
|
78986
78993
|
otherSelectIcon: '<svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#icon-list-search"></use></svg>',
|
78987
|
-
imageSelectWidth: '
|
78988
|
-
imageSelectHeight: '
|
78989
|
-
fileSelectWidth: '
|
78990
|
-
fileSelectHeight: '
|
78991
|
-
videoSelectWidth: '
|
78992
|
-
videoSelectHeight: '
|
78993
|
-
audioSelectWidth: '
|
78994
|
-
audioSelectHeight: '
|
78995
|
-
mediaSelectWidth: '
|
78996
|
-
mediaSelectHeight: '
|
78997
|
-
otherSelectWidth: '
|
78998
|
-
otherSelectHeight: '
|
78994
|
+
imageSelectWidth: '88vw',
|
78995
|
+
imageSelectHeight: '88vh',
|
78996
|
+
fileSelectWidth: '88vw',
|
78997
|
+
fileSelectHeight: '88vh',
|
78998
|
+
videoSelectWidth: '88vw',
|
78999
|
+
videoSelectHeight: '88vh',
|
79000
|
+
audioSelectWidth: '88vw',
|
79001
|
+
audioSelectHeight: '88vh',
|
79002
|
+
mediaSelectWidth: '88vw',
|
79003
|
+
mediaSelectHeight: '88vh',
|
79004
|
+
otherSelectWidth: '88vw',
|
79005
|
+
otherSelectHeight: '88vh',
|
78999
79006
|
imageSelectMaxWidth: '1600px',
|
79000
79007
|
fileSelectMaxWidth: '1600px',
|
79001
79008
|
videoSelectMaxWidth: '1600px',
|
79002
79009
|
audioSelectMaxWidth: '1600px',
|
79003
79010
|
mediaSelectMaxWidth: '1600px',
|
79004
79011
|
otherSelectMaxWidth: '1600px',
|
79012
|
+
assetPanelFullScreen: false,
|
79005
79013
|
codeEditorWidth: '80vw',
|
79006
79014
|
codeEditorHeight: '80vh',
|
79007
79015
|
codeEditorMaxWidth: '1600px',
|
@@ -79690,6 +79698,26 @@ class ContentBuilder {
|
|
79690
79698
|
} else if (this.opts.videoselect !== '') {
|
79691
79699
|
this.opts.videoSelect = this.opts.videoselect;
|
79692
79700
|
}
|
79701
|
+
if (this.assetPanelFullScreen) {
|
79702
|
+
this.imageSelectWidth = '100vw';
|
79703
|
+
this.imageSelectHeight = '100vh';
|
79704
|
+
this.fileSelectWidth = '100vw';
|
79705
|
+
this.fileSelectHeight = '100vh';
|
79706
|
+
this.videoSelectWidth = '100vw';
|
79707
|
+
this.videoSelectHeight = '100vh';
|
79708
|
+
this.audioSelectWidth = '100vw';
|
79709
|
+
this.audioSelectHeight = '100vh';
|
79710
|
+
this.mediaSelectWidth = '100vw';
|
79711
|
+
this.mediaSelectHeight = '100vh';
|
79712
|
+
this.otherSelectWidth = '100vw';
|
79713
|
+
this.otherSelectHeight = '100vh';
|
79714
|
+
this.imageSelectMaxWidth = '100vw';
|
79715
|
+
this.fileSelectMaxWidth = '100vw';
|
79716
|
+
this.videoSelectMaxWidth = '100vw';
|
79717
|
+
this.audioSelectMaxWidth = '100vw';
|
79718
|
+
this.mediaSelectMaxWidth = '100vw';
|
79719
|
+
this.otherSelectMaxWidth = '100vw';
|
79720
|
+
}
|
79693
79721
|
|
79694
79722
|
// if(this.opts.largerImageHandler!=='') {
|
79695
79723
|
// this.opts.mediaHandler = this.opts.largerImageHandler;
|
@@ -81056,7 +81084,10 @@ class ContentBuilder {
|
|
81056
81084
|
let modal = this.builderStuff.querySelector('.is-modal.otherselect');
|
81057
81085
|
iframe = modal.querySelector('iframe');
|
81058
81086
|
if (iframe.src === 'about:blank') iframe.src = this.opts.otherSelect;
|
81059
|
-
this.util.showModal(modal)
|
81087
|
+
this.util.showModal(modal, false, () => {
|
81088
|
+
theTrigger.removeAttribute('data-focus');
|
81089
|
+
theTrigger.focus();
|
81090
|
+
}, false, this.assetPanelFullScreen);
|
81060
81091
|
this.targetInput = targetInput; // used by selectAsset() (see contentbuilder.js)
|
81061
81092
|
this.targetCallback = null;
|
81062
81093
|
this.targetAssetType = targetAssetType;
|
@@ -81121,7 +81152,10 @@ class ContentBuilder {
|
|
81121
81152
|
iframe = modal.querySelector('iframe');
|
81122
81153
|
if (iframe.src === 'about:blank') iframe.src = this.opts.fileSelect;
|
81123
81154
|
}
|
81124
|
-
this.util.showModal(modal)
|
81155
|
+
this.util.showModal(modal, false, () => {
|
81156
|
+
theTrigger.removeAttribute('data-focus');
|
81157
|
+
theTrigger.focus();
|
81158
|
+
}, false, this.assetPanelFullScreen);
|
81125
81159
|
this.targetInput = targetInput; // used by selectAsset() (see contentbuilder.js)
|
81126
81160
|
this.targetCallback = null;
|
81127
81161
|
this.targetAssetType = targetAssetType;
|
@@ -81532,8 +81566,8 @@ class ContentBuilder {
|
|
81532
81566
|
});
|
81533
81567
|
}
|
81534
81568
|
}
|
81535
|
-
showModal(modal, overlayStay, cancelCallback, animated) {
|
81536
|
-
this.util.showModal(modal, overlayStay, cancelCallback, animated);
|
81569
|
+
showModal(modal, overlayStay, cancelCallback, animated, overflowHidden) {
|
81570
|
+
this.util.showModal(modal, overlayStay, cancelCallback, animated, overflowHidden);
|
81537
81571
|
}
|
81538
81572
|
hideModal(modal) {
|
81539
81573
|
this.util._hideModal(modal); // this _hideModal will also trigger cancelCallback defined by showModal. This is done by programmatically click the overlay.
|
@@ -81544,13 +81578,13 @@ class ContentBuilder {
|
|
81544
81578
|
selector: selector
|
81545
81579
|
});
|
81546
81580
|
}
|
81547
|
-
createModal(modal, selector, overlayStay, cancelCallback, animated) {
|
81581
|
+
createModal(modal, selector, overlayStay, cancelCallback, animated, overflowHidden) {
|
81548
81582
|
let embeddedModal = this.builderStuff.querySelector(selector);
|
81549
81583
|
if (!embeddedModal) {
|
81550
81584
|
this.builderStuff.appendChild(modal);
|
81551
81585
|
embeddedModal = this.builderStuff.querySelector(selector);
|
81552
81586
|
}
|
81553
|
-
this.showModal(embeddedModal, overlayStay, cancelCallback, animated);
|
81587
|
+
this.showModal(embeddedModal, overlayStay, cancelCallback, animated, overflowHidden);
|
81554
81588
|
new Draggable$1({
|
81555
81589
|
selector: '.is-draggable'
|
81556
81590
|
});
|