@innovastudio/contentbox 1.6.147 → 1.6.149
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/index.d.ts
CHANGED
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.149",
|
5
5
|
"description": "",
|
6
6
|
"main": "public/contentbox/contentbox.esm.js",
|
7
7
|
"types": "index.d.ts",
|
@@ -59,7 +59,7 @@
|
|
59
59
|
"ws": "^8.13.0"
|
60
60
|
},
|
61
61
|
"dependencies": {
|
62
|
-
"@innovastudio/contentbuilder": "^1.5.
|
62
|
+
"@innovastudio/contentbuilder": "^1.5.144",
|
63
63
|
"js-beautify": "^1.14.0",
|
64
64
|
"sortablejs": "^1.15.2"
|
65
65
|
}
|
@@ -105100,13 +105100,19 @@ class Lightbox {
|
|
105100
105100
|
autoplayVideos: true,
|
105101
105101
|
skin: 'light'
|
105102
105102
|
};
|
105103
|
-
|
105104
|
-
|
105103
|
+
|
105104
|
+
/*
|
105105
|
+
if(builder.isContentBox) {
|
105106
|
+
this.util.refreshLightbox(this.lightboxOptions);
|
105105
105107
|
} else {
|
105106
|
-
|
105107
|
-
|
105108
|
-
|
105108
|
+
const glightbox = new GlightboxInit(this.lightboxOptions); // css applied from contentbuilder.css
|
105109
|
+
glightbox.init();
|
105110
|
+
this.builder.glightbox = glightbox;
|
105109
105111
|
}
|
105112
|
+
*/
|
105113
|
+
const glightbox = new GlightboxInit(this.lightboxOptions); // css applied from contentbuilder.css
|
105114
|
+
glightbox.init();
|
105115
|
+
this.builder.glightbox = glightbox;
|
105110
105116
|
}
|
105111
105117
|
openImage(url) {
|
105112
105118
|
this.openLightbox(url, this.lightboxOptions);
|
@@ -120452,6 +120458,19 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
120452
120458
|
// obj.preserveSelection = true; (can be set programmatically) to prevent click that clears selection on external custom modal.
|
120453
120459
|
|
120454
120460
|
this.opts = Object.assign(this, defaults, opts);
|
120461
|
+
if (this.opts.uploadFile) {
|
120462
|
+
const uploadHandler = () => {
|
120463
|
+
return async file => {
|
120464
|
+
const data = await this.opts.uploadFile(file);
|
120465
|
+
this.returnUrl(data.url);
|
120466
|
+
};
|
120467
|
+
};
|
120468
|
+
this.onImageUpload = uploadHandler();
|
120469
|
+
this.onVideoUpload = uploadHandler();
|
120470
|
+
this.onAudioUpload = uploadHandler();
|
120471
|
+
this.onMediaUpload = uploadHandler();
|
120472
|
+
this.onFileUpload = uploadHandler();
|
120473
|
+
}
|
120455
120474
|
if (this.opts.basePath) {
|
120456
120475
|
this.opts.assetPath = this.opts.basePath + 'assets/';
|
120457
120476
|
this.opts.fontAssetPath = this.opts.basePath + 'assets/fonts/';
|
@@ -157488,6 +157507,8 @@ class ContentBox {
|
|
157488
157507
|
framework: '',
|
157489
157508
|
imageRenameOnEdit: true,
|
157490
157509
|
imageResizeOnBlock: false,
|
157510
|
+
iframeCentered: true,
|
157511
|
+
// Centers the page view area within the workspace
|
157491
157512
|
htmlButton: true,
|
157492
157513
|
// HTML button on left sidebar
|
157493
157514
|
undoRedoButtons: true,
|
@@ -160765,6 +160786,36 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
|
|
160765
160786
|
localStorage.removeItem('_disableanimation');
|
160766
160787
|
}
|
160767
160788
|
|
160789
|
+
if (this.uploadFile) {
|
160790
|
+
const uploadHandler = type => {
|
160791
|
+
return async file => {
|
160792
|
+
const data = await this.uploadFile(file);
|
160793
|
+
|
160794
|
+
if (type === 'cover') {
|
160795
|
+
this.boxImage(data.url);
|
160796
|
+
} else {
|
160797
|
+
this.returnUrl(data.url);
|
160798
|
+
}
|
160799
|
+
};
|
160800
|
+
};
|
160801
|
+
|
160802
|
+
this.onUploadCoverImage = uploadHandler('cover');
|
160803
|
+
this.onImageUpload = uploadHandler('image');
|
160804
|
+
this.onVideoUpload = uploadHandler('video');
|
160805
|
+
this.onAudioUpload = uploadHandler('audio');
|
160806
|
+
this.onMediaUpload = uploadHandler('media');
|
160807
|
+
this.onFileUpload = uploadHandler('file');
|
160808
|
+
}
|
160809
|
+
|
160810
|
+
if (this.topSpace) {
|
160811
|
+
// Disable built-in buttons that will be handled by the topbar:
|
160812
|
+
this.undoRedoButtons = false; // Hide undo/redo from the side panel
|
160813
|
+
|
160814
|
+
this.toggleDeviceButton = false; // Hide device toggle button
|
160815
|
+
|
160816
|
+
this.deviceButtons = false; // Hide device buttons from top of page view area
|
160817
|
+
}
|
160818
|
+
|
160768
160819
|
this.templateJSON = [{
|
160769
160820
|
url: this.settings.designUrl1,
|
160770
160821
|
path: this.settings.designPath,
|
@@ -161350,6 +161401,7 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
|
|
161350
161401
|
videoHandler: this.settings.videoHandler,
|
161351
161402
|
audioHandler: this.settings.audioHandler,
|
161352
161403
|
fileHandler: this.settings.fileHandler,
|
161404
|
+
uploadFile: this.settings.uploadFile,
|
161353
161405
|
onVideoUpload: this.settings.onVideoUpload,
|
161354
161406
|
onAudioUpload: this.settings.onAudioUpload,
|
161355
161407
|
onImageUpload: this.settings.onImageUpload,
|