ninegrid2 6.480.0 → 6.482.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.
@@ -29,9 +29,12 @@ class aiMessage extends HTMLElement
29
29
 
30
30
  <div class="chat-menu">
31
31
  <div class="left-menu">
32
- <svg class="filter" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-funnel" viewBox="0 0 16 16">
32
+ <svg class="filter" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
33
33
  <path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2z"/>
34
34
  </svg>
35
+ <svg class="database" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
36
+ <path d="M4.318 2.687C5.234 2.271 6.536 2 8 2s2.766.27 3.682.687C12.644 3.125 13 3.627 13 4c0 .374-.356.875-1.318 1.313C10.766 5.729 9.464 6 8 6s-2.766-.27-3.682-.687C3.356 4.875 3 4.373 3 4c0-.374.356-.875 1.318-1.313M13 5.698V7c0 .374-.356.875-1.318 1.313C10.766 8.729 9.464 9 8 9s-2.766-.27-3.682-.687C3.356 7.875 3 7.373 3 7V5.698c.271.202.58.378.904.525C4.978 6.711 6.427 7 8 7s3.022-.289 4.096-.777A5 5 0 0 0 13 5.698M14 4c0-1.007-.875-1.755-1.904-2.223C11.022 1.289 9.573 1 8 1s-3.022.289-4.096.777C2.875 2.245 2 2.993 2 4v9c0 1.007.875 1.755 1.904 2.223C4.978 15.71 6.427 16 8 16s3.022-.289 4.096-.777C13.125 14.755 14 14.007 14 13zm-1 4.698V10c0 .374-.356.875-1.318 1.313C10.766 11.729 9.464 12 8 12s-2.766-.27-3.682-.687C3.356 10.875 3 10.373 3 10V8.698c.271.202.58.378.904.525C4.978 9.71 6.427 10 8 10s3.022-.289 4.096-.777A5 5 0 0 0 13 8.698m0 3V13c0 .374-.356.875-1.318 1.313C10.766 14.729 9.464 15 8 15s-2.766-.27-3.682-.687C3.356 13.875 3 13.373 3 13v-1.302c.271.202.58.378.904.525C4.978 12.71 6.427 13 8 13s3.022-.289 4.096-.777c.324-.147.633-.323.904-.525"/>
37
+ </svg>
35
38
  <svg class="excel" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
36
39
  <path fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM6.472 15.29a1.2 1.2 0 0 1-.111-.449h.765a.58.58 0 0 0 .254.384q.106.073.25.114.143.041.319.041.246 0 .413-.07a.56.56 0 0 0 .255-.193.5.5 0 0 0 .085-.29.39.39 0 0 0-.153-.326q-.152-.12-.462-.193l-.619-.143a1.7 1.7 0 0 1-.539-.214 1 1 0 0 1-.351-.367 1.1 1.1 0 0 1-.123-.524q0-.366.19-.639.19-.272.527-.422.338-.15.777-.149.457 0 .78.152.324.153.5.41.18.255.2.566h-.75a.56.56 0 0 0-.12-.258.6.6 0 0 0-.247-.181.9.9 0 0 0-.369-.068q-.325 0-.513.152a.47.47 0 0 0-.184.384q0 .18.143.3a1 1 0 0 0 .405.175l.62.143q.326.075.566.211a1 1 0 0 1 .375.358q.135.222.135.56 0 .37-.188.656a1.2 1.2 0 0 1-.539.439q-.351.158-.858.158-.381 0-.665-.09a1.4 1.4 0 0 1-.478-.252 1.1 1.1 0 0 1-.29-.375m-2.945-3.358h-.893L1.81 13.37h-.036l-.832-1.438h-.93l1.227 1.983L0 15.931h.861l.853-1.415h.035l.85 1.415h.908L2.253 13.94zm2.727 3.325H4.557v-3.325h-.79v4h2.487z"/>
37
40
  </svg>
@@ -59,6 +62,17 @@ class aiMessage extends HTMLElement
59
62
  }
