@innovastudio/contentbox 1.5.4 → 1.5.6
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.
|
4
|
+
"version": "1.5.6",
|
5
5
|
"description": "",
|
6
6
|
"main": "public/contentbox/contentbox.esm.js",
|
7
7
|
"files": [
|
@@ -46,7 +46,7 @@
|
|
46
46
|
"webpack-dev-server": "^4.0.0"
|
47
47
|
},
|
48
48
|
"dependencies": {
|
49
|
-
"@innovastudio/contentbuilder": "^1.4.
|
49
|
+
"@innovastudio/contentbuilder": "^1.4.10",
|
50
50
|
"js-beautify": "^1.14.0"
|
51
51
|
}
|
52
52
|
}
|
@@ -4043,8 +4043,17 @@ class EditSection {
|
|
4043
4043
|
` + '<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="">↑</button>' + '<button title="' + out('Move Down') + '" class="cmd-section-down">↓</button>' + '<button title="' + out('Move to Top') + '" class="cmd-section-top"><span style="transform:rotate(90deg);position:absolute;top:13px;left:15px;">⇤</span></button>' + '<button title="' + out('Move to Bottom') + '" class="cmd-section-bottom"><span style="transform:rotate(90deg);position:absolute;top:13px;left:15px;">⇥</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>';
|
4044
4044
|
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('xxs') + '" class="cmd-box-spacing" data-value="xxs">' + out('xxs') + '</button>' + '<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>';
|
4045
4045
|
html += '<div class="div-section-spacesettings" style="display:flex;flex-direction:column;">' + '<div class="div-multi-boxes">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Between Boxes') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('space') + '" class="cmd-betweenbox-spacing" data-value="space">' + out('space') + '</button>' + '<button title="' + out('no space') + '" class="cmd-betweenbox-spacing" data-value="no-space">' + out('no space') + '</button>' + '</div>' + '</div>' + '<div style="display:none;padding-top:20px;padding-bottom: 3px;">' + out('Stack') + ':</div>' + '<div style="display:none">' + '<button title="' + out('top') + '" class="cmd-section-stack" data-value="top">' + out('top') + '</button>' + '<button title="' + out('middle') + '" class="cmd-section-stack" data-value="middle">' + out('middle') + '</button>' + '<button title="' + out('bottom') + '" class="cmd-section-stack" data-value="bottom">' + out('bottom') + '</button>' + '<button title="' + out('Clear') + '" class="cmd-section-stack" data-value=""><svg class="is-icon-flex"><use xlink:href="#icon-clean"></use></svg></button>' + '</div>' + '<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>' + `
|
4046
|
+
<div style="padding-top:20px;padding-bottom:3px;">${out('Wrap Boxes (Breakpoint)')}:</div>
|
4047
|
+
<div style="padding-top:3px;display:flex;">
|
4048
|
+
<button title="${out('Tablet (Landscape)')}" class="input-breakpoint" data-value="md" style="width:40px;height:25px;">
|
4049
|
+
<svg class="is-icon-flex" style="width:16px;height:16px;transform:rotate(-90deg)"><use xlink:href="#icon-device-tablet"></use></svg>
|
4050
|
+
</button>
|
4051
|
+
<button title="${out('Tablet (Portrait)')}" class="input-breakpoint on" data-value="sm" style="width:40px;height:25px;">
|
4052
|
+
<svg class="is-icon-flex" style="width:16px;height:16px"><use xlink:href="#icon-device-tablet"></use></svg>
|
4053
|
+
</button>
|
4054
|
+
</div>
|
4046
4055
|
|
4047
|
-
<div class="is-separator
|
4056
|
+
<div class="is-separator" style="margin-top:20px"></div>
|
4048
4057
|
|
4049
4058
|
<div class="div-target" style="display: flex;justify-content: flex-end;padding: 5px 0 0;">
|
4050
4059
|
<button title="${out('Desktop')}" class="input-device on" data-value="" style="width:40px;height:25px;">
|
@@ -4442,9 +4451,33 @@ class EditSection {
|
|
4442
4451
|
section.removeAttribute('id');
|
4443
4452
|
info.innerHTML = '';
|
4444
4453
|
}
|
4454
|
+
}); // Breakpoint
|
4455
|
+
|
4456
|
+
let btns = modalEditSection.querySelectorAll('.input-breakpoint');
|
4457
|
+
btns.forEach(btn => {
|
4458
|
+
btn.addEventListener('click', () => {
|
4459
|
+
let section = this.builder.activeSection;
|
4460
|
+
if (!section) return;
|
4461
|
+
this.builder.editor.saveForUndo();
|
4462
|
+
let elms = modalEditSection.querySelectorAll('.input-breakpoint');
|
4463
|
+
elms.forEach(elm => {
|
4464
|
+
elm.classList.remove('on');
|
4465
|
+
});
|
4466
|
+
btn.classList.add('on');
|
4467
|
+
let target = btn.getAttribute('data-value');
|
4468
|
+
|
4469
|
+
if (target === 'sm') {
|
4470
|
+
section.classList.remove('md-wrap');
|
4471
|
+
} else if (target === 'md') {
|
4472
|
+
section.classList.add('md-wrap');
|
4473
|
+
} //Trigger Change event
|
4474
|
+
|
4475
|
+
|
4476
|
+
this.builder.onChange();
|
4477
|
+
});
|
4445
4478
|
}); // Section Visibility
|
4446
4479
|
|
4447
|
-
|
4480
|
+
btns = modalEditSection.querySelectorAll('.input-device');
|
4448
4481
|
btns.forEach(btn => {
|
4449
4482
|
btn.addEventListener('click', () => {
|
4450
4483
|
let section = this.builder.activeSection;
|
@@ -4712,6 +4745,16 @@ class EditSection {
|
|
4712
4745
|
|
4713
4746
|
|
4714
4747
|
this.realtimeVisibility(activeSection);
|
4748
|
+
btns = modalEditSection.querySelectorAll('.input-breakpoint');
|
4749
|
+
btns.forEach(btn => {
|
4750
|
+
dom$m.removeClass(btn, 'on');
|
4751
|
+
});
|
4752
|
+
|
4753
|
+
if (activeSection.classList.contains('md-wrap')) {
|
4754
|
+
dom$m.addClass(modalEditSection.querySelector('.input-breakpoint[data-value="md"]'), 'on');
|
4755
|
+
} else {
|
4756
|
+
dom$m.addClass(modalEditSection.querySelector('.input-breakpoint[data-value="sm"]'), 'on');
|
4757
|
+
}
|
4715
4758
|
}
|
4716
4759
|
|
4717
4760
|
close() {
|
@@ -63781,7 +63824,7 @@ class Image$1 {
|
|
63781
63824
|
</div>
|
63782
63825
|
|
63783
63826
|
<div class="is-modal imageselect" style="z-index:10005" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
|
63784
|
-
<div style="max-width
|
63827
|
+
<div style="max-width:${this.builder.imageSelectWidth};height:${this.builder.imageSelectHeight};padding:0;">
|
63785
63828
|
<iframe tabindex="0" style="width:100%;height:100%;border: none;display: block;" src="about:blank"></iframe>
|
63786
63829
|
</div>
|
63787
63830
|
</div>
|
@@ -66718,7 +66761,7 @@ class Hyperlink {
|
|
66718
66761
|
</div>
|
66719
66762
|
|
66720
66763
|
<div class="is-modal fileselect" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
|
66721
|
-
<div class="is-modal-content" style="max-width
|
66764
|
+
<div class="is-modal-content" style="max-width:${this.builder.fileSelectWidth};height:${this.builder.fileSelectHeight};padding:0;">
|
66722
66765
|
<iframe tabindex="0" style="width:100%;height:100%;border: none;display: block;" src="about:blank"></iframe>
|
66723
66766
|
</div>
|
66724
66767
|
</div>
|
@@ -68840,7 +68883,7 @@ class Video {
|
|
68840
68883
|
</div>
|
68841
68884
|
|
68842
68885
|
<div class="is-modal videoselect" style="z-index:10005" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
|
68843
|
-
<div style="max-width
|
68886
|
+
<div style="max-width:${this.builder.videoSelectWidth};height:${this.builder.videoSelectHeight};padding:0;">
|
68844
68887
|
<iframe tabindex="0" style="width:100%;height:100%;border: none;display: block;" src="about:blank"></iframe>
|
68845
68888
|
</div>
|
68846
68889
|
</div>
|
@@ -69077,7 +69120,7 @@ class Audio {
|
|
69077
69120
|
</div>
|
69078
69121
|
|
69079
69122
|
<div class="is-modal audioselect" style="z-index:10005" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
|
69080
|
-
<div style="max-width
|
69123
|
+
<div style="max-width:${this.builder.audioSelectWidth};height:${this.builder.audioSelectHeight};padding:0;">
|
69081
69124
|
<iframe tabindex="0" style="width:100%;height:100%;border: none;display: block;" src="about:blank"></iframe>
|
69082
69125
|
</div>
|
69083
69126
|
</div>
|
@@ -90630,7 +90673,10 @@ class LivePreview {
|
|
90630
90673
|
if (this.builder.previewURL) {
|
90631
90674
|
iframe.src = this.builder.previewURL + '?' + Math.floor(Date.now() / 1000);
|
90632
90675
|
} else {
|
90633
|
-
|
90676
|
+
try {
|
90677
|
+
this.writeHtml(iframe);
|
90678
|
+
} catch (e) {// Do Nothing
|
90679
|
+
}
|
90634
90680
|
}
|
90635
90681
|
} else {
|
90636
90682
|
iframe.src = this.builder.previewURL + '?' + Math.floor(Date.now() / 1000);
|
@@ -90715,7 +90761,7 @@ class LivePreview {
|
|
90715
90761
|
if (scripts[i].src.indexOf('.js') != -1 && scripts[i].src.indexOf('_next/') == -1 && //next
|
90716
90762
|
scripts[i].src.indexOf('static/js/') == -1 && //react
|
90717
90763
|
scripts[i].src.indexOf('src/') == -1 && //vue
|
90718
|
-
scripts[i].src.indexOf('index') == -1 && scripts[i].src.indexOf('contentbox.js') == -1 && scripts[i].src.indexOf('contentbox.min.js') == -1 && scripts[i].src.indexOf('contentbuilder.js') == -1 && scripts[i].src.indexOf('contentbuilder.min.js') == -1 && scripts[i].src.indexOf('plugin.js') == -1 && scripts[i].src.indexOf('config.js') == -1 && scripts[i].src.indexOf('en.js') == -1 && scripts[i].src.indexOf('rangy') == -1 && scripts[i].src.indexOf('minimalist-blocks') == -1) {
|
90764
|
+
scripts[i].src.indexOf('index') == -1 && scripts[i].src.indexOf('contentbox.js') == -1 && scripts[i].src.indexOf('contentbox.min.js') == -1 && scripts[i].src.indexOf('contentbuilder.js') == -1 && scripts[i].src.indexOf('contentbuilder.min.js') == -1 && scripts[i].src.indexOf('plugin.js') == -1 && scripts[i].src.indexOf('config.js') == -1 && scripts[i].src.indexOf('en.js') == -1 && scripts[i].src.indexOf('rangy') == -1 && scripts[i].src.indexOf('monaco-editor') == -1 && scripts[i].src.indexOf('minimalist-blocks') == -1) {
|
90719
90765
|
jsincludes1 += '<script src="' + scripts[i].src + '" type="text/javascript"></script>';
|
90720
90766
|
}
|
90721
90767
|
}
|
@@ -90727,7 +90773,7 @@ class LivePreview {
|
|
90727
90773
|
if (scripts[i].src.indexOf('.js') != -1 && scripts[i].src.indexOf('_next/') == -1 && //next
|
90728
90774
|
scripts[i].src.indexOf('static/js/') == -1 && //react
|
90729
90775
|
scripts[i].src.indexOf('src/') == -1 && //vue
|
90730
|
-
scripts[i].src.indexOf('index') == -1 && scripts[i].src.indexOf('contentbox.js') == -1 && scripts[i].src.indexOf('contentbox.min.js') == -1 && scripts[i].src.indexOf('contentbuilder.js') == -1 && scripts[i].src.indexOf('contentbuilder.min.js') == -1 && scripts[i].src.indexOf('plugin.js') == -1 && scripts[i].src.indexOf('config.js') == -1 && scripts[i].src.indexOf('en.js') == -1 && scripts[i].src.indexOf('rangy') == -1 && scripts[i].src.indexOf('minimalist-blocks') == -1) {
|
90776
|
+
scripts[i].src.indexOf('index') == -1 && scripts[i].src.indexOf('contentbox.js') == -1 && scripts[i].src.indexOf('contentbox.min.js') == -1 && scripts[i].src.indexOf('contentbuilder.js') == -1 && scripts[i].src.indexOf('contentbuilder.min.js') == -1 && scripts[i].src.indexOf('plugin.js') == -1 && scripts[i].src.indexOf('config.js') == -1 && scripts[i].src.indexOf('en.js') == -1 && scripts[i].src.indexOf('rangy') == -1 && scripts[i].src.indexOf('monaco-editor') == -1 && scripts[i].src.indexOf('minimalist-blocks') == -1) {
|
90731
90777
|
jsincludes2 += '<script src="' + scripts[i].src + '" type="text/javascript"></script>';
|
90732
90778
|
}
|
90733
90779
|
}
|
@@ -90894,6 +90940,16 @@ class ContentBuilder {
|
|
90894
90940
|
audioSelect: '',
|
90895
90941
|
mediaSelect: '',
|
90896
90942
|
// NEW: for image & video
|
90943
|
+
imageSelectWidth: '1024px',
|
90944
|
+
imageSelectHeight: '80vh',
|
90945
|
+
fileSelectWidth: '1024px',
|
90946
|
+
fileSelectHeight: '80vh',
|
90947
|
+
videoSelectWidth: '1024px',
|
90948
|
+
videoSelectHeight: '80vh',
|
90949
|
+
audioSelectWidth: '1024px',
|
90950
|
+
audioSelectHeight: '80vh',
|
90951
|
+
mediaSelectWidth: '1024px',
|
90952
|
+
mediaSelectHeight: '80vh',
|
90897
90953
|
assetRefresh: false,
|
90898
90954
|
// asset manager specified in imageSelect, fileSelect & videoSelect will always refreshed on click/open
|
90899
90955
|
customTags: [],
|