ninegrid2 6.728.0 → 6.730.0

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.
@@ -120890,6 +120890,8 @@ class nxTab extends HTMLElement {
120890
120890
  }
120891
120891
 
120892
120892
  this.shadowRoot.querySelectorAll('.tab-page:not(.active)').forEach(el => { el.classList.add('exit-right'); });
120893
+
120894
+ this.#init();
120893
120895
  }
120894
120896
 
120895
120897
  #renderTabs() {
@@ -120952,7 +120954,24 @@ class nxTab extends HTMLElement {
120952
120954
  this.shadowRoot.querySelector('.tab-pages').style.height = `${newContent.scrollHeight}px`;
120953
120955
 
120954
120956
  //console.log(newContent.style.height, newContent.scrollHeight);
120955
- }
120957
+ };
120958
+
120959
+ #init = () => {
120960
+ const observer = new MutationObserver(() => {
120961
+ console.log("1111");
120962
+ const activeContent = this.shadowRoot.querySelector('.tab-page.active');
120963
+ if (activeContent) {
120964
+ this.shadowRoot.querySelector('.tab-pages').style.height = `${activeContent.scrollHeight}px`;
120965
+ }
120966
+ });
120967
+
120968
+ const tabPages = this.shadowRoot.querySelector('.tab-pages');
120969
+ observer.observe(tabPages, {
120970
+ childList: true,
120971
+ subtree: true,
120972
+ characterData: true
120973
+ });
120974
+ };
120956
120975
  }
120957
120976
 
120958
120977
  class nxTabPage extends HTMLElement {
@@ -120886,6 +120886,8 @@ class nxTab extends HTMLElement {
120886
120886
  }
120887
120887
 
120888
120888
  this.shadowRoot.querySelectorAll('.tab-page:not(.active)').forEach(el => { el.classList.add('exit-right'); });
120889
+
120890
+ this.#init();
120889
120891
  }
120890
120892
 
120891
120893
  #renderTabs() {
@@ -120948,7 +120950,24 @@ class nxTab extends HTMLElement {
120948
120950
  this.shadowRoot.querySelector('.tab-pages').style.height = `${newContent.scrollHeight}px`;
120949
120951
 
120950
120952
  //console.log(newContent.style.height, newContent.scrollHeight);
120951
- }
120953
+ };
120954
+
120955
+ #init = () => {
120956
+ const observer = new MutationObserver(() => {
120957
+ console.log("1111");
120958
+ const activeContent = this.shadowRoot.querySelector('.tab-page.active');
120959
+ if (activeContent) {
120960
+ this.shadowRoot.querySelector('.tab-pages').style.height = `${activeContent.scrollHeight}px`;
120961
+ }
120962
+ });
120963
+
120964
+ const tabPages = this.shadowRoot.querySelector('.tab-pages');
120965
+ observer.observe(tabPages, {
120966
+ childList: true,
120967
+ subtree: true,
120968
+ characterData: true
120969
+ });
120970
+ };
120952
120971
  }
120953
120972
 
120954
120973
  class nxTabPage extends HTMLElement {
package/dist/nx/nxTab.js CHANGED
@@ -42,6 +42,8 @@ class nxTab extends HTMLElement {
42
42
  }
43
43
 
44
44
  this.shadowRoot.querySelectorAll('.tab-page:not(.active)').forEach(el => { el.classList.add('exit-right') });
45
+
46
+ this.#init();
45
47
  }
46
48
 
47
49
  #renderTabs() {
@@ -104,7 +106,24 @@ class nxTab extends HTMLElement {
104
106
  this.shadowRoot.querySelector('.tab-pages').style.height = `${newContent.scrollHeight}px`;
105
107
 
106
108
  //console.log(newContent.style.height, newContent.scrollHeight);
107
- }
109
+ };
110
+
111
+ #init = () => {
112
+ const observer = new MutationObserver(() => {
113
+ console.log("1111")
114
+ const activeContent = this.shadowRoot.querySelector('.tab-page.active');
115
+ if (activeContent) {
116
+ this.shadowRoot.querySelector('.tab-pages').style.height = `${activeContent.scrollHeight}px`;
117
+ }
118
+ });
119
+
120
+ const tabPages = this.shadowRoot.querySelector('.tab-pages');
121
+ observer.observe(tabPages, {
122
+ childList: true,
123
+ subtree: true,
124
+ characterData: true
125
+ });
126
+ };
108
127
  }
109
128
 
110
129
  class nxTabPage extends HTMLElement {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.728.0",
4
+ "version": "6.730.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
package/src/nx/nxTab.js CHANGED
@@ -42,6 +42,8 @@ class nxTab extends HTMLElement {
42
42
  }
43
43
 
44
44
  this.shadowRoot.querySelectorAll('.tab-page:not(.active)').forEach(el => { el.classList.add('exit-right') });
45
+
46
+ this.#init();
45
47
  }
46
48
 
47
49
  #renderTabs() {
@@ -104,7 +106,24 @@ class nxTab extends HTMLElement {
104
106
  this.shadowRoot.querySelector('.tab-pages').style.height = `${newContent.scrollHeight}px`;
105
107
 
106
108
  //console.log(newContent.style.height, newContent.scrollHeight);
107
- }
109
+ };
110
+
111
+ #init = () => {
112
+ const observer = new MutationObserver(() => {
113
+ console.log("1111")
114
+ const activeContent = this.shadowRoot.querySelector('.tab-page.active');
115
+ if (activeContent) {
116
+ this.shadowRoot.querySelector('.tab-pages').style.height = `${activeContent.scrollHeight}px`;
117
+ }
118
+ });
119
+
120
+ const tabPages = this.shadowRoot.querySelector('.tab-pages');
121
+ observer.observe(tabPages, {
122
+ childList: true,
123
+ subtree: true,
124
+ characterData: true
125
+ });
126
+ };
108
127
  }
109
128
 
110
129
  class nxTabPage extends HTMLElement {