ninegrid2 6.161.0 → 6.163.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 +52 -25
- package/dist/bundle.esm.js +52 -25
- package/dist/etc/ngFiltering.js +25 -25
- package/dist/utils/ninegrid.js +27 -0
- package/package.json +1 -1
- package/src/etc/ngFiltering.js +25 -25
- package/src/utils/ninegrid.js +27 -0
package/dist/bundle.cjs.js
CHANGED
|
@@ -10724,6 +10724,33 @@ class ninegrid {
|
|
|
10724
10724
|
}
|
|
10725
10725
|
});
|
|
10726
10726
|
}
|
|
10727
|
+
|
|
10728
|
+
console.log("shadow" in Element.prototype);
|
|
10729
|
+
|
|
10730
|
+
if (!("shadow" in Element.prototype)) {
|
|
10731
|
+
Object.defineProperty(Element.prototype, "shadow", {
|
|
10732
|
+
closest: function (selector) {
|
|
10733
|
+
console.log(selector);
|
|
10734
|
+
return "xx";
|
|
10735
|
+
/**
|
|
10736
|
+
let currentElement = this;
|
|
10737
|
+
|
|
10738
|
+
while (currentElement) {
|
|
10739
|
+
if (currentElement.matches(selector)) return currentElement;
|
|
10740
|
+
|
|
10741
|
+
// ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
|
|
10742
|
+
if (currentElement.shadowRoot) {
|
|
10743
|
+
const found = currentElement.shadowRoot.querySelector(selector);
|
|
10744
|
+
if (found) return found;
|
|
10745
|
+
}
|
|
10746
|
+
|
|
10747
|
+
currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
|
|
10748
|
+
}
|
|
10749
|
+
|
|
10750
|
+
return null; */
|
|
10751
|
+
},
|
|
10752
|
+
});
|
|
10753
|
+
}
|
|
10727
10754
|
}
|
|
10728
10755
|
|
|
10729
10756
|
static LOG = {
|
|
@@ -18165,31 +18192,26 @@ class ngFilterButton extends HTMLElement
|
|
|
18165
18192
|
console.log(panel.isHidden, panel.col, this.closest('th,td').dataset.col);
|
|
18166
18193
|
|
|
18167
18194
|
if (panel.col === this.closest('th,td').dataset.col) {
|
|
18168
|
-
|
|
18169
|
-
|
|
18195
|
+
panel.col = null;
|
|
18196
|
+
panel.style.display = 'none';
|
|
18197
|
+
panel.close();
|
|
18170
18198
|
}
|
|
18199
|
+
else {
|
|
18200
|
+
var cell = e.target.closest("th,td");
|
|
18201
|
+
|
|
18202
|
+
var l = $(e.target).offset().left - $(this.#owner).offset().left;// - $(panel).width() + $(e.target).width() + 1;
|
|
18203
|
+
if (l < 0) l = 0;
|
|
18204
|
+
if (l + $(panel).width() > $(this.#owner).width()) l = $(this.#owner).width() - $(panel).width() - 5;
|
|
18205
|
+
|
|
18206
|
+
|
|
18171
18207
|
|
|
18172
|
-
|
|
18173
|
-
|
|
18174
|
-
|
|
18175
|
-
|
|
18176
|
-
if (!panel) throw 'ng-filter-panel is null';
|
|
18177
|
-
*/
|
|
18178
|
-
|
|
18179
|
-
var cell = e.target.closest("th,td");
|
|
18180
|
-
|
|
18181
|
-
var l = $(e.target).offset().left - $(this.#owner).offset().left;// - $(panel).width() + $(e.target).width() + 1;
|
|
18182
|
-
if (l < 0) l = 0;
|
|
18183
|
-
if (l + $(panel).width() > $(this.#owner).width()) l = $(this.#owner).width() - $(panel).width() - 5;
|
|
18184
|
-
|
|
18185
|
-
|
|
18186
|
-
|
|
18187
|
-
var t = $(cell).offset().top + $(cell).height()- $(this.#owner).offset().top;//$(e.target).offset().top + $(e.target).height() + 2;
|
|
18188
|
-
|
|
18189
|
-
//$(panel).offset({left: l, top: t});
|
|
18190
|
-
$(panel).css({left: l, top: t});
|
|
18208
|
+
var t = $(cell).offset().top + $(cell).height()- $(this.#owner).offset().top;//$(e.target).offset().top + $(e.target).height() + 2;
|
|
18209
|
+
|
|
18210
|
+
//$(panel).offset({left: l, top: t});
|
|
18211
|
+
$(panel).css({left: l, top: t});
|
|
18191
18212
|
|
|
18192
|
-
|
|
18213
|
+
panel.open(this.#owner, this);
|
|
18214
|
+
}
|
|
18193
18215
|
};
|
|
18194
18216
|
}
|
|
18195
18217
|
|
|
@@ -18402,12 +18424,17 @@ class ngFilterPanel extends HTMLElement
|
|
|
18402
18424
|
}, 200);
|
|
18403
18425
|
};
|
|
18404
18426
|
|
|
18405
|
-
|
|
18427
|
+
close = () => {
|
|
18428
|
+
this.col = null;
|
|
18429
|
+
this.style.display = 'none';
|
|
18430
|
+
};
|
|
18406
18431
|
|
|
18407
|
-
|
|
18408
|
-
this.col = col;
|
|
18432
|
+
open = (owner, filterButton) => {
|
|
18409
18433
|
|
|
18434
|
+
|
|
18410
18435
|
|
|
18436
|
+
var col = filterButton.closest('th,td').dataset.col;
|
|
18437
|
+
this.col = col;
|
|
18411
18438
|
|
|
18412
18439
|
//if (this.#target && this.#target.uuid == owner.uuid && this.#target.col == col && $(this).is(':visible')) {
|
|
18413
18440
|
if (this.#target && this.#target.col == col && $(this).is(':visible')) ;
|
package/dist/bundle.esm.js
CHANGED
|
@@ -10722,6 +10722,33 @@ class ninegrid {
|
|
|
10722
10722
|
}
|
|
10723
10723
|
});
|
|
10724
10724
|
}
|
|
10725
|
+
|
|
10726
|
+
console.log("shadow" in Element.prototype);
|
|
10727
|
+
|
|
10728
|
+
if (!("shadow" in Element.prototype)) {
|
|
10729
|
+
Object.defineProperty(Element.prototype, "shadow", {
|
|
10730
|
+
closest: function (selector) {
|
|
10731
|
+
console.log(selector);
|
|
10732
|
+
return "xx";
|
|
10733
|
+
/**
|
|
10734
|
+
let currentElement = this;
|
|
10735
|
+
|
|
10736
|
+
while (currentElement) {
|
|
10737
|
+
if (currentElement.matches(selector)) return currentElement;
|
|
10738
|
+
|
|
10739
|
+
// ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
|
|
10740
|
+
if (currentElement.shadowRoot) {
|
|
10741
|
+
const found = currentElement.shadowRoot.querySelector(selector);
|
|
10742
|
+
if (found) return found;
|
|
10743
|
+
}
|
|
10744
|
+
|
|
10745
|
+
currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
|
|
10746
|
+
}
|
|
10747
|
+
|
|
10748
|
+
return null; */
|
|
10749
|
+
},
|
|
10750
|
+
});
|
|
10751
|
+
}
|
|
10725
10752
|
}
|
|
10726
10753
|
|
|
10727
10754
|
static LOG = {
|
|
@@ -18163,31 +18190,26 @@ class ngFilterButton extends HTMLElement
|
|
|
18163
18190
|
console.log(panel.isHidden, panel.col, this.closest('th,td').dataset.col);
|
|
18164
18191
|
|
|
18165
18192
|
if (panel.col === this.closest('th,td').dataset.col) {
|
|
18166
|
-
|
|
18167
|
-
|
|
18193
|
+
panel.col = null;
|
|
18194
|
+
panel.style.display = 'none';
|
|
18195
|
+
panel.close();
|
|
18168
18196
|
}
|
|
18197
|
+
else {
|
|
18198
|
+
var cell = e.target.closest("th,td");
|
|
18199
|
+
|
|
18200
|
+
var l = $(e.target).offset().left - $(this.#owner).offset().left;// - $(panel).width() + $(e.target).width() + 1;
|
|
18201
|
+
if (l < 0) l = 0;
|
|
18202
|
+
if (l + $(panel).width() > $(this.#owner).width()) l = $(this.#owner).width() - $(panel).width() - 5;
|
|
18203
|
+
|
|
18204
|
+
|
|
18169
18205
|
|
|
18170
|
-
|
|
18171
|
-
|
|
18172
|
-
|
|
18173
|
-
|
|
18174
|
-
if (!panel) throw 'ng-filter-panel is null';
|
|
18175
|
-
*/
|
|
18176
|
-
|
|
18177
|
-
var cell = e.target.closest("th,td");
|
|
18178
|
-
|
|
18179
|
-
var l = $(e.target).offset().left - $(this.#owner).offset().left;// - $(panel).width() + $(e.target).width() + 1;
|
|
18180
|
-
if (l < 0) l = 0;
|
|
18181
|
-
if (l + $(panel).width() > $(this.#owner).width()) l = $(this.#owner).width() - $(panel).width() - 5;
|
|
18182
|
-
|
|
18183
|
-
|
|
18184
|
-
|
|
18185
|
-
var t = $(cell).offset().top + $(cell).height()- $(this.#owner).offset().top;//$(e.target).offset().top + $(e.target).height() + 2;
|
|
18186
|
-
|
|
18187
|
-
//$(panel).offset({left: l, top: t});
|
|
18188
|
-
$(panel).css({left: l, top: t});
|
|
18206
|
+
var t = $(cell).offset().top + $(cell).height()- $(this.#owner).offset().top;//$(e.target).offset().top + $(e.target).height() + 2;
|
|
18207
|
+
|
|
18208
|
+
//$(panel).offset({left: l, top: t});
|
|
18209
|
+
$(panel).css({left: l, top: t});
|
|
18189
18210
|
|
|
18190
|
-
|
|
18211
|
+
panel.open(this.#owner, this);
|
|
18212
|
+
}
|
|
18191
18213
|
};
|
|
18192
18214
|
}
|
|
18193
18215
|
|
|
@@ -18400,12 +18422,17 @@ class ngFilterPanel extends HTMLElement
|
|
|
18400
18422
|
}, 200);
|
|
18401
18423
|
};
|
|
18402
18424
|
|
|
18403
|
-
|
|
18425
|
+
close = () => {
|
|
18426
|
+
this.col = null;
|
|
18427
|
+
this.style.display = 'none';
|
|
18428
|
+
};
|
|
18404
18429
|
|
|
18405
|
-
|
|
18406
|
-
this.col = col;
|
|
18430
|
+
open = (owner, filterButton) => {
|
|
18407
18431
|
|
|
18432
|
+
|
|
18408
18433
|
|
|
18434
|
+
var col = filterButton.closest('th,td').dataset.col;
|
|
18435
|
+
this.col = col;
|
|
18409
18436
|
|
|
18410
18437
|
//if (this.#target && this.#target.uuid == owner.uuid && this.#target.col == col && $(this).is(':visible')) {
|
|
18411
18438
|
if (this.#target && this.#target.col == col && $(this).is(':visible')) ;
|
package/dist/etc/ngFiltering.js
CHANGED
|
@@ -289,31 +289,26 @@ class ngFilterButton extends HTMLElement
|
|
|
289
289
|
console.log(panel.isHidden, panel.col, this.closest('th,td').dataset.col);
|
|
290
290
|
|
|
291
291
|
if (panel.col === this.closest('th,td').dataset.col) {
|
|
292
|
-
|
|
293
|
-
|
|
292
|
+
panel.col = null;
|
|
293
|
+
panel.style.display = 'none';
|
|
294
|
+
panel.close();
|
|
294
295
|
}
|
|
296
|
+
else {
|
|
297
|
+
var cell = e.target.closest("th,td");
|
|
298
|
+
|
|
299
|
+
var l = $(e.target).offset().left - $(this.#owner).offset().left;// - $(panel).width() + $(e.target).width() + 1;
|
|
300
|
+
if (l < 0) l = 0;
|
|
301
|
+
if (l + $(panel).width() > $(this.#owner).width()) l = $(this.#owner).width() - $(panel).width() - 5;
|
|
302
|
+
|
|
303
|
+
|
|
295
304
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
if (!panel) throw 'ng-filter-panel is null';
|
|
301
|
-
*/
|
|
302
|
-
|
|
303
|
-
var cell = e.target.closest("th,td");
|
|
304
|
-
|
|
305
|
-
var l = $(e.target).offset().left - $(this.#owner).offset().left;// - $(panel).width() + $(e.target).width() + 1;
|
|
306
|
-
if (l < 0) l = 0;
|
|
307
|
-
if (l + $(panel).width() > $(this.#owner).width()) l = $(this.#owner).width() - $(panel).width() - 5;
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
var t = $(cell).offset().top + $(cell).height()- $(this.#owner).offset().top;//$(e.target).offset().top + $(e.target).height() + 2;
|
|
312
|
-
|
|
313
|
-
//$(panel).offset({left: l, top: t});
|
|
314
|
-
$(panel).css({left: l, top: t});
|
|
305
|
+
var t = $(cell).offset().top + $(cell).height()- $(this.#owner).offset().top;//$(e.target).offset().top + $(e.target).height() + 2;
|
|
306
|
+
|
|
307
|
+
//$(panel).offset({left: l, top: t});
|
|
308
|
+
$(panel).css({left: l, top: t});
|
|
315
309
|
|
|
316
|
-
|
|
310
|
+
panel.open(this.#owner, this);
|
|
311
|
+
}
|
|
317
312
|
};
|
|
318
313
|
}
|
|
319
314
|
|
|
@@ -528,12 +523,17 @@ class ngFilterPanel extends HTMLElement
|
|
|
528
523
|
}, 200)
|
|
529
524
|
};
|
|
530
525
|
|
|
531
|
-
|
|
526
|
+
close = () => {
|
|
527
|
+
this.col = null;
|
|
528
|
+
this.style.display = 'none';
|
|
529
|
+
};
|
|
532
530
|
|
|
533
|
-
|
|
534
|
-
this.col = col;
|
|
531
|
+
open = (owner, filterButton) => {
|
|
535
532
|
|
|
533
|
+
|
|
536
534
|
|
|
535
|
+
var col = filterButton.closest('th,td').dataset.col;
|
|
536
|
+
this.col = col;
|
|
537
537
|
|
|
538
538
|
//if (this.#target && this.#target.uuid == owner.uuid && this.#target.col == col && $(this).is(':visible')) {
|
|
539
539
|
if (this.#target && this.#target.col == col && $(this).is(':visible')) {
|
package/dist/utils/ninegrid.js
CHANGED
|
@@ -18,6 +18,33 @@ export class ninegrid {
|
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
console.log("shadow" in Element.prototype);
|
|
23
|
+
|
|
24
|
+
if (!("shadow" in Element.prototype)) {
|
|
25
|
+
Object.defineProperty(Element.prototype, "shadow", {
|
|
26
|
+
closest: function (selector) {
|
|
27
|
+
console.log(selector);
|
|
28
|
+
return "xx";
|
|
29
|
+
/**
|
|
30
|
+
let currentElement = this;
|
|
31
|
+
|
|
32
|
+
while (currentElement) {
|
|
33
|
+
if (currentElement.matches(selector)) return currentElement;
|
|
34
|
+
|
|
35
|
+
// ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
|
|
36
|
+
if (currentElement.shadowRoot) {
|
|
37
|
+
const found = currentElement.shadowRoot.querySelector(selector);
|
|
38
|
+
if (found) return found;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return null; */
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
}
|
|
21
48
|
}
|
|
22
49
|
|
|
23
50
|
static LOG = {
|
package/package.json
CHANGED
package/src/etc/ngFiltering.js
CHANGED
|
@@ -289,31 +289,26 @@ class ngFilterButton extends HTMLElement
|
|
|
289
289
|
console.log(panel.isHidden, panel.col, this.closest('th,td').dataset.col);
|
|
290
290
|
|
|
291
291
|
if (panel.col === this.closest('th,td').dataset.col) {
|
|
292
|
-
|
|
293
|
-
|
|
292
|
+
panel.col = null;
|
|
293
|
+
panel.style.display = 'none';
|
|
294
|
+
panel.close();
|
|
294
295
|
}
|
|
296
|
+
else {
|
|
297
|
+
var cell = e.target.closest("th,td");
|
|
298
|
+
|
|
299
|
+
var l = $(e.target).offset().left - $(this.#owner).offset().left;// - $(panel).width() + $(e.target).width() + 1;
|
|
300
|
+
if (l < 0) l = 0;
|
|
301
|
+
if (l + $(panel).width() > $(this.#owner).width()) l = $(this.#owner).width() - $(panel).width() - 5;
|
|
302
|
+
|
|
303
|
+
|
|
295
304
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
if (!panel) throw 'ng-filter-panel is null';
|
|
301
|
-
*/
|
|
302
|
-
|
|
303
|
-
var cell = e.target.closest("th,td");
|
|
304
|
-
|
|
305
|
-
var l = $(e.target).offset().left - $(this.#owner).offset().left;// - $(panel).width() + $(e.target).width() + 1;
|
|
306
|
-
if (l < 0) l = 0;
|
|
307
|
-
if (l + $(panel).width() > $(this.#owner).width()) l = $(this.#owner).width() - $(panel).width() - 5;
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
var t = $(cell).offset().top + $(cell).height()- $(this.#owner).offset().top;//$(e.target).offset().top + $(e.target).height() + 2;
|
|
312
|
-
|
|
313
|
-
//$(panel).offset({left: l, top: t});
|
|
314
|
-
$(panel).css({left: l, top: t});
|
|
305
|
+
var t = $(cell).offset().top + $(cell).height()- $(this.#owner).offset().top;//$(e.target).offset().top + $(e.target).height() + 2;
|
|
306
|
+
|
|
307
|
+
//$(panel).offset({left: l, top: t});
|
|
308
|
+
$(panel).css({left: l, top: t});
|
|
315
309
|
|
|
316
|
-
|
|
310
|
+
panel.open(this.#owner, this);
|
|
311
|
+
}
|
|
317
312
|
};
|
|
318
313
|
}
|
|
319
314
|
|
|
@@ -528,12 +523,17 @@ class ngFilterPanel extends HTMLElement
|
|
|
528
523
|
}, 200)
|
|
529
524
|
};
|
|
530
525
|
|
|
531
|
-
|
|
526
|
+
close = () => {
|
|
527
|
+
this.col = null;
|
|
528
|
+
this.style.display = 'none';
|
|
529
|
+
};
|
|
532
530
|
|
|
533
|
-
|
|
534
|
-
this.col = col;
|
|
531
|
+
open = (owner, filterButton) => {
|
|
535
532
|
|
|
533
|
+
|
|
536
534
|
|
|
535
|
+
var col = filterButton.closest('th,td').dataset.col;
|
|
536
|
+
this.col = col;
|
|
537
537
|
|
|
538
538
|
//if (this.#target && this.#target.uuid == owner.uuid && this.#target.col == col && $(this).is(':visible')) {
|
|
539
539
|
if (this.#target && this.#target.col == col && $(this).is(':visible')) {
|
package/src/utils/ninegrid.js
CHANGED
|
@@ -18,6 +18,33 @@ export class ninegrid {
|
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
console.log("shadow" in Element.prototype);
|
|
23
|
+
|
|
24
|
+
if (!("shadow" in Element.prototype)) {
|
|
25
|
+
Object.defineProperty(Element.prototype, "shadow", {
|
|
26
|
+
closest: function (selector) {
|
|
27
|
+
console.log(selector);
|
|
28
|
+
return "xx";
|
|
29
|
+
/**
|
|
30
|
+
let currentElement = this;
|
|
31
|
+
|
|
32
|
+
while (currentElement) {
|
|
33
|
+
if (currentElement.matches(selector)) return currentElement;
|
|
34
|
+
|
|
35
|
+
// ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
|
|
36
|
+
if (currentElement.shadowRoot) {
|
|
37
|
+
const found = currentElement.shadowRoot.querySelector(selector);
|
|
38
|
+
if (found) return found;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return null; */
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
}
|
|
21
48
|
}
|
|
22
49
|
|
|
23
50
|
static LOG = {
|