@prefecthq/prefect-ui-library 3.2.3 → 3.2.4

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,5 +1,5 @@
1
1
  import { defineComponent as u, shallowRef as c, watch as l, openBlock as s, createBlock as m, resolveDynamicComponent as p, createCommentVNode as i } from "vue";
2
- import { i as f, u as d, a as v, m as y } from "./index-CxNCTjzW.mjs";
2
+ import { i as f, u as d, a as v, m as y } from "./index-CBAwn_8w.mjs";
3
3
  const a = (n) => {
4
4
  const { value: e, isCustom: t } = d();
5
5
  if (v(n.query) && t.value)
@@ -35,4 +35,4 @@ const a = (n) => {
35
35
  export {
36
36
  C as default
37
37
  };
38
- //# sourceMappingURL=RunsPageWithDefaultFilter-98L1z19l.mjs.map
38
+ //# sourceMappingURL=RunsPageWithDefaultFilter-Be8slaYD.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"RunsPageWithDefaultFilter-98L1z19l.mjs","sources":["../src/components/RunsPageWithDefaultFilter.vue"],"sourcesContent":["<template>\n <component :is=\"routeComponent\" v-if=\"routeComponent !== null\" />\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, shallowRef, watch } from 'vue'\n import { NavigationGuard, RouteComponent } from 'vue-router'\n import { isEmptyObject, mapper, isFunction } from '..'\n import { useDefaultSavedSearchFilter } from '@/compositions/useDefaultSavedSearchFilter'\n\n const setDefaultFlowRunsFilterQueryIfEmpty: NavigationGuard = (to) => {\n const { value: defaultFlowRunsSavedSearchFilter, isCustom } = useDefaultSavedSearchFilter()\n\n if (isEmptyObject(to.query) && isCustom.value) {\n try {\n const query = mapper.map('SavedSearchFilter', defaultFlowRunsSavedSearchFilter.value, 'LocationQuery')\n\n return { ...to, query }\n } catch (error) {\n console.error(error)\n }\n }\n\n return true\n }\n\n export default defineComponent({\n expose: [],\n beforeRouteEnter: setDefaultFlowRunsFilterQueryIfEmpty,\n beforeRouteUpdate: setDefaultFlowRunsFilterQueryIfEmpty,\n })\n</script>\n\n<script setup lang=\"ts\">\n type LazilyLoadedRouteComponent = () => Promise<{ default: RouteComponent }>\n const props = defineProps<{\n component: RouteComponent | LazilyLoadedRouteComponent,\n }>()\n\n const routeComponent = shallowRef<RouteComponent | null>(null)\n\n function isLazilyLoadedRouteComponent(component: RouteComponent | LazilyLoadedRouteComponent): component is LazilyLoadedRouteComponent {\n return isFunction(component)\n }\n\n watch(props.component, () => {\n if (isLazilyLoadedRouteComponent(props.component)) {\n props.component().then(component => {\n routeComponent.value = component.default\n })\n } else {\n routeComponent.value = props.component\n }\n }, { immediate: true })\n</script>"],"names":["setDefaultFlowRunsFilterQueryIfEmpty","to","defaultFlowRunsSavedSearchFilter","isCustom","useDefaultSavedSearchFilter","isEmptyObject","query","mapper","error","__default__","defineComponent","props","__props","routeComponent","shallowRef","isLazilyLoadedRouteComponent","component","isFunction","watch"],"mappings":";;AAUE,MAAMA,IAAwD,CAACC,MAAO;AACpE,QAAM,EAAE,OAAOC,GAAkC,UAAAC,MAAaC,EAA4B;AAE1F,MAAIC,EAAcJ,EAAG,KAAK,KAAKE,EAAS;AAClC,QAAA;AACF,YAAMG,IAAQC,EAAO,IAAI,qBAAqBL,EAAiC,OAAO,eAAe;AAE9F,aAAA,EAAE,GAAGD,GAAI,OAAAK;aACTE,GAAO;AACd,cAAQ,MAAMA,CAAK;AAAA,IACrB;AAGK,SAAA;AACT,GAEeC,IAAAC,EAAgB;AAAA,EAC7B,QAAQ,CAAC;AAAA,EACT,kBAAkBV;AAAA,EAClB,mBAAmBA;AACrB,CAAC;;;;;;;AAKD,UAAMW,IAAQC,GAIRC,IAAiBC,EAAkC,IAAI;AAE7D,aAASC,EAA6BC,GAAiG;AACrI,aAAOC,EAAWD,CAAS;AAAA,IAC7B;AAEM,WAAAE,EAAAP,EAAM,WAAW,MAAM;AACvB,MAAAI,EAA6BJ,EAAM,SAAS,IACxCA,EAAA,UAAA,EAAY,KAAK,CAAaK,MAAA;AAClC,QAAAH,EAAe,QAAQG,EAAU;AAAA,MAAA,CAClC,IAEDH,EAAe,QAAQF,EAAM;AAAA,IAC/B,GACC,EAAE,WAAW,GAAA,CAAM;;;"}
1
+ {"version":3,"file":"RunsPageWithDefaultFilter-Be8slaYD.mjs","sources":["../src/components/RunsPageWithDefaultFilter.vue"],"sourcesContent":["<template>\n <component :is=\"routeComponent\" v-if=\"routeComponent !== null\" />\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, shallowRef, watch } from 'vue'\n import { NavigationGuard, RouteComponent } from 'vue-router'\n import { isEmptyObject, mapper, isFunction } from '..'\n import { useDefaultSavedSearchFilter } from '@/compositions/useDefaultSavedSearchFilter'\n\n const setDefaultFlowRunsFilterQueryIfEmpty: NavigationGuard = (to) => {\n const { value: defaultFlowRunsSavedSearchFilter, isCustom } = useDefaultSavedSearchFilter()\n\n if (isEmptyObject(to.query) && isCustom.value) {\n try {\n const query = mapper.map('SavedSearchFilter', defaultFlowRunsSavedSearchFilter.value, 'LocationQuery')\n\n return { ...to, query }\n } catch (error) {\n console.error(error)\n }\n }\n\n return true\n }\n\n export default defineComponent({\n expose: [],\n beforeRouteEnter: setDefaultFlowRunsFilterQueryIfEmpty,\n beforeRouteUpdate: setDefaultFlowRunsFilterQueryIfEmpty,\n })\n</script>\n\n<script setup lang=\"ts\">\n type LazilyLoadedRouteComponent = () => Promise<{ default: RouteComponent }>\n const props = defineProps<{\n component: RouteComponent | LazilyLoadedRouteComponent,\n }>()\n\n const routeComponent = shallowRef<RouteComponent | null>(null)\n\n function isLazilyLoadedRouteComponent(component: RouteComponent | LazilyLoadedRouteComponent): component is LazilyLoadedRouteComponent {\n return isFunction(component)\n }\n\n watch(props.component, () => {\n if (isLazilyLoadedRouteComponent(props.component)) {\n props.component().then(component => {\n routeComponent.value = component.default\n })\n } else {\n routeComponent.value = props.component\n }\n }, { immediate: true })\n</script>"],"names":["setDefaultFlowRunsFilterQueryIfEmpty","to","defaultFlowRunsSavedSearchFilter","isCustom","useDefaultSavedSearchFilter","isEmptyObject","query","mapper","error","__default__","defineComponent","props","__props","routeComponent","shallowRef","isLazilyLoadedRouteComponent","component","isFunction","watch"],"mappings":";;AAUE,MAAMA,IAAwD,CAACC,MAAO;AACpE,QAAM,EAAE,OAAOC,GAAkC,UAAAC,MAAaC,EAA4B;AAE1F,MAAIC,EAAcJ,EAAG,KAAK,KAAKE,EAAS;AAClC,QAAA;AACF,YAAMG,IAAQC,EAAO,IAAI,qBAAqBL,EAAiC,OAAO,eAAe;AAE9F,aAAA,EAAE,GAAGD,GAAI,OAAAK;aACTE,GAAO;AACd,cAAQ,MAAMA,CAAK;AAAA,IACrB;AAGK,SAAA;AACT,GAEeC,IAAAC,EAAgB;AAAA,EAC7B,QAAQ,CAAC;AAAA,EACT,kBAAkBV;AAAA,EAClB,mBAAmBA;AACrB,CAAC;;;;;;;AAKD,UAAMW,IAAQC,GAIRC,IAAiBC,EAAkC,IAAI;AAE7D,aAASC,EAA6BC,GAAiG;AACrI,aAAOC,EAAWD,CAAS;AAAA,IAC7B;AAEM,WAAAE,EAAAP,EAAM,WAAW,MAAM;AACvB,MAAAI,EAA6BJ,EAAM,SAAS,IACxCA,EAAA,UAAA,EAAY,KAAK,CAAaK,MAAA;AAClC,QAAAH,EAAe,QAAQG,EAAU;AAAA,MAAA,CAClC,IAEDH,EAAe,QAAQF,EAAM;AAAA,IAC/B,GACC,EAAE,WAAW,GAAA,CAAM;;;"}
@@ -24999,7 +24999,7 @@ function NOe(t) {
24999
24999
  {
25000
25000
  name: "workspace.runs",
25001
25001
  path: "",
25002
- component: () => import("./RunsPageWithDefaultFilter-98L1z19l.mjs"),
25002
+ component: () => import("./RunsPageWithDefaultFilter-Be8slaYD.mjs"),
25003
25003
  props: { component: t.runs }
25004
25004
  },
25005
25005
  {
@@ -84029,12 +84029,15 @@ const uX = /* @__PURE__ */ W({
84029
84029
  props: {
84030
84030
  deployment: {},
84031
84031
  parameters: {},
84032
+ disabled: { type: Boolean },
84032
84033
  name: {}
84033
84034
  },
84034
84035
  emits: ["submit", "cancel"],
84035
84036
  setup(t, { emit: e }) {
84036
84037
  const n = t, r = e, o = le(!0), s = S(() => n.deployment.parameterOpenApiSchema), i = S(() => !cc(n.deployment.parameterOpenApiSchema.properties ?? {})), { validate: u } = as(), l = le(n.name), { state: a, error: c } = gn(l, dr("name")), d = le({ ...n.deployment.parameters, ...n.parameters ?? {} }), p = le(null), f = le(""), y = le(n.deployment.tags ?? []), v = le(n.deployment.workQueueName), k = le(null), T = le(null), M = le("{}"), { errors: R, validate: A } = Um(s, d);
84037
84038
  async function C() {
84039
+ if (n.disabled)
84040
+ return;
84038
84041
  if (o.value)
84039
84042
  try {
84040
84043
  if (!(await Promise.all([
@@ -84086,13 +84089,14 @@ const uX = /* @__PURE__ */ W({
84086
84089
  }),
84087
84090
  _(Te, {
84088
84091
  variant: "default",
84089
- type: "submit"
84092
+ type: "submit",
84093
+ disabled: F.disabled
84090
84094
  }, {
84091
84095
  default: b(() => [
84092
84096
  H(" Submit ")
84093
84097
  ]),
84094
84098
  _: 1
84095
- })
84099
+ }, 8, ["disabled"])
84096
84100
  ]),
84097
84101
  default: b(() => [
84098
84102
  _(Q, null, {
@@ -88894,4 +88898,4 @@ export {
88894
88898
  Uce as y,
88895
88899
  jce as z
88896
88900
  };
88897
- //# sourceMappingURL=index-CxNCTjzW.mjs.map
88901
+ //# sourceMappingURL=index-CBAwn_8w.mjs.map