ninegrid2 6.152.0 → 6.154.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.
@@ -10709,10 +10709,20 @@ var $$1 = /*@__PURE__*/getDefaultExportFromCjs(jqueryExports);
10709
10709
  class ninegrid {
10710
10710
 
10711
10711
 
10712
- constructor() {
10713
- console.log(`welcome nine-grid@${ninegrid.version}`, window.location.hostname);
10712
+ constructor() {
10713
+ console.log(`welcome nine-grid@${ninegrid.version}`, window.location.hostname);
10714
+ //console.log(i18next);
10715
+ }
10714
10716
 
10715
- //console.log(i18next);
10717
+ static extendElementPrototype() {
10718
+ if (!("isHidden" in Element.prototype)) { // ✅ 이미 존재하는 경우 중복 정의 방지
10719
+ Object.defineProperty(Element.prototype, "isHidden", {
10720
+ get: function () {
10721
+ const style = window.getComputedStyle(this);
10722
+ return style.display === "none" || style.visibility === "hidden" || style.opacity === "0";
10723
+ }
10724
+ });
10725
+ }
10716
10726
  }
10717
10727
 
10718
10728
  static LOG = {
@@ -17900,9 +17910,31 @@ class ngFiltering
17900
17910
 
17901
17911
  on = (v) => {
17902
17912
 
17903
- this.#on();
17904
-
17905
- //if (v) this.#init(v);
17913
+ this.#isFiltering = true;
17914
+ const lastRowIndex = this.#getLastRowIndex();
17915
+
17916
+ this.#owner.body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach((td) => {
17917
+ const rowIndex = td.closest("tr")?.sectionRowIndex;
17918
+ if (rowIndex !== undefined && rowIndex + td.rowSpan - 1 === lastRowIndex) {
17919
+ const options = Array.from(this.#owner.activeTmpl.querySelectorAll(`[data-col="${td.dataset.col}"]`))
17920
+ .map(el => el.dataset.bind ? { colnm: el.dataset.bind, data: [] } : null)
17921
+ .filter(Boolean); // ✅ `null` 제거
17922
+
17923
+ if (options.length > 0) {
17924
+ const filterButton = document.createElement("ng-filter-button");
17925
+ td.appendChild(filterButton);
17926
+ filterButton.filterOptions = options;
17927
+ }
17928
+ }
17929
+ });
17930
+ };
17931
+
17932
+ off = () => {
17933
+ this.#isFiltering = false;
17934
+
17935
+ this.#owner.body.querySelectorAll(".ng-table ng-filter-button").forEach((el) => {
17936
+ el.remove(); // ✅ 요소 삭제
17937
+ });
17906
17938
  };
17907
17939
 
17908
17940
  set = (oFilter) => {
@@ -18016,58 +18048,10 @@ class ngFiltering
18016
18048
 
18017
18049
  return index;
18018
18050
  };
18019
-
18020
- #on = () => {
18021
- this.#isFiltering = true;
18022
- const lastRowIndex = this.#getLastRowIndex();
18023
18051
 
18024
- this.#owner.body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach((td) => {
18025
- const rowIndex = td.closest("tr")?.sectionRowIndex;
18026
- if (rowIndex !== undefined && rowIndex + td.rowSpan - 1 === lastRowIndex) {
18027
- const options = Array.from(this.#owner.activeTmpl.querySelectorAll(`[data-col="${td.dataset.col}"]`))
18028
- .map(el => el.dataset.bind ? { colnm: el.dataset.bind, data: [] } : null)
18029
- .filter(Boolean); // ✅ `null` 제거
18030
- console.log(options);
18031
- if (options.length > 0) {
18032
- const filterButton = document.createElement("ng-filter-button");
18033
- td.appendChild(filterButton);
18034
- filterButton.filterOptions = options;
18035
- }
18036
- }
18037
- });
18038
- };
18039
-
18040
- #on1 = () => {
18041
- this.#isFiltering = true;
18042
-
18043
- const lastRowIndex = this.#getLastRowIndex();
18044
-
18045
- this.#owner.body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach((td) => {
18046
- if (td.closest("tr").sectionRowIndex + td.rowSpan - 1 === lastRowIndex) {
18047
- //let colnms = [];
18048
- const options = [];
18049
- this.#owner.activeTmpl.querySelectorAll(`[data-col="${td.dataset.col}"]`).forEach((el) => {
18050
- if (el.dataset.bind) {
18051
- options.push({
18052
- colnm: el.dataset.bind,
18053
- data: [],
18054
- });
18055
- }
18056
- });
18057
18052
 