60
63
  });
61
64
 
65
+ this.shadowRoot.querySelector(".database").addEventListener("click", e => {
66
+ //this.shadowRoot.querySelector("nine-grid").maximize();
67
+ const keys = this.#data.map(item =>
68
+ Object.fromEntries(this.#unique.map(key => [key, item[key]]))
69
+ );
70
+
71
+ console.log(keys);
72
+
73
+ this.dispatchEvent(new CustomEvent("database", { bubbles: true, detail: { key : keys } }));
74
+ });
75
+
62
76
  this.shadowRoot.querySelector(".maximize").addEventListener("click", e => {
63
77
  this.shadowRoot.querySelector("nine-grid").maximize();
64
78
  });
@@ -27355,6 +27355,34 @@ class nxTopMenu extends HTMLElement
27355
27355
 
27356
27356
  customElements.define("nx-top-menu", nxTopMenu);
27357
27357
 
27358
+ Array.prototype.nineBinarySearch = function(target)
27359
+ {
27360
+ this.sort((a,b) => { return a > b ? 1 : -1; });
27361
+
27362
+ let start = 0;
27363
+ let end = this.length-1;
27364
+ let mid;
27365
+
27366
+ while (start <= end) { //점점 좁혀지다가 start와 end의 순서가 어긋나게 되면 반복을 종료한다
27367
+
27368
+ mid = parseInt((start+end)/2);
27369
+
27370
+ if (target == this[mid]) {
27371
+ return mid;
27372
+ }
27373
+ else {
27374
+ if (target < this[mid]){
27375
+ end = mid - 1;
27376
+ }
27377
+ else {
27378
+ start = mid + 1;
27379
+ }
27380
+ }
27381
+ }
27382
+
27383
+ return -1;
27384
+ };
27385
+
27358
27386
  //import ninegrid from "../index.js";
27359
27387
 
27360
27388
  class aiSettings extends HTMLElement
@@ -27556,9 +27584,12 @@ class aiMessage extends HTMLElement
27556
27584
 
27557
27585
  <div class="chat-menu">
27558
27586
  <div class="left-menu">
27559
- <svg class="filter" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-funnel" viewBox="0 0 16 16">
27587
+ <svg class="filter" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
27560
27588
  <path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2z"/>
27561
27589
  </svg>
27590
+ <svg class="database" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
27591
+ <path d="M4.318 2.687C5.234 2.271 6.536 2 8 2s2.766.27 3.682.687C12.644 3.125 13 3.627 13 4c0 .374-.356.875-1.318 1.313C10.766 5.729 9.464 6 8 6s-2.766-.27-3.682-.687C3.356 4.875 3 4.373 3 4c0-.374.356-.875 1.318-1.313M13 5.698V7c0 .374-.356.875-1.318 1.313C10.766 8.729 9.464 9 8 9s-2.766-.27-3.682-.687C3.356 7.875 3 7.373 3 7V5.698c.271.202.58.378.904.525C4.978 6.711 6.427 7 8 7s3.022-.289 4.096-.777A5 5 0 0 0 13 5.698M14 4c0-1.007-.875-1.755-1.904-2.223C11.022 1.289 9.573 1 8 1s-3.022.289-4.096.777C2.875 2.245 2 2.993 2 4v9c0 1.007.875 1.755 1.904 2.223C4.978 15.71 6.427 16 8 16s3.022-.289 4.096-.777C13.125 14.755 14 14.007 14 13zm-1 4.698V10c0 .374-.356.875-1.318 1.313C10.766 11.729 9.464 12 8 12s-2.766-.27-3.682-.687C3.356 10.875 3 10.373 3 10V8.698c.271.202.58.378.904.525C4.978 9.71 6.427 10 8 10s3.022-.289 4.096-.777A5 5 0 0 0 13 8.698m0 3V13c0 .374-.356.875-1.318 1.313C10.766 14.729 9.464 15 8 15s-2.766-.27-3.682-.687C3.356 13.875 3 13.373 3 13v-1.302c.271.202.58.378.904.525C4.978 12.71 6.427 13 8 13s3.022-.289 4.096-.777c.324-.147.633-.323.904-.525"/>
27592
+ </svg>
27562
27593
  <svg class="excel" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
