@nvent-addon/app 0.4.5 → 0.5.1

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.
Files changed (153) hide show
  1. package/dist/module.d.mts +19 -1
  2. package/dist/module.mjs +20 -8
  3. package/dist/runtime/app/components/{nhealth/component-router.d.vue.ts → ComponentRouter.d.vue.ts} +1 -5
  4. package/dist/runtime/app/components/{nhealth/component-router.vue.d.ts → ComponentRouter.vue.d.ts} +1 -5
  5. package/dist/runtime/app/components/{nhealth/component-shell.d.vue.ts → ComponentShell.d.vue.ts} +4 -9
  6. package/dist/runtime/app/components/ComponentShell.vue +87 -0
  7. package/dist/runtime/app/components/{nhealth/component-shell.vue.d.ts → ComponentShell.vue.d.ts} +4 -9
  8. package/dist/runtime/app/components/ConfirmDialog.d.vue.ts +1 -6
  9. package/dist/runtime/app/components/ConfirmDialog.vue.d.ts +1 -6
  10. package/dist/runtime/app/components/ListItem.d.vue.ts +3 -6
  11. package/dist/runtime/app/components/ListItem.vue.d.ts +3 -6
  12. package/dist/runtime/app/components/LiveIndicator.d.vue.ts +7 -0
  13. package/dist/runtime/app/components/LiveIndicator.vue +30 -0
  14. package/dist/runtime/app/components/LiveIndicator.vue.d.ts +7 -0
  15. package/dist/runtime/app/components/{QueueConfigDetails.d.vue.ts → QueueConfiguration.d.vue.ts} +1 -10
  16. package/dist/runtime/app/components/QueueConfiguration.vue +387 -0
  17. package/dist/runtime/app/components/{QueueConfigDetails.vue.d.ts → QueueConfiguration.vue.d.ts} +1 -10
  18. package/dist/runtime/app/components/StatCard.d.vue.ts +9 -0
  19. package/dist/runtime/app/components/StatCard.vue +57 -0
  20. package/dist/runtime/app/components/StatCard.vue.d.ts +9 -0
  21. package/dist/runtime/app/components/TimelineList.vue +67 -0
  22. package/dist/runtime/app/components/flow/AwaitNode.d.vue.ts +18 -0
  23. package/dist/runtime/app/components/flow/AwaitNode.vue +91 -0
  24. package/dist/runtime/app/components/flow/AwaitNode.vue.d.ts +18 -0
  25. package/dist/runtime/app/components/{FlowDiagram.d.vue.ts → flow/Diagram.d.vue.ts} +12 -1
  26. package/dist/runtime/app/components/{FlowDiagram.vue → flow/Diagram.vue} +92 -11
  27. package/dist/runtime/app/components/{FlowDiagram.vue.d.ts → flow/Diagram.vue.d.ts} +12 -1
  28. package/dist/runtime/app/components/{FlowRunOverview.d.vue.ts → flow/RunOverview.d.vue.ts} +3 -0
  29. package/dist/runtime/app/components/{FlowRunOverview.vue → flow/RunOverview.vue} +94 -8
  30. package/dist/runtime/app/components/{FlowRunOverview.vue.d.ts → flow/RunOverview.vue.d.ts} +3 -0
  31. package/dist/runtime/app/components/{FlowRunStatusBadge.d.vue.ts → flow/RunStatusBadge.d.vue.ts} +2 -8
  32. package/dist/runtime/app/components/{FlowRunStatusBadge.vue → flow/RunStatusBadge.vue} +8 -1
  33. package/dist/runtime/app/components/{FlowRunStatusBadge.vue.d.ts → flow/RunStatusBadge.vue.d.ts} +2 -8
  34. package/dist/runtime/app/components/{FlowRunTimeline.vue → flow/RunTimeline.vue} +1 -1
  35. package/dist/runtime/app/components/{FlowStepSelector.d.vue.ts → flow/StepSelector.d.vue.ts} +1 -0
  36. package/dist/runtime/app/components/flow/StepSelector.vue +553 -0
  37. package/dist/runtime/app/components/{FlowStepSelector.vue.d.ts → flow/StepSelector.vue.d.ts} +1 -0
  38. package/dist/runtime/app/components/trigger/BasicInfoCard.d.vue.ts +33 -0
  39. package/dist/runtime/app/components/trigger/BasicInfoCard.vue +168 -0
  40. package/dist/runtime/app/components/trigger/BasicInfoCard.vue.d.ts +33 -0
  41. package/dist/runtime/app/components/{FlowSchedulesList.d.vue.ts → trigger/DangerZone.d.vue.ts} +4 -6
  42. package/dist/runtime/app/components/trigger/DangerZone.vue +46 -0
  43. package/dist/runtime/app/components/{FlowSchedulesList.vue.d.ts → trigger/DangerZone.vue.d.ts} +4 -6
  44. package/dist/runtime/app/components/trigger/EditHeader.d.vue.ts +15 -0
  45. package/dist/runtime/app/components/trigger/EditHeader.vue +55 -0
  46. package/dist/runtime/app/components/trigger/EditHeader.vue.d.ts +15 -0
  47. package/dist/runtime/app/components/trigger/EventConfig.d.vue.ts +24 -0
  48. package/dist/runtime/app/components/trigger/EventConfig.vue +68 -0
  49. package/dist/runtime/app/components/trigger/EventConfig.vue.d.ts +24 -0
  50. package/dist/runtime/app/components/trigger/FlowSubscriptions.d.vue.ts +14 -0
  51. package/dist/runtime/app/components/trigger/FlowSubscriptions.vue +128 -0
  52. package/dist/runtime/app/components/trigger/FlowSubscriptions.vue.d.ts +14 -0
  53. package/dist/runtime/app/components/trigger/ScheduleConfig.d.vue.ts +27 -0
  54. package/dist/runtime/app/components/trigger/ScheduleConfig.vue +375 -0
  55. package/dist/runtime/app/components/trigger/ScheduleConfig.vue.d.ts +27 -0
  56. package/dist/runtime/app/components/{FlowScheduleDialog.d.vue.ts → trigger/StatusConfig.d.vue.ts} +6 -6
  57. package/dist/runtime/app/components/trigger/StatusConfig.vue +78 -0
  58. package/dist/runtime/app/components/{FlowScheduleDialog.vue.d.ts → trigger/StatusConfig.vue.d.ts} +6 -6
  59. package/dist/runtime/app/components/trigger/WebhookConfig.d.vue.ts +30 -0
  60. package/dist/runtime/app/components/trigger/WebhookConfig.vue +97 -0
  61. package/dist/runtime/app/components/trigger/WebhookConfig.vue.d.ts +30 -0
  62. package/dist/runtime/app/composables/useAnalyzedFlows.d.ts +5 -0
  63. package/dist/runtime/app/composables/useAnalyzedFlows.js +15 -1
  64. package/dist/runtime/app/composables/useComponentRouter.d.ts +8 -0
  65. package/dist/runtime/app/composables/useComponentRouter.js +10 -2
  66. package/dist/runtime/app/composables/useFlowRunsInfinite.d.ts +1 -1
  67. package/dist/runtime/app/composables/useFlowState.js +65 -0
  68. package/dist/runtime/app/composables/useFlowWebSocket.d.ts +11 -2
  69. package/dist/runtime/app/composables/useFlowWebSocket.js +181 -65
  70. package/dist/runtime/app/composables/useQueueJobs.d.ts +12 -1
  71. package/dist/runtime/app/composables/useQueueJobs.js +13 -7
  72. package/dist/runtime/app/composables/useTrigger.d.ts +137 -0
  73. package/dist/runtime/app/composables/useTrigger.js +116 -0
  74. package/dist/runtime/app/composables/useTriggerWebSocket.d.ts +35 -0
  75. package/dist/runtime/app/composables/useTriggerWebSocket.js +333 -0
  76. package/dist/runtime/app/pages/dashboard.d.vue.ts +3 -0
  77. package/dist/runtime/app/pages/dashboard.vue +738 -0
  78. package/dist/runtime/app/pages/dashboard.vue.d.ts +3 -0
  79. package/dist/runtime/app/pages/flows/[name].d.vue.ts +3 -0
  80. package/dist/runtime/app/pages/flows/[name].vue +680 -0
  81. package/dist/runtime/app/pages/flows/[name].vue.d.ts +3 -0
  82. package/dist/runtime/app/pages/flows/index.vue +321 -620
  83. package/dist/runtime/app/pages/index.vue +39 -9
  84. package/dist/runtime/app/pages/queues/index.vue +202 -194
  85. package/dist/runtime/app/pages/queues/jobs.vue +534 -207
  86. package/dist/runtime/app/pages/settings/scheduler.d.vue.ts +3 -0
  87. package/dist/runtime/app/pages/settings/scheduler.vue +310 -0
  88. package/dist/runtime/app/pages/settings/scheduler.vue.d.ts +3 -0
  89. package/dist/runtime/app/pages/triggers/[name]/edit.d.vue.ts +3 -0
  90. package/dist/runtime/app/pages/triggers/[name]/edit.vue +429 -0
  91. package/dist/runtime/app/pages/triggers/[name]/edit.vue.d.ts +3 -0
  92. package/dist/runtime/app/pages/triggers/[name].d.vue.ts +3 -0
  93. package/dist/runtime/app/pages/triggers/[name].vue +898 -0
  94. package/dist/runtime/app/pages/triggers/[name].vue.d.ts +3 -0
  95. package/dist/runtime/app/pages/triggers/index.d.vue.ts +3 -0
  96. package/dist/runtime/app/pages/triggers/index.vue +528 -0
  97. package/dist/runtime/app/pages/triggers/index.vue.d.ts +3 -0
  98. package/dist/runtime/app/pages/triggers/new.d.vue.ts +3 -0
  99. package/dist/runtime/app/pages/triggers/new.vue +610 -0
  100. package/dist/runtime/app/pages/triggers/new.vue.d.ts +3 -0
  101. package/dist/runtime/server/api/_flows/[name]/clear-history.delete.d.ts +10 -0
  102. package/dist/runtime/server/api/_flows/[name]/clear-history.delete.js +49 -0
  103. package/dist/runtime/server/api/_flows/[name]/runs/[runId]/cancel.post.d.ts +2 -0
  104. package/dist/runtime/server/api/_flows/[name]/runs/[runId]/cancel.post.js +21 -0
  105. package/dist/runtime/server/api/_flows/[name]/runs.get.d.ts +17 -0
  106. package/dist/runtime/server/api/_flows/[name]/runs.get.js +64 -0
  107. package/dist/runtime/server/api/_flows/[name]/start.post.d.ts +2 -0
  108. package/dist/runtime/server/api/_flows/[name]/start.post.js +9 -0
  109. package/dist/runtime/server/api/_flows/index.get.d.ts +7 -0
  110. package/dist/runtime/server/api/_flows/index.get.js +5 -0
  111. package/dist/runtime/server/api/_flows/recent-runs.get.d.ts +15 -0
  112. package/dist/runtime/server/api/_flows/recent-runs.get.js +67 -0
  113. package/dist/runtime/server/api/_flows/ws.d.ts +80 -0
  114. package/dist/runtime/server/api/_flows/ws.js +309 -0
  115. package/dist/runtime/server/api/_queues/[name]/job/[id].get.d.ts +2 -0
  116. package/dist/runtime/server/api/_queues/[name]/job/[id].get.js +14 -0
  117. package/dist/runtime/server/api/_queues/[name]/job/index.get.d.ts +2 -0
  118. package/dist/runtime/server/api/_queues/[name]/job/index.get.js +39 -0
  119. package/dist/runtime/server/api/_queues/index.get.d.ts +2 -0
  120. package/dist/runtime/server/api/_queues/index.get.js +106 -0
  121. package/dist/runtime/server/api/_queues/ws.d.ts +48 -0
  122. package/dist/runtime/server/api/_queues/ws.js +215 -0
  123. package/dist/runtime/server/api/_scheduler/jobs.get.d.ts +19 -0
  124. package/dist/runtime/server/api/_scheduler/jobs.get.js +36 -0
  125. package/dist/runtime/server/api/_triggers/[name]/events.get.d.ts +6 -0
  126. package/dist/runtime/server/api/_triggers/[name]/events.get.js +43 -0
  127. package/dist/runtime/server/api/_triggers/[name]/index.get.d.ts +6 -0
  128. package/dist/runtime/server/api/_triggers/[name]/index.get.js +76 -0
  129. package/dist/runtime/server/api/_triggers/[name].delete.d.ts +7 -0
  130. package/dist/runtime/server/api/_triggers/[name].delete.js +37 -0
  131. package/dist/runtime/server/api/_triggers/[name].patch.d.ts +7 -0
  132. package/dist/runtime/server/api/_triggers/[name].patch.js +117 -0
  133. package/dist/runtime/server/api/_triggers/index.get.d.ts +6 -0
  134. package/dist/runtime/server/api/_triggers/index.get.js +44 -0
  135. package/dist/runtime/server/api/_triggers/index.post.d.ts +7 -0
  136. package/dist/runtime/server/api/_triggers/index.post.js +124 -0
  137. package/dist/runtime/server/api/_triggers/stats.get.d.ts +6 -0
  138. package/dist/runtime/server/api/_triggers/stats.get.js +41 -0
  139. package/dist/runtime/server/api/_triggers/ws.d.ts +74 -0
  140. package/dist/runtime/server/api/_triggers/ws.js +315 -0
  141. package/dist/runtime/server/tsconfig.json +7 -0
  142. package/package.json +8 -8
  143. package/dist/runtime/app/components/FlowScheduleDialog.vue +0 -226
  144. package/dist/runtime/app/components/FlowSchedulesList.vue +0 -99
  145. package/dist/runtime/app/components/FlowStepSelector.vue +0 -238
  146. package/dist/runtime/app/components/QueueConfigDetails.vue +0 -412
  147. package/dist/runtime/app/components/nhealth/component-shell.vue +0 -89
  148. /package/dist/runtime/app/components/{nhealth/component-router.vue → ComponentRouter.vue} +0 -0
  149. /package/dist/runtime/app/components/{FlowNodeCard.d.vue.ts → flow/NodeCard.d.vue.ts} +0 -0
  150. /package/dist/runtime/app/components/{FlowNodeCard.vue → flow/NodeCard.vue} +0 -0
  151. /package/dist/runtime/app/components/{FlowNodeCard.vue.d.ts → flow/NodeCard.vue.d.ts} +0 -0
  152. /package/dist/runtime/app/components/{FlowRunTimeline.d.vue.ts → flow/RunTimeline.d.vue.ts} +0 -0
  153. /package/dist/runtime/app/components/{FlowRunTimeline.vue.d.ts → flow/RunTimeline.vue.d.ts} +0 -0
