diff --git a/src/main/java/com/eactive/testmaster/api/controller/MockApiController.java b/src/main/java/com/eactive/testmaster/api/controller/MockApiController.java index 186f7dd..94ecd55 100644 --- a/src/main/java/com/eactive/testmaster/api/controller/MockApiController.java +++ b/src/main/java/com/eactive/testmaster/api/controller/MockApiController.java @@ -8,6 +8,7 @@ import com.eactive.testmaster.api.entity.MockResponse; import com.eactive.testmaster.api.entity.MockRoute; import com.eactive.testmaster.api.service.MockRouteService; import java.io.IOException; +import java.net.URLDecoder; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -43,7 +44,7 @@ public class MockApiController { logger.debug("Request: " + request.getMethod() + " " + request.getUri()); logger.debug("Headers:" + request.getHeaders().toString()); logger.debug("Params: " + request.getParams().toString()); - logger.debug("Body: "); + logger.debug("Body: (URL Decoded)"); logger.debug(request.getBody()); logger.debug("==========================="); @@ -120,4 +121,16 @@ public class MockApiController { return true; } + public static void main(String[] args) { + String encodedString = "=%7B%22STDD_HEADER%22%3A%7B%22HEADER%22%3A%7B%22STDD_EMSG_LEN%22%3A%22%22%2C%22ECRY_CMPR_DV_CD%22%3A%22%22%2C%22GUID%22%3A%221%22%2C%22EMSG_REQ_DV_CD%22%3A%22S%22%2C%22EMSG_VER_NO%22%3A%22%22%2C%22FRST_DLV_IP%22%3A%22%22%2C%22TML_MAC_ADDR%22%3A%22%22%2C%22FRST_DLV_SYS_CD%22%3A%22%22%2C%22DLV_SYS_CD%22%3A%22%22%2C%22DLV_NODE_NO%22%3A%22%22%2C%22MCI_SSN_ID%22%3A%22%22%2C%22HDR_PRLM_CTNT%22%3A%22%22%7D%2C%22COMMON%22%3A%7B%22SCR_NO%22%3A%22%22%2C%22SVC_ID%22%3A%22SFW010014ZR%22%2C%22PCS_RESLT_DP_SVC_ID%22%3A%22%22%2C%22SYS_INTF_ID%22%3A%22%22%2C%22TS_SYNC_DV_CD%22%3A%22A%22%2C%22FIOS_DV_CD%22%3A%222%22%2C%22OTSD_CHN_ORG_CD%22%3A%22%22%2C%22SYS_OP_ENVR_DV_CD%22%3A%22%22%2C%22TS_TYP_DV_CD%22%3A%22%22%2C%22TS_TYP_DT_DV_CD%22%3A%22%22%2C%22ORTS_RESTOR_YN%22%3A%22%22%2C%22ORTS_GUID%22%3A%22%22%2C%22DPT_CD_V4%22%3A%22%22%2C%22PTCP_ORG_CD%22%3A%22%22%2C%22TML_NO%22%3A%22%22%2C%22USER_ID_V8%22%3A%22%22%2C%22BSNS_YMD%22%3A%22%22%2C%22SYS_YMD%22%3A%22%22%2C%22SYS_HMS_V8%22%3A%22%22%2C%22EMSG_REQ_YMD%22%3A%22%22%2C%22EMSG_REQ_TIME%22%3A%22%22%2C%22PCS_RESLT_DV_CD%22%3A%22%22%2C%22PRT_EMSG_TYP_CD%22%3A%22%22%2C%22LRQN_PRT_HALT_TGT_YN%22%3A%22%22%2C%22EMSG_CNTNTN_SEQ%22%3A%22%22%2C%22DTYR_APRV_PCS_STT_CD%22%3A%22%22%2C%22DTYR_APRV_DLR_DV_CD%22%3A%22%22%2C%22CLSNG_KIND_CD%22%3A%22%22%2C%22DTYR_TS_SEQ%22%3A%22%22%2C%22APRV_CNNR_ID%22%3A%22%22%2C%22DTYR_PWD%22%3A%22%22%2C%22OTP_SEQ%22%3A%22%22%2C%22OTP_CERT_NO%22%3A%22%22%2C%22ERR_CD_V9%22%3A%22%22%2C%22ERR_SYS_CD%22%3A%22%22%2C%22MST_SCR_NO%22%3A%22%22%2C%22COM_PRLM_CTNT%22%3A%22%22%7D%7D%2C%22STDD_DATA%22%3A%7B%22HEADER%22%3A%7B%22DATA_HDR_KIND_CD%22%3A%22%22%2C%22DATA_HDR_LEN%22%3A%22%22%7D%2C%22DATA%22%3A%7B%22FICdtTrf%22%3A%7B%22GrpHdr%22%3A%7B%22MsgId%22%3A%22FFFF%2F151022-SEK%2F110%22%2C%22CreDtTm%22%3A%222015-10-22T10%3A11%3A00%2B09%3A00%22%2C%22NbOfTxs%22%3A%221%22%2C%22SttlmInf%22%3A%7B%22SttlmMtd%22%3A%22CLRG%22%2C%22ClrSys%22%3A%7B%22Cd%22%3A%22BOK%22%7D%7D%7D%2C%22CdtTrfTxInf%22%3A%7B%22PmtId%22%3A%7B%22InstrId%22%3A%22FFFF%2F151022-SEK%2F110%2F1%22%2C%22EndToEndId%22%3A%22BBBBTT4148AAAAPP%22%2C%22UETR%22%3A%22f47ac10b-58cc-4372-a567-0e02b2c3d479%22%7D%2C%22PmtTpInf%22%3A%7B%22InstrPrty%22%3Anull%2C%22SvcLvl%22%3A%7B%22Cd%22%3A%22Cd%22%2C%22Prtry%22%3Anull%7D%7D%2C%22IntrBkSttlmAmt%22%3Anull%2C%22IntrBkSttlmDt%22%3A%222001-01-01%22%2C%22InstgAgt%22%3A%7B%22FinInstnId%22%3A%7B%22BICFI%22%3Anull%2C%22ClrSysMmbId%22%3A%7B%22ClrSysId%22%3A%7B%22Cd%22%3A%22KRBOK%22%7D%2C%22MmbId%22%3A%22MmbId%22%7D%2C%22LEI%22%3Anull%7D%7D%2C%22Dbtr%22%3A%7B%22FinInstnId%22%3A%7B%22BICFI%22%3Anull%2C%22ClrSysMmbId%22%3A%7B%22ClrSysId%22%3A%7B%22Cd%22%3A%22KRBOK%22%7D%2C%22MmbId%22%3A%22MmbId%22%7D%7D%7D%2C%22Cdtr%22%3A%5B%7B%22FinInstnId%22%3A%7B%22BICFI%22%3Anull%2C%22ClrSysMmbId%22%3A%7B%22ClrSysId%22%3A%7B%22Cd%22%3A%22KRBOK%22%7D%2C%22MmbId%22%3A%22MmbId%22%7D%7D%7D%2C%7B%22FinInstnId%22%3A%7B%22BICFI%22%3Anull%2C%22ClrSysMmbId%22%3A%7B%22ClrSysId%22%3A%7B%22Cd%22%3A%22KRBOK1%22%7D%2C%22MmbId%22%3A%22MmbId1%22%7D%7D%7D%5D%7D%7D%7D%7D%7D"; + + try { +// String decodedString = URLDecoder.decode(encodedString, StandardCharsets.UTF_8.name()); + String decodedString = URLDecoder.decode(encodedString); + System.out.println("Decoded string: " + decodedString); + } catch (Exception e) { + e.printStackTrace(); + } + } + } diff --git a/src/main/java/com/eactive/testmaster/api/dto/MockRequest.java b/src/main/java/com/eactive/testmaster/api/dto/MockRequest.java index 1a1715d..90dff46 100644 --- a/src/main/java/com/eactive/testmaster/api/dto/MockRequest.java +++ b/src/main/java/com/eactive/testmaster/api/dto/MockRequest.java @@ -1,6 +1,8 @@ package com.eactive.testmaster.api.dto; import java.io.IOException; +import java.net.URLDecoder; +import java.net.URLEncoder; import java.util.Collections; import java.util.HashMap; import java.util.Map; @@ -11,7 +13,7 @@ public class MockRequest { public static Map parseQueryString(HttpServletRequest request) { Map queryParams = new HashMap<>(); - String queryString = request.getQueryString(); + String queryString = URLDecoder.decode(request.getQueryString()); if (queryString != null) { String[] queryParamsArr = queryString.split("&"); for (String queryParam : queryParamsArr) { @@ -36,7 +38,7 @@ public class MockRequest { this.params = parseQueryString(request); - this.body = request.getReader().lines().collect(Collectors.joining(System.lineSeparator())); + this.body = URLDecoder.decode(request.getReader().lines().collect(Collectors.joining(System.lineSeparator()))); } private String uri; diff --git a/src/main/resources/static/plugins/apitestmanager/app.bundle.js b/src/main/resources/static/plugins/apitestmanager/app.bundle.js index 5296276..8af18e9 100644 --- a/src/main/resources/static/plugins/apitestmanager/app.bundle.js +++ b/src/main/resources/static/plugins/apitestmanager/app.bundle.js @@ -609,7 +609,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _EditableInput__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./EditableInput */ \"./src/components/EditableInput.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = \"function\" == typeof Symbol ? Symbol : {}, a = i.iterator || \"@@iterator\", c = i.asyncIterator || \"@@asyncIterator\", u = i.toStringTag || \"@@toStringTag\"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, \"\"); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, \"_invoke\", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: \"normal\", arg: t.call(e, r) }; } catch (t) { return { type: \"throw\", arg: t }; } } e.wrap = wrap; var h = \"suspendedStart\", l = \"suspendedYield\", f = \"executing\", s = \"completed\", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { [\"next\", \"throw\", \"return\"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if (\"throw\" !== c.type) { var u = c.arg, h = u.value; return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) { invoke(\"next\", t, i, a); }, function (t) { invoke(\"throw\", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke(\"throw\", t, i, a); }); } a(c.arg); } var r; o(this, \"_invoke\", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error(\"Generator is already running\"); if (o === s) { if (\"throw\" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else \"return\" === n.method && n.abrupt(\"return\", n.arg); o = f; var p = tryCatch(e, r, n); if (\"normal\" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y; var i = tryCatch(o, e.iterator, r.arg); if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = \"normal\", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: \"root\" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || \"\" === e) { var r = e[a]; if (r) return r.call(e); if (\"function\" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + \" is not iterable\"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) { var e = \"function\" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () { return this; }), define(g, \"toString\", function () { return \"[object Generator]\"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if (\"throw\" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if (\"root\" === i.tryLoc) return handle(\"end\"); if (i.tryLoc <= this.prev) { var c = n.call(i, \"catchLoc\"), u = n.call(i, \"finallyLoc\"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error(\"try statement without catch or finally\"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) { var i = o; break; } } i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if (\"throw\" === t.type) throw t.arg; return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, \"catch\": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if (\"throw\" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, \"next\" === this.method && (this.arg = t), y; } }, e; }\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar LayoutGridModel = /*#__PURE__*/_createClass(function LayoutGridModel(items) {\n _classCallCheck(this, LayoutGridModel);\n this.items = items;\n});\nvar LayoutGridView = /*#__PURE__*/function () {\n function LayoutGridView(model, controller) {\n _classCallCheck(this, LayoutGridView);\n this.model = model;\n this.controller = controller;\n }\n _createClass(LayoutGridView, [{\n key: \"render\",\n value: function render() {\n this.renderApiLayout();\n }\n }, {\n key: \"renderApiLayout\",\n value: function renderApiLayout() {\n var _this = this;\n var requestContainer = this.targetContent.find('.request_layout');\n requestContainer.empty();\n var headerHtml = \"\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \";\n var footerHtml = \"\\n \\n
#IDParent\\uD56D\\uBAA9\\uBA85(\\uC601\\uBB38)\\uD56D\\uBAA9\\uC124\\uBA85\\uAE4A\\uC774\\uC544\\uC774\\uD15C \\uC720\\uD615\\uBC18\\uBCF5 \\uD69F\\uC218 \\uBC18\\uBCF5 \\uCC38\\uC870 \\uD544\\uB4DC\\uB370\\uC774\\uD130 \\uAE38\\uC774\\uAC12\\uBE44\\uACE0
\\n \";\n var fieldsHtml = this.model.items ? this.model.items.map(function (item, index) {\n return _this.renderApiLayoutItem(item, index);\n }).join('') : '';\n requestContainer.append(headerHtml + fieldsHtml + footerHtml);\n requestContainer.find('.editable').each(function (index, editableElement) {\n var editableInput = new _EditableInput__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({\n name: editableElement.dataset.name,\n value: editableElement.dataset.value,\n style: {\n width: '120px'\n }\n });\n editableInput.init(editableElement, /*#__PURE__*/function () {\n var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(value) {\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _.set(_this.model, editableElement.dataset.name, value);\n _context.next = 3;\n return _this.controller.additionalCallback(_this.model);\n case 3:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return function (_x) {\n return _ref.apply(this, arguments);\n };\n }());\n });\n var totalLength = 0;\n this.model.items.forEach(function (item) {\n totalLength += parseInt(item.loutItemLength);\n });\n this.setupListeners();\n }\n }, {\n key: \"getFieldValue\",\n value: function getFieldValue(element) {\n if ($(element).is('select') || $(element).is('input[type=\"text\"]') || $(element).is('input[type=\"number\"]')) {\n return $(element).val();\n }\n if ($(element).is('input[type=\"checkbox\"]')) {\n return $(element).is(':checked');\n }\n }\n }, {\n key: \"recalculateSerno\",\n value: function recalculateSerno() {\n // Reassign loutItemSerno sequentially based on the current order\n this.model.items.forEach(function (item, index) {\n item.loutItemSerno = index + 1; // Assuming you want to start numbering from 1\n });\n }\n }, {\n key: \"handleUIUpdate\",\n value: function () {\n var _handleUIUpdate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(event) {\n var element, fieldName, newValue, totalLength;\n return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n if (!event) {\n _context2.next = 9;\n break;\n }\n event.preventDefault();\n element = event.currentTarget;\n fieldName = $(element).attr('name');\n newValue = this.getFieldValue(element);\n if (!(fieldName !== '')) {\n _context2.next = 9;\n break;\n }\n _.set(this.model, fieldName, newValue);\n _context2.next = 9;\n return this.controller.additionalCallback(this.model);\n case 9:\n totalLength = 0;\n this.model.items.forEach(function (item) {\n totalLength += parseInt(item.loutItemLength);\n });\n case 11:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2, this);\n }));\n function handleUIUpdate(_x2) {\n return _handleUIUpdate.apply(this, arguments);\n }\n return handleUIUpdate;\n }()\n }, {\n key: \"getLastId\",\n value: function getLastId() {\n var lastId = 0;\n this.model.items.forEach(function (item) {\n if (item.id > lastId) {\n lastId = item.id;\n }\n });\n return lastId + 1;\n }\n }, {\n key: \"setupListeners\",\n value: function setupListeners() {\n var _this2 = this;\n var table = this.targetContent.find('.layout_table');\n table.on('change', 'select.field, input.field', this.handleUIUpdate.bind(this));\n table.on('click', '.add-layout-item', /*#__PURE__*/function () {\n var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(event) {\n var item;\n return _regeneratorRuntime().wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n item = {\n 'id': _this2.getLastId(),\n 'parent': 0,\n 'level': 1,\n 'loutName': '',\n 'loutItemName': '',\n 'loutItemDesc': '',\n 'loutItemDepth': 1,\n 'loutItemType': 'Field',\n 'loutItemOccCnt': '',\n 'loutItemOccRef': '',\n 'loutItemDataType': 'String',\n 'loutItemLength': 1,\n 'loutItemDecimal': 0,\n 'loutItemDefault': '',\n 'loutItemMaskYn': 'N',\n 'loutItemMaskOffset': 0,\n 'loutItemMaskLength': 0,\n 'parentLoutItemIndex': 0,\n 'expanded': true,\n 'isLeaf': true,\n 'LOUTITEMPATH': '',\n 'value': '',\n 'loutItemSerno': 0\n };\n _this2.model.items.push(item);\n _this2.recalculateSerno();\n _this2.renderApiLayout();\n _context3.next = 6;\n return _this2.controller.additionalCallback(_this2.model);\n case 6:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }));\n return function (_x3) {\n return _ref2.apply(this, arguments);\n };\n }());\n table.on('click', '.move-up', /*#__PURE__*/function () {\n var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(event) {\n var index, temp;\n return _regeneratorRuntime().wrap(function _callee4$(_context4) {\n while (1) switch (_context4.prev = _context4.next) {\n case 0:\n index = $(event.currentTarget).data('index');\n if (!(index > 0)) {\n _context4.next = 9;\n break;\n }\n temp = _this2.model.items[index];\n _this2.model.items[index] = _this2.model.items[index - 1];\n _this2.model.items[index - 1] = temp;\n _this2.recalculateSerno();\n _this2.renderApiLayout();\n _context4.next = 9;\n return _this2.controller.additionalCallback(_this2.model);\n case 9:\n case \"end\":\n return _context4.stop();\n }\n }, _callee4);\n }));\n return function (_x4) {\n return _ref3.apply(this, arguments);\n };\n }());\n table.on('click', '.move-down', /*#__PURE__*/function () {\n var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(event) {\n var index, temp;\n return _regeneratorRuntime().wrap(function _callee5$(_context5) {\n while (1) switch (_context5.prev = _context5.next) {\n case 0:\n index = $(event.currentTarget).data('index');\n if (!(index < _this2.model.items.length - 1)) {\n _context5.next = 9;\n break;\n }\n temp = _this2.model.items[index];\n _this2.model.items[index] = _this2.model.items[index + 1];\n _this2.model.items[index + 1] = temp;\n _this2.recalculateSerno();\n _this2.renderApiLayout();\n _context5.next = 9;\n return _this2.controller.additionalCallback(_this2.model);\n case 9:\n case \"end\":\n return _context5.stop();\n }\n }, _callee5);\n }));\n return function (_x5) {\n return _ref4.apply(this, arguments);\n };\n }());\n table.on('click', '.delete', /*#__PURE__*/function () {\n var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(event) {\n var index;\n return _regeneratorRuntime().wrap(function _callee6$(_context6) {\n while (1) switch (_context6.prev = _context6.next) {\n case 0:\n index = $(event.currentTarget).data('index');\n _this2.model.items.splice(index, 1);\n _this2.recalculateSerno();\n _this2.renderApiLayout();\n _context6.next = 6;\n return _this2.controller.additionalCallback(_this2.model);\n case 6:\n case \"end\":\n return _context6.stop();\n }\n }, _callee6);\n }));\n return function (_x6) {\n return _ref5.apply(this, arguments);\n };\n }());\n }\n }, {\n key: \"renderApiLayoutItem\",\n value: function renderApiLayoutItem(item, index) {\n if (item.value === null) {\n item.value = '';\n }\n return \"\\n \\n \\n \".concat(item.loutItemSerno, \"\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \").concat(item.loutItemType === 'Field' ? \"
\") : '', \"\\n \\n \\n
\\n \\n \\n \\n
\\n \\n \\n \");\n }\n }]);\n return LayoutGridView;\n}();\nvar LayoutGridController = /*#__PURE__*/function () {\n function LayoutGridController(model) {\n _classCallCheck(this, LayoutGridController);\n this.model = model;\n this.view = new LayoutGridView(this.model, this);\n }\n _createClass(LayoutGridController, [{\n key: \"init\",\n value: function init(targetContent, callback) {\n this.additionalCallback = callback;\n this.view.targetContent = targetContent;\n this.view.render();\n }\n }]);\n return LayoutGridController;\n}();\nvar LayoutGrid = /*#__PURE__*/function () {\n function LayoutGrid(layout) {\n _classCallCheck(this, LayoutGrid);\n this.model = new LayoutGridModel(layout.layoutItems);\n this.controller = new LayoutGridController(this.model);\n }\n _createClass(LayoutGrid, [{\n key: \"init\",\n value: function init(targetContent, callback) {\n this.controller.init(targetContent, callback);\n }\n }]);\n return LayoutGrid;\n}();\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LayoutGrid);\n\n//# sourceURL=webpack://APITestManager/./src/components/LayoutGrid.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _EditableInput__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./EditableInput */ \"./src/components/EditableInput.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = \"function\" == typeof Symbol ? Symbol : {}, a = i.iterator || \"@@iterator\", c = i.asyncIterator || \"@@asyncIterator\", u = i.toStringTag || \"@@toStringTag\"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, \"\"); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, \"_invoke\", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: \"normal\", arg: t.call(e, r) }; } catch (t) { return { type: \"throw\", arg: t }; } } e.wrap = wrap; var h = \"suspendedStart\", l = \"suspendedYield\", f = \"executing\", s = \"completed\", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { [\"next\", \"throw\", \"return\"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if (\"throw\" !== c.type) { var u = c.arg, h = u.value; return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) { invoke(\"next\", t, i, a); }, function (t) { invoke(\"throw\", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke(\"throw\", t, i, a); }); } a(c.arg); } var r; o(this, \"_invoke\", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error(\"Generator is already running\"); if (o === s) { if (\"throw\" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else \"return\" === n.method && n.abrupt(\"return\", n.arg); o = f; var p = tryCatch(e, r, n); if (\"normal\" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y; var i = tryCatch(o, e.iterator, r.arg); if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = \"normal\", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: \"root\" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || \"\" === e) { var r = e[a]; if (r) return r.call(e); if (\"function\" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + \" is not iterable\"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) { var e = \"function\" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () { return this; }), define(g, \"toString\", function () { return \"[object Generator]\"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if (\"throw\" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if (\"root\" === i.tryLoc) return handle(\"end\"); if (i.tryLoc <= this.prev) { var c = n.call(i, \"catchLoc\"), u = n.call(i, \"finallyLoc\"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error(\"try statement without catch or finally\"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) { var i = o; break; } } i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if (\"throw\" === t.type) throw t.arg; return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, \"catch\": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if (\"throw\" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, \"next\" === this.method && (this.arg = t), y; } }, e; }\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar LayoutGridModel = /*#__PURE__*/_createClass(function LayoutGridModel(items) {\n _classCallCheck(this, LayoutGridModel);\n this.items = items;\n});\nvar LayoutGridView = /*#__PURE__*/function () {\n function LayoutGridView(model, controller) {\n _classCallCheck(this, LayoutGridView);\n this.model = model;\n this.controller = controller;\n }\n _createClass(LayoutGridView, [{\n key: \"render\",\n value: function render() {\n this.renderApiLayout();\n }\n }, {\n key: \"renderApiLayout\",\n value: function renderApiLayout() {\n var _this = this;\n var requestContainer = this.targetContent.find('.request_layout');\n requestContainer.empty();\n var headerHtml = \"\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \";\n var footerHtml = \"\\n \\n
#IDParent\\uD56D\\uBAA9\\uBA85(\\uC601\\uBB38)\\uD56D\\uBAA9\\uC124\\uBA85\\uAE4A\\uC774\\uC544\\uC774\\uD15C \\uC720\\uD615\\uBC18\\uBCF5 \\uD69F\\uC218 \\uBC18\\uBCF5 \\uCC38\\uC870 \\uD544\\uB4DC\\uB370\\uC774\\uD130 \\uAE38\\uC774\\uAC12\\uBE44\\uACE0
\\n \";\n var fieldsHtml = this.model.items ? this.model.items.map(function (item, index) {\n return _this.renderApiLayoutItem(item, index);\n }).join('') : '';\n requestContainer.append(headerHtml + fieldsHtml + footerHtml);\n requestContainer.find('.editable').each(function (index, editableElement) {\n var editableInput = new _EditableInput__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({\n name: editableElement.dataset.name,\n value: editableElement.dataset.value,\n style: {\n width: '120px'\n }\n });\n editableInput.init(editableElement, /*#__PURE__*/function () {\n var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(value) {\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _.set(_this.model, editableElement.dataset.name, value);\n _context.next = 3;\n return _this.controller.additionalCallback(_this.model);\n case 3:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return function (_x) {\n return _ref.apply(this, arguments);\n };\n }());\n });\n var totalLength = 0;\n this.model.items.forEach(function (item) {\n totalLength += parseInt(item.loutItemLength);\n });\n this.setupListeners();\n }\n }, {\n key: \"getFieldValue\",\n value: function getFieldValue(element) {\n if ($(element).is('select') || $(element).is('input[type=\"text\"]') || $(element).is('input[type=\"number\"]')) {\n return $(element).val();\n }\n if ($(element).is('input[type=\"checkbox\"]')) {\n return $(element).is(':checked');\n }\n }\n }, {\n key: \"recalculateSerno\",\n value: function recalculateSerno() {\n // Reassign loutItemSerno sequentially based on the current order\n this.model.items.forEach(function (item, index) {\n item.loutItemSerno = index + 1; // Assuming you want to start numbering from 1\n });\n }\n }, {\n key: \"handleUIUpdate\",\n value: function () {\n var _handleUIUpdate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(event) {\n var element, fieldName, newValue, totalLength;\n return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n if (!event) {\n _context2.next = 9;\n break;\n }\n event.preventDefault();\n element = event.currentTarget;\n fieldName = $(element).attr('name');\n newValue = this.getFieldValue(element);\n if (!(fieldName !== '')) {\n _context2.next = 9;\n break;\n }\n _.set(this.model, fieldName, newValue);\n _context2.next = 9;\n return this.controller.additionalCallback(this.model);\n case 9:\n totalLength = 0;\n this.model.items.forEach(function (item) {\n totalLength += parseInt(item.loutItemLength);\n });\n case 11:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2, this);\n }));\n function handleUIUpdate(_x2) {\n return _handleUIUpdate.apply(this, arguments);\n }\n return handleUIUpdate;\n }()\n }, {\n key: \"getLastId\",\n value: function getLastId() {\n var lastId = 0;\n this.model.items.forEach(function (item) {\n if (item.id > lastId) {\n lastId = item.id;\n }\n });\n return lastId + 1;\n }\n }, {\n key: \"setupListeners\",\n value: function setupListeners() {\n var _this2 = this;\n var table = this.targetContent.find('.layout_table');\n table.on('change', 'select.field, input.field', this.handleUIUpdate.bind(this));\n table.on('click', '.add-layout-item', /*#__PURE__*/function () {\n var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(event) {\n var item;\n return _regeneratorRuntime().wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n item = {\n 'id': _this2.getLastId(),\n 'parent': 0,\n 'level': 1,\n 'loutName': '',\n 'loutItemName': '',\n 'loutItemDesc': '',\n 'loutItemDepth': 1,\n 'loutItemType': 'Field',\n 'loutItemOccCnt': '',\n 'loutItemOccRef': '',\n 'loutItemDataType': 'String',\n 'loutItemLength': 1,\n 'loutItemDecimal': 0,\n 'loutItemDefault': '',\n 'loutItemMaskYn': 'N',\n 'loutItemMaskOffset': 0,\n 'loutItemMaskLength': 0,\n 'parentLoutItemIndex': 0,\n 'expanded': true,\n 'isLeaf': true,\n 'LOUTITEMPATH': '',\n 'value': '',\n 'loutItemSerno': 0\n };\n _this2.model.items.push(item);\n _this2.recalculateSerno();\n _this2.renderApiLayout();\n _context3.next = 6;\n return _this2.controller.additionalCallback(_this2.model);\n case 6:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }));\n return function (_x3) {\n return _ref2.apply(this, arguments);\n };\n }());\n table.on('click', '.move-up', /*#__PURE__*/function () {\n var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(event) {\n var index, temp;\n return _regeneratorRuntime().wrap(function _callee4$(_context4) {\n while (1) switch (_context4.prev = _context4.next) {\n case 0:\n index = $(event.currentTarget).data('index');\n if (!(index > 0)) {\n _context4.next = 9;\n break;\n }\n temp = _this2.model.items[index];\n _this2.model.items[index] = _this2.model.items[index - 1];\n _this2.model.items[index - 1] = temp;\n _this2.recalculateSerno();\n _this2.renderApiLayout();\n _context4.next = 9;\n return _this2.controller.additionalCallback(_this2.model);\n case 9:\n case \"end\":\n return _context4.stop();\n }\n }, _callee4);\n }));\n return function (_x4) {\n return _ref3.apply(this, arguments);\n };\n }());\n table.on('click', '.move-down', /*#__PURE__*/function () {\n var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(event) {\n var index, temp;\n return _regeneratorRuntime().wrap(function _callee5$(_context5) {\n while (1) switch (_context5.prev = _context5.next) {\n case 0:\n index = $(event.currentTarget).data('index');\n if (!(index < _this2.model.items.length - 1)) {\n _context5.next = 9;\n break;\n }\n temp = _this2.model.items[index];\n _this2.model.items[index] = _this2.model.items[index + 1];\n _this2.model.items[index + 1] = temp;\n _this2.recalculateSerno();\n _this2.renderApiLayout();\n _context5.next = 9;\n return _this2.controller.additionalCallback(_this2.model);\n case 9:\n case \"end\":\n return _context5.stop();\n }\n }, _callee5);\n }));\n return function (_x5) {\n return _ref4.apply(this, arguments);\n };\n }());\n table.on('click', '.delete', /*#__PURE__*/function () {\n var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(event) {\n var index;\n return _regeneratorRuntime().wrap(function _callee6$(_context6) {\n while (1) switch (_context6.prev = _context6.next) {\n case 0:\n index = $(event.currentTarget).data('index');\n _this2.model.items.splice(index, 1);\n _this2.recalculateSerno();\n _this2.renderApiLayout();\n _context6.next = 6;\n return _this2.controller.additionalCallback(_this2.model);\n case 6:\n case \"end\":\n return _context6.stop();\n }\n }, _callee6);\n }));\n return function (_x6) {\n return _ref5.apply(this, arguments);\n };\n }());\n }\n }, {\n key: \"renderApiLayoutItem\",\n value: function renderApiLayoutItem(item, index) {\n if (item.value === null) {\n item.value = '';\n }\n return \"\\n \\n \\n \".concat(item.loutItemSerno, \"\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \").concat(item.loutItemType === 'Field' ? \"
\") : '', \"\\n \\n \\n
\\n \\n \\n \\n
\\n \\n \\n \");\n }\n }]);\n return LayoutGridView;\n}();\nvar LayoutGridController = /*#__PURE__*/function () {\n function LayoutGridController(model) {\n _classCallCheck(this, LayoutGridController);\n this.model = model;\n this.view = new LayoutGridView(this.model, this);\n }\n _createClass(LayoutGridController, [{\n key: \"init\",\n value: function init(targetContent, callback) {\n this.additionalCallback = callback;\n this.view.targetContent = targetContent;\n this.view.render();\n }\n }]);\n return LayoutGridController;\n}();\nvar LayoutGrid = /*#__PURE__*/function () {\n function LayoutGrid(layout) {\n _classCallCheck(this, LayoutGrid);\n this.model = new LayoutGridModel(layout.layoutItems);\n this.controller = new LayoutGridController(this.model);\n }\n _createClass(LayoutGrid, [{\n key: \"init\",\n value: function init(targetContent, callback) {\n this.controller.init(targetContent, callback);\n }\n }]);\n return LayoutGrid;\n}();\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LayoutGrid);\n\n//# sourceURL=webpack://APITestManager/./src/components/LayoutGrid.js?"); /***/ }), @@ -631,7 +631,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _EditableInput__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./EditableInput */ \"./src/components/EditableInput.js\");\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = \"function\" == typeof Symbol ? Symbol : {}, a = i.iterator || \"@@iterator\", c = i.asyncIterator || \"@@asyncIterator\", u = i.toStringTag || \"@@toStringTag\"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, \"\"); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, \"_invoke\", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: \"normal\", arg: t.call(e, r) }; } catch (t) { return { type: \"throw\", arg: t }; } } e.wrap = wrap; var h = \"suspendedStart\", l = \"suspendedYield\", f = \"executing\", s = \"completed\", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { [\"next\", \"throw\", \"return\"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if (\"throw\" !== c.type) { var u = c.arg, h = u.value; return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) { invoke(\"next\", t, i, a); }, function (t) { invoke(\"throw\", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke(\"throw\", t, i, a); }); } a(c.arg); } var r; o(this, \"_invoke\", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error(\"Generator is already running\"); if (o === s) { if (\"throw\" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else \"return\" === n.method && n.abrupt(\"return\", n.arg); o = f; var p = tryCatch(e, r, n); if (\"normal\" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y; var i = tryCatch(o, e.iterator, r.arg); if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = \"normal\", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: \"root\" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || \"\" === e) { var r = e[a]; if (r) return r.call(e); if (\"function\" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + \" is not iterable\"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) { var e = \"function\" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () { return this; }), define(g, \"toString\", function () { return \"[object Generator]\"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if (\"throw\" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if (\"root\" === i.tryLoc) return handle(\"end\"); if (i.tryLoc <= this.prev) { var c = n.call(i, \"catchLoc\"), u = n.call(i, \"finallyLoc\"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error(\"try statement without catch or finally\"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) { var i = o; break; } } i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if (\"throw\" === t.type) throw t.arg; return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, \"catch\": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if (\"throw\" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, \"next\" === this.method && (this.arg = t), y; } }, e; }\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n\nvar LayoutTreeGridModel = /*#__PURE__*/function () {\n function LayoutTreeGridModel(root) {\n _classCallCheck(this, LayoutTreeGridModel);\n this.root = root;\n this.rootId = root.id;\n }\n _createClass(LayoutTreeGridModel, [{\n key: \"setRoot\",\n value: function setRoot(newRoot) {\n this.root = newRoot;\n }\n }, {\n key: \"getNodePath\",\n value: function getNodePath(node, targetId) {\n var path = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : \"\";\n // Check if the current node is the target node\n if (node.id === targetId) {\n return path;\n }\n\n // If the current node has children, iterate over them\n if (node.children) {\n for (var i = 0; i < node.children.length; i++) {\n // Construct the path to the current child\n var currentPath = path ? \"\".concat(path, \".children[\").concat(i, \"]\") : \"children[\".concat(i, \"]\");\n\n // Recursively call findPath on the child\n var resultPath = this.getNodePath(node.children[i], targetId, currentPath);\n\n // If resultPath is not null, the target has been found in the subtree\n if (resultPath) {\n return resultPath;\n }\n }\n }\n\n // Return null if the target is not found in this subtree\n return null;\n }\n }]);\n return LayoutTreeGridModel;\n}();\nvar LayoutTreeGridView = /*#__PURE__*/function () {\n function LayoutTreeGridView(selector) {\n _classCallCheck(this, LayoutTreeGridView);\n this.selector = selector;\n this.table = $('').appendTo($(this.selector));\n this.table.addClass('layout_table');\n this.table.css({\n 'width': 'inherit',\n 'border-collapse': 'collapse',\n 'border': '1px gray solid'\n });\n this.init();\n }\n _createClass(LayoutTreeGridView, [{\n key: \"init\",\n value: function init() {\n this.table.children().remove();\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.init();\n }\n }, {\n key: \"addHeaders\",\n value: function addHeaders(fields) {\n var thead = $('').appendTo(this.table);\n var tr = $('').appendTo(thead);\n tr.addClass('layout-grid-row');\n fields.forEach(function (field) {\n var th = $('').addClass('treegrid-' + node.id).data('nodeId', node.id); // Storing node ID for easy access later\n\n if (depth === 0) {\n tr.css({\n 'display': 'none'\n });\n }\n if (node.parent || node.parent !== null && parseInt(node.parent) !== this.model.rootId) {\n var parentSelector = \".treegrid-\".concat(node.parent);\n var lastChildSelector = \".treegrid-parent-\".concat(node.parent);\n if ($(this.view.table).find(lastChildSelector).length > 0) {\n var lastChild = $(this.view.table).find(lastChildSelector).last();\n console.log('lastChild: ', lastChild);\n tr.insertAfter(lastChild);\n } else {\n console.log('parentSelector: ', parentSelector);\n tr.insertAfter($(this.view.table).find(parentSelector));\n }\n tr.addClass('treegrid-parent-' + node.parent);\n } else {\n console.log('no parent');\n tr.appendTo(this.view.table);\n }\n console.log('addRow, node: ', node.id, ' parent: ', node.parent);\n console.log('addRow tr: ', tr);\n return tr;\n }\n }, {\n key: \"addCell\",\n value: function addCell(row, node, fieldInfo, depth) {\n var td = $('
').html(field.label).appendTo(tr);\n th.css({\n 'width': field.width + 'px',\n 'border': '1px gray solid',\n 'text-align': 'center'\n });\n });\n }\n }, {\n key: \"toggleChildrenVisibility\",\n value: function toggleChildrenVisibility(nodeId, isExpanded) {\n var _this = this;\n var selector = \".treegrid-parent-\".concat(nodeId);\n $(selector).each(function (_, el) {\n $(el).toggle(!isExpanded);\n if (isExpanded) {\n // If we are hiding the children\n var childNodeId = $(el).data('nodeId'); // Assume data-nodeId is set when rows are created\n _this.toggleChildrenVisibility(childNodeId, true); // Recursively hide all descendants\n var expander = $(\".treegrid-\".concat(nodeId, \" .treegrid-expander\"));\n expander.html(isExpanded ? '+' : '-');\n }\n });\n }\n }, {\n key: \"setupExpander\",\n value: function setupExpander(cell, callback) {\n var expander = $('').addClass('treegrid-expander').html('-').appendTo(cell);\n expander.click(callback);\n }\n }]);\n return LayoutTreeGridView;\n}();\nvar LayoutTreeGridController = /*#__PURE__*/function () {\n function LayoutTreeGridController(model, view, options, callback) {\n _classCallCheck(this, LayoutTreeGridController);\n this.model = model;\n this.view = view;\n this.options = options;\n this.callback = callback;\n this.init();\n }\n _createClass(LayoutTreeGridController, [{\n key: \"init\",\n value: function init() {\n var _this2 = this;\n this.view.addHeaders(this.options);\n this.processNode(this.model.root, 0);\n this.view.table.find('.editable').each(function (index, editableElement) {\n var editableInput = new _EditableInput__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({\n name: editableElement.dataset.name,\n value: editableElement.dataset.value,\n path: editableElement.dataset.path\n });\n editableInput.init(editableElement, /*#__PURE__*/function () {\n var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(value) {\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _.set(_this2.model.root, editableElement.dataset.path, value);\n _this2.callback(_this2.model.root);\n case 2:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return function (_x) {\n return _ref.apply(this, arguments);\n };\n }());\n });\n }\n }, {\n key: \"getIndent\",\n value: function getIndent(depth) {\n return new Array(depth + 1).join('');\n }\n }, {\n key: \"addRow\",\n value: function addRow(node, depth) {\n var tr = $('
').appendTo(row);\n var padding = fieldInfo.isFirst ? this.getIndent(depth) : '';\n var nodePath = this.model.getNodePath(this.model.root, node.id) + \".value\";\n if (node.loutItemType === 'Field' && fieldInfo.type === 'textfield') {\n var div = $('
');\n div.addClass('editable');\n div.appendTo(td);\n div.attr('data-name', fieldInfo.name);\n div.attr('data-value', node[fieldInfo.name]);\n div.attr('data-path', nodePath);\n } else {\n td.html(padding); // Default to just displaying the content\n }\n if (fieldInfo.width) {\n td.css({\n 'width': fieldInfo.width + 'px',\n 'border': '1px gray solid'\n });\n }\n if (fieldInfo.align) {\n td.css({\n 'text-align': fieldInfo.align\n });\n }\n return td;\n }\n }, {\n key: \"processNode\",\n value: function processNode(node, depth) {\n var _this3 = this;\n console.log('node: ', node.id);\n var tr = this.addRow(node, depth);\n this.options.forEach(function (fieldInfo) {\n var content = node[fieldInfo.name];\n var td = _this3.addCell(tr, node, fieldInfo, depth);\n if (fieldInfo.isFirst) {\n if (node.children && node.children.length > 0) {\n _this3.view.setupExpander($(tr.children()[0]), function () {\n return _this3.handleExpanderClick(node.id);\n });\n }\n }\n if (fieldInfo.type !== 'textfield') {\n td.append(content);\n }\n });\n\n // Recursively process each child node if any\n if (node.children && node.children.length > 0) {\n node.children.forEach(function (child) {\n _this3.processNode(child, depth + 1); // Increment depth for each child\n });\n }\n }\n }, {\n key: \"handleExpanderClick\",\n value: function handleExpanderClick(nodeId) {\n var expander = $(\".treegrid-\".concat(nodeId, \" .treegrid-expander\"));\n var isExpanded = expander.html() === '-';\n expander.html(isExpanded ? '+' : '-');\n this.view.toggleChildrenVisibility(nodeId, isExpanded);\n }\n }, {\n key: \"rebuild\",\n value: function rebuild(newRoot) {\n this.model.setRoot(newRoot);\n this.view.clear();\n this.init();\n }\n }]);\n return LayoutTreeGridController;\n}();\nvar LayoutTreeGrid = /*#__PURE__*/function () {\n function LayoutTreeGrid(selector, root, options, callback) {\n _classCallCheck(this, LayoutTreeGrid);\n this.model = new LayoutTreeGridModel(root);\n this.view = new LayoutTreeGridView(selector);\n this.controller = new LayoutTreeGridController(this.model, this.view, options, callback);\n }\n _createClass(LayoutTreeGrid, [{\n key: \"rebuild\",\n value: function rebuild(root, callback) {\n this.controller.rebuild(root);\n callback(root);\n }\n }]);\n return LayoutTreeGrid;\n}();\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LayoutTreeGrid);\n\n//# sourceURL=webpack://APITestManager/./src/components/LayoutTreeGrid.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _EditableInput__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./EditableInput */ \"./src/components/EditableInput.js\");\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = \"function\" == typeof Symbol ? Symbol : {}, a = i.iterator || \"@@iterator\", c = i.asyncIterator || \"@@asyncIterator\", u = i.toStringTag || \"@@toStringTag\"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, \"\"); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, \"_invoke\", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: \"normal\", arg: t.call(e, r) }; } catch (t) { return { type: \"throw\", arg: t }; } } e.wrap = wrap; var h = \"suspendedStart\", l = \"suspendedYield\", f = \"executing\", s = \"completed\", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { [\"next\", \"throw\", \"return\"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if (\"throw\" !== c.type) { var u = c.arg, h = u.value; return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) { invoke(\"next\", t, i, a); }, function (t) { invoke(\"throw\", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke(\"throw\", t, i, a); }); } a(c.arg); } var r; o(this, \"_invoke\", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error(\"Generator is already running\"); if (o === s) { if (\"throw\" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else \"return\" === n.method && n.abrupt(\"return\", n.arg); o = f; var p = tryCatch(e, r, n); if (\"normal\" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y; var i = tryCatch(o, e.iterator, r.arg); if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = \"normal\", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: \"root\" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || \"\" === e) { var r = e[a]; if (r) return r.call(e); if (\"function\" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + \" is not iterable\"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) { var e = \"function\" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () { return this; }), define(g, \"toString\", function () { return \"[object Generator]\"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if (\"throw\" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if (\"root\" === i.tryLoc) return handle(\"end\"); if (i.tryLoc <= this.prev) { var c = n.call(i, \"catchLoc\"), u = n.call(i, \"finallyLoc\"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error(\"try statement without catch or finally\"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) { var i = o; break; } } i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if (\"throw\" === t.type) throw t.arg; return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, \"catch\": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if (\"throw\" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, \"next\" === this.method && (this.arg = t), y; } }, e; }\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n\nvar LayoutTreeGridModel = /*#__PURE__*/function () {\n function LayoutTreeGridModel(root) {\n _classCallCheck(this, LayoutTreeGridModel);\n this.root = root;\n this.rootId = root.id;\n }\n _createClass(LayoutTreeGridModel, [{\n key: \"setRoot\",\n value: function setRoot(newRoot) {\n this.root = newRoot;\n }\n }, {\n key: \"getNodePath\",\n value: function getNodePath(node, targetId) {\n var path = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n // Check if the current node is the target node\n if (node.id === targetId) {\n return path;\n }\n\n // If the current node has children, iterate over them\n if (node.children) {\n for (var i = 0; i < node.children.length; i++) {\n // Construct the path to the current child\n var currentPath = path ? \"\".concat(path, \".children[\").concat(i, \"]\") : \"children[\".concat(i, \"]\");\n\n // Recursively call findPath on the child\n var resultPath = this.getNodePath(node.children[i], targetId, currentPath);\n\n // If resultPath is not null, the target has been found in the subtree\n if (resultPath) {\n return resultPath;\n }\n }\n }\n\n // Return null if the target is not found in this subtree\n return null;\n }\n }]);\n return LayoutTreeGridModel;\n}();\nvar LayoutTreeGridView = /*#__PURE__*/function () {\n function LayoutTreeGridView(selector) {\n _classCallCheck(this, LayoutTreeGridView);\n this.selector = selector;\n this.table = $('').appendTo($(this.selector));\n this.table.addClass('layout_table');\n this.table.css({\n 'width': 'inherit',\n 'border-collapse': 'collapse',\n 'border': '1px gray solid'\n });\n this.init();\n }\n _createClass(LayoutTreeGridView, [{\n key: \"init\",\n value: function init() {\n this.table.children().remove();\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.init();\n }\n }, {\n key: \"addHeaders\",\n value: function addHeaders(fields) {\n var thead = $('').appendTo(this.table);\n var tr = $('').appendTo(thead);\n tr.addClass('layout-grid-row');\n fields.forEach(function (field) {\n var th = $('').addClass('treegrid-' + node.id).data('nodeId', node.id); // Storing node ID for easy access later\n //\n // if (depth === 0) {\n // tr.css({'display': 'none'});\n // }\n //\n // if (node.parent || (node.parent !== null && parseInt(node.parent) !== this.model.rootId)) {\n // // if (node.parent !== undefined && node.parent !== null) {\n // const parentSelector = `.treegrid-${node.parent}`;\n // const lastChildSelector = `.treegrid-parent-${node.parent}`;\n // // console.log('lastChild:', $(this.view.table).find(lastChildSelector), 'length: ', $(this.view.table).find(lastChildSelector).length);\n //\n // if ($(this.view.table).find(lastChildSelector).length > 0) {\n // const lastChild = $(this.view.table).find(lastChildSelector).last();\n // tr.insertAfter(lastChild);\n // console.log('addRow, node: ', node.id, ' parent: ', node.parent, 'tr: ', tr, 'insertAfterLastChild: ', lastChild);\n // } else {\n // console.log('addRow, node: ', node.id, ' parent: ', node.parent, 'tr: ', tr, 'insertAfterParent: ', parentSelector);\n // tr.insertAfter($(this.view.table).find(parentSelector));\n // // tr.appendTo(this.view.table);\n // }\n // tr.addClass('treegrid-parent-' + node.parent);\n // } else {\n // tr.appendTo(this.view.table);\n // console.log('addRow, node: ', node.id, ' parent: ', node.parent, 'tr: ', tr, 'no parent');\n // }\n //\n // console.log('================================ row Added');\n // return tr;\n // }\n }, {\n key: \"addRow\",\n value: function addRow(node, depth) {\n console.log('================================ addRow: ', node.id);\n var tr = $('').addClass('treegrid-' + node.id).data('nodeId', node.id);\n if (depth === 0) {\n tr.css({\n 'display': 'none'\n });\n }\n if (node.parent !== undefined && node.parent !== null && parseInt(node.parent) !== this.model.rootId) {\n var parentSelector = \".treegrid-\".concat(node.parent);\n var lastChildSelector = \".treegrid-parent-\".concat(node.parent);\n if ($(this.view.table).find(lastChildSelector).length > 0) {\n var lastChild = $(this.view.table).find(lastChildSelector).last();\n tr.insertAfter(lastChild);\n console.log('addRow, node: ', node.id, ' parent: ', node.parent, 'tr: ', tr, 'insertAfterLastChild: ', lastChild);\n } else {\n console.log('addRow, node: ', node.id, ' parent: ', node.parent, 'tr: ', tr, 'insertAfterParent: ', parentSelector);\n tr.insertAfter($(this.view.table).find(parentSelector));\n }\n tr.addClass('treegrid-parent-' + node.parent);\n } else {\n tr.appendTo(this.view.table);\n console.log('addRow, node: ', node.id, ' parent: ', node.parent, 'tr: ', tr, 'no parent');\n }\n console.log('================================ row Added');\n return tr;\n }\n }, {\n key: \"addCell\",\n value: function addCell(row, node, fieldInfo, depth) {\n var td = $('
').html(field.label).appendTo(tr);\n th.css({\n 'width': field.width + 'px',\n 'border': '1px gray solid',\n 'text-align': 'center'\n });\n });\n }\n }, {\n key: \"toggleChildrenVisibility\",\n value: function toggleChildrenVisibility(nodeId, isExpanded) {\n var _this = this;\n var selector = \".treegrid-parent-\".concat(nodeId);\n $(selector).each(function (_, el) {\n $(el).toggle(!isExpanded);\n if (isExpanded) {\n // If we are hiding the children\n var childNodeId = $(el).data('nodeId'); // Assume data-nodeId is set when rows are created\n _this.toggleChildrenVisibility(childNodeId, true); // Recursively hide all descendants\n var expander = $(\".treegrid-\".concat(nodeId, \" .treegrid-expander\"));\n expander.html(isExpanded ? '+' : '-');\n }\n });\n }\n }, {\n key: \"setupExpander\",\n value: function setupExpander(cell, callback) {\n var expander = $('').addClass('treegrid-expander').html('-').appendTo(cell);\n expander.click(callback);\n }\n }]);\n return LayoutTreeGridView;\n}();\nvar LayoutTreeGridController = /*#__PURE__*/function () {\n function LayoutTreeGridController(model, view, options, callback) {\n _classCallCheck(this, LayoutTreeGridController);\n this.model = model;\n this.view = view;\n this.options = options;\n this.callback = callback;\n this.init();\n }\n _createClass(LayoutTreeGridController, [{\n key: \"init\",\n value: function init() {\n var _this2 = this;\n this.view.init();\n this.view.addHeaders(this.options);\n this.processNode(this.model.root, 0);\n this.view.table.find('.editable').each(function (index, editableElement) {\n var editableInput = new _EditableInput__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({\n name: editableElement.dataset.name,\n value: editableElement.dataset.value,\n path: editableElement.dataset.path\n });\n editableInput.init(editableElement, /*#__PURE__*/function () {\n var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(value) {\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _.set(_this2.model.root, editableElement.dataset.path, value);\n _this2.callback(_this2.model.root);\n case 2:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return function (_x) {\n return _ref.apply(this, arguments);\n };\n }());\n });\n }\n }, {\n key: \"getIndent\",\n value: function getIndent(depth) {\n return new Array(depth + 1).join('');\n }\n\n // addRow(node, depth) {\n // console.log('================================ addRow: ', node.id);\n // const tr = $('
').appendTo(row);\n var padding = fieldInfo.isFirst ? this.getIndent(depth) : '';\n var nodePath = this.model.getNodePath(this.model.root, node.id) + '.value';\n if (node.loutItemType === 'Field' && fieldInfo.type === 'textfield') {\n var div = $('
');\n div.addClass('editable');\n div.appendTo(td);\n div.attr('data-name', fieldInfo.name);\n div.attr('data-value', node[fieldInfo.name]);\n div.attr('data-path', nodePath);\n } else {\n td.html(padding); // Default to just displaying the content\n }\n if (fieldInfo.width) {\n td.css({\n 'width': fieldInfo.width + 'px',\n 'border': '1px gray solid'\n });\n }\n if (fieldInfo.align) {\n td.css({\n 'text-align': fieldInfo.align\n });\n }\n return td;\n }\n }, {\n key: \"processNode\",\n value: function processNode(node, depth) {\n var _this3 = this;\n // console.log('node: ', node.id);\n var tr = this.addRow(node, depth);\n this.options.forEach(function (fieldInfo) {\n var content = node[fieldInfo.name];\n var td = _this3.addCell(tr, node, fieldInfo, depth);\n if (fieldInfo.isFirst) {\n if (node.children && node.children.length > 0) {\n _this3.view.setupExpander($(tr.children()[0]), function () {\n return _this3.handleExpanderClick(node.id);\n });\n }\n }\n if (fieldInfo.type !== 'textfield') {\n td.append(content);\n }\n });\n\n // Recursively process each child node if any\n if (node.children && node.children.length > 0) {\n node.children.forEach(function (child) {\n _this3.processNode(child, depth + 1); // Increment depth for each child\n });\n }\n }\n }, {\n key: \"handleExpanderClick\",\n value: function handleExpanderClick(nodeId) {\n var expander = $(\".treegrid-\".concat(nodeId, \" .treegrid-expander\"));\n var isExpanded = expander.html() === '-';\n expander.html(isExpanded ? '+' : '-');\n this.view.toggleChildrenVisibility(nodeId, isExpanded);\n }\n }, {\n key: \"rebuild\",\n value: function rebuild(newRoot) {\n this.model.setRoot(newRoot);\n this.view.clear();\n this.init();\n }\n }]);\n return LayoutTreeGridController;\n}();\nvar LayoutTreeGrid = /*#__PURE__*/function () {\n function LayoutTreeGrid(selector, root, options, callback) {\n _classCallCheck(this, LayoutTreeGrid);\n this.model = new LayoutTreeGridModel(root);\n this.view = new LayoutTreeGridView(selector);\n this.controller = new LayoutTreeGridController(this.model, this.view, options, callback);\n }\n _createClass(LayoutTreeGrid, [{\n key: \"rebuild\",\n value: function rebuild(root, callback) {\n this.controller.rebuild(root);\n callback(root);\n }\n }]);\n return LayoutTreeGrid;\n}();\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LayoutTreeGrid);\n\n//# sourceURL=webpack://APITestManager/./src/components/LayoutTreeGrid.js?"); /***/ }), @@ -697,7 +697,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _EditableInput__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./EditableInput */ \"./src/components/EditableInput.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n\nvar ServerManager = /*#__PURE__*/function () {\n function ServerManager(servers) {\n _classCallCheck(this, ServerManager);\n this.servers = servers || [];\n }\n _createClass(ServerManager, [{\n key: \"basePath\",\n value: function basePath(serverId) {\n if (serverId === undefined || serverId === null || serverId === '') {\n return '';\n }\n return this.servers.filter(function (server) {\n return server.id == serverId;\n })[0].basePath; // == : 타입 비교 없이 값만 비교\n }\n }, {\n key: \"getServer\",\n value: function getServer(serverId) {\n return this.servers.filter(function (server) {\n return server.id == serverId;\n })[0];\n }\n }, {\n key: \"renderServers\",\n value: function renderServers(selectedServer) {\n var optionsHtml = this.servers.map(function (server) {\n return \"\");\n }).join('');\n return \"\");\n }\n }, {\n key: \"renderTcpServers\",\n value: function renderTcpServers(selectedServer) {\n var optionsHtml = this.servers.filter(function (server) {\n return server.scheme === 'tcp';\n }).map(function (server) {\n return \"\");\n }).join('');\n return \"\");\n }\n }, {\n key: \"getHeader\",\n value: function getHeader(headers, key) {\n if (headers === undefined || headers === null) {\n return '';\n }\n\n // Filter the headers to find the matching key\n var filteredHeaders = headers.filter(function (header) {\n return header.key === key;\n });\n\n // Check if any header was found that matches the key\n if (filteredHeaders.length === 0) {\n console.log('new header');\n var newHeader = {\n key: key,\n value: '',\n enabled: true\n };\n headers.push(newHeader);\n return newHeader;\n }\n // Return the value of the first matching header\n return filteredHeaders[0];\n }\n }, {\n key: \"renderTcpServerOptions\",\n value: function renderTcpServerOptions(target, serverOptions, headers, parent) {\n var _this = this;\n console.log(headers);\n var tableHTML = \"\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \".concat(serverOptions.map(function (option) {\n return \"\\n \\n \\n \\n \\n \\n \\n \\n \");\n }).join(''), \"\\n \\n
Option KeyOption NameOffsetLengthValue
\".concat(option.optionKey, \"\").concat(option.optionName, \"\").concat(option.offset, \"\").concat(option.length, \"\\n
\\n
\\n \");\n var container = document.querySelector(target);\n container.innerHTML += tableHTML;\n container.querySelectorAll('.editable').forEach(function (editableElement) {\n var editableInput = new _EditableInput__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({\n name: editableElement.dataset.name,\n value: editableElement.dataset.value\n });\n editableInput.init(editableElement, function (value) {\n var header = _this.getHeader(headers, editableElement.dataset.name);\n header.value = value;\n console.log({\n value: value\n });\n console.log(header);\n $('span.variable').off('mouseover');\n $('span.variable').off('mouseout');\n document.querySelectorAll('span.variable').forEach(function (element) {\n var text = element.innerText;\n element.addEventListener('mouseover', function () {\n return parent.showPopper(element, text);\n });\n element.addEventListener('mouseout', function () {\n return parent.hidePopper(element);\n });\n });\n });\n });\n }\n }, {\n key: \"renderHttpServers\",\n value: function renderHttpServers(selectedServer) {\n var optionsHtml = this.servers.filter(function (server) {\n return server.scheme !== 'tcp';\n }).map(function (server) {\n return \"\");\n }).join('');\n return \"\");\n }\n }]);\n return ServerManager;\n}();\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ServerManager);\n\n//# sourceURL=webpack://APITestManager/./src/components/ServerManager.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _EditableInput__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./EditableInput */ \"./src/components/EditableInput.js\");\n/* harmony import */ var _APIClient__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../APIClient */ \"./src/APIClient.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = \"function\" == typeof Symbol ? Symbol : {}, a = i.iterator || \"@@iterator\", c = i.asyncIterator || \"@@asyncIterator\", u = i.toStringTag || \"@@toStringTag\"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, \"\"); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, \"_invoke\", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: \"normal\", arg: t.call(e, r) }; } catch (t) { return { type: \"throw\", arg: t }; } } e.wrap = wrap; var h = \"suspendedStart\", l = \"suspendedYield\", f = \"executing\", s = \"completed\", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { [\"next\", \"throw\", \"return\"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if (\"throw\" !== c.type) { var u = c.arg, h = u.value; return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) { invoke(\"next\", t, i, a); }, function (t) { invoke(\"throw\", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke(\"throw\", t, i, a); }); } a(c.arg); } var r; o(this, \"_invoke\", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error(\"Generator is already running\"); if (o === s) { if (\"throw\" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else \"return\" === n.method && n.abrupt(\"return\", n.arg); o = f; var p = tryCatch(e, r, n); if (\"normal\" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y; var i = tryCatch(o, e.iterator, r.arg); if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = \"normal\", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: \"root\" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || \"\" === e) { var r = e[a]; if (r) return r.call(e); if (\"function\" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + \" is not iterable\"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) { var e = \"function\" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () { return this; }), define(g, \"toString\", function () { return \"[object Generator]\"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if (\"throw\" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if (\"root\" === i.tryLoc) return handle(\"end\"); if (i.tryLoc <= this.prev) { var c = n.call(i, \"catchLoc\"), u = n.call(i, \"finallyLoc\"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error(\"try statement without catch or finally\"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) { var i = o; break; } } i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if (\"throw\" === t.type) throw t.arg; return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, \"catch\": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if (\"throw\" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, \"next\" === this.method && (this.arg = t), y; } }, e; }\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n\n\nvar ServerManager = /*#__PURE__*/function () {\n function ServerManager(servers) {\n _classCallCheck(this, ServerManager);\n this.servers = servers || [];\n this.apiClient = new _APIClient__WEBPACK_IMPORTED_MODULE_1__[\"default\"]();\n }\n _createClass(ServerManager, [{\n key: \"basePath\",\n value: function basePath(serverId) {\n if (serverId === undefined || serverId === null || serverId === '') {\n return '';\n }\n return this.servers.filter(function (server) {\n return server.id == serverId;\n })[0].basePath; // == : 타입 비교 없이 값만 비교\n }\n }, {\n key: \"getServer\",\n value: function getServer(serverId) {\n return this.servers.filter(function (server) {\n return server.id == serverId;\n })[0];\n }\n }, {\n key: \"renderServers\",\n value: function renderServers(selectedServer) {\n var optionsHtml = this.servers.map(function (server) {\n return \"\");\n }).join('');\n return \"\");\n }\n }, {\n key: \"renderTcpServers\",\n value: function renderTcpServers(selectedServer) {\n var optionsHtml = this.servers.filter(function (server) {\n return server.scheme === 'tcp';\n }).map(function (server) {\n return \"\");\n }).join('');\n return \"\");\n }\n }, {\n key: \"getHeader\",\n value: function getHeader(headers, key) {\n if (headers === undefined || headers === null) {\n return '';\n }\n\n // Filter the headers to find the matching key\n var filteredHeaders = headers.filter(function (header) {\n return header.key === key;\n });\n\n // Check if any header was found that matches the key\n if (filteredHeaders.length === 0) {\n console.log('new header');\n var newHeader = {\n key: key,\n value: '',\n enabled: true\n };\n headers.push(newHeader);\n return newHeader;\n }\n // Return the value of the first matching header\n return filteredHeaders[0];\n }\n }, {\n key: \"renderTcpServerOptions\",\n value: function renderTcpServerOptions(target, serverOptions, headers, parent) {\n var _this = this;\n console.log(headers);\n var tableHTML = \"\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \".concat(serverOptions.map(function (option) {\n return \"\\n \\n \\n \\n \\n \\n \\n \\n \");\n }).join(''), \"\\n \\n
Option KeyOption NameOffsetLengthValue
\".concat(option.optionKey, \"\").concat(option.optionName, \"\").concat(option.offset, \"\").concat(option.length, \"\\n
\\n
\\n \");\n var container = document.querySelector(target);\n container.innerHTML += tableHTML;\n container.querySelectorAll('.editable').forEach(function (editableElement) {\n var editableInput = new _EditableInput__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({\n name: editableElement.dataset.name,\n value: editableElement.dataset.value\n });\n editableInput.init(editableElement, function (value) {\n var header = _this.getHeader(headers, editableElement.dataset.name);\n header.value = value;\n console.log({\n value: value\n });\n console.log(header);\n $('span.variable').off('mouseover');\n $('span.variable').off('mouseout');\n document.querySelectorAll('span.variable').forEach(function (element) {\n var text = element.innerText;\n element.addEventListener('mouseover', function () {\n return parent.showPopper(element, text);\n });\n element.addEventListener('mouseout', function () {\n return parent.hidePopper(element);\n });\n });\n });\n });\n }\n }, {\n key: \"renderHttpServers\",\n value: function renderHttpServers(selectedServer) {\n var optionsHtml = this.servers.filter(function (server) {\n return server.scheme !== 'tcp';\n }).map(function (server) {\n return \"\");\n }).join('');\n return \"\");\n }\n }, {\n key: \"fillPadding\",\n value: function () {\n var _fillPadding = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(apiRequest, value, dataLength) {\n var paddedValue;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return this.apiClient.processPreScriptAndVariables(apiRequest, value);\n case 2:\n paddedValue = _context.sent;\n while (paddedValue.length < dataLength) {\n paddedValue = ' ' + paddedValue; // Prepend a space character to the string\n }\n return _context.abrupt(\"return\", paddedValue);\n case 5:\n case \"end\":\n return _context.stop();\n }\n }, _callee, this);\n }));\n function fillPadding(_x, _x2, _x3) {\n return _fillPadding.apply(this, arguments);\n }\n return fillPadding;\n }()\n }, {\n key: \"renderServerPrefix\",\n value: function () {\n var _renderServerPrefix = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(serverOptions, apiRequest) {\n var _this2 = this;\n var message, _loop, i;\n return _regeneratorRuntime().wrap(function _callee2$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n message = '';\n _loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop(i) {\n var value, found;\n return _regeneratorRuntime().wrap(function _loop$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n //header 에서 값을 가져와야 함.\n value = '';\n found = apiRequest.headers.filter(function (header) {\n return header.key === serverOptions[i].optionKey;\n });\n if (found.length > 0) {\n value = found[0].value;\n }\n _context2.t0 = message;\n _context2.next = 6;\n return _this2.fillPadding(apiRequest, value, serverOptions[i].length);\n case 6:\n message = _context2.t0 += _context2.sent;\n case 7:\n case \"end\":\n return _context2.stop();\n }\n }, _loop);\n });\n i = 0;\n case 3:\n if (!(i < serverOptions.length)) {\n _context3.next = 8;\n break;\n }\n return _context3.delegateYield(_loop(i), \"t0\", 5);\n case 5:\n i++;\n _context3.next = 3;\n break;\n case 8:\n return _context3.abrupt(\"return\", message);\n case 9:\n case \"end\":\n return _context3.stop();\n }\n }, _callee2);\n }));\n function renderServerPrefix(_x4, _x5) {\n return _renderServerPrefix.apply(this, arguments);\n }\n return renderServerPrefix;\n }()\n }]);\n return ServerManager;\n}();\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ServerManager);\n\n//# sourceURL=webpack://APITestManager/./src/components/ServerManager.js?"); /***/ }), @@ -708,7 +708,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _LayoutGrid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LayoutGrid */ \"./src/components/LayoutGrid.js\");\n/* harmony import */ var _LayoutTreeGrid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LayoutTreeGrid */ \"./src/components/LayoutTreeGrid.js\");\n/* harmony import */ var _LayoutTreeDataGrid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LayoutTreeDataGrid */ \"./src/components/LayoutTreeDataGrid.js\");\n/* harmony import */ var monaco_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! monaco-editor */ \"include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.main.js\");\n/* harmony import */ var _ApiLayoutItemTreeBuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ApiLayoutItemTreeBuilder */ \"./src/components/ApiLayoutItemTreeBuilder.js\");\n/* harmony import */ var _ApiLayoutItemTreeDataBuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ApiLayoutItemTreeDataBuilder */ \"./src/components/ApiLayoutItemTreeDataBuilder.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = \"function\" == typeof Symbol ? Symbol : {}, a = i.iterator || \"@@iterator\", c = i.asyncIterator || \"@@asyncIterator\", u = i.toStringTag || \"@@toStringTag\"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, \"\"); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, \"_invoke\", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: \"normal\", arg: t.call(e, r) }; } catch (t) { return { type: \"throw\", arg: t }; } } e.wrap = wrap; var h = \"suspendedStart\", l = \"suspendedYield\", f = \"executing\", s = \"completed\", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { [\"next\", \"throw\", \"return\"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if (\"throw\" !== c.type) { var u = c.arg, h = u.value; return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) { invoke(\"next\", t, i, a); }, function (t) { invoke(\"throw\", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke(\"throw\", t, i, a); }); } a(c.arg); } var r; o(this, \"_invoke\", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error(\"Generator is already running\"); if (o === s) { if (\"throw\" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else \"return\" === n.method && n.abrupt(\"return\", n.arg); o = f; var p = tryCatch(e, r, n); if (\"normal\" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y; var i = tryCatch(o, e.iterator, r.arg); if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = \"normal\", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: \"root\" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || \"\" === e) { var r = e[a]; if (r) return r.call(e); if (\"function\" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + \" is not iterable\"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) { var e = \"function\" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () { return this; }), define(g, \"toString\", function () { return \"[object Generator]\"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if (\"throw\" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if (\"root\" === i.tryLoc) return handle(\"end\"); if (i.tryLoc <= this.prev) { var c = n.call(i, \"catchLoc\"), u = n.call(i, \"finallyLoc\"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error(\"try statement without catch or finally\"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) { var i = o; break; } } i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if (\"throw\" === t.type) throw t.arg; return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, \"catch\": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if (\"throw\" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, \"next\" === this.method && (this.arg = t), y; } }, e; }\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n\n\n\n\n\n\nvar TCPClientView = /*#__PURE__*/function () {\n function TCPClientView(parent, serverManager, apiRequestTabContent, model, index) {\n _classCallCheck(this, TCPClientView);\n this.parent = parent;\n this.serverManager = serverManager;\n this.apiRequestTabContent = apiRequestTabContent;\n this.model = model;\n this.index = index;\n this.server = this.serverManager.getServer(this.model.server);\n }\n _createClass(TCPClientView, [{\n key: \"init\",\n value: function init() {\n var _this = this;\n console.log('TCPClientView init');\n this.apiRequestTabContent.append(this.tcpApiRequestTemplate(this.model, this.index));\n if (this.server && this.server.headers === undefined) {\n this.server.headers = [];\n }\n if (this.server) {\n this.serverManager.renderTcpServerOptions('.server_options', this.server.serverOptions, this.model.headers, this.parent);\n }\n var layoutJson = JSON.stringify(this.model.layout, null, 2);\n this.layoutJsonEditor = monaco_editor__WEBPACK_IMPORTED_MODULE_3__.editor.create(this.apiRequestTabContent.find(\"#api_request_\".concat(this.model.id)).find('.layout-json')[0], {\n value: layoutJson,\n language: 'json',\n automaticLayout: true,\n quickSuggestions: false\n });\n var layoutDataTreeOptions = [{\n name: 'loutItemSerno',\n width: 100,\n isFirst: true,\n label: '#'\n }, {\n name: 'loutItemName',\n width: 100,\n align: 'center',\n label: '항목명(영문)'\n }, {\n name: 'loutItemDesc',\n width: 100,\n align: 'center',\n label: '항목설명'\n }, {\n name: 'loutItemDepth',\n width: 60,\n align: 'center',\n label: '깊이'\n }, {\n name: 'loutItemType',\n width: 100,\n align: 'center',\n label: '아이템 유형'\n }, {\n name: 'loutItemOccCnt',\n width: 100,\n align: 'center',\n label: '반복 횟수'\n }, {\n name: 'loutItemOccRef',\n width: 120,\n align: 'center',\n label: '반복 참조 필드'\n }, {\n name: 'loutItemLength',\n width: 100,\n align: 'center',\n label: '데이터 길이'\n }, {\n name: 'value',\n width: 200,\n align: 'left',\n label: '값',\n type: 'textfield'\n }];\n var layoutRoot = _ApiLayoutItemTreeBuilder__WEBPACK_IMPORTED_MODULE_4__[\"default\"].createTree(this.model.layout.layoutItems);\n var replicator = new _ApiLayoutItemTreeDataBuilder__WEBPACK_IMPORTED_MODULE_5__[\"default\"](10000);\n var layoutDataRoot = replicator.createReplicatedTree(layoutRoot);\n console.log(this.apiRequestTabContent.find(\"#api_request_\".concat(this.model.id)).find('.request_layout_data_tree'));\n console.log(this.apiRequestTabContent.find(\"#api_request_\".concat(this.model.id)).find('.request_layout_tree'));\n console.log(this.apiRequestTabContent.find(\"#api_request_\".concat(this.model.id)).find('.total_message_length'));\n var layoutTreeDataGrid = new _LayoutTreeDataGrid__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this.apiRequestTabContent.find(\"#api_request_\".concat(this.model.id)).find('.request_layout_data_tree'), layoutDataRoot, this.model, layoutDataTreeOptions, this.apiRequestTabContent.find(\"#api_request_\".concat(this.model.id)).find('.total_message_length'));\n layoutTreeDataGrid.init( /*#__PURE__*/function () {\n var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(finalMessage) {\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _this.requestBodyEditor.setValue(finalMessage);\n case 1:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return function (_x) {\n return _ref.apply(this, arguments);\n };\n }());\n var layoutTreeGrid = new _LayoutTreeGrid__WEBPACK_IMPORTED_MODULE_1__[\"default\"](this.apiRequestTabContent.find(\"#api_request_\".concat(this.model.id)).find('.request_layout_tree'), layoutRoot, layoutDataTreeOptions, function (root) {\n var replicator = new _ApiLayoutItemTreeDataBuilder__WEBPACK_IMPORTED_MODULE_5__[\"default\"](10000);\n var layoutDataRoot = replicator.createReplicatedTree(root);\n layoutTreeDataGrid.rebuild(layoutDataRoot);\n });\n var layoutGrid = new _LayoutGrid__WEBPACK_IMPORTED_MODULE_0__[\"default\"](this.model.layout);\n layoutGrid.init(this.apiRequestTabContent.find(\"#api_request_\".concat(this.model.id)), function (model) {\n model.items.forEach(function (item) {\n item.children = [];\n });\n var updatedRoot = _ApiLayoutItemTreeBuilder__WEBPACK_IMPORTED_MODULE_4__[\"default\"].createTree(model.items);\n layoutTreeGrid.rebuild(updatedRoot, function (root) {\n var replicator = new _ApiLayoutItemTreeDataBuilder__WEBPACK_IMPORTED_MODULE_5__[\"default\"](10000);\n var layoutDataRoot = replicator.createReplicatedTree(root);\n layoutTreeDataGrid.rebuild(layoutDataRoot);\n });\n $('span.variable').off('mouseover');\n $('span.variable').off('mouseout');\n document.querySelectorAll('span.variable').forEach(function (element) {\n var text = element.innerText;\n element.addEventListener('mouseover', function () {\n return _this.parent.showPopper(element, text);\n });\n element.addEventListener('mouseout', function () {\n return _this.parent.hidePopper(element);\n });\n });\n });\n window.addEventListener('resize', this.resizeEditor.bind(this));\n }\n }, {\n key: \"resizeEditor\",\n value: function resizeEditor() {\n this.requestBodyEditor.layout({\n width: 0\n });\n this.requestBodyEditor.layout({});\n this.layoutJsonEditor.layout({\n width: 0\n });\n this.layoutJsonEditor.layout({});\n }\n }, {\n key: \"tcpApiRequestTemplate\",\n value: function tcpApiRequestTemplate(apiRequest, index) {\n console.log('tcpApiRequestTemplate');\n return \"\\n
\\n
\").concat(apiRequest.collectionName, \" > \").concat(apiRequest.name, \"
\\n
\\n
\\n \").concat(this.serverManager.renderTcpServers(apiRequest.server), \"\\n \\n
\\n \\n \\n
\\n
\\n
\\n
\\n
\\n
    \\n
  • \\n \\n
  • \\n
  • \\n \\n
  • \\n
  • \\n \\n
  • \\n
  • \\n \\n
  • \\n
  • \\n \\n
  • \\n
  • \\n \\n
  • \\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n \\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n \\uC804\\uCCB4 \\uBA54\\uC2DC\\uC9C0 \\uAE38\\uC774: \\n \\n
