ide-assi 0.479.0 → 0.482.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -121046,8 +121046,20 @@ class nxTab extends HTMLElement {
121046
121046
  //this.shadowRoot.querySelector('.tab-pages').style.height = this.shadowRoot.querySelector('.tab-page').style.height;
121047
121047
 
121048
121048
  this.switchTabHandler = this.#switchTab.bind(this);
121049
+
121050
+
121051
+ this.tappage = {
121052
+ hide: (v) => {
121053
+ this.shadowRoot.querySelectorAll(".tab-button").forEach((el, i) => {
121054
+ if (el.innerText.trim() === v) {
121055
+ el.style.display = "none";
121056
+ }
121057
+ });
121058
+ }
121059
+ };
121049
121060
  }
121050
121061
 
121062
+
121051
121063
  connectedCallback() {
121052
121064
  this.#init();
121053
121065
  this.dispatchEvent(new CustomEvent(ninegrid.EVENT.TAB_LOAD, { bubbles: true, detail: {} }));
@@ -121870,9 +121882,11 @@ class aiMyMessage extends HTMLElement
121870
121882
  }
121871
121883
 
121872
121884
  // aiProgressMessage 클래스 정의
121885
+ // aiProgressMessage 클래스 정의 수정
121873
121886
  class aiProgressMessage extends HTMLElement {
121874
- #progressData = []; // 진행 상태 데이터를 저장할 배열
121875
- #progressElements = new Map(); // 각 진행 단계의 DOM 요소를 저장할 Map
121887
+ #progressData = [];
121888
+ #progressElements = new Map();
121889
+ #animationIntervals = new Map();
121876
121890
 
121877
121891
  constructor() {
121878
121892
  super();
@@ -121893,11 +121907,18 @@ class aiProgressMessage extends HTMLElement {
121893
121907
 
121894
121908
  /**
121895
121909
  * 진행 상태 데이터를 초기화하고 화면에 표시합니다.
121896
- * @param {Array<Object>} data - [{id: 'step1', message: '분석중입니다...', completedMessage: '분석이 완료되었습니다.'}, ...]
121910
+ * @param {Array<Object>} data - [{id: 'step1', message: '분석중입니다.', completedMessage: '분석이 완료되었습니다.'}, ...]
121897
121911
  */
121898
121912
  initialize(data) {
121899
- this.#progressData = data.map(item => ({ ...item, status: 'pending' })); // 초기 상태는 'pending'
121900
- this.#renderProgress();
121913
+ this.#progressData = data.map(item => ({
121914
+ ...item,
121915
+ status: 'pending',
121916
+ originalMessage: item.message
121917
+ }));
121918
+ setTimeout(() => {
121919
+ this.#renderProgress(); // 초기 렌더링 시 현재 진행 단계를 활성화
121920
+ this.#updateCurrentActiveProgress(); // 초기 활성 단계 설정
121921
+ }, 300);
121901
121922
  }
121902
121923
 