@@ -0,0 +1,168 @@
1
+ <template>
2
+ <component :is="noCard ? 'div' : UCard">
3
+ <template
4
+ v-if="!noCard"
5
+ #header
6
+ >
7
+ <div class="flex items-center gap-2">
8
+ <UIcon
9
+ name="i-lucide-info"
10
+ class="w-5 h-5 text-blue-500"
11
+ />
12
+ <h2 class="text-lg font-semibold">
13
+ Basic Information
14
+ </h2>
15
+ </div>
16
+ </template>
17
+
18
+ <UForm
19
+ nested
20
+ :schema="schema"
21
+ :class="noCard ? 'space-y-6' : 'space-y-4'"
22
+ >
23
+ <UFormField
24
+ name="name"
25
+ label="Trigger Name"
26
+ required
27
+ >
28
+ <template #hint>
29
+ <span class="text-xs text-gray-500">{{ isEdit ? "Cannot be changed after creation" : "Use lowercase letters, numbers, and hyphens only" }}</span>
30
+ </template>
31
+ <UInput
32
+ v-model="formState.name"
33
+ :placeholder="formState.name ? 'my-trigger' : 'e.g., user-signup-trigger'"
34
+ :disabled="isEdit"
35
+ icon="i-lucide-tag"
36
+ class="w-full"
37
+ />
38
+ </UFormField>
39
+
40
+ <UFormField
41
+ name="displayName"
42
+ label="Display Name"
43
+ required
44
+ >
45
+ <template #hint>
46
+ <span class="text-xs text-gray-500">Human-readable name shown in the UI</span>
47
+ </template>
48
+ <UInput
49
+ v-model="formState.displayName"
50
+ :placeholder="formState.displayName || 'e.g., User Signup Trigger'"
51
+ icon="i-lucide-type"
52
+ class="w-full"
53
+ />
54
+ </UFormField>
55
+
56
+ <UFormField
57
+ name="description"
58
+ label="Description"
59
+ >
60
+ <template #hint>
61
+ <span class="text-xs text-gray-500">Optional description of what this trigger does</span>
62
+ </template>
63
+ <UTextarea
64
+ v-model="formState.description"
65
+ placeholder="Describe what this trigger does..."
66
+ :rows="3"
67
+ class="w-full"
68
+ />
69
+ </UFormField>
70
+
71
+ <UFormField
72
+ label="Trigger Type"
73
+ name="type"
74
+ >
75
+ <template #hint>
76
+ <span class="text-xs text-gray-500">Cannot be changed after creation</span>
77
+ </template>
78
+ <div class="flex items-center gap-2">
79
+ <UIcon
80
+ :name="getTriggerIcon(formState.type)"
81
+ class="w-5 h-5"
82
+ :class="getTriggerIconColor(formState.type)"
83
+ />
84
+ <UBadge
85
+ :label="formState.type"
86
+ :color="getTriggerTypeColor(formState.type)"
87
+ variant="subtle"
88
+ size="md"
89
+ />
90
+ </div>
91
+ </UFormField>
92
+
93
+ <UFormField
94
+ label="Scope"
95
+ name="scope"
96
+ >
97
+ <template #hint>
98
+ <span class="text-xs text-gray-500">Cannot be changed after creation</span>
99
+ </template>
100
+ <UBadge
101
+ :label="formState.scope"
102
+ color="neutral"
103
+ variant="subtle"
104
+ size="md"
105
+ />
106
+ </UFormField>
107
+ </UForm>
108
+ </component>
109
+ </template>
110
+
111
+ <script setup>
112
+ import { UCard } from "#components";
113
+ import { z } from "zod";
114
+ const { noCard = false, isEdit = false } = defineProps({
115
+ noCard: { type: Boolean, required: false },
116
+ isEdit: { type: Boolean, required: false }
117
+ });
118
+ const formState = defineModel({ type: Object, ...{ required: true } });
119
+ const getTriggerIcon = (type) => {
120
+ switch (type) {
121
+ case "event":
122
+ return "i-lucide-radio";
123
+ case "webhook":
124
+ return "i-lucide-webhook";
125
+ case "schedule":
126
+ return "i-lucide-clock";
127
+ case "manual":
128
+ return "i-lucide-hand";
129
+ default:
130
+ return "i-lucide-zap";
131
+ }
132
+ };
133
+ const getTriggerIconColor = (type) => {
134
+ switch (type) {
135
+ case "event":
136
+ return "text-blue-500";
137
+ case "webhook":
138
+ return "text-purple-500";
139
+ case "schedule":
140
+ return "text-emerald-500";
141
+ case "manual":
142
+ return "text-amber-500";
143
+ default:
144
+ return "text-gray-500";
145
+ }
146
+ };
147
+ const getTriggerTypeColor = (type) => {
148
+ switch (type) {
149
+ case "event":
150
+ return "primary";
151
+ case "webhook":
152
+ return "success";
153
+ case "schedule":
154
+ return "warning";
155
+ case "manual":
156
+ return "neutral";
157
+ default:
158
+ return "neutral";
159
+ }
160
+ };
161
+ const schema = z.object({
162
+ name: z.string().min(1, "Name is required").regex(/^[a-z0-9-]+$/, "Use lowercase letters, numbers, and hyphens only"),
163
+ displayName: z.string().min(1, "Display name is required"),
164
+ description: z.string(),
165
+ type: z.enum(["event", "webhook", "schedule", "manual"]),
166
+ scope: z.enum(["flow", "run"])
167
+ });
168
+ </script>
@@ -0,0 +1,33 @@
1
+ type __VLS_Props = {
2
+ noCard?: boolean;
3
+ isEdit?: boolean;
4
+ };
5
+ type __VLS_ModelProps = {
6
+ modelValue: {
7
+ name: string;
8
+ displayName: string;
9
+ description: string;
10
+ type: 'event' | 'webhook' | 'schedule' | 'manual';
11
+ scope: 'flow' | 'run';
12
+ };
13
+ };
14
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
15
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ "update:modelValue": (value: {
17
+ name: string;
18
+ displayName: string;
19
+ description: string;
20
+ type: "event" | "webhook" | "schedule" | "manual";
21
+ scope: "flow" | "run";
22
+ }) => any;
23
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
24
+ "onUpdate:modelValue"?: ((value: {
25
+ name: string;
26
+ displayName: string;
27
+ description: string;
28
+ type: "event" | "webhook" | "schedule" | "manual";
29
+ scope: "flow" | "run";
30
+ }) => any) | undefined;
31
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
32
+ declare const _default: typeof __VLS_export;
33
+ export default _default;
@@ -1,12 +1,10 @@
1
1
  type __VLS_Props = {
2
- flowName: string;
2
+ isDeleting: boolean;
3
3
  };
