@prefecthq/prefect-ui-library 2.4.29 → 2.4.30

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.
@@ -0,0 +1,43 @@
1
+ import { defineComponent as u, shallowRef as l, watch as c, openBlock as m, createBlock as p, resolveDynamicComponent as s, createCommentVNode as i } from "vue";
2
+ import { i as f, u as d, a as v, m as y } from "./index-YHEENGp-.mjs";
3
+ import "@prefecthq/vue-charts";
4
+ import "@prefecthq/prefect-design";
5
+ import "@prefecthq/vue-compositions";
6
+ import "vee-validate";
7
+ import "vue-router";
8
+ const a = (r) => {
9
+ const { value: e, isCustom: t } = d();
10
+ if (v(r.query) && t.value)
11
+ try {
12
+ const o = y.map("SavedSearchFilter", e.value, "LocationQuery");
13
+ return { ...r, query: o };
14
+ } catch (o) {
15
+ console.error(o);
16
+ }
17
+ return !0;
18
+ }, F = u({
19
+ expose: [],
20
+ beforeRouteEnter: a,
21
+ beforeRouteUpdate: a
22
+ }), k = /* @__PURE__ */ u({
23
+ ...F,
24
+ __name: "FlowRunsPageWithDefaultFilter",
25
+ props: {
26
+ component: { type: Function }
27
+ },
28
+ setup(r) {
29
+ const e = r, t = l(null);
30
+ function o(n) {
31
+ return f(n);
32
+ }
33
+ return c(e.component, () => {
34
+ o(e.component) ? e.component().then((n) => {
35
+ t.value = n.default;
36
+ }) : t.value = e.component;
37
+ }, { immediate: !0 }), (n, _) => t.value !== null ? (m(), p(s(t.value), { key: 0 })) : i("", !0);
38
+ }
39
+ });
40
+ export {
41
+ k as default
42
+ };
43
+ //# sourceMappingURL=FlowRunsPageWithDefaultFilter-8k2iODgc.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlowRunsPageWithDefaultFilter-8k2iODgc.mjs","sources":["../src/components/FlowRunsPageWithDefaultFilter.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;;;"}
@@ -26860,7 +26860,7 @@ function HRe(t) {
26860
26860
  {
26861
26861
  name: "workspace.flow-runs",
26862
26862
  path: "",
26863
- component: () => import("./FlowRunsPageWithDefaultFilter-iuQH-Mb0.mjs"),
26863
+ component: () => import("./FlowRunsPageWithDefaultFilter-8k2iODgc.mjs"),
26864
26864
  props: { component: t.flowRuns }
26865
26865
  },
26866
26866
  {
@@ -78261,4 +78261,4 @@ export {
78261
78261
  dae as y,
78262
78262
  mae as z
78263
78263
  };
78264
- //# sourceMappingURL=index-KcKjuzo9.mjs.map
78264
+ //# sourceMappingURL=index-YHEENGp-.mjs.map