ninegrid2 6.440.0 → 6.441.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.
@@ -78,24 +78,15 @@ class aiMessage extends HTMLElement
78
78
  });
79
79
  };
80
80
 
81
-
82
- initialize = (data) => {
83
- this.#data = data;
84
-
85
- setTimeout(() => {
86
- this.#init();
87
- });
88
- }
89
-
90
- initialize2 = (info, data) => {
81
+ initialize = (info, data) => {
91
82
  this.#data = data;
92
83
 
93
84
  setTimeout(() => {
94
- this.#init2(info);
85
+ this.#init(info);
95
86
  });
96
87
  }
97
88
 
98
- #init2 = (info) => {
89
+ #init = (info) => {
99
90
 
100
91
  const rowCount = Number(this.getAttribute("row-count"));
101
92
  if (rowCount < 1) {
@@ -104,14 +95,10 @@ class aiMessage extends HTMLElement
104
95
  return;
105
96
  }
106
97
 
107
- let colgroup = "";
108
- let thead = "";
109
- let tbody = "";
110
- for (let o of info) {
111
- colgroup += `<col background-color="#888"/>`;
112
- thead += `<th>${o.desc}</th>`;
113
- tbody += `<td data-bind="${o.name}"></td>`;
114
- }
98
+ let colgroup = info.map(() => `<col background-color="#888"/>`).join("");
99
+ let thead = info.map(item => `<th>${item.desc}</th>`).join("");
100
+ let tbody = info.map(item => `<td data-bind="${item.name}" text-align="${item.type == 'number' ? 'right' : 'left'}"></td>`).join("");
101
+
115
102
 
116
103
  const html = `
117
104
  <nine-grid class="ai" display-row-count="${rowCount > 5 ? 5 : rowCount}" show-title-bar="false" show-menu-icon="false" show-status-bar="false" select-type="row" auto-fit-col="true" show-title-bar="true" show-menu-icon="true" show-status-bar="true" enable-fixed-col="true" row-resizable="false" col-movable="true">
@@ -146,64 +133,6 @@ class aiMessage extends HTMLElement
146
133
  //this.scrollIntoView({ behavior: "smooth", block: "end" });
147
134
  });
148
135
  };
149
-
150
- #init = () => {
151
-
152
- const rowCount = Number(this.getAttribute("row-count"));
153
- if (rowCount < 1) {
154
- this.shadowRoot.querySelector(".grid").style.display = "none";
155
- this.shadowRoot.querySelector(".chat-menu").style.display = "none";
156
- return;
157
- }
158
-
159
- const html = `
160
- <nine-grid class="ai" display-row-count="${rowCount > 5 ? 5 : rowCount}" show-title-bar="false" show-menu-icon="false" show-status-bar="false" select-type="row" auto-fit-col="true" show-title-bar="true" show-menu-icon="true" show-status-bar="true" enable-fixed-col="true" row-resizable="false" col-movable="true">
161
- <table>
162
- <caption>Sheet1</caption>
163
- <colgroup>
164
- <col background-color="#888"/>
165
- <col background-color="#888"/>
166
- <col background-color="#888"/>
167
- <col background-color="#888"/>
168
- <col background-color="#888"/>
169
- <col background-color="#888"/>
170
- <col background-color="#888"/>
171
- </colgroup>
172
- <thead>
173
- <tr>
174
- <th>No.</th>
175
- <th>문서 ID</th>
176
- <th>문서명</th>
177
- <th>매출액</th>
178
- <th>관련 문서</th>
179
- <th>수정자</th>
180
- <th>수정일</th>
181
- </tr>
182
- </thead>
183
- <tbody>
184
- <tr>
185
- <th><ng-row-indicator/></th>
186
- <td data-bind="doc_id"></td>
187
- <td data-bind="doc_nm"></td>
188
- <td data-bind="amt"></td>
189
- <td data-bind="file_id"></td>
190
- <td data-bind="update_user" text-align="center"></td>
191
- <td data-bind="update_dt" text-align="center"></td>
192
- </tr>
193
- </tbody>
194
- </table>
195
- </nine-grid>
196
- `;
197
-
198
- this.shadowRoot.querySelector(".grid").innerHTML = html;
199
-
200
- setTimeout(() => {
201
- const grd = this.shadowRoot.querySelector("nine-grid");
202
- grd.data.source = this.#data;
203
-
204
- //this.scrollIntoView({ behavior: "smooth", block: "end" });
205
- });
206
- };
207
136
  }
208
137
 
209
138
  class aiIngMessage extends HTMLElement
@@ -27494,24 +27494,15 @@ class aiMessage extends HTMLElement
27494
27494
  });
27495
27495
  };
27496
27496
 
27497
-
27498
- initialize = (data) => {
27499
- this.#data = data;
27500
-
27501
- setTimeout(() => {
27502
- this.#init();
27503
- });
27504
- }
27505
-
27506
- initialize2 = (info, data) => {
27497
+ initialize = (info, data) => {
27507
27498
  this.#data = data;
27508
27499
 
27509
27500
  setTimeout(() => {
27510
- this.#init2(info);
27501
+ this.#init(info);
27511
27502
  });
27512
27503
  }
27513
27504
 
27514
- #init2 = (info) => {
27505
+ #init = (info) => {
27515
27506
 
27516
27507
  const rowCount = Number(this.getAttribute("row-count"));
27517
27508
  if (rowCount < 1) {
@@ -27520,14 +27511,10 @@ class aiMessage extends HTMLElement
27520
27511
  return;
27521
27512
  }
27522
27513
 
27523
- let colgroup = "";
27524
- let thead = "";
27525
- let tbody = "";
27526
- for (let o of info) {
27527
- colgroup += `<col background-color="#888"/>`;
27528
- thead += `<th>${o.desc}</th>`;
27529
- tbody += `<td data-bind="${o.name}"></td>`;
27530
- }
27514
+ let colgroup = info.map(() => `<col background-color="#888"/>`).join("");
27515
+ let thead = info.map(item => `<th>${item.desc}</th>`).join("");
27516
+ let tbody = info.map(item => `<td data-bind="${item.name}" text-align="${item.type == 'number' ? 'right' : 'left'}"></td>`).join("");
27517
+
27531
27518
 
27532
27519
  const html = `
27533
27520
  <nine-grid class="ai" display-row-count="${rowCount > 5 ? 5 : rowCount}" show-title-bar="false" show-menu-icon="false" show-status-bar="false" select-type="row" auto-fit-col="true" show-title-bar="true" show-menu-icon="true" show-status-bar="true" enable-fixed-col="true" row-resizable="false" col-movable="true">
@@ -27562,64 +27549,6 @@ class aiMessage extends HTMLElement
27562
27549
  //this.scrollIntoView({ behavior: "smooth", block: "end" });
27563
27550
  });
