@innovastudio/contentbox 1.5.5 → 1.5.7

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/contentbox",
3
3
  "type": "module",
4
- "version": "1.5.5",
4
+ "version": "1.5.7",
5
5
  "description": "",
6
6
  "main": "public/contentbox/contentbox.esm.js",
7
7
  "files": [
@@ -46,7 +46,7 @@
46
46
  "webpack-dev-server": "^4.0.0"
47
47
  },
48
48
  "dependencies": {
49
- "@innovastudio/contentbuilder": "^1.4.9",
49
+ "@innovastudio/contentbuilder": "^1.4.10",
50
50
  "js-beautify": "^1.14.0"
51
51
  }
52
52
  }
@@ -4043,8 +4043,17 @@ class EditSection {
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="">&#8593;</button>' + '<button title="' + out('Move Down') + '" class="cmd-section-down">&#8595;</button>' + '<button title="' + out('Move to Top') + '" class="cmd-section-top"><span style="transform:rotate(90deg);position:absolute;top:13px;left:15px;">&#8676;</span></button>' + '<button title="' + out('Move to Bottom') + '" class="cmd-section-bottom"><span style="transform:rotate(90deg);position:absolute;top:13px;left:15px;">&#8677;</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
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>' + '</div>' + `
4046
+ <div style="padding-top:20px;padding-bottom:3px;">${out('Wrap Boxes (Breakpoint)')}:</div>
4047
+ <div style="padding-top:3px;display:flex;">
4048
+ <button title="${out('Tablet (Landscape)')}" class="input-breakpoint" data-value="md" style="width:40px;height:25px;">
4049
+ <svg class="is-icon-flex" style="width:16px;height:16px;transform:rotate(-90deg)"><use xlink:href="#icon-device-tablet"></use></svg>
4050
+ </button>
4051
+ <button title="${out('Tablet (Portrait)')}" class="input-breakpoint on" data-value="sm" style="width:40px;height:25px;">
4052
+ <svg class="is-icon-flex" style="width:16px;height:16px"><use xlink:href="#icon-device-tablet"></use></svg>
4053
+ </button>
4054
+ </div>
4046
4055
 
4047
- <div class="is-separator-" style="margin-top:30px"></div>
4056
+ <div class="is-separator" style="margin-top:20px"></div>
4048
4057
 
4049
4058
  <div class="div-target" style="display: flex;justify-content: flex-end;padding: 5px 0 0;">
4050
4059
  <button title="${out('Desktop')}" class="input-device on" data-value="" style="width:40px;height:25px;">
@@ -4442,9 +4451,33 @@ class EditSection {
4442
4451
  section.removeAttribute('id');
4443
4452
  info.innerHTML = '';
4444
4453
  }
4454
+ }); // Breakpoint
4455
+
4456
+ let btns = modalEditSection.querySelectorAll('.input-breakpoint');
4457
+ btns.forEach(btn => {
4458
+ btn.addEventListener('click', () => {
4459
+ let section = this.builder.activeSection;
4460
+ if (!section) return;
4461
+ this.builder.editor.saveForUndo();
4462
+ let elms = modalEditSection.querySelectorAll('.input-breakpoint');
4463
+ elms.forEach(elm => {
4464
+ elm.classList.remove('on');
4465
+ });
4466
+ btn.classList.add('on');
4467
+ let target = btn.getAttribute('data-value');
4468
+
4469
+ if (target === 'sm') {
4470
+ section.classList.remove('md-wrap');
4471
+ } else if (target === 'md') {
4472
+ section.classList.add('md-wrap');
4473
+ } //Trigger Change event
4474
+
4475
+
4476
+ this.builder.onChange();
4477
+ });
4445
4478
  }); // Section Visibility
4446
4479
 