18058
- if (options.length > 0) {
18059
- const filterButton = document.createElement("ng-filter-button"); // ✅ `ng-filter-button` 생성
18060
- td.appendChild(filterButton);
18061
- filterButton.filterOptions = options; // ✅ 속성 설정
18062
- }
18063
- }
18064
- });
18065
- };
18066
18053
 
18067
- off = () => {
18068
- this.#isFiltering = false;
18069
- $(".ng-table ng-filter-button", this.#owner.body).remove();
18070
- };
18054
+
18071
18055
 
18072
18056
  #init = (option) => {
18073
18057
 
@@ -18172,25 +18156,15 @@ class ngFilterButton extends HTMLElement
18172
18156
  e.preventDefault();
18173
18157
  e.stopPropagation();
18174
18158
 
18175
- var panel = this.#owner.shadowRoot.querySelector('ng-filter-panel');
18159
+ const panel = this.#owner.shadowRoot.querySelector('ng-filter-panel');
18176
18160
 
18177
- if (this.#owner.shadowRoot.querySelectorAll('ng-filter-panel').length > 1) throw "too many ng-filter-panel";
18178
- if (!panel) throw 'ng-filter-panel is null';
18161
+ console.log(panel.isHidden);
18179
18162
 
18180
- var cell = e.target.closest("th,td");
18181
-
18182
- var l = $(e.target).offset().left - $(this.#owner).offset().left;// - $(panel).width() + $(e.target).width() + 1;
18183
- if (l < 0) l = 0;
18184
- if (l + $(panel).width() > $(this.#owner).width()) l = $(this.#owner).width() - $(panel).width() - 5;
18185
-
18186
-
18163
+ panel.style.display = panel.isHidden ? 'flex' : 'none';
18187
18164
 
18188
- var t = $(cell).offset().top + $(cell).height()- $(this.#owner).offset().top;//$(e.target).offset().top + $(e.target).height() + 2;
18189
18165
 
18190
- //$(panel).offset({left: l, top: t});
18191
- $(panel).css({left: l, top: t});
18192
18166
 
18193
- panel.refresh(this.#owner, this);
18167
+ return;
18194
18168
  };
18195
18169
  }
18196
18170
 
@@ -24381,11 +24355,16 @@ class ninegridContainer extends HTMLElement
24381
24355
  //ninegrid.setCssPath("/css/nine-grid");
24382
24356
 
24383
24357
  //console.log("ninegrid constructor()");
24358
+
24384
24359
 
24360
+
24385
24361
  super();
24386
24362
 
24387
24363
  this.attachShadow({ mode: 'open' });
24388
24364
 
24365
+
24366
+ ninegrid.extendElementPrototype();
24367
+
24389
24368
  this.#layouts = [];
24390
24369
 
24391
24370
  /**
@@ -10707,10 +10707,20 @@ var $$1 = /*@__PURE__*/getDefaultExportFromCjs(jqueryExports);
10707
10707
  class ninegrid {
10708
10708
 
10709
10709
 
10710
- constructor() {
10711
- console.log(`welcome nine-grid@${ninegrid.version}`, window.location.hostname);
10710
+ constructor() {
10711
+ console.log(`welcome nine-grid@${ninegrid.version}`, window.location.hostname);
10712
+ //console.log(i18next);
10713
+ }
10712
10714
 
10713
- //console.log(i18next);
10715
+ static extendElementPrototype() {
10716
+ if (!("isHidden" in Element.prototype)) { // ✅ 이미 존재하는 경우 중복 정의 방지
10717
+ Object.defineProperty(Element.prototype, "isHidden", {
10718
+ get: function () {
10719
+ const style = window.getComputedStyle(this);
10720
+ return style.display === "none" || style.visibility === "hidden" || style.opacity === "0";
10721
+ }
10722
+ });
10723
+ }
10714
10724
  }
10715
10725
 
10716
10726
  static LOG = {
@@ -17898,9 +17908,31 @@ class ngFiltering
17898
17908
 
17899
17909
  on = (v) => {
17900
17910
 
17901
- this.#on();
17902
-
17903
- //if (v) this.#init(v);
17911
+ this.#isFiltering = true;
17912
+ const lastRowIndex = this.#getLastRowIndex();
17913
+
17914
+ this.#owner.body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach((td) => {
17915
+ const rowIndex = td.closest("tr")?.sectionRowIndex;
17916
+ if (rowIndex !== undefined && rowIndex + td.rowSpan - 1 === lastRowIndex) {
17917
+ const options = Array.from(this.#owner.activeTmpl.querySelectorAll(`[data-col="${td.dataset.col}"]`))
17918
+ .map(el => el.dataset.bind ? { colnm: el.dataset.bind, data: [] } : null)
17919
+ .filter(Boolean); // ✅ `null` 제거
17920
+
17921
+ if (options.length > 0) {
17922
+ const filterButton = document.createElement("ng-filter-button");
17923
+ td.appendChild(filterButton);
17924
+ filterButton.filterOptions = options;
17925
+ }
17926
+ }
17927
+ });
17928
+ };
17929
+
17930
+ off = () => {
17931
+ this.#isFiltering = false;
17932
+
17933
+ this.#owner.body.querySelectorAll(".ng-table ng-filter-button").forEach((el) => {
17934
+ el.remove(); // ✅ 요소 삭제
17935
+ });
17904
17936
  };
17905
17937
 
17906
17938
  set = (oFilter) => {
@@ -18014,58 +18046,10 @@ class ngFiltering
18014
18046
 
18015
18047
  return index;
18016
18048
  };
18017
-
18018
- #on = () => {
18019
- this.#isFiltering = true;
18020
- const lastRowIndex = this.#getLastRowIndex();
18021
18049
 
18022
- this.#owner.body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach((td) => {
18023
- const rowIndex = td.closest("tr")?.sectionRowIndex;
18024
- if (rowIndex !== undefined && rowIndex + td.rowSpan - 1 === lastRowIndex) {
18025
- const options = Array.from(this.#owner.activeTmpl.querySelectorAll(`[data-col="${td.dataset.col}"]`))
18026
- .map(el => el.dataset.bind ? { colnm: el.dataset.bind, data: [] } : null)
18027
- .filter(Boolean); // ✅ `null` 제거
18028
- console.log(options);
18029
- if (options.length > 0) {
18030
- const filterButton = document.createElement("ng-filter-button");
18031
- td.appendChild(filterButton);
18032
- filterButton.filterOptions = options;
18033
- }
18034
- }
18035
- });
18036
- };
18037
-
18038
- #on1 = () => {
18039
- this.#isFiltering = true;
18040
-
18041
- const lastRowIndex = this.#getLastRowIndex();
18042
-
18043
- this.#owner.body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach((td) => {
18044
- if (td.closest("tr").sectionRowIndex + td.rowSpan - 1 === lastRowIndex) {
18045
- //let colnms = [];
18046
- const options = [];
18047
- this.#owner.activeTmpl.querySelectorAll(`[data-col="${td.dataset.col}"]`).forEach((el) => {
18048
- if (el.dataset.bind) {
18049
- options.push({
18050
- colnm: el.dataset.bind,
18051
- data: [],
18052
- });
18053
- }
18054
- });
18055
18050
 
18056
- if (options.length > 0) {
18057
- const filterButton = document.createElement("ng-filter-button"); // ✅ `ng-filter-button` 생성
18058
- td.appendChild(filterButton);
18059
- filterButton.filterOptions = options; // ✅ 속성 설정
18060
- }
18061
- }
18062
- });
18063
- };
18064
18051
 