121903
121924
  /**
@@ -121908,37 +121929,101 @@ class aiProgressMessage extends HTMLElement {
121908
121929
  updateProgress(id, status) {
121909
121930
  const itemIndex = this.#progressData.findIndex(item => item.id === id);
121910
121931
  if (itemIndex > -1) {
121911
- this.#progressData[itemIndex].status = status;
121912
- this.#updateProgressItem(this.#progressData[itemIndex]);
121932
+ if (this.#progressData[itemIndex].status !== status) {
121933
+ this.#progressData[itemIndex].status = status;
121934
+ this.#updateProgressItem(this.#progressData[itemIndex]); // 개별 항목 업데이트
121935
+ this.#updateCurrentActiveProgress(); // 활성 진행 단계 재설정
121936
+ }
121913
121937
  }
121914
121938
  }
121915
121939
 
121940
+ // 현재 진행 중인 첫 번째 pending 항목을 찾아 'active' 상태로 만들고 애니메이션 시작
121941
+ // 이전에 active였던 항목의 애니메이션은 중지
121942
+ #updateCurrentActiveProgress() {
121943
+ let foundActive = false;
121944
+ this.#progressData.forEach(item => {
121945
+ const li = this.#progressElements.get(item.id);
121946
+ if (!li) return; // 요소가 아직 렌더링되지 않았으면 스킵
121947
+
121948
+ // 모든 항목에서 'active' 클래스 제거 및 애니메이션 중지
121949
+ li.classList.remove('active');
121950
+ if (this.#animationIntervals.has(item.id)) {
121951
+ clearInterval(this.#animationIntervals.get(item.id));
121952
+ this.#animationIntervals.delete(item.id);
121953
+ li.querySelector(".animated-dots").textContent = ''; // 점 제거
121954
+ }
121955
+
121956
+ // 첫 번째 pending 항목을 찾으면 'active'로 설정하고 애니메이션 시작
121957
+ if (item.status === 'pending' && !foundActive) {
121958
+ li.classList.add('active');
121959
+ this.#startAnimation(item);
121960
+ foundActive = true;
121961
+ }
121962
+ });
121963
+ }
121964
+
121916
121965
  #renderProgress() {
121917
121966
  const progressList = this.shadowRoot.querySelector(".progress-list");
121918
- progressList.innerHTML = ''; // 기존 목록 초기화
121919
- this.#progressElements.clear(); // 기존 요소 Map 초기화
121967
+ progressList.innerHTML = '';
121968
+ this.#progressElements.clear();
121969
+ this.#animationIntervals.forEach(intervalId => clearInterval(intervalId));
121970
+ this.#animationIntervals.clear();
121920
121971
 
121921
121972
  this.#progressData.forEach((item, index) => {
121922
121973
  const li = document.createElement("li");
121923
121974
  li.setAttribute("data-id", item.id);
121924
- li.classList.add("progress-item", item.status);
121975
+ li.classList.add("progress-item");
121925
121976
  li.innerHTML = `
121926
- <span class="icon"></span>
121927
- <span class="text">${item.message}</span>
121977
+ <span class="step-number">${index + 1}.</span>
121978
+ <span class="text">${item.originalMessage}</span>
121979
+ <span class="animated-dots"></span>
121928
121980
  `;
121929
121981
  progressList.appendChild(li);
121930
- this.#progressElements.set(item.id, li); // DOM 요소 참조 저장
121982
+ this.#progressElements.set(item.id, li);
121983
+ // 초기 렌더링 시에는 'active' 상태는 `#updateCurrentActiveProgress`에서 처리
121984
+ this.#updateProgressItemVisuals(item); // 텍스트만 업데이트
121931
121985
  });
121932
121986
  }
121933
121987
 
121934
- #updateProgressItem(item) {
121988
+ // 항목의 시각적 상태(텍스트, 완료 체크) 업데이트
121989
+ #updateProgressItemVisuals(item) {
121935
121990
  const li = this.#progressElements.get(item.id);
121936
121991
  if (li) {
121937
- li.classList.remove('pending', 'completed'); // 기존 클래스 제거
121938
- li.classList.add(item.status); // 새 상태 클래스 추가
121939
- li.querySelector(".text").textContent = item.status === 'completed' ? item.completedMessage : item.message;
121992
+ li.classList.remove('pending', 'completed');
121993
+ li.classList.add(item.status);
121994
+
121995
+ const textSpan = li.querySelector(".text");
121996
+ const dotsSpan = li.querySelector(".animated-dots");
121997
+
121998
+ if (item.status === 'completed') {
121999
+ textSpan.textContent = item.completedMessage;
122000
+ dotsSpan.textContent = ''; // 완료 시 점 제거
122001
+ } else { // pending 상태
122002
+ textSpan.textContent = item.originalMessage;
122003
+ // pending이지만 active가 아닌 경우 점 없음 (CSS의 role)
122004
+ }
121940
122005
  }
121941
122006
  }
122007
+
122008
+ // 점 애니메이션 시작 함수
122009
+ #startAnimation(item) {
122010
+ const li = this.#progressElements.get(item.id);
122011
+ if (li) {
122012
+ const dotsSpan = li.querySelector(".animated-dots");
122013
+ let dotsCount = 0;
122014
+ const intervalId = setInterval(() => {
122015
+ dotsCount = (dotsCount + 1) % 4; // 0, 1, 2, 3 반복
122016
+ dotsSpan.textContent = '.'.repeat(dotsCount);
122017
+ }, 300);
122018
+ this.#animationIntervals.set(item.id, intervalId);
122019
+ }
122020
+ }
122021
+
122022
+ // 개별 항목의 상태 업데이트 (텍스트 변경, 클래스 추가/제거)
122023
+ // 애니메이션 시작/중지는 `#updateCurrentActiveProgress`에서 담당
122024
+ #updateProgressItem(item) {
122025
+ this.#updateProgressItemVisuals(item); // 텍스트와 클래스 업데이트
122026
+ }
121942
122027
  }
121943
122028
 
121944
122029
 
@@ -202774,11 +202859,10 @@ class IdeDiffPopup extends HTMLElement
202774
202859
 
202775
202860
  this.shadowRoot.innerHTML = `
202776
202861
  <style>
202777
-
202778
202862
  </style>
202779
202863
 
202780
202864
  <nx-dialog>
202781
- <nx-tab theme="theme-4" ref={tabRef}>
202865
+ <nx-tab theme="theme-4">
202782
202866
  <nx-tab-page caption="mybatis">
202783
202867
  <ide-diff class="mybatis"></ide-diff>
202784
202868
  </nx-tab-page>
@@ -202797,18 +202881,10 @@ class IdeDiffPopup extends HTMLElement
202797
202881
  }
202798
202882
 
202799
202883
  popup = (chagedSource) => {
202800
-
202801
- console.log(chagedSource);
202802
-
202803
-
202804
202884
  setTimeout(() => {
202805
202885
  for (const item of chagedSource) {
202806
202886
  const [type, diffData] = Object.entries(item)[0]; // 예: type = "mybatis", diffData = { asis, tobe }
202807
-
202808
- console.log(type, diffData);
202809
-
202810
202887
  const diff = ninegrid.querySelector(`ide-diff.${type}`, this.shadowRoot);
202811
- console.log(diff);
202812
202888
  if (!diff) continue;
202813
202889
 
202814
202890
  diff.initialize(
@@ -202819,9 +202895,9 @@ class IdeDiffPopup extends HTMLElement
202819
202895
  }
202820
202896
 
202821
202897
  this.shadowRoot.querySelector('nx-dialog')?.showModal();
202822
- }, 800);
202823
-
202824
202898
 
202899
+ this.shadowRoot.querySelector('nx-tab').tabpage.hide("mybatis");
202900
+ }, 100);
202825
202901
  };
202826
202902
  }
202827
202903
 
@@ -121042,8 +121042,20 @@ class nxTab extends HTMLElement {
121042
121042
  //this.shadowRoot.querySelector('.tab-pages').style.height = this.shadowRoot.querySelector('.tab-page').style.height;
121043
121043
 
121044
121044
  this.switchTabHandler = this.#switchTab.bind(this);
121045
+
121046
+
121047
+ this.tappage = {
121048
+ hide: (v) => {
121049
+ this.shadowRoot.querySelectorAll(".tab-button").forEach((el, i) => {
121050
+ if (el.innerText.trim() === v) {
121051
+ el.style.display = "none";
121052
+ }
121053
+ });
121054
+ }
121055
+ };
121045
121056
  }
121046
121057
 
121058
+
121047
121059
  connectedCallback() {
121048
121060
  this.#init();
121049
121061
  this.dispatchEvent(new CustomEvent(ninegrid.EVENT.TAB_LOAD, { bubbles: true, detail: {} }));
@@ -121866,9 +121878,11 @@ class aiMyMessage extends HTMLElement
121866
121878
  }
121867
121879
 
121868
121880
  // aiProgressMessage 클래스 정의
121881
+ // aiProgressMessage 클래스 정의 수정
121869
121882
  class aiProgressMessage extends HTMLElement {
121870
- #progressData = []; // 진행 상태 데이터를 저장할 배열
121871
- #progressElements = new Map(); // 각 진행 단계의 DOM 요소를 저장할 Map
121883
+ #progressData = [];
121884
+ #progressElements = new Map();
121885
+ #animationIntervals = new Map();
121872
121886
 
121873
121887
  constructor() {
121874
121888
  super();
@@ -121889,11 +121903,18 @@ class aiProgressMessage extends HTMLElement {
121889
121903
 
121890
121904
  /**
121891
121905
  * 진행 상태 데이터를 초기화하고 화면에 표시합니다.
121892
- * @param {Array<Object>} data - [{id: 'step1', message: '분석중입니다...', completedMessage: '분석이 완료되었습니다.'}, ...]
121906
+ * @param {Array<Object>} data - [{id: 'step1', message: '분석중입니다.', completedMessage: '분석이 완료되었습니다.'}, ...]
121893
121907
  */
