@prefecthq/prefect-ui-library 3.2.10 → 3.2.11

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.
@@ -1,3 +1,8 @@
1
+ type DeploymentOption = {
2
+ label: string;
3
+ value: string | null;
4
+ flowId?: string;
5
+ };
1
6
  declare let __VLS_typeProps: {
2
7
  allowUnset?: boolean;
3
8
  };
@@ -19,7 +24,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
19
24
  } | undefined;
20
25
  }): any;
21
26
  option?(_: {
22
- option: any;
27
+ option: DeploymentOption;
23
28
  }): any;
24
29
  }>;
25
30
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prefecthq/prefect-ui-library",
3
- "version": "3.2.10",
3
+ "version": "3.2.11",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,8 +14,12 @@
14
14
  </slot>
15
15
  </template>
16
16
 
17
- <template #option="{ option }">
18
- <slot name="option" :option="option" />
17
+ <template #option="{ option }: { option: DeploymentOption }">
18
+ <slot name="option" :option="option">
19
+ <template v-if="option.flowId">
20
+ <DeploymentComboboxOption :flow-id="option.flowId" :deployment-name="option.label" />
21
+ </template>
22
+ </slot>
19
23
  </template>
20
24
 
21
25
  <template v-if="count > deployments.length" #bottom>
@@ -27,7 +31,7 @@
27
31
  </template>
28
32
 
29
33
  <script lang="ts" setup>
30
- import { PCombobox, SelectOption } from '@prefecthq/prefect-design'
34
+ import { PCombobox } from '@prefecthq/prefect-design'
31
35
  import { useDebouncedRef } from '@prefecthq/vue-compositions'
32
36
  import { computed, ref } from 'vue'
33
37
  import { DeploymentComboboxOption } from '@/components'
@@ -35,6 +39,8 @@
35
39
  import { useDeployments, useWorkspaceRoutes } from '@/compositions'
36
40
  import { isString, withQuery } from '@/utilities'
37
41
 
42
+ type DeploymentOption = { label: string, value: string | null, flowId?: string }
43
+
38
44
  const selected = defineModel<string | string[] | null | undefined>('selected', { required: true })
39
45
 
40
46
  const props = defineProps<{
@@ -56,10 +62,11 @@
56
62
  'deployments.flowOrDeploymentNameLike': search.value,
57
63
  }))
58
64
 
59
- const options = computed<SelectOption[]>(() => {
60
- const options: SelectOption[] = deployments.value.map(deployment => ({
65
+ const options = computed<DeploymentOption[]>(() => {
66
+ const options: DeploymentOption[] = deployments.value.map(deployment => ({
61
67
  value: deployment.id,
62
68
  label: deployment.name,
69
+ flowId: deployment.flowId,
63
70
  }))
64
71
 
65
72
  if (props.allowUnset) {