ninegrid2 6.910.0 → 6.912.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.
@@ -120479,6 +120479,7 @@ class nxSideMenuBody extends HTMLElement
120479
120479
 
120480
120480
  class nxSideMenuItem extends HTMLElement
120481
120481
  {
120482
+ #caption;
120482
120483
  #owner;
120483
120484
  #type;
120484
120485
 
@@ -120490,10 +120491,16 @@ class nxSideMenuItem extends HTMLElement
120490
120491
  }
120491
120492
 
120492
120493
  connectedCallback() {
120494
+ this.#caption = this.innerText.trim();
120495
+
120493
120496
  ninegrid.waitForInnerHTML(this)
120494
120497
  .then(() => this.#init())
120495
120498
  .catch(error => console.error(error));
120496
120499
  }
120500
+
120501
+ get caption() {
120502
+ return this.#caption;
120503
+ }
120497
120504
 
120498
120505
  #init = () => {
120499
120506
 
@@ -120580,6 +120587,8 @@ class nxSideMenuItem extends HTMLElement
120580
120587
 
120581
120588
  const iconClass = this.getAttribute('icon-class');
120582
120589
  const contents = this.innerHTML.trim();
120590
+
120591
+
120583
120592
 
120584
120593
  this.innerHTML = "";
120585
120594
 
@@ -121636,6 +121645,40 @@ class nxForm extends HTMLElement {
121636
121645
 
121637
121646
  customElements.define("nx-form", nxForm);
121638
121647
 
121648
+ class nxTitle extends HTMLElement {
121649
+ constructor() {
121650
+ super();
121651
+ this.attachShadow({ mode: "open" });
121652
+ }
121653
+
121654
+ connectedCallback() {
121655
+ this.#randerer();
121656
+ }
121657
+
121658
+ #randerer = () => {
121659
+ const caption = this.getAttribute("caption") || "No Caption";
121660
+
121661
+ this.innerHTML.trim();
121662
+ this.innerHTML = ""; // 기존 내부 HTML 제거
121663
+
121664
+ const htmlTmpl = document.createElement("template");
121665
+ htmlTmpl.innerHTML = `
121666
+ <style>
121667
+ @import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxTitle.css";
121668
+ ${ninegrid.getCustomPath(this,"nxTitle.css")}
121669
+ </style>
121670
+
121671
+ <div class="wrapper">
121672
+ <i class="title-icon"></i> <span class="title-text">${caption}</span>
121673
+ </div>
121674
+ `;
121675
+
121676
+ this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
121677
+ }
121678
+ }
121679
+
121680
+ customElements.define("nx-title", nxTitle);
121681
+
121639
121682
  class aiSettings extends HTMLElement
121640
121683
  {
121641
121684
  constructor() {
@@ -120475,6 +120475,7 @@ class nxSideMenuBody extends HTMLElement
120475
120475
 
120476
120476
  class nxSideMenuItem extends HTMLElement
120477
120477
  {
120478
+ #caption;
120478
120479
  #owner;
120479
120480
  #type;
120480
120481
 
@@ -120486,10 +120487,16 @@ class nxSideMenuItem extends HTMLElement
120486
120487
  }
120487
120488
 
120488
120489
  connectedCallback() {
120490
+ this.#caption = this.innerText.trim();
120491
+
120489
120492
  ninegrid.waitForInnerHTML(this)
120490
120493
  .then(() => this.#init())
120491
120494
  .catch(error => console.error(error));
120492
120495
  }
120496
+
120497
+ get caption() {
120498
+ return this.#caption;
120499
+ }
120493
120500
 
120494
120501
  #init = () => {
120495
120502
 
@@ -120576,6 +120583,8 @@ class nxSideMenuItem extends HTMLElement
120576
120583
 
120577
120584
  const iconClass = this.getAttribute('icon-class');
120578
120585
  const contents = this.innerHTML.trim();
120586
+
120587
+
120579
120588
 
120580
120589
  this.innerHTML = "";
120581
120590
 
@@ -121632,6 +121641,40 @@ class nxForm extends HTMLElement {
121632
121641
 
121633
121642
  customElements.define("nx-form", nxForm);
121634
121643
 
121644
+ class nxTitle extends HTMLElement {
121645
+ constructor() {
121646
+ super();
121647
+ this.attachShadow({ mode: "open" });
121648
+ }
121649
+
121650
+ connectedCallback() {
121651
+ this.#randerer();
121652
+ }
121653
+
121654
+ #randerer = () => {
121655
+ const caption = this.getAttribute("caption") || "No Caption";
121656
+
121657
+ this.innerHTML.trim();
121658
+ this.innerHTML = ""; // 기존 내부 HTML 제거
121659
+
121660
+ const htmlTmpl = document.createElement("template");
121661
+ htmlTmpl.innerHTML = `
121662
+ <style>
121663
+ @import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxTitle.css";
121664
+ ${ninegrid.getCustomPath(this,"nxTitle.css")}
121665
+ </style>
121666
+
121667
+ <div class="wrapper">
121668
+ <i class="title-icon"></i> <span class="title-text">${caption}</span>
121669
+ </div>
121670
+ `;
121671
+
121672
+ this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
121673
+ }
121674
+ }
121675
+
121676
+ customElements.define("nx-title", nxTitle);
121677
+
121635
121678
  class aiSettings extends HTMLElement
121636
121679
  {
121637
121680
  constructor() {
@@ -350,6 +350,7 @@ class nxSideMenuBody extends HTMLElement
350
350
 
351
351
  class nxSideMenuItem extends HTMLElement
352
352
  {
353
+ #caption;
353
354
  #owner;
354
355
  #type;
355
356
 
@@ -361,10 +362,16 @@ class nxSideMenuItem extends HTMLElement
361
362
  }
362
363
 
363
364
  connectedCallback() {
365
+ this.#caption = this.innerText.trim();
366
+
364
367
  ninegrid.waitForInnerHTML(this)
365
368
  .then(() => this.#init())
366
369
  .catch(error => console.error(error));
367
370
  }
371
+
372
+ get caption() {
373
+ return this.#caption;
374
+ }
368
375
 
369
376
  #init = () => {
370
377
 
@@ -451,6 +458,8 @@ class nxSideMenuItem extends HTMLElement
451
458
 
452
459
  const iconClass = this.getAttribute('icon-class');
453
460
  const contents = this.innerHTML.trim();
461
+
462
+
454
463
 
455
464
  this.innerHTML = "";
456
465
 
package/dist/index.js CHANGED
@@ -104,6 +104,7 @@ import "./nx/nxCollapse.js";
104
104
  import "./nx/nxTab.js";
105
105
  import "./nx/nxSplitter.js";
106
106
  import "./nx/nxForm.js";
107
+ import "./nx/nxTitle.js";
107
108
 
108
109
  import "./ai/aiSettings.js";
109
110
  import "./ai/aiMessage.js";
@@ -0,0 +1,35 @@
1
+ import ninegrid from "../index.js";
2
+
3
+ class nxTitle extends HTMLElement {
4
+ constructor() {
5
+ super();
6
+ this.attachShadow({ mode: "open" });
7
+ }
8
+
9
+ connectedCallback() {
10
+ this.#randerer();
11
+ }
12
+
13
+ #randerer = () => {
14
+ const caption = this.getAttribute("caption") || "No Caption";
15
+
16
+ const contents = this.innerHTML.trim();
17
+ this.innerHTML = ""; // 기존 내부 HTML 제거
18
+
19
+ const htmlTmpl = document.createElement("template");
20
+ htmlTmpl.innerHTML = `
21
+ <style>
22
+ @import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxTitle.css";
23
+ ${ninegrid.getCustomPath(this,"nxTitle.css")}
24
+ </style>
25
+
26
+ <div class="wrapper">
27
+ <i class="title-icon"></i> <span class="title-text">${caption}</span>
28
+ </div>
29
+ `;
30
+
31
+ this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
32
+ }
33
+ }
34
+
35
+ customElements.define("nx-title", nxTitle);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.910.0",
4
+ "version": "6.912.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -350,6 +350,7 @@ class nxSideMenuBody extends HTMLElement
350
350
 
351
351
  class nxSideMenuItem extends HTMLElement
352
352
  {
353
+ #caption;
353
354
  #owner;
354
355
  #type;
355
356
 
@@ -361,10 +362,16 @@ class nxSideMenuItem extends HTMLElement
361
362
  }
362
363
 
363
364
  connectedCallback() {
365
+ this.#caption = this.innerText.trim();
366
+
364
367
  ninegrid.waitForInnerHTML(this)
365
368
  .then(() => this.#init())
366
369
  .catch(error => console.error(error));
367
370
  }
371
+
372
+ get caption() {
373
+ return this.#caption;
374
+ }
368
375
 
369
376
  #init = () => {
370
377
 
@@ -451,6 +458,8 @@ class nxSideMenuItem extends HTMLElement
451
458
 
452
459
  const iconClass = this.getAttribute('icon-class');
453
460
  const contents = this.innerHTML.trim();
461
+
462
+
454
463
 
455
464
  this.innerHTML = "";
456
465
 
package/src/index.js CHANGED
@@ -104,6 +104,7 @@ import "./nx/nxCollapse.js";
104
104
  import "./nx/nxTab.js";
105
105
  import "./nx/nxSplitter.js";
106
106
  import "./nx/nxForm.js";
107
+ import "./nx/nxTitle.js";
107
108
 
108
109
  import "./ai/aiSettings.js";
109
110
  import "./ai/aiMessage.js";
@@ -0,0 +1,35 @@
1
+ import ninegrid from "../index.js";
2
+
3
+ class nxTitle extends HTMLElement {
4
+ constructor() {
5
+ super();
6
+ this.attachShadow({ mode: "open" });
7
+ }
8
+
9
+ connectedCallback() {
10
+ this.#randerer();
11
+ }
12
+
13
+ #randerer = () => {
14
+ const caption = this.getAttribute("caption") || "No Caption";
15
+
16
+ const contents = this.innerHTML.trim();
17
+ this.innerHTML = ""; // 기존 내부 HTML 제거
18
+
19
+ const htmlTmpl = document.createElement("template");
20
+ htmlTmpl.innerHTML = `
21
+ <style>
22
+ @import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxTitle.css";
23
+ ${ninegrid.getCustomPath(this,"nxTitle.css")}
24
+ </style>
25
+
26
+ <div class="wrapper">
27
+ <i class="title-icon"></i> <span class="title-text">${caption}</span>
28
+ </div>
29
+ `;
30
+
31
+ this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
32
+ }
33
+ }
34
+
35
+ customElements.define("nx-title", nxTitle);