ide-assi 0.652.0 → 0.654.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 +28 -21
- package/dist/bundle.esm.js +28 -21
- package/dist/components/aiNatualInput.js +26 -17
- package/package.json +1 -1
- package/src/components/aiNatualInput.js +26 -17
package/dist/bundle.cjs.js
CHANGED
|
@@ -202555,7 +202555,7 @@ class IdeUtils
|
|
|
202555
202555
|
};
|
|
202556
202556
|
}
|
|
202557
202557
|
|
|
202558
|
-
class IdeAi
|
|
202558
|
+
let IdeAi$1 = class IdeAi
|
|
202559
202559
|
{
|
|
202560
202560
|
#API_URL = "http://localhost:8091";
|
|
202561
202561
|
#SCHEMA = "booxtory_250131";
|
|
@@ -203853,7 +203853,7 @@ console.log(el, href, title);
|
|
|
203853
203853
|
return o;
|
|
203854
203854
|
}
|
|
203855
203855
|
};
|
|
203856
|
-
}
|
|
203856
|
+
};
|
|
203857
203857
|
|
|
203858
203858
|
class IdeAssi extends HTMLElement
|
|
203859
203859
|
{
|
|
@@ -203867,7 +203867,7 @@ class IdeAssi extends HTMLElement
|
|
|
203867
203867
|
super();
|
|
203868
203868
|
this.attachShadow({ mode: 'open' });
|
|
203869
203869
|
|
|
203870
|
-
this.#ai = new IdeAi(this);
|
|
203870
|
+
this.#ai = new IdeAi$1(this);
|
|
203871
203871
|
}
|
|
203872
203872
|
|
|
203873
203873
|
connectedCallback() {
|
|
@@ -237555,7 +237555,11 @@ customElements.define("ide-diff", IdeDiff);
|
|
|
237555
237555
|
|
|
237556
237556
|
class aiNatualInput extends HTMLElement
|
|
237557
237557
|
{
|
|
237558
|
+
#apiKey;
|
|
237559
|
+
#xmlPath;
|
|
237560
|
+
#queryId;
|
|
237558
237561
|
#selectFunc;
|
|
237562
|
+
#target;
|
|
237559
237563
|
|
|
237560
237564
|
constructor() {
|
|
237561
237565
|
super();
|
|
@@ -237567,35 +237571,38 @@ class aiNatualInput extends HTMLElement
|
|
|
237567
237571
|
|
|
237568
237572
|
set selectFunc(v) { this.#selectFunc = v; };
|
|
237569
237573
|
|
|
237570
|
-
|
|
237571
|
-
|
|
237572
|
-
|
|
237573
|
-
|
|
237574
|
-
|
|
237575
|
-
//console.log(s);
|
|
237576
|
-
|
|
237577
|
-
return new Function(args, body);
|
|
237578
|
-
//return new Function('data', 'currow', 'return ' + s + ';');
|
|
237574
|
+
initialize = (o) => {
|
|
237575
|
+
this.#selectFunc = o.selectFunc;
|
|
237576
|
+
this.#apiKey = o.apiKey;
|
|
237577
|
+
this.#xmlPath = o.xmlPath;
|
|
237578
|
+
this.#queryId = o.queryId;
|
|
237579
237579
|
};
|
|
237580
237580
|
|
|
237581
|
-
#keyDownHandler = e => {
|
|
237582
|
-
console.log(e);
|
|
237583
|
-
|
|
237581
|
+
#keyDownHandler = async e => {
|
|
237584
237582
|
if (e.key === 'Enter' && !e.isComposing && this.#selectFunc) {
|
|
237585
|
-
|
|
237586
|
-
|
|
237587
|
-
this.#
|
|
237583
|
+
|
|
237584
|
+
let params = {};
|
|
237585
|
+
if (this.#target.value) {
|
|
237586
|
+
params = { "_whereClause": await IdeAi.generateWhereCause(this.#xmlPath, this.#queryId, this.#target.value, this.#apiKey) };
|
|
237587
|
+
}
|
|
237588
|
+
|
|
237589
|
+
this.#selectFunc.call(this, params);
|
|
237588
237590
|
}
|
|
237589
237591
|
};
|
|
237590
237592
|
|
|
237591
237593
|
#init = () => {
|
|
237594
|
+
//this.#apiKey = this.getAttribute("api-key");
|
|
237595
|
+
//this.#menuUrl = this.getAttribute("menu-url");
|
|
237596
|
+
//this.#mybatisId = this.getAttribute("mybatis-id");
|
|
237597
|
+
|
|
237592
237598
|
const placeholder = this.getAttribute("placeholder") || "자연어 검색어를 입력하세요 (ex: 작성자가 홍길동인 데이타를 찾아줘)";
|
|
237593
237599
|
|
|
237594
237600
|
this.innerHTML = `
|
|
237595
|
-
|
|
237601
|
+
<input type="text" placeholder="${placeholder}" />
|
|
237596
237602
|
`;
|
|
237597
237603
|
|
|
237598
|
-
this.querySelector("input")
|
|
237604
|
+
this.#target = this.querySelector("input");
|
|
237605
|
+
this.#target.addEventListener('keydown', this.#keyDownHandler);
|
|
237599
237606
|
}
|
|
237600
237607
|
}
|
|
237601
237608
|
|
|
@@ -237613,7 +237620,7 @@ function defineCustomElements() {
|
|
|
237613
237620
|
}
|
|
237614
237621
|
|
|
237615
237622
|
exports.IdeAssi = IdeAssi;
|
|
237616
|
-
exports.ai = IdeAi;
|
|
237623
|
+
exports.ai = IdeAi$1;
|
|
237617
237624
|
exports.api = IdeFetch;
|
|
237618
237625
|
exports.default = IdeAssi;
|
|
237619
237626
|
exports.defineCustomElements = defineCustomElements;
|
package/dist/bundle.esm.js
CHANGED
|
@@ -202551,7 +202551,7 @@ class IdeUtils
|
|
|
202551
202551
|
};
|
|
202552
202552
|
}
|
|
202553
202553
|
|
|
202554
|
-
class IdeAi
|
|
202554
|
+
let IdeAi$1 = class IdeAi
|
|
202555
202555
|
{
|
|
202556
202556
|
#API_URL = "http://localhost:8091";
|
|
202557
202557
|
#SCHEMA = "booxtory_250131";
|
|
@@ -203849,7 +203849,7 @@ console.log(el, href, title);
|
|
|
203849
203849
|
return o;
|
|
203850
203850
|
}
|
|
203851
203851
|
};
|
|
203852
|
-
}
|
|
203852
|
+
};
|
|
203853
203853
|
|
|
203854
203854
|
class IdeAssi extends HTMLElement
|
|
203855
203855
|
{
|
|
@@ -203863,7 +203863,7 @@ class IdeAssi extends HTMLElement
|
|
|
203863
203863
|
super();
|
|
203864
203864
|
this.attachShadow({ mode: 'open' });
|
|
203865
203865
|
|
|
203866
|
-
this.#ai = new IdeAi(this);
|
|
203866
|
+
this.#ai = new IdeAi$1(this);
|
|
203867
203867
|
}
|
|
203868
203868
|
|
|
203869
203869
|
connectedCallback() {
|
|
@@ -237551,7 +237551,11 @@ customElements.define("ide-diff", IdeDiff);
|
|
|
237551
237551
|
|
|
237552
237552
|
class aiNatualInput extends HTMLElement
|
|
237553
237553
|
{
|
|
237554
|
+
#apiKey;
|
|
237555
|
+
#xmlPath;
|
|
237556
|
+
#queryId;
|
|
237554
237557
|
#selectFunc;
|
|
237558
|
+
#target;
|
|
237555
237559
|
|
|
237556
237560
|
constructor() {
|
|
237557
237561
|
super();
|
|
@@ -237563,35 +237567,38 @@ class aiNatualInput extends HTMLElement
|
|
|
237563
237567
|
|
|
237564
237568
|
set selectFunc(v) { this.#selectFunc = v; };
|
|
237565
237569
|
|
|
237566
|
-
|
|
237567
|
-
|
|
237568
|
-
|
|
237569
|
-
|
|
237570
|
-
|
|
237571
|
-
//console.log(s);
|
|
237572
|
-
|
|
237573
|
-
return new Function(args, body);
|
|
237574
|
-
//return new Function('data', 'currow', 'return ' + s + ';');
|
|
237570
|
+
initialize = (o) => {
|
|
237571
|
+
this.#selectFunc = o.selectFunc;
|
|
237572
|
+
this.#apiKey = o.apiKey;
|
|
237573
|
+
this.#xmlPath = o.xmlPath;
|
|
237574
|
+
this.#queryId = o.queryId;
|
|
237575
237575
|
};
|
|
237576
237576
|
|
|
237577
|
-
#keyDownHandler = e => {
|
|
237578
|
-
console.log(e);
|
|
237579
|
-
|
|
237577
|
+
#keyDownHandler = async e => {
|
|
237580
237578
|
if (e.key === 'Enter' && !e.isComposing && this.#selectFunc) {
|
|
237581
|
-
|
|
237582
|
-
|
|
237583
|
-
this.#
|
|
237579
|
+
|
|
237580
|
+
let params = {};
|
|
237581
|
+
if (this.#target.value) {
|
|
237582
|
+
params = { "_whereClause": await IdeAi.generateWhereCause(this.#xmlPath, this.#queryId, this.#target.value, this.#apiKey) };
|
|
237583
|
+
}
|
|
237584
|
+
|
|
237585
|
+
this.#selectFunc.call(this, params);
|
|
237584
237586
|
}
|
|
237585
237587
|
};
|
|
237586
237588
|
|
|
237587
237589
|
#init = () => {
|
|
237590
|
+
//this.#apiKey = this.getAttribute("api-key");
|
|
237591
|
+
//this.#menuUrl = this.getAttribute("menu-url");
|
|
237592
|
+
//this.#mybatisId = this.getAttribute("mybatis-id");
|
|
237593
|
+
|
|
237588
237594
|
const placeholder = this.getAttribute("placeholder") || "자연어 검색어를 입력하세요 (ex: 작성자가 홍길동인 데이타를 찾아줘)";
|
|
237589
237595
|
|
|
237590
237596
|
this.innerHTML = `
|
|
237591
|
-
|
|
237597
|
+
<input type="text" placeholder="${placeholder}" />
|
|
237592
237598
|
`;
|
|
237593
237599
|
|
|
237594
|
-
this.querySelector("input")
|
|
237600
|
+
this.#target = this.querySelector("input");
|
|
237601
|
+
this.#target.addEventListener('keydown', this.#keyDownHandler);
|
|
237595
237602
|
}
|
|
237596
237603
|
}
|
|
237597
237604
|
|
|
@@ -237608,4 +237615,4 @@ function defineCustomElements() {
|
|
|
237608
237615
|
}
|
|
237609
237616
|
}
|
|
237610
237617
|
|
|
237611
|
-
export { IdeAssi, IdeAi as ai, IdeFetch as api, IdeAssi as default, defineCustomElements };
|
|
237618
|
+
export { IdeAssi, IdeAi$1 as ai, IdeFetch as api, IdeAssi as default, defineCustomElements };
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import "./ideAi.js";
|
|
2
|
+
|
|
1
3
|
class aiNatualInput extends HTMLElement
|
|
2
4
|
{
|
|
5
|
+
#apiKey;
|
|
6
|
+
#xmlPath;
|
|
7
|
+
#queryId;
|
|
3
8
|
#selectFunc;
|
|
9
|
+
#target;
|
|
4
10
|
|
|
5
11
|
constructor() {
|
|
6
12
|
super();
|
|
@@ -12,35 +18,38 @@ class aiNatualInput extends HTMLElement
|
|
|
12
18
|
|
|
13
19
|
set selectFunc(v) { this.#selectFunc = v; };
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
//console.log(s);
|
|
21
|
-
|
|
22
|
-
return new Function(args, body);
|
|
23
|
-
//return new Function('data', 'currow', 'return ' + s + ';');
|
|
21
|
+
initialize = (o) => {
|
|
22
|
+
this.#selectFunc = o.selectFunc;
|
|
23
|
+
this.#apiKey = o.apiKey;
|
|
24
|
+
this.#xmlPath = o.xmlPath;
|
|
25
|
+
this.#queryId = o.queryId;
|
|
24
26
|
};
|
|
25
27
|
|
|
26
|
-
#keyDownHandler = e => {
|
|
27
|
-
console.log(e);
|
|
28
|
-
|
|
28
|
+
#keyDownHandler = async e => {
|
|
29
29
|
if (e.key === 'Enter' && !e.isComposing && this.#selectFunc) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
this.#
|
|
30
|
+
|
|
31
|
+
let params = {};
|
|
32
|
+
if (this.#target.value) {
|
|
33
|
+
params = { "_whereClause": await IdeAi.generateWhereCause(this.#xmlPath, this.#queryId, this.#target.value, this.#apiKey) };
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
this.#selectFunc.call(this, params);
|
|
33
37
|
}
|
|
34
38
|
};
|
|
35
39
|
|
|
36
40
|
#init = () => {
|
|
41
|
+
//this.#apiKey = this.getAttribute("api-key");
|
|
42
|
+
//this.#menuUrl = this.getAttribute("menu-url");
|
|
43
|
+
//this.#mybatisId = this.getAttribute("mybatis-id");
|
|
44
|
+
|
|
37
45
|
const placeholder = this.getAttribute("placeholder") || "자연어 검색어를 입력하세요 (ex: 작성자가 홍길동인 데이타를 찾아줘)";
|
|
38
46
|
|
|
39
47
|
this.innerHTML = `
|
|
40
|
-
|
|
48
|
+
<input type="text" placeholder="${placeholder}" />
|
|
41
49
|
`;
|
|
42
50
|
|
|
43
|
-
this.querySelector("input")
|
|
51
|
+
this.#target = this.querySelector("input");
|
|
52
|
+
this.#target.addEventListener('keydown', this.#keyDownHandler);
|
|
44
53
|
}
|
|
45
54
|
}
|
|
46
55
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import "./ideAi.js";
|
|
2
|
+
|
|
1
3
|
class aiNatualInput extends HTMLElement
|
|
2
4
|
{
|
|
5
|
+
#apiKey;
|
|
6
|
+
#xmlPath;
|
|
7
|
+
#queryId;
|
|
3
8
|
#selectFunc;
|
|
9
|
+
#target;
|
|
4
10
|
|
|
5
11
|
constructor() {
|
|
6
12
|
super();
|
|
@@ -12,35 +18,38 @@ class aiNatualInput extends HTMLElement
|
|
|
12
18
|
|
|
13
19
|
set selectFunc(v) { this.#selectFunc = v; };
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
//console.log(s);
|
|
21
|
-
|
|
22
|
-
return new Function(args, body);
|
|
23
|
-
//return new Function('data', 'currow', 'return ' + s + ';');
|
|
21
|
+
initialize = (o) => {
|
|
22
|
+
this.#selectFunc = o.selectFunc;
|
|
23
|
+
this.#apiKey = o.apiKey;
|
|
24
|
+
this.#xmlPath = o.xmlPath;
|
|
25
|
+
this.#queryId = o.queryId;
|
|
24
26
|
};
|
|
25
27
|
|
|
26
|
-
#keyDownHandler = e => {
|
|
27
|
-
console.log(e);
|
|
28
|
-
|
|
28
|
+
#keyDownHandler = async e => {
|
|
29
29
|
if (e.key === 'Enter' && !e.isComposing && this.#selectFunc) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
this.#
|
|
30
|
+
|
|
31
|
+
let params = {};
|
|
32
|
+
if (this.#target.value) {
|
|
33
|
+
params = { "_whereClause": await IdeAi.generateWhereCause(this.#xmlPath, this.#queryId, this.#target.value, this.#apiKey) };
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
this.#selectFunc.call(this, params);
|
|
33
37
|
}
|
|
34
38
|
};
|
|
35
39
|
|
|
36
40
|
#init = () => {
|
|
41
|
+
//this.#apiKey = this.getAttribute("api-key");
|
|
42
|
+
//this.#menuUrl = this.getAttribute("menu-url");
|
|
43
|
+
//this.#mybatisId = this.getAttribute("mybatis-id");
|
|
44
|
+
|
|
37
45
|
const placeholder = this.getAttribute("placeholder") || "자연어 검색어를 입력하세요 (ex: 작성자가 홍길동인 데이타를 찾아줘)";
|
|
38
46
|
|
|
39
47
|
this.innerHTML = `
|
|
40
|
-
|
|
48
|
+
<input type="text" placeholder="${placeholder}" />
|
|
41
49
|
`;
|
|
42
50
|
|
|
43
|
-
this.querySelector("input")
|
|
51
|
+
this.#target = this.querySelector("input");
|
|
52
|
+
this.#target.addEventListener('keydown', this.#keyDownHandler);
|
|
44
53
|
}
|
|
45
54
|
}
|
|
46
55
|
|