@burdenoff/microfe-planmagnet 2026.1126.2 → 2026.1127.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/generated/wspace-operations.d.ts +19 -5
- package/dist/generated/wspace-operations.js +412 -1
- package/dist/generated/wspace-types.d.ts +172 -0
- package/dist/planmagnet/controls/Pickers.js +170 -180
- package/dist/planmagnet/forecast/DeliveryForecastCard.js +99 -90
- package/dist/planmagnet/pages/CompetitorsCompetitorsPagePage.js +13 -37
- package/dist/planmagnet/providers/PlanMagnetProvider.d.ts +1 -0
- package/dist/planmagnet/providers/PlanMagnetProvider.js +8 -4
- package/package.json +1 -1
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { resolvePlanMagnetPath as e, usePlanMagnet as t, usePlanMagnetNavigate as n } from "../providers/PlanMagnetProvider.js";
|
|
2
|
+
import { isForbidden as r } from "../utils/graphqlErrors.js";
|
|
3
|
+
import { detailPath as i } from "../utils/rowNavigation.js";
|
|
4
|
+
import { useState as a } from "react";
|
|
5
|
+
import { CalendarRange as o } from "lucide-react";
|
|
6
|
+
import { gql as s } from "@apollo/client";
|
|
7
|
+
import { useQuery as c } from "@apollo/client/react";
|
|
8
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
9
|
+
import { Card as d, CardContent as f, CardHeader as p, CardTitle as m, Checkbox as h } from "@burdenoff/fe-libs/ui";
|
|
10
|
+
import { useI18n as g } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
9
11
|
// src/planmagnet/forecast/DeliveryForecastCard.tsx
|
|
10
|
-
var
|
|
12
|
+
var _ = s`
|
|
11
13
|
query PlanmagnetDeliveryForecast(
|
|
12
14
|
$workspaceId: ID!
|
|
13
15
|
$projectId: ID!
|
|
@@ -40,7 +42,7 @@ var p = r`
|
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
`;
|
|
43
|
-
function
|
|
45
|
+
function v(e) {
|
|
44
46
|
return new Date(e).toLocaleDateString(void 0, {
|
|
45
47
|
timeZone: "UTC",
|
|
46
48
|
year: "numeric",
|
|
@@ -48,158 +50,165 @@ function m(e) {
|
|
|
48
50
|
day: "numeric"
|
|
49
51
|
});
|
|
50
52
|
}
|
|
51
|
-
function
|
|
52
|
-
let { t:
|
|
53
|
+
function y({ workspaceId: s, projectId: y, sprintId: b, sprintName: x }) {
|
|
54
|
+
let { t: S } = g(), { basePath: C } = t(), w = n(), [T, E] = a(!1), D = T && !!b, { data: O, loading: k, error: A } = c(_, {
|
|
53
55
|
variables: {
|
|
54
|
-
workspaceId:
|
|
55
|
-
projectId:
|
|
56
|
-
scope:
|
|
56
|
+
workspaceId: s,
|
|
57
|
+
projectId: y,
|
|
58
|
+
scope: D && b ? { sprintId: b } : void 0
|
|
57
59
|
},
|
|
58
|
-
skip: !
|
|
59
|
-
}),
|
|
60
|
-
return /* @__PURE__ */
|
|
60
|
+
skip: !s || !y
|
|
61
|
+
}), j = O?.planmagnetForecastDelivery;
|
|
62
|
+
return /* @__PURE__ */ u(d, {
|
|
61
63
|
"data-testid": "forecast-card",
|
|
62
|
-
children: [/* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
+
children: [/* @__PURE__ */ u(p, { children: [
|
|
65
|
+
/* @__PURE__ */ u(m, {
|
|
64
66
|
className: "flex items-center gap-2",
|
|
65
|
-
children: [/* @__PURE__ */
|
|
67
|
+
children: [/* @__PURE__ */ l(o, { className: "h-4 w-4" }), S("planmagnet.forecast.delivery.title", "Delivery forecast")]
|
|
66
68
|
}),
|
|
67
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ l("p", {
|
|
68
70
|
className: "text-xs text-muted-foreground",
|
|
69
|
-
children:
|
|
71
|
+
children: D ? S("planmagnet.forecast.delivery.subtitleSprint", "For the open items of {{sprint}} only.", { sprint: x ?? S("planmagnet.forecast.delivery.thisSprint", "this sprint") }) : S("planmagnet.forecast.delivery.subtitle", "For this project's own open, estimated work items.")
|
|
70
72
|
}),
|
|
71
|
-
|
|
72
|
-
htmlFor: `forecast-scope-sprint-${
|
|
73
|
+
b && /* @__PURE__ */ u("label", {
|
|
74
|
+
htmlFor: `forecast-scope-sprint-${y}`,
|
|
73
75
|
className: "flex items-center gap-2 pt-1 text-xs font-normal text-muted-foreground",
|
|
74
|
-
children: [/* @__PURE__ */
|
|
75
|
-
id: `forecast-scope-sprint-${
|
|
76
|
-
checked:
|
|
77
|
-
onCheckedChange: (e) =>
|
|
78
|
-
}),
|
|
76
|
+
children: [/* @__PURE__ */ l(h, {
|
|
77
|
+
id: `forecast-scope-sprint-${y}`,
|
|
78
|
+
checked: T,
|
|
79
|
+
onCheckedChange: (e) => E(e === !0)
|
|
80
|
+
}), S("planmagnet.forecast.delivery.scopeToggle", "Only this sprint's items ({{sprint}})", { sprint: x ?? S("planmagnet.forecast.delivery.thisSprint", "this sprint") })]
|
|
79
81
|
})
|
|
80
|
-
] }), /* @__PURE__ */
|
|
82
|
+
] }), /* @__PURE__ */ l(f, { children: y ? k && !O ? /* @__PURE__ */ l("div", {
|
|
81
83
|
className: "flex justify-center py-8",
|
|
82
|
-
children: /* @__PURE__ */
|
|
83
|
-
}) :
|
|
84
|
+
children: /* @__PURE__ */ l("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
|
|
85
|
+
}) : A ? /* @__PURE__ */ l("p", {
|
|
84
86
|
className: "text-sm text-status-error-text",
|
|
85
|
-
children:
|
|
86
|
-
}) :
|
|
87
|
+
children: r(A) ? S("planmagnet.forecast.delivery.forbidden", "You do not have access to the delivery forecast for this project.") : `${S("planmagnet.forecast.delivery.error", "Delivery forecast could not be loaded")}: ${A.message}`
|
|
88
|
+
}) : j ? j.insufficientHistory ? /* @__PURE__ */ u("div", {
|
|
87
89
|
className: "space-y-2",
|
|
88
90
|
"data-testid": "forecast-insufficient",
|
|
89
|
-
children: [/* @__PURE__ */
|
|
91
|
+
children: [/* @__PURE__ */ l("p", {
|
|
90
92
|
className: "text-sm text-muted-foreground",
|
|
91
|
-
children:
|
|
92
|
-
}), /* @__PURE__ */
|
|
93
|
+
children: j.reason ?? S("planmagnet.forecast.delivery.insufficientFallback", "Not enough completed-sprint history yet to forecast a delivery date.")
|
|
94
|
+
}), /* @__PURE__ */ l("p", {
|
|
93
95
|
className: "text-xs text-muted-foreground",
|
|
94
|
-
children:
|
|
96
|
+
children: j.confidenceNote
|
|
95
97
|
})]
|
|
96
|
-
}) : /* @__PURE__ */
|
|
98
|
+
}) : /* @__PURE__ */ u("div", {
|
|
97
99
|
className: "space-y-4",
|
|
98
100
|
children: [
|
|
99
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ u("dl", {
|
|
100
102
|
className: "grid grid-cols-3 gap-3 text-center",
|
|
101
103
|
"data-testid": "forecast-dates",
|
|
102
104
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ u("div", {
|
|
104
106
|
className: "rounded-md border p-2.5",
|
|
105
107
|
children: [
|
|
106
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ l("dt", {
|
|
107
109
|
className: "text-xs text-muted-foreground",
|
|
108
|
-
children:
|
|
110
|
+
children: S("planmagnet.forecast.delivery.p50Label", "Likely by (p50)")
|
|
109
111
|
}),
|
|
110
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ l("dd", {
|
|
111
113
|
className: "mt-1 text-sm font-semibold",
|
|
112
|
-
children:
|
|
114
|
+
children: j.dates ? v(j.dates.p50) : "—"
|
|
113
115
|
}),
|
|
114
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ l("dd", {
|
|
115
117
|
className: "text-xs text-muted-foreground",
|
|
116
|
-
children:
|
|
118
|
+
children: j.sprintsNeeded ? S("planmagnet.forecast.delivery.sprints", "{{count}} sprint(s)", { count: j.sprintsNeeded.p50 }) : "—"
|
|
117
119
|
})
|
|
118
120
|
]
|
|
119
121
|
}),
|
|
120
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ u("div", {
|
|
121
123
|
className: "rounded-md border p-2.5",
|
|
122
124
|
children: [
|
|
123
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ l("dt", {
|
|
124
126
|
className: "text-xs text-muted-foreground",
|
|
125
|
-
children:
|
|
127
|
+
children: S("planmagnet.forecast.delivery.p85Label", "Confident by (p85)")
|
|
126
128
|
}),
|
|
127
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ l("dd", {
|
|
128
130
|
className: "mt-1 text-sm font-semibold",
|
|
129
|
-
children:
|
|
131
|
+
children: j.dates ? v(j.dates.p85) : "—"
|
|
130
132
|
}),
|
|
131
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ l("dd", {
|
|
132
134
|
className: "text-xs text-muted-foreground",
|
|
133
|
-
children:
|
|
135
|
+
children: j.sprintsNeeded ? S("planmagnet.forecast.delivery.sprints", "{{count}} sprint(s)", { count: j.sprintsNeeded.p85 }) : "—"
|
|
134
136
|
})
|
|
135
137
|
]
|
|
136
138
|
}),
|
|
137
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ u("div", {
|
|
138
140
|
className: "rounded-md border p-2.5",
|
|
139
141
|
children: [
|
|
140
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ l("dt", {
|
|
141
143
|
className: "text-xs text-muted-foreground",
|
|
142
|
-
children:
|
|
144
|
+
children: S("planmagnet.forecast.delivery.p95Label", "Very confident by (p95)")
|
|
143
145
|
}),
|
|
144
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ l("dd", {
|
|
145
147
|
className: "mt-1 text-sm font-semibold",
|
|
146
|
-
children:
|
|
148
|
+
children: j.dates ? v(j.dates.p95) : "—"
|
|
147
149
|
}),
|
|
148
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ l("dd", {
|
|
149
151
|
className: "text-xs text-muted-foreground",
|
|
150
|
-
children:
|
|
152
|
+
children: j.sprintsNeeded ? S("planmagnet.forecast.delivery.sprints", "{{count}} sprint(s)", { count: j.sprintsNeeded.p95 }) : "—"
|
|
151
153
|
})
|
|
152
154
|
]
|
|
153
155
|
})
|
|
154
156
|
]
|
|
155
157
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ u("div", {
|
|
157
159
|
className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",
|
|
158
|
-
children: [/* @__PURE__ */
|
|
160
|
+
children: [/* @__PURE__ */ l("span", { children: S("planmagnet.forecast.delivery.remaining", "Remaining: {{points}} pts", { points: j.remainingPoints }) }), j.unestimatedItems > 0 && /* @__PURE__ */ l("span", {
|
|
159
161
|
className: "text-status-warning-text",
|
|
160
|
-
children:
|
|
162
|
+
children: S("planmagnet.forecast.delivery.unestimated", "{{count}} open item(s) have no estimate (counted as 0 pts)", { count: j.unestimatedItems })
|
|
161
163
|
})]
|
|
162
164
|
}),
|
|
163
|
-
|
|
165
|
+
j.scopeTruncated && /* @__PURE__ */ l("p", {
|
|
164
166
|
className: "text-xs text-status-warning-text",
|
|
165
|
-
children:
|
|
167
|
+
children: S("planmagnet.forecast.delivery.truncated", "This scope is large enough that the scan stopped early — remaining points and unestimated items reflect only the first items found, not the whole project.")
|
|
166
168
|
}),
|
|
167
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("h3", {
|
|
168
170
|
className: "mb-1 text-sm font-medium",
|
|
169
|
-
children:
|
|
170
|
-
}), /* @__PURE__ */
|
|
171
|
+
children: S("planmagnet.forecast.delivery.evidence", "Based on")
|
|
172
|
+
}), /* @__PURE__ */ u("ul", {
|
|
171
173
|
className: "space-y-1 text-xs text-muted-foreground",
|
|
172
174
|
"data-testid": "forecast-inputs",
|
|
173
|
-
children: [
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
className: "
|
|
177
|
-
children:
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
175
|
+
children: [j.inputRefs.map((t) => {
|
|
176
|
+
let n = i("/projects/planning-detail-page", t.sprintId);
|
|
177
|
+
return /* @__PURE__ */ u("li", {
|
|
178
|
+
className: "flex items-center justify-between gap-2",
|
|
179
|
+
children: [/* @__PURE__ */ l("a", {
|
|
180
|
+
className: "truncate text-foreground underline underline-offset-2",
|
|
181
|
+
href: e(n, C),
|
|
182
|
+
onClick: (e) => {
|
|
183
|
+
e.defaultPrevented || e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || (e.preventDefault(), w(n));
|
|
184
|
+
},
|
|
185
|
+
children: t.name
|
|
186
|
+
}), /* @__PURE__ */ u("span", {
|
|
187
|
+
className: "shrink-0 tabular-nums",
|
|
188
|
+
children: [S("planmagnet.forecast.delivery.evidenceRow", "{{points}} pts", { points: t.completedPoints }), t.endDate ? ` · ${v(t.endDate)}` : ""]
|
|
189
|
+
})]
|
|
190
|
+
}, t.sprintId);
|
|
191
|
+
}), j.inputRefs.length === 0 && /* @__PURE__ */ l("li", { children: S("planmagnet.forecast.delivery.noInputs", "No sprint history available.") })]
|
|
183
192
|
})] }),
|
|
184
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ l("p", {
|
|
185
194
|
className: "text-xs text-muted-foreground",
|
|
186
|
-
children:
|
|
195
|
+
children: j.confidenceNote
|
|
187
196
|
}),
|
|
188
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ u("details", {
|
|
189
198
|
className: "text-xs text-muted-foreground",
|
|
190
|
-
children: [/* @__PURE__ */
|
|
199
|
+
children: [/* @__PURE__ */ l("summary", {
|
|
191
200
|
className: "cursor-pointer select-none font-medium text-foreground",
|
|
192
|
-
children:
|
|
193
|
-
}), /* @__PURE__ */
|
|
201
|
+
children: S("planmagnet.forecast.whatIsThis", "What is this?")
|
|
202
|
+
}), /* @__PURE__ */ l("p", {
|
|
194
203
|
className: "mt-1",
|
|
195
|
-
children:
|
|
204
|
+
children: S("planmagnet.forecast.delivery.explainer", "Statistical forecast (Monte Carlo over past sprints): a simulation that resamples this project’s trailing completed sprints’ real velocities thousands of times to see how many more sprints the remaining work is likely to take. It is never an AI/LLM call, and it never invents a date from a sample it doesn’t trust — when history is too thin, it says so instead of guessing.")
|
|
196
205
|
})]
|
|
197
206
|
})
|
|
198
207
|
]
|
|
199
|
-
}) : null : /* @__PURE__ */
|
|
208
|
+
}) : null : /* @__PURE__ */ l("p", {
|
|
200
209
|
className: "text-sm text-muted-foreground",
|
|
201
|
-
children:
|
|
210
|
+
children: S("planmagnet.forecast.delivery.noProject", "Select a project to see its forecast.")
|
|
202
211
|
}) })]
|
|
203
212
|
});
|
|
204
213
|
}
|
|
205
|
-
export {
|
|
214
|
+
export { y as DeliveryForecastCard };
|
|
@@ -1,40 +1,16 @@
|
|
|
1
1
|
import { usePlanMagnet as e, usePlanMagnetNavigate as t } from "../providers/PlanMagnetProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { ListCompetitorsDocument as n } from "../../generated/wspace-operations.js";
|
|
3
|
+
import { detailPath as r, rowLinkProps as i } from "../utils/rowNavigation.js";
|
|
4
|
+
import { useDeferredValue as a, useState as o } from "react";
|
|
5
|
+
import { Loader2 as s, Plus as c, Swords as l } from "lucide-react";
|
|
6
6
|
import { useQuery as u } from "@apollo/client/react";
|
|
7
7
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
8
|
import { Badge as p, Button as m, Card as h, CardContent as g, CardHeader as _, CardTitle as v, Input as y } from "@burdenoff/fe-libs/ui";
|
|
9
9
|
// src/planmagnet/pages/CompetitorsCompetitorsPagePage.tsx
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
$workspaceId: ID!
|
|
13
|
-
$filter: PlanmagnetCompetitorFilter
|
|
14
|
-
$pagination: PlanmagnetPaginationInput
|
|
15
|
-
) {
|
|
16
|
-
planmagnetCompetitors(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {
|
|
17
|
-
items {
|
|
18
|
-
id
|
|
19
|
-
name
|
|
20
|
-
website
|
|
21
|
-
description
|
|
22
|
-
tags
|
|
23
|
-
strengths
|
|
24
|
-
weaknesses
|
|
25
|
-
updatedAt
|
|
26
|
-
featureRequests {
|
|
27
|
-
id
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
totalCount
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
`;
|
|
34
|
-
function x() {
|
|
35
|
-
let l = t(), { workspaceId: x } = e(), [S, C] = a(""), w = i(S.trim()), { data: T, loading: E, error: D } = u(b, {
|
|
10
|
+
function b() {
|
|
11
|
+
let b = t(), { workspaceId: x } = e(), [S, C] = o(""), w = a(S.trim()), { data: T, loading: E, error: D } = u(n, {
|
|
36
12
|
variables: {
|
|
37
|
-
workspaceId: x,
|
|
13
|
+
workspaceId: x ?? "",
|
|
38
14
|
pagination: { first: 50 },
|
|
39
15
|
filter: w ? { search: w } : void 0
|
|
40
16
|
},
|
|
@@ -42,7 +18,7 @@ function x() {
|
|
|
42
18
|
});
|
|
43
19
|
if (E && !T) return /* @__PURE__ */ d("div", {
|
|
44
20
|
className: "flex items-center justify-center p-12",
|
|
45
|
-
children: /* @__PURE__ */ d(
|
|
21
|
+
children: /* @__PURE__ */ d(s, { className: "h-8 w-8 animate-spin text-muted-foreground" })
|
|
46
22
|
});
|
|
47
23
|
if (D) return /* @__PURE__ */ f("div", {
|
|
48
24
|
className: "p-6 text-destructive",
|
|
@@ -67,8 +43,8 @@ function x() {
|
|
|
67
43
|
]
|
|
68
44
|
})] }), /* @__PURE__ */ f(m, {
|
|
69
45
|
size: "sm",
|
|
70
|
-
onClick: () =>
|
|
71
|
-
children: [/* @__PURE__ */ d(
|
|
46
|
+
onClick: () => b("/products/create-competitor-page"),
|
|
47
|
+
children: [/* @__PURE__ */ d(c, { className: "mr-1 h-4 w-4" }), "New Competitor"]
|
|
72
48
|
})]
|
|
73
49
|
}),
|
|
74
50
|
/* @__PURE__ */ d(y, {
|
|
@@ -81,12 +57,12 @@ function x() {
|
|
|
81
57
|
/* @__PURE__ */ d("div", {
|
|
82
58
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
83
59
|
children: O.map((e) => /* @__PURE__ */ f(h, {
|
|
84
|
-
...
|
|
60
|
+
...i(() => b(r("/products/competitor-detail-page", e.id)), e.name),
|
|
85
61
|
children: [/* @__PURE__ */ d(_, {
|
|
86
62
|
className: "pb-2",
|
|
87
63
|
children: /* @__PURE__ */ f(v, {
|
|
88
64
|
className: "text-base flex items-center gap-2",
|
|
89
|
-
children: [/* @__PURE__ */ d(
|
|
65
|
+
children: [/* @__PURE__ */ d(l, { className: "h-4 w-4 text-primary" }), e.name]
|
|
90
66
|
})
|
|
91
67
|
}), /* @__PURE__ */ f(g, {
|
|
92
68
|
className: "space-y-3",
|
|
@@ -137,4 +113,4 @@ function x() {
|
|
|
137
113
|
]
|
|
138
114
|
});
|
|
139
115
|
}
|
|
140
|
-
export {
|
|
116
|
+
export { b as CompetitorsCompetitorsPagePage };
|
|
@@ -4,6 +4,7 @@ import { PlanMagnetRootProps } from '../types';
|
|
|
4
4
|
* Hook to access PlanMagnet context
|
|
5
5
|
*/
|
|
6
6
|
export declare const usePlanMagnet: () => PlanMagnetRootProps;
|
|
7
|
+
export declare function resolvePlanMagnetPath(path: string, basePath?: string): string;
|
|
7
8
|
/**
|
|
8
9
|
* Hook for navigation within the PlanMagnet microfrontend.
|
|
9
10
|
* Uses the shell's navigate function if available, falling back to
|
|
@@ -34,17 +34,21 @@ var C = (e) => e.stop(), w = (e) => e.clear(), T = n(null), E = () => {
|
|
|
34
34
|
let e = i(T);
|
|
35
35
|
if (!e) throw Error("usePlanMagnet must be used within PlanMagnetProvider");
|
|
36
36
|
return e;
|
|
37
|
-
}
|
|
37
|
+
};
|
|
38
|
+
function D(e, t) {
|
|
39
|
+
return t && t !== "/" ? `${t}${e}` : e;
|
|
40
|
+
}
|
|
41
|
+
var O = () => {
|
|
38
42
|
let { navigate: e, basePath: t } = E(), n = l();
|
|
39
43
|
return r((r) => {
|
|
40
|
-
let i =
|
|
44
|
+
let i = D(r, t);
|
|
41
45
|
e ? e(i) : n(i);
|
|
42
46
|
}, [
|
|
43
47
|
e,
|
|
44
48
|
t,
|
|
45
49
|
n
|
|
46
50
|
]);
|
|
47
|
-
},
|
|
51
|
+
}, k = ({ children: n, basePath: r, navigate: i, currentUser: a, workspaceId: s, tenantId: l, organizationId: _, apiGatewayUrl: E, authToken: D, workspaceToken: O, registerNavItems: k, registerFooterItems: A, onAuthError: j, isolateRequests: M = !1 }) => {
|
|
48
52
|
let N = o(() => M ? b() : x, [M]), P = o(() => {
|
|
49
53
|
let n = m(({ error: n }) => {
|
|
50
54
|
if (e.is(n)) for (let e of n.errors) {
|
|
@@ -140,4 +144,4 @@ var C = (e) => e.stop(), w = (e) => e.clear(), T = n(null), E = () => {
|
|
|
140
144
|
children: R
|
|
141
145
|
}) : R;
|
|
142
146
|
};
|
|
143
|
-
export {
|
|
147
|
+
export { k as PlanMagnetProvider, D as resolvePlanMagnetPath, E as usePlanMagnet, O as usePlanMagnetNavigate };
|