@innovastudio/contentbox 1.6.84 → 1.6.86
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.6.
|
|
4
|
+
"version": "1.6.86",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "public/contentbox/contentbox.esm.js",
|
|
7
7
|
"types": "index.d.ts",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"ws": "^8.13.0"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@innovastudio/contentbuilder": "^1.5.
|
|
57
|
+
"@innovastudio/contentbuilder": "^1.5.71",
|
|
58
58
|
"js-beautify": "^1.14.0",
|
|
59
59
|
"sortablejs": "^1.15.2"
|
|
60
60
|
}
|
|
@@ -25699,7 +25699,11 @@ class ControlPanel {
|
|
|
25699
25699
|
}
|
|
25700
25700
|
|
|
25701
25701
|
open() {
|
|
25702
|
-
if (this.builder.
|
|
25702
|
+
if (this.builder.autoOpenPanel) ; else {
|
|
25703
|
+
// Manual open
|
|
25704
|
+
if (this.builder.disableAutoOpenEditPanel) return;
|
|
25705
|
+
}
|
|
25706
|
+
|
|
25703
25707
|
this.open_();
|
|
25704
25708
|
}
|
|
25705
25709
|
|
|
@@ -25711,9 +25715,12 @@ class ControlPanel {
|
|
|
25711
25715
|
}, 300);
|
|
25712
25716
|
this.repositionTool();
|
|
25713
25717
|
|
|
25714
|
-
if (
|
|
25715
|
-
//
|
|
25716
|
-
|
|
25718
|
+
if (this.builder.autoOpenPanel) ; else {
|
|
25719
|
+
// Manual open (only if toggle button exists)
|
|
25720
|
+
if (document.querySelector('[data-button="togglepanel"]')) {
|
|
25721
|
+
// If toggle button exists
|
|
25722
|
+
this.builder.disableAutoOpenEditPanel = true; // Set manual opening
|
|
25723
|
+
}
|
|
25717
25724
|
} // Sync with external buttons
|
|
25718
25725
|
|
|
25719
25726
|
|
|
@@ -108456,6 +108463,7 @@ class Dictation {
|
|
|
108456
108463
|
renderPanel() {
|
|
108457
108464
|
const builderStuff = this.builder.builderStuff;
|
|
108458
108465
|
this.builderStuff = builderStuff;
|
|
108466
|
+
if (builderStuff.querySelector('.page-command')) return;
|
|
108459
108467
|
const util = this.builder.util;
|
|
108460
108468
|
this.util = util;
|
|
108461
108469
|
let disclaimerText = util.out('AI-Disclaimer');
|
|
@@ -119792,7 +119800,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
|
119792
119800
|
};
|
|
119793
119801
|
|
|
119794
119802
|
// Add document Click event
|
|
119795
|
-
|
|
119803
|
+
this.doDocumentClick = e => {
|
|
119796
119804
|
let target = e.target;
|
|
119797
119805
|
if (!target) return;
|
|
119798
119806
|
rteClick(e);
|
|
@@ -119923,10 +119931,19 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
|
119923
119931
|
});
|
|
119924
119932
|
}
|
|
119925
119933
|
*/
|
|
119926
|
-
}
|
|
119934
|
+
};
|
|
119927
119935
|
|
|
119936
|
+
// document.addEventListener('click', this.doDocumentClick);
|
|
119937
|
+
document.addEventListener('mousedown', this.doDocumentClick);
|
|
119938
|
+
document.addEventListener('touchstart', this.doDocumentClick, {
|
|
119939
|
+
passive: false
|
|
119940
|
+
});
|
|
119928
119941
|
if (this.iframe) {
|
|
119929
|
-
this.doc.addEventListener('click', this.doDocumentClick);
|
|
119942
|
+
// this.doc.addEventListener('click', this.doDocumentClick);
|
|
119943
|
+
this.doc.addEventListener('mousedown', this.doDocumentClick);
|
|
119944
|
+
this.doc.addEventListener('touchstart', this.doDocumentClick, {
|
|
119945
|
+
passive: false
|
|
119946
|
+
});
|
|
119930
119947
|
}
|
|
119931
119948
|
|
|
119932
119949
|
// Drag row will hide content tools
|
|
@@ -121456,13 +121473,18 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
|
121456
121473
|
if (snippetData) snippetData.remove();
|
|
121457
121474
|
if (this.eb) this.eb.destroy();
|
|
121458
121475
|
this.doc.body.classList.remove('data-editor');
|
|
121459
|
-
|
|
121476
|
+
|
|
121477
|
+
// document.removeEventListener('click', this.doDocumentClick, false);
|
|
121478
|
+
document.removeEventListener('mousedown', this.doDocumentClick);
|
|
121479
|
+
document.removeEventListener('touchstart', this.doDocumentClick);
|
|
121460
121480
|
document.removeEventListener('keydown', this.doDocumentKeydown, false);
|
|
121461
121481
|
document.removeEventListener('mousedown', this.doDocumentMousedown, false);
|
|
121462
121482
|
document.removeEventListener('click', this.doRteClick, false);
|
|
121463
121483
|
this.doc.removeEventListener('click', this.doHideSnippetHandler, false);
|
|
121464
121484
|
if (this.iframe) {
|
|
121465
|
-
this.doc.removeEventListener('click', this.doDocumentClick, false);
|
|
121485
|
+
// this.doc.removeEventListener('click', this.doDocumentClick, false);
|
|
121486
|
+
this.doc.removeEventListener('mousedown', this.doDocumentClick);
|
|
121487
|
+
this.doc.removeEventListener('touchstart', this.doDocumentClick);
|
|
121466
121488
|
this.doc.removeEventListener('keydown', this.doDocumentKeydown, false);
|
|
121467
121489
|
this.doc.removeEventListener('mousedown', this.doDocumentMousedown, false);
|
|
121468
121490
|
this.doc.removeEventListener('click', this.doRteClick, false);
|
|
@@ -159786,7 +159808,7 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
|
|
|
159786
159808
|
}
|
|
159787
159809
|
}); // Add document Click event
|
|
159788
159810
|
|
|
159789
|
-
this.
|
|
159811
|
+
this.doDocumentClick = e => {
|
|
159790
159812
|
e = e || window.event;
|
|
159791
159813
|
var target = e.target || e.srcElement; //--- New UX ---
|
|
159792
159814
|
|
|
@@ -159988,10 +160010,16 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
|
|
|
159988
160010
|
if (!(a || b)) {
|
|
159989
160011
|
this.sidebar.closeSidebar();
|
|
159990
160012
|
}
|
|
160013
|
+
}; // this.doc.addEventListener('click', this.doDocumentClick);
|
|
160014
|
+
|
|
160015
|
+
|
|
160016
|
+
this.doc.addEventListener('mousedown', this.doDocumentClick);
|
|
160017
|
+
this.doc.addEventListener('touchstart', this.doDocumentClick, {
|
|
160018
|
+
passive: false
|
|
159991
160019
|
});
|
|
159992
160020
|
|
|
159993
160021
|
if (this.iframe) {
|
|
159994
|
-
|
|
160022
|
+
this.doIframeDocumentClick = e => {
|
|
159995
160023
|
e = e || window.event;
|
|
159996
160024
|
var target = e.target || e.srcElement;
|
|
159997
160025
|
if (!document.body.contains(target)) return; // in case element/target has been deleted (not exists)
|
|
@@ -160076,7 +160104,9 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
|
|
|
160076
160104
|
if (!(a || b)) {
|
|
160077
160105
|
this.sidebar.closeSidebar();
|
|
160078
160106
|
}
|
|
160079
|
-
}
|
|
160107
|
+
};
|
|
160108
|
+
|
|
160109
|
+
document.addEventListener('click', this.doIframeDocumentClick);
|
|
160080
160110
|
}
|
|
160081
160111
|
|
|
160082
160112
|
document.addEventListener('keydown', this.doDocumentKeydown = e => {
|
|
@@ -160471,10 +160501,12 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
|
|
|
160471
160501
|
|
|
160472
160502
|
const btnRedesign = box.querySelector('.input-box-redesign');
|
|
160473
160503
|
if (btnRedesign) btnRedesign.addEventListener('click', () => {
|
|
160504
|
+
this.editor.dictation.renderPanel();
|
|
160474
160505
|
this.command.redesign();
|
|
160475
160506
|
});
|
|
160476
160507
|
const btnRewrite = box.querySelector('.input-box-rewrite');
|
|
160477
160508
|
if (btnRewrite) btnRewrite.addEventListener('click', () => {
|
|
160509
|
+
this.editor.dictation.renderPanel();
|
|
160478
160510
|
this.command.rewrite();
|
|
160479
160511
|
});
|
|
160480
160512
|
const btnAIMore = box.querySelector('.input-box-more');
|
|
@@ -162063,9 +162095,11 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
|
|
|
162063
162095
|
if (this.editor) this.editor.destroy();
|
|
162064
162096
|
const panel = document.querySelector('#_newbox');
|
|
162065
162097
|
if (panel) panel.parentNode.removeChild(panel);
|
|
162066
|
-
document.body.classList.remove('controlpanel');
|
|
162067
|
-
|
|
162068
|
-
if (this.
|
|
162098
|
+
document.body.classList.remove('controlpanel'); // if(this.doc) this.doc.removeEventListener('click', this.doDocumentClick, false);
|
|
162099
|
+
|
|
162100
|
+
if (this.doc) this.doc.removeEventListener('mousedown', this.doDocumentClick);
|
|
162101
|
+
if (this.doc) this.doc.removeEventListener('touchstart', this.doDocumentClick);
|
|
162102
|
+
if (this.iframe) document.removeEventListener('click', this.doIframeDocumentClick, false);
|
|
162069
162103
|
if (this.doc) this.doc.removeEventListener('click', this.doDocumentKeydown, false);
|
|
162070
162104
|
if (this.iframe) document.removeEventListener('click', this.doDocumentKeydown, false);
|
|
162071
162105
|
if (this.doc) this.doc.removeEventListener('scroll', this.doAnimWheel, false);
|