ide-assi 0.492.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.
@@ -121049,6 +121049,18 @@ class nxTab extends HTMLElement {
121049
121049
 
121050
121050
 
121051
121051
  this.tabpage = {
121052
+ show: (v) => {
121053
+ this.shadowRoot.querySelectorAll(".tab-button").forEach((el, i) => {
121054
+ if (el.innerText.trim() === v) {
121055
+ el.style.display = "unset";
121056
+ }
121057
+ });
121058
+ },
121059
+ showAll: () => {
121060
+ this.shadowRoot.querySelectorAll(".tab-button").forEach((el, i) => {
121061
+ el.style.display = "unset";
121062
+ });
121063
+ },
121052
121064
  hide: (v) => {
121053
121065
  this.shadowRoot.querySelectorAll(".tab-button").forEach((el, i) => {
121054
121066
  if (el.innerText.trim() === v) {
@@ -121066,6 +121078,32 @@ class nxTab extends HTMLElement {
121066
121078
  this.dispatchEvent(new CustomEvent(ninegrid.EVENT.TAB_LOAD, { bubbles: true, detail: {} }));
121067
121079
  }
121068
121080
 
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');
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
+ }*/
121105
+ }
121106
+
121069
121107
  #renderTabs() {
121070
121108
  const tabs = this.shadowRoot.querySelector('.tabs');
121071
121109
  const contents = this.shadowRoot.querySelector('.tab-pages');
@@ -202883,7 +202921,10 @@ class IdeDiffPopup extends HTMLElement
202883
202921
 
202884
202922
  popup = (changedSource) => {
202885
202923
 
202924
+ const tab = this.shadowRoot.querySelector('nx-tab');
202925
+
202886
202926
  setTimeout(() => {
202927
+
202887
202928
  for (const item of changedSource) {
202888
202929
  const [type, diffData] = Object.entries(item)[0]; // 예: type = "mybatis", diffData = { asis, tobe }
202889
202930
  const diff = ninegrid.querySelector(`ide-diff.${type}`, this.shadowRoot);
@@ -202896,8 +202937,9 @@ class IdeDiffPopup extends HTMLElement
202896
202937
  );
202897
202938
  }
202898
202939
 
202940
+ tab.tabpage.showAll();
202941
+
202899
202942
  const types = changedSource.map(item => Object.keys(item)[0]);
202900
- const tab = this.shadowRoot.querySelector('nx-tab');
202901
202943
  ninegrid.querySelectorAll("ide-diff", this.shadowRoot).forEach(el => {
202902
202944
  const type = el.className.trim();
202903
202945
  if (!types.includes(type)) {
@@ -202906,6 +202948,8 @@ class IdeDiffPopup extends HTMLElement
202906
202948
  });
202907
202949
  //this.shadowRoot.querySelector('nx-tab').tabpage.hide("mybatis");
202908
202950
 
202951
+ tab.initialize();
202952
+
202909
202953
  this.shadowRoot.querySelector('nx-dialog')?.showModal();
202910
202954
  }, 100);
202911
202955
  };
@@ -121045,6 +121045,18 @@ class nxTab extends HTMLElement {
121045
121045
 
121046
121046
 
121047
121047
  this.tabpage = {
121048
+ show: (v) => {
121049
+ this.shadowRoot.querySelectorAll(".tab-button").forEach((el, i) => {
121050
+ if (el.innerText.trim() === v) {
121051
+ el.style.display = "unset";
121052
+ }
121053
+ });
121054
+ },
121055
+ showAll: () => {
121056
+ this.shadowRoot.querySelectorAll(".tab-button").forEach((el, i) => {
121057
+ el.style.display = "unset";
121058
+ });
121059
+ },
121048
121060
  hide: (v) => {
121049
121061
  this.shadowRoot.querySelectorAll(".tab-button").forEach((el, i) => {
121050
121062
  if (el.innerText.trim() === v) {
@@ -121062,6 +121074,32 @@ class nxTab extends HTMLElement {
121062
121074
  this.dispatchEvent(new CustomEvent(ninegrid.EVENT.TAB_LOAD, { bubbles: true, detail: {} }));
121063
121075
  }
121064
121076
 
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');
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
+ }*/
121101
+ }
121102
+
121065
121103
  #renderTabs() {
121066
121104
  const tabs = this.shadowRoot.querySelector('.tabs');
121067
121105
  const contents = this.shadowRoot.querySelector('.tab-pages');
@@ -202879,7 +202917,10 @@ class IdeDiffPopup extends HTMLElement
202879
202917
 
202880
202918
  popup = (changedSource) => {
202881
202919
 
202920
+ const tab = this.shadowRoot.querySelector('nx-tab');
202921
+
202882
202922
  setTimeout(() => {
202923
+
202883
202924
  for (const item of changedSource) {
202884
202925
  const [type, diffData] = Object.entries(item)[0]; // 예: type = "mybatis", diffData = { asis, tobe }
202885
202926
  const diff = ninegrid.querySelector(`ide-diff.${type}`, this.shadowRoot);
@@ -202892,8 +202933,9 @@ class IdeDiffPopup extends HTMLElement
202892
202933
  );
202893
202934
  }
202894
202935
 
202936
+ tab.tabpage.showAll();
202937
+
202895
202938
  const types = changedSource.map(item => Object.keys(item)[0]);
202896
- const tab = this.shadowRoot.querySelector('nx-tab');
202897
202939
  ninegrid.querySelectorAll("ide-diff", this.shadowRoot).forEach(el => {
202898
202940
  const type = el.className.trim();
202899
202941
  if (!types.includes(type)) {
@@ -202902,6 +202944,8 @@ class IdeDiffPopup extends HTMLElement
202902
202944
  });
202903
202945
  //this.shadowRoot.querySelector('nx-tab').tabpage.hide("mybatis");
202904
202946
 
202947
+ tab.initialize();
202948
+
202905
202949
  this.shadowRoot.querySelector('nx-dialog')?.showModal();
202906
202950
  }, 100);
202907
202951
  };
@@ -38,7 +38,10 @@ class IdeDiffPopup extends HTMLElement
38
38
 
39
39
  popup = (changedSource) => {
40
40
 
41
+ const tab = this.shadowRoot.querySelector('nx-tab');
42
+
41
43
  setTimeout(() => {
44
+
42
45
  for (const item of changedSource) {
43
46
  const [type, diffData] = Object.entries(item)[0]; // 예: type = "mybatis", diffData = { asis, tobe }
44
47
  const diff = ninegrid.querySelector(`ide-diff.${type}`, this.shadowRoot);
@@ -51,8 +54,9 @@ class IdeDiffPopup extends HTMLElement
51
54
  );
52
55
  }
53
56
 
57
+ tab.tabpage.showAll();
58
+
54
59
  const types = changedSource.map(item => Object.keys(item)[0]);
55
- const tab = this.shadowRoot.querySelector('nx-tab');
56
60
  ninegrid.querySelectorAll("ide-diff", this.shadowRoot).forEach(el => {
57
61
  const type = el.className.trim();
58
62
  if (!types.includes(type)) {
@@ -61,6 +65,8 @@ class IdeDiffPopup extends HTMLElement
61
65
  });
62
66
  //this.shadowRoot.querySelector('nx-tab').tabpage.hide("mybatis");
63
67
 
68
+ tab.initialize();
69
+
64
70
  this.shadowRoot.querySelector('nx-dialog')?.showModal();
65
71
  }, 100);
66
72
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.492.0",
4
+ "version": "0.494.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -38,7 +38,10 @@ class IdeDiffPopup extends HTMLElement
38
38
 
39
39
  popup = (changedSource) => {
40
40
 
41
+ const tab = this.shadowRoot.querySelector('nx-tab');
42
+
41
43
  setTimeout(() => {
44
+
42
45
  for (const item of changedSource) {
43
46
  const [type, diffData] = Object.entries(item)[0]; // 예: type = "mybatis", diffData = { asis, tobe }
44
47
  const diff = ninegrid.querySelector(`ide-diff.${type}`, this.shadowRoot);
@@ -51,8 +54,9 @@ class IdeDiffPopup extends HTMLElement
51
54
  );
52
55
  }
53
56
 
57
+ tab.tabpage.showAll();
58
+
54
59
  const types = changedSource.map(item => Object.keys(item)[0]);
55
- const tab = this.shadowRoot.querySelector('nx-tab');
56
60
  ninegrid.querySelectorAll("ide-diff", this.shadowRoot).forEach(el => {
57
61
  const type = el.className.trim();
58
62
  if (!types.includes(type)) {
@@ -61,6 +65,8 @@ class IdeDiffPopup extends HTMLElement
61
65
  });
62
66
  //this.shadowRoot.querySelector('nx-tab').tabpage.hide("mybatis");
63
67
 
68
+ tab.initialize();
69
+
64
70
  this.shadowRoot.querySelector('nx-dialog')?.showModal();
65
71
  }, 100);
66
72
  };