\\n
\\n
\\n
\\n
\\n Response\\n \\n \\n
\\n
    \\n
  • \\n \\n
  • \\n
  • \\n \\n
  • \\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n \\n \");\n }\n }]);\n return TCPClientView;\n}();\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TCPClientView);\n\n//# sourceURL=webpack://APITestManager/./src/components/TCPClientView.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _LayoutGrid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LayoutGrid */ \"./src/components/LayoutGrid.js\");\n/* harmony import */ var _LayoutTreeGrid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LayoutTreeGrid */ \"./src/components/LayoutTreeGrid.js\");\n/* harmony import */ var _LayoutTreeDataGrid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LayoutTreeDataGrid */ \"./src/components/LayoutTreeDataGrid.js\");\n/* harmony import */ var monaco_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! monaco-editor */ \"include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.main.js\");\n/* harmony import */ var _ApiLayoutItemTreeBuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ApiLayoutItemTreeBuilder */ \"./src/components/ApiLayoutItemTreeBuilder.js\");\n/* harmony import */ var _ApiLayoutItemTreeDataBuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ApiLayoutItemTreeDataBuilder */ \"./src/components/ApiLayoutItemTreeDataBuilder.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = \"function\" == typeof Symbol ? Symbol : {}, a = i.iterator || \"@@iterator\", c = i.asyncIterator || \"@@asyncIterator\", u = i.toStringTag || \"@@toStringTag\"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, \"\"); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, \"_invoke\", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: \"normal\", arg: t.call(e, r) }; } catch (t) { return { type: \"throw\", arg: t }; } } e.wrap = wrap; var h = \"suspendedStart\", l = \"suspendedYield\", f = \"executing\", s = \"completed\", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { [\"next\", \"throw\", \"return\"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if (\"throw\" !== c.type) { var u = c.arg, h = u.value; return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) { invoke(\"next\", t, i, a); }, function (t) { invoke(\"throw\", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke(\"throw\", t, i, a); }); } a(c.arg); } var r; o(this, \"_invoke\", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error(\"Generator is already running\"); if (o === s) { if (\"throw\" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else \"return\" === n.method && n.abrupt(\"return\", n.arg); o = f; var p = tryCatch(e, r, n); if (\"normal\" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y; var i = tryCatch(o, e.iterator, r.arg); if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = \"normal\", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: \"root\" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || \"\" === e) { var r = e[a]; if (r) return r.call(e); if (\"function\" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + \" is not iterable\"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) { var e = \"function\" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () { return this; }), define(g, \"toString\", function () { return \"[object Generator]\"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if (\"throw\" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if (\"root\" === i.tryLoc) return handle(\"end\"); if (i.tryLoc <= this.prev) { var c = n.call(i, \"catchLoc\"), u = n.call(i, \"finallyLoc\"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error(\"try statement without catch or finally\"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) { var i = o; break; } } i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if (\"throw\" === t.type) throw t.arg; return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, \"catch\": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if (\"throw\" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, \"next\" === this.method && (this.arg = t), y; } }, e; }\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n\n\n\n\n\n\nvar TCPClientView = /*#__PURE__*/function () {\n function TCPClientView(parent, serverManager, apiRequestTabContent, model, index) {\n _classCallCheck(this, TCPClientView);\n this.parent = parent;\n this.serverManager = serverManager;\n this.apiRequestTabContent = apiRequestTabContent;\n this.model = model;\n this.index = index;\n this.server = this.serverManager.getServer(this.model.server);\n }\n _createClass(TCPClientView, [{\n key: \"init\",\n value: function init() {\n var _this = this;\n console.log('TCPClientView init');\n this.apiRequestTabContent.append(this.tcpApiRequestTemplate(this.model, this.index));\n if (this.server && this.server.headers === undefined) {\n this.server.headers = [];\n }\n if (this.server) {\n this.serverManager.renderTcpServerOptions('.server_options', this.server.serverOptions, this.model.headers, this.parent);\n }\n var layoutJson = JSON.stringify(this.model.layout, null, 2);\n this.layoutJsonEditor = monaco_editor__WEBPACK_IMPORTED_MODULE_3__.editor.create(this.apiRequestTabContent.find(\"#api_request_\".concat(this.model.id)).find('.layout-json')[0], {\n value: layoutJson,\n language: 'json',\n automaticLayout: true,\n quickSuggestions: false\n });\n var layoutDataTreeOptions = [{\n name: 'loutItemSerno',\n width: 100,\n isFirst: true,\n label: '#'\n }, {\n name: 'loutItemName',\n width: 100,\n align: 'center',\n label: '항목명(영문)'\n }, {\n name: 'loutItemDesc',\n width: 100,\n align: 'center',\n label: '항목설명'\n }, {\n name: 'loutItemDepth',\n width: 60,\n align: 'center',\n label: '깊이'\n }, {\n name: 'loutItemType',\n width: 100,\n align: 'center',\n label: '아이템 유형'\n }, {\n name: 'loutItemOccCnt',\n width: 100,\n align: 'center',\n label: '반복 횟수'\n }, {\n name: 'loutItemOccRef',\n width: 120,\n align: 'center',\n label: '반복 참조 필드'\n }, {\n name: 'loutItemLength',\n width: 100,\n align: 'center',\n label: '데이터 길이'\n }, {\n name: 'value',\n width: 200,\n align: 'left',\n label: '값',\n type: 'textfield'\n }];\n var layoutRoot = _ApiLayoutItemTreeBuilder__WEBPACK_IMPORTED_MODULE_4__[\"default\"].createTree(this.model.layout.layoutItems);\n var replicator = new _ApiLayoutItemTreeDataBuilder__WEBPACK_IMPORTED_MODULE_5__[\"default\"](10000);\n var layoutDataRoot = replicator.createReplicatedTree(layoutRoot);\n console.log(this.apiRequestTabContent.find(\"#api_request_\".concat(this.model.id)).find('.request_layout_data_tree'));\n console.log(this.apiRequestTabContent.find(\"#api_request_\".concat(this.model.id)).find('.request_layout_tree'));\n console.log(this.apiRequestTabContent.find(\"#api_request_\".concat(this.model.id)).find('.total_message_length'));\n var layoutTreeDataGrid = new _LayoutTreeDataGrid__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this.apiRequestTabContent.find(\"#api_request_\".concat(this.model.id)).find('.request_layout_data_tree'), layoutDataRoot, this.model, layoutDataTreeOptions, this.apiRequestTabContent.find(\"#api_request_\".concat(this.model.id)).find('.total_message_length'));\n layoutTreeDataGrid.init( /*#__PURE__*/function () {\n var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(finalMessage) {\n var prefix;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return _this.serverManager.renderServerPrefix(_this.server.serverOptions, _this.model);\n case 2:\n prefix = _context.sent;\n _this.requestBodyEditor.setValue(prefix + finalMessage);\n case 4:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return function (_x) {\n return _ref.apply(this, arguments);\n };\n }());\n var layoutTreeGrid = new _LayoutTreeGrid__WEBPACK_IMPORTED_MODULE_1__[\"default\"](this.apiRequestTabContent.find(\"#api_request_\".concat(this.model.id)).find('.request_layout_tree'), layoutRoot, layoutDataTreeOptions, function (root) {\n var replicator = new _ApiLayoutItemTreeDataBuilder__WEBPACK_IMPORTED_MODULE_5__[\"default\"](10000);\n var layoutDataRoot = replicator.createReplicatedTree(root);\n layoutTreeDataGrid.rebuild(layoutDataRoot);\n });\n var layoutGrid = new _LayoutGrid__WEBPACK_IMPORTED_MODULE_0__[\"default\"](this.model.layout);\n layoutGrid.init(this.apiRequestTabContent.find(\"#api_request_\".concat(this.model.id)), function (model) {\n model.items.forEach(function (item) {\n item.children = [];\n });\n var updatedRoot = _ApiLayoutItemTreeBuilder__WEBPACK_IMPORTED_MODULE_4__[\"default\"].createTree(model.items);\n layoutTreeGrid.rebuild(updatedRoot, function (root) {\n var replicator = new _ApiLayoutItemTreeDataBuilder__WEBPACK_IMPORTED_MODULE_5__[\"default\"](10000);\n var layoutDataRoot = replicator.createReplicatedTree(root);\n layoutTreeDataGrid.rebuild(layoutDataRoot);\n });\n $('span.variable').off('mouseover');\n $('span.variable').off('mouseout');\n document.querySelectorAll('span.variable').forEach(function (element) {\n var text = element.innerText;\n element.addEventListener('mouseover', function () {\n return _this.parent.showPopper(element, text);\n });\n element.addEventListener('mouseout', function () {\n return _this.parent.hidePopper(element);\n });\n });\n });\n window.addEventListener('resize', this.resizeEditor.bind(this));\n }\n }, {\n key: \"resizeEditor\",\n value: function resizeEditor() {\n this.requestBodyEditor.layout({\n width: 0\n });\n this.requestBodyEditor.layout({});\n this.layoutJsonEditor.layout({\n width: 0\n });\n this.layoutJsonEditor.layout({});\n }\n }, {\n key: \"tcpApiRequestTemplate\",\n value: function tcpApiRequestTemplate(apiRequest, index) {\n console.log('tcpApiRequestTemplate');\n return \"\\n
\\n
\").concat(apiRequest.collectionName, \" > \").concat(apiRequest.name, \"
\\n
\\n
\\n \").concat(this.serverManager.renderTcpServers(apiRequest.server), \"\\n \\n
\\n \\n \\n
\\n
\\n
\\n
\\n
\\n
    \\n
  • \\n \\n
  • \\n
  • \\n \\n
  • \\n
  • \\n \\n
  • \\n
  • \\n \\n
  • \\n
  • \\n \\n
  • \\n
  • \\n \\n
  • \\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n \\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n \\uC804\\uCCB4 \\uBA54\\uC2DC\\uC9C0 \\uAE38\\uC774: \\n \\n
\\n
\\n
\\n
\\n
\\n Response\\n \\n \\n
\\n
    \\n
  • \\n \\n
  • \\n
  • \\n \\n
  • \\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n \\n \");\n }\n }]);\n return TCPClientView;\n}();\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TCPClientView);\n\n//# sourceURL=webpack://APITestManager/./src/components/TCPClientView.js?"); /***/ }),