@revenexx/studio-integrations 3.8.1 → 3.8.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @revenexx/studio-integrations
|
|
2
2
|
|
|
3
|
+
## 3.8.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b641ccf: A setting that holds a group of values, and whose node lets it take a value mapped from an earlier step, now has the same switch beside it as a number or a choice. The switch turns it into the box with the `{ }` list, and where the setting says what it wants and exactly one earlier output fits, that output is offered in a click. Send Email's Attachments can so be filled with the file a step before built, without typing the expression into JSON. A value already mapped into such a setting opens as the mapping; switching back empties it into its rows. A list of several mapped values stays JSON.
|
|
8
|
+
|
|
3
9
|
## 3.8.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/module.json
CHANGED
|
@@ -199,16 +199,28 @@ function acceptsSftp(field) {
|
|
|
199
199
|
}
|
|
200
200
|
const EXPR_TOKEN = "${{";
|
|
201
201
|
const TYPED_KINDS = ["number", "boolean", "select", "multiselect"];
|
|
202
|
+
const MAPPABLE_KINDS = [...TYPED_KINDS, "object"];
|
|
202
203
|
const valueIsExpression = computed(() => typeof value.value === "string" && value.value.includes(EXPR_TOKEN));
|
|
203
204
|
const canToggleExpression = computed(
|
|
204
|
-
() => (!!props.field.dynamic ||
|
|
205
|
+
() => (!!props.field.dynamic || MAPPABLE_KINDS.includes(props.field.type)) && (!!props.field.expressionAllowed || valueIsExpression.value) && !holdsLiteralGroup.value
|
|
205
206
|
);
|
|
207
|
+
const holdsLiteralGroup = computed(() => {
|
|
208
|
+
if (props.field.type !== "object") return false;
|
|
209
|
+
const v = value.value;
|
|
210
|
+
if (Array.isArray(v)) return v.length > 0;
|
|
211
|
+
return !!v && typeof v === "object" && Object.keys(v).length > 0;
|
|
212
|
+
});
|
|
206
213
|
const exprMode = ref(false);
|
|
214
|
+
watch(canToggleExpression, (can) => {
|
|
215
|
+
if (!can) exprMode.value = false;
|
|
216
|
+
});
|
|
207
217
|
const showExpression = computed(() => canToggleExpression.value && (exprMode.value || valueIsExpression.value));
|
|
208
218
|
function toggleExpression() {
|
|
209
219
|
if (showExpression.value) {
|
|
210
|
-
|
|
220
|
+
const cleared = valueIsExpression.value || props.field.type === "object" && typeof value.value === "string";
|
|
221
|
+
if (cleared) write(void 0);
|
|
211
222
|
exprMode.value = false;
|
|
223
|
+
if (isObjectField.value && (cleared || flatCapable.value)) objectMode.value = "form";
|
|
212
224
|
} else {
|
|
213
225
|
exprMode.value = true;
|
|
214
226
|
}
|
|
@@ -269,7 +281,7 @@ const isQueryField = computed(
|
|
|
269
281
|
() => props.field.type === "array" && props.field.items?.type !== "object" && /(^|__)queries$/.test(props.field.key)
|
|
270
282
|
);
|
|
271
283
|
const isJsonField = computed(
|
|
272
|
-
() => isObjectField.value && objectMode.value === "json" || props.field.type === "array" && props.field.items?.type !== "object" && !isQueryField.value
|
|
284
|
+
() => isObjectField.value && objectMode.value === "json" && !showExpression.value || props.field.type === "array" && props.field.items?.type !== "object" && !isQueryField.value
|
|
273
285
|
);
|
|
274
286
|
const jsonError = ref(null);
|
|
275
287
|
const jsonDraft = ref("");
|
|
@@ -402,7 +414,9 @@ function setArrayItemField(index, fieldKey, v) {
|
|
|
402
414
|
</div>
|
|
403
415
|
<!-- object / plain-array fields: JSON editor (expressions stay usable
|
|
404
416
|
inside string values). Wins over expressionAllowed — an object value
|
|
405
|
-
in a text input would render as [object Object]
|
|
417
|
+
in a text input would render as [object Object] — except for an object
|
|
418
|
+
switched to, or saved as, a mapped value, which is the expression box
|
|
419
|
+
below (PO-608). -->
|
|
406
420
|
<!-- queries parameter: filter builder -->
|
|
407
421
|
<!-- vpn-route — public internet, or a route of one of the tenant's VPN
|
|
408
422
|
connections, of the kind the node asks for (specs/credential-network.md
|
|
@@ -437,7 +451,7 @@ function setArrayItemField(index, fieldKey, v) {
|
|
|
437
451
|
</template>
|
|
438
452
|
|
|
439
453
|
<!-- object field in key/value mode -->
|
|
440
|
-
<div v-else-if="isObjectField && objectMode === 'form'" class="space-y-1.5">
|
|
454
|
+
<div v-else-if="isObjectField && objectMode === 'form' && !showExpression" class="space-y-1.5">
|
|
441
455
|
<div v-for="(row, idx) in kvRows" :key="idx" class="flex items-center gap-1.5">
|
|
442
456
|
<!-- A repeating row has no room for visible labels, so each control
|
|
443
457
|
names itself and says which row of which field it belongs to. -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revenexx/studio-integrations",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Integration Studio (core: workflows, node editor, runs, schedules, credentials, secrets, audit) as a standalone, publishable Nuxt module.",
|
|
6
6
|
"repository": {
|