ninegrid2 6.230.0 → 6.232.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.
@@ -17977,7 +17977,9 @@ class ngFiltering
17977
17977
  .map(el => el.dataset.bind ? { colnm: el.dataset.bind, data: [] } : null)
17978
17978
  .filter(Boolean); // ✅ `null` 제거
17979
17979
 
17980
+ td.querySelector("ng-filter-button")?.remove();
17980
17981
  if (options.length > 0) {
17982
+
17981
17983
  const filterButton = document.createElement("ng-filter-button");
17982
17984
  td.appendChild(filterButton);
17983
17985
  filterButton.filterOptions = options;
@@ -18001,8 +18003,6 @@ class ngFiltering
18001
18003
  * }
18002
18004
  */
18003
18005
  set = (oFilter) => {
18004
-
18005
-
18006
18006
 
18007
18007
  this.on();
18008
18008
 
@@ -18052,7 +18052,6 @@ class ngFiltering
18052
18052
  this.#owner.data.refreshFilter();
18053
18053
 
18054
18054
  this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(el => {
18055
- //v.filterOptions = null;
18056
18055
  let options = el.filterOptions;
18057
18056
 
18058
18057
  options.forEach(opt => {
@@ -18063,34 +18062,15 @@ class ngFiltering
18063
18062
  });
18064
18063
 
18065
18064
  for (let key in jsonFilter) {
18066
- const arr = jsonFilter[key];
18067
- //const idx = this.#owner.fields.indexOf(key);
18068
-
18069
18065
  this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(el => {
18070
18066
  let options = el.filterOptions;
18071
18067
 
18072
18068
  options.forEach(opt => {
18073
-
18074
- //console.log(opt.key, opt.hasOwnProperty(key), Object.keys(opt).includes(key));
18075
- if (opt.colnm === key``) {
18076
- console.log("*******************");
18077
- opt.data = arr;
18069
+ if (opt.colnm === key) {
18070
+ opt.data = jsonFilter[key];
18078
18071
  }
18079
-
18080
- console.log(opt);
18081
-
18082
- /**
18083
- //console.log(colnms, colnm);
18084
- if (colnms.includes(colnm)) {
18085
- console.log("==================");
18086
-
18087
- v.filterOptions = arr;
18088
- } */
18089
18072
  });
18090
18073
 
18091
-
18092
- console.log(options);
18093
-
18094
18074
  el.filterOptions = options;
18095
18075
  });
18096
18076
  }
@@ -18156,14 +18136,14 @@ class ngFiltering
18156
18136
  }
18157
18137
  //var colnms = filterData.map(item => item.colnm);
18158
18138
 
18159
- ninegrid.querySelectorAll("ng-filter-button").forEach(v => {
18139
+ this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(v => {
18160
18140
  v.filterData = null;
18161
18141
  });
18162
18142
 
18163
18143
  for (let key in jsonOption) {
18164
18144
  const arr = jsonOption[key];
18165
18145
 
18166
- ninegrid.querySelectorAll("ng-filter-button").forEach(v => {
18146
+ this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(v => {
18167
18147
  //console.log(v.colnms);
18168
18148
 
18169
18149
  v.colnms.forEach(colnm => {
@@ -18373,13 +18353,6 @@ class ngFilterPanel extends HTMLElement
18373
18353
  });
18374
18354
  });
18375
18355
 
18376
- console.log(oParam);
18377
-
18378
-
18379
- /**
18380
- {
18381
- aaa : [],
18382
- } */
18383
18356
  this.#target.owner.filtering.set(oParam);
18384
18357
 
18385
18358
  this.classList.remove("loading");
@@ -18490,27 +18463,6 @@ class ngFilterPanel extends HTMLElement
18490
18463
 
18491
18464
 
18492
18465
  let data = owner.data.getValidDataNF();
18493
-
18494
- //console.log(data);
18495
-
18496
- /**
18497
- owner.body.querySelectorAll("ng-filter-button").forEach(el => {
18498
- //console.log(el);
18499
- if (el.closest('th,td').dataset.col != col && el.filterOptions) {
18500
-
18501
- //console.log("================", el.filterOptions);
18502
-
18503
- el.filterOptions.forEach(filterOption => {
18504
- var idx = owner.fields.indexOf(filterOption.colnm);
18505
-
18506
- //console.log(idx);
18507
-
18508
- if (idx >= 0 && filterOption.data.length > 0) {
18509
- data = data.filter(m => { return filterOption.data.nineBinarySearch(m.v[idx] || '') >= 0; });
18510
- }
18511
- });
18512
- }
18513
- }); */
18514
18466
 
18515
18467
  var ds = [];
18516
18468
  filterButton.filterOptions.forEach((filterOption,i) => {
@@ -17975,7 +17975,9 @@ class ngFiltering
17975
17975
  .map(el => el.dataset.bind ? { colnm: el.dataset.bind, data: [] } : null)
17976
17976
  .filter(Boolean); // ✅ `null` 제거
17977
17977
 
17978
+ td.querySelector("ng-filter-button")?.remove();
17978
17979
  if (options.length > 0) {
17980
+
17979
17981
  const filterButton = document.createElement("ng-filter-button");
17980
17982
  td.appendChild(filterButton);
17981
17983
  filterButton.filterOptions = options;
@@ -17999,8 +18001,6 @@ class ngFiltering
17999
18001
  * }
18000
18002
  */
18001
18003
  set = (oFilter) => {
18002
-
18003
-
18004
18004
 
18005
18005
  this.on();
18006
18006
 
@@ -18050,7 +18050,6 @@ class ngFiltering
18050
18050
  this.#owner.data.refreshFilter();
18051
18051
 
18052
18052
  this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(el => {
18053
- //v.filterOptions = null;
18054
18053
  let options = el.filterOptions;
18055
18054
 
18056
18055
  options.forEach(opt => {
@@ -18061,34 +18060,15 @@ class ngFiltering
18061
18060
  });
18062
18061
 
18063
18062
  for (let key in jsonFilter) {
18064
- const arr = jsonFilter[key];
18065
- //const idx = this.#owner.fields.indexOf(key);
18066
-
18067
18063
  this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(el => {
18068
18064
  let options = el.filterOptions;
18069
18065
 
18070
18066
  options.forEach(opt => {
18071
-
18072
- //console.log(opt.key, opt.hasOwnProperty(key), Object.keys(opt).includes(key));
18073
- if (opt.colnm === key``) {
18074
- console.log("*******************");
18075
- opt.data = arr;
18067
+ if (opt.colnm === key) {
18068
+ opt.data = jsonFilter[key];
18076
18069
  }
18077
-
18078
- console.log(opt);
18079
-
18080
- /**
18081
- //console.log(colnms, colnm);
18082
- if (colnms.includes(colnm)) {
18083
- console.log("==================");
18084
-
18085
- v.filterOptions = arr;
18086
- } */
18087
18070
  });
18088
18071
 
18089
-
18090
- console.log(options);
18091
-
18092
18072
  el.filterOptions = options;
18093
18073
  });
18094
18074
  }
@@ -18154,14 +18134,14 @@ class ngFiltering
18154
18134
  }
18155
18135
  //var colnms = filterData.map(item => item.colnm);
18156
18136
 
18157
- ninegrid.querySelectorAll("ng-filter-button").forEach(v => {
18137
+ this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(v => {
18158
18138
  v.filterData = null;
18159
18139
  });
18160
18140
 
18161
18141
  for (let key in jsonOption) {
18162
18142
  const arr = jsonOption[key];
18163
18143
 
18164
- ninegrid.querySelectorAll("ng-filter-button").forEach(v => {
18144
+ this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(v => {
18165
18145
  //console.log(v.colnms);
18166
18146
 
18167
18147
  v.colnms.forEach(colnm => {
@@ -18371,13 +18351,6 @@ class ngFilterPanel extends HTMLElement
18371
18351
  });
18372
18352
  });
18373
18353
 
18374
- console.log(oParam);
18375
-
18376
-
18377
- /**
18378
- {
18379
- aaa : [],
18380
- } */
18381
18354
  this.#target.owner.filtering.set(oParam);
18382
18355
 
18383
18356
  this.classList.remove("loading");
@@ -18488,27 +18461,6 @@ class ngFilterPanel extends HTMLElement
18488
18461
 
18489
18462
 
18490
18463
  let data = owner.data.getValidDataNF();
18491
-
18492
- //console.log(data);
18493
-
18494
- /**
18495
- owner.body.querySelectorAll("ng-filter-button").forEach(el => {
18496
- //console.log(el);
18497
- if (el.closest('th,td').dataset.col != col && el.filterOptions) {
18498
-
18499
- //console.log("================", el.filterOptions);
18500
-
18501
- el.filterOptions.forEach(filterOption => {
18502
- var idx = owner.fields.indexOf(filterOption.colnm);
18503
-
18504
- //console.log(idx);
18505
-
18506
- if (idx >= 0 && filterOption.data.length > 0) {
18507
- data = data.filter(m => { return filterOption.data.nineBinarySearch(m.v[idx] || '') >= 0; });
18508
- }
18509
- });
18510
- }
18511
- }); */
18512
18464
 
18513
18465
  var ds = [];
18514
18466
  filterButton.filterOptions.forEach((filterOption,i) => {
@@ -45,7 +45,9 @@ export class ngFiltering
45
45
  .map(el => el.dataset.bind ? { colnm: el.dataset.bind, data: [] } : null)
46
46
  .filter(Boolean); // ✅ `null` 제거
47
47
 
48
+ td.querySelector("ng-filter-button")?.remove();
48
49
  if (options.length > 0) {
50
+
49
51
  const filterButton = document.createElement("ng-filter-button");
50
52
  td.appendChild(filterButton);
51
53
  filterButton.filterOptions = options;
@@ -69,8 +71,6 @@ export class ngFiltering
69
71
  * }
70
72
  */
71
73
  set = (oFilter) => {
72
-
73
-
74
74
 
75
75
  this.on();
76
76
 
@@ -120,7 +120,6 @@ export class ngFiltering
120
120
  this.#owner.data.refreshFilter();
121
121
 
122
122
  this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(el => {
123
- //v.filterOptions = null;
124
123
  let options = el.filterOptions;
125
124
 
126
125
  options.forEach(opt => {
@@ -131,34 +130,15 @@ export class ngFiltering
131
130
  });
132
131
 
133
132
  for (let key in jsonFilter) {
134
- const arr = jsonFilter[key];
135
- //const idx = this.#owner.fields.indexOf(key);
136
-
137
133
  this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(el => {
138
134
  let options = el.filterOptions;
139
135
 
140
136
  options.forEach(opt => {
141
-
142
- //console.log(opt.key, opt.hasOwnProperty(key), Object.keys(opt).includes(key));
143
- if (opt.colnm === key``) {
144
- console.log("*******************");
145
- opt.data = arr;
137
+ if (opt.colnm === key) {
138
+ opt.data = jsonFilter[key];
146
139
  }
147
-
148
- console.log(opt);
149
-
150
- /**
151
- //console.log(colnms, colnm);
152
- if (colnms.includes(colnm)) {
153
- console.log("==================");
154
-
155
- v.filterOptions = arr;
156
- } */
157
140
  });
158
141
 
159
-
160
- console.log(options);
161
-
162
142
  el.filterOptions = options;
163
143
  });
164
144
  }
@@ -224,14 +204,14 @@ export class ngFiltering
224
204
  }
225
205
  //var colnms = filterData.map(item => item.colnm);
226
206
 
227
- ninegrid.querySelectorAll("ng-filter-button").forEach(v => {
207
+ this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(v => {
228
208
  v.filterData = null;
229
209
  });
230
210
 
231
211
  for (let key in jsonOption) {
232
212
  const arr = jsonOption[key];
233
213
 
234
- ninegrid.querySelectorAll("ng-filter-button").forEach(v => {
214
+ this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(v => {
235
215
  //console.log(v.colnms);
236
216
 
237
217
  v.colnms.forEach(colnm => {
@@ -441,13 +421,6 @@ class ngFilterPanel extends HTMLElement
441
421
  });
442
422
  });
443
423
 
444
- console.log(oParam);
445
-
446
-
447
- /**
448
- {
449
- aaa : [],
450
- } */
451
424
  this.#target.owner.filtering.set(oParam);
452
425
 
453
426
  this.classList.remove("loading");
@@ -558,27 +531,6 @@ class ngFilterPanel extends HTMLElement
558
531
 
559
532
 
560
533
  let data = owner.data.getValidDataNF();
561
-
562
- //console.log(data);
563
-
564
- /**
565
- owner.body.querySelectorAll("ng-filter-button").forEach(el => {
566
- //console.log(el);
567
- if (el.closest('th,td').dataset.col != col && el.filterOptions) {
568
-
569
- //console.log("================", el.filterOptions);
570
-
571
- el.filterOptions.forEach(filterOption => {
572
- var idx = owner.fields.indexOf(filterOption.colnm);
573
-
574
- //console.log(idx);
575
-
576
- if (idx >= 0 && filterOption.data.length > 0) {
577
- data = data.filter(m => { return filterOption.data.nineBinarySearch(m.v[idx] || '') >= 0; });
578
- }
579
- });
580
- }
581
- }); */
582
534
 
583
535
  var ds = [];
584
536
  filterButton.filterOptions.forEach((filterOption,i) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.230.0",
4
+ "version": "6.232.0",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
7
  "import": "./dist/index.js",
@@ -45,7 +45,9 @@ export class ngFiltering
45
45
  .map(el => el.dataset.bind ? { colnm: el.dataset.bind, data: [] } : null)
46
46
  .filter(Boolean); // ✅ `null` 제거
47
47
 
48
+ td.querySelector("ng-filter-button")?.remove();
48
49
  if (options.length > 0) {
50
+
49
51
  const filterButton = document.createElement("ng-filter-button");
50
52
  td.appendChild(filterButton);
51
53
  filterButton.filterOptions = options;
@@ -69,8 +71,6 @@ export class ngFiltering
69
71
  * }
70
72
  */
71
73
  set = (oFilter) => {
72
-
73
-
74
74
 
75
75
  this.on();
76
76
 
@@ -120,7 +120,6 @@ export class ngFiltering
120
120
  this.#owner.data.refreshFilter();
121
121
 
122
122
  this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(el => {
123
- //v.filterOptions = null;
124
123
  let options = el.filterOptions;
125
124
 
126
125
  options.forEach(opt => {
@@ -131,34 +130,15 @@ export class ngFiltering
131
130
  });
132
131
 
133
132
  for (let key in jsonFilter) {
134
- const arr = jsonFilter[key];
135
- //const idx = this.#owner.fields.indexOf(key);
136
-
137
133
  this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(el => {
138
134
  let options = el.filterOptions;
139
135
 
140
136
  options.forEach(opt => {
141
-
142
- //console.log(opt.key, opt.hasOwnProperty(key), Object.keys(opt).includes(key));
143
- if (opt.colnm === key``) {
144
- console.log("*******************");
145
- opt.data = arr;
137
+ if (opt.colnm === key) {
138
+ opt.data = jsonFilter[key];
146
139
  }
147
-
148
- console.log(opt);
149
-
150
- /**
151
- //console.log(colnms, colnm);
152
- if (colnms.includes(colnm)) {
153
- console.log("==================");
154
-
155
- v.filterOptions = arr;
156
- } */
157
140
  });
158
141
 
159
-
160
- console.log(options);
161
-
162
142
  el.filterOptions = options;
163
143
  });
164
144
  }
@@ -224,14 +204,14 @@ export class ngFiltering
224
204
  }
225
205
  //var colnms = filterData.map(item => item.colnm);
226
206
 
227
- ninegrid.querySelectorAll("ng-filter-button").forEach(v => {
207
+ this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(v => {
228
208
  v.filterData = null;
229
209
  });
230
210
 
231
211
  for (let key in jsonOption) {
232
212
  const arr = jsonOption[key];
233
213
 
234
- ninegrid.querySelectorAll("ng-filter-button").forEach(v => {
214
+ this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(v => {
235
215
  //console.log(v.colnms);
236
216
 
237
217
  v.colnms.forEach(colnm => {
@@ -441,13 +421,6 @@ class ngFilterPanel extends HTMLElement
441
421
  });
442
422
  });
443
423
 
444
- console.log(oParam);
445
-
446
-
447
- /**
448
- {
449
- aaa : [],
450
- } */
451
424
  this.#target.owner.filtering.set(oParam);
452
425
 
453
426
  this.classList.remove("loading");
@@ -558,27 +531,6 @@ class ngFilterPanel extends HTMLElement
558
531
 
559
532
 
560
533
  let data = owner.data.getValidDataNF();
561
-
562
- //console.log(data);
563
-
564
- /**
565
- owner.body.querySelectorAll("ng-filter-button").forEach(el => {
566
- //console.log(el);
567
- if (el.closest('th,td').dataset.col != col && el.filterOptions) {
568
-
569
- //console.log("================", el.filterOptions);
570
-
571
- el.filterOptions.forEach(filterOption => {
572
- var idx = owner.fields.indexOf(filterOption.colnm);
573
-
574
- //console.log(idx);
575
-
576
- if (idx >= 0 && filterOption.data.length > 0) {
577
- data = data.filter(m => { return filterOption.data.nineBinarySearch(m.v[idx] || '') >= 0; });
578
- }
579
- });
580
- }
581
- }); */
582
534
 
583
535
  var ds = [];
584
536
  filterButton.filterOptions.forEach((filterOption,i) => {