27563
27594
  <path fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM6.472 15.29a1.2 1.2 0 0 1-.111-.449h.765a.58.58 0 0 0 .254.384q.106.073.25.114.143.041.319.041.246 0 .413-.07a.56.56 0 0 0 .255-.193.5.5 0 0 0 .085-.29.39.39 0 0 0-.153-.326q-.152-.12-.462-.193l-.619-.143a1.7 1.7 0 0 1-.539-.214 1 1 0 0 1-.351-.367 1.1 1.1 0 0 1-.123-.524q0-.366.19-.639.19-.272.527-.422.338-.15.777-.149.457 0 .78.152.324.153.5.41.18.255.2.566h-.75a.56.56 0 0 0-.12-.258.6.6 0 0 0-.247-.181.9.9 0 0 0-.369-.068q-.325 0-.513.152a.47.47 0 0 0-.184.384q0 .18.143.3a1 1 0 0 0 .405.175l.62.143q.326.075.566.211a1 1 0 0 1 .375.358q.135.222.135.56 0 .37-.188.656a1.2 1.2 0 0 1-.539.439q-.351.158-.858.158-.381 0-.665-.09a1.4 1.4 0 0 1-.478-.252 1.1 1.1 0 0 1-.29-.375m-2.945-3.358h-.893L1.81 13.37h-.036l-.832-1.438h-.93l1.227 1.983L0 15.931h.861l.853-1.415h.035l.85 1.415h.908L2.253 13.94zm2.727 3.325H4.557v-3.325h-.79v4h2.487z"/>
27564
27595
  </svg>
@@ -27586,6 +27617,17 @@ class aiMessage extends HTMLElement
27586
27617
  }
27587
27618
  });
27588
27619
 
27620
+ this.shadowRoot.querySelector(".database").addEventListener("click", e => {
27621
+ //this.shadowRoot.querySelector("nine-grid").maximize();
27622
+ const keys = this.#data.map(item =>
27623
+ Object.fromEntries(this.#unique.map(key => [key, item[key]]))
27624
+ );
27625
+
27626
+ console.log(keys);
27627
+
27628
+ this.dispatchEvent(new CustomEvent("database", { bubbles: true, detail: { key : keys } }));
27629
+ });
27630
+
27589
27631
  this.shadowRoot.querySelector(".maximize").addEventListener("click", e => {
27590
27632
  this.shadowRoot.querySelector("nine-grid").maximize();
27591
27633
  });
@@ -27353,6 +27353,34 @@ class nxTopMenu extends HTMLElement
27353
27353
 
27354
27354
  customElements.define("nx-top-menu", nxTopMenu);
27355
27355
 
27356
+ Array.prototype.nineBinarySearch = function(target)
27357
+ {
27358
+ this.sort((a,b) => { return a > b ? 1 : -1; });
27359
+
27360
+ let start = 0;
27361
+ let end = this.length-1;
27362
+ let mid;
27363
+
27364
+ while (start <= end) { //점점 좁혀지다가 start와 end의 순서가 어긋나게 되면 반복을 종료한다
27365
+
27366
+ mid = parseInt((start+end)/2);
27367
+
27368
+ if (target == this[mid]) {
27369
+ return mid;
27370
+ }
27371
+ else {
27372
+ if (target < this[mid]){
27373
+ end = mid - 1;
27374
+ }
27375
+ else {
27376
+ start = mid + 1;
27377
+ }
27378
+ }
27379
+ }
27380
+
27381
+ return -1;
27382
+ };
27383
+
27356
27384
  //import ninegrid from "../index.js";
27357
27385
 
27358
27386
  class aiSettings extends HTMLElement
