ninegrid2 6.1090.0 → 6.1092.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.
@@ -121953,13 +121953,20 @@ class NxLayout extends HTMLElement {
121953
121953
  customElements.define('nx-layout', NxLayout);
121954
121954
 
121955
121955
  class nxPanel extends HTMLElement {
121956
+ // 1. 초기화 상태를 저장할 플래그를 추가합니다.
121957
+ #isInitialized = false;
121958
+
121956
121959
  constructor() {
121957
121960
  super();
121958
121961
  this.attachShadow({ mode: "open" });
121959
121962
  }
121960
121963
 
121961
121964
  connectedCallback() {
121962
- this.#init();
121965
+ // 2. 초기화되지 않았을 때만 #init 함수를 호출합니다.
121966
+ if (!this.#isInitialized) {
121967
+ this.#init();
121968
+ this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
121969
+ }
121963
121970
  }
121964
121971
 
121965
121972
  #init = () => {
@@ -121974,7 +121981,9 @@ class nxPanel extends HTMLElement {
121974
121981
  ${ninegrid.getCustomPath(this,"nxPanel.css")}
121975
121982
  </style>
121976
121983
 
121977
- <div class="head">${caption}</div>
121984
+ <div class="head">
121985
+ <div class="caption"><span>${caption}</span></div>
121986
+ </div>
121978
121987
  <div class="body">${contents}</div>
121979
121988
  `;
121980
121989
 
@@ -121949,13 +121949,20 @@ class NxLayout extends HTMLElement {
121949
121949
  customElements.define('nx-layout', NxLayout);
121950
121950
 
121951
121951
  class nxPanel extends HTMLElement {
121952
+ // 1. 초기화 상태를 저장할 플래그를 추가합니다.
121953
+ #isInitialized = false;
121954
+
121952
121955
  constructor() {
121953
121956
  super();
121954
121957
  this.attachShadow({ mode: "open" });
121955
121958
  }
121956
121959
 
121957
121960
  connectedCallback() {
121958
- this.#init();
121961
+ // 2. 초기화되지 않았을 때만 #init 함수를 호출합니다.
121962
+ if (!this.#isInitialized) {
121963
+ this.#init();
121964
+ this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
121965
+ }
121959
121966
  }
121960
121967
 
121961
121968
  #init = () => {
@@ -121970,7 +121977,9 @@ class nxPanel extends HTMLElement {
121970
121977
  ${ninegrid.getCustomPath(this,"nxPanel.css")}
121971
121978
  </style>
121972
121979
 
121973
- <div class="head">${caption}</div>
121980
+ <div class="head">
121981
+ <div class="caption"><span>${caption}</span></div>
121982
+ </div>
121974
121983
  <div class="body">${contents}</div>
121975
121984
  `;
121976
121985
 
@@ -1,13 +1,20 @@
1
1
  import ninegrid from "../index.js";
2
2
 
3
3
  class nxPanel extends HTMLElement {
4
+ // 1. 초기화 상태를 저장할 플래그를 추가합니다.
5
+ #isInitialized = false;
6
+
4
7
  constructor() {
5
8
  super();
6
9
  this.attachShadow({ mode: "open" });
7
10
  }
8
11
 
9
12
  connectedCallback() {
10
- this.#init();
13
+ // 2. 초기화되지 않았을 때만 #init 함수를 호출합니다.
14
+ if (!this.#isInitialized) {
15
+ this.#init();
16
+ this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
17
+ }
11
18
  }
12
19
 
13
20
  #init = () => {
@@ -22,7 +29,9 @@ class nxPanel extends HTMLElement {
22
29
  ${ninegrid.getCustomPath(this,"nxPanel.css")}
23
30
  </style>
24
31
 
25
- <div class="head">${caption}</div>
32
+ <div class="head">
33
+ <div class="caption"><span>${caption}</span></div>
34
+ </div>
26
35
  <div class="body">${contents}</div>
27
36
  `;
28
37
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.1090.0",
4
+ "version": "6.1092.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
package/src/nx/nxPanel.js CHANGED
@@ -1,13 +1,20 @@
1
1
  import ninegrid from "../index.js";
2
2
 
3
3
  class nxPanel extends HTMLElement {
4
+ // 1. 초기화 상태를 저장할 플래그를 추가합니다.
5
+ #isInitialized = false;
6
+
4
7
  constructor() {
5
8
  super();
6
9
  this.attachShadow({ mode: "open" });
7
10
  }
8
11
 
9
12
  connectedCallback() {
10
- this.#init();
13
+ // 2. 초기화되지 않았을 때만 #init 함수를 호출합니다.
14
+ if (!this.#isInitialized) {
15
+ this.#init();
16
+ this.#isInitialized = true; // 3. 초기화 후 플래그를 true로 변경합니다.
17
+ }
11
18
  }
12
19
 
13
20
  #init = () => {
@@ -22,7 +29,9 @@ class nxPanel extends HTMLElement {
22
29
  ${ninegrid.getCustomPath(this,"nxPanel.css")}
23
30
  </style>
24
31
 
25
- <div class="head">${caption}</div>
32
+ <div class="head">
33
+ <div class="caption"><span>${caption}</span></div>
34
+ </div>
26
35
  <div class="body">${contents}</div>
27
36
  `;
28
37