ide-assi 0.377.0 → 0.379.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 +352 -9
- package/dist/bundle.esm.js +352 -9
- package/dist/components/ideAssi.js +1 -1
- package/dist/components/ideDiff.js +5 -4
- package/package.json +1 -1
- package/src/components/ideAssi.js +1 -1
- package/src/components/ideDiff.js +5 -4
package/dist/bundle.cjs.js
CHANGED
|
@@ -201852,10 +201852,352 @@ class IdeAssi extends HTMLElement
|
|
|
201852
201852
|
|
|
201853
201853
|
this.shadowRoot.appendChild(document.createElement('ide-diff-popup'));
|
|
201854
201854
|
|
|
201855
|
-
|
|
201856
|
-
const
|
|
201855
|
+
//setTimeout(() => {
|
|
201856
|
+
const src1 = `
|
|
201857
|
+
import React, { useRef, useEffect } from "react";
|
|
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
|
+
};
|
|
201857
201872
|
|
|
201858
|
-
|
|
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
|
+
const 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
|
+
this.shadowRoot.querySelector("ide-diff-popup").popup(src1, src2);
|
|
201859
202201
|
|
|
201860
202202
|
return;
|
|
201861
202203
|
}
|
|
@@ -234435,7 +234777,7 @@ function requireDiffMatchPatch () {
|
|
|
234435
234777
|
var diffMatchPatchExports = requireDiffMatchPatch();
|
|
234436
234778
|
|
|
234437
234779
|
// Diff 데코레이션을 위한 StateField 정의 (변동 없음)
|
|
234438
|
-
|
|
234780
|
+
StateField.define({
|
|
234439
234781
|
create() { return Decoration.none; },
|
|
234440
234782
|
update(decorations, tr) {
|
|
234441
234783
|
return tr.effects.reduce((currentDecos, effect) => {
|
|
@@ -234448,7 +234790,7 @@ const asisDiffDecorations = StateField.define({
|
|
|
234448
234790
|
provide: f => EditorView.decorations.from(f)
|
|
234449
234791
|
});
|
|
234450
234792
|
|
|
234451
|
-
|
|
234793
|
+
StateField.define({
|
|
234452
234794
|
create() { return Decoration.none; },
|
|
234453
234795
|
update(decorations, tr) {
|
|
234454
234796
|
return tr.effects.reduce((currentDecos, effect) => {
|
|
@@ -234545,7 +234887,7 @@ class IdeDiff extends HTMLElement {
|
|
|
234545
234887
|
javascript(),
|
|
234546
234888
|
EditorState.readOnly.of(true),
|
|
234547
234889
|
this.#languageCompartment.of(javascript()),
|
|
234548
|
-
asisDiffDecorations,
|
|
234890
|
+
//asisDiffDecorations,
|
|
234549
234891
|
// ⭐️ updateListener는 유지: 뷰가 DOM에 완전히 렌더링될 때까지 기다림
|
|
234550
234892
|
EditorView.updateListener.of((update) => {
|
|
234551
234893
|
if (update.view.contentDOM.firstChild && !update.view._initialAsisContentLoaded) {
|
|
@@ -234567,7 +234909,7 @@ class IdeDiff extends HTMLElement {
|
|
|
234567
234909
|
javascript(),
|
|
234568
234910
|
EditorState.readOnly.of(true),
|
|
234569
234911
|
this.#languageCompartment.of(javascript()),
|
|
234570
|
-
tobeDiffDecorations,
|
|
234912
|
+
//tobeDiffDecorations,
|
|
234571
234913
|
// ⭐️ updateListener는 유지: 뷰가 DOM에 완전히 렌더링될 때까지 기다림
|
|
234572
234914
|
EditorView.updateListener.of((update) => {
|
|
234573
234915
|
if (update.view.contentDOM.firstChild && !update.view._initialTobeContentLoaded) {
|
|
@@ -234756,7 +235098,7 @@ class IdeDiff extends HTMLElement {
|
|
|
234756
235098
|
}
|
|
234757
235099
|
|
|
234758
235100
|
// 데코레이션 효과는 미리 계산해 둡니다.
|
|
234759
|
-
const { asisEffect, tobeEffect } = this.#applyDiffDecorations(src1, src2);
|
|
235101
|
+
//const { asisEffect, tobeEffect } = this.#applyDiffDecorations(src1, src2);
|
|
234760
235102
|
|
|
234761
235103
|
// 1단계: 텍스트 내용 변경과 언어 확장을 먼저 디스패치합니다.
|
|
234762
235104
|
// 'to' 값을 현재 문서 길이 전체로 지정하여 정확한 교체를 보장합니다.
|
|
@@ -234774,6 +235116,7 @@ class IdeDiff extends HTMLElement {
|
|
|
234774
235116
|
]
|
|
234775
235117
|
});
|
|
234776
235118
|
|
|
235119
|
+
/**
|
|
234777
235120
|
// ⭐️ 2단계: 텍스트 및 언어 변경이 완전히 적용되고 뷰가 안정화될 시간을 줍니다.
|
|
234778
235121
|
// 다음 프레임에서 데코레이션 효과만 별도로 디스패치합니다.
|
|
234779
235122
|
requestAnimationFrame(() => {
|
|
@@ -234792,7 +235135,7 @@ class IdeDiff extends HTMLElement {
|
|
|
234792
235135
|
// this.#asisEditorView.scrollDOM.scrollTop = 0;
|
|
234793
235136
|
// this.#tobeEditorView.scrollDOM.scrollTop = 0;
|
|
234794
235137
|
});
|
|
234795
|
-
});
|
|
235138
|
+
}); */
|
|
234796
235139
|
};
|
|
234797
235140
|
|
|
234798
235141
|
disconnectedCallback() {
|
package/dist/bundle.esm.js
CHANGED
|
@@ -201848,10 +201848,352 @@ class IdeAssi extends HTMLElement
|
|
|
201848
201848
|
|
|
201849
201849
|
this.shadowRoot.appendChild(document.createElement('ide-diff-popup'));
|
|
201850
201850
|
|
|
201851
|
-
|
|
201852
|
-
const
|
|
201851
|
+
//setTimeout(() => {
|
|
201852
|
+
const src1 = `
|
|
201853
|
+
import React, { useRef, useEffect } from "react";
|
|
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
|
+
};
|
|
201853
201868
|
|
|
201854
|
-
|
|
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
|
+
const 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
|
+
this.shadowRoot.querySelector("ide-diff-popup").popup(src1, src2);
|
|
201855
202197
|
|
|
201856
202198
|
return;
|
|
201857
202199
|
}
|
|
@@ -234431,7 +234773,7 @@ function requireDiffMatchPatch () {
|
|
|
234431
234773
|
var diffMatchPatchExports = requireDiffMatchPatch();
|
|
234432
234774
|
|
|
234433
234775
|
// Diff 데코레이션을 위한 StateField 정의 (변동 없음)
|
|
234434
|
-
|
|
234776
|
+
StateField.define({
|
|
234435
234777
|
create() { return Decoration.none; },
|
|
234436
234778
|
update(decorations, tr) {
|
|
234437
234779
|
return tr.effects.reduce((currentDecos, effect) => {
|
|
@@ -234444,7 +234786,7 @@ const asisDiffDecorations = StateField.define({
|
|
|
234444
234786
|
provide: f => EditorView.decorations.from(f)
|
|
234445
234787
|
});
|
|
234446
234788
|
|
|
234447
|
-
|
|
234789
|
+
StateField.define({
|
|
234448
234790
|
create() { return Decoration.none; },
|
|
234449
234791
|
update(decorations, tr) {
|
|
234450
234792
|
return tr.effects.reduce((currentDecos, effect) => {
|
|
@@ -234541,7 +234883,7 @@ class IdeDiff extends HTMLElement {
|
|
|
234541
234883
|
javascript(),
|
|
234542
234884
|
EditorState.readOnly.of(true),
|
|
234543
234885
|
this.#languageCompartment.of(javascript()),
|
|
234544
|
-
asisDiffDecorations,
|
|
234886
|
+
//asisDiffDecorations,
|
|
234545
234887
|
// ⭐️ updateListener는 유지: 뷰가 DOM에 완전히 렌더링될 때까지 기다림
|
|
234546
234888
|
EditorView.updateListener.of((update) => {
|
|
234547
234889
|
if (update.view.contentDOM.firstChild && !update.view._initialAsisContentLoaded) {
|
|
@@ -234563,7 +234905,7 @@ class IdeDiff extends HTMLElement {
|
|
|
234563
234905
|
javascript(),
|
|
234564
234906
|
EditorState.readOnly.of(true),
|
|
234565
234907
|
this.#languageCompartment.of(javascript()),
|
|
234566
|
-
tobeDiffDecorations,
|
|
234908
|
+
//tobeDiffDecorations,
|
|
234567
234909
|
// ⭐️ updateListener는 유지: 뷰가 DOM에 완전히 렌더링될 때까지 기다림
|
|
234568
234910
|
EditorView.updateListener.of((update) => {
|
|
234569
234911
|
if (update.view.contentDOM.firstChild && !update.view._initialTobeContentLoaded) {
|
|
@@ -234752,7 +235094,7 @@ class IdeDiff extends HTMLElement {
|
|
|
234752
235094
|
}
|
|
234753
235095
|
|
|
234754
235096
|
// 데코레이션 효과는 미리 계산해 둡니다.
|
|
234755
|
-
const { asisEffect, tobeEffect } = this.#applyDiffDecorations(src1, src2);
|
|
235097
|
+
//const { asisEffect, tobeEffect } = this.#applyDiffDecorations(src1, src2);
|
|
234756
235098
|
|
|
234757
235099
|
// 1단계: 텍스트 내용 변경과 언어 확장을 먼저 디스패치합니다.
|
|
234758
235100
|
// 'to' 값을 현재 문서 길이 전체로 지정하여 정확한 교체를 보장합니다.
|
|
@@ -234770,6 +235112,7 @@ class IdeDiff extends HTMLElement {
|
|
|
234770
235112
|
]
|
|
234771
235113
|
});
|
|
234772
235114
|
|
|
235115
|
+
/**
|
|
234773
235116
|
// ⭐️ 2단계: 텍스트 및 언어 변경이 완전히 적용되고 뷰가 안정화될 시간을 줍니다.
|
|
234774
235117
|
// 다음 프레임에서 데코레이션 효과만 별도로 디스패치합니다.
|
|
234775
235118
|
requestAnimationFrame(() => {
|
|
@@ -234788,7 +235131,7 @@ class IdeDiff extends HTMLElement {
|
|
|
234788
235131
|
// this.#asisEditorView.scrollDOM.scrollTop = 0;
|
|
234789
235132
|
// this.#tobeEditorView.scrollDOM.scrollTop = 0;
|
|
234790
235133
|
});
|
|
234791
|
-
});
|
|
235134
|
+
}); */
|
|
234792
235135
|
};
|
|
234793
235136
|
|
|
234794
235137
|
disconnectedCallback() {
|
|
@@ -470,7 +470,7 @@ export default DocManager;
|
|
|
470
470
|
const src3 = 'asdfa asdfadf asdfa asdfadf';
|
|
471
471
|
const src4 = '111 asdfadf asdfa asdfadf';
|
|
472
472
|
|
|
473
|
-
this.shadowRoot.querySelector("ide-diff-popup").popup(
|
|
473
|
+
this.shadowRoot.querySelector("ide-diff-popup").popup(src1, src2);
|
|
474
474
|
|
|
475
475
|
return;
|
|
476
476
|
|
|
@@ -135,7 +135,7 @@ export class IdeDiff extends HTMLElement {
|
|
|
135
135
|
javascript(),
|
|
136
136
|
EditorState.readOnly.of(true),
|
|
137
137
|
this.#languageCompartment.of(javascript()),
|
|
138
|
-
asisDiffDecorations,
|
|
138
|
+
//asisDiffDecorations,
|
|
139
139
|
// ⭐️ updateListener는 유지: 뷰가 DOM에 완전히 렌더링될 때까지 기다림
|
|
140
140
|
EditorView.updateListener.of((update) => {
|
|
141
141
|
if (update.view.contentDOM.firstChild && !update.view._initialAsisContentLoaded) {
|
|
@@ -157,7 +157,7 @@ export class IdeDiff extends HTMLElement {
|
|
|
157
157
|
javascript(),
|
|
158
158
|
EditorState.readOnly.of(true),
|
|
159
159
|
this.#languageCompartment.of(javascript()),
|
|
160
|
-
tobeDiffDecorations,
|
|
160
|
+
//tobeDiffDecorations,
|
|
161
161
|
// ⭐️ updateListener는 유지: 뷰가 DOM에 완전히 렌더링될 때까지 기다림
|
|
162
162
|
EditorView.updateListener.of((update) => {
|
|
163
163
|
if (update.view.contentDOM.firstChild && !update.view._initialTobeContentLoaded) {
|
|
@@ -346,7 +346,7 @@ export class IdeDiff extends HTMLElement {
|
|
|
346
346
|
}
|
|
347
347
|
|
|
348
348
|
// 데코레이션 효과는 미리 계산해 둡니다.
|
|
349
|
-
const { asisEffect, tobeEffect } = this.#applyDiffDecorations(src1, src2);
|
|
349
|
+
//const { asisEffect, tobeEffect } = this.#applyDiffDecorations(src1, src2);
|
|
350
350
|
|
|
351
351
|
// 1단계: 텍스트 내용 변경과 언어 확장을 먼저 디스패치합니다.
|
|
352
352
|
// 'to' 값을 현재 문서 길이 전체로 지정하여 정확한 교체를 보장합니다.
|
|
@@ -364,6 +364,7 @@ export class IdeDiff extends HTMLElement {
|
|
|
364
364
|
]
|
|
365
365
|
});
|
|
366
366
|
|
|
367
|
+
/**
|
|
367
368
|
// ⭐️ 2단계: 텍스트 및 언어 변경이 완전히 적용되고 뷰가 안정화될 시간을 줍니다.
|
|
368
369
|
// 다음 프레임에서 데코레이션 효과만 별도로 디스패치합니다.
|
|
369
370
|
requestAnimationFrame(() => {
|
|
@@ -382,7 +383,7 @@ export class IdeDiff extends HTMLElement {
|
|
|
382
383
|
// this.#asisEditorView.scrollDOM.scrollTop = 0;
|
|
383
384
|
// this.#tobeEditorView.scrollDOM.scrollTop = 0;
|
|
384
385
|
});
|
|
385
|
-
});
|
|
386
|
+
}); */
|
|
386
387
|
};
|
|
387
388
|
|
|
388
389
|
disconnectedCallback() {
|
package/package.json
CHANGED
|
@@ -470,7 +470,7 @@ export default DocManager;
|
|
|
470
470
|
const src3 = 'asdfa asdfadf asdfa asdfadf';
|
|
471
471
|
const src4 = '111 asdfadf asdfa asdfadf';
|
|
472
472
|
|
|
473
|
-
this.shadowRoot.querySelector("ide-diff-popup").popup(
|
|
473
|
+
this.shadowRoot.querySelector("ide-diff-popup").popup(src1, src2);
|
|
474
474
|
|
|
475
475
|
return;
|
|
476
476
|
|
|
@@ -135,7 +135,7 @@ export class IdeDiff extends HTMLElement {
|
|
|
135
135
|
javascript(),
|
|
136
136
|
EditorState.readOnly.of(true),
|
|
137
137
|
this.#languageCompartment.of(javascript()),
|
|
138
|
-
asisDiffDecorations,
|
|
138
|
+
//asisDiffDecorations,
|
|
139
139
|
// ⭐️ updateListener는 유지: 뷰가 DOM에 완전히 렌더링될 때까지 기다림
|
|
140
140
|
EditorView.updateListener.of((update) => {
|
|
141
141
|
if (update.view.contentDOM.firstChild && !update.view._initialAsisContentLoaded) {
|
|
@@ -157,7 +157,7 @@ export class IdeDiff extends HTMLElement {
|
|
|
157
157
|
javascript(),
|
|
158
158
|
EditorState.readOnly.of(true),
|
|
159
159
|
this.#languageCompartment.of(javascript()),
|
|
160
|
-
tobeDiffDecorations,
|
|
160
|
+
//tobeDiffDecorations,
|
|
161
161
|
// ⭐️ updateListener는 유지: 뷰가 DOM에 완전히 렌더링될 때까지 기다림
|
|
162
162
|
EditorView.updateListener.of((update) => {
|
|
163
163
|
if (update.view.contentDOM.firstChild && !update.view._initialTobeContentLoaded) {
|
|
@@ -346,7 +346,7 @@ export class IdeDiff extends HTMLElement {
|
|
|
346
346
|
}
|
|
347
347
|
|
|
348
348
|
// 데코레이션 효과는 미리 계산해 둡니다.
|
|
349
|
-
const { asisEffect, tobeEffect } = this.#applyDiffDecorations(src1, src2);
|
|
349
|
+
//const { asisEffect, tobeEffect } = this.#applyDiffDecorations(src1, src2);
|
|
350
350
|
|
|
351
351
|
// 1단계: 텍스트 내용 변경과 언어 확장을 먼저 디스패치합니다.
|
|
352
352
|
// 'to' 값을 현재 문서 길이 전체로 지정하여 정확한 교체를 보장합니다.
|
|
@@ -364,6 +364,7 @@ export class IdeDiff extends HTMLElement {
|
|
|
364
364
|
]
|
|
365
365
|
});
|
|
366
366
|
|
|
367
|
+
/**
|
|
367
368
|
// ⭐️ 2단계: 텍스트 및 언어 변경이 완전히 적용되고 뷰가 안정화될 시간을 줍니다.
|
|
368
369
|
// 다음 프레임에서 데코레이션 효과만 별도로 디스패치합니다.
|
|
369
370
|
requestAnimationFrame(() => {
|
|
@@ -382,7 +383,7 @@ export class IdeDiff extends HTMLElement {
|
|
|
382
383
|
// this.#asisEditorView.scrollDOM.scrollTop = 0;
|
|
383
384
|
// this.#tobeEditorView.scrollDOM.scrollTop = 0;
|
|
384
385
|
});
|
|
385
|
-
});
|
|
386
|
+
}); */
|
|
386
387
|
};
|
|
387
388
|
|
|
388
389
|
disconnectedCallback() {
|