@innovastudio/contentbox 1.6.151 → 1.6.153

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
@@ -82,6 +82,7 @@ interface ContentBoxOptions {
82
82
  mediaSelect?: string;
83
83
 
84
84
  filePicker?: string;
85
+ filePickerSize?: string;
85
86
 
86
87
  assetBasePath?: string;
87
88
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbox",
3
3
  "type": "module",
4
- "version": "1.6.151",
4
+ "version": "1.6.153",
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.149",
62
+ "@innovastudio/contentbuilder": "^1.5.150",
63
63
  "js-beautify": "^1.14.0",
64
64
  "sortablejs": "^1.15.2"
65
65
  }
@@ -31241,6 +31241,7 @@ class Util$1 {
31241
31241
  showRtePop(pop, onShow, btn) {
31242
31242
  const dom = this.dom;
31243
31243
  pop.style.display = 'flex';
31244
+ pop.setAttribute('aria-hidden', 'false');
31244
31245
  if (onShow) onShow();
31245
31246
  dom.removeClass(pop, 'deactive');
31246
31247
  dom.addClass(pop, 'active');
@@ -31305,6 +31306,7 @@ class Util$1 {
31305
31306
  pop.style.display = '';
31306
31307
  dom.removeClass(pop, 'active');
31307
31308
  dom.addClass(pop, 'deactive');
31309
+ pop.setAttribute('aria-hidden', 'true');
31308
31310
  }
31309
31311
  showPopOverlay(pop, cancelCallback, btn) {
31310
31312
  const builderStuff = this.builder.builderStuff;
@@ -31978,12 +31980,27 @@ class Util$1 {
31978
31980
  if (mode === 'cell' || mode === 'cell-right') {
31979
31981
  dom.moveAfter(cellElement, cell);
31980
31982
  }
31983
+ let element;
31984
+ if (cellElement.childNodes && cellElement.childNodes[0]) {
31985
+ element = cellElement.childNodes[0];
31986
+ }
31981
31987
  let builderActive = this.builder.doc.querySelector('.builder-active');
31982
31988
  if (builderActive) this.builder.applyBehaviorOn(builderActive);
31983
31989
  this.fixLayout(row);
31984
- cellElement.click(); //change active block to the newly created
31985
- }
31986
31990
 
31991
+ // cellElement.click(); //change active block to the newly created
31992
+ if (element && element.tagName.toLowerCase() === 'img') {
31993
+ element.onload = () => {
31994
+ element.click();
31995
+ element.onload = null;
31996
+ setTimeout(() => {
31997
+ this.builder.element.image.repositionImageTool();
31998
+ }, 100);
31999
+ };
32000
+ } else if (element) {
32001
+ element.click();
32002
+ }
32003
+ }
31987
32004
  if (mode === 'row') {
31988
32005
  this.builder.uo.saveForUndo();
31989
32006
  let rowElement, cellElement;
@@ -32021,11 +32038,26 @@ class Util$1 {
32021
32038
  }
32022
32039
  row.parentNode.insertBefore(rowElement, row);
32023
32040
  dom.moveAfter(rowElement, row);
32041
+ let element;
32042
+ if (rowElement.childNodes && rowElement.childNodes[0].childNodes && rowElement.childNodes[0].childNodes) {
32043
+ element = rowElement.childNodes[0].childNodes[0];
32044
+ }
32024
32045
  let builderActive = this.builder.doc.querySelector('.builder-active');
32025
32046
  if (builderActive) this.builder.applyBehaviorOn(builderActive);
32026
- cellElement.click(); //change active block to the newly created
32027
- }
32028
32047
 
32048
+ // cellElement.click(); //change active block to the newly created
32049
+ if (element && element.tagName.toLowerCase() === 'img') {
32050
+ element.onload = () => {
32051
+ element.click();
32052
+ element.onload = null;
32053
+ setTimeout(() => {
32054
+ this.builder.element.image.repositionImageTool();
32055
+ }, 100);
32056
+ };
32057
+ } else if (element) {
32058
+ element.click();
32059
+ }
32060
+ }
32029
32061
  if (mode === 'elm') {
32030
32062
  let elm = this.builder.activeElement; // See elementtool.js line 195-196. // document.querySelector('.elm-active');
32031
32063
  if (!elm) return;
@@ -32056,6 +32088,9 @@ class Util$1 {
32056
32088
  let checkLoad = setInterval(() => {
32057
32089
  if (newelement.complete) {
32058
32090
  newelement.click();
32091
+ setTimeout(() => {
32092
+ this.builder.element.image.repositionImageTool();
32093
+ }, 100);
32059
32094
  clearInterval(checkLoad);
32060
32095
  }
32061
32096
  }, 30);
@@ -94225,6 +94260,7 @@ class Rte {
94225
94260
  const top = btn.getBoundingClientRect().top;
94226
94261
  const left = btn.getBoundingClientRect().left;
94227
94262
  pop.style.display = 'flex';
94263
+ pop.setAttribute('aria-hidden', 'false');
94228
94264
  const w = pop.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
94229
94265
  const h = pop.offsetHeight;
94230
94266
  if (!dom.hasClass(pop, 'active')) {
@@ -94259,6 +94295,7 @@ class Rte {
94259
94295
  const top = btn.getBoundingClientRect().top;
94260
94296
  const left = btn.getBoundingClientRect().left;
94261
94297
  pop.style.display = 'flex';
94298
+ pop.setAttribute('aria-hidden', 'false');
94262
94299
  const w = pop.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
94263
94300
  const h = pop.offsetHeight;
94264
94301
  if (!dom.hasClass(pop, 'active')) {
@@ -95095,6 +95132,7 @@ class Rte {
95095
95132
  const top = btn.getBoundingClientRect().top;
95096
95133
  const left = btn.getBoundingClientRect().left;
95097
95134
  pop.style.display = 'flex';
95135
+ pop.setAttribute('aria-hidden', 'false');
95098
95136
  const w = pop.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
95099
95137
  const h = pop.offsetHeight;
95100
95138
  if (!dom.hasClass(pop, 'active')) {
@@ -95421,6 +95459,7 @@ class Rte {
95421
95459
  const top = btn.getBoundingClientRect().top;
95422
95460
  const left = btn.getBoundingClientRect().left;
95423
95461
  pop.style.display = 'flex';
95462
+ pop.setAttribute('aria-hidden', 'false');
95424
95463
  const w = pop.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
95425
95464
  const h = pop.offsetHeight;
95426
95465
  if (!dom.hasClass(pop, 'active')) {
@@ -96938,6 +96977,7 @@ class Rte {
96938
96977
  const top = btnRteIcons.getBoundingClientRect().top;
96939
96978
  const left = btnRteIcons.getBoundingClientRect().left;
96940
96979
  pop.style.display = 'flex';
96980
+ pop.setAttribute('aria-hidden', 'false');
96941
96981
  const w = pop.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
96942
96982
  const h = pop.offsetHeight;
96943
96983
  if (!dom.hasClass(pop, 'active')) {
@@ -97025,6 +97065,7 @@ class Rte {
97025
97065
  });
97026
97066
  const pop = this.rteMoreOptions;
97027
97067
  pop.style.display = 'flex';
97068
+ pop.setAttribute('aria-hidden', 'false');
97028
97069
  const w = pop.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
97029
97070
  const h = pop.offsetHeight;
97030
97071
  if (this.builder.opts.toolbar === 'left') {
@@ -97101,6 +97142,7 @@ class Rte {
97101
97142
  const top = btnElementRteMore.getBoundingClientRect().top;
97102
97143
  const left = btnElementRteMore.getBoundingClientRect().left;
97103
97144
  pop.style.display = 'flex';
97145
+ pop.setAttribute('aria-hidden', 'false');
97104
97146
  const w = pop.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
97105
97147
  const h = pop.offsetHeight;
97106
97148
  if (this.builder.opts.toolbar === 'left') {
@@ -110890,6 +110932,7 @@ class Dictation {
110890
110932
  return;
110891
110933
  }
110892
110934
  this.modalCommand.classList.add('active');
110935
+ this.modalCommand.setAttribute('aria-hidden', 'false');
110893
110936
  inpCommand.focus();
110894
110937
  localStorage.setItem('_dictation', '1');
110895
110938
  const chkAutoSend = this.builderStuff.querySelector('#chkAutoSendCommand');
@@ -119536,6 +119579,7 @@ class ContentBuilder {
119536
119579
  mediaSelect: '',
119537
119580
  // NEW: for image & video
119538
119581
 
119582
+ filePickerSize: 'medium',
119539
119583
  // selectIcon: '<svg class="is-icon-flex"><use xlink:href="#ion-more"></use></svg>',
119540
119584
  selectIcon: '<svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#icon-folder"></use></svg>',
119541
119585
  // NEW: for any other file select. Will be visible on hyperlink dialog, image dialog (image link), and Column Settings dialog (on Click tab)
@@ -120598,7 +120642,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
120598
120642
  this.settings.fileselect = this.settings.filePicker;
120599
120643
  this.settings.videoselect = this.settings.filePicker;
120600
120644
  }
120601
- if (this.assetPanelFullScreen) {
120645
+ if (this.assetPanelFullScreen || this.filePickerSize === 'fullscreen') {
120602
120646
  this.imageSelectWidth = '100vw';
120603
120647
  this.imageSelectHeight = '100vh';
120604
120648
  this.fileSelectWidth = '100vw';
@@ -120618,6 +120662,26 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
120618
120662
  this.mediaSelectMaxWidth = '100vw';
120619
120663
  this.otherSelectMaxWidth = '100vw';
120620
120664
  }
120665
+ if (this.filePickerSize === 'large') {
120666
+ this.imageSelectWidth = '100%';
120667
+ this.imageSelectHeight = '90vh';
120668
+ this.fileSelectWidth = '100%';
120669
+ this.fileSelectHeight = '90vh';
120670
+ this.videoSelectWidth = '100%';
120671
+ this.videoSelectHeight = '90vh';
120672
+ this.audioSelectWidth = '100%';
120673
+ this.audioSelectHeight = '90vh';
120674
+ this.mediaSelectWidth = '100%';
120675
+ this.mediaSelectHeight = '90vh';
120676
+ this.otherSelectWidth = '100%';
120677
+ this.otherSelectHeight = '90vh';
120678
+ this.imageSelectMaxWidth = '92vw';
120679
+ this.fileSelectMaxWidth = '92vw';
120680
+ this.videoSelectMaxWidth = '92vw';
120681
+ this.audioSelectMaxWidth = '92vw';
120682
+ this.mediaSelectMaxWidth = '92vw';
120683
+ this.otherSelectMaxWidth = '92vw';
120684
+ }
120621
120685
 
120622
120686
  // if(this.opts.largerImageHandler!=='') {
120623
120687
  // this.opts.mediaHandler = this.opts.largerImageHandler;