@gravitee/graphene-policy-studio 3.41.0 → 3.42.0
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/USAGE_GUIDE.md +1 -1
- package/dist/components/PhaseCanvas/PhaseLayout.d.ts.map +1 -1
- package/dist/components/PolicyCatalog/PolicyCatalogCategoryFilter.d.ts +3 -1
- package/dist/components/PolicyCatalog/PolicyCatalogCategoryFilter.d.ts.map +1 -1
- package/dist/components/PolicyCatalog/PolicyCatalogPane.d.ts.map +1 -1
- package/dist/components/PolicyCatalog/PolicyQuickInsert.d.ts +7 -1
- package/dist/components/PolicyCatalog/PolicyQuickInsert.d.ts.map +1 -1
- package/dist/index.js +575 -546
- package/docs/test-ids.md +25 -22
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Alert as e, AlertDescription as t, AlertTitle as n, Badge as r, Button as i, Card as a, Combobox as o, ComboboxChip as s, ComboboxChips as c, ComboboxChipsInput as l, ComboboxCollection as u, ComboboxContent as d, ComboboxEmpty as f, ComboboxGroup as p, ComboboxItem as m, ComboboxLabel as h, ComboboxList as g, ComboboxValue as _, Command as v, CommandEmpty as y, CommandGroup as b, CommandInput as x, CommandItem as S, CommandList as C, CommandSeparator as w, Dialog as T, DialogClose as E, DialogContent as D, DialogDescription as O, DialogFooter as k, DialogHeader as ee, DialogTitle as te, DropdownMenu as ne, DropdownMenuContent as A, DropdownMenuItem as re, DropdownMenuSeparator as ie, DropdownMenuTrigger as ae, ElCheatSheetTrigger as oe, ElCheatSheetTrigger as se, Empty as ce, EmptyDescription as le, EmptyHeader as ue, EmptyMedia as j, EmptyTitle as de, Field as fe, FieldContent as pe, FieldDescription as
|
|
1
|
+
import { Alert as e, AlertDescription as t, AlertTitle as n, Badge as r, Button as i, Card as a, Combobox as o, ComboboxChip as s, ComboboxChips as c, ComboboxChipsInput as l, ComboboxCollection as u, ComboboxContent as d, ComboboxEmpty as f, ComboboxGroup as p, ComboboxItem as m, ComboboxLabel as h, ComboboxList as g, ComboboxValue as _, Command as v, CommandEmpty as y, CommandGroup as b, CommandInput as x, CommandItem as S, CommandList as C, CommandSeparator as w, Dialog as T, DialogClose as E, DialogContent as D, DialogDescription as O, DialogFooter as k, DialogHeader as ee, DialogTitle as te, DropdownMenu as ne, DropdownMenuContent as A, DropdownMenuItem as re, DropdownMenuSeparator as ie, DropdownMenuTrigger as ae, ElCheatSheetTrigger as oe, ElCheatSheetTrigger as se, Empty as ce, EmptyDescription as le, EmptyHeader as ue, EmptyMedia as j, EmptyTitle as de, Field as fe, FieldContent as pe, FieldDescription as me, FieldError as he, FieldLabel as M, HoverCard as ge, HoverCardContent as _e, HoverCardTrigger as ve, Input as N, Item as ye, ItemActions as be, ItemContent as P, ItemDescription as xe, ItemMedia as Se, ItemTitle as Ce, JsonSchemaForm as we, Popover as Te, PopoverContent as Ee, PopoverHeader as De, PopoverTitle as Oe, PopoverTrigger as ke, Prose as Ae, ResizableHandle as je, ResizablePanel as Me, ResizablePanelGroup as Ne, ScrollArea as Pe, ScrollBar as Fe, Select as Ie, SelectContent as Le, SelectItem as Re, SelectTrigger as ze, SelectValue as Be, Separator as Ve, Sheet as He, SheetContent as Ue, SheetDescription as We, SheetHeader as Ge, SheetTitle as Ke, Skeleton as F, Switch as qe, Tabs as Je, TabsContent as Ye, TabsList as Xe, TabsTrigger as Ze, Textarea as Qe, Tooltip as $e, TooltipContent as et, TooltipProvider as tt, TooltipTrigger as nt, cn as I, extractDefaults as rt, jsonSchemaResolver as it, pruneHiddenValues as at, useComboboxAnchor as ot } from "@gravitee/graphene-core";
|
|
2
2
|
import L, { Fragment as st, createContext as ct, memo as lt, useCallback as R, useContext as ut, useEffect as dt, useLayoutEffect as ft, useMemo as z, useReducer as pt, useRef as B, useState as V } from "react";
|
|
3
3
|
import { Fragment as mt, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
4
4
|
import { AlertCircleIcon as ht, ArrowLeftIcon as gt, ArrowRightIcon as _t, BookOpenIcon as vt, BoxesIcon as yt, ChevronDownIcon as bt, ChevronRightIcon as xt, CircleDotIcon as St, CircleHelpIcon as Ct, CopyIcon as wt, EyeIcon as Tt, EyeOffIcon as Et, FilterIcon as Dt, GlobeIcon as Ot, ListIcon as kt, LockIcon as At, MonitorIcon as jt, MoreHorizontalIcon as Mt, MoreVerticalIcon as Nt, PencilIcon as Pt, PlusIcon as Ft, SearchIcon as It, ServerIcon as Lt, SettingsIcon as Rt, ShieldCheckIcon as zt, SlidersHorizontalIcon as Bt, SparklesIcon as Vt, StarIcon as Ht, TagIcon as Ut, Trash2Icon as Wt, TriangleAlertIcon as Gt, WorkflowIcon as Kt, XIcon as qt, ZapIcon as Jt } from "@gravitee/graphene-core/icons";
|
|
@@ -1155,7 +1155,7 @@ function Ni(e = {}) {
|
|
|
1155
1155
|
}, k = () => {
|
|
1156
1156
|
for (let e of s.unMount) {
|
|
1157
1157
|
let t = G(r, e);
|
|
1158
|
-
t && (t._f.refs ? t._f.refs.every((e) => !Zr(e)) : !Zr(t._f.ref)) &&
|
|
1158
|
+
t && (t._f.refs ? t._f.refs.every((e) => !Zr(e)) : !Zr(t._f.ref)) && he(e);
|
|
1159
1159
|
}
|
|
1160
1160
|
s.unMount = /* @__PURE__ */ new Set();
|
|
1161
1161
|
}, ee = (e, n) => !t.disabled && (e && n && Sr(a, e, n), !Ir(le(), i)), te = (e, t, n) => Pr(e, s, { ...o.mount ? a : _r(t) ? i : Nr(e) ? { [e]: t } : t }, n, t), ne = (e) => vr(G(o.mount ? a : i, e, t.shouldUnregister ? G(i, e, []) : [])), A = (e, t, n = {}) => {
|
|
@@ -1302,7 +1302,7 @@ function Ni(e = {}) {
|
|
|
1302
1302
|
defaultValues: i
|
|
1303
1303
|
});
|
|
1304
1304
|
}
|
|
1305
|
-
} }).unsubscribe,
|
|
1305
|
+
} }).unsubscribe, me = (e) => (o.mount = !0, f = {
|
|
1306
1306
|
...f,
|
|
1307
1307
|
...e.formState
|
|
1308
1308
|
}, pe({
|
|
@@ -1311,13 +1311,13 @@ function Ni(e = {}) {
|
|
|
1311
1311
|
...u,
|
|
1312
1312
|
...e.formState
|
|
1313
1313
|
}
|
|
1314
|
-
})),
|
|
1314
|
+
})), he = (e, o = {}) => {
|
|
1315
1315
|
for (let c of e ? Hr(e) : s.mount) s.mount.delete(c), s.array.delete(c), o.keepValue || (ei(r, c), ei(a, c)), !o.keepError && ei(n.errors, c), !o.keepDirty && ei(n.dirtyFields, c), !o.keepTouched && ei(n.touchedFields, c), !o.keepIsValidating && ei(n.validatingFields, c), !t.shouldUnregister && !o.keepDefaultValue && ei(i, c);
|
|
1316
1316
|
p.state.next({ values: hr(a) }), p.state.next({
|
|
1317
1317
|
...n,
|
|
1318
1318
|
...o.keepDirty ? { isDirty: ee() } : {}
|
|
1319
1319
|
}), !o.keepIsValid && g();
|
|
1320
|
-
},
|
|
1320
|
+
}, M = ({ disabled: e, name: t }) => {
|
|
1321
1321
|
if (br(e) && o.mount || e || s.disabled.has(t)) {
|
|
1322
1322
|
let n = s.disabled.has(t) !== !!e;
|
|
1323
1323
|
e ? s.disabled.add(t) : s.disabled.delete(t), n && o.mount && !o.action && g();
|
|
@@ -1332,7 +1332,7 @@ function Ni(e = {}) {
|
|
|
1332
1332
|
mount: !0,
|
|
1333
1333
|
...n
|
|
1334
1334
|
}
|
|
1335
|
-
}), s.mount.add(e), a && !l ?
|
|
1335
|
+
}), s.mount.add(e), a && !l ? M({
|
|
1336
1336
|
disabled: br(n.disabled) ? n.disabled : t.disabled,
|
|
1337
1337
|
name: e
|
|
1338
1338
|
}) : S(e, !0, n.value), {
|
|
@@ -1406,7 +1406,7 @@ function Ni(e = {}) {
|
|
|
1406
1406
|
}), c) throw c;
|
|
1407
1407
|
}, ye = (e, t = {}) => {
|
|
1408
1408
|
G(r, e) && (_r(t.defaultValue) ? ie(e, hr(G(i, e))) : (ie(e, t.defaultValue), Sr(i, e, hr(t.defaultValue))), t.keepTouched || ei(n.touchedFields, e), t.keepDirty || (ei(n.dirtyFields, e), n.isDirty = t.defaultValue ? ee(e, hr(G(i, e))) : ee()), t.keepError || (ei(n.errors, e), d.isValid && g()), p.state.next({ ...n }));
|
|
1409
|
-
},
|
|
1409
|
+
}, be = (e, c = {}) => {
|
|
1410
1410
|
let l = e ? hr(e) : i, u = hr(l), f = Gr(e), m = f ? i : u;
|
|
1411
1411
|
if (c.keepDefaultValues || (i = l), !c.keepValues) {
|
|
1412
1412
|
if (c.keepDirtyValues) {
|
|
@@ -1454,7 +1454,7 @@ function Ni(e = {}) {
|
|
|
1454
1454
|
isSubmitting: !1,
|
|
1455
1455
|
defaultValues: i
|
|
1456
1456
|
});
|
|
1457
|
-
},
|
|
1457
|
+
}, P = (e, n) => be(xr(e) ? e(a) : e, {
|
|
1458
1458
|
...t.resetOptions,
|
|
1459
1459
|
...n
|
|
1460
1460
|
}), xe = (e, t = {}) => {
|
|
@@ -1473,7 +1473,7 @@ function Ni(e = {}) {
|
|
|
1473
1473
|
}, Ce = {
|
|
1474
1474
|
control: {
|
|
1475
1475
|
register: ge,
|
|
1476
|
-
unregister:
|
|
1476
|
+
unregister: he,
|
|
1477
1477
|
getFieldState: ue,
|
|
1478
1478
|
handleSubmit: N,
|
|
1479
1479
|
setError: de,
|
|
@@ -1485,12 +1485,12 @@ function Ni(e = {}) {
|
|
|
1485
1485
|
_getDirty: ee,
|
|
1486
1486
|
_setValid: g,
|
|
1487
1487
|
_setFieldArray: y,
|
|
1488
|
-
_setDisabledField:
|
|
1488
|
+
_setDisabledField: M,
|
|
1489
1489
|
_setErrors: x,
|
|
1490
1490
|
_getFieldArray: ne,
|
|
1491
|
-
_reset:
|
|
1491
|
+
_reset: be,
|
|
1492
1492
|
_resetDefaultValues: () => xr(t.defaultValues) && t.defaultValues().then((e) => {
|
|
1493
|
-
|
|
1493
|
+
P(e, t.resetOptions), p.state.next({ isLoading: !1 });
|
|
1494
1494
|
}),
|
|
1495
1495
|
_removeUnmounted: k,
|
|
1496
1496
|
_disableForm: ve,
|
|
@@ -1530,7 +1530,7 @@ function Ni(e = {}) {
|
|
|
1530
1530
|
};
|
|
1531
1531
|
}
|
|
1532
1532
|
},
|
|
1533
|
-
subscribe:
|
|
1533
|
+
subscribe: me,
|
|
1534
1534
|
trigger: ce,
|
|
1535
1535
|
register: ge,
|
|
1536
1536
|
handleSubmit: N,
|
|
@@ -1538,10 +1538,10 @@ function Ni(e = {}) {
|
|
|
1538
1538
|
setValue: ie,
|
|
1539
1539
|
setValues: ae,
|
|
1540
1540
|
getValues: le,
|
|
1541
|
-
reset:
|
|
1541
|
+
reset: P,
|
|
1542
1542
|
resetField: ye,
|
|
1543
1543
|
clearErrors: j,
|
|
1544
|
-
unregister:
|
|
1544
|
+
unregister: he,
|
|
1545
1545
|
setError: de,
|
|
1546
1546
|
setFocus: xe,
|
|
1547
1547
|
getFieldState: ue
|
|
@@ -3923,7 +3923,7 @@ function gl({ registration: e, placeholder: t = hl }) {
|
|
|
3923
3923
|
return /* @__PURE__ */ U(fe, { children: [
|
|
3924
3924
|
/* @__PURE__ */ U("div", {
|
|
3925
3925
|
className: "flex items-center gap-1",
|
|
3926
|
-
children: [/* @__PURE__ */ H(
|
|
3926
|
+
children: [/* @__PURE__ */ H(M, {
|
|
3927
3927
|
className: "text-sm",
|
|
3928
3928
|
children: "Condition"
|
|
3929
3929
|
}), /* @__PURE__ */ H(se, { "data-testid": n("flow-form", "condition", "el") })]
|
|
@@ -3934,7 +3934,7 @@ function gl({ registration: e, placeholder: t = hl }) {
|
|
|
3934
3934
|
className: "font-mono text-xs",
|
|
3935
3935
|
"data-testid": n("flow-form", "condition")
|
|
3936
3936
|
}) }),
|
|
3937
|
-
/* @__PURE__ */ H(
|
|
3937
|
+
/* @__PURE__ */ H(me, { children: "Condition to execute the flow, supports Expression Language." })
|
|
3938
3938
|
] });
|
|
3939
3939
|
}
|
|
3940
3940
|
//#endregion
|
|
@@ -3946,7 +3946,7 @@ function _l({ control: e, errors: t, pathRegistration: n }) {
|
|
|
3946
3946
|
children: [/* @__PURE__ */ U(fe, {
|
|
3947
3947
|
className: "w-1/3",
|
|
3948
3948
|
children: [
|
|
3949
|
-
/* @__PURE__ */ H(
|
|
3949
|
+
/* @__PURE__ */ H(M, {
|
|
3950
3950
|
className: "text-sm",
|
|
3951
3951
|
children: "Operator"
|
|
3952
3952
|
}),
|
|
@@ -3971,13 +3971,13 @@ function _l({ control: e, errors: t, pathRegistration: n }) {
|
|
|
3971
3971
|
})] })]
|
|
3972
3972
|
})
|
|
3973
3973
|
}) }),
|
|
3974
|
-
/* @__PURE__ */ H(
|
|
3974
|
+
/* @__PURE__ */ H(me, { children: "Path operator." })
|
|
3975
3975
|
]
|
|
3976
3976
|
}), /* @__PURE__ */ U(fe, {
|
|
3977
3977
|
className: "flex-1",
|
|
3978
3978
|
"data-invalid": !!t.path,
|
|
3979
3979
|
children: [
|
|
3980
|
-
/* @__PURE__ */ H(
|
|
3980
|
+
/* @__PURE__ */ H(M, {
|
|
3981
3981
|
className: "text-sm",
|
|
3982
3982
|
children: "Path"
|
|
3983
3983
|
}),
|
|
@@ -3986,12 +3986,12 @@ function _l({ control: e, errors: t, pathRegistration: n }) {
|
|
|
3986
3986
|
placeholder: "/api/v1/users",
|
|
3987
3987
|
"aria-invalid": !!t.path,
|
|
3988
3988
|
"data-testid": r("flow-form", "path")
|
|
3989
|
-
}), t.path && /* @__PURE__ */ H(
|
|
3990
|
-
/* @__PURE__ */ H(
|
|
3989
|
+
}), t.path && /* @__PURE__ */ H(he, { children: t.path.message })] }),
|
|
3990
|
+
/* @__PURE__ */ H(me, { children: "The path of your request. Leading / is added on save." })
|
|
3991
3991
|
]
|
|
3992
3992
|
})]
|
|
3993
3993
|
}), /* @__PURE__ */ U(fe, { children: [
|
|
3994
|
-
/* @__PURE__ */ H(
|
|
3994
|
+
/* @__PURE__ */ H(M, {
|
|
3995
3995
|
className: "text-sm",
|
|
3996
3996
|
children: "HTTP methods"
|
|
3997
3997
|
}),
|
|
@@ -4024,7 +4024,7 @@ function _l({ control: e, errors: t, pathRegistration: n }) {
|
|
|
4024
4024
|
})]
|
|
4025
4025
|
})
|
|
4026
4026
|
}) }),
|
|
4027
|
-
/* @__PURE__ */ H(
|
|
4027
|
+
/* @__PURE__ */ H(me, { children: "Leave empty to match all methods." })
|
|
4028
4028
|
] })] });
|
|
4029
4029
|
}
|
|
4030
4030
|
//#endregion
|
|
@@ -4036,7 +4036,7 @@ var vl = Wn.map((e) => ({
|
|
|
4036
4036
|
function yl({ control: e, required: t = !1 }) {
|
|
4037
4037
|
let n = W(), r = ot();
|
|
4038
4038
|
return /* @__PURE__ */ U(fe, { children: [
|
|
4039
|
-
/* @__PURE__ */ H(
|
|
4039
|
+
/* @__PURE__ */ H(M, {
|
|
4040
4040
|
className: "text-sm",
|
|
4041
4041
|
children: "MCP methods"
|
|
4042
4042
|
}),
|
|
@@ -4076,7 +4076,7 @@ function yl({ control: e, required: t = !1 }) {
|
|
|
4076
4076
|
children: t.error.message
|
|
4077
4077
|
})] })
|
|
4078
4078
|
}) }),
|
|
4079
|
-
/* @__PURE__ */ H(
|
|
4079
|
+
/* @__PURE__ */ H(me, { children: t ? "Select one or more MCP methods for this flow." : "Leave empty to match all MCP methods." })
|
|
4080
4080
|
] });
|
|
4081
4081
|
}
|
|
4082
4082
|
//#endregion
|
|
@@ -4090,7 +4090,7 @@ function xl({ control: e, errors: t, channelRegistration: n, availableEntrypoint
|
|
|
4090
4090
|
children: [/* @__PURE__ */ U(fe, {
|
|
4091
4091
|
className: "w-1/3",
|
|
4092
4092
|
children: [
|
|
4093
|
-
/* @__PURE__ */ H(
|
|
4093
|
+
/* @__PURE__ */ H(M, {
|
|
4094
4094
|
className: "text-sm",
|
|
4095
4095
|
children: "Operator"
|
|
4096
4096
|
}),
|
|
@@ -4115,13 +4115,13 @@ function xl({ control: e, errors: t, channelRegistration: n, availableEntrypoint
|
|
|
4115
4115
|
})] })]
|
|
4116
4116
|
})
|
|
4117
4117
|
}) }),
|
|
4118
|
-
/* @__PURE__ */ H(
|
|
4118
|
+
/* @__PURE__ */ H(me, { children: "Channel operator." })
|
|
4119
4119
|
]
|
|
4120
4120
|
}), /* @__PURE__ */ U(fe, {
|
|
4121
4121
|
className: "flex-1",
|
|
4122
4122
|
"data-invalid": !!t.channel,
|
|
4123
4123
|
children: [
|
|
4124
|
-
/* @__PURE__ */ H(
|
|
4124
|
+
/* @__PURE__ */ H(M, {
|
|
4125
4125
|
className: "text-sm",
|
|
4126
4126
|
children: "Channel"
|
|
4127
4127
|
}),
|
|
@@ -4130,13 +4130,13 @@ function xl({ control: e, errors: t, channelRegistration: n, availableEntrypoint
|
|
|
4130
4130
|
placeholder: "/my/channel",
|
|
4131
4131
|
"aria-invalid": !!t.channel,
|
|
4132
4132
|
"data-testid": i("flow-form", "channel")
|
|
4133
|
-
}), t.channel && /* @__PURE__ */ H(
|
|
4134
|
-
/* @__PURE__ */ H(
|
|
4133
|
+
}), t.channel && /* @__PURE__ */ H(he, { children: t.channel.message })] }),
|
|
4134
|
+
/* @__PURE__ */ H(me, { children: "Publish or Subscribe channel." })
|
|
4135
4135
|
]
|
|
4136
4136
|
})]
|
|
4137
4137
|
}),
|
|
4138
4138
|
r.length > 0 && /* @__PURE__ */ U(fe, { children: [
|
|
4139
|
-
/* @__PURE__ */ H(
|
|
4139
|
+
/* @__PURE__ */ H(M, {
|
|
4140
4140
|
className: "text-sm",
|
|
4141
4141
|
children: "Entrypoints"
|
|
4142
4142
|
}),
|
|
@@ -4169,10 +4169,10 @@ function xl({ control: e, errors: t, channelRegistration: n, availableEntrypoint
|
|
|
4169
4169
|
})]
|
|
4170
4170
|
})
|
|
4171
4171
|
}) }),
|
|
4172
|
-
/* @__PURE__ */ H(
|
|
4172
|
+
/* @__PURE__ */ H(me, { children: "Entrypoints where your flow will be executed. They will all be executed if left empty." })
|
|
4173
4173
|
] }),
|
|
4174
4174
|
/* @__PURE__ */ U(fe, { children: [
|
|
4175
|
-
/* @__PURE__ */ H(
|
|
4175
|
+
/* @__PURE__ */ H(M, {
|
|
4176
4176
|
className: "text-sm",
|
|
4177
4177
|
children: "Operations"
|
|
4178
4178
|
}),
|
|
@@ -4205,7 +4205,7 @@ function xl({ control: e, errors: t, channelRegistration: n, availableEntrypoint
|
|
|
4205
4205
|
})]
|
|
4206
4206
|
})
|
|
4207
4207
|
}) }),
|
|
4208
|
-
/* @__PURE__ */ H(
|
|
4208
|
+
/* @__PURE__ */ H(me, { children: "They will all be supported if left empty." })
|
|
4209
4209
|
] })
|
|
4210
4210
|
] });
|
|
4211
4211
|
}
|
|
@@ -4222,7 +4222,7 @@ function Sl(e) {
|
|
|
4222
4222
|
function Cl({ apiType: e, registration: t }) {
|
|
4223
4223
|
let n = W(), r = Sl(e);
|
|
4224
4224
|
return /* @__PURE__ */ U(fe, { children: [
|
|
4225
|
-
/* @__PURE__ */ H(
|
|
4225
|
+
/* @__PURE__ */ H(M, {
|
|
4226
4226
|
className: "text-sm",
|
|
4227
4227
|
children: "Flow name"
|
|
4228
4228
|
}),
|
|
@@ -4232,7 +4232,7 @@ function Cl({ apiType: e, registration: t }) {
|
|
|
4232
4232
|
placeholder: "e.g. My flow",
|
|
4233
4233
|
autoFocus: !0
|
|
4234
4234
|
}) }),
|
|
4235
|
-
r && /* @__PURE__ */ H(
|
|
4235
|
+
r && /* @__PURE__ */ H(me, { children: r })
|
|
4236
4236
|
] });
|
|
4237
4237
|
}
|
|
4238
4238
|
//#endregion
|
|
@@ -4240,7 +4240,7 @@ function Cl({ apiType: e, registration: t }) {
|
|
|
4240
4240
|
function wl({ control: e, organizationTags: t }) {
|
|
4241
4241
|
let n = W(), r = ot(), i = z(() => new Map(t.map((e) => [e.id, e.name])), [t]), a = z(() => t.map((e) => e.id), [t]), u = (e) => i.get(e) ?? e;
|
|
4242
4242
|
return /* @__PURE__ */ U(fe, { children: [
|
|
4243
|
-
/* @__PURE__ */ H(
|
|
4243
|
+
/* @__PURE__ */ H(M, {
|
|
4244
4244
|
className: "text-sm",
|
|
4245
4245
|
children: "Tags"
|
|
4246
4246
|
}),
|
|
@@ -4274,7 +4274,7 @@ function wl({ control: e, organizationTags: t }) {
|
|
|
4274
4274
|
})]
|
|
4275
4275
|
})
|
|
4276
4276
|
}) }),
|
|
4277
|
-
/* @__PURE__ */ H(
|
|
4277
|
+
/* @__PURE__ */ H(me, { children: "Restrict this flow to gateways carrying these tags. Leave empty to apply it everywhere." })
|
|
4278
4278
|
] });
|
|
4279
4279
|
}
|
|
4280
4280
|
//#endregion
|
|
@@ -4876,7 +4876,7 @@ function id({ apiType: r, mode: a, defaultValues: o, onSubmit: s, onCancel: c, o
|
|
|
4876
4876
|
apiType: r,
|
|
4877
4877
|
registration: g("name")
|
|
4878
4878
|
}),
|
|
4879
|
-
f && f.length > 0 && /* @__PURE__ */ U(fe, { children: [/* @__PURE__ */ H(
|
|
4879
|
+
f && f.length > 0 && /* @__PURE__ */ U(fe, { children: [/* @__PURE__ */ H(M, {
|
|
4880
4880
|
className: "text-sm",
|
|
4881
4881
|
children: "Associated plan"
|
|
4882
4882
|
}), /* @__PURE__ */ H(pe, { children: /* @__PURE__ */ H(zr, {
|
|
@@ -6124,7 +6124,7 @@ function Wf({ flowExecution: e, readOnly: t, scope: n = "API", onChange: r }) {
|
|
|
6124
6124
|
"data-testid": a("execution", "content"),
|
|
6125
6125
|
children: [
|
|
6126
6126
|
/* @__PURE__ */ H(De, { children: /* @__PURE__ */ H(Oe, { children: "Flow execution" }) }),
|
|
6127
|
-
/* @__PURE__ */ U(fe, { children: [/* @__PURE__ */ H(
|
|
6127
|
+
/* @__PURE__ */ U(fe, { children: [/* @__PURE__ */ H(M, {
|
|
6128
6128
|
className: "text-xs",
|
|
6129
6129
|
children: "Mode"
|
|
6130
6130
|
}), /* @__PURE__ */ U(pe, { children: [/* @__PURE__ */ U(Ie, {
|
|
@@ -6147,10 +6147,10 @@ function Wf({ flowExecution: e, readOnly: t, scope: n = "API", onChange: r }) {
|
|
|
6147
6147
|
"data-testid": a("execution", "mode", "option", "BEST_MATCH"),
|
|
6148
6148
|
children: "Best match"
|
|
6149
6149
|
})] })]
|
|
6150
|
-
}), /* @__PURE__ */ H(
|
|
6150
|
+
}), /* @__PURE__ */ H(me, { children: Uf[n] })] })] }),
|
|
6151
6151
|
c && /* @__PURE__ */ U(fe, { children: [/* @__PURE__ */ U("div", {
|
|
6152
6152
|
className: "flex items-center justify-between",
|
|
6153
|
-
children: [/* @__PURE__ */ H(
|
|
6153
|
+
children: [/* @__PURE__ */ H(M, {
|
|
6154
6154
|
className: "text-xs",
|
|
6155
6155
|
children: "Match required"
|
|
6156
6156
|
}), /* @__PURE__ */ H(qe, {
|
|
@@ -6162,7 +6162,7 @@ function Wf({ flowExecution: e, readOnly: t, scope: n = "API", onChange: r }) {
|
|
|
6162
6162
|
disabled: t,
|
|
6163
6163
|
"data-testid": a("execution", "match-required")
|
|
6164
6164
|
})]
|
|
6165
|
-
}), /* @__PURE__ */ H(
|
|
6165
|
+
}), /* @__PURE__ */ H(me, { children: "Respond with an error when no flow matches." })] })
|
|
6166
6166
|
]
|
|
6167
6167
|
})] });
|
|
6168
6168
|
}
|
|
@@ -7003,13 +7003,13 @@ function $m() {
|
|
|
7003
7003
|
return ee ||= (k = Ym(u, i), !0), k;
|
|
7004
7004
|
}, ae = n, oe = ae.implementation, se = ae.createNodeIterator, ce = ae.createDocumentFragment, le = ae.getElementsByTagName, ue = r.importNode, j = Xm();
|
|
7005
7005
|
t.isSupported = typeof Mp == "function" && typeof _ == "function" && oe && oe.createHTMLDocument !== void 0;
|
|
7006
|
-
let de = Mm, fe = Nm, pe = Pm,
|
|
7006
|
+
let de = Mm, fe = Nm, pe = Pm, me = Fm, he = Im, M = Rm, ge = zm, _e = Vm, ve = Lm, N = null, ye = J({}, [
|
|
7007
7007
|
...xm,
|
|
7008
7008
|
...Sm,
|
|
7009
7009
|
...Cm,
|
|
7010
7010
|
...Tm,
|
|
7011
7011
|
...Dm
|
|
7012
|
-
]),
|
|
7012
|
+
]), be = null, P = J({}, [
|
|
7013
7013
|
...Om,
|
|
7014
7014
|
...km,
|
|
7015
7015
|
...Am,
|
|
@@ -7089,7 +7089,7 @@ function $m() {
|
|
|
7089
7089
|
}, ft = function() {
|
|
7090
7090
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
7091
7091
|
if (R && R === e) return;
|
|
7092
|
-
(!e || typeof e != "object") && (e = {}), e = gm(e), st = ct.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, lt = st === "application/xhtml+xml" ? em : $p, N = Zm(e, "ALLOWED_TAGS", ye, { transform: lt }),
|
|
7092
|
+
(!e || typeof e != "object") && (e = {}), e = gm(e), st = ct.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, lt = st === "application/xhtml+xml" ? em : $p, N = Zm(e, "ALLOWED_TAGS", ye, { transform: lt }), be = Zm(e, "ALLOWED_ATTR", P, { transform: lt }), nt = Zm(e, "ALLOWED_NAMESPACES", I, { transform: em }), Ye = Zm(e, "ADD_URI_SAFE_ATTR", Xe, {
|
|
7093
7093
|
transform: lt,
|
|
7094
7094
|
base: Xe
|
|
7095
7095
|
}), qe = Zm(e, "ADD_DATA_URI_TAGS", Je, {
|
|
@@ -7097,7 +7097,7 @@ function $m() {
|
|
|
7097
7097
|
base: Je
|
|
7098
7098
|
}), Ke = Zm(e, "FORBID_CONTENTS", F, { transform: lt }), Se = Zm(e, "FORBID_TAGS", gm({}), { transform: lt }), Ce = Zm(e, "FORBID_ATTR", gm({}), { transform: lt }), Ge = lm(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? gm(e.USE_PROFILES) : e.USE_PROFILES : !1, Te = e.ALLOW_ARIA_ATTR !== !1, Ee = e.ALLOW_DATA_ATTR !== !1, De = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Oe = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ke = e.SAFE_FOR_TEMPLATES || !1, Ae = e.SAFE_FOR_XML !== !1, je = e.WHOLE_DOCUMENT || !1, Ie = e.RETURN_DOM || !1, Le = e.RETURN_DOM_FRAGMENT || !1, Re = e.RETURN_TRUSTED_TYPE || !1, Fe = e.FORCE_BODY || !1, ze = e.SANITIZE_DOM !== !1, Be = e.SANITIZE_NAMED_PROPS || !1, He = e.KEEP_CONTENT !== !1, Ue = e.IN_PLACE || !1, ve = bm(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Lm, et = typeof e.NAMESPACE == "string" ? e.NAMESPACE : $e, it = Qm(e, "MATHML_TEXT_INTEGRATION_POINTS", () => J({}, rt)), ot = Qm(e, "HTML_INTEGRATION_POINTS", () => J({}, at));
|
|
7099
7099
|
let t = Qm(e, "CUSTOM_ELEMENT_HANDLING", () => zp(null));
|
|
7100
|
-
if (xe = zp(null), lm(t, "tagNameCheck") && dt(t.tagNameCheck) && (xe.tagNameCheck = t.tagNameCheck), lm(t, "attributeNameCheck") && dt(t.attributeNameCheck) && (xe.attributeNameCheck = t.attributeNameCheck), lm(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (xe.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), Rp(xe), ke && (Ee = !1), Le && (Ie = !0), Ge && (N = J({}, Dm),
|
|
7100
|
+
if (xe = zp(null), lm(t, "tagNameCheck") && dt(t.tagNameCheck) && (xe.tagNameCheck = t.tagNameCheck), lm(t, "attributeNameCheck") && dt(t.attributeNameCheck) && (xe.attributeNameCheck = t.attributeNameCheck), lm(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (xe.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), Rp(xe), ke && (Ee = !1), Le && (Ie = !0), Ge && (N = J({}, Dm), be = zp(null), Ge.html === !0 && (J(N, xm), J(be, Om)), Ge.svg === !0 && (J(N, Sm), J(be, km), J(be, jm)), Ge.svgFilters === !0 && (J(N, Cm), J(be, km), J(be, jm)), Ge.mathMl === !0 && (J(N, Tm), J(be, Am), J(be, jm))), we.tagCheck = null, we.attributeCheck = null, lm(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? we.tagCheck = e.ADD_TAGS : Yp(e.ADD_TAGS) && (N === ye && (N = gm(N)), J(N, e.ADD_TAGS, lt))), lm(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? we.attributeCheck = e.ADD_ATTR : Yp(e.ADD_ATTR) && (be === P && (be = gm(be)), J(be, e.ADD_ATTR, lt))), lm(e, "ADD_FORBID_CONTENTS") && Yp(e.ADD_FORBID_CONTENTS) && (Ke === F && (Ke = gm(Ke)), J(Ke, e.ADD_FORBID_CONTENTS, lt)), He && (N["#text"] = !0), je && J(N, [
|
|
7101
7101
|
"html",
|
|
7102
7102
|
"head",
|
|
7103
7103
|
"body"
|
|
@@ -7181,7 +7181,7 @@ function $m() {
|
|
|
7181
7181
|
let t = y(e);
|
|
7182
7182
|
if (t) for (let n = t.length - 1; n >= 0; --n) {
|
|
7183
7183
|
let r = t[n], i = r && r.name;
|
|
7184
|
-
typeof i != "string" ||
|
|
7184
|
+
typeof i != "string" || be[lt(i)] || ht(e, r, i);
|
|
7185
7185
|
}
|
|
7186
7186
|
}, yt = function(e, t) {
|
|
7187
7187
|
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, r = [e];
|
|
@@ -7354,8 +7354,8 @@ function $m() {
|
|
|
7354
7354
|
return Lt(j.afterSanitizeElements, e, null), Ht(e, n);
|
|
7355
7355
|
}, Wt = function(e, t, r) {
|
|
7356
7356
|
if (Ce[t] || Dt(t, e) || ze && (t === "id" || t === "name") && (r in n || r in ut)) return !1;
|
|
7357
|
-
let i =
|
|
7358
|
-
return Ee && dm(
|
|
7357
|
+
let i = be[t] || we.attributeCheck instanceof Function && we.attributeCheck(t, e);
|
|
7358
|
+
return Ee && dm(me, t) || Te && dm(he, t) ? !0 : i ? Ye[t] || dm(ve, nm(r, ge, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && rm(r, "data:") === 0 && qe[e] || De && !dm(M, nm(r, ge, "")) ? !0 : !r : Kt(e) && zt(xe.tagNameCheck, e) && zt(xe.attributeNameCheck, t, e) || t === "is" && xe.allowCustomizedBuiltInElements && zt(xe.tagNameCheck, r);
|
|
7359
7359
|
}, Gt = J({}, [
|
|
7360
7360
|
"annotation-xml",
|
|
7361
7361
|
"color-profile",
|
|
@@ -7385,12 +7385,12 @@ function $m() {
|
|
|
7385
7385
|
if (Lt(j.beforeSanitizeAttributes, e, null), Ht(e, n)) return;
|
|
7386
7386
|
let r = e.attributes;
|
|
7387
7387
|
if (!r || Pt(e)) return;
|
|
7388
|
-
|
|
7388
|
+
be = Vt(j.uponSanitizeAttribute, be, P, Pe);
|
|
7389
7389
|
let i = {
|
|
7390
7390
|
attrName: "",
|
|
7391
7391
|
attrValue: "",
|
|
7392
7392
|
keepAttr: !0,
|
|
7393
|
-
allowedAttributes:
|
|
7393
|
+
allowedAttributes: be,
|
|
7394
7394
|
forceKeepAttr: void 0
|
|
7395
7395
|
}, a = r.length, o = lt(e.nodeName);
|
|
7396
7396
|
for (; a--;) {
|
|
@@ -7465,7 +7465,7 @@ function $m() {
|
|
|
7465
7465
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
|
|
7466
7466
|
if (tt = !e, tt && (e = "<!-->"), typeof e != "string" && !It(e) && (e = _m(e), typeof e != "string")) throw fm("dirty is not a string, aborting");
|
|
7467
7467
|
if (!t.isSupported) return e;
|
|
7468
|
-
Me ? (N = Ne,
|
|
7468
|
+
Me ? (N = Ne, be = Pe) : ft(n), (j.uponSanitizeElement.length > 0 || j.uponSanitizeAttribute.length > 0) && (N = gm(N)), j.uponSanitizeAttribute.length > 0 && (be = gm(be)), t.removed = [];
|
|
7469
7469
|
let c = Ue && typeof e != "string" && It(e), l = [], u = We;
|
|
7470
7470
|
if (c) {
|
|
7471
7471
|
Ot(e);
|
|
@@ -7500,12 +7500,12 @@ function $m() {
|
|
|
7500
7500
|
if (Ie) {
|
|
7501
7501
|
if (ke && Mt(i), Le) for (s = ce.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
|
|
7502
7502
|
else s = i;
|
|
7503
|
-
return (
|
|
7503
|
+
return (be.shadowroot || be.shadowrootmode) && (s = ue.call(r, s, !0)), s;
|
|
7504
7504
|
}
|
|
7505
7505
|
let f = je ? i.outerHTML : i.innerHTML;
|
|
7506
7506
|
return je && N["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && dm(Bm, i.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + f), ke && (f = jt(f)), D && Re ? A(f) : f;
|
|
7507
7507
|
}, t.setConfig = function() {
|
|
7508
|
-
ft(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Me = !0, Ne = N, Pe =
|
|
7508
|
+
ft(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Me = !0, Ne = N, Pe = be;
|
|
7509
7509
|
}, t.clearConfig = function() {
|
|
7510
7510
|
R = null, Me = !1, Ne = null, Pe = null, D = k, O = "";
|
|
7511
7511
|
}, t.isValidAttribute = function(e, t, n) {
|
|
@@ -11140,18 +11140,18 @@ function wy(e) {
|
|
|
11140
11140
|
"strong"
|
|
11141
11141
|
],
|
|
11142
11142
|
enter: {
|
|
11143
|
-
autolink: a(
|
|
11143
|
+
autolink: a(P),
|
|
11144
11144
|
autolinkProtocol: T,
|
|
11145
11145
|
autolinkEmail: T,
|
|
11146
11146
|
atxHeading: a(ve),
|
|
11147
|
-
blockQuote: a(
|
|
11147
|
+
blockQuote: a(me),
|
|
11148
11148
|
characterEscape: T,
|
|
11149
11149
|
characterReference: T,
|
|
11150
|
-
codeFenced: a(
|
|
11150
|
+
codeFenced: a(he),
|
|
11151
11151
|
codeFencedFenceInfo: o,
|
|
11152
11152
|
codeFencedFenceMeta: o,
|
|
11153
|
-
codeIndented: a(
|
|
11154
|
-
codeText: a(
|
|
11153
|
+
codeIndented: a(he, o),
|
|
11154
|
+
codeText: a(M, o),
|
|
11155
11155
|
codeTextData: T,
|
|
11156
11156
|
data: T,
|
|
11157
11157
|
codeFlowValue: T,
|
|
@@ -11166,9 +11166,9 @@ function wy(e) {
|
|
|
11166
11166
|
htmlFlowData: T,
|
|
11167
11167
|
htmlText: a(ye, o),
|
|
11168
11168
|
htmlTextData: T,
|
|
11169
|
-
image: a(
|
|
11169
|
+
image: a(be),
|
|
11170
11170
|
label: o,
|
|
11171
|
-
link: a(
|
|
11171
|
+
link: a(P),
|
|
11172
11172
|
listItem: a(Se),
|
|
11173
11173
|
listItemValue: f,
|
|
11174
11174
|
listOrdered: a(xe, d),
|
|
@@ -11517,13 +11517,13 @@ function wy(e) {
|
|
|
11517
11517
|
let t = this.stack[this.stack.length - 1];
|
|
11518
11518
|
t.url = "mailto:" + this.sliceSerialize(e);
|
|
11519
11519
|
}
|
|
11520
|
-
function
|
|
11520
|
+
function me() {
|
|
11521
11521
|
return {
|
|
11522
11522
|
type: "blockquote",
|
|
11523
11523
|
children: []
|
|
11524
11524
|
};
|
|
11525
11525
|
}
|
|
11526
|
-
function
|
|
11526
|
+
function he() {
|
|
11527
11527
|
return {
|
|
11528
11528
|
type: "code",
|
|
11529
11529
|
lang: null,
|
|
@@ -11531,7 +11531,7 @@ function wy(e) {
|
|
|
11531
11531
|
value: ""
|
|
11532
11532
|
};
|
|
11533
11533
|
}
|
|
11534
|
-
function
|
|
11534
|
+
function M() {
|
|
11535
11535
|
return {
|
|
11536
11536
|
type: "inlineCode",
|
|
11537
11537
|
value: ""
|
|
@@ -11568,7 +11568,7 @@ function wy(e) {
|
|
|
11568
11568
|
value: ""
|
|
11569
11569
|
};
|
|
11570
11570
|
}
|
|
11571
|
-
function
|
|
11571
|
+
function be() {
|
|
11572
11572
|
return {
|
|
11573
11573
|
type: "image",
|
|
11574
11574
|
title: null,
|
|
@@ -11576,7 +11576,7 @@ function wy(e) {
|
|
|
11576
11576
|
alt: null
|
|
11577
11577
|
};
|
|
11578
11578
|
}
|
|
11579
|
-
function
|
|
11579
|
+
function P() {
|
|
11580
11580
|
return {
|
|
11581
11581
|
type: "link",
|
|
11582
11582
|
title: null,
|
|
@@ -15783,12 +15783,16 @@ function NT({ policy: e, showHeader: t = !0 }) {
|
|
|
15783
15783
|
//#region src/components/PolicyCatalog/PolicyCatalogCategoryFilter.tsx
|
|
15784
15784
|
var PT = 15;
|
|
15785
15785
|
function FT(e) {
|
|
15786
|
+
return e === "Shared Policy Group" ? "shared-policy-group" : e;
|
|
15787
|
+
}
|
|
15788
|
+
function IT(e) {
|
|
15786
15789
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
15787
15790
|
}
|
|
15788
|
-
function
|
|
15789
|
-
return e.length === 0 ? "Category" : e.length === 1 && e[0].length <= PT ?
|
|
15791
|
+
function LT(e, t) {
|
|
15792
|
+
return e.length === 0 ? "Category" : e.length === 1 && e[0].length <= PT ? IT(e[0]) : e.length === 1 ? "1 category" : e.length === t.length ? "All categories" : `${e.length} categories`;
|
|
15790
15793
|
}
|
|
15791
|
-
function
|
|
15794
|
+
function RT({ categories: e, selectedCategories: t, categoryCounts: n, open: r, onOpenChange: i, onToggle: a, onClear: o, "data-testid": s }) {
|
|
15795
|
+
let c = (e) => s ? `${s}-${e}` : void 0;
|
|
15792
15796
|
return /* @__PURE__ */ U(Te, {
|
|
15793
15797
|
open: r,
|
|
15794
15798
|
onOpenChange: i,
|
|
@@ -15797,12 +15801,13 @@ function LT({ categories: e, selectedCategories: t, categoryCounts: n, open: r,
|
|
|
15797
15801
|
children: /* @__PURE__ */ U("button", {
|
|
15798
15802
|
type: "button",
|
|
15799
15803
|
"aria-label": "Filter by category",
|
|
15804
|
+
"data-testid": s,
|
|
15800
15805
|
className: I("inline-flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors", "hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none", t.length > 0 ? "border-primary/30 bg-primary/5 text-foreground" : "border-input bg-muted/40 text-foreground/80"),
|
|
15801
15806
|
children: [
|
|
15802
15807
|
/* @__PURE__ */ H(Dt, { className: "size-3 shrink-0" }),
|
|
15803
15808
|
/* @__PURE__ */ H("span", {
|
|
15804
15809
|
className: "truncate",
|
|
15805
|
-
children:
|
|
15810
|
+
children: LT(t, e)
|
|
15806
15811
|
}),
|
|
15807
15812
|
/* @__PURE__ */ H(bt, { className: "size-3 shrink-0 opacity-70" })
|
|
15808
15813
|
]
|
|
@@ -15814,6 +15819,7 @@ function LT({ categories: e, selectedCategories: t, categoryCounts: n, open: r,
|
|
|
15814
15819
|
children: /* @__PURE__ */ U(v, { children: [/* @__PURE__ */ U(C, { children: [/* @__PURE__ */ H(y, { children: "No categories." }), e.map((e) => /* @__PURE__ */ U(S, {
|
|
15815
15820
|
"data-checked": t.includes(e) || void 0,
|
|
15816
15821
|
onSelect: () => a(e),
|
|
15822
|
+
"data-testid": c(`option-${FT(e)}`),
|
|
15817
15823
|
children: [/* @__PURE__ */ H("span", {
|
|
15818
15824
|
className: "flex-1 truncate capitalize",
|
|
15819
15825
|
children: e
|
|
@@ -15826,6 +15832,7 @@ function LT({ categories: e, selectedCategories: t, categoryCounts: n, open: r,
|
|
|
15826
15832
|
children: /* @__PURE__ */ H("button", {
|
|
15827
15833
|
type: "button",
|
|
15828
15834
|
onClick: o,
|
|
15835
|
+
"data-testid": c("clear"),
|
|
15829
15836
|
className: "flex w-full items-center justify-center rounded-sm px-2 py-1.5 text-xs text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
15830
15837
|
children: "Clear filters"
|
|
15831
15838
|
})
|
|
@@ -15835,47 +15842,49 @@ function LT({ categories: e, selectedCategories: t, categoryCounts: n, open: r,
|
|
|
15835
15842
|
}
|
|
15836
15843
|
//#endregion
|
|
15837
15844
|
//#region src/components/PolicyCatalog/PolicyCatalogPane.tsx
|
|
15838
|
-
var
|
|
15839
|
-
function
|
|
15840
|
-
let [p, m] = V(""), [h, g] = V(c ?? []), [_, v] = V(null), [y, b] = V(!1), x = B(null), S = z(() => up(e, t, n, a, o), [
|
|
15845
|
+
var zT = 280, BT = 400;
|
|
15846
|
+
function VT({ policies: e, sharedPolicyGroups: t = [], apiType: n, flowPhase: a, scope: o = "API", docsLayout: s = "detail", initialCategories: c, showHeader: l = !0, onAddPolicy: u, onClose: d, className: f }) {
|
|
15847
|
+
let [p, m] = V(""), [h, g] = V(c ?? []), [_, v] = V(null), [y, b] = V(!1), x = B(null), S = W(), C = z(() => up(e, t, n, a, o), [
|
|
15841
15848
|
e,
|
|
15842
15849
|
t,
|
|
15843
15850
|
n,
|
|
15844
15851
|
a,
|
|
15845
15852
|
o
|
|
15846
|
-
]),
|
|
15847
|
-
|
|
15853
|
+
]), w = z(() => gp(C), [C]), T = z(() => vp(C), [C]), E = z(() => _p(fp(C, p), h), [
|
|
15854
|
+
C,
|
|
15848
15855
|
p,
|
|
15849
15856
|
h
|
|
15850
|
-
]),
|
|
15857
|
+
]), D = z(() => hp(E), [E]), O = z(() => _ ? E.find((e) => e.id === _) ?? null : null, [E, _]);
|
|
15851
15858
|
ft(() => {
|
|
15852
15859
|
x.current && x.current.focus({ preventScroll: !0 });
|
|
15853
15860
|
}, []);
|
|
15854
|
-
let
|
|
15861
|
+
let k = R((e) => {
|
|
15855
15862
|
g((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]), v(null);
|
|
15856
|
-
}, []), k = R(() => {
|
|
15857
|
-
g([]), v(null);
|
|
15858
15863
|
}, []), ee = R(() => {
|
|
15864
|
+
g([]), v(null);
|
|
15865
|
+
}, []), te = R(() => {
|
|
15859
15866
|
v(null);
|
|
15860
|
-
}, []),
|
|
15867
|
+
}, []), ne = ip(a), A = /* @__PURE__ */ H(Pe, {
|
|
15861
15868
|
className: "min-h-0 flex-1",
|
|
15862
15869
|
children: /* @__PURE__ */ H("div", {
|
|
15863
15870
|
className: "px-2 py-2",
|
|
15864
|
-
children:
|
|
15871
|
+
children: D.size === 0 ? /* @__PURE__ */ H("p", {
|
|
15865
15872
|
className: "py-8 text-center text-sm text-muted-foreground",
|
|
15873
|
+
"data-testid": S("catalog", "empty"),
|
|
15866
15874
|
children: "No policies match your search."
|
|
15867
15875
|
}) : /* @__PURE__ */ H("div", {
|
|
15868
15876
|
className: "space-y-3",
|
|
15869
|
-
children: [...
|
|
15877
|
+
children: [...D.entries()].map(([e, t]) => /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
15870
15878
|
className: "mb-1 px-2 text-xs font-medium text-muted-foreground capitalize",
|
|
15871
15879
|
children: e
|
|
15872
15880
|
}), /* @__PURE__ */ H("div", {
|
|
15873
15881
|
className: "flex flex-col",
|
|
15874
15882
|
children: t.map((e) => /* @__PURE__ */ U("div", {
|
|
15875
|
-
className: I("group relative flex h-8 items-center rounded-md transition-colors", "hover:bg-accent hover:text-accent-foreground",
|
|
15883
|
+
className: I("group relative flex h-8 items-center rounded-md transition-colors", "hover:bg-accent hover:text-accent-foreground", O?.id === e.id && "bg-accent text-accent-foreground"),
|
|
15876
15884
|
children: [/* @__PURE__ */ U("button", {
|
|
15877
15885
|
type: "button",
|
|
15878
15886
|
onClick: () => v(e.id),
|
|
15887
|
+
"data-testid": S("catalog", "policy", e.id),
|
|
15879
15888
|
className: I("flex h-full min-w-0 flex-1 items-center gap-2.5 rounded-md px-2 text-left text-sm", "focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:outline-none"),
|
|
15880
15889
|
children: [/* @__PURE__ */ H(xp, {
|
|
15881
15890
|
category: e.category,
|
|
@@ -15889,14 +15898,15 @@ function BT({ policies: e, sharedPolicyGroups: t = [], apiType: n, flowPhase: a,
|
|
|
15889
15898
|
size: "xs",
|
|
15890
15899
|
onClick: () => u(e),
|
|
15891
15900
|
"aria-label": `Add ${e.name}`,
|
|
15892
|
-
|
|
15901
|
+
"data-testid": S("catalog", "policy", e.id, "add"),
|
|
15902
|
+
className: I("mr-1 opacity-0 transition-opacity", "group-hover:opacity-100 focus-visible:opacity-100", O?.id === e.id && "opacity-100"),
|
|
15893
15903
|
children: "Add"
|
|
15894
15904
|
})]
|
|
15895
15905
|
}, e.id))
|
|
15896
15906
|
})] }, e))
|
|
15897
15907
|
})
|
|
15898
15908
|
})
|
|
15899
|
-
}),
|
|
15909
|
+
}), re = /* @__PURE__ */ U("div", {
|
|
15900
15910
|
className: "shrink-0 border-b px-3 py-2.5",
|
|
15901
15911
|
children: [/* @__PURE__ */ U("div", {
|
|
15902
15912
|
className: "flex items-center gap-1.5",
|
|
@@ -15909,27 +15919,29 @@ function BT({ policies: e, sharedPolicyGroups: t = [], apiType: n, flowPhase: a,
|
|
|
15909
15919
|
onChange: (e) => {
|
|
15910
15920
|
m(e.target.value), v(null);
|
|
15911
15921
|
},
|
|
15912
|
-
className: "h-8 pl-9"
|
|
15922
|
+
className: "h-8 pl-9",
|
|
15923
|
+
"data-testid": S("catalog", "search")
|
|
15913
15924
|
})]
|
|
15914
|
-
}),
|
|
15915
|
-
categories:
|
|
15925
|
+
}), w.length > 1 && /* @__PURE__ */ H(RT, {
|
|
15926
|
+
categories: w,
|
|
15916
15927
|
selectedCategories: h,
|
|
15917
|
-
categoryCounts:
|
|
15928
|
+
categoryCounts: T,
|
|
15918
15929
|
open: y,
|
|
15919
15930
|
onOpenChange: b,
|
|
15920
|
-
onToggle:
|
|
15921
|
-
onClear:
|
|
15931
|
+
onToggle: k,
|
|
15932
|
+
onClear: ee,
|
|
15933
|
+
"data-testid": S("catalog", "category")
|
|
15922
15934
|
})]
|
|
15923
15935
|
}), (p || h.length > 0) && /* @__PURE__ */ U("p", {
|
|
15924
15936
|
className: "mt-1.5 pl-1 text-xs text-muted-foreground",
|
|
15925
15937
|
children: [
|
|
15926
|
-
|
|
15938
|
+
E.length,
|
|
15927
15939
|
" of ",
|
|
15928
|
-
|
|
15940
|
+
C.length,
|
|
15929
15941
|
" policies"
|
|
15930
15942
|
]
|
|
15931
15943
|
})]
|
|
15932
|
-
}),
|
|
15944
|
+
}), ie = /* @__PURE__ */ U("div", {
|
|
15933
15945
|
className: "flex shrink-0 items-center justify-between border-b px-4 py-3",
|
|
15934
15946
|
children: [/* @__PURE__ */ U("div", {
|
|
15935
15947
|
className: "flex items-center gap-2",
|
|
@@ -15938,53 +15950,57 @@ function BT({ policies: e, sharedPolicyGroups: t = [], apiType: n, flowPhase: a,
|
|
|
15938
15950
|
children: "Add Policy"
|
|
15939
15951
|
}), /* @__PURE__ */ H(r, {
|
|
15940
15952
|
variant: "outline",
|
|
15941
|
-
children:
|
|
15953
|
+
children: ne
|
|
15942
15954
|
})]
|
|
15943
15955
|
}), /* @__PURE__ */ H(i, {
|
|
15944
15956
|
variant: "ghost",
|
|
15945
15957
|
size: "icon-sm",
|
|
15946
15958
|
onClick: d,
|
|
15947
15959
|
"aria-label": "Close catalog",
|
|
15960
|
+
"data-testid": S("catalog", "close"),
|
|
15948
15961
|
children: /* @__PURE__ */ H(qt, { className: "size-4" })
|
|
15949
15962
|
})]
|
|
15950
|
-
}),
|
|
15963
|
+
}), ae = /* @__PURE__ */ U("div", {
|
|
15951
15964
|
className: "flex h-full min-h-0 flex-col",
|
|
15952
|
-
children: [
|
|
15965
|
+
children: [re, A]
|
|
15953
15966
|
});
|
|
15954
|
-
if (s === "side-by-side" &&
|
|
15967
|
+
if (s === "side-by-side" && O) return /* @__PURE__ */ U("div", {
|
|
15955
15968
|
className: I("flex h-full flex-col bg-background", f),
|
|
15956
|
-
|
|
15969
|
+
"data-testid": S("catalog"),
|
|
15970
|
+
children: [l && ie, /* @__PURE__ */ U(Ne, {
|
|
15957
15971
|
orientation: "horizontal",
|
|
15958
15972
|
className: "min-h-0 flex-1",
|
|
15959
15973
|
children: [
|
|
15960
15974
|
/* @__PURE__ */ H(Me, {
|
|
15961
15975
|
defaultSize: "40%",
|
|
15962
|
-
minSize:
|
|
15963
|
-
children:
|
|
15976
|
+
minSize: zT,
|
|
15977
|
+
children: ae
|
|
15964
15978
|
}),
|
|
15965
15979
|
/* @__PURE__ */ H(je, { withHandle: !0 }),
|
|
15966
15980
|
/* @__PURE__ */ H(Me, {
|
|
15967
15981
|
defaultSize: "60%",
|
|
15968
|
-
minSize:
|
|
15982
|
+
minSize: BT,
|
|
15969
15983
|
children: /* @__PURE__ */ U("div", {
|
|
15970
15984
|
className: "flex h-full min-h-0 flex-col",
|
|
15971
15985
|
children: [/* @__PURE__ */ U(ye, {
|
|
15972
15986
|
size: "sm",
|
|
15973
15987
|
className: "shrink-0 border-b",
|
|
15988
|
+
"data-testid": S("catalog", "details"),
|
|
15974
15989
|
children: [
|
|
15975
15990
|
/* @__PURE__ */ H(Se, { children: /* @__PURE__ */ H(xp, {
|
|
15976
|
-
category:
|
|
15991
|
+
category: O.category,
|
|
15977
15992
|
size: "sm"
|
|
15978
15993
|
}) }),
|
|
15979
|
-
/* @__PURE__ */ U(
|
|
15980
|
-
/* @__PURE__ */ H(
|
|
15994
|
+
/* @__PURE__ */ U(P, { children: [/* @__PURE__ */ H(Ce, { children: O.name }), /* @__PURE__ */ H(xe, { children: O.description || "\xA0" })] }),
|
|
15995
|
+
/* @__PURE__ */ H(be, { children: /* @__PURE__ */ H(i, {
|
|
15981
15996
|
size: "sm",
|
|
15982
|
-
onClick: () => u(
|
|
15997
|
+
onClick: () => u(O),
|
|
15998
|
+
"data-testid": S("catalog", "details", "add"),
|
|
15983
15999
|
children: "Add to flow"
|
|
15984
16000
|
}) })
|
|
15985
16001
|
]
|
|
15986
16002
|
}), /* @__PURE__ */ H(NT, {
|
|
15987
|
-
policy:
|
|
16003
|
+
policy: O,
|
|
15988
16004
|
showHeader: !1
|
|
15989
16005
|
})]
|
|
15990
16006
|
})
|
|
@@ -15992,50 +16008,54 @@ function BT({ policies: e, sharedPolicyGroups: t = [], apiType: n, flowPhase: a,
|
|
|
15992
16008
|
]
|
|
15993
16009
|
})]
|
|
15994
16010
|
});
|
|
15995
|
-
let
|
|
16011
|
+
let oe = s === "detail" && O;
|
|
15996
16012
|
return /* @__PURE__ */ U("div", {
|
|
15997
16013
|
className: I("flex h-full flex-col bg-background", f),
|
|
16014
|
+
"data-testid": S("catalog"),
|
|
15998
16015
|
children: [
|
|
15999
|
-
|
|
16016
|
+
oe ? /* @__PURE__ */ H("div", {
|
|
16000
16017
|
className: "shrink-0 border-b",
|
|
16018
|
+
"data-testid": S("catalog", "details"),
|
|
16001
16019
|
children: /* @__PURE__ */ U("div", {
|
|
16002
16020
|
className: "flex items-center gap-3 px-4 py-3",
|
|
16003
16021
|
children: [
|
|
16004
16022
|
/* @__PURE__ */ H(i, {
|
|
16005
16023
|
variant: "ghost",
|
|
16006
16024
|
size: "icon-sm",
|
|
16007
|
-
onClick:
|
|
16025
|
+
onClick: te,
|
|
16008
16026
|
"aria-label": "Back to policy list",
|
|
16027
|
+
"data-testid": S("catalog", "details", "back"),
|
|
16009
16028
|
children: /* @__PURE__ */ H(gt, { className: "size-4" })
|
|
16010
16029
|
}),
|
|
16011
16030
|
/* @__PURE__ */ H(xp, {
|
|
16012
|
-
category:
|
|
16031
|
+
category: O.category,
|
|
16013
16032
|
size: "md"
|
|
16014
16033
|
}),
|
|
16015
16034
|
/* @__PURE__ */ U("div", {
|
|
16016
16035
|
className: "min-w-0 flex-1",
|
|
16017
16036
|
children: [/* @__PURE__ */ H("p", {
|
|
16018
16037
|
className: "truncate text-sm leading-tight font-semibold",
|
|
16019
|
-
children:
|
|
16038
|
+
children: O.name
|
|
16020
16039
|
}), /* @__PURE__ */ H("p", {
|
|
16021
16040
|
className: "truncate text-xs leading-tight text-muted-foreground",
|
|
16022
|
-
children:
|
|
16041
|
+
children: O.description || "\xA0"
|
|
16023
16042
|
})]
|
|
16024
16043
|
}),
|
|
16025
16044
|
/* @__PURE__ */ H(i, {
|
|
16026
16045
|
size: "sm",
|
|
16027
|
-
onClick: () => u(
|
|
16046
|
+
onClick: () => u(O),
|
|
16047
|
+
"data-testid": S("catalog", "details", "add"),
|
|
16028
16048
|
children: "Add to flow"
|
|
16029
16049
|
})
|
|
16030
16050
|
]
|
|
16031
16051
|
})
|
|
16032
|
-
}) : l &&
|
|
16052
|
+
}) : l && ie,
|
|
16033
16053
|
/* @__PURE__ */ H("div", {
|
|
16034
|
-
className: I("min-h-0 flex-1",
|
|
16035
|
-
children:
|
|
16054
|
+
className: I("min-h-0 flex-1", oe && "hidden"),
|
|
16055
|
+
children: ae
|
|
16036
16056
|
}),
|
|
16037
|
-
|
|
16038
|
-
policy:
|
|
16057
|
+
oe && /* @__PURE__ */ H(NT, {
|
|
16058
|
+
policy: O,
|
|
16039
16059
|
showHeader: !1
|
|
16040
16060
|
})
|
|
16041
16061
|
]
|
|
@@ -16043,12 +16063,12 @@ function BT({ policies: e, sharedPolicyGroups: t = [], apiType: n, flowPhase: a,
|
|
|
16043
16063
|
}
|
|
16044
16064
|
//#endregion
|
|
16045
16065
|
//#region src/components/PolicyCatalog/PolicyQuickInsert.tsx
|
|
16046
|
-
function
|
|
16047
|
-
let s = z(() => hp(e), [e]);
|
|
16048
|
-
function
|
|
16066
|
+
function HT({ policies: e, open: t, onOpenChange: n, onAddPolicy: r, onBrowseCatalog: a, children: o, "data-testid": s }) {
|
|
16067
|
+
let c = (e) => s ? `${s}-${e}` : void 0, l = z(() => hp(e), [e]);
|
|
16068
|
+
function u(e) {
|
|
16049
16069
|
r(e), n(!1);
|
|
16050
16070
|
}
|
|
16051
|
-
function
|
|
16071
|
+
function d() {
|
|
16052
16072
|
n(!1), a();
|
|
16053
16073
|
}
|
|
16054
16074
|
return /* @__PURE__ */ U(Te, {
|
|
@@ -16060,15 +16080,20 @@ function VT({ policies: e, open: t, onOpenChange: n, onAddPolicy: r, onBrowseCat
|
|
|
16060
16080
|
}), /* @__PURE__ */ H(Ee, {
|
|
16061
16081
|
className: "w-80 p-0",
|
|
16062
16082
|
align: "start",
|
|
16083
|
+
"data-testid": s,
|
|
16063
16084
|
children: /* @__PURE__ */ U(v, {
|
|
16064
16085
|
filter: dp,
|
|
16065
16086
|
children: [
|
|
16066
|
-
/* @__PURE__ */ H(x, {
|
|
16067
|
-
|
|
16087
|
+
/* @__PURE__ */ H(x, {
|
|
16088
|
+
placeholder: `Search ${e.length} policies...`,
|
|
16089
|
+
"data-testid": c("search")
|
|
16090
|
+
}),
|
|
16091
|
+
/* @__PURE__ */ U(C, { children: [/* @__PURE__ */ H(y, { children: "No policies match your search." }), [...l.entries()].map(([e, t]) => /* @__PURE__ */ H(b, {
|
|
16068
16092
|
heading: Hn(e),
|
|
16069
16093
|
children: t.map((t) => /* @__PURE__ */ H(S, {
|
|
16070
16094
|
value: `${t.name} ${e} ${t.description ?? ""}`,
|
|
16071
|
-
onSelect: () =>
|
|
16095
|
+
onSelect: () => u(t),
|
|
16096
|
+
"data-testid": c(`option-${t.id}`),
|
|
16072
16097
|
className: "flex items-start gap-2.5 py-2",
|
|
16073
16098
|
children: /* @__PURE__ */ U("div", {
|
|
16074
16099
|
className: "min-w-0 flex-1",
|
|
@@ -16086,9 +16111,10 @@ function VT({ policies: e, open: t, onOpenChange: n, onAddPolicy: r, onBrowseCat
|
|
|
16086
16111
|
/* @__PURE__ */ U(i, {
|
|
16087
16112
|
variant: "ghost",
|
|
16088
16113
|
size: "sm",
|
|
16089
|
-
onClick:
|
|
16114
|
+
onClick: d,
|
|
16090
16115
|
className: "h-full justify-between p-3",
|
|
16091
16116
|
"aria-label": "Browse full catalog",
|
|
16117
|
+
"data-testid": c("browse"),
|
|
16092
16118
|
children: [/* @__PURE__ */ H("span", { children: "Browse full catalog" }), /* @__PURE__ */ H(_t, { className: "size-4" })]
|
|
16093
16119
|
})
|
|
16094
16120
|
]
|
|
@@ -16098,20 +16124,20 @@ function VT({ policies: e, open: t, onOpenChange: n, onAddPolicy: r, onBrowseCat
|
|
|
16098
16124
|
}
|
|
16099
16125
|
//#endregion
|
|
16100
16126
|
//#region src/lib/step-config-defaults.ts
|
|
16101
|
-
function
|
|
16127
|
+
function UT(e) {
|
|
16102
16128
|
return e.configuration !== null && e.configuration !== void 0 && typeof e.configuration == "object" && "sharedPolicyGroupId" in e.configuration;
|
|
16103
16129
|
}
|
|
16104
|
-
function
|
|
16130
|
+
function WT(e, t) {
|
|
16105
16131
|
if (!e) return t ?? {};
|
|
16106
16132
|
if (t == null) return rt(e) ?? {};
|
|
16107
16133
|
if (typeof t == "object" && Object.keys(t).length === 0) return {};
|
|
16108
16134
|
let n = t;
|
|
16109
16135
|
return {
|
|
16110
|
-
...rt(
|
|
16136
|
+
...rt(GT(e, n)) ?? {},
|
|
16111
16137
|
...n
|
|
16112
16138
|
};
|
|
16113
16139
|
}
|
|
16114
|
-
function
|
|
16140
|
+
function GT(e, t) {
|
|
16115
16141
|
let n = e.oneOf ? "oneOf" : "anyOf", r = e[n]?.find((e) => {
|
|
16116
16142
|
let n = Object.entries(e.properties ?? {}).filter(([, e]) => e.const !== void 0);
|
|
16117
16143
|
return n.length > 0 && n.every(([e, n]) => t[e] === n.const);
|
|
@@ -16123,25 +16149,25 @@ function WT(e, t) {
|
|
|
16123
16149
|
}
|
|
16124
16150
|
//#endregion
|
|
16125
16151
|
//#region src/lib/step-config-validation.ts
|
|
16126
|
-
function
|
|
16152
|
+
function KT(e, t) {
|
|
16127
16153
|
return {
|
|
16128
16154
|
...e,
|
|
16129
16155
|
flowPhase: t
|
|
16130
16156
|
};
|
|
16131
16157
|
}
|
|
16132
|
-
function
|
|
16133
|
-
return at(e,
|
|
16158
|
+
function qT(e, t, n) {
|
|
16159
|
+
return at(e, WT(e, t), n);
|
|
16134
16160
|
}
|
|
16135
|
-
function
|
|
16161
|
+
function JT(e, t) {
|
|
16136
16162
|
let n = it(e);
|
|
16137
16163
|
return (r, i, a) => n(at(e, r, t), i, a);
|
|
16138
16164
|
}
|
|
16139
|
-
async function
|
|
16140
|
-
if (
|
|
16165
|
+
async function YT(e, t, n, r) {
|
|
16166
|
+
if (UT(t)) return !0;
|
|
16141
16167
|
try {
|
|
16142
16168
|
let i = await n(e);
|
|
16143
16169
|
if (!i) return !0;
|
|
16144
|
-
let a =
|
|
16170
|
+
let a = qT(i, t.configuration, r), o = await it(i)(a, void 0, {
|
|
16145
16171
|
criteriaMode: "all",
|
|
16146
16172
|
fields: {}
|
|
16147
16173
|
});
|
|
@@ -16152,8 +16178,8 @@ async function JT(e, t, n, r) {
|
|
|
16152
16178
|
}
|
|
16153
16179
|
//#endregion
|
|
16154
16180
|
//#region src/hooks/use-policy-config.ts
|
|
16155
|
-
function
|
|
16156
|
-
let a = Bn(), { fetchPolicySchema: o, apiType: s, readOnly: c } = a, [l, u] = V(null), [d, f] = V(!0), [p, m] = V(null), h =
|
|
16181
|
+
function XT({ policy: e, step: t, flowPhase: n, onConfigChange: r, onValidityChange: i }) {
|
|
16182
|
+
let a = Bn(), { fetchPolicySchema: o, apiType: s, readOnly: c } = a, [l, u] = V(null), [d, f] = V(!0), [p, m] = V(null), h = UT(t), g = B(r);
|
|
16157
16183
|
g.current = r;
|
|
16158
16184
|
let _ = B(i);
|
|
16159
16185
|
_.current = i, dt(() => {
|
|
@@ -16180,7 +16206,7 @@ function YT({ policy: e, step: t, flowPhase: n, onConfigChange: r, onValidityCha
|
|
|
16180
16206
|
o,
|
|
16181
16207
|
h
|
|
16182
16208
|
]);
|
|
16183
|
-
let v = z(() =>
|
|
16209
|
+
let v = z(() => KT(a, n), [a, n]), y = z(() => l ? JT(l, v) : void 0, [l, v]), b = z(() => WT(l, t.configuration), [l, t.configuration]), x = Pi({
|
|
16184
16210
|
resolver: y,
|
|
16185
16211
|
defaultValues: b,
|
|
16186
16212
|
mode: "all",
|
|
@@ -16228,16 +16254,16 @@ function YT({ policy: e, step: t, flowPhase: n, onConfigChange: r, onValidityCha
|
|
|
16228
16254
|
}
|
|
16229
16255
|
//#endregion
|
|
16230
16256
|
//#region src/components/PolicyConfig/PolicyConfigForm.tsx
|
|
16231
|
-
var
|
|
16232
|
-
function
|
|
16233
|
-
let u = a &&
|
|
16257
|
+
var ZT = ["PUBLISH", "SUBSCRIBE"];
|
|
16258
|
+
function QT({ schema: e, form: t, step: n, flowPhase: r, isSpg: i, supportsMessageCondition: a = !0, disabled: o = !1, onDescriptionChange: s, onConditionChange: c, onMessageConditionChange: l }) {
|
|
16259
|
+
let u = a && ZT.includes(r), d = Bn(), f = z(() => KT(d, r), [d, r]), p = !i && e;
|
|
16234
16260
|
return /* @__PURE__ */ H(Pe, { children: /* @__PURE__ */ U("div", {
|
|
16235
16261
|
className: "px-4 pt-4 pb-6",
|
|
16236
16262
|
children: [
|
|
16237
16263
|
/* @__PURE__ */ U("div", {
|
|
16238
16264
|
className: "space-y-3",
|
|
16239
16265
|
children: [
|
|
16240
|
-
/* @__PURE__ */ U(fe, { children: [/* @__PURE__ */ H(
|
|
16266
|
+
/* @__PURE__ */ U(fe, { children: [/* @__PURE__ */ H(M, {
|
|
16241
16267
|
className: "text-sm",
|
|
16242
16268
|
children: "Description"
|
|
16243
16269
|
}), /* @__PURE__ */ H(pe, { children: /* @__PURE__ */ H(Qe, {
|
|
@@ -16250,12 +16276,12 @@ function ZT({ schema: e, form: t, step: n, flowPhase: r, isSpg: i, supportsMessa
|
|
|
16250
16276
|
/* @__PURE__ */ U(fe, { children: [
|
|
16251
16277
|
/* @__PURE__ */ U("div", {
|
|
16252
16278
|
className: "flex items-center gap-1",
|
|
16253
|
-
children: [/* @__PURE__ */ H(
|
|
16279
|
+
children: [/* @__PURE__ */ H(M, {
|
|
16254
16280
|
className: "text-sm",
|
|
16255
16281
|
children: "Condition"
|
|
16256
16282
|
}), /* @__PURE__ */ H(se, {})]
|
|
16257
16283
|
}),
|
|
16258
|
-
/* @__PURE__ */ H(
|
|
16284
|
+
/* @__PURE__ */ H(me, { children: "Expression Language condition that must be true for this step to execute." }),
|
|
16259
16285
|
/* @__PURE__ */ H(pe, { children: /* @__PURE__ */ H(N, {
|
|
16260
16286
|
value: n.condition ?? "",
|
|
16261
16287
|
placeholder: "{#request.headers['x-key'] != null}",
|
|
@@ -16267,12 +16293,12 @@ function ZT({ schema: e, form: t, step: n, flowPhase: r, isSpg: i, supportsMessa
|
|
|
16267
16293
|
u && /* @__PURE__ */ U(fe, { children: [
|
|
16268
16294
|
/* @__PURE__ */ U("div", {
|
|
16269
16295
|
className: "flex items-center gap-1",
|
|
16270
|
-
children: [/* @__PURE__ */ H(
|
|
16296
|
+
children: [/* @__PURE__ */ H(M, {
|
|
16271
16297
|
className: "text-sm",
|
|
16272
16298
|
children: "Message Condition"
|
|
16273
16299
|
}), /* @__PURE__ */ H(se, {})]
|
|
16274
16300
|
}),
|
|
16275
|
-
/* @__PURE__ */ H(
|
|
16301
|
+
/* @__PURE__ */ H(me, { children: "Message-level condition for PUBLISH/SUBSCRIBE phases." }),
|
|
16276
16302
|
/* @__PURE__ */ H(pe, { children: /* @__PURE__ */ H(N, {
|
|
16277
16303
|
value: n.messageCondition ?? "",
|
|
16278
16304
|
placeholder: "{#message.headers['type'] == 'order'}",
|
|
@@ -16306,13 +16332,13 @@ function ZT({ schema: e, form: t, step: n, flowPhase: r, isSpg: i, supportsMessa
|
|
|
16306
16332
|
}
|
|
16307
16333
|
//#endregion
|
|
16308
16334
|
//#region src/components/PolicyConfig/PolicyConfigPanel.tsx
|
|
16309
|
-
var
|
|
16310
|
-
function
|
|
16335
|
+
var $T = 280, eE = 400;
|
|
16336
|
+
function tE({ policy: r, step: a, flowPhase: o, isEnabled: s = !0, prerequisiteMessage: c, docsLayout: l = "none", showBackButton: u = !0, onClose: d, onRemove: f, onDuplicate: p, onToggleEnabled: m, onStepChange: h, onValidityChange: g, className: _ }) {
|
|
16311
16337
|
let { fetchPolicyDocumentation: v } = Bn();
|
|
16312
16338
|
dt(() => {
|
|
16313
16339
|
v(r);
|
|
16314
16340
|
}, [r, v]);
|
|
16315
|
-
let y = B(() => void 0), { schema: b, loading: x, error: S, form: C, isSpg: w } =
|
|
16341
|
+
let y = B(() => void 0), { schema: b, loading: x, error: S, form: C, isSpg: w } = XT({
|
|
16316
16342
|
policy: r,
|
|
16317
16343
|
step: a,
|
|
16318
16344
|
flowPhase: o,
|
|
@@ -16325,7 +16351,7 @@ function eE({ policy: r, step: a, flowPhase: o, isEnabled: s = !0, prerequisiteM
|
|
|
16325
16351
|
ft(() => {
|
|
16326
16352
|
y.current = D;
|
|
16327
16353
|
}, [D]);
|
|
16328
|
-
let O = R((e) => D({ description: e || void 0 }), [D]), k = R((e) => D({ condition: e || void 0 }), [D]), ee = R((e) => D({ messageCondition: e || void 0 }), [D]), te = /* @__PURE__ */ H(
|
|
16354
|
+
let O = R((e) => D({ description: e || void 0 }), [D]), k = R((e) => D({ condition: e || void 0 }), [D]), ee = R((e) => D({ messageCondition: e || void 0 }), [D]), te = /* @__PURE__ */ H(QT, {
|
|
16329
16355
|
schema: b,
|
|
16330
16356
|
form: C,
|
|
16331
16357
|
step: a,
|
|
@@ -16486,7 +16512,7 @@ function eE({ policy: r, step: a, flowPhase: o, isEnabled: s = !0, prerequisiteM
|
|
|
16486
16512
|
children: [
|
|
16487
16513
|
/* @__PURE__ */ H(Me, {
|
|
16488
16514
|
defaultSize: "50%",
|
|
16489
|
-
minSize:
|
|
16515
|
+
minSize: $T,
|
|
16490
16516
|
children: /* @__PURE__ */ H("div", {
|
|
16491
16517
|
className: "flex h-full min-h-0 flex-col overflow-auto",
|
|
16492
16518
|
children: oe
|
|
@@ -16495,7 +16521,7 @@ function eE({ policy: r, step: a, flowPhase: o, isEnabled: s = !0, prerequisiteM
|
|
|
16495
16521
|
/* @__PURE__ */ H(je, { withHandle: !0 }),
|
|
16496
16522
|
/* @__PURE__ */ H(Me, {
|
|
16497
16523
|
defaultSize: "50%",
|
|
16498
|
-
minSize:
|
|
16524
|
+
minSize: eE,
|
|
16499
16525
|
children: /* @__PURE__ */ H(NT, {
|
|
16500
16526
|
policy: r,
|
|
16501
16527
|
showHeader: !1
|
|
@@ -16510,15 +16536,15 @@ function eE({ policy: r, step: a, flowPhase: o, isEnabled: s = !0, prerequisiteM
|
|
|
16510
16536
|
}
|
|
16511
16537
|
//#endregion
|
|
16512
16538
|
//#region src/hooks/use-container-breakpoints.ts
|
|
16513
|
-
var
|
|
16514
|
-
function
|
|
16539
|
+
var nE = 1100;
|
|
16540
|
+
function rE() {
|
|
16515
16541
|
let [e, t] = V({ isSideBySide: !1 }), n = B(null), r = R(() => {
|
|
16516
16542
|
n.current &&= (n.current.disconnect(), null);
|
|
16517
16543
|
}, []);
|
|
16518
16544
|
return dt(() => r, [r]), [R((e) => {
|
|
16519
16545
|
if (r(), !e) return;
|
|
16520
16546
|
let i = () => {
|
|
16521
|
-
let n = e.clientWidth >=
|
|
16547
|
+
let n = e.clientWidth >= nE;
|
|
16522
16548
|
t((e) => e.isSideBySide === n ? e : { isSideBySide: n });
|
|
16523
16549
|
};
|
|
16524
16550
|
i(), n.current = new ResizeObserver(i), n.current.observe(e);
|
|
@@ -16526,7 +16552,7 @@ function nE() {
|
|
|
16526
16552
|
}
|
|
16527
16553
|
//#endregion
|
|
16528
16554
|
//#region src/lib/flow-groups-reducer.ts
|
|
16529
|
-
var
|
|
16555
|
+
var iE = {
|
|
16530
16556
|
REQUEST: "request",
|
|
16531
16557
|
RESPONSE: "response",
|
|
16532
16558
|
PUBLISH: "publish",
|
|
@@ -16534,10 +16560,10 @@ var rE = {
|
|
|
16534
16560
|
ENTRYPOINT_CONNECT: "entrypointConnect",
|
|
16535
16561
|
INTERACT: "interact"
|
|
16536
16562
|
};
|
|
16537
|
-
function
|
|
16538
|
-
return e[
|
|
16563
|
+
function aE(e, t) {
|
|
16564
|
+
return e[iE[t]] ?? [];
|
|
16539
16565
|
}
|
|
16540
|
-
function
|
|
16566
|
+
function oE(e, t, n) {
|
|
16541
16567
|
return e.map((e) => ({
|
|
16542
16568
|
...e,
|
|
16543
16569
|
flows: e.flows.map((e) => e._id === t ? {
|
|
@@ -16547,7 +16573,7 @@ function aE(e, t, n) {
|
|
|
16547
16573
|
} : e)
|
|
16548
16574
|
}));
|
|
16549
16575
|
}
|
|
16550
|
-
function
|
|
16576
|
+
function sE(e, t) {
|
|
16551
16577
|
switch (t.type) {
|
|
16552
16578
|
case "ADD_FLOW": return e.map((e) => e._id === t.groupId ? {
|
|
16553
16579
|
...e,
|
|
@@ -16581,9 +16607,9 @@ function oE(e, t) {
|
|
|
16581
16607
|
...e,
|
|
16582
16608
|
flows: e.flows.filter((e) => e._id !== t.flowId)
|
|
16583
16609
|
} : e);
|
|
16584
|
-
case "TOGGLE_FLOW_ENABLED": return
|
|
16610
|
+
case "TOGGLE_FLOW_ENABLED": return oE(e, t.flowId, t.enabled);
|
|
16585
16611
|
case "ADD_STEP": {
|
|
16586
|
-
let n =
|
|
16612
|
+
let n = iE[t.phase];
|
|
16587
16613
|
return e.map((e) => ({
|
|
16588
16614
|
...e,
|
|
16589
16615
|
flows: e.flows.map((e) => e._id === t.flowId ? {
|
|
@@ -16594,7 +16620,7 @@ function oE(e, t) {
|
|
|
16594
16620
|
}));
|
|
16595
16621
|
}
|
|
16596
16622
|
case "REMOVE_STEP": {
|
|
16597
|
-
let n =
|
|
16623
|
+
let n = iE[t.phase];
|
|
16598
16624
|
return e.map((e) => ({
|
|
16599
16625
|
...e,
|
|
16600
16626
|
flows: e.flows.map((e) => {
|
|
@@ -16609,7 +16635,7 @@ function oE(e, t) {
|
|
|
16609
16635
|
}));
|
|
16610
16636
|
}
|
|
16611
16637
|
case "DUPLICATE_STEP": {
|
|
16612
|
-
let n =
|
|
16638
|
+
let n = iE[t.phase];
|
|
16613
16639
|
return e.map((e) => ({
|
|
16614
16640
|
...e,
|
|
16615
16641
|
flows: e.flows.map((e) => {
|
|
@@ -16627,7 +16653,7 @@ function oE(e, t) {
|
|
|
16627
16653
|
}));
|
|
16628
16654
|
}
|
|
16629
16655
|
case "TOGGLE_STEP_ENABLED": {
|
|
16630
|
-
let n =
|
|
16656
|
+
let n = iE[t.phase];
|
|
16631
16657
|
return e.map((e) => ({
|
|
16632
16658
|
...e,
|
|
16633
16659
|
flows: e.flows.map((e) => {
|
|
@@ -16645,7 +16671,7 @@ function oE(e, t) {
|
|
|
16645
16671
|
}));
|
|
16646
16672
|
}
|
|
16647
16673
|
case "MOVE_STEP": {
|
|
16648
|
-
let n =
|
|
16674
|
+
let n = iE[t.phase];
|
|
16649
16675
|
return e.map((e) => ({
|
|
16650
16676
|
...e,
|
|
16651
16677
|
flows: e.flows.map((e) => {
|
|
@@ -16660,7 +16686,7 @@ function oE(e, t) {
|
|
|
16660
16686
|
}));
|
|
16661
16687
|
}
|
|
16662
16688
|
case "REORDER_STEPS": {
|
|
16663
|
-
let n =
|
|
16689
|
+
let n = iE[t.phase];
|
|
16664
16690
|
return t.oldIndex === t.newIndex ? e : e.map((e) => ({
|
|
16665
16691
|
...e,
|
|
16666
16692
|
flows: e.flows.map((e) => {
|
|
@@ -16675,7 +16701,7 @@ function oE(e, t) {
|
|
|
16675
16701
|
}));
|
|
16676
16702
|
}
|
|
16677
16703
|
case "UPDATE_STEP": {
|
|
16678
|
-
let n =
|
|
16704
|
+
let n = iE[t.phase];
|
|
16679
16705
|
return e.map((e) => ({
|
|
16680
16706
|
...e,
|
|
16681
16707
|
flows: e.flows.map((e) => {
|
|
@@ -16698,23 +16724,23 @@ function oE(e, t) {
|
|
|
16698
16724
|
}
|
|
16699
16725
|
//#endregion
|
|
16700
16726
|
//#region src/lib/flow-structural-key.ts
|
|
16701
|
-
var
|
|
16702
|
-
function cE(e) {
|
|
16703
|
-
return `${e._id}:${sE(e.request)}|${sE(e.response)}|${sE(e.entrypointConnect)}|${sE(e.interact)}|${sE(e.publish)}|${sE(e.subscribe)}`;
|
|
16704
|
-
}
|
|
16727
|
+
var cE = (e) => (e ?? []).map((e) => e.policy ?? "?").join(",");
|
|
16705
16728
|
function lE(e) {
|
|
16706
|
-
return e.
|
|
16729
|
+
return `${e._id}:${cE(e.request)}|${cE(e.response)}|${cE(e.entrypointConnect)}|${cE(e.interact)}|${cE(e.publish)}|${cE(e.subscribe)}`;
|
|
16707
16730
|
}
|
|
16708
16731
|
function uE(e) {
|
|
16732
|
+
return e.flatMap((e) => e.flows.map(lE)).join("||");
|
|
16733
|
+
}
|
|
16734
|
+
function dE(e) {
|
|
16709
16735
|
return e.map((e) => {
|
|
16710
|
-
let t = e.flows.map(
|
|
16736
|
+
let t = e.flows.map(lE).join("|");
|
|
16711
16737
|
return `${e._id}:${e.kind}:${e.sourceId ?? ""}:${t}`;
|
|
16712
16738
|
}).join("||");
|
|
16713
16739
|
}
|
|
16714
16740
|
//#endregion
|
|
16715
16741
|
//#region src/hooks/use-flow-state.ts
|
|
16716
|
-
function
|
|
16717
|
-
let [t, n] = pt(
|
|
16742
|
+
function fE(e) {
|
|
16743
|
+
let [t, n] = pt(sE, e), r = B(e), i = B(t), a = B(e), o = B(e);
|
|
16718
16744
|
ft(() => {
|
|
16719
16745
|
r.current = e;
|
|
16720
16746
|
}, [e]), ft(() => {
|
|
@@ -16733,7 +16759,7 @@ function dE(e) {
|
|
|
16733
16759
|
d.current = u;
|
|
16734
16760
|
let e = r.current, t = a.current, o = i.current;
|
|
16735
16761
|
a.current = e;
|
|
16736
|
-
let s =
|
|
16762
|
+
let s = dE(e) === dE(t);
|
|
16737
16763
|
if (o === t || !s) {
|
|
16738
16764
|
n({
|
|
16739
16765
|
type: "RESET",
|
|
@@ -16757,24 +16783,24 @@ function dE(e) {
|
|
|
16757
16783
|
}
|
|
16758
16784
|
//#endregion
|
|
16759
16785
|
//#region src/lib/save.ts
|
|
16760
|
-
function
|
|
16786
|
+
function pE(e) {
|
|
16761
16787
|
let { _id: t, _hasChanged: n, _parentFlowGroupName: r, ...i } = e;
|
|
16762
16788
|
return i;
|
|
16763
16789
|
}
|
|
16764
|
-
function
|
|
16790
|
+
function mE(e, t) {
|
|
16765
16791
|
return t.flows.some((e) => e._hasChanged) ? !0 : e ? e.flows.length === t.flows.length ? e.flows.some((e, n) => e._id !== t.flows[n]._id) : !0 : t.flows.length > 0;
|
|
16766
16792
|
}
|
|
16767
|
-
function
|
|
16793
|
+
function hE(e, t) {
|
|
16768
16794
|
return e.mode !== t.mode || !!e.matchRequired != !!t.matchRequired;
|
|
16769
16795
|
}
|
|
16770
|
-
function
|
|
16771
|
-
let i = {}, a = !1, o = new Map(e.map((e) => [e._id, e])), s = t.filter((e) => e.kind !== "plan"), c = e.filter((e) => e.kind !== "plan"), l = s.some((e) =>
|
|
16772
|
-
(l || d) && (i.commonFlows = s.flatMap((e) => e.flows.map(
|
|
16796
|
+
function gE({ initialGroups: e, currentGroups: t, initialFlowExecution: n, currentFlowExecution: r }) {
|
|
16797
|
+
let i = {}, a = !1, o = new Map(e.map((e) => [e._id, e])), s = t.filter((e) => e.kind !== "plan"), c = e.filter((e) => e.kind !== "plan"), l = s.some((e) => mE(o.get(e._id), e)), u = new Set(s.map((e) => e._id)), d = c.some((e) => !u.has(e._id));
|
|
16798
|
+
(l || d) && (i.commonFlows = s.flatMap((e) => e.flows.map(pE)), a = !0);
|
|
16773
16799
|
let f = [], p = t.filter((e) => e.kind === "plan");
|
|
16774
|
-
for (let e of p)
|
|
16800
|
+
for (let e of p) mE(o.get(e._id), e) && f.push({
|
|
16775
16801
|
id: e.sourceId ?? e._id,
|
|
16776
16802
|
name: e.name,
|
|
16777
|
-
flows: e.flows.map(
|
|
16803
|
+
flows: e.flows.map(pE)
|
|
16778
16804
|
});
|
|
16779
16805
|
let m = new Set(p.map((e) => e._id));
|
|
16780
16806
|
for (let t of e.filter((e) => e.kind === "plan")) m.has(t._id) || f.push({
|
|
@@ -16782,21 +16808,21 @@ function hE({ initialGroups: e, currentGroups: t, initialFlowExecution: n, curre
|
|
|
16782
16808
|
name: t.name,
|
|
16783
16809
|
flows: []
|
|
16784
16810
|
});
|
|
16785
|
-
return f.length > 0 && (i.plansToUpdate = f, a = !0),
|
|
16786
|
-
}
|
|
16787
|
-
function gE(e) {
|
|
16788
|
-
return hE(e) !== null;
|
|
16811
|
+
return f.length > 0 && (i.plansToUpdate = f, a = !0), hE(n, r) && (i.flowExecution = r, a = !0), a ? i : null;
|
|
16789
16812
|
}
|
|
16790
16813
|
function _E(e) {
|
|
16814
|
+
return gE(e) !== null;
|
|
16815
|
+
}
|
|
16816
|
+
function vE(e) {
|
|
16791
16817
|
let t = 0;
|
|
16792
16818
|
for (let n of e.values()) n || t++;
|
|
16793
16819
|
return t;
|
|
16794
16820
|
}
|
|
16795
16821
|
//#endregion
|
|
16796
16822
|
//#region src/hooks/use-save.ts
|
|
16797
|
-
var
|
|
16798
|
-
function
|
|
16799
|
-
let [c, l] = V(!1), [u, d] = V(null), f = B(null), p = B(0), m = z(() =>
|
|
16823
|
+
var yE = 5e3;
|
|
16824
|
+
function bE({ initialGroups: e, currentGroups: t, initialFlowExecution: n, currentFlowExecution: r, stepValidity: i, onSave: a, onSaveStart: o, onSaveFailed: s }) {
|
|
16825
|
+
let [c, l] = V(!1), [u, d] = V(null), f = B(null), p = B(0), m = z(() => vE(i), [i]), h = z(() => _E({
|
|
16800
16826
|
initialGroups: e,
|
|
16801
16827
|
currentGroups: t,
|
|
16802
16828
|
initialFlowExecution: n,
|
|
@@ -16820,7 +16846,7 @@ function yE({ initialGroups: e, currentGroups: t, initialFlowExecution: n, curre
|
|
|
16820
16846
|
invalidStepCount: m,
|
|
16821
16847
|
triggerSave: R(() => {
|
|
16822
16848
|
if (c || m > 0) return;
|
|
16823
|
-
let i =
|
|
16849
|
+
let i = gE({
|
|
16824
16850
|
initialGroups: e,
|
|
16825
16851
|
currentGroups: t,
|
|
16826
16852
|
initialFlowExecution: n,
|
|
@@ -16832,7 +16858,7 @@ function yE({ initialGroups: e, currentGroups: t, initialFlowExecution: n, curre
|
|
|
16832
16858
|
let h = () => {
|
|
16833
16859
|
p.current === u && (f.current && clearTimeout(f.current), f.current = setTimeout(() => {
|
|
16834
16860
|
l(!1), f.current = null;
|
|
16835
|
-
},
|
|
16861
|
+
}, yE));
|
|
16836
16862
|
};
|
|
16837
16863
|
try {
|
|
16838
16864
|
o?.();
|
|
@@ -16859,15 +16885,15 @@ function yE({ initialGroups: e, currentGroups: t, initialFlowExecution: n, curre
|
|
|
16859
16885
|
}
|
|
16860
16886
|
//#endregion
|
|
16861
16887
|
//#region src/lib/step-selection.ts
|
|
16862
|
-
function
|
|
16888
|
+
function xE(e, t, n) {
|
|
16863
16889
|
return t === n ? e : e === t ? n : t < n && e > t && e <= n ? e - 1 : t > n && e >= n && e < t ? e + 1 : e;
|
|
16864
16890
|
}
|
|
16865
|
-
function
|
|
16891
|
+
function SE(e, t, n) {
|
|
16866
16892
|
return e === t ? n : e === n ? t : e;
|
|
16867
16893
|
}
|
|
16868
16894
|
//#endregion
|
|
16869
16895
|
//#region src/hooks/use-step-actions.ts
|
|
16870
|
-
function
|
|
16896
|
+
function CE(e, t, n, r) {
|
|
16871
16897
|
return {
|
|
16872
16898
|
handleStepClick: R((t, n) => {
|
|
16873
16899
|
e && r({
|
|
@@ -16917,7 +16943,7 @@ function SE(e, t, n, r) {
|
|
|
16917
16943
|
oldIndex: a,
|
|
16918
16944
|
newIndex: o
|
|
16919
16945
|
}), !t || t.flowId !== e._id || t.phase !== i)) return;
|
|
16920
|
-
let s =
|
|
16946
|
+
let s = xE(t.stepIndex, a, o);
|
|
16921
16947
|
s !== t.stepIndex && r({
|
|
16922
16948
|
...t,
|
|
16923
16949
|
stepIndex: s
|
|
@@ -16932,15 +16958,15 @@ function SE(e, t, n, r) {
|
|
|
16932
16958
|
}
|
|
16933
16959
|
//#endregion
|
|
16934
16960
|
//#region src/lib/flow-phases.ts
|
|
16935
|
-
var
|
|
16961
|
+
var wE = new Set([
|
|
16936
16962
|
"LLM_PROXY",
|
|
16937
16963
|
"MCP_PROXY",
|
|
16938
16964
|
"A2A_PROXY"
|
|
16939
16965
|
]);
|
|
16940
|
-
function
|
|
16941
|
-
return
|
|
16966
|
+
function TE(e) {
|
|
16967
|
+
return wE.has(e) ? "PROXY" : e;
|
|
16942
16968
|
}
|
|
16943
|
-
var
|
|
16969
|
+
var EE = {
|
|
16944
16970
|
"REQUEST:PROXY": "Policies applied to the incoming client request before it reaches the backend.",
|
|
16945
16971
|
"RESPONSE:PROXY": "Policies applied to the backend response before it is returned to the client.",
|
|
16946
16972
|
"REQUEST:MESSAGE": "Policies applied to the incoming client request before it reaches the backend.",
|
|
@@ -16951,21 +16977,21 @@ var TE = {
|
|
|
16951
16977
|
"INTERACT:NATIVE": "Policies applied on all interactions between the client and the Gateway.",
|
|
16952
16978
|
"PUBLISH:NATIVE": "Policies applied when publishing messages to the broker.",
|
|
16953
16979
|
"SUBSCRIBE:NATIVE": "Policies applied when consuming messages from the broker."
|
|
16954
|
-
},
|
|
16980
|
+
}, DE = {
|
|
16955
16981
|
REQUEST: "Request",
|
|
16956
16982
|
RESPONSE: "Response",
|
|
16957
16983
|
ENTRYPOINT_CONNECT: "Connect",
|
|
16958
16984
|
INTERACT: "Interact",
|
|
16959
16985
|
PUBLISH: "Publish",
|
|
16960
16986
|
SUBSCRIBE: "Subscribe"
|
|
16961
|
-
},
|
|
16987
|
+
}, OE = {
|
|
16962
16988
|
REQUEST: "Request Phase",
|
|
16963
16989
|
RESPONSE: "Response Phase",
|
|
16964
16990
|
ENTRYPOINT_CONNECT: "Connect Phase",
|
|
16965
16991
|
INTERACT: "Interact Phase",
|
|
16966
16992
|
PUBLISH: "Publish Phase",
|
|
16967
16993
|
SUBSCRIBE: "Subscribe Phase"
|
|
16968
|
-
},
|
|
16994
|
+
}, kE = {
|
|
16969
16995
|
"REQUEST:PROXY": {
|
|
16970
16996
|
startConnectorRole: "entrypoint",
|
|
16971
16997
|
endConnectorRole: "endpoint",
|
|
@@ -17036,7 +17062,7 @@ var TE = {
|
|
|
17036
17062
|
endActorLabel: "Subscriber",
|
|
17037
17063
|
connectorFilterMode: "SUBSCRIBE"
|
|
17038
17064
|
}
|
|
17039
|
-
},
|
|
17065
|
+
}, AE = {
|
|
17040
17066
|
"REQUEST:PROXY": {
|
|
17041
17067
|
endActorLabel: "Gateway",
|
|
17042
17068
|
description: "Policies applied to the incoming client request before it reaches any API."
|
|
@@ -17046,13 +17072,13 @@ var TE = {
|
|
|
17046
17072
|
description: "Policies applied to every API response before it is returned to the client."
|
|
17047
17073
|
}
|
|
17048
17074
|
};
|
|
17049
|
-
function
|
|
17050
|
-
let r = `${e}:${
|
|
17075
|
+
function jE(e, t, n = "API") {
|
|
17076
|
+
let r = `${e}:${TE(t)}`, i = kE[r];
|
|
17051
17077
|
if (!i) throw Error(`No phase direction config for ${r}`);
|
|
17052
17078
|
let a = {
|
|
17053
17079
|
phase: e,
|
|
17054
|
-
title:
|
|
17055
|
-
description:
|
|
17080
|
+
title: OE[e],
|
|
17081
|
+
description: EE[r] ?? "",
|
|
17056
17082
|
startConnectorRole: i.startConnectorRole,
|
|
17057
17083
|
endConnectorRole: i.endConnectorRole,
|
|
17058
17084
|
startActorLabel: i.startActorLabel,
|
|
@@ -17062,17 +17088,17 @@ function AE(e, t, n = "API") {
|
|
|
17062
17088
|
};
|
|
17063
17089
|
return n === "ORGANIZATION" ? {
|
|
17064
17090
|
...a,
|
|
17065
|
-
...
|
|
17091
|
+
...AE[r]
|
|
17066
17092
|
} : a;
|
|
17067
17093
|
}
|
|
17068
|
-
var
|
|
17094
|
+
var ME = {
|
|
17069
17095
|
type: "flat",
|
|
17070
17096
|
phases: ["REQUEST", "RESPONSE"]
|
|
17071
|
-
},
|
|
17072
|
-
A2A_PROXY:
|
|
17073
|
-
LLM_PROXY:
|
|
17074
|
-
MCP_PROXY:
|
|
17075
|
-
PROXY:
|
|
17097
|
+
}, NE = {
|
|
17098
|
+
A2A_PROXY: ME,
|
|
17099
|
+
LLM_PROXY: ME,
|
|
17100
|
+
MCP_PROXY: ME,
|
|
17101
|
+
PROXY: ME,
|
|
17076
17102
|
MESSAGE: {
|
|
17077
17103
|
type: "tabbed",
|
|
17078
17104
|
tabs: [{
|
|
@@ -17098,26 +17124,26 @@ var jE = {
|
|
|
17098
17124
|
}]
|
|
17099
17125
|
}
|
|
17100
17126
|
};
|
|
17101
|
-
function NE(e) {
|
|
17102
|
-
return ME[e];
|
|
17103
|
-
}
|
|
17104
17127
|
function PE(e) {
|
|
17105
|
-
|
|
17128
|
+
return NE[e];
|
|
17129
|
+
}
|
|
17130
|
+
function FE(e) {
|
|
17131
|
+
let t = PE(e);
|
|
17106
17132
|
return t.type === "flat" ? t.phases : t.tabs.flatMap((e) => e.phases);
|
|
17107
17133
|
}
|
|
17108
17134
|
//#endregion
|
|
17109
17135
|
//#region src/lib/step-matching.ts
|
|
17110
|
-
var
|
|
17111
|
-
function
|
|
17136
|
+
var IE = "POLICY_", LE = "SHARED_POLICY_GROUP_", RE = "The Gateway will throw an error on deployment.", zE = "The Gateway will ignore this step.";
|
|
17137
|
+
function BE(e, t) {
|
|
17112
17138
|
let n = e.map((e) => ({
|
|
17113
|
-
_id: `${
|
|
17139
|
+
_id: `${IE}${e.id}`,
|
|
17114
17140
|
policyId: e.id,
|
|
17115
17141
|
name: e.name,
|
|
17116
17142
|
icon: e.icon,
|
|
17117
17143
|
category: e.category,
|
|
17118
17144
|
type: "policy"
|
|
17119
17145
|
})), r = t.map((e) => ({
|
|
17120
|
-
_id: `${
|
|
17146
|
+
_id: `${LE}${e.id}`,
|
|
17121
17147
|
policyId: e.policyId,
|
|
17122
17148
|
name: e.name,
|
|
17123
17149
|
category: void 0,
|
|
@@ -17125,22 +17151,22 @@ function zE(e, t) {
|
|
|
17125
17151
|
}));
|
|
17126
17152
|
return [...n, ...r];
|
|
17127
17153
|
}
|
|
17128
|
-
function
|
|
17154
|
+
function VE(e) {
|
|
17129
17155
|
return e.configuration !== null && e.configuration !== void 0 && typeof e.configuration == "object" && "sharedPolicyGroupId" in e.configuration;
|
|
17130
17156
|
}
|
|
17131
|
-
function
|
|
17132
|
-
if (
|
|
17157
|
+
function HE(e) {
|
|
17158
|
+
if (VE(e)) return e.configuration.sharedPolicyGroupId;
|
|
17133
17159
|
}
|
|
17134
|
-
function
|
|
17135
|
-
let n =
|
|
17160
|
+
function UE(e, t) {
|
|
17161
|
+
let n = HE(e);
|
|
17136
17162
|
if (n) {
|
|
17137
|
-
let e = `${
|
|
17163
|
+
let e = `${LE}${n}`;
|
|
17138
17164
|
return t.find((t) => t._id === e) ?? null;
|
|
17139
17165
|
}
|
|
17140
17166
|
return e.policy ? t.find((t) => t.type === "policy" && t.policyId === e.policy) ?? null : null;
|
|
17141
17167
|
}
|
|
17142
|
-
function
|
|
17143
|
-
let r =
|
|
17168
|
+
function WE(e, t, n) {
|
|
17169
|
+
let r = UE(e, n);
|
|
17144
17170
|
return r ? {
|
|
17145
17171
|
step: e,
|
|
17146
17172
|
index: t,
|
|
@@ -17151,13 +17177,13 @@ function UE(e, t, n) {
|
|
|
17151
17177
|
index: t,
|
|
17152
17178
|
policy: null,
|
|
17153
17179
|
unresolved: !0,
|
|
17154
|
-
unresolvedMessage:
|
|
17180
|
+
unresolvedMessage: HE(e) ? zE : RE
|
|
17155
17181
|
};
|
|
17156
17182
|
}
|
|
17157
|
-
function WE(e, t, n) {
|
|
17158
|
-
return iE(e, t).map((e, t) => UE(e, t, n));
|
|
17159
|
-
}
|
|
17160
17183
|
function GE(e, t, n) {
|
|
17184
|
+
return aE(e, t).map((e, t) => WE(e, t, n));
|
|
17185
|
+
}
|
|
17186
|
+
function KE(e, t, n) {
|
|
17161
17187
|
if (e.type === "policy") return { policy: t.find((t) => t.id === e.policyId) ?? {
|
|
17162
17188
|
id: e.policyId,
|
|
17163
17189
|
name: e.name,
|
|
@@ -17177,8 +17203,8 @@ function GE(e, t, n) {
|
|
|
17177
17203
|
}
|
|
17178
17204
|
//#endregion
|
|
17179
17205
|
//#region src/hooks/use-step-validity-scan.ts
|
|
17180
|
-
function
|
|
17181
|
-
let c = z(() =>
|
|
17206
|
+
function qE(e, t, n, r, i, a, o, s) {
|
|
17207
|
+
let c = z(() => uE(e), [e]), l = B(e);
|
|
17182
17208
|
dt(() => {
|
|
17183
17209
|
l.current = e;
|
|
17184
17210
|
});
|
|
@@ -17188,11 +17214,11 @@ function KE(e, t, n, r, i, a, o, s) {
|
|
|
17188
17214
|
}), dt(() => {
|
|
17189
17215
|
let e = !1;
|
|
17190
17216
|
async function s() {
|
|
17191
|
-
let s =
|
|
17217
|
+
let s = FE(t), c = l.current, d = [];
|
|
17192
17218
|
for (let e of c) for (let t of e.flows) for (let e of s) {
|
|
17193
|
-
let o =
|
|
17219
|
+
let o = aE(t, e);
|
|
17194
17220
|
for (let s = 0; s < o.length; s++) {
|
|
17195
|
-
let c = o[s], l = `${t._id}:${e}:${s}`, f =
|
|
17221
|
+
let c = o[s], l = `${t._id}:${e}:${s}`, f = WE(c, s, n);
|
|
17196
17222
|
if (f.unresolved || !f.policy) {
|
|
17197
17223
|
d.push({
|
|
17198
17224
|
key: l,
|
|
@@ -17200,10 +17226,10 @@ function KE(e, t, n, r, i, a, o, s) {
|
|
|
17200
17226
|
});
|
|
17201
17227
|
continue;
|
|
17202
17228
|
}
|
|
17203
|
-
let { policy: p } =
|
|
17229
|
+
let { policy: p } = KE(f.policy, r, i);
|
|
17204
17230
|
d.push({
|
|
17205
17231
|
key: l,
|
|
17206
|
-
promise:
|
|
17232
|
+
promise: YT(p, c, a, KT(u.current, e))
|
|
17207
17233
|
});
|
|
17208
17234
|
}
|
|
17209
17235
|
}
|
|
@@ -17236,8 +17262,8 @@ function KE(e, t, n, r, i, a, o, s) {
|
|
|
17236
17262
|
}
|
|
17237
17263
|
//#endregion
|
|
17238
17264
|
//#region src/components/FlowInfoBar/FlowInfoBar.tsx
|
|
17239
|
-
var
|
|
17240
|
-
function
|
|
17265
|
+
var JE = "font-[ui-monospace,monospace]";
|
|
17266
|
+
function YE({ name: e }) {
|
|
17241
17267
|
let t = W(), n = B(null), [r, i] = V(!1), a = /* @__PURE__ */ H("span", {
|
|
17242
17268
|
ref: n,
|
|
17243
17269
|
onMouseEnter: R(() => {
|
|
@@ -17260,13 +17286,13 @@ function JE({ name: e }) {
|
|
|
17260
17286
|
})
|
|
17261
17287
|
})] }) : a;
|
|
17262
17288
|
}
|
|
17263
|
-
function
|
|
17289
|
+
function XE() {
|
|
17264
17290
|
return /* @__PURE__ */ H(Ve, {
|
|
17265
17291
|
orientation: "vertical",
|
|
17266
17292
|
className: "shrink-0"
|
|
17267
17293
|
});
|
|
17268
17294
|
}
|
|
17269
|
-
function
|
|
17295
|
+
function ZE({ data: e }) {
|
|
17270
17296
|
let t = W();
|
|
17271
17297
|
return /* @__PURE__ */ U(mt, { children: [e.methods.map((n) => /* @__PURE__ */ H(r, {
|
|
17272
17298
|
variant: Gd(n),
|
|
@@ -17280,13 +17306,13 @@ function XE({ data: e }) {
|
|
|
17280
17306
|
e.pathOperator === "EQUALS" ? "Equals" : "Starts with",
|
|
17281
17307
|
" ",
|
|
17282
17308
|
/* @__PURE__ */ H("code", {
|
|
17283
|
-
className:
|
|
17309
|
+
className: JE,
|
|
17284
17310
|
children: e.path
|
|
17285
17311
|
})
|
|
17286
17312
|
]
|
|
17287
17313
|
})] });
|
|
17288
17314
|
}
|
|
17289
|
-
function
|
|
17315
|
+
function QE({ data: e }) {
|
|
17290
17316
|
let t = W();
|
|
17291
17317
|
return /* @__PURE__ */ U(mt, { children: [e.operations.map((e) => /* @__PURE__ */ H(r, {
|
|
17292
17318
|
variant: "default",
|
|
@@ -17302,13 +17328,13 @@ function ZE({ data: e }) {
|
|
|
17302
17328
|
"):",
|
|
17303
17329
|
" ",
|
|
17304
17330
|
/* @__PURE__ */ H("code", {
|
|
17305
|
-
className:
|
|
17331
|
+
className: JE,
|
|
17306
17332
|
children: e.channel
|
|
17307
17333
|
})
|
|
17308
17334
|
]
|
|
17309
17335
|
})] });
|
|
17310
17336
|
}
|
|
17311
|
-
function
|
|
17337
|
+
function $E({ data: e }) {
|
|
17312
17338
|
let t = W();
|
|
17313
17339
|
return /* @__PURE__ */ H(mt, { children: e.methods.map((n) => /* @__PURE__ */ H(r, {
|
|
17314
17340
|
variant: "secondary",
|
|
@@ -17317,7 +17343,7 @@ function QE({ data: e }) {
|
|
|
17317
17343
|
children: n
|
|
17318
17344
|
}, n)) });
|
|
17319
17345
|
}
|
|
17320
|
-
function
|
|
17346
|
+
function eD({ data: e }) {
|
|
17321
17347
|
let t = W();
|
|
17322
17348
|
return /* @__PURE__ */ U(mt, { children: [e.visibleNames.map((n, i) => /* @__PURE__ */ U(r, {
|
|
17323
17349
|
variant: "outline",
|
|
@@ -17347,7 +17373,7 @@ function $E({ data: e }) {
|
|
|
17347
17373
|
})
|
|
17348
17374
|
})] })] });
|
|
17349
17375
|
}
|
|
17350
|
-
function
|
|
17376
|
+
function tD({ data: e }) {
|
|
17351
17377
|
return /* @__PURE__ */ U($e, { children: [/* @__PURE__ */ H(nt, {
|
|
17352
17378
|
asChild: !0,
|
|
17353
17379
|
children: /* @__PURE__ */ H("span", {
|
|
@@ -17362,12 +17388,12 @@ function eD({ data: e }) {
|
|
|
17362
17388
|
side: "bottom",
|
|
17363
17389
|
className: "max-w-xs",
|
|
17364
17390
|
children: /* @__PURE__ */ H("code", {
|
|
17365
|
-
className: `${
|
|
17391
|
+
className: `${JE} text-xs`,
|
|
17366
17392
|
children: e.condition
|
|
17367
17393
|
})
|
|
17368
17394
|
})] });
|
|
17369
17395
|
}
|
|
17370
|
-
function
|
|
17396
|
+
function nD({ disabled: e, saving: t, saveError: n, invalidStepCount: r, onClick: a }) {
|
|
17371
17397
|
let o = W(), s = /* @__PURE__ */ H(i, {
|
|
17372
17398
|
size: "sm",
|
|
17373
17399
|
variant: n ? "destructive" : "default",
|
|
@@ -17388,7 +17414,7 @@ function tD({ disabled: e, saving: t, saveError: n, invalidStepCount: r, onClick
|
|
|
17388
17414
|
children: c
|
|
17389
17415
|
})] }) : s;
|
|
17390
17416
|
}
|
|
17391
|
-
function
|
|
17417
|
+
function rD({ flow: e, apiType: t, entrypointsInfo: n, endpointsInfo: a, readOnly: o = !1, loading: s = !1, organizationTags: c, onDismissPhase: l, onEditFlow: u, onToggleFlowEnabled: d, onDeleteFlow: f, onSave: p, canSave: m = !1, saving: h = !1, saveError: g = null, invalidStepCount: _ = 0, className: v }) {
|
|
17392
17418
|
let y = W(), [b, x] = V(!1);
|
|
17393
17419
|
if (s) return /* @__PURE__ */ U("div", {
|
|
17394
17420
|
className: I("flex min-w-0 items-center gap-3 border-b px-2.5 py-2", v),
|
|
@@ -17399,7 +17425,7 @@ function nD({ flow: e, apiType: t, entrypointsInfo: n, endpointsInfo: a, readOnl
|
|
|
17399
17425
|
/* @__PURE__ */ H(F, { className: "h-5 w-16 rounded-full" }),
|
|
17400
17426
|
/* @__PURE__ */ H(F, { className: "h-5 w-16 rounded-full" })
|
|
17401
17427
|
]
|
|
17402
|
-
}), p && /* @__PURE__ */ H(
|
|
17428
|
+
}), p && /* @__PURE__ */ H(nD, {
|
|
17403
17429
|
disabled: !0,
|
|
17404
17430
|
saving: !1,
|
|
17405
17431
|
saveError: null,
|
|
@@ -17414,7 +17440,7 @@ function nD({ flow: e, apiType: t, entrypointsInfo: n, endpointsInfo: a, readOnl
|
|
|
17414
17440
|
children: [/* @__PURE__ */ H("span", {
|
|
17415
17441
|
className: "flex-1 text-sm text-muted-foreground",
|
|
17416
17442
|
children: "Select a flow to view details"
|
|
17417
|
-
}), p && /* @__PURE__ */ H(
|
|
17443
|
+
}), p && /* @__PURE__ */ H(nD, {
|
|
17418
17444
|
disabled: !m || h,
|
|
17419
17445
|
saving: h,
|
|
17420
17446
|
saveError: g,
|
|
@@ -17446,19 +17472,19 @@ function nD({ flow: e, apiType: t, entrypointsInfo: n, endpointsInfo: a, readOnl
|
|
|
17446
17472
|
/* @__PURE__ */ U("div", {
|
|
17447
17473
|
className: "flex min-w-0 flex-1 items-center gap-2 overflow-hidden",
|
|
17448
17474
|
children: [
|
|
17449
|
-
S.name && /* @__PURE__ */ H(
|
|
17475
|
+
S.name && /* @__PURE__ */ H(YE, { name: S.name }),
|
|
17450
17476
|
T && /* @__PURE__ */ H(r, {
|
|
17451
17477
|
variant: "secondary",
|
|
17452
17478
|
children: "Disabled"
|
|
17453
17479
|
}),
|
|
17454
|
-
(S.name || T) && w && /* @__PURE__ */ H(
|
|
17480
|
+
(S.name || T) && w && /* @__PURE__ */ H(XE, {}),
|
|
17455
17481
|
w && /* @__PURE__ */ U(mt, { children: [
|
|
17456
|
-
S.http && /* @__PURE__ */ H(
|
|
17457
|
-
S.channel && /* @__PURE__ */ H(
|
|
17458
|
-
S.mcp && /* @__PURE__ */ H(
|
|
17482
|
+
S.http && /* @__PURE__ */ H(ZE, { data: S.http }),
|
|
17483
|
+
S.channel && /* @__PURE__ */ H(QE, { data: S.channel }),
|
|
17484
|
+
S.mcp && /* @__PURE__ */ H($E, { data: S.mcp })
|
|
17459
17485
|
] }),
|
|
17460
|
-
S.condition && /* @__PURE__ */ U(mt, { children: [(S.name || w) && /* @__PURE__ */ H(
|
|
17461
|
-
C && /* @__PURE__ */ U(mt, { children: [(S.name || w || S.condition) && /* @__PURE__ */ H(
|
|
17486
|
+
S.condition && /* @__PURE__ */ U(mt, { children: [(S.name || w) && /* @__PURE__ */ H(XE, {}), /* @__PURE__ */ H(tD, { data: S.condition })] }),
|
|
17487
|
+
C && /* @__PURE__ */ U(mt, { children: [(S.name || w || S.condition) && /* @__PURE__ */ H(XE, {}), /* @__PURE__ */ H(eD, { data: C })] })
|
|
17462
17488
|
]
|
|
17463
17489
|
}),
|
|
17464
17490
|
(E || p) && /* @__PURE__ */ U("div", {
|
|
@@ -17493,7 +17519,7 @@ function nD({ flow: e, apiType: t, entrypointsInfo: n, endpointsInfo: a, readOnl
|
|
|
17493
17519
|
children: [/* @__PURE__ */ H(Wt, { className: "mr-2 size-3.5" }), "Delete flow"]
|
|
17494
17520
|
})] })
|
|
17495
17521
|
]
|
|
17496
|
-
})] }), p && /* @__PURE__ */ H(
|
|
17522
|
+
})] }), p && /* @__PURE__ */ H(nD, {
|
|
17497
17523
|
disabled: !m || h,
|
|
17498
17524
|
saving: h,
|
|
17499
17525
|
saveError: g,
|
|
@@ -17512,7 +17538,7 @@ function nD({ flow: e, apiType: t, entrypointsInfo: n, endpointsInfo: a, readOnl
|
|
|
17512
17538
|
}
|
|
17513
17539
|
//#endregion
|
|
17514
17540
|
//#region src/components/PhaseCanvas/AddPolicyButton.tsx
|
|
17515
|
-
function
|
|
17541
|
+
function iD({ className: e, ...t }) {
|
|
17516
17542
|
return /* @__PURE__ */ U(i, {
|
|
17517
17543
|
variant: "link",
|
|
17518
17544
|
size: "sm",
|
|
@@ -17524,7 +17550,7 @@ function rD({ className: e, ...t }) {
|
|
|
17524
17550
|
}
|
|
17525
17551
|
//#endregion
|
|
17526
17552
|
//#region src/components/PhaseCanvas/PhaseCanvasParts.tsx
|
|
17527
|
-
function
|
|
17553
|
+
function aD({ connectors: e, role: t, actorLabel: n, compact: r, preferActorLabel: i }) {
|
|
17528
17554
|
let a = t === "entrypoint", o = a ? jt : Lt, s = a ? "entrypoint" : "endpoint";
|
|
17529
17555
|
return e.length === 0 && !i ? r ? /* @__PURE__ */ H("div", {
|
|
17530
17556
|
className: "flex shrink-0 items-center text-muted-foreground/40",
|
|
@@ -17575,7 +17601,7 @@ function iD({ connectors: e, role: t, actorLabel: n, compact: r, preferActorLabe
|
|
|
17575
17601
|
})] })] })]
|
|
17576
17602
|
});
|
|
17577
17603
|
}
|
|
17578
|
-
function
|
|
17604
|
+
function oD({ compact: e }) {
|
|
17579
17605
|
return e ? /* @__PURE__ */ H("div", {
|
|
17580
17606
|
"aria-hidden": "true",
|
|
17581
17607
|
className: "flex shrink-0 items-center text-muted-foreground/40",
|
|
@@ -17588,7 +17614,7 @@ function aD({ compact: e }) {
|
|
|
17588
17614
|
}
|
|
17589
17615
|
//#endregion
|
|
17590
17616
|
//#region src/components/PhaseCanvas/StepCard.tsx
|
|
17591
|
-
function
|
|
17617
|
+
function sD({ resolvedStep: e, isSelected: t, hasConfigErrors: n, compact: o, onClick: s, onToggleEnabled: c, onDuplicate: l, onRemove: u, className: d, dragHandleProps: f, "data-testid": p }) {
|
|
17592
17618
|
let { step: m, policy: h, unresolved: g, unresolvedMessage: _ } = e, v = h?.name ?? m.name ?? m.policy ?? "Unnamed", y = m.enabled === !1, b = !o && !!(c || l || u), [x, S] = V(!1), C = (e) => p ? `${p}-${e}` : void 0, w = [
|
|
17593
17619
|
v,
|
|
17594
17620
|
y ? "(disabled)" : "",
|
|
@@ -17761,7 +17787,7 @@ function oD({ resolvedStep: e, isSelected: t, hasConfigErrors: n, compact: o, on
|
|
|
17761
17787
|
})]
|
|
17762
17788
|
});
|
|
17763
17789
|
}
|
|
17764
|
-
function
|
|
17790
|
+
function cD({ sortableId: e, ...t }) {
|
|
17765
17791
|
let { attributes: n, listeners: r, setNodeRef: i, transform: a, transition: o, isDragging: s } = cn({ id: e });
|
|
17766
17792
|
return /* @__PURE__ */ H("div", {
|
|
17767
17793
|
ref: i,
|
|
@@ -17771,7 +17797,7 @@ function sD({ sortableId: e, ...t }) {
|
|
|
17771
17797
|
},
|
|
17772
17798
|
"data-step-index": t.resolvedStep.index,
|
|
17773
17799
|
className: I(s && "z-50 opacity-50 shadow-lg"),
|
|
17774
|
-
children: /* @__PURE__ */ H(
|
|
17800
|
+
children: /* @__PURE__ */ H(sD, {
|
|
17775
17801
|
...t,
|
|
17776
17802
|
dragHandleProps: {
|
|
17777
17803
|
...n,
|
|
@@ -17782,26 +17808,26 @@ function sD({ sortableId: e, ...t }) {
|
|
|
17782
17808
|
}
|
|
17783
17809
|
//#endregion
|
|
17784
17810
|
//#region src/components/PhaseCanvas/PhaseCanvas.tsx
|
|
17785
|
-
function
|
|
17811
|
+
function lD(e, t) {
|
|
17786
17812
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = r.left - n.left + e.scrollLeft + r.width / 2 - e.clientWidth / 2;
|
|
17787
17813
|
e.scrollTo({
|
|
17788
17814
|
left: Math.max(0, i),
|
|
17789
17815
|
behavior: "smooth"
|
|
17790
17816
|
});
|
|
17791
17817
|
}
|
|
17792
|
-
function
|
|
17818
|
+
function uD({ title: e, description: t, phase: n, startConnectors: r, endConnectors: i, startConnectorRole: a, endConnectorRole: o, startActorLabel: s, endActorLabel: c, resolvedSteps: l, disabled: u, compact: d, connectorsOptional: f, isBrowsing: p, selectedStepIndex: m, stepErrorIndices: h, onStepClick: g, onReorderSteps: _, onBrowseCatalog: v, onBrowseCategory: y, onToggleStepEnabled: b, onDuplicateStep: x, onRemoveStep: S, addPolicySlot: C, phaseGuidance: w, whisper: T, className: E }) {
|
|
17793
17819
|
let D = l.length === 0, O = W(), k = n ? O("phase", Pn(n)) : void 0, ee = d ? void 0 : k, te = !f && r.length === 0 && i.length === 0, ne = B(null), A = B(l.length), re = R(() => {
|
|
17794
17820
|
let e = ne.current?.querySelector("[data-slot=scroll-area-viewport]");
|
|
17795
17821
|
if (!e) return;
|
|
17796
17822
|
let t = null;
|
|
17797
|
-
p ? t = e.querySelector("[data-add-policy-trigger]") : m !== void 0 && (t = e.querySelector(`[data-step-index="${m}"]`)), t &&
|
|
17823
|
+
p ? t = e.querySelector("[data-add-policy-trigger]") : m !== void 0 && (t = e.querySelector(`[data-step-index="${m}"]`)), t && lD(e, t);
|
|
17798
17824
|
}, [p, m]);
|
|
17799
17825
|
dt(() => {
|
|
17800
17826
|
let e = l.length > A.current;
|
|
17801
17827
|
if (A.current = l.length, p || m !== void 0) re();
|
|
17802
17828
|
else if (e) {
|
|
17803
17829
|
let e = ne.current?.querySelector("[data-slot=scroll-area-viewport]"), t = e?.querySelector(`[data-step-index="${l.length - 1}"]`);
|
|
17804
|
-
e && t &&
|
|
17830
|
+
e && t && lD(e, t);
|
|
17805
17831
|
}
|
|
17806
17832
|
}, [
|
|
17807
17833
|
m,
|
|
@@ -17889,14 +17915,14 @@ function lD({ title: e, description: t, phase: n, startConnectors: r, endConnect
|
|
|
17889
17915
|
"aria-label": `${e}: ${s} to ${c}`,
|
|
17890
17916
|
className: I("flex min-w-0 items-center", d ? "gap-1.5" : "gap-3"),
|
|
17891
17917
|
children: [
|
|
17892
|
-
/* @__PURE__ */ H(
|
|
17918
|
+
/* @__PURE__ */ H(aD, {
|
|
17893
17919
|
connectors: r,
|
|
17894
17920
|
role: a,
|
|
17895
17921
|
actorLabel: s,
|
|
17896
17922
|
compact: d,
|
|
17897
17923
|
preferActorLabel: f
|
|
17898
17924
|
}),
|
|
17899
|
-
/* @__PURE__ */ H(
|
|
17925
|
+
/* @__PURE__ */ H(oD, { compact: d }),
|
|
17900
17926
|
/* @__PURE__ */ U(Pe, {
|
|
17901
17927
|
ref: ne,
|
|
17902
17928
|
"aria-label": "Policy steps",
|
|
@@ -17909,7 +17935,7 @@ function lD({ title: e, description: t, phase: n, startConnectors: r, endConnect
|
|
|
17909
17935
|
children: /* @__PURE__ */ H(an, {
|
|
17910
17936
|
items: ae,
|
|
17911
17937
|
strategy: on,
|
|
17912
|
-
children: /* @__PURE__ */ H(
|
|
17938
|
+
children: /* @__PURE__ */ H(fD, {
|
|
17913
17939
|
phaseTestId: k,
|
|
17914
17940
|
resolvedSteps: l,
|
|
17915
17941
|
isEmpty: D,
|
|
@@ -17927,7 +17953,7 @@ function lD({ title: e, description: t, phase: n, startConnectors: r, endConnect
|
|
|
17927
17953
|
onRemoveStep: S
|
|
17928
17954
|
})
|
|
17929
17955
|
})
|
|
17930
|
-
}) : /* @__PURE__ */ H(
|
|
17956
|
+
}) : /* @__PURE__ */ H(fD, {
|
|
17931
17957
|
phaseTestId: k,
|
|
17932
17958
|
resolvedSteps: l,
|
|
17933
17959
|
isEmpty: D,
|
|
@@ -17944,8 +17970,8 @@ function lD({ title: e, description: t, phase: n, startConnectors: r, endConnect
|
|
|
17944
17970
|
onRemoveStep: S
|
|
17945
17971
|
}), /* @__PURE__ */ H(Fe, { orientation: "horizontal" })]
|
|
17946
17972
|
}),
|
|
17947
|
-
/* @__PURE__ */ H(
|
|
17948
|
-
/* @__PURE__ */ H(
|
|
17973
|
+
/* @__PURE__ */ H(oD, { compact: d }),
|
|
17974
|
+
/* @__PURE__ */ H(aD, {
|
|
17949
17975
|
connectors: i,
|
|
17950
17976
|
role: o,
|
|
17951
17977
|
actorLabel: c,
|
|
@@ -17953,7 +17979,7 @@ function lD({ title: e, description: t, phase: n, startConnectors: r, endConnect
|
|
|
17953
17979
|
preferActorLabel: f
|
|
17954
17980
|
})
|
|
17955
17981
|
]
|
|
17956
|
-
}), !d && T && /* @__PURE__ */ H(
|
|
17982
|
+
}), !d && T && /* @__PURE__ */ H(dD, {
|
|
17957
17983
|
...T,
|
|
17958
17984
|
onBrowseCategory: y,
|
|
17959
17985
|
suggestionTestId: k && `${k}-suggestion`
|
|
@@ -17962,7 +17988,7 @@ function lD({ title: e, description: t, phase: n, startConnectors: r, endConnect
|
|
|
17962
17988
|
})]
|
|
17963
17989
|
});
|
|
17964
17990
|
}
|
|
17965
|
-
function
|
|
17991
|
+
function dD({ text: e, tone: t, suggestedCategory: n, suggestionLeadIn: r, onBrowseCategory: i, suggestionTestId: a }) {
|
|
17966
17992
|
let o = t === "suggest" && n && i;
|
|
17967
17993
|
return /* @__PURE__ */ U("div", {
|
|
17968
17994
|
className: "flex items-center gap-2 pl-1",
|
|
@@ -17978,13 +18004,13 @@ function uD({ text: e, tone: t, suggestedCategory: n, suggestionLeadIn: r, onBro
|
|
|
17978
18004
|
})]
|
|
17979
18005
|
});
|
|
17980
18006
|
}
|
|
17981
|
-
function
|
|
18007
|
+
function fD({ phaseTestId: e, resolvedSteps: t, isEmpty: n, sortable: r, compact: a, addPolicySlot: o, onBrowseCatalog: s, title: c, isBrowsing: l, selectedStepIndex: u, stepErrorIndices: d, onStepClick: f, onToggleStepEnabled: p, onDuplicateStep: m, onRemoveStep: h }) {
|
|
17982
18008
|
let g = (t) => e && `${e}-step-${t}`;
|
|
17983
18009
|
return /* @__PURE__ */ H("div", {
|
|
17984
18010
|
className: I(a ? "mx-1 px-0 py-3" : "px-1 py-3", n ? "" : I("flex w-max flex-nowrap items-center", a ? "gap-1.5" : "gap-3")),
|
|
17985
18011
|
children: n ? /* @__PURE__ */ H("div", {
|
|
17986
18012
|
className: "py-1",
|
|
17987
|
-
children: /* @__PURE__ */ H("div", { children: a && l ? /* @__PURE__ */ H(
|
|
18013
|
+
children: /* @__PURE__ */ H("div", { children: a && l ? /* @__PURE__ */ H(pD, {}) : o ?? (s ? /* @__PURE__ */ H(iD, {
|
|
17988
18014
|
onClick: s,
|
|
17989
18015
|
"aria-label": `Add policy to ${c}`,
|
|
17990
18016
|
"data-add-policy-trigger": !0
|
|
@@ -17992,7 +18018,7 @@ function dD({ phaseTestId: e, resolvedSteps: t, isEmpty: n, sortable: r, compact
|
|
|
17992
18018
|
className: "text-sm text-muted-foreground italic",
|
|
17993
18019
|
children: "No policies configured"
|
|
17994
18020
|
})) })
|
|
17995
|
-
}) : /* @__PURE__ */ U(mt, { children: [t.map((e) => r ? /* @__PURE__ */ H(
|
|
18021
|
+
}) : /* @__PURE__ */ U(mt, { children: [t.map((e) => r ? /* @__PURE__ */ H(cD, {
|
|
17996
18022
|
sortableId: `step-${e.index}`,
|
|
17997
18023
|
resolvedStep: e,
|
|
17998
18024
|
"data-testid": g(e.index),
|
|
@@ -18005,7 +18031,7 @@ function dD({ phaseTestId: e, resolvedSteps: t, isEmpty: n, sortable: r, compact
|
|
|
18005
18031
|
onRemove: !a && h ? () => h(e.index) : void 0
|
|
18006
18032
|
}, e.step.policy ? `${e.step.policy}-${e.index}` : e.index) : /* @__PURE__ */ H("div", {
|
|
18007
18033
|
"data-step-index": e.index,
|
|
18008
|
-
children: /* @__PURE__ */ H(
|
|
18034
|
+
children: /* @__PURE__ */ H(sD, {
|
|
18009
18035
|
resolvedStep: e,
|
|
18010
18036
|
"data-testid": g(e.index),
|
|
18011
18037
|
isSelected: u === e.index,
|
|
@@ -18016,7 +18042,7 @@ function dD({ phaseTestId: e, resolvedSteps: t, isEmpty: n, sortable: r, compact
|
|
|
18016
18042
|
onDuplicate: !a && m ? () => m(e.index) : void 0,
|
|
18017
18043
|
onRemove: !a && h ? () => h(e.index) : void 0
|
|
18018
18044
|
})
|
|
18019
|
-
}, e.step.policy ? `${e.step.policy}-${e.index}` : e.index)), a && l ? /* @__PURE__ */ H(
|
|
18045
|
+
}, e.step.policy ? `${e.step.policy}-${e.index}` : e.index)), a && l ? /* @__PURE__ */ H(pD, {}) : o ?? (s && /* @__PURE__ */ H(i, {
|
|
18020
18046
|
variant: l ? "default" : "outline",
|
|
18021
18047
|
size: a ? "icon-xs" : "icon-sm",
|
|
18022
18048
|
className: "shrink-0",
|
|
@@ -18027,7 +18053,7 @@ function dD({ phaseTestId: e, resolvedSteps: t, isEmpty: n, sortable: r, compact
|
|
|
18027
18053
|
}))] })
|
|
18028
18054
|
});
|
|
18029
18055
|
}
|
|
18030
|
-
function
|
|
18056
|
+
function pD() {
|
|
18031
18057
|
return /* @__PURE__ */ H("div", {
|
|
18032
18058
|
"aria-hidden": !0,
|
|
18033
18059
|
className: "h-7 w-10 shrink-0 rounded-md border border-dashed border-primary/40 bg-primary/5",
|
|
@@ -18036,7 +18062,7 @@ function fD() {
|
|
|
18036
18062
|
}
|
|
18037
18063
|
//#endregion
|
|
18038
18064
|
//#region src/components/PhaseCanvas/PhaseCanvasSkeleton.tsx
|
|
18039
|
-
function
|
|
18065
|
+
function mD() {
|
|
18040
18066
|
return /* @__PURE__ */ U("div", {
|
|
18041
18067
|
className: "w-full space-y-2",
|
|
18042
18068
|
children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H(F, { className: "h-4 w-20 rounded-sm" }), /* @__PURE__ */ H(F, { className: "mt-1 h-3 w-32 rounded-sm" })] }), /* @__PURE__ */ H("div", {
|
|
@@ -18063,21 +18089,21 @@ function pD() {
|
|
|
18063
18089
|
})]
|
|
18064
18090
|
});
|
|
18065
18091
|
}
|
|
18066
|
-
function
|
|
18092
|
+
function hD() {
|
|
18067
18093
|
return /* @__PURE__ */ U("div", {
|
|
18068
18094
|
className: "flex flex-col items-center gap-6",
|
|
18069
18095
|
role: "status",
|
|
18070
18096
|
"aria-label": "Loading flow details",
|
|
18071
18097
|
"data-testid": W()("loading"),
|
|
18072
|
-
children: [/* @__PURE__ */ H(
|
|
18098
|
+
children: [/* @__PURE__ */ H(mD, {}), /* @__PURE__ */ H(mD, {})]
|
|
18073
18099
|
});
|
|
18074
18100
|
}
|
|
18075
18101
|
//#endregion
|
|
18076
18102
|
//#region src/lib/connector-filter.ts
|
|
18077
|
-
function
|
|
18103
|
+
function gD(e, t, n) {
|
|
18078
18104
|
return t === null ? e : n && n.length > 0 && !n.includes(t) ? [] : e.filter((e) => e.supportedModes.includes(t));
|
|
18079
18105
|
}
|
|
18080
|
-
function
|
|
18106
|
+
function _D(e, t) {
|
|
18081
18107
|
let n = e?.find((e) => e.type === "CHANNEL");
|
|
18082
18108
|
return {
|
|
18083
18109
|
filteredEntrypoints: n?.entrypoints && n.entrypoints.length > 0 ? t.filter((e) => n.entrypoints.includes(e.type)) : t,
|
|
@@ -18086,7 +18112,7 @@ function gD(e, t) {
|
|
|
18086
18112
|
}
|
|
18087
18113
|
//#endregion
|
|
18088
18114
|
//#region src/components/PhaseCanvas/phase-examples.ts
|
|
18089
|
-
var
|
|
18115
|
+
var vD = {
|
|
18090
18116
|
"REQUEST:PROXY": "Authenticate callers and protect your backend before requests pass through.",
|
|
18091
18117
|
"RESPONSE:PROXY": "Shape what consumers receive — transform formats and protect sensitive data.",
|
|
18092
18118
|
"REQUEST:A2A_PROXY": "Control which skills can be delegated and validate inputs before they reach your agents.",
|
|
@@ -18099,22 +18125,22 @@ var _D = {
|
|
|
18099
18125
|
"INTERACT:NATIVE": "Control traffic and filter content during ongoing interactions.",
|
|
18100
18126
|
"PUBLISH:NATIVE": "Validate and filter messages before they reach the broker.",
|
|
18101
18127
|
"SUBSCRIBE:NATIVE": "Transform and protect messages before consumers receive them."
|
|
18102
|
-
},
|
|
18103
|
-
function
|
|
18104
|
-
let r = `${e}:${
|
|
18105
|
-
return n === "ORGANIZATION" &&
|
|
18128
|
+
}, yD = { "REQUEST:PROXY": "Authenticate callers and protect every API before requests pass through." }, bD = new Set(["LLM_PROXY", "MCP_PROXY"]);
|
|
18129
|
+
function xD(e, t, n = "API") {
|
|
18130
|
+
let r = `${e}:${bD.has(t) ? "PROXY" : t}`;
|
|
18131
|
+
return n === "ORGANIZATION" && yD[r] ? yD[r] : vD[r];
|
|
18106
18132
|
}
|
|
18107
18133
|
//#endregion
|
|
18108
18134
|
//#region src/components/PhaseCanvas/use-phase-row-data.ts
|
|
18109
|
-
function
|
|
18110
|
-
let d = z(() =>
|
|
18135
|
+
function SD({ phase: e, apiType: t, flow: n, entrypointsInfo: r, endpointsInfo: i, genericPolicies: a, policies: o, sharedPolicyGroups: s, stepsWithErrors: c, activeModes: l, scope: u = "API" }) {
|
|
18136
|
+
let d = z(() => jE(e, t, u), [
|
|
18111
18137
|
e,
|
|
18112
18138
|
t,
|
|
18113
18139
|
u
|
|
18114
18140
|
]);
|
|
18115
18141
|
return {
|
|
18116
18142
|
config: d,
|
|
18117
|
-
resolvedSteps: z(() => n ?
|
|
18143
|
+
resolvedSteps: z(() => n ? GE(n, e, a) : [], [
|
|
18118
18144
|
n,
|
|
18119
18145
|
e,
|
|
18120
18146
|
a
|
|
@@ -18128,13 +18154,13 @@ function xD({ phase: e, apiType: t, flow: n, entrypointsInfo: r, endpointsInfo:
|
|
|
18128
18154
|
}
|
|
18129
18155
|
return t.size > 0 ? t : void 0;
|
|
18130
18156
|
}, [c, e]),
|
|
18131
|
-
startConnectors: z(() =>
|
|
18157
|
+
startConnectors: z(() => gD(d.startConnectorRole === "entrypoint" ? r : i, d.connectorFilterMode, l), [
|
|
18132
18158
|
d,
|
|
18133
18159
|
r,
|
|
18134
18160
|
i,
|
|
18135
18161
|
l
|
|
18136
18162
|
]),
|
|
18137
|
-
endConnectors: z(() =>
|
|
18163
|
+
endConnectors: z(() => gD(d.endConnectorRole === "entrypoint" ? r : i, d.connectorFilterMode, l), [
|
|
18138
18164
|
d,
|
|
18139
18165
|
r,
|
|
18140
18166
|
i,
|
|
@@ -18151,8 +18177,8 @@ function xD({ phase: e, apiType: t, flow: n, entrypointsInfo: r, endpointsInfo:
|
|
|
18151
18177
|
}
|
|
18152
18178
|
//#endregion
|
|
18153
18179
|
//#region src/components/PhaseCanvas/PhaseLayout.tsx
|
|
18154
|
-
function
|
|
18155
|
-
let { config: S, resolvedSteps: C, phaseStepErrors: w, startConnectors: T, endConnectors: E, phasePolicies: D } =
|
|
18180
|
+
function CD({ phase: e, apiType: t, scope: n, flow: r, entrypointsInfo: a, endpointsInfo: o, genericPolicies: s, policies: c, sharedPolicyGroups: l, activeModes: u, isBrowsing: d, selectedStepIndex: f, stepsWithErrors: p, onBrowseCatalog: m, onBrowseCategory: h, onQuickAddPolicy: g, onStepClick: _, onReorderSteps: v, onToggleStepEnabled: y, onDuplicateStep: b, onRemoveStep: x }) {
|
|
18181
|
+
let { config: S, resolvedSteps: C, phaseStepErrors: w, startConnectors: T, endConnectors: E, phasePolicies: D } = SD({
|
|
18156
18182
|
phase: e,
|
|
18157
18183
|
apiType: t,
|
|
18158
18184
|
scope: n,
|
|
@@ -18164,38 +18190,39 @@ function SD({ phase: e, apiType: t, scope: n, flow: r, entrypointsInfo: a, endpo
|
|
|
18164
18190
|
sharedPolicyGroups: l,
|
|
18165
18191
|
stepsWithErrors: p,
|
|
18166
18192
|
activeModes: u
|
|
18167
|
-
}), O = R(() => m?.(e), [m, e]), k = R((t) => _?.(e, t), [_, e]), ee = R((t, n) => v?.(e, t, n), [v, e]), te = R((t, n) => y?.(e, t, n), [y, e]), ne = R((t) => b?.(e, t), [b, e]), A = R((t) => x?.(e, t), [x, e]), [re, ie] = V(!1), ae = R((t) => g?.(e, t), [g, e]), oe = W()("phase", Pn(e), "add"),
|
|
18193
|
+
}), O = R(() => m?.(e), [m, e]), k = R((t) => _?.(e, t), [_, e]), ee = R((t, n) => v?.(e, t, n), [v, e]), te = R((t, n) => y?.(e, t, n), [y, e]), ne = R((t) => b?.(e, t), [b, e]), A = R((t) => x?.(e, t), [x, e]), [re, ie] = V(!1), ae = R((t) => g?.(e, t), [g, e]), oe = W(), se = oe("phase", Pn(e), "add"), ce = oe("phase", Pn(e), "quick-insert"), le = z(() => xD(e, t, n), [
|
|
18168
18194
|
e,
|
|
18169
18195
|
t,
|
|
18170
18196
|
n
|
|
18171
|
-
]),
|
|
18197
|
+
]), ue = z(() => yf(D), [D]), j = z(() => C.length === 0 ? gf(e, t, ue, n) : hf(e, t, C, ue, n), [
|
|
18172
18198
|
e,
|
|
18173
18199
|
t,
|
|
18174
18200
|
C,
|
|
18175
|
-
|
|
18201
|
+
ue,
|
|
18176
18202
|
n
|
|
18177
|
-
]),
|
|
18203
|
+
]), de = R((t) => h?.(e, t), [h, e]), fe = m ? /* @__PURE__ */ H("div", {
|
|
18178
18204
|
"data-add-policy-trigger": !0,
|
|
18179
|
-
children: /* @__PURE__ */ H(
|
|
18205
|
+
children: /* @__PURE__ */ H(HT, {
|
|
18180
18206
|
policies: D,
|
|
18181
18207
|
open: re,
|
|
18182
18208
|
onOpenChange: ie,
|
|
18183
18209
|
onAddPolicy: ae,
|
|
18184
18210
|
onBrowseCatalog: O,
|
|
18185
|
-
|
|
18211
|
+
"data-testid": ce,
|
|
18212
|
+
children: C.length === 0 ? /* @__PURE__ */ H(iD, {
|
|
18186
18213
|
"aria-label": `Add policy to ${S.title}`,
|
|
18187
|
-
"data-testid":
|
|
18214
|
+
"data-testid": se
|
|
18188
18215
|
}) : /* @__PURE__ */ H(i, {
|
|
18189
18216
|
variant: d ? "default" : "outline",
|
|
18190
18217
|
size: "icon-sm",
|
|
18191
18218
|
className: "shrink-0",
|
|
18192
18219
|
"aria-label": `Add policy to ${S.title}`,
|
|
18193
|
-
"data-testid":
|
|
18220
|
+
"data-testid": se,
|
|
18194
18221
|
children: /* @__PURE__ */ H(Ft, { className: "size-4" })
|
|
18195
18222
|
})
|
|
18196
18223
|
})
|
|
18197
18224
|
}) : void 0;
|
|
18198
|
-
return /* @__PURE__ */ H(
|
|
18225
|
+
return /* @__PURE__ */ H(uD, {
|
|
18199
18226
|
title: S.title,
|
|
18200
18227
|
description: S.description,
|
|
18201
18228
|
phase: e,
|
|
@@ -18214,19 +18241,19 @@ function SD({ phase: e, apiType: t, scope: n, flow: r, entrypointsInfo: a, endpo
|
|
|
18214
18241
|
onStepClick: _ ? k : void 0,
|
|
18215
18242
|
onReorderSteps: v ? ee : void 0,
|
|
18216
18243
|
onBrowseCatalog: m ? O : void 0,
|
|
18217
|
-
onBrowseCategory: h ?
|
|
18244
|
+
onBrowseCategory: h ? de : void 0,
|
|
18218
18245
|
onToggleStepEnabled: y ? te : void 0,
|
|
18219
18246
|
onDuplicateStep: b ? ne : void 0,
|
|
18220
18247
|
onRemoveStep: x ? A : void 0,
|
|
18221
|
-
addPolicySlot:
|
|
18222
|
-
phaseGuidance:
|
|
18223
|
-
whisper:
|
|
18248
|
+
addPolicySlot: fe,
|
|
18249
|
+
phaseGuidance: le,
|
|
18250
|
+
whisper: j ?? void 0
|
|
18224
18251
|
});
|
|
18225
18252
|
}
|
|
18226
|
-
function
|
|
18253
|
+
function wD({ phases: e, apiType: t, scope: n, flow: r, entrypointsInfo: i, endpointsInfo: a, genericPolicies: o, policies: s, sharedPolicyGroups: c, activeModes: l, browsePhase: u, selectedStep: d, stepsWithErrors: f, onBrowseCatalog: p, onBrowseCategory: m, onQuickAddPolicy: h, onStepClick: g, onReorderSteps: _, onToggleStepEnabled: v, onDuplicateStep: y, onRemoveStep: b }) {
|
|
18227
18254
|
return /* @__PURE__ */ H("div", {
|
|
18228
18255
|
className: "flex flex-col gap-6",
|
|
18229
|
-
children: e.map((e) => /* @__PURE__ */ H(
|
|
18256
|
+
children: e.map((e) => /* @__PURE__ */ H(CD, {
|
|
18230
18257
|
phase: e,
|
|
18231
18258
|
apiType: t,
|
|
18232
18259
|
scope: n,
|
|
@@ -18251,21 +18278,21 @@ function CD({ phases: e, apiType: t, scope: n, flow: r, entrypointsInfo: i, endp
|
|
|
18251
18278
|
}, e))
|
|
18252
18279
|
});
|
|
18253
18280
|
}
|
|
18254
|
-
function
|
|
18255
|
-
let x = z(() =>
|
|
18281
|
+
function TD({ loading: e, apiType: t, scope: n, flow: r, entrypointsInfo: i, endpointsInfo: a, genericPolicies: o, policies: s, sharedPolicyGroups: c, browsePhase: l, selectedStep: u, stepsWithErrors: d, activePhase: f, onBrowseCatalog: p, onBrowseCategory: m, onQuickAddPolicy: h, onStepClick: g, onReorderSteps: _, onToggleStepEnabled: v, onDuplicateStep: y, onRemoveStep: b }) {
|
|
18282
|
+
let x = z(() => PE(t), [t]), S = W(), C = z(() => {
|
|
18256
18283
|
if (!(x.type !== "tabbed" || !f)) return x.tabs.find((e) => e.phases.includes(f))?.label;
|
|
18257
|
-
}, [x, f]), w = z(() => t === "MESSAGE" ?
|
|
18284
|
+
}, [x, f]), w = z(() => t === "MESSAGE" ? _D(r?.selectors, i) : void 0, [
|
|
18258
18285
|
t,
|
|
18259
18286
|
r?.selectors,
|
|
18260
18287
|
i
|
|
18261
18288
|
]);
|
|
18262
|
-
if (e) return /* @__PURE__ */ H(
|
|
18289
|
+
if (e) return /* @__PURE__ */ H(hD, {});
|
|
18263
18290
|
if (x.type === "flat") return x.phases.length === 0 ? /* @__PURE__ */ H("p", {
|
|
18264
18291
|
className: "text-sm text-muted-foreground",
|
|
18265
18292
|
children: "No phases available for this API type."
|
|
18266
18293
|
}) : /* @__PURE__ */ H("div", {
|
|
18267
18294
|
className: "flex flex-col gap-4",
|
|
18268
|
-
children: /* @__PURE__ */ H(
|
|
18295
|
+
children: /* @__PURE__ */ H(wD, {
|
|
18269
18296
|
phases: x.phases,
|
|
18270
18297
|
apiType: t,
|
|
18271
18298
|
scope: n,
|
|
@@ -18304,7 +18331,7 @@ function wD({ loading: e, apiType: t, scope: n, flow: r, entrypointsInfo: i, end
|
|
|
18304
18331
|
/* @__PURE__ */ H(Ye, {
|
|
18305
18332
|
value: e.label,
|
|
18306
18333
|
className: "pt-4",
|
|
18307
|
-
children: /* @__PURE__ */ H(
|
|
18334
|
+
children: /* @__PURE__ */ H(wD, {
|
|
18308
18335
|
phases: e.phases,
|
|
18309
18336
|
apiType: t,
|
|
18310
18337
|
flow: r,
|
|
@@ -18329,7 +18356,7 @@ function wD({ loading: e, apiType: t, scope: n, flow: r, entrypointsInfo: i, end
|
|
|
18329
18356
|
/* @__PURE__ */ H(Ye, {
|
|
18330
18357
|
value: n.label,
|
|
18331
18358
|
className: "pt-4",
|
|
18332
|
-
children: /* @__PURE__ */ H(
|
|
18359
|
+
children: /* @__PURE__ */ H(wD, {
|
|
18333
18360
|
phases: n.phases,
|
|
18334
18361
|
apiType: t,
|
|
18335
18362
|
flow: r,
|
|
@@ -18367,7 +18394,7 @@ function wD({ loading: e, apiType: t, scope: n, flow: r, entrypointsInfo: i, end
|
|
|
18367
18394
|
}), x.tabs.map((e) => /* @__PURE__ */ H(Ye, {
|
|
18368
18395
|
value: e.label,
|
|
18369
18396
|
className: "pt-4",
|
|
18370
|
-
children: /* @__PURE__ */ H(
|
|
18397
|
+
children: /* @__PURE__ */ H(wD, {
|
|
18371
18398
|
phases: e.phases,
|
|
18372
18399
|
apiType: t,
|
|
18373
18400
|
flow: r,
|
|
@@ -18391,8 +18418,8 @@ function wD({ loading: e, apiType: t, scope: n, flow: r, entrypointsInfo: i, end
|
|
|
18391
18418
|
}, e.label))]
|
|
18392
18419
|
});
|
|
18393
18420
|
}
|
|
18394
|
-
function
|
|
18395
|
-
let { config: v, resolvedSteps: y, phaseStepErrors: b, startConnectors: x, endConnectors: S, phasePolicies: C } =
|
|
18421
|
+
function ED({ apiType: e, scope: t, phase: n, flow: r, entrypointsInfo: a, endpointsInfo: o, genericPolicies: s, policies: c, sharedPolicyGroups: l, selectedStepIndex: u, stepsWithErrors: d, isBrowsing: f, onStepClick: p, onReorderSteps: m, onBrowseCatalog: h, onQuickAddPolicy: g, className: _ }) {
|
|
18422
|
+
let { config: v, resolvedSteps: y, phaseStepErrors: b, startConnectors: x, endConnectors: S, phasePolicies: C } = SD({
|
|
18396
18423
|
phase: n,
|
|
18397
18424
|
apiType: e,
|
|
18398
18425
|
scope: t,
|
|
@@ -18405,12 +18432,13 @@ function TD({ apiType: e, scope: t, phase: n, flow: r, entrypointsInfo: a, endpo
|
|
|
18405
18432
|
stepsWithErrors: d
|
|
18406
18433
|
}), w = R((e) => p?.(n, e), [p, n]), T = R((e, t) => m?.(n, e, t), [m, n]), E = R(() => h?.(n), [h, n]), [D, O] = V(!1), k = R((e) => g?.(n, e), [g, n]), ee = W(), te = h ? /* @__PURE__ */ H("div", {
|
|
18407
18434
|
"data-add-policy-trigger": !0,
|
|
18408
|
-
children: /* @__PURE__ */ H(
|
|
18435
|
+
children: /* @__PURE__ */ H(HT, {
|
|
18409
18436
|
policies: C,
|
|
18410
18437
|
open: D,
|
|
18411
18438
|
onOpenChange: O,
|
|
18412
18439
|
onAddPolicy: k,
|
|
18413
18440
|
onBrowseCatalog: E,
|
|
18441
|
+
"data-testid": ee("phase", Pn(n), "quick-insert"),
|
|
18414
18442
|
children: /* @__PURE__ */ H(i, {
|
|
18415
18443
|
variant: "outline",
|
|
18416
18444
|
size: "icon-xs",
|
|
@@ -18423,7 +18451,7 @@ function TD({ apiType: e, scope: t, phase: n, flow: r, entrypointsInfo: a, endpo
|
|
|
18423
18451
|
}) : void 0;
|
|
18424
18452
|
return /* @__PURE__ */ H("div", {
|
|
18425
18453
|
className: I("flex min-w-0 items-center gap-2", _),
|
|
18426
|
-
children: /* @__PURE__ */ H(
|
|
18454
|
+
children: /* @__PURE__ */ H(uD, {
|
|
18427
18455
|
title: v.title,
|
|
18428
18456
|
description: v.description,
|
|
18429
18457
|
phase: n,
|
|
@@ -18449,7 +18477,7 @@ function TD({ apiType: e, scope: t, phase: n, flow: r, entrypointsInfo: a, endpo
|
|
|
18449
18477
|
}
|
|
18450
18478
|
//#endregion
|
|
18451
18479
|
//#region src/components/PolicyStudioLayout/PolicyStudioLayout.tsx
|
|
18452
|
-
function
|
|
18480
|
+
function DD({ sidebar: e, infoBar: t, children: n, className: r }) {
|
|
18453
18481
|
return /* @__PURE__ */ U("div", {
|
|
18454
18482
|
"data-testid": W()(),
|
|
18455
18483
|
className: I("grid h-full overflow-hidden", r),
|
|
@@ -18475,7 +18503,7 @@ function ED({ sidebar: e, infoBar: t, children: n, className: r }) {
|
|
|
18475
18503
|
}
|
|
18476
18504
|
//#endregion
|
|
18477
18505
|
//#region src/components/PolicyStudio/EducationalEmptyState.tsx
|
|
18478
|
-
var
|
|
18506
|
+
var OD = {
|
|
18479
18507
|
tagline: "Control how requests are processed across every API in your organization. Platform policies run on the gateway, on the request and response phases, before and after each API's own flows.",
|
|
18480
18508
|
diagramHeading: "How requests flow through the gateway",
|
|
18481
18509
|
diagram: [
|
|
@@ -18499,7 +18527,7 @@ var DD = {
|
|
|
18499
18527
|
addLabel: zf.addLabel
|
|
18500
18528
|
}]
|
|
18501
18529
|
};
|
|
18502
|
-
function
|
|
18530
|
+
function kD(e) {
|
|
18503
18531
|
switch (e) {
|
|
18504
18532
|
case "MCP_PROXY": return {
|
|
18505
18533
|
tagline: "Control how MCP requests are processed by adding policies to your execution pipeline. Policies handle authentication, rate limiting, and data transformation at the gateway level.",
|
|
@@ -18624,7 +18652,7 @@ function OD(e) {
|
|
|
18624
18652
|
};
|
|
18625
18653
|
}
|
|
18626
18654
|
}
|
|
18627
|
-
function
|
|
18655
|
+
function AD({ nodes: e }) {
|
|
18628
18656
|
return /* @__PURE__ */ H("div", {
|
|
18629
18657
|
className: "flex items-center justify-center gap-1.5 py-3",
|
|
18630
18658
|
children: e.map((e, t) => /* @__PURE__ */ U("span", {
|
|
@@ -18636,13 +18664,13 @@ function kD({ nodes: e }) {
|
|
|
18636
18664
|
}, t))
|
|
18637
18665
|
});
|
|
18638
18666
|
}
|
|
18639
|
-
var
|
|
18667
|
+
var jD = {
|
|
18640
18668
|
plan: "plans",
|
|
18641
18669
|
common: "common",
|
|
18642
18670
|
mcp_method: "mcp-method"
|
|
18643
18671
|
};
|
|
18644
|
-
function
|
|
18645
|
-
let r = t === "ORGANIZATION" ?
|
|
18672
|
+
function MD({ apiType: e, scope: t = "API", onAddFlow: n }) {
|
|
18673
|
+
let r = t === "ORGANIZATION" ? OD : kD(e), a = W(), o = (e) => t === "ORGANIZATION" ? "platform" : jD[e];
|
|
18646
18674
|
return /* @__PURE__ */ H("div", {
|
|
18647
18675
|
className: "flex h-full items-start justify-center pt-12",
|
|
18648
18676
|
"data-testid": a("empty"),
|
|
@@ -18671,7 +18699,7 @@ function jD({ apiType: e, scope: t = "API", onAddFlow: n }) {
|
|
|
18671
18699
|
children: [/* @__PURE__ */ H("p", {
|
|
18672
18700
|
className: "mb-1 text-center text-xs font-medium text-muted-foreground",
|
|
18673
18701
|
children: r.diagramHeading
|
|
18674
|
-
}), /* @__PURE__ */ H(
|
|
18702
|
+
}), /* @__PURE__ */ H(AD, { nodes: r.diagram })]
|
|
18675
18703
|
}),
|
|
18676
18704
|
/* @__PURE__ */ H("div", {
|
|
18677
18705
|
className: "flex w-full gap-3",
|
|
@@ -18709,21 +18737,21 @@ function jD({ apiType: e, scope: t = "API", onAddFlow: n }) {
|
|
|
18709
18737
|
}
|
|
18710
18738
|
//#endregion
|
|
18711
18739
|
//#region src/components/PolicyStudio/StepActionSlot.tsx
|
|
18712
|
-
function
|
|
18713
|
-
let s = z(() => !e || t == null || n == null ? null : (o ??
|
|
18740
|
+
function ND(e, t, n, r, i, a, o) {
|
|
18741
|
+
let s = z(() => !e || t == null || n == null ? null : (o ?? GE(e, t, r))[n]?.policy ?? null, [
|
|
18714
18742
|
e,
|
|
18715
18743
|
t,
|
|
18716
18744
|
n,
|
|
18717
18745
|
r,
|
|
18718
18746
|
o
|
|
18719
18747
|
]);
|
|
18720
|
-
return z(() => s ?
|
|
18748
|
+
return z(() => s ? KE(s, i, a) : null, [
|
|
18721
18749
|
s,
|
|
18722
18750
|
i,
|
|
18723
18751
|
a
|
|
18724
18752
|
]);
|
|
18725
18753
|
}
|
|
18726
|
-
function
|
|
18754
|
+
function PD({ flow: e, phase: t, stepIndex: n, genericPolicies: r, policies: a, sharedPolicyGroups: o, docsLayout: s, showBackButton: c = !0, onClose: l, onRemove: u, onDuplicate: d, onToggleEnabled: f, onStepChange: p, onValidityChange: m }) {
|
|
18727
18755
|
let h = R((e) => p?.(t, n, e), [
|
|
18728
18756
|
p,
|
|
18729
18757
|
t,
|
|
@@ -18745,11 +18773,11 @@ function ND({ flow: e, phase: t, stepIndex: n, genericPolicies: r, policies: a,
|
|
|
18745
18773
|
f,
|
|
18746
18774
|
t,
|
|
18747
18775
|
n
|
|
18748
|
-
]), b = z(() =>
|
|
18776
|
+
]), b = z(() => GE(e, t, r), [
|
|
18749
18777
|
e,
|
|
18750
18778
|
t,
|
|
18751
18779
|
r
|
|
18752
|
-
]), x = b[n], S =
|
|
18780
|
+
]), x = b[n], S = ND(e, t, n, r, a, o, b), C = S?.policy ?? null, w = S?.prerequisiteMessage;
|
|
18753
18781
|
if (!x) return null;
|
|
18754
18782
|
if (x.unresolved || !x.policy) {
|
|
18755
18783
|
let e = x.step.name ?? x.step.policy ?? "Unknown policy";
|
|
@@ -18796,7 +18824,7 @@ function ND({ flow: e, phase: t, stepIndex: n, genericPolicies: r, policies: a,
|
|
|
18796
18824
|
})]
|
|
18797
18825
|
});
|
|
18798
18826
|
}
|
|
18799
|
-
return /* @__PURE__ */ H(
|
|
18827
|
+
return /* @__PURE__ */ H(tE, {
|
|
18800
18828
|
policy: C,
|
|
18801
18829
|
step: x.step,
|
|
18802
18830
|
flowPhase: t,
|
|
@@ -18814,10 +18842,10 @@ function ND({ flow: e, phase: t, stepIndex: n, genericPolicies: r, policies: a,
|
|
|
18814
18842
|
}
|
|
18815
18843
|
//#endregion
|
|
18816
18844
|
//#region src/components/PolicyStudio/PolicyStudio.tsx
|
|
18817
|
-
function
|
|
18845
|
+
function FD(e, t, n) {
|
|
18818
18846
|
return `${e}:${t}:${n}`;
|
|
18819
18847
|
}
|
|
18820
|
-
function
|
|
18848
|
+
function ID(e) {
|
|
18821
18849
|
let t = e.split(":");
|
|
18822
18850
|
if (t.length !== 3) throw Error(`Invalid step validity key: ${e}`);
|
|
18823
18851
|
return {
|
|
@@ -18826,139 +18854,139 @@ function FD(e) {
|
|
|
18826
18854
|
stepIndex: t[2]
|
|
18827
18855
|
};
|
|
18828
18856
|
}
|
|
18829
|
-
function
|
|
18857
|
+
function LD(e, t) {
|
|
18830
18858
|
return `${e}:${t}`;
|
|
18831
18859
|
}
|
|
18832
|
-
function
|
|
18860
|
+
function RD({ className: e, defaultSelectedFlowId: t, "data-testid": n = An, ...r }) {
|
|
18833
18861
|
return /* @__PURE__ */ H(zn, {
|
|
18834
18862
|
...r,
|
|
18835
18863
|
"data-testid": n,
|
|
18836
|
-
children: /* @__PURE__ */ H(
|
|
18864
|
+
children: /* @__PURE__ */ H(zD, {
|
|
18837
18865
|
className: e,
|
|
18838
18866
|
defaultSelectedFlowId: t
|
|
18839
18867
|
})
|
|
18840
18868
|
});
|
|
18841
18869
|
}
|
|
18842
|
-
function
|
|
18843
|
-
let n = Bn(), { apiType: a, scope: o, organizationTags: s, policies: c, sharedPolicyGroups: l, plans: u, commonFlows: d, allMcpFlows: f, entrypointsInfo: p, endpointsInfo: m, readOnly: h, loading: g, flowExecution: _, fetchPolicySchema: v, onSave: y } = n,
|
|
18844
|
-
(
|
|
18845
|
-
let [
|
|
18846
|
-
|
|
18847
|
-
let a =
|
|
18870
|
+
function zD({ className: e, defaultSelectedFlowId: t }) {
|
|
18871
|
+
let n = Bn(), { apiType: a, scope: o, organizationTags: s, policies: c, sharedPolicyGroups: l, plans: u, commonFlows: d, allMcpFlows: f, entrypointsInfo: p, endpointsInfo: m, readOnly: h, loading: g, flowExecution: _, fetchPolicySchema: v, onSave: y } = n, b = W(), [x, { isSideBySide: S }] = rE(), [C, w] = V(t), [T, E] = V({ mode: "closed" }), [D, O] = V(null), k = T.mode === "catalog" ? T.phase : null, ee = T.mode === "catalog" ? T.initialCategories : void 0, [te, ne] = V(null), [A, re] = V(null), [ie, ae] = V(null), [oe, se] = V(_), [ce, le] = V(_);
|
|
18872
|
+
(ce?.mode !== _?.mode || ce?.matchRequired !== _?.matchRequired) && (le(_), se(_));
|
|
18873
|
+
let [ue, j] = V(/* @__PURE__ */ new Map()), de = R((e, t, n, r) => {
|
|
18874
|
+
j((i) => {
|
|
18875
|
+
let a = FD(e, t, n);
|
|
18848
18876
|
if (i.get(a) === r) return i;
|
|
18849
18877
|
let o = new Map(i);
|
|
18850
18878
|
return o.set(a, r), o;
|
|
18851
18879
|
});
|
|
18852
|
-
}, []),
|
|
18880
|
+
}, []), fe = z(() => {
|
|
18853
18881
|
let e = /* @__PURE__ */ new Set();
|
|
18854
|
-
for (let [t, n] of
|
|
18882
|
+
for (let [t, n] of ue) n || e.add(ID(t).flowId);
|
|
18855
18883
|
return e;
|
|
18856
|
-
}, [
|
|
18857
|
-
if (!
|
|
18884
|
+
}, [ue]), pe = z(() => {
|
|
18885
|
+
if (!C) return;
|
|
18858
18886
|
let e = /* @__PURE__ */ new Set();
|
|
18859
|
-
for (let [t, n] of
|
|
18887
|
+
for (let [t, n] of ue) {
|
|
18860
18888
|
if (n) continue;
|
|
18861
|
-
let { flowId: r, phase: i, stepIndex: a } =
|
|
18862
|
-
r ===
|
|
18889
|
+
let { flowId: r, phase: i, stepIndex: a } = ID(t);
|
|
18890
|
+
r === C && e.add(LD(i, Number(a)));
|
|
18863
18891
|
}
|
|
18864
18892
|
return e.size > 0 ? e : void 0;
|
|
18865
|
-
}, [
|
|
18893
|
+
}, [ue, C]), me = z(() => o === "ORGANIZATION" ? dd(d) : a === "MCP_PROXY" ? md(u, f) : ud(u, d), [
|
|
18866
18894
|
o,
|
|
18867
18895
|
a,
|
|
18868
18896
|
u,
|
|
18869
18897
|
d,
|
|
18870
18898
|
f
|
|
18871
|
-
]), [
|
|
18872
|
-
!g &&
|
|
18873
|
-
let
|
|
18874
|
-
!g &&
|
|
18875
|
-
let
|
|
18876
|
-
let t =
|
|
18877
|
-
t &&
|
|
18878
|
-
}, [
|
|
18879
|
-
|
|
18880
|
-
let { canSave:
|
|
18881
|
-
initialGroups:
|
|
18882
|
-
currentGroups:
|
|
18899
|
+
]), [he, M, ge] = fE(me), _e = z(() => he.flatMap((e) => e.flows).at(0)?._id, [he]);
|
|
18900
|
+
!g && C === void 0 && _e && w(_e);
|
|
18901
|
+
let ve = z(() => he.flatMap((e) => e.flows).some((e) => e._id === C), [he, C]);
|
|
18902
|
+
!g && C !== void 0 && !ve && w(void 0);
|
|
18903
|
+
let N = z(() => he.filter((e) => e.kind === "plan"), [he]), ye = z(() => he.every((e) => e.flows.length === 0), [he]), be = R((e) => {
|
|
18904
|
+
let t = he.find((t) => t.kind === e);
|
|
18905
|
+
t && re(t);
|
|
18906
|
+
}, [he]), P = z(() => he.flatMap((e) => e.flows).find((e) => e._id === C), [he, C]), xe = z(() => BE(c, l), [c, l]);
|
|
18907
|
+
qE(he, a, xe, c, l, v, j, n);
|
|
18908
|
+
let { canSave: Se, saving: Ce, saveError: we, invalidStepCount: Te, triggerSave: Ee } = bE({
|
|
18909
|
+
initialGroups: me,
|
|
18910
|
+
currentGroups: he,
|
|
18883
18911
|
initialFlowExecution: _,
|
|
18884
|
-
currentFlowExecution:
|
|
18885
|
-
stepValidity:
|
|
18912
|
+
currentFlowExecution: oe,
|
|
18913
|
+
stepValidity: ue,
|
|
18886
18914
|
onSave: y,
|
|
18887
|
-
onSaveStart:
|
|
18888
|
-
onSaveFailed:
|
|
18889
|
-
}),
|
|
18890
|
-
phase:
|
|
18891
|
-
stepIndex:
|
|
18892
|
-
}, [
|
|
18893
|
-
|
|
18894
|
-
}, []),
|
|
18915
|
+
onSaveStart: ge.markSaveStarted,
|
|
18916
|
+
onSaveFailed: ge.markSaveFailed
|
|
18917
|
+
}), De = z(() => !D || !P || D.flowId !== P._id ? null : {
|
|
18918
|
+
phase: D.phase,
|
|
18919
|
+
stepIndex: D.stepIndex
|
|
18920
|
+
}, [D, P]), Oe = ND(P, De?.phase ?? null, De?.stepIndex ?? null, xe, c, l)?.policy ?? null, ke = B(T.mode), [Ae, je] = V(!1), Me = R(() => {
|
|
18921
|
+
E({ mode: "closed" });
|
|
18922
|
+
}, []), Ne = z(() => me.flatMap((e) => e.flows.map((e) => `${e._id}:${(e.request ?? []).map((e) => e.policy ?? "?").join(",")}|${(e.response ?? []).map((e) => e.policy ?? "?").join(",")}`)).join("||"), [me]), Fe = B(Ne);
|
|
18895
18923
|
dt(() => {
|
|
18896
|
-
|
|
18897
|
-
}, [
|
|
18898
|
-
let
|
|
18899
|
-
|
|
18900
|
-
}, []),
|
|
18901
|
-
|
|
18902
|
-
}, []), Re = R((e) => {
|
|
18903
|
-
ie(e);
|
|
18924
|
+
Fe.current !== Ne && (Fe.current = Ne, O(null), Me());
|
|
18925
|
+
}, [Ne, Me]);
|
|
18926
|
+
let Ie = R((e) => {
|
|
18927
|
+
w(e), O(null), E({ mode: "closed" });
|
|
18928
|
+
}, []), Le = R((e) => Ie(e), [Ie]), Re = R((e) => {
|
|
18929
|
+
re(e);
|
|
18904
18930
|
}, []), ze = R((e) => {
|
|
18905
|
-
|
|
18931
|
+
ae(e);
|
|
18932
|
+
}, []), Be = R((e) => {
|
|
18933
|
+
let t = jd(he, e._id);
|
|
18906
18934
|
if (!t) return;
|
|
18907
|
-
let n = Nd(
|
|
18908
|
-
|
|
18935
|
+
let n = Nd(he, e._id, t._id);
|
|
18936
|
+
M({
|
|
18909
18937
|
type: "DELETE_FLOW",
|
|
18910
18938
|
flowId: e._id,
|
|
18911
18939
|
groupId: t._id
|
|
18912
|
-
}),
|
|
18940
|
+
}), Ie(n);
|
|
18913
18941
|
}, [
|
|
18942
|
+
he,
|
|
18914
18943
|
M,
|
|
18915
|
-
|
|
18916
|
-
|
|
18917
|
-
|
|
18918
|
-
|
|
18919
|
-
n && (me({
|
|
18944
|
+
Ie
|
|
18945
|
+
]), Ve = R((e, t) => {
|
|
18946
|
+
let n = jd(he, e._id);
|
|
18947
|
+
n && (M({
|
|
18920
18948
|
type: "DUPLICATE_FLOW",
|
|
18921
18949
|
groupId: n._id,
|
|
18922
18950
|
afterFlowId: e._id,
|
|
18923
18951
|
flow: t
|
|
18924
|
-
}),
|
|
18952
|
+
}), Ie(t._id));
|
|
18925
18953
|
}, [
|
|
18954
|
+
he,
|
|
18926
18955
|
M,
|
|
18927
|
-
|
|
18928
|
-
|
|
18929
|
-
|
|
18930
|
-
me({
|
|
18956
|
+
Ie
|
|
18957
|
+
]), He = R((e, t) => {
|
|
18958
|
+
M({
|
|
18931
18959
|
type: "TOGGLE_FLOW_ENABLED",
|
|
18932
18960
|
flowId: e._id,
|
|
18933
18961
|
enabled: t
|
|
18934
18962
|
});
|
|
18935
|
-
}, [
|
|
18936
|
-
|
|
18963
|
+
}, [M]), Ue = R((e) => {
|
|
18964
|
+
M({
|
|
18937
18965
|
type: "REORDER_FLOW",
|
|
18938
18966
|
flowId: e.flowId,
|
|
18939
18967
|
sourceGroupId: e.sourceGroupId,
|
|
18940
18968
|
targetGroupId: e.targetGroupId,
|
|
18941
18969
|
newIndex: e.newIndex
|
|
18942
18970
|
});
|
|
18943
|
-
}, [
|
|
18944
|
-
|
|
18945
|
-
}, [
|
|
18946
|
-
|
|
18947
|
-
}, [
|
|
18948
|
-
|
|
18971
|
+
}, [M]), { handleStepClick: We, handleRemoveStep: Ge, handleDuplicateStep: Ke, handleToggleStepEnabled: F, handleReorderSteps: qe } = CE(P, D, M, O), Je = R((e, t) => {
|
|
18972
|
+
We(e, t), ne(e), E({ mode: "config" });
|
|
18973
|
+
}, [We]), Ye = R((e, t) => {
|
|
18974
|
+
Ge(e, t), E((e) => e.mode === "config" ? { mode: "closed" } : e);
|
|
18975
|
+
}, [Ge]), Xe = R((e) => {
|
|
18976
|
+
ne(e), O(null), E((t) => t.mode === "catalog" && t.phase === e ? { mode: "closed" } : {
|
|
18949
18977
|
mode: "catalog",
|
|
18950
18978
|
phase: e
|
|
18951
18979
|
});
|
|
18952
|
-
}, []),
|
|
18953
|
-
|
|
18980
|
+
}, []), Ze = R((e, t) => {
|
|
18981
|
+
ne(e), O(null), E({
|
|
18954
18982
|
mode: "catalog",
|
|
18955
18983
|
phase: e,
|
|
18956
18984
|
initialCategories: [t.toLowerCase()]
|
|
18957
18985
|
});
|
|
18958
|
-
}, []),
|
|
18986
|
+
}, []), Qe = R((e, t) => {
|
|
18959
18987
|
if (!P) return;
|
|
18960
|
-
let n =
|
|
18961
|
-
|
|
18988
|
+
let n = aE(P, e).length, r = t.category === "Shared Policy Group" ? l.find((e) => e.id === t.id) : void 0;
|
|
18989
|
+
M({
|
|
18962
18990
|
type: "ADD_STEP",
|
|
18963
18991
|
flowId: P._id,
|
|
18964
18992
|
phase: e,
|
|
@@ -18972,75 +19000,75 @@ function RD({ className: e, defaultSelectedFlowId: t }) {
|
|
|
18972
19000
|
name: t.name,
|
|
18973
19001
|
enabled: !0
|
|
18974
19002
|
}
|
|
18975
|
-
}),
|
|
19003
|
+
}), O({
|
|
18976
19004
|
flowId: P._id,
|
|
18977
19005
|
phase: e,
|
|
18978
19006
|
stepIndex: n
|
|
18979
|
-
}),
|
|
19007
|
+
}), ne(e), E({ mode: "config" });
|
|
18980
19008
|
}, [
|
|
18981
19009
|
P,
|
|
18982
|
-
|
|
19010
|
+
M,
|
|
18983
19011
|
l
|
|
18984
|
-
]),
|
|
18985
|
-
|
|
18986
|
-
}, [
|
|
18987
|
-
|
|
18988
|
-
}, [
|
|
18989
|
-
|
|
18990
|
-
}, [
|
|
18991
|
-
P &&
|
|
19012
|
+
]), $e = R((e) => {
|
|
19013
|
+
T.mode === "catalog" && Qe(T.phase, e);
|
|
19014
|
+
}, [T, Qe]), et = R((e, t) => {
|
|
19015
|
+
Qe(e, t);
|
|
19016
|
+
}, [Qe]), tt = R(() => {
|
|
19017
|
+
Me();
|
|
19018
|
+
}, [Me]), nt = R((e, t, n) => {
|
|
19019
|
+
P && M({
|
|
18992
19020
|
type: "UPDATE_STEP",
|
|
18993
19021
|
flowId: P._id,
|
|
18994
19022
|
phase: e,
|
|
18995
19023
|
stepIndex: t,
|
|
18996
19024
|
patch: n
|
|
18997
19025
|
});
|
|
18998
|
-
}, [P,
|
|
18999
|
-
P && (
|
|
19026
|
+
}, [P, M]), rt = R((e, t) => {
|
|
19027
|
+
P && (ne(e), O({
|
|
19000
19028
|
flowId: P._id,
|
|
19001
19029
|
phase: e,
|
|
19002
19030
|
stepIndex: t
|
|
19003
19031
|
}));
|
|
19004
|
-
}, [P]),
|
|
19032
|
+
}, [P]), it = !!(T.mode === "config" && De && P), at = it ? De : null, ot = it ? P : null, L = T.mode === "catalog" && !h, st = it && Oe ? S ? "side-by-side" : "tabs" : "none", ct = S ? "side-by-side" : "detail";
|
|
19005
19033
|
ft(() => {
|
|
19006
|
-
let e =
|
|
19007
|
-
e !== "closed" && t !== "closed" && e !== t && !(e === "catalog" && t === "config" || e === "config" && t === "catalog") && (
|
|
19008
|
-
requestAnimationFrame(() =>
|
|
19009
|
-
})),
|
|
19010
|
-
}, [
|
|
19011
|
-
let
|
|
19012
|
-
flow:
|
|
19013
|
-
phase:
|
|
19014
|
-
stepIndex:
|
|
19015
|
-
genericPolicies:
|
|
19034
|
+
let e = ke.current, t = T.mode;
|
|
19035
|
+
e !== "closed" && t !== "closed" && e !== t && !(e === "catalog" && t === "config" || e === "config" && t === "catalog") && (je(!0), requestAnimationFrame(() => {
|
|
19036
|
+
requestAnimationFrame(() => je(!1));
|
|
19037
|
+
})), ke.current = t;
|
|
19038
|
+
}, [T.mode]);
|
|
19039
|
+
let lt = ot && at ? /* @__PURE__ */ H(PD, {
|
|
19040
|
+
flow: ot,
|
|
19041
|
+
phase: at.phase,
|
|
19042
|
+
stepIndex: at.stepIndex,
|
|
19043
|
+
genericPolicies: xe,
|
|
19016
19044
|
policies: c,
|
|
19017
19045
|
sharedPolicyGroups: l,
|
|
19018
|
-
docsLayout:
|
|
19046
|
+
docsLayout: st,
|
|
19019
19047
|
showBackButton: !1,
|
|
19020
|
-
onClose:
|
|
19021
|
-
onRemove: h ? void 0 :
|
|
19022
|
-
onDuplicate: h ? void 0 :
|
|
19023
|
-
onToggleEnabled: h ? void 0 :
|
|
19024
|
-
onStepChange: h ? void 0 :
|
|
19025
|
-
onValidityChange: h ? void 0 :
|
|
19048
|
+
onClose: Me,
|
|
19049
|
+
onRemove: h ? void 0 : Ye,
|
|
19050
|
+
onDuplicate: h ? void 0 : Ke,
|
|
19051
|
+
onToggleEnabled: h ? void 0 : F,
|
|
19052
|
+
onStepChange: h ? void 0 : nt,
|
|
19053
|
+
onValidityChange: h ? void 0 : de
|
|
19026
19054
|
}) : null;
|
|
19027
|
-
return /* @__PURE__ */ U(
|
|
19055
|
+
return /* @__PURE__ */ U(DD, {
|
|
19028
19056
|
className: e,
|
|
19029
19057
|
sidebar: /* @__PURE__ */ H(Qf, {
|
|
19030
|
-
groups:
|
|
19031
|
-
selectedFlowId:
|
|
19032
|
-
flowsWithErrors:
|
|
19033
|
-
onFlowSelect:
|
|
19034
|
-
onAddFlow:
|
|
19035
|
-
onEditFlow:
|
|
19036
|
-
onDeleteFlow:
|
|
19037
|
-
onReorderFlow:
|
|
19038
|
-
onToggleFlowEnabled:
|
|
19039
|
-
flowExecution:
|
|
19040
|
-
onFlowExecutionChange:
|
|
19041
|
-
onDuplicateFlow:
|
|
19058
|
+
groups: he,
|
|
19059
|
+
selectedFlowId: C,
|
|
19060
|
+
flowsWithErrors: fe,
|
|
19061
|
+
onFlowSelect: Le,
|
|
19062
|
+
onAddFlow: Re,
|
|
19063
|
+
onEditFlow: ze,
|
|
19064
|
+
onDeleteFlow: Be,
|
|
19065
|
+
onReorderFlow: Ue,
|
|
19066
|
+
onToggleFlowEnabled: He,
|
|
19067
|
+
flowExecution: oe,
|
|
19068
|
+
onFlowExecutionChange: se,
|
|
19069
|
+
onDuplicateFlow: Ve
|
|
19042
19070
|
}),
|
|
19043
|
-
infoBar: /* @__PURE__ */ H(
|
|
19071
|
+
infoBar: /* @__PURE__ */ H(rD, {
|
|
19044
19072
|
flow: P,
|
|
19045
19073
|
apiType: a,
|
|
19046
19074
|
entrypointsInfo: p,
|
|
@@ -19048,173 +19076,174 @@ function RD({ className: e, defaultSelectedFlowId: t }) {
|
|
|
19048
19076
|
organizationTags: o === "ORGANIZATION" ? s : void 0,
|
|
19049
19077
|
readOnly: h,
|
|
19050
19078
|
loading: g,
|
|
19051
|
-
onEditFlow: P ? () =>
|
|
19052
|
-
onToggleFlowEnabled: P ? (e) =>
|
|
19053
|
-
onDeleteFlow: P ? () =>
|
|
19054
|
-
onSave: h ? void 0 :
|
|
19055
|
-
canSave:
|
|
19056
|
-
saving:
|
|
19057
|
-
saveError:
|
|
19058
|
-
invalidStepCount:
|
|
19079
|
+
onEditFlow: P ? () => ze(P) : void 0,
|
|
19080
|
+
onToggleFlowEnabled: P ? (e) => He(P, e) : void 0,
|
|
19081
|
+
onDeleteFlow: P ? () => Be(P) : void 0,
|
|
19082
|
+
onSave: h ? void 0 : Ee,
|
|
19083
|
+
canSave: Se,
|
|
19084
|
+
saving: Ce,
|
|
19085
|
+
saveError: we,
|
|
19086
|
+
invalidStepCount: Te
|
|
19059
19087
|
}),
|
|
19060
19088
|
children: [
|
|
19061
19089
|
/* @__PURE__ */ H("div", {
|
|
19062
|
-
ref:
|
|
19090
|
+
ref: x,
|
|
19063
19091
|
className: "h-full",
|
|
19064
|
-
children:
|
|
19065
|
-
className: I("flex h-full flex-col transition-opacity duration-150",
|
|
19092
|
+
children: it ? /* @__PURE__ */ U("div", {
|
|
19093
|
+
className: I("flex h-full flex-col transition-opacity duration-150", Ae ? "opacity-0" : "opacity-100"),
|
|
19066
19094
|
children: [/* @__PURE__ */ U("div", {
|
|
19067
19095
|
className: "flex shrink-0 items-center gap-2 border-b px-4",
|
|
19068
19096
|
children: [
|
|
19069
19097
|
/* @__PURE__ */ U(i, {
|
|
19070
19098
|
variant: "ghost",
|
|
19071
19099
|
size: "sm",
|
|
19072
|
-
onClick:
|
|
19100
|
+
onClick: Me,
|
|
19073
19101
|
className: "shrink-0 gap-1.5",
|
|
19074
19102
|
children: [/* @__PURE__ */ H(gt, { className: "size-3.5" }), "Back"]
|
|
19075
19103
|
}),
|
|
19076
19104
|
/* @__PURE__ */ H(r, {
|
|
19077
19105
|
variant: "default",
|
|
19078
19106
|
className: "shrink-0",
|
|
19079
|
-
children:
|
|
19107
|
+
children: DE[at.phase]
|
|
19080
19108
|
}),
|
|
19081
|
-
/* @__PURE__ */ H(
|
|
19109
|
+
/* @__PURE__ */ H(ED, {
|
|
19082
19110
|
apiType: a,
|
|
19083
19111
|
scope: o,
|
|
19084
|
-
phase:
|
|
19085
|
-
flow:
|
|
19112
|
+
phase: at.phase,
|
|
19113
|
+
flow: ot,
|
|
19086
19114
|
entrypointsInfo: p,
|
|
19087
19115
|
endpointsInfo: m,
|
|
19088
|
-
genericPolicies:
|
|
19116
|
+
genericPolicies: xe,
|
|
19089
19117
|
policies: c,
|
|
19090
19118
|
sharedPolicyGroups: l,
|
|
19091
|
-
selectedStepIndex:
|
|
19092
|
-
stepsWithErrors:
|
|
19093
|
-
onStepClick:
|
|
19094
|
-
onReorderSteps: h ? void 0 :
|
|
19095
|
-
onBrowseCatalog: h ? void 0 :
|
|
19096
|
-
onQuickAddPolicy: h ? void 0 :
|
|
19119
|
+
selectedStepIndex: at.stepIndex,
|
|
19120
|
+
stepsWithErrors: pe,
|
|
19121
|
+
onStepClick: rt,
|
|
19122
|
+
onReorderSteps: h ? void 0 : qe,
|
|
19123
|
+
onBrowseCatalog: h ? void 0 : Xe,
|
|
19124
|
+
onQuickAddPolicy: h ? void 0 : et,
|
|
19097
19125
|
className: "min-w-0 flex-1"
|
|
19098
19126
|
})
|
|
19099
19127
|
]
|
|
19100
19128
|
}), /* @__PURE__ */ H("div", {
|
|
19101
19129
|
className: "min-h-0 flex-1 overflow-auto",
|
|
19102
|
-
children:
|
|
19130
|
+
children: lt
|
|
19103
19131
|
})]
|
|
19104
|
-
}) :
|
|
19105
|
-
className: I("flex h-full flex-col transition-opacity duration-150",
|
|
19106
|
-
children:
|
|
19132
|
+
}) : L ? /* @__PURE__ */ H("div", {
|
|
19133
|
+
className: I("flex h-full flex-col transition-opacity duration-150", Ae ? "opacity-0" : "opacity-100"),
|
|
19134
|
+
children: k && /* @__PURE__ */ U(mt, { children: [/* @__PURE__ */ U("div", {
|
|
19107
19135
|
className: "flex shrink-0 items-center gap-2 border-b px-4",
|
|
19108
19136
|
children: [
|
|
19109
19137
|
/* @__PURE__ */ U(i, {
|
|
19110
19138
|
variant: "ghost",
|
|
19111
19139
|
size: "sm",
|
|
19112
|
-
onClick:
|
|
19140
|
+
onClick: tt,
|
|
19113
19141
|
className: "shrink-0 gap-1.5",
|
|
19142
|
+
"data-testid": b("catalog", "back"),
|
|
19114
19143
|
children: [/* @__PURE__ */ H(gt, { className: "size-3.5" }), "Back"]
|
|
19115
19144
|
}),
|
|
19116
19145
|
/* @__PURE__ */ H(r, {
|
|
19117
19146
|
variant: "default",
|
|
19118
19147
|
className: "shrink-0",
|
|
19119
|
-
children:
|
|
19148
|
+
children: DE[k]
|
|
19120
19149
|
}),
|
|
19121
|
-
/* @__PURE__ */ H(
|
|
19150
|
+
/* @__PURE__ */ H(ED, {
|
|
19122
19151
|
apiType: a,
|
|
19123
19152
|
scope: o,
|
|
19124
|
-
phase:
|
|
19153
|
+
phase: k,
|
|
19125
19154
|
flow: P,
|
|
19126
19155
|
entrypointsInfo: p,
|
|
19127
19156
|
endpointsInfo: m,
|
|
19128
|
-
genericPolicies:
|
|
19157
|
+
genericPolicies: xe,
|
|
19129
19158
|
policies: c,
|
|
19130
19159
|
sharedPolicyGroups: l,
|
|
19131
|
-
stepsWithErrors:
|
|
19160
|
+
stepsWithErrors: pe,
|
|
19132
19161
|
isBrowsing: !0,
|
|
19133
|
-
onStepClick:
|
|
19162
|
+
onStepClick: Je,
|
|
19134
19163
|
className: "min-w-0 flex-1"
|
|
19135
19164
|
})
|
|
19136
19165
|
]
|
|
19137
19166
|
}), /* @__PURE__ */ H("div", {
|
|
19138
19167
|
className: "min-h-0 flex-1",
|
|
19139
|
-
children: /* @__PURE__ */ H(
|
|
19168
|
+
children: /* @__PURE__ */ H(VT, {
|
|
19140
19169
|
policies: c,
|
|
19141
19170
|
sharedPolicyGroups: l,
|
|
19142
19171
|
apiType: a,
|
|
19143
19172
|
scope: o,
|
|
19144
|
-
flowPhase:
|
|
19145
|
-
docsLayout:
|
|
19146
|
-
initialCategories:
|
|
19173
|
+
flowPhase: k,
|
|
19174
|
+
docsLayout: ct,
|
|
19175
|
+
initialCategories: ee,
|
|
19147
19176
|
showHeader: !1,
|
|
19148
|
-
onAddPolicy:
|
|
19149
|
-
onClose:
|
|
19150
|
-
},
|
|
19177
|
+
onAddPolicy: $e,
|
|
19178
|
+
onClose: tt
|
|
19179
|
+
}, k)
|
|
19151
19180
|
})] })
|
|
19152
19181
|
}) : /* @__PURE__ */ H(Pe, {
|
|
19153
19182
|
className: "h-full",
|
|
19154
19183
|
children: /* @__PURE__ */ H("div", {
|
|
19155
19184
|
className: "p-6",
|
|
19156
|
-
children: !g &&
|
|
19185
|
+
children: !g && ye && !P ? /* @__PURE__ */ H(MD, {
|
|
19157
19186
|
apiType: a,
|
|
19158
19187
|
scope: o,
|
|
19159
|
-
onAddFlow: h ? void 0 :
|
|
19160
|
-
}) : /* @__PURE__ */ H(
|
|
19188
|
+
onAddFlow: h ? void 0 : be
|
|
19189
|
+
}) : /* @__PURE__ */ H(TD, {
|
|
19161
19190
|
loading: g,
|
|
19162
19191
|
apiType: a,
|
|
19163
19192
|
scope: o,
|
|
19164
19193
|
flow: P,
|
|
19165
19194
|
entrypointsInfo: p,
|
|
19166
19195
|
endpointsInfo: m,
|
|
19167
|
-
genericPolicies:
|
|
19196
|
+
genericPolicies: xe,
|
|
19168
19197
|
policies: c,
|
|
19169
19198
|
sharedPolicyGroups: l,
|
|
19170
|
-
browsePhase:
|
|
19171
|
-
selectedStep:
|
|
19172
|
-
stepsWithErrors:
|
|
19173
|
-
activePhase:
|
|
19174
|
-
onBrowseCatalog: P && !h ?
|
|
19175
|
-
onBrowseCategory: P && !h ?
|
|
19176
|
-
onQuickAddPolicy: P && !h ?
|
|
19177
|
-
onStepClick: P ?
|
|
19178
|
-
onReorderSteps: P && !h ?
|
|
19179
|
-
onToggleStepEnabled: P && !h ?
|
|
19180
|
-
onDuplicateStep: P && !h ?
|
|
19181
|
-
onRemoveStep: P && !h ?
|
|
19199
|
+
browsePhase: k,
|
|
19200
|
+
selectedStep: De,
|
|
19201
|
+
stepsWithErrors: pe,
|
|
19202
|
+
activePhase: te,
|
|
19203
|
+
onBrowseCatalog: P && !h ? Xe : void 0,
|
|
19204
|
+
onBrowseCategory: P && !h ? Ze : void 0,
|
|
19205
|
+
onQuickAddPolicy: P && !h ? et : void 0,
|
|
19206
|
+
onStepClick: P ? Je : void 0,
|
|
19207
|
+
onReorderSteps: P && !h ? qe : void 0,
|
|
19208
|
+
onToggleStepEnabled: P && !h ? F : void 0,
|
|
19209
|
+
onDuplicateStep: P && !h ? Ke : void 0,
|
|
19210
|
+
onRemoveStep: P && !h ? Ye : void 0
|
|
19182
19211
|
})
|
|
19183
19212
|
})
|
|
19184
19213
|
})
|
|
19185
19214
|
}),
|
|
19186
|
-
|
|
19215
|
+
A && /* @__PURE__ */ H(sd, {
|
|
19187
19216
|
open: !0,
|
|
19188
19217
|
onOpenChange: (e) => {
|
|
19189
|
-
e ||
|
|
19218
|
+
e || re(null);
|
|
19190
19219
|
},
|
|
19191
19220
|
onAdd: (e, t) => {
|
|
19192
|
-
|
|
19221
|
+
M({
|
|
19193
19222
|
type: "ADD_FLOW",
|
|
19194
19223
|
groupId: t,
|
|
19195
19224
|
flow: e
|
|
19196
|
-
}),
|
|
19225
|
+
}), Ie(e._id);
|
|
19197
19226
|
},
|
|
19198
|
-
group:
|
|
19199
|
-
planGroups:
|
|
19227
|
+
group: A,
|
|
19228
|
+
planGroups: A.kind === "plan" ? N : void 0
|
|
19200
19229
|
}),
|
|
19201
19230
|
/* @__PURE__ */ H(Id, {
|
|
19202
|
-
open:
|
|
19231
|
+
open: ie !== null,
|
|
19203
19232
|
onOpenChange: (e) => {
|
|
19204
|
-
e ||
|
|
19233
|
+
e || ae(null);
|
|
19205
19234
|
},
|
|
19206
19235
|
onSave: (e, t) => {
|
|
19207
|
-
|
|
19236
|
+
M({
|
|
19208
19237
|
type: "EDIT_FLOW",
|
|
19209
19238
|
flow: e,
|
|
19210
19239
|
targetGroupId: t
|
|
19211
|
-
}),
|
|
19240
|
+
}), ae(null);
|
|
19212
19241
|
},
|
|
19213
|
-
flow:
|
|
19214
|
-
planGroups:
|
|
19242
|
+
flow: ie,
|
|
19243
|
+
planGroups: N.length > 0 ? N : void 0
|
|
19215
19244
|
})
|
|
19216
19245
|
]
|
|
19217
19246
|
});
|
|
19218
19247
|
}
|
|
19219
19248
|
//#endregion
|
|
19220
|
-
export { $f as API_TYPE_TO_PROTOCOL, sd as AddFlowSheet, Gn as EMPTY_FORM_VALUES, Id as EditFlowSheet, oe as ElCheatSheetTrigger, ep as FLOW_PHASES_BY_API_TYPE, id as FlowForm, Qf as FlowsSidebar, Un as HTTP_METHOD_OPTIONS, Wn as MCP_METHOD_GROUPS,
|
|
19249
|
+
export { $f as API_TYPE_TO_PROTOCOL, sd as AddFlowSheet, Gn as EMPTY_FORM_VALUES, Id as EditFlowSheet, oe as ElCheatSheetTrigger, ep as FLOW_PHASES_BY_API_TYPE, id as FlowForm, Qf as FlowsSidebar, Un as HTTP_METHOD_OPTIONS, Wn as MCP_METHOD_GROUPS, VT as PolicyCatalogPane, tE as PolicyConfigPanel, xp as PolicyIcon, HT as PolicyQuickInsert, RD as PolicyStudio, DD as PolicyStudioLayout, zn as PolicyStudioProvider, cp as SHARED_POLICY_GROUP_CATEGORY, xE as adjustStepIndexAfterReorder, SE as adjustStepIndexAfterSwap, Ad as applyFlowReorder, ud as buildFlowGroups, BE as buildGenericPolicies, Zn as buildSelectors, kd as canDropInGroup, gE as computeSaveOutput, vE as countInvalidSteps, ir as createFlowFromForm, Fd as duplicateFlow, $n as extractFormValues, _p as filterByCategory, fp as filterBySearch, gD as filterConnectorsByMode, Td as filterFlowGroups, op as filterPoliciesForPhase, sp as filterSharedPolicyGroups, jd as findGroupContaining, nr as generateFlowName, Nd as getAdjacentFlowId, yf as getAvailablePolicyCategories, up as getCatalogPoliciesForPhase, gp as getCategories, vp as getCategoryCounts, Md as getDropIndex, gf as getEmptyPhaseWhisper, vd as getFlowBadges, Ud as getFlowInfoBarData, xd as getFlowPathLabel, np as getFlowPhases, vf as getFlowPolicyCount, Gd as getHttpMethodVariant, Dd as getMenuRules, _D as getMessageConnectorContext, _f as getPhaseCategoryCTAs, jE as getPhaseConfig, ip as getPhaseLabel, PE as getPhaseLayout, hf as getPhaseWhisper, tp as getProtocolType, hp as groupByCategory, _E as hasChanges, WE as resolveStep, UE as resolveStepPolicy, GE as resolveStepsForPhase, lp as sharedPolicyGroupsToCatalogPolicies, pE as stripVmFields, ar as updateFlowFromForm, Bn as usePolicyStudioContext };
|