ide-assi 0.414.0 → 0.415.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 +373 -3
- package/dist/bundle.esm.js +373 -3
- package/dist/components/ideAssi.js +30 -5
- package/package.json +1 -1
- package/src/components/ideAssi.js +30 -5
package/dist/bundle.cjs.js
CHANGED
|
@@ -201852,7 +201852,352 @@ class IdeAssi extends HTMLElement
|
|
|
201852
201852
|
|
|
201853
201853
|
this.shadowRoot.appendChild(document.createElement('ide-diff-popup'));
|
|
201854
201854
|
|
|
201855
|
-
|
|
201855
|
+
//setTimeout(() => {
|
|
201856
|
+
let src1 = `
|
|
201857
|
+
import React, { useRef, useEffect } from "react" adfa;
|
|
201858
|
+
import { api, ai } from "ide-assi";
|
|
201859
|
+
import ninegrid from "ninegrid2";
|
|
201860
|
+
|
|
201861
|
+
const DocManager = () => {
|
|
201862
|
+
const tabRef = useRef(null);
|
|
201863
|
+
const gridRef = useRef(null);
|
|
201864
|
+
|
|
201865
|
+
const selectList = async (params) => {
|
|
201866
|
+
if (!gridRef.current) return;
|
|
201867
|
+
gridRef.current.classList.add("loading");
|
|
201868
|
+
api.post(\`/api/tmpl-a/doc-manager/selectList\`, params).then((res) => {
|
|
201869
|
+
gridRef.current.data.source = res.list;
|
|
201870
|
+
});
|
|
201871
|
+
};
|
|
201872
|
+
|
|
201873
|
+
const handleNaturalLanguageSearch = async () => {
|
|
201874
|
+
const searchTextElement = ninegrid.querySelector("#searchText", tabRef.current);
|
|
201875
|
+
const searchText = searchTextElement ? searchTextElement.value : "";
|
|
201876
|
+
|
|
201877
|
+
if (!gridRef.current) return;
|
|
201878
|
+
gridRef.current.classList.add("loading");
|
|
201879
|
+
|
|
201880
|
+
let params = {};
|
|
201881
|
+
if (searchText) {
|
|
201882
|
+
params = {
|
|
201883
|
+
_whereClause: await ai.generateWhereCause(
|
|
201884
|
+
"tmpla/DocManagerMapper.xml",
|
|
201885
|
+
"selectList",
|
|
201886
|
+
searchText,
|
|
201887
|
+
import.meta.env.VITE_GEMINI_API_KEY
|
|
201888
|
+
),
|
|
201889
|
+
};
|
|
201890
|
+
}
|
|
201891
|
+
selectList(params);
|
|
201892
|
+
};
|
|
201893
|
+
|
|
201894
|
+
const handleClassicSearch = () => {
|
|
201895
|
+
if (!gridRef.current) return;
|
|
201896
|
+
gridRef.current.classList.add("loading");
|
|
201897
|
+
|
|
201898
|
+
const form2Element = ninegrid.querySelector(".form2", tabRef.current);
|
|
201899
|
+
const params = form2Element ? form2Element.getData() : {};
|
|
201900
|
+
selectList(params);
|
|
201901
|
+
};
|
|
201902
|
+
|
|
201903
|
+
useEffect(() => {
|
|
201904
|
+
selectList({});
|
|
201905
|
+
|
|
201906
|
+
const searchTextElement = ninegrid.querySelector("#searchText", tabRef.current);
|
|
201907
|
+
const searchButton = ninegrid.querySelector(".search", tabRef.current);
|
|
201908
|
+
|
|
201909
|
+
const handleKeyDown = (e) => {
|
|
201910
|
+
if (e.key === "Enter" && !e.isComposing) {
|
|
201911
|
+
handleNaturalLanguageSearch();
|
|
201912
|
+
}
|
|
201913
|
+
};
|
|
201914
|
+
|
|
201915
|
+
const handleClick = () => {
|
|
201916
|
+
handleClassicSearch();
|
|
201917
|
+
};
|
|
201918
|
+
|
|
201919
|
+
if (searchTextElement) {
|
|
201920
|
+
searchTextElement.addEventListener("keydown", handleKeyDown);
|
|
201921
|
+
}
|
|
201922
|
+
if (searchButton) {
|
|
201923
|
+
searchButton.addEventListener("click", handleClick);
|
|
201924
|
+
}
|
|
201925
|
+
|
|
201926
|
+
return () => {
|
|
201927
|
+
if (searchTextElement) {
|
|
201928
|
+
searchTextElement.removeEventListener("keydown", handleKeyDown);
|
|
201929
|
+
}
|
|
201930
|
+
if (searchButton) {
|
|
201931
|
+
searchButton.removeEventListener("click", handleClick);
|
|
201932
|
+
}
|
|
201933
|
+
};
|
|
201934
|
+
}, []);
|
|
201935
|
+
|
|
201936
|
+
return (
|
|
201937
|
+
<div className="wrapper">
|
|
201938
|
+
<nx-collapse target="nx-tab" className="search-collapse"></nx-collapse>
|
|
201939
|
+
<div className="list-wrapper">
|
|
201940
|
+
<nx-tab theme="theme-3" ref={tabRef}>
|
|
201941
|
+
<nx-tab-page caption="자연어 검색">
|
|
201942
|
+
<nx-form className="form1">
|
|
201943
|
+
<input
|
|
201944
|
+
type="text"
|
|
201945
|
+
id="searchText"
|
|
201946
|
+
name="searchText"
|
|
201947
|
+
placeholder="자연어 검색어를 입력하세요 (ex: 작성자가 홍길동인 데이타를 찾아줘)"
|
|
201948
|
+
/>
|
|
201949
|
+
</nx-form>
|
|
201950
|
+
</nx-tab-page>
|
|
201951
|
+
<nx-tab-page caption="클래식 검색">
|
|
201952
|
+
<nx-form className="form2">
|
|
201953
|
+
<label>문서명: <input type="text" name="docNm" /></label>
|
|
201954
|
+
<label>매출액:
|
|
201955
|
+
<input type="number" name="minAmt" placeholder="최소" /> ~
|
|
201956
|
+
<input type="number" name="maxAmt" placeholder="최대" />
|
|
201957
|
+
</label>
|
|
201958
|
+
</nx-form>
|
|
201959
|
+
<button className="search">검색</button>
|
|
201960
|
+
</nx-tab-page>
|
|
201961
|
+
</nx-tab>
|
|
201962
|
+
|
|
201963
|
+
<div className="grid-wrapper">
|
|
201964
|
+
<nine-grid
|
|
201965
|
+
ref={gridRef}
|
|
201966
|
+
caption="문서관리"
|
|
201967
|
+
select-type="row"
|
|
201968
|
+
show-title-bar="true"
|
|
201969
|
+
show-menu-icon="true"
|
|
201970
|
+
show-status-bar="true"
|
|
201971
|
+
enable-fixed-col="true"
|
|
201972
|
+
row-resizable="false"
|
|
201973
|
+
col-movable="true"
|
|
201974
|
+
>
|
|
201975
|
+
<table>
|
|
201976
|
+
<colgroup>
|
|
201977
|
+
<col width="50" fixed="left" background-color="gray" />
|
|
201978
|
+
<col width="100" />
|
|
201979
|
+
<col width="100" />
|
|
201980
|
+
<col width="200" />
|
|
201981
|
+
<col width="120" />
|
|
201982
|
+
<col width="100" />
|
|
201983
|
+
<col width="150" />
|
|
201984
|
+
<col width="150" />
|
|
201985
|
+
</colgroup>
|
|
201986
|
+
<thead>
|
|
201987
|
+
<tr>
|
|
201988
|
+
<th>No.</th>
|
|
201989
|
+
<th>최종수정자</th>
|
|
201990
|
+
<th>문서ID</th>
|
|
201991
|
+
<th>문서명</th>
|
|
201992
|
+
<th>매출액</th>
|
|
201993
|
+
<th>최초등록자</th>
|
|
201994
|
+
<th>최초등록일</th>
|
|
201995
|
+
<th>최종수정일</th>
|
|
201996
|
+
</tr>
|
|
201997
|
+
</thead>
|
|
201998
|
+
<tbody>
|
|
201999
|
+
<tr>
|
|
202000
|
+
<th><ng-row-indicator /></th>
|
|
202001
|
+
<td data-bind="updateUser" text-align="center"></td>
|
|
202002
|
+
<td data-bind="docId" text-align="center"></td>
|
|
202003
|
+
<td data-bind="docNm" text-align="left"></td>
|
|
202004
|
+
<td
|
|
202005
|
+
data-bind="amt"
|
|
202006
|
+
data-expr="data.amt.toLocaleString()"
|
|
202007
|
+
text-align="right"
|
|
202008
|
+
show-icon="true"
|
|
202009
|
+
icon-type="sphere"
|
|
202010
|
+
icon-color="data.amt >= 2000 ? 'red' : 'gray'"
|
|
202011
|
+
></td>
|
|
202012
|
+
<td data-bind="insertUser" text-align="center"></td>
|
|
202013
|
+
<td data-bind="insertDt" text-align="center"></td>
|
|
202014
|
+
<td data-bind="updateDt" text-align="center"></td>
|
|
202015
|
+
</tr>
|
|
202016
|
+
</tbody>
|
|
202017
|
+
</table>
|
|
202018
|
+
</nine-grid>
|
|
202019
|
+
</div>
|
|
202020
|
+
</div>
|
|
202021
|
+
</div>
|
|
202022
|
+
);
|
|
202023
|
+
};
|
|
202024
|
+
|
|
202025
|
+
export default DocManager;
|
|
202026
|
+
`;
|
|
202027
|
+
|
|
202028
|
+
let src2 = `
|
|
202029
|
+
import React, { useRef, useEffect } from "react";
|
|
202030
|
+
import { api, ai } from "ide-assi";
|
|
202031
|
+
import ninegrid from "ninegrid2";
|
|
202032
|
+
|
|
202033
|
+
const DocManager = () => {
|
|
202034
|
+
const tabRef = useRef(null);
|
|
202035
|
+
const gridRef = useRef(null);
|
|
202036
|
+
|
|
202037
|
+
const selectList = async (params) => {
|
|
202038
|
+
if (!gridRef.current) return;
|
|
202039
|
+
gridRef.current.classList.add("loading");
|
|
202040
|
+
api.post(\`/api/tmpl-a/doc-manager/selectList\`, params).then((res) => {
|
|
202041
|
+
gridRef.current.data.source = res.list;
|
|
202042
|
+
});
|
|
202043
|
+
};
|
|
202044
|
+
|
|
202045
|
+
const handleNaturalLanguageSearch = async () => {
|
|
202046
|
+
const searchTextElement = ninegrid.querySelector("#searchText", tabRef.current);
|
|
202047
|
+
const searchText = searchTextElement ? searchTextElement.value : "";
|
|
202048
|
+
|
|
202049
|
+
if (!gridRef.current) return;
|
|
202050
|
+
gridRef.current.classList.add("loading");
|
|
202051
|
+
|
|
202052
|
+
let params = {};
|
|
202053
|
+
if (searchText) {
|
|
202054
|
+
params = {
|
|
202055
|
+
_whereClause: await ai.generateWhereCause(
|
|
202056
|
+
"tmpla/DocManagerMapper.xml",
|
|
202057
|
+
"selectList",
|
|
202058
|
+
searchText,
|
|
202059
|
+
import.meta.env.VITE_GEMINI_API_KEY
|
|
202060
|
+
),
|
|
202061
|
+
};
|
|
202062
|
+
}
|
|
202063
|
+
selectList(params);
|
|
202064
|
+
};
|
|
202065
|
+
|
|
202066
|
+
const handleClassicSearch = () => {
|
|
202067
|
+
if (!gridRef.current) return;
|
|
202068
|
+
gridRef.current.classList.add("loading");
|
|
202069
|
+
|
|
202070
|
+
const form2Element = ninegrid.querySelector(".form2", tabRef.current);
|
|
202071
|
+
const params = form2Element ? form2Element.getData() : {};
|
|
202072
|
+
selectList(params);
|
|
202073
|
+
};
|
|
202074
|
+
|
|
202075
|
+
useEffect(() => {
|
|
202076
|
+
selectList({});
|
|
202077
|
+
|
|
202078
|
+
const searchTextElement = ninegrid.querySelector("#searchText", tabRef.current);
|
|
202079
|
+
const searchButton = ninegrid.querySelector(".search", tabRef.current);
|
|
202080
|
+
|
|
202081
|
+
const handleKeyDown = (e) => {
|
|
202082
|
+
if (e.key === "Enter" && !e.isComposing) {
|
|
202083
|
+
handleNaturalLanguageSearch();
|
|
202084
|
+
}
|
|
202085
|
+
};
|
|
202086
|
+
|
|
202087
|
+
const handleClick = () => {
|
|
202088
|
+
handleClassicSearch();
|
|
202089
|
+
};
|
|
202090
|
+
|
|
202091
|
+
if (searchTextElement) {
|
|
202092
|
+
searchTextElement.addEventListener("keydown", handleKeyDown);
|
|
202093
|
+
}
|
|
202094
|
+
if (searchButton) {
|
|
202095
|
+
searchButton.addEventListener("click", handleClick);
|
|
202096
|
+
}
|
|
202097
|
+
|
|
202098
|
+
return () => {
|
|
202099
|
+
if (searchTextElement) {
|
|
202100
|
+
searchTextElement.removeEventListener("keydown", handleKeyDown);
|
|
202101
|
+
}
|
|
202102
|
+
if (searchButton) {
|
|
202103
|
+
searchButton.removeEventListener("click", handleClick);
|
|
202104
|
+
}
|
|
202105
|
+
};
|
|
202106
|
+
}, []);
|
|
202107
|
+
|
|
202108
|
+
return (
|
|
202109
|
+
<div className="wrapper">
|
|
202110
|
+
<nx-collapse target="nx-tab" className="search-collapse"></nx-collapse>
|
|
202111
|
+
<div className="list-wrapper">
|
|
202112
|
+
<nx-tab theme="theme-3" ref={tabRef}>
|
|
202113
|
+
<nx-tab-page caption="자연어 검색">
|
|
202114
|
+
<nx-form className="form1">
|
|
202115
|
+
<input
|
|
202116
|
+
type="text"
|
|
202117
|
+
id="searchText"
|
|
202118
|
+
name="searchText"
|
|
202119
|
+
placeholder="자연어 검색어를 입력하세요 (ex: 작성자가 홍길동인 데이타를 찾아줘)"
|
|
202120
|
+
/>
|
|
202121
|
+
</nx-form>
|
|
202122
|
+
</nx-tab-page>
|
|
202123
|
+
<nx-tab-page caption="클래식 검색">
|
|
202124
|
+
<nx-form className="form2">
|
|
202125
|
+
<label>문서명: <input type="text" name="docNm" /></label>
|
|
202126
|
+
<label>매출액:
|
|
202127
|
+
<input type="number" name="minAmt" placeholder="최소" /> ~
|
|
202128
|
+
<input type="number" name="maxAmt" placeholder="최대" />
|
|
202129
|
+
</label>
|
|
202130
|
+
</nx-form>
|
|
202131
|
+
<button className="search">검색</button>
|
|
202132
|
+
</nx-tab-page>
|
|
202133
|
+
</nx-tab>
|
|
202134
|
+
|
|
202135
|
+
<div className="grid-wrapper">
|
|
202136
|
+
<nine-grid
|
|
202137
|
+
ref={gridRef}
|
|
202138
|
+
caption="매출 문서 관리"
|
|
202139
|
+
select-type="row"
|
|
202140
|
+
show-title-bar="true"
|
|
202141
|
+
show-menu-icon="true"
|
|
202142
|
+
show-status-bar="true"
|
|
202143
|
+
enable-fixed-col="true"
|
|
202144
|
+
row-resizable="false"
|
|
202145
|
+
col-movable="true"
|
|
202146
|
+
>
|
|
202147
|
+
<table>
|
|
202148
|
+
<colgroup>
|
|
202149
|
+
<col width="50" fixed="left" background-color="gray" />
|
|
202150
|
+
<col width="100" />
|
|
202151
|
+
<col width="120" />
|
|
202152
|
+
<col width="100" />
|
|
202153
|
+
<col width="200" />
|
|
202154
|
+
<col width="100" />
|
|
202155
|
+
<col width="150" />
|
|
202156
|
+
<col width="150" />
|
|
202157
|
+
</colgroup>
|
|
202158
|
+
<thead>
|
|
202159
|
+
<tr>
|
|
202160
|
+
<th>No.</th>
|
|
202161
|
+
<th>문서ID</th>
|
|
202162
|
+
<th>매출액</th>
|
|
202163
|
+
<th>최종수정자</th>
|
|
202164
|
+
<th>문서명</th>
|
|
202165
|
+
<th>최초등록자</th>
|
|
202166
|
+
<th>최초등록일</th>
|
|
202167
|
+
<th>최종수정일</th>
|
|
202168
|
+
</tr>
|
|
202169
|
+
</thead>
|
|
202170
|
+
<tbody>
|
|
202171
|
+
<tr>
|
|
202172
|
+
<th><ng-row-indicator /></th>
|
|
202173
|
+
<td data-bind="docId" text-align="center"></td>
|
|
202174
|
+
<td
|
|
202175
|
+
data-bind="amt"
|
|
202176
|
+
data-expr="data.amt.toLocaleString()"
|
|
202177
|
+
text-align="right"
|
|
202178
|
+
show-icon="true"
|
|
202179
|
+
icon-type="sphere"
|
|
202180
|
+
icon-color="data.amt >= 2000 ? 'red' : 'gray'"
|
|
202181
|
+
></td>
|
|
202182
|
+
<td data-bind="updateUser" text-align="center"></td>
|
|
202183
|
+
<td data-bind="docNm" text-align="left"></td>
|
|
202184
|
+
<td data-bind="insertUser" text-align="center"></td>
|
|
202185
|
+
<td data-bind="insertDt" text-align="center"></td>
|
|
202186
|
+
<td data-bind="updateDt" text-align="center"></td>
|
|
202187
|
+
</tr>
|
|
202188
|
+
</tbody>
|
|
202189
|
+
</table>
|
|
202190
|
+
</nine-grid>
|
|
202191
|
+
</div>
|
|
202192
|
+
</div>
|
|
202193
|
+
</div>
|
|
202194
|
+
);
|
|
202195
|
+
};
|
|
202196
|
+
|
|
202197
|
+
export default DocManager;
|
|
202198
|
+
`;
|
|
202199
|
+
|
|
202200
|
+
src1 = `
|
|
201856
202201
|
<tr>
|
|
201857
202202
|
<th>No.</th>
|
|
201858
202203
|
<th>문서ID</th>
|
|
@@ -201864,7 +202209,7 @@ class IdeAssi extends HTMLElement
|
|
|
201864
202209
|
<th>최종수정일</th>
|
|
201865
202210
|
</tr>
|
|
201866
202211
|
`;
|
|
201867
|
-
|
|
202212
|
+
src2 = `
|
|
201868
202213
|
<tr>
|
|
201869
202214
|
<th>No.</th>
|
|
201870
202215
|
<th>매출액</th>
|
|
@@ -201877,7 +202222,32 @@ class IdeAssi extends HTMLElement
|
|
|
201877
202222
|
</tr>
|
|
201878
202223
|
`;
|
|
201879
202224
|
|
|
201880
|
-
|
|
202225
|
+
src1 = `
|
|
202226
|
+
<tr>
|
|
202227
|
+
<th>No.</th>
|
|
202228
|
+
<th>문서ID</th>
|
|
202229
|
+
<th>매출액</th>
|
|
202230
|
+
<th>최종수정자</th>
|
|
202231
|
+
<th>문서명</th>
|
|
202232
|
+
<th>최초등록자</th>
|
|
202233
|
+
<th>최초등록일</th>
|
|
202234
|
+
<th>최종수정일</th>
|
|
202235
|
+
</tr>
|
|
202236
|
+
`;
|
|
202237
|
+
src2 = `
|
|
202238
|
+
<tr>
|
|
202239
|
+
<th>No.</th>
|
|
202240
|
+
<th>매출액</th>
|
|
202241
|
+
<th>최종수정자</th>
|
|
202242
|
+
<th>문서ID</th>
|
|
202243
|
+
<th>문서명</th>
|
|
202244
|
+
<th>최초등록자</th>
|
|
202245
|
+
<th>최초등록일</th>
|
|
202246
|
+
<th>최종수정일</th>
|
|
202247
|
+
</tr>
|
|
202248
|
+
`;
|
|
202249
|
+
|
|
202250
|
+
this.shadowRoot.querySelector("ide-diff-popup").popup(src1, src2);
|
|
201881
202251
|
|
|
201882
202252
|
return;
|
|
201883
202253
|
}
|
package/dist/bundle.esm.js
CHANGED
|
@@ -201848,7 +201848,352 @@ class IdeAssi extends HTMLElement
|
|
|
201848
201848
|
|
|
201849
201849
|
this.shadowRoot.appendChild(document.createElement('ide-diff-popup'));
|
|
201850
201850
|
|
|
201851
|
-
|
|
201851
|
+
//setTimeout(() => {
|
|
201852
|
+
let src1 = `
|
|
201853
|
+
import React, { useRef, useEffect } from "react" adfa;
|
|
201854
|
+
import { api, ai } from "ide-assi";
|
|
201855
|
+
import ninegrid from "ninegrid2";
|
|
201856
|
+
|
|
201857
|
+
const DocManager = () => {
|
|
201858
|
+
const tabRef = useRef(null);
|
|
201859
|
+
const gridRef = useRef(null);
|
|
201860
|
+
|
|
201861
|
+
const selectList = async (params) => {
|
|
201862
|
+
if (!gridRef.current) return;
|
|
201863
|
+
gridRef.current.classList.add("loading");
|
|
201864
|
+
api.post(\`/api/tmpl-a/doc-manager/selectList\`, params).then((res) => {
|
|
201865
|
+
gridRef.current.data.source = res.list;
|
|
201866
|
+
});
|
|
201867
|
+
};
|
|
201868
|
+
|
|
201869
|
+
const handleNaturalLanguageSearch = async () => {
|
|
201870
|
+
const searchTextElement = ninegrid.querySelector("#searchText", tabRef.current);
|
|
201871
|
+
const searchText = searchTextElement ? searchTextElement.value : "";
|
|
201872
|
+
|
|
201873
|
+
if (!gridRef.current) return;
|
|
201874
|
+
gridRef.current.classList.add("loading");
|
|
201875
|
+
|
|
201876
|
+
let params = {};
|
|
201877
|
+
if (searchText) {
|
|
201878
|
+
params = {
|
|
201879
|
+
_whereClause: await ai.generateWhereCause(
|
|
201880
|
+
"tmpla/DocManagerMapper.xml",
|
|
201881
|
+
"selectList",
|
|
201882
|
+
searchText,
|
|
201883
|
+
import.meta.env.VITE_GEMINI_API_KEY
|
|
201884
|
+
),
|
|
201885
|
+
};
|
|
201886
|
+
}
|
|
201887
|
+
selectList(params);
|
|
201888
|
+
};
|
|
201889
|
+
|
|
201890
|
+
const handleClassicSearch = () => {
|
|
201891
|
+
if (!gridRef.current) return;
|
|
201892
|
+
gridRef.current.classList.add("loading");
|
|
201893
|
+
|
|
201894
|
+
const form2Element = ninegrid.querySelector(".form2", tabRef.current);
|
|
201895
|
+
const params = form2Element ? form2Element.getData() : {};
|
|
201896
|
+
selectList(params);
|
|
201897
|
+
};
|
|
201898
|
+
|
|
201899
|
+
useEffect(() => {
|
|
201900
|
+
selectList({});
|
|
201901
|
+
|
|
201902
|
+
const searchTextElement = ninegrid.querySelector("#searchText", tabRef.current);
|
|
201903
|
+
const searchButton = ninegrid.querySelector(".search", tabRef.current);
|
|
201904
|
+
|
|
201905
|
+
const handleKeyDown = (e) => {
|
|
201906
|
+
if (e.key === "Enter" && !e.isComposing) {
|
|
201907
|
+
handleNaturalLanguageSearch();
|
|
201908
|
+
}
|
|
201909
|
+
};
|
|
201910
|
+
|
|
201911
|
+
const handleClick = () => {
|
|
201912
|
+
handleClassicSearch();
|
|
201913
|
+
};
|
|
201914
|
+
|
|
201915
|
+
if (searchTextElement) {
|
|
201916
|
+
searchTextElement.addEventListener("keydown", handleKeyDown);
|
|
201917
|
+
}
|
|
201918
|
+
if (searchButton) {
|
|
201919
|
+
searchButton.addEventListener("click", handleClick);
|
|
201920
|
+
}
|
|
201921
|
+
|
|
201922
|
+
return () => {
|
|
201923
|
+
if (searchTextElement) {
|
|
201924
|
+
searchTextElement.removeEventListener("keydown", handleKeyDown);
|
|
201925
|
+
}
|
|
201926
|
+
if (searchButton) {
|
|
201927
|
+
searchButton.removeEventListener("click", handleClick);
|
|
201928
|
+
}
|
|
201929
|
+
};
|
|
201930
|
+
}, []);
|
|
201931
|
+
|
|
201932
|
+
return (
|
|
201933
|
+
<div className="wrapper">
|
|
201934
|
+
<nx-collapse target="nx-tab" className="search-collapse"></nx-collapse>
|
|
201935
|
+
<div className="list-wrapper">
|
|
201936
|
+
<nx-tab theme="theme-3" ref={tabRef}>
|
|
201937
|
+
<nx-tab-page caption="자연어 검색">
|
|
201938
|
+
<nx-form className="form1">
|
|
201939
|
+
<input
|
|
201940
|
+
type="text"
|
|
201941
|
+
id="searchText"
|
|
201942
|
+
name="searchText"
|
|
201943
|
+
placeholder="자연어 검색어를 입력하세요 (ex: 작성자가 홍길동인 데이타를 찾아줘)"
|
|
201944
|
+
/>
|
|
201945
|
+
</nx-form>
|
|
201946
|
+
</nx-tab-page>
|
|
201947
|
+
<nx-tab-page caption="클래식 검색">
|
|
201948
|
+
<nx-form className="form2">
|
|
201949
|
+
<label>문서명: <input type="text" name="docNm" /></label>
|
|
201950
|
+
<label>매출액:
|
|
201951
|
+
<input type="number" name="minAmt" placeholder="최소" /> ~
|
|
201952
|
+
<input type="number" name="maxAmt" placeholder="최대" />
|
|
201953
|
+
</label>
|
|
201954
|
+
</nx-form>
|
|
201955
|
+
<button className="search">검색</button>
|
|
201956
|
+
</nx-tab-page>
|
|
201957
|
+
</nx-tab>
|
|
201958
|
+
|
|
201959
|
+
<div className="grid-wrapper">
|
|
201960
|
+
<nine-grid
|
|
201961
|
+
ref={gridRef}
|
|
201962
|
+
caption="문서관리"
|
|
201963
|
+
select-type="row"
|
|
201964
|
+
show-title-bar="true"
|
|
201965
|
+
show-menu-icon="true"
|
|
201966
|
+
show-status-bar="true"
|
|
201967
|
+
enable-fixed-col="true"
|
|
201968
|
+
row-resizable="false"
|
|
201969
|
+
col-movable="true"
|
|
201970
|
+
>
|
|
201971
|
+
<table>
|
|
201972
|
+
<colgroup>
|
|
201973
|
+
<col width="50" fixed="left" background-color="gray" />
|
|
201974
|
+
<col width="100" />
|
|
201975
|
+
<col width="100" />
|
|
201976
|
+
<col width="200" />
|
|
201977
|
+
<col width="120" />
|
|
201978
|
+
<col width="100" />
|
|
201979
|
+
<col width="150" />
|
|
201980
|
+
<col width="150" />
|
|
201981
|
+
</colgroup>
|
|
201982
|
+
<thead>
|
|
201983
|
+
<tr>
|
|
201984
|
+
<th>No.</th>
|
|
201985
|
+
<th>최종수정자</th>
|
|
201986
|
+
<th>문서ID</th>
|
|
201987
|
+
<th>문서명</th>
|
|
201988
|
+
<th>매출액</th>
|
|
201989
|
+
<th>최초등록자</th>
|
|
201990
|
+
<th>최초등록일</th>
|
|
201991
|
+
<th>최종수정일</th>
|
|
201992
|
+
</tr>
|
|
201993
|
+
</thead>
|
|
201994
|
+
<tbody>
|
|
201995
|
+
<tr>
|
|
201996
|
+
<th><ng-row-indicator /></th>
|
|
201997
|
+
<td data-bind="updateUser" text-align="center"></td>
|
|
201998
|
+
<td data-bind="docId" text-align="center"></td>
|
|
201999
|
+
<td data-bind="docNm" text-align="left"></td>
|
|
202000
|
+
<td
|
|
202001
|
+
data-bind="amt"
|
|
202002
|
+
data-expr="data.amt.toLocaleString()"
|
|
202003
|
+
text-align="right"
|
|
202004
|
+
show-icon="true"
|
|
202005
|
+
icon-type="sphere"
|
|
202006
|
+
icon-color="data.amt >= 2000 ? 'red' : 'gray'"
|
|
202007
|
+
></td>
|
|
202008
|
+
<td data-bind="insertUser" text-align="center"></td>
|
|
202009
|
+
<td data-bind="insertDt" text-align="center"></td>
|
|
202010
|
+
<td data-bind="updateDt" text-align="center"></td>
|
|
202011
|
+
</tr>
|
|
202012
|
+
</tbody>
|
|
202013
|
+
</table>
|
|
202014
|
+
</nine-grid>
|
|
202015
|
+
</div>
|
|
202016
|
+
</div>
|
|
202017
|
+
</div>
|
|
202018
|
+
);
|
|
202019
|
+
};
|
|
202020
|
+
|
|
202021
|
+
export default DocManager;
|
|
202022
|
+
`;
|
|
202023
|
+
|
|
202024
|
+
let src2 = `
|
|
202025
|
+
import React, { useRef, useEffect } from "react";
|
|
202026
|
+
import { api, ai } from "ide-assi";
|
|
202027
|
+
import ninegrid from "ninegrid2";
|
|
202028
|
+
|
|
202029
|
+
const DocManager = () => {
|
|
202030
|
+
const tabRef = useRef(null);
|
|
202031
|
+
const gridRef = useRef(null);
|
|
202032
|
+
|
|
202033
|
+
const selectList = async (params) => {
|
|
202034
|
+
if (!gridRef.current) return;
|
|
202035
|
+
gridRef.current.classList.add("loading");
|
|
202036
|
+
api.post(\`/api/tmpl-a/doc-manager/selectList\`, params).then((res) => {
|
|
202037
|
+
gridRef.current.data.source = res.list;
|
|
202038
|
+
});
|
|
202039
|
+
};
|
|
202040
|
+
|
|
202041
|
+
const handleNaturalLanguageSearch = async () => {
|
|
202042
|
+
const searchTextElement = ninegrid.querySelector("#searchText", tabRef.current);
|
|
202043
|
+
const searchText = searchTextElement ? searchTextElement.value : "";
|
|
202044
|
+
|
|
202045
|
+
if (!gridRef.current) return;
|
|
202046
|
+
gridRef.current.classList.add("loading");
|
|
202047
|
+
|
|
202048
|
+
let params = {};
|
|
202049
|
+
if (searchText) {
|
|
202050
|
+
params = {
|
|
202051
|
+
_whereClause: await ai.generateWhereCause(
|
|
202052
|
+
"tmpla/DocManagerMapper.xml",
|
|
202053
|
+
"selectList",
|
|
202054
|
+
searchText,
|
|
202055
|
+
import.meta.env.VITE_GEMINI_API_KEY
|
|
202056
|
+
),
|
|
202057
|
+
};
|
|
202058
|
+
}
|
|
202059
|
+
selectList(params);
|
|
202060
|
+
};
|
|
202061
|
+
|
|
202062
|
+
const handleClassicSearch = () => {
|
|
202063
|
+
if (!gridRef.current) return;
|
|
202064
|
+
gridRef.current.classList.add("loading");
|
|
202065
|
+
|
|
202066
|
+
const form2Element = ninegrid.querySelector(".form2", tabRef.current);
|
|
202067
|
+
const params = form2Element ? form2Element.getData() : {};
|
|
202068
|
+
selectList(params);
|
|
202069
|
+
};
|
|
202070
|
+
|
|
202071
|
+
useEffect(() => {
|
|
202072
|
+
selectList({});
|
|
202073
|
+
|
|
202074
|
+
const searchTextElement = ninegrid.querySelector("#searchText", tabRef.current);
|
|
202075
|
+
const searchButton = ninegrid.querySelector(".search", tabRef.current);
|
|
202076
|
+
|
|
202077
|
+
const handleKeyDown = (e) => {
|
|
202078
|
+
if (e.key === "Enter" && !e.isComposing) {
|
|
202079
|
+
handleNaturalLanguageSearch();
|
|
202080
|
+
}
|
|
202081
|
+
};
|
|
202082
|
+
|
|
202083
|
+
const handleClick = () => {
|
|
202084
|
+
handleClassicSearch();
|
|
202085
|
+
};
|
|
202086
|
+
|
|
202087
|
+
if (searchTextElement) {
|
|
202088
|
+
searchTextElement.addEventListener("keydown", handleKeyDown);
|
|
202089
|
+
}
|
|
202090
|
+
if (searchButton) {
|
|
202091
|
+
searchButton.addEventListener("click", handleClick);
|
|
202092
|
+
}
|
|
202093
|
+
|
|
202094
|
+
return () => {
|
|
202095
|
+
if (searchTextElement) {
|
|
202096
|
+
searchTextElement.removeEventListener("keydown", handleKeyDown);
|
|
202097
|
+
}
|
|
202098
|
+
if (searchButton) {
|
|
202099
|
+
searchButton.removeEventListener("click", handleClick);
|
|
202100
|
+
}
|
|
202101
|
+
};
|
|
202102
|
+
}, []);
|
|
202103
|
+
|
|
202104
|
+
return (
|
|
202105
|
+
<div className="wrapper">
|
|
202106
|
+
<nx-collapse target="nx-tab" className="search-collapse"></nx-collapse>
|
|
202107
|
+
<div className="list-wrapper">
|
|
202108
|
+
<nx-tab theme="theme-3" ref={tabRef}>
|
|
202109
|
+
<nx-tab-page caption="자연어 검색">
|
|
202110
|
+
<nx-form className="form1">
|
|
202111
|
+
<input
|
|
202112
|
+
type="text"
|
|
202113
|
+
id="searchText"
|
|
202114
|
+
name="searchText"
|
|
202115
|
+
placeholder="자연어 검색어를 입력하세요 (ex: 작성자가 홍길동인 데이타를 찾아줘)"
|
|
202116
|
+
/>
|
|
202117
|
+
</nx-form>
|
|
202118
|
+
</nx-tab-page>
|
|
202119
|
+
<nx-tab-page caption="클래식 검색">
|
|
202120
|
+
<nx-form className="form2">
|
|
202121
|
+
<label>문서명: <input type="text" name="docNm" /></label>
|
|
202122
|
+
<label>매출액:
|
|
202123
|
+
<input type="number" name="minAmt" placeholder="최소" /> ~
|
|
202124
|
+
<input type="number" name="maxAmt" placeholder="최대" />
|
|
202125
|
+
</label>
|
|
202126
|
+
</nx-form>
|
|
202127
|
+
<button className="search">검색</button>
|
|
202128
|
+
</nx-tab-page>
|
|
202129
|
+
</nx-tab>
|
|
202130
|
+
|
|
202131
|
+
<div className="grid-wrapper">
|
|
202132
|
+
<nine-grid
|
|
202133
|
+
ref={gridRef}
|
|
202134
|
+
caption="매출 문서 관리"
|
|
202135
|
+
select-type="row"
|
|
202136
|
+
show-title-bar="true"
|
|
202137
|
+
show-menu-icon="true"
|
|
202138
|
+
show-status-bar="true"
|
|
202139
|
+
enable-fixed-col="true"
|
|
202140
|
+
row-resizable="false"
|
|
202141
|
+
col-movable="true"
|
|
202142
|
+
>
|
|
202143
|
+
<table>
|
|
202144
|
+
<colgroup>
|
|
202145
|
+
<col width="50" fixed="left" background-color="gray" />
|
|
202146
|
+
<col width="100" />
|
|
202147
|
+
<col width="120" />
|
|
202148
|
+
<col width="100" />
|
|
202149
|
+
<col width="200" />
|
|
202150
|
+
<col width="100" />
|
|
202151
|
+
<col width="150" />
|
|
202152
|
+
<col width="150" />
|
|
202153
|
+
</colgroup>
|
|
202154
|
+
<thead>
|
|
202155
|
+
<tr>
|
|
202156
|
+
<th>No.</th>
|
|
202157
|
+
<th>문서ID</th>
|
|
202158
|
+
<th>매출액</th>
|
|
202159
|
+
<th>최종수정자</th>
|
|
202160
|
+
<th>문서명</th>
|
|
202161
|
+
<th>최초등록자</th>
|
|
202162
|
+
<th>최초등록일</th>
|
|
202163
|
+
<th>최종수정일</th>
|
|
202164
|
+
</tr>
|
|
202165
|
+
</thead>
|
|
202166
|
+
<tbody>
|
|
202167
|
+
<tr>
|
|
202168
|
+
<th><ng-row-indicator /></th>
|
|
202169
|
+
<td data-bind="docId" text-align="center"></td>
|
|
202170
|
+
<td
|
|
202171
|
+
data-bind="amt"
|
|
202172
|
+
data-expr="data.amt.toLocaleString()"
|
|
202173
|
+
text-align="right"
|
|
202174
|
+
show-icon="true"
|
|
202175
|
+
icon-type="sphere"
|
|
202176
|
+
icon-color="data.amt >= 2000 ? 'red' : 'gray'"
|
|
202177
|
+
></td>
|
|
202178
|
+
<td data-bind="updateUser" text-align="center"></td>
|
|
202179
|
+
<td data-bind="docNm" text-align="left"></td>
|
|
202180
|
+
<td data-bind="insertUser" text-align="center"></td>
|
|
202181
|
+
<td data-bind="insertDt" text-align="center"></td>
|
|
202182
|
+
<td data-bind="updateDt" text-align="center"></td>
|
|
202183
|
+
</tr>
|
|
202184
|
+
</tbody>
|
|
202185
|
+
</table>
|
|
202186
|
+
</nine-grid>
|
|
202187
|
+
</div>
|
|
202188
|
+
</div>
|
|
202189
|
+
</div>
|
|
202190
|
+
);
|
|
202191
|
+
};
|
|
202192
|
+
|
|
202193
|
+
export default DocManager;
|
|
202194
|
+
`;
|
|
202195
|
+
|
|
202196
|
+
src1 = `
|
|
201852
202197
|
<tr>
|
|
201853
202198
|
<th>No.</th>
|
|
201854
202199
|
<th>문서ID</th>
|
|
@@ -201860,7 +202205,7 @@ class IdeAssi extends HTMLElement
|
|
|
201860
202205
|
<th>최종수정일</th>
|
|
201861
202206
|
</tr>
|
|
201862
202207
|
`;
|
|
201863
|
-
|
|
202208
|
+
src2 = `
|
|
201864
202209
|
<tr>
|
|
201865
202210
|
<th>No.</th>
|
|
201866
202211
|
<th>매출액</th>
|
|
@@ -201873,7 +202218,32 @@ class IdeAssi extends HTMLElement
|
|
|
201873
202218
|
</tr>
|
|
201874
202219
|
`;
|
|
201875
202220
|
|
|
201876
|
-
|
|
202221
|
+
src1 = `
|
|
202222
|
+
<tr>
|
|
202223
|
+
<th>No.</th>
|
|
202224
|
+
<th>문서ID</th>
|
|
202225
|
+
<th>매출액</th>
|
|
202226
|
+
<th>최종수정자</th>
|
|
202227
|
+
<th>문서명</th>
|
|
202228
|
+
<th>최초등록자</th>
|
|
202229
|
+
<th>최초등록일</th>
|
|
202230
|
+
<th>최종수정일</th>
|
|
202231
|
+
</tr>
|
|
202232
|
+
`;
|
|
202233
|
+
src2 = `
|
|
202234
|
+
<tr>
|
|
202235
|
+
<th>No.</th>
|
|
202236
|
+
<th>매출액</th>
|
|
202237
|
+
<th>최종수정자</th>
|
|
202238
|
+
<th>문서ID</th>
|
|
202239
|
+
<th>문서명</th>
|
|
202240
|
+
<th>최초등록자</th>
|
|
202241
|
+
<th>최초등록일</th>
|
|
202242
|
+
<th>최종수정일</th>
|
|
202243
|
+
</tr>
|
|
202244
|
+
`;
|
|
202245
|
+
|
|
202246
|
+
this.shadowRoot.querySelector("ide-diff-popup").popup(src1, src2);
|
|
201877
202247
|
|
|
201878
202248
|
return;
|
|
201879
202249
|
}
|
|
@@ -123,7 +123,7 @@ export class IdeAssi extends HTMLElement
|
|
|
123
123
|
this.shadowRoot.appendChild(document.createElement('ide-diff-popup'));
|
|
124
124
|
|
|
125
125
|
//setTimeout(() => {
|
|
126
|
-
|
|
126
|
+
let src1 = `
|
|
127
127
|
import React, { useRef, useEffect } from "react" adfa;
|
|
128
128
|
import { api, ai } from "ide-assi";
|
|
129
129
|
import ninegrid from "ninegrid2";
|
|
@@ -295,7 +295,7 @@ const DocManager = () => {
|
|
|
295
295
|
export default DocManager;
|
|
296
296
|
`;
|
|
297
297
|
|
|
298
|
-
|
|
298
|
+
let src2 = `
|
|
299
299
|
import React, { useRef, useEffect } from "react";
|
|
300
300
|
import { api, ai } from "ide-assi";
|
|
301
301
|
import ninegrid from "ninegrid2";
|
|
@@ -467,7 +467,7 @@ const DocManager = () => {
|
|
|
467
467
|
export default DocManager;
|
|
468
468
|
`;
|
|
469
469
|
|
|
470
|
-
|
|
470
|
+
src1 = `
|
|
471
471
|
<tr>
|
|
472
472
|
<th>No.</th>
|
|
473
473
|
<th>문서ID</th>
|
|
@@ -479,7 +479,7 @@ export default DocManager;
|
|
|
479
479
|
<th>최종수정일</th>
|
|
480
480
|
</tr>
|
|
481
481
|
`;
|
|
482
|
-
|
|
482
|
+
src2 = `
|
|
483
483
|
<tr>
|
|
484
484
|
<th>No.</th>
|
|
485
485
|
<th>매출액</th>
|
|
@@ -492,7 +492,32 @@ export default DocManager;
|
|
|
492
492
|
</tr>
|
|
493
493
|
`;
|
|
494
494
|
|
|
495
|
-
|
|
495
|
+
src1 = `
|
|
496
|
+
<tr>
|
|
497
|
+
<th>No.</th>
|
|
498
|
+
<th>문서ID</th>
|
|
499
|
+
<th>매출액</th>
|
|
500
|
+
<th>최종수정자</th>
|
|
501
|
+
<th>문서명</th>
|
|
502
|
+
<th>최초등록자</th>
|
|
503
|
+
<th>최초등록일</th>
|
|
504
|
+
<th>최종수정일</th>
|
|
505
|
+
</tr>
|
|
506
|
+
`;
|
|
507
|
+
src2 = `
|
|
508
|
+
<tr>
|
|
509
|
+
<th>No.</th>
|
|
510
|
+
<th>매출액</th>
|
|
511
|
+
<th>최종수정자</th>
|
|
512
|
+
<th>문서ID</th>
|
|
513
|
+
<th>문서명</th>
|
|
514
|
+
<th>최초등록자</th>
|
|
515
|
+
<th>최초등록일</th>
|
|
516
|
+
<th>최종수정일</th>
|
|
517
|
+
</tr>
|
|
518
|
+
`;
|
|
519
|
+
|
|
520
|
+
this.shadowRoot.querySelector("ide-diff-popup").popup(src1, src2);
|
|
496
521
|
|
|
497
522
|
return;
|
|
498
523
|
|
package/package.json
CHANGED
|
@@ -123,7 +123,7 @@ export class IdeAssi extends HTMLElement
|
|
|
123
123
|
this.shadowRoot.appendChild(document.createElement('ide-diff-popup'));
|
|
124
124
|
|
|
125
125
|
//setTimeout(() => {
|
|
126
|
-
|
|
126
|
+
let src1 = `
|
|
127
127
|
import React, { useRef, useEffect } from "react" adfa;
|
|
128
128
|
import { api, ai } from "ide-assi";
|
|
129
129
|
import ninegrid from "ninegrid2";
|
|
@@ -295,7 +295,7 @@ const DocManager = () => {
|
|
|
295
295
|
export default DocManager;
|
|
296
296
|
`;
|
|
297
297
|
|
|
298
|
-
|
|
298
|
+
let src2 = `
|
|
299
299
|
import React, { useRef, useEffect } from "react";
|
|
300
300
|
import { api, ai } from "ide-assi";
|
|
301
301
|
import ninegrid from "ninegrid2";
|
|
@@ -467,7 +467,7 @@ const DocManager = () => {
|
|
|
467
467
|
export default DocManager;
|
|
468
468
|
`;
|
|
469
469
|
|
|
470
|
-
|
|
470
|
+
src1 = `
|
|
471
471
|
<tr>
|
|
472
472
|
<th>No.</th>
|
|
473
473
|
<th>문서ID</th>
|
|
@@ -479,7 +479,7 @@ export default DocManager;
|
|
|
479
479
|
<th>최종수정일</th>
|
|
480
480
|
</tr>
|
|
481
481
|
`;
|
|
482
|
-
|
|
482
|
+
src2 = `
|
|
483
483
|
<tr>
|
|
484
484
|
<th>No.</th>
|
|
485
485
|
<th>매출액</th>
|
|
@@ -492,7 +492,32 @@ export default DocManager;
|
|
|
492
492
|
</tr>
|
|
493
493
|
`;
|
|
494
494
|
|
|
495
|
-
|
|
495
|
+
src1 = `
|
|
496
|
+
<tr>
|
|
497
|
+
<th>No.</th>
|
|
498
|
+
<th>문서ID</th>
|
|
499
|
+
<th>매출액</th>
|
|
500
|
+
<th>최종수정자</th>
|
|
501
|
+
<th>문서명</th>
|
|
502
|
+
<th>최초등록자</th>
|
|
503
|
+
<th>최초등록일</th>
|
|
504
|
+
<th>최종수정일</th>
|
|
505
|
+
</tr>
|
|
506
|
+
`;
|
|
507
|
+
src2 = `
|
|
508
|
+
<tr>
|
|
509
|
+
<th>No.</th>
|
|
510
|
+
<th>매출액</th>
|
|
511
|
+
<th>최종수정자</th>
|
|
512
|
+
<th>문서ID</th>
|
|
513
|
+
<th>문서명</th>
|
|
514
|
+
<th>최초등록자</th>
|
|
515
|
+
<th>최초등록일</th>
|
|
516
|
+
<th>최종수정일</th>
|
|
517
|
+
</tr>
|
|
518
|
+
`;
|
|
519
|
+
|
|
520
|
+
this.shadowRoot.querySelector("ide-diff-popup").popup(src1, src2);
|
|
496
521
|
|
|
497
522
|
return;
|
|
498
523
|
|