@innovastudio/contentbuilder 1.1.10 → 1.1.13

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/license.txt CHANGED
@@ -1,80 +1,80 @@
1
- ContentBuilder.js
2
-
3
- 3 LICENSE TYPES:
4
-
5
- 1) Standard Developer License (Unlimited websites)
6
- 2) Pro Developer License (Unlimited websites + resale in product, usage in SaaS project)
7
- 3) Super Developer License (Unlimited websites + resale in product, usage in SaaS project + access to source code for customization)
8
-
9
- ____________________________________________________________
10
-
11
-
12
- STANDARD DEVELOPER LICENSE AGREEMENT
13
-
14
- 1. ContentBuilder.js (Product) and its SOURCE CODE are licensed, not sold. All copyrights to ContentBuilder.js are exclusively owned by the author - InnovaStudio.
15
-
16
- 2. Use of ContentBuilder.js (Product) in integration or application development requires one license per developer.
17
-
18
- 3. You have the right to use the Product in unlimited websites (personal or commercial). You or your clients can use the Product.
19
-
20
- 4. You will be responsible for providing support to your clients, and InnovaStudio will not communicate directly with your clients under any circumstances.
21
-
22
- 5 You are not allowed to re-distribute the Product as another plugin and/or sell the Product as is. You must include the Product in your custom application.
23
-
24
- 6. LIMITED WARRANTY
25
- Although InnovaStudio has tested the Product and reviewed the documentation, InnovaStudio makes no warranty or representation, either expressed or implied, with respect to the Product, its quality, performance, merchantability, or fitness for a particular purpose. As a result, ContentBuilder.js is licensed AS-IS, and you are assuming the entire risk as to its quality and performance.
26
- InnovaStudio shall not be liable for any claim or right to recover damages, including, but not limited to, loss of profit, data, or use of the software or special, incidental, or consequential damages, or other similar claims, even if InnovaStudio has been specifically advised of the possibility of such damages.
27
-
28
- ____________________________________________________________
29
-
30
-
31
- PRO DEVELOPER LICENSE AGREEMENT
32
-
33
- 1. ContentBuilder.js (Product) and its SOURCE CODE are licensed, not sold. All copyrights to ContentBuilder.js are exclusively owned by the author - InnovaStudio.
34
-
35
- 2. Use of ContentBuilder.js (Product) in integration or application development requires one license per developer.
36
-
37
- 3. You have the right to use the Product in unlimited websites (personal or commercial). You or your clients can use the Product.
38
-
39
- 4. You have the right to use the Product in 1 (one) personal or commercial hosted service (SaaS project) with unlimited clients or users.
40
-
41
- 5. You have the right to include/distribute the Product in 1 (one) project/application for sale (eg. CMS product, etc), without any royalty whatsoever, provided that :
42
- - You do not permit (either by explicit or implicit means) further distribution of the Product by your clients or end users.
43
- - You do not distribute the Product in a free (downloadable) project/application.
44
-
45
- 6. You will be responsible for providing support to your clients, and InnovaStudio will not communicate directly with your clients under any circumstances.
46
-
47
- 7. You are not allowed to re-distribute the Product as another plugin and/or sell the Product as is. You must include the Product in your custom application.
48
-
49
- 8. LIMITED WARRANTY
50
- Although InnovaStudio has tested the Product and reviewed the documentation, InnovaStudio makes no warranty or representation, either expressed or implied, with respect to the Product, its quality, performance, merchantability, or fitness for a particular purpose. As a result, ContentBuilder.js is licensed AS-IS, and you are assuming the entire risk as to its quality and performance.
51
- InnovaStudio shall not be liable for any claim or right to recover damages, including, but not limited to, loss of profit, data, or use of the software or special, incidental, or consequential damages, or other similar claims, even if InnovaStudio has been specifically advised of the possibility of such damages.
52
-
53
- ____________________________________________________________
54
-
55
-
56
- SUPER DEVELOPER LICENSE AGREEMENT
57
-
58
- 1. ContentBuilder.js (Product) and its SOURCE CODE are licensed, not sold. All copyrights to ContentBuilder.js are exclusively owned by the author - InnovaStudio.
59
-
60
- 2. Use of ContentBuilder.js (Product) in integration or application development requires one license per developer.
61
-
62
- 3. You have the right to use the Product in unlimited websites (personal or commercial). You or your clients can use the Product.
63
-
64
- 4. You have the right to use the Product in 3 (three) personal or commercial hosted services (SaaS projects) with unlimited clients or users.
65
-
66
- 5. You have the right to include/distribute the Product in 3 (three) projects/applications for sale (eg. CMS product, etc), without any royalty whatsoever, provided that :
67
- - You do not permit (either by explicit or implicit means) further distribution of the Product by your clients or end users.
68
- - You do not distribute the Product in a free (downloadable) project/application.
69
-
70
- 6. You will be responsible for providing support to your clients, and InnovaStudio will not communicate directly with your clients under any circumstances.
71
-
72
- 7. You are not allowed to re-distribute the Product as another plugin and/or sell the Product as is. You must include the Product in your custom application.
73
-
74
- 8. LIMITED WARRANTY
75
- Although InnovaStudio has tested the Product and reviewed the documentation, InnovaStudio makes no warranty or representation, either expressed or implied, with respect to the Product, its quality, performance, merchantability, or fitness for a particular purpose. As a result, ContentBuilder.js is licensed AS-IS, and you are assuming the entire risk as to its quality and performance.
76
- InnovaStudio shall not be liable for any claim or right to recover damages, including, but not limited to, loss of profit, data, or use of the software or special, incidental, or consequential damages, or other similar claims, even if InnovaStudio has been specifically advised of the possibility of such damages.
77
-
78
-
79
- ____________________________________________________________
1
+ ContentBuilder.js
2
+
3
+ 3 LICENSE TYPES:
4
+
5
+ 1) Standard Developer License (Unlimited websites)
6
+ 2) Pro Developer License (Unlimited websites + resale in product, usage in SaaS project)
7
+ 3) Super Developer License (Unlimited websites + resale in product, usage in SaaS project + access to source code for customization)
8
+
9
+ ____________________________________________________________
10
+
11
+
12
+ STANDARD DEVELOPER LICENSE AGREEMENT
13
+
14
+ 1. ContentBuilder.js (Product) and its SOURCE CODE are licensed, not sold. All copyrights to ContentBuilder.js are exclusively owned by the author - InnovaStudio.
15
+
16
+ 2. Use of ContentBuilder.js (Product) in integration or application development requires one license per developer.
17
+
18
+ 3. You have the right to use the Product in unlimited websites (personal or commercial). You or your clients can use the Product.
19
+
20
+ 4. You will be responsible for providing support to your clients, and InnovaStudio will not communicate directly with your clients under any circumstances.
21
+
22
+ 5 You are not allowed to re-distribute the Product as another plugin and/or sell the Product as is. You must include the Product in your custom application.
23
+
24
+ 6. LIMITED WARRANTY
25
+ Although InnovaStudio has tested the Product and reviewed the documentation, InnovaStudio makes no warranty or representation, either expressed or implied, with respect to the Product, its quality, performance, merchantability, or fitness for a particular purpose. As a result, ContentBuilder.js is licensed AS-IS, and you are assuming the entire risk as to its quality and performance.
26
+ InnovaStudio shall not be liable for any claim or right to recover damages, including, but not limited to, loss of profit, data, or use of the software or special, incidental, or consequential damages, or other similar claims, even if InnovaStudio has been specifically advised of the possibility of such damages.
27
+
28
+ ____________________________________________________________
29
+
30
+
31
+ PRO DEVELOPER LICENSE AGREEMENT
32
+
33
+ 1. ContentBuilder.js (Product) and its SOURCE CODE are licensed, not sold. All copyrights to ContentBuilder.js are exclusively owned by the author - InnovaStudio.
34
+
35
+ 2. Use of ContentBuilder.js (Product) in integration or application development requires one license per developer.
36
+
37
+ 3. You have the right to use the Product in unlimited websites (personal or commercial). You or your clients can use the Product.
38
+
39
+ 4. You have the right to use the Product in 1 (one) personal or commercial hosted service (SaaS project) with unlimited clients or users.
40
+
41
+ 5. You have the right to include/distribute the Product in 1 (one) project/application for sale (eg. CMS product, etc), without any royalty whatsoever, provided that :
42
+ - You do not permit (either by explicit or implicit means) further distribution of the Product by your clients or end users.
43
+ - You do not distribute the Product in a free (downloadable) project/application.
44
+
45
+ 6. You will be responsible for providing support to your clients, and InnovaStudio will not communicate directly with your clients under any circumstances.
46
+
47
+ 7. You are not allowed to re-distribute the Product as another plugin and/or sell the Product as is. You must include the Product in your custom application.
48
+
49
+ 8. LIMITED WARRANTY
50
+ Although InnovaStudio has tested the Product and reviewed the documentation, InnovaStudio makes no warranty or representation, either expressed or implied, with respect to the Product, its quality, performance, merchantability, or fitness for a particular purpose. As a result, ContentBuilder.js is licensed AS-IS, and you are assuming the entire risk as to its quality and performance.
51
+ InnovaStudio shall not be liable for any claim or right to recover damages, including, but not limited to, loss of profit, data, or use of the software or special, incidental, or consequential damages, or other similar claims, even if InnovaStudio has been specifically advised of the possibility of such damages.
52
+
53
+ ____________________________________________________________
54
+
55
+
56
+ SUPER DEVELOPER LICENSE AGREEMENT
57
+
58
+ 1. ContentBuilder.js (Product) and its SOURCE CODE are licensed, not sold. All copyrights to ContentBuilder.js are exclusively owned by the author - InnovaStudio.
59
+
60
+ 2. Use of ContentBuilder.js (Product) in integration or application development requires one license per developer.
61
+
62
+ 3. You have the right to use the Product in unlimited websites (personal or commercial). You or your clients can use the Product.
63
+
64
+ 4. You have the right to use the Product in 3 (three) personal or commercial hosted services (SaaS projects) with unlimited clients or users.
65
+
66
+ 5. You have the right to include/distribute the Product in 3 (three) projects/applications for sale (eg. CMS product, etc), without any royalty whatsoever, provided that :
67
+ - You do not permit (either by explicit or implicit means) further distribution of the Product by your clients or end users.
68
+ - You do not distribute the Product in a free (downloadable) project/application.
69
+
70
+ 6. You will be responsible for providing support to your clients, and InnovaStudio will not communicate directly with your clients under any circumstances.
71
+
72
+ 7. You are not allowed to re-distribute the Product as another plugin and/or sell the Product as is. You must include the Product in your custom application.
73
+
74
+ 8. LIMITED WARRANTY
75
+ Although InnovaStudio has tested the Product and reviewed the documentation, InnovaStudio makes no warranty or representation, either expressed or implied, with respect to the Product, its quality, performance, merchantability, or fitness for a particular purpose. As a result, ContentBuilder.js is licensed AS-IS, and you are assuming the entire risk as to its quality and performance.
76
+ InnovaStudio shall not be liable for any claim or right to recover damages, including, but not limited to, loss of profit, data, or use of the software or special, incidental, or consequential damages, or other similar claims, even if InnovaStudio has been specifically advised of the possibility of such damages.
77
+
78
+
79
+ ____________________________________________________________
80
80
  https://www.innovastudio.com
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
- "version": "1.1.10",
3
+ "version": "1.1.13",
4
4
  "description": "",
