@innovastudio/contentbuilder 1.4.129 → 1.4.130

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
3
  "type": "module",
4
- "version": "1.4.129",
4
+ "version": "1.4.130",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "files": [
@@ -1158,18 +1158,20 @@ class Util {
1158
1158
  this.builder.activeIcon = null;
1159
1159
 
1160
1160
  // RTE
1161
- let rteTool = builderStuff.querySelector('.is-rte-tool');
1162
- // rteTool.style.display = 'none';
1163
- let rteButtons = rteTool.querySelectorAll('button');
1164
- Array.prototype.forEach.call(rteButtons, rteButton => {
1165
- dom.removeClass(rteButton, 'on');
1166
- });
1167
- let elementRteTool = builderStuff.querySelector('.is-elementrte-tool');
1168
- // rteTool.style.display = 'none';
1169
- rteButtons = elementRteTool.querySelectorAll('button');
1170
- Array.prototype.forEach.call(rteButtons, rteButton => {
1171
- dom.removeClass(rteButton, 'on');
1172
- });
1161
+ if (!this.builder.controlPanel) {
1162
+ let rteTool = builderStuff.querySelector('.is-rte-tool');
1163
+ // rteTool.style.display = 'none';
1164
+ let rteButtons = rteTool.querySelectorAll('button');
1165
+ Array.prototype.forEach.call(rteButtons, rteButton => {
1166
+ dom.removeClass(rteButton, 'on');
1167
+ });
1168
+ let elementRteTool = builderStuff.querySelector('.is-elementrte-tool');
1169
+ // rteTool.style.display = 'none';
1170
+ rteButtons = elementRteTool.querySelectorAll('button');
1171
+ Array.prototype.forEach.call(rteButtons, rteButton => {
1172
+ dom.removeClass(rteButton, 'on');
1173
+ });
1174
+ }
1173
1175
  let pops = builderStuff.querySelectorAll('.is-pop');
1174
1176
  Array.prototype.forEach.call(pops, pop => {
1175
1177
  pop.style.display = '';
@@ -1247,7 +1249,7 @@ class Util {
1247
1249
  this.builder.activeIcon = null;
1248
1250
  this.builder.inspectedElement = null;
1249
1251
  this.builder.activeElement = null;
1250
- if (all) {
1252
+ if (all && !this.builder.controlPanel) {
1251
1253
  // RTE
1252
1254
  let rtetool = builderStuff.querySelector('.is-rte-tool');
1253
1255
  if (rtetool) rtetool.style.display = 'none';
@@ -1378,17 +1380,19 @@ class Util {
1378
1380
  });
1379
1381
 
1380
1382
  // RTE
1381
- if (this.builder.toolbarDisplay === 'auto') {
1382
- let rtetool = builderStuff.querySelector('.is-rte-tool');
1383
- if (rtetool) rtetool.style.display = 'none';
1384
- let elementRtetool = builderStuff.querySelector('.is-elementrte-tool');
1385
- if (elementRtetool) elementRtetool.style.display = 'none';
1383
+ if (!this.builder.controlPanel) {
1384
+ if (this.builder.toolbarDisplay === 'auto') {
1385
+ let rtetool = builderStuff.querySelector('.is-rte-tool');
1386
+ if (rtetool) rtetool.style.display = 'none';
1387
+ let elementRtetool = builderStuff.querySelector('.is-elementrte-tool');
1388
+ if (elementRtetool) elementRtetool.style.display = 'none';
1386
1389
 
1387
- // Click ok on code view should hide these as well
1388
- let rtetoolmore = builderStuff.querySelector('.rte-more-options');
1389
- if (rtetoolmore) rtetoolmore.style.display = '';
1390
- let elementRtetoolmore = builderStuff.querySelector('.elementrte-more-options');
1391
- if (elementRtetoolmore) elementRtetoolmore.style.display = '';
1390
+ // Click ok on code view should hide these as well
1391
+ let rtetoolmore = builderStuff.querySelector('.rte-more-options');
1392
+ if (rtetoolmore) rtetoolmore.style.display = '';
1393
+ let elementRtetoolmore = builderStuff.querySelector('.elementrte-more-options');
1394
+ if (elementRtetoolmore) elementRtetoolmore.style.display = '';
1395
+ }
1392
1396
  }
1393
1397
 
1394
1398
  // Element
@@ -1396,13 +1400,15 @@ class Util {
1396
1400
  Array.prototype.forEach.call(elms, elm => {
1397
1401
  dom.removeClass(elm, 'elm-active');
1398
1402
  });
1399
- let rtepops = builderStuff.querySelectorAll('.is-rte-pop');
1400
- Array.prototype.forEach.call(rtepops, rtepop => {
1401
- rtepop.style.display = '';
1402
- dom.removeClass(rtepop, 'active');
1403
- dom.removeClass(rtepop, 'deactive');
1404
- // dom.addClass(rtepop, 'deactive');
1405
- });
1403
+ if (!this.builder.controlPanel) {
1404
+ let rtepops = builderStuff.querySelectorAll('.is-rte-pop');
1405
+ Array.prototype.forEach.call(rtepops, rtepop => {
1406
+ rtepop.style.display = '';
1407
+ dom.removeClass(rtepop, 'active');
1408
+ dom.removeClass(rtepop, 'deactive');
1409
+ // dom.addClass(rtepop, 'deactive');
1410
+ });
1411
+ }
1406
1412
 
1407
1413
  let pops = builderStuff.querySelectorAll('.is-pop');
1408
1414
  Array.prototype.forEach.call(pops, pop => {
@@ -11844,12 +11850,45 @@ const prepareSvgIcons = builder => {
11844
11850
  <path d="M5 10h11a4 4 0 1 1 0 8h-1"></path>
11845
11851
  </symbol>
11846
11852
  <symbol id="icon-publish" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
11847
- <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
11848
- <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path>
11849
- <path d="M9 12l2 2l4 -4"></path>
11853
+ <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
11854
+ <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path>
11855
+ <path d="M9 12l2 2l4 -4"></path>
11856
+ </symbol>
11857
+
11858
+ <symbol id="icon-align-box-top" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
11859
+ <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
11860
+ <path d="M3 3m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z" />
11861
+ <path d="M15 10h-7" />
11862
+ <path d="M15 7h-7" />
11863
+ </symbol>
11864
+ <symbol id="icon-align-box-middle" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
11865
+ <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
11866
+ <path d="M3 3m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z" />
11867
+ <path d="M15 13h-7" />
11868
+ <path d="M15 10h-7" />
11869
+ </symbol>
11870
+ <symbol id="icon-align-box-bottom" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
11871
+ <path d="M3 3m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z" />
11872
+ <path d="M15 17h-7" />
11873
+ <path d="M15 14h-7" />
11874
+ </symbol>
11875
+ <symbol id="icon-align-box-stretch" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
11876
+ <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
11877
+ <path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" />
11878
+ <path d="M15 17h-7" />
11879
+ <path d="M15 7h-7" />
11880
+ </symbol>
11881
+
11882
+ <symbol id="icon-align-box-left" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
11883
+ <path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 3m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z" /><path d="M9 15h-2" /><path d="M13 12h-6" /><path d="M11 9h-4" />
11884
+ </symbol>
11885
+ <symbol id="icon-align-box-center" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
11886
+ <path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 19v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z" /><path d="M11 15h2" /><path d="M9 12h6" /><path d="M10 9h4" />
11887
+ </symbol>
11888
+ <symbol id="icon-align-box-right" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
11889
+ <path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 15h2" /><path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" /><path d="M11 12h6" /><path d="M13 9h4" />
11850
11890
  </symbol>
11851
11891
 
11852
-
11853
11892
  </defs>
11854
11893
  </svg>`;
11855
11894
  builder.dom.appendHtml(builder.builderStuff, html);
@@ -49141,17 +49180,26 @@ class Hyperlink {
49141
49180
  // Link tool
49142
49181
  const linkTool = this.linkTool;
49143
49182
  let linkDisplay = dom.getStyle(link, 'display');
49144
- if (linkDisplay === 'inline-block' || linkDisplay === 'flex') {
49145
- linkTool.querySelector('.link-duplicate').style.display = 'block';
49146
- linkTool.querySelector('.link-remove').style.display = 'block';
49147
- } else {
49148
- if (this.builder.activeIcon) {
49183
+ /*
49184
+ if(linkDisplay==='inline-block' || linkDisplay==='flex'){
49149
49185
  linkTool.querySelector('.link-duplicate').style.display = 'block';
49150
49186
  linkTool.querySelector('.link-remove').style.display = 'block';
49151
- } else {
49152
- linkTool.querySelector('.link-duplicate').style.display = 'none';
49153
- linkTool.querySelector('.link-remove').style.display = 'none';
49154
- }
49187
+ } else {
49188
+ if(this.builder.activeIcon) {
49189
+ linkTool.querySelector('.link-duplicate').style.display = 'block';
49190
+ linkTool.querySelector('.link-remove').style.display = 'block';
49191
+ } else {
49192
+ linkTool.querySelector('.link-duplicate').style.display = 'none';
49193
+ linkTool.querySelector('.link-remove').style.display = 'none';
49194
+ }
49195
+ }
49196
+ */
49197
+ if (linkDisplay === 'inline' & !this.builder.activeIcon) {
49198
+ linkTool.querySelector('.link-duplicate').style.display = 'none';
49199
+ linkTool.querySelector('.link-remove').style.display = 'none';
49200
+ } else {
49201
+ linkTool.querySelector('.link-duplicate').style.display = 'block';
49202
+ linkTool.querySelector('.link-remove').style.display = 'block';
49155
49203
  }
49156
49204
 
49157
49205
  // Button Stuff
@@ -76281,6 +76329,7 @@ class ContentBuilder {
76281
76329
  this.elmTool.repositionElementTool(true);
76282
76330
  this.element.image.imageTool.style.display = '';
76283
76331
  this.element.module.moduleTool.style.display = '';
76332
+ this.element.hyperlink.linkTool.style.display = '';
76284
76333
  this.colTool.lockIndicator.style.display = '';
76285
76334
  return ret;
76286
76335
  };