@innovastudio/contentbuilder 1.5.66 → 1.5.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
3
  "type": "module",
4
- "version": "1.5.66",
4
+ "version": "1.5.68",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "types": "index.d.ts",
@@ -51996,6 +51996,11 @@ class RowTool {
51996
51996
  row.style.backgroundColor = color;
51997
51997
  elm.style.backgroundColor = color; // preview
51998
51998
 
51999
+ if (color !== '') {
52000
+ let btnRowGradient = rowSettings.querySelector('.input-row-gradient');
52001
+ btnRowGradient.style.backgroundImage = '';
52002
+ row.style.backgroundImage = '';
52003
+ }
51999
52004
  this.builder.opts.onChange();
52000
52005
  }, rowSettings.querySelector('.input-row-bgcolor').style.backgroundColor, () => {
52001
52006
  btnRowBgColor.removeAttribute('data-focus');
@@ -52111,9 +52116,13 @@ class RowTool {
52111
52116
  div.innerHTML = '';
52112
52117
  const inpSrc = this.imageSource.querySelector('.input-src');
52113
52118
  inpSrc.value = '';
52119
+ if (row.style.backgroundImage && row.style.backgroundImage.includes('linear-gradient')) {
52120
+ const btnCellBgColor = this.rowSettings.querySelector('.input-row-bgcolor');
52121
+ btnCellBgColor.style.backgroundColor = '';
52122
+ row.style.backgroundColor = '';
52123
+ }
52114
52124
 
52115
- //Trigger Change event
52116
- this.builder.opts.onChange();
52125
+ // this.builder.opts.onChange();
52117
52126
  }, isChanged => {
52118
52127
  btnRowGradient.removeAttribute('data-focus');
52119
52128
  btnRowGradient.focus();
@@ -53713,6 +53722,11 @@ class ColumnTool {
53713
53722
  cell.style.backgroundColor = color;
53714
53723
  elm.style.backgroundColor = color; // preview
53715
53724
 
53725
+ if (color !== '') {
53726
+ let btnCellGradient = cellSettings.querySelector('.input-cell-gradient');
53727
+ btnCellGradient.style.backgroundImage = '';
53728
+ cell.style.backgroundImage = '';
53729
+ }
53716
53730
  this.builder.opts.onChange();
53717
53731
  }, cellSettings.querySelector('.input-cell-bgcolor').style.backgroundColor, () => {
53718
53732
  btnCellBgColor.removeAttribute('data-focus');
@@ -53846,7 +53860,13 @@ class ColumnTool {
53846
53860
  div.innerHTML = '';
53847
53861
  const inpSrc = this.imageSource.querySelector('.input-src');
53848
53862
  inpSrc.value = '';
53849
- this.builder.opts.onChange();
53863
+ if (cell.style.backgroundImage && cell.style.backgroundImage.includes('linear-gradient')) {
53864
+ const btnCellBgColor = cellSettings.querySelector('.input-cell-bgcolor');
53865
+ btnCellBgColor.style.backgroundColor = '';
53866
+ cell.style.backgroundColor = '';
53867
+ }
53868
+
53869
+ // this.builder.opts.onChange();
53850
53870
  }, isChanged => {
53851
53871
  btnCellGradient.removeAttribute('data-focus');
53852
53872
  btnCellGradient.focus();
@@ -55519,17 +55539,20 @@ class ElementGeneralStyles {
55519
55539
 
55520
55540
  // Background color
55521
55541
  let btnElmBgColor = panelStuff.querySelector('.input-elm-bgcolor');
55522
- btnElmBgColor.addEventListener('click', e => {
55542
+ btnElmBgColor.addEventListener('click', () => {
55523
55543
  this.builder.uo.saveForUndo(true); // checkLater = true
55524
55544
 
55525
- let elm = e.target;
55526
55545
  this.builder.colorPicker.open(color => {
55527
- this.builder.inspectedElement.style.backgroundColor = color;
55528
- elm.style.backgroundColor = color; // preview
55546
+ let elm = this.builder.inspectedElement;
55547
+ elm.style.backgroundColor = color;
55548
+ btnElmBgColor.style.backgroundColor = color; // preview
55529
55549
 
55550
+ if (color !== '') {
55551
+ let btnElmGradient = panelStuff.querySelector('.input-elm-gradient');
55552
+ btnElmGradient.style.backgroundImage = '';
55553
+ elm.style.backgroundImage = '';
55554
+ }
55530
55555
  elementStyleEditor.refresh();
55531
-
55532
- //Trigger Change event
55533
55556
  this.builder.opts.onChange();
55534
55557
  }, panelStuff.querySelector('.input-elm-bgcolor').style.backgroundColor, () => {
55535
55558
  btnElmBgColor.removeAttribute('data-focus');
@@ -55546,10 +55569,15 @@ class ElementGeneralStyles {
55546
55569
  this.builder.uo.saveForUndo(true); // checkLater = true
55547
55570
 
55548
55571
  gradientPicker.open(this.builder.inspectedElement, () => {
55572
+ let elm = this.builder.inspectedElement;
55573
+ if (elm.style.backgroundImage && elm.style.backgroundImage.includes('linear-gradient')) {
55574
+ const btnElmBgColor = panelStuff.querySelector('.input-elm-bgcolor');
55575
+ btnElmBgColor.style.backgroundColor = '';
55576
+ elm.style.backgroundColor = '';
55577
+ }
55549
55578
  elementStyleEditor.refresh();
55550
55579
 
55551
- //Trigger Change event
55552
- this.builder.opts.onChange();
55580
+ // this.builder.opts.onChange();
55553
55581
  }, isChanged => {
55554
55582
  if (isChanged) {
55555
55583
  elementStyleEditor.refresh();
@@ -89557,10 +89585,15 @@ class BlockModal {
89557
89585
 
89558
89586
  <div class="modal-page-content" style="display:none;padding-bottom:28px;">
89559
89587
 
89560
- <div style="padding-bottom: 3px;">${util.out('Background Color')}:</div>
89561
- <div style="display:flex;">
89562
- <button title="${util.out('Background Color')}" class="input-page-bgcolor is-btn-color" style="margin-right:15px"></button>
89563
- <button title="${util.out('Gradient')}" class="btn-page-gradient classic" data-value="+"> ${util.out('Gradient')} </button>
89588
+ <div style="display:flex;gap:40px">
89589
+ <div>
89590
+ <div style="padding-bottom: 3px;">${util.out('Background Color')}:</div>
89591
+ <button title="${util.out('Background Color')}" class="input-page-bgcolor is-btn-color" style="margin-right:15px"></button>
89592
+ </div>
89593
+ <div>
89594
+ <div style="padding-bottom: 3px;">${util.out('Gradient')}:</div>
89595
+ <button title="${util.out('Gradient')}" class="btn-page-gradient is-btn-color"></button>
89596
+ </div>
89564
89597
  </div>
89565
89598
 
89566
89599
  <div style="padding-top:20px;padding-bottom: 3px;">${util.out('Background Image')}:</div>
@@ -89627,10 +89660,15 @@ class BlockModal {
89627
89660
 
89628
89661
  <div id="divBlockGeneral" class="is-tab-content active" data-group="blocksettings" style="display:flex" tabindex="-1" style="padding:25px 25px 28px">
89629
89662
 
89630
- <div style="padding-bottom: 3px;">${util.out('Background Color')}:</div>
89631
- <div style="display:flex;">
89632
- <button title="${util.out('Background Color')}" class="input-block-bgcolor is-btn-color" style="margin-right:15px"></button>
89633
- <button title="${util.out('Gradient')}" class="btn-block-gradient classic" data-value="+"> ${util.out('Gradient')} </button>
89663
+ <div style="display:flex;gap:40px">
89664
+ <div>
89665
+ <div style="padding-bottom: 3px;">${util.out('Background Color')}:</div>
89666
+ <button title="${util.out('Background Color')}" class="input-block-bgcolor is-btn-color" style="margin-right:15px"></button>
89667
+ </div>
89668
+ <div>
89669
+ <div style="padding-bottom: 3px;">${util.out('Gradient')}:</div>
89670
+ <button title="${util.out('Gradient')}" class="btn-block-gradient is-btn-color"></button>
89671
+ </div>
89634
89672
  </div>
89635
89673
 
89636
89674
  <div style="padding-top:20px;padding-bottom: 3px;">${util.out('Background Image')}:</div>