ninegrid2 6.250.0 → 6.251.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.
- package/dist/bundle.cjs.js +39 -7
- package/dist/bundle.esm.js +39 -7
- package/dist/etc/ngData.js +14 -1
- package/dist/etc/ngFiltering.js +25 -6
- package/package.json +1 -1
- package/src/etc/ngData.js +14 -1
- package/src/etc/ngFiltering.js +25 -6
package/dist/bundle.cjs.js
CHANGED
|
@@ -16036,6 +16036,20 @@ class ngData
|
|
|
16036
16036
|
(this.#parent.rawRecords || []).forEach(v => {
|
|
16037
16037
|
v.__ng.height = this.#defaultHeight.slice();
|
|
16038
16038
|
});
|
|
16039
|
+
|
|
16040
|
+
this.#owner.filtering.clear = () => {
|
|
16041
|
+
this.#parent.rawRecords.map(item => { item.__ng.filtered = false; });
|
|
16042
|
+
this.#records = this.#parent.rawRecords.filter(item => { return !item.__ng.deleted && !item.__ng.filtered; } );
|
|
16043
|
+
return this.#records;
|
|
16044
|
+
};
|
|
16045
|
+
|
|
16046
|
+
this.#owner.filtering.refresh = () => {
|
|
16047
|
+
this.#records = this.#parent.rawRecords.filter(item => { return !item.__ng.deleted && !item.__ng.filtered; } );
|
|
16048
|
+
//this.#records.forEach((o,i) => { o.__ng.rowidx = i; });
|
|
16049
|
+
//this.getValidData().forEach((o,i) => { o.__ng._[ninegrid.ROW.ORDER] = i + 1; });
|
|
16050
|
+
this.#resetOrder();
|
|
16051
|
+
return this.#records;
|
|
16052
|
+
};
|
|
16039
16053
|
};
|
|
16040
16054
|
|
|
16041
16055
|
|
|
@@ -16163,7 +16177,6 @@ class ngData
|
|
|
16163
16177
|
|
|
16164
16178
|
filter = (fn) => {
|
|
16165
16179
|
return this.#records.filter(fn);
|
|
16166
|
-
|
|
16167
16180
|
}
|
|
16168
16181
|
|
|
16169
16182
|
max = (colnm, fn) => {
|
|
@@ -17849,7 +17862,8 @@ class ngFiltering
|
|
|
17849
17862
|
* 1. grid attr == filter : on();
|
|
17850
17863
|
*/
|
|
17851
17864
|
this.#isFiltering = false;
|
|
17852
|
-
this.#owner.data.clearFilter();
|
|
17865
|
+
//this.#owner.data.clearFilter();
|
|
17866
|
+
this.#owner.filtering.clear();
|
|
17853
17867
|
};
|
|
17854
17868
|
|
|
17855
17869
|
isFiltering = () => {
|
|
@@ -17886,6 +17900,25 @@ class ngFiltering
|
|
|
17886
17900
|
el.remove(); // ✅ 요소 삭제
|
|
17887
17901
|
});
|
|
17888
17902
|
};
|
|
17903
|
+
|
|
17904
|
+
/**
|
|
17905
|
+
clear = () => {
|
|
17906
|
+
console.log(this.#owner.dataManager.rawRecords);
|
|
17907
|
+
this.#owner.dataManager.rawRecords.map(item => { item.__ng.filtered = false; });
|
|
17908
|
+
|
|
17909
|
+
|
|
17910
|
+
this.#records = this.#owner.dataManager.rawRecords.filter(item => { return !item.__ng.deleted && !item.__ng.filtered; } );
|
|
17911
|
+
return this.#records;
|
|
17912
|
+
}
|
|
17913
|
+
|
|
17914
|
+
refresh = () => {
|
|
17915
|
+
this.#records = this.#owner.dataManager.rawRecords.filter(item => { return !item.__ng.deleted && !item.__ng.filtered; } );
|
|
17916
|
+
//this.#records.forEach((o,i) => { o.__ng.rowidx = i; });
|
|
17917
|
+
//this.getValidData().forEach((o,i) => { o.__ng._[ninegrid.ROW.ORDER] = i + 1; });
|
|
17918
|
+
this.#resetOrder();
|
|
17919
|
+
return this.#records;
|
|
17920
|
+
} */
|
|
17921
|
+
|
|
17889
17922
|
|
|
17890
17923
|
/**
|
|
17891
17924
|
* oFilter : {
|
|
@@ -17901,10 +17934,9 @@ class ngFiltering
|
|
|
17901
17934
|
let jsonFilter = Array.isArray(oFilter)
|
|
17902
17935
|
? Object.fromEntries(Object.keys(oFilter[0]).map(key => [key, [...new Set(oFilter.map(item => item[key]))]]))
|
|
17903
17936
|
: oFilter;
|
|
17904
|
-
|
|
17905
|
-
//console.log(oFilter, jsonFilter);
|
|
17906
17937
|
|
|
17907
|
-
this.#owner.data.clearFilter();
|
|
17938
|
+
//this.#owner.data.clearFilter();
|
|
17939
|
+
this.#owner.filtering.clear();
|
|
17908
17940
|
|
|
17909
17941
|
Object.entries(jsonFilter).forEach(([key, arr]) => {
|
|
17910
17942
|
const idx = this.#owner.fields.indexOf(key);
|
|
@@ -17921,7 +17953,8 @@ class ngFiltering
|
|
|
17921
17953
|
});
|
|
17922
17954
|
|
|
17923
17955
|
|
|
17924
|
-
this.#owner.data.refreshFilter();
|
|
17956
|
+
//this.#owner.data.refreshFilter();
|
|
17957
|
+
this.#owner.filtering.refresh();
|
|
17925
17958
|
|
|
17926
17959
|
// ✅ 필터 버튼 초기화
|
|
17927
17960
|
this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(el => {
|
|
@@ -18180,7 +18213,6 @@ class ngFilterPanel extends HTMLElement
|
|
|
18180
18213
|
}).flat();
|
|
18181
18214
|
|
|
18182
18215
|
const grd = this.shadowRoot.querySelector("nine-grid");
|
|
18183
|
-
//grd.dataSource = ds;
|
|
18184
18216
|
grd.fields.add(["DATA","DATA2","COLNM"]);
|
|
18185
18217
|
grd.data.set(ds);
|
|
18186
18218
|
|
package/dist/bundle.esm.js
CHANGED
|
@@ -16034,6 +16034,20 @@ class ngData
|
|
|
16034
16034
|
(this.#parent.rawRecords || []).forEach(v => {
|
|
16035
16035
|
v.__ng.height = this.#defaultHeight.slice();
|
|
16036
16036
|
});
|
|
16037
|
+
|
|
16038
|
+
this.#owner.filtering.clear = () => {
|
|
16039
|
+
this.#parent.rawRecords.map(item => { item.__ng.filtered = false; });
|
|
16040
|
+
this.#records = this.#parent.rawRecords.filter(item => { return !item.__ng.deleted && !item.__ng.filtered; } );
|
|
16041
|
+
return this.#records;
|
|
16042
|
+
};
|
|
16043
|
+
|
|
16044
|
+
this.#owner.filtering.refresh = () => {
|
|
16045
|
+
this.#records = this.#parent.rawRecords.filter(item => { return !item.__ng.deleted && !item.__ng.filtered; } );
|
|
16046
|
+
//this.#records.forEach((o,i) => { o.__ng.rowidx = i; });
|
|
16047
|
+
//this.getValidData().forEach((o,i) => { o.__ng._[ninegrid.ROW.ORDER] = i + 1; });
|
|
16048
|
+
this.#resetOrder();
|
|
16049
|
+
return this.#records;
|
|
16050
|
+
};
|
|
16037
16051
|
};
|
|
16038
16052
|
|
|
16039
16053
|
|
|
@@ -16161,7 +16175,6 @@ class ngData
|
|
|
16161
16175
|
|
|
16162
16176
|
filter = (fn) => {
|
|
16163
16177
|
return this.#records.filter(fn);
|
|
16164
|
-
|
|
16165
16178
|
}
|
|
16166
16179
|
|
|
16167
16180
|
max = (colnm, fn) => {
|
|
@@ -17847,7 +17860,8 @@ class ngFiltering
|
|
|
17847
17860
|
* 1. grid attr == filter : on();
|
|
17848
17861
|
*/
|
|
17849
17862
|
this.#isFiltering = false;
|
|
17850
|
-
this.#owner.data.clearFilter();
|
|
17863
|
+
//this.#owner.data.clearFilter();
|
|
17864
|
+
this.#owner.filtering.clear();
|
|
17851
17865
|
};
|
|
17852
17866
|
|
|
17853
17867
|
isFiltering = () => {
|
|
@@ -17884,6 +17898,25 @@ class ngFiltering
|
|
|
17884
17898
|
el.remove(); // ✅ 요소 삭제
|
|
17885
17899
|
});
|
|
17886
17900
|
};
|
|
17901
|
+
|
|
17902
|
+
/**
|
|
17903
|
+
clear = () => {
|
|
17904
|
+
console.log(this.#owner.dataManager.rawRecords);
|
|
17905
|
+
this.#owner.dataManager.rawRecords.map(item => { item.__ng.filtered = false; });
|
|
17906
|
+
|
|
17907
|
+
|
|
17908
|
+
this.#records = this.#owner.dataManager.rawRecords.filter(item => { return !item.__ng.deleted && !item.__ng.filtered; } );
|
|
17909
|
+
return this.#records;
|
|
17910
|
+
}
|
|
17911
|
+
|
|
17912
|
+
refresh = () => {
|
|
17913
|
+
this.#records = this.#owner.dataManager.rawRecords.filter(item => { return !item.__ng.deleted && !item.__ng.filtered; } );
|
|
17914
|
+
//this.#records.forEach((o,i) => { o.__ng.rowidx = i; });
|
|
17915
|
+
//this.getValidData().forEach((o,i) => { o.__ng._[ninegrid.ROW.ORDER] = i + 1; });
|
|
17916
|
+
this.#resetOrder();
|
|
17917
|
+
return this.#records;
|
|
17918
|
+
} */
|
|
17919
|
+
|
|
17887
17920
|
|
|
17888
17921
|
/**
|
|
17889
17922
|
* oFilter : {
|
|
@@ -17899,10 +17932,9 @@ class ngFiltering
|
|
|
17899
17932
|
let jsonFilter = Array.isArray(oFilter)
|
|
17900
17933
|
? Object.fromEntries(Object.keys(oFilter[0]).map(key => [key, [...new Set(oFilter.map(item => item[key]))]]))
|
|
17901
17934
|
: oFilter;
|
|
17902
|
-
|
|
17903
|
-
//console.log(oFilter, jsonFilter);
|
|
17904
17935
|
|
|
17905
|
-
this.#owner.data.clearFilter();
|
|
17936
|
+
//this.#owner.data.clearFilter();
|
|
17937
|
+
this.#owner.filtering.clear();
|
|
17906
17938
|
|
|
17907
17939
|
Object.entries(jsonFilter).forEach(([key, arr]) => {
|
|
17908
17940
|
const idx = this.#owner.fields.indexOf(key);
|
|
@@ -17919,7 +17951,8 @@ class ngFiltering
|
|
|
17919
17951
|
});
|
|
17920
17952
|
|
|
17921
17953
|
|
|
17922
|
-
this.#owner.data.refreshFilter();
|
|
17954
|
+
//this.#owner.data.refreshFilter();
|
|
17955
|
+
this.#owner.filtering.refresh();
|
|
17923
17956
|
|
|
17924
17957
|
// ✅ 필터 버튼 초기화
|
|
17925
17958
|
this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(el => {
|
|
@@ -18178,7 +18211,6 @@ class ngFilterPanel extends HTMLElement
|
|
|
18178
18211
|
}).flat();
|
|
18179
18212
|
|
|
18180
18213
|
const grd = this.shadowRoot.querySelector("nine-grid");
|
|
18181
|
-
//grd.dataSource = ds;
|
|
18182
18214
|
grd.fields.add(["DATA","DATA2","COLNM"]);
|
|
18183
18215
|
grd.data.set(ds);
|
|
18184
18216
|
|
package/dist/etc/ngData.js
CHANGED
|
@@ -117,6 +117,20 @@ export class ngData
|
|
|
117
117
|
(this.#parent.rawRecords || []).forEach(v => {
|
|
118
118
|
v.__ng.height = this.#defaultHeight.slice();
|
|
119
119
|
});
|
|
120
|
+
|
|
121
|
+
this.#owner.filtering.clear = () => {
|
|
122
|
+
this.#parent.rawRecords.map(item => { item.__ng.filtered = false; });
|
|
123
|
+
this.#records = this.#parent.rawRecords.filter(item => { return !item.__ng.deleted && !item.__ng.filtered; } );
|
|
124
|
+
return this.#records;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
this.#owner.filtering.refresh = () => {
|
|
128
|
+
this.#records = this.#parent.rawRecords.filter(item => { return !item.__ng.deleted && !item.__ng.filtered; } );
|
|
129
|
+
//this.#records.forEach((o,i) => { o.__ng.rowidx = i; });
|
|
130
|
+
//this.getValidData().forEach((o,i) => { o.__ng._[ninegrid.ROW.ORDER] = i + 1; });
|
|
131
|
+
this.#resetOrder();
|
|
132
|
+
return this.#records;
|
|
133
|
+
}
|
|
120
134
|
};
|
|
121
135
|
|
|
122
136
|
|
|
@@ -244,7 +258,6 @@ export class ngData
|
|
|
244
258
|
|
|
245
259
|
filter = (fn) => {
|
|
246
260
|
return this.#records.filter(fn);
|
|
247
|
-
|
|
248
261
|
}
|
|
249
262
|
|
|
250
263
|
max = (colnm, fn) => {
|
package/dist/etc/ngFiltering.js
CHANGED
|
@@ -26,7 +26,8 @@ export class ngFiltering
|
|
|
26
26
|
* 1. grid attr == filter : on();
|
|
27
27
|
*/
|
|
28
28
|
this.#isFiltering = false;
|
|
29
|
-
this.#owner.data.clearFilter();
|
|
29
|
+
//this.#owner.data.clearFilter();
|
|
30
|
+
this.#owner.filtering.clear();
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
isFiltering = () => {
|
|
@@ -63,6 +64,25 @@ export class ngFiltering
|
|
|
63
64
|
el.remove(); // ✅ 요소 삭제
|
|
64
65
|
});
|
|
65
66
|
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
clear = () => {
|
|
70
|
+
console.log(this.#owner.dataManager.rawRecords);
|
|
71
|
+
this.#owner.dataManager.rawRecords.map(item => { item.__ng.filtered = false; });
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
this.#records = this.#owner.dataManager.rawRecords.filter(item => { return !item.__ng.deleted && !item.__ng.filtered; } );
|
|
75
|
+
return this.#records;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
refresh = () => {
|
|
79
|
+
this.#records = this.#owner.dataManager.rawRecords.filter(item => { return !item.__ng.deleted && !item.__ng.filtered; } );
|
|
80
|
+
//this.#records.forEach((o,i) => { o.__ng.rowidx = i; });
|
|
81
|
+
//this.getValidData().forEach((o,i) => { o.__ng._[ninegrid.ROW.ORDER] = i + 1; });
|
|
82
|
+
this.#resetOrder();
|
|
83
|
+
return this.#records;
|
|
84
|
+
} */
|
|
85
|
+
|
|
66
86
|
|
|
67
87
|
/**
|
|
68
88
|
* oFilter : {
|
|
@@ -78,10 +98,9 @@ export class ngFiltering
|
|
|
78
98
|
let jsonFilter = Array.isArray(oFilter)
|
|
79
99
|
? Object.fromEntries(Object.keys(oFilter[0]).map(key => [key, [...new Set(oFilter.map(item => item[key]))]]))
|
|
80
100
|
: oFilter;
|
|
81
|
-
|
|
82
|
-
//console.log(oFilter, jsonFilter);
|
|
83
101
|
|
|
84
|
-
this.#owner.data.clearFilter();
|
|
102
|
+
//this.#owner.data.clearFilter();
|
|
103
|
+
this.#owner.filtering.clear();
|
|
85
104
|
|
|
86
105
|
Object.entries(jsonFilter).forEach(([key, arr]) => {
|
|
87
106
|
const idx = this.#owner.fields.indexOf(key);
|
|
@@ -98,7 +117,8 @@ export class ngFiltering
|
|
|
98
117
|
});
|
|
99
118
|
|
|
100
119
|
|
|
101
|
-
this.#owner.data.refreshFilter();
|
|
120
|
+
//this.#owner.data.refreshFilter();
|
|
121
|
+
this.#owner.filtering.refresh();
|
|
102
122
|
|
|
103
123
|
// ✅ 필터 버튼 초기화
|
|
104
124
|
this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(el => {
|
|
@@ -357,7 +377,6 @@ class ngFilterPanel extends HTMLElement
|
|
|
357
377
|
}).flat();
|
|
358
378
|
|
|
359
379
|
const grd = this.shadowRoot.querySelector("nine-grid");
|
|
360
|
-
//grd.dataSource = ds;
|
|
361
380
|
grd.fields.add(["DATA","DATA2","COLNM"]);
|
|
362
381
|
grd.data.set(ds);
|
|
363
382
|
|
package/package.json
CHANGED
package/src/etc/ngData.js
CHANGED
|
@@ -117,6 +117,20 @@ export class ngData
|
|
|
117
117
|
(this.#parent.rawRecords || []).forEach(v => {
|
|
118
118
|
v.__ng.height = this.#defaultHeight.slice();
|
|
119
119
|
});
|
|
120
|
+
|
|
121
|
+
this.#owner.filtering.clear = () => {
|
|
122
|
+
this.#parent.rawRecords.map(item => { item.__ng.filtered = false; });
|
|
123
|
+
this.#records = this.#parent.rawRecords.filter(item => { return !item.__ng.deleted && !item.__ng.filtered; } );
|
|
124
|
+
return this.#records;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
this.#owner.filtering.refresh = () => {
|
|
128
|
+
this.#records = this.#parent.rawRecords.filter(item => { return !item.__ng.deleted && !item.__ng.filtered; } );
|
|
129
|
+
//this.#records.forEach((o,i) => { o.__ng.rowidx = i; });
|
|
130
|
+
//this.getValidData().forEach((o,i) => { o.__ng._[ninegrid.ROW.ORDER] = i + 1; });
|
|
131
|
+
this.#resetOrder();
|
|
132
|
+
return this.#records;
|
|
133
|
+
}
|
|
120
134
|
};
|
|
121
135
|
|
|
122
136
|
|
|
@@ -244,7 +258,6 @@ export class ngData
|
|
|
244
258
|
|
|
245
259
|
filter = (fn) => {
|
|
246
260
|
return this.#records.filter(fn);
|
|
247
|
-
|
|
248
261
|
}
|
|
249
262
|
|
|
250
263
|
max = (colnm, fn) => {
|
package/src/etc/ngFiltering.js
CHANGED
|
@@ -26,7 +26,8 @@ export class ngFiltering
|
|
|
26
26
|
* 1. grid attr == filter : on();
|
|
27
27
|
*/
|
|
28
28
|
this.#isFiltering = false;
|
|
29
|
-
this.#owner.data.clearFilter();
|
|
29
|
+
//this.#owner.data.clearFilter();
|
|
30
|
+
this.#owner.filtering.clear();
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
isFiltering = () => {
|
|
@@ -63,6 +64,25 @@ export class ngFiltering
|
|
|
63
64
|
el.remove(); // ✅ 요소 삭제
|
|
64
65
|
});
|
|
65
66
|
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
clear = () => {
|
|
70
|
+
console.log(this.#owner.dataManager.rawRecords);
|
|
71
|
+
this.#owner.dataManager.rawRecords.map(item => { item.__ng.filtered = false; });
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
this.#records = this.#owner.dataManager.rawRecords.filter(item => { return !item.__ng.deleted && !item.__ng.filtered; } );
|
|
75
|
+
return this.#records;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
refresh = () => {
|
|
79
|
+
this.#records = this.#owner.dataManager.rawRecords.filter(item => { return !item.__ng.deleted && !item.__ng.filtered; } );
|
|
80
|
+
//this.#records.forEach((o,i) => { o.__ng.rowidx = i; });
|
|
81
|
+
//this.getValidData().forEach((o,i) => { o.__ng._[ninegrid.ROW.ORDER] = i + 1; });
|
|
82
|
+
this.#resetOrder();
|
|
83
|
+
return this.#records;
|
|
84
|
+
} */
|
|
85
|
+
|
|
66
86
|
|
|
67
87
|
/**
|
|
68
88
|
* oFilter : {
|
|
@@ -78,10 +98,9 @@ export class ngFiltering
|
|
|
78
98
|
let jsonFilter = Array.isArray(oFilter)
|
|
79
99
|
? Object.fromEntries(Object.keys(oFilter[0]).map(key => [key, [...new Set(oFilter.map(item => item[key]))]]))
|
|
80
100
|
: oFilter;
|
|
81
|
-
|
|
82
|
-
//console.log(oFilter, jsonFilter);
|
|
83
101
|
|
|
84
|
-
this.#owner.data.clearFilter();
|
|
102
|
+
//this.#owner.data.clearFilter();
|
|
103
|
+
this.#owner.filtering.clear();
|
|
85
104
|
|
|
86
105
|
Object.entries(jsonFilter).forEach(([key, arr]) => {
|
|
87
106
|
const idx = this.#owner.fields.indexOf(key);
|
|
@@ -98,7 +117,8 @@ export class ngFiltering
|
|
|
98
117
|
});
|
|
99
118
|
|
|
100
119
|
|
|
101
|
-
this.#owner.data.refreshFilter();
|
|
120
|
+
//this.#owner.data.refreshFilter();
|
|
121
|
+
this.#owner.filtering.refresh();
|
|
102
122
|
|
|
103
123
|
// ✅ 필터 버튼 초기화
|
|
104
124
|
this.#owner.shadowRoot.querySelectorAll("ng-filter-button").forEach(el => {
|
|
@@ -357,7 +377,6 @@ class ngFilterPanel extends HTMLElement
|
|
|
357
377
|
}).flat();
|
|
358
378
|
|
|
359
379
|
const grd = this.shadowRoot.querySelector("nine-grid");
|
|
360
|
-
//grd.dataSource = ds;
|
|
361
380
|
grd.fields.add(["DATA","DATA2","COLNM"]);
|
|
362
381
|
grd.data.set(ds);
|
|
363
382
|
|