@prefecthq/prefect-ui-library 2.6.6 → 2.6.7

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 l, watch as c, 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-LkTAG7am.mjs";
2
+ import { i as f, u as d, a as v, m as y } from "./index-qELPHcu1.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=FlowRunsPageWithDefaultFilter-Q5rYkOZe.mjs.map
38
+ //# sourceMappingURL=FlowRunsPageWithDefaultFilter-ETPFz2Qt.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"FlowRunsPageWithDefaultFilter-Q5rYkOZe.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;;;"}
1
+ {"version":3,"file":"FlowRunsPageWithDefaultFilter-ETPFz2Qt.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;;;"}
@@ -3765,29 +3765,32 @@ class E$ extends dr {
3765
3765
  return _e.map("WorkPoolResponse", o, "WorkPool");
3766
3766
  }
3767
3767
  async getWorkPoolByName(n) {
3768
- const { data: r } = await this.get(`/${n}`);
3769
- return _e.map("WorkPoolResponse", r, "WorkPool");
3768
+ const r = encodeURI(n), { data: o } = await this.get(`/${r}`);
3769
+ return _e.map("WorkPoolResponse", o, "WorkPool");
3770
3770
  }
3771
3771
  async getWorkPools(n = {}) {
3772
3772
  const r = _e.map("WorkPoolsFilter", n, "WorkPoolsFilterRequest"), { data: o } = await this.post("/filter", r);
3773
3773
  return _e.map("WorkPoolResponse", o, "WorkPool");
3774
3774
  }
3775
3775
  updateWorkPool(n, r) {
3776
- const o = _e.map("WorkPoolEdit", r, "WorkPoolEditRequest");
3777
- return this.patch(`/${n}`, o);
3776
+ const o = _e.map("WorkPoolEdit", r, "WorkPoolEditRequest"), a = encodeURI(n);
3777
+ return this.patch(`/${a}`, o);
3778
3778
  }
3779
3779
  pauseWorkPool(n) {
3780
- return this.patch(`/${n}`, { is_paused: !0 });
3780
+ const r = encodeURI(n);
3781
+ return this.patch(`/${r}`, { is_paused: !0 });
3781
3782
  }
3782
3783
  resumeWorkPool(n) {
3783
- return this.patch(`/${n}`, { is_paused: !1 });
3784
+ const r = encodeURI(n);
3785
+ return this.patch(`/${r}`, { is_paused: !1 });
3784
3786
  }
3785
3787
  deleteWorkPool(n) {
3786
- return this.delete(`/${n}`);
3788
+ const r = encodeURI(n);
3789
+ return this.delete(`/${r}`);
3787
3790
  }
3788
3791
  async getWorkPoolScheduledRuns(n, r) {
3789
- const o = _e.map("WorkerScheduledFlowRuns", r, "WorkerScheduledFlowRunsRequest"), { data: a } = await this.post(`/${n}/get_scheduled_flow_runs`, o);
3790
- return _e.map("WorkerScheduledFlowRunResponse", a, "WorkerScheduledFlowRun");
3792
+ const o = _e.map("WorkerScheduledFlowRuns", r, "WorkerScheduledFlowRunsRequest"), a = encodeURI(n), { data: i } = await this.post(`/${a}/get_scheduled_flow_runs`, o);
3793
+ return _e.map("WorkerScheduledFlowRunResponse", i, "WorkerScheduledFlowRun");
3791
3794
  }
3792
3795
  async getWorkPoolLateRuns(n, r) {
3793
3796
  return (await this.getWorkPoolScheduledRuns(n, r)).filter((a) => a.flowRun.stateName === "Late");
@@ -3799,8 +3802,8 @@ class A$ extends dr {
3799
3802
  j(this, "routePrefix", "/work_pools/");
3800
3803
  }
3801
3804
  async getWorkers(n, r = {}) {
3802
- const o = _e.map("WorkPoolWorkersFilter", r, "WorkPoolWorkersFilterRequest"), { data: a } = await this.post(`/${n}/workers/filter`, o);
3803
- return _e.map("WorkPoolWorkerResponse", a, "WorkPoolWorker");
3805
+ const o = _e.map("WorkPoolWorkersFilter", r, "WorkPoolWorkersFilterRequest"), a = encodeURI(n), { data: i } = await this.post(`/${a}/workers/filter`, o);
3806
+ return _e.map("WorkPoolWorkerResponse", i, "WorkPoolWorker");
3804
3807
  }
3805
3808
  }
