ninegrid2 6.1129.0 → 6.1130.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 +35 -25
- package/dist/bundle.esm.js +35 -25
- package/dist/nx/_nxDiv.js +32 -5
- package/dist/nx/nxButtons.js +4 -5
- package/package.json +1 -1
- package/src/nx/_nxDiv.js +32 -5
- package/src/nx/nxButtons.js +4 -5
package/dist/bundle.cjs.js
CHANGED
|
@@ -122011,30 +122011,57 @@ customElements.define("nx-panel", nxPanel);
|
|
|
122011
122011
|
|
|
122012
122012
|
class nxDiv extends HTMLElement
|
|
122013
122013
|
{
|
|
122014
|
-
isInitialized = false;
|
|
122014
|
+
#isInitialized = false;
|
|
122015
|
+
#childClass;
|
|
122015
122016
|
|
|
122016
122017
|
constructor () {
|
|
122017
122018
|
super();
|
|
122018
122019
|
this.attachShadow({ mode: 'open' });
|
|
122019
122020
|
}
|
|
122020
122021
|
|
|
122021
|
-
connectedCallback(
|
|
122022
|
-
|
|
122023
|
-
|
|
122022
|
+
connectedCallback(v) {
|
|
122023
|
+
this.#childClass = v;
|
|
122024
|
+
|
|
122025
|
+
if (!this.#isInitialized) {
|
|
122024
122026
|
this.#init();
|
|
122025
|
-
this
|
|
122027
|
+
this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
122028
|
+
return true;
|
|
122026
122029
|
}
|
|
122030
|
+
|
|
122031
|
+
return false;
|
|
122027
122032
|
}
|
|
122028
122033
|
|
|
122029
122034
|
#init = () => {
|
|
122030
122035
|
console.log("super.connectedCallback");
|
|
122031
122036
|
|
|
122037
|
+
/**
|
|
122038
|
+
*
|
|
122039
|
+
*/
|
|
122032
122040
|
for (const attr of this.attributes) {
|
|
122033
122041
|
if (attr.name.startsWith("css-")) {
|
|
122034
122042
|
// "css-" 접두사를 제거하고 CSS 속성명으로 변환
|
|
122035
122043
|
this.style.setProperty(attr.name.substring(4), attr.value);
|
|
122036
122044
|
}
|
|
122037
122045
|
}
|
|
122046
|
+
|
|
122047
|
+
/**
|
|
122048
|
+
*
|
|
122049
|
+
*/
|
|
122050
|
+
const contents = this.innerHTML.trim();
|
|
122051
|
+
|
|
122052
|
+
this.innerHTML = ""; // 기존 내부 HTML 제거
|
|
122053
|
+
|
|
122054
|
+
const htmlTmpl = document.createElement("template");
|
|
122055
|
+
htmlTmpl.innerHTML = `
|
|
122056
|
+
<style>
|
|
122057
|
+
@import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/${this.#childClass}.css";
|
|
122058
|
+
${ninegrid.getCustomPath(this,"${this.#childClass}.css")}
|
|
122059
|
+
</style>
|
|
122060
|
+
|
|
122061
|
+
${contents}
|
|
122062
|
+
`;
|
|
122063
|
+
|
|
122064
|
+
this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
|
|
122038
122065
|
};
|
|
122039
122066
|
}
|
|
122040
122067
|
|
|
@@ -122047,32 +122074,15 @@ class nxButtons extends nxDiv {
|
|
|
122047
122074
|
}
|
|
122048
122075
|
|
|
122049
122076
|
connectedCallback() {
|
|
122050
|
-
super.connectedCallback("nxButtons");
|
|
122077
|
+
if (!super.connectedCallback("nxButtons")) return;
|
|
122051
122078
|
|
|
122052
|
-
console.log("==========",
|
|
122053
|
-
// 2. 초기화되지 않았을 때만 #init 함수를 호출합니다.
|
|
122054
|
-
//if (super.isInitialized) return;
|
|
122079
|
+
console.log("==========", "child.connectedCallback");
|
|
122055
122080
|
|
|
122056
122081
|
this.#init();
|
|
122057
|
-
|
|
122058
122082
|
};
|
|
122059
122083
|
|
|
122060
122084
|
#init = () => {
|
|
122061
|
-
|
|
122062
|
-
|
|
122063
|
-
this.innerHTML = ""; // 기존 내부 HTML 제거
|
|
122064
|
-
|
|
122065
|
-
const htmlTmpl = document.createElement("template");
|
|
122066
|
-
htmlTmpl.innerHTML = `
|
|
122067
|
-
<style>
|
|
122068
|
-
@import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxButtons.css";
|
|
122069
|
-
${ninegrid.getCustomPath(this,"nxButtons.css")}
|
|
122070
|
-
</style>
|
|
122071
|
-
|
|
122072
|
-
${contents}
|
|
122073
|
-
`;
|
|
122074
|
-
|
|
122075
|
-
this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
|
|
122085
|
+
return;
|
|
122076
122086
|
}
|
|
122077
122087
|
}
|
|
122078
122088
|
|
package/dist/bundle.esm.js
CHANGED
|
@@ -122007,30 +122007,57 @@ customElements.define("nx-panel", nxPanel);
|
|
|
122007
122007
|
|
|
122008
122008
|
class nxDiv extends HTMLElement
|
|
122009
122009
|
{
|
|
122010
|
-
isInitialized = false;
|
|
122010
|
+
#isInitialized = false;
|
|
122011
|
+
#childClass;
|
|
122011
122012
|
|
|
122012
122013
|
constructor () {
|
|
122013
122014
|
super();
|
|
122014
122015
|
this.attachShadow({ mode: 'open' });
|
|
122015
122016
|
}
|
|
122016
122017
|
|
|
122017
|
-
connectedCallback(
|
|
122018
|
-
|
|
122019
|
-
|
|
122018
|
+
connectedCallback(v) {
|
|
122019
|
+
this.#childClass = v;
|
|
122020
|
+
|
|
122021
|
+
if (!this.#isInitialized) {
|
|
122020
122022
|
this.#init();
|
|
122021
|
-
this
|
|
122023
|
+
this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
122024
|
+
return true;
|
|
122022
122025
|
}
|
|
122026
|
+
|
|
122027
|
+
return false;
|
|
122023
122028
|
}
|
|
122024
122029
|
|
|
122025
122030
|
#init = () => {
|
|
122026
122031
|
console.log("super.connectedCallback");
|
|
122027
122032
|
|
|
122033
|
+
/**
|
|
122034
|
+
*
|
|
122035
|
+
*/
|
|
122028
122036
|
for (const attr of this.attributes) {
|
|
122029
122037
|
if (attr.name.startsWith("css-")) {
|
|
122030
122038
|
// "css-" 접두사를 제거하고 CSS 속성명으로 변환
|
|
122031
122039
|
this.style.setProperty(attr.name.substring(4), attr.value);
|
|
122032
122040
|
}
|
|
122033
122041
|
}
|
|
122042
|
+
|
|
122043
|
+
/**
|
|
122044
|
+
*
|
|
122045
|
+
*/
|
|
122046
|
+
const contents = this.innerHTML.trim();
|
|
122047
|
+
|
|
122048
|
+
this.innerHTML = ""; // 기존 내부 HTML 제거
|
|
122049
|
+
|
|
122050
|
+
const htmlTmpl = document.createElement("template");
|
|
122051
|
+
htmlTmpl.innerHTML = `
|
|
122052
|
+
<style>
|
|
122053
|
+
@import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/${this.#childClass}.css";
|
|
122054
|
+
${ninegrid.getCustomPath(this,"${this.#childClass}.css")}
|
|
122055
|
+
</style>
|
|
122056
|
+
|
|
122057
|
+
${contents}
|
|
122058
|
+
`;
|
|
122059
|
+
|
|
122060
|
+
this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
|
|
122034
122061
|
};
|
|
122035
122062
|
}
|
|
122036
122063
|
|
|
@@ -122043,32 +122070,15 @@ class nxButtons extends nxDiv {
|
|
|
122043
122070
|
}
|
|
122044
122071
|
|
|
122045
122072
|
connectedCallback() {
|
|
122046
|
-
super.connectedCallback("nxButtons");
|
|
122073
|
+
if (!super.connectedCallback("nxButtons")) return;
|
|
122047
122074
|
|
|
122048
|
-
console.log("==========",
|
|
122049
|
-
// 2. 초기화되지 않았을 때만 #init 함수를 호출합니다.
|
|
122050
|
-
//if (super.isInitialized) return;
|
|
122075
|
+
console.log("==========", "child.connectedCallback");
|
|
122051
122076
|
|
|
122052
122077
|
this.#init();
|
|
122053
|
-
|
|
122054
122078
|
};
|
|
122055
122079
|
|
|
122056
122080
|
#init = () => {
|
|
122057
|
-
|
|
122058
|
-
|
|
122059
|
-
this.innerHTML = ""; // 기존 내부 HTML 제거
|
|
122060
|
-
|
|
122061
|
-
const htmlTmpl = document.createElement("template");
|
|
122062
|
-
htmlTmpl.innerHTML = `
|
|
122063
|
-
<style>
|
|
122064
|
-
@import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxButtons.css";
|
|
122065
|
-
${ninegrid.getCustomPath(this,"nxButtons.css")}
|
|
122066
|
-
</style>
|
|
122067
|
-
|
|
122068
|
-
${contents}
|
|
122069
|
-
`;
|
|
122070
|
-
|
|
122071
|
-
this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
|
|
122081
|
+
return;
|
|
122072
122082
|
}
|
|
122073
122083
|
}
|
|
122074
122084
|
|
package/dist/nx/_nxDiv.js
CHANGED
|
@@ -2,29 +2,56 @@ import ninegrid from "../index.js";
|
|
|
2
2
|
|
|
3
3
|
export class nxDiv extends HTMLElement
|
|
4
4
|
{
|
|
5
|
-
isInitialized = false;
|
|
5
|
+
#isInitialized = false;
|
|
6
|
+
#childClass;
|
|
6
7
|
|
|
7
8
|
constructor () {
|
|
8
9
|
super();
|
|
9
10
|
this.attachShadow({ mode: 'open' });
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
connectedCallback(
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
connectedCallback(v) {
|
|
14
|
+
this.#childClass = v;
|
|
15
|
+
|
|
16
|
+
if (!this.#isInitialized) {
|
|
15
17
|
this.#init();
|
|
16
|
-
this
|
|
18
|
+
this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
19
|
+
return true;
|
|
17
20
|
}
|
|
21
|
+
|
|
22
|
+
return false;
|
|
18
23
|
}
|
|
19
24
|
|
|
20
25
|
#init = () => {
|
|
21
26
|
console.log("super.connectedCallback");
|
|
22
27
|
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
23
31
|
for (const attr of this.attributes) {
|
|
24
32
|
if (attr.name.startsWith("css-")) {
|
|
25
33
|
// "css-" 접두사를 제거하고 CSS 속성명으로 변환
|
|
26
34
|
this.style.setProperty(attr.name.substring(4), attr.value);
|
|
27
35
|
}
|
|
28
36
|
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
41
|
+
const contents = this.innerHTML.trim();
|
|
42
|
+
|
|
43
|
+
this.innerHTML = ""; // 기존 내부 HTML 제거
|
|
44
|
+
|
|
45
|
+
const htmlTmpl = document.createElement("template");
|
|
46
|
+
htmlTmpl.innerHTML = `
|
|
47
|
+
<style>
|
|
48
|
+
@import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/${this.#childClass}.css";
|
|
49
|
+
${ninegrid.getCustomPath(this,"${this.#childClass}.css")}
|
|
50
|
+
</style>
|
|
51
|
+
|
|
52
|
+
${contents}
|
|
53
|
+
`;
|
|
54
|
+
|
|
55
|
+
this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
|
|
29
56
|
};
|
|
30
57
|
}
|
package/dist/nx/nxButtons.js
CHANGED
|
@@ -10,17 +10,16 @@ class nxButtons extends nxDiv {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
connectedCallback() {
|
|
13
|
-
super.connectedCallback("nxButtons");
|
|
13
|
+
if (!super.connectedCallback("nxButtons")) return;
|
|
14
14
|
|
|
15
|
-
console.log("==========",
|
|
16
|
-
// 2. 초기화되지 않았을 때만 #init 함수를 호출합니다.
|
|
17
|
-
//if (super.isInitialized) return;
|
|
15
|
+
console.log("==========", "child.connectedCallback");
|
|
18
16
|
|
|
19
17
|
this.#init();
|
|
20
|
-
|
|
21
18
|
};
|
|
22
19
|
|
|
23
20
|
#init = () => {
|
|
21
|
+
return;
|
|
22
|
+
|
|
24
23
|
const contents = this.innerHTML.trim();
|
|
25
24
|
|
|
26
25
|
this.innerHTML = ""; // 기존 내부 HTML 제거
|
package/package.json
CHANGED
package/src/nx/_nxDiv.js
CHANGED
|
@@ -2,29 +2,56 @@ import ninegrid from "../index.js";
|
|
|
2
2
|
|
|
3
3
|
export class nxDiv extends HTMLElement
|
|
4
4
|
{
|
|
5
|
-
isInitialized = false;
|
|
5
|
+
#isInitialized = false;
|
|
6
|
+
#childClass;
|
|
6
7
|
|
|
7
8
|
constructor () {
|
|
8
9
|
super();
|
|
9
10
|
this.attachShadow({ mode: 'open' });
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
connectedCallback(
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
connectedCallback(v) {
|
|
14
|
+
this.#childClass = v;
|
|
15
|
+
|
|
16
|
+
if (!this.#isInitialized) {
|
|
15
17
|
this.#init();
|
|
16
|
-
this
|
|
18
|
+
this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
19
|
+
return true;
|
|
17
20
|
}
|
|
21
|
+
|
|
22
|
+
return false;
|
|
18
23
|
}
|
|
19
24
|
|
|
20
25
|
#init = () => {
|
|
21
26
|
console.log("super.connectedCallback");
|
|
22
27
|
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
23
31
|
for (const attr of this.attributes) {
|
|
24
32
|
if (attr.name.startsWith("css-")) {
|
|
25
33
|
// "css-" 접두사를 제거하고 CSS 속성명으로 변환
|
|
26
34
|
this.style.setProperty(attr.name.substring(4), attr.value);
|
|
27
35
|
}
|
|
28
36
|
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
41
|
+
const contents = this.innerHTML.trim();
|
|
42
|
+
|
|
43
|
+
this.innerHTML = ""; // 기존 내부 HTML 제거
|
|
44
|
+
|
|
45
|
+
const htmlTmpl = document.createElement("template");
|
|
46
|
+
htmlTmpl.innerHTML = `
|
|
47
|
+
<style>
|
|
48
|
+
@import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/${this.#childClass}.css";
|
|
49
|
+
${ninegrid.getCustomPath(this,"${this.#childClass}.css")}
|
|
50
|
+
</style>
|
|
51
|
+
|
|
52
|
+
${contents}
|
|
53
|
+
`;
|
|
54
|
+
|
|
55
|
+
this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
|
|
29
56
|
};
|
|
30
57
|
}
|
package/src/nx/nxButtons.js
CHANGED
|
@@ -10,17 +10,16 @@ class nxButtons extends nxDiv {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
connectedCallback() {
|
|
13
|
-
super.connectedCallback("nxButtons");
|
|
13
|
+
if (!super.connectedCallback("nxButtons")) return;
|
|
14
14
|
|
|
15
|
-
console.log("==========",
|
|
16
|
-
// 2. 초기화되지 않았을 때만 #init 함수를 호출합니다.
|
|
17
|
-
//if (super.isInitialized) return;
|
|
15
|
+
console.log("==========", "child.connectedCallback");
|
|
18
16
|
|
|
19
17
|
this.#init();
|
|
20
|
-
|
|
21
18
|
};
|
|
22
19
|
|
|
23
20
|
#init = () => {
|
|
21
|
+
return;
|
|
22
|
+
|
|
24
23
|
const contents = this.innerHTML.trim();
|
|
25
24
|
|
|
26
25
|
this.innerHTML = ""; // 기존 내부 HTML 제거
|