@@ -27554,9 +27582,12 @@ class aiMessage extends HTMLElement
27554
27582
 
27555
27583
  <div class="chat-menu">
27556
27584
  <div class="left-menu">
27557
- <svg class="filter" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-funnel" viewBox="0 0 16 16">
27585
+ <svg class="filter" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
27558
27586
  <path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2z"/>
27559
27587
  </svg>
27588
+ <svg class="database" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
27589
+ <path d="M4.318 2.687C5.234 2.271 6.536 2 8 2s2.766.27 3.682.687C12.644 3.125 13 3.627 13 4c0 .374-.356.875-1.318 1.313C10.766 5.729 9.464 6 8 6s-2.766-.27-3.682-.687C3.356 4.875 3 4.373 3 4c0-.374.356-.875 1.318-1.313M13 5.698V7c0 .374-.356.875-1.318 1.313C10.766 8.729 9.464 9 8 9s-2.766-.27-3.682-.687C3.356 7.875 3 7.373 3 7V5.698c.271.202.58.378.904.525C4.978 6.711 6.427 7 8 7s3.022-.289 4.096-.777A5 5 0 0 0 13 5.698M14 4c0-1.007-.875-1.755-1.904-2.223C11.022 1.289 9.573 1 8 1s-3.022.289-4.096.777C2.875 2.245 2 2.993 2 4v9c0 1.007.875 1.755 1.904 2.223C4.978 15.71 6.427 16 8 16s3.022-.289 4.096-.777C13.125 14.755 14 14.007 14 13zm-1 4.698V10c0 .374-.356.875-1.318 1.313C10.766 11.729 9.464 12 8 12s-2.766-.27-3.682-.687C3.356 10.875 3 10.373 3 10V8.698c.271.202.58.378.904.525C4.978 9.71 6.427 10 8 10s3.022-.289 4.096-.777A5 5 0 0 0 13 8.698m0 3V13c0 .374-.356.875-1.318 1.313C10.766 14.729 9.464 15 8 15s-2.766-.27-3.682-.687C3.356 13.875 3 13.373 3 13v-1.302c.271.202.58.378.904.525C4.978 12.71 6.427 13 8 13s3.022-.289 4.096-.777c.324-.147.633-.323.904-.525"/>
27590
+ </svg>
27560
27591
  <svg class="excel" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
27561
27592
  <path fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM6.472 15.29a1.2 1.2 0 0 1-.111-.449h.765a.58.58 0 0 0 .254.384q.106.073.25.114.143.041.319.041.246 0 .413-.07a.56.56 0 0 0 .255-.193.5.5 0 0 0 .085-.29.39.39 0 0 0-.153-.326q-.152-.12-.462-.193l-.619-.143a1.7 1.7 0 0 1-.539-.214 1 1 0 0 1-.351-.367 1.1 1.1 0 0 1-.123-.524q0-.366.19-.639.19-.272.527-.422.338-.15.777-.149.457 0 .78.152.324.153.5.41.18.255.2.566h-.75a.56.56 0 0 0-.12-.258.6.6 0 0 0-.247-.181.9.9 0 0 0-.369-.068q-.325 0-.513.152a.47.47 0 0 0-.184.384q0 .18.143.3a1 1 0 0 0 .405.175l.62.143q.326.075.566.211a1 1 0 0 1 .375.358q.135.222.135.56 0 .37-.188.656a1.2 1.2 0 0 1-.539.439q-.351.158-.858.158-.381 0-.665-.09a1.4 1.4 0 0 1-.478-.252 1.1 1.1 0 0 1-.29-.375m-2.945-3.358h-.893L1.81 13.37h-.036l-.832-1.438h-.93l1.227 1.983L0 15.931h.861l.853-1.415h.035l.85 1.415h.908L2.253 13.94zm2.727 3.325H4.557v-3.325h-.79v4h2.487z"/>
27562
27593
  </svg>
@@ -27584,6 +27615,17 @@ class aiMessage extends HTMLElement
27584
27615
  }