3806
3809
  class I$ extends dr {
@@ -27056,7 +27059,7 @@ function BMe(t) {
27056
27059
  {
27057
27060
  name: "workspace.flow-runs",
27058
27061
  path: "",
27059
- component: () => import("./FlowRunsPageWithDefaultFilter-Q5rYkOZe.mjs"),
27062
+ component: () => import("./FlowRunsPageWithDefaultFilter-ETPFz2Qt.mjs"),
27060
27063
  props: { component: t.flowRuns }
27061
27064
  },
27062
27065
  {
@@ -28629,53 +28632,56 @@ const Pte = /* @__PURE__ */ U({
28629
28632
  },
28630
28633
  emits: ["update:values"],
28631
28634
  setup(t, { emit: e }) {
28632
- const n = t, r = e, o = P(() => Object.entries(n.properties).sort((c, d) => {
28633
- const [, h] = c, [, f] = d, { position: y = 0 } = h, { position: v = 0 } = f;
28634
- return y - v;
28635
+ const n = t, r = e, o = P(() => Object.entries(n.properties).sort((d, h) => {
28636
+ const [, f] = d, [, y] = h, { position: v = 0 } = f, { position: _ = 0 } = y;
28637
+ return v - _;
28635
28638
  }));
28636
- function a(c) {
28637
- var d;
28638
- return ((d = n.values) == null ? void 0 : d[c]) ?? void 0;
28639
+ function a(d, h) {
28640
+ return d.title ? d : { ...d, title: h };
28641
+ }
28642
+ function i(d) {
28643
+ var h;
28644
+ return ((h = n.values) == null ? void 0 : h[d]) ?? void 0;
28639
28645
  }
28640
- function i(c, d) {
28641
- l.push({ propertyKey: c, value: d }), s();
28646
+ function u(d, h) {
28647
+ s.push({ propertyKey: d, value: h }), c();
28642
28648
  }
28643
- function u(c) {
28644
- var d;
28645
- return ((d = n.parent.required) == null ? void 0 : d.includes(c)) ?? !1;
28649
+ function l(d) {
28650
+ var h;
28651
+ return ((h = n.parent.required) == null ? void 0 : h.includes(d)) ?? !1;
28646
28652
  }
28647
- const l = [], s = OT(() => {
28648
- const c = { ...n.values };
28649
- l.forEach(({ propertyKey: d, value: h }) => {
28650
- c[d] = h, Fa(h) || delete c[d];
28651
- }), r("update:values", c);
28653
+ const s = [], c = OT(() => {
28654
+ const d = { ...n.values };
28655
+ s.forEach(({ propertyKey: h, value: f }) => {
28656
+ d[h] = f, Fa(f) || delete d[h];
28657
+ }), r("update:values", d);
28652
28658
  }, 10);
28653
- return (c, d) => {
28654
- const h = I("p-content");
28655
- return R(), L(h, { class: "schema-form-properties" }, {
28659
+ return (d, h) => {
28660
+ const f = I("p-content");
28661
+ return R(), L(f, { class: "schema-form-properties" }, {
28656
28662
  default: x(() => [
28657
- (R(!0), q(Oe, null, Mn(o.value, ([f, y]) => (R(), q(Oe, { key: f }, [
28658
- g(Qc)(y, "allOf") ? (R(), L(wte, {
28663
+ (R(!0), q(Oe, null, Mn(o.value, ([y, v]) => (R(), q(Oe, { key: y }, [
28664
+ g(Qc)(v, "allOf") ? (R(), L(wte, {
28659
28665
  key: 0,
28660
- value: a(f),
28661
- property: y,
28662
- required: u(f),
28663
- errors: g(Ky)(f, c.errors),
28664
- "onUpdate:value": (v) => i(f, v)
28665
- }, null, 8, ["value", "property", "required", "errors", "onUpdate:value"])) : g(Qc)(y, "anyOf") ? (R(), L(Pte, {
28666
+ value: i(y),
28667
+ property: a(v, y),
28668
+ required: l(y),
28669
+ errors: g(Ky)(y, d.errors),
28670
+ "onUpdate:value": (_) => u(y, _)
28671
+ }, null, 8, ["value", "property", "required", "errors", "onUpdate:value"])) : g(Qc)(v, "anyOf") ? (R(), L(Pte, {
28666
28672
  key: 1,
28667
- value: a(f),
28668
- property: y,
28669
- required: u(f),
28670
- errors: g(Ky)(f, c.errors),
28671
- "onUpdate:value": (v) => i(f, v)
28673
+ value: i(y),
28674
+ property: a(v, y),
28675
+ required: l(y),
28676
+ errors: g(Ky)(y, d.errors),
28677
+ "onUpdate:value": (_) => u(y, _)
28672
28678
  }, null, 8, ["value", "property", "required", "errors", "onUpdate:value"])) : (R(), L(ox, {
28673
28679
  key: 2,
28674
- value: a(f),
28675
- property: y,
28676
- required: u(f),
28677
- errors: g(Ky)(f, c.errors),
28678
- "onUpdate:value": (v) => i(f, v)
28680
+ value: i(y),
28681
+ property: a(v, y),
28682
+ required: l(y),
28683
+ errors: g(Ky)(y, d.errors),
28684
+ "onUpdate:value": (_) => u(y, _)
28679
28685
  }, null, 8, ["value", "property", "required", "errors", "onUpdate:value"]))
28680
28686
  ], 64))), 128))
28681
28687
  ]),
@@ -80259,4 +80265,4 @@ export {
80259
80265
  eie as y,
80260
80266
  oie as z
80261
80267
  };
80262
- //# sourceMappingURL=index-LkTAG7am.mjs.map
80268
+ //# sourceMappingURL=index-qELPHcu1.mjs.map