ninegrid2 6.1120.0 → 6.1122.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 +45 -0
- package/dist/bundle.esm.js +45 -0
- package/dist/index.js +1 -0
- package/dist/nx/nxButtons.js +46 -0
- package/package.json +1 -1
- package/src/index.js +1 -0
- package/src/nx/nxButtons.js +46 -0
package/dist/bundle.cjs.js
CHANGED
|
@@ -122076,6 +122076,51 @@ class nxPanel extends HTMLElement {
|
|
|
122076
122076
|
|
|
122077
122077
|
customElements.define("nx-panel", nxPanel);
|
|
122078
122078
|
|
|
122079
|
+
class nxButtons extends HTMLElement {
|
|
122080
|
+
// 1. 초기화 상태를 저장할 플래그를 추가합니다.
|
|
122081
|
+
#isInitialized = false;
|
|
122082
|
+
|
|
122083
|
+
constructor() {
|
|
122084
|
+
super();
|
|
122085
|
+
this.attachShadow({ mode: "open" });
|
|
122086
|
+
}
|
|
122087
|
+
|
|
122088
|
+
connectedCallback() {
|
|
122089
|
+
// 2. 초기화되지 않았을 때만 #init 함수를 호출합니다.
|
|
122090
|
+
if (!this.#isInitialized) {
|
|
122091
|
+
this.#init();
|
|
122092
|
+
this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
122093
|
+
}
|
|
122094
|
+
}
|
|
122095
|
+
|
|
122096
|
+
#init = () => {
|
|
122097
|
+
const contents = this.innerHTML.trim();
|
|
122098
|
+
|
|
122099
|
+
for (const attr of this.attributes) {
|
|
122100
|
+
if (attr.name.startsWith("css-")) {
|
|
122101
|
+
// "css-" 접두사를 제거하고 CSS 속성명으로 변환
|
|
122102
|
+
this.style.setProperty(attr.name.substring(4), attr.value);
|
|
122103
|
+
}
|
|
122104
|
+
}
|
|
122105
|
+
|
|
122106
|
+
this.innerHTML = ""; // 기존 내부 HTML 제거
|
|
122107
|
+
|
|
122108
|
+
const htmlTmpl = document.createElement("template");
|
|
122109
|
+
htmlTmpl.innerHTML = `
|
|
122110
|
+
<style>
|
|
122111
|
+
@import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxButtons.css";
|
|
122112
|
+
${ninegrid.getCustomPath(this,"nxButtons.css")}
|
|
122113
|
+
</style>
|
|
122114
|
+
|
|
122115
|
+
${contents}
|
|
122116
|
+
`;
|
|
122117
|
+
|
|
122118
|
+
this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
|
|
122119
|
+
}
|
|
122120
|
+
}
|
|
122121
|
+
|
|
122122
|
+
customElements.define("nx-buttons", nxButtons);
|
|
122123
|
+
|
|
122079
122124
|
class aiSettings extends HTMLElement
|
|
122080
122125
|
{
|
|
122081
122126
|
constructor() {
|
package/dist/bundle.esm.js
CHANGED
|
@@ -122072,6 +122072,51 @@ class nxPanel extends HTMLElement {
|
|
|
122072
122072
|
|
|
122073
122073
|
customElements.define("nx-panel", nxPanel);
|
|
122074
122074
|
|
|
122075
|
+
class nxButtons extends HTMLElement {
|
|
122076
|
+
// 1. 초기화 상태를 저장할 플래그를 추가합니다.
|
|
122077
|
+
#isInitialized = false;
|
|
122078
|
+
|
|
122079
|
+
constructor() {
|
|
122080
|
+
super();
|
|
122081
|
+
this.attachShadow({ mode: "open" });
|
|
122082
|
+
}
|
|
122083
|
+
|
|
122084
|
+
connectedCallback() {
|
|
122085
|
+
// 2. 초기화되지 않았을 때만 #init 함수를 호출합니다.
|
|
122086
|
+
if (!this.#isInitialized) {
|
|
122087
|
+
this.#init();
|
|
122088
|
+
this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
122089
|
+
}
|
|
122090
|
+
}
|
|
122091
|
+
|
|
122092
|
+
#init = () => {
|
|
122093
|
+
const contents = this.innerHTML.trim();
|
|
122094
|
+
|
|
122095
|
+
for (const attr of this.attributes) {
|
|
122096
|
+
if (attr.name.startsWith("css-")) {
|
|
122097
|
+
// "css-" 접두사를 제거하고 CSS 속성명으로 변환
|
|
122098
|
+
this.style.setProperty(attr.name.substring(4), attr.value);
|
|
122099
|
+
}
|
|
122100
|
+
}
|
|
122101
|
+
|
|
122102
|
+
this.innerHTML = ""; // 기존 내부 HTML 제거
|
|
122103
|
+
|
|
122104
|
+
const htmlTmpl = document.createElement("template");
|
|
122105
|
+
htmlTmpl.innerHTML = `
|
|
122106
|
+
<style>
|
|
122107
|
+
@import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxButtons.css";
|
|
122108
|
+
${ninegrid.getCustomPath(this,"nxButtons.css")}
|
|
122109
|
+
</style>
|
|
122110
|
+
|
|
122111
|
+
${contents}
|
|
122112
|
+
`;
|
|
122113
|
+
|
|
122114
|
+
this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
|
|
122115
|
+
}
|
|
122116
|
+
}
|
|
122117
|
+
|
|
122118
|
+
customElements.define("nx-buttons", nxButtons);
|
|
122119
|
+
|
|
122075
122120
|
class aiSettings extends HTMLElement
|
|
122076
122121
|
{
|
|
122077
122122
|
constructor() {
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import ninegrid from "../index.js";
|
|
2
|
+
|
|
3
|
+
class nxButtons extends HTMLElement {
|
|
4
|
+
// 1. 초기화 상태를 저장할 플래그를 추가합니다.
|
|
5
|
+
#isInitialized = false;
|
|
6
|
+
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.attachShadow({ mode: "open" });
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
connectedCallback() {
|
|
13
|
+
// 2. 초기화되지 않았을 때만 #init 함수를 호출합니다.
|
|
14
|
+
if (!this.#isInitialized) {
|
|
15
|
+
this.#init();
|
|
16
|
+
this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
#init = () => {
|
|
21
|
+
const contents = this.innerHTML.trim();
|
|
22
|
+
|
|
23
|
+
for (const attr of this.attributes) {
|
|
24
|
+
if (attr.name.startsWith("css-")) {
|
|
25
|
+
// "css-" 접두사를 제거하고 CSS 속성명으로 변환
|
|
26
|
+
this.style.setProperty(attr.name.substring(4), attr.value);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
this.innerHTML = ""; // 기존 내부 HTML 제거
|
|
31
|
+
|
|
32
|
+
const htmlTmpl = document.createElement("template");
|
|
33
|
+
htmlTmpl.innerHTML = `
|
|
34
|
+
<style>
|
|
35
|
+
@import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxButtons.css";
|
|
36
|
+
${ninegrid.getCustomPath(this,"nxButtons.css")}
|
|
37
|
+
</style>
|
|
38
|
+
|
|
39
|
+
${contents}
|
|
40
|
+
`;
|
|
41
|
+
|
|
42
|
+
this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
customElements.define("nx-buttons", nxButtons);
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import ninegrid from "../index.js";
|
|
2
|
+
|
|
3
|
+
class nxButtons extends HTMLElement {
|
|
4
|
+
// 1. 초기화 상태를 저장할 플래그를 추가합니다.
|
|
5
|
+
#isInitialized = false;
|
|
6
|
+
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.attachShadow({ mode: "open" });
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
connectedCallback() {
|
|
13
|
+
// 2. 초기화되지 않았을 때만 #init 함수를 호출합니다.
|
|
14
|
+
if (!this.#isInitialized) {
|
|
15
|
+
this.#init();
|
|
16
|
+
this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
#init = () => {
|
|
21
|
+
const contents = this.innerHTML.trim();
|
|
22
|
+
|
|
23
|
+
for (const attr of this.attributes) {
|
|
24
|
+
if (attr.name.startsWith("css-")) {
|
|
25
|
+
// "css-" 접두사를 제거하고 CSS 속성명으로 변환
|
|
26
|
+
this.style.setProperty(attr.name.substring(4), attr.value);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
this.innerHTML = ""; // 기존 내부 HTML 제거
|
|
31
|
+
|
|
32
|
+
const htmlTmpl = document.createElement("template");
|
|
33
|
+
htmlTmpl.innerHTML = `
|
|
34
|
+
<style>
|
|
35
|
+
@import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxButtons.css";
|
|
36
|
+
${ninegrid.getCustomPath(this,"nxButtons.css")}
|
|
37
|
+
</style>
|
|
38
|
+
|
|
39
|
+
${contents}
|
|
40
|
+
`;
|
|
41
|
+
|
|
42
|
+
this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
customElements.define("nx-buttons", nxButtons);
|