ninegrid2 6.1122.0 → 6.1124.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 +30 -74
- package/dist/bundle.esm.js +30 -74
- package/dist/index.js +1 -1
- package/dist/nx/_nxDiv.js +22 -0
- package/dist/nx/nxButtons.js +10 -7
- package/package.json +1 -1
- package/src/index.js +1 -1
- package/src/nx/_nxDiv.js +22 -0
- package/src/nx/nxButtons.js +10 -7
- package/src/nx/nxDiv.js.bak +68 -0
- /package/{src/nx/nxDiv.js → dist/nx/nxDiv.js.bak} +0 -0
package/dist/bundle.cjs.js
CHANGED
|
@@ -120936,73 +120936,6 @@ Array.prototype.nineBinarySearch = function(target)
|
|
|
120936
120936
|
return -1;
|
|
120937
120937
|
};
|
|
120938
120938
|
|
|
120939
|
-
class nxDiv extends HTMLElement {
|
|
120940
|
-
constructor() {
|
|
120941
|
-
super();
|
|
120942
|
-
this.attachShadow({ mode: "open" });
|
|
120943
|
-
this.isCollapsed = false; // 검색 박스 상태 (true: 축소됨, false: 확장됨)
|
|
120944
|
-
}
|
|
120945
|
-
|
|
120946
|
-
connectedCallback() {
|
|
120947
|
-
this.#init();
|
|
120948
|
-
}
|
|
120949
|
-
|
|
120950
|
-
getJsonData = () => {
|
|
120951
|
-
const parent = this.shadowRoot.querySelector(".search-content");
|
|
120952
|
-
const elements = parent.querySelectorAll("[id]");
|
|
120953
|
-
const jsonData = {};
|
|
120954
|
-
|
|
120955
|
-
elements.forEach(element => {
|
|
120956
|
-
if (element.tagName === "INPUT" || element.tagName === "TEXTAREA" || element.tagName === "SELECT") {
|
|
120957
|
-
jsonData[element.id] = element.value;
|
|
120958
|
-
} else {
|
|
120959
|
-
jsonData[element.id] = element.textContent.trim();
|
|
120960
|
-
}
|
|
120961
|
-
});
|
|
120962
|
-
|
|
120963
|
-
return jsonData;
|
|
120964
|
-
};
|
|
120965
|
-
|
|
120966
|
-
getSearchOptions = () => {
|
|
120967
|
-
|
|
120968
|
-
};
|
|
120969
|
-
|
|
120970
|
-
#init = () => {
|
|
120971
|
-
const contents = this.innerHTML.trim();
|
|
120972
|
-
this.innerHTML = ""; // 기존 내부 HTML 제거
|
|
120973
|
-
|
|
120974
|
-
const htmlTmpl = document.createElement("template");
|
|
120975
|
-
htmlTmpl.innerHTML = `
|
|
120976
|
-
<style>
|
|
120977
|
-
@import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxDiv.css";
|
|
120978
|
-
${ninegrid.getCustomPath(this,"nxDiv.css")}
|
|
120979
|
-
</style>
|
|
120980
|
-
|
|
120981
|
-
<div class="search-container">
|
|
120982
|
-
<span class="toggle-icon"></span>
|
|
120983
|
-
<div class="search-content">${contents}</div>
|
|
120984
|
-
</div>
|
|
120985
|
-
`;
|
|
120986
|
-
|
|
120987
|
-
this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
|
|
120988
|
-
|
|
120989
|
-
this.#setupToggle();
|
|
120990
|
-
}
|
|
120991
|
-
|
|
120992
|
-
#setupToggle = () => {
|
|
120993
|
-
const toggleIcon = this.shadowRoot.querySelector(".toggle-icon");
|
|
120994
|
-
const searchContainer = this.shadowRoot.querySelector(".search-container");
|
|
120995
|
-
|
|
120996
|
-
toggleIcon.addEventListener("click", () => {
|
|
120997
|
-
this.isCollapsed = !this.isCollapsed;
|
|
120998
|
-
//toggleIcon.innerHTML = this.isCollapsed ? "" : "X";
|
|
120999
|
-
searchContainer.classList.toggle("collapse", this.isCollapsed);
|
|
121000
|
-
});
|
|
121001
|
-
}
|
|
121002
|
-
}
|
|
121003
|
-
|
|
121004
|
-
customElements.define("nx-div", nxDiv);
|
|
121005
|
-
|
|
121006
120939
|
class nxCollapse extends HTMLElement {
|
|
121007
120940
|
#target;
|
|
121008
120941
|
#targetPrevDisplay;
|
|
@@ -122076,21 +122009,44 @@ class nxPanel extends HTMLElement {
|
|
|
122076
122009
|
|
|
122077
122010
|
customElements.define("nx-panel", nxPanel);
|
|
122078
122011
|
|
|
122079
|
-
class
|
|
122012
|
+
class nxDiv extends HTMLElement
|
|
122013
|
+
{
|
|
122014
|
+
isInitialized = false;
|
|
122015
|
+
|
|
122016
|
+
constructor () {
|
|
122017
|
+
super();
|
|
122018
|
+
this.attachShadow({ mode: 'open' });
|
|
122019
|
+
}
|
|
122020
|
+
|
|
122021
|
+
connectedCallback() {
|
|
122022
|
+
if (!this.isInitialized) {
|
|
122023
|
+
this.#init();
|
|
122024
|
+
this.isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
122025
|
+
}
|
|
122026
|
+
}
|
|
122027
|
+
|
|
122028
|
+
#init = () => {
|
|
122029
|
+
console.log("super.connectedCallback");
|
|
122030
|
+
};
|
|
122031
|
+
}
|
|
122032
|
+
|
|
122033
|
+
class nxButtons extends nxDiv {
|
|
122080
122034
|
// 1. 초기화 상태를 저장할 플래그를 추가합니다.
|
|
122081
|
-
|
|
122035
|
+
//#isInitialized = false;
|
|
122082
122036
|
|
|
122083
122037
|
constructor() {
|
|
122084
122038
|
super();
|
|
122085
|
-
this.attachShadow({ mode: "open" });
|
|
122086
122039
|
}
|
|
122087
122040
|
|
|
122088
122041
|
connectedCallback() {
|
|
122042
|
+
console.log("==========", super.isInitialized);
|
|
122089
122043
|
// 2. 초기화되지 않았을 때만 #init 함수를 호출합니다.
|
|
122090
|
-
if (!this.#isInitialized) {
|
|
122091
|
-
this.#init();
|
|
122092
|
-
this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
122093
|
-
|
|
122044
|
+
//if (!this.#isInitialized) {
|
|
122045
|
+
//this.#init();
|
|
122046
|
+
//this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
122047
|
+
|
|
122048
|
+
super.connectedCallback();
|
|
122049
|
+
//}
|
|
122094
122050
|
}
|
|
122095
122051
|
|
|
122096
122052
|
#init = () => {
|
package/dist/bundle.esm.js
CHANGED
|
@@ -120932,73 +120932,6 @@ Array.prototype.nineBinarySearch = function(target)
|
|
|
120932
120932
|
return -1;
|
|
120933
120933
|
};
|
|
120934
120934
|
|
|
120935
|
-
class nxDiv extends HTMLElement {
|
|
120936
|
-
constructor() {
|
|
120937
|
-
super();
|
|
120938
|
-
this.attachShadow({ mode: "open" });
|
|
120939
|
-
this.isCollapsed = false; // 검색 박스 상태 (true: 축소됨, false: 확장됨)
|
|
120940
|
-
}
|
|
120941
|
-
|
|
120942
|
-
connectedCallback() {
|
|
120943
|
-
this.#init();
|
|
120944
|
-
}
|
|
120945
|
-
|
|
120946
|
-
getJsonData = () => {
|
|
120947
|
-
const parent = this.shadowRoot.querySelector(".search-content");
|
|
120948
|
-
const elements = parent.querySelectorAll("[id]");
|
|
120949
|
-
const jsonData = {};
|
|
120950
|
-
|
|
120951
|
-
elements.forEach(element => {
|
|
120952
|
-
if (element.tagName === "INPUT" || element.tagName === "TEXTAREA" || element.tagName === "SELECT") {
|
|
120953
|
-
jsonData[element.id] = element.value;
|
|
120954
|
-
} else {
|
|
120955
|
-
jsonData[element.id] = element.textContent.trim();
|
|
120956
|
-
}
|
|
120957
|
-
});
|
|
120958
|
-
|
|
120959
|
-
return jsonData;
|
|
120960
|
-
};
|
|
120961
|
-
|
|
120962
|
-
getSearchOptions = () => {
|
|
120963
|
-
|
|
120964
|
-
};
|
|
120965
|
-
|
|
120966
|
-
#init = () => {
|
|
120967
|
-
const contents = this.innerHTML.trim();
|
|
120968
|
-
this.innerHTML = ""; // 기존 내부 HTML 제거
|
|
120969
|
-
|
|
120970
|
-
const htmlTmpl = document.createElement("template");
|
|
120971
|
-
htmlTmpl.innerHTML = `
|
|
120972
|
-
<style>
|
|
120973
|
-
@import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxDiv.css";
|
|
120974
|
-
${ninegrid.getCustomPath(this,"nxDiv.css")}
|
|
120975
|
-
</style>
|
|
120976
|
-
|
|
120977
|
-
<div class="search-container">
|
|
120978
|
-
<span class="toggle-icon"></span>
|
|
120979
|
-
<div class="search-content">${contents}</div>
|
|
120980
|
-
</div>
|
|
120981
|
-
`;
|
|
120982
|
-
|
|
120983
|
-
this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
|
|
120984
|
-
|
|
120985
|
-
this.#setupToggle();
|
|
120986
|
-
}
|
|
120987
|
-
|
|
120988
|
-
#setupToggle = () => {
|
|
120989
|
-
const toggleIcon = this.shadowRoot.querySelector(".toggle-icon");
|
|
120990
|
-
const searchContainer = this.shadowRoot.querySelector(".search-container");
|
|
120991
|
-
|
|
120992
|
-
toggleIcon.addEventListener("click", () => {
|
|
120993
|
-
this.isCollapsed = !this.isCollapsed;
|
|
120994
|
-
//toggleIcon.innerHTML = this.isCollapsed ? "" : "X";
|
|
120995
|
-
searchContainer.classList.toggle("collapse", this.isCollapsed);
|
|
120996
|
-
});
|
|
120997
|
-
}
|
|
120998
|
-
}
|
|
120999
|
-
|
|
121000
|
-
customElements.define("nx-div", nxDiv);
|
|
121001
|
-
|
|
121002
120935
|
class nxCollapse extends HTMLElement {
|
|
121003
120936
|
#target;
|
|
121004
120937
|
#targetPrevDisplay;
|
|
@@ -122072,21 +122005,44 @@ class nxPanel extends HTMLElement {
|
|
|
122072
122005
|
|
|
122073
122006
|
customElements.define("nx-panel", nxPanel);
|
|
122074
122007
|
|
|
122075
|
-
class
|
|
122008
|
+
class nxDiv extends HTMLElement
|
|
122009
|
+
{
|
|
122010
|
+
isInitialized = false;
|
|
122011
|
+
|
|
122012
|
+
constructor () {
|
|
122013
|
+
super();
|
|
122014
|
+
this.attachShadow({ mode: 'open' });
|
|
122015
|
+
}
|
|
122016
|
+
|
|
122017
|
+
connectedCallback() {
|
|
122018
|
+
if (!this.isInitialized) {
|
|
122019
|
+
this.#init();
|
|
122020
|
+
this.isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
122021
|
+
}
|
|
122022
|
+
}
|
|
122023
|
+
|
|
122024
|
+
#init = () => {
|
|
122025
|
+
console.log("super.connectedCallback");
|
|
122026
|
+
};
|
|
122027
|
+
}
|
|
122028
|
+
|
|
122029
|
+
class nxButtons extends nxDiv {
|
|
122076
122030
|
// 1. 초기화 상태를 저장할 플래그를 추가합니다.
|
|
122077
|
-
|
|
122031
|
+
//#isInitialized = false;
|
|
122078
122032
|
|
|
122079
122033
|
constructor() {
|
|
122080
122034
|
super();
|
|
122081
|
-
this.attachShadow({ mode: "open" });
|
|
122082
122035
|
}
|
|
122083
122036
|
|
|
122084
122037
|
connectedCallback() {
|
|
122038
|
+
console.log("==========", super.isInitialized);
|
|
122085
122039
|
// 2. 초기화되지 않았을 때만 #init 함수를 호출합니다.
|
|
122086
|
-
if (!this.#isInitialized) {
|
|
122087
|
-
this.#init();
|
|
122088
|
-
this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
122089
|
-
|
|
122040
|
+
//if (!this.#isInitialized) {
|
|
122041
|
+
//this.#init();
|
|
122042
|
+
//this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
122043
|
+
|
|
122044
|
+
super.connectedCallback();
|
|
122045
|
+
//}
|
|
122090
122046
|
}
|
|
122091
122047
|
|
|
122092
122048
|
#init = () => {
|
package/dist/index.js
CHANGED
|
@@ -99,7 +99,7 @@ import "./etc/nxTopMenu.js";
|
|
|
99
99
|
import "./utils/ngFiltering.js";
|
|
100
100
|
import "./utils/ngPrototype.js";
|
|
101
101
|
|
|
102
|
-
import "./nx/nxDiv.js";
|
|
102
|
+
//import "./nx/nxDiv.js";
|
|
103
103
|
import "./nx/nxCollapse.js";
|
|
104
104
|
import "./nx/nxTab.js";
|
|
105
105
|
import "./nx/nxSplitter.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import ninegrid from "../index.js";
|
|
2
|
+
|
|
3
|
+
export class nxDiv extends HTMLElement
|
|
4
|
+
{
|
|
5
|
+
isInitialized = false;
|
|
6
|
+
|
|
7
|
+
constructor () {
|
|
8
|
+
super();
|
|
9
|
+
this.attachShadow({ mode: 'open' });
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
connectedCallback() {
|
|
13
|
+
if (!this.isInitialized) {
|
|
14
|
+
this.#init();
|
|
15
|
+
this.isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
#init = () => {
|
|
20
|
+
console.log("super.connectedCallback");
|
|
21
|
+
};
|
|
22
|
+
}
|
package/dist/nx/nxButtons.js
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import ninegrid from "../index.js";
|
|
2
|
+
import {nxDiv} from "./_nxDiv.js";
|
|
2
3
|
|
|
3
|
-
class nxButtons extends
|
|
4
|
+
class nxButtons extends nxDiv {
|
|
4
5
|
// 1. 초기화 상태를 저장할 플래그를 추가합니다.
|
|
5
|
-
|
|
6
|
+
//#isInitialized = false;
|
|
6
7
|
|
|
7
8
|
constructor() {
|
|
8
9
|
super();
|
|
9
|
-
this.attachShadow({ mode: "open" });
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
connectedCallback() {
|
|
13
|
+
console.log("==========", super.isInitialized);
|
|
13
14
|
// 2. 초기화되지 않았을 때만 #init 함수를 호출합니다.
|
|
14
|
-
if (!this.#isInitialized) {
|
|
15
|
-
this.#init();
|
|
16
|
-
this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
17
|
-
|
|
15
|
+
//if (!this.#isInitialized) {
|
|
16
|
+
//this.#init();
|
|
17
|
+
//this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
18
|
+
|
|
19
|
+
super.connectedCallback();
|
|
20
|
+
//}
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
#init = () => {
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -99,7 +99,7 @@ import "./etc/nxTopMenu.js";
|
|
|
99
99
|
import "./utils/ngFiltering.js";
|
|
100
100
|
import "./utils/ngPrototype.js";
|
|
101
101
|
|
|
102
|
-
import "./nx/nxDiv.js";
|
|
102
|
+
//import "./nx/nxDiv.js";
|
|
103
103
|
import "./nx/nxCollapse.js";
|
|
104
104
|
import "./nx/nxTab.js";
|
|
105
105
|
import "./nx/nxSplitter.js";
|
package/src/nx/_nxDiv.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import ninegrid from "../index.js";
|
|
2
|
+
|
|
3
|
+
export class nxDiv extends HTMLElement
|
|
4
|
+
{
|
|
5
|
+
isInitialized = false;
|
|
6
|
+
|
|
7
|
+
constructor () {
|
|
8
|
+
super();
|
|
9
|
+
this.attachShadow({ mode: 'open' });
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
connectedCallback() {
|
|
13
|
+
if (!this.isInitialized) {
|
|
14
|
+
this.#init();
|
|
15
|
+
this.isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
#init = () => {
|
|
20
|
+
console.log("super.connectedCallback");
|
|
21
|
+
};
|
|
22
|
+
}
|
package/src/nx/nxButtons.js
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import ninegrid from "../index.js";
|
|
2
|
+
import {nxDiv} from "./_nxDiv.js";
|
|
2
3
|
|
|
3
|
-
class nxButtons extends
|
|
4
|
+
class nxButtons extends nxDiv {
|
|
4
5
|
// 1. 초기화 상태를 저장할 플래그를 추가합니다.
|
|
5
|
-
|
|
6
|
+
//#isInitialized = false;
|
|
6
7
|
|
|
7
8
|
constructor() {
|
|
8
9
|
super();
|
|
9
|
-
this.attachShadow({ mode: "open" });
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
connectedCallback() {
|
|
13
|
+
console.log("==========", super.isInitialized);
|
|
13
14
|
// 2. 초기화되지 않았을 때만 #init 함수를 호출합니다.
|
|
14
|
-
if (!this.#isInitialized) {
|
|
15
|
-
this.#init();
|
|
16
|
-
this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
17
|
-
|
|
15
|
+
//if (!this.#isInitialized) {
|
|
16
|
+
//this.#init();
|
|
17
|
+
//this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
18
|
+
|
|
19
|
+
super.connectedCallback();
|
|
20
|
+
//}
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
#init = () => {
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import ninegrid from "../index.js";
|
|
2
|
+
|
|
3
|
+
class nxDiv extends HTMLElement {
|
|
4
|
+
constructor() {
|
|
5
|
+
super();
|
|
6
|
+
this.attachShadow({ mode: "open" });
|
|
7
|
+
this.isCollapsed = false; // 검색 박스 상태 (true: 축소됨, false: 확장됨)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
connectedCallback() {
|
|
11
|
+
this.#init();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
getJsonData = () => {
|
|
15
|
+
const parent = this.shadowRoot.querySelector(".search-content");
|
|
16
|
+
const elements = parent.querySelectorAll("[id]");
|
|
17
|
+
const jsonData = {};
|
|
18
|
+
|
|
19
|
+
elements.forEach(element => {
|
|
20
|
+
if (element.tagName === "INPUT" || element.tagName === "TEXTAREA" || element.tagName === "SELECT") {
|
|
21
|
+
jsonData[element.id] = element.value;
|
|
22
|
+
} else {
|
|
23
|
+
jsonData[element.id] = element.textContent.trim();
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
return jsonData;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
getSearchOptions = () => {
|
|
31
|
+
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
#init = () => {
|
|
35
|
+
const contents = this.innerHTML.trim();
|
|
36
|
+
this.innerHTML = ""; // 기존 내부 HTML 제거
|
|
37
|
+
|
|
38
|
+
const htmlTmpl = document.createElement("template");
|
|
39
|
+
htmlTmpl.innerHTML = `
|
|
40
|
+
<style>
|
|
41
|
+
@import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxDiv.css";
|
|
42
|
+
${ninegrid.getCustomPath(this,"nxDiv.css")}
|
|
43
|
+
</style>
|
|
44
|
+
|
|
45
|
+
<div class="search-container">
|
|
46
|
+
<span class="toggle-icon"></span>
|
|
47
|
+
<div class="search-content">${contents}</div>
|
|
48
|
+
</div>
|
|
49
|
+
`;
|
|
50
|
+
|
|
51
|
+
this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
|
|
52
|
+
|
|
53
|
+
this.#setupToggle();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
#setupToggle = () => {
|
|
57
|
+
const toggleIcon = this.shadowRoot.querySelector(".toggle-icon");
|
|
58
|
+
const searchContainer = this.shadowRoot.querySelector(".search-container");
|
|
59
|
+
|
|
60
|
+
toggleIcon.addEventListener("click", () => {
|
|
61
|
+
this.isCollapsed = !this.isCollapsed;
|
|
62
|
+
//toggleIcon.innerHTML = this.isCollapsed ? "" : "X";
|
|
63
|
+
searchContainer.classList.toggle("collapse", this.isCollapsed);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
customElements.define("nx-div", nxDiv);
|
|
File without changes
|