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