5
5
  "main": "public/contentbuilder/contentbuilder.esm.js",
6
6
  "files": [
@@ -1,7 +1,7 @@
1
- //PLUGINS
2
- // _cb.settings.plugins = ['preview','wordcount', 'symbols']; // old way
3
- _cb.settings.plugins = [
4
- { name: 'preview', showInMainToolbar: true, showInElementToolbar: true },
5
- { name: 'wordcount', showInMainToolbar: true, showInElementToolbar: true },
6
- { name: 'symbols', showInMainToolbar: true, showInElementToolbar: false },
1
+ //PLUGINS
2
+ // _cb.settings.plugins = ['preview','wordcount', 'symbols']; // old way
3
+ _cb.settings.plugins = [
4
+ { name: 'preview', showInMainToolbar: true, showInElementToolbar: true },
5
+ { name: 'wordcount', showInMainToolbar: true, showInElementToolbar: true },
6
+ { name: 'symbols', showInMainToolbar: true, showInElementToolbar: false },
7
7
  ];
@@ -6605,6 +6605,7 @@ class Dom {
6605
6605
 
6606
6606
 
6607
6607
  hasClass(element, className) {
6608
+ if (!element) return false;
6608
6609
  if (!element.className) return false;
6609
6610
  return (' ' + element.className + ' ').indexOf(' ' + className + ' ') > -1;
6610
6611
  }
@@ -46708,6 +46709,12 @@ class Image {
46708
46709
  elm = imageTool.querySelector('.image-edit');
46709
46710
  dom$A.addEventListener(elm, 'click', () => {
46710
46711
  let img = this.builder.activeImage;
46712
+
46713
+ if (this.builder.onImageEditClick) {
46714
+ let result = this.builder.onImageEditClick(img);
46715
+ if (!result) return;
46716
+ }
46717
+
46711
46718
  util.showModal(modalImageEdit, true);
46712
46719
  let preview = modalImageEdit.querySelector('.imageedit-preview');
46713
46720
  const maxW = 800;
@@ -46730,9 +46737,15 @@ class Image {
46730
46737
  preview.innerHTML = '<img src="" style="max-width:100%;object-fit:contain;height:100%;"/>';
46731
46738
  let imagePreview = modalImageEdit.querySelector('img');
46732
46739
  imagePreview.src = img.src;
46733
- this.cropper = new Cropper(imagePreview, {
46734
- zoomable: false
46735
- });
46740
+
46741
+ if (this.builder.setCropperConfig) {
46742
+ this.cropper = new Cropper(imagePreview, this.builder.setCropperConfig);
46743
+ } else {
46744
+ this.cropper = new Cropper(imagePreview, {
46745
+ zoomable: false
46746
+ });
46747
+ }
46748
+
46736
46749
  document.querySelector('.moveable-control-box').style.display = 'none'; //needed by Safari (prevent z-index problem)
46737
46750
  }); // Set crop proportion
46738
46751
 
@@ -66060,6 +66073,22 @@ class ContentBuilder {
66060
66073
  // onPluginsLoaded: function () { },
66061
66074
  // onImageBrowseClick: function () { },
66062
66075
  // onImageSettingClick: function () { },
66076
+
66077
+ /*
66078
+ // onImageEditClick: function () { }, // used in elementimage.js
66079
+ // Example:
66080
+ onImageEditClick: (activeImage)=>{
66081
+ activeImage.setAttribute('crossorigin', 'anonymous');
66082
+ const cropperConfig = {
66083
+ checkCrossOrigin:false,
66084
+ checkOrientation:false,
66085
+ crossOrigin:'anonymous'
66086
+ };
66087
+ builder.setCropperConfig = cropperConfig;
66088
+ return true;
66089
+ },
66090
+ */
66091
+ // setCropperConfig: {}, // used in elementimage.js
66063
66092
  imageEmbed: true,
66064
66093
  imageselect: '',
66065
66094
  fileselect: '',
@@ -66718,7 +66747,8 @@ class ContentBuilder {
66718
66747
  e = e || window.event;
66719
66748
  let target = e.target || e.srcElement;
66720
66749
  if (!target) return;
66721
- let rowClicked = dom.hasClass(target.parentNode, 'is-builder');
66750
+ let rowClicked;
66751
+ if (target.parentNode) rowClicked = dom.hasClass(target.parentNode, 'is-builder');
66722
66752
  let containerClicked = dom.hasClass(target, 'is-builder');
66723
66753
  let a = false,
66724
66754
  b = false,