ninegrid2 6.949.0 → 6.951.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.
@@ -11289,6 +11289,20 @@ class ninegrid {
11289
11289
  return formatedDate;
11290
11290
  };
11291
11291
 
11292
+ static goto = (selector, params) => {
11293
+
11294
+ const el = document.querySelector(selector);
11295
+ if (!el) return;
11296
+
11297
+ document.querySelectorAll(".list-wrapper.active,[class*='detail-wrapper-'].active").forEach((el) => {
11298
+ el.classList.remove("active");
11299
+ });
11300
+
11301
+ el.classList.add("active");
11302
+
11303
+ return el;
11304
+ };
11305
+
11292
11306
 
11293
11307
  static context;
11294
11308
  static measureTextSize = (_text, _font) => {
@@ -121683,9 +121697,9 @@ customElements.define("nx-form", nxForm);
121683
121697
 
121684
121698
  class nxTitle extends HTMLElement {
121685
121699
 
121686
-
121687
-
121688
121700
  #breadcrumbPath = []; // Breadcrumb 경로를 저장할 내부 상태 초기화
121701
+ #dynamicPath = []; // 동적으로 추가할 빵 부스러기 경로 (상세 페이지 등)
121702
+
121689
121703
 
121690
121704
  constructor() {
121691
121705
  super();
@@ -121701,6 +121715,11 @@ class nxTitle extends HTMLElement {
121701
121715
  document.removeEventListener('DOMContentLoaded', this.#init);
121702
121716
  }
121703
121717
 
121718
+ setDynamicPath(pathArray) {
121719
+ this.#dynamicPath = pathArray;
121720
+ this.#generateBreadcrumb(); // 빵 부스러기 재생성 및 렌더링
121721
+ this.#renderer();
121722
+ }
121704
121723
 
121705
121724
  #init = () => {
121706
121725
  /**
@@ -121790,6 +121809,10 @@ class nxTitle extends HTMLElement {
121790
121809
  caption: "Home",
121791
121810
  });
121792
121811
 
121812
+ // 2. 동적으로 추가된 경로 (상세 페이지)
121813
+ // #dynamicPath 배열의 내용을 병합
121814
+ this.#breadcrumbPath = this.#breadcrumbPath.concat(this.#dynamicPath);
121815
+
121793
121816
  //console.log(this.#breadcrumbPath);
121794
121817
  //this.#breadcrumbPath = path;
121795
121818
  //this.#renderer();
@@ -11285,6 +11285,20 @@ class ninegrid {
11285
11285
  return formatedDate;
11286
11286
  };
11287
11287
 
11288
+ static goto = (selector, params) => {
11289
+
11290
+ const el = document.querySelector(selector);
11291
+ if (!el) return;
11292
+
11293
+ document.querySelectorAll(".list-wrapper.active,[class*='detail-wrapper-'].active").forEach((el) => {
11294
+ el.classList.remove("active");
11295
+ });
11296
+
11297
+ el.classList.add("active");
11298
+
11299
+ return el;
11300
+ };
11301
+
11288
11302
 
11289
11303
  static context;
11290
11304
  static measureTextSize = (_text, _font) => {
@@ -121679,9 +121693,9 @@ customElements.define("nx-form", nxForm);
121679
121693
 
121680
121694
  class nxTitle extends HTMLElement {
121681
121695
 
121682
-
121683
-
121684
121696
  #breadcrumbPath = []; // Breadcrumb 경로를 저장할 내부 상태 초기화
121697
+ #dynamicPath = []; // 동적으로 추가할 빵 부스러기 경로 (상세 페이지 등)
121698
+
121685
121699
 
121686
121700
  constructor() {
121687
121701
  super();
@@ -121697,6 +121711,11 @@ class nxTitle extends HTMLElement {
121697
121711
  document.removeEventListener('DOMContentLoaded', this.#init);
121698
121712
  }
121699
121713
 
121714
+ setDynamicPath(pathArray) {
121715
+ this.#dynamicPath = pathArray;
121716
+ this.#generateBreadcrumb(); // 빵 부스러기 재생성 및 렌더링
121717
+ this.#renderer();
121718
+ }
121700
121719
 
121701
121720
  #init = () => {
121702
121721
  /**
@@ -121786,6 +121805,10 @@ class nxTitle extends HTMLElement {
121786
121805
  caption: "Home",
121787
121806
  });
121788
121807
 
121808
+ // 2. 동적으로 추가된 경로 (상세 페이지)
121809
+ // #dynamicPath 배열의 내용을 병합
121810
+ this.#breadcrumbPath = this.#breadcrumbPath.concat(this.#dynamicPath);
121811
+
121789
121812
  //console.log(this.#breadcrumbPath);
121790
121813
  //this.#breadcrumbPath = path;
121791
121814
  //this.#renderer();
@@ -0,0 +1,30 @@
1
+ import ninegrid from "../index.js";
2
+
3
+ class nxStack extends HTMLElement {
4
+ constructor() {
5
+ super();
6
+ //this.attachShadow({ mode: 'open' });
7
+ }
8
+
9
+ connectedCallback() {
10
+ //this.#renderer();
11
+ }
12
+
13
+ #renderer = () => {
14
+
15
+ const contents = this.innerHTML.trim();
16
+ this.innerHTML = ""; // 기존 내부 HTML 제거
17
+
18
+ // Shadow DOM 초기화 (새로운 콘텐츠를 위해)
19
+ //this.shadowRoot.innerHTML = "";
20
+
21
+ const htmlTmpl = document.createElement("template");
22
+ htmlTmpl.innerHTML = `
23
+ ${contents};
24
+ `;
25
+
26
+ this.appendChild(htmlTmpl.content.cloneNode(true));
27
+ }
28
+ }
29
+
30
+ customElements.define('nx-stack', nxStack);
@@ -2,9 +2,9 @@ import ninegrid from "../index.js";
2
2
 
3
3
  export class nxTitle extends HTMLElement {
4
4
 
5
-
6
-
7
5
  #breadcrumbPath = []; // Breadcrumb 경로를 저장할 내부 상태 초기화
6
+ #dynamicPath = []; // 동적으로 추가할 빵 부스러기 경로 (상세 페이지 등)
7
+
8
8
 
9
9
  constructor() {
10
10
  super();
@@ -20,6 +20,11 @@ export class nxTitle extends HTMLElement {
20
20
  document.removeEventListener('DOMContentLoaded', this.#init);
21
21
  }
22
22
 
23
+ setDynamicPath(pathArray) {
24
+ this.#dynamicPath = pathArray;
25
+ this.#generateBreadcrumb(); // 빵 부스러기 재생성 및 렌더링
26
+ this.#renderer();
27
+ }
23
28
 
24
29
  #init = () => {
25
30
  /**
@@ -125,6 +130,10 @@ export class nxTitle extends HTMLElement {
125
130
  caption: "Home",
126
131
  });
127
132
 
133
+ // 2. 동적으로 추가된 경로 (상세 페이지)
134
+ // #dynamicPath 배열의 내용을 병합
135
+ this.#breadcrumbPath = this.#breadcrumbPath.concat(this.#dynamicPath);
136
+
128
137
  //console.log(this.#breadcrumbPath);
129
138
  //this.#breadcrumbPath = path;
130
139
  //this.#renderer();
@@ -422,6 +422,20 @@ export class ninegrid {
422
422
  return formatedDate;
423
423
  };
424
424
 
425
+ static goto = (selector, params) => {
426
+
427
+ const el = document.querySelector(selector);
428
+ if (!el) return;
429
+
430
+ document.querySelectorAll(".list-wrapper.active,[class*='detail-wrapper-'].active").forEach((el) => {
431
+ el.classList.remove("active");
432
+ });
433
+
434
+ el.classList.add("active");
435
+
436
+ return el;
437
+ };
438
+
425
439
 
426
440
  static context;
427
441
  static measureTextSize = (_text, _font) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.949.0",
4
+ "version": "6.951.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -0,0 +1,30 @@
1
+ import ninegrid from "../index.js";
2
+
3
+ class nxStack extends HTMLElement {
4
+ constructor() {
5
+ super();
6
+ //this.attachShadow({ mode: 'open' });
7
+ }
8
+
9
+ connectedCallback() {
10
+ //this.#renderer();
11
+ }
12
+
13
+ #renderer = () => {
14
+
15
+ const contents = this.innerHTML.trim();
16
+ this.innerHTML = ""; // 기존 내부 HTML 제거
17
+
18
+ // Shadow DOM 초기화 (새로운 콘텐츠를 위해)
19
+ //this.shadowRoot.innerHTML = "";
20
+
21
+ const htmlTmpl = document.createElement("template");
22
+ htmlTmpl.innerHTML = `
23
+ ${contents};
24
+ `;
25
+
26
+ this.appendChild(htmlTmpl.content.cloneNode(true));
27
+ }
28
+ }
29
+
30
+ customElements.define('nx-stack', nxStack);
package/src/nx/nxTitle.js CHANGED
@@ -2,9 +2,9 @@ import ninegrid from "../index.js";
2
2
 
3
3
  export class nxTitle extends HTMLElement {
4
4
 
5
-
6
-
7
5
  #breadcrumbPath = []; // Breadcrumb 경로를 저장할 내부 상태 초기화
6
+ #dynamicPath = []; // 동적으로 추가할 빵 부스러기 경로 (상세 페이지 등)
7
+
8
8
 
9
9
  constructor() {
10
10
  super();
@@ -20,6 +20,11 @@ export class nxTitle extends HTMLElement {
20
20
  document.removeEventListener('DOMContentLoaded', this.#init);
21
21
  }
22
22
 
23
+ setDynamicPath(pathArray) {
24
+ this.#dynamicPath = pathArray;
25
+ this.#generateBreadcrumb(); // 빵 부스러기 재생성 및 렌더링
26
+ this.#renderer();
27
+ }
23
28
 
24
29
  #init = () => {
25
30
  /**
@@ -125,6 +130,10 @@ export class nxTitle extends HTMLElement {
125
130
  caption: "Home",
126
131
  });
127
132
 
133
+ // 2. 동적으로 추가된 경로 (상세 페이지)
134
+ // #dynamicPath 배열의 내용을 병합
135
+ this.#breadcrumbPath = this.#breadcrumbPath.concat(this.#dynamicPath);
136
+
128
137
  //console.log(this.#breadcrumbPath);
129
138
  //this.#breadcrumbPath = path;
130
139
  //this.#renderer();
@@ -422,6 +422,20 @@ export class ninegrid {
422
422
  return formatedDate;
423
423
  };
424
424
 
425
+ static goto = (selector, params) => {
426
+
427
+ const el = document.querySelector(selector);
428
+ if (!el) return;
429
+
430
+ document.querySelectorAll(".list-wrapper.active,[class*='detail-wrapper-'].active").forEach((el) => {
431
+ el.classList.remove("active");
432
+ });
433
+
434
+ el.classList.add("active");
435
+
436
+ return el;
437
+ };
438
+
425
439
 
426
440
  static context;
427
441
  static measureTextSize = (_text, _font) => {