ninegrid2 6.1395.0 → 6.1397.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.
@@ -28437,6 +28437,7 @@ class nxDiv extends HTMLElement {
28437
28437
  originContents;
28438
28438
  #isInitialized = false;
28439
28439
  #root; // Shadow DOM 사용 여부에 따라 shadowRoot 또는 this를 가리킴
28440
+ #hasChanged = false; // 1. 내부 상태 관리를 위한 프라이빗 변수
28440
28441
 
28441
28442
  constructor() {
28442
28443
  super();
@@ -28463,6 +28464,24 @@ class nxDiv extends HTMLElement {
28463
28464
  return false;
28464
28465
  }
28465
28466
 
28467
+ // 2. changed Getter: 현재 변경 상태를 반환
28468
+ get changed() {
28469
+ return this.#hasChanged;
28470
+ }
28471
+
28472
+ // 3. changed Setter: 상태를 업데이트하고 UI(nx-title2)에 반영
28473
+ set changed(v) {
28474
+ const value = Boolean(v);
28475
+ this.#hasChanged = value;
28476
+
28477
+ // 기존 #changed 로직을 setter 내부로 통합
28478
+ const parent = this.closest(".detail-wrapper");
28479
+ if (parent) {
28480
+ const el = parent.querySelector("nx-title2");
28481
+ if (el) el.changed = value;
28482
+ }
28483
+ }
28484
+
28466
28485
  // 자식 클래스에서 접근 가능하도록 getter 제공
28467
28486
  get root() {
28468
28487
  return this.#root || this;
@@ -28545,7 +28564,7 @@ class nxDiv extends HTMLElement {
28545
28564
  const val = (jsonData && jsonData[key] !== undefined) ? jsonData[key] : "";
28546
28565
  this.#updateElement(el, val);
28547
28566
  });
28548
- this.#changed(false);
28567
+ this.changed = false;
28549
28568
  };
28550
28569
 
28551
28570
  setData = (jsonData) => {
@@ -28561,24 +28580,18 @@ class nxDiv extends HTMLElement {
28561
28580
  bChanged = true;
28562
28581
  }
28563
28582
  });
28564
- if (bChanged) this.#changed(true);
28583
+ if (bChanged) this.#changed = true;
28565
28584
  };
28566
28585
 
28567
28586
  initData = (jsonData) => {
28568
28587
  this.clearData(jsonData);
28569
- this.#changed(false);
28588
+ //this.#changed(false);
28589
+ this.changed = false; // 4. setter 호출
28570
28590
  };
28571
28591
 
28572
- #changed = (v) => {
28573
- const parent = this.closest(".detail-wrapper");
28574
- if (parent) {
28575
- const el = parent.querySelector("nx-title2");
28576
- if (el) el.changed = v;
28577
- }
28578
- }
28579
-
28580
28592
  #changeHandler = (e) => {
28581
- this.#changed(true);
28593
+ //this.#changed(true);
28594
+ this.changed = true; // 4. setter 호출
28582
28595
  }
28583
28596
 
28584
28597
  #init = () => {
