@revenexx/studio-integrations 0.1.4 → 0.3.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/README.md +31 -0
- package/dist/module.d.mts +2 -2
- package/dist/module.json +1 -1
- package/dist/runtime/components/Integrations/CredentialCreateDialog.d.vue.ts +13 -0
- package/dist/runtime/components/Integrations/CredentialCreateDialog.vue +279 -0
- package/dist/runtime/components/Integrations/CredentialCreateDialog.vue.d.ts +13 -0
- package/dist/runtime/components/Integrations/CredentialDetailDialog.d.vue.ts +20 -0
- package/dist/runtime/components/Integrations/CredentialDetailDialog.vue +342 -0
- package/dist/runtime/components/Integrations/CredentialDetailDialog.vue.d.ts +20 -0
- package/dist/runtime/components/Integrations/CredentialLogo.d.vue.ts +14 -0
- package/dist/runtime/components/Integrations/CredentialLogo.vue +37 -0
- package/dist/runtime/components/Integrations/CredentialLogo.vue.d.ts +14 -0
- package/dist/runtime/components/Integrations/CredentialRevenexxSource.d.vue.ts +12 -0
- package/dist/runtime/components/Integrations/CredentialRevenexxSource.vue +364 -0
- package/dist/runtime/components/Integrations/CredentialRevenexxSource.vue.d.ts +12 -0
- package/dist/runtime/components/Integrations/CredentialTypePicker.d.vue.ts +15 -0
- package/dist/runtime/components/Integrations/CredentialTypePicker.vue +71 -0
- package/dist/runtime/components/Integrations/CredentialTypePicker.vue.d.ts +15 -0
- package/dist/runtime/components/Integrations/DeadLettersPanel.d.vue.ts +5 -0
- package/dist/runtime/components/Integrations/DeadLettersPanel.vue +151 -0
- package/dist/runtime/components/Integrations/DeadLettersPanel.vue.d.ts +5 -0
- package/dist/runtime/components/Integrations/EditorTip.d.vue.ts +17 -0
- package/dist/runtime/components/Integrations/EditorTip.vue +46 -0
- package/dist/runtime/components/Integrations/EditorTip.vue.d.ts +17 -0
- package/dist/runtime/components/Integrations/EventTypeCombobox.d.vue.ts +9 -0
- package/dist/runtime/components/Integrations/EventTypeCombobox.vue +64 -0
- package/dist/runtime/components/Integrations/EventTypeCombobox.vue.d.ts +9 -0
- package/dist/runtime/components/Integrations/ExpressionInput.d.vue.ts +19 -0
- package/dist/runtime/components/Integrations/ExpressionInput.vue +236 -0
- package/dist/runtime/components/Integrations/ExpressionInput.vue.d.ts +19 -0
- package/dist/runtime/components/Integrations/GroupFrameView.d.vue.ts +28 -0
- package/dist/runtime/components/Integrations/GroupFrameView.vue +222 -0
- package/dist/runtime/components/Integrations/GroupFrameView.vue.d.ts +28 -0
- package/dist/runtime/components/Integrations/NodeConfigDynamicField.d.vue.ts +14 -0
- package/dist/runtime/components/Integrations/NodeConfigDynamicField.vue +184 -0
- package/dist/runtime/components/Integrations/NodeConfigDynamicField.vue.d.ts +14 -0
- package/dist/runtime/components/Integrations/NodeConfigDynamicSchema.d.vue.ts +16 -0
- package/dist/runtime/components/Integrations/NodeConfigDynamicSchema.vue +102 -0
- package/dist/runtime/components/Integrations/NodeConfigDynamicSchema.vue.d.ts +16 -0
- package/dist/runtime/components/Integrations/NodeConfigField.d.vue.ts +23 -0
- package/dist/runtime/components/Integrations/NodeConfigField.vue +587 -0
- package/dist/runtime/components/Integrations/NodeConfigField.vue.d.ts +23 -0
- package/dist/runtime/components/Integrations/NodeDynamicOutputsResolver.d.vue.ts +14 -0
- package/dist/runtime/components/Integrations/NodeDynamicOutputsResolver.vue +80 -0
- package/dist/runtime/components/Integrations/NodeDynamicOutputsResolver.vue.d.ts +14 -0
- package/dist/runtime/components/Integrations/NodeInspector.d.vue.ts +22 -3
- package/dist/runtime/components/Integrations/NodeInspector.vue +1074 -294
- package/dist/runtime/components/Integrations/NodeInspector.vue.d.ts +22 -3
- package/dist/runtime/components/Integrations/NodeLogo.d.vue.ts +9 -0
- package/dist/runtime/components/Integrations/NodeLogo.vue +38 -0
- package/dist/runtime/components/Integrations/NodeLogo.vue.d.ts +9 -0
- package/dist/runtime/components/Integrations/NodePalette.d.vue.ts +22 -1
- package/dist/runtime/components/Integrations/NodePalette.vue +411 -90
- package/dist/runtime/components/Integrations/NodePalette.vue.d.ts +22 -1
- package/dist/runtime/components/Integrations/QueryBuilder.d.vue.ts +9 -0
- package/dist/runtime/components/Integrations/QueryBuilder.vue +239 -0
- package/dist/runtime/components/Integrations/QueryBuilder.vue.d.ts +9 -0
- package/dist/runtime/components/Integrations/{RunDetailDialog.d.vue.ts → RunActionsMenu.d.vue.ts} +3 -4
- package/dist/runtime/components/Integrations/RunActionsMenu.vue +86 -0
- package/dist/runtime/components/Integrations/{RunDetailDialog.vue.d.ts → RunActionsMenu.vue.d.ts} +3 -4
- package/dist/runtime/components/Integrations/RunDetailPanel.d.vue.ts +14 -0
- package/dist/runtime/components/Integrations/RunDetailPanel.vue +777 -0
- package/dist/runtime/components/Integrations/RunDetailPanel.vue.d.ts +14 -0
- package/dist/runtime/components/Integrations/RunPayloadInput.d.vue.ts +13 -0
- package/dist/runtime/components/Integrations/RunPayloadInput.vue +175 -0
- package/dist/runtime/components/Integrations/RunPayloadInput.vue.d.ts +13 -0
- package/dist/runtime/components/Integrations/RunResponseModal.d.vue.ts +27 -0
- package/dist/runtime/components/Integrations/RunResponseModal.vue +84 -0
- package/dist/runtime/components/Integrations/RunResponseModal.vue.d.ts +27 -0
- package/dist/runtime/components/Integrations/RunsTable.d.vue.ts +21 -0
- package/dist/runtime/components/Integrations/RunsTable.vue +114 -0
- package/dist/runtime/components/Integrations/RunsTable.vue.d.ts +21 -0
- package/dist/runtime/components/Integrations/SftpAccountImportDialog.d.vue.ts +11 -0
- package/dist/runtime/components/Integrations/SftpAccountImportDialog.vue +91 -0
- package/dist/runtime/components/Integrations/SftpAccountImportDialog.vue.d.ts +11 -0
- package/dist/runtime/components/Integrations/StickyNoteView.d.vue.ts +28 -0
- package/dist/runtime/components/Integrations/StickyNoteView.vue +208 -0
- package/dist/runtime/components/Integrations/StickyNoteView.vue.d.ts +28 -0
- package/dist/runtime/components/Integrations/TemplateFlowPreview.d.vue.ts +29 -0
- package/dist/runtime/components/Integrations/TemplateFlowPreview.vue +201 -0
- package/dist/runtime/components/Integrations/TemplateFlowPreview.vue.d.ts +29 -0
- package/dist/runtime/components/Integrations/WorkflowContextMenu.d.vue.ts +32 -0
- package/dist/runtime/components/Integrations/WorkflowContextMenu.vue +138 -0
- package/dist/runtime/components/Integrations/WorkflowContextMenu.vue.d.ts +32 -0
- package/dist/runtime/components/Integrations/WorkflowCreateDialog.d.vue.ts +9 -0
- package/dist/runtime/components/Integrations/WorkflowCreateDialog.vue +322 -0
- package/dist/runtime/components/Integrations/WorkflowCreateDialog.vue.d.ts +9 -0
- package/dist/runtime/components/Integrations/WorkflowDuplicateDialog.d.vue.ts +18 -0
- package/dist/runtime/components/Integrations/WorkflowDuplicateDialog.vue +63 -0
- package/dist/runtime/components/Integrations/WorkflowDuplicateDialog.vue.d.ts +18 -0
- package/dist/runtime/components/Integrations/WorkflowEdgeView.d.vue.ts +12 -1
- package/dist/runtime/components/Integrations/WorkflowEdgeView.vue +68 -6
- package/dist/runtime/components/Integrations/WorkflowEdgeView.vue.d.ts +12 -1
- package/dist/runtime/components/Integrations/WorkflowEditor.d.vue.ts +8 -1
- package/dist/runtime/components/Integrations/WorkflowEditor.vue +1424 -144
- package/dist/runtime/components/Integrations/WorkflowEditor.vue.d.ts +8 -1
- package/dist/runtime/components/Integrations/WorkflowHistoryPanel.d.vue.ts +12 -0
- package/dist/runtime/components/Integrations/WorkflowHistoryPanel.vue +417 -0
- package/dist/runtime/components/Integrations/WorkflowHistoryPanel.vue.d.ts +12 -0
- package/dist/runtime/components/Integrations/WorkflowIconPicker.d.vue.ts +10 -0
- package/dist/runtime/components/Integrations/WorkflowIconPicker.vue +89 -0
- package/dist/runtime/components/Integrations/WorkflowIconPicker.vue.d.ts +10 -0
- package/dist/runtime/components/Integrations/WorkflowIconView.d.vue.ts +10 -0
- package/dist/runtime/components/Integrations/WorkflowIconView.vue +35 -0
- package/dist/runtime/components/Integrations/WorkflowIconView.vue.d.ts +10 -0
- package/dist/runtime/components/Integrations/WorkflowNodeView.d.vue.ts +5 -1
- package/dist/runtime/components/Integrations/WorkflowNodeView.vue +114 -84
- package/dist/runtime/components/Integrations/WorkflowNodeView.vue.d.ts +5 -1
- package/dist/runtime/components/Integrations/WorkflowRunReplayPanel.d.vue.ts +12 -0
- package/dist/runtime/components/Integrations/WorkflowRunReplayPanel.vue +654 -0
- package/dist/runtime/components/Integrations/WorkflowRunReplayPanel.vue.d.ts +12 -0
- package/dist/runtime/components/Integrations/WorkflowSettingsDialog.d.vue.ts +36 -0
- package/dist/runtime/components/Integrations/WorkflowSettingsDialog.vue +136 -0
- package/dist/runtime/components/Integrations/WorkflowSettingsDialog.vue.d.ts +36 -0
- package/dist/runtime/components/Integrations/WorkflowTagsInput.d.vue.ts +14 -0
- package/dist/runtime/components/Integrations/WorkflowTagsInput.vue +63 -0
- package/dist/runtime/components/Integrations/WorkflowTagsInput.vue.d.ts +14 -0
- package/dist/runtime/components/Integrations/WorkflowTriggerView.vue +35 -15
- package/dist/runtime/components/Integrations/WorkflowVariablesDialog.d.vue.ts +13 -0
- package/dist/runtime/components/Integrations/WorkflowVariablesDialog.vue +265 -0
- package/dist/runtime/components/Integrations/WorkflowVariablesDialog.vue.d.ts +13 -0
- package/dist/runtime/components/Integrations/WorkflowsTable.d.vue.ts +4 -1
- package/dist/runtime/components/Integrations/WorkflowsTable.vue +122 -39
- package/dist/runtime/components/Integrations/WorkflowsTable.vue.d.ts +4 -1
- package/dist/runtime/components/Integrations/workflowLayout.d.ts +5 -0
- package/dist/runtime/components/Integrations/workflowLayout.js +5 -3
- package/dist/runtime/composables/integrationsApi.d.ts +6 -7
- package/dist/runtime/composables/integrationsApi.js +6 -12
- package/dist/runtime/composables/useCanvasShortcuts.d.ts +37 -0
- package/dist/runtime/composables/useCanvasShortcuts.js +62 -0
- package/dist/runtime/composables/useCredentialTypes.js +2 -1
- package/dist/runtime/composables/useIntegrationsAudit.js +2 -1
- package/dist/runtime/composables/useIntegrationsCredentials.js +2 -1
- package/dist/runtime/composables/useIntegrationsDeadLetters.d.ts +22 -0
- package/dist/runtime/composables/useIntegrationsDeadLetters.js +50 -0
- package/dist/runtime/composables/useIntegrationsNodes.d.ts +4 -0
- package/dist/runtime/composables/useIntegrationsNodes.js +8 -4
- package/dist/runtime/composables/useIntegrationsRevisions.d.ts +40 -0
- package/dist/runtime/composables/useIntegrationsRevisions.js +52 -0
- package/dist/runtime/composables/useIntegrationsRuns.d.ts +21 -1
- package/dist/runtime/composables/useIntegrationsRuns.js +94 -5
- package/dist/runtime/composables/useIntegrationsSecrets.js +2 -1
- package/dist/runtime/composables/useIntegrationsTemplates.d.ts +1 -0
- package/dist/runtime/composables/useIntegrationsTemplates.js +34 -5
- package/dist/runtime/composables/useIntegrationsTriggers.js +2 -1
- package/dist/runtime/composables/useIntegrationsWorkflows.d.ts +1 -0
- package/dist/runtime/composables/useIntegrationsWorkflows.js +59 -2
- package/dist/runtime/composables/useMiniMapLayout.d.ts +34 -0
- package/dist/runtime/composables/useMiniMapLayout.js +119 -0
- package/dist/runtime/composables/useNodeConfigResolve.d.ts +43 -0
- package/dist/runtime/composables/useNodeConfigResolve.js +124 -0
- package/dist/runtime/composables/useNodeDrag.d.ts +22 -0
- package/dist/runtime/composables/useNodeDrag.js +10 -0
- package/dist/runtime/composables/usePaletteLayout.d.ts +41 -0
- package/dist/runtime/composables/usePaletteLayout.js +113 -0
- package/dist/runtime/data/expressionEditor.d.ts +22 -0
- package/dist/runtime/data/expressionEditor.js +40 -0
- package/dist/runtime/data/integrationNodeCatalog.js +8 -8
- package/dist/runtime/data/nodeInputData.d.ts +37 -0
- package/dist/runtime/data/nodeInputData.js +62 -0
- package/dist/runtime/data/nodeRunData.d.ts +56 -0
- package/dist/runtime/data/nodeRunData.js +91 -0
- package/dist/runtime/data/payloadForm.d.ts +44 -0
- package/dist/runtime/data/payloadForm.js +126 -0
- package/dist/runtime/data/workflowIconCatalog.d.ts +34 -0
- package/dist/runtime/data/workflowIconCatalog.js +116 -0
- package/dist/runtime/pages/integrations/audit.vue +25 -35
- package/dist/runtime/pages/integrations/credentials.vue +117 -122
- package/dist/runtime/pages/integrations/index.vue +133 -36
- package/dist/runtime/pages/integrations/runs.vue +125 -75
- package/dist/runtime/pages/integrations/schedules.vue +5 -16
- package/dist/runtime/pages/integrations/secrets.vue +1 -3
- package/dist/runtime/pages/integrations/workflows/[id].vue +599 -194
- package/dist/runtime/pages/integrations/workflows/index.vue +10 -8
- package/dist/runtime/types/integrations.d.ts +190 -4
- package/dist/runtime/utils/apiError.d.ts +17 -0
- package/dist/runtime/utils/apiError.js +8 -0
- package/dist/runtime/utils/credentialState.d.ts +28 -0
- package/dist/runtime/utils/credentialState.js +29 -0
- package/dist/runtime/utils/localize.d.ts +3 -1
- package/dist/runtime/utils/localize.js +1 -2
- package/dist/runtime/utils/statusStyle.d.ts +6 -0
- package/dist/runtime/utils/statusStyle.js +15 -0
- package/package.json +20 -3
- package/dist/runtime/components/Integrations/RunDetailDialog.vue +0 -169
- package/dist/runtime/pages/integrations/workflows/new.d.vue.ts +0 -2
- package/dist/runtime/pages/integrations/workflows/new.vue +0 -153
- package/dist/runtime/pages/integrations/workflows/new.vue.d.ts +0 -2
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { WorkflowGroup } from '../../types/integrations.js';
|
|
2
|
+
interface GroupNodeData {
|
|
3
|
+
group: WorkflowGroup;
|
|
4
|
+
/** Derived frame size (expanded mode). */
|
|
5
|
+
rect: {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
};
|
|
9
|
+
memberCount: number;
|
|
10
|
+
/** Absent in read-only previews — no toolbar, no editing. */
|
|
11
|
+
actions?: {
|
|
12
|
+
rename: (label: string) => void;
|
|
13
|
+
setColor: (i: number) => void;
|
|
14
|
+
toggleCollapse: () => void;
|
|
15
|
+
ungroup: () => void;
|
|
16
|
+
resize: (size: {
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
}) => void;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
type __VLS_Props = {
|
|
23
|
+
id: string;
|
|
24
|
+
data: GroupNodeData;
|
|
25
|
+
selected?: boolean;
|
|
26
|
+
};
|
|
27
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ConfigField } from '../../types/integrations.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
slug: string;
|
|
4
|
+
version: string;
|
|
5
|
+
field: ConfigField;
|
|
6
|
+
config: Record<string, unknown>;
|
|
7
|
+
modelValue: unknown;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
"update:modelValue": (value: unknown) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
"onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref } from "vue";
|
|
3
|
+
import { ChevronDown } from "lucide-vue-next";
|
|
4
|
+
import { Input } from "@revenexx/studio";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
slug: { type: String, required: true },
|
|
7
|
+
version: { type: String, required: true },
|
|
8
|
+
field: { type: Object, required: true },
|
|
9
|
+
config: { type: Object, required: true },
|
|
10
|
+
modelValue: { type: null, required: true }
|
|
11
|
+
});
|
|
12
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
13
|
+
function labelText(v) {
|
|
14
|
+
if (!v) return "";
|
|
15
|
+
return typeof v === "string" ? v : v.en ?? Object.values(v)[0] ?? "";
|
|
16
|
+
}
|
|
17
|
+
const search = ref("");
|
|
18
|
+
const focused = ref(false);
|
|
19
|
+
const q = useNodeConfigResolve({
|
|
20
|
+
slug: () => props.slug,
|
|
21
|
+
version: () => props.version,
|
|
22
|
+
target: () => props.field.key,
|
|
23
|
+
config: () => props.config,
|
|
24
|
+
dependsOn: () => props.field.dependsOn,
|
|
25
|
+
search: () => focused.value ? search.value : ""
|
|
26
|
+
});
|
|
27
|
+
const options = computed(() => q.data.value?.options ?? []);
|
|
28
|
+
const isMulti = computed(() => props.field.type === "multiselect");
|
|
29
|
+
const disabledControlClass = "flex h-8 items-center rounded-md border border-black/[0.08] bg-white px-2 text-sm text-muted-foreground opacity-50";
|
|
30
|
+
const currentValue = computed(() => String(props.modelValue ?? ""));
|
|
31
|
+
const currentKnown = computed(
|
|
32
|
+
() => options.value.some((o) => String(o.value) === currentValue.value)
|
|
33
|
+
);
|
|
34
|
+
const currentLabel = computed(() => {
|
|
35
|
+
const hit = options.value.find((o) => String(o.value) === currentValue.value);
|
|
36
|
+
return hit ? labelText(hit.label) || String(hit.value) : currentValue.value;
|
|
37
|
+
});
|
|
38
|
+
const listOpen = computed(() => focused.value && !q.gated.value);
|
|
39
|
+
const visibleOptions = computed(() => {
|
|
40
|
+
const term = search.value.trim().toLowerCase();
|
|
41
|
+
if (!focused.value || !term) return options.value;
|
|
42
|
+
const hits = options.value.filter(
|
|
43
|
+
(o) => (labelText(o.label) || "").toLowerCase().includes(term) || String(o.value).toLowerCase().includes(term)
|
|
44
|
+
);
|
|
45
|
+
return hits.length ? hits : options.value;
|
|
46
|
+
});
|
|
47
|
+
function onComboFocus() {
|
|
48
|
+
search.value = "";
|
|
49
|
+
focused.value = true;
|
|
50
|
+
}
|
|
51
|
+
function onComboBlur() {
|
|
52
|
+
focused.value = false;
|
|
53
|
+
}
|
|
54
|
+
function pick(value) {
|
|
55
|
+
emit("update:modelValue", value);
|
|
56
|
+
search.value = "";
|
|
57
|
+
focused.value = false;
|
|
58
|
+
}
|
|
59
|
+
const selectedArray = computed(
|
|
60
|
+
() => Array.isArray(props.modelValue) ? props.modelValue.map(String) : []
|
|
61
|
+
);
|
|
62
|
+
const knownValues = computed(() => new Set(options.value.map((o) => String(o.value))));
|
|
63
|
+
const missingValues = computed(() => selectedArray.value.filter((v) => !knownValues.value.has(v)));
|
|
64
|
+
const multiFilter = ref("");
|
|
65
|
+
const visibleMultiOptions = computed(() => {
|
|
66
|
+
const f = multiFilter.value.trim().toLowerCase();
|
|
67
|
+
if (!f) return options.value;
|
|
68
|
+
return options.value.filter(
|
|
69
|
+
(o) => (labelText(o.label) || String(o.value)).toLowerCase().includes(f) || String(o.value).toLowerCase().includes(f)
|
|
70
|
+
);
|
|
71
|
+
});
|
|
72
|
+
function toggleMulti(optValue) {
|
|
73
|
+
const arr = selectedArray.value;
|
|
74
|
+
const has = arr.includes(optValue);
|
|
75
|
+
emit("update:modelValue", has ? arr.filter((v) => v !== optValue) : [...arr, optValue]);
|
|
76
|
+
}
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<template>
|
|
80
|
+
<div>
|
|
81
|
+
<!-- gated: required dependencies still unset -->
|
|
82
|
+
<template v-if="q.gated.value">
|
|
83
|
+
<div :class="disabledControlClass">—</div>
|
|
84
|
+
<p class="mt-1 text-sm text-amber-600">Set {{ q.unsatisfied.value.join(", ") }} first</p>
|
|
85
|
+
</template>
|
|
86
|
+
|
|
87
|
+
<!-- first load: no data yet -->
|
|
88
|
+
<template v-else-if="q.isFetching.value && options.length === 0">
|
|
89
|
+
<div :class="disabledControlClass">resolving options…</div>
|
|
90
|
+
</template>
|
|
91
|
+
|
|
92
|
+
<!-- error: build/runtime/etc -->
|
|
93
|
+
<template v-else-if="q.error.value">
|
|
94
|
+
<div :class="disabledControlClass">—</div>
|
|
95
|
+
<div class="mt-1 flex items-center gap-2 text-sm text-amber-600">
|
|
96
|
+
<span>{{ q.error.value.kind === "building" ? "Node bundle still building." : q.error.value.message }}</span>
|
|
97
|
+
<button
|
|
98
|
+
type="button"
|
|
99
|
+
class="rounded border border-black/[0.08] px-1.5 py-0.5 text-mono text-muted-foreground transition hover:text-foreground"
|
|
100
|
+
@click="q.refetch()"
|
|
101
|
+
>
|
|
102
|
+
RETRY
|
|
103
|
+
</button>
|
|
104
|
+
</div>
|
|
105
|
+
</template>
|
|
106
|
+
|
|
107
|
+
<!-- multiselect — pill toggles with a client-side filter for long lists -->
|
|
108
|
+
<template v-else-if="isMulti">
|
|
109
|
+
<Input
|
|
110
|
+
v-if="options.length > 10"
|
|
111
|
+
v-model="multiFilter"
|
|
112
|
+
placeholder="Filter options"
|
|
113
|
+
class="mb-1.5 h-7 bg-white text-sm"
|
|
114
|
+
/>
|
|
115
|
+
<div class="flex flex-wrap gap-1">
|
|
116
|
+
<span v-if="visibleMultiOptions.length === 0" class="text-sm text-muted-foreground">
|
|
117
|
+
{{ options.length === 0 ? "no options available" : "no options match the filter" }}
|
|
118
|
+
</span>
|
|
119
|
+
<button
|
|
120
|
+
v-for="opt in visibleMultiOptions"
|
|
121
|
+
:key="String(opt.value)"
|
|
122
|
+
type="button"
|
|
123
|
+
:disabled="q.isFetching.value"
|
|
124
|
+
class="rounded-md border border-black/[0.08] px-1.5 py-0.5 text-sm transition disabled:cursor-wait disabled:opacity-60"
|
|
125
|
+
:class="selectedArray.includes(String(opt.value)) ? 'bg-emerald-500/15 text-emerald-700 border-emerald-500/30' : 'bg-white text-muted-foreground hover:text-foreground'"
|
|
126
|
+
@click="toggleMulti(String(opt.value))"
|
|
127
|
+
>
|
|
128
|
+
{{ labelText(opt.label) || String(opt.value) }}
|
|
129
|
+
</button>
|
|
130
|
+
<!-- stored values no longer offered — shown read-only so they stay visible -->
|
|
131
|
+
<span
|
|
132
|
+
v-for="m in missingValues"
|
|
133
|
+
:key="m"
|
|
134
|
+
class="rounded-md border border-black/[0.08] bg-white px-1.5 py-0.5 text-sm text-muted-foreground opacity-60"
|
|
135
|
+
>
|
|
136
|
+
{{ m }} (not in list)
|
|
137
|
+
</span>
|
|
138
|
+
</div>
|
|
139
|
+
<p v-if="q.isFetching.value && q.hasData.value" class="mt-1 text-sm text-muted-foreground">reloading…</p>
|
|
140
|
+
</template>
|
|
141
|
+
|
|
142
|
+
<!-- single select: searchable combobox; typing re-resolves with the term -->
|
|
143
|
+
<template v-else>
|
|
144
|
+
<div class="relative">
|
|
145
|
+
<Input
|
|
146
|
+
:model-value="focused ? search : currentLabel"
|
|
147
|
+
:placeholder="labelText(field.placeholder) || 'Pick one'"
|
|
148
|
+
class="h-8 bg-white pr-7 text-sm"
|
|
149
|
+
@update:model-value="(v) => {
|
|
150
|
+
search = String(v);
|
|
151
|
+
}"
|
|
152
|
+
@focus="onComboFocus"
|
|
153
|
+
@blur="onComboBlur"
|
|
154
|
+
/>
|
|
155
|
+
<ChevronDown :size="14" class="pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground" />
|
|
156
|
+
<div
|
|
157
|
+
v-if="listOpen"
|
|
158
|
+
class="absolute left-0 right-0 top-full z-30 mt-1 max-h-56 overflow-y-auto rounded-md border border-black/[0.08] bg-white py-1 shadow-md"
|
|
159
|
+
>
|
|
160
|
+
<div v-if="q.isFetching.value" class="px-2.5 py-1.5 text-sm text-muted-foreground">
|
|
161
|
+
{{ search ? "searching\u2026" : "resolving options\u2026" }}
|
|
162
|
+
</div>
|
|
163
|
+
<button
|
|
164
|
+
v-for="opt in visibleOptions"
|
|
165
|
+
:key="String(opt.value)"
|
|
166
|
+
type="button"
|
|
167
|
+
class="flex w-full items-center px-2.5 py-1.5 text-left text-sm hover:bg-muted/50"
|
|
168
|
+
:class="String(opt.value) === currentValue ? 'bg-emerald-500/10 text-emerald-800' : ''"
|
|
169
|
+
@mousedown.prevent="pick(String(opt.value))"
|
|
170
|
+
>
|
|
171
|
+
<span class="min-w-0 truncate">{{ labelText(opt.label) || String(opt.value) }}</span>
|
|
172
|
+
</button>
|
|
173
|
+
<div v-if="!q.isFetching.value && visibleOptions.length === 0" class="px-2.5 py-1.5 text-sm text-muted-foreground">
|
|
174
|
+
{{ search ? 'nothing matches "' + search + '"' : "no options available" }}
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
<p v-if="currentValue !== '' && !currentKnown" class="mt-1 text-sm text-amber-600">
|
|
179
|
+
current value not in resolved options
|
|
180
|
+
</p>
|
|
181
|
+
<p v-if="q.isFetching.value && q.hasData.value && !focused" class="mt-1 text-sm text-muted-foreground">reloading…</p>
|
|
182
|
+
</template>
|
|
183
|
+
</div>
|
|
184
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ConfigField } from '../../types/integrations.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
slug: string;
|
|
4
|
+
version: string;
|
|
5
|
+
field: ConfigField;
|
|
6
|
+
config: Record<string, unknown>;
|
|
7
|
+
modelValue: unknown;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
"update:modelValue": (value: unknown) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
"onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ConfigField } from '../../types/integrations.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
slug: string;
|
|
4
|
+
version: string;
|
|
5
|
+
field: ConfigField;
|
|
6
|
+
config: Record<string, unknown>;
|
|
7
|
+
staticKeys: string[];
|
|
8
|
+
secretKeys: string[];
|
|
9
|
+
depth?: number;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
set: (key: string, value: unknown) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
onSet?: ((key: string, value: unknown) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { Button } from "@revenexx/studio";
|
|
4
|
+
import { IntegrationsApiError } from "../../utils/apiError";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
slug: { type: String, required: true },
|
|
7
|
+
version: { type: String, required: true },
|
|
8
|
+
field: { type: Object, required: true },
|
|
9
|
+
config: { type: Object, required: true },
|
|
10
|
+
staticKeys: { type: Array, required: true },
|
|
11
|
+
secretKeys: { type: Array, required: true },
|
|
12
|
+
depth: { type: Number, required: false }
|
|
13
|
+
});
|
|
14
|
+
const emit = defineEmits(["set"]);
|
|
15
|
+
void IntegrationsApiError;
|
|
16
|
+
const MAX_DEPTH = 5;
|
|
17
|
+
const q = useNodeConfigResolve({
|
|
18
|
+
slug: () => props.slug,
|
|
19
|
+
version: () => props.version,
|
|
20
|
+
target: () => "*",
|
|
21
|
+
config: () => props.config,
|
|
22
|
+
dependsOn: () => props.field.dependsOn
|
|
23
|
+
});
|
|
24
|
+
const resolvedFields = computed(() => q.data.value?.fields ?? []);
|
|
25
|
+
function labelText(v) {
|
|
26
|
+
if (!v) return "";
|
|
27
|
+
return typeof v === "string" ? v : v.en ?? Object.values(v)[0] ?? "";
|
|
28
|
+
}
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<div>
|
|
33
|
+
<!-- gated: required dependencies still unset -->
|
|
34
|
+
<p v-if="q.gated.value" class="text-sm text-amber-600">
|
|
35
|
+
Set {{ q.unsatisfied.value.join(", ") }} first
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
<!-- first load: no fields yet -->
|
|
39
|
+
<p v-else-if="q.isFetching.value && !resolvedFields.length" class="text-sm text-muted-foreground">
|
|
40
|
+
Resolving fields…
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
<!-- error: build/runtime/etc -->
|
|
44
|
+
<div v-else-if="q.error.value" class="flex items-center gap-2 text-sm text-amber-600">
|
|
45
|
+
<span>{{ q.error.value.kind === "building" ? "Node bundle still building." : q.error.value.message }}</span>
|
|
46
|
+
<Button
|
|
47
|
+
type="button"
|
|
48
|
+
variant="outline"
|
|
49
|
+
size="sm"
|
|
50
|
+
class="h-6 px-1.5 text-mono text-muted-foreground"
|
|
51
|
+
@click="q.refetch()"
|
|
52
|
+
>
|
|
53
|
+
RETRY
|
|
54
|
+
</Button>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<!-- empty: resolved but no fields -->
|
|
58
|
+
<p v-else-if="!resolvedFields.length" class="text-sm text-muted-foreground">
|
|
59
|
+
No fields resolved.
|
|
60
|
+
</p>
|
|
61
|
+
|
|
62
|
+
<!-- fieldset: the resolved child fields, rendered into the flat node config -->
|
|
63
|
+
<fieldset
|
|
64
|
+
v-else
|
|
65
|
+
:disabled="q.isFetching.value"
|
|
66
|
+
:class="{ 'opacity-60': q.isFetching.value }"
|
|
67
|
+
class="space-y-3 rounded-md border border-black/[0.08] bg-muted/10 p-3 m-0"
|
|
68
|
+
>
|
|
69
|
+
<legend class="px-1 text-mono text-muted-foreground">
|
|
70
|
+
{{ labelText(field.label) }}
|
|
71
|
+
</legend>
|
|
72
|
+
<template v-for="f in resolvedFields" :key="f.key">
|
|
73
|
+
<!-- collision guard: a resolved key that shadows a static config field is skipped -->
|
|
74
|
+
<p v-if="staticKeys.includes(f.key)" class="text-sm text-amber-600">
|
|
75
|
+
resolved field '{{ f.key }}' collides with a static config field — skipped
|
|
76
|
+
</p>
|
|
77
|
+
|
|
78
|
+
<!-- depth cap: don't expand nested dynamic-schema past MAX_DEPTH -->
|
|
79
|
+
<p v-else-if="f.type === 'dynamic-schema' && (depth ?? 0) >= MAX_DEPTH" class="text-sm text-muted-foreground">
|
|
80
|
+
nested dynamic-schema is not expanded further
|
|
81
|
+
</p>
|
|
82
|
+
|
|
83
|
+
<!-- a resolved field, rendered exactly like a static node config field -->
|
|
84
|
+
<IntegrationsNodeConfigField
|
|
85
|
+
v-else
|
|
86
|
+
:field="f"
|
|
87
|
+
:config="config"
|
|
88
|
+
:slug="slug"
|
|
89
|
+
:version="version"
|
|
90
|
+
:secret-keys="secretKeys"
|
|
91
|
+
:static-keys="staticKeys"
|
|
92
|
+
:depth="(depth ?? 0) + 1"
|
|
93
|
+
@set="(k, v) => emit('set', k, v)"
|
|
94
|
+
/>
|
|
95
|
+
</template>
|
|
96
|
+
|
|
97
|
+
<p v-if="q.isFetching.value && q.hasData.value" class="text-sm text-muted-foreground">
|
|
98
|
+
reloading fields…
|
|
99
|
+
</p>
|
|
100
|
+
</fieldset>
|
|
101
|
+
</div>
|
|
102
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ConfigField } from '../../types/integrations.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
slug: string;
|
|
4
|
+
version: string;
|
|
5
|
+
field: ConfigField;
|
|
6
|
+
config: Record<string, unknown>;
|
|
7
|
+
staticKeys: string[];
|
|
8
|
+
secretKeys: string[];
|
|
9
|
+
depth?: number;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
set: (key: string, value: unknown) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
onSet?: ((key: string, value: unknown) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ConfigField, WorkflowVariable } from '../../types/integrations.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
field: ConfigField;
|
|
4
|
+
config: Record<string, unknown>;
|
|
5
|
+
slug: string;
|
|
6
|
+
version: string;
|
|
7
|
+
secretKeys: string[];
|
|
8
|
+
staticKeys?: string[];
|
|
9
|
+
depth?: number;
|
|
10
|
+
variables?: Record<string, WorkflowVariable>;
|
|
11
|
+
upstreamOutputs?: Array<{
|
|
12
|
+
nodeId: string;
|
|
13
|
+
nodeName?: string;
|
|
14
|
+
output: string;
|
|
15
|
+
fields?: string[];
|
|
16
|
+
}>;
|
|
17
|
+
};
|
|
18
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
set: (key: string, value: unknown) => any;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
+
onSet?: ((key: string, value: unknown) => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
export default _default;
|