@innovastudio/contentbuilder 1.5.80 → 1.5.82
Sign up to get free protection for your applications and to get access to all the features.
@@ -6299,8 +6299,8 @@ class Util {
|
|
6299
6299
|
const newPos = this.getElementPosition(btnCellMore);
|
6300
6300
|
let top = newPos.top;
|
6301
6301
|
let left = newPos.left;
|
6302
|
-
columnMore.style.top = top + 35 + 'px';
|
6303
|
-
columnMore.style.left = left - 7 + 'px';
|
6302
|
+
columnMore.style.top = top + 35 + window.pageYOffset + 'px';
|
6303
|
+
columnMore.style.left = left - 7 + window.pageXOffset + 'px';
|
6304
6304
|
setTimeout(() => {
|
6305
6305
|
columnMore.classList.remove('transition1');
|
6306
6306
|
}, 300);
|
@@ -15561,7 +15561,7 @@ const prepareSvgIcons = builder => {
|
|
15561
15561
|
<path d="M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"></path>
|
15562
15562
|
</symbol>
|
15563
15563
|
|
15564
|
-
<symbol id="icon-reload" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
15564
|
+
<symbol id="icon-reload" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
15565
15565
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
15566
15566
|
<path d="M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1.002 7.935 1.007 9.425 4.747"></path>
|
15567
15567
|
<path d="M20 4v5h-5"></path>
|
@@ -15639,7 +15639,7 @@ const prepareSvgIcons = builder => {
|
|
15639
15639
|
<path d="M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"></path>
|
15640
15640
|
<path d="M20.2 20.2l1.8 1.8"></path>
|
15641
15641
|
</symbol>
|
15642
|
-
<symbol id="icon-folder2" viewBox="0 0 24 24" stroke-width="
|
15642
|
+
<symbol id="icon-folder2" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
15643
15643
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
15644
15644
|
<path d="M11 19h-6a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2.5"></path>
|
15645
15645
|
<path d="M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"></path>
|
@@ -15818,7 +15818,7 @@ const prepareSvgIcons = builder => {
|
|
15818
15818
|
<path d="M17 17h2a2 2 0 0 0 2 -2v-4a2 2 0 0 0 -2 -2h-14a2 2 0 0 0 -2 2v4a2 2 0 0 0 2 2h2" /><path d="M17 9v-4a2 2 0 0 0 -2 -2h-6a2 2 0 0 0 -2 2v4" /><path d="M7 13m0 2a2 2 0 0 1 2 -2h6a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-6a2 2 0 0 1 -2 -2z" />
|
15819
15819
|
</symbol>
|
15820
15820
|
|
15821
|
-
<symbol id="icon-plus" viewBox="0 0 24 24" stroke-width="
|
15821
|
+
<symbol id="icon-plus" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
15822
15822
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
15823
15823
|
<line x1="12" y1="5" x2="12" y2="19"></line>
|
15824
15824
|
<line x1="5" y1="12" x2="19" y2="12"></line>
|
@@ -15833,6 +15833,47 @@ const prepareSvgIcons = builder => {
|
|
15833
15833
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
15834
15834
|
<path d="M5 12l14 0"></path>
|
15835
15835
|
</symbol>
|
15836
|
+
|
15837
|
+
<symbol id="icon-dots2" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
15838
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />
|
15839
|
+
</symbol>
|
15840
|
+
<symbol id="icon-close" viewBox="0 0 24 24" stroke-width="1.6" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
15841
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
15842
|
+
<path d="M18 6l-12 12"></path>
|
15843
|
+
<path d="M6 6l12 12"></path>
|
15844
|
+
</symbol>
|
15845
|
+
<symbol id="icon-trash2" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
15846
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
15847
|
+
<path d="M4 7l16 0"></path>
|
15848
|
+
<path d="M10 11l0 6"></path>
|
15849
|
+
<path d="M14 11l0 6"></path>
|
15850
|
+
<path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path>
|
15851
|
+
<path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>
|
15852
|
+
</symbol>
|
15853
|
+
<symbol id="icon-duplicate3" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
15854
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z" /><path d="M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1" />
|
15855
|
+
</symbol>
|
15856
|
+
<symbol id="icon-pencil2" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
15857
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
15858
|
+
<path d="M4 20h4l10.5 -10.5a1.5 1.5 0 0 0 -4 -4l-10.5 10.5v4"></path>
|
15859
|
+
<line x1="13.5" y1="6.5" x2="17.5" y2="10.5"></line>
|
15860
|
+
</symbol>
|
15861
|
+
<symbol id="icon-link2" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
15862
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
15863
|
+
<path d="M9 15l6 -6"></path>
|
15864
|
+
<path d="M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"></path>
|
15865
|
+
<path d="M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"></path>
|
15866
|
+
</symbol>
|
15867
|
+
<symbol id="icon-cog" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
15868
|
+
<path d="M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z" /><path d="M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" />
|
15869
|
+
</symbol>
|
15870
|
+
<symbol id="icon-photo" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
15871
|
+
<path d="M15 8h.01" /><path d="M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z" /><path d="M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5" /><path d="M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3" />
|
15872
|
+
</symbol>
|
15873
|
+
<symbol id="icon-minus2" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
15874
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
15875
|
+
<path d="M5 12l14 0"></path>
|
15876
|
+
</symbol>
|
15836
15877
|
</svg>`;
|
15837
15878
|
builder.dom.appendHtml(builder.builderStuff, html);
|
15838
15879
|
};
|
@@ -16871,8 +16912,8 @@ class RowTool$1 {
|
|
16871
16912
|
}
|
16872
16913
|
*/
|
16873
16914
|
const newPos = this.builder.util.getElementPosition(elm);
|
16874
|
-
let top = newPos.top;
|
16875
|
-
let left = newPos.left;
|
16915
|
+
let top = newPos.top + window.pageYOffset;
|
16916
|
+
let left = newPos.left + window.pageXOffset;
|
16876
16917
|
|
16877
16918
|
// const w = rowMore.offsetWidth;
|
16878
16919
|
rowMore.style.top = top - 8 + 'px';
|
@@ -45235,12 +45276,14 @@ class Image$1 {
|
|
45235
45276
|
let html = `
|
45236
45277
|
<div id="divImageTool" class="is-tool">
|
45237
45278
|
<div role="button" tabindex="0" class="image-embed" style="${this.builder.opts.imageEmbed ? '' : 'display:none;'}width:40px;height:40px;overflow:hidden;">
|
45238
|
-
<div style="position:absolute;width:100%;height:100%;"
|
45279
|
+
<div style="position:absolute;width:100%;height:100%;">
|
45280
|
+
<svg class="is-icon-flex" style="position: absolute;top: 13px;left: 15px;width: 16px;height: 16px;"><use xlink:href="#ion-image"></use></svg>
|
45281
|
+
</div>
|
45239
45282
|
<input title="${util.out('Change Image')}" data-title="${util.out('Change Image')}" id="fileEmbedImage" type="file" accept="image/*" style="position:absolute;top:-20px;left:0;width:40px;height:60px;opacity: 0;cursor: pointer;"/>
|
45240
45283
|
</div>
|
45241
|
-
<button tabindex="0" title="${util.out('Link')}" data-title="${util.out('Link')}" class="image-link" style="width:40px;height:40px;"><svg class="is-icon-flex" style="width:17px;height:17px;"><use xlink:href="#
|
45242
|
-
<button tabindex="0" title="${util.out('Select')}" data-title="${util.out('Select')}" class="open-asset" style="display:none;width:40px;height:40px;"><svg class="is-icon-flex" style="width:17px;height:17px;
|
45243
|
-
<button tabindex="0" title="${util.out('Edit')}" data-title="${util.out('Edit')}" class="image-edit" style="width:40px;height:40px;"><svg class="is-icon-flex" style="width:
|
45284
|
+
<button tabindex="0" title="${util.out('Link')}" data-title="${util.out('Link')}" class="image-link" style="width:40px;height:40px;"><svg class="is-icon-flex" style="width:17px;height:17px;transform:rotate(45deg)"><use xlink:href="#icon-link2"></use></svg></button>
|
45285
|
+
<button tabindex="0" title="${util.out('Select')}" data-title="${util.out('Select')}" class="open-asset" style="display:none;width:40px;height:40px;"><svg class="is-icon-flex" style="width:17px;height:17px;"><use xlink:href="#icon-folder2"></use></svg></button>
|
45286
|
+
<button tabindex="0" title="${util.out('Edit')}" data-title="${util.out('Edit')}" class="image-edit" style="width:40px;height:40px;"><svg class="is-icon-flex" style="width:17px;height:17px;"><use xlink:href="#icon-pencil2"></use></svg></button>
|
45244
45287
|
</div>
|
45245
45288
|
<div id="divImageProgress">
|
45246
45289
|
<div>
|
@@ -46402,28 +46445,33 @@ class Image$1 {
|
|
46402
46445
|
if (this.builder.moveable) this.builder.moveable.updateRect();
|
46403
46446
|
const movControlBox = document.querySelector('.moveable-control-box');
|
46404
46447
|
if (movControlBox && !this.builder.hideImageResizer) movControlBox.style.display = 'block';
|
46405
|
-
|
46406
|
-
|
46407
|
-
|
46408
|
-
|
46409
|
-
|
46410
|
-
|
46411
|
-
|
46412
|
-
|
46413
|
-
|
46414
|
-
|
46415
|
-
|
46448
|
+
|
46449
|
+
/*
|
46450
|
+
const handleImageToolClickOut = e =>{
|
46451
|
+
let elm = e.target;
|
46452
|
+
if(!elm) return;
|
46453
|
+
if(!elm.closest('#divImageResizer') && !elm.closest('#divImageTool') &&
|
46454
|
+
!elm.closest('.is-modal') && !elm.closest('.keep-selection') &&
|
46455
|
+
!elm.closest('.sl-wrapper') && !elm.closest('.sl-overlay') && !elm.closest('.sl-close') &&
|
46456
|
+
!elm.closest('img')) { // click outside
|
46457
|
+
|
46458
|
+
// hide
|
46459
|
+
this.hideImageTool();
|
46460
|
+
document.removeEventListener('click', handleImageToolClickOut);
|
46461
|
+
if(this.builder.iframeDocument) {
|
46462
|
+
this.builder.doc.removeEventListener('click', handleImageToolClickOut);
|
46463
|
+
}
|
46464
|
+
this.builder.handleImageToolClickOut_=false;
|
46416
46465
|
}
|
46417
|
-
this.builder.handleImageToolClickOut_ = false;
|
46418
|
-
}
|
46419
46466
|
};
|
46420
|
-
if
|
46421
|
-
|
46422
|
-
|
46423
|
-
|
46424
|
-
|
46425
|
-
|
46467
|
+
if(!this.builder.handleImageToolClickOut_) {
|
46468
|
+
document.addEventListener('click', handleImageToolClickOut);
|
46469
|
+
if(this.builder.iframeDocument) {
|
46470
|
+
this.builder.doc.addEventListener('click', handleImageToolClickOut);
|
46471
|
+
}
|
46472
|
+
this.builder.handleImageToolClickOut_=true;
|
46426
46473
|
}
|
46474
|
+
*/
|
46427
46475
|
} else {
|
46428
46476
|
let imageResizer = this.imageResizer;
|
46429
46477
|
imageResizer.style.display = 'none';
|
@@ -46437,6 +46485,28 @@ class Image$1 {
|
|
46437
46485
|
const movControlBox = document.querySelector('.moveable-control-box');
|
46438
46486
|
if (movControlBox) movControlBox.style.display = 'none';
|
46439
46487
|
}
|
46488
|
+
const handleImageToolClickOut = e => {
|
46489
|
+
let elm = e.target;
|
46490
|
+
if (!elm) return;
|
46491
|
+
if (!elm.closest('#divImageResizer') && !elm.closest('#divImageTool') && !elm.closest('.is-modal') && !elm.closest('.keep-selection') && !elm.closest('.sl-wrapper') && !elm.closest('.sl-overlay') && !elm.closest('.sl-close') && !elm.closest('img')) {
|
46492
|
+
// click outside
|
46493
|
+
|
46494
|
+
// hide
|
46495
|
+
this.hideImageTool();
|
46496
|
+
document.removeEventListener('click', handleImageToolClickOut);
|
46497
|
+
if (this.builder.iframeDocument) {
|
46498
|
+
this.builder.doc.removeEventListener('click', handleImageToolClickOut);
|
46499
|
+
}
|
46500
|
+
this.builder.handleImageToolClickOut_ = false;
|
46501
|
+
}
|
46502
|
+
};
|
46503
|
+
if (!this.builder.handleImageToolClickOut_) {
|
46504
|
+
document.addEventListener('click', handleImageToolClickOut);
|
46505
|
+
if (this.builder.iframeDocument) {
|
46506
|
+
this.builder.doc.addEventListener('click', handleImageToolClickOut);
|
46507
|
+
}
|
46508
|
+
this.builder.handleImageToolClickOut_ = true;
|
46509
|
+
}
|
46440
46510
|
if (this.builder.canvas) ; else {
|
46441
46511
|
let prog = false;
|
46442
46512
|
if (e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0) ; else {
|
@@ -48553,10 +48623,18 @@ class Hyperlink {
|
|
48553
48623
|
let linkTool = builderStuff.querySelector('#divLinkTool');
|
48554
48624
|
if (!linkTool) {
|
48555
48625
|
let html = `<div id="divLinkTool" class="is-tool">
|
48556
|
-
|
48557
|
-
|
48558
|
-
|
48559
|
-
<button title="${util.out('
|
48626
|
+
<button title="${util.out('Edit Button')}" data-title="${util.out('Edit Button')}" class="link-button-edit" style="display:none;">
|
48627
|
+
<svg class="is-icon-flex" style="width:17px;height:17px;"><use xlink:href="#icon-pencil2"></use></svg>
|
48628
|
+
</button>
|
48629
|
+
<button title="${util.out('Link')}" data-title="${util.out('Link')}" class="link-edit">
|
48630
|
+
<svg class="is-icon-flex" style="width:17px;height:17px;transform:rotate(45deg)"><use xlink:href="#icon-link2"></use></svg>
|
48631
|
+
</button>
|
48632
|
+
<button title="${util.out('Duplicate')}" data-title="${util.out('Duplicate')}" class="link-duplicate">
|
48633
|
+
<svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#icon-duplicate3"></use></svg>
|
48634
|
+
</button>
|
48635
|
+
<button title="${util.out('Delete')}" data-title="${util.out('Delete')}" class="link-remove">
|
48636
|
+
<svg class="is-icon-flex" style="width:17px;height:17px;"><use xlink:href="#icon-trash2"></use></svg>
|
48637
|
+
</button>
|
48560
48638
|
</div>
|
48561
48639
|
`;
|
48562
48640
|
dom.appendHtml(builderStuff, html);
|
@@ -49148,9 +49226,15 @@ class Button {
|
|
49148
49226
|
let buttonTool = builderStuff.querySelector('#divButtonTool');
|
49149
49227
|
if (!buttonTool) {
|
49150
49228
|
let html = `<div id="divButtonTool" class="is-tool">
|
49151
|
-
<button title="${util.out('Edit Button')}" data-title="${util.out('Edit Button')}" class="button-edit"
|
49152
|
-
|
49153
|
-
|
49229
|
+
<button title="${util.out('Edit Button')}" data-title="${util.out('Edit Button')}" class="button-edit">
|
49230
|
+
<svg class="is-icon-flex" style="width:17px;height:17px;"><use xlink:href="#icon-pencil2"></use></svg>
|
49231
|
+
</button>
|
49232
|
+
<button title="${util.out('Duplicate')}" data-title="${util.out('Duplicate')}" class="button-duplicate">
|
49233
|
+
<svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#icon-duplicate3"></use></svg>
|
49234
|
+
</button>
|
49235
|
+
<button title="${util.out('Delete')}" data-title="${util.out('Delete')}" class="button-remove">
|
49236
|
+
<svg class="is-icon-flex" style="width:17px;height:17px;"><use xlink:href="#icon-trash2"></use></svg>
|
49237
|
+
</button>
|
49154
49238
|
</div>
|
49155
49239
|
`;
|
49156
49240
|
dom.appendHtml(builderStuff, html);
|
@@ -49282,8 +49366,8 @@ class Spacer {
|
|
49282
49366
|
if (!spacerTool) {
|
49283
49367
|
let html = `
|
49284
49368
|
<div id="divSpacerTool" class="is-tool is-spacer-tool">
|
49285
|
-
<button title="${util.out('Decrease')}" data-value="-"><svg class="is-icon-flex"><use xlink:href="#
|
49286
|
-
<button title="${util.out('Increase')}" data-value="+" style="border-left: none;"><svg class="is-icon-flex"><use xlink:href="#
|
49369
|
+
<button title="${util.out('Decrease')}" data-value="-"><svg class="is-icon-flex"><use xlink:href="#icon-minus2"></use></svg></button>
|
49370
|
+
<button title="${util.out('Increase')}" data-value="+" style="border-left: none;"><svg class="is-icon-flex"><use xlink:href="#icon-plus"></use></svg></button>
|
49287
49371
|
</div>
|
49288
49372
|
`;
|
49289
49373
|
dom.appendHtml(builderStuff, html);
|
@@ -49443,7 +49527,7 @@ class Module {
|
|
49443
49527
|
let html = `
|
49444
49528
|
<div class="is-tool is-module-tool">
|
49445
49529
|
<button class="btn-module-refresh" title="${util.out('Refresh')}" data-title="${util.out('Refresh')}" style="width:40px;height:40px;"><svg class="is-icon-flex"><use xlink:href="#icon-reload"></use></svg></button>
|
49446
|
-
<button class="btn-module-settings" title="${util.out('Settings')}" data-title="${util.out('Settings')}" style="width:40px;height:40px;"><svg class="is-icon-flex"><use xlink:href="#
|
49530
|
+
<button class="btn-module-settings" title="${util.out('Settings')}" data-title="${util.out('Settings')}" style="width:40px;height:40px;"><svg class="is-icon-flex"><use xlink:href="#icon-cog"></use></svg></button>
|
49447
49531
|
</div>
|
49448
49532
|
`;
|
49449
49533
|
dom.appendHtml(builderStuff, html);
|
@@ -49693,7 +49777,7 @@ class Code {
|
|
49693
49777
|
if (!codeTool) {
|
49694
49778
|
let html = `
|
49695
49779
|
<div class="is-tool is-code-tool">
|
49696
|
-
<button title="${util.out('Settings')}" data-title="${util.out('Settings')}"
|
49780
|
+
<button title="${util.out('Settings')}" data-title="${util.out('Settings')}"><svg class="is-icon-flex"><use xlink:href="#icon-cog"></use></svg></button>
|
49697
49781
|
</div>
|
49698
49782
|
`;
|
49699
49783
|
dom.appendHtml(builderStuff, html);
|
@@ -49821,7 +49905,7 @@ class Iframe {
|
|
49821
49905
|
if (!iframeTool) {
|
49822
49906
|
let html = `
|
49823
49907
|
<div class="is-tool is-iframe-tool">
|
49824
|
-
<button title="${util.out('Settings')}" data-title="${util.out('Settings')}" style="width:40px;height:40px;background:none;"><svg class="is-icon-flex"><use xlink:href="#
|
49908
|
+
<button title="${util.out('Settings')}" data-title="${util.out('Settings')}" style="width:40px;height:40px;background:none;"><svg class="is-icon-flex"><use xlink:href="#icon-cog"></use></svg></button>
|
49825
49909
|
</div>
|
49826
49910
|
`;
|
49827
49911
|
dom.appendHtml(builderStuff, html);
|
@@ -49981,7 +50065,7 @@ class Table {
|
|
49981
50065
|
//<div class="is-modal-bar is-draggable" style="background:#f9f9f9;"></div>
|
49982
50066
|
let html = `
|
49983
50067
|
<div class="is-tool is-table-tool">
|
49984
|
-
<button title="${util.out('Settings')}" style="width:
|
50068
|
+
<button title="${util.out('Settings')}" style="width:35px;height:35px;"><svg class="is-icon-flex" style="width:17px;height:17px;"><use xlink:href="#icon-cog"></use></svg></button>
|
49985
50069
|
</div>
|
49986
50070
|
`;
|
49987
50071
|
dom.appendHtml(builderStuff, html);
|
@@ -50539,7 +50623,7 @@ class Video {
|
|
50539
50623
|
if (!videoTool) {
|
50540
50624
|
let html = `
|
50541
50625
|
<div class="is-tool is-video-tool">
|
50542
|
-
<button title="${util.out('Settings')}" data-title="${util.out('Settings')}" style="width:40px;height:40px;background:none;"><svg class="is-icon-flex"><use xlink:href="#
|
50626
|
+
<button title="${util.out('Settings')}" data-title="${util.out('Settings')}" style="width:40px;height:40px;background:none;"><svg class="is-icon-flex"><use xlink:href="#icon-cog"></use></svg></button>
|
50543
50627
|
</div>
|
50544
50628
|
`;
|
50545
50629
|
dom.appendHtml(builderStuff, html);
|
@@ -50796,7 +50880,7 @@ class Audio {
|
|
50796
50880
|
if (!audioTool) {
|
50797
50881
|
let html = `
|
50798
50882
|
<div class="is-tool is-audio-tool">
|
50799
|
-
<button title="${util.out('Settings')}" data-title="${util.out('Settings')}" style="
|
50883
|
+
<button title="${util.out('Settings')}" data-title="${util.out('Settings')}" style="background:none;"><svg class="is-icon-flex"><use xlink:href="#icon-cog"></use></svg></button>
|
50800
50884
|
</div>
|
50801
50885
|
`;
|
50802
50886
|
dom.appendHtml(builderStuff, html);
|
@@ -50989,7 +51073,7 @@ class Svg {
|
|
50989
51073
|
if (!svgTool) {
|
50990
51074
|
let html = `
|
50991
51075
|
<div class="is-tool is-svg-tool">
|
50992
|
-
<button class="btn-svg-settings" title="${util.out('Settings')}" data-title="${util.out('Settings')}"><svg class="is-icon-flex"><use xlink:href="#
|
51076
|
+
<button class="btn-svg-settings" title="${util.out('Settings')}" data-title="${util.out('Settings')}"><svg class="is-icon-flex"><use xlink:href="#icon-cog"></use></svg></button>
|
50993
51077
|
</div>
|
50994
51078
|
`;
|
50995
51079
|
dom.appendHtml(builderStuff, html);
|
@@ -51362,16 +51446,22 @@ class RowTool {
|
|
51362
51446
|
const builderStuff = this.builder.builderStuff;
|
51363
51447
|
let rowtool = row.querySelector('.is-row-tool');
|
51364
51448
|
if (!rowtool) {
|
51365
|
-
let html = `<div class="is-tool is-row-tool">
|
51366
|
-
<div title="${util.out('Move')}" role="button" tabindex="-1" class="row-handle" style="width:100%;cursor:move;text-align:center;"><svg class="is-icon-flex"><use xlink:href="#ion-move"></use></svg></div>
|
51367
|
-
<button type="button" tabindex="-1" title="${util.out('More')}" class="row-more"><svg class="is-icon-flex"><use xlink:href="#
|
51449
|
+
let html = `<div class="is-tool is-row-tool" style="${!this.builder.rowTool && this.builder.rowTool !== '' ? 'display:none;' : ''}">
|
51450
|
+
<div title="${util.out('Move')}" role="button" tabindex="-1" class="row-handle" style="${this.builder.rowHandle ? '' : 'display:none;'}width:100%;cursor:move;text-align:center;"><svg class="is-icon-flex"><use xlink:href="#ion-move"></use></svg></div>
|
51451
|
+
<button type="button" tabindex="-1" title="${util.out('More')}" class="row-more"><svg class="is-icon-flex" style="color:#fff;width:15px;height:15px;"><use xlink:href="#icon-dots2"></use></svg></button>
|
51368
51452
|
<button type="button" tabindex="-1" title="${util.out('Grid Editor')}" class="row-grideditor"><svg class="is-icon-flex"><use xlink:href="#ion-grid"></use></svg></button>
|
51369
|
-
<button type="button" tabindex="-1" title="${util.out('Delete')}" class="row-remove"><svg class="is-icon-flex"><use xlink:href="#
|
51453
|
+
<button type="button" tabindex="-1" title="${util.out('Delete')}" class="row-remove"><svg class="is-icon-flex" style="color:#fff;width:15px;height:15px;"><use xlink:href="#icon-trash2"></use></svg></button>
|
51370
51454
|
</div>
|
51371
51455
|
<div class="is-tool is-col-tool">
|
51372
|
-
<button type="button" tabindex="-1" title="${util.out('Add')}" class="cell-add"
|
51373
|
-
|
51374
|
-
|
51456
|
+
<button type="button" tabindex="-1" title="${util.out('Add')}" class="cell-add">
|
51457
|
+
<svg class="is-icon-flex" style="color:#fff;width:15px;height:15px;"><use xlink:href="#icon-plus"></use></svg>
|
51458
|
+
</button>
|
51459
|
+
<button type="button" tabindex="-1" title="${util.out('More')}" class="cell-more">
|
51460
|
+
<svg class="is-icon-flex" style="color:#fff;width:15px;height:15px;"><use xlink:href="#icon-dots2"></use></svg>
|
51461
|
+
</button>
|
51462
|
+
<button type="button" tabindex="-1" title="${util.out('Delete')}" class="cell-remove">
|
51463
|
+
<svg class="is-icon-flex" style="color:#fff;width:15px;height:15px;"><use xlink:href="#icon-trash2"></use></svg>
|
51464
|
+
</button>
|
51375
51465
|
</div>
|
51376
51466
|
`;
|
51377
51467
|
dom.appendHtml(row, html);
|
@@ -51773,7 +51863,7 @@ class RowTool {
|
|
51773
51863
|
${htmlbutton}
|
51774
51864
|
<div class="is-separator"></div>
|
51775
51865
|
<button type="button" title="${util.out('Lock')}" class="row-locking"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-lock"></use></svg></span>${util.out('Lock')}</button>
|
51776
|
-
<button type="button" title="${util.out('Settings')}" class="row-settings"><span><svg class="is-icon-flex" style="width:
|
51866
|
+
<button type="button" title="${util.out('Settings')}" class="row-settings"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-cog"></use></svg></span>${util.out('Settings')}</button>
|
51777
51867
|
</div>
|
51778
51868
|
</div>
|
51779
51869
|
`;
|
@@ -53258,17 +53348,7 @@ class ColumnTool {
|
|
53258
53348
|
${htmlbutton}
|
53259
53349
|
<div class="is-separator"></div>
|
53260
53350
|
<button type="button" title="${util.out('Lock')}" class="cell-locking"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-lock"></use></svg></span>${util.out('Lock')}</button>
|
53261
|
-
<button type="button" title="${util.out('Settings')}" class="cell-settings"><span><svg class="is-icon-flex" style="width:
|
53262
|
-
|
53263
|
-
<!--
|
53264
|
-
<button title="${util.out('Lock')}" class="cell-locking">
|
53265
|
-
<svg class="is-icon-flex"><use xlink:href="#icon-lock"></use></svg>
|
53266
|
-
</button>
|
53267
|
-
<button title="${util.out('Settings')}" class="cell-settings">
|
53268
|
-
<svg class="is-icon-flex"><use xlink:href="#ion-ios-gear"></use></svg>
|
53269
|
-
<span>${util.out('Settings')}</span>
|
53270
|
-
</button>
|
53271
|
-
-->
|
53351
|
+
<button type="button" title="${util.out('Settings')}" class="cell-settings"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-cog"></use></svg></span>${util.out('Settings')}</button>
|
53272
53352
|
</div>
|
53273
53353
|
</div>
|
53274
53354
|
`;
|
@@ -60249,18 +60329,27 @@ class ElementTool {
|
|
60249
60329
|
let elementMore = builderStuff.querySelector('.elmmore');
|
60250
60330
|
if (!elementTool) {
|
60251
60331
|
let html = `<div class="is-tool is-element-tool">
|
60252
|
-
<button type="button" tabindex="-1" title="${util.out('Add')}" class="elm-add"
|
60253
|
-
|
60254
|
-
|
60255
|
-
<button type="button" tabindex="-1" title="${util.out('
|
60332
|
+
<button type="button" tabindex="-1" title="${util.out('Add')}" class="elm-add">
|
60333
|
+
<svg class="is-icon-flex" style="width:14px;height:14px;color:#111"><use xlink:href="#icon-plus"></use></svg>
|
60334
|
+
</button>
|
60335
|
+
<button type="button" tabindex="-1" title="${util.out('More')}" class="elm-more">
|
60336
|
+
<svg class="is-icon-flex" style="width:17px;height:17px;color:#111"><use xlink:href="#icon-dots2"></use></svg>
|
60337
|
+
</button>
|
60338
|
+
<button type="button" tabindex="-1" title="${util.out('Delete')}" class="elm-remove">
|
60339
|
+
<svg class="is-icon-flex" style="width:15px;height:15px;color:#111"><use xlink:href="#icon-trash2"></use></svg>
|
60340
|
+
</button>
|
60341
|
+
<button type="button" tabindex="-1" title="${util.out('Settings')}" class="elm-settings">
|
60342
|
+
<svg class="is-icon-flex"><use xlink:href="#ion-ios-gear"></use></svg>
|
60343
|
+
</button>
|
60256
60344
|
</div>
|
60345
|
+
|
60257
60346
|
<div class="is-pop elmmore" style="z-index:10002;" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
|
60258
60347
|
<div style="display:flex;flex-flow:wrap;">
|
60259
60348
|
<button type="button" title="${util.out('Move Up')}" class="elm-up"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-up"></use></svg></span>${util.out('Move Up')}</button>
|
60260
60349
|
<button type="button" title="${util.out('Move Down')}" class="elm-down"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-down"></use></svg></span>${util.out('Move Down')}</button>
|
60261
60350
|
<button type="button" title="${util.out('Duplicate')}" class="elm-duplicate"><span><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-ios-photos-outline"></use></svg></span>${util.out('Duplicate')}</button>
|
60262
60351
|
${this.builder.opts.elementEditor ? `
|
60263
|
-
<button type="button" title="${util.out('Settings')}" class="elm-settings"><span><svg class="is-icon-flex" style="width:
|
60352
|
+
<button type="button" title="${util.out('Settings')}" class="elm-settings"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-cog"></use></svg></span>${util.out('Settings')}</button>
|
60264
60353
|
` : ''}
|
60265
60354
|
</div>
|
60266
60355
|
</div>
|
@@ -60311,7 +60400,7 @@ class ElementTool {
|
|
60311
60400
|
const w = quickadd.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
|
60312
60401
|
const h = quickadd.offsetHeight;
|
60313
60402
|
if (viewportHeight - top > h) {
|
60314
|
-
quickadd.style.top = top + window.pageYOffset +
|
60403
|
+
quickadd.style.top = top + window.pageYOffset + 42 + 'px';
|
60315
60404
|
quickadd.style.left = left - w / 2 + 10 + 'px';
|
60316
60405
|
dom.removeClass(quickadd, 'arrow-bottom');
|
60317
60406
|
dom.removeClass(quickadd, 'arrow-right');
|
@@ -60476,7 +60565,7 @@ class ElementTool {
|
|
60476
60565
|
const w = elementMore.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
|
60477
60566
|
const h = elementMore.offsetHeight;
|
60478
60567
|
if (viewportHeight - top > h) {
|
60479
|
-
elementMore.style.top = top + window.pageYOffset +
|
60568
|
+
elementMore.style.top = top + window.pageYOffset + 42 + 'px';
|
60480
60569
|
elementMore.style.left = left - w / 2 + 10 + 'px';
|
60481
60570
|
dom.removeClass(elementMore, 'arrow-bottom');
|
60482
60571
|
dom.removeClass(elementMore, 'arrow-right');
|
@@ -60772,6 +60861,9 @@ class ElementTool {
|
|
60772
60861
|
}
|
60773
60862
|
}
|
60774
60863
|
}
|
60864
|
+
if (activeElement && activeElement.classList.contains('ovl') && this.builder.activeIframe) {
|
60865
|
+
activeElement = this.builder.activeIframe.closest('.embed-responsive');
|
60866
|
+
}
|
60775
60867
|
this.builder.activeElement = activeElement;
|
60776
60868
|
if (activeElement) {
|
60777
60869
|
let elm = activeElement;
|
@@ -78367,54 +78459,83 @@ class ContentStuff {
|
|
78367
78459
|
constructor(builder) {
|
78368
78460
|
this.builder = builder;
|
78369
78461
|
const util = builder.util;
|
78370
|
-
const html =
|
78462
|
+
const html = `
|
78463
|
+
<!-- not used -->
|
78464
|
+
<div class="is-tool is-column-tool">
|
78371
78465
|
<button type="button" tabindex="-1" title="${util.out('Add')}" class="cell-add"><svg class="is-icon-flex"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>
|
78372
78466
|
<button type="button" tabindex="-1" title="${util.out('More')}" class="cell-more"><svg class="is-icon-flex"><use xlink:href="#ion-more"></use></svg></button>
|
78373
78467
|
<button type="button" tabindex="-1" title="${util.out('Delete')}" class="cell-remove"><svg class="is-icon-flex" style="margin-left:-1px"><use xlink:href="#ion-ios-close-empty"></use></svg></button>
|
78374
78468
|
</div>
|
78469
|
+
<!-- /not used -->
|
78470
|
+
|
78375
78471
|
<div class="is-tool is-element-tool">
|
78376
|
-
<button type="button" tabindex="-1" title="${util.out('Add')}" class="elm-add"
|
78377
|
-
|
78378
|
-
|
78379
|
-
<button type="button" tabindex="-1" title="${util.out('
|
78472
|
+
<button type="button" tabindex="-1" title="${util.out('Add')}" class="elm-add">
|
78473
|
+
<svg class="is-icon-flex" style="width:14px;height:14px;color:#111"><use xlink:href="#icon-plus"></use></svg>
|
78474
|
+
</button>
|
78475
|
+
<button type="button" tabindex="-1" title="${util.out('More')}" class="elm-more">
|
78476
|
+
<svg class="is-icon-flex" style="width:17px;height:17px;color:#111"><use xlink:href="#icon-dots2"></use></svg>
|
78477
|
+
</button>
|
78478
|
+
<button type="button" tabindex="-1" title="${util.out('Delete')}" class="elm-remove">
|
78479
|
+
<svg class="is-icon-flex" style="width:15px;height:15px;color:#111"><use xlink:href="#icon-trash2"></use></svg>
|
78480
|
+
</button>
|
78481
|
+
<button type="button" tabindex="-1" title="${util.out('Settings')}" class="elm-settings">
|
78482
|
+
<svg class="is-icon-flex"><use xlink:href="#ion-ios-gear"></use></svg>
|
78483
|
+
</button>
|
78380
78484
|
</div>
|
78381
78485
|
|
78382
78486
|
<div id="divButtonTool" class="is-tool">
|
78383
|
-
<button title="${util.out('Edit Button')}" data-title="${util.out('Edit Button')}" class="button-edit"
|
78384
|
-
|
78385
|
-
|
78487
|
+
<button title="${util.out('Edit Button')}" data-title="${util.out('Edit Button')}" class="button-edit">
|
78488
|
+
<svg class="is-icon-flex" style="width:17px;height:17px;color:#111"><use xlink:href="#icon-pencil2"></use></svg>
|
78489
|
+
</button>
|
78490
|
+
<button title="${util.out('Duplicate')}" data-title="${util.out('Duplicate')}" class="button-duplicate">
|
78491
|
+
<svg class="is-icon-flex" style="width:16px;height:16px;color:#111"><use xlink:href="#icon-duplicate3"></use></svg>
|
78492
|
+
</button>
|
78493
|
+
<button title="${util.out('Delete')}" data-title="${util.out('Delete')}" class="button-remove">
|
78494
|
+
<svg class="is-icon-flex" style="width:17px;height:17px;color:#111"><use xlink:href="#icon-trash2"></use></svg>
|
78495
|
+
</button>
|
78386
78496
|
</div>
|
78497
|
+
|
78387
78498
|
<div class="is-tool is-code-tool">
|
78388
|
-
<button title="${util.out('Settings')}" data-title="${util.out('Settings')}" style="width:
|
78499
|
+
<button title="${util.out('Settings')}" data-title="${util.out('Settings')}" style="width:35px;height:35px;"><svg class="is-icon-flex" style="width:17px;height:17px;color:#111"><use xlink:href="#icon-cog"></use></svg></button>
|
78389
78500
|
</div>
|
78501
|
+
|
78390
78502
|
<div id="divLinkTool" class="is-tool">
|
78391
|
-
|
78392
|
-
|
78393
|
-
|
78394
|
-
|
78503
|
+
<button title="${util.out('Edit Button')}" data-title="${util.out('Edit Button')}" class="link-button-edit" style="display:none;">
|
78504
|
+
<svg class="is-icon-flex" style="width:17px;height:17px;color:#111"><use xlink:href="#icon-pencil2"></use></svg>
|
78505
|
+
</button>
|
78506
|
+
<button title="${util.out('Link')}" data-title="${util.out('Link')}" class="link-edit">
|
78507
|
+
<svg class="is-icon-flex" style="width:17px;height:17px;color:#111;transform:rotate(45deg)"><use xlink:href="#icon-link2"></use></svg>
|
78508
|
+
</button>
|
78509
|
+
<button title="${util.out('Duplicate')}" data-title="${util.out('Duplicate')}" class="link-duplicate">
|
78510
|
+
<svg class="is-icon-flex" style="width:16px;height:16px;color:#111"><use xlink:href="#icon-duplicate3"></use></svg>
|
78511
|
+
</button>
|
78512
|
+
<button title="${util.out('Delete')}" data-title="${util.out('Delete')}" class="link-remove">
|
78513
|
+
<svg class="is-icon-flex" style="width:17px;height:17px;color:#111"><use xlink:href="#icon-trash2"></use></svg>
|
78514
|
+
</button>
|
78395
78515
|
</div>
|
78516
|
+
|
78396
78517
|
<div class="is-tool is-iframe-tool">
|
78397
|
-
<button title="${util.out('Settings')}" data-title="${util.out('Settings')}" style="width:40px;height:40px;background:none;"><svg class="is-icon-flex"><use xlink:href="#
|
78518
|
+
<button title="${util.out('Settings')}" data-title="${util.out('Settings')}" style="width:40px;height:40px;background:none;"><svg class="is-icon-flex"><use xlink:href="#icon-cog"></use></svg></button>
|
78398
78519
|
</div>
|
78399
78520
|
<div class="is-tool is-module-tool">
|
78400
|
-
|
78401
|
-
|
78521
|
+
<button class="btn-module-refresh" title="${util.out('Refresh')}" data-title="${util.out('Refresh')}" style="width:40px;height:40px;"><svg class="is-icon-flex"><use xlink:href="#icon-reload"></use></svg></button>
|
78522
|
+
<button class="btn-module-settings" title="${util.out('Settings')}" data-title="${util.out('Settings')}" style="width:40px;height:40px;"><svg class="is-icon-flex"><use xlink:href="#icon-cog"></use></svg></button>
|
78402
78523
|
</div>
|
78403
78524
|
<div class="is-tool is-svg-tool">
|
78404
|
-
<button class="btn-svg-settings" title="${util.out('Settings')}" data-title="${util.out('Settings')}"><svg class="is-icon-flex"><use xlink:href="#
|
78525
|
+
<button class="btn-svg-settings" title="${util.out('Settings')}" data-title="${util.out('Settings')}"><svg class="is-icon-flex"><use xlink:href="#icon-cog"></use></svg></button>
|
78405
78526
|
</div>
|
78406
78527
|
<div id="divSpacerTool" class="is-tool is-spacer-tool">
|
78407
|
-
<button title="${util.out('Decrease')}" data-value="-"><svg class="is-icon-flex"><use xlink:href="#
|
78408
|
-
<button title="${util.out('Increase')}" data-value="+" style="border-left: none;"><svg class="is-icon-flex"><use xlink:href="#
|
78528
|
+
<button title="${util.out('Decrease')}" data-value="-"><svg class="is-icon-flex"><use xlink:href="#icon-minus2"></use></svg></button>
|
78529
|
+
<button title="${util.out('Increase')}" data-value="+" style="border-left: none;"><svg class="is-icon-flex"><use xlink:href="#icon-plus"></use></svg></button>
|
78409
78530
|
</div>
|
78410
78531
|
<div class="is-tool is-table-tool">
|
78411
|
-
<button title="${util.out('Settings')}" style="width:
|
78532
|
+
<button title="${util.out('Settings')}" style="width:35px;height:35px;"><svg class="is-icon-flex" style="width:17px;height:17px;"><use xlink:href="#icon-cog"></use></svg></button>
|
78412
78533
|
</div>
|
78413
78534
|
<div class="is-tool is-video-tool">
|
78414
|
-
<button title="${util.out('Settings')}" data-title="${util.out('Settings')}" style="width:40px;height:40px;background:none;"><svg class="is-icon-flex"><use xlink:href="#
|
78535
|
+
<button title="${util.out('Settings')}" data-title="${util.out('Settings')}" style="width:40px;height:40px;background:none;"><svg class="is-icon-flex"><use xlink:href="#icon-cog"></use></svg></button>
|
78415
78536
|
</div>
|
78416
78537
|
<div class="is-tool is-audio-tool">
|
78417
|
-
<button title="${util.out('Settings')}" data-title="${util.out('Settings')}" style="width:
|
78538
|
+
<button title="${util.out('Settings')}" data-title="${util.out('Settings')}" style="width:35px;height:35px;background:none;"><svg class="is-icon-flex" style="width:17px;height:17px;color:#111"><use xlink:href="#icon-cog"></use></svg></button>
|
78418
78539
|
</div>
|
78419
78540
|
|
78420
78541
|
<div class="is-locked-indicator">
|
@@ -78534,7 +78655,7 @@ class ContentStuff {
|
|
78534
78655
|
<symbol viewBox="0 0 512 512" id="ion-volume-medium">
|
78535
78656
|
<path d="M270 407.7V104.4L175.3 192H71v128h104.3zm56.3-52.1c20.5-27.8 32.8-62.3 32.8-99.6 0-37.4-12.3-71.8-32.8-99.6l-20.4 15.3c17.4 23.6 27.8 52.7 27.8 84.3 0 31.6-10.4 60.7-27.8 84.3l20.4 15.3zm66.5 46c30-40.7 48-91 48-145.6s-18-104.9-48-145.6l-20.4 15.3c26.9 36.4 43 81.4 43 130.3 0 48.9-16.1 93.8-43 130.3l20.4 15.3z"/>
|
78536
78657
|
</symbol>
|
78537
|
-
<symbol id="icon-folder2" viewBox="0 0 24 24" stroke-width="
|
78658
|
+
<symbol id="icon-folder2" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
78538
78659
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
78539
78660
|
<path d="M11 19h-6a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2.5"></path>
|
78540
78661
|
<path d="M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"></path>
|
@@ -78545,6 +78666,64 @@ class ContentStuff {
|
|
78545
78666
|
<path d="M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1.002 7.935 1.007 9.425 4.747"></path>
|
78546
78667
|
<path d="M20 4v5h-5"></path>
|
78547
78668
|
</symbol>
|
78669
|
+
|
78670
|
+
|
78671
|
+
<symbol id="icon-plus" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
78672
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
78673
|
+
<line x1="12" y1="5" x2="12" y2="19"></line>
|
78674
|
+
<line x1="5" y1="12" x2="19" y2="12"></line>
|
78675
|
+
</symbol>
|
78676
|
+
<symbol id="icon-plus2" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
78677
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
78678
|
+
<path d="M12 5l0 14"></path>
|
78679
|
+
<path d="M5 12l14 0"></path>
|
78680
|
+
</symbol>
|
78681
|
+
|
78682
|
+
<symbol id="icon-minus" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
78683
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
78684
|
+
<path d="M5 12l14 0"></path>
|
78685
|
+
</symbol>
|
78686
|
+
|
78687
|
+
<symbol id="icon-dots2" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
78688
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />
|
78689
|
+
</symbol>
|
78690
|
+
<symbol id="icon-close" viewBox="0 0 24 24" stroke-width="1.6" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
78691
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
78692
|
+
<path d="M18 6l-12 12"></path>
|
78693
|
+
<path d="M6 6l12 12"></path>
|
78694
|
+
</symbol>
|
78695
|
+
<symbol id="icon-trash2" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
78696
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
78697
|
+
<path d="M4 7l16 0"></path>
|
78698
|
+
<path d="M10 11l0 6"></path>
|
78699
|
+
<path d="M14 11l0 6"></path>
|
78700
|
+
<path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path>
|
78701
|
+
<path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>
|
78702
|
+
</symbol>
|
78703
|
+
<symbol id="icon-duplicate3" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
78704
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z" /><path d="M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1" />
|
78705
|
+
</symbol>
|
78706
|
+
<symbol id="icon-pencil2" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
78707
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
78708
|
+
<path d="M4 20h4l10.5 -10.5a1.5 1.5 0 0 0 -4 -4l-10.5 10.5v4"></path>
|
78709
|
+
<line x1="13.5" y1="6.5" x2="17.5" y2="10.5"></line>
|
78710
|
+
</symbol>
|
78711
|
+
<symbol id="icon-link2" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
78712
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
78713
|
+
<path d="M9 15l6 -6"></path>
|
78714
|
+
<path d="M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"></path>
|
78715
|
+
<path d="M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"></path>
|
78716
|
+
</symbol>
|
78717
|
+
<symbol id="icon-cog" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
78718
|
+
<path d="M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z" /><path d="M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" />
|
78719
|
+
</symbol>
|
78720
|
+
<symbol id="icon-photo" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
78721
|
+
<path d="M15 8h.01" /><path d="M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z" /><path d="M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5" /><path d="M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3" />
|
78722
|
+
</symbol>
|
78723
|
+
<symbol id="icon-minus2" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
78724
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
78725
|
+
<path d="M5 12l14 0"></path>
|
78726
|
+
</symbol>
|
78548
78727
|
</defs>
|
78549
78728
|
</svg>
|
78550
78729
|
|
@@ -78738,6 +78917,9 @@ class ContentStuff {
|
|
78738
78917
|
}
|
78739
78918
|
|
78740
78919
|
/* Tool */
|
78920
|
+
|
78921
|
+
|
78922
|
+
/*
|
78741
78923
|
.is-tool.is-video-tool,
|
78742
78924
|
.is-tool.is-audio-tool,
|
78743
78925
|
.is-tool.is-iframe-tool {
|
@@ -78797,6 +78979,111 @@ class ContentStuff {
|
|
78797
78979
|
.is-tool.is-table-tool:hover {
|
78798
78980
|
z-index:10001 !important
|
78799
78981
|
}
|
78982
|
+
*/
|
78983
|
+
|
78984
|
+
|
78985
|
+
.is-tool.is-video-tool,
|
78986
|
+
.is-tool.is-audio-tool,
|
78987
|
+
.is-tool.is-iframe-tool {
|
78988
|
+
background: rgba(255, 255, 255, 0.97) !important;
|
78989
|
+
border: transparent 1px solid;
|
78990
|
+
box-shadow: -1px 5px 8px 0px rgba(0, 0, 0, 0.08);
|
78991
|
+
border-radius: 20px;
|
78992
|
+
}
|
78993
|
+
|
78994
|
+
.is-tool.is-video-tool > div,
|
78995
|
+
.is-tool.is-video-tool > button,
|
78996
|
+
.is-tool.is-audio-tool > div,
|
78997
|
+
.is-tool.is-audio-tool > button,
|
78998
|
+
.is-tool.is-iframe-tool > div,
|
78999
|
+
.is-tool.is-iframe-tool > button {
|
79000
|
+
width: 35px !important;
|
79001
|
+
height: 35px !important;
|
79002
|
+
background: transparent;
|
79003
|
+
}
|
79004
|
+
|
79005
|
+
.is-tool.is-video-tool svg,
|
79006
|
+
.is-tool.is-audio-tool svg,
|
79007
|
+
.is-tool.is-iframe-tool svg {
|
79008
|
+
width: 17px;
|
79009
|
+
height: 17px;
|
79010
|
+
fill: #111 !important;
|
79011
|
+
color: #111 !important;
|
79012
|
+
}
|
79013
|
+
|
79014
|
+
.is-tool.is-spacer-tool {
|
79015
|
+
border: none;
|
79016
|
+
box-shadow: -1px 5px 8px 0px rgba(0, 0, 0, 0.08);
|
79017
|
+
border-radius: 20px;
|
79018
|
+
overflow: hidden;
|
79019
|
+
}
|
79020
|
+
.is-tool.is-spacer-tool > button {
|
79021
|
+
width: 40px;
|
79022
|
+
height: 35px;
|
79023
|
+
background: rgba(255, 255, 255, 0.97) !important;
|
79024
|
+
}
|
79025
|
+
.is-tool.is-spacer-tool > button svg {
|
79026
|
+
fill: #111 !important;
|
79027
|
+
color: #111 !important;
|
79028
|
+
}
|
79029
|
+
.is-tool.is-table-tool {
|
79030
|
+
border: none;
|
79031
|
+
background: none;
|
79032
|
+
border-radius: 20px;
|
79033
|
+
box-shadow: -1px 5px 8px 0px rgba(0, 0, 0, 0.08);
|
79034
|
+
}
|
79035
|
+
.is-tool.is-table-tool:hover {
|
79036
|
+
z-index: 10001 !important;
|
79037
|
+
}
|
79038
|
+
.is-tool.is-table-tool > button {
|
79039
|
+
width: 35px;
|
79040
|
+
height: 35px;
|
79041
|
+
background: rgba(255, 255, 255, 0.9) !important;
|
79042
|
+
}
|
79043
|
+
.is-tool.is-table-tool > button svg {
|
79044
|
+
width: 17px !important;
|
79045
|
+
height: 17px !important;
|
79046
|
+
fill: #111 !important;
|
79047
|
+
color: #111 !important;
|
79048
|
+
}
|
79049
|
+
.is-tool.is-code-tool, .is-tool.is-module-tool, .is-tool.is-svg-tool {
|
79050
|
+
border: none;
|
79051
|
+
background: none;
|
79052
|
+
border-radius: 20px;
|
79053
|
+
box-shadow: -1px 5px 8px 0px rgba(0, 0, 0, 0.08);
|
79054
|
+
overflow: hidden;
|
79055
|
+
}
|
79056
|
+
.is-tool.is-code-tool > button, .is-tool.is-module-tool > button, .is-tool.is-svg-tool > button {
|
79057
|
+
width: 35px;
|
79058
|
+
height: 35px;
|
79059
|
+
background: rgba(255, 255, 255, 0.9) !important;
|
79060
|
+
}
|
79061
|
+
.is-tool.is-code-tool > button svg, .is-tool.is-module-tool > button svg, .is-tool.is-svg-tool > button svg {
|
79062
|
+
width: 17px !important;
|
79063
|
+
height: 17px !important;
|
79064
|
+
fill: #111 !important;
|
79065
|
+
color: #111 !important;
|
79066
|
+
}
|
79067
|
+
.is-tool#divLinkTool, .is-tool#divButtonTool {
|
79068
|
+
background: rgba(255, 255, 255, 0.95) !important;
|
79069
|
+
box-shadow: none;
|
79070
|
+
border-radius: 20px;
|
79071
|
+
overflow: hidden;
|
79072
|
+
box-shadow: -1px 5px 8px 0px rgba(0, 0, 0, 0.08);
|
79073
|
+
margin-top: -10px;
|
79074
|
+
margin-left: 7px;
|
79075
|
+
}
|
79076
|
+
.is-tool#divLinkTool button, .is-tool#divButtonTool button {
|
79077
|
+
width: 37px;
|
79078
|
+
height: 37px;
|
79079
|
+
background: transparent !important;
|
79080
|
+
}
|
79081
|
+
.is-tool#divLinkTool button svg, .is-tool#divButtonTool button svg {
|
79082
|
+
fill: #111 !important;
|
79083
|
+
color: #111 !important;
|
79084
|
+
}
|
79085
|
+
|
79086
|
+
|
78800
79087
|
|
78801
79088
|
|
78802
79089
|
.dot {
|
@@ -78890,19 +79177,25 @@ class ContentStuff {
|
|
78890
79177
|
/* is-element-tool */
|
78891
79178
|
|
78892
79179
|
.is-tool.is-element-tool {
|
78893
|
-
background: rgba(243, 243, 243, 0.9);
|
78894
79180
|
border-radius: 3px;
|
78895
79181
|
overflow: hidden;
|
79182
|
+
margin-top: 10px;
|
79183
|
+
margin-left: 0px;
|
79184
|
+
border-radius: 100px;
|
79185
|
+
box-shadow: -1px 5px 8px 0px rgba(0, 0, 0, 0.08);
|
79186
|
+
background-color: rgba(255, 255, 255, 0.97) !important;
|
78896
79187
|
}
|
78897
79188
|
.is-tool.is-element-tool button {
|
78898
|
-
width:
|
78899
|
-
height:
|
79189
|
+
width: 32px;
|
79190
|
+
height: 31px;
|
78900
79191
|
background: transparent;
|
79192
|
+
color: #111;
|
78901
79193
|
}
|
78902
79194
|
.is-tool.is-element-tool svg {
|
78903
79195
|
width: 14px;
|
78904
79196
|
height: 14px;
|
78905
|
-
fill: #111;
|
79197
|
+
fill: #111 !important;
|
79198
|
+
color: #111 !important;
|
78906
79199
|
}
|
78907
79200
|
.is-tool.is-element-tool .elm-more svg {
|
78908
79201
|
width: 11px;
|
@@ -78974,8 +79267,8 @@ class ContentStuff {
|
|
78974
79267
|
}
|
78975
79268
|
|
78976
79269
|
.is-tool.is-row-tool button {
|
78977
|
-
width:
|
78978
|
-
height:
|
79270
|
+
width: 28px;
|
79271
|
+
height: 28px;
|
78979
79272
|
display: flex;
|
78980
79273
|
justify-content: center;
|
78981
79274
|
align-items: center;
|
@@ -79107,10 +79400,11 @@ class ContentStuff {
|
|
79107
79400
|
box-shadow: none;
|
79108
79401
|
border-radius: 2px;
|
79109
79402
|
overflow: hidden;
|
79403
|
+
top: -3px !important;
|
79110
79404
|
}
|
79111
79405
|
.is-tool.is-col-tool button {
|
79112
|
-
width:
|
79113
|
-
height:
|
79406
|
+
width: 28px;
|
79407
|
+
height: 28px;
|
79114
79408
|
display: flex;
|
79115
79409
|
justify-content: center;
|
79116
79410
|
align-items: center;
|
@@ -79133,6 +79427,9 @@ class ContentStuff {
|
|
79133
79427
|
width: 14px;
|
79134
79428
|
height: 14px;
|
79135
79429
|
}
|
79430
|
+
.is-tool.is-col-tool svg * { /* prevent override by .is-dark-text * */
|
79431
|
+
color: #fff;
|
79432
|
+
}
|
79136
79433
|
|
79137
79434
|
|
79138
79435
|
.is-builder[gray] .is-tool.is-col-tool {
|
@@ -79246,6 +79543,9 @@ class ContentStuff {
|
|
79246
79543
|
width: 19px;
|
79247
79544
|
height: 19px;
|
79248
79545
|
}
|
79546
|
+
.is-tool.is-row-tool svg * { /* prevent override by .is-dark-text * */
|
79547
|
+
color: #fff;
|
79548
|
+
}
|
79249
79549
|
|
79250
79550
|
|
79251
79551
|
|
@@ -82112,8 +82412,6 @@ Important: Do not change the 'div.is-container' element!
|
|
82112
82412
|
}
|
82113
82413
|
}
|
82114
82414
|
|
82115
|
-
// import RecordRTC from 'recordrtc';
|
82116
|
-
// import Recorder from 'opus-recorder'; // Using Recorder
|
82117
82415
|
const dom = new Dom();
|
82118
82416
|
class Dictation {
|
82119
82417
|
constructor(opts = {}, builder) {
|
@@ -82461,6 +82759,9 @@ class Dictation {
|
|
82461
82759
|
dom.appendHtml(builderStuff, html);
|
82462
82760
|
const modalCommand = builderStuff.querySelector('.page-command');
|
82463
82761
|
this.modalCommand = modalCommand;
|
82762
|
+
new Draggable$2({
|
82763
|
+
selector: '.is-modal.page-command .is-draggable'
|
82764
|
+
});
|
82464
82765
|
const modalCommandList = builderStuff.querySelector('.commandlist');
|
82465
82766
|
this.modalCommandList = modalCommandList;
|
82466
82767
|
const modalConfig = builderStuff.querySelector('.commandconfig');
|
@@ -88942,6 +89243,8 @@ class Editable {
|
|
88942
89243
|
this.handleEditStart = this.handleEditStart.bind(this);
|
88943
89244
|
this.handleMouseClick = this.handleMouseClick.bind(this);
|
88944
89245
|
this.handleTouchStart = this.handleTouchStart.bind(this);
|
89246
|
+
this.handleMouseDown = this.handleMouseDown.bind(this);
|
89247
|
+
this.handleMouseUp = this.handleMouseUp.bind(this);
|
88945
89248
|
this.setup();
|
88946
89249
|
}
|
88947
89250
|
setup() {
|
@@ -88950,6 +89253,7 @@ class Editable {
|
|
88950
89253
|
element.addEventListener('touchstart', this.handleTouchStart, {
|
88951
89254
|
passive: false
|
88952
89255
|
});
|
89256
|
+
element.addEventListener('mousedown', this.handleMouseDown);
|
88953
89257
|
});
|
88954
89258
|
}
|
88955
89259
|
refresh() {
|
@@ -88957,23 +89261,49 @@ class Editable {
|
|
88957
89261
|
this.elements.forEach(element => {
|
88958
89262
|
element.removeEventListener('dblclick', this.handleEditStart);
|
88959
89263
|
element.removeEventListener('touchstart', this.handleTouchStart);
|
89264
|
+
element.removeEventListener('mousedown', this.handleMouseDown);
|
88960
89265
|
});
|
88961
89266
|
this.elements.forEach(element => {
|
88962
89267
|
element.addEventListener('dblclick', this.handleEditStart);
|
88963
89268
|
element.addEventListener('touchstart', this.handleTouchStart, {
|
88964
89269
|
passive: false
|
88965
89270
|
});
|
89271
|
+
element.addEventListener('mousedown', this.handleMouseDown);
|
88966
89272
|
});
|
88967
89273
|
}
|
89274
|
+
handleMouseDown(event) {
|
89275
|
+
const currentTarget = event.currentTarget;
|
89276
|
+
this.lastClickTime = false;
|
89277
|
+
if (!currentTarget.classList.contains('active')) return;
|
89278
|
+
if (currentTarget.classList.contains('editable')) return;
|
89279
|
+
currentTarget.addEventListener('mouseup', this.handleMouseUp);
|
89280
|
+
const now = new Date().getTime();
|
89281
|
+
this.lastClickTime = now;
|
89282
|
+
}
|
89283
|
+
handleMouseUp(event) {
|
89284
|
+
if (!this.lastClickTime) return;
|
89285
|
+
const currentTarget = event.currentTarget;
|
89286
|
+
currentTarget.removeEventListener('mouseup', this.handleMouseUp);
|
89287
|
+
const now = new Date().getTime();
|
89288
|
+
const lastClickTime = this.lastClickTime || now;
|
89289
|
+
const timeDiff = now - lastClickTime;
|
89290
|
+
if (timeDiff < 300 && timeDiff > 0) {
|
89291
|
+
// Less than 300ms since the last touch, enable editing
|
89292
|
+
this.handleEditStart(event);
|
89293
|
+
}
|
89294
|
+
this.lastClickTime = now;
|
89295
|
+
}
|
88968
89296
|
destroy(element) {
|
88969
89297
|
if (element) {
|
88970
89298
|
element.removeEventListener('dblclick', this.handleEditStart);
|
88971
89299
|
element.removeEventListener('touchstart', this.handleTouchStart);
|
89300
|
+
element.removeEventListener('mousedown', this.handleMouseDown);
|
88972
89301
|
} else {
|
88973
89302
|
this.elements = this.doc.querySelectorAll(this.selector);
|
88974
89303
|
this.elements.forEach(element => {
|
88975
89304
|
element.removeEventListener('dblclick', this.handleEditStart);
|
88976
89305
|
element.removeEventListener('touchstart', this.handleTouchStart);
|
89306
|
+
element.removeEventListener('mousedown', this.handleMouseDown);
|
88977
89307
|
});
|
88978
89308
|
}
|
88979
89309
|
}
|
@@ -89286,6 +89616,8 @@ class EditableBlocks {
|
|
89286
89616
|
target.style.zIndex = newZIndex;
|
89287
89617
|
}
|
89288
89618
|
selectStart(block) {
|
89619
|
+
if (block.classList.contains('editable')) return; // do not proceed if in editing mode
|
89620
|
+
|
89289
89621
|
if (block.classList.contains('is-shape')) return; // do not clone if block is shape
|
89290
89622
|
|
89291
89623
|
if (!this.clone) return;
|
@@ -91497,6 +91829,7 @@ class ContentBuilder {
|
|
91497
91829
|
outlineMode: '',
|
91498
91830
|
toolStyle: '',
|
91499
91831
|
outlineStyle: '',
|
91832
|
+
rowHandle: true,
|
91500
91833
|
snippetAddTool: true,
|
91501
91834
|
elementTool: true,
|
91502
91835
|
elementHighlight: true,
|
@@ -94270,7 +94603,118 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
94270
94603
|
// let outlineStyle = localStorage.getItem('_outlinestyle');
|
94271
94604
|
// this.preferences.setOutlineStyle(outlineStyle);
|
94272
94605
|
// }
|
94273
|
-
if (this.preferences) this.preferences.initBuilder(builder);
|
94606
|
+
if (this.preferences) this.preferences.initBuilder(builder);else {
|
94607
|
+
const setColumnTool = hidecolumntool => {
|
94608
|
+
const builders = this.doc.querySelectorAll(this.opts.container);
|
94609
|
+
if (hidecolumntool) {
|
94610
|
+
Array.prototype.forEach.call(builders, builder => {
|
94611
|
+
builder.setAttribute('hidecolumntool', '');
|
94612
|
+
});
|
94613
|
+
} else {
|
94614
|
+
Array.prototype.forEach.call(builders, builder => {
|
94615
|
+
builder.removeAttribute('hidecolumntool');
|
94616
|
+
});
|
94617
|
+
}
|
94618
|
+
};
|
94619
|
+
setColumnTool(!this.columnTool);
|
94620
|
+
const setElementTool = hideelementtool => {
|
94621
|
+
const builderStuff = this.builderStuff;
|
94622
|
+
if (hideelementtool) {
|
94623
|
+
builderStuff.setAttribute('hideelementtool', '');
|
94624
|
+
} else {
|
94625
|
+
builderStuff.removeAttribute('hideelementtool', '');
|
94626
|
+
}
|
94627
|
+
if (this.iframe) {
|
94628
|
+
const contentStuff = this.contentStuff;
|
94629
|
+
if (hideelementtool) {
|
94630
|
+
contentStuff.setAttribute('hideelementtool', '');
|
94631
|
+
} else {
|
94632
|
+
contentStuff.removeAttribute('hideelementtool', '');
|
94633
|
+
}
|
94634
|
+
}
|
94635
|
+
};
|
94636
|
+
setElementTool(!this.elementTool);
|
94637
|
+
const setOutline = hideoutline => {
|
94638
|
+
const builders = this.doc.querySelectorAll(this.opts.container);
|
94639
|
+
Array.prototype.forEach.call(builders, builder => {
|
94640
|
+
if (hideoutline) {
|
94641
|
+
builder.setAttribute('hideoutline', '');
|
94642
|
+
} else {
|
94643
|
+
builder.removeAttribute('hideoutline');
|
94644
|
+
}
|
94645
|
+
});
|
94646
|
+
};
|
94647
|
+
setOutline(!this.rowcolOutline);
|
94648
|
+
const setOutlineStyle = outlineStyle => {
|
94649
|
+
const builders = this.doc.querySelectorAll(this.opts.container);
|
94650
|
+
Array.prototype.forEach.call(builders, builder => {
|
94651
|
+
if (outlineStyle === 'grayoutline') {
|
94652
|
+
builder.setAttribute('grayoutline', '');
|
94653
|
+
} else {
|
94654
|
+
builder.removeAttribute('grayoutline');
|
94655
|
+
}
|
94656
|
+
});
|
94657
|
+
};
|
94658
|
+
setOutlineStyle(this.outlineStyle);
|
94659
|
+
const setElementHighlight = hideelementhighlight => {
|
94660
|
+
const builders = this.doc.querySelectorAll(this.opts.container);
|
94661
|
+
Array.prototype.forEach.call(builders, builder => {
|
94662
|
+
if (hideelementhighlight) {
|
94663
|
+
builder.setAttribute('hideelementhighlight', '');
|
94664
|
+
} else {
|
94665
|
+
builder.removeAttribute('hideelementhighlight', '');
|
94666
|
+
}
|
94667
|
+
});
|
94668
|
+
};
|
94669
|
+
setElementHighlight(!this.elementHighlight);
|
94670
|
+
const setToolStyle = toolStyle => {
|
94671
|
+
const builderStuff = this.builderStuff;
|
94672
|
+
if (toolStyle === 'gray') {
|
94673
|
+
builderStuff.setAttribute('gray', '');
|
94674
|
+
} else {
|
94675
|
+
builderStuff.removeAttribute('gray', '');
|
94676
|
+
}
|
94677
|
+
if (this.iframe) {
|
94678
|
+
const contentStuff = this.contentStuff;
|
94679
|
+
if (toolStyle === 'gray') {
|
94680
|
+
contentStuff.setAttribute('gray', '');
|
94681
|
+
} else {
|
94682
|
+
contentStuff.removeAttribute('gray', '');
|
94683
|
+
}
|
94684
|
+
}
|
94685
|
+
const builders = this.doc.querySelectorAll(this.opts.container);
|
94686
|
+
Array.prototype.forEach.call(builders, builder => {
|
94687
|
+
if (toolStyle === 'gray') {
|
94688
|
+
builder.setAttribute('gray', '');
|
94689
|
+
} else {
|
94690
|
+
builder.removeAttribute('gray');
|
94691
|
+
}
|
94692
|
+
});
|
94693
|
+
};
|
94694
|
+
setToolStyle(this.toolStyle);
|
94695
|
+
const setSnippetAddTool = hidesnippetaddtool => {
|
94696
|
+
const builders = this.doc.querySelectorAll(this.opts.container);
|
94697
|
+
Array.prototype.forEach.call(builders, builder => {
|
94698
|
+
if (hidesnippetaddtool) {
|
94699
|
+
builder.setAttribute('hidesnippetaddtool', '');
|
94700
|
+
} else {
|
94701
|
+
builder.removeAttribute('hidesnippetaddtool', '');
|
94702
|
+
}
|
94703
|
+
});
|
94704
|
+
};
|
94705
|
+
setSnippetAddTool(!this.snippetAddTool);
|
94706
|
+
const setRowToolPosition = rowTool => {
|
94707
|
+
const builders = this.doc.querySelectorAll(this.opts.container);
|
94708
|
+
Array.prototype.forEach.call(builders, builder => {
|
94709
|
+
if (rowTool === 'right') {
|
94710
|
+
builder.removeAttribute('leftrowtool');
|
94711
|
+
} else {
|
94712
|
+
builder.setAttribute('leftrowtool', '');
|
94713
|
+
}
|
94714
|
+
});
|
94715
|
+
};
|
94716
|
+
setRowToolPosition(this.rowTool);
|
94717
|
+
}
|
94274
94718
|
|
94275
94719
|
// Apply behavior on each row
|
94276
94720
|
const rows = this.dom.elementChildren(builder);
|
@@ -96539,8 +96983,8 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
96539
96983
|
*/
|
96540
96984
|
src = this.viewFileUrl + '?url=' + src;
|
96541
96985
|
}
|
96542
|
-
const width = 768;
|
96543
|
-
const height = 512;
|
96986
|
+
const width = this.ai_width; //768;
|
96987
|
+
const height = this.ai_height; //512;
|
96544
96988
|
const img = new Image();
|
96545
96989
|
img.src = src;
|
96546
96990
|
img.crossOrigin = 'anonymous';
|
@@ -96572,6 +97016,47 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
96572
97016
|
callback(result.url);
|
96573
97017
|
};
|
96574
97018
|
}
|
97019
|
+
getOrientation(width, height) {
|
97020
|
+
const aspectRatio = width / height;
|
97021
|
+
const predefinedRatios = [{
|
97022
|
+
ratio: '1:1',
|
97023
|
+
value: 1 / 1
|
97024
|
+
}, {
|
97025
|
+
ratio: '4:5',
|
97026
|
+
value: 4 / 5
|
97027
|
+
}, {
|
97028
|
+
ratio: '2:3',
|
97029
|
+
value: 2 / 3
|
97030
|
+
}, {
|
97031
|
+
ratio: '9:16',
|
97032
|
+
value: 9 / 16
|
97033
|
+
}, {
|
97034
|
+
ratio: '4:7',
|
97035
|
+
value: 4 / 7
|
97036
|
+
}, {
|
97037
|
+
ratio: '5:4',
|
97038
|
+
value: 5 / 4
|
97039
|
+
}, {
|
97040
|
+
ratio: '3:2',
|
97041
|
+
value: 3 / 2
|
97042
|
+
}, {
|
97043
|
+
ratio: '16:9',
|
97044
|
+
value: 16 / 9
|
97045
|
+
}, {
|
97046
|
+
ratio: '7:4',
|
97047
|
+
value: 7 / 4
|
97048
|
+
}];
|
97049
|
+
let closestRatio = predefinedRatios[0].ratio;
|
97050
|
+
let smallestDifference = Math.abs(aspectRatio - predefinedRatios[0].value);
|
97051
|
+
for (let i = 1; i < predefinedRatios.length; i++) {
|
97052
|
+
const difference = Math.abs(aspectRatio - predefinedRatios[i].value);
|
97053
|
+
if (difference < smallestDifference) {
|
97054
|
+
smallestDifference = difference;
|
97055
|
+
closestRatio = predefinedRatios[i].ratio;
|
97056
|
+
}
|
97057
|
+
}
|
97058
|
+
return closestRatio;
|
97059
|
+
}
|
96575
97060
|
async generateImage(prompt, callback) {
|
96576
97061
|
this.controller = new AbortController(); // Create a new AbortController
|
96577
97062
|
this.signal = this.controller.signal; // Get a new signal object
|
@@ -96581,12 +97066,82 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
96581
97066
|
let steps = this.imageSteps || 25;
|
96582
97067
|
let guidance = this.imageGuidance || 7.5;
|
96583
97068
|
let scheduler = this.imageScheduler || 'dpmsolver++';
|
97069
|
+
let width = 768;
|
97070
|
+
let height = 512;
|
97071
|
+
if (this.activeImage) {
|
97072
|
+
// check selected image dimension
|
97073
|
+
const activeImage = this.activeImage;
|
97074
|
+
const w = activeImage.offsetWidth;
|
97075
|
+
const h = activeImage.offsetHeight;
|
97076
|
+
const ratio = this.getOrientation(w, h);
|
97077
|
+
if (model === 'flux-schnell') {
|
97078
|
+
if (ratio === '1:1') {
|
97079
|
+
width = 1024;
|
97080
|
+
height = 1024;
|
97081
|
+
} else if (ratio === '4:5') {
|
97082
|
+
width = 768;
|
97083
|
+
height = 960;
|
97084
|
+
} else if (ratio === '2:3') {
|
97085
|
+
width = 768;
|
97086
|
+
height = 1152;
|
97087
|
+
} else if (ratio === '9:16') {
|
97088
|
+
width = 720;
|
97089
|
+
height = 1280;
|
97090
|
+
} else if (ratio === '4:7') {
|
97091
|
+
width = 512;
|
97092
|
+
height = 896;
|
97093
|
+
} else if (ratio === '5:4') {
|
97094
|
+
width = 960;
|
97095
|
+
height = 768;
|
97096
|
+
} else if (ratio === '3:2') {
|
97097
|
+
width = 1152;
|
97098
|
+
height = 768;
|
97099
|
+
} else if (ratio === '16:9') {
|
97100
|
+
width = 1280;
|
97101
|
+
height = 720;
|
97102
|
+
} else if (ratio === '7:4') {
|
97103
|
+
width = 896;
|
97104
|
+
height = 512;
|
97105
|
+
}
|
97106
|
+
} else {
|
97107
|
+
if (ratio === '1:1') {
|
97108
|
+
width = 512;
|
97109
|
+
height = 512;
|
97110
|
+
} else if (ratio === '4:5') {
|
97111
|
+
width = 512;
|
97112
|
+
height = 640;
|
97113
|
+
} else if (ratio === '2:3') {
|
97114
|
+
width = 512;
|
97115
|
+
height = 768;
|
97116
|
+
} else if (ratio === '9:16') {
|
97117
|
+
width = 576;
|
97118
|
+
height = 1024;
|
97119
|
+
} else if (ratio === '4:7') {
|
97120
|
+
width = 512;
|
97121
|
+
height = 896;
|
97122
|
+
} else if (ratio === '5:4') {
|
97123
|
+
width = 640;
|
97124
|
+
height = 512;
|
97125
|
+
} else if (ratio === '3:2') {
|
97126
|
+
width = 768;
|
97127
|
+
height = 512;
|
97128
|
+
} else if (ratio === '16:9') {
|
97129
|
+
width = 1024;
|
97130
|
+
height = 576;
|
97131
|
+
} else if (ratio === '7:4') {
|
97132
|
+
width = 896;
|
97133
|
+
height = 512;
|
97134
|
+
}
|
97135
|
+
}
|
97136
|
+
}
|
97137
|
+
this.ai_width = width;
|
97138
|
+
this.ai_height = height;
|
96584
97139
|
const messages = {
|
96585
97140
|
model,
|
96586
97141
|
prompt: prompt,
|
96587
97142
|
negative_prompt,
|
96588
|
-
width:
|
96589
|
-
height:
|
97143
|
+
width: this.ai_width,
|
97144
|
+
height: this.ai_height,
|
96590
97145
|
steps,
|
96591
97146
|
guidance,
|
96592
97147
|
scheduler,
|
@@ -96612,10 +97167,15 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
96612
97167
|
return;
|
96613
97168
|
}
|
96614
97169
|
const imageUrl = result.url;
|
96615
|
-
if (this.
|
96616
|
-
|
96617
|
-
} else {
|
97170
|
+
if (this.activeImage) {
|
97171
|
+
// selectable image on content doesn't need tp be upscaled
|
96618
97172
|
callback(imageUrl);
|
97173
|
+
} else {
|
97174
|
+
if (this.imageAutoUpscale) {
|
97175
|
+
this.upscaleImage(imageUrl, callback);
|
97176
|
+
} else {
|
97177
|
+
callback(imageUrl);
|
97178
|
+
}
|
96619
97179
|
}
|
96620
97180
|
} catch (error) {
|
96621
97181
|
if (error.name === 'AbortError') ; else {
|