4
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
5
- loadSchedules: () => Promise<void>;
6
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
- updated: () => any;
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ delete: () => any;
8
6
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
- onUpdated?: (() => any) | undefined;
7
+ onDelete?: (() => any) | undefined;
10
8
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
9
  declare const _default: typeof __VLS_export;
12
10
  export default _default;
@@ -0,0 +1,46 @@
1
+ <template>
2
+ <UCard>
3
+ <template #header>
4
+ <div class="flex items-center gap-2">
5
+ <UIcon
6
+ name="i-lucide-alert-triangle"
7
+ class="w-5 h-5 text-red-500"
8
+ />
9
+ <h2 class="text-lg font-semibold text-red-600 dark:text-red-400">
10
+ Danger Zone
11
+ </h2>
12
+ </div>
13
+ </template>
14
+
15
+ <div class="space-y-4">
16
+ <div class="flex items-start justify-between p-4 bg-red-50 dark:bg-red-950/30 border border-red-200 dark:border-red-800 rounded-lg">
17
+ <div>
18
+ <h3 class="font-semibold text-red-900 dark:text-red-100">
19
+ Delete this trigger
20
+ </h3>
21
+ <p class="text-sm text-red-700 dark:text-red-300 mt-1">
22
+ Once deleted, this trigger cannot be recovered. All subscriptions will be removed.
23
+ </p>
24
+ </div>
25
+ <UButton
26
+ color="error"
27
+ variant="outline"
28
+ :loading="isDeleting"
29
+ @click="$emit('delete')"
30
+ >
31
+ <template #leading>
32
+ <UIcon name="i-lucide-trash-2" />
33
+ </template>
34
+ Delete
35
+ </UButton>
36
+ </div>
37
+ </div>
38
+ </UCard>
39
+ </template>
40
+
41
+ <script setup>
42
+ defineProps({
43
+ isDeleting: { type: Boolean, required: true }
44
+ });
45
+ defineEmits(["delete"]);
46
+ </script>
@@ -1,12 +1,10 @@
1
1
  type __VLS_Props = {
2
- flowName: string;
2
+ isDeleting: boolean;
3
3
  };
