@burdenoff/microfe-workflows 2026.1109.1 → 2026.1109.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/providers/ManagedAiAuthorityBridge.d.ts +9 -0
- package/dist/providers/ManagedAiAuthorityBridge.d.ts.map +1 -0
- package/dist/providers/ManagedAiAuthorityBridge.js +32 -0
- package/dist/providers/WorkflowsProvider.d.ts.map +1 -1
- package/dist/providers/WorkflowsProvider.js +63 -59
- package/dist/test-support/moduleMocks.d.ts +2 -0
- package/dist/test-support/moduleMocks.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { WorkflowsRootProps } from '../WorkflowsRoot';
|
|
3
|
+
type AuthorityProps = Pick<WorkflowsRootProps, 'currentUser' | 'tenantId' | 'organizationId' | 'workspaceId' | 'projectId' | 'apiGatewayUrl' | 'authToken' | 'workspaceToken'>;
|
|
4
|
+
/** Captured host authority never falls back to a second account/context source. */
|
|
5
|
+
export declare function ManagedAiAuthorityBridge({ currentUser, tenantId, organizationId, workspaceId, projectId, apiGatewayUrl, authToken, workspaceToken, children, }: AuthorityProps & {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=ManagedAiAuthorityBridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ManagedAiAuthorityBridge.d.ts","sourceRoot":"","sources":["../../src/providers/ManagedAiAuthorityBridge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKhD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,KAAK,cAAc,GAAG,IAAI,CACxB,kBAAkB,EAChB,aAAa,GACb,UAAU,GACV,gBAAgB,GAChB,aAAa,GACb,WAAW,GACX,eAAe,GACf,WAAW,GACX,gBAAgB,CACnB,CAAC;AAEF,mFAAmF;AACnF,wBAAgB,wBAAwB,CAAC,EACvC,WAAW,EACX,QAAQ,EACR,cAAc,EACd,WAAW,EACX,SAAS,EACT,aAAa,EACb,SAAS,EACT,cAAc,EACd,QAAQ,GACT,EAAE,cAAc,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAqC1C"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useMemo as e } from "react";
|
|
2
|
+
import { ManagedAiPolicyAuthorityProvider as t } from "@burdenoff/fluidgrids-fe-sdk";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/providers/ManagedAiAuthorityBridge.tsx
|
|
5
|
+
function r({ currentUser: r, tenantId: i, organizationId: a, workspaceId: o, projectId: s, apiGatewayUrl: c, authToken: l, workspaceToken: u, children: d }) {
|
|
6
|
+
let f = r?.id;
|
|
7
|
+
return /* @__PURE__ */ n(t, {
|
|
8
|
+
scope: e(() => !f || !i || !a || !o || !c || !l || !u ? null : {
|
|
9
|
+
authority: "profile",
|
|
10
|
+
actorId: f,
|
|
11
|
+
tenantId: i,
|
|
12
|
+
organizationId: a,
|
|
13
|
+
workspaceId: o,
|
|
14
|
+
projectId: s,
|
|
15
|
+
url: c,
|
|
16
|
+
authToken: l,
|
|
17
|
+
workspaceToken: u
|
|
18
|
+
}, [
|
|
19
|
+
f,
|
|
20
|
+
i,
|
|
21
|
+
a,
|
|
22
|
+
o,
|
|
23
|
+
s,
|
|
24
|
+
c,
|
|
25
|
+
l,
|
|
26
|
+
u
|
|
27
|
+
]),
|
|
28
|
+
children: d
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { r as ManagedAiAuthorityBridge };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowsProvider.d.ts","sourceRoot":"","sources":["../../src/providers/WorkflowsProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,SAAS,EACV,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"WorkflowsProvider.d.ts","sourceRoot":"","sources":["../../src/providers/WorkflowsProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,SAAS,EACV,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAoD3D,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAwI9C;AAED,wBAAgB,mBAAmB,uBAMlC"}
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import { setWorkflowsConfig as e } from "../config/index.js";
|
|
2
2
|
import { useWorkflowsTranslation as t } from "../i18n.js";
|
|
3
3
|
import { WorkspaceRequiredGuidance as n } from "./WorkspaceRequiredGuidance.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { ManagedAiAuthorityBridge as r } from "./ManagedAiAuthorityBridge.js";
|
|
5
|
+
import { createContext as i, useEffect as a, useState as o, useSyncExternalStore as s } from "react";
|
|
6
|
+
import { GlassCard as c } from "@burdenoff/fe-libs/ui";
|
|
7
|
+
import { FluidGridsPermissionsProvider as l, FluidGridsTranslationProvider as u, refetchStoreNodes as d, resetFluidGridsClient as f, resetFluidGridsConfig as p, resetFluidGridsExecutionState as m, resetGlobalStoreClient as h, setFluidGridsClient as g, setFluidGridsConfig as _, setGlobalStoreClient as v } from "@burdenoff/fluidgrids-fe-sdk";
|
|
8
|
+
import { useGatewayClient as y } from "@burdenoff/fe-libs/shared/graphql";
|
|
9
|
+
import { PermissionProvider as b, usePermissions as x } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
10
|
+
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
10
11
|
//#region src/providers/WorkflowsProvider.tsx
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
let { hasPermission: t, isLoading: n } =
|
|
14
|
-
return /* @__PURE__ */
|
|
12
|
+
var w = i(null);
|
|
13
|
+
function T({ children: e }) {
|
|
14
|
+
let { hasPermission: t, isLoading: n } = x();
|
|
15
|
+
return /* @__PURE__ */ S(l, {
|
|
15
16
|
hasPermission: t,
|
|
16
17
|
isLoading: n,
|
|
17
18
|
children: e
|
|
18
19
|
});
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
+
function E(e) {
|
|
21
22
|
let t = e.endsWith("/") ? e.slice(0, -1) : e;
|
|
22
23
|
return t.endsWith("/graphql") ? t : `${t}/workspaces/graphql`;
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
-
let
|
|
25
|
+
function D({ children: i, ...l }) {
|
|
26
|
+
let x = t(), D = y("workspace"), O = y("global"), [k] = o(() => {
|
|
26
27
|
let e = !1, t = /* @__PURE__ */ new Set();
|
|
27
28
|
return {
|
|
28
29
|
subscribe: (e) => (t.add(e), () => {
|
|
@@ -34,73 +35,76 @@ function E({ children: r, ...c }) {
|
|
|
34
35
|
for (let e of t) e();
|
|
35
36
|
}
|
|
36
37
|
};
|
|
37
|
-
}),
|
|
38
|
-
return
|
|
39
|
-
if (!
|
|
40
|
-
let t =
|
|
38
|
+
}), A = s(k.subscribe, k.snapshot, () => !1);
|
|
39
|
+
return a(() => (m(), m), []), a(() => {
|
|
40
|
+
if (!l.apiGatewayUrl || !l.productId || !l.workspaceId || !l.workspaceToken || !D || !O) return;
|
|
41
|
+
let t = l.apiGatewayUrl.replace(/\/+$/, "");
|
|
41
42
|
e({
|
|
42
|
-
workflowSvcUrl:
|
|
43
|
+
workflowSvcUrl: E(t),
|
|
43
44
|
apiGatewayUrl: t
|
|
44
45
|
});
|
|
45
|
-
let n =
|
|
46
|
-
return
|
|
46
|
+
let n = l.callbacks?.onWorkflowSaved;
|
|
47
|
+
return _({
|
|
47
48
|
apiGatewayUrl: t,
|
|
48
|
-
authToken:
|
|
49
|
-
workspaceToken:
|
|
50
|
-
workspaceId:
|
|
51
|
-
tenantId:
|
|
52
|
-
productId:
|
|
53
|
-
productName:
|
|
49
|
+
authToken: l.authToken,
|
|
50
|
+
workspaceToken: l.workspaceToken,
|
|
51
|
+
workspaceId: l.workspaceId,
|
|
52
|
+
tenantId: l.tenantId,
|
|
53
|
+
productId: l.productId,
|
|
54
|
+
productName: l.productName,
|
|
54
55
|
onWorkflowSaved: n
|
|
55
|
-
}),
|
|
56
|
+
}), g(D), v(O), d().catch((e) => {
|
|
56
57
|
console.warn("[Workflows] Could not refresh installed nodes", e);
|
|
57
|
-
}),
|
|
58
|
-
|
|
58
|
+
}), k.set(!0), () => {
|
|
59
|
+
k.set(!1), f(), h(), p();
|
|
59
60
|
};
|
|
60
61
|
}, [
|
|
61
|
-
|
|
62
|
-
E,
|
|
62
|
+
k,
|
|
63
63
|
D,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
O,
|
|
65
|
+
l.apiGatewayUrl,
|
|
66
|
+
l.authToken,
|
|
67
|
+
l.workspaceToken,
|
|
68
|
+
l.workspaceId,
|
|
69
|
+
l.tenantId,
|
|
70
|
+
l.productId,
|
|
71
|
+
l.productName,
|
|
72
|
+
l.callbacks
|
|
73
|
+
]), l.workspaceId ? !A || !l.workspaceToken || !l.productId ? /* @__PURE__ */ C("div", {
|
|
73
74
|
className: "mx-auto flex h-full min-h-[60vh] w-full max-w-md flex-col items-center justify-center gap-4 px-4 py-10 text-center",
|
|
74
75
|
role: "status",
|
|
75
76
|
"aria-live": "polite",
|
|
76
77
|
"aria-busy": "true",
|
|
77
|
-
"aria-label":
|
|
78
|
-
children: [/* @__PURE__ */
|
|
78
|
+
"aria-label": x("workflows.provider.loading.ariaLabel", "Loading workflows"),
|
|
79
|
+
children: [/* @__PURE__ */ C(c, {
|
|
79
80
|
treatment: "glass",
|
|
80
81
|
className: "flex w-full flex-col items-center gap-4 border-border-seam p-6",
|
|
81
82
|
children: [
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ S("div", { className: "h-12 w-12 rounded-full bg-muted/60 motion-safe:animate-vc-shimmer" }),
|
|
84
|
+
/* @__PURE__ */ S("div", { className: "h-4 w-40 rounded bg-muted/50 motion-safe:animate-vc-shimmer" }),
|
|
85
|
+
/* @__PURE__ */ S("div", { className: "h-3 w-56 max-w-full rounded bg-muted/30 motion-safe:animate-vc-shimmer" })
|
|
85
86
|
]
|
|
86
|
-
}), /* @__PURE__ */
|
|
87
|
+
}), /* @__PURE__ */ S("p", {
|
|
87
88
|
className: "text-sm text-text-secondary",
|
|
88
|
-
children:
|
|
89
|
+
children: x("workflows.provider.loading.message", "Connecting workflows...")
|
|
89
90
|
})]
|
|
90
|
-
}) : /* @__PURE__ */
|
|
91
|
-
value:
|
|
92
|
-
children: /* @__PURE__ */
|
|
93
|
-
|
|
94
|
-
children: /* @__PURE__ */
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
}) : /* @__PURE__ */ S(w.Provider, {
|
|
92
|
+
value: l,
|
|
93
|
+
children: /* @__PURE__ */ S(r, {
|
|
94
|
+
...l,
|
|
95
|
+
children: /* @__PURE__ */ S(u, {
|
|
96
|
+
t: x,
|
|
97
|
+
children: /* @__PURE__ */ S(b, {
|
|
98
|
+
scopeId: l.workspaceId ?? null,
|
|
99
|
+
gateway: "workspace",
|
|
100
|
+
children: /* @__PURE__ */ S(T, { children: i })
|
|
101
|
+
})
|
|
98
102
|
})
|
|
99
103
|
})
|
|
100
|
-
}) : /* @__PURE__ */
|
|
101
|
-
basePath:
|
|
102
|
-
navigate:
|
|
104
|
+
}) : /* @__PURE__ */ S(n, {
|
|
105
|
+
basePath: l.basePath,
|
|
106
|
+
navigate: l.navigate
|
|
103
107
|
});
|
|
104
108
|
}
|
|
105
109
|
//#endregion
|
|
106
|
-
export {
|
|
110
|
+
export { D as WorkflowsProvider };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { ManagedAiRequestScope } from '@burdenoff/fluidgrids-fe-sdk';
|
|
1
2
|
export declare const mockState: {
|
|
2
3
|
granted: Set<string>;
|
|
4
|
+
managedAiScopes: Array<ManagedAiRequestScope | null>;
|
|
3
5
|
permissionsLoading: boolean;
|
|
4
6
|
/** When set, every page suspends on it (as a lazily loaded SDK page does). */
|
|
5
7
|
pendingPage: Promise<void> | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moduleMocks.d.ts","sourceRoot":"","sources":["../../src/test-support/moduleMocks.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"moduleMocks.d.ts","sourceRoot":"","sources":["../../src/test-support/moduleMocks.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAE1E,eAAO,MAAM,SAAS,EAAE;IACtB,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACrB,eAAe,EAAE,KAAK,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;IACrD,kBAAkB,EAAE,OAAO,CAAC;IAC5B,8EAA8E;IAC9E,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAClC,iFAAiF;IACjF,iBAAiB,EAAE,OAAO,CAAC;IAC3B,gFAAgF;IAChF,YAAY,EAAE,OAAO,CAAC;CAQvB,CAAC;AAEF,eAAO,MAAM,SAAS,kXAoBZ,CAAC;AA8BX,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAqCxD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/microfe-workflows",
|
|
3
|
-
"version": "2026.1109.
|
|
3
|
+
"version": "2026.1109.2",
|
|
4
4
|
"description": "Workflows microfrontend for Burdenoff products - thin shell over @burdenoff/fluidgrids-fe-sdk",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"react-router": "^8.5.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@burdenoff/fluidgrids-fe-sdk": "2026.1109.
|
|
49
|
+
"@burdenoff/fluidgrids-fe-sdk": "2026.1109.2",
|
|
50
50
|
"@eslint/js": "^9.39.5",
|
|
51
51
|
"@types/bun": "^1.4.4",
|
|
52
52
|
"@types/react": "^19.3.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"ajv": "8.20.0"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
|
-
"@burdenoff/fluidgrids-fe-sdk": "2026.1109.
|
|
73
|
+
"@burdenoff/fluidgrids-fe-sdk": "2026.1109.2",
|
|
74
74
|
"framer-motion": "^12.0.0",
|
|
75
75
|
"react": "^19.0.0",
|
|
76
76
|
"react-dom": "^19.0.0"
|