ide-assi 0.521.0 → 0.522.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 +2 -31
- package/dist/bundle.esm.js +2 -31
- package/dist/components/ideAssi.js +2 -376
- package/package.json +1 -1
- package/src/components/ideAssi.js +2 -376
package/dist/bundle.cjs.js
CHANGED
|
@@ -202639,6 +202639,8 @@ class IdeAssi extends HTMLElement
|
|
|
202639
202639
|
|
|
202640
202640
|
this.settings = this.shadowRoot.querySelector("ide-assi-settings");
|
|
202641
202641
|
|
|
202642
|
+
this.shadowRoot.appendChild(document.createElement('ide-tip-popup'));
|
|
202643
|
+
|
|
202642
202644
|
this.shadowRoot.querySelector("textarea").addEventListener("keydown", this.#keydownHandler);
|
|
202643
202645
|
|
|
202644
202646
|
this.shadowRoot.querySelector(".expand-icon").addEventListener("click", this.#toggleCollapseHandler);
|
|
@@ -202662,37 +202664,6 @@ class IdeAssi extends HTMLElement
|
|
|
202662
202664
|
//this.shadowRoot.querySelector('ide-diff-popup').remove();
|
|
202663
202665
|
|
|
202664
202666
|
this.shadowRoot.appendChild(document.createElement('ide-diff-popup'));
|
|
202665
|
-
/**
|
|
202666
|
-
src1 = `
|
|
202667
|
-
<tr>
|
|
202668
|
-
<th>No.</th>
|
|
202669
|
-
<th>문서ID</th>
|
|
202670
|
-
<th>매출액</th>
|
|
202671
|
-
<th>최종수정자</th>
|
|
202672
|
-
<th>문서명</th>
|
|
202673
|
-
<th>최초등록자</th>
|
|
202674
|
-
<th>최초등록일</th>
|
|
202675
|
-
<th>최종수정일</th>
|
|
202676
|
-
</tr>
|
|
202677
|
-
`;
|
|
202678
|
-
src2 = `
|
|
202679
|
-
<tr>
|
|
202680
|
-
<th>No.</th>
|
|
202681
|
-
<th>매출액</th>
|
|
202682
|
-
<th>문서ID</th>
|
|
202683
|
-
<th>최종수정자</th>
|
|
202684
|
-
<th>문서명</th>
|
|
202685
|
-
<th>최초등록자</th>
|
|
202686
|
-
<th>최초등록일</th>
|
|
202687
|
-
<th>최종수정일</th>
|
|
202688
|
-
</tr>
|
|
202689
|
-
`; */
|
|
202690
|
-
|
|
202691
|
-
|
|
202692
|
-
|
|
202693
|
-
|
|
202694
|
-
|
|
202695
|
-
|
|
202696
202667
|
|
|
202697
202668
|
const apply = {
|
|
202698
202669
|
mybatis: this.shadowRoot.querySelector("#mybatis").checked,
|
package/dist/bundle.esm.js
CHANGED
|
@@ -202635,6 +202635,8 @@ class IdeAssi extends HTMLElement
|
|
|
202635
202635
|
|
|
202636
202636
|
this.settings = this.shadowRoot.querySelector("ide-assi-settings");
|
|
202637
202637
|
|
|
202638
|
+
this.shadowRoot.appendChild(document.createElement('ide-tip-popup'));
|
|
202639
|
+
|
|
202638
202640
|
this.shadowRoot.querySelector("textarea").addEventListener("keydown", this.#keydownHandler);
|
|
202639
202641
|
|
|
202640
202642
|
this.shadowRoot.querySelector(".expand-icon").addEventListener("click", this.#toggleCollapseHandler);
|
|
@@ -202658,37 +202660,6 @@ class IdeAssi extends HTMLElement
|
|
|
202658
202660
|
//this.shadowRoot.querySelector('ide-diff-popup').remove();
|
|
202659
202661
|
|
|
202660
202662
|
this.shadowRoot.appendChild(document.createElement('ide-diff-popup'));
|
|
202661
|
-
/**
|
|
202662
|
-
src1 = `
|
|
202663
|
-
<tr>
|
|
202664
|
-
<th>No.</th>
|
|
202665
|
-
<th>문서ID</th>
|
|
202666
|
-
<th>매출액</th>
|
|
202667
|
-
<th>최종수정자</th>
|
|
202668
|
-
<th>문서명</th>
|
|
202669
|
-
<th>최초등록자</th>
|
|
202670
|
-
<th>최초등록일</th>
|
|
202671
|
-
<th>최종수정일</th>
|
|
202672
|
-
</tr>
|
|
202673
|
-
`;
|
|
202674
|
-
src2 = `
|
|
202675
|
-
<tr>
|
|
202676
|
-
<th>No.</th>
|
|
202677
|
-
<th>매출액</th>
|
|
202678
|
-
<th>문서ID</th>
|
|
202679
|
-
<th>최종수정자</th>
|
|
202680
|
-
<th>문서명</th>
|
|
202681
|
-
<th>최초등록자</th>
|
|
202682
|
-
<th>최초등록일</th>
|
|
202683
|
-
<th>최종수정일</th>
|
|
202684
|
-
</tr>
|
|
202685
|
-
`; */
|
|
202686
|
-
|
|
202687
|
-
|
|
202688
|
-
|
|
202689
|
-
|
|
202690
|
-
|
|
202691
|
-
|
|
202692
202663
|
|
|
202693
202664
|
const apply = {
|
|
202694
202665
|
mybatis: this.shadowRoot.querySelector("#mybatis").checked,
|
|
@@ -98,6 +98,8 @@ export class IdeAssi extends HTMLElement
|
|
|
98
98
|
|
|
99
99
|
this.settings = this.shadowRoot.querySelector("ide-assi-settings");
|
|
100
100
|
|
|
101
|
+
this.shadowRoot.appendChild(document.createElement('ide-tip-popup'));
|
|
102
|
+
|
|
101
103
|
this.shadowRoot.querySelector("textarea").addEventListener("keydown", this.#keydownHandler);
|
|
102
104
|
|
|
103
105
|
this.shadowRoot.querySelector(".expand-icon").addEventListener("click", this.#toggleCollapseHandler);
|
|
@@ -122,382 +124,6 @@ export class IdeAssi extends HTMLElement
|
|
|
122
124
|
|
|
123
125
|
this.shadowRoot.appendChild(document.createElement('ide-diff-popup'));
|
|
124
126
|
|
|
125
|
-
//setTimeout(() => {
|
|
126
|
-
let src1 = `
|
|
127
|
-
import React, { useRef, useEffect } from "react" adfa;
|
|
128
|
-
import { api, ai } from "ide-assi";
|
|
129
|
-
import ninegrid from "ninegrid2";
|
|
130
|
-
|
|
131
|
-
const DocManager = () => {
|
|
132
|
-
const tabRef = useRef(null);
|
|
133
|
-
const gridRef = useRef(null);
|
|
134
|
-
|
|
135
|
-
const selectList = async (params) => {
|
|
136
|
-
if (!gridRef.current) return;
|
|
137
|
-
gridRef.current.classList.add("loading");
|
|
138
|
-
api.post(\`/api/tmpl-a/doc-manager/selectList\`, params).then((res) => {
|
|
139
|
-
gridRef.current.data.source = res.list;
|
|
140
|
-
});
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
const handleNaturalLanguageSearch = async () => {
|
|
144
|
-
const searchTextElement = ninegrid.querySelector("#searchText", tabRef.current);
|
|
145
|
-
const searchText = searchTextElement ? searchTextElement.value : "";
|
|
146
|
-
|
|
147
|
-
if (!gridRef.current) return;
|
|
148
|
-
gridRef.current.classList.add("loading");
|
|
149
|
-
|
|
150
|
-
let params = {};
|
|
151
|
-
if (searchText) {
|
|
152
|
-
params = {
|
|
153
|
-
_whereClause: await ai.generateWhereCause(
|
|
154
|
-
"tmpla/DocManagerMapper.xml",
|
|
155
|
-
"selectList",
|
|
156
|
-
searchText,
|
|
157
|
-
import.meta.env.VITE_GEMINI_API_KEY
|
|
158
|
-
),
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
selectList(params);
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
const handleClassicSearch = () => {
|
|
165
|
-
if (!gridRef.current) return;
|
|
166
|
-
gridRef.current.classList.add("loading");
|
|
167
|
-
|
|
168
|
-
const form2Element = ninegrid.querySelector(".form2", tabRef.current);
|
|
169
|
-
const params = form2Element ? form2Element.getData() : {};
|
|
170
|
-
selectList(params);
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
useEffect(() => {
|
|
174
|
-
selectList({});
|
|
175
|
-
|
|
176
|
-
const searchTextElement = ninegrid.querySelector("#searchText", tabRef.current);
|
|
177
|
-
const searchButton = ninegrid.querySelector(".search", tabRef.current);
|
|
178
|
-
|
|
179
|
-
const handleKeyDown = (e) => {
|
|
180
|
-
if (e.key === "Enter" && !e.isComposing) {
|
|
181
|
-
handleNaturalLanguageSearch();
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
const handleClick = () => {
|
|
186
|
-
handleClassicSearch();
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
if (searchTextElement) {
|
|
190
|
-
searchTextElement.addEventListener("keydown", handleKeyDown);
|
|
191
|
-
}
|
|
192
|
-
if (searchButton) {
|
|
193
|
-
searchButton.addEventListener("click", handleClick);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
return () => {
|
|
197
|
-
if (searchTextElement) {
|
|
198
|
-
searchTextElement.removeEventListener("keydown", handleKeyDown);
|
|
199
|
-
}
|
|
200
|
-
if (searchButton) {
|
|
201
|
-
searchButton.removeEventListener("click", handleClick);
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
}, []);
|
|
205
|
-
|
|
206
|
-
return (
|
|
207
|
-
<div className="wrapper">
|
|
208
|
-
<nx-collapse target="nx-tab" className="search-collapse"></nx-collapse>
|
|
209
|
-
<div className="list-wrapper">
|
|
210
|
-
<nx-tab theme="theme-3" ref={tabRef}>
|
|
211
|
-
<nx-tab-page caption="자연어 검색">
|
|
212
|
-
<nx-form className="form1">
|
|
213
|
-
<input
|
|
214
|
-
type="text"
|
|
215
|
-
id="searchText"
|
|
216
|
-
name="searchText"
|
|
217
|
-
placeholder="자연어 검색어를 입력하세요 (ex: 작성자가 홍길동인 데이타를 찾아줘)"
|
|
218
|
-
/>
|
|
219
|
-
</nx-form>
|
|
220
|
-
</nx-tab-page>
|
|
221
|
-
<nx-tab-page caption="클래식 검색">
|
|
222
|
-
<nx-form className="form2">
|
|
223
|
-
<label>문서명: <input type="text" name="docNm" /></label>
|
|
224
|
-
<label>매출액:
|
|
225
|
-
<input type="number" name="minAmt" placeholder="최소" /> ~
|
|
226
|
-
<input type="number" name="maxAmt" placeholder="최대" />
|
|
227
|
-
</label>
|
|
228
|
-
</nx-form>
|
|
229
|
-
<button className="search">검색</button>
|
|
230
|
-
</nx-tab-page>
|
|
231
|
-
</nx-tab>
|
|
232
|
-
|
|
233
|
-
<div className="grid-wrapper">
|
|
234
|
-
<nine-grid
|
|
235
|
-
ref={gridRef}
|
|
236
|
-
caption="문서관리"
|
|
237
|
-
select-type="row"
|
|
238
|
-
show-title-bar="true"
|
|
239
|
-
show-menu-icon="true"
|
|
240
|
-
show-status-bar="true"
|
|
241
|
-
enable-fixed-col="true"
|
|
242
|
-
row-resizable="false"
|
|
243
|
-
col-movable="true"
|
|
244
|
-
>
|
|
245
|
-
<table>
|
|
246
|
-
<colgroup>
|
|
247
|
-
<col width="50" fixed="left" background-color="gray" />
|
|
248
|
-
<col width="100" />
|
|
249
|
-
<col width="100" />
|
|
250
|
-
<col width="200" />
|
|
251
|
-
<col width="120" />
|
|
252
|
-
<col width="100" />
|
|
253
|
-
<col width="150" />
|
|
254
|
-
<col width="150" />
|
|
255
|
-
</colgroup>
|
|
256
|
-
<thead>
|
|
257
|
-
<tr>
|
|
258
|
-
<th>No.</th>
|
|
259
|
-
<th>최종수정자</th>
|
|
260
|
-
<th>문서ID</th>
|
|
261
|
-
<th>문서명</th>
|
|
262
|
-
<th>매출액</th>
|
|
263
|
-
<th>최초등록자</th>
|
|
264
|
-
<th>최초등록일</th>
|
|
265
|
-
<th>최종수정일</th>
|
|
266
|
-
</tr>
|
|
267
|
-
</thead>
|
|
268
|
-
<tbody>
|
|
269
|
-
<tr>
|
|
270
|
-
<th><ng-row-indicator /></th>
|
|
271
|
-
<td data-bind="updateUser" text-align="center"></td>
|
|
272
|
-
<td data-bind="docId" text-align="center"></td>
|
|
273
|
-
<td data-bind="docNm" text-align="left"></td>
|
|
274
|
-
<td
|
|
275
|
-
data-bind="amt"
|
|
276
|
-
data-expr="data.amt.toLocaleString()"
|
|
277
|
-
text-align="right"
|
|
278
|
-
show-icon="true"
|
|
279
|
-
icon-type="sphere"
|
|
280
|
-
icon-color="data.amt >= 2000 ? 'red' : 'gray'"
|
|
281
|
-
></td>
|
|
282
|
-
<td data-bind="insertUser" text-align="center"></td>
|
|
283
|
-
<td data-bind="insertDt" text-align="center"></td>
|
|
284
|
-
<td data-bind="updateDt" text-align="center"></td>
|
|
285
|
-
</tr>
|
|
286
|
-
</tbody>
|
|
287
|
-
</table>
|
|
288
|
-
</nine-grid>
|
|
289
|
-
</div>
|
|
290
|
-
</div>
|
|
291
|
-
</div>
|
|
292
|
-
);
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
export default DocManager;
|
|
296
|
-
`;
|
|
297
|
-
|
|
298
|
-
let src2 = `
|
|
299
|
-
import React, { useRef, useEffect } from "react";
|
|
300
|
-
import { api, ai } from "ide-assi";
|
|
301
|
-
import ninegrid from "ninegrid2";
|
|
302
|
-
|
|
303
|
-
const DocManager = () => {
|
|
304
|
-
const tabRef = useRef(null);
|
|
305
|
-
const gridRef = useRef(null);
|
|
306
|
-
|
|
307
|
-
const selectList = async (params) => {
|
|
308
|
-
if (!gridRef.current) return;
|
|
309
|
-
gridRef.current.classList.add("loading");
|
|
310
|
-
api.post(\`/api/tmpl-a/doc-manager/selectList\`, params).then((res) => {
|
|
311
|
-
gridRef.current.data.source = res.list;
|
|
312
|
-
});
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
const handleNaturalLanguageSearch = async () => {
|
|
316
|
-
const searchTextElement = ninegrid.querySelector("#searchText", tabRef.current);
|
|
317
|
-
const searchText = searchTextElement ? searchTextElement.value : "";
|
|
318
|
-
|
|
319
|
-
if (!gridRef.current) return;
|
|
320
|
-
gridRef.current.classList.add("loading");
|
|
321
|
-
|
|
322
|
-
let params = {};
|
|
323
|
-
if (searchText) {
|
|
324
|
-
params = {
|
|
325
|
-
_whereClause: await ai.generateWhereCause(
|
|
326
|
-
"tmpla/DocManagerMapper.xml",
|
|
327
|
-
"selectList",
|
|
328
|
-
searchText,
|
|
329
|
-
import.meta.env.VITE_GEMINI_API_KEY
|
|
330
|
-
),
|
|
331
|
-
};
|
|
332
|
-
}
|
|
333
|
-
selectList(params);
|
|
334
|
-
};
|
|
335
|
-
|
|
336
|
-
const handleClassicSearch = () => {
|
|
337
|
-
if (!gridRef.current) return;
|
|
338
|
-
gridRef.current.classList.add("loading");
|
|
339
|
-
|
|
340
|
-
const form2Element = ninegrid.querySelector(".form2", tabRef.current);
|
|
341
|
-
const params = form2Element ? form2Element.getData() : {};
|
|
342
|
-
selectList(params);
|
|
343
|
-
};
|
|
344
|
-
|
|
345
|
-
useEffect(() => {
|
|
346
|
-
selectList({});
|
|
347
|
-
|
|
348
|
-
const searchTextElement = ninegrid.querySelector("#searchText", tabRef.current);
|
|
349
|
-
const searchButton = ninegrid.querySelector(".search", tabRef.current);
|
|
350
|
-
|
|
351
|
-
const handleKeyDown = (e) => {
|
|
352
|
-
if (e.key === "Enter" && !e.isComposing) {
|
|
353
|
-
handleNaturalLanguageSearch();
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
|
|
357
|
-
const handleClick = () => {
|
|
358
|
-
handleClassicSearch();
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
if (searchTextElement) {
|
|
362
|
-
searchTextElement.addEventListener("keydown", handleKeyDown);
|
|
363
|
-
}
|
|
364
|
-
if (searchButton) {
|
|
365
|
-
searchButton.addEventListener("click", handleClick);
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
return () => {
|
|
369
|
-
if (searchTextElement) {
|
|
370
|
-
searchTextElement.removeEventListener("keydown", handleKeyDown);
|
|
371
|
-
}
|
|
372
|
-
if (searchButton) {
|
|
373
|
-
searchButton.removeEventListener("click", handleClick);
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
}, []);
|
|
377
|
-
|
|
378
|
-
return (
|
|
379
|
-
<div className="wrapper">
|
|
380
|
-
<nx-collapse target="nx-tab" className="search-collapse"></nx-collapse>
|
|
381
|
-
<div className="list-wrapper">
|
|
382
|
-
<nx-tab theme="theme-3" ref={tabRef}>
|
|
383
|
-
<nx-tab-page caption="자연어 검색">
|
|
384
|
-
<nx-form className="form1">
|
|
385
|
-
<input
|
|
386
|
-
type="text"
|
|
387
|
-
id="searchText"
|
|
388
|
-
name="searchText"
|
|
389
|
-
placeholder="자연어 검색어를 입력하세요 (ex: 작성자가 홍길동인 데이타를 찾아줘)"
|
|
390
|
-
/>
|
|
391
|
-
</nx-form>
|
|
392
|
-
</nx-tab-page>
|
|
393
|
-
<nx-tab-page caption="클래식 검색">
|
|
394
|
-
<nx-form className="form2">
|
|
395
|
-
<label>문서명: <input type="text" name="docNm" /></label>
|
|
396
|
-
<label>매출액:
|
|
397
|
-
<input type="number" name="minAmt" placeholder="최소" /> ~
|
|
398
|
-
<input type="number" name="maxAmt" placeholder="최대" />
|
|
399
|
-
</label>
|
|
400
|
-
</nx-form>
|
|
401
|
-
<button className="search">검색</button>
|
|
402
|
-
</nx-tab-page>
|
|
403
|
-
</nx-tab>
|
|
404
|
-
|
|
405
|
-
<div className="grid-wrapper">
|
|
406
|
-
<nine-grid
|
|
407
|
-
ref={gridRef}
|
|
408
|
-
caption="매출 문서 관리"
|
|
409
|
-
select-type="row"
|
|
410
|
-
show-title-bar="true"
|
|
411
|
-
show-menu-icon="true"
|
|
412
|
-
show-status-bar="true"
|
|
413
|
-
enable-fixed-col="true"
|
|
414
|
-
row-resizable="false"
|
|
415
|
-
col-movable="true"
|
|
416
|
-
>
|
|
417
|
-
<table>
|
|
418
|
-
<colgroup>
|
|
419
|
-
<col width="50" fixed="left" background-color="gray" />
|
|
420
|
-
<col width="100" />
|
|
421
|
-
<col width="120" />
|
|
422
|
-
<col width="100" />
|
|
423
|
-
<col width="200" />
|
|
424
|
-
<col width="100" />
|
|
425
|
-
<col width="150" />
|
|
426
|
-
<col width="150" />
|
|
427
|
-
</colgroup>
|
|
428
|
-
<thead>
|
|
429
|
-
<tr>
|
|
430
|
-
<th>No.</th>
|
|
431
|
-
<th>문서ID</th>
|
|
432
|
-
<th>매출액</th>
|
|
433
|
-
<th>최종수정자</th>
|
|
434
|
-
<th>문서명</th>
|
|
435
|
-
<th>최초등록자</th>
|
|
436
|
-
<th>최초등록일</th>
|
|
437
|
-
<th>최종수정일</th>
|
|
438
|
-
</tr>
|
|
439
|
-
</thead>
|
|
440
|
-
<tbody>
|
|
441
|
-
<tr>
|
|
442
|
-
<th><ng-row-indicator /></th>
|
|
443
|
-
<td data-bind="docId" text-align="center"></td>
|
|
444
|
-
<td
|
|
445
|
-
data-bind="amt"
|
|
446
|
-
data-expr="data.amt.toLocaleString()"
|
|
447
|
-
text-align="right"
|
|
448
|
-
show-icon="true"
|
|
449
|
-
icon-type="sphere"
|
|
450
|
-
icon-color="data.amt >= 2000 ? 'red' : 'gray'"
|
|
451
|
-
></td>
|
|
452
|
-
<td data-bind="updateUser" text-align="center"></td>
|
|
453
|
-
<td data-bind="docNm" text-align="left"></td>
|
|
454
|
-
<td data-bind="insertUser" text-align="center"></td>
|
|
455
|
-
<td data-bind="insertDt" text-align="center"></td>
|
|
456
|
-
<td data-bind="updateDt" text-align="center"></td>
|
|
457
|
-
</tr>
|
|
458
|
-
</tbody>
|
|
459
|
-
</table>
|
|
460
|
-
</nine-grid>
|
|
461
|
-
</div>
|
|
462
|
-
</div>
|
|
463
|
-
</div>
|
|
464
|
-
);
|
|
465
|
-
};
|
|
466
|
-
|
|
467
|
-
export default DocManager;
|
|
468
|
-
`;
|
|
469
|
-
/**
|
|
470
|
-
src1 = `
|
|
471
|
-
<tr>
|
|
472
|
-
<th>No.</th>
|
|
473
|
-
<th>문서ID</th>
|
|
474
|
-
<th>매출액</th>
|
|
475
|
-
<th>최종수정자</th>
|
|
476
|
-
<th>문서명</th>
|
|
477
|
-
<th>최초등록자</th>
|
|
478
|
-
<th>최초등록일</th>
|
|
479
|
-
<th>최종수정일</th>
|
|
480
|
-
</tr>
|
|
481
|
-
`;
|
|
482
|
-
src2 = `
|
|
483
|
-
<tr>
|
|
484
|
-
<th>No.</th>
|
|
485
|
-
<th>매출액</th>
|
|
486
|
-
<th>문서ID</th>
|
|
487
|
-
<th>최종수정자</th>
|
|
488
|
-
<th>문서명</th>
|
|
489
|
-
<th>최초등록자</th>
|
|
490
|
-
<th>최초등록일</th>
|
|
491
|
-
<th>최종수정일</th>
|
|
492
|
-
</tr>
|
|
493
|
-
`; */
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
127
|
const apply = {
|
|
502
128
|
mybatis: this.shadowRoot.querySelector("#mybatis").checked,
|
|
503
129
|
service: this.shadowRoot.querySelector("#service").checked,
|
package/package.json
CHANGED
|
@@ -98,6 +98,8 @@ export class IdeAssi extends HTMLElement
|
|
|
98
98
|
|
|
99
99
|
this.settings = this.shadowRoot.querySelector("ide-assi-settings");
|
|
100
100
|
|
|
101
|
+
this.shadowRoot.appendChild(document.createElement('ide-tip-popup'));
|
|
102
|
+
|
|
101
103
|
this.shadowRoot.querySelector("textarea").addEventListener("keydown", this.#keydownHandler);
|
|
102
104
|
|
|
103
105
|
this.shadowRoot.querySelector(".expand-icon").addEventListener("click", this.#toggleCollapseHandler);
|
|
@@ -122,382 +124,6 @@ export class IdeAssi extends HTMLElement
|
|
|
122
124
|
|
|
123
125
|
this.shadowRoot.appendChild(document.createElement('ide-diff-popup'));
|
|
124
126
|
|
|
125
|
-
//setTimeout(() => {
|
|
126
|
-
let src1 = `
|
|
127
|
-
import React, { useRef, useEffect } from "react" adfa;
|
|
128
|
-
import { api, ai } from "ide-assi";
|
|
129
|
-
import ninegrid from "ninegrid2";
|
|
130
|
-
|
|
131
|
-
const DocManager = () => {
|
|
132
|
-
const tabRef = useRef(null);
|
|
133
|
-
const gridRef = useRef(null);
|
|
134
|
-
|
|
135
|
-
const selectList = async (params) => {
|
|
136
|
-
if (!gridRef.current) return;
|
|
137
|
-
gridRef.current.classList.add("loading");
|
|
138
|
-
api.post(\`/api/tmpl-a/doc-manager/selectList\`, params).then((res) => {
|
|
139
|
-
gridRef.current.data.source = res.list;
|
|
140
|
-
});
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
const handleNaturalLanguageSearch = async () => {
|
|
144
|
-
const searchTextElement = ninegrid.querySelector("#searchText", tabRef.current);
|
|
145
|
-
const searchText = searchTextElement ? searchTextElement.value : "";
|
|
146
|
-
|
|
147
|
-
if (!gridRef.current) return;
|
|
148
|
-
gridRef.current.classList.add("loading");
|
|
149
|
-
|
|
150
|
-
let params = {};
|
|
151
|
-
if (searchText) {
|
|
152
|
-
params = {
|
|
153
|
-
_whereClause: await ai.generateWhereCause(
|
|
154
|
-
"tmpla/DocManagerMapper.xml",
|
|
155
|
-
"selectList",
|
|
156
|
-
searchText,
|
|
157
|
-
import.meta.env.VITE_GEMINI_API_KEY
|
|
158
|
-
),
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
selectList(params);
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
const handleClassicSearch = () => {
|
|
165
|
-
if (!gridRef.current) return;
|
|
166
|
-
gridRef.current.classList.add("loading");
|
|
167
|
-
|
|
168
|
-
const form2Element = ninegrid.querySelector(".form2", tabRef.current);
|
|
169
|
-
const params = form2Element ? form2Element.getData() : {};
|
|
170
|
-
selectList(params);
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
useEffect(() => {
|
|
174
|
-
selectList({});
|
|
175
|
-
|
|
176
|
-
const searchTextElement = ninegrid.querySelector("#searchText", tabRef.current);
|
|
177
|
-
const searchButton = ninegrid.querySelector(".search", tabRef.current);
|
|
178
|
-
|
|
179
|
-
const handleKeyDown = (e) => {
|
|
180
|
-
if (e.key === "Enter" && !e.isComposing) {
|
|
181
|
-
handleNaturalLanguageSearch();
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
const handleClick = () => {
|
|
186
|
-
handleClassicSearch();
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
if (searchTextElement) {
|
|
190
|
-
searchTextElement.addEventListener("keydown", handleKeyDown);
|
|
191
|
-
}
|
|
192
|
-
if (searchButton) {
|
|
193
|
-
searchButton.addEventListener("click", handleClick);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
return () => {
|
|
197
|
-
if (searchTextElement) {
|
|
198
|
-
searchTextElement.removeEventListener("keydown", handleKeyDown);
|
|
199
|
-
}
|
|
200
|
-
if (searchButton) {
|
|
201
|
-
searchButton.removeEventListener("click", handleClick);
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
}, []);
|
|
205
|
-
|
|
206
|
-
return (
|
|
207
|
-
<div className="wrapper">
|
|
208
|
-
<nx-collapse target="nx-tab" className="search-collapse"></nx-collapse>
|
|
209
|
-
<div className="list-wrapper">
|
|
210
|
-
<nx-tab theme="theme-3" ref={tabRef}>
|
|
211
|
-
<nx-tab-page caption="자연어 검색">
|
|
212
|
-
<nx-form className="form1">
|
|
213
|
-
<input
|
|
214
|
-
type="text"
|
|
215
|
-
id="searchText"
|
|
216
|
-
name="searchText"
|
|
217
|
-
placeholder="자연어 검색어를 입력하세요 (ex: 작성자가 홍길동인 데이타를 찾아줘)"
|
|
218
|
-
/>
|
|
219
|
-
</nx-form>
|
|
220
|
-
</nx-tab-page>
|
|
221
|
-
<nx-tab-page caption="클래식 검색">
|
|
222
|
-
<nx-form className="form2">
|
|
223
|
-
<label>문서명: <input type="text" name="docNm" /></label>
|
|
224
|
-
<label>매출액:
|
|
225
|
-
<input type="number" name="minAmt" placeholder="최소" /> ~
|
|
226
|
-
<input type="number" name="maxAmt" placeholder="최대" />
|
|
227
|
-
</label>
|
|
228
|
-
</nx-form>
|
|
229
|
-
<button className="search">검색</button>
|
|
230
|
-
</nx-tab-page>
|
|
231
|
-
</nx-tab>
|
|
232
|
-
|
|
233
|
-
<div className="grid-wrapper">
|
|
234
|
-
<nine-grid
|
|
235
|
-
ref={gridRef}
|
|
236
|
-
caption="문서관리"
|
|
237
|
-
select-type="row"
|
|
238
|
-
show-title-bar="true"
|
|
239
|
-
show-menu-icon="true"
|
|
240
|
-
show-status-bar="true"
|
|
241
|
-
enable-fixed-col="true"
|
|
242
|
-
row-resizable="false"
|
|
243
|
-
col-movable="true"
|
|
244
|
-
>
|
|
245
|
-
<table>
|
|
246
|
-
<colgroup>
|
|
247
|
-
<col width="50" fixed="left" background-color="gray" />
|
|
248
|
-
<col width="100" />
|
|
249
|
-
<col width="100" />
|
|
250
|
-
<col width="200" />
|
|
251
|
-
<col width="120" />
|
|
252
|
-
<col width="100" />
|
|
253
|
-
<col width="150" />
|
|
254
|
-
<col width="150" />
|
|
255
|
-
</colgroup>
|
|
256
|
-
<thead>
|
|
257
|
-
<tr>
|
|
258
|
-
<th>No.</th>
|
|
259
|
-
<th>최종수정자</th>
|
|
260
|
-
<th>문서ID</th>
|
|
261
|
-
<th>문서명</th>
|
|
262
|
-
<th>매출액</th>
|
|
263
|
-
<th>최초등록자</th>
|
|
264
|
-
<th>최초등록일</th>
|
|
265
|
-
<th>최종수정일</th>
|
|
266
|
-
</tr>
|
|
267
|
-
</thead>
|
|
268
|
-
<tbody>
|
|
269
|
-
<tr>
|
|
270
|
-
<th><ng-row-indicator /></th>
|
|
271
|
-
<td data-bind="updateUser" text-align="center"></td>
|
|
272
|
-
<td data-bind="docId" text-align="center"></td>
|
|
273
|
-
<td data-bind="docNm" text-align="left"></td>
|
|
274
|
-
<td
|
|
275
|
-
data-bind="amt"
|
|
276
|
-
data-expr="data.amt.toLocaleString()"
|
|
277
|
-
text-align="right"
|
|
278
|
-
show-icon="true"
|
|
279
|
-
icon-type="sphere"
|
|
280
|
-
icon-color="data.amt >= 2000 ? 'red' : 'gray'"
|
|
281
|
-
></td>
|
|
282
|
-
<td data-bind="insertUser" text-align="center"></td>
|
|
283
|
-
<td data-bind="insertDt" text-align="center"></td>
|
|
284
|
-
<td data-bind="updateDt" text-align="center"></td>
|
|
285
|
-
</tr>
|
|
286
|
-
</tbody>
|
|
287
|
-
</table>
|
|
288
|
-
</nine-grid>
|
|
289
|
-
</div>
|
|
290
|
-
</div>
|
|
291
|
-
</div>
|
|
292
|
-
);
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
export default DocManager;
|
|
296
|
-
`;
|
|
297
|
-
|
|
298
|
-
let src2 = `
|
|
299
|
-
import React, { useRef, useEffect } from "react";
|
|
300
|
-
import { api, ai } from "ide-assi";
|
|
301
|
-
import ninegrid from "ninegrid2";
|
|
302
|
-
|
|
303
|
-
const DocManager = () => {
|
|
304
|
-
const tabRef = useRef(null);
|
|
305
|
-
const gridRef = useRef(null);
|
|
306
|
-
|
|
307
|
-
const selectList = async (params) => {
|
|
308
|
-
if (!gridRef.current) return;
|
|
309
|
-
gridRef.current.classList.add("loading");
|
|
310
|
-
api.post(\`/api/tmpl-a/doc-manager/selectList\`, params).then((res) => {
|
|
311
|
-
gridRef.current.data.source = res.list;
|
|
312
|
-
});
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
const handleNaturalLanguageSearch = async () => {
|
|
316
|
-
const searchTextElement = ninegrid.querySelector("#searchText", tabRef.current);
|
|
317
|
-
const searchText = searchTextElement ? searchTextElement.value : "";
|
|
318
|
-
|
|
319
|
-
if (!gridRef.current) return;
|
|
320
|
-
gridRef.current.classList.add("loading");
|
|
321
|
-
|
|
322
|
-
let params = {};
|
|
323
|
-
if (searchText) {
|
|
324
|
-
params = {
|
|
325
|
-
_whereClause: await ai.generateWhereCause(
|
|
326
|
-
"tmpla/DocManagerMapper.xml",
|
|
327
|
-
"selectList",
|
|
328
|
-
searchText,
|
|
329
|
-
import.meta.env.VITE_GEMINI_API_KEY
|
|
330
|
-
),
|
|
331
|
-
};
|
|
332
|
-
}
|
|
333
|
-
selectList(params);
|
|
334
|
-
};
|
|
335
|
-
|
|
336
|
-
const handleClassicSearch = () => {
|
|
337
|
-
if (!gridRef.current) return;
|
|
338
|
-
gridRef.current.classList.add("loading");
|
|
339
|
-
|
|
340
|
-
const form2Element = ninegrid.querySelector(".form2", tabRef.current);
|
|
341
|
-
const params = form2Element ? form2Element.getData() : {};
|
|
342
|
-
selectList(params);
|
|
343
|
-
};
|
|
344
|
-
|
|
345
|
-
useEffect(() => {
|
|
346
|
-
selectList({});
|
|
347
|
-
|
|
348
|
-
const searchTextElement = ninegrid.querySelector("#searchText", tabRef.current);
|
|
349
|
-
const searchButton = ninegrid.querySelector(".search", tabRef.current);
|
|
350
|
-
|
|
351
|
-
const handleKeyDown = (e) => {
|
|
352
|
-
if (e.key === "Enter" && !e.isComposing) {
|
|
353
|
-
handleNaturalLanguageSearch();
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
|
|
357
|
-
const handleClick = () => {
|
|
358
|
-
handleClassicSearch();
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
if (searchTextElement) {
|
|
362
|
-
searchTextElement.addEventListener("keydown", handleKeyDown);
|
|
363
|
-
}
|
|
364
|
-
if (searchButton) {
|
|
365
|
-
searchButton.addEventListener("click", handleClick);
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
return () => {
|
|
369
|
-
if (searchTextElement) {
|
|
370
|
-
searchTextElement.removeEventListener("keydown", handleKeyDown);
|
|
371
|
-
}
|
|
372
|
-
if (searchButton) {
|
|
373
|
-
searchButton.removeEventListener("click", handleClick);
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
}, []);
|
|
377
|
-
|
|
378
|
-
return (
|
|
379
|
-
<div className="wrapper">
|
|
380
|
-
<nx-collapse target="nx-tab" className="search-collapse"></nx-collapse>
|
|
381
|
-
<div className="list-wrapper">
|
|
382
|
-
<nx-tab theme="theme-3" ref={tabRef}>
|
|
383
|
-
<nx-tab-page caption="자연어 검색">
|
|
384
|
-
<nx-form className="form1">
|
|
385
|
-
<input
|
|
386
|
-
type="text"
|
|
387
|
-
id="searchText"
|
|
388
|
-
name="searchText"
|
|
389
|
-
placeholder="자연어 검색어를 입력하세요 (ex: 작성자가 홍길동인 데이타를 찾아줘)"
|
|
390
|
-
/>
|
|
391
|
-
</nx-form>
|
|
392
|
-
</nx-tab-page>
|
|
393
|
-
<nx-tab-page caption="클래식 검색">
|
|
394
|
-
<nx-form className="form2">
|
|
395
|
-
<label>문서명: <input type="text" name="docNm" /></label>
|
|
396
|
-
<label>매출액:
|
|
397
|
-
<input type="number" name="minAmt" placeholder="최소" /> ~
|
|
398
|
-
<input type="number" name="maxAmt" placeholder="최대" />
|
|
399
|
-
</label>
|
|
400
|
-
</nx-form>
|
|
401
|
-
<button className="search">검색</button>
|
|
402
|
-
</nx-tab-page>
|
|
403
|
-
</nx-tab>
|
|
404
|
-
|
|
405
|
-
<div className="grid-wrapper">
|
|
406
|
-
<nine-grid
|
|
407
|
-
ref={gridRef}
|
|
408
|
-
caption="매출 문서 관리"
|
|
409
|
-
select-type="row"
|
|
410
|
-
show-title-bar="true"
|
|
411
|
-
show-menu-icon="true"
|
|
412
|
-
show-status-bar="true"
|
|
413
|
-
enable-fixed-col="true"
|
|
414
|
-
row-resizable="false"
|
|
415
|
-
col-movable="true"
|
|
416
|
-
>
|
|
417
|
-
<table>
|
|
418
|
-
<colgroup>
|
|
419
|
-
<col width="50" fixed="left" background-color="gray" />
|
|
420
|
-
<col width="100" />
|
|
421
|
-
<col width="120" />
|
|
422
|
-
<col width="100" />
|
|
423
|
-
<col width="200" />
|
|
424
|
-
<col width="100" />
|
|
425
|
-
<col width="150" />
|
|
426
|
-
<col width="150" />
|
|
427
|
-
</colgroup>
|
|
428
|
-
<thead>
|
|
429
|
-
<tr>
|
|
430
|
-
<th>No.</th>
|
|
431
|
-
<th>문서ID</th>
|
|
432
|
-
<th>매출액</th>
|
|
433
|
-
<th>최종수정자</th>
|
|
434
|
-
<th>문서명</th>
|
|
435
|
-
<th>최초등록자</th>
|
|
436
|
-
<th>최초등록일</th>
|
|
437
|
-
<th>최종수정일</th>
|
|
438
|
-
</tr>
|
|
439
|
-
</thead>
|
|
440
|
-
<tbody>
|
|
441
|
-
<tr>
|
|
442
|
-
<th><ng-row-indicator /></th>
|
|
443
|
-
<td data-bind="docId" text-align="center"></td>
|
|
444
|
-
<td
|
|
445
|
-
data-bind="amt"
|
|
446
|
-
data-expr="data.amt.toLocaleString()"
|
|
447
|
-
text-align="right"
|
|
448
|
-
show-icon="true"
|
|
449
|
-
icon-type="sphere"
|
|
450
|
-
icon-color="data.amt >= 2000 ? 'red' : 'gray'"
|
|
451
|
-
></td>
|
|
452
|
-
<td data-bind="updateUser" text-align="center"></td>
|
|
453
|
-
<td data-bind="docNm" text-align="left"></td>
|
|
454
|
-
<td data-bind="insertUser" text-align="center"></td>
|
|
455
|
-
<td data-bind="insertDt" text-align="center"></td>
|
|
456
|
-
<td data-bind="updateDt" text-align="center"></td>
|
|
457
|
-
</tr>
|
|
458
|
-
</tbody>
|
|
459
|
-
</table>
|
|
460
|
-
</nine-grid>
|
|
461
|
-
</div>
|
|
462
|
-
</div>
|
|
463
|
-
</div>
|
|
464
|
-
);
|
|
465
|
-
};
|
|
466
|
-
|
|
467
|
-
export default DocManager;
|
|
468
|
-
`;
|
|
469
|
-
/**
|
|
470
|
-
src1 = `
|
|
471
|
-
<tr>
|
|
472
|
-
<th>No.</th>
|
|
473
|
-
<th>문서ID</th>
|
|
474
|
-
<th>매출액</th>
|
|
475
|
-
<th>최종수정자</th>
|
|
476
|
-
<th>문서명</th>
|
|
477
|
-
<th>최초등록자</th>
|
|
478
|
-
<th>최초등록일</th>
|
|
479
|
-
<th>최종수정일</th>
|
|
480
|
-
</tr>
|
|
481
|
-
`;
|
|
482
|
-
src2 = `
|
|
483
|
-
<tr>
|
|
484
|
-
<th>No.</th>
|
|
485
|
-
<th>매출액</th>
|
|
486
|
-
<th>문서ID</th>
|
|
487
|
-
<th>최종수정자</th>
|
|
488
|
-
<th>문서명</th>
|
|
489
|
-
<th>최초등록자</th>
|
|
490
|
-
<th>최초등록일</th>
|
|
491
|
-
<th>최종수정일</th>
|
|
492
|
-
</tr>
|
|
493
|
-
`; */
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
127
|
const apply = {
|
|
502
128
|
mybatis: this.shadowRoot.querySelector("#mybatis").checked,
|
|
503
129
|
service: this.shadowRoot.querySelector("#service").checked,
|