@innovastudio/contentbuilder 1.4.115 → 1.4.116
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 +1 -1
- package/public/contentbuilder/contentbuilder.esm.js +14 -8
- package/public/contentbuilder/contentbuilder.min.js +3 -3
- package/public/contentbuilder/themes/dark-blue.css +2 -2
- package/public/contentbuilder/themes/dark-blue2.css +2 -2
- package/public/contentbuilder/themes/dark-blue3.css +2 -2
- package/public/contentbuilder/themes/dark-gray.css +2 -2
- package/public/contentbuilder/themes/dark-pink.css +2 -2
- package/public/contentbuilder/themes/dark-purple.css +2 -2
- package/public/contentbuilder/themes/dark-red.css +2 -2
- package/public/contentbuilder/themes/dark.css +2 -2
- package/readme.txt +1 -1
package/package.json
CHANGED
|
@@ -4362,6 +4362,7 @@ class Util {
|
|
|
4362
4362
|
}
|
|
4363
4363
|
const dom = this.dom;
|
|
4364
4364
|
dom.removeClass(modal, 'active');
|
|
4365
|
+
modal.style.display = '';
|
|
4365
4366
|
}
|
|
4366
4367
|
|
|
4367
4368
|
// attachInputTextClear(inp) {
|
|
@@ -22129,6 +22130,7 @@ const renderSnippetPanel = builder => {
|
|
|
22129
22130
|
}
|
|
22130
22131
|
let html_snippets = '' + '<div class="is-dropdown selectsnippet" style="position:absolute;top:0;right:0;padding: 0;width:100%;z-index:2;">' + '<button tabindex="0" class="dropdown-toggle no-outline" title="' + util.out('Snippet Categories') + '" type="button" aria-haspopup="true" data-value="' + defaultcatval + '">' + '<span>' + util.out(defaultcat) + '</span>' + '</button>' + '<ul class="dropdown-menu" role="listbox" title="' + util.out('Snippets') + '" aria-expanded="false">' + catitems + '</ul>' + '</div>' + (sidePanel === 'right' ? '<div id="divSnippetScrollUp" role="button" tabindex="-1" style="top:calc(50% - 27px);right:25px;">▲</div>' + '<div id="divSnippetScrollDown" role="button" tabindex="-1" style="top:calc(50% + 27px);right:25px;">▼</div>' + '<div id="divSnippetHandle" role="button" tabindex="-1" title="' + util.out('Snippets') + '" data-title="' + util.out('Snippets') + '" style="' + hideHandle + '">' + '<svg class="is-icon-flex"><use xlink:href="#ion-ios-arrow-left"></use></svg>' + '</div>' : '<div id="divSnippetScrollUp" role="button" tabindex="-1" style="top:calc(50% - 27px);left:10px;">▲</div>' + '<div id="divSnippetScrollDown" role="button" tabindex="-1" style="top:calc(50% + 27px);left:10px;">▼</div>' + '<div id="divSnippetHandle" role="button" tabindex="-1" title="' + util.out('Snippets') + '" data-title="' + util.out('Snippets') + '" style="' + hideHandle + '">' + '<svg class="is-icon-flex"><use xlink:href="#ion-ios-arrow-right"></use></svg>' + '</div>') + '<div class="is-design-list" tabindex="0">' + '</div>';
|
|
22131
22132
|
let snippetPanel = document.querySelector(builder.opts.snippetList);
|
|
22133
|
+
snippetPanel.innerHTML = ''; //clear
|
|
22132
22134
|
dom.appendHtml(snippetPanel, html_snippets);
|
|
22133
22135
|
const dropDown = new Select(snippetPanel.querySelector('.selectsnippet'));
|
|
22134
22136
|
dropDown.element.addEventListener('change', () => {
|
|
@@ -73099,28 +73101,30 @@ class Rte {
|
|
|
73099
73101
|
return bExist;
|
|
73100
73102
|
}
|
|
73101
73103
|
positionToolbar() {
|
|
73104
|
+
const leftSidebarAdj = this.builder.leftSidebarAdj || 0;
|
|
73105
|
+
const leftSidebarAdj2 = this.builder.leftSidebarAdj2 || 0;
|
|
73102
73106
|
const viewportWidth = document.body.clientWidth; //window.innerWidth;
|
|
73103
73107
|
const viewportHeight = window.innerHeight;
|
|
73104
73108
|
if (this.builder.opts.toolbar === 'left' || this.builder.opts.toolbar === 'right') {
|
|
73105
73109
|
let h = this.rteTool.offsetHeight;
|
|
73106
73110
|
let top = viewportHeight / 2 - h / 2;
|
|
73107
|
-
this.rteTool.style.left = '';
|
|
73111
|
+
this.rteTool.style.left = leftSidebarAdj2 + 'px';
|
|
73108
73112
|
this.rteTool.style.top = top + 'px';
|
|
73109
73113
|
|
|
73110
73114
|
// Element Toolbar
|
|
73111
73115
|
h = this.elementRteTool.offsetHeight;
|
|
73112
73116
|
top = viewportHeight / 2 - h / 2;
|
|
73113
|
-
this.elementRteTool.style.left = '';
|
|
73117
|
+
this.elementRteTool.style.left = leftSidebarAdj2 + 'px';
|
|
73114
73118
|
this.elementRteTool.style.top = top + 'px';
|
|
73115
73119
|
} else {
|
|
73116
73120
|
let w = this.rteTool.offsetWidth;
|
|
73117
|
-
let left = viewportWidth / 2 - w / 2;
|
|
73121
|
+
let left = viewportWidth / 2 - w / 2 + leftSidebarAdj;
|
|
73118
73122
|
this.rteTool.style.top = '';
|
|
73119
73123
|
this.rteTool.style.left = left + 'px';
|
|
73120
73124
|
|
|
73121
73125
|
// Element Toolbar
|
|
73122
73126
|
w = this.elementRteTool.offsetWidth;
|
|
73123
|
-
left = viewportWidth / 2 - w / 2;
|
|
73127
|
+
left = viewportWidth / 2 - w / 2 + leftSidebarAdj;
|
|
73124
73128
|
this.elementRteTool.style.top = '';
|
|
73125
73129
|
this.elementRteTool.style.left = left + 'px';
|
|
73126
73130
|
}
|
|
@@ -80095,7 +80099,7 @@ class ContentBuilder {
|
|
|
80095
80099
|
if (this.dom.hasClass(builder, 'preview')) this.preview = true;
|
|
80096
80100
|
});
|
|
80097
80101
|
if (!this.preview) {
|
|
80098
|
-
if (this.opts.snippetJSON.snippets.length > 0) {
|
|
80102
|
+
if (this.opts.snippetJSON) if (this.opts.snippetJSON.snippets.length > 0) {
|
|
80099
80103
|
renderSnippetPanel(this); // Render Snippet Panel
|
|
80100
80104
|
}
|
|
80101
80105
|
}
|
|
@@ -80192,7 +80196,7 @@ class ContentBuilder {
|
|
|
80192
80196
|
this.util.hidePops();
|
|
80193
80197
|
});
|
|
80194
80198
|
this.win.addEventListener('resize', this.doWindowResize = () => {
|
|
80195
|
-
this.util.clearActiveCell();
|
|
80199
|
+
// this.util.clearActiveCell();
|
|
80196
80200
|
this.util.clearControls();
|
|
80197
80201
|
|
|
80198
80202
|
// Disable on mobile
|
|
@@ -81948,8 +81952,10 @@ class ContentBuilder {
|
|
|
81948
81952
|
}
|
|
81949
81953
|
loadSnippets(snippetFile) {
|
|
81950
81954
|
if (this.preview) return;
|
|
81951
|
-
|
|
81952
|
-
|
|
81955
|
+
if (this.opts.snippetList === '#divSnippetList') {
|
|
81956
|
+
let snippetPanel = document.querySelector(this.opts.snippetList);
|
|
81957
|
+
if (snippetPanel) return; // do not render if already rendered (just protection)
|
|
81958
|
+
}
|
|
81953
81959
|
|
|
81954
81960
|
if (this.isScriptAlreadyIncluded(snippetFile)) return;
|
|
81955
81961
|
const script = document.createElement('script');
|