ninegrid2 6.650.0 → 6.652.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.
@@ -11167,6 +11167,8 @@ class ninegrid {
11167
11167
  };
11168
11168
 
11169
11169
  static decode = (args) => {
11170
+ console.log(args);
11171
+
11170
11172
  for (var i = 1; i < args.length ; i+=2) {
11171
11173
  if (args[0] === args[i]) return args[i+1];
11172
11174
  }
@@ -11432,6 +11434,7 @@ class ninegrid {
11432
11434
  }
11433
11435
 
11434
11436
 
11437
+ /**
11435
11438
  static querySelectorAll = (selector, root) => {
11436
11439
 
11437
11440
  root = root || document;
@@ -11457,7 +11460,54 @@ class ninegrid {
11457
11460
 
11458
11461
  return results;
11459
11462
  };
11460
-
11463
+ */
11464
+
11465
+ static querySelectorAll(selector, root = document) {
11466
+ const results = [];
11467
+
11468
+ const search = (node) => {
11469
+ // 현재 노드에서 찾기
11470
+ node.querySelectorAll?.(selector)?.forEach(elem => {
11471
+ if (!results.includes(elem)) results.push(elem);
11472
+ });
11473
+
11474
+ // 모든 자식 요소 순회
11475
+ node.querySelectorAll?.('*')?.forEach(child => {
11476
+ if (child.shadowRoot) {
11477
+ search(child.shadowRoot); // 💡 재귀적으로 계속 들어가!
11478
+ }
11479
+ });
11480
+ };
11481
+
11482
+ // 시작점
11483
+ search(root.shadowRoot ?? root);
11484
+
11485
+ return results;
11486
+ }
11487
+
11488
+ static querySelector(selector, root = document) {
11489
+ let found = root.querySelector?.(selector);
11490
+ if (found) return found;
11491
+
11492
+ // 최상위 shadow root가 있다면 먼저 탐색
11493
+ if (root.shadowRoot) {
11494
+ found = this.querySelector(selector, root.shadowRoot);
11495
+ if (found) return found;
11496
+ }
11497
+
11498
+ // 모든 자식 요소 탐색
11499
+ for (const elem of root.querySelectorAll?.('*') ?? []) {
11500
+ if (elem.shadowRoot) {
11501
+ found = this.querySelector(selector, elem.shadowRoot);
11502
+ if (found) return found;
11503
+ }
11504
+ }
11505
+
11506
+ return null; // 없으면 null 반환
11507
+ }
11508
+
11509
+
11510
+
11461
11511
  static i18n = {
11462
11512
  convertArrayToJSON : (arr) => {
11463
11513
  let result = {};
@@ -11163,6 +11163,8 @@ class ninegrid {
11163
11163
  };
11164
11164
 
11165
11165
  static decode = (args) => {
11166
+ console.log(args);
11167
+
11166
11168
  for (var i = 1; i < args.length ; i+=2) {
11167
11169
  if (args[0] === args[i]) return args[i+1];
11168
11170
  }
@@ -11428,6 +11430,7 @@ class ninegrid {
11428
11430
  }
11429
11431
 
11430
11432
 
11433
+ /**
11431
11434
  static querySelectorAll = (selector, root) => {
11432
11435
 
11433
11436
  root = root || document;
@@ -11453,7 +11456,54 @@ class ninegrid {
11453
11456
 
11454
11457
  return results;
11455
11458
  };
11456
-
11459
+ */
11460
+
11461
+ static querySelectorAll(selector, root = document) {
11462
+ const results = [];
11463
+
11464
+ const search = (node) => {
11465
+ // 현재 노드에서 찾기
11466
+ node.querySelectorAll?.(selector)?.forEach(elem => {
11467
+ if (!results.includes(elem)) results.push(elem);
11468
+ });
11469
+
11470
+ // 모든 자식 요소 순회
11471
+ node.querySelectorAll?.('*')?.forEach(child => {
11472
+ if (child.shadowRoot) {
11473
+ search(child.shadowRoot); // 💡 재귀적으로 계속 들어가!
11474
+ }
11475
+ });
11476
+ };
11477
+
11478
+ // 시작점
11479
+ search(root.shadowRoot ?? root);
11480
+
11481
+ return results;
11482
+ }
11483
+
11484
+ static querySelector(selector, root = document) {
11485
+ let found = root.querySelector?.(selector);
11486
+ if (found) return found;
11487
+
11488
+ // 최상위 shadow root가 있다면 먼저 탐색
11489
+ if (root.shadowRoot) {
11490
+ found = this.querySelector(selector, root.shadowRoot);
11491
+ if (found) return found;
11492
+ }
11493
+
11494
+ // 모든 자식 요소 탐색
11495
+ for (const elem of root.querySelectorAll?.('*') ?? []) {
11496
+ if (elem.shadowRoot) {
11497
+ found = this.querySelector(selector, elem.shadowRoot);
11498
+ if (found) return found;
11499
+ }
11500
+ }
11501
+
11502
+ return null; // 없으면 null 반환
11503
+ }
11504
+
11505
+
11506
+
11457
11507
  static i18n = {
11458
11508
  convertArrayToJSON : (arr) => {
11459
11509
  let result = {};
@@ -300,6 +300,8 @@ export class ninegrid {
300
300
  };
301
301
 
302
302
  static decode = (args) => {
303
+ console.log(args);
304
+
303
305
  for (var i = 1; i < args.length ; i+=2) {
304
306
  if (args[0] === args[i]) return args[i+1];
305
307
  }
@@ -565,6 +567,7 @@ export class ninegrid {
565
567
  }
566
568
 
567
569
 
570
+ /**
568
571
  static querySelectorAll = (selector, root) => {
569
572
 
570
573
  root = root || document;
@@ -590,7 +593,54 @@ export class ninegrid {
590
593
 
591
594
  return results;
592
595
  };
593
-
596
+ */
597
+
598
+ static querySelectorAll(selector, root = document) {
599
+ const results = [];
600
+
601
+ const search = (node) => {
602
+ // 현재 노드에서 찾기
603
+ node.querySelectorAll?.(selector)?.forEach(elem => {
604
+ if (!results.includes(elem)) results.push(elem);
605
+ });
606
+
607
+ // 모든 자식 요소 순회
608
+ node.querySelectorAll?.('*')?.forEach(child => {
609
+ if (child.shadowRoot) {
610
+ search(child.shadowRoot); // 💡 재귀적으로 계속 들어가!
611
+ }
612
+ });
613
+ };
614
+
615
+ // 시작점
616
+ search(root.shadowRoot ?? root);
617
+
618
+ return results;
619
+ }
620
+
621
+ static querySelector(selector, root = document) {
622
+ let found = root.querySelector?.(selector);
623
+ if (found) return found;
624
+
625
+ // 최상위 shadow root가 있다면 먼저 탐색
626
+ if (root.shadowRoot) {
627
+ found = this.querySelector(selector, root.shadowRoot);
628
+ if (found) return found;
629
+ }
630
+
631
+ // 모든 자식 요소 탐색
632
+ for (const elem of root.querySelectorAll?.('*') ?? []) {
633
+ if (elem.shadowRoot) {
634
+ found = this.querySelector(selector, elem.shadowRoot);
635
+ if (found) return found;
636
+ }
637
+ }
638
+
639
+ return null; // 없으면 null 반환
640
+ }
641
+
642
+
643
+
594
644
  static i18n = {
595
645
  convertArrayToJSON : (arr) => {
596
646
  let result = {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.650.0",
4
+ "version": "6.652.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -300,6 +300,8 @@ export class ninegrid {
300
300
  };
301
301
 
302
302
  static decode = (args) => {
303
+ console.log(args);
304
+
303
305
  for (var i = 1; i < args.length ; i+=2) {
304
306
  if (args[0] === args[i]) return args[i+1];
305
307
  }
@@ -565,6 +567,7 @@ export class ninegrid {
565
567
  }
566
568
 
567
569
 
570
+ /**
568
571
  static querySelectorAll = (selector, root) => {
569
572
 
570
573
  root = root || document;
@@ -590,7 +593,54 @@ export class ninegrid {
590
593
 
591
594
  return results;
592
595
  };
593
-
596
+ */
597
+
598
+ static querySelectorAll(selector, root = document) {
599
+ const results = [];
600
+
601
+ const search = (node) => {
602
+ // 현재 노드에서 찾기
603
+ node.querySelectorAll?.(selector)?.forEach(elem => {
604
+ if (!results.includes(elem)) results.push(elem);
605
+ });
606
+
607
+ // 모든 자식 요소 순회
608
+ node.querySelectorAll?.('*')?.forEach(child => {
609
+ if (child.shadowRoot) {
610
+ search(child.shadowRoot); // 💡 재귀적으로 계속 들어가!
611
+ }
612
+ });
613
+ };
614
+
615
+ // 시작점
616
+ search(root.shadowRoot ?? root);
617
+
618
+ return results;
619
+ }
620
+
621
+ static querySelector(selector, root = document) {
622
+ let found = root.querySelector?.(selector);
623
+ if (found) return found;
624
+
625
+ // 최상위 shadow root가 있다면 먼저 탐색
626
+ if (root.shadowRoot) {
627
+ found = this.querySelector(selector, root.shadowRoot);
628
+ if (found) return found;
629
+ }
630
+
631
+ // 모든 자식 요소 탐색
632
+ for (const elem of root.querySelectorAll?.('*') ?? []) {
633
+ if (elem.shadowRoot) {
634
+ found = this.querySelector(selector, elem.shadowRoot);
635
+ if (found) return found;
636
+ }
637
+ }
638
+
639
+ return null; // 없으면 null 반환
640
+ }
641
+
642
+
643
+
594
644
  static i18n = {
595
645
  convertArrayToJSON : (arr) => {
596
646
  let result = {};