@prefecthq/prefect-ui-library 2.9.2 → 2.9.3

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-CyHt9ie7.mjs";
2
+ import { i as f, u as d, a as v, m as y } from "./index-DbBjjLT-.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-DcTAaS4T.mjs.map
38
+ //# sourceMappingURL=FlowRunsPageWithDefaultFilter-CxXsDGb7.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"FlowRunsPageWithDefaultFilter-DcTAaS4T.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-CxXsDGb7.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;;;"}
@@ -24316,7 +24316,7 @@ function yDe(t) {
24316
24316
  {
24317
24317
  name: "workspace.flow-runs",
24318
24318
  path: "",
24319
- component: () => import("./FlowRunsPageWithDefaultFilter-DcTAaS4T.mjs"),
24319
+ component: () => import("./FlowRunsPageWithDefaultFilter-CxXsDGb7.mjs"),
24320
24320
  props: { component: t.flowRuns }
24321
24321
  },
24322
24322
  {
@@ -26746,6 +26746,7 @@ const fne = /* @__PURE__ */ W({
26746
26746
  value: {},
26747
26747
  required: { type: Boolean },
26748
26748
  errors: {},
26749
+ skipDefaultValueInitialization: { type: Boolean },
26749
26750
  propertyForValidation: {}
26750
26751
  },
26751
26752
  emits: ["update:value"],
@@ -26770,7 +26771,7 @@ const fne = /* @__PURE__ */ W({
26770
26771
  f.value && r("update:value", F);
26771
26772
  }
26772
26773
  });
26773
- if (!un(n.value) && un(i.value.default)) {
26774
+ if (!n.skipDefaultValueInitialization && !un(n.value) && un(i.value.default)) {
26774
26775
  r("update:value", i.value.default);
26775
26776
  const F = Et(() => n.value, () => {
26776
26777
  Of(n.value, i.value.default) && (f.value = !0, F());
@@ -26949,76 +26950,80 @@ const Ene = /* @__PURE__ */ W({
26949
26950
  emits: ["update:value"],
26950
26951
  async setup(t, { emit: e }) {
26951
26952
  let n, r;
26952
- const o = t, s = we(), i = Rm(), u = ft([]), l = fe(0);
26953
- [n, r] = Ok(() => b()), await n, r(), u[l.value] = o.value, $G(() => {
26954
- b(), u[l.value] = o.value;
26953
+ const o = t, s = we(), i = Rm(), u = ft([]), l = fe(0), a = fe(!1);
26954
+ [n, r] = Ok(() => x()), await n, r(), u[l.value] = o.value, $G(() => {
26955
+ x(), u[l.value] = o.value;
26955
26956
  });
26956
- const a = e, c = P(() => fa(o.value) ? o.value : u[p.value]);
26957
- async function d(x) {
26958
- if (fa(x)) {
26959
- a("update:value", x);
26957
+ const c = e, d = P(() => fa(o.value) ? o.value : u[f.value]);
26958
+ async function p(R) {
26959
+ if (fa(R)) {
26960
+ c("update:value", R);
26960
26961
  return;
26961
26962
  }
26962
- let R = await uP({ value: x, property: o.property, api: s, schema: i });
26963
- R === -1 && (console.error("Could not determine property index"), R = p.value), u[R] = x, l.value = R, a("update:value", x);
26963
+ let S = await uP({ value: R, property: o.property, api: s, schema: i });
26964
+ S === -1 && (console.warn("SchemaFormPropertyAnyOf could not determine the initial index for property value"), S = f.value), u[S] = R, l.value = S, c("update:value", R);
26964
26965
  }
26965
- const p = P({
26966
+ const f = P({
26966
26967
  get() {
26967
26968
  return l.value;
26968
26969
  },
26969
- set(x) {
26970
- l.value = x, a("update:value", u[x]);
26971
- }
26972
- }), f = P(() => {
26973
- const x = o.property.anyOf[p.value], { anyOf: R, ...S } = o.property;
26974
- return cd(x, "$ref") ? rn({}, Xf(i, x.$ref), S) : rn({}, x, S);
26975
- }), y = P(() => o.property.anyOf.map((x, R) => ({
26976
- label: _(x),
26977
- value: R
26970
+ set(R) {
26971
+ l.value = R, c("update:value", u[R]);
26972
+ }
26973
+ }), y = P(() => {
26974
+ const R = o.property.anyOf[f.value], { anyOf: S, ...E } = o.property;
26975
+ return cd(R, "$ref") ? rn({}, Xf(i, R.$ref), E) : rn({}, R, E);
26976
+ }), _ = P(() => o.property.anyOf.map((R, S) => ({
26977
+ label: b(R),
26978
+ value: S
26978
26979
  })));
26979
- function _(x) {
26980
- if (x.$ref) {
26981
- const R = Xf(i, x.$ref);
26982
- return iP(R);
26980
+ function b(R) {
26981
+ if (R.$ref) {
26982
+ const S = Xf(i, R.$ref);
26983
+ return iP(S);
26983
26984
  }
26984
- return iP(x);
26985
+ return iP(R);
26985
26986
  }
26986
- async function b() {
26987
- const x = await uP({
26987
+ async function x() {
26988
+ const R = await uP({
26988
26989
  schema: i,
26989
26990
  property: o.property,
26990
26991
  value: o.value,
26991
26992
  api: s
26992
26993
  });
26993
- if (x === -1)
26994
- throw "not implemented";
26995
- l.value = x;
26994
+ if (R === -1) {
26995
+ console.warn("SchemaFormPropertyAnyOf could not determine the initial index for property value");
26996
+ return;
26997
+ }
26998
+ l.value = R;
26996
26999
  }
26997
- return (x, R) => {
26998
- const S = A("p-button-group");
27000
+ return (R, S) => {
27001
+ const E = A("p-button-group");
26999
27002
  return T(), D(Ik, null, [
27000
27003
  (T(), D(JT, {
27001
27004
  key: l.value,
27002
- value: c.value,
27003
- property: f.value,
27004
- "property-for-validation": x.property,
27005
- required: x.required,
27006
- errors: x.errors,
27005
+ value: d.value,
27006
+ property: y.value,
27007
+ "property-for-validation": R.property,
27008
+ required: R.required,
27009
+ errors: R.errors,
27010
+ "skip-default-value-initialization": a.value,
27007
27011
  class: "schema-form-property-any-of-input",
27008
- "onUpdate:value": d
27012
+ "onUpdate:value": p,
27013
+ onVnodeMounted: S[1] || (S[1] = () => a.value = !0)
27009
27014
  }, {
27010
- default: w(({ kind: E }) => [
27011
- E === "none" ? (T(), D(S, {
27015
+ default: w(({ kind: F }) => [
27016
+ F === "none" ? (T(), D(E, {
27012
27017
  key: 0,
27013
- modelValue: p.value,
27014
- "onUpdate:modelValue": R[0] || (R[0] = (F) => p.value = F),
27015
- options: y.value,
27018
+ modelValue: f.value,
27019
+ "onUpdate:modelValue": S[0] || (S[0] = (I) => f.value = I),
27020
+ options: _.value,
27016
27021
  small: "",
27017
27022
  class: "mb-2"
27018
27023
  }, null, 8, ["modelValue", "options"])) : U("", !0)
27019
27024
  ]),
27020
27025
  _: 1
27021
- }, 8, ["value", "property", "property-for-validation", "required", "errors"]))
27026
+ }, 8, ["value", "property", "property-for-validation", "required", "errors", "skip-default-value-initialization"]))
27022
27027
  ], 1024);
27023
27028
  };
27024
27029
  }
@@ -82825,4 +82830,4 @@ export {
82825
82830
  mue as y,
82826
82831
  vue as z
82827
82832
  };
82828
- //# sourceMappingURL=index-CyHt9ie7.mjs.map
82833
+ //# sourceMappingURL=index-DbBjjLT-.mjs.map