@innovastudio/contentbuilder 1.0.68 → 1.0.72

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.68",
3
+ "version": "1.0.72",
4
4
  "description": "",
5
5
  "main": "public/contentbuilder/contentbuilder.esm.js",
6
6
  "files": [
@@ -10838,6 +10838,13 @@ class Snippets {
10838
10838
  if (snippetPathReplace[0] != '') {
10839
10839
  var regex = new RegExp(snippetPathReplace[0], 'g');
10840
10840
  html = html.replace(regex, snippetPathReplace[1]);
10841
+
10842
+ /* for encoded replace, change / to %2F */
10843
+ var slash = new RegExp('/', 'g');
10844
+ var snippetPathReplace_0 = snippetPathReplace[0].replace(slash, '%2F');
10845
+ var snippetPathReplace_1 = snippetPathReplace[1].replace(slash, '%2F');
10846
+ regex = new RegExp(snippetPathReplace_0, 'g');
10847
+ html = html.replace(regex, snippetPathReplace_1);
10841
10848
  }
10842
10849
  }
10843
10850
 
@@ -11059,14 +11066,16 @@ const renderQuickAdd = builder => {
11059
11066
  elm = quickadd.querySelector('.add-button');
11060
11067
  if (elm) dom$B.addEventListener(elm, 'click', () => {
11061
11068
  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>';
11069
+ 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
11070
  util.addContent(html, mode);
11064
11071
  });
11065
11072
  elm = quickadd.querySelector('.add-twobutton');
11066
11073
  if (elm) dom$B.addEventListener(elm, 'click', () => {
11067
11074
  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>`;
11075
+ const html = `<div>
11076
+ <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;
11077
+ <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>
11078
+ </div>`;
11070
11079
  util.addContent(html, mode);
11071
11080
  });
11072
11081
  elm = quickadd.querySelector('.add-spacer');
@@ -39289,11 +39298,12 @@ class Image {
39289
39298
  }
39290
39299
 
39291
39300
  util.showModal(modalImageSelect);
39292
- this.builder.targetInput = modalImageLink.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
39293
-
39294
- this.builder.targetCallback = null;
39295
- this.builder.targetAssetType = 'image';
39296
39301
  }
39302
+
39303
+ this.builder.targetInput = modalImageLink.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
39304
+
39305
+ this.builder.targetCallback = null;
39306
+ this.builder.targetAssetType = 'image';
39297
39307
  });
39298
39308
  elm = modalImageLink.querySelector('.input-select2');
39299
39309
  if (elm) dom$w.addEventListener(elm, 'click', () => {
@@ -39315,11 +39325,12 @@ class Image {
39315
39325
  }
39316
39326
 
39317
39327
  util.showModal(modalImageSelect);
39318
- this.builder.targetInput = modalImageLink.querySelector('.input-link'); // used by selectAsset() (see contentbuilder.js)
39319
-
39320
- this.builder.targetCallback = null;
39321
- this.builder.targetAssetType = 'media';
39322
39328
  }
39329
+
39330
+ this.builder.targetInput = modalImageLink.querySelector('.input-link'); // used by selectAsset() (see contentbuilder.js)
39331
+
39332
+ this.builder.targetCallback = null;
39333
+ this.builder.targetAssetType = 'media';
39323
39334
  });
39324
39335
  } else {
39325
39336
  dom$w.removeClass(divImageSrc, 'image-select');
@@ -41440,12 +41451,12 @@ class Hyperlink {
41440
41451
  }
41441
41452
 
41442
41453
  util.showModal(modalFileSelect, false, null, false);
41443
- this.builder.targetInput = modal.querySelector('.input-url'); // used by selectAsset() (see contentbuilder.js)
41444
-
41445
- this.builder.targetCallback = null;
41446
- this.builder.targetAssetType = 'all';
41447
41454
  }
41448
41455
 
41456
+ this.builder.targetInput = modal.querySelector('.input-url'); // used by selectAsset() (see contentbuilder.js)
41457
+
41458
+ this.builder.targetCallback = null;
41459
+ this.builder.targetAssetType = 'all';
41449
41460
  e.preventDefault();
41450
41461
  e.stopImmediatePropagation();
41451
41462
  });
@@ -41537,6 +41548,11 @@ class Hyperlink {
41537
41548
 
41538
41549
  util.showModal(modalFileSelect, false, null, false);
41539
41550
  }
41551
+
41552
+ this.builder.targetInput = modal.querySelector('.input-url'); // used by selectAsset() (see contentbuilder.js)
41553
+
41554
+ this.builder.targetCallback = null;
41555
+ this.builder.targetAssetType = 'all';
41540
41556
  });
41541
41557
  } else {
41542
41558
  modal.querySelector('.input-select').style.display = 'none';
@@ -42969,11 +42985,12 @@ class Video {
42969
42985
  }
42970
42986
 
42971
42987
  util.showModal(modalVideoSelect);
42972
- this.builder.targetInput = videoModal.querySelector('.input-url'); // used by selectAsset() (see contentbuilder.js)
42973
-
42974
- this.builder.targetCallback = null;
42975
- this.builder.targetAssetType = 'video';
42976
42988
  }
42989
+
42990
+ this.builder.targetInput = videoModal.querySelector('.input-url'); // used by selectAsset() (see contentbuilder.js)
42991
+
42992
+ this.builder.targetCallback = null;
42993
+ this.builder.targetAssetType = 'video';
42977
42994
  });
42978
42995
  let fileLargerVideo = videoModal.querySelector('#fileVideo1');
42979
42996
  dom$p.addEventListener(fileLargerVideo, 'change', e => {
@@ -45803,11 +45820,12 @@ class ColumnTool {
45803
45820
  }
45804
45821
 
45805
45822
  util.showModal(modalImageSelect);
45806
- this.builder.targetInput = imageSource.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
45807
-
45808
- this.builder.targetCallback = null;
45809
- this.builder.targetAssetType = 'image';
45810
45823
  }
45824
+
45825
+ this.builder.targetInput = imageSource.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
45826
+
45827
+ this.builder.targetCallback = null;
45828
+ this.builder.targetAssetType = 'image';
45811
45829
  });
45812
45830
  } else {
45813
45831
  dom$l.removeClass(divImageSrc, 'image-select');
@@ -46190,6 +46208,15 @@ class ColumnTool {
46190
46208
  const inpSrc = this.cellSettings.querySelector('.input-src');
46191
46209
  elm = this.cellSettings.querySelector('.input-select');
46192
46210
  if (elm) dom$l.addEventListener(elm, 'click', () => {
46211
+ //---default
46212
+ this.builder.targetInput = inpSrc; // used by selectAsset() (see contentbuilder.js)
46213
+
46214
+ this.builder.targetCallback = () => {
46215
+ this.applyClick();
46216
+ };
46217
+
46218
+ this.builder.targetAssetType = 'media'; //---/default
46219
+
46193
46220
  if (this.builder.opts.onFileSelectClick) {
46194
46221
  this.builder.opts.onFileSelectClick({
46195
46222
  targetInput: inpSrc,
@@ -52948,8 +52975,9 @@ class Rte {
52948
52975
  <button title="96px" data-value="96">96</button>
52949
52976
 
52950
52977
  <button title="120px" data-value="120">120</button>
52951
- <button title="160px" data-value="160">160</button>
52978
+ <!--<button title="160px" data-value="160">160</button>-->
52952
52979
  <button title="200px" data-value="200">200</button>
52980
+ <button title="300px" data-value="300">300</button>
52953
52981
 
52954
52982
  <button title="${util.out('Decrease')}" data-value="-" style="font-size:13px">-</button>
52955
52983
  <button title="${util.out('Increase')}" data-value="+" style="font-size:13px">+</button>
@@ -53661,11 +53689,12 @@ class Rte {
53661
53689
  }
53662
53690
 
53663
53691
  util.showModal(modalImageSelect);
53664
- this.builder.targetInput = modalInsertImage.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
53665
-
53666
- this.builder.targetCallback = null;
53667
- this.builder.targetAssetType = 'image';
53668
53692
  }
53693
+
53694
+ this.builder.targetInput = modalInsertImage.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
53695
+
53696
+ this.builder.targetCallback = null;
53697
+ this.builder.targetAssetType = 'image';
53669
53698
  });
53670
53699
  } else {
53671
53700
  dom$5.removeClass(inputImageInsertSrc, 'image-select');
@@ -57666,7 +57695,7 @@ class ContentBuilder {
57666
57695
  clearPreferences: false,
57667
57696
  toolbarAddSnippetButton: false,
57668
57697
  animateModal: true,
57669
- fontSizeClassValues: [12, 14, 16, 18, 21, 24, 28, 32, 35, 38, 42, 46, 48, 50, 54, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, 216, 220],
57698
+ fontSizeClassValues: [12, 14, 16, 18, 21, 24, 28, 32, 35, 38, 42, 46, 48, 50, 54, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, 216, 220, 224, 228, 232, 236, 240, 244, 248, 252, 256, 260, 264, 268, 272, 276, 280, 284, 288, 292, 296, 300, 304, 308, 312, 316, 320, 324, 328, 332, 336, 340, 344, 348, 352, 356, 360, 364, 368, 372, 376, 380, 384, 388, 392, 396, 400],
57670
57699
 
57671
57700
  /* If not empty, applying font size will apply class: size-12, size-14, and so on. All responsive, defined in content.css */
57672
57701
  gradientcolors: [['linear-gradient(0deg, rgb(255, 57, 25), rgb(249, 168, 37))'], ['linear-gradient(0deg, rgb(255, 57, 25), rgb(255, 104, 15))'], ['linear-gradient(0deg, #FF5722, #FF9800)'], ['linear-gradient(0deg, #613ca2, rgb(110, 123, 217))'], ['linear-gradient(0deg, rgb(65, 70, 206), rgb(236, 78, 130))'], ['linear-gradient(0deg, rgb(0, 150, 102), rgb(90, 103, 197))'], ['linear-gradient(30deg, rgb(249, 119, 148), rgb(98, 58, 162))'], ['linear-gradient(0deg, rgb(223, 70, 137), rgb(90, 103, 197))'], ['linear-gradient(0deg, rgb(40, 53, 147), rgb(90, 103, 197))'], ['linear-gradient(0deg, rgb(21, 101, 192), rgb(52, 169, 239))'], ['linear-gradient(0deg, rgb(32, 149, 219), rgb(139, 109, 230))'], ['linear-gradient(0deg, rgb(90, 103, 197), rgb(0, 184, 201))'], ['linear-gradient(0deg, rgb(0, 184, 201), rgb(253, 187, 45))'], ['linear-gradient(0deg, rgb(255, 208, 100), rgb(239, 98, 159))'], ['linear-gradient(0deg, rgb(0, 214, 223), rgb(130, 162, 253))'], ['linear-gradient(0deg, rgb(50, 234, 251), rgb(248, 247, 126))'], ['linear-gradient(0deg, rgb(141, 221, 255), rgb(255, 227, 255))'], ['linear-gradient(0deg, rgb(255, 170, 170), rgb(255, 255, 200))'], ['linear-gradient(0deg, rgb(239, 239, 239), rgb(252, 252, 252))']],