ide-assi 0.493.0 → 0.494.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.
@@ -121079,7 +121079,29 @@ class nxTab extends HTMLElement {
121079
121079
  }
121080
121080
 
121081
121081
  initialize = () => {
121082
+ this.shadowRoot.querySelectorAll(".tab-button").forEach((el, i) => {
121083
+ el.classList.remove("active");
121084
+ });
121085
+
121086
+ const activeButton = this.shadowRoot.querySelector('.tab-button:not([style*="display: none"])');
121087
+ console.log(activeButton);
121088
+ console.log(activeButton.getAttribute('data-target'), activeButton.data);
121089
+ //const tabPage = this.shadowRoot.querySelector(`#${activeButton.data}`);
121090
+
121091
+ if (activeButton) {
121092
+ activeButton.click(); // 자동으로 탭 전환
121093
+ }
121094
+
121095
+ /**
121096
+ const activeTab = this.shadowRoot.querySelector('.tab-button.active');
121082
121097
 
121098
+ // 현재 탭이 숨겨졌다면 첫 번째 visible 탭으로 이동
121099
+ if (activeTab && activeTab.style.display === 'none') {
121100
+ const nextVisibleTab = this.shadowRoot.querySelector('.tab-button:not([style*="display: none"])');
121101
+ if (nextVisibleTab) {
121102
+ nextVisibleTab.click(); // 자동으로 탭 전환
121103
+ }
121104
+ }*/
121083
121105
  }
121084
121106
 
121085
121107
  #renderTabs() {
