@innovastudio/contentbox 1.6.135 → 1.6.136

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
@@ -378,6 +378,9 @@ declare class ContentBox {
378
378
  constructor(options: ContentBoxOptions);
379
379
 
380
380
  boxImage(url: string, err?: string): void;
381
+ selectAsset(url: string): void;
382
+ hideModal(modal?: HTMLElement): void;
383
+ closeAsset(): void;
381
384
  returnUrl(s: string): void;
382
385
  htmlCheck(): void;
383
386
  loadHtml(html: string): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbox",
3
3
  "type": "module",
4
- "version": "1.6.135",
4
+ "version": "1.6.136",
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.125",
62
+ "@innovastudio/contentbuilder": "^1.5.126",
63
63
  "js-beautify": "^1.14.0",
64
64
  "sortablejs": "^1.15.2"
65
65
  }
@@ -121360,6 +121360,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
121360
121360
  window.selectImage = this.selectImage.bind(this);
121361
121361
  window.selectVideo = this.selectVideo.bind(this);
121362
121362
  window.selectAsset = this.selectAsset.bind(this);
121363
+ window.closeAsset = this.closeAsset.bind(this);
121363
121364
  window.assetType = this.assetType.bind(this);
121364
121365
  window.hideModal = this.hideModal.bind(this);
121365
121366
  window.generateImage = this.generateImage.bind(this);
@@ -123865,6 +123866,20 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
123865
123866
  this.util._hideModal(modal); // this _hideModal will also trigger cancelCallback defined by showModal. This is done by programmatically click the overlay.
123866
123867
  }
123867
123868
 
123869
+ closeAsset() {
123870
+ let modal = document.querySelector('.is-modal.videoselect.active');
123871
+ if (modal) this.hideModal(modal);
123872
+ modal = document.querySelector('.is-modal.imageselect.active');
123873
+ if (modal) this.hideModal(modal);
123874
+ modal = document.querySelector('.is-modal.fileselect.active');
123875
+ if (modal) this.hideModal(modal);
123876
+ modal = document.querySelector('.is-modal.audioselect.active');
123877
+ if (modal) this.hideModal(modal);
123878
+ modal = document.querySelector('.is-modal.mediaselect.active');
123879
+ if (modal) this.hideModal(modal);
123880
+ modal = document.querySelector('.is-modal.otherselect.active');
123881
+ if (modal) this.hideModal(modal);
123882
+ }
123868
123883
  draggable(selector) {
123869
123884
  new Draggable$2({
123870
123885
  selector: selector
@@ -164124,6 +164139,14 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
164124
164139
  this.editor.hideModal(modal);
164125
164140
  }
164126
164141
 
164142
+ selectAsset(url) {
164143
+ this.editor.selectAsset(url);
164144
+ }
164145
+
164146
+ closeAsset() {
164147
+ this.editor.closeAsset();
164148
+ }
164149
+
164127
164150
  refreshModule() {
164128
164151
  this.box.refreshModule();
164129
164152
  }