ide-assi 0.651.0 → 0.653.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.
@@ -203261,7 +203261,7 @@ console.log(el, href, title);
203261
203261
  //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
203262
203262
  progressMessageInstance.updateProgress('prepare2', 'completed');
203263
203263
 
203264
- console.log(where);
203264
+ //console.log(where);
203265
203265
 
203266
203266
  //const srcPath = this.#getSourcePath(where.menu.url);
203267
203267
 
@@ -203855,7 +203855,7 @@ console.log(el, href, title);
203855
203855
  };
203856
203856
  }
203857
203857
 
203858
- class IdeAssi extends HTMLElement
203858
+ let IdeAssi$1 = class IdeAssi extends HTMLElement
203859
203859
  {
203860
203860
  #ing = false;
203861
203861
  #ai;
@@ -204055,9 +204055,9 @@ class IdeAssi extends HTMLElement
204055
204055
  // `.menu-setting`이 클릭되었는지 확인 후 `nx-ai-settings` 토글
204056
204056
  this.settings.classList.toggle("expand", !!e.target.closest(".menu-setting"));
204057
204057
  };
204058
- }
204058
+ };
204059
204059
 
204060
- customElements.define("ide-assi", IdeAssi);
204060
+ customElements.define("ide-assi", IdeAssi$1);
204061
204061
 
204062
204062
  class ideAssiSettings extends HTMLElement
204063
204063
  {
@@ -237553,6 +237553,61 @@ class IdeDiff extends HTMLElement {
237553
237553
 
237554
237554
  customElements.define("ide-diff", IdeDiff);
237555
237555
 
237556
+ class aiNatualInput extends HTMLElement
237557
+ {
237558
+ #apiKey;
237559
+ #xmlPath;
237560
+ #queryId;
237561
+ #selectFunc;
237562
+ #target;
237563
+
237564
+ constructor() {
237565
+ super();
237566
+ }
237567
+
237568
+ connectedCallback() {
237569
+ this.#init();
237570
+ };
237571
+
237572
+ set selectFunc(v) { this.#selectFunc = v; };
237573
+
237574
+ initialize = (o) => {
237575
+ this.#selectFunc = o.selectFunc;
237576
+ this.#apiKey = o.apiKey;
237577
+ this.#xmlPath = o.xmlPath;
237578
+ this.#queryId = o.queryId;
237579
+ };
237580
+
237581
+ #keyDownHandler = async e => {
237582
+ if (e.key === 'Enter' && !e.isComposing && this.#selectFunc) {
237583
+
237584
+ let params = {};
237585
+ if (this.#target.value) {
237586
+ params = { "_whereClause": await IdeAssi.generateWhereCause(this.#xmlPath, this.#queryId, this.#target.value, this.#apiKey) };
237587
+ }
237588
+
237589
+ this.#selectFunc.call(this, params);
237590
+ }
237591
+ };
237592
+
237593
+ #init = () => {
237594
+ //this.#apiKey = this.getAttribute("api-key");
237595
+ //this.#menuUrl = this.getAttribute("menu-url");
237596
+ //this.#mybatisId = this.getAttribute("mybatis-id");
237597
+
237598
+ const placeholder = this.getAttribute("placeholder") || "자연어 검색어를 입력하세요 (ex: 작성자가 홍길동인 데이타를 찾아줘)";
237599
+
237600
+ this.innerHTML = `
237601
+ <input type="text" placeholder="${placeholder}" />
237602
+ `;
237603
+
237604
+ this.#target = this.querySelector("input");
237605
+ this.#target.addEventListener('keydown', this.#keyDownHandler);
237606
+ }
237607
+ }
237608
+
237609
+ customElements.define("ai-natual-input", aiNatualInput);
237610
+
237556
237611
  //import "./components/ideAssi.js";
237557
237612
 
237558
237613
 
@@ -237560,12 +237615,12 @@ customElements.define("ide-diff", IdeDiff);
237560
237615
  // ✅ Custom Elements 등록 함수 정의
237561
237616
  function defineCustomElements() {
237562
237617
  if (!customElements.get("ide-assi")) {
237563
- customElements.define("ide-assi", IdeAssi);
237618
+ customElements.define("ide-assi", IdeAssi$1);
237564
237619
  }
237565
237620
  }
237566
237621
 
237567
- exports.IdeAssi = IdeAssi;
237622
+ exports.IdeAssi = IdeAssi$1;
237568
237623
  exports.ai = IdeAi;
237569
237624
  exports.api = IdeFetch;
237570
- exports.default = IdeAssi;
237625
+ exports.default = IdeAssi$1;
237571
237626
  exports.defineCustomElements = defineCustomElements;
@@ -203257,7 +203257,7 @@ console.log(el, href, title);
203257
203257
  //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
203258
203258
  progressMessageInstance.updateProgress('prepare2', 'completed');
203259
203259
 
203260
- console.log(where);
203260
+ //console.log(where);
203261
203261
 
203262
203262
  //const srcPath = this.#getSourcePath(where.menu.url);
203263
203263
 
@@ -203851,7 +203851,7 @@ console.log(el, href, title);
203851
203851
  };
203852
203852
  }
203853
203853
 
203854
- class IdeAssi extends HTMLElement
203854
+ let IdeAssi$1 = class IdeAssi extends HTMLElement
203855
203855
  {
203856
203856
  #ing = false;
203857
203857
  #ai;
@@ -204051,9 +204051,9 @@ class IdeAssi extends HTMLElement
204051
204051
  // `.menu-setting`이 클릭되었는지 확인 후 `nx-ai-settings` 토글
204052
204052
  this.settings.classList.toggle("expand", !!e.target.closest(".menu-setting"));
204053
204053
  };
204054
- }
204054
+ };
204055
204055
 