27564
27551
  };
27565
-
27566
- #init = () => {
27567
-
27568
- const rowCount = Number(this.getAttribute("row-count"));
27569
- if (rowCount < 1) {
27570
- this.shadowRoot.querySelector(".grid").style.display = "none";
27571
- this.shadowRoot.querySelector(".chat-menu").style.display = "none";
27572
- return;
27573
- }
27574
-
27575
- const html = `
27576
- <nine-grid class="ai" display-row-count="${rowCount > 5 ? 5 : rowCount}" show-title-bar="false" show-menu-icon="false" show-status-bar="false" select-type="row" auto-fit-col="true" show-title-bar="true" show-menu-icon="true" show-status-bar="true" enable-fixed-col="true" row-resizable="false" col-movable="true">
27577
- <table>
27578
- <caption>Sheet1</caption>
27579
- <colgroup>
27580
- <col background-color="#888"/>
27581
- <col background-color="#888"/>
27582
- <col background-color="#888"/>
27583
- <col background-color="#888"/>
27584
- <col background-color="#888"/>
27585
- <col background-color="#888"/>
27586
- <col background-color="#888"/>
27587
- </colgroup>
27588
- <thead>
27589
- <tr>
27590
- <th>No.</th>
27591
- <th>문서 ID</th>
27592
- <th>문서명</th>
27593
- <th>매출액</th>
27594
- <th>관련 문서</th>
27595
- <th>수정자</th>
27596
- <th>수정일</th>
27597
- </tr>
27598
- </thead>
27599
- <tbody>
27600
- <tr>
27601
- <th><ng-row-indicator/></th>
27602
- <td data-bind="doc_id"></td>
27603
- <td data-bind="doc_nm"></td>
27604
- <td data-bind="amt"></td>
27605
- <td data-bind="file_id"></td>
27606
- <td data-bind="update_user" text-align="center"></td>
27607
- <td data-bind="update_dt" text-align="center"></td>
27608
- </tr>
27609
- </tbody>
27610
- </table>
27611
- </nine-grid>
27612
- `;
27613
-
27614
- this.shadowRoot.querySelector(".grid").innerHTML = html;
27615
-
27616
- setTimeout(() => {
27617
- const grd = this.shadowRoot.querySelector("nine-grid");
27618
- grd.data.source = this.#data;
27619
-
27620
- //this.scrollIntoView({ behavior: "smooth", block: "end" });
27621
- });
27622
- };
27623
27552
  }
27624
27553
 
27625
27554
  class aiIngMessage extends HTMLElement