4447
- let btns = modalEditSection.querySelectorAll('.input-device');
4480
+ btns = modalEditSection.querySelectorAll('.input-device');
4448
4481
  btns.forEach(btn => {
4449
4482
  btn.addEventListener('click', () => {
4450
4483
  let section = this.builder.activeSection;
@@ -4712,6 +4745,16 @@ class EditSection {
4712
4745
 
4713
4746
 
4714
4747
  this.realtimeVisibility(activeSection);
4748
+ btns = modalEditSection.querySelectorAll('.input-breakpoint');
4749
+ btns.forEach(btn => {
4750
+ dom$m.removeClass(btn, 'on');
4751
+ });
4752
+
4753
+ if (activeSection.classList.contains('md-wrap')) {
4754
+ dom$m.addClass(modalEditSection.querySelector('.input-breakpoint[data-value="md"]'), 'on');
4755
+ } else {
4756
+ dom$m.addClass(modalEditSection.querySelector('.input-breakpoint[data-value="sm"]'), 'on');
4757
+ }
4715
4758
  }
4716
4759
 
4717
4760
  close() {
@@ -63781,7 +63824,7 @@ class Image$1 {
63781
63824
  </div>
63782
63825
 
63783
63826
  <div class="is-modal imageselect" style="z-index:10005" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
63784
- <div style="max-width:800px;height:80%;padding:0;">
63827
+ <div style="max-width:${this.builder.imageSelectWidth};height:${this.builder.imageSelectHeight};padding:0;">
63785
63828
  <iframe tabindex="0" style="width:100%;height:100%;border: none;display: block;" src="about:blank"></iframe>
63786
63829
  </div>
63787
63830
  </div>
@@ -66718,7 +66761,7 @@ class Hyperlink {
66718
66761
  </div>
66719
66762
 
66720
66763
  <div class="is-modal fileselect" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
66721
- <div class="is-modal-content" style="max-width:800px;height:80%;padding:0;">
66764
+ <div class="is-modal-content" style="max-width:${this.builder.fileSelectWidth};height:${this.builder.fileSelectHeight};padding:0;">
66722
66765
  <iframe tabindex="0" style="width:100%;height:100%;border: none;display: block;" src="about:blank"></iframe>
66723
66766
  </div>
66724
66767
  </div>
@@ -68840,7 +68883,7 @@ class Video {
68840
68883
  </div>
68841
68884
 
68842
68885
  <div class="is-modal videoselect" style="z-index:10005" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
68843
- <div style="max-width:800px;height:80%;padding:0;">
68886
+ <div style="max-width:${this.builder.videoSelectWidth};height:${this.builder.videoSelectHeight};padding:0;">
68844
68887
  <iframe tabindex="0" style="width:100%;height:100%;border: none;display: block;" src="about:blank"></iframe>
68845
68888
  </div>
68846
68889
  </div>
@@ -69077,7 +69120,7 @@ class Audio {
69077
69120
  </div>
69078
69121
 
69079
69122
  <div class="is-modal audioselect" style="z-index:10005" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
69080
- <div style="max-width:800px;height:80%;padding:0;">
69123
+ <div style="max-width:${this.builder.audioSelectWidth};height:${this.builder.audioSelectHeight};padding:0;">
69081
69124
  <iframe tabindex="0" style="width:100%;height:100%;border: none;display: block;" src="about:blank"></iframe>
69082
69125
  </div>
69083
69126
  </div>
@@ -90897,6 +90940,16 @@ class ContentBuilder {
90897
90940
  audioSelect: '',
90898
90941
  mediaSelect: '',
90899
90942
  // NEW: for image & video
90943
+ imageSelectWidth: '1024px',
90944
+ imageSelectHeight: '80vh',
90945
+ fileSelectWidth: '1024px',
90946
+ fileSelectHeight: '80vh',
90947
+ videoSelectWidth: '1024px',
90948
+ videoSelectHeight: '80vh',
90949
+ audioSelectWidth: '1024px',
90950
+ audioSelectHeight: '80vh',
90951
+ mediaSelectWidth: '1024px',
90952
+ mediaSelectHeight: '80vh',
90900
90953
  assetRefresh: false,
90901
90954
  // asset manager specified in imageSelect, fileSelect & videoSelect will always refreshed on click/open
90902
90955
  customTags: [],
@@ -103336,6 +103389,16 @@ class ContentBox {
103336
103389
  videoSelect: '',
103337
103390
  audioSelect: '',
103338
103391
  mediaSelect: '',
103392
+ imageSelectWidth: '1024px',
103393
+ imageSelectHeight: '80vh',
103394
+ fileSelectWidth: '1024px',
103395
+ fileSelectHeight: '80vh',
103396
+ videoSelectWidth: '1024px',
103397
+ videoSelectHeight: '80vh',
103398
+ audioSelectWidth: '1024px',
103399
+ audioSelectHeight: '80vh',
103400
+ mediaSelectWidth: '1024px',
103401
+ mediaSelectHeight: '80vh',
103339
103402
  slider: '',
103340
103403
  navbar: false,
103341
103404
  onRender: function () {},
@@ -106137,6 +106200,16 @@ class ContentBox {
106137
106200
  videoSelect: this.settings.videoSelect,
106138
106201
  audioSelect: this.settings.audioSelect,
106139
106202
  mediaSelect: this.settings.mediaSelect,
106203
+ imageSelectWidth: this.settings.imageSelectWidth,
106204
+ imageSelectHeight: this.settings.imageSelectHeight,
106205
+ fileSelectWidth: this.settings.fileSelectWidth,
106206
+ fileSelectHeight: this.settings.fileSelectHeight,
106207
+ videoSelectWidth: this.settings.videoSelectWidth,
106208
+ videoSelectHeight: this.settings.videoSelectHeight,
106209
+ audioSelectWidth: this.settings.audioSelectWidth,
106210
+ audioSelectHeight: this.settings.audioSelectHeight,
106211
+ mediaSelectWidth: this.settings.mediaSelectWidth,
106212
+ mediaSelectHeight: this.settings.mediaSelectHeight,
106140
106213
  onContentClick: e => {
106141
106214
  if (this.settings.onContentClick) this.settings.onContentClick();
106142
106215
  this.doc.body.classList.remove('temporary-hide-tools');