@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.
- package/dist/{FlowRunsPageWithDefaultFilter-DcTAaS4T.mjs → FlowRunsPageWithDefaultFilter-CxXsDGb7.mjs} +2 -2
- package/dist/{FlowRunsPageWithDefaultFilter-DcTAaS4T.mjs.map → FlowRunsPageWithDefaultFilter-CxXsDGb7.mjs.map} +1 -1
- package/dist/{index-CyHt9ie7.mjs → index-DbBjjLT-.mjs} +51 -46
- package/dist/{index-CyHt9ie7.mjs.map → index-DbBjjLT-.mjs.map} +1 -1
- package/dist/prefect-ui-library.mjs +1 -1
- package/dist/prefect-ui-library.umd.js +1 -1
- package/dist/prefect-ui-library.umd.js.map +1 -1
- package/dist/types/src/schemas/components/SchemaFormProperty.vue.d.ts +2 -0
- package/package.json +1 -1
|
@@ -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-
|
|
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-
|
|
38
|
+
//# sourceMappingURL=FlowRunsPageWithDefaultFilter-CxXsDGb7.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowRunsPageWithDefaultFilter-
|
|
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-
|
|
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(() =>
|
|
26954
|
-
|
|
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
|
|
26957
|
-
async function
|
|
26958
|
-
if (fa(
|
|
26959
|
-
|
|
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
|
|
26963
|
-
|
|
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
|
|
26966
|
+
const f = P({
|
|
26966
26967
|
get() {
|
|
26967
26968
|
return l.value;
|
|
26968
26969
|
},
|
|
26969
|
-
set(
|
|
26970
|
-
l.value =
|
|
26971
|
-
}
|
|
26972
|
-
}),
|
|
26973
|
-
const
|
|
26974
|
-
return cd(
|
|
26975
|
-
}),
|
|
26976
|
-
label:
|
|
26977
|
-
value:
|
|
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
|
|
26980
|
-
if (
|
|
26981
|
-
const
|
|
26982
|
-
return iP(
|
|
26980
|
+
function b(R) {
|
|
26981
|
+
if (R.$ref) {
|
|
26982
|
+
const S = Xf(i, R.$ref);
|
|
26983
|
+
return iP(S);
|
|
26983
26984
|
}
|
|
26984
|
-
return iP(
|
|
26985
|
+
return iP(R);
|
|
26985
26986
|
}
|
|
26986
|
-
async function
|
|
26987
|
-
const
|
|
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 (
|
|
26994
|
-
|
|
26995
|
-
|
|
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 (
|
|
26998
|
-
const
|
|
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:
|
|
27003
|
-
property:
|
|
27004
|
-
"property-for-validation":
|
|
27005
|
-
required:
|
|
27006
|
-
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":
|
|
27012
|
+
"onUpdate:value": p,
|
|
27013
|
+
onVnodeMounted: S[1] || (S[1] = () => a.value = !0)
|
|
27009
27014
|
}, {
|
|
27010
|
-
default: w(({ kind:
|
|
27011
|
-
|
|
27015
|
+
default: w(({ kind: F }) => [
|
|
27016
|
+
F === "none" ? (T(), D(E, {
|
|
27012
27017
|
key: 0,
|
|
27013
|
-
modelValue:
|
|
27014
|
-
"onUpdate:modelValue":
|
|
27015
|
-
options:
|
|
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-
|
|
82833
|
+
//# sourceMappingURL=index-DbBjjLT-.mjs.map
|