@innovastudio/contentbuilder 1.4.0 → 1.4.2

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.4.0",
4
+ "version": "1.4.2",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "files": [
@@ -4020,6 +4020,10 @@ button:focus-visible {
4020
4020
  background: rgba(255, 255, 255, 0.2);
4021
4021
  border: rgba(0, 0, 0, 0.09) 1px solid;
4022
4022
  }
4023
+ #_cbhtml .elementstyles .is-settings button span,
4024
+ .is-ui .elementstyles .is-settings button span {
4025
+ margin-left: 5px;
4026
+ }
4023
4027
  #_cbhtml .elementstyles .is-settings label,
4024
4028
  .is-ui .elementstyles .is-settings label {
4025
4029
  font-size: 13px;
@@ -4050,11 +4054,6 @@ button:focus-visible {
4050
4054
  max-width: 100%;
4051
4055
  max-height: 100%;
4052
4056
  }
4053
- #_cbhtml .elementstyles #divElementMore,
4054
- .is-ui .elementstyles #divElementMore {
4055
- top: 50px;
4056
- left: 140px;
4057
- }
4058
4057
  #_cbhtml .editstyles,
4059
4058
  .is-ui .editstyles {
4060
4059
  display: none;
@@ -4527,13 +4527,36 @@ class Util {
4527
4527
  // return;
4528
4528
  // }
4529
4529
 
4530
+ let smHidden = false;
4531
+ let mdHidden = false;
4530
4532
  Array.from(row.children).map(item => {
4531
4533
  if (item.classList.contains('is-row-tool')) return;
4532
4534
  if (item.classList.contains('is-col-tool')) return;
4533
4535
  if (item.classList.contains('is-rowadd-tool')) return;
4534
4536
  item.style.width = '';
4535
4537
  item.style.flex = '';
4538
+
4539
+ if (item.classList.contains('sm-hidden')) {
4540
+ smHidden = true;
4541
+ }
4542
+
4543
+ if (item.classList.contains('md-hidden')) {
4544
+ mdHidden = true;
4545
+ }
4536
4546
  });
4547
+
4548
+ if (smHidden) {
4549
+ row.classList.add('sm-autofit');
4550
+ } else {
4551
+ row.classList.remove('sm-autofit');
4552
+ }
4553
+
4554
+ if (mdHidden) {
4555
+ row.classList.add('md-autofit');
4556
+ } else {
4557
+ row.classList.remove('md-autofit');
4558
+ }
4559
+
4537
4560
  let num = 3; //is-row-tool, is-col-tool & is-rowadd-tool
4538
4561
 
4539
4562
  if (row.querySelector('.is-row-overlay')) {
@@ -57440,7 +57463,13 @@ class RowTool {
57440
57463
  <button title="${util.out('Desktop')}" class="input-device on" data-value="" style="width:40px;height:25px;">
57441
57464
  <svg class="is-icon-flex" style="width:16px;height:16px"><use xlink:href="#icon-device-desktop"></use></svg>
57442
57465
  </button>
57443
- <button title="${util.out('Tablet')}" class="input-device" data-value="sm" style="width:40px;height:25px;">
57466
+ <!--<button title="${util.out('Laptop/Tablet (Landscape)')}" class="input-device" data-value="md" style="width:40px;height:25px;">
57467
+ <svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-device-laptop"></use></svg>
57468
+ </button>-->
57469
+ <button title="${util.out('Laptop/Tablet (Landscape)')}" class="input-device" data-value="md" style="width:40px;height:25px;">
57470
+ <svg class="is-icon-flex" style="width:16px;height:16px;transform:rotate(-90deg)"><use xlink:href="#icon-device-tablet"></use></svg>
57471
+ </button>
57472
+ <button title="${util.out('Tablet (Portrait)')}" class="input-device" data-value="sm" style="width:40px;height:25px;">
57444
57473
  <svg class="is-icon-flex" style="width:16px;height:16px"><use xlink:href="#icon-device-tablet"></use></svg>
57445
57474
  </button>
57446
57475
  <button title="${util.out('Mobile')}" class="input-device" data-value="xs" style="width:40px;height:25px;">
@@ -57700,6 +57729,8 @@ class RowTool {
57700
57729
  row.classList.remove('xs-hidden');
57701
57730
  } else if (target === 'sm') {
57702
57731
  row.classList.remove('sm-hidden');
57732
+ } else if (target === 'md') {
57733
+ row.classList.remove('md-hidden');
57703
57734
  } else if (target === '') {
57704
57735
  row.classList.remove('desktop-hidden');
57705
57736
  }
@@ -57718,6 +57749,8 @@ class RowTool {
57718
57749
  row.classList.add('xs-hidden');
57719
57750
  } else if (target === 'sm') {
57720
57751
  row.classList.add('sm-hidden');
57752
+ } else if (target === 'md') {
57753
+ row.classList.add('md-hidden');
57721
57754
  } else if (target === '') {
57722
57755
  row.classList.add('desktop-hidden');
57723
57756
  }
@@ -58415,7 +58448,13 @@ class ColumnTool {
58415
58448
  <button title="${util.out('Desktop')}" class="input-device on" data-value="" style="width:40px;height:25px;">
58416
58449
  <svg class="is-icon-flex" style="width:16px;height:16px"><use xlink:href="#icon-device-desktop"></use></svg>
58417
58450
  </button>
58418
- <button title="${util.out('Tablet')}" class="input-device" data-value="sm" style="width:40px;height:25px;">
58451
+ <!--<button title="${util.out('Laptop/Tablet (Landscape)')}" class="input-device" data-value="md" style="width:40px;height:25px;">
58452
+ <svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-device-laptop"></use></svg>
58453
+ </button>-->
58454
+ <button title="${util.out('Laptop/Tablet (Landscape)')}" class="input-device" data-value="md" style="width:40px;height:25px;">
58455
+ <svg class="is-icon-flex" style="width:16px;height:16px;transform:rotate(-90deg)"><use xlink:href="#icon-device-tablet"></use></svg>
58456
+ </button>
58457
+ <button title="${util.out('Tablet (Portrait)')}" class="input-device" data-value="sm" style="width:40px;height:25px;">
58419
58458
  <svg class="is-icon-flex" style="width:16px;height:16px"><use xlink:href="#icon-device-tablet"></use></svg>
58420
58459
  </button>
58421
58460
  <button title="${util.out('Mobile')}" class="input-device" data-value="xs" style="width:40px;height:25px;">
@@ -58425,11 +58464,11 @@ class ColumnTool {
58425
58464
 
58426
58465
  <div style="padding-top:0;padding-bottom:3px;">${util.out('Visibility')}:</div>
58427
58466
  <div class="div-visibility" style="display:flex;">
58428
- <button title="${util.out('Visible')}" class="input-visible on" data-value="sm" style="width:100px;height:34px;">
58467
+ <button title="${util.out('Visible')}" class="input-visible on" style="width:100px;height:34px;">
58429
58468
  <svg class="is-icon-flex" style="width:16px;height:16px"><use xlink:href="#icon-eye"></use></svg>
58430
58469
  <span>${util.out('Visible')}</span>
58431
58470
  </button>
58432
- <button title="${util.out('Hidden')}" class="input-hidden" data-value="xs" style="width:100px;height:34px;">
58471
+ <button title="${util.out('Hidden')}" class="input-hidden" style="width:100px;height:34px;">
58433
58472
  <svg class="is-icon-flex" style="width:16px;height:16px"><use xlink:href="#icon-eye-off"></use></svg>
58434
58473
  <span>${util.out('Hidden')}</span>
58435
58474
  </button>
@@ -60129,6 +60168,10 @@ class ColumnTool {
60129
60168
  cell.classList.remove('xs-hidden');
60130
60169
  } else if (target === 'sm') {
60131
60170
  cell.classList.remove('sm-hidden');
60171
+ cell.parentNode.classList.remove('sm-autofit');
60172
+ } else if (target === 'md') {
60173
+ cell.classList.remove('md-hidden');
60174
+ cell.parentNode.classList.remove('md-autofit');
60132
60175
  } else if (target === '') {
60133
60176
  cell.classList.remove('desktop-hidden');
60134
60177
  }
@@ -60147,6 +60190,10 @@ class ColumnTool {
60147
60190
  cell.classList.add('xs-hidden');
60148
60191
  } else if (target === 'sm') {
60149
60192
  cell.classList.add('sm-hidden');
60193
+ cell.parentNode.classList.add('sm-autofit');
60194
+ } else if (target === 'md') {
60195
+ cell.classList.add('md-hidden');
60196
+ cell.parentNode.classList.add('md-autofit');
60150
60197
  } else if (target === '') {
60151
60198
  cell.classList.add('desktop-hidden');
60152
60199
  }
@@ -61181,7 +61228,13 @@ class ElementGeneralStyles {
61181
61228
  <button title="${util.out('Desktop')}" class="input-device on" data-value="" style="width:40px;height:25px;">
61182
61229
  <svg class="is-icon-flex" style="width:16px;height:16px;flex:none"><use xlink:href="#icon-device-desktop"></use></svg>
61183
61230
  </button>
61184
- <button title="${util.out('Tablet')}" class="input-device" data-value="sm" style="width:40px;height:25px;">
61231
+ <!--<button title="${util.out('Laptop/Tablet (Landscape)')}" class="input-device" data-value="md" style="width:40px;height:25px;">
61232
+ <svg class="is-icon-flex" style="width:19px;height:19px;flex:none"><use xlink:href="#icon-device-laptop"></use></svg>
61233
+ </button>-->
61234
+ <button title="${util.out('Laptop/Tablet (Landscape)')}" class="input-device" data-value="md" style="width:40px;height:25px;">
61235
+ <svg class="is-icon-flex" style="width:16px;height:16px;flex:none;transform:rotate(-90deg)"><use xlink:href="#icon-device-tablet"></use></svg>
61236
+ </button>
61237
+ <button title="${util.out('Tablet (Portrait)')}" class="input-device" data-value="sm" style="width:40px;height:25px;">
61185
61238
  <svg class="is-icon-flex" style="width:16px;height:16px;flex:none"><use xlink:href="#icon-device-tablet"></use></svg>
61186
61239
  </button>
61187
61240
  <button title="${util.out('Mobile')}" class="input-device" data-value="xs" style="width:40px;height:25px;">
@@ -61192,11 +61245,11 @@ class ElementGeneralStyles {
61192
61245
  <div style="padding-top:0;padding-bottom:3px;">${util.out('Visibility')}:</div>
61193
61246
  <div class="div-visibility" style="display:flex;">
61194
61247
  <button title="${util.out('Visible')}" class="input-visible on" data-value="sm" style="width:100px;height:34px;">
61195
- <svg class="is-icon-flex" style="width:16px;height:16px"><use xlink:href="#icon-eye"></use></svg>
61248
+ <svg class="is-icon-flex" style="width:16px;height:16px;flex:none"><use xlink:href="#icon-eye"></use></svg>
61196
61249
  <span>${util.out('Visible')}</span>
61197
61250
  </button>
61198
61251
  <button title="${util.out('Hidden')}" class="input-hidden" data-value="xs" style="width:100px;height:34px;">
61199
- <svg class="is-icon-flex" style="width:16px;height:16px"><use xlink:href="#icon-eye-off"></use></svg>
61252
+ <svg class="is-icon-flex" style="width:16px;height:16px;flex:none"><use xlink:href="#icon-eye-off"></use></svg>
61200
61253
  <span>${util.out('Hidden')}</span>
61201
61254
  </button>
61202
61255
  </div>
@@ -61383,6 +61436,8 @@ class ElementGeneralStyles {
61383
61436
  elm.classList.remove('xs-hidden');
61384
61437
  } else if (target === 'sm') {
61385
61438
  elm.classList.remove('sm-hidden');
61439
+ } else if (target === 'md') {
61440
+ elm.classList.remove('md-hidden');
61386
61441
  } else if (target === '') {
61387
61442
  elm.classList.remove('desktop-hidden');
61388
61443
  }
@@ -61400,6 +61455,8 @@ class ElementGeneralStyles {
61400
61455
  elm.classList.add('xs-hidden');
61401
61456
  } else if (target === 'sm') {
61402
61457
  elm.classList.add('sm-hidden');
61458
+ } else if (target === 'md') {
61459
+ elm.classList.add('md-hidden');
61403
61460
  } else if (target === '') {
61404
61461
  elm.classList.add('desktop-hidden');
61405
61462
  }
@@ -76348,6 +76405,7 @@ class Responsive {
76348
76405
  getVisibility(elm, target) {
76349
76406
  if (target === 'xs') return !elm.classList.contains('xs-hidden');
76350
76407
  if (target === 'sm') return !elm.classList.contains('sm-hidden');
76408
+ if (target === 'md') return !elm.classList.contains('md-hidden');
76351
76409
  if (target === '') return !elm.classList.contains('desktop-hidden');
76352
76410
  }
76353
76411
 
@@ -76360,6 +76418,10 @@ class Responsive {
76360
76418
  if (visibility) elm.classList.remove('sm-hidden');else elm.classList.add('sm-hidden');
76361
76419
  }
76362
76420
 
76421
+ if (target === 'md') {
76422
+ if (visibility) elm.classList.remove('md-hidden');else elm.classList.add('md-hidden');
76423
+ }
76424
+
76363
76425
  if (target === '') {
76364
76426
  if (visibility) elm.classList.remove('desktop-hidden');else elm.classList.add('desktop-hidden');
76365
76427
  }