@bonsae/nrg 0.26.2 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/index.cjs +198 -151
- package/server/resources/nrg-client.js +9 -9
- package/test/client/component/index.js +107 -99
- package/test/client/component/nrg.css +1 -1
- package/test/client/component/setup.js +103 -75
- package/test/client/e2e/index.js +11 -5
- package/test/server/integration/config.js +0 -6
- package/test/server/integration/index.js +77 -1222
- package/test/server/unit/config.js +0 -6
- package/test/server/unit/index.js +1 -9
- package/types/client.d.ts +15 -7
- package/types/server.d.ts +81 -72
- package/types/shims/core/client/form/components/node-red-json-schema-form.vue.d.ts +11 -1
- package/types/shims/core/client/form/components/node-red-toggle.vue.d.ts +15 -0
- package/types/shims/core/client/types.d.ts +8 -3
- package/types/shims/core/schema-options.d.ts +1 -1
- package/types/shims/core/types.d.ts +32 -8
- package/types/shims/schema-options.d.ts +1 -1
- package/types/test-client-component.d.ts +9 -6
- package/types/test-client-unit.d.ts +8 -5
- package/types/test-server-integration.d.ts +1 -1
- package/vite/index.js +12 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { config as D } from "vitest-browser-vue";
|
|
2
|
-
import { defineComponent as V, openBlock as l, createElementBlock as c, normalizeClass as
|
|
2
|
+
import { defineComponent as V, openBlock as l, createElementBlock as c, normalizeClass as R, createCommentVNode as f, renderSlot as k, createTextVNode as W, toDisplayString as E, resolveComponent as g, createBlock as v, createElementVNode as m, shallowRef as q, withDirectives as H, vShow as J, Teleport as K, Fragment as _, renderList as j, createVNode as N } from "vue";
|
|
3
3
|
import { beforeEach as Q } from "vitest";
|
|
4
4
|
const Y = V({
|
|
5
5
|
name: "NodeRedInputLabel",
|
|
@@ -37,7 +37,7 @@ function X(e, t, n, r, s, d) {
|
|
|
37
37
|
"i",
|
|
38
38
|
{
|
|
39
39
|
key: 0,
|
|
40
|
-
class:
|
|
40
|
+
class: R(e.iconClass)
|
|
41
41
|
},
|
|
42
42
|
null,
|
|
43
43
|
2
|
|
@@ -53,8 +53,8 @@ function X(e, t, n, r, s, d) {
|
|
|
53
53
|
e.required ? (l(), c("span", G, "*")) : f("v-if", !0)
|
|
54
54
|
]);
|
|
55
55
|
}
|
|
56
|
-
const
|
|
57
|
-
components: { NodeRedInputLabel:
|
|
56
|
+
const S = /* @__PURE__ */ T(Y, [["render", X], ["__scopeId", "data-v-864b02f2"]]), L = "*************", x = V({
|
|
57
|
+
components: { NodeRedInputLabel: S },
|
|
58
58
|
props: {
|
|
59
59
|
modelValue: {
|
|
60
60
|
type: [String, Number],
|
|
@@ -108,10 +108,10 @@ const w = /* @__PURE__ */ T(Y, [["render", X], ["__scopeId", "data-v-864b02f2"]]
|
|
|
108
108
|
this.internalValue = e.target.value, this.$emit("update:modelValue", this.internalValue), this.$emit("update:value", this.internalValue), this.$emit("input", this.internalValue);
|
|
109
109
|
},
|
|
110
110
|
onFocus() {
|
|
111
|
-
this.type === "password" && this.internalValue ===
|
|
111
|
+
this.type === "password" && this.internalValue === L && (this.internalValue = "");
|
|
112
112
|
},
|
|
113
113
|
onBlur() {
|
|
114
|
-
this.type === "password" && this.effectiveValue === "__PWD__" && (this.internalValue =
|
|
114
|
+
this.type === "password" && this.effectiveValue === "__PWD__" && (this.internalValue = L);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
}), ee = { style: { display: "flex", "flex-direction": "column", width: "100%" } }, te = ["type", "value", "placeholder"], ne = {
|
|
@@ -148,7 +148,7 @@ function re(e, t, n, r, s, d) {
|
|
|
148
148
|
)) : f("v-if", !0)
|
|
149
149
|
]);
|
|
150
150
|
}
|
|
151
|
-
const
|
|
151
|
+
const U = /* @__PURE__ */ T(x, [["render", re]]), oe = [
|
|
152
152
|
"msg",
|
|
153
153
|
"flow",
|
|
154
154
|
"global",
|
|
@@ -164,7 +164,7 @@ const B = /* @__PURE__ */ T(x, [["render", re]]), oe = [
|
|
|
164
164
|
"node",
|
|
165
165
|
"cred"
|
|
166
166
|
], ie = ["errorPort", "completePort", "statusPort"], se = V({
|
|
167
|
-
components: { NodeRedInputLabel:
|
|
167
|
+
components: { NodeRedInputLabel: S },
|
|
168
168
|
props: {
|
|
169
169
|
modelValue: {
|
|
170
170
|
type: Object,
|
|
@@ -322,8 +322,8 @@ function de(e, t, n, r, s, d) {
|
|
|
322
322
|
)) : f("v-if", !0)
|
|
323
323
|
]);
|
|
324
324
|
}
|
|
325
|
-
const
|
|
326
|
-
components: { NodeRedInputLabel:
|
|
325
|
+
const B = /* @__PURE__ */ T(se, [["render", de]]), pe = V({
|
|
326
|
+
components: { NodeRedInputLabel: S },
|
|
327
327
|
props: {
|
|
328
328
|
modelValue: {
|
|
329
329
|
type: String,
|
|
@@ -421,8 +421,8 @@ function me(e, t, n, r, s, d) {
|
|
|
421
421
|
)) : f("v-if", !0)
|
|
422
422
|
]);
|
|
423
423
|
}
|
|
424
|
-
const
|
|
425
|
-
components: { NodeRedInputLabel:
|
|
424
|
+
const F = /* @__PURE__ */ T(pe, [["render", me]]), he = V({
|
|
425
|
+
components: { NodeRedInputLabel: S },
|
|
426
426
|
props: {
|
|
427
427
|
modelValue: {
|
|
428
428
|
type: [String, Array],
|
|
@@ -538,8 +538,8 @@ function $e(e, t, n, r, s, d) {
|
|
|
538
538
|
)) : f("v-if", !0)
|
|
539
539
|
]);
|
|
540
540
|
}
|
|
541
|
-
const
|
|
542
|
-
components: { NodeRedInputLabel:
|
|
541
|
+
const M = /* @__PURE__ */ T(he, [["render", $e]]), Ie = V({
|
|
542
|
+
components: { NodeRedInputLabel: S },
|
|
543
543
|
props: {
|
|
544
544
|
modelValue: {
|
|
545
545
|
type: String,
|
|
@@ -850,7 +850,7 @@ function ke(e, t, n, r, s, d) {
|
|
|
850
850
|
/* NEED_PATCH */
|
|
851
851
|
);
|
|
852
852
|
}
|
|
853
|
-
const P = /* @__PURE__ */ T(Ie, [["render", ke], ["__scopeId", "data-v-ea93e881"]]),
|
|
853
|
+
const P = /* @__PURE__ */ T(Ie, [["render", ke], ["__scopeId", "data-v-ea93e881"]]), Se = V({
|
|
854
854
|
name: "NodeRedToggle",
|
|
855
855
|
props: {
|
|
856
856
|
modelValue: {
|
|
@@ -864,6 +864,13 @@ const P = /* @__PURE__ */ T(Ie, [["render", ke], ["__scopeId", "data-v-ea93e881"
|
|
|
864
864
|
icon: {
|
|
865
865
|
type: String,
|
|
866
866
|
default: ""
|
|
867
|
+
},
|
|
868
|
+
/** Accessible name for the control when no visible `label` is rendered
|
|
869
|
+
* (e.g. a bare toggle in a table cell where the column header is the
|
|
870
|
+
* visible label but isn't programmatically associated). */
|
|
871
|
+
ariaLabel: {
|
|
872
|
+
type: String,
|
|
873
|
+
default: ""
|
|
867
874
|
}
|
|
868
875
|
},
|
|
869
876
|
emits: ["update:modelValue"],
|
|
@@ -872,33 +879,34 @@ const P = /* @__PURE__ */ T(Ie, [["render", ke], ["__scopeId", "data-v-ea93e881"
|
|
|
872
879
|
return this.icon ? `fa ${this.icon.startsWith("fa-") ? this.icon : `fa-${this.icon}`}` : "";
|
|
873
880
|
}
|
|
874
881
|
}
|
|
875
|
-
}),
|
|
882
|
+
}), we = { class: "nrg-toggle-wrapper" }, qe = ["checked", "aria-label"], Ne = {
|
|
876
883
|
key: 0,
|
|
877
884
|
class: "nrg-toggle__label"
|
|
878
885
|
};
|
|
879
|
-
function
|
|
880
|
-
return l(), c("div",
|
|
886
|
+
function Re(e, t, n, r, s, d) {
|
|
887
|
+
return l(), c("div", we, [
|
|
881
888
|
m(
|
|
882
889
|
"label",
|
|
883
890
|
{
|
|
884
|
-
class:
|
|
891
|
+
class: R(["nrg-toggle", { "nrg-toggle--checked": e.modelValue }])
|
|
885
892
|
},
|
|
886
893
|
[
|
|
887
894
|
m("input", {
|
|
888
895
|
type: "checkbox",
|
|
889
896
|
checked: e.modelValue,
|
|
890
897
|
class: "nrg-toggle__input",
|
|
898
|
+
"aria-label": e.ariaLabel || void 0,
|
|
891
899
|
onChange: t[0] || (t[0] = (a) => e.$emit(
|
|
892
900
|
"update:modelValue",
|
|
893
901
|
a.target.checked
|
|
894
902
|
))
|
|
895
903
|
}, null, 40, qe),
|
|
896
|
-
e.icon || e.label ? (l(), c("span",
|
|
904
|
+
e.icon || e.label ? (l(), c("span", Ne, [
|
|
897
905
|
e.icon ? (l(), c(
|
|
898
906
|
"i",
|
|
899
907
|
{
|
|
900
908
|
key: 0,
|
|
901
|
-
class:
|
|
909
|
+
class: R(e.iconClass)
|
|
902
910
|
},
|
|
903
911
|
null,
|
|
904
912
|
2
|
|
@@ -923,7 +931,7 @@ function Ne(e, t, n, r, s, d) {
|
|
|
923
931
|
)
|
|
924
932
|
]);
|
|
925
933
|
}
|
|
926
|
-
const z = /* @__PURE__ */ T(
|
|
934
|
+
const z = /* @__PURE__ */ T(Se, [["render", Re], ["__scopeId", "data-v-4657f355"]]), _e = /* @__PURE__ */ new Set([
|
|
927
935
|
"id",
|
|
928
936
|
"type",
|
|
929
937
|
"x",
|
|
@@ -940,16 +948,16 @@ const z = /* @__PURE__ */ T(we, [["render", Ne], ["__scopeId", "data-v-724dcae4"
|
|
|
940
948
|
"outputReturnProperties",
|
|
941
949
|
...ie
|
|
942
950
|
]);
|
|
943
|
-
function
|
|
951
|
+
function je(e) {
|
|
944
952
|
return e.replace(/([A-Z])/g, " $1").replace(/^./, (t) => t.toUpperCase()).trim();
|
|
945
953
|
}
|
|
946
|
-
function
|
|
954
|
+
function Le(e) {
|
|
947
955
|
var t, n;
|
|
948
956
|
return e.type === "object" && !!((t = e.properties) != null && t.value) && !!((n = e.properties) != null && n.type);
|
|
949
957
|
}
|
|
950
958
|
function C(e, t, n, r) {
|
|
951
|
-
var
|
|
952
|
-
const s = r || t.title ||
|
|
959
|
+
var I;
|
|
960
|
+
const s = r || t.title || je(e), d = t["x-nrg-form"] ?? {}, a = d.icon || "";
|
|
953
961
|
if (t["x-nrg-node-type"])
|
|
954
962
|
return {
|
|
955
963
|
key: e,
|
|
@@ -959,7 +967,7 @@ function C(e, t, n, r) {
|
|
|
959
967
|
required: n,
|
|
960
968
|
configType: t["x-nrg-node-type"]
|
|
961
969
|
};
|
|
962
|
-
if (
|
|
970
|
+
if (Le(t))
|
|
963
971
|
return {
|
|
964
972
|
key: e,
|
|
965
973
|
label: s,
|
|
@@ -969,7 +977,7 @@ function C(e, t, n, r) {
|
|
|
969
977
|
// serialized schemas carry plain strings; trust them as typed-input type names
|
|
970
978
|
types: d.typedInputTypes
|
|
971
979
|
};
|
|
972
|
-
if (t.type === "array" && ((
|
|
980
|
+
if (t.type === "array" && ((I = t.items) != null && I.enum))
|
|
973
981
|
return {
|
|
974
982
|
key: e,
|
|
975
983
|
label: s,
|
|
@@ -1049,9 +1057,8 @@ function C(e, t, n, r) {
|
|
|
1049
1057
|
key: e,
|
|
1050
1058
|
label: s,
|
|
1051
1059
|
icon: a,
|
|
1052
|
-
inputType: "
|
|
1053
|
-
required: n
|
|
1054
|
-
htmlType: "text"
|
|
1060
|
+
inputType: "object-json",
|
|
1061
|
+
required: n
|
|
1055
1062
|
};
|
|
1056
1063
|
default:
|
|
1057
1064
|
return d.editorLanguage ? {
|
|
@@ -1074,12 +1081,12 @@ function C(e, t, n, r) {
|
|
|
1074
1081
|
const Ce = V({
|
|
1075
1082
|
name: "NodeRedJsonSchemaForm",
|
|
1076
1083
|
components: {
|
|
1077
|
-
NodeRedInputLabel:
|
|
1084
|
+
NodeRedInputLabel: S,
|
|
1078
1085
|
NodeRedToggle: z,
|
|
1079
|
-
NodeRedInput:
|
|
1080
|
-
NodeRedSelectInput:
|
|
1081
|
-
NodeRedTypedInput:
|
|
1082
|
-
NodeRedConfigInput:
|
|
1086
|
+
NodeRedInput: U,
|
|
1087
|
+
NodeRedSelectInput: M,
|
|
1088
|
+
NodeRedTypedInput: B,
|
|
1089
|
+
NodeRedConfigInput: F,
|
|
1083
1090
|
NodeRedEditorInput: P
|
|
1084
1091
|
},
|
|
1085
1092
|
props: {
|
|
@@ -1131,23 +1138,35 @@ const Ce = V({
|
|
|
1131
1138
|
}
|
|
1132
1139
|
},
|
|
1133
1140
|
methods: {
|
|
1141
|
+
// Parse a JSON-object field's textarea into a real object so AJV's
|
|
1142
|
+
// `type: "object"` validates and the saved value is an object. On invalid
|
|
1143
|
+
// JSON, keep the raw string so the type error surfaces instead of being
|
|
1144
|
+
// silently swallowed. Runs on blur (`@change`) so typing isn't reformatted.
|
|
1145
|
+
setObjectField(e, t) {
|
|
1146
|
+
const n = this.node;
|
|
1147
|
+
try {
|
|
1148
|
+
n[e] = JSON.parse(t);
|
|
1149
|
+
} catch {
|
|
1150
|
+
n[e] = t;
|
|
1151
|
+
}
|
|
1152
|
+
},
|
|
1134
1153
|
resolveI18n(e, t) {
|
|
1135
1154
|
const n = this.$i18n(`${e}.${t}`), r = `${this.node.type}.${e}.${t}`;
|
|
1136
1155
|
if (n && n !== r && n !== `${e}.${t}`)
|
|
1137
1156
|
return n;
|
|
1138
1157
|
}
|
|
1139
1158
|
}
|
|
1140
|
-
}),
|
|
1159
|
+
}), Oe = { key: 1 }, Ae = { key: 2 }, De = ["checked", "onChange"], We = { key: 6 }, Ue = ["value", "onInput"], Be = {
|
|
1141
1160
|
key: 0,
|
|
1142
1161
|
class: "node-red-vue-input-error-message"
|
|
1143
1162
|
};
|
|
1144
|
-
function
|
|
1145
|
-
const a = g("NodeRedInput"), h = g("NodeRedToggle"),
|
|
1163
|
+
function Fe(e, t, n, r, s, d) {
|
|
1164
|
+
const a = g("NodeRedInput"), h = g("NodeRedToggle"), I = g("NodeRedInputLabel"), i = g("NodeRedSelectInput"), u = g("NodeRedTypedInput"), y = g("NodeRedConfigInput"), b = g("NodeRedEditorInput");
|
|
1146
1165
|
return l(), c("div", null, [
|
|
1147
1166
|
(l(!0), c(
|
|
1148
1167
|
_,
|
|
1149
1168
|
null,
|
|
1150
|
-
|
|
1169
|
+
j(e.configFields, (o) => (l(), c("div", {
|
|
1151
1170
|
key: o.key,
|
|
1152
1171
|
class: "form-row"
|
|
1153
1172
|
}, [
|
|
@@ -1160,15 +1179,15 @@ function Me(e, t, n, r, s, d) {
|
|
|
1160
1179
|
icon: o.icon,
|
|
1161
1180
|
required: o.required,
|
|
1162
1181
|
error: e.errors[`node.${o.key}`]
|
|
1163
|
-
}, null, 8, ["value", "onUpdate:value", "type", "label", "icon", "required", "error"])) : o.inputType === "boolean" && o.toggle ? (l(), c("div",
|
|
1164
|
-
|
|
1182
|
+
}, null, 8, ["value", "onUpdate:value", "type", "label", "icon", "required", "error"])) : o.inputType === "boolean" && o.toggle ? (l(), c("div", Oe, [
|
|
1183
|
+
N(h, {
|
|
1165
1184
|
"model-value": e.node[o.key],
|
|
1166
1185
|
label: o.label,
|
|
1167
1186
|
icon: o.icon,
|
|
1168
1187
|
"onUpdate:modelValue": (p) => e.node[o.key] = p
|
|
1169
1188
|
}, null, 8, ["model-value", "label", "icon", "onUpdate:modelValue"])
|
|
1170
|
-
])) : o.inputType === "boolean" ? (l(), c("div",
|
|
1171
|
-
|
|
1189
|
+
])) : o.inputType === "boolean" ? (l(), c("div", Ae, [
|
|
1190
|
+
N(I, {
|
|
1172
1191
|
label: o.label,
|
|
1173
1192
|
icon: o.icon,
|
|
1174
1193
|
required: o.required
|
|
@@ -1212,7 +1231,7 @@ function Me(e, t, n, r, s, d) {
|
|
|
1212
1231
|
required: o.required,
|
|
1213
1232
|
error: e.errors[`node.${o.key}`]
|
|
1214
1233
|
}, null, 8, ["value", "onUpdate:value", "type", "node", "prop-name", "label", "icon", "required", "error"])) : o.inputType === "array-text" ? (l(), c("div", We, [
|
|
1215
|
-
|
|
1234
|
+
N(I, {
|
|
1216
1235
|
label: o.label,
|
|
1217
1236
|
icon: o.icon,
|
|
1218
1237
|
required: o.required
|
|
@@ -1231,16 +1250,25 @@ function Me(e, t, n, r, s, d) {
|
|
|
1231
1250
|
style: { width: "100%", resize: "vertical", "font-family": "monospace", "font-size": "13px" },
|
|
1232
1251
|
onInput: (p) => e.node[o.key] = p.target.value.split(`
|
|
1233
1252
|
`).filter(Boolean)
|
|
1234
|
-
}, null, 40,
|
|
1253
|
+
}, null, 40, Ue),
|
|
1235
1254
|
e.errors[`node.${o.key}`] ? (l(), c(
|
|
1236
1255
|
"span",
|
|
1237
|
-
|
|
1256
|
+
Be,
|
|
1238
1257
|
E(e.errors[`node.${o.key}`]),
|
|
1239
1258
|
1
|
|
1240
1259
|
/* TEXT */
|
|
1241
1260
|
)) : f("v-if", !0)
|
|
1242
|
-
])) : o.inputType === "
|
|
1261
|
+
])) : o.inputType === "object-json" ? (l(), v(b, {
|
|
1243
1262
|
key: 7,
|
|
1263
|
+
value: typeof e.node[o.key] == "string" ? e.node[o.key] : JSON.stringify(e.node[o.key] ?? {}, null, 2),
|
|
1264
|
+
language: "json",
|
|
1265
|
+
label: o.label,
|
|
1266
|
+
icon: o.icon,
|
|
1267
|
+
required: o.required,
|
|
1268
|
+
error: e.errors[`node.${o.key}`],
|
|
1269
|
+
"onUpdate:value": (p) => e.setObjectField(o.key, p)
|
|
1270
|
+
}, null, 8, ["value", "label", "icon", "required", "error", "onUpdate:value"])) : o.inputType === "editor" ? (l(), v(b, {
|
|
1271
|
+
key: 8,
|
|
1244
1272
|
value: e.node[o.key],
|
|
1245
1273
|
"onUpdate:value": (p) => e.node[o.key] = p,
|
|
1246
1274
|
language: o.language,
|
|
@@ -1256,11 +1284,11 @@ function Me(e, t, n, r, s, d) {
|
|
|
1256
1284
|
(l(!0), c(
|
|
1257
1285
|
_,
|
|
1258
1286
|
null,
|
|
1259
|
-
|
|
1287
|
+
j(e.credentialFields, (o) => (l(), c("div", {
|
|
1260
1288
|
key: `cred-${o.key}`,
|
|
1261
1289
|
class: "form-row"
|
|
1262
1290
|
}, [
|
|
1263
|
-
|
|
1291
|
+
N(a, {
|
|
1264
1292
|
value: e.node.credentials[o.key],
|
|
1265
1293
|
"onUpdate:value": (p) => e.node.credentials[o.key] = p,
|
|
1266
1294
|
type: o.htmlType,
|
|
@@ -1275,8 +1303,8 @@ function Me(e, t, n, r, s, d) {
|
|
|
1275
1303
|
))
|
|
1276
1304
|
]);
|
|
1277
1305
|
}
|
|
1278
|
-
const
|
|
1279
|
-
function
|
|
1306
|
+
const Me = /* @__PURE__ */ T(Ce, [["render", Fe]]);
|
|
1307
|
+
function O() {
|
|
1280
1308
|
const e = {
|
|
1281
1309
|
get(t) {
|
|
1282
1310
|
return e[t];
|
|
@@ -1317,12 +1345,12 @@ function He() {
|
|
|
1317
1345
|
}
|
|
1318
1346
|
};
|
|
1319
1347
|
return i;
|
|
1320
|
-
},
|
|
1348
|
+
}, I = {
|
|
1321
1349
|
_: (i) => i,
|
|
1322
1350
|
editor: {
|
|
1323
1351
|
createEditor(i) {
|
|
1324
1352
|
let u = (i == null ? void 0 : i.value) || "";
|
|
1325
|
-
const y = {},
|
|
1353
|
+
const y = {}, b = {
|
|
1326
1354
|
on(o, p) {
|
|
1327
1355
|
(y[o] ?? (y[o] = [])).push(p);
|
|
1328
1356
|
}
|
|
@@ -1332,7 +1360,7 @@ function He() {
|
|
|
1332
1360
|
setValue: (o) => {
|
|
1333
1361
|
u = o, (y.change ?? []).forEach((p) => p());
|
|
1334
1362
|
},
|
|
1335
|
-
getSession: () =>
|
|
1363
|
+
getSession: () => b,
|
|
1336
1364
|
focus: () => {
|
|
1337
1365
|
},
|
|
1338
1366
|
destroy: () => {
|
|
@@ -1409,8 +1437,8 @@ function He() {
|
|
|
1409
1437
|
filterLinks(i) {
|
|
1410
1438
|
return n.filter(
|
|
1411
1439
|
(u) => {
|
|
1412
|
-
var y,
|
|
1413
|
-
return (i.source === void 0 || u.source === i.source || ((y = u.source) == null ? void 0 : y.id) === ((
|
|
1440
|
+
var y, b, o, p;
|
|
1441
|
+
return (i.source === void 0 || u.source === i.source || ((y = u.source) == null ? void 0 : y.id) === ((b = i.source) == null ? void 0 : b.id)) && (i.target === void 0 || u.target === i.target || ((o = u.target) == null ? void 0 : o.id) === ((p = i.target) == null ? void 0 : p.id));
|
|
1414
1442
|
}
|
|
1415
1443
|
);
|
|
1416
1444
|
},
|
|
@@ -1444,7 +1472,7 @@ function He() {
|
|
|
1444
1472
|
},
|
|
1445
1473
|
unsubscribe(i, u) {
|
|
1446
1474
|
const y = s.findIndex(
|
|
1447
|
-
(
|
|
1475
|
+
(b) => b.topic === i && b.callback === u
|
|
1448
1476
|
);
|
|
1449
1477
|
y !== -1 && s.splice(y, 1);
|
|
1450
1478
|
},
|
|
@@ -1452,7 +1480,7 @@ function He() {
|
|
|
1452
1480
|
[...s].filter((y) => Pe(y.topic, i)).forEach((y) => y.callback(i, u));
|
|
1453
1481
|
}
|
|
1454
1482
|
},
|
|
1455
|
-
settings:
|
|
1483
|
+
settings: O(),
|
|
1456
1484
|
notify: () => ({
|
|
1457
1485
|
update: () => {
|
|
1458
1486
|
},
|
|
@@ -1460,23 +1488,23 @@ function He() {
|
|
|
1460
1488
|
}
|
|
1461
1489
|
})
|
|
1462
1490
|
};
|
|
1463
|
-
return Object.defineProperty(
|
|
1491
|
+
return Object.defineProperty(I, "__reset", {
|
|
1464
1492
|
enumerable: !1,
|
|
1465
1493
|
value: () => {
|
|
1466
1494
|
e.clear(), t.clear(), n.length = 0;
|
|
1467
1495
|
for (const i of Object.keys(r))
|
|
1468
1496
|
delete r[i];
|
|
1469
|
-
s.length = 0, d = !1,
|
|
1497
|
+
s.length = 0, d = !1, I.settings = O();
|
|
1470
1498
|
}
|
|
1471
|
-
}),
|
|
1499
|
+
}), I;
|
|
1472
1500
|
}
|
|
1473
|
-
function
|
|
1501
|
+
function A() {
|
|
1474
1502
|
return { typedInput: { value: "", type: "" }, listeners: {} };
|
|
1475
1503
|
}
|
|
1476
1504
|
function Je(e) {
|
|
1477
|
-
return e && !e.__jqState && (e.__jqState =
|
|
1505
|
+
return e && !e.__jqState && (e.__jqState = A()), e ? e.__jqState : A();
|
|
1478
1506
|
}
|
|
1479
|
-
function
|
|
1507
|
+
function w(e) {
|
|
1480
1508
|
const t = Je(e), n = {
|
|
1481
1509
|
0: e,
|
|
1482
1510
|
length: e ? 1 : 0,
|
|
@@ -1545,7 +1573,7 @@ function S(e) {
|
|
|
1545
1573
|
return r !== void 0 ? ((e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement) && (e.value = String(r)), n) : e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement ? e.value : "";
|
|
1546
1574
|
},
|
|
1547
1575
|
find(r) {
|
|
1548
|
-
return
|
|
1576
|
+
return w((e == null ? void 0 : e.querySelector(r)) ?? null);
|
|
1549
1577
|
},
|
|
1550
1578
|
append(r) {
|
|
1551
1579
|
const s = (r == null ? void 0 : r[0]) || r;
|
|
@@ -1586,11 +1614,11 @@ function Ke() {
|
|
|
1586
1614
|
if (s && n)
|
|
1587
1615
|
for (const [d, a] of Object.entries(n))
|
|
1588
1616
|
d === "html" ? s.innerHTML = String(a) : s.setAttribute(d, String(a));
|
|
1589
|
-
return
|
|
1617
|
+
return w(s);
|
|
1590
1618
|
}
|
|
1591
|
-
return
|
|
1619
|
+
return w(document.querySelector(t));
|
|
1592
1620
|
}
|
|
1593
|
-
return t instanceof Element || t && typeof t == "object" && t.nodeType ?
|
|
1621
|
+
return t instanceof Element || t && typeof t == "object" && t.nodeType ? w(t) : w(null);
|
|
1594
1622
|
};
|
|
1595
1623
|
}
|
|
1596
1624
|
function Qe() {
|
|
@@ -1600,13 +1628,13 @@ function Qe() {
|
|
|
1600
1628
|
}
|
|
1601
1629
|
D.global.mocks.$i18n = (e) => e;
|
|
1602
1630
|
D.global.components = {
|
|
1603
|
-
NodeRedInputLabel:
|
|
1631
|
+
NodeRedInputLabel: S,
|
|
1604
1632
|
NodeRedToggle: z,
|
|
1605
|
-
NodeRedInput:
|
|
1606
|
-
NodeRedTypedInput:
|
|
1607
|
-
NodeRedConfigInput:
|
|
1608
|
-
NodeRedSelectInput:
|
|
1633
|
+
NodeRedInput: U,
|
|
1634
|
+
NodeRedTypedInput: B,
|
|
1635
|
+
NodeRedConfigInput: F,
|
|
1636
|
+
NodeRedSelectInput: M,
|
|
1609
1637
|
NodeRedEditorInput: P,
|
|
1610
|
-
NodeRedJsonSchemaForm:
|
|
1638
|
+
NodeRedJsonSchemaForm: Me
|
|
1611
1639
|
};
|
|
1612
1640
|
Qe();
|
package/test/client/e2e/index.js
CHANGED
|
@@ -703,11 +703,17 @@ function packageJsonGenerator(options) {
|
|
|
703
703
|
distDependencies = void 0;
|
|
704
704
|
}
|
|
705
705
|
const distPackageJson = {
|
|
706
|
-
|
|
706
|
+
name: rootPackageJson.name,
|
|
707
|
+
version: rootPackageJson.version,
|
|
708
|
+
description: rootPackageJson.description,
|
|
709
|
+
author: rootPackageJson.author,
|
|
710
|
+
license: rootPackageJson.license,
|
|
711
|
+
homepage: rootPackageJson.homepage,
|
|
712
|
+
repository: rootPackageJson.repository,
|
|
713
|
+
bugs: rootPackageJson.bugs,
|
|
714
|
+
engines: rootPackageJson.engines,
|
|
707
715
|
main: "index.js",
|
|
708
716
|
type: "commonjs",
|
|
709
|
-
devDependencies: void 0,
|
|
710
|
-
scripts: void 0,
|
|
711
717
|
dependencies: distDependencies,
|
|
712
718
|
keywords: [
|
|
713
719
|
.../* @__PURE__ */ new Set([...rootPackageJson.keywords ?? [], "node-red"])
|
|
@@ -1856,8 +1862,8 @@ function localesGenerator(options) {
|
|
|
1856
1862
|
}
|
|
1857
1863
|
},
|
|
1858
1864
|
help: {
|
|
1859
|
-
validateInput: "\u5728 input() \u8FD0\u884C\u524D\uFF0C\u6839\u636E\u8F93\u5165\
|
|
1860
|
-
outputs: "\u6309\u7AEF\u53E3\u7684\u8F93\u51FA\u8BBE\u7F6E\u3002\u9A8C\u8BC1\u6570\u636E\u6839\u636E\u7AEF\u53E3\
|
|
1865
|
+
validateInput: "\u5728 input() \u8FD0\u884C\u524D\uFF0C\u6839\u636E\u8F93\u5165\u7ED3\u6784\u63CF\u8FF0\u6821\u9A8C\u4F20\u5165\u6D88\u606F\u3002",
|
|
1866
|
+
outputs: "\u6309\u7AEF\u53E3\u7684\u8F93\u51FA\u8BBE\u7F6E\u3002\u9A8C\u8BC1\u6570\u636E\u6839\u636E\u7AEF\u53E3\u7ED3\u6784\u63CF\u8FF0\u6821\u9A8C\u53D1\u9001\u7684\u503C\uFF1B\u4E0A\u4E0B\u6587\u6A21\u5F0F\u63A7\u5236\u5982\u4F55\u643A\u5E26\u4F20\u5165\u6D88\u606F\u3002",
|
|
1861
1867
|
lifecyclePorts: "\u53EF\u9009\u7684\u989D\u5916\u8F93\u51FA\u7AEF\u53E3\uFF0C\u5728\u51FA\u9519\u3001\u5B8C\u6210\u4EE5\u53CA\u6BCF\u6B21\u72B6\u6001\u53D8\u5316\u65F6\u89E6\u53D1\u3002",
|
|
1862
1868
|
learnMore: "\u4E86\u89E3\u66F4\u591A"
|
|
1863
1869
|
}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import { fileURLToPath as __nrgFileURLToPath } from "url";
|
|
2
|
-
import { dirname as __nrgDirname } from "path";
|
|
3
|
-
var __filename = __nrgFileURLToPath(import.meta.url);
|
|
4
|
-
var __dirname = __nrgDirname(__filename);
|
|
5
|
-
|
|
6
|
-
|
|
7
1
|
// src/test/server/integration/config.ts
|
|
8
2
|
import path from "path";
|
|
9
3
|
var defaultConfig = {
|