@@ -28433,6 +28433,7 @@ class nxDiv extends HTMLElement {
28433
28433
  originContents;
28434
28434
  #isInitialized = false;
28435
28435
  #root; // Shadow DOM 사용 여부에 따라 shadowRoot 또는 this를 가리킴
28436
+ #hasChanged = false; // 1. 내부 상태 관리를 위한 프라이빗 변수
28436
28437
 
28437
28438
  constructor() {
28438
28439
  super();
@@ -28459,6 +28460,24 @@ class nxDiv extends HTMLElement {
28459
28460
  return false;
28460
28461
  }
28461
28462
 
28463
+ // 2. changed Getter: 현재 변경 상태를 반환
28464
+ get changed() {
28465
+ return this.#hasChanged;
28466
+ }
28467
+
28468
+ // 3. changed Setter: 상태를 업데이트하고 UI(nx-title2)에 반영
28469
+ set changed(v) {
28470
+ const value = Boolean(v);
28471
+ this.#hasChanged = value;
28472
+
28473
+ // 기존 #changed 로직을 setter 내부로 통합
28474
+ const parent = this.closest(".detail-wrapper");
28475
+ if (parent) {
28476
+ const el = parent.querySelector("nx-title2");
28477
+ if (el) el.changed = value;
28478
+ }
28479
+ }
28480
+
28462
28481
  // 자식 클래스에서 접근 가능하도록 getter 제공
28463
28482
  get root() {
28464
28483
  return this.#root || this;
@@ -28541,7 +28560,7 @@ class nxDiv extends HTMLElement {
28541
28560
  const val = (jsonData && jsonData[key] !== undefined) ? jsonData[key] : "";
28542
28561
  this.#updateElement(el, val);
28543
28562
  });
28544
- this.#changed(false);
28563
+ this.changed = false;
28545
28564
  };
28546
28565
 
28547
28566
  setData = (jsonData) => {
@@ -28557,24 +28576,18 @@ class nxDiv extends HTMLElement {
28557
28576
  bChanged = true;
28558
28577
  }
28559
28578
  });
28560
- if (bChanged) this.#changed(true);
28579
+ if (bChanged) this.#changed = true;
28561
28580
  };
28562
28581
 
28563
28582
  initData = (jsonData) => {
28564
28583
  this.clearData(jsonData);
28565
- this.#changed(false);
28584
+ //this.#changed(false);
28585
+ this.changed = false; // 4. setter 호출
28566
28586
  };
28567
28587
 
28568
- #changed = (v) => {
28569
- const parent = this.closest(".detail-wrapper");
28570
- if (parent) {
28571
- const el = parent.querySelector("nx-title2");
28572
- if (el) el.changed = v;
28573
- }
28574
- }
28575
-
28576
28588
  #changeHandler = (e) => {
28577
- this.#changed(true);
28589
+ //this.#changed(true);
28590
+ this.changed = true; // 4. setter 호출
28578
28591
  }
28579
28592
 
28580
28593
  #init = () => {
package/dist/nx/_nxDiv.js CHANGED
@@ -4,6 +4,7 @@ export class nxDiv extends HTMLElement {
4
4
  originContents;
5
5
  #isInitialized = false;
6
6
  #root; // Shadow DOM 사용 여부에 따라 shadowRoot 또는 this를 가리킴
7
+ #hasChanged = false; // 1. 내부 상태 관리를 위한 프라이빗 변수
7
8
 
8
9
  constructor() {
9
10
  super();
@@ -30,6 +31,24 @@ export class nxDiv extends HTMLElement {
30
31
  return false;
31
32
  }
32
33
 
34
+ // 2. changed Getter: 현재 변경 상태를 반환
35
+ get changed() {
36
+ return this.#hasChanged;
37
+ }
38
+
39
+ // 3. changed Setter: 상태를 업데이트하고 UI(nx-title2)에 반영
40
+ set changed(v) {
41
+ const value = Boolean(v);
42
+ this.#hasChanged = value;
43
+
44
+ // 기존 #changed 로직을 setter 내부로 통합
45
+ const parent = this.closest(".detail-wrapper");
46
+ if (parent) {
47
+ const el = parent.querySelector("nx-title2");
48
+ if (el) el.changed = value;
49
+ }
50
+ }
51
+
33
52
  // 자식 클래스에서 접근 가능하도록 getter 제공
34
53
  get root() {
35
54
  return this.#root || this;
@@ -112,7 +131,7 @@ export class nxDiv extends HTMLElement {
112
131
  const val = (jsonData && jsonData[key] !== undefined) ? jsonData[key] : "";
113
132
  this.#updateElement(el, val);
114
133
  });
115
- this.#changed(false);
134
+ this.changed = false;
116
135
  };
117
136
 
118
137
  setData = (jsonData) => {
@@ -128,24 +147,18 @@ export class nxDiv extends HTMLElement {
128
147
  bChanged = true;
129
148
  }
130
149
  });
