orcheo-studio 0.23.0 → 0.23.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/.bumpversion.cfg +1 -1
- package/dist/assets/{arc-4lqv6Kjm.js → arc-BokkJPzk.js} +1 -1
- package/dist/assets/{architectureDiagram-VXUJARFQ-DjhiFMDA.js → architectureDiagram-VXUJARFQ-CzmPOZBu.js} +1 -1
- package/dist/assets/{blockDiagram-VD42YOAC-AZ1Rspxy.js → blockDiagram-VD42YOAC-DG89LeH9.js} +1 -1
- package/dist/assets/{c4Diagram-YG6GDRKO-eH7LJ-pB.js → c4Diagram-YG6GDRKO-DymWpJZb.js} +1 -1
- package/dist/assets/channel-DPwJ8Ajm.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-DJPBOwLj.js → chunk-4BX2VUAB-DulKpeK2.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-BtkroFP3.js → chunk-55IACEB6-Bi6MBeyB.js} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-9UuoCVI1.js → chunk-B4BG7PRW-teHvBEMz.js} +1 -1
- package/dist/assets/{chunk-DI55MBZ5-DFossSVg.js → chunk-DI55MBZ5-Clydm5zE.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-DZoCKsqW.js → chunk-FMBD7UC4-BGh0gUNB.js} +1 -1
- package/dist/assets/{chunk-QN33PNHL-CGFY-glY.js → chunk-QN33PNHL-D-9fma_8.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-CBx9MjYx.js → chunk-QZHKN3VN-Bux-KM8v.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-BQ1P9b2p.js → chunk-TZMSLE5B-pgx8j0M-.js} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-CYBYFsly.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-CYBYFsly.js +1 -0
- package/dist/assets/clone-tT9-ZTc-.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-Dy5ctOeT.js → cose-bilkent-S5V4N54A-CszLJ5HU.js} +1 -1
- package/dist/assets/{dagre-6UL2VRFP-CFPE5-yw.js → dagre-6UL2VRFP-Cr25CaNe.js} +1 -1
- package/dist/assets/{diagram-PSM6KHXK-DmESDfR2.js → diagram-PSM6KHXK-CnsZe68H.js} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-CumSxfGH.js → diagram-QEK2KX5R-CN8ov45N.js} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-C1AaIowU.js → diagram-S2PKOQOG-v2bUyBL7.js} +1 -1
- package/dist/assets/{erDiagram-Q2GNP2WA-BKk1ijaf.js → erDiagram-Q2GNP2WA-BxxatPhi.js} +1 -1
- package/dist/assets/{flowDiagram-NV44I4VS-BFMJTeTZ.js → flowDiagram-NV44I4VS-DIKLSwgl.js} +1 -1
- package/dist/assets/{ganttDiagram-JELNMOA3-CYobSBkw.js → ganttDiagram-JELNMOA3-D_0u3tXB.js} +1 -1
- package/dist/assets/{gitGraphDiagram-V2S2FVAM-DYNLBSGu.js → gitGraphDiagram-V2S2FVAM-B_nu7ypr.js} +1 -1
- package/dist/assets/{graph-CCH_5x2X.js → graph-DmMuvtfO.js} +1 -1
- package/dist/assets/{index-CD3NusgQ.js → index-DVxGch9w.js} +177 -177
- package/dist/assets/{infoDiagram-HS3SLOUP-C8K2nOgc.js → infoDiagram-HS3SLOUP-DLLSS3lr.js} +1 -1
- package/dist/assets/{isUndefined-Cg-i6rYz.js → isUndefined-u8cwznUN.js} +1 -1
- package/dist/assets/{journeyDiagram-XKPGCS4Q-UjysRuQi.js → journeyDiagram-XKPGCS4Q-fF1HZxKQ.js} +1 -1
- package/dist/assets/{kanban-definition-3W4ZIXB7-C0mLJbkK.js → kanban-definition-3W4ZIXB7-CcmlUntf.js} +1 -1
- package/dist/assets/{layout-Ctq7ed-p.js → layout-CuCF7WdL.js} +1 -1
- package/dist/assets/{linear-MdTfjVMd.js → linear-BVXj8lVL.js} +1 -1
- package/dist/assets/{min-CkeT6BIA.js → min-DEoUCRl0.js} +1 -1
- package/dist/assets/{mindmap-definition-VGOIOE7T-B1KVkl4d.js → mindmap-definition-VGOIOE7T-DtNTD5Hm.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-Cw6TMSJj.js → pieDiagram-ADFJNKIX-a07QMF4s.js} +1 -1
- package/dist/assets/{quadrantDiagram-AYHSOK5B-8Lq_anf6.js → quadrantDiagram-AYHSOK5B-NxQVfG-F.js} +1 -1
- package/dist/assets/{requirementDiagram-UZGBJVZJ-CXBuMo24.js → requirementDiagram-UZGBJVZJ-DfwcBFwx.js} +1 -1
- package/dist/assets/{sankeyDiagram-TZEHDZUN-DggxeLrr.js → sankeyDiagram-TZEHDZUN-BeRNGGtP.js} +1 -1
- package/dist/assets/{sequenceDiagram-WL72ISMW-DZqrjzbw.js → sequenceDiagram-WL72ISMW-dTp9Xfca.js} +1 -1
- package/dist/assets/{stateDiagram-FKZM4ZOC-D4rhKl_S.js → stateDiagram-FKZM4ZOC-uXrzw1Ia.js} +1 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-dqZSxN9f.js +1 -0
- package/dist/assets/{timeline-definition-IT6M3QCI-vp3knils.js → timeline-definition-IT6M3QCI-Jx4tDH4r.js} +1 -1
- package/dist/assets/{treemap-GDKQZRPO-RByzG6o8.js → treemap-GDKQZRPO-CYRu_RLQ.js} +1 -1
- package/dist/assets/{xychartDiagram-PRI3JC2R-DOLBdPza.js → xychartDiagram-PRI3JC2R-DVYMDr6g.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/src/features/auth/lib/auth-api.ts +21 -3
- package/src/features/workflow/data/templates/candidate-badges.ts +28 -0
- package/src/features/workflow/data/workflow-types.ts +6 -0
- package/src/features/workflow/lib/workflow-storage-versioning.ts +4 -0
- package/src/features/workflow/pages/workflow/hooks/use-workflow-saver.ts +12 -2
- package/src/features/workflow/pages/workflow-gallery/workflow-gallery-tabs.tsx +48 -3
- package/src/lib/auth-fetch.ts +81 -15
- package/dist/assets/channel-BbjHmdR-.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-B3gA5-gj.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-B3gA5-gj.js +0 -1
- package/dist/assets/clone-Ctw1pu1z.js +0 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-C81OVjQ3.js +0 -1
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
} from "@/design-system/ui/tabs";
|
|
10
10
|
import { Loader2, Search, Upload, Zap } from "lucide-react";
|
|
11
11
|
import { type Workflow } from "@features/workflow/data/workflow-data";
|
|
12
|
+
import { formatCandidateGroupName } from "@features/workflow/data/templates/candidate-badges";
|
|
12
13
|
import { type ApiTeam } from "@features/workflow/lib/workflow-storage-api";
|
|
13
14
|
import { UploadWorkflowDialog } from "@features/workflow/components/dialogs/upload-workflow-dialog";
|
|
14
15
|
import { useUploadsAllowed } from "@/hooks/use-uploads-allowed";
|
|
@@ -84,11 +85,55 @@ export const WorkflowGalleryTabs = ({
|
|
|
84
85
|
</div>
|
|
85
86
|
);
|
|
86
87
|
|
|
87
|
-
// Group
|
|
88
|
-
//
|
|
88
|
+
// Group candidates into vertical, collapsible sections that mirror the
|
|
89
|
+
// grouping of the colleague-candidates repository (one level under
|
|
90
|
+
// `colleagues/`). Independent candidates — those that live directly under
|
|
91
|
+
// `colleagues/` — stay in a flat grid above the grouped sections.
|
|
92
|
+
const renderCandidates = () => {
|
|
93
|
+
const independents: Workflow[] = [];
|
|
94
|
+
const byGroup = new Map<string, Workflow[]>();
|
|
95
|
+
for (const workflow of sortedWorkflows) {
|
|
96
|
+
const group = workflow.candidateGroup;
|
|
97
|
+
if (!group) {
|
|
98
|
+
independents.push(workflow);
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
const bucket = byGroup.get(group);
|
|
102
|
+
if (bucket) {
|
|
103
|
+
bucket.push(workflow);
|
|
104
|
+
} else {
|
|
105
|
+
byGroup.set(group, [workflow]);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Nothing is grouped — keep the flat grid.
|
|
110
|
+
if (byGroup.size === 0) {
|
|
111
|
+
return renderGrid(sortedWorkflows);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return (
|
|
115
|
+
<div className="flex flex-col gap-1 pb-6">
|
|
116
|
+
{independents.length > 0 ? renderGrid(independents) : null}
|
|
117
|
+
{[...byGroup.entries()]
|
|
118
|
+
.sort(([left], [right]) => left.localeCompare(right))
|
|
119
|
+
.map(([slug, items]) => (
|
|
120
|
+
<TeamSection
|
|
121
|
+
key={slug}
|
|
122
|
+
name={formatCandidateGroupName(slug)}
|
|
123
|
+
count={items.length}
|
|
124
|
+
>
|
|
125
|
+
{renderGrid(items)}
|
|
126
|
+
</TeamSection>
|
|
127
|
+
))}
|
|
128
|
+
</div>
|
|
129
|
+
);
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
// Group colleagues into vertical, collapsible team sections. Candidates are
|
|
133
|
+
// grouped to mirror the colleague-candidates repository layout instead.
|
|
89
134
|
const renderColleagues = () => {
|
|
90
135
|
if (isTemplateView) {
|
|
91
|
-
return
|
|
136
|
+
return renderCandidates();
|
|
92
137
|
}
|
|
93
138
|
|
|
94
139
|
// No teams yet — fall back to flat grid (e.g. during first load).
|
package/src/lib/auth-fetch.ts
CHANGED
|
@@ -1,35 +1,101 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getAccessToken,
|
|
3
|
+
getAuthTokens,
|
|
3
4
|
getDevAuthSessionHeaderValue,
|
|
4
5
|
} from "@features/auth/lib/auth-session";
|
|
6
|
+
import { refreshSession } from "@features/auth/lib/auth-api";
|
|
5
7
|
import { getWorkspaceSelectionHeaders } from "./workspace-session";
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
): Promise<Response> => {
|
|
12
|
-
const headers = new Headers(init.headers ?? {});
|
|
9
|
+
const buildAuthHeaders = (
|
|
10
|
+
headers: Headers,
|
|
11
|
+
shouldAttachAuth: boolean,
|
|
12
|
+
): string | null => {
|
|
13
13
|
const token = getAccessToken();
|
|
14
|
-
if (token &&
|
|
14
|
+
if (token && shouldAttachAuth) {
|
|
15
15
|
headers.set("Authorization", `Bearer ${token}`);
|
|
16
16
|
}
|
|
17
17
|
const devSession = getDevAuthSessionHeaderValue();
|
|
18
18
|
if (devSession && !headers.has("X-Orcheo-Dev-Session")) {
|
|
19
19
|
headers.set("X-Orcheo-Dev-Session", devSession);
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
return shouldAttachAuth ? token : null;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const attachWorkspaceHeaders = (headers: Headers): void => {
|
|
25
|
+
for (const [name, value] of Object.entries(getWorkspaceSelectionHeaders())) {
|
|
26
|
+
if (!headers.has(name)) {
|
|
27
|
+
headers.set(name, value);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const fetchWithHeaders = (
|
|
33
|
+
input: RequestInfo | URL,
|
|
34
|
+
init: RequestInit,
|
|
35
|
+
headers: Headers,
|
|
36
|
+
): Promise<Response> =>
|
|
37
|
+
globalThis.fetch(input, {
|
|
31
38
|
...init,
|
|
32
39
|
credentials: init.credentials ?? "include",
|
|
33
40
|
headers,
|
|
34
41
|
});
|
|
42
|
+
|
|
43
|
+
const buildRequestHeaders = (
|
|
44
|
+
init: RequestInit,
|
|
45
|
+
shouldAttachAuth: boolean,
|
|
46
|
+
includeWorkspaceHeaders: boolean,
|
|
47
|
+
headers = new Headers(init.headers ?? {}),
|
|
48
|
+
): { headers: Headers; accessToken: string | null } => {
|
|
49
|
+
const accessToken = buildAuthHeaders(headers, shouldAttachAuth);
|
|
50
|
+
if (includeWorkspaceHeaders) {
|
|
51
|
+
attachWorkspaceHeaders(headers);
|
|
52
|
+
}
|
|
53
|
+
return { headers, accessToken };
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const authFetch = async (
|
|
57
|
+
input: RequestInfo | URL,
|
|
58
|
+
init: RequestInit = {},
|
|
59
|
+
options: { includeWorkspaceHeaders?: boolean } = {},
|
|
60
|
+
): Promise<Response> => {
|
|
61
|
+
const originalHeaders = new Headers(init.headers ?? {});
|
|
62
|
+
const shouldAttachAuth = !originalHeaders.has("Authorization");
|
|
63
|
+
// getAccessToken includes the shared 60-second expiry skew, so nearly expired
|
|
64
|
+
// tokens are treated as missing and refreshed before protected requests.
|
|
65
|
+
if (shouldAttachAuth && !getAccessToken() && getAuthTokens()?.refreshToken) {
|
|
66
|
+
await refreshSession();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const includeWorkspaceHeaders = options.includeWorkspaceHeaders ?? true;
|
|
70
|
+
const { headers, accessToken: requestAccessToken } = buildRequestHeaders(
|
|
71
|
+
init,
|
|
72
|
+
shouldAttachAuth,
|
|
73
|
+
includeWorkspaceHeaders,
|
|
74
|
+
originalHeaders,
|
|
75
|
+
);
|
|
76
|
+
const response = await fetchWithHeaders(input, init, headers);
|
|
77
|
+
if (response.status !== 401 || !shouldAttachAuth) {
|
|
78
|
+
return response;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const currentAccessToken = getAccessToken();
|
|
82
|
+
if (currentAccessToken && currentAccessToken !== requestAccessToken) {
|
|
83
|
+
const { headers: retryHeaders } = buildRequestHeaders(
|
|
84
|
+
init,
|
|
85
|
+
shouldAttachAuth,
|
|
86
|
+
includeWorkspaceHeaders,
|
|
87
|
+
);
|
|
88
|
+
return fetchWithHeaders(input, init, retryHeaders);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (!getAuthTokens()?.refreshToken || !(await refreshSession())) {
|
|
92
|
+
return response;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const { headers: retryHeaders } = buildRequestHeaders(
|
|
96
|
+
init,
|
|
97
|
+
shouldAttachAuth,
|
|
98
|
+
includeWorkspaceHeaders,
|
|
99
|
+
);
|
|
100
|
+
return fetchWithHeaders(input, init, retryHeaders);
|
|
35
101
|
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ap as o,aq as n}from"./index-CD3NusgQ.js";const t=(a,r)=>o.lang.round(n.parse(a)[r]);export{t as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-B4BG7PRW-9UuoCVI1.js";import{_ as i}from"./index-CD3NusgQ.js";import"./chunk-FMBD7UC4-DZoCKsqW.js";import"./chunk-55IACEB6-BtkroFP3.js";import"./chunk-QN33PNHL-CGFY-glY.js";var p={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{p as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-B4BG7PRW-9UuoCVI1.js";import{_ as i}from"./index-CD3NusgQ.js";import"./chunk-FMBD7UC4-DZoCKsqW.js";import"./chunk-55IACEB6-BtkroFP3.js";import"./chunk-QN33PNHL-CGFY-glY.js";var p={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{p as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ay as r}from"./index-CD3NusgQ.js";var a=4;function n(o){return r(o,a)}export{n as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as t,b as r,a,S as s}from"./chunk-DI55MBZ5-DFossSVg.js";import{_ as i}from"./index-CD3NusgQ.js";import"./chunk-55IACEB6-BtkroFP3.js";import"./chunk-QN33PNHL-CGFY-glY.js";var l={parser:a,get db(){return new s(2)},renderer:r,styles:t,init:i(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{l as diagram};
|