@innovastudio/contentbox 1.0.49 → 1.0.53

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/contentbox",
3
- "version": "1.0.49",
3
+ "version": "1.0.53",
4
4
  "description": "",
5
5
  "main": "public/contentbox/contentbox.esm.js",
6
6
  "files": [
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@ashthornton/asscroll": "^2.0.4",
42
- "@innovastudio/contentbuilder": "^1.0.68",
42
+ "@innovastudio/contentbuilder": "^1.0.72",
43
43
  "axios": "^0.21.4",
44
44
  "cors": "^2.8.5",
45
45
  "express": "^4.17.1",
@@ -20971,6 +20971,13 @@ class Snippets {
20971
20971
  if (snippetPathReplace[0] != '') {
20972
20972
  var regex = new RegExp(snippetPathReplace[0], 'g');
20973
20973
  html = html.replace(regex, snippetPathReplace[1]);
20974
+
20975
+ /* for encoded replace, change / to %2F */
20976
+ var slash = new RegExp('/', 'g');
20977
+ var snippetPathReplace_0 = snippetPathReplace[0].replace(slash, '%2F');
20978
+ var snippetPathReplace_1 = snippetPathReplace[1].replace(slash, '%2F');
20979
+ regex = new RegExp(snippetPathReplace_0, 'g');
20980
+ html = html.replace(regex, snippetPathReplace_1);
20974
20981
  }
20975
20982
  }
20976
20983
 
@@ -21192,14 +21199,16 @@ const renderQuickAdd = builder => {
21192
21199
  elm = quickadd.querySelector('.add-button');
21193
21200
  if (elm) dom$B.addEventListener(elm, 'click', () => {
21194
21201
  const mode = quickadd.getAttribute('data-mode');
21195
- 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>';
21202
+ 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>';
21196
21203
  util.addContent(html, mode);
21197
21204
  });
21198
21205
  elm = quickadd.querySelector('.add-twobutton');
21199
21206
  if (elm) dom$B.addEventListener(elm, 'click', () => {
21200
21207
  const mode = quickadd.getAttribute('data-mode');
21201
- 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;
21202
- <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>`;
21208
+ const html = `<div>
21209
+ <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;
21210
+ <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>
21211
+ </div>`;
21203
21212
  util.addContent(html, mode);
21204
21213
  });
21205
21214
  elm = quickadd.querySelector('.add-spacer');
@@ -49422,11 +49431,12 @@ class Image {
49422
49431
  }
49423
49432
 
49424
49433
  util.showModal(modalImageSelect);
49425
- this.builder.targetInput = modalImageLink.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
49426
-
49427
- this.builder.targetCallback = null;
49428
- this.builder.targetAssetType = 'image';
49429
49434
  }
49435
+
49436
+ this.builder.targetInput = modalImageLink.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
49437
+
49438
+ this.builder.targetCallback = null;
49439
+ this.builder.targetAssetType = 'image';
49430
49440
  });
49431
49441
  elm = modalImageLink.querySelector('.input-select2');
49432
49442
  if (elm) dom$w.addEventListener(elm, 'click', () => {
@@ -49448,11 +49458,12 @@ class Image {
49448
49458
  }
49449
49459
 
49450
49460
  util.showModal(modalImageSelect);
49451
- this.builder.targetInput = modalImageLink.querySelector('.input-link'); // used by selectAsset() (see contentbuilder.js)
49452
-
49453
- this.builder.targetCallback = null;
49454
- this.builder.targetAssetType = 'media';
49455
49461
  }
49462
+
49463
+ this.builder.targetInput = modalImageLink.querySelector('.input-link'); // used by selectAsset() (see contentbuilder.js)
49464
+
49465
+ this.builder.targetCallback = null;
49466
+ this.builder.targetAssetType = 'media';
49456
49467
  });
49457
49468
  } else {
49458
49469
  dom$w.removeClass(divImageSrc, 'image-select');
@@ -51573,12 +51584,12 @@ class Hyperlink {
51573
51584
  }
51574
51585
 
51575
51586
  util.showModal(modalFileSelect, false, null, false);
51576
- this.builder.targetInput = modal.querySelector('.input-url'); // used by selectAsset() (see contentbuilder.js)
51577
-
51578
- this.builder.targetCallback = null;
51579
- this.builder.targetAssetType = 'all';
51580
51587
  }
51581
51588
 
51589
+ this.builder.targetInput = modal.querySelector('.input-url'); // used by selectAsset() (see contentbuilder.js)
51590
+
51591
+ this.builder.targetCallback = null;
51592
+ this.builder.targetAssetType = 'all';
51582
51593
  e.preventDefault();
51583
51594
  e.stopImmediatePropagation();
51584
51595
  });
@@ -51670,6 +51681,11 @@ class Hyperlink {
51670
51681
 
51671
51682
  util.showModal(modalFileSelect, false, null, false);
51672
51683
  }
51684
+
51685
+ this.builder.targetInput = modal.querySelector('.input-url'); // used by selectAsset() (see contentbuilder.js)
51686
+
51687
+ this.builder.targetCallback = null;
51688
+ this.builder.targetAssetType = 'all';
51673
51689
  });
51674
51690
  } else {
51675
51691
  modal.querySelector('.input-select').style.display = 'none';
@@ -53102,11 +53118,12 @@ class Video {
53102
53118
  }
53103
53119
 
53104
53120
  util.showModal(modalVideoSelect);
53105
- this.builder.targetInput = videoModal.querySelector('.input-url'); // used by selectAsset() (see contentbuilder.js)
53106
-
53107
- this.builder.targetCallback = null;
53108
- this.builder.targetAssetType = 'video';
53109
53121
  }
53122
+
53123
+ this.builder.targetInput = videoModal.querySelector('.input-url'); // used by selectAsset() (see contentbuilder.js)
53124
+
53125
+ this.builder.targetCallback = null;
53126
+ this.builder.targetAssetType = 'video';
53110
53127
  });
53111
53128
  let fileLargerVideo = videoModal.querySelector('#fileVideo1');
53112
53129
  dom$p.addEventListener(fileLargerVideo, 'change', e => {
@@ -55936,11 +55953,12 @@ class ColumnTool {
55936
55953
  }
55937
55954
 
55938
55955
  util.showModal(modalImageSelect);
55939
- this.builder.targetInput = imageSource.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
55940
-
55941
- this.builder.targetCallback = null;
55942
- this.builder.targetAssetType = 'image';
55943
55956
  }
55957
+
55958
+ this.builder.targetInput = imageSource.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
55959
+
55960
+ this.builder.targetCallback = null;
55961
+ this.builder.targetAssetType = 'image';
55944
55962
  });
55945
55963
  } else {
55946
55964
  dom$l.removeClass(divImageSrc, 'image-select');
@@ -56323,6 +56341,15 @@ class ColumnTool {
56323
56341
  const inpSrc = this.cellSettings.querySelector('.input-src');
56324
56342
  elm = this.cellSettings.querySelector('.input-select');
56325
56343
  if (elm) dom$l.addEventListener(elm, 'click', () => {
56344
+ //---default
56345
+ this.builder.targetInput = inpSrc; // used by selectAsset() (see contentbuilder.js)
56346
+
56347
+ this.builder.targetCallback = () => {
56348
+ this.applyClick();
56349
+ };
56350
+
56351
+ this.builder.targetAssetType = 'media'; //---/default
56352
+
56326
56353
  if (this.builder.opts.onFileSelectClick) {
56327
56354
  this.builder.opts.onFileSelectClick({
56328
56355
  targetInput: inpSrc,
@@ -63081,8 +63108,9 @@ class Rte {
63081
63108
  <button title="96px" data-value="96">96</button>
63082
63109
 
63083
63110
  <button title="120px" data-value="120">120</button>
63084
- <button title="160px" data-value="160">160</button>
63111
+ <!--<button title="160px" data-value="160">160</button>-->
63085
63112
  <button title="200px" data-value="200">200</button>
63113
+ <button title="300px" data-value="300">300</button>
63086
63114
 
63087
63115
  <button title="${util.out('Decrease')}" data-value="-" style="font-size:13px">-</button>
63088
63116
  <button title="${util.out('Increase')}" data-value="+" style="font-size:13px">+</button>
@@ -63794,11 +63822,12 @@ class Rte {
63794
63822
  }
63795
63823
 
63796
63824
  util.showModal(modalImageSelect);
63797
- this.builder.targetInput = modalInsertImage.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
63798
-
63799
- this.builder.targetCallback = null;
63800
- this.builder.targetAssetType = 'image';
63801
63825
  }
63826
+
63827
+ this.builder.targetInput = modalInsertImage.querySelector('.input-src'); // used by selectAsset() (see contentbuilder.js)
63828
+
63829
+ this.builder.targetCallback = null;
63830
+ this.builder.targetAssetType = 'image';
63802
63831
  });
63803
63832
  } else {
63804
63833
  dom$5.removeClass(inputImageInsertSrc, 'image-select');
@@ -67799,7 +67828,7 @@ class ContentBuilder {
67799
67828
  clearPreferences: false,
67800
67829
  toolbarAddSnippetButton: false,
67801
67830
  animateModal: true,
67802
- 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],
67831
+ 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],
67803
67832
 
67804
67833
  /* If not empty, applying font size will apply class: size-12, size-14, and so on. All responsive, defined in content.css */
67805
67834
  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))']],