@innovastudio/contentbuilder 1.0.65 → 1.0.69

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
- "version": "1.0.65",
3
+ "version": "1.0.69",
4
4
  "description": "",
5
5
  "main": "public/contentbuilder/contentbuilder.esm.js",
6
6
  "files": [
@@ -11059,14 +11059,16 @@ const renderQuickAdd = builder => {
11059
11059
  elm = quickadd.querySelector('.add-button');
11060
11060
  if (elm) dom$B.addEventListener(elm, 'click', () => {
11061
11061
  const mode = quickadd.getAttribute('data-mode');
11062
- const html = '<a href="#" style="margin-top: ;margin-right: ;margin-bottom: ;margin-left: ;display: inline-block; text-decoration: none; transition: all 0.16s ease 0s; border-style: solid; cursor: pointer; background-color: rgb(220, 220, 220); color: rgb(0, 0, 0); border-color: rgb(220, 220, 220); border-width: 2px; border-radius: 0px; padding: 13px 28px; line-height: 21px; text-transform: uppercase; font-weight: 400; font-size: 14px; letter-spacing: 3px;">Read More</a>';
11062
+ const html = '<div><a href="#" style="margin-top: ;margin-right: ;margin-bottom: ;margin-left: ;display: inline-block; text-decoration: none; transition: all 0.16s ease 0s; border-style: solid; cursor: pointer; background-color: rgb(220, 220, 220); color: rgb(0, 0, 0); border-color: rgb(220, 220, 220); border-width: 2px; border-radius: 0px; padding: 13px 28px; line-height: 21px; text-transform: uppercase; font-weight: 400; font-size: 14px; letter-spacing: 3px;">Read More</a></div>';
11063
11063
  util.addContent(html, mode);
11064
11064
  });
11065
11065
  elm = quickadd.querySelector('.add-twobutton');
11066
11066
  if (elm) dom$B.addEventListener(elm, 'click', () => {
11067
11067
  const mode = quickadd.getAttribute('data-mode');
11068
- const html = `<a href="#" style="margin-top: ;margin-right: ;margin-bottom: ;margin-left: ;display: inline-block; text-decoration: none; transition: all 0.16s ease 0s; border-style: solid; cursor: pointer; background-color: rgb(220, 220, 220); color: rgb(0, 0, 0); border-color: rgb(220, 220, 220); border-width: 2px; border-radius: 0px; padding: 13px 28px; line-height: 21px; text-transform: uppercase; font-weight: 400; font-size: 14px; letter-spacing: 3px;">Read More</a> &nbsp;
11069
- <a href="#" style="display: inline-block; text-decoration: none; transition: all 0.16s ease 0s; border-style: solid; cursor: pointer; background-color: rgba(0, 0, 0, 0); border-color: rgb(53, 53, 53); border-width: 2px; border-radius: 0px; padding: 13px 28px; line-height: 21px; text-transform: uppercase; font-weight: 600; font-size: 14px; letter-spacing: 3px; color: rgb(53, 53, 53);">Get Started</a>`;
11068
+ const html = `<div>
11069
+ <a href="#" style="margin-top: ;margin-right: ;margin-bottom: ;margin-left: ;display: inline-block; text-decoration: none; transition: all 0.16s ease 0s; border-style: solid; cursor: pointer; background-color: rgb(220, 220, 220); color: rgb(0, 0, 0); border-color: rgb(220, 220, 220); border-width: 2px; border-radius: 0px; padding: 13px 28px; line-height: 21px; text-transform: uppercase; font-weight: 400; font-size: 14px; letter-spacing: 3px;">Read More</a> &nbsp;
11070
+ <a href="#" style="display: inline-block; text-decoration: none; transition: all 0.16s ease 0s; border-style: solid; cursor: pointer; background-color: rgba(0, 0, 0, 0); border-color: rgb(53, 53, 53); border-width: 2px; border-radius: 0px; padding: 13px 28px; line-height: 21px; text-transform: uppercase; font-weight: 600; font-size: 14px; letter-spacing: 3px; color: rgb(53, 53, 53);">Get Started</a>
11071
+ </div>`;
11070
11072
  util.addContent(html, mode);
11071
11073
  });
11072
11074
  elm = quickadd.querySelector('.add-spacer');
@@ -39280,6 +39282,10 @@ class Image {
39280
39282
  let modalImageSelect = builderStuff.querySelector('.is-modal.imageselect');
39281
39283
  let iframe = modalImageSelect.querySelector('iframe');
39282
39284
 
39285
+ if (this.builder.opts.assetRefresh) {
39286
+ iframe.src = this.builder.opts.imageselect;
39287
+ }
39288
+
39283
39289
  if (iframe.src === 'about:blank') {
39284
39290
  iframe.src = this.builder.opts.imageselect;
39285
39291
  }
@@ -39302,6 +39308,10 @@ class Image {
39302
39308
  let modalImageSelect = builderStuff.querySelector('.is-modal.imageselect');
39303
39309
  let iframe = modalImageSelect.querySelector('iframe');
39304
39310
 
39311
+ if (this.builder.opts.assetRefresh) {
39312
+ iframe.src = this.builder.opts.imageselect;
39313
+ }
39314
+
39305
39315
  if (iframe.src === 'about:blank') {
39306
39316
  iframe.src = this.builder.opts.imageselect;
39307
39317
  }
@@ -41423,6 +41433,10 @@ class Hyperlink {
41423
41433
  } else {
41424
41434
  let modalFileSelect = this.builderStuff.querySelector('.is-modal.fileselect');
41425
41435
 
41436
+ if (this.builder.opts.assetRefresh) {
41437
+ modalFileSelect.querySelector('iframe').src = this.builder.opts.fileselect;
41438
+ }
41439
+
41426
41440
  if (modalFileSelect.querySelector('iframe').src === 'about:blank') {
41427
41441
  modalFileSelect.querySelector('iframe').src = this.builder.opts.fileselect;
41428
41442
  }
@@ -41515,6 +41529,10 @@ class Hyperlink {
41515
41529
  } else {
41516
41530
  let modalFileSelect = this.builderStuff.querySelector('.is-modal.fileselect');
41517
41531
 
41532
+ if (this.builder.opts.assetRefresh) {
41533
+ modalFileSelect.querySelector('iframe').src = this.builder.opts.fileselect;
41534
+ }
41535
+
41518
41536
  if (modalFileSelect.querySelector('iframe').src === 'about:blank') {
41519
41537
  modalFileSelect.querySelector('iframe').src = this.builder.opts.fileselect;
41520
41538
  }
@@ -42944,6 +42962,10 @@ class Video {
42944
42962
  let modalVideoSelect = builderStuff.querySelector('.is-modal.videoselect');
42945
42963
  let iframe = modalVideoSelect.querySelector('iframe');
42946
42964
 
42965
+ if (this.builder.opts.assetRefresh) {
42966
+ iframe.src = this.builder.opts.videoSelect;
42967
+ }
42968
+
42947
42969
  if (iframe.src === 'about:blank') {
42948
42970
  iframe.src = this.builder.opts.videoSelect;
42949
42971
  }
@@ -52206,6 +52228,9 @@ class Preferences {
52206
52228
  }
52207
52229
  }
52208
52230
  }
52231
+ } else {
52232
+ this.builder.setUIColor('', '');
52233
+ this.builder.renderIframeLater = true;
52209
52234
  }
52210
52235
 
52211
52236
  if (!this.builder.renderIframeLater) {
@@ -53629,6 +53654,10 @@ class Rte {
53629
53654
  let modalImageSelect = this.builderStuff.querySelector('.is-modal.imageselect');
53630
53655
  let iframe = modalImageSelect.querySelector('iframe');
53631
53656
 
53657
+ if (this.builder.opts.assetRefresh) {
53658
+ iframe.src = this.builder.opts.imageselect;
53659
+ }
53660
+
53632
53661
  if (iframe.src === 'about:blank') {
53633
53662
  iframe.src = this.builder.opts.imageselect;
53634
53663
  }
@@ -57625,6 +57654,8 @@ class ContentBuilder {
57625
57654
  imageSelect: '',
57626
57655
  fileSelect: '',
57627
57656
  videoSelect: '',
57657
+ assetRefresh: true,
57658
+ // asset manager specified in imageSelect, fileSelect & videoSelect will always refreshed on click/open
57628
57659
  customTags: [],
57629
57660
  buttons: ['bold', 'italic', 'underline', 'formatting', 'color', 'align', 'textsettings', 'createLink', 'tags', '|', 'undo', 'redo', 'zoom', 'more'],
57630
57661
  buttonsMore: ['icon', 'image', '|', 'list', 'font', 'formatPara', '|', 'html', 'preferences'],
@@ -59441,10 +59472,15 @@ class ContentBuilder {
59441
59472
  } // Css loaded. Now we can get UI styles.
59442
59473
 
59443
59474
 
59444
- const util = this.util;
59445
- util.getUIStyles();
59446
- this.setUIColorRefresh();
59447
- if (this.opts.onThemeChange) this.opts.onThemeChange();
59475
+ const util = this.util; // util.getUIStyles();
59476
+ // this.setUIColorRefresh();
59477
+ // if(this.opts.onThemeChange) this.opts.onThemeChange();
59478
+
59479
+ setTimeout(() => {
59480
+ util.getUIStyles();
59481
+ this.setUIColorRefresh();
59482
+ if (this.opts.onThemeChange) this.opts.onThemeChange();
59483
+ }, 300);
59448
59484
  });
59449
59485
  document.head.appendChild(link);
59450
59486
  } else {
@@ -59460,10 +59496,15 @@ class ContentBuilder {
59460
59496
  } // Css loaded. Now we can get UI styles.
59461
59497
 
59462
59498
 
59463
- const util = this.util;
59464
- util.getUIStyles();
59465
- this.setUIColorRefresh();
59466
- if (this.opts.onThemeChange) this.opts.onThemeChange();
59499
+ const util = this.util; // util.getUIStyles();
59500
+ // this.setUIColorRefresh();
59501
+ // if(this.opts.onThemeChange) this.opts.onThemeChange();
59502
+
59503
+ setTimeout(() => {
59504
+ util.getUIStyles();
59505
+ this.setUIColorRefresh();
59506
+ if (this.opts.onThemeChange) this.opts.onThemeChange();
59507
+ }, 1000);
59467
59508
  }
59468
59509
  }
59469
59510