131
- if (bChanged) this.#changed(true);
150
+ if (bChanged) this.#changed = true;
132
151
  };
133
152
 
134
153
  initData = (jsonData) => {
135
154
  this.clearData(jsonData);
136
- this.#changed(false);
155
+ //this.#changed(false);
156
+ this.changed = false; // 4. setter 호출
137
157
  };
138
158
 
139
- #changed = (v) => {
140
- const parent = this.closest(".detail-wrapper");
141
- if (parent) {
142
- const el = parent.querySelector("nx-title2");
143
- if (el) el.changed = v;
144
- }
145
- }
146
-
147
159
  #changeHandler = (e) => {
148
- this.#changed(true);
160
+ //this.#changed(true);
161
+ this.changed = true; // 4. setter 호출
149
162
  }
150
163
 
151
164
  #init = () => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.1395.0",
4
+ "version": "6.1397.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
package/src/nx/_nxDiv.js CHANGED
@@ -4,6 +4,7 @@ export class nxDiv extends HTMLElement {
4
4
  originContents;
5
5
  #isInitialized = false;
6
6
  #root; // Shadow DOM 사용 여부에 따라 shadowRoot 또는 this를 가리킴
7
+ #hasChanged = false; // 1. 내부 상태 관리를 위한 프라이빗 변수
7
8
 
8
9
  constructor() {
9
10
  super();
@@ -30,6 +31,24 @@ export class nxDiv extends HTMLElement {
30
31
  return false;
31
32
  }
32
33
 
34
+ // 2. changed Getter: 현재 변경 상태를 반환
35
+ get changed() {
36
+ return this.#hasChanged;
37
+ }
38
+
39
+ // 3. changed Setter: 상태를 업데이트하고 UI(nx-title2)에 반영
40
+ set changed(v) {
41
+ const value = Boolean(v);
42
+ this.#hasChanged = value;
43
+
44
+ // 기존 #changed 로직을 setter 내부로 통합
45
+ const parent = this.closest(".detail-wrapper");
46
+ if (parent) {
47
+ const el = parent.querySelector("nx-title2");
48
+ if (el) el.changed = value;
49
+ }
50
+ }
51
+
33
52
  // 자식 클래스에서 접근 가능하도록 getter 제공
34
53
  get root() {
35
54
  return this.#root || this;
@@ -112,7 +131,7 @@ export class nxDiv extends HTMLElement {
112
131
  const val = (jsonData && jsonData[key] !== undefined) ? jsonData[key] : "";
113
132
  this.#updateElement(el, val);
114
133
  });
115
- this.#changed(false);
134
+ this.changed = false;
116
135
  };
117
136
 
118
137
  setData = (jsonData) => {
@@ -128,24 +147,18 @@ export class nxDiv extends HTMLElement {
128
147
  bChanged = true;
129
148
  }
130
149
  });
131
- if (bChanged) this.#changed(true);
150
+ if (bChanged) this.#changed = true;
132
151
  };
133
152
 
134
153
  initData = (jsonData) => {
135
154
  this.clearData(jsonData);
136
- this.#changed(false);
155
+ //this.#changed(false);
156
+ this.changed = false; // 4. setter 호출
137
157
  };
138
158
 
139
- #changed = (v) => {
140
- const parent = this.closest(".detail-wrapper");
141
- if (parent) {
142
- const el = parent.querySelector("nx-title2");
143
- if (el) el.changed = v;
144
- }
145
- }
146
-
147
159
  #changeHandler = (e) => {
148
- this.#changed(true);
160
+ //this.#changed(true);
161
+ this.changed = true; // 4. setter 호출
149
162
  }
150
163
 
151
164
  #init = () => {