27585
27616
  });
27586
27617
 
27618
+ this.shadowRoot.querySelector(".database").addEventListener("click", e => {
27619
+ //this.shadowRoot.querySelector("nine-grid").maximize();
27620
+ const keys = this.#data.map(item =>
27621
+ Object.fromEntries(this.#unique.map(key => [key, item[key]]))
27622
+ );
27623
+
27624
+ console.log(keys);
27625
+
27626
+ this.dispatchEvent(new CustomEvent("database", { bubbles: true, detail: { key : keys } }));
27627
+ });
27628
+
27587
27629
  this.shadowRoot.querySelector(".maximize").addEventListener("click", e => {
27588
27630
  this.shadowRoot.querySelector("nine-grid").maximize();
27589
27631
  });
package/dist/index.js CHANGED
@@ -99,6 +99,7 @@ import "./etc/nxTopMenu.js";
99
99
  //import "./etc/object-observe.js";
100
100
 
101
101
  import "./utils/ngFiltering.js";
102
+ import "./utils/ngPrototype.js";
102
103
 
103
104
 
104
105
  import "./ai/aiSettings.js";
@@ -0,0 +1,30 @@
1
+ Array.prototype.nineBinarySearch = function(target)
2
+ {
3
+ this.sort((a,b) => { return a > b ? 1 : -1; });
4
+
5
+ let start = 0;
6
+ let end = this.length-1
7
+ let mid
8
+
9
+ while (start <= end) { //점점 좁혀지다가 start와 end의 순서가 어긋나게 되면 반복을 종료한다
10
+
11
+ mid = parseInt((start+end)/2)
12
+
13
+ if (target == this[mid]) {
14
+ return mid;
15
+ }
16
+ else{
17
+ if (target < this[mid]){
18
+ end = mid - 1;
19
+ }
20
+ else {
21
+ start = mid + 1;
22
+ }
23
+ }
24
+ }
25
+
26
+ return -1;
27
+ };
28
+
29
+
30
+
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.480.0",
4
+ "version": "6.482.0",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
7
  "import": "./dist/index.js",
@@ -29,9 +29,12 @@ class aiMessage extends HTMLElement
29
29
 
30
30
  <div class="chat-menu">
31
31
  <div class="left-menu">
32
- <svg class="filter" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-funnel" viewBox="0 0 16 16">
32
+ <svg class="filter" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
33
33
  <path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2z"/>
34
34
  </svg>
35
+ <svg class="database" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
36
+ <path d="M4.318 2.687C5.234 2.271 6.536 2 8 2s2.766.27 3.682.687C12.644 3.125 13 3.627 13 4c0 .374-.356.875-1.318 1.313C10.766 5.729 9.464 6 8 6s-2.766-.27-3.682-.687C3.356 4.875 3 4.373 3 4c0-.374.356-.875 1.318-1.313M13 5.698V7c0 .374-.356.875-1.318 1.313C10.766 8.729 9.464 9 8 9s-2.766-.27-3.682-.687C3.356 7.875 3 7.373 3 7V5.698c.271.202.58.378.904.525C4.978 6.711 6.427 7 8 7s3.022-.289 4.096-.777A5 5 0 0 0 13 5.698M14 4c0-1.007-.875-1.755-1.904-2.223C11.022 1.289 9.573 1 8 1s-3.022.289-4.096.777C2.875 2.245 2 2.993 2 4v9c0 1.007.875 1.755 1.904 2.223C4.978 15.71 6.427 16 8 16s3.022-.289 4.096-.777C13.125 14.755 14 14.007 14 13zm-1 4.698V10c0 .374-.356.875-1.318 1.313C10.766 11.729 9.464 12 8 12s-2.766-.27-3.682-.687C3.356 10.875 3 10.373 3 10V8.698c.271.202.58.378.904.525C4.978 9.71 6.427 10 8 10s3.022-.289 4.096-.777A5 5 0 0 0 13 8.698m0 3V13c0 .374-.356.875-1.318 1.313C10.766 14.729 9.464 15 8 15s-2.766-.27-3.682-.687C3.356 13.875 3 13.373 3 13v-1.302c.271.202.58.378.904.525C4.978 12.71 6.427 13 8 13s3.022-.289 4.096-.777c.324-.147.633-.323.904-.525"/>
37
+ </svg>
35
38
  <svg class="excel" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