204056
- customElements.define("ide-assi", IdeAssi);
204056
+ customElements.define("ide-assi", IdeAssi$1);
204057
204057
 
204058
204058
  class ideAssiSettings extends HTMLElement
204059
204059
  {
@@ -237549,6 +237549,61 @@ class IdeDiff extends HTMLElement {
237549
237549
 
237550
237550
  customElements.define("ide-diff", IdeDiff);
237551
237551
 
237552
+ class aiNatualInput extends HTMLElement
237553
+ {
237554
+ #apiKey;
237555
+ #xmlPath;
237556
+ #queryId;
237557
+ #selectFunc;
237558
+ #target;
237559
+
237560
+ constructor() {
237561
+ super();
237562
+ }
237563
+
237564
+ connectedCallback() {
237565
+ this.#init();
237566
+ };
237567
+
237568
+ set selectFunc(v) { this.#selectFunc = v; };
237569
+
237570
+ initialize = (o) => {
237571
+ this.#selectFunc = o.selectFunc;
237572
+ this.#apiKey = o.apiKey;
237573
+ this.#xmlPath = o.xmlPath;
237574
+ this.#queryId = o.queryId;
237575
+ };
237576
+
237577
+ #keyDownHandler = async e => {
237578
+ if (e.key === 'Enter' && !e.isComposing && this.#selectFunc) {
237579
+
237580
+ let params = {};
237581
+ if (this.#target.value) {
237582
+ params = { "_whereClause": await IdeAssi.generateWhereCause(this.#xmlPath, this.#queryId, this.#target.value, this.#apiKey) };
237583
+ }
237584
+
237585
+ this.#selectFunc.call(this, params);
237586
+ }
237587
+ };
237588
+
237589
+ #init = () => {
237590
+ //this.#apiKey = this.getAttribute("api-key");
237591
+ //this.#menuUrl = this.getAttribute("menu-url");
237592
+ //this.#mybatisId = this.getAttribute("mybatis-id");
237593
+
237594
+ const placeholder = this.getAttribute("placeholder") || "자연어 검색어를 입력하세요 (ex: 작성자가 홍길동인 데이타를 찾아줘)";
237595
+
237596
+ this.innerHTML = `
237597
+ <input type="text" placeholder="${placeholder}" />
237598
+ `;
237599
+
237600
+ this.#target = this.querySelector("input");
237601
+ this.#target.addEventListener('keydown', this.#keyDownHandler);
237602
+ }
237603
+ }
237604
+
237605
+ customElements.define("ai-natual-input", aiNatualInput);
237606
+
237552
237607
  //import "./components/ideAssi.js";
237553
237608
 
237554
237609
 
@@ -237556,8 +237611,8 @@ customElements.define("ide-diff", IdeDiff);
237556
237611
  // ✅ Custom Elements 등록 함수 정의
237557
237612
  function defineCustomElements() {
237558
237613
  if (!customElements.get("ide-assi")) {
237559
- customElements.define("ide-assi", IdeAssi);
237614
+ customElements.define("ide-assi", IdeAssi$1);
237560
237615
  }
237561
237616
  }
237562
237617
 
237563
- export { IdeAssi, IdeAi as ai, IdeFetch as api, IdeAssi as default, defineCustomElements };
237618
+ export { IdeAssi$1 as IdeAssi, IdeAi as ai, IdeFetch as api, IdeAssi$1 as default, defineCustomElements };
@@ -0,0 +1,56 @@
1
+ import "./ideAi.js";
2
+
3
+ class aiNatualInput extends HTMLElement
4
+ {
5
+ #apiKey;
6
+ #xmlPath;
7
+ #queryId;
8
+ #selectFunc;
9
+ #target;
10
+
11
+ constructor() {
12
+ super();
13
+ }
14
+
15
+ connectedCallback() {
16
+ this.#init();
17
+ };
18
+
19
+ set selectFunc(v) { this.#selectFunc = v; };
20
+
21
+ initialize = (o) => {
22
+ this.#selectFunc = o.selectFunc;
23
+ this.#apiKey = o.apiKey;
24
+ this.#xmlPath = o.xmlPath;
25
+ this.#queryId = o.queryId;
26
+ };
27
+
28
+ #keyDownHandler = async e => {
29
+ if (e.key === 'Enter' && !e.isComposing && this.#selectFunc) {
30
+
31
+ let params = {};
32
+ if (this.#target.value) {
33
+ params = { "_whereClause": await IdeAssi.generateWhereCause(this.#xmlPath, this.#queryId, this.#target.value, this.#apiKey) };
34
+ }
35
+
36
+ this.#selectFunc.call(this, params);
37
+ }
38
+ };
39
+
40
+ #init = () => {
41
+ //this.#apiKey = this.getAttribute("api-key");
42
+ //this.#menuUrl = this.getAttribute("menu-url");
43
+ //this.#mybatisId = this.getAttribute("mybatis-id");
44
+
45
+ const placeholder = this.getAttribute("placeholder") || "자연어 검색어를 입력하세요 (ex: 작성자가 홍길동인 데이타를 찾아줘)";
46
+
47
+ this.innerHTML = `
48
+ <input type="text" placeholder="${placeholder}" />
49
+ `;
50
+
51
+ this.#target = this.querySelector("input");
52
+ this.#target.addEventListener('keydown', this.#keyDownHandler);
53
+ }
54
+ }
55
+
56
+ customElements.define("ai-natual-input", aiNatualInput);
@@ -712,7 +712,7 @@ console.log(el, href, title);
712
712
  //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
713
713
  progressMessageInstance.updateProgress('prepare2', 'completed');
714
714
 
715
- console.log(where);
715
+ //console.log(where);
716
716
 
717
717
  //const srcPath = this.#getSourcePath(where.menu.url);
718
718
 
package/dist/index.js CHANGED
@@ -8,6 +8,8 @@ import "./components/ideDiff.js";
8
8
  import { IdeFetch } from "./components/ideFetch.js";
9
9
  import { IdeAi } from "./components/ideAi.js";
10
10
 
11
+ import "./components/aiNatualInput.js";
12
+
11
13
  export { IdeAssi, IdeFetch as api, IdeAi as ai }; // Named Export
12
14
 
13
15
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.651.0",
4
+ "version": "0.653.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -0,0 +1,56 @@
1
+ import "./ideAi.js";
2
+
3
+ class aiNatualInput extends HTMLElement
4
+ {
5
+ #apiKey;
6
+ #xmlPath;
7
+ #queryId;
8
+ #selectFunc;
9
+ #target;
10
+
11
+ constructor() {
12
+ super();
13
+ }
14
+
15
+ connectedCallback() {
16
+ this.#init();
17
+ };
18
+
19
+ set selectFunc(v) { this.#selectFunc = v; };
20
+
21
+ initialize = (o) => {
22
+ this.#selectFunc = o.selectFunc;
23
+ this.#apiKey = o.apiKey;
24
+ this.#xmlPath = o.xmlPath;
25
+ this.#queryId = o.queryId;
26
+ };
27
+
28
+ #keyDownHandler = async e => {
29
+ if (e.key === 'Enter' && !e.isComposing && this.#selectFunc) {
30
+
31
+ let params = {};
32
+ if (this.#target.value) {
33
+ params = { "_whereClause": await IdeAssi.generateWhereCause(this.#xmlPath, this.#queryId, this.#target.value, this.#apiKey) };
34
+ }
35
+
36
+ this.#selectFunc.call(this, params);
37
+ }
38
+ };
39
+
40
+ #init = () => {
41
+ //this.#apiKey = this.getAttribute("api-key");
42
+ //this.#menuUrl = this.getAttribute("menu-url");
43
+ //this.#mybatisId = this.getAttribute("mybatis-id");
44
+
45
+ const placeholder = this.getAttribute("placeholder") || "자연어 검색어를 입력하세요 (ex: 작성자가 홍길동인 데이타를 찾아줘)";
46
+
47
+ this.innerHTML = `
48
+ <input type="text" placeholder="${placeholder}" />
49
+ `;
50
+
51
+ this.#target = this.querySelector("input");
52
+ this.#target.addEventListener('keydown', this.#keyDownHandler);
53
+ }
54
+ }
55
+
56
+ customElements.define("ai-natual-input", aiNatualInput);
package/src/index.js CHANGED
@@ -8,6 +8,8 @@ import "./components/ideDiff.js";
8
8
  import { IdeFetch } from "./components/ideFetch.js";
9
9
  import { IdeAi } from "./components/ideAi.js";
10
10
 
11
+ import "./components/aiNatualInput.js";
12
+
11
13
  export { IdeAssi, IdeFetch as api, IdeAi as ai }; // Named Export
12
14
 
13
15