ninegrid2 6.767.0 → 6.768.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.
@@ -120883,7 +120883,13 @@ class nxCollapse extends HTMLElement {
120883
120883
  collapseBtn.className = "collapse-toggle";
120884
120884
  collapseBtn.style.marginBottom = "8px";
120885
120885
 
120886
- this.#target.insertBefore(collapseBtn, this.#target.firstChild);
120886
+ const shadowRoot = this.#target.shadowRoot;
120887
+ if (shadowRoot) {
120888
+ shadowRoot.insertBefore(collapseBtn, shadowRoot.firstChild);
120889
+ }
120890
+ else {
120891
+ this.#target.insertBefore(collapseBtn, this.#target.firstChild);
120892
+ }
120887
120893
 
120888
120894
  // collapse 시 target 숨기고 복원 버튼 등장
120889
120895
  collapseBtn.addEventListener("click", () => {
@@ -120879,7 +120879,13 @@ class nxCollapse extends HTMLElement {
120879
120879
  collapseBtn.className = "collapse-toggle";
120880
120880
  collapseBtn.style.marginBottom = "8px";
120881
120881
 
120882
- this.#target.insertBefore(collapseBtn, this.#target.firstChild);
120882
+ const shadowRoot = this.#target.shadowRoot;
120883
+ if (shadowRoot) {
120884
+ shadowRoot.insertBefore(collapseBtn, shadowRoot.firstChild);
120885
+ }
120886
+ else {
120887
+ this.#target.insertBefore(collapseBtn, this.#target.firstChild);
120888
+ }
120883
120889
 
120884
120890
  // collapse 시 target 숨기고 복원 버튼 등장
120885
120891
  collapseBtn.addEventListener("click", () => {
@@ -38,7 +38,13 @@ class nxCollapse extends HTMLElement {
38
38
  collapseBtn.className = "collapse-toggle";
39
39
  collapseBtn.style.marginBottom = "8px";
40
40
 
41
- this.#target.insertBefore(collapseBtn, this.#target.firstChild);
41
+ const shadowRoot = this.#target.shadowRoot;
42
+ if (shadowRoot) {
43
+ shadowRoot.insertBefore(collapseBtn, shadowRoot.firstChild);
44
+ }
45
+ else {
46
+ this.#target.insertBefore(collapseBtn, this.#target.firstChild);
47
+ }
42
48
 
43
49
  // collapse 시 target 숨기고 복원 버튼 등장
44
50
  collapseBtn.addEventListener("click", () => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.767.0",
4
+ "version": "6.768.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -38,7 +38,13 @@ class nxCollapse extends HTMLElement {
38
38
  collapseBtn.className = "collapse-toggle";
39
39
  collapseBtn.style.marginBottom = "8px";
40
40
 
41
- this.#target.insertBefore(collapseBtn, this.#target.firstChild);
41
+ const shadowRoot = this.#target.shadowRoot;
42
+ if (shadowRoot) {
43
+ shadowRoot.insertBefore(collapseBtn, shadowRoot.firstChild);
44
+ }
45
+ else {
46
+ this.#target.insertBefore(collapseBtn, this.#target.firstChild);
47
+ }
42
48
 
43
49
  // collapse 시 target 숨기고 복원 버튼 등장
44
50
  collapseBtn.addEventListener("click", () => {