@@ -27492,24 +27492,15 @@ class aiMessage extends HTMLElement
27492
27492
  });
27493
27493
  };
27494
27494
 
27495
-
27496
- initialize = (data) => {
27497
- this.#data = data;
27498
-
27499
- setTimeout(() => {
27500
- this.#init();
27501
- });
27502
- }
27503
-
27504
- initialize2 = (info, data) => {
27495
+ initialize = (info, data) => {
27505
27496
  this.#data = data;
27506
27497
 
27507
27498
  setTimeout(() => {
27508
- this.#init2(info);
27499
+ this.#init(info);
27509
27500
  });
27510
27501
  }
27511
27502
 
27512
- #init2 = (info) => {
27503
+ #init = (info) => {
27513
27504
 
27514
27505
  const rowCount = Number(this.getAttribute("row-count"));
27515
27506
  if (rowCount < 1) {
@@ -27518,14 +27509,10 @@ class aiMessage extends HTMLElement
27518
27509
  return;
27519
27510
  }
27520
27511
 
27521
- let colgroup = "";
27522
- let thead = "";
27523
- let tbody = "";
27524
- for (let o of info) {
27525
- colgroup += `<col background-color="#888"/>`;
27526
- thead += `<th>${o.desc}</th>`;
27527
- tbody += `<td data-bind="${o.name}"></td>`;
27528
- }
27512
+ let colgroup = info.map(() => `<col background-color="#888"/>`).join("");
27513
+ let thead = info.map(item => `<th>${item.desc}</th>`).join("");
27514
+ let tbody = info.map(item => `<td data-bind="${item.name}" text-align="${item.type == 'number' ? 'right' : 'left'}"></td>`).join("");
27515
+
27529
27516
 
27530
27517
  const html = `
27531
27518
  <nine-grid class="ai" display-row-count="${rowCount > 5 ? 5 : rowCount}" show-title-bar="false" show-menu-icon="false" show-status-bar="false" select-type="row" auto-fit-col="true" show-title-bar="true" show-menu-icon="true" show-status-bar="true" enable-fixed-col="true" row-resizable="false" col-movable="true">
@@ -27560,64 +27547,6 @@ class aiMessage extends HTMLElement
27560
27547
  //this.scrollIntoView({ behavior: "smooth", block: "end" });
27561
27548
  });
27562
27549
  };
27563
-
27564
- #init = () => {
27565
-
27566
- const rowCount = Number(this.getAttribute("row-count"));
27567
- if (rowCount < 1) {
27568
- this.shadowRoot.querySelector(".grid").style.display = "none";
27569
- this.shadowRoot.querySelector(".chat-menu").style.display = "none";
27570
- return;
27571
- }
27572
-
27573
- const html = `
27574
- <nine-grid class="ai" display-row-count="${rowCount > 5 ? 5 : rowCount}" show-title-bar="false" show-menu-icon="false" show-status-bar="false" select-type="row" auto-fit-col="true" show-title-bar="true" show-menu-icon="true" show-status-bar="true" enable-fixed-col="true" row-resizable="false" col-movable="true">
27575
- <table>
27576
- <caption>Sheet1</caption>
27577
- <colgroup>
27578
- <col background-color="#888"/>
27579
- <col background-color="#888"/>
27580
- <col background-color="#888"/>
27581
- <col background-color="#888"/>
27582
- <col background-color="#888"/>
27583
- <col background-color="#888"/>
27584
- <col background-color="#888"/>
27585
- </colgroup>
27586
- <thead>
27587
- <tr>
27588
- <th>No.</th>
27589
- <th>문서 ID</th>
27590
- <th>문서명</th>
27591
- <th>매출액</th>
27592
- <th>관련 문서</th>
27593
- <th>수정자</th>
27594
- <th>수정일</th>
27595
- </tr>
27596
- </thead>
27597
- <tbody>
27598
- <tr>
27599
- <th><ng-row-indicator/></th>
27600
- <td data-bind="doc_id"></td>
27601
- <td data-bind="doc_nm"></td>
27602
- <td data-bind="amt"></td>
27603
- <td data-bind="file_id"></td>
27604
- <td data-bind="update_user" text-align="center"></td>
27605
- <td data-bind="update_dt" text-align="center"></td>
27606
- </tr>
27607
- </tbody>
27608
- </table>
27609
- </nine-grid>
27610
- `;
27611
-
27612
- this.shadowRoot.querySelector(".grid").innerHTML = html;
27613
-
27614
- setTimeout(() => {
27615
- const grd = this.shadowRoot.querySelector("nine-grid");
27616
- grd.data.source = this.#data;
27617
-
27618
- //this.scrollIntoView({ behavior: "smooth", block: "end" });
27619
- });
27620
- };
27621
27550
  }
27622
27551
 
27623
27552
  class aiIngMessage extends HTMLElement
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.440.0",
4
+ "version": "6.441.0",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
7
  "import": "./dist/index.js",
@@ -78,24 +78,15 @@ class aiMessage extends HTMLElement
78
78
  });
79
79
  };
80
80
 
81
-
82
- initialize = (data) => {
83
- this.#data = data;
84
-
85
- setTimeout(() => {
86
- this.#init();
87
- });
88
- }
89
-
90
- initialize2 = (info, data) => {
81
+ initialize = (info, data) => {
91
82
  this.#data = data;
92
83
 
93
84
  setTimeout(() => {
94
- this.#init2(info);
85
+ this.#init(info);
95
86
  });
96
87
  }
97
88
 
98
- #init2 = (info) => {
89
+ #init = (info) => {
99
90
 
100
91
  const rowCount = Number(this.getAttribute("row-count"));
101
92
  if (rowCount < 1) {
@@ -104,14 +95,10 @@ class aiMessage extends HTMLElement
104
95
  return;
105
96
  }
106
97
 
107
- let colgroup = "";
108
- let thead = "";
109
- let tbody = "";
110
- for (let o of info) {
111
- colgroup += `<col background-color="#888"/>`;
112
- thead += `<th>${o.desc}</th>`;
113
- tbody += `<td data-bind="${o.name}"></td>`;
114
- }
98
+ let colgroup = info.map(() => `<col background-color="#888"/>`).join("");
99
+ let thead = info.map(item => `<th>${item.desc}</th>`).join("");
100
+ let tbody = info.map(item => `<td data-bind="${item.name}" text-align="${item.type == 'number' ? 'right' : 'left'}"></td>`).join("");
101
+
115
102
 
116
103
  const html = `
117
104
  <nine-grid class="ai" display-row-count="${rowCount > 5 ? 5 : rowCount}" show-title-bar="false" show-menu-icon="false" show-status-bar="false" select-type="row" auto-fit-col="true" show-title-bar="true" show-menu-icon="true" show-status-bar="true" enable-fixed-col="true" row-resizable="false" col-movable="true">
@@ -146,64 +133,6 @@ class aiMessage extends HTMLElement
146
133
  //this.scrollIntoView({ behavior: "smooth", block: "end" });
147
134
  });
