@bonsae/nrg 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/server/index.cjs +7 -1
- package/build/server/resources/nrg-client.js +91 -89
- package/build/server/resources/vue.esm-browser.js +18708 -0
- package/build/vite/index.js +15 -3
- package/package.json +1 -1
- package/src/core/client/components/node-red-editor-input.vue +11 -9
- package/src/core/server/index.ts +11 -1
- package/src/vite/plugins/build.ts +15 -3
package/build/server/index.cjs
CHANGED
|
@@ -785,7 +785,13 @@ function serveNrgResources(RED) {
|
|
|
785
785
|
httpAdmin.use(function(req, res, next) {
|
|
786
786
|
const prefix = "/nrg/assets/";
|
|
787
787
|
if (!req.path.startsWith(prefix)) return next();
|
|
788
|
-
|
|
788
|
+
let reqPath = req.path.slice(prefix.length).replace(/\.\./g, "");
|
|
789
|
+
if (reqPath === "vue.esm-browser.prod.js" && process.env.NODE_ENV !== "production") {
|
|
790
|
+
const devPath = import_path.default.resolve(clientDir, "vue.esm-browser.js");
|
|
791
|
+
if (import_fs.default.existsSync(devPath)) {
|
|
792
|
+
reqPath = "vue.esm-browser.js";
|
|
793
|
+
}
|
|
794
|
+
}
|
|
789
795
|
const filePath = import_path.default.resolve(clientDir, reqPath);
|
|
790
796
|
if (!filePath.startsWith(clientDir)) return next();
|
|
791
797
|
if (!import_fs.default.existsSync(filePath) || !import_fs.default.statSync(filePath).isFile())
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(){var s=document.createElement("style");s.textContent="[data-v-5e87f030] .node-red-vue-input-error-message{color:var(--red-ui-text-color-error)}[data-v-5e87f030] .form-row input[type=text],[data-v-5e87f030] .form-row input[type=number],[data-v-5e87f030] .form-row input[type=password]{height:34px;padding:0 8px;box-sizing:border-box}.nrg-label[data-v-9ffd05ad]{display:inline-block;width:100%;cursor:default}.nrg-label i[data-v-9ffd05ad]{margin-right:5px}.nrg-required[data-v-9ffd05ad]{color:var(--red-ui-text-color-error);margin-left:2px}.
|
|
2
|
-
import { defineComponent as Oe, resolveComponent as me, openBlock as Q, createElementBlock as re, Fragment as Ge, createElementVNode as
|
|
1
|
+
(function(){var s=document.createElement("style");s.textContent="[data-v-5e87f030] .node-red-vue-input-error-message{color:var(--red-ui-text-color-error)}[data-v-5e87f030] .form-row input[type=text],[data-v-5e87f030] .form-row input[type=number],[data-v-5e87f030] .form-row input[type=password]{height:34px;padding:0 8px;box-sizing:border-box}.nrg-label[data-v-9ffd05ad]{display:inline-block;width:100%;cursor:default}.nrg-label i[data-v-9ffd05ad]{margin-right:5px}.nrg-required[data-v-9ffd05ad]{color:var(--red-ui-text-color-error);margin-left:2px}.editor-wrapper[data-v-4077a6c2]{position:relative}.expand-button[data-v-4077a6c2]{position:absolute;top:-23px;right:0;z-index:10;transition:color .3s ease;cursor:pointer}\n";document.head.appendChild(s);})();
|
|
2
|
+
import { defineComponent as Oe, resolveComponent as me, openBlock as Q, createElementBlock as re, Fragment as Ge, createElementVNode as le, createVNode as Ve, createCommentVNode as ue, normalizeClass as bs, renderSlot as Ce, createTextVNode as Es, toDisplayString as qe, createBlock as $e, withDirectives as Ss, vShow as Ps, renderList as mr, createApp as Ns } from "/nrg/assets/vue.esm-browser.prod.js";
|
|
3
3
|
function Os() {
|
|
4
4
|
}
|
|
5
5
|
function Rs(e) {
|
|
@@ -2226,18 +2226,18 @@ function Ze() {
|
|
|
2226
2226
|
D instanceof i.Name && R.assign((0, i._)`${I}.props`, D), C instanceof i.Name && R.assign((0, i._)`${I}.items`, C);
|
|
2227
2227
|
}
|
|
2228
2228
|
function ne(R, I, D, C) {
|
|
2229
|
-
const { gen: G, schema: Z, data: ae, allErrors: ge, opts:
|
|
2230
|
-
if (Z.$ref && (
|
|
2229
|
+
const { gen: G, schema: Z, data: ae, allErrors: ge, opts: fe, self: pe } = R, { RULES: oe } = pe;
|
|
2230
|
+
if (Z.$ref && (fe.ignoreKeywordsWithRef || !(0, y.schemaHasRulesButRef)(Z, oe))) {
|
|
2231
2231
|
G.block(() => F(R, "$ref", oe.all.$ref.definition));
|
|
2232
2232
|
return;
|
|
2233
2233
|
}
|
|
2234
|
-
|
|
2234
|
+
fe.jtd || ee(R, I), G.block(() => {
|
|
2235
2235
|
for (const ye of oe.rules)
|
|
2236
2236
|
Te(ye);
|
|
2237
2237
|
Te(oe.post);
|
|
2238
2238
|
});
|
|
2239
2239
|
function Te(ye) {
|
|
2240
|
-
(0, r.shouldUseGroup)(Z, ye) && (ye.type ? (G.if((0, s.checkDataType)(ye.type, ae,
|
|
2240
|
+
(0, r.shouldUseGroup)(Z, ye) && (ye.type ? (G.if((0, s.checkDataType)(ye.type, ae, fe.strictNumbers)), se(R, ye), I.length === 1 && I[0] === ye.type && D && (G.else(), (0, s.reportTypeError)(R)), G.endIf()) : se(R, ye), ge || G.if((0, i._)`${m.default.errors} === ${C || 0}`));
|
|
2241
2241
|
}
|
|
2242
2242
|
}
|
|
2243
2243
|
function se(R, I) {
|
|
@@ -2362,15 +2362,15 @@ function Ze() {
|
|
|
2362
2362
|
if (C.length) {
|
|
2363
2363
|
if (!(D instanceof i.Name))
|
|
2364
2364
|
throw new Error("ajv implementation error");
|
|
2365
|
-
const
|
|
2366
|
-
return (0, i._)`${(0, s.checkDataTypes)(
|
|
2365
|
+
const fe = Array.isArray(C) ? C : [C];
|
|
2366
|
+
return (0, i._)`${(0, s.checkDataTypes)(fe, D, Z.opts.strictNumbers, s.DataType.Wrong)}`;
|
|
2367
2367
|
}
|
|
2368
2368
|
return i.nil;
|
|
2369
2369
|
}
|
|
2370
2370
|
function ge() {
|
|
2371
2371
|
if (G.validateSchema) {
|
|
2372
|
-
const
|
|
2373
|
-
return (0, i._)`!${
|
|
2372
|
+
const fe = I.scopeValue("validate$data", { ref: G.validateSchema });
|
|
2373
|
+
return (0, i._)`!${fe}(${D})`;
|
|
2374
2374
|
}
|
|
2375
2375
|
return i.nil;
|
|
2376
2376
|
}
|
|
@@ -2406,27 +2406,27 @@ function Ze() {
|
|
|
2406
2406
|
throw new Error(`Invalid JSON-pointer: ${R}`);
|
|
2407
2407
|
G = R, Z = m.default.rootData;
|
|
2408
2408
|
} else {
|
|
2409
|
-
const
|
|
2410
|
-
if (!
|
|
2409
|
+
const pe = B.exec(R);
|
|
2410
|
+
if (!pe)
|
|
2411
2411
|
throw new Error(`Invalid JSON-pointer: ${R}`);
|
|
2412
|
-
const oe = +
|
|
2413
|
-
if (G =
|
|
2412
|
+
const oe = +pe[1];
|
|
2413
|
+
if (G = pe[2], G === "#") {
|
|
2414
2414
|
if (oe >= I)
|
|
2415
|
-
throw new Error(
|
|
2415
|
+
throw new Error(fe("property/index", oe));
|
|
2416
2416
|
return C[I - oe];
|
|
2417
2417
|
}
|
|
2418
2418
|
if (oe > I)
|
|
2419
|
-
throw new Error(
|
|
2419
|
+
throw new Error(fe("data", oe));
|
|
2420
2420
|
if (Z = D[I - oe], !G)
|
|
2421
2421
|
return Z;
|
|
2422
2422
|
}
|
|
2423
2423
|
let ae = Z;
|
|
2424
2424
|
const ge = G.split("/");
|
|
2425
|
-
for (const
|
|
2426
|
-
|
|
2425
|
+
for (const pe of ge)
|
|
2426
|
+
pe && (Z = (0, i._)`${Z}${(0, i.getProperty)((0, y.unescapeJsonPointer)(pe))}`, ae = (0, i._)`${ae} && ${Z}`);
|
|
2427
2427
|
return ae;
|
|
2428
|
-
function
|
|
2429
|
-
return `Cannot access ${
|
|
2428
|
+
function fe(pe, oe) {
|
|
2429
|
+
return `Cannot access ${pe} ${oe} levels up, current level is ${I}`;
|
|
2430
2430
|
}
|
|
2431
2431
|
}
|
|
2432
2432
|
return we.getData = J, we;
|
|
@@ -3089,7 +3089,7 @@ function na() {
|
|
|
3089
3089
|
unicode: '"minLength"/"maxLength" account for unicode characters by default.'
|
|
3090
3090
|
}, n = 200;
|
|
3091
3091
|
function d(z) {
|
|
3092
|
-
var j, k, O, l, E, A, F, V, B, J, R, I, D, C, G, Z, ae, ge,
|
|
3092
|
+
var j, k, O, l, E, A, F, V, B, J, R, I, D, C, G, Z, ae, ge, fe, pe, oe, Te, ye, Ut, Kt;
|
|
3093
3093
|
const Fe = z.strict, Ht = (j = z.code) === null || j === void 0 ? void 0 : j.optimize, pr = Ht === !0 || Ht === void 0 ? 1 : Ht || 0, hr = (O = (k = z.code) === null || k === void 0 ? void 0 : k.regExp) !== null && O !== void 0 ? O : v, ws = (l = z.uriResolver) !== null && l !== void 0 ? l : c.default;
|
|
3094
3094
|
return {
|
|
3095
3095
|
strictSchema: (A = (E = z.strictSchema) !== null && E !== void 0 ? E : Fe) !== null && A !== void 0 ? A : !0,
|
|
@@ -3102,8 +3102,8 @@ function na() {
|
|
|
3102
3102
|
loopEnum: (Z = z.loopEnum) !== null && Z !== void 0 ? Z : n,
|
|
3103
3103
|
meta: (ae = z.meta) !== null && ae !== void 0 ? ae : !0,
|
|
3104
3104
|
messages: (ge = z.messages) !== null && ge !== void 0 ? ge : !0,
|
|
3105
|
-
inlineRefs: (
|
|
3106
|
-
schemaId: (
|
|
3105
|
+
inlineRefs: (fe = z.inlineRefs) !== null && fe !== void 0 ? fe : !0,
|
|
3106
|
+
schemaId: (pe = z.schemaId) !== null && pe !== void 0 ? pe : "$id",
|
|
3107
3107
|
addUsedSchema: (oe = z.addUsedSchema) !== null && oe !== void 0 ? oe : !0,
|
|
3108
3108
|
validateSchema: (Te = z.validateSchema) !== null && Te !== void 0 ? Te : !0,
|
|
3109
3109
|
validateFormats: (ye = z.validateFormats) !== null && ye !== void 0 ? ye : !0,
|
|
@@ -5445,7 +5445,7 @@ function co(e, t, r, s, h, o) {
|
|
|
5445
5445
|
Ge,
|
|
5446
5446
|
{ key: 0 },
|
|
5447
5447
|
[
|
|
5448
|
-
|
|
5448
|
+
le("input", {
|
|
5449
5449
|
id: `node-input-validateInput-${e.localNode.id}`,
|
|
5450
5450
|
type: "checkbox",
|
|
5451
5451
|
checked: e.localNode.validateInput,
|
|
@@ -5464,7 +5464,7 @@ function co(e, t, r, s, h, o) {
|
|
|
5464
5464
|
Ge,
|
|
5465
5465
|
{ key: 1 },
|
|
5466
5466
|
[
|
|
5467
|
-
|
|
5467
|
+
le("input", {
|
|
5468
5468
|
id: `node-input-validateOutput-${e.localNode.id}`,
|
|
5469
5469
|
type: "checkbox",
|
|
5470
5470
|
checked: e.localNode.validateOutput,
|
|
@@ -5480,7 +5480,7 @@ function co(e, t, r, s, h, o) {
|
|
|
5480
5480
|
/* STABLE_FRAGMENT */
|
|
5481
5481
|
)) : ue("v-if", !0)
|
|
5482
5482
|
])) : ue("v-if", !0),
|
|
5483
|
-
|
|
5483
|
+
le("div", uo, [
|
|
5484
5484
|
Ve(i, {
|
|
5485
5485
|
node: e.localNode,
|
|
5486
5486
|
schema: e.schema,
|
|
@@ -5607,7 +5607,7 @@ function $o(e, t, r, s, h, o) {
|
|
|
5607
5607
|
required: e.required
|
|
5608
5608
|
}, null, 8, ["label", "icon", "required"])) : ue("v-if", !0)
|
|
5609
5609
|
]),
|
|
5610
|
-
|
|
5610
|
+
le("input", {
|
|
5611
5611
|
ref: "inputField",
|
|
5612
5612
|
type: e.type,
|
|
5613
5613
|
value: e.internalValue,
|
|
@@ -5752,7 +5752,7 @@ function No(e, t, r, s, h, o) {
|
|
|
5752
5752
|
required: e.required
|
|
5753
5753
|
}, null, 8, ["label", "icon", "required"])) : ue("v-if", !0)
|
|
5754
5754
|
]),
|
|
5755
|
-
|
|
5755
|
+
le(
|
|
5756
5756
|
"input",
|
|
5757
5757
|
So,
|
|
5758
5758
|
null,
|
|
@@ -5837,7 +5837,7 @@ function ko(e, t, r, s, h, o) {
|
|
|
5837
5837
|
required: e.required
|
|
5838
5838
|
}, null, 8, ["label", "icon", "required"])) : ue("v-if", !0)
|
|
5839
5839
|
]),
|
|
5840
|
-
|
|
5840
|
+
le("input", {
|
|
5841
5841
|
id: e.inputId,
|
|
5842
5842
|
type: "text",
|
|
5843
5843
|
style: { width: "100%" }
|
|
@@ -5935,7 +5935,7 @@ function Mo(e, t, r, s, h, o) {
|
|
|
5935
5935
|
required: e.required
|
|
5936
5936
|
}, null, 8, ["label", "icon", "required"])) : ue("v-if", !0)
|
|
5937
5937
|
]),
|
|
5938
|
-
|
|
5938
|
+
le(
|
|
5939
5939
|
"input",
|
|
5940
5940
|
To,
|
|
5941
5941
|
null,
|
|
@@ -6175,8 +6175,8 @@ const ys = /* @__PURE__ */ Re(qo, [["render", Mo]]), zo = Oe({
|
|
|
6175
6175
|
}), Vo = {
|
|
6176
6176
|
ref: "container",
|
|
6177
6177
|
class: "container"
|
|
6178
|
-
}, Co = ["id"];
|
|
6179
|
-
function
|
|
6178
|
+
}, Co = { class: "editor-wrapper" }, Fo = ["id"];
|
|
6179
|
+
function Lo(e, t, r, s, h, o) {
|
|
6180
6180
|
const a = me("NodeRedInputLabel");
|
|
6181
6181
|
return Q(), re(
|
|
6182
6182
|
"div",
|
|
@@ -6190,30 +6190,32 @@ function Fo(e, t, r, s, h, o) {
|
|
|
6190
6190
|
required: e.required
|
|
6191
6191
|
}, null, 8, ["label", "icon", "required"])) : ue("v-if", !0)
|
|
6192
6192
|
], !0),
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6193
|
+
le("div", Co, [
|
|
6194
|
+
le(
|
|
6195
|
+
"button",
|
|
6196
|
+
{
|
|
6197
|
+
ref: "expand-button",
|
|
6198
|
+
class: "red-ui-button red-ui-button-small expand-button",
|
|
6199
|
+
onClick: t[0] || (t[0] = (...i) => e.onClickExpand && e.onClickExpand(...i))
|
|
6200
|
+
},
|
|
6201
|
+
[...t[1] || (t[1] = [
|
|
6202
|
+
le(
|
|
6203
|
+
"i",
|
|
6204
|
+
{ class: "fa fa-expand" },
|
|
6205
|
+
null,
|
|
6206
|
+
-1
|
|
6207
|
+
/* CACHED */
|
|
6208
|
+
)
|
|
6209
|
+
])],
|
|
6210
|
+
512
|
|
6211
|
+
/* NEED_PATCH */
|
|
6212
|
+
),
|
|
6213
|
+
le("div", {
|
|
6214
|
+
id: e.editorId,
|
|
6215
|
+
ref: "editor"
|
|
6216
|
+
}, null, 8, Fo)
|
|
6217
|
+
]),
|
|
6218
|
+
Ss(le(
|
|
6217
6219
|
"div",
|
|
6218
6220
|
{ class: "node-red-vue-input-error-message" },
|
|
6219
6221
|
qe(e.error),
|
|
@@ -6227,7 +6229,7 @@ function Fo(e, t, r, s, h, o) {
|
|
|
6227
6229
|
/* NEED_PATCH */
|
|
6228
6230
|
);
|
|
6229
6231
|
}
|
|
6230
|
-
const gs = /* @__PURE__ */ Re(zo, [["render",
|
|
6232
|
+
const gs = /* @__PURE__ */ Re(zo, [["render", Lo], ["__scopeId", "data-v-4077a6c2"]]), Uo = /* @__PURE__ */ new Set([
|
|
6231
6233
|
"id",
|
|
6232
6234
|
"type",
|
|
6233
6235
|
"x",
|
|
@@ -6240,16 +6242,16 @@ const gs = /* @__PURE__ */ Re(zo, [["render", Fo], ["__scopeId", "data-v-be13a2a
|
|
|
6240
6242
|
"validateInput",
|
|
6241
6243
|
"validateOutput"
|
|
6242
6244
|
]);
|
|
6243
|
-
function
|
|
6245
|
+
function Ko(e) {
|
|
6244
6246
|
return e.replace(/([A-Z])/g, " $1").replace(/^./, (t) => t.toUpperCase()).trim();
|
|
6245
6247
|
}
|
|
6246
|
-
function
|
|
6248
|
+
function Ho(e) {
|
|
6247
6249
|
var t, r;
|
|
6248
6250
|
return e.type === "object" && !!((t = e.properties) != null && t.value) && !!((r = e.properties) != null && r.type);
|
|
6249
6251
|
}
|
|
6250
6252
|
function zn(e, t, r) {
|
|
6251
6253
|
var i;
|
|
6252
|
-
const s = t.title ||
|
|
6254
|
+
const s = t.title || Ko(e), h = t["x-nrg-form"] ?? {}, o = h.icon || "";
|
|
6253
6255
|
if (t["x-nrg-node-type"])
|
|
6254
6256
|
return {
|
|
6255
6257
|
key: e,
|
|
@@ -6259,7 +6261,7 @@ function zn(e, t, r) {
|
|
|
6259
6261
|
required: r,
|
|
6260
6262
|
configType: t["x-nrg-node-type"]
|
|
6261
6263
|
};
|
|
6262
|
-
if (
|
|
6264
|
+
if (Ho(t))
|
|
6263
6265
|
return {
|
|
6264
6266
|
key: e,
|
|
6265
6267
|
label: s,
|
|
@@ -6350,7 +6352,7 @@ function zn(e, t, r) {
|
|
|
6350
6352
|
};
|
|
6351
6353
|
}
|
|
6352
6354
|
}
|
|
6353
|
-
const
|
|
6355
|
+
const Bo = Oe({
|
|
6354
6356
|
name: "NodeRedJsonSchemaForm",
|
|
6355
6357
|
components: {
|
|
6356
6358
|
NodeRedInputLabel: Ae,
|
|
@@ -6379,7 +6381,7 @@ const Ho = Oe({
|
|
|
6379
6381
|
var t;
|
|
6380
6382
|
if (!((t = this.schema) != null && t.properties)) return [];
|
|
6381
6383
|
const e = new Set(this.schema.required ?? []);
|
|
6382
|
-
return Object.entries(this.schema.properties).filter(([r]) => !
|
|
6384
|
+
return Object.entries(this.schema.properties).filter(([r]) => !Uo.has(r)).map(
|
|
6383
6385
|
([r, s]) => zn(r, s, e.has(r))
|
|
6384
6386
|
);
|
|
6385
6387
|
},
|
|
@@ -6398,11 +6400,11 @@ const Ho = Oe({
|
|
|
6398
6400
|
});
|
|
6399
6401
|
}
|
|
6400
6402
|
}
|
|
6401
|
-
}),
|
|
6403
|
+
}), Go = { key: 1 }, Jo = ["checked", "onChange"], Wo = { key: 5 }, Yo = ["value", "onInput"], Zo = {
|
|
6402
6404
|
key: 0,
|
|
6403
6405
|
class: "node-red-vue-input-error-message"
|
|
6404
6406
|
};
|
|
6405
|
-
function
|
|
6407
|
+
function Qo(e, t, r, s, h, o) {
|
|
6406
6408
|
const a = me("NodeRedInput"), i = me("NodeRedInputLabel"), m = me("NodeRedSelectInput"), g = me("NodeRedTypedInput"), y = me("NodeRedConfigInput"), N = me("NodeRedEditorInput");
|
|
6407
6409
|
return Q(), re("div", null, [
|
|
6408
6410
|
(Q(!0), re(
|
|
@@ -6421,21 +6423,21 @@ function Zo(e, t, r, s, h, o) {
|
|
|
6421
6423
|
required: c.required,
|
|
6422
6424
|
error: e.errors[`node.${c.key}`],
|
|
6423
6425
|
"onUpdate:value": (v) => e.node[c.key] = v
|
|
6424
|
-
}, null, 8, ["value", "type", "label", "icon", "required", "error", "onUpdate:value"])) : c.inputType === "boolean" ? (Q(), re("div",
|
|
6426
|
+
}, null, 8, ["value", "type", "label", "icon", "required", "error", "onUpdate:value"])) : c.inputType === "boolean" ? (Q(), re("div", Go, [
|
|
6425
6427
|
Ve(i, {
|
|
6426
6428
|
label: c.label,
|
|
6427
6429
|
icon: c.icon,
|
|
6428
6430
|
required: c.required,
|
|
6429
6431
|
style: { width: "auto" }
|
|
6430
6432
|
}, null, 8, ["label", "icon", "required"]),
|
|
6431
|
-
|
|
6433
|
+
le("input", {
|
|
6432
6434
|
type: "checkbox",
|
|
6433
6435
|
checked: e.node[c.key],
|
|
6434
6436
|
style: { width: "auto", margin: "0" },
|
|
6435
6437
|
onChange: (v) => {
|
|
6436
6438
|
e.node[c.key] = v.target.checked;
|
|
6437
6439
|
}
|
|
6438
|
-
}, null, 40,
|
|
6440
|
+
}, null, 40, Jo)
|
|
6439
6441
|
])) : c.inputType === "select" ? (Q(), $e(m, {
|
|
6440
6442
|
key: 2,
|
|
6441
6443
|
value: e.node[c.key],
|
|
@@ -6466,30 +6468,30 @@ function Zo(e, t, r, s, h, o) {
|
|
|
6466
6468
|
required: c.required,
|
|
6467
6469
|
error: e.errors[`node.${c.key}`],
|
|
6468
6470
|
"onUpdate:value": (v) => e.node[c.key] = v
|
|
6469
|
-
}, null, 8, ["value", "type", "node", "prop-name", "label", "icon", "required", "error", "onUpdate:value"])) : c.inputType === "array-text" ? (Q(), re("div",
|
|
6471
|
+
}, null, 8, ["value", "type", "node", "prop-name", "label", "icon", "required", "error", "onUpdate:value"])) : c.inputType === "array-text" ? (Q(), re("div", Wo, [
|
|
6470
6472
|
Ve(i, {
|
|
6471
6473
|
label: c.label,
|
|
6472
6474
|
icon: c.icon,
|
|
6473
6475
|
required: c.required
|
|
6474
6476
|
}, null, 8, ["label", "icon", "required"]),
|
|
6475
|
-
t[0] || (t[0] =
|
|
6477
|
+
t[0] || (t[0] = le(
|
|
6476
6478
|
"span",
|
|
6477
6479
|
{ style: { display: "block", "font-size": "11px", color: "var(--red-ui-text-color-disabled, #999)", "margin-bottom": "4px" } },
|
|
6478
6480
|
" One entry per line ",
|
|
6479
6481
|
-1
|
|
6480
6482
|
/* CACHED */
|
|
6481
6483
|
)),
|
|
6482
|
-
|
|
6484
|
+
le("textarea", {
|
|
6483
6485
|
value: Array.isArray(e.node[c.key]) ? e.node[c.key].join(`
|
|
6484
6486
|
`) : e.node[c.key] ?? "",
|
|
6485
6487
|
rows: "4",
|
|
6486
6488
|
style: { width: "100%", resize: "vertical", "font-family": "monospace", "font-size": "13px" },
|
|
6487
6489
|
onInput: (v) => e.node[c.key] = v.target.value.split(`
|
|
6488
6490
|
`).filter(Boolean)
|
|
6489
|
-
}, null, 40,
|
|
6491
|
+
}, null, 40, Yo),
|
|
6490
6492
|
e.errors[`node.${c.key}`] ? (Q(), re(
|
|
6491
6493
|
"span",
|
|
6492
|
-
|
|
6494
|
+
Zo,
|
|
6493
6495
|
qe(e.errors[`node.${c.key}`]),
|
|
6494
6496
|
1
|
|
6495
6497
|
/* TEXT */
|
|
@@ -6530,14 +6532,14 @@ function Zo(e, t, r, s, h, o) {
|
|
|
6530
6532
|
))
|
|
6531
6533
|
]);
|
|
6532
6534
|
}
|
|
6533
|
-
const Vn = /* @__PURE__ */ Re(
|
|
6534
|
-
function
|
|
6535
|
+
const Vn = /* @__PURE__ */ Re(Bo, [["render", Qo]]), _s = {}, ir = {};
|
|
6536
|
+
function ri(e) {
|
|
6535
6537
|
Object.assign(_s, e);
|
|
6536
6538
|
}
|
|
6537
|
-
function
|
|
6539
|
+
function ni(e) {
|
|
6538
6540
|
Object.assign(ir, e);
|
|
6539
6541
|
}
|
|
6540
|
-
function
|
|
6542
|
+
function Xo(e, t, r, s) {
|
|
6541
6543
|
const h = Ns(lo, {
|
|
6542
6544
|
node: e,
|
|
6543
6545
|
schema: r,
|
|
@@ -6545,8 +6547,8 @@ function Qo(e, t, r, s) {
|
|
|
6545
6547
|
});
|
|
6546
6548
|
return h.component("NodeRedInputLabel", Ae), h.component("NodeRedInput", ps), h.component("NodeRedTypedInput", hs), h.component("NodeRedConfigInput", ms), h.component("NodeRedSelectInput", ys), h.component("NodeRedEditorInput", gs), h.component("NodeRedJsonSchemaForm", Vn), h.component("NodeRedNodeForm", (t == null ? void 0 : t.component) ?? Vn), h.config.globalProperties.$i18n = (o) => e._(`${e.type}.${o}`), h;
|
|
6547
6549
|
}
|
|
6548
|
-
function
|
|
6549
|
-
$(`#${h}`).empty(), e._newState = Ds(e), e._app =
|
|
6550
|
+
function xo(e, t, r, s, h) {
|
|
6551
|
+
$(`#${h}`).empty(), e._newState = Ds(e), e._app = Xo(e._newState, t, r, s), e._app.mount(`#${h}`);
|
|
6550
6552
|
}
|
|
6551
6553
|
function nr(e) {
|
|
6552
6554
|
e._app && (e._app.unmount(), e._app = null);
|
|
@@ -6578,10 +6580,10 @@ function $s(e, t) {
|
|
|
6578
6580
|
Array.isArray(s) ? e[r] = [...s] : s !== null && typeof s == "object" ? ((!e[r] || typeof e[r] != "object" || Array.isArray(e[r])) && (e[r] = {}), $s(e[r], s)) : e[r] = s;
|
|
6579
6581
|
}
|
|
6580
6582
|
}
|
|
6581
|
-
function
|
|
6583
|
+
function si(e) {
|
|
6582
6584
|
return e;
|
|
6583
6585
|
}
|
|
6584
|
-
async function
|
|
6586
|
+
async function ei(e) {
|
|
6585
6587
|
const { type: t } = e;
|
|
6586
6588
|
try {
|
|
6587
6589
|
let r = function() {
|
|
@@ -6600,7 +6602,7 @@ async function xo(e) {
|
|
|
6600
6602
|
hasInputSchema: !!a.inputSchema,
|
|
6601
6603
|
hasOutputSchema: !!a.outputsSchema
|
|
6602
6604
|
};
|
|
6603
|
-
|
|
6605
|
+
xo(this, N, y, c, g);
|
|
6604
6606
|
}, s = function() {
|
|
6605
6607
|
var f;
|
|
6606
6608
|
const y = this;
|
|
@@ -6696,17 +6698,17 @@ async function xo(e) {
|
|
|
6696
6698
|
throw console.error(`Error while registering node type ${t}:`, r), r;
|
|
6697
6699
|
}
|
|
6698
6700
|
}
|
|
6699
|
-
async function
|
|
6701
|
+
async function ai(e) {
|
|
6700
6702
|
try {
|
|
6701
|
-
console.log("Registering node types in parallel"), await Promise.all(e.map((t) =>
|
|
6703
|
+
console.log("Registering node types in parallel"), await Promise.all(e.map((t) => ei(t))), console.log("All node types registered in parallel");
|
|
6702
6704
|
} catch (t) {
|
|
6703
6705
|
throw console.error("Error registering node types:", t), t;
|
|
6704
6706
|
}
|
|
6705
6707
|
}
|
|
6706
6708
|
export {
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6709
|
+
ni as __setForms,
|
|
6710
|
+
ri as __setSchemas,
|
|
6711
|
+
si as defineNode,
|
|
6712
|
+
ei as registerType,
|
|
6713
|
+
ai as registerTypes
|
|
6712
6714
|
};
|