@innovastudio/contentbox 1.5.8 → 1.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -4042,15 +4042,20 @@ class EditSection {
|
|
4042
4042
|
</div>
|
4043
4043
|
` + '<div id="divSectionGeneral" class="is-tab-content active" data-group="sectionsettings" style="display:flex;padding-top:0">' + '<div style="display:flex;flex-direction:column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Move Section') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Move Up') + '" class="cmd-section-up" style="">↑</button>' + '<button title="' + out('Move Down') + '" class="cmd-section-down">↓</button>' + '<button title="' + out('Move to Top') + '" class="cmd-section-top"><span style="transform:rotate(90deg);position:absolute;top:13px;left:15px;">⇤</span></button>' + '<button title="' + out('Move to Bottom') + '" class="cmd-section-bottom"><span style="transform:rotate(90deg);position:absolute;top:13px;left:15px;">⇥</span></button>' + '<button title="' + out('Duplicate') + '" class="cmd-section-duplicate" style="margin-left:20px;"><svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#ion-ios-copy-outline"></use></svg></button>' + '</div>' + '</div>';
|
4044
4044
|
html += '<div style="display:flex;flex-direction:column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Height') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Auto') + '" class="cmd-section-height" data-value="0">' + out('Auto') + '</button>' + '<button title="20%" class="cmd-section-height" data-value="20">20%</button>' + '<button title="25%" class="cmd-section-height" data-value="25">25%</button>' + '<button title="30%" class="cmd-section-height" data-value="30">30%</button>' + '<button title="40%" class="cmd-section-height" data-value="40">40%</button>' + '<button title="50%" class="cmd-section-height" data-value="50">50%</button>' + '</div>' + '<div style="display:flex">' + '<button title="60%" class="cmd-section-height" data-value="60" style="border-left:none;border-top:none;">60%</button>' + '<button title="70%" class="cmd-section-height" data-value="70" style="border-left:none;border-top:none;">70%</button>' + '<button title="75%" class="cmd-section-height" data-value="75" style="border-left:none;border-top:none;">75%</button>' + '<button title="80%" class="cmd-section-height" data-value="80" style="border-left:none;border-top:none;">80%</button>' + '<button title="90%" class="cmd-section-height" data-value="90" style="border-left:none;border-top:none;">90%</button>' + '<button title="100%" class="cmd-section-height" data-value="100" style="border-left:none;border-top:none;">100%</button>' + '</div>' + '</div>' + '<div style="display:flex;flex-direction:column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Spacing') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('xxs') + '" class="cmd-box-spacing" data-value="xxs">' + out('xxs') + '</button>' + '<button title="' + out('xs') + '" class="cmd-box-spacing" data-value="default">' + out('xs') + '</button>' + '<button title="' + out('sm') + '" class="cmd-box-spacing" data-value="sm">' + out('sm') + '</button>' + '<button title="' + out('m') + '" class="cmd-box-spacing" data-value="m">' + out('m') + '</button>' + '<button title="' + out('lg') + '" class="cmd-box-spacing" data-value="lg">' + out('lg') + '</button>' + '<button title="' + out('Clear') + '" class="cmd-box-spacing" data-value=""><svg class="is-icon-flex"><use xlink:href="#icon-clean"></use></svg></button>' + '</div>' + '</div>';
|
4045
|
-
html += '<div class="div-section-spacesettings" style="display:flex;flex-direction:column;">' + '<div class="div-multi-boxes">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Between Boxes') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('space') + '" class="cmd-betweenbox-spacing" data-value="space">' + out('space') + '</button>' + '<button title="' + out('no space') + '" class="cmd-betweenbox-spacing" data-value="no-space">' + out('no space') + '</button>' + '</div>' + '</div>' + '<div style="display:none;padding-top:20px;padding-bottom: 3px;">' + out('Stack') + ':</div>' + '<div style="display:none">' + '<button title="' + out('top') + '" class="cmd-section-stack" data-value="top">' + out('top') + '</button>' + '<button title="' + out('middle') + '" class="cmd-section-stack" data-value="middle">' + out('middle') + '</button>' + '<button title="' + out('bottom') + '" class="cmd-section-stack" data-value="bottom">' + out('bottom') + '</button>' + '<button title="' + out('Clear') + '" class="cmd-section-stack" data-value=""><svg class="is-icon-flex"><use xlink:href="#icon-clean"></use></svg></button>' + '</div>' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Background Color') + ':</div>' + '<div style="display:flex;">' + '<button title="' + out('Background Color') + '" class="input-section-bgcolor is-btn-color" style="margin-right:15px"></button>' + '<button title="' + out('Gradient') + '" class="input-section-gradient classic" data-value="+">' + out('Gradient') + '</button>' + '</div>' +
|
4046
|
-
<div style="
|
4047
|
-
|
4048
|
-
<
|
4049
|
-
<
|
4050
|
-
|
4051
|
-
|
4052
|
-
<
|
4053
|
-
|
4045
|
+
html += '<div class="div-section-spacesettings" style="display:flex;flex-direction:column;">' + '<div class="div-multi-boxes">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Between Boxes') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('space') + '" class="cmd-betweenbox-spacing" data-value="space">' + out('space') + '</button>' + '<button title="' + out('no space') + '" class="cmd-betweenbox-spacing" data-value="no-space">' + out('no space') + '</button>' + '</div>' + '</div>' + '<div style="display:none;padding-top:20px;padding-bottom: 3px;">' + out('Stack') + ':</div>' + '<div style="display:none">' + '<button title="' + out('top') + '" class="cmd-section-stack" data-value="top">' + out('top') + '</button>' + '<button title="' + out('middle') + '" class="cmd-section-stack" data-value="middle">' + out('middle') + '</button>' + '<button title="' + out('bottom') + '" class="cmd-section-stack" data-value="bottom">' + out('bottom') + '</button>' + '<button title="' + out('Clear') + '" class="cmd-section-stack" data-value=""><svg class="is-icon-flex"><use xlink:href="#icon-clean"></use></svg></button>' + '</div>' + '</div>' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Background Color') + ':</div>' + '<div style="display:flex;">' + '<button title="' + out('Background Color') + '" class="input-section-bgcolor is-btn-color" style="margin-right:15px"></button>' + '<button title="' + out('Gradient') + '" class="input-section-gradient classic" data-value="+">' + out('Gradient') + '</button>' + '</div>' + `
|
4046
|
+
<div class="div-section-wrapboxes" style="display:flex;flex-direction:column;">
|
4047
|
+
<div style="padding-top:20px;padding-bottom:3px;">${out('Wrap Boxes (Breakpoint)')}:</div>
|
4048
|
+
<div style="padding-top:3px;display:flex;align-items: center;">
|
4049
|
+
<button title="${out('Tablet (Landscape)')}" class="input-breakpoint" data-value="md" style="width:40px;height:25px;">
|
4050
|
+
<svg class="is-icon-flex" style="width:16px;height:16px;transform:rotate(-90deg)"><use xlink:href="#icon-device-tablet"></use></svg>
|
4051
|
+
</button>
|
4052
|
+
<button title="${out('Tablet (Portrait)')}" class="input-breakpoint on" data-value="sm" style="width:40px;height:25px;">
|
4053
|
+
<svg class="is-icon-flex" style="width:16px;height:16px"><use xlink:href="#icon-device-tablet"></use></svg>
|
4054
|
+
</button>
|
4055
|
+
|
4056
|
+
<label for="chkReverseBoxes" style="margin:0;margin-left:70px;display:flex"><input id="chkReverseBoxes" type="checkbox" style="margin:0 7px 0 0"/><span>${out('Reverse Boxes')}</span></label>
|
4057
|
+
|
4058
|
+
</div>
|
4054
4059
|
</div>
|
4055
4060
|
|
4056
4061
|
<div class="is-separator" style="margin-top:20px"></div>
|
@@ -4378,6 +4383,14 @@ class EditSection {
|
|
4378
4383
|
const section = this.builder.activeSection;
|
4379
4384
|
let bgcolor = btnSectionBgColor.style.backgroundColor;
|
4380
4385
|
colorpicker.open(s => {
|
4386
|
+
if (!section.classList.contains('box-space')) {
|
4387
|
+
let overlays = section.querySelectorAll('.is-overlay');
|
4388
|
+
overlays.forEach(overlay => {
|
4389
|
+
overlay.style.backgroundColor = '';
|
4390
|
+
overlay.style.backgroundImage = ''; //remove gradient
|
4391
|
+
});
|
4392
|
+
}
|
4393
|
+
|
4381
4394
|
section.style.backgroundColor = s;
|
4382
4395
|
section.style.backgroundImage = ''; //remove gradient
|
4383
4396
|
|
@@ -4395,7 +4408,15 @@ class EditSection {
|
|
4395
4408
|
const section = this.builder.activeSection;
|
4396
4409
|
let gradientPicker = this.builder.editor.gradientpicker();
|
4397
4410
|
gradientPicker.open(section, () => {
|
4398
|
-
|
4411
|
+
if (!section.classList.contains('box-space')) {
|
4412
|
+
let overlays = section.querySelectorAll('.is-overlay');
|
4413
|
+
overlays.forEach(overlay => {
|
4414
|
+
overlay.style.backgroundColor = '';
|
4415
|
+
overlay.style.backgroundImage = ''; //remove gradient
|
4416
|
+
});
|
4417
|
+
} //Trigger Change event
|
4418
|
+
|
4419
|
+
|
4399
4420
|
this.builder.onChange();
|
4400
4421
|
});
|
4401
4422
|
});
|
@@ -4475,6 +4496,21 @@ class EditSection {
|
|
4475
4496
|
|
4476
4497
|
this.builder.onChange();
|
4477
4498
|
});
|
4499
|
+
});
|
4500
|
+
const chkReverseBoxes = modalEditSection.querySelector('#chkReverseBoxes');
|
4501
|
+
chkReverseBoxes.addEventListener('click', () => {
|
4502
|
+
let section = this.builder.activeSection;
|
4503
|
+
if (!section) return;
|
4504
|
+
this.builder.editor.saveForUndo();
|
4505
|
+
|
4506
|
+
if (chkReverseBoxes.checked) {
|
4507
|
+
section.classList.add('box-reverse');
|
4508
|
+
} else {
|
4509
|
+
section.classList.remove('box-reverse');
|
4510
|
+
} //Trigger Change event
|
4511
|
+
|
4512
|
+
|
4513
|
+
this.builder.settings.onChange();
|
4478
4514
|
}); // Section Visibility
|
4479
4515
|
|
4480
4516
|
btns = modalEditSection.querySelectorAll('.input-device');
|
@@ -4686,6 +4722,14 @@ class EditSection {
|
|
4686
4722
|
divSectionSpaceSettings.style.display = 'none';
|
4687
4723
|
}
|
4688
4724
|
|
4725
|
+
const divSectionWrapBoxes = this.modalEditSection.querySelector('.div-section-wrapboxes');
|
4726
|
+
|
4727
|
+
if (dom$m.hasClass(activeSection, 'is-box')) {
|
4728
|
+
divSectionWrapBoxes.style.display = 'none';
|
4729
|
+
} else {
|
4730
|
+
divSectionWrapBoxes.style.display = '';
|
4731
|
+
}
|
4732
|
+
|
4689
4733
|
const divMultiBoxes = this.modalEditSection.querySelector('.div-multi-boxes');
|
4690
4734
|
|
4691
4735
|
if (dom$m.hasClass(activeSection, 'is-box')) {
|
@@ -4755,6 +4799,14 @@ class EditSection {
|
|
4755
4799
|
} else {
|
4756
4800
|
dom$m.addClass(modalEditSection.querySelector('.input-breakpoint[data-value="sm"]'), 'on');
|
4757
4801
|
}
|
4802
|
+
|
4803
|
+
const chkReverseBoxes = modalEditSection.querySelector('#chkReverseBoxes');
|
4804
|
+
|
4805
|
+
if (activeSection.classList.contains('box-reverse')) {
|
4806
|
+
chkReverseBoxes.checked = true;
|
4807
|
+
} else {
|
4808
|
+
chkReverseBoxes.checked = false;
|
4809
|
+
}
|
4758
4810
|
}
|
4759
4811
|
|
4760
4812
|
close() {
|
@@ -12265,10 +12317,8 @@ class EditBox {
|
|
12265
12317
|
let bgcolor = btnBoxBgColor.style.backgroundColor;
|
12266
12318
|
let overlay = activeBox.querySelector('.is-overlay');
|
12267
12319
|
colorpicker.open(s => {
|
12268
|
-
activeBox.style.backgroundColor = ''
|
12269
|
-
|
12270
|
-
activeBox.style.backgroundImage = ''; /// clean old
|
12271
|
-
|
12320
|
+
// activeBox.style.backgroundColor = '';// clean old
|
12321
|
+
// activeBox.style.backgroundImage = '';/// clean old
|
12272
12322
|
overlay.style.backgroundColor = s;
|
12273
12323
|
overlay.style.backgroundImage = ''; //remove gradient
|
12274
12324
|
|
@@ -12287,11 +12337,9 @@ class EditBox {
|
|
12287
12337
|
let overlay = activeBox.querySelector('.is-overlay');
|
12288
12338
|
let gradientPicker = this.builder.editor.gradientpicker();
|
12289
12339
|
gradientPicker.open(overlay, () => {
|
12290
|
-
activeBox.style.backgroundColor = ''
|
12291
|
-
|
12292
|
-
activeBox.style.backgroundImage = ''; // clean old
|
12340
|
+
// activeBox.style.backgroundColor = '';// clean old
|
12341
|
+
// activeBox.style.backgroundImage = '';// clean old
|
12293
12342
|
//Trigger Change event
|
12294
|
-
|
12295
12343
|
this.builder.onChange();
|
12296
12344
|
});
|
12297
12345
|
}); // Box Overlay Color
|