ninegrid2 6.887.0 → 6.888.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.
- package/dist/bundle.cjs.js +22 -15
- package/dist/bundle.esm.js +22 -15
- package/dist/nx/nxTab.js +22 -15
- package/package.json +1 -1
- package/src/nx/nxTab.js +22 -15
package/dist/bundle.cjs.js
CHANGED
|
@@ -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,21 +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
|
-
tabItems.forEach((item, index) => {
|
|
121088
|
-
const tab = document.createElement('div');
|
|
121089
|
-
tab.classList.add('tab-button');
|
|
121090
|
-
tab.textContent = item.getAttribute('caption');
|
|
121091
|
-
tab.setAttribute('data-target', `content${index}`);
|
|
121092
|
-
tabs.appendChild(tab);
|
|
121093
|
-
|
|
121094
|
-
const content = document.createElement('div');
|
|
121095
|
-
content.id = `content${index}`;
|
|
121096
|
-
content.classList.add('tab-page');
|
|
121097
|
-
content.innerHTML = item.innerHTML;
|
|
121098
|
-
contents.appendChild(content);
|
|
121099
|
-
}); */
|
|
121100
|
-
|
|
121101
121108
|
tabItems.forEach((item, index) => {
|
|
121102
121109
|
const tab = document.createElement('div');
|
|
121103
121110
|
tab.classList.add('tab-button');
|
package/dist/bundle.esm.js
CHANGED
|
@@ -121071,7 +121071,29 @@ class nxTab extends HTMLElement {
|
|
|
121071
121071
|
}
|
|
121072
121072
|
|
|
121073
121073
|
initialize = () => {
|
|
121074
|
+
this.shadowRoot.querySelectorAll(".tab-button").forEach((el, i) => {
|
|
121075
|
+
el.classList.remove("active");
|
|
121076
|
+
});
|
|
121077
|
+
|
|
121078
|
+
const activeButton = this.shadowRoot.querySelector('.tab-button:not([style*="display: none"])');
|
|
121079
|
+
console.log(activeButton);
|
|
121080
|
+
console.log(activeButton.getAttribute('data-target'), activeButton.data);
|
|
121081
|
+
//const tabPage = this.shadowRoot.querySelector(`#${activeButton.data}`);
|
|
121082
|
+
|
|
121083
|
+
if (activeButton) {
|
|
121084
|
+
activeButton.click(); // 자동으로 탭 전환
|
|
121085
|
+
}
|
|
121086
|
+
|
|
121087
|
+
/**
|
|
121088
|
+
const activeTab = this.shadowRoot.querySelector('.tab-button.active');
|
|
121074
121089
|
|
|
121090
|
+
// 현재 탭이 숨겨졌다면 첫 번째 visible 탭으로 이동
|
|
121091
|
+
if (activeTab && activeTab.style.display === 'none') {
|
|
121092
|
+
const nextVisibleTab = this.shadowRoot.querySelector('.tab-button:not([style*="display: none"])');
|
|
121093
|
+
if (nextVisibleTab) {
|
|
121094
|
+
nextVisibleTab.click(); // 자동으로 탭 전환
|
|
121095
|
+
}
|
|
121096
|
+
}*/
|
|
121075
121097
|
}
|
|
121076
121098
|
|
|
121077
121099
|
#renderTabs() {
|
|
@@ -121079,21 +121101,6 @@ class nxTab extends HTMLElement {
|
|
|
121079
121101
|
const contents = this.shadowRoot.querySelector('.tab-pages');
|
|
121080
121102
|
const tabItems = this.querySelectorAll('nx-tab-page');
|
|
121081
121103
|
|
|
121082
|
-
/**
|
|
121083
|
-
tabItems.forEach((item, index) => {
|
|
121084
|
-
const tab = document.createElement('div');
|
|
121085
|
-
tab.classList.add('tab-button');
|
|
121086
|
-
tab.textContent = item.getAttribute('caption');
|
|
121087
|
-
tab.setAttribute('data-target', `content${index}`);
|
|
121088
|
-
tabs.appendChild(tab);
|
|
121089
|
-
|
|
121090
|
-
const content = document.createElement('div');
|
|
121091
|
-
content.id = `content${index}`;
|
|
121092
|
-
content.classList.add('tab-page');
|
|
121093
|
-
content.innerHTML = item.innerHTML;
|
|
121094
|
-
contents.appendChild(content);
|
|
121095
|
-
}); */
|
|
121096
|
-
|
|
121097
121104
|
tabItems.forEach((item, index) => {
|
|
121098
121105
|
const tab = document.createElement('div');
|
|
121099
121106
|
tab.classList.add('tab-button');
|
package/dist/nx/nxTab.js
CHANGED
|
@@ -52,7 +52,29 @@ class nxTab extends HTMLElement {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
initialize = () => {
|
|
55
|
+
this.shadowRoot.querySelectorAll(".tab-button").forEach((el, i) => {
|
|
56
|
+
el.classList.remove("active");
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const activeButton = this.shadowRoot.querySelector('.tab-button:not([style*="display: none"])');
|
|
60
|
+
console.log(activeButton);
|
|
61
|
+
console.log(activeButton.getAttribute('data-target'), activeButton.data);
|
|
62
|
+
//const tabPage = this.shadowRoot.querySelector(`#${activeButton.data}`);
|
|
63
|
+
|
|
64
|
+
if (activeButton) {
|
|
65
|
+
activeButton.click(); // 자동으로 탭 전환
|
|
66
|
+
}
|
|
55
67
|
|
|
68
|
+
/**
|
|
69
|
+
const activeTab = this.shadowRoot.querySelector('.tab-button.active');
|
|
70
|
+
|
|
71
|
+
// 현재 탭이 숨겨졌다면 첫 번째 visible 탭으로 이동
|
|
72
|
+
if (activeTab && activeTab.style.display === 'none') {
|
|
73
|
+
const nextVisibleTab = this.shadowRoot.querySelector('.tab-button:not([style*="display: none"])');
|
|
74
|
+
if (nextVisibleTab) {
|
|
75
|
+
nextVisibleTab.click(); // 자동으로 탭 전환
|
|
76
|
+
}
|
|
77
|
+
}*/
|
|
56
78
|
}
|
|
57
79
|
|
|
58
80
|
#renderTabs() {
|
|
@@ -60,21 +82,6 @@ class nxTab extends HTMLElement {
|
|
|
60
82
|
const contents = this.shadowRoot.querySelector('.tab-pages');
|
|
61
83
|
const tabItems = this.querySelectorAll('nx-tab-page');
|
|
62
84
|
|
|
63
|
-
/**
|
|
64
|
-
tabItems.forEach((item, index) => {
|
|
65
|
-
const tab = document.createElement('div');
|
|
66
|
-
tab.classList.add('tab-button');
|
|
67
|
-
tab.textContent = item.getAttribute('caption');
|
|
68
|
-
tab.setAttribute('data-target', `content${index}`);
|
|
69
|
-
tabs.appendChild(tab);
|
|
70
|
-
|
|
71
|
-
const content = document.createElement('div');
|
|
72
|
-
content.id = `content${index}`;
|
|
73
|
-
content.classList.add('tab-page');
|
|
74
|
-
content.innerHTML = item.innerHTML;
|
|
75
|
-
contents.appendChild(content);
|
|
76
|
-
}); */
|
|
77
|
-
|
|
78
85
|
tabItems.forEach((item, index) => {
|
|
79
86
|
const tab = document.createElement('div');
|
|
80
87
|
tab.classList.add('tab-button');
|
package/package.json
CHANGED
package/src/nx/nxTab.js
CHANGED
|
@@ -52,7 +52,29 @@ class nxTab extends HTMLElement {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
initialize = () => {
|
|
55
|
+
this.shadowRoot.querySelectorAll(".tab-button").forEach((el, i) => {
|
|
56
|
+
el.classList.remove("active");
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const activeButton = this.shadowRoot.querySelector('.tab-button:not([style*="display: none"])');
|
|
60
|
+
console.log(activeButton);
|
|
61
|
+
console.log(activeButton.getAttribute('data-target'), activeButton.data);
|
|
62
|
+
//const tabPage = this.shadowRoot.querySelector(`#${activeButton.data}`);
|
|
63
|
+
|
|
64
|
+
if (activeButton) {
|
|
65
|
+
activeButton.click(); // 자동으로 탭 전환
|
|
66
|
+
}
|
|
55
67
|
|
|
68
|
+
/**
|
|
69
|
+
const activeTab = this.shadowRoot.querySelector('.tab-button.active');
|
|
70
|
+
|
|
71
|
+
// 현재 탭이 숨겨졌다면 첫 번째 visible 탭으로 이동
|
|
72
|
+
if (activeTab && activeTab.style.display === 'none') {
|
|
73
|
+
const nextVisibleTab = this.shadowRoot.querySelector('.tab-button:not([style*="display: none"])');
|
|
74
|
+
if (nextVisibleTab) {
|
|
75
|
+
nextVisibleTab.click(); // 자동으로 탭 전환
|
|
76
|
+
}
|
|
77
|
+
}*/
|
|
56
78
|
}
|
|
57
79
|
|
|
58
80
|
#renderTabs() {
|
|
@@ -60,21 +82,6 @@ class nxTab extends HTMLElement {
|
|
|
60
82
|
const contents = this.shadowRoot.querySelector('.tab-pages');
|
|
61
83
|
const tabItems = this.querySelectorAll('nx-tab-page');
|
|
62
84
|
|
|
63
|
-
/**
|
|
64
|
-
tabItems.forEach((item, index) => {
|
|
65
|
-
const tab = document.createElement('div');
|
|
66
|
-
tab.classList.add('tab-button');
|
|
67
|
-
tab.textContent = item.getAttribute('caption');
|
|
68
|
-
tab.setAttribute('data-target', `content${index}`);
|
|
69
|
-
tabs.appendChild(tab);
|
|
70
|
-
|
|
71
|
-
const content = document.createElement('div');
|
|
72
|
-
content.id = `content${index}`;
|
|
73
|
-
content.classList.add('tab-page');
|
|
74
|
-
content.innerHTML = item.innerHTML;
|
|
75
|
-
contents.appendChild(content);
|
|
76
|
-
}); */
|
|
77
|
-
|
|
78
85
|
tabItems.forEach((item, index) => {
|
|
79
86
|
const tab = document.createElement('div');
|
|
80
87
|
tab.classList.add('tab-button');
|