@burdenoff/microfe-store 2026.805.1 → 2026.819.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/StoreAdminRoutes.js +27 -27
- package/dist/StoreRoot.js +78 -45
- package/dist/StoreRoot.js.map +1 -1
- package/dist/StoreRoutes.js +163 -85
- package/dist/StoreRoutes.js.map +1 -1
- package/dist/components/sourcing/SourcingConfirmationDialog.d.ts +15 -0
- package/dist/components/sourcing/SourcingConfirmationDialog.js +61 -0
- package/dist/components/sourcing/SourcingConfirmationDialog.js.map +1 -0
- package/dist/components/sourcing/SourcingUi.d.ts +51 -0
- package/dist/components/sourcing/SourcingUi.js +176 -0
- package/dist/components/sourcing/SourcingUi.js.map +1 -0
- package/dist/generated/global-operations.d.ts +713 -0
- package/dist/generated/global-operations.js +557 -175
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.d.ts +2152 -2159
- package/dist/generated/global-types.js +8 -2
- package/dist/generated/global-types.js.map +1 -1
- package/dist/hooks/useBackendCart.js +17 -17
- package/dist/hooks/useInstallations.js +32 -32
- package/dist/hooks/useOrders.js +7 -7
- package/dist/hooks/useSourcing.d.ts +319 -0
- package/dist/hooks/useSourcing.js +87 -0
- package/dist/hooks/useSourcing.js.map +1 -0
- package/dist/hooks/useStoreGraphQL.js +163 -163
- package/dist/index.js +12 -12
- package/dist/pages/AdminDashboardPage.js +132 -132
- package/dist/pages/AdminReviewModerationPage.js +55 -55
- package/dist/pages/AdminStoresPage.js +95 -95
- package/dist/pages/AdminSubmissionsQueuePage.js +297 -297
- package/dist/pages/AdminSubmissionsQueuePage.js.map +1 -1
- package/dist/pages/AppDetailPage.js +65 -65
- package/dist/pages/AppSettingsPage.js +32 -32
- package/dist/pages/CartPage.js +66 -66
- package/dist/pages/CreateSourcingRequestPage.d.ts +3 -0
- package/dist/pages/CreateSourcingRequestPage.js +439 -0
- package/dist/pages/CreateSourcingRequestPage.js.map +1 -0
- package/dist/pages/InstalledAppsPage.js +15 -15
- package/dist/pages/InstalledAppsPage.js.map +1 -1
- package/dist/pages/MarketplaceHomePage.js +384 -384
- package/dist/pages/MarketplaceHomePage.js.map +1 -1
- package/dist/pages/MyLicensesPage.js +39 -39
- package/dist/pages/OrderConfirmationPage.js +57 -57
- package/dist/pages/OrdersPage.js +3 -3
- package/dist/pages/OrdersPage.js.map +1 -1
- package/dist/pages/ProductDetailPage.js +6 -6
- package/dist/pages/SellerSourcingOffersPage.d.ts +3 -0
- package/dist/pages/SellerSourcingOffersPage.js +284 -0
- package/dist/pages/SellerSourcingOffersPage.js.map +1 -0
- package/dist/pages/SellerSourcingOpportunitiesPage.d.ts +3 -0
- package/dist/pages/SellerSourcingOpportunitiesPage.js +272 -0
- package/dist/pages/SellerSourcingOpportunitiesPage.js.map +1 -0
- package/dist/pages/SellerSourcingOpportunityDetailPage.d.ts +3 -0
- package/dist/pages/SellerSourcingOpportunityDetailPage.js +465 -0
- package/dist/pages/SellerSourcingOpportunityDetailPage.js.map +1 -0
- package/dist/pages/SourcingRequestDetailPage.d.ts +3 -0
- package/dist/pages/SourcingRequestDetailPage.js +447 -0
- package/dist/pages/SourcingRequestDetailPage.js.map +1 -0
- package/dist/pages/SourcingRequestsPage.d.ts +3 -0
- package/dist/pages/SourcingRequestsPage.js +272 -0
- package/dist/pages/SourcingRequestsPage.js.map +1 -0
- package/dist/providers/SourcingAccessProvider.d.ts +21 -0
- package/dist/providers/SourcingAccessProvider.js +95 -0
- package/dist/providers/SourcingAccessProvider.js.map +1 -0
- package/dist/translations/en.d.ts +3 -0
- package/dist/translations/en.js +3 -0
- package/dist/translations/en.js.map +1 -1
- package/package.json +1 -1
package/dist/StoreRoutes.js
CHANGED
|
@@ -3,24 +3,24 @@ import { useStorePermissions as t } from "./hooks/useStorePermissions.js";
|
|
|
3
3
|
import { AccessDenied as n } from "./components/AccessDenied.js";
|
|
4
4
|
import { PageLoadingFallback as r } from "./components/RouteGuards.js";
|
|
5
5
|
import { Suspense as i, lazy as a } from "react";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { Navigate as o, Route as s, Routes as c } from "react-router";
|
|
7
|
+
import { FeatureGate as l } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
8
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
9
|
//#region src/StoreRoutes.tsx
|
|
10
|
-
var f = a(() => import("./pages/MarketplaceHomePage.js").then((e) => ({ default: e.MarketplaceHomePage }))), p = a(() => import("./pages/InstalledAppsPage.js").then((e) => ({ default: e.InstalledAppsPage }))), m = a(() => import("./pages/ProductDetailPage.js").then((e) => ({ default: e.ProductDetailPage }))), h = a(() => import("./pages/CartPage.js").then((e) => ({ default: e.CartPage }))), g = a(() => import("./pages/OrdersPage.js").then((e) => ({ default: e.OrdersPage }))), _ = a(() => import("./pages/MyLicensesPage.js").then((e) => ({ default: e.MyLicensesPage }))), v = a(() => import("./pages/OrderConfirmationPage.js").then((e) => ({ default: e.OrderConfirmationPage }))), y = a(() => import("./pages/AppDetailPage.js").then((e) => ({ default: e.AppDetailPage }))), b = a(() => import("./pages/AppSettingsPage.js").then((e) => ({ default: e.AppSettingsPage })));
|
|
11
|
-
function
|
|
12
|
-
return /* @__PURE__ */
|
|
10
|
+
var f = a(() => import("./pages/MarketplaceHomePage.js").then((e) => ({ default: e.MarketplaceHomePage }))), p = a(() => import("./pages/InstalledAppsPage.js").then((e) => ({ default: e.InstalledAppsPage }))), m = a(() => import("./pages/ProductDetailPage.js").then((e) => ({ default: e.ProductDetailPage }))), h = a(() => import("./pages/CartPage.js").then((e) => ({ default: e.CartPage }))), g = a(() => import("./pages/OrdersPage.js").then((e) => ({ default: e.OrdersPage }))), _ = a(() => import("./pages/MyLicensesPage.js").then((e) => ({ default: e.MyLicensesPage }))), v = a(() => import("./pages/OrderConfirmationPage.js").then((e) => ({ default: e.OrderConfirmationPage }))), y = a(() => import("./pages/AppDetailPage.js").then((e) => ({ default: e.AppDetailPage }))), b = a(() => import("./pages/AppSettingsPage.js").then((e) => ({ default: e.AppSettingsPage }))), x = a(() => import("./pages/SourcingRequestsPage.js").then((e) => ({ default: e.SourcingRequestsPage }))), S = a(() => import("./pages/CreateSourcingRequestPage.js").then((e) => ({ default: e.CreateSourcingRequestPage }))), C = a(() => import("./pages/SourcingRequestDetailPage.js").then((e) => ({ default: e.SourcingRequestDetailPage }))), w = a(() => import("./pages/SellerSourcingOpportunitiesPage.js").then((e) => ({ default: e.SellerSourcingOpportunitiesPage }))), T = a(() => import("./pages/SellerSourcingOpportunityDetailPage.js").then((e) => ({ default: e.SellerSourcingOpportunityDetailPage }))), E = a(() => import("./pages/SellerSourcingOffersPage.js").then((e) => ({ default: e.SellerSourcingOffersPage })));
|
|
11
|
+
function D({ title: e, featureFlag: t }) {
|
|
12
|
+
return /* @__PURE__ */ u("div", {
|
|
13
13
|
className: "flex min-h-[400px] items-center justify-center p-6",
|
|
14
|
-
children: /* @__PURE__ */
|
|
14
|
+
children: /* @__PURE__ */ d("div", {
|
|
15
15
|
className: "max-w-md rounded-lg border border-border-subtle bg-bg-surface p-6 text-center shadow-sm",
|
|
16
|
-
children: [/* @__PURE__ */
|
|
16
|
+
children: [/* @__PURE__ */ d("h2", {
|
|
17
17
|
className: "text-lg font-semibold text-text-primary",
|
|
18
18
|
children: [e, " is not enabled"]
|
|
19
|
-
}), /* @__PURE__ */
|
|
19
|
+
}), /* @__PURE__ */ d("p", {
|
|
20
20
|
className: "mt-2 text-sm text-text-secondary",
|
|
21
21
|
children: [
|
|
22
22
|
"Ask an administrator to enable the ",
|
|
23
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ u("span", {
|
|
24
24
|
className: "font-mono",
|
|
25
25
|
children: t
|
|
26
26
|
}),
|
|
@@ -31,147 +31,225 @@ function x({ title: e, featureFlag: t }) {
|
|
|
31
31
|
})
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
return a ? /* @__PURE__ */
|
|
34
|
+
function O({ title: e, featureFlag: t, allowed: i, isLoading: a, children: o }) {
|
|
35
|
+
return a ? /* @__PURE__ */ u(r, {}) : /* @__PURE__ */ u(l, {
|
|
36
36
|
flag: t,
|
|
37
37
|
defaultValue: !0,
|
|
38
|
-
fallback: /* @__PURE__ */
|
|
38
|
+
fallback: /* @__PURE__ */ u(D, {
|
|
39
39
|
title: e,
|
|
40
40
|
featureFlag: t
|
|
41
41
|
}),
|
|
42
|
-
children: i ?
|
|
42
|
+
children: i ? o : /* @__PURE__ */ u(n, {})
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
var
|
|
46
|
-
let { basePath: n } = e(), { permissions:
|
|
47
|
-
return /* @__PURE__ */ c
|
|
48
|
-
/* @__PURE__ */ s
|
|
45
|
+
var k = () => {
|
|
46
|
+
let { basePath: n, user: a, authToken: l } = e(), { permissions: D, isLoading: k } = t(), A = !!(a?.id || l);
|
|
47
|
+
return /* @__PURE__ */ d(c, { children: [
|
|
48
|
+
/* @__PURE__ */ u(s, {
|
|
49
49
|
index: !0,
|
|
50
|
-
element: /* @__PURE__ */
|
|
50
|
+
element: /* @__PURE__ */ u(o, {
|
|
51
51
|
to: "marketplace",
|
|
52
52
|
replace: !0
|
|
53
53
|
})
|
|
54
54
|
}),
|
|
55
|
-
/* @__PURE__ */ s
|
|
55
|
+
/* @__PURE__ */ u(s, {
|
|
56
56
|
path: "marketplace",
|
|
57
|
-
element: /* @__PURE__ */
|
|
57
|
+
element: /* @__PURE__ */ u(O, {
|
|
58
58
|
title: "Marketplace",
|
|
59
59
|
featureFlag: "store.marketplace",
|
|
60
|
-
allowed:
|
|
61
|
-
isLoading:
|
|
62
|
-
children: /* @__PURE__ */
|
|
63
|
-
fallback: /* @__PURE__ */
|
|
64
|
-
children: /* @__PURE__ */
|
|
60
|
+
allowed: D.canBrowse,
|
|
61
|
+
isLoading: k,
|
|
62
|
+
children: /* @__PURE__ */ u(i, {
|
|
63
|
+
fallback: /* @__PURE__ */ u(r, {}),
|
|
64
|
+
children: /* @__PURE__ */ u(f, {})
|
|
65
65
|
})
|
|
66
66
|
})
|
|
67
67
|
}),
|
|
68
|
-
/* @__PURE__ */ s
|
|
68
|
+
/* @__PURE__ */ u(s, {
|
|
69
69
|
path: "marketplace/product/:productId",
|
|
70
|
-
element: /* @__PURE__ */
|
|
70
|
+
element: /* @__PURE__ */ u(O, {
|
|
71
71
|
title: "Marketplace",
|
|
72
72
|
featureFlag: "store.marketplace",
|
|
73
|
-
allowed:
|
|
74
|
-
isLoading:
|
|
75
|
-
children: /* @__PURE__ */
|
|
76
|
-
fallback: /* @__PURE__ */
|
|
77
|
-
children: /* @__PURE__ */
|
|
73
|
+
allowed: D.canBrowse,
|
|
74
|
+
isLoading: k,
|
|
75
|
+
children: /* @__PURE__ */ u(i, {
|
|
76
|
+
fallback: /* @__PURE__ */ u(r, {}),
|
|
77
|
+
children: /* @__PURE__ */ u(m, {})
|
|
78
78
|
})
|
|
79
79
|
})
|
|
80
80
|
}),
|
|
81
|
-
/* @__PURE__ */ s
|
|
81
|
+
/* @__PURE__ */ u(s, {
|
|
82
82
|
path: "cart",
|
|
83
|
-
element: /* @__PURE__ */
|
|
83
|
+
element: /* @__PURE__ */ u(O, {
|
|
84
84
|
title: "Cart",
|
|
85
85
|
featureFlag: "store.cart",
|
|
86
|
-
allowed:
|
|
87
|
-
isLoading:
|
|
88
|
-
children: /* @__PURE__ */
|
|
89
|
-
fallback: /* @__PURE__ */
|
|
90
|
-
children: /* @__PURE__ */
|
|
86
|
+
allowed: D.canPurchase,
|
|
87
|
+
isLoading: k,
|
|
88
|
+
children: /* @__PURE__ */ u(i, {
|
|
89
|
+
fallback: /* @__PURE__ */ u(r, {}),
|
|
90
|
+
children: /* @__PURE__ */ u(h, {})
|
|
91
91
|
})
|
|
92
92
|
})
|
|
93
93
|
}),
|
|
94
|
-
/* @__PURE__ */ s
|
|
94
|
+
/* @__PURE__ */ u(s, {
|
|
95
95
|
path: "orders/:orderId/confirmation",
|
|
96
|
-
element: /* @__PURE__ */
|
|
96
|
+
element: /* @__PURE__ */ u(O, {
|
|
97
97
|
title: "Order confirmation",
|
|
98
98
|
featureFlag: "store.orders",
|
|
99
|
-
allowed:
|
|
100
|
-
isLoading:
|
|
101
|
-
children: /* @__PURE__ */
|
|
102
|
-
fallback: /* @__PURE__ */
|
|
103
|
-
children: /* @__PURE__ */
|
|
99
|
+
allowed: D.canPurchase,
|
|
100
|
+
isLoading: k,
|
|
101
|
+
children: /* @__PURE__ */ u(i, {
|
|
102
|
+
fallback: /* @__PURE__ */ u(r, {}),
|
|
103
|
+
children: /* @__PURE__ */ u(v, {})
|
|
104
104
|
})
|
|
105
105
|
})
|
|
106
106
|
}),
|
|
107
|
-
/* @__PURE__ */ s
|
|
107
|
+
/* @__PURE__ */ u(s, {
|
|
108
108
|
path: "orders",
|
|
109
|
-
element: /* @__PURE__ */
|
|
109
|
+
element: /* @__PURE__ */ u(O, {
|
|
110
110
|
title: "Orders",
|
|
111
111
|
featureFlag: "store.orders",
|
|
112
|
-
allowed:
|
|
113
|
-
isLoading:
|
|
114
|
-
children: /* @__PURE__ */
|
|
115
|
-
fallback: /* @__PURE__ */
|
|
116
|
-
children: /* @__PURE__ */
|
|
112
|
+
allowed: D.canPurchase,
|
|
113
|
+
isLoading: k,
|
|
114
|
+
children: /* @__PURE__ */ u(i, {
|
|
115
|
+
fallback: /* @__PURE__ */ u(r, {}),
|
|
116
|
+
children: /* @__PURE__ */ u(g, {})
|
|
117
117
|
})
|
|
118
118
|
})
|
|
119
119
|
}),
|
|
120
|
-
/* @__PURE__ */ s
|
|
120
|
+
/* @__PURE__ */ u(s, {
|
|
121
121
|
path: "installed",
|
|
122
|
-
element: /* @__PURE__ */
|
|
122
|
+
element: /* @__PURE__ */ u(O, {
|
|
123
123
|
title: "Installed apps",
|
|
124
124
|
featureFlag: "store.installed",
|
|
125
|
-
allowed:
|
|
126
|
-
isLoading:
|
|
127
|
-
children: /* @__PURE__ */
|
|
128
|
-
fallback: /* @__PURE__ */
|
|
129
|
-
children: /* @__PURE__ */
|
|
125
|
+
allowed: D.canInstall,
|
|
126
|
+
isLoading: k,
|
|
127
|
+
children: /* @__PURE__ */ u(i, {
|
|
128
|
+
fallback: /* @__PURE__ */ u(r, {}),
|
|
129
|
+
children: /* @__PURE__ */ u(p, {})
|
|
130
130
|
})
|
|
131
131
|
})
|
|
132
132
|
}),
|
|
133
|
-
/* @__PURE__ */ s
|
|
133
|
+
/* @__PURE__ */ u(s, {
|
|
134
134
|
path: "installed/:installationId",
|
|
135
|
-
element: /* @__PURE__ */
|
|
135
|
+
element: /* @__PURE__ */ u(O, {
|
|
136
136
|
title: "Installed apps",
|
|
137
137
|
featureFlag: "store.installed",
|
|
138
|
-
allowed:
|
|
139
|
-
isLoading:
|
|
140
|
-
children: /* @__PURE__ */
|
|
141
|
-
fallback: /* @__PURE__ */
|
|
142
|
-
children: /* @__PURE__ */
|
|
138
|
+
allowed: D.canInstall,
|
|
139
|
+
isLoading: k,
|
|
140
|
+
children: /* @__PURE__ */ u(i, {
|
|
141
|
+
fallback: /* @__PURE__ */ u(r, {}),
|
|
142
|
+
children: /* @__PURE__ */ u(y, {})
|
|
143
143
|
})
|
|
144
144
|
})
|
|
145
145
|
}),
|
|
146
|
-
/* @__PURE__ */ s
|
|
146
|
+
/* @__PURE__ */ u(s, {
|
|
147
147
|
path: "installed/:installationId/settings",
|
|
148
|
-
element: /* @__PURE__ */
|
|
148
|
+
element: /* @__PURE__ */ u(O, {
|
|
149
149
|
title: "Installed apps",
|
|
150
150
|
featureFlag: "store.installed",
|
|
151
|
-
allowed:
|
|
152
|
-
isLoading:
|
|
153
|
-
children: /* @__PURE__ */
|
|
154
|
-
fallback: /* @__PURE__ */
|
|
155
|
-
children: /* @__PURE__ */
|
|
151
|
+
allowed: D.canInstall,
|
|
152
|
+
isLoading: k,
|
|
153
|
+
children: /* @__PURE__ */ u(i, {
|
|
154
|
+
fallback: /* @__PURE__ */ u(r, {}),
|
|
155
|
+
children: /* @__PURE__ */ u(b, {})
|
|
156
156
|
})
|
|
157
157
|
})
|
|
158
158
|
}),
|
|
159
|
-
/* @__PURE__ */ s
|
|
159
|
+
/* @__PURE__ */ u(s, {
|
|
160
160
|
path: "licenses",
|
|
161
|
-
element: /* @__PURE__ */
|
|
161
|
+
element: /* @__PURE__ */ u(O, {
|
|
162
162
|
title: "Licenses",
|
|
163
163
|
featureFlag: "store.licenses",
|
|
164
|
-
allowed:
|
|
165
|
-
isLoading:
|
|
166
|
-
children: /* @__PURE__ */
|
|
167
|
-
fallback: /* @__PURE__ */
|
|
168
|
-
children: /* @__PURE__ */
|
|
164
|
+
allowed: D.canManageLicenses,
|
|
165
|
+
isLoading: k,
|
|
166
|
+
children: /* @__PURE__ */ u(i, {
|
|
167
|
+
fallback: /* @__PURE__ */ u(r, {}),
|
|
168
|
+
children: /* @__PURE__ */ u(_, {})
|
|
169
169
|
})
|
|
170
170
|
})
|
|
171
171
|
}),
|
|
172
|
-
/* @__PURE__ */ s
|
|
172
|
+
/* @__PURE__ */ u(s, {
|
|
173
|
+
path: "sourcing/requests",
|
|
174
|
+
element: /* @__PURE__ */ u(O, {
|
|
175
|
+
title: "Sourcing",
|
|
176
|
+
featureFlag: "store.sourcing",
|
|
177
|
+
allowed: A,
|
|
178
|
+
isLoading: !1,
|
|
179
|
+
children: /* @__PURE__ */ u(i, {
|
|
180
|
+
fallback: /* @__PURE__ */ u(r, {}),
|
|
181
|
+
children: /* @__PURE__ */ u(x, {})
|
|
182
|
+
})
|
|
183
|
+
})
|
|
184
|
+
}),
|
|
185
|
+
/* @__PURE__ */ u(s, {
|
|
186
|
+
path: "sourcing/requests/new",
|
|
187
|
+
element: /* @__PURE__ */ u(O, {
|
|
188
|
+
title: "Sourcing",
|
|
189
|
+
featureFlag: "store.sourcing",
|
|
190
|
+
allowed: A,
|
|
191
|
+
isLoading: !1,
|
|
192
|
+
children: /* @__PURE__ */ u(i, {
|
|
193
|
+
fallback: /* @__PURE__ */ u(r, {}),
|
|
194
|
+
children: /* @__PURE__ */ u(S, {})
|
|
195
|
+
})
|
|
196
|
+
})
|
|
197
|
+
}),
|
|
198
|
+
/* @__PURE__ */ u(s, {
|
|
199
|
+
path: "sourcing/requests/:requestId",
|
|
200
|
+
element: /* @__PURE__ */ u(O, {
|
|
201
|
+
title: "Sourcing",
|
|
202
|
+
featureFlag: "store.sourcing",
|
|
203
|
+
allowed: A,
|
|
204
|
+
isLoading: !1,
|
|
205
|
+
children: /* @__PURE__ */ u(i, {
|
|
206
|
+
fallback: /* @__PURE__ */ u(r, {}),
|
|
207
|
+
children: /* @__PURE__ */ u(C, {})
|
|
208
|
+
})
|
|
209
|
+
})
|
|
210
|
+
}),
|
|
211
|
+
/* @__PURE__ */ u(s, {
|
|
212
|
+
path: "publisher/sourcing/opportunities",
|
|
213
|
+
element: /* @__PURE__ */ u(O, {
|
|
214
|
+
title: "Seller sourcing",
|
|
215
|
+
featureFlag: "store.sourcing",
|
|
216
|
+
allowed: A,
|
|
217
|
+
isLoading: !1,
|
|
218
|
+
children: /* @__PURE__ */ u(i, {
|
|
219
|
+
fallback: /* @__PURE__ */ u(r, {}),
|
|
220
|
+
children: /* @__PURE__ */ u(w, {})
|
|
221
|
+
})
|
|
222
|
+
})
|
|
223
|
+
}),
|
|
224
|
+
/* @__PURE__ */ u(s, {
|
|
225
|
+
path: "publisher/sourcing/opportunities/:requestId",
|
|
226
|
+
element: /* @__PURE__ */ u(O, {
|
|
227
|
+
title: "Seller sourcing",
|
|
228
|
+
featureFlag: "store.sourcing",
|
|
229
|
+
allowed: A,
|
|
230
|
+
isLoading: !1,
|
|
231
|
+
children: /* @__PURE__ */ u(i, {
|
|
232
|
+
fallback: /* @__PURE__ */ u(r, {}),
|
|
233
|
+
children: /* @__PURE__ */ u(T, {})
|
|
234
|
+
})
|
|
235
|
+
})
|
|
236
|
+
}),
|
|
237
|
+
/* @__PURE__ */ u(s, {
|
|
238
|
+
path: "publisher/sourcing/offers",
|
|
239
|
+
element: /* @__PURE__ */ u(O, {
|
|
240
|
+
title: "Seller sourcing",
|
|
241
|
+
featureFlag: "store.sourcing",
|
|
242
|
+
allowed: A,
|
|
243
|
+
isLoading: !1,
|
|
244
|
+
children: /* @__PURE__ */ u(i, {
|
|
245
|
+
fallback: /* @__PURE__ */ u(r, {}),
|
|
246
|
+
children: /* @__PURE__ */ u(E, {})
|
|
247
|
+
})
|
|
248
|
+
})
|
|
249
|
+
}),
|
|
250
|
+
/* @__PURE__ */ u(s, {
|
|
173
251
|
path: "*",
|
|
174
|
-
element: /* @__PURE__ */
|
|
252
|
+
element: /* @__PURE__ */ u(o, {
|
|
175
253
|
to: `${n}/marketplace`,
|
|
176
254
|
replace: !0
|
|
177
255
|
})
|
|
@@ -179,6 +257,6 @@ var C = () => {
|
|
|
179
257
|
] });
|
|
180
258
|
};
|
|
181
259
|
//#endregion
|
|
182
|
-
export {
|
|
260
|
+
export { k as StoreRoutes };
|
|
183
261
|
|
|
184
262
|
//# sourceMappingURL=StoreRoutes.js.map
|
package/dist/StoreRoutes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoreRoutes.js","names":[],"sources":["../src/StoreRoutes.tsx"],"sourcesContent":["import { lazy, Suspense, type FC, type ReactNode } from 'react';\nimport { Routes, Route, Navigate } from 'react-router';\nimport { FeatureGate } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useStore } from './providers/StoreProvider';\nimport { useStorePermissions } from './hooks/useStorePermissions';\nimport { AccessDenied, PageLoadingFallback } from './components/RouteGuards';\n\n// Lazy loaded pages\nconst MarketplaceHomePage = lazy(() =>\n import('./pages/MarketplaceHomePage').then((m) => ({ default: m.MarketplaceHomePage }))\n);\nconst InstalledAppsPage = lazy(() =>\n import('./pages/InstalledAppsPage').then((m) => ({ default: m.InstalledAppsPage }))\n);\nconst ProductDetailPage = lazy(() =>\n import('./pages/ProductDetailPage').then((m) => ({ default: m.ProductDetailPage }))\n);\nconst CartPage = lazy(() => import('./pages/CartPage').then((m) => ({ default: m.CartPage })));\nconst OrdersPage = lazy(() =>\n import('./pages/OrdersPage').then((m) => ({ default: m.OrdersPage }))\n);\nconst MyLicensesPage = lazy(() =>\n import('./pages/MyLicensesPage').then((m) => ({ default: m.MyLicensesPage }))\n);\nconst OrderConfirmationPage = lazy(() =>\n import('./pages/OrderConfirmationPage').then((m) => ({ default: m.OrderConfirmationPage }))\n);\nconst AppDetailPage = lazy(() =>\n import('./pages/AppDetailPage').then((m) => ({ default: m.AppDetailPage }))\n);\nconst AppSettingsPage = lazy(() =>\n import('./pages/AppSettingsPage').then((m) => ({ default: m.AppSettingsPage }))\n);\n\nfunction FeatureDisabled({ title, featureFlag }: { title: string; featureFlag: string }) {\n return (\n <div className=\"flex min-h-[400px] items-center justify-center p-6\">\n <div className=\"max-w-md rounded-lg border border-border-subtle bg-bg-surface p-6 text-center shadow-sm\">\n <h2 className=\"text-lg font-semibold text-text-primary\">{title} is not enabled</h2>\n <p className=\"mt-2 text-sm text-text-secondary\">\n Ask an administrator to enable the <span className=\"font-mono\">{featureFlag}</span>{' '}\n feature flag for this organization.\n </p>\n </div>\n </div>\n );\n}\n\ninterface StoreRouteGateProps {\n title: string;\n featureFlag: string;\n allowed: boolean;\n isLoading: boolean;\n children: ReactNode;\n}\n\nfunction StoreRouteGate({ title, featureFlag, allowed, isLoading, children }: StoreRouteGateProps) {\n if (isLoading) {\n return <PageLoadingFallback />;\n }\n return (\n <FeatureGate\n flag={featureFlag}\n defaultValue\n fallback={<FeatureDisabled title={title} featureFlag={featureFlag} />}\n >\n {allowed ? children : <AccessDenied />}\n </FeatureGate>\n );\n}\n\n/**\n * StoreRoutes component\n *\n * Internal routing for the Store microfrontend. Every route is gated by both\n * a live feature flag (via FeatureGate) and an RBAC permission check so that\n * features can be toggled per-org without a deployment.\n *\n * Flag namespace: store.*\n */\nexport const StoreRoutes: FC = () => {\n const { basePath } = useStore();\n const { permissions, isLoading } = useStorePermissions();\n\n return (\n <Routes>\n {/* Default redirect */}\n <Route index element={<Navigate to=\"marketplace\" replace />} />\n\n {/* Marketplace */}\n <Route\n path=\"marketplace\"\n element={\n <StoreRouteGate\n title=\"Marketplace\"\n featureFlag=\"store.marketplace\"\n allowed={permissions.canBrowse}\n isLoading={isLoading}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <MarketplaceHomePage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n <Route\n path=\"marketplace/product/:productId\"\n element={\n <StoreRouteGate\n title=\"Marketplace\"\n featureFlag=\"store.marketplace\"\n allowed={permissions.canBrowse}\n isLoading={isLoading}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <ProductDetailPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n\n {/* Cart */}\n <Route\n path=\"cart\"\n element={\n <StoreRouteGate\n title=\"Cart\"\n featureFlag=\"store.cart\"\n allowed={permissions.canPurchase}\n isLoading={isLoading}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <CartPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n\n {/* Orders */}\n <Route\n path=\"orders/:orderId/confirmation\"\n element={\n <StoreRouteGate\n title=\"Order confirmation\"\n featureFlag=\"store.orders\"\n allowed={permissions.canPurchase}\n isLoading={isLoading}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <OrderConfirmationPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n <Route\n path=\"orders\"\n element={\n <StoreRouteGate\n title=\"Orders\"\n featureFlag=\"store.orders\"\n allowed={permissions.canPurchase}\n isLoading={isLoading}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <OrdersPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n\n {/* Installed Apps */}\n <Route\n path=\"installed\"\n element={\n <StoreRouteGate\n title=\"Installed apps\"\n featureFlag=\"store.installed\"\n allowed={permissions.canInstall}\n isLoading={isLoading}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <InstalledAppsPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n <Route\n path=\"installed/:installationId\"\n element={\n <StoreRouteGate\n title=\"Installed apps\"\n featureFlag=\"store.installed\"\n allowed={permissions.canInstall}\n isLoading={isLoading}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <AppDetailPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n <Route\n path=\"installed/:installationId/settings\"\n element={\n <StoreRouteGate\n title=\"Installed apps\"\n featureFlag=\"store.installed\"\n allowed={permissions.canInstall}\n isLoading={isLoading}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <AppSettingsPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n\n {/* Licenses */}\n <Route\n path=\"licenses\"\n element={\n <StoreRouteGate\n title=\"Licenses\"\n featureFlag=\"store.licenses\"\n allowed={permissions.canManageLicenses}\n isLoading={isLoading}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <MyLicensesPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n\n {/* Catch-all redirect */}\n <Route path=\"*\" element={<Navigate to={`${basePath}/marketplace`} replace />} />\n </Routes>\n );\n};\n"],"mappings":";;;;;;;;;AAQA,IAAM,IAAsB,QAC1B,OAAO,kCAA+B,MAAM,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,CACxF,EACK,IAAoB,QACxB,OAAO,gCAA6B,MAAM,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,CACpF,EACK,IAAoB,QACxB,OAAO,gCAA6B,MAAM,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,CACpF,EACK,IAAW,QAAW,OAAO,uBAAoB,MAAM,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,EACxF,IAAa,QACjB,OAAO,yBAAsB,MAAM,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CACtE,EACK,IAAiB,QACrB,OAAO,6BAA0B,MAAM,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAC9E,EACK,IAAwB,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AAD;KAAU,UAAU,kBAAC,GAAD,EAAuB,CAAA;eACzC,kBAAC,GAAD,EAAiB,CAAA;KACR,CAAA;IACI,CAAA;GAEnB,CAAA;EACF,kBAAC,GAAD;GACE,MAAK;GACL,SACE,kBAAC,GAAD;IACE,OAAM;IACN,aAAY;IACZ,SAAS,EAAY;IACV;cAEX,kBAAC,GAAD;KAAU,UAAU,kBAAC,GAAD,EAAuB,CAAA;eACzC,kBAAC,GAAD,EAAmB,CAAA;KACV,CAAA;IACI,CAAA;GAEnB,CAAA;EAGF,kBAAC,GAAD;GACE,MAAK;GACL,SACE,kBAAC,GAAD;IACE,OAAM;IACN,aAAY;IACZ,SAAS,EAAY;IACV;cAEX,kBAAC,GAAD;KAAU,UAAU,kBAAC,GAAD,EAAuB,CAAA;eACzC,kBAAC,GAAD,EAAkB,CAAA;KACT,CAAA;IACI,CAAA;GAEnB,CAAA;EAGF,kBAAC,GAAD;GAAO,MAAK;GAAI,SAAS,kBAAC,GAAD;IAAU,IAAI,GAAG,EAAS;IAAe,SAAA;IAAU,CAAA;GAAI,CAAA;EACzE,EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"StoreRoutes.js","names":[],"sources":["../src/StoreRoutes.tsx"],"sourcesContent":["import { lazy, Suspense, type FC, type ReactNode } from 'react';\nimport { Routes, Route, Navigate } from 'react-router';\nimport { FeatureGate } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useStore } from './providers/StoreProvider';\nimport { useStorePermissions } from './hooks/useStorePermissions';\nimport { AccessDenied, PageLoadingFallback } from './components/RouteGuards';\n\n// Lazy loaded pages\nconst MarketplaceHomePage = lazy(() =>\n import('./pages/MarketplaceHomePage').then((m) => ({ default: m.MarketplaceHomePage }))\n);\nconst InstalledAppsPage = lazy(() =>\n import('./pages/InstalledAppsPage').then((m) => ({ default: m.InstalledAppsPage }))\n);\nconst ProductDetailPage = lazy(() =>\n import('./pages/ProductDetailPage').then((m) => ({ default: m.ProductDetailPage }))\n);\nconst CartPage = lazy(() => import('./pages/CartPage').then((m) => ({ default: m.CartPage })));\nconst OrdersPage = lazy(() =>\n import('./pages/OrdersPage').then((m) => ({ default: m.OrdersPage }))\n);\nconst MyLicensesPage = lazy(() =>\n import('./pages/MyLicensesPage').then((m) => ({ default: m.MyLicensesPage }))\n);\nconst OrderConfirmationPage = lazy(() =>\n import('./pages/OrderConfirmationPage').then((m) => ({ default: m.OrderConfirmationPage }))\n);\nconst AppDetailPage = lazy(() =>\n import('./pages/AppDetailPage').then((m) => ({ default: m.AppDetailPage }))\n);\nconst AppSettingsPage = lazy(() =>\n import('./pages/AppSettingsPage').then((m) => ({ default: m.AppSettingsPage }))\n);\nconst SourcingRequestsPage = lazy(() =>\n import('./pages/SourcingRequestsPage').then((m) => ({ default: m.SourcingRequestsPage }))\n);\nconst CreateSourcingRequestPage = lazy(() =>\n import('./pages/CreateSourcingRequestPage').then((m) => ({\n default: m.CreateSourcingRequestPage,\n }))\n);\nconst SourcingRequestDetailPage = lazy(() =>\n import('./pages/SourcingRequestDetailPage').then((m) => ({\n default: m.SourcingRequestDetailPage,\n }))\n);\nconst SellerSourcingOpportunitiesPage = lazy(() =>\n import('./pages/SellerSourcingOpportunitiesPage').then((m) => ({\n default: m.SellerSourcingOpportunitiesPage,\n }))\n);\nconst SellerSourcingOpportunityDetailPage = lazy(() =>\n import('./pages/SellerSourcingOpportunityDetailPage').then((m) => ({\n default: m.SellerSourcingOpportunityDetailPage,\n }))\n);\nconst SellerSourcingOffersPage = lazy(() =>\n import('./pages/SellerSourcingOffersPage').then((m) => ({\n default: m.SellerSourcingOffersPage,\n }))\n);\n\nfunction FeatureDisabled({ title, featureFlag }: { title: string; featureFlag: string }) {\n return (\n <div className=\"flex min-h-[400px] items-center justify-center p-6\">\n <div className=\"max-w-md rounded-lg border border-border-subtle bg-bg-surface p-6 text-center shadow-sm\">\n <h2 className=\"text-lg font-semibold text-text-primary\">{title} is not enabled</h2>\n <p className=\"mt-2 text-sm text-text-secondary\">\n Ask an administrator to enable the <span className=\"font-mono\">{featureFlag}</span>{' '}\n feature flag for this organization.\n </p>\n </div>\n </div>\n );\n}\n\ninterface StoreRouteGateProps {\n title: string;\n featureFlag: string;\n allowed: boolean;\n isLoading: boolean;\n children: ReactNode;\n}\n\nfunction StoreRouteGate({ title, featureFlag, allowed, isLoading, children }: StoreRouteGateProps) {\n if (isLoading) {\n return <PageLoadingFallback />;\n }\n return (\n <FeatureGate\n flag={featureFlag}\n defaultValue\n fallback={<FeatureDisabled title={title} featureFlag={featureFlag} />}\n >\n {allowed ? children : <AccessDenied />}\n </FeatureGate>\n );\n}\n\n/**\n * StoreRoutes component\n *\n * Internal routing for the Store microfrontend. Every route is gated by both\n * a live feature flag (via FeatureGate) and an RBAC permission check so that\n * features can be toggled per-org without a deployment.\n *\n * Flag namespace: store.*\n */\nexport const StoreRoutes: FC = () => {\n const { basePath, user, authToken } = useStore();\n const { permissions, isLoading } = useStorePermissions();\n const hasSelfActor = Boolean(user?.id || authToken);\n\n return (\n <Routes>\n {/* Default redirect */}\n <Route index element={<Navigate to=\"marketplace\" replace />} />\n\n {/* Marketplace */}\n <Route\n path=\"marketplace\"\n element={\n <StoreRouteGate\n title=\"Marketplace\"\n featureFlag=\"store.marketplace\"\n allowed={permissions.canBrowse}\n isLoading={isLoading}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <MarketplaceHomePage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n <Route\n path=\"marketplace/product/:productId\"\n element={\n <StoreRouteGate\n title=\"Marketplace\"\n featureFlag=\"store.marketplace\"\n allowed={permissions.canBrowse}\n isLoading={isLoading}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <ProductDetailPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n\n {/* Cart */}\n <Route\n path=\"cart\"\n element={\n <StoreRouteGate\n title=\"Cart\"\n featureFlag=\"store.cart\"\n allowed={permissions.canPurchase}\n isLoading={isLoading}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <CartPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n\n {/* Orders */}\n <Route\n path=\"orders/:orderId/confirmation\"\n element={\n <StoreRouteGate\n title=\"Order confirmation\"\n featureFlag=\"store.orders\"\n allowed={permissions.canPurchase}\n isLoading={isLoading}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <OrderConfirmationPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n <Route\n path=\"orders\"\n element={\n <StoreRouteGate\n title=\"Orders\"\n featureFlag=\"store.orders\"\n allowed={permissions.canPurchase}\n isLoading={isLoading}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <OrdersPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n\n {/* Installed Apps */}\n <Route\n path=\"installed\"\n element={\n <StoreRouteGate\n title=\"Installed apps\"\n featureFlag=\"store.installed\"\n allowed={permissions.canInstall}\n isLoading={isLoading}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <InstalledAppsPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n <Route\n path=\"installed/:installationId\"\n element={\n <StoreRouteGate\n title=\"Installed apps\"\n featureFlag=\"store.installed\"\n allowed={permissions.canInstall}\n isLoading={isLoading}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <AppDetailPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n <Route\n path=\"installed/:installationId/settings\"\n element={\n <StoreRouteGate\n title=\"Installed apps\"\n featureFlag=\"store.installed\"\n allowed={permissions.canInstall}\n isLoading={isLoading}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <AppSettingsPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n\n {/* Licenses */}\n <Route\n path=\"licenses\"\n element={\n <StoreRouteGate\n title=\"Licenses\"\n featureFlag=\"store.licenses\"\n allowed={permissions.canManageLicenses}\n isLoading={isLoading}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <MyLicensesPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n\n {/* Sourcing — actor self-scoped; no workspace or product-publishing permission required. */}\n <Route\n path=\"sourcing/requests\"\n element={\n <StoreRouteGate\n title=\"Sourcing\"\n featureFlag=\"store.sourcing\"\n allowed={hasSelfActor}\n isLoading={false}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <SourcingRequestsPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n <Route\n path=\"sourcing/requests/new\"\n element={\n <StoreRouteGate\n title=\"Sourcing\"\n featureFlag=\"store.sourcing\"\n allowed={hasSelfActor}\n isLoading={false}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <CreateSourcingRequestPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n <Route\n path=\"sourcing/requests/:requestId\"\n element={\n <StoreRouteGate\n title=\"Sourcing\"\n featureFlag=\"store.sourcing\"\n allowed={hasSelfActor}\n isLoading={false}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <SourcingRequestDetailPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n <Route\n path=\"publisher/sourcing/opportunities\"\n element={\n <StoreRouteGate\n title=\"Seller sourcing\"\n featureFlag=\"store.sourcing\"\n allowed={hasSelfActor}\n isLoading={false}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <SellerSourcingOpportunitiesPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n <Route\n path=\"publisher/sourcing/opportunities/:requestId\"\n element={\n <StoreRouteGate\n title=\"Seller sourcing\"\n featureFlag=\"store.sourcing\"\n allowed={hasSelfActor}\n isLoading={false}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <SellerSourcingOpportunityDetailPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n <Route\n path=\"publisher/sourcing/offers\"\n element={\n <StoreRouteGate\n title=\"Seller sourcing\"\n featureFlag=\"store.sourcing\"\n allowed={hasSelfActor}\n isLoading={false}\n >\n <Suspense fallback={<PageLoadingFallback />}>\n <SellerSourcingOffersPage />\n </Suspense>\n </StoreRouteGate>\n }\n />\n\n {/* Catch-all redirect */}\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,kBAAC,GAAD;KAAU,UAAU,kBAAC,GAAD,EAAuB,CAAA;eACzC,kBAAC,GAAD,EAAmC,CAAA;KAC1B,CAAA;IACI,CAAA;GAEnB,CAAA;EACF,kBAAC,GAAD;GACE,MAAK;GACL,SACE,kBAAC,GAAD;IACE,OAAM;IACN,aAAY;IACZ,SAAS;IACT,WAAW;cAEX,kBAAC,GAAD;KAAU,UAAU,kBAAC,GAAD,EAAuB,CAAA;eACzC,kBAAC,GAAD,EAAuC,CAAA;KAC9B,CAAA;IACI,CAAA;GAEnB,CAAA;EACF,kBAAC,GAAD;GACE,MAAK;GACL,SACE,kBAAC,GAAD;IACE,OAAM;IACN,aAAY;IACZ,SAAS;IACT,WAAW;cAEX,kBAAC,GAAD;KAAU,UAAU,kBAAC,GAAD,EAAuB,CAAA;eACzC,kBAAC,GAAD,EAA4B,CAAA;KACnB,CAAA;IACI,CAAA;GAEnB,CAAA;EAGF,kBAAC,GAAD;GAAO,MAAK;GAAI,SAAS,kBAAC,GAAD;IAAU,IAAI,GAAG,EAAS;IAAe,SAAA;IAAU,CAAA;GAAI,CAAA;EACzE,EAAA,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
interface SourcingConfirmationDialogProps {
|
|
4
|
+
open: boolean;
|
|
5
|
+
title: string;
|
|
6
|
+
description: ReactNode;
|
|
7
|
+
confirmLabel: string;
|
|
8
|
+
cancelLabel: string;
|
|
9
|
+
busy?: boolean;
|
|
10
|
+
destructive?: boolean;
|
|
11
|
+
onConfirm: () => void;
|
|
12
|
+
onCancel: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function SourcingConfirmationDialog({ open, title, description, confirmLabel, cancelLabel, busy, destructive, onConfirm, onCancel, }: SourcingConfirmationDialogProps): import("react").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { dangerButtonClassName as e, primaryButtonClassName as t, secondaryButtonClassName as n } from "./SourcingUi.js";
|
|
2
|
+
import { useEffect as r, useId as i, useRef as a } from "react";
|
|
3
|
+
import { Loader2 as o } from "lucide-react";
|
|
4
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/sourcing/SourcingConfirmationDialog.tsx
|
|
6
|
+
function l({ open: l, title: u, description: d, confirmLabel: f, cancelLabel: p, busy: m = !1, destructive: h = !1, onConfirm: g, onCancel: _ }) {
|
|
7
|
+
let v = a(null), y = i(), b = i();
|
|
8
|
+
return r(() => {
|
|
9
|
+
let e = v.current;
|
|
10
|
+
e && (l && !e.open && e.showModal(), !l && e.open && e.close());
|
|
11
|
+
}, [l]), r(() => () => {
|
|
12
|
+
v.current?.open && v.current.close();
|
|
13
|
+
}, []), /* @__PURE__ */ s("dialog", {
|
|
14
|
+
ref: v,
|
|
15
|
+
"aria-labelledby": y,
|
|
16
|
+
"aria-describedby": b,
|
|
17
|
+
className: "m-auto w-[min(32rem,calc(100%-2rem))] rounded-xl border border-border-seam bg-surface-raised p-0 text-text-primary shadow-elevation-4 backdrop:bg-bg-overlay backdrop:backdrop-blur-sm",
|
|
18
|
+
onCancel: (e) => {
|
|
19
|
+
e.preventDefault(), m || _();
|
|
20
|
+
},
|
|
21
|
+
children: /* @__PURE__ */ c("div", {
|
|
22
|
+
className: "p-5 sm:p-6",
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ s("h2", {
|
|
25
|
+
id: y,
|
|
26
|
+
className: "text-lg font-semibold text-text-primary",
|
|
27
|
+
children: u
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ s("div", {
|
|
30
|
+
id: b,
|
|
31
|
+
className: "mt-2 text-sm leading-6 text-text-secondary",
|
|
32
|
+
children: d
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ c("div", {
|
|
35
|
+
className: "mt-6 flex flex-wrap justify-end gap-2",
|
|
36
|
+
children: [/* @__PURE__ */ s("button", {
|
|
37
|
+
type: "button",
|
|
38
|
+
onClick: _,
|
|
39
|
+
disabled: m,
|
|
40
|
+
className: n,
|
|
41
|
+
children: p
|
|
42
|
+
}), /* @__PURE__ */ c("button", {
|
|
43
|
+
type: "button",
|
|
44
|
+
onClick: g,
|
|
45
|
+
disabled: m,
|
|
46
|
+
className: h ? e : t,
|
|
47
|
+
autoFocus: !0,
|
|
48
|
+
children: [m ? /* @__PURE__ */ s(o, {
|
|
49
|
+
className: "size-4 animate-spin",
|
|
50
|
+
"aria-hidden": "true"
|
|
51
|
+
}) : null, f]
|
|
52
|
+
})]
|
|
53
|
+
})
|
|
54
|
+
]
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { l as SourcingConfirmationDialog };
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=SourcingConfirmationDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SourcingConfirmationDialog.js","names":[],"sources":["../../../src/components/sourcing/SourcingConfirmationDialog.tsx"],"sourcesContent":["import { useEffect, useId, useRef } from 'react';\nimport type { ReactNode } from 'react';\nimport { Loader2 } from 'lucide-react';\n\nimport {\n dangerButtonClassName,\n primaryButtonClassName,\n secondaryButtonClassName,\n} from './SourcingUi';\n\ninterface SourcingConfirmationDialogProps {\n open: boolean;\n title: string;\n description: ReactNode;\n confirmLabel: string;\n cancelLabel: string;\n busy?: boolean;\n destructive?: boolean;\n onConfirm: () => void;\n onCancel: () => void;\n}\n\nexport function SourcingConfirmationDialog({\n open,\n title,\n description,\n confirmLabel,\n cancelLabel,\n busy = false,\n destructive = false,\n onConfirm,\n onCancel,\n}: SourcingConfirmationDialogProps) {\n const dialogRef = useRef<HTMLDialogElement | null>(null);\n const titleId = useId();\n const descriptionId = useId();\n\n useEffect(() => {\n const dialog = dialogRef.current;\n if (!dialog) return;\n\n if (open && !dialog.open) dialog.showModal();\n if (!open && dialog.open) dialog.close();\n }, [open]);\n\n useEffect(\n () => () => {\n if (dialogRef.current?.open) dialogRef.current.close();\n },\n []\n );\n\n return (\n <dialog\n ref={dialogRef}\n aria-labelledby={titleId}\n aria-describedby={descriptionId}\n className=\"m-auto w-[min(32rem,calc(100%-2rem))] rounded-xl border border-border-seam bg-surface-raised p-0 text-text-primary shadow-elevation-4 backdrop:bg-bg-overlay backdrop:backdrop-blur-sm\"\n onCancel={(event) => {\n event.preventDefault();\n if (!busy) onCancel();\n }}\n >\n <div className=\"p-5 sm:p-6\">\n <h2 id={titleId} className=\"text-lg font-semibold text-text-primary\">\n {title}\n </h2>\n <div id={descriptionId} className=\"mt-2 text-sm leading-6 text-text-secondary\">\n {description}\n </div>\n <div className=\"mt-6 flex flex-wrap justify-end gap-2\">\n <button\n type=\"button\"\n onClick={onCancel}\n disabled={busy}\n className={secondaryButtonClassName}\n >\n {cancelLabel}\n </button>\n <button\n type=\"button\"\n onClick={onConfirm}\n disabled={busy}\n className={destructive ? dangerButtonClassName : primaryButtonClassName}\n autoFocus\n >\n {busy ? <Loader2 className=\"size-4 animate-spin\" aria-hidden=\"true\" /> : null}\n {confirmLabel}\n </button>\n </div>\n </div>\n </dialog>\n );\n}\n"],"mappings":";;;;;AAsBA,SAAgB,EAA2B,EACzC,SACA,UACA,gBACA,iBACA,gBACA,UAAO,IACP,iBAAc,IACd,cACA,eACkC;CAClC,IAAM,IAAY,EAAiC,KAAK,EAClD,IAAU,GAAO,EACjB,IAAgB,GAAO;AAiB7B,QAfA,QAAgB;EACd,IAAM,IAAS,EAAU;AACpB,QAED,KAAQ,CAAC,EAAO,QAAM,EAAO,WAAW,EACxC,CAAC,KAAQ,EAAO,QAAM,EAAO,OAAO;IACvC,CAAC,EAAK,CAAC,EAEV,cACc;AACV,EAAI,EAAU,SAAS,QAAM,EAAU,QAAQ,OAAO;IAExD,EAAE,CACH,EAGC,kBAAC,UAAD;EACE,KAAK;EACL,mBAAiB;EACjB,oBAAkB;EAClB,WAAU;EACV,WAAW,MAAU;AAEnB,GADA,EAAM,gBAAgB,EACjB,KAAM,GAAU;;YAGvB,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,MAAD;KAAI,IAAI;KAAS,WAAU;eACxB;KACE,CAAA;IACL,kBAAC,OAAD;KAAK,IAAI;KAAe,WAAU;eAC/B;KACG,CAAA;IACN,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,UAAD;MACE,MAAK;MACL,SAAS;MACT,UAAU;MACV,WAAW;gBAEV;MACM,CAAA,EACT,kBAAC,UAAD;MACE,MAAK;MACL,SAAS;MACT,UAAU;MACV,WAAW,IAAc,IAAwB;MACjD,WAAA;gBALF,CAOG,IAAO,kBAAC,GAAD;OAAS,WAAU;OAAsB,eAAY;OAAS,CAAA,GAAG,MACxE,EACM;QACL;;IACF;;EACC,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SourcingUnit } from '../../generated/global-types';
|
|
3
|
+
|
|
4
|
+
export declare const SOURCING_UNITS: readonly [SourcingUnit.Unit, SourcingUnit.Gram, SourcingUnit.Kilogram, SourcingUnit.Milliliter, SourcingUnit.Liter, SourcingUnit.MetricTon, SourcingUnit.Box, SourcingUnit.Bag, SourcingUnit.Pallet];
|
|
5
|
+
export declare const inputClassName = "mt-1.5 w-full rounded-lg border border-border-default bg-surface-default px-3 py-2.5 text-sm text-text-primary shadow-sm outline-none transition placeholder:text-text-tertiary focus:border-action-primary-bg focus:ring-2 focus:ring-action-primary-bg/20 disabled:cursor-not-allowed disabled:bg-surface-muted disabled:text-text-tertiary";
|
|
6
|
+
export declare const labelClassName = "block text-sm font-medium text-text-primary";
|
|
7
|
+
export declare const helpClassName = "mt-1 text-xs text-text-tertiary";
|
|
8
|
+
export declare const primaryButtonClassName: string;
|
|
9
|
+
export declare const secondaryButtonClassName: string;
|
|
10
|
+
export declare const dangerButtonClassName: string;
|
|
11
|
+
export declare function joinStorePath(basePath: string, path: string): string;
|
|
12
|
+
export declare function formatSourcingUnit(unit: SourcingUnit | string): string;
|
|
13
|
+
export declare function formatDate(value: string): string;
|
|
14
|
+
export declare function formatDateTime(value: string): string;
|
|
15
|
+
export declare function formatMoney(value: string | null | undefined, currency: string | null | undefined): string;
|
|
16
|
+
export declare function formatLocation({ country, region, city, }: {
|
|
17
|
+
country: string;
|
|
18
|
+
region?: string | null;
|
|
19
|
+
city?: string | null;
|
|
20
|
+
}): string;
|
|
21
|
+
export declare function toDateTimeLocal(value: string): string;
|
|
22
|
+
export declare function toErrorMessage(error: unknown, fallback: string): string;
|
|
23
|
+
interface SourcingPageHeaderProps {
|
|
24
|
+
title: string;
|
|
25
|
+
description: string;
|
|
26
|
+
icon: ReactNode;
|
|
27
|
+
onBack?: () => void;
|
|
28
|
+
actions?: ReactNode;
|
|
29
|
+
}
|
|
30
|
+
export declare function SourcingPageHeader({ title, description, icon, onBack, actions, }: SourcingPageHeaderProps): import("react").JSX.Element;
|
|
31
|
+
export declare function SourcingLoadingState({ label }: {
|
|
32
|
+
label: string;
|
|
33
|
+
}): import("react").JSX.Element;
|
|
34
|
+
export declare function SourcingErrorState({ title, message, onRetry, }: {
|
|
35
|
+
title: string;
|
|
36
|
+
message: string;
|
|
37
|
+
onRetry?: () => void;
|
|
38
|
+
}): import("react").JSX.Element;
|
|
39
|
+
export declare function SourcingEmptyState({ title, description, action, }: {
|
|
40
|
+
title: string;
|
|
41
|
+
description: string;
|
|
42
|
+
action?: ReactNode;
|
|
43
|
+
}): import("react").JSX.Element;
|
|
44
|
+
export declare function SourcingStatusBadge({ status }: {
|
|
45
|
+
status: string;
|
|
46
|
+
}): import("react").JSX.Element;
|
|
47
|
+
export declare function ContextRequiredPanel({ title, description, }: {
|
|
48
|
+
title: string;
|
|
49
|
+
description: string;
|
|
50
|
+
}): import("react").JSX.Element;
|
|
51
|
+
export {};
|