121894
121908
  initialize(data) {
121895
- this.#progressData = data.map(item => ({ ...item, status: 'pending' })); // 초기 상태는 'pending'
121896
- this.#renderProgress();
121909
+ this.#progressData = data.map(item => ({
121910
+ ...item,
121911
+ status: 'pending',
121912
+ originalMessage: item.message
121913
+ }));
121914
+ setTimeout(() => {
121915
+ this.#renderProgress(); // 초기 렌더링 시 현재 진행 단계를 활성화
121916
+ this.#updateCurrentActiveProgress(); // 초기 활성 단계 설정
121917
+ }, 300);
121897
121918
  }
121898
121919
 
121899
121920
  /**
@@ -121904,37 +121925,101 @@ class aiProgressMessage extends HTMLElement {
121904
121925
  updateProgress(id, status) {
121905
121926
  const itemIndex = this.#progressData.findIndex(item => item.id === id);
121906
121927
  if (itemIndex > -1) {
121907
- this.#progressData[itemIndex].status = status;
121908
- this.#updateProgressItem(this.#progressData[itemIndex]);
121928
+ if (this.#progressData[itemIndex].status !== status) {
121929
+ this.#progressData[itemIndex].status = status;
121930
+ this.#updateProgressItem(this.#progressData[itemIndex]); // 개별 항목 업데이트
121931
+ this.#updateCurrentActiveProgress(); // 활성 진행 단계 재설정
121932
+ }
121909
121933
  }
121910
121934
  }
121911
121935
 
121936
+ // 현재 진행 중인 첫 번째 pending 항목을 찾아 'active' 상태로 만들고 애니메이션 시작
121937
+ // 이전에 active였던 항목의 애니메이션은 중지
121938
+ #updateCurrentActiveProgress() {
121939
+ let foundActive = false;
121940
+ this.#progressData.forEach(item => {
121941
+ const li = this.#progressElements.get(item.id);
121942
+ if (!li) return; // 요소가 아직 렌더링되지 않았으면 스킵
121943
+
121944
+ // 모든 항목에서 'active' 클래스 제거 및 애니메이션 중지
121945
+ li.classList.remove('active');
121946
+ if (this.#animationIntervals.has(item.id)) {
121947
+ clearInterval(this.#animationIntervals.get(item.id));
121948
+ this.#animationIntervals.delete(item.id);
121949
+ li.querySelector(".animated-dots").textContent = ''; // 점 제거
121950
+ }
121951
+
121952
+ // 첫 번째 pending 항목을 찾으면 'active'로 설정하고 애니메이션 시작
121953
+ if (item.status === 'pending' && !foundActive) {
121954
+ li.classList.add('active');
121955
+ this.#startAnimation(item);
121956
+ foundActive = true;
121957
+ }
121958
+ });
121959
+ }
121960
+
121912
121961
  #renderProgress() {
121913
121962
  const progressList = this.shadowRoot.querySelector(".progress-list");
121914
- progressList.innerHTML = ''; // 기존 목록 초기화
121915
- this.#progressElements.clear(); // 기존 요소 Map 초기화
121963
+ progressList.innerHTML = '';
121964
+ this.#progressElements.clear();
121965
+ this.#animationIntervals.forEach(intervalId => clearInterval(intervalId));
121966
+ this.#animationIntervals.clear();
121916
121967
 
121917
121968
  this.#progressData.forEach((item, index) => {
121918
121969
  const li = document.createElement("li");
121919
121970
  li.setAttribute("data-id", item.id);
121920
- li.classList.add("progress-item", item.status);
121971
+ li.classList.add("progress-item");
121921
121972
  li.innerHTML = `
121922
- <span class="icon"></span>
121923
- <span class="text">${item.message}</span>
121973
+ <span class="step-number">${index + 1}.</span>
121974
+ <span class="text">${item.originalMessage}</span>
121975
+ <span class="animated-dots"></span>
121924
121976
  `;
121925
121977
  progressList.appendChild(li);
121926
- this.#progressElements.set(item.id, li); // DOM 요소 참조 저장
121978
+ this.#progressElements.set(item.id, li);
121979
+ // 초기 렌더링 시에는 'active' 상태는 `#updateCurrentActiveProgress`에서 처리
121980
+ this.#updateProgressItemVisuals(item); // 텍스트만 업데이트
121927
121981
  });
121928
121982
  }
121929
121983
 
121930
- #updateProgressItem(item) {
121984
+ // 항목의 시각적 상태(텍스트, 완료 체크) 업데이트
121985
+ #updateProgressItemVisuals(item) {
121931
121986
  const li = this.#progressElements.get(item.id);
121932
121987
  if (li) {
121933
- li.classList.remove('pending', 'completed'); // 기존 클래스 제거
121934
- li.classList.add(item.status); // 새 상태 클래스 추가
121935
- li.querySelector(".text").textContent = item.status === 'completed' ? item.completedMessage : item.message;
121988
+ li.classList.remove('pending', 'completed');
121989
+ li.classList.add(item.status);
121990
+
121991
+ const textSpan = li.querySelector(".text");
121992
+ const dotsSpan = li.querySelector(".animated-dots");
121993
+
121994
+ if (item.status === 'completed') {
121995
+ textSpan.textContent = item.completedMessage;
121996
+ dotsSpan.textContent = ''; // 완료 시 점 제거
121997
+ } else { // pending 상태
121998
+ textSpan.textContent = item.originalMessage;
121999
+ // pending이지만 active가 아닌 경우 점 없음 (CSS의 role)
122000
+ }
121936
122001
  }
121937
122002
  }
122003
+
122004
+ // 점 애니메이션 시작 함수
122005
+ #startAnimation(item) {
122006
+ const li = this.#progressElements.get(item.id);
122007
+ if (li) {
122008
+ const dotsSpan = li.querySelector(".animated-dots");
122009
+ let dotsCount = 0;
122010
+ const intervalId = setInterval(() => {
122011
+ dotsCount = (dotsCount + 1) % 4; // 0, 1, 2, 3 반복
122012
+ dotsSpan.textContent = '.'.repeat(dotsCount);
122013
+ }, 300);
122014
+ this.#animationIntervals.set(item.id, intervalId);
122015
+ }
122016
+ }
122017
+
122018
+ // 개별 항목의 상태 업데이트 (텍스트 변경, 클래스 추가/제거)
122019
+ // 애니메이션 시작/중지는 `#updateCurrentActiveProgress`에서 담당
122020
+ #updateProgressItem(item) {
122021
+ this.#updateProgressItemVisuals(item); // 텍스트와 클래스 업데이트
122022
+ }
121938
122023
  }
121939
122024
 
121940
122025
 
@@ -202770,11 +202855,10 @@ class IdeDiffPopup extends HTMLElement
202770
202855
 
202771
202856
  this.shadowRoot.innerHTML = `
202772
202857
  <style>
202773
-
202774
202858
  </style>
202775
202859
 
202776
202860
  <nx-dialog>
202777
- <nx-tab theme="theme-4" ref={tabRef}>
202861
+ <nx-tab theme="theme-4">
202778
202862
  <nx-tab-page caption="mybatis">
202779
202863
  <ide-diff class="mybatis"></ide-diff>
202780
202864
  </nx-tab-page>
@@ -202793,18 +202877,10 @@ class IdeDiffPopup extends HTMLElement
202793
202877
  }
202794
202878
 
202795
202879
  popup = (chagedSource) => {
202796
-
202797
- console.log(chagedSource);
202798
-
202799
-
202800
202880
  setTimeout(() => {
202801
202881
  for (const item of chagedSource) {
202802
202882
  const [type, diffData] = Object.entries(item)[0]; // 예: type = "mybatis", diffData = { asis, tobe }
202803
-
202804
- console.log(type, diffData);
202805
-
202806
202883
  const diff = ninegrid.querySelector(`ide-diff.${type}`, this.shadowRoot);
202807
- console.log(diff);
202808
202884
  if (!diff) continue;
202809
202885
 
202810
202886
  diff.initialize(
@@ -202815,9 +202891,9 @@ class IdeDiffPopup extends HTMLElement
202815
202891
  }
202816
202892
 
202817
202893
  this.shadowRoot.querySelector('nx-dialog')?.showModal();
202818
- }, 800);
202819
-
202820
202894
 
202895
+ this.shadowRoot.querySelector('nx-tab').tabpage.hide("mybatis");
202896
+ }, 100);
202821
202897
  };
202822
202898
  }
202823
202899
 
@@ -15,11 +15,10 @@ class IdeDiffPopup extends HTMLElement
15
15
 
16
16
  this.shadowRoot.innerHTML = `
17
17
  <style>
18
-
19
18
  </style>
20
19
 
21
20
  <nx-dialog>
22
- <nx-tab theme="theme-4" ref={tabRef}>
21
+ <nx-tab theme="theme-4">
23
22
  <nx-tab-page caption="mybatis">
24
23
  <ide-diff class="mybatis"></ide-diff>
25
24
  </nx-tab-page>
@@ -38,18 +37,10 @@ class IdeDiffPopup extends HTMLElement
38
37
  }
39
38
 
40
39
  popup = (chagedSource) => {
41
-
42
- console.log(chagedSource);
43
-
44
-
45
40
  setTimeout(() => {
46
41
  for (const item of chagedSource) {
47
42
  const [type, diffData] = Object.entries(item)[0]; // 예: type = "mybatis", diffData = { asis, tobe }
48
-
49
- console.log(type, diffData);
50
-
51
43
  const diff = ninegrid.querySelector(`ide-diff.${type}`, this.shadowRoot);
52
- console.log(diff);
53
44
  if (!diff) continue;
54
45
 
55
46
  diff.initialize(
@@ -60,9 +51,9 @@ class IdeDiffPopup extends HTMLElement
60
51
  }
61
52
 
62
53
  this.shadowRoot.querySelector('nx-dialog')?.showModal();
63
- }, 800);
64
-
65
54
 
55
+ this.shadowRoot.querySelector('nx-tab').tabpage.hide("mybatis");
56
+ }, 100);
66
57
  };
67
58
  }
68
59
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.479.0",
4
+ "version": "0.482.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -15,11 +15,10 @@ class IdeDiffPopup extends HTMLElement
15
15
 
16
16
  this.shadowRoot.innerHTML = `
17
17
  <style>
18
-
19
18
  </style>
20
19
 
21
20
  <nx-dialog>
22
- <nx-tab theme="theme-4" ref={tabRef}>
21
+ <nx-tab theme="theme-4">
23
22
  <nx-tab-page caption="mybatis">
24
23
  <ide-diff class="mybatis"></ide-diff>
25
24
  </nx-tab-page>
@@ -38,18 +37,10 @@ class IdeDiffPopup extends HTMLElement
38
37
  }
39
38
 
40
39
  popup = (chagedSource) => {
41
-
42
- console.log(chagedSource);
43
-
44
-
45
40
  setTimeout(() => {
46
41
  for (const item of chagedSource) {
47
42
  const [type, diffData] = Object.entries(item)[0]; // 예: type = "mybatis", diffData = { asis, tobe }
48
-
49
- console.log(type, diffData);
50
-
51
43
  const diff = ninegrid.querySelector(`ide-diff.${type}`, this.shadowRoot);
52
- console.log(diff);
53
44
  if (!diff) continue;
54
45
 
55
46
  diff.initialize(
@@ -60,9 +51,9 @@ class IdeDiffPopup extends HTMLElement
60
51
  }
61
52
 
62
53
  this.shadowRoot.querySelector('nx-dialog')?.showModal();
63
- }, 800);
64
-
65
54
 
55
+ this.shadowRoot.querySelector('nx-tab').tabpage.hide("mybatis");
56
+ }, 100);
66
57
  };
67
58
  }
68
59