@innovastudio/contentbuilder 1.5.67 → 1.5.68

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.5.67",
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();