36
39
  <path fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM6.472 15.29a1.2 1.2 0 0 1-.111-.449h.765a.58.58 0 0 0 .254.384q.106.073.25.114.143.041.319.041.246 0 .413-.07a.56.56 0 0 0 .255-.193.5.5 0 0 0 .085-.29.39.39 0 0 0-.153-.326q-.152-.12-.462-.193l-.619-.143a1.7 1.7 0 0 1-.539-.214 1 1 0 0 1-.351-.367 1.1 1.1 0 0 1-.123-.524q0-.366.19-.639.19-.272.527-.422.338-.15.777-.149.457 0 .78.152.324.153.5.41.18.255.2.566h-.75a.56.56 0 0 0-.12-.258.6.6 0 0 0-.247-.181.9.9 0 0 0-.369-.068q-.325 0-.513.152a.47.47 0 0 0-.184.384q0 .18.143.3a1 1 0 0 0 .405.175l.62.143q.326.075.566.211a1 1 0 0 1 .375.358q.135.222.135.56 0 .37-.188.656a1.2 1.2 0 0 1-.539.439q-.351.158-.858.158-.381 0-.665-.09a1.4 1.4 0 0 1-.478-.252 1.1 1.1 0 0 1-.29-.375m-2.945-3.358h-.893L1.81 13.37h-.036l-.832-1.438h-.93l1.227 1.983L0 15.931h.861l.853-1.415h.035l.85 1.415h.908L2.253 13.94zm2.727 3.325H4.557v-3.325h-.79v4h2.487z"/>
37
40
  </svg>
@@ -59,6 +62,17 @@ class aiMessage extends HTMLElement
59
62
  }
60
63
  });
61
64
 
65
+ this.shadowRoot.querySelector(".database").addEventListener("click", e => {
66
+ //this.shadowRoot.querySelector("nine-grid").maximize();
67
+ const keys = this.#data.map(item =>
68
+ Object.fromEntries(this.#unique.map(key => [key, item[key]]))
69
+ );
70
+
71
+ console.log(keys);
72
+
73
+ this.dispatchEvent(new CustomEvent("database", { bubbles: true, detail: { key : keys } }));
74
+ });
75
+
62
76
  this.shadowRoot.querySelector(".maximize").addEventListener("click", e => {
63
77
  this.shadowRoot.querySelector("nine-grid").maximize();
64
78
  });
package/src/index.js CHANGED
@@ -99,6 +99,7 @@ import "./etc/nxTopMenu.js";
99
99
  //import "./etc/object-observe.js";
100
100
 
101
101
  import "./utils/ngFiltering.js";
102
+ import "./utils/ngPrototype.js";
102
103
 
103
104
 
104
105
  import "./ai/aiSettings.js";
@@ -0,0 +1,30 @@
1
+ Array.prototype.nineBinarySearch = function(target)
2
+ {
3
+ this.sort((a,b) => { return a > b ? 1 : -1; });
4
+
5
+ let start = 0;
6
+ let end = this.length-1
7
+ let mid
8
+
9
+ while (start <= end) { //점점 좁혀지다가 start와 end의 순서가 어긋나게 되면 반복을 종료한다
10
+
11
+ mid = parseInt((start+end)/2)
12
+
13
+ if (target == this[mid]) {
14
+ return mid;
15
+ }
16
+ else{
17
+ if (target < this[mid]){
18
+ end = mid - 1;
19
+ }
20
+ else {
21
+ start = mid + 1;
22
+ }
23
+ }
24
+ }
25
+
26
+ return -1;
27
+ };
28
+
29
+
30
+