@@ -121087,7 +121109,6 @@ class nxTab extends HTMLElement {
121087
121109
  const contents = this.shadowRoot.querySelector('.tab-pages');
121088
121110
  const tabItems = this.querySelectorAll('nx-tab-page');
121089
121111
 
121090
- /**
121091
121112
  tabItems.forEach((item, index) => {
121092
121113
  const tab = document.createElement('div');
121093
121114
  tab.classList.add('tab-button');
@@ -121100,20 +121121,6 @@ class nxTab extends HTMLElement {
121100
121121
  content.classList.add('tab-page');
121101
121122
  content.innerHTML = item.innerHTML;
121102
121123
  contents.appendChild(content);
121103
- }); */
121104
-
121105
- tabItems.forEach((item, index) => {
121106
- const tab = document.createElement('div');
121107
- tab.classList.add('tab-button');
121108
- tab.textContent = item.getAttribute('caption');
121109
- tab.setAttribute('data-target', `content${index}`);
121110
- tabs.appendChild(tab);
121111
-
121112
- const content = document.createElement('nx-tab-page');
121113
- content.id = `content${index}`;
121114
- content.classList.add('tab-page');
121115
- content.innerHTML = item.innerHTML;
121116
- contents.appendChild(content);
121117
121124
  });
121118
121125
 
121119
121126
  tabItems.forEach((item) => {
@@ -202917,6 +202924,7 @@ class IdeDiffPopup extends HTMLElement
202917
202924
  const tab = this.shadowRoot.querySelector('nx-tab');
202918
202925
 
202919
202926
  setTimeout(() => {
202927
+
202920
202928
  for (const item of changedSource) {
202921
202929
  const [type, diffData] = Object.entries(item)[0]; // 예: type = "mybatis", diffData = { asis, tobe }
202922
202930
  const diff = ninegrid.querySelector(`ide-diff.${type}`, this.shadowRoot);
@@ -202929,6 +202937,8 @@ class IdeDiffPopup extends HTMLElement
202929
202937
  );
202930
202938
  }
202931
202939
 
202940
+ tab.tabpage.showAll();
202941
+
202932
202942
  const types = changedSource.map(item => Object.keys(item)[0]);
202933
202943
  ninegrid.querySelectorAll("ide-diff", this.shadowRoot).forEach(el => {
202934
202944
  const type = el.className.trim();
@@ -202938,6 +202948,8 @@ class IdeDiffPopup extends HTMLElement
202938
202948
  });
202939
202949
  //this.shadowRoot.querySelector('nx-tab').tabpage.hide("mybatis");
202940
202950
 
202951
+ tab.initialize();
202952
+
202941
202953
  this.shadowRoot.querySelector('nx-dialog')?.showModal();
202942
202954
  }, 100);
202943
202955
  };
@@ -121075,7 +121075,29 @@ class nxTab extends HTMLElement {
121075
121075
  }
121076
121076
 
121077
121077
  initialize = () => {
121078
+ this.shadowRoot.querySelectorAll(".tab-button").forEach((el, i) => {
121079
+ el.classList.remove("active");
121080
+ });
121081
+
121082
+ const activeButton = this.shadowRoot.querySelector('.tab-button:not([style*="display: none"])');
121083
+ console.log(activeButton);
121084
+ console.log(activeButton.getAttribute('data-target'), activeButton.data);
121085
+ //const tabPage = this.shadowRoot.querySelector(`#${activeButton.data}`);
121086
+
121087
+ if (activeButton) {
121088
+ activeButton.click(); // 자동으로 탭 전환
121089
+ }
121090
+
121091
+ /**
121092
+ const activeTab = this.shadowRoot.querySelector('.tab-button.active');
121078
121093
 
121094
+ // 현재 탭이 숨겨졌다면 첫 번째 visible 탭으로 이동
121095
+ if (activeTab && activeTab.style.display === 'none') {
121096
+ const nextVisibleTab = this.shadowRoot.querySelector('.tab-button:not([style*="display: none"])');
121097
+ if (nextVisibleTab) {
121098
+ nextVisibleTab.click(); // 자동으로 탭 전환
121099
+ }
121100
+ }*/
121079
121101
  }
121080
121102
 
121081
121103
  #renderTabs() {
@@ -121083,7 +121105,6 @@ class nxTab extends HTMLElement {
121083
121105
  const contents = this.shadowRoot.querySelector('.tab-pages');
121084
121106
  const tabItems = this.querySelectorAll('nx-tab-page');
121085
121107
 
121086
- /**
121087
121108
  tabItems.forEach((item, index) => {
121088
121109
  const tab = document.createElement('div');
121089
121110
  tab.classList.add('tab-button');
@@ -121096,20 +121117,6 @@ class nxTab extends HTMLElement {
121096
121117
  content.classList.add('tab-page');
121097
121118
  content.innerHTML = item.innerHTML;
121098
121119
  contents.appendChild(content);
121099
- }); */
121100
-
121101
- tabItems.forEach((item, index) => {
121102
- const tab = document.createElement('div');
121103
- tab.classList.add('tab-button');
121104
- tab.textContent = item.getAttribute('caption');
121105
- tab.setAttribute('data-target', `content${index}`);
121106
- tabs.appendChild(tab);
121107
-
121108
- const content = document.createElement('nx-tab-page');
121109
- content.id = `content${index}`;
121110
- content.classList.add('tab-page');
121111
- content.innerHTML = item.innerHTML;
121112
- contents.appendChild(content);
121113
121120
  });
121114
121121
 
121115
121122
  tabItems.forEach((item) => {
@@ -202913,6 +202920,7 @@ class IdeDiffPopup extends HTMLElement
202913
202920
  const tab = this.shadowRoot.querySelector('nx-tab');
202914
202921
 
202915
202922
  setTimeout(() => {
202923
+
202916
202924
  for (const item of changedSource) {
202917
202925
  const [type, diffData] = Object.entries(item)[0]; // 예: type = "mybatis", diffData = { asis, tobe }
202918
202926
  const diff = ninegrid.querySelector(`ide-diff.${type}`, this.shadowRoot);
@@ -202925,6 +202933,8 @@ class IdeDiffPopup extends HTMLElement
202925
202933
  );
202926
202934
  }
202927
202935
 
202936
+ tab.tabpage.showAll();
202937
+
202928
202938
  const types = changedSource.map(item => Object.keys(item)[0]);
202929
202939
  ninegrid.querySelectorAll("ide-diff", this.shadowRoot).forEach(el => {
202930
202940
  const type = el.className.trim();
@@ -202934,6 +202944,8 @@ class IdeDiffPopup extends HTMLElement
202934
202944
  });
202935
202945
  //this.shadowRoot.querySelector('nx-tab').tabpage.hide("mybatis");
202936
202946
 
202947
+ tab.initialize();
202948
+
202937
202949
  this.shadowRoot.querySelector('nx-dialog')?.showModal();
202938
202950
  }, 100);
202939
202951
  };
@@ -41,6 +41,7 @@ class IdeDiffPopup extends HTMLElement
41
41
  const tab = this.shadowRoot.querySelector('nx-tab');
42
42
 
43
43
  setTimeout(() => {
44
+
44
45
  for (const item of changedSource) {
45
46
  const [type, diffData] = Object.entries(item)[0]; // 예: type = "mybatis", diffData = { asis, tobe }
46
47
  const diff = ninegrid.querySelector(`ide-diff.${type}`, this.shadowRoot);
@@ -53,6 +54,8 @@ class IdeDiffPopup extends HTMLElement
53
54
  );
54
55
  }
55
56
 
57
+ tab.tabpage.showAll();
58
+
56
59
  const types = changedSource.map(item => Object.keys(item)[0]);
57
60
  ninegrid.querySelectorAll("ide-diff", this.shadowRoot).forEach(el => {
58
61
  const type = el.className.trim();
@@ -62,6 +65,8 @@ class IdeDiffPopup extends HTMLElement
62
65
  });
63
66
  //this.shadowRoot.querySelector('nx-tab').tabpage.hide("mybatis");
64
67
 
68
+ tab.initialize();
69
+
65
70
  this.shadowRoot.querySelector('nx-dialog')?.showModal();
66
71
  }, 100);
67
72
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.493.0",
4
+ "version": "0.494.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -41,6 +41,7 @@ class IdeDiffPopup extends HTMLElement
41
41
  const tab = this.shadowRoot.querySelector('nx-tab');
42
42
 
43
43
  setTimeout(() => {
44
+
44
45
  for (const item of changedSource) {
45
46
  const [type, diffData] = Object.entries(item)[0]; // 예: type = "mybatis", diffData = { asis, tobe }
46
47
  const diff = ninegrid.querySelector(`ide-diff.${type}`, this.shadowRoot);
@@ -53,6 +54,8 @@ class IdeDiffPopup extends HTMLElement
53
54
  );
54
55
  }
55
56
 
57
+ tab.tabpage.showAll();
58
+
56
59
  const types = changedSource.map(item => Object.keys(item)[0]);
57
60
  ninegrid.querySelectorAll("ide-diff", this.shadowRoot).forEach(el => {
58
61
  const type = el.className.trim();
@@ -62,6 +65,8 @@ class IdeDiffPopup extends HTMLElement
62
65
  });
63
66
  //this.shadowRoot.querySelector('nx-tab').tabpage.hide("mybatis");
64
67
 
68
+ tab.initialize();
69
+
65
70
  this.shadowRoot.querySelector('nx-dialog')?.showModal();
66
71
  }, 100);
67
72
  };