@nine-lab/nine-mu 0.1.397 → 0.1.399
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/css/nine-mu.css +123 -0
- package/dist/nine-mu.js +228 -13
- package/dist/nine-mu.js.map +1 -1
- package/dist/nine-mu.umd.js +3 -3
- package/dist/nine-mu.umd.js.map +1 -1
- package/package.json +1 -1
- package/public/css/nine-mu.css +123 -0
- package/src/components/ai/NineNatualQuery.js +145 -0
- package/src/components/ai/NineNatualQueryResult.js +145 -0
- package/src/index.js +2 -0
- package/vite.config.js +1 -1
package/dist/css/nine-mu.css
CHANGED
|
@@ -1028,4 +1028,127 @@
|
|
|
1028
1028
|
0% { opacity: 0.6; }
|
|
1029
1029
|
50% { opacity: 1; }
|
|
1030
1030
|
100% { opacity: 0.6; }
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
:host(nine-natual-query) {
|
|
1034
|
+
.input-wrapper {
|
|
1035
|
+
position: relative;
|
|
1036
|
+
width: 100%;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
input {
|
|
1040
|
+
width: 100%;
|
|
1041
|
+
padding: 8px 16px; /* 하단 padding을 충분히 주어 워터마크 공간 확보 */
|
|
1042
|
+
font-size: 14px;
|
|
1043
|
+
border: 1px solid #d1d5da;
|
|
1044
|
+
border-radius: 6px;
|
|
1045
|
+
box-sizing: border-box;
|
|
1046
|
+
transition: border-color 0.2s, box-shadow 0.2s;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
input::placeholder {
|
|
1050
|
+
color: #d1d5da; /* 아주 연한 회색 */
|
|
1051
|
+
opacity: 1; /* 파이어폭스 대응 */
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
input:focus {
|
|
1055
|
+
border-color: green;
|
|
1056
|
+
--box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.1);
|
|
1057
|
+
outline: none;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
/* 핵심: 워터마크 스타일 */
|
|
1061
|
+
.watermark-link {
|
|
1062
|
+
position: absolute;
|
|
1063
|
+
right: 8px;
|
|
1064
|
+
bottom: 2px;
|
|
1065
|
+
font-size: 11px;
|
|
1066
|
+
color: #999;
|
|
1067
|
+
text-decoration: none;
|
|
1068
|
+
opacity: 0.7;
|
|
1069
|
+
z-index: 5;
|
|
1070
|
+
font-weight: 500;
|
|
1071
|
+
letter-spacing: -0.2px;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
.watermark-link:hover {
|
|
1075
|
+
color: #0366d6;
|
|
1076
|
+
opacity: 1;
|
|
1077
|
+
text-decoration: underline;
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
:host(nine-natual-query-result) {
|
|
1082
|
+
display: block;
|
|
1083
|
+
width: 100%;
|
|
1084
|
+
height: 100%;
|
|
1085
|
+
min-height: 200px; /* 초기 문구가 보일 만큼 최소 높이 확보 */
|
|
1086
|
+
border: 1px solid #e1e4e8;
|
|
1087
|
+
border-radius: 8px;
|
|
1088
|
+
overflow: hidden;
|
|
1089
|
+
box-sizing: border-box;
|
|
1090
|
+
|
|
1091
|
+
nine-grid {
|
|
1092
|
+
width: 100%;
|
|
1093
|
+
height: 100%;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
.result-wrapper {
|
|
1097
|
+
width: 100%;
|
|
1098
|
+
height: 100%;
|
|
1099
|
+
display: flex;
|
|
1100
|
+
flex-direction: column;
|
|
1101
|
+
position: relative;
|
|
1102
|
+
background: #fcfcfc;
|
|
1103
|
+
padding: 16px;
|
|
1104
|
+
box-sizing: border-box;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
/* 1. 기본 상태: 그리드 컨테이너는 보이고, 안내 컨테이너는 숨김 */
|
|
1108
|
+
#grid-container {
|
|
1109
|
+
flex: 1;
|
|
1110
|
+
width: 100%;
|
|
1111
|
+
height: 100%;
|
|
1112
|
+
display: block;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
#no-result-container {
|
|
1116
|
+
display: none;
|
|
1117
|
+
flex: 1;
|
|
1118
|
+
width: 100%;
|
|
1119
|
+
height: 100%;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
/* 2. 데이터가 없을 때 (.empty 클래스가 붙었을 때) 제어 */
|
|
1123
|
+
.result-wrapper.empty #grid-container {
|
|
1124
|
+
display: none;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
.result-wrapper.empty #no-result-container {
|
|
1128
|
+
display: flex; /* 보임 처리 */
|
|
1129
|
+
flex-direction: column;
|
|
1130
|
+
align-items: center;
|
|
1131
|
+
justify-content: center;
|
|
1132
|
+
text-align: center;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
/* 3. 안내 문구 스타일 디테일 */
|
|
1136
|
+
.no-result .main-message {
|
|
1137
|
+
font-size: 1.2rem;
|
|
1138
|
+
font-weight: 700;
|
|
1139
|
+
color: #2d3748;
|
|
1140
|
+
margin-bottom: 8px;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
.no-result .sub-message {
|
|
1144
|
+
font-size: 0.9rem;
|
|
1145
|
+
color: #718096;
|
|
1146
|
+
line-height: 1.5;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
/* 내부 그리드 라이브러리 높이 보정 */
|
|
1150
|
+
nine-grid {
|
|
1151
|
+
width: 100%;
|
|
1152
|
+
height: 100%;
|
|
1153
|
+
}
|
|
1031
1154
|
}
|
package/dist/nine-mu.js
CHANGED
|
@@ -9,8 +9,9 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
|
|
|
9
9
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
10
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
11
11
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
12
|
-
var _owner, _collectedFiles, _NotificationHandler_instances, handleLoggingMessage_fn, _collectModifySource, _openDiffPopup, _openRouteDiffPopup, _generateSource, _generateMenu, _mcpClient, _onAction, _onStatus, _onMessage, _owner2, _routeUrl, _chatHistory, _notiHandler, _NineChatManager_instances, connect_fn, updateStatus_fn, callTool_fn, _getSourcePath, _service, _packageName, _routesPath, _connectorUrl, _manager, _config, _$nineChatMessage, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _sourceGenHandler, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _isDirty, _initialAsisSrc, _initialTobeSrc, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _checkDirtyState, _setupScrollSync, _applyDiffDecorations, _dialog, _tabContainer, _fileList, _host, _NineDiffPopup_instances, renderScaffolding_fn, handleConfirmAll_fn, handleCancel_fn, _dialog2, _diffView, _asisBackup, _host2, _NineMenuDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn2, _message, _data, _unique, _init, _message2, _init2, _progressData, _progressElements, _animationIntervals, _ProgressMessage_instances, updateCurrentActiveProgress_fn, renderProgress_fn, updateProgressItemVisuals_fn, startAnimation_fn, updateProgressItem_fn, _renderer, _init3;
|
|
12
|
+
var _owner, _collectedFiles, _NotificationHandler_instances, handleLoggingMessage_fn, _collectModifySource, _openDiffPopup, _openRouteDiffPopup, _generateSource, _generateMenu, _mcpClient, _onAction, _onStatus, _onMessage, _owner2, _routeUrl, _chatHistory, _notiHandler, _NineChatManager_instances, connect_fn, updateStatus_fn, callTool_fn, _getSourcePath, _service, _packageName, _routesPath, _connectorUrl, _manager, _config, _$nineChatMessage, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _sourceGenHandler, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _isDirty, _initialAsisSrc, _initialTobeSrc, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _checkDirtyState, _setupScrollSync, _applyDiffDecorations, _dialog, _tabContainer, _fileList, _host, _NineDiffPopup_instances, renderScaffolding_fn, handleConfirmAll_fn, handleCancel_fn, _dialog2, _diffView, _asisBackup, _host2, _NineMenuDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn2, _message, _data, _unique, _init, _message2, _init2, _progressData, _progressElements, _animationIntervals, _ProgressMessage_instances, updateCurrentActiveProgress_fn, renderProgress_fn, updateProgressItemVisuals_fn, startAnimation_fn, updateProgressItem_fn, _renderer, _init3, _schema, _connectorUrl2, _aiProcessor, _tipPopup, _NineNatualQuery_instances, runQuery_fn, render_fn3, handleQuestion_fn, _data2, _wrapper, _gridContainer, _NineNatualQueryResult_instances, updateGrid_fn, generateGridHtml_fn, bindGridData_fn, render_fn4;
|
|
13
13
|
import { trace as trace$1, api, nine as nine$1 } from "@nine-lab/nine-util";
|
|
14
|
+
import "@nine-lab/nine-ai";
|
|
14
15
|
import React, { createContext, Suspense, useContext, useState, lazy } from "react";
|
|
15
16
|
import { Routes, Route } from "react-router-dom";
|
|
16
17
|
class Trace extends trace$1.constructor {
|
|
@@ -13604,9 +13605,9 @@ function requireCore$1() {
|
|
|
13604
13605
|
}
|
|
13605
13606
|
const { loadSchema } = this.opts;
|
|
13606
13607
|
return runCompileAsync.call(this, schema, meta2);
|
|
13607
|
-
async function runCompileAsync(
|
|
13608
|
-
await loadMetaSchema.call(this,
|
|
13609
|
-
const sch = this._addSchema(
|
|
13608
|
+
async function runCompileAsync(_schema2, _meta) {
|
|
13609
|
+
await loadMetaSchema.call(this, _schema2.$schema);
|
|
13610
|
+
const sch = this._addSchema(_schema2, _meta);
|
|
13610
13611
|
return sch.validate || _compileAsync.call(this, sch);
|
|
13611
13612
|
}
|
|
13612
13613
|
async function loadMetaSchema($ref) {
|
|
@@ -13631,11 +13632,11 @@ function requireCore$1() {
|
|
|
13631
13632
|
}
|
|
13632
13633
|
}
|
|
13633
13634
|
async function loadMissingSchema(ref2) {
|
|
13634
|
-
const
|
|
13635
|
+
const _schema2 = await _loadSchema.call(this, ref2);
|
|
13635
13636
|
if (!this.refs[ref2])
|
|
13636
|
-
await loadMetaSchema.call(this,
|
|
13637
|
+
await loadMetaSchema.call(this, _schema2.$schema);
|
|
13637
13638
|
if (!this.refs[ref2])
|
|
13638
|
-
this.addSchema(
|
|
13639
|
+
this.addSchema(_schema2, ref2, meta2);
|
|
13639
13640
|
}
|
|
13640
13641
|
async function _loadSchema(ref2) {
|
|
13641
13642
|
const p = this._loading[ref2];
|
|
@@ -17539,7 +17540,7 @@ render_fn = function() {
|
|
|
17539
17540
|
const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
|
|
17540
17541
|
this.shadowRoot.innerHTML = `
|
|
17541
17542
|
<style>
|
|
17542
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
17543
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.398"}/dist/css/nine-mu.css";
|
|
17543
17544
|
${customImport}
|
|
17544
17545
|
</style>
|
|
17545
17546
|
<div class="wrapper">
|
|
@@ -43789,7 +43790,7 @@ class NineDiff extends HTMLElement {
|
|
|
43789
43790
|
const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
|
|
43790
43791
|
this.shadowRoot.innerHTML = `
|
|
43791
43792
|
<style>
|
|
43792
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
43793
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.398"}/dist/css/nine-mu.css";
|
|
43793
43794
|
${customImport}
|
|
43794
43795
|
</style>
|
|
43795
43796
|
|
|
@@ -43929,7 +43930,7 @@ renderScaffolding_fn = function() {
|
|
|
43929
43930
|
const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
|
|
43930
43931
|
this.shadowRoot.innerHTML = `
|
|
43931
43932
|
<style>
|
|
43932
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
43933
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.398"}/dist/css/nine-mu.css";
|
|
43933
43934
|
${customImport}
|
|
43934
43935
|
</style>
|
|
43935
43936
|
|
|
@@ -44038,7 +44039,7 @@ render_fn2 = function() {
|
|
|
44038
44039
|
const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
|
|
44039
44040
|
this.shadowRoot.innerHTML = `
|
|
44040
44041
|
<style>
|
|
44041
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
44042
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.398"}/dist/css/nine-mu.css";
|
|
44042
44043
|
${customImport}
|
|
44043
44044
|
</style>
|
|
44044
44045
|
|
|
@@ -44368,7 +44369,7 @@ class ChatMessageBody extends HTMLElement {
|
|
|
44368
44369
|
const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
|
|
44369
44370
|
this.shadowRoot.innerHTML = `
|
|
44370
44371
|
<style>
|
|
44371
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
44372
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.398"}/dist/css/nine-mu.css";
|
|
44372
44373
|
${customImport}
|
|
44373
44374
|
</style>
|
|
44374
44375
|
|
|
@@ -44466,6 +44467,220 @@ if (!customElements.get("nine-chat-ing")) {
|
|
|
44466
44467
|
if (!customElements.get("nine-chat-progress")) {
|
|
44467
44468
|
customElements.define("nine-chat-progress", ProgressMessage);
|
|
44468
44469
|
}
|
|
44470
|
+
class NineNatualQuery extends HTMLElement {
|
|
44471
|
+
constructor() {
|
|
44472
|
+
super();
|
|
44473
|
+
__privateAdd(this, _NineNatualQuery_instances);
|
|
44474
|
+
__privateAdd(this, _schema, null);
|
|
44475
|
+
__privateAdd(this, _connectorUrl2, "");
|
|
44476
|
+
__privateAdd(this, _aiProcessor, null);
|
|
44477
|
+
__privateAdd(this, _tipPopup);
|
|
44478
|
+
this.attachShadow({ mode: "open" });
|
|
44479
|
+
}
|
|
44480
|
+
async connectedCallback() {
|
|
44481
|
+
__privateSet(this, _connectorUrl2, this.getAttribute("connector-url") || "http://localhost:3001");
|
|
44482
|
+
__privateMethod(this, _NineNatualQuery_instances, render_fn3).call(this);
|
|
44483
|
+
}
|
|
44484
|
+
}
|
|
44485
|
+
_schema = new WeakMap();
|
|
44486
|
+
_connectorUrl2 = new WeakMap();
|
|
44487
|
+
_aiProcessor = new WeakMap();
|
|
44488
|
+
_tipPopup = new WeakMap();
|
|
44489
|
+
_NineNatualQuery_instances = new WeakSet();
|
|
44490
|
+
runQuery_fn = async function(sql) {
|
|
44491
|
+
try {
|
|
44492
|
+
trace.log("🚀 쿼리 실행 요청:", sql);
|
|
44493
|
+
const response = await fetch(`${__privateGet(this, _connectorUrl2)}/api/query`, {
|
|
44494
|
+
method: "POST",
|
|
44495
|
+
headers: { "Content-Type": "application/json" },
|
|
44496
|
+
body: JSON.stringify({ sql })
|
|
44497
|
+
});
|
|
44498
|
+
trace.log(response);
|
|
44499
|
+
if (!response.ok) throw new Error("쿼리 실행 실패");
|
|
44500
|
+
const result = await response.json();
|
|
44501
|
+
if (result.success) {
|
|
44502
|
+
trace.log("✅ 쿼리 실행 결과:", result.data);
|
|
44503
|
+
return result.data;
|
|
44504
|
+
} else {
|
|
44505
|
+
throw new Error(result.error || "쿼리 실행 중 오류 발생");
|
|
44506
|
+
}
|
|
44507
|
+
} catch (error) {
|
|
44508
|
+
trace.error("❌ 쿼리 실행 실패:", error.message);
|
|
44509
|
+
}
|
|
44510
|
+
};
|
|
44511
|
+
render_fn3 = function() {
|
|
44512
|
+
const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
|
|
44513
|
+
this.shadowRoot.innerHTML = `
|
|
44514
|
+
<style>
|
|
44515
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.398"}/dist/css/nine-mu.css";
|
|
44516
|
+
${customImport}
|
|
44517
|
+
</style>
|
|
44518
|
+
|
|
44519
|
+
<div class="input-wrapper">
|
|
44520
|
+
<input type="text" placeholder="자연어로 질문을 입력하고 엔터를 누르세요.">
|
|
44521
|
+
<!-- CSS로 제어되는 워터마크 -->
|
|
44522
|
+
<a href="https://www.nine-lab.com" target="_blank" class="watermark-link">powered by nine-lab.com</a>
|
|
44523
|
+
</div>
|
|
44524
|
+
`;
|
|
44525
|
+
const input = this.shadowRoot.querySelector("input");
|
|
44526
|
+
if (customElements.get("nine-ai-tip-popup")) {
|
|
44527
|
+
__privateSet(this, _tipPopup, document.createElement("nine-ai-tip-popup"));
|
|
44528
|
+
this.shadowRoot.appendChild(__privateGet(this, _tipPopup));
|
|
44529
|
+
} else {
|
|
44530
|
+
trace.error("nine-ai-tip-popup 컴포넌트를 찾을 수 없습니다.");
|
|
44531
|
+
}
|
|
44532
|
+
input.addEventListener("keypress", (e) => {
|
|
44533
|
+
if (e.key === "Enter") {
|
|
44534
|
+
const question2 = e.target.value.trim();
|
|
44535
|
+
if (question2) {
|
|
44536
|
+
__privateMethod(this, _NineNatualQuery_instances, handleQuestion_fn).call(this, question2);
|
|
44537
|
+
e.target.value = "";
|
|
44538
|
+
}
|
|
44539
|
+
}
|
|
44540
|
+
});
|
|
44541
|
+
};
|
|
44542
|
+
handleQuestion_fn = async function(question2) {
|
|
44543
|
+
var _a2, _b;
|
|
44544
|
+
try {
|
|
44545
|
+
await ((_a2 = __privateGet(this, _tipPopup)) == null ? void 0 : _a2.popup());
|
|
44546
|
+
const response = await api.post(`/nine-mu/query/executeNaturalLanguageQuery`, {
|
|
44547
|
+
userInput: question2
|
|
44548
|
+
});
|
|
44549
|
+
trace.log(response);
|
|
44550
|
+
} catch (error) {
|
|
44551
|
+
trace.error("서버 통신 실패:", error);
|
|
44552
|
+
nine.alert("서버와 연결할 수 없습니다.").rgb().shake();
|
|
44553
|
+
} finally {
|
|
44554
|
+
(_b = __privateGet(this, _tipPopup)) == null ? void 0 : _b.close();
|
|
44555
|
+
}
|
|
44556
|
+
};
|
|
44557
|
+
if (!customElements.get("nine-natual-query")) {
|
|
44558
|
+
customElements.define("nine-natual-query", NineNatualQuery);
|
|
44559
|
+
}
|
|
44560
|
+
class NineNatualQueryResult extends HTMLElement {
|
|
44561
|
+
constructor() {
|
|
44562
|
+
super();
|
|
44563
|
+
__privateAdd(this, _NineNatualQueryResult_instances);
|
|
44564
|
+
// 내부 상태 및 상수 캡슐화
|
|
44565
|
+
__privateAdd(this, _data2, []);
|
|
44566
|
+
__privateAdd(this, _wrapper, null);
|
|
44567
|
+
__privateAdd(this, _gridContainer, null);
|
|
44568
|
+
this.attachShadow({ mode: "open" });
|
|
44569
|
+
}
|
|
44570
|
+
connectedCallback() {
|
|
44571
|
+
__privateMethod(this, _NineNatualQueryResult_instances, render_fn4).call(this);
|
|
44572
|
+
}
|
|
44573
|
+
/**
|
|
44574
|
+
* 외부 공개 메서드: 데이터 주입 및 그리드 갱신
|
|
44575
|
+
*/
|
|
44576
|
+
redraw(data) {
|
|
44577
|
+
__privateSet(this, _data2, data || []);
|
|
44578
|
+
__privateMethod(this, _NineNatualQueryResult_instances, updateGrid_fn).call(this);
|
|
44579
|
+
}
|
|
44580
|
+
}
|
|
44581
|
+
_data2 = new WeakMap();
|
|
44582
|
+
_wrapper = new WeakMap();
|
|
44583
|
+
_gridContainer = new WeakMap();
|
|
44584
|
+
_NineNatualQueryResult_instances = new WeakSet();
|
|
44585
|
+
/**
|
|
44586
|
+
* 내부 그리드 업데이트 로직 (Private)
|
|
44587
|
+
*/
|
|
44588
|
+
updateGrid_fn = function() {
|
|
44589
|
+
__privateSet(this, _wrapper, this.shadowRoot.querySelector(".result-wrapper"));
|
|
44590
|
+
__privateSet(this, _gridContainer, this.shadowRoot.querySelector("#grid-container"));
|
|
44591
|
+
if (!__privateGet(this, _wrapper) || !__privateGet(this, _gridContainer)) return;
|
|
44592
|
+
if (__privateGet(this, _data2).length === 0) {
|
|
44593
|
+
nine$1.alert("일치하는 검색 결과가 없습니다.").rgb().shake();
|
|
44594
|
+
return;
|
|
44595
|
+
}
|
|
44596
|
+
__privateGet(this, _wrapper).classList.remove("empty");
|
|
44597
|
+
__privateGet(this, _gridContainer).innerHTML = "";
|
|
44598
|
+
const keys = Object.keys(__privateGet(this, _data2)[0]);
|
|
44599
|
+
const gridHtml = __privateMethod(this, _NineNatualQueryResult_instances, generateGridHtml_fn).call(this, keys);
|
|
44600
|
+
__privateGet(this, _gridContainer).innerHTML = gridHtml;
|
|
44601
|
+
__privateMethod(this, _NineNatualQueryResult_instances, bindGridData_fn).call(this);
|
|
44602
|
+
};
|
|
44603
|
+
/**
|
|
44604
|
+
* nine-grid HTML 구조 생성 (Private)
|
|
44605
|
+
*/
|
|
44606
|
+
generateGridHtml_fn = function(keys) {
|
|
44607
|
+
return `
|
|
44608
|
+
<nine-grid
|
|
44609
|
+
caption="검색 결과"
|
|
44610
|
+
select-type="row"
|
|
44611
|
+
show-title-bar="true"
|
|
44612
|
+
show-menu-icon="true"
|
|
44613
|
+
show-status-bar="true"
|
|
44614
|
+
enable-fixed-col="true"
|
|
44615
|
+
row-resizable="false"
|
|
44616
|
+
col-movable="true"
|
|
44617
|
+
>
|
|
44618
|
+
<table>
|
|
44619
|
+
<colgroup>
|
|
44620
|
+
<col width="50" fixed="left" />
|
|
44621
|
+
${keys.map(() => `<col width="150"/>`).join("")}
|
|
44622
|
+
</colgroup>
|
|
44623
|
+
<thead>
|
|
44624
|
+
<tr>
|
|
44625
|
+
<th>No.</th>
|
|
44626
|
+
${keys.map((key) => `<th>${key.toUpperCase()}</th>`).join("")}
|
|
44627
|
+
</tr>
|
|
44628
|
+
</thead>
|
|
44629
|
+
<tbody>
|
|
44630
|
+
<tr>
|
|
44631
|
+
<th><ng-row-indicator/></th>
|
|
44632
|
+
${keys.map((key) => `<td data-bind="${key}"></td>`).join("")}
|
|
44633
|
+
</tr>
|
|
44634
|
+
</tbody>
|
|
44635
|
+
</table>
|
|
44636
|
+
</nine-grid>
|
|
44637
|
+
`;
|
|
44638
|
+
};
|
|
44639
|
+
/**
|
|
44640
|
+
* ninegrid2 라이브러리 엔진 바인딩 (Private)
|
|
44641
|
+
*/
|
|
44642
|
+
bindGridData_fn = function() {
|
|
44643
|
+
const newGrid = __privateGet(this, _gridContainer).querySelector("nine-grid");
|
|
44644
|
+
const attemptBind = () => {
|
|
44645
|
+
if (newGrid && newGrid.data) {
|
|
44646
|
+
newGrid.data.source = __privateGet(this, _data2);
|
|
44647
|
+
} else {
|
|
44648
|
+
setTimeout(attemptBind, 10);
|
|
44649
|
+
}
|
|
44650
|
+
};
|
|
44651
|
+
attemptBind();
|
|
44652
|
+
};
|
|
44653
|
+
/**
|
|
44654
|
+
* 초기 렌더링 및 스타일 주입 (Private)
|
|
44655
|
+
*/
|
|
44656
|
+
/**
|
|
44657
|
+
* 초기 렌더링 및 스타일 주입 (Private)
|
|
44658
|
+
*/
|
|
44659
|
+
render_fn4 = function() {
|
|
44660
|
+
const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
|
|
44661
|
+
this.shadowRoot.innerHTML = `
|
|
44662
|
+
<style>
|
|
44663
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.398"}/dist/css/nine-mu.css";
|
|
44664
|
+
${customImport}
|
|
44665
|
+
</style>
|
|
44666
|
+
|
|
44667
|
+
<div class="result-wrapper empty">
|
|
44668
|
+
<div id="grid-container"></div>
|
|
44669
|
+
|
|
44670
|
+
<!-- 깔끔한 안내 영역 -->
|
|
44671
|
+
<div id="no-result-container" class="no-result">
|
|
44672
|
+
<div class="main-message">Ready to Query with Nine AI</div>
|
|
44673
|
+
<div class="sub-message">
|
|
44674
|
+
검색창에 궁금한 데이터를 자연어로 입력해보세요.<br>
|
|
44675
|
+
AI가 즉시 분석하여 최적화된 데이타를 조회합니다.
|
|
44676
|
+
</div>
|
|
44677
|
+
</div>
|
|
44678
|
+
</div>
|
|
44679
|
+
`;
|
|
44680
|
+
};
|
|
44681
|
+
if (!customElements.get("nine-natual-query-result")) {
|
|
44682
|
+
customElements.define("nine-natual-query-result", NineNatualQueryResult);
|
|
44683
|
+
}
|
|
44469
44684
|
const ScreenContext = createContext();
|
|
44470
44685
|
const useScreen = () => useContext(ScreenContext);
|
|
44471
44686
|
const ScreenProvider = ({ children }) => {
|
|
@@ -44681,7 +44896,7 @@ function NineHook({ children, menuData, views, error404, onCatch, fallback, styl
|
|
|
44681
44896
|
);
|
|
44682
44897
|
}
|
|
44683
44898
|
const NineMu = {
|
|
44684
|
-
version: "0.1.
|
|
44899
|
+
version: "0.1.398",
|
|
44685
44900
|
init: (config2) => {
|
|
44686
44901
|
trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
|
|
44687
44902
|
}
|