148
135
  };
149
-
150
- #init = () => {
151
-
152
- const rowCount = Number(this.getAttribute("row-count"));
153
- if (rowCount < 1) {
154
- this.shadowRoot.querySelector(".grid").style.display = "none";
155
- this.shadowRoot.querySelector(".chat-menu").style.display = "none";
156
- return;
157
- }
158
-
159
- const html = `
160
- <nine-grid class="ai" display-row-count="${rowCount > 5 ? 5 : rowCount}" show-title-bar="false" show-menu-icon="false" show-status-bar="false" select-type="row" auto-fit-col="true" show-title-bar="true" show-menu-icon="true" show-status-bar="true" enable-fixed-col="true" row-resizable="false" col-movable="true">
161
- <table>
162
- <caption>Sheet1</caption>
163
- <colgroup>
164
- <col background-color="#888"/>
165
- <col background-color="#888"/>
166
- <col background-color="#888"/>
167
- <col background-color="#888"/>
168
- <col background-color="#888"/>
169
- <col background-color="#888"/>
170
- <col background-color="#888"/>
171
- </colgroup>
172
- <thead>
173
- <tr>
174
- <th>No.</th>
175
- <th>문서 ID</th>
176
- <th>문서명</th>
177
- <th>매출액</th>
178
- <th>관련 문서</th>
179
- <th>수정자</th>
180
- <th>수정일</th>
181
- </tr>
182
- </thead>
183
- <tbody>
184
- <tr>
185
- <th><ng-row-indicator/></th>
186
- <td data-bind="doc_id"></td>
187
- <td data-bind="doc_nm"></td>
188
- <td data-bind="amt"></td>
189
- <td data-bind="file_id"></td>
190
- <td data-bind="update_user" text-align="center"></td>
191
- <td data-bind="update_dt" text-align="center"></td>
192
- </tr>
193
- </tbody>
194
- </table>
195
- </nine-grid>
196
- `;
197
-
198
- this.shadowRoot.querySelector(".grid").innerHTML = html;
199
-
200
- setTimeout(() => {
201
- const grd = this.shadowRoot.querySelector("nine-grid");
202
- grd.data.source = this.#data;
203
-
204
- //this.scrollIntoView({ behavior: "smooth", block: "end" });
205
- });
206
- };
207
136
  }
208
137
 
209
138
  class aiIngMessage extends HTMLElement