18065
- off = () => {
18066
- this.#isFiltering = false;
18067
- $(".ng-table ng-filter-button", this.#owner.body).remove();
18068
- };
18052
+
18069
18053
 
18070
18054
  #init = (option) => {
18071
18055
 
@@ -18170,25 +18154,15 @@ class ngFilterButton extends HTMLElement
18170
18154
  e.preventDefault();
18171
18155
  e.stopPropagation();
18172
18156
 
18173
- var panel = this.#owner.shadowRoot.querySelector('ng-filter-panel');
18157
+ const panel = this.#owner.shadowRoot.querySelector('ng-filter-panel');
18174
18158
 
18175
- if (this.#owner.shadowRoot.querySelectorAll('ng-filter-panel').length > 1) throw "too many ng-filter-panel";
18176
- if (!panel) throw 'ng-filter-panel is null';
18159
+ console.log(panel.isHidden);
18177
18160
 
18178
- var cell = e.target.closest("th,td");
18179
-
18180
- var l = $(e.target).offset().left - $(this.#owner).offset().left;// - $(panel).width() + $(e.target).width() + 1;
18181
- if (l < 0) l = 0;
18182
- if (l + $(panel).width() > $(this.#owner).width()) l = $(this.#owner).width() - $(panel).width() - 5;
18183
-
18184
-
18161
+ panel.style.display = panel.isHidden ? 'flex' : 'none';
18185
18162
 
18186
- var t = $(cell).offset().top + $(cell).height()- $(this.#owner).offset().top;//$(e.target).offset().top + $(e.target).height() + 2;
18187
18163
 
18188
- //$(panel).offset({left: l, top: t});
18189
- $(panel).css({left: l, top: t});
18190
18164
 
18191
- panel.refresh(this.#owner, this);
18165
+ return;
18192
18166
  };
18193
18167
  }
18194
18168
 
@@ -24379,11 +24353,16 @@ class ninegridContainer extends HTMLElement
24379
24353
  //ninegrid.setCssPath("/css/nine-grid");
24380
24354
 
24381
24355
  //console.log("ninegrid constructor()");
24356
+
24382
24357
 
24358
+
24383
24359
  super();
24384
24360
 
24385
24361
  this.attachShadow({ mode: 'open' });
24386
24362
 
24363
+
24364
+ ninegrid.extendElementPrototype();
24365
+
24387
24366
  this.#layouts = [];
24388
24367
 
24389
24368
  /**
@@ -35,9 +35,31 @@ export class ngFiltering
35
35
 
36
36
  on = (v) => {
37
37
 
38
- this.#on();
39
-
40
- //if (v) this.#init(v);
38
+ this.#isFiltering = true;
39
+ const lastRowIndex = this.#getLastRowIndex();
40
+
41
+ this.#owner.body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach((td) => {
42
+ const rowIndex = td.closest("tr")?.sectionRowIndex;
43
+ if (rowIndex !== undefined && rowIndex + td.rowSpan - 1 === lastRowIndex) {
44
+ const options = Array.from(this.#owner.activeTmpl.querySelectorAll(`[data-col="${td.dataset.col}"]`))
45
+ .map(el => el.dataset.bind ? { colnm: el.dataset.bind, data: [] } : null)
46
+ .filter(Boolean); // ✅ `null` 제거
47
+
48
+ if (options.length > 0) {
49
+ const filterButton = document.createElement("ng-filter-button");
50
+ td.appendChild(filterButton);
51
+ filterButton.filterOptions = options;
52
+ }
53
+ }
54
+ });
55
+ };
56
+
57
+ off = () => {
58
+ this.#isFiltering = false;
59
+
60
+ this.#owner.body.querySelectorAll(".ng-table ng-filter-button").forEach((el) => {
61
+ el.remove(); // ✅ 요소 삭제
62
+ });
41
63
  };
42
64
 
43
65
  set = (oFilter) => {
@@ -151,58 +173,10 @@ export class ngFiltering
151
173
 
152
174
  return index;
153
175
  };
154
-
155
- #on = () => {
156
- this.#isFiltering = true;
157
- const lastRowIndex = this.#getLastRowIndex();
158
-
159
- this.#owner.body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach((td) => {
160
- const rowIndex = td.closest("tr")?.sectionRowIndex;
161
- if (rowIndex !== undefined && rowIndex + td.rowSpan - 1 === lastRowIndex) {
162
- const options = Array.from(this.#owner.activeTmpl.querySelectorAll(`[data-col="${td.dataset.col}"]`))
163
- .map(el => el.dataset.bind ? { colnm: el.dataset.bind, data: [] } : null)
164
- .filter(Boolean); // ✅ `null` 제거
165
- console.log(options);
166
- if (options.length > 0) {
167
- const filterButton = document.createElement("ng-filter-button");
168
- td.appendChild(filterButton);
169
- filterButton.filterOptions = options;
170
- }
171
- }
172
- });
173
- };
174
176
 
175
- #on1 = () => {
176
- this.#isFiltering = true;
177
-
178
- const lastRowIndex = this.#getLastRowIndex();
179
177
 
180
- this.#owner.body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach((td) => {
181
- if (td.closest("tr").sectionRowIndex + td.rowSpan - 1 === lastRowIndex) {
182
- //let colnms = [];
183
- const options = [];
184
- this.#owner.activeTmpl.querySelectorAll(`[data-col="${td.dataset.col}"]`).forEach((el) => {
185
- if (el.dataset.bind) {
186
- options.push({
187
- colnm: el.dataset.bind,
188
- data: [],
189
- });
190
- }
191
- });
192
178
 
193
- if (options.length > 0) {
194
- const filterButton = document.createElement("ng-filter-button"); // ✅ `ng-filter-button` 생성
195
- td.appendChild(filterButton);
196
- filterButton.filterOptions = options; // ✅ 속성 설정
197
- }
198
- }
199
- });
200
- };
201
-
202
- off = () => {
203
- this.#isFiltering = false;
204
- $(".ng-table ng-filter-button", this.#owner.body).remove();
205
- };
179
+
206
180
 
207
181
  #init = (option) => {
208
182
 
@@ -307,10 +281,20 @@ class ngFilterButton extends HTMLElement
307
281
  e.preventDefault();
308
282
  e.stopPropagation();
309
283
 
310
- var panel = this.#owner.shadowRoot.querySelector('ng-filter-panel');
284
+ const panel = this.#owner.shadowRoot.querySelector('ng-filter-panel');
285
+
286
+ console.log(panel.isHidden)
287
+
288
+ panel.style.display = panel.isHidden ? 'flex' : 'none';
289
+
311
290
 
291
+
292
+ return;
293
+
294
+ /**
312
295
  if (this.#owner.shadowRoot.querySelectorAll('ng-filter-panel').length > 1) throw "too many ng-filter-panel";
313
296
  if (!panel) throw 'ng-filter-panel is null';
297
+ */
314
298
 
315
299
  var cell = e.target.closest("th,td");
316
300
 
@@ -33,11 +33,16 @@ class ninegridContainer extends HTMLElement
33
33
  //ninegrid.setCssPath("/css/nine-grid");
34
34
 
35
35
  //console.log("ninegrid constructor()");
36
+
36
37
 
38
+
37
39
  super();
38
40
 
39
41
  this.attachShadow({ mode: 'open' });
40
42
 
43
+
44
+ ninegrid.extendElementPrototype();
45
+
41
46
  this.#layouts = [];
42
47
 
43
48
  /**
@@ -3,10 +3,20 @@
3
3
  export class ninegrid {
4
4
 
5
5
 
6
- constructor() {
7
- console.log(`welcome nine-grid@${ninegrid.version}`, window.location.hostname);
6
+ constructor() {
7
+ console.log(`welcome nine-grid@${ninegrid.version}`, window.location.hostname);
8
+ //console.log(i18next);
9
+ }
8
10
 
9
- //console.log(i18next);
11
+ static extendElementPrototype() {
12
+ if (!("isHidden" in Element.prototype)) { // ✅ 이미 존재하는 경우 중복 정의 방지
13
+ Object.defineProperty(Element.prototype, "isHidden", {
14
+ get: function () {
15
+ const style = window.getComputedStyle(this);
16
+ return style.display === "none" || style.visibility === "hidden" || style.opacity === "0";
17
+ }
18
+ });
19
+ }
10
20
  }
11
21
 
12
22
  static LOG = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.152.0",
4
+ "version": "6.154.0",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
7
  "import": "./dist/index.js",
@@ -35,9 +35,31 @@ export class ngFiltering
35
35
 
36
36
  on = (v) => {
37
37
 
38
- this.#on();
39
-
40
- //if (v) this.#init(v);
38
+ this.#isFiltering = true;
39
+ const lastRowIndex = this.#getLastRowIndex();
40
+
41
+ this.#owner.body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach((td) => {
42
+ const rowIndex = td.closest("tr")?.sectionRowIndex;
43
+ if (rowIndex !== undefined && rowIndex + td.rowSpan - 1 === lastRowIndex) {
44
+ const options = Array.from(this.#owner.activeTmpl.querySelectorAll(`[data-col="${td.dataset.col}"]`))
45
+ .map(el => el.dataset.bind ? { colnm: el.dataset.bind, data: [] } : null)
46
+ .filter(Boolean); // ✅ `null` 제거
47
+
48
+ if (options.length > 0) {
49
+ const filterButton = document.createElement("ng-filter-button");
50
+ td.appendChild(filterButton);
51
+ filterButton.filterOptions = options;
52
+ }
53
+ }
54
+ });
55
+ };
56
+
57
+ off = () => {
58
+ this.#isFiltering = false;
59
+
60
+ this.#owner.body.querySelectorAll(".ng-table ng-filter-button").forEach((el) => {
61
+ el.remove(); // ✅ 요소 삭제
62
+ });
41
63
  };
42
64
 
43
65
  set = (oFilter) => {
@@ -151,58 +173,10 @@ export class ngFiltering
151
173
 
152
174
  return index;
153
175
  };
154
-
155
- #on = () => {
156
- this.#isFiltering = true;
157
- const lastRowIndex = this.#getLastRowIndex();
158
-
159
- this.#owner.body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach((td) => {
160
- const rowIndex = td.closest("tr")?.sectionRowIndex;
161
- if (rowIndex !== undefined && rowIndex + td.rowSpan - 1 === lastRowIndex) {
162
- const options = Array.from(this.#owner.activeTmpl.querySelectorAll(`[data-col="${td.dataset.col}"]`))
163
- .map(el => el.dataset.bind ? { colnm: el.dataset.bind, data: [] } : null)
164
- .filter(Boolean); // ✅ `null` 제거
165
- console.log(options);
166
- if (options.length > 0) {
167
- const filterButton = document.createElement("ng-filter-button");
168
- td.appendChild(filterButton);
169
- filterButton.filterOptions = options;
170
- }
171
- }
172
- });
173
- };
174
176
 
175
- #on1 = () => {
176
- this.#isFiltering = true;
177
-
178
- const lastRowIndex = this.#getLastRowIndex();
179
177
 
180
- this.#owner.body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach((td) => {
181
- if (td.closest("tr").sectionRowIndex + td.rowSpan - 1 === lastRowIndex) {
182
- //let colnms = [];
183
- const options = [];
184
- this.#owner.activeTmpl.querySelectorAll(`[data-col="${td.dataset.col}"]`).forEach((el) => {
185
- if (el.dataset.bind) {
186
- options.push({
187
- colnm: el.dataset.bind,
188
- data: [],
189
- });
190
- }
191
- });
192
178
 
193
- if (options.length > 0) {
194
- const filterButton = document.createElement("ng-filter-button"); // ✅ `ng-filter-button` 생성
195
- td.appendChild(filterButton);
196
- filterButton.filterOptions = options; // ✅ 속성 설정
197
- }
198
- }
199
- });
200
- };
201
-
202
- off = () => {
203
- this.#isFiltering = false;
204
- $(".ng-table ng-filter-button", this.#owner.body).remove();
205
- };
179
+
206
180
 
207
181
  #init = (option) => {
208
182
 
@@ -307,10 +281,20 @@ class ngFilterButton extends HTMLElement
307
281
  e.preventDefault();
308
282
  e.stopPropagation();
309
283
 
310
- var panel = this.#owner.shadowRoot.querySelector('ng-filter-panel');
284
+ const panel = this.#owner.shadowRoot.querySelector('ng-filter-panel');
285
+
286
+ console.log(panel.isHidden)
287
+
288
+ panel.style.display = panel.isHidden ? 'flex' : 'none';
289
+
311
290
 
291
+
292
+ return;
293
+
294
+ /**
312
295
  if (this.#owner.shadowRoot.querySelectorAll('ng-filter-panel').length > 1) throw "too many ng-filter-panel";
313
296
  if (!panel) throw 'ng-filter-panel is null';
297
+ */
314
298
 
315
299
  var cell = e.target.closest("th,td");
316
300
 
@@ -33,11 +33,16 @@ class ninegridContainer extends HTMLElement
33
33
  //ninegrid.setCssPath("/css/nine-grid");
34
34
 
35
35
  //console.log("ninegrid constructor()");
36
+
36
37
 
38
+
37
39
  super();
38
40
 
39
41
  this.attachShadow({ mode: 'open' });
40
42
 
43
+
44
+ ninegrid.extendElementPrototype();
45
+
41
46
  this.#layouts = [];
42
47
 
43
48
  /**
@@ -3,10 +3,20 @@
3
3
  export class ninegrid {
4
4
 
5
5
 
6
- constructor() {
7
- console.log(`welcome nine-grid@${ninegrid.version}`, window.location.hostname);
6
+ constructor() {
7
+ console.log(`welcome nine-grid@${ninegrid.version}`, window.location.hostname);
8
+ //console.log(i18next);
9
+ }
8
10
 
9
- //console.log(i18next);
11
+ static extendElementPrototype() {
12
+ if (!("isHidden" in Element.prototype)) { // ✅ 이미 존재하는 경우 중복 정의 방지
13
+ Object.defineProperty(Element.prototype, "isHidden", {
14
+ get: function () {
15
+ const style = window.getComputedStyle(this);
16
+ return style.display === "none" || style.visibility === "hidden" || style.opacity === "0";
17
+ }
18
+ });
19
+ }
10
20
  }
11
21
 
12
22
  static LOG = {