4
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
5
- loadSchedules: () => Promise<void>;
6
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
- updated: () => any;
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ delete: () => any;
8
6
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
- onUpdated?: (() => any) | undefined;
7
+ onDelete?: (() => any) | undefined;
10
8
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
9
  declare const _default: typeof __VLS_export;
12
10
  export default _default;
@@ -0,0 +1,15 @@
1
+ type __VLS_Props = {
2
+ isSaving: boolean;
3
+ hasChanges: boolean;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ cancel: () => any;
7
+ back: () => any;
8
+ save: () => any;
9
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
10
+ onCancel?: (() => any) | undefined;
11
+ onBack?: (() => any) | undefined;
12
+ onSave?: (() => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -0,0 +1,55 @@
1
+ <template>
2
+ <div class="border-b border-gray-200 dark:border-gray-800 px-6 py-4 bg-white dark:bg-gray-900 shrink-0">
3
+ <div class="flex items-center justify-between">
4
+ <div class="flex items-center gap-3">
5
+ <UButton
6
+ icon="i-lucide-arrow-left"
7
+ size="sm"
8
+ color="neutral"
9
+ variant="ghost"
10
+ @click="$emit('back')"
11
+ />
12
+ <div>
13
+ <h1 class="text-xl font-semibold flex items-center gap-2">
14
+ <UIcon
15
+ name="i-lucide-pencil"
16
+ class="w-5 h-5 text-blue-500"
17
+ />
18
+ <span>Edit Trigger</span>
19
+ </h1>
20
+ <p class="text-sm text-gray-500 dark:text-gray-400 mt-0.5">
21
+ Modify trigger configuration and subscriptions
22
+ </p>
23
+ </div>
24
+ </div>
25
+ <div class="flex items-center gap-2">
26
+ <UButton
27
+ color="neutral"
28
+ variant="ghost"
29
+ @click="$emit('cancel')"
30
+ >
31
+ Cancel
32
+ </UButton>
33
+ <UButton
34
+ color="primary"
35
+ :loading="isSaving"
36
+ :disabled="!hasChanges"
37
+ @click="$emit('save')"
38
+ >
39
+ <template #leading>
40
+ <UIcon name="i-lucide-save" />
41
+ </template>
42
+ Save Changes
43
+ </UButton>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ </template>
48
+
49
+ <script setup>
50
+ defineProps({
51
+ isSaving: { type: Boolean, required: true },
52
+ hasChanges: { type: Boolean, required: true }
53
+ });
54
+ defineEmits(["back", "cancel", "save"]);
55
+ </script>
@@ -0,0 +1,15 @@
1
+ type __VLS_Props = {
2
+ isSaving: boolean;
3
+ hasChanges: boolean;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ cancel: () => any;
7
+ back: () => any;
8
+ save: () => any;
9
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
10
+ onCancel?: (() => any) | undefined;
11
+ onBack?: (() => any) | undefined;
12
+ onSave?: (() => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -0,0 +1,24 @@
1
+ type __VLS_Props = {
2
+ noCard?: boolean;
3
+ name?: string;
4
+ };
5
+ type __VLS_ModelProps = {
6
+ modelValue: {
7
+ event: string;
8
+ filter: string;
9
+ };
10
+ };
11
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
12
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "update:modelValue": (value: {
14
+ event: string;
15
+ filter: string;
16
+ }) => any;
17
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
18
+ "onUpdate:modelValue"?: ((value: {
19
+ event: string;
20
+ filter: string;
21
+ }) => any) | undefined;
22
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
@@ -0,0 +1,68 @@
1
+ <template>
2
+ <component :is="noCard ? 'div' : UCard">
3
+ <template
4
+ v-if="!noCard"
5
+ #header
6
+ >
7
+ <div class="flex items-center gap-2">
8
+ <UIcon
9
+ name="i-lucide-radio"
10
+ class="w-5 h-5 text-blue-500"
11
+ />
12
+ <h2 class="text-lg font-semibold">
13
+ Event Configuration
14
+ </h2>
15
+ </div>
16
+ </template>
17
+
18
+ <UForm
19
+ nested
20
+ :name="name"
21
+ :schema="schema"
22
+ :class="noCard ? 'space-y-6' : 'space-y-4'"
23
+ >
24
+ <UFormField
25
+ label="Event Name"
26
+ name="event"
27
+ required
28
+ >
29
+ <template #hint>
30
+ <span class="text-xs text-gray-500">The event type to listen for</span>
31
+ </template>
32
+ <UInput
33
+ v-model="config.event"
34
+ placeholder="user.created"
35
+ icon="i-lucide-radio"
36
+ />
37
+ </UFormField>
38
+
39
+ <UFormField
40
+ label="Event Filter (JSON)"
41
+ name="filter"
42
+ >
43
+ <template #hint>
44
+ <span class="text-xs text-gray-500">Optional JSON filter to match specific event payloads</span>
45
+ </template>
46
+ <UTextarea
47
+ v-model="config.filter"
48
+ placeholder="{&quot;status&quot;: &quot;active&quot;}"
49
+ :rows="4"
50
+ />
51
+ </UFormField>
52
+ </UForm>
53
+ </component>
54
+ </template>
55
+
56
+ <script setup>
57
+ import { UCard } from "#components";
58
+ import { z } from "zod";
59
+ const { noCard = false, name = "config" } = defineProps({
60
+ noCard: { type: Boolean, required: false },
61
+ name: { type: String, required: false }
62
+ });
63
+ const config = defineModel({ type: Object, ...{ required: true } });
64
+ const schema = z.object({
65
+ event: z.string().min(1, "Event name is required"),
66
+ filter: z.string().optional()
67
+ });
68
+ </script>
@@ -0,0 +1,24 @@
1
+ type __VLS_Props = {
2
+ noCard?: boolean;
3
+ name?: string;
4
+ };
5
+ type __VLS_ModelProps = {
6
+ modelValue: {
7
+ event: string;
8
+ filter: string;
9
+ };
10
+ };
11
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
12
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "update:modelValue": (value: {
14
+ event: string;
15
+ filter: string;
16
+ }) => any;
17
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
18
+ "onUpdate:modelValue"?: ((value: {
19
+ event: string;
20
+ filter: string;
21
+ }) => any) | undefined;
22
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ subscriptions: string[];
3
+ flows: Array<{
4
+ name?: string;
5
+ id?: string;
6
+ }> | null;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ toggle: (flowName: string) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ onToggle?: ((flowName: string) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,128 @@
1
+ <template>
2
+ <UCard>
3
+ <template #header>
4
+ <div class="flex items-center gap-2">
5
+ <UIcon
6
+ name="i-lucide-git-branch"
7
+ class="w-5 h-5 text-purple-500"
8
+ />
9
+ <h2 class="text-lg font-semibold">
10
+ Flow Subscriptions
11
+ </h2>
12
+ <UBadge
13
+ :label="subscriptions.length.toString()"
14
+ color="primary"
15
+ variant="subtle"
16
+ size="sm"
17
+ />
18
+ </div>
19
+ </template>
20
+
21
+ <div class="space-y-4">
22
+ <UFormField
23
+ label="Search Flows"
24
+ name="flowSearch"
25
+ >
26
+ <template #hint>
27
+ <span class="text-xs text-gray-500">Select flows that should be triggered by this trigger</span>
28
+ </template>
29
+ <UInput
30
+ v-model="searchQuery"
31
+ placeholder="Search flows..."
32
+ icon="i-lucide-search"
33
+ />
34
+ </UFormField>
35
+
36
+ <div
37
+ v-if="filteredFlows.length > 0"
38
+ class="max-h-64 overflow-y-auto space-y-2 border border-gray-200 dark:border-gray-800 rounded-lg p-3"
39
+ >
40
+ <div
41
+ v-for="flow in filteredFlows"
42
+ :key="getFlowId(flow)"
43
+ class="flex items-center justify-between p-2 hover:bg-gray-50 dark:hover:bg-gray-900/50 rounded-lg transition-colors"
44
+ >
45
+ <div class="flex items-center gap-2 min-w-0">
46
+ <UIcon
47
+ name="i-lucide-git-branch"
48
+ class="w-4 h-4 text-blue-500 shrink-0"
49
+ />
50
+ <span class="text-sm font-medium text-gray-900 dark:text-gray-100 truncate">{{ getFlowId(flow) }}</span>
51
+ </div>
52
+ <ClientOnly>
53
+ <UCheckbox
54
+ :model-value="isFlowSubscribed(getFlowId(flow))"
55
+ @update:model-value="$emit('toggle', getFlowId(flow))"
56
+ />
57
+ </ClientOnly>
58
+ </div>
59
+ </div>
60
+
61
+ <div
62
+ v-else
63
+ class="text-center py-8 text-gray-500 dark:text-gray-400"
64
+ >
65
+ <UIcon
66
+ name="i-lucide-search-x"
67
+ class="w-8 h-8 mx-auto mb-2 opacity-50"
68
+ />
69
+ <p class="text-sm">
70
+ No flows found
71
+ </p>
72
+ </div>
73
+
74
+ <!-- Selected Flows -->
75
+ <div
76
+ v-if="subscriptions.length > 0"
77
+ class="space-y-2"
78
+ >
79
+ <label class="text-sm font-medium text-gray-700 dark:text-gray-300">
80
+ Selected Flows ({{ subscriptions.length }})
81
+ </label>
82
+ <div class="flex flex-wrap gap-2">
83
+ <UBadge
84
+ v-for="flowName in subscriptions"
85
+ :key="flowName"
86
+ :label="flowName"
87
+ color="primary"
88
+ variant="subtle"
89
+ size="md"
90
+ >
91
+ <template #trailing>
92
+ <UButton
93
+ icon="i-lucide-x"
94
+ size="2xs"
95
+ color="neutral"
96
+ variant="ghost"
97
+ square
98
+ @click="$emit('toggle', flowName)"
99
+ />
100
+ </template>
101
+ </UBadge>
102
+ </div>
103
+ </div>
104
+ </div>
105
+ </UCard>
106
+ </template>
107
+
108
+ <script setup>
109
+ import { ref, computed } from "#imports";
110
+ const props = defineProps({
111
+ subscriptions: { type: Array, required: true },
112
+ flows: { type: [Array, null], required: true }
113
+ });
114
+ defineEmits(["toggle"]);
115
+ const searchQuery = ref("");
116
+ const getFlowId = (flow) => flow.id || flow.name || "";
117
+ const filteredFlows = computed(() => {
118
+ if (!props.flows) return [];
119
+ const query = searchQuery.value.toLowerCase();
120
+ return props.flows.filter((flow) => {
121
+ const flowId = getFlowId(flow);
122
+ return flowId.toLowerCase().includes(query);
123
+ });
124
+ });
125
+ const isFlowSubscribed = (flowName) => {
126
+ return props.subscriptions.includes(flowName);
127
+ };
128
+ </script>
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ subscriptions: string[];
3
+ flows: Array<{
4
+ name?: string;
5
+ id?: string;
6
+ }> | null;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ toggle: (flowName: string) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ onToggle?: ((flowName: string) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,27 @@
1
+ type __VLS_Props = {
2
+ noCard?: boolean;
3
+ name?: string;
4
+ };
5
+ type __VLS_ModelProps = {
6
+ modelValue: {
7
+ cron?: string;
8
+ interval?: number;
9
+ timezone: string;
10
+ };
11
+ };
12
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
13
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ "update:modelValue": (value: {
15
+ cron?: string;
16
+ interval?: number;
17
+ timezone: string;
18
+ }) => any;
19
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
20
+ "onUpdate:modelValue"?: ((value: {
21
+ cron?: string;
22
+ interval?: number;
23
+ timezone: string;
24
+ }) => any) | undefined;
25
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
+ declare const _default: typeof __VLS_export;
27
+ export default _default;