@burdenoff/microfe-movethewheels 2026.1028.1 → 2026.1031.1

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.
Files changed (40) hide show
  1. package/dist/MoveTheWheelsRoot.js +130 -122
  2. package/dist/MoveTheWheelsRoutes.js +55 -51
  3. package/dist/components/ExportStatusBanner.js +53 -0
  4. package/dist/components/marketplace/MarketplaceDialogs.js +524 -0
  5. package/dist/generated/wspace-types.d.ts +30737 -8505
  6. package/dist/hooks/useEntityExport.js +85 -0
  7. package/dist/hooks/useMarketplace.js +265 -0
  8. package/dist/movethewheels/components/ExportStatusBanner.d.ts +7 -0
  9. package/dist/movethewheels/components/marketplace/MarketplaceDialogs.d.ts +18 -0
  10. package/dist/movethewheels/hooks/useEntityExport.d.ts +32 -0
  11. package/dist/movethewheels/hooks/useMarketplace.d.ts +121 -0
  12. package/dist/movethewheels/pages/MarketplacePage.d.ts +1 -0
  13. package/dist/movethewheels/utils/entityExport.d.ts +64 -0
  14. package/dist/node_modules/lucide-react/dist/esm/icons/badge-check.js +11 -0
  15. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +8 -0
  16. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +8 -0
  17. package/dist/node_modules/lucide-react/dist/esm/icons/pencil.js +11 -0
  18. package/dist/node_modules/lucide-react/dist/esm/icons/store.js +26 -0
  19. package/dist/pages/CustomersPage.js +64 -58
  20. package/dist/pages/DriversPage.js +113 -107
  21. package/dist/pages/MarketplacePage.js +503 -0
  22. package/dist/pages/OrdersListPage.js +85 -79
  23. package/dist/pages/ProductsPage.js +63 -57
  24. package/dist/pages/VehiclesPage.js +91 -85
  25. package/dist/utils/entityExport.js +54 -0
  26. package/package.json +3 -2
  27. package/src/generated/wspace-types.ts +34017 -8803
  28. package/src/movethewheels/MoveTheWheelsRoot.tsx +8 -0
  29. package/src/movethewheels/MoveTheWheelsRoutes.tsx +4 -0
  30. package/src/movethewheels/components/ExportStatusBanner.tsx +78 -0
  31. package/src/movethewheels/components/marketplace/MarketplaceDialogs.tsx +633 -0
  32. package/src/movethewheels/hooks/useEntityExport.ts +130 -0
  33. package/src/movethewheels/hooks/useMarketplace.ts +526 -0
  34. package/src/movethewheels/pages/CustomersPage.tsx +11 -2
  35. package/src/movethewheels/pages/DriversPage.tsx +11 -2
  36. package/src/movethewheels/pages/MarketplacePage.tsx +571 -0
  37. package/src/movethewheels/pages/OrdersListPage.tsx +13 -2
  38. package/src/movethewheels/pages/ProductsPage.tsx +11 -2
  39. package/src/movethewheels/pages/VehiclesPage.tsx +11 -2
  40. package/src/movethewheels/utils/entityExport.ts +140 -0
@@ -1,23 +1,25 @@
1
1
  import { CircleCheck as e } from "../node_modules/lucide-react/dist/esm/icons/circle-check.js";
2
2
  import { Clock as t } from "../node_modules/lucide-react/dist/esm/icons/clock.js";
3
3
  import { Download as n } from "../node_modules/lucide-react/dist/esm/icons/download.js";
4
- import { Filter as r } from "../node_modules/lucide-react/dist/esm/icons/filter.js";
5
- import { Package as i } from "../node_modules/lucide-react/dist/esm/icons/package.js";
6
- import { Plus as a } from "../node_modules/lucide-react/dist/esm/icons/plus.js";
7
- import { RefreshCw as o } from "../node_modules/lucide-react/dist/esm/icons/refresh-cw.js";
8
- import { Truck as s } from "../node_modules/lucide-react/dist/esm/icons/truck.js";
9
- import { UserCheck as c } from "../node_modules/lucide-react/dist/esm/icons/user-check.js";
10
- import { UserPlus as l } from "../node_modules/lucide-react/dist/esm/icons/user-plus.js";
11
- import { joinPath as ee } from "../utils/navigation.js";
12
- import { useMoveTheWheels as te } from "../providers/MoveTheWheelsProvider.js";
13
- import { useOrderStats as ne, useOrders as u } from "../hooks/useOrders.js";
14
- import { Badge as re, Button as d, Card as f, CardContent as p, Select as m, SelectContent as h, SelectItem as g, SelectTrigger as _, SelectValue as v } from "../components/ui.js";
15
- import { PageLayout as ie } from "../components/PageLayout.js";
16
- import { MetricCard as y, MetricGrid as b } from "../components/MetricCard.js";
17
- import { PriorityBadge as x, StatusBadge as S } from "../components/StatusBadge.js";
18
- import { DataTable as C } from "../components/DataTable.js";
19
- import { formatCurrency as ae, formatDate as w } from "../utils/formatters.js";
20
- import { useDebouncedValue as T } from "../hooks/useDebouncedValue.js";
4
+ import { Filter as ee } from "../node_modules/lucide-react/dist/esm/icons/filter.js";
5
+ import { Package as r } from "../node_modules/lucide-react/dist/esm/icons/package.js";
6
+ import { Plus as i } from "../node_modules/lucide-react/dist/esm/icons/plus.js";
7
+ import { RefreshCw as a } from "../node_modules/lucide-react/dist/esm/icons/refresh-cw.js";
8
+ import { Truck as o } from "../node_modules/lucide-react/dist/esm/icons/truck.js";
9
+ import { UserCheck as s } from "../node_modules/lucide-react/dist/esm/icons/user-check.js";
10
+ import { UserPlus as c } from "../node_modules/lucide-react/dist/esm/icons/user-plus.js";
11
+ import { joinPath as l } from "../utils/navigation.js";
12
+ import { useMoveTheWheels as u } from "../providers/MoveTheWheelsProvider.js";
13
+ import { useOrderStats as te, useOrders as d } from "../hooks/useOrders.js";
14
+ import { Badge as f, Button as p, Card as ne, CardContent as re, Select as ie, SelectContent as m, SelectItem as h, SelectTrigger as g, SelectValue as ae } from "../components/ui.js";
15
+ import { PageLayout as _ } from "../components/PageLayout.js";
16
+ import { MetricCard as v, MetricGrid as y } from "../components/MetricCard.js";
17
+ import { PriorityBadge as b, StatusBadge as x } from "../components/StatusBadge.js";
18
+ import { DataTable as oe } from "../components/DataTable.js";
19
+ import { formatCurrency as se, formatDate as S } from "../utils/formatters.js";
20
+ import { useDebouncedValue as C } from "../hooks/useDebouncedValue.js";
21
+ import { useEntityExport as w } from "../hooks/useEntityExport.js";
22
+ import { ExportStatusBanner as T } from "../components/ExportStatusBanner.js";
21
23
  import { useState as E } from "react";
22
24
  import { jsx as D, jsxs as O } from "react/jsx-runtime";
23
25
  import { useI18n as k } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
@@ -27,17 +29,17 @@ function M() {
27
29
  let { t: M } = k(), N = (e, t) => {
28
30
  let n = M(e);
29
31
  return n === e ? t : n;
30
- }, { basePath: P, navigate: F } = te(), [I, L] = E("all"), [R, z] = E(!1), [B, V] = E(0), [H, U] = E(25), [W, G] = E(""), K = T(W), q = I !== "all" || R || W.length > 0, { orders: J, totalOrders: oe, hasMore: se, isLoading: ce, error: le, refetch: Y } = u({
32
+ }, { basePath: P, navigate: F } = u(), { state: I, isExporting: L, startExport: R, dismiss: z } = w("orders", "order"), [B, V] = E("all"), [H, U] = E(!1), [W, G] = E(0), [K, ce] = E(25), [q, J] = E(""), le = C(q), ue = B !== "all" || H || q.length > 0, { orders: de, totalOrders: fe, hasMore: pe, isLoading: me, error: he, refetch: Y } = d({
31
33
  filters: {
32
- status: I === "all" ? void 0 : I,
33
- unassigned: R || void 0,
34
- search: K || void 0
34
+ status: B === "all" ? void 0 : B,
35
+ unassigned: H || void 0,
36
+ search: le || void 0
35
37
  },
36
- limit: H,
37
- offset: B * H
38
- }), { stats: X } = ne(), Z = X.total, Q = (e) => {
39
- F && F(ee(P, e));
40
- }, $ = () => V(0), ue = [
38
+ limit: K,
39
+ offset: W * K
40
+ }), { stats: X } = te(), Z = X.total, Q = (e) => {
41
+ F && F(l(P, e));
42
+ }, $ = () => G(0), ge = [
41
43
  {
42
44
  id: "orderNumber",
43
45
  header: N("movethewheels.orders.table.orderNumber", "Order #"),
@@ -70,7 +72,7 @@ function M() {
70
72
  accessorKey: "status",
71
73
  sortable: !0,
72
74
  className: "min-w-[130px] whitespace-nowrap",
73
- cell: (e) => /* @__PURE__ */ D(S, {
75
+ cell: (e) => /* @__PURE__ */ D(x, {
74
76
  status: e.status,
75
77
  type: "order"
76
78
  })
@@ -81,13 +83,13 @@ function M() {
81
83
  accessorKey: "priority",
82
84
  sortable: !0,
83
85
  className: "min-w-[90px] whitespace-nowrap",
84
- cell: (e) => /* @__PURE__ */ D(x, { priority: e.priority })
86
+ cell: (e) => /* @__PURE__ */ D(b, { priority: e.priority })
85
87
  },
86
88
  {
87
89
  id: "items",
88
90
  header: N("movethewheels.orders.table.items", "Items"),
89
91
  className: "min-w-[80px] whitespace-nowrap",
90
- cell: (e) => /* @__PURE__ */ O(re, {
92
+ cell: (e) => /* @__PURE__ */ O(f, {
91
93
  variant: "secondary",
92
94
  children: [
93
95
  e.items.length,
@@ -104,7 +106,7 @@ function M() {
104
106
  className: "min-w-[100px] whitespace-nowrap text-right",
105
107
  cell: (e) => /* @__PURE__ */ D("span", {
106
108
  className: "font-medium",
107
- children: ae(e.pricing.total)
109
+ children: se(e.pricing.total)
108
110
  })
109
111
  },
110
112
  {
@@ -113,7 +115,7 @@ function M() {
113
115
  accessorKey: "scheduledDelivery",
114
116
  sortable: !0,
115
117
  className: "min-w-[110px] whitespace-nowrap",
116
- cell: (e) => e.scheduledDelivery ? w(e.scheduledDelivery) : "-"
118
+ cell: (e) => e.scheduledDelivery ? S(e.scheduledDelivery) : "-"
117
119
  },
118
120
  {
119
121
  id: "createdAt",
@@ -121,7 +123,7 @@ function M() {
121
123
  accessorKey: "createdAt",
122
124
  sortable: !0,
123
125
  className: "min-w-[100px] whitespace-nowrap",
124
- cell: (e) => w(e.createdAt, "relative")
126
+ cell: (e) => S(e.createdAt, "relative")
125
127
  },
126
128
  {
127
129
  id: "driver",
@@ -130,23 +132,23 @@ function M() {
130
132
  cell: (e) => e.driverId ? /* @__PURE__ */ O("span", {
131
133
  className: "inline-flex items-center gap-1 text-sm text-status-success-text",
132
134
  children: [
133
- /* @__PURE__ */ D(c, { size: 14 }),
135
+ /* @__PURE__ */ D(s, { size: 14 }),
134
136
  " ",
135
137
  N("movethewheels.orders.table.assigned", "Assigned")
136
138
  ]
137
- }) : /* @__PURE__ */ O(d, {
139
+ }) : /* @__PURE__ */ O(p, {
138
140
  variant: "outline",
139
141
  size: "sm",
140
142
  onClick: (t) => {
141
143
  t.stopPropagation(), Q(`orders/${e.id}`);
142
144
  },
143
- children: [/* @__PURE__ */ D(l, {
145
+ children: [/* @__PURE__ */ D(c, {
144
146
  size: 14,
145
147
  className: "mr-1"
146
148
  }), N("movethewheels.orders.table.assign", "Assign")]
147
149
  })
148
150
  }
149
- ], de = [
151
+ ], _e = [
150
152
  {
151
153
  value: "all",
152
154
  label: N("movethewheels.orders.filters.allStatuses", "All Statuses")
@@ -192,58 +194,62 @@ function M() {
192
194
  label: N("movethewheels.orders.status.failed", "Failed")
193
195
  }
194
196
  ];
195
- return /* @__PURE__ */ O(ie, {
197
+ return /* @__PURE__ */ O(_, {
196
198
  title: N("movethewheels.orders.title", "Orders"),
197
199
  subtitle: `${Z} ${N("movethewheels.orders.subtitle", "total orders")}`,
198
- icon: /* @__PURE__ */ D(i, { size: 24 }),
200
+ icon: /* @__PURE__ */ D(r, { size: 24 }),
199
201
  headerActions: /* @__PURE__ */ D(A, {
200
202
  primary: {
201
203
  label: N("movethewheels.orders.actions.newOrder", "New Order"),
202
- icon: /* @__PURE__ */ D(a, { size: 16 }),
204
+ icon: /* @__PURE__ */ D(i, { size: 16 }),
203
205
  onSelect: () => Q("orders/new")
204
206
  },
205
207
  actions: [{
206
208
  label: N("movethewheels.orders.actions.refresh", "Refresh"),
207
- icon: /* @__PURE__ */ D(o, { size: 16 }),
209
+ icon: /* @__PURE__ */ D(a, { size: 16 }),
208
210
  onSelect: () => Y()
209
211
  }, {
210
- label: N("movethewheels.orders.actions.export", "Export"),
212
+ label: L ? N("movethewheels.orders.actions.exporting", "Exporting…") : N("movethewheels.orders.actions.export", "Export"),
211
213
  icon: /* @__PURE__ */ D(n, { size: 16 }),
212
- onSelect: () => Q("import-export")
214
+ onSelect: R
213
215
  }]
214
216
  }),
215
217
  children: [
216
218
  /* @__PURE__ */ D(j, {
217
- icon: /* @__PURE__ */ D(i, { size: 18 }),
219
+ icon: /* @__PURE__ */ D(r, { size: 18 }),
218
220
  children: N("movethewheels.orders.purpose", "Every delivery job lives here — their status, priority and value. Use this list to find an order, filter by status, and open one to assign a driver, track it, or update fulfilment.")
219
221
  }),
222
+ /* @__PURE__ */ D(T, {
223
+ state: I,
224
+ onDismiss: z
225
+ }),
220
226
  /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
221
227
  className: "mb-3 text-sm font-medium text-text-secondary",
222
228
  children: N("movethewheels.orders.glance.title", "Pipeline at a glance")
223
- }), /* @__PURE__ */ O(b, {
229
+ }), /* @__PURE__ */ O(y, {
224
230
  columns: 4,
225
231
  children: [
226
- /* @__PURE__ */ D(y, {
232
+ /* @__PURE__ */ D(v, {
227
233
  label: N("movethewheels.orders.glance.total", "Total orders"),
228
234
  value: Z,
229
- icon: /* @__PURE__ */ D(i, { size: 20 }),
235
+ icon: /* @__PURE__ */ D(r, { size: 20 }),
230
236
  accent: "brand"
231
237
  }),
232
- /* @__PURE__ */ D(y, {
238
+ /* @__PURE__ */ D(v, {
233
239
  label: N("movethewheels.orders.glance.pending", "Pending"),
234
240
  value: X.byStatus.pending,
235
241
  icon: /* @__PURE__ */ D(t, { size: 20 }),
236
242
  accent: "warning",
237
243
  subtitle: N("movethewheels.orders.glance.pendingSub", "Awaiting fulfilment")
238
244
  }),
239
- /* @__PURE__ */ D(y, {
245
+ /* @__PURE__ */ D(v, {
240
246
  label: N("movethewheels.orders.glance.inTransit", "In transit"),
241
247
  value: X.byStatus.in_transit + X.byStatus.out_for_delivery,
242
- icon: /* @__PURE__ */ D(s, { size: 20 }),
248
+ icon: /* @__PURE__ */ D(o, { size: 20 }),
243
249
  accent: "blue",
244
250
  subtitle: N("movethewheels.orders.glance.inTransitSub", "On the road now")
245
251
  }),
246
- /* @__PURE__ */ D(y, {
252
+ /* @__PURE__ */ D(v, {
247
253
  label: N("movethewheels.orders.glance.delivered", "Delivered"),
248
254
  value: X.byStatus.delivered,
249
255
  icon: /* @__PURE__ */ D(e, { size: 20 }),
@@ -251,14 +257,14 @@ function M() {
251
257
  })
252
258
  ]
253
259
  })] }),
254
- /* @__PURE__ */ D(f, { children: /* @__PURE__ */ D(p, {
260
+ /* @__PURE__ */ D(ne, { children: /* @__PURE__ */ D(re, {
255
261
  className: "p-4",
256
262
  children: /* @__PURE__ */ O("div", {
257
263
  className: "flex flex-wrap items-center gap-4",
258
264
  children: [
259
265
  /* @__PURE__ */ O("div", {
260
266
  className: "flex items-center gap-2",
261
- children: [/* @__PURE__ */ D(r, {
267
+ children: [/* @__PURE__ */ D(ee, {
262
268
  size: 16,
263
269
  className: "text-text-secondary"
264
270
  }), /* @__PURE__ */ D("span", {
@@ -266,71 +272,71 @@ function M() {
266
272
  children: N("movethewheels.orders.filters.label", "Filters:")
267
273
  })]
268
274
  }),
269
- /* @__PURE__ */ O(m, {
270
- value: I,
275
+ /* @__PURE__ */ O(ie, {
276
+ value: B,
271
277
  onValueChange: (e) => {
272
- L(e), $();
278
+ V(e), $();
273
279
  },
274
- children: [/* @__PURE__ */ D(_, {
280
+ children: [/* @__PURE__ */ D(g, {
275
281
  className: "w-[180px]",
276
- children: /* @__PURE__ */ D(v, { placeholder: N("movethewheels.orders.filters.status", "Status") })
277
- }), /* @__PURE__ */ D(h, { children: de.map((e) => /* @__PURE__ */ D(g, {
282
+ children: /* @__PURE__ */ D(ae, { placeholder: N("movethewheels.orders.filters.status", "Status") })
283
+ }), /* @__PURE__ */ D(m, { children: _e.map((e) => /* @__PURE__ */ D(h, {
278
284
  value: e.value,
279
285
  children: e.label
280
286
  }, e.value)) })]
281
287
  }),
282
- /* @__PURE__ */ O(d, {
283
- variant: R ? "default" : "outline",
288
+ /* @__PURE__ */ O(p, {
289
+ variant: H ? "default" : "outline",
284
290
  size: "sm",
285
291
  onClick: () => {
286
- z((e) => !e), $();
292
+ U((e) => !e), $();
287
293
  },
288
- children: [/* @__PURE__ */ D(l, {
294
+ children: [/* @__PURE__ */ D(c, {
289
295
  size: 14,
290
296
  className: "mr-1"
291
297
  }), N("movethewheels.orders.filters.unassigned", "Needs driver")]
292
298
  }),
293
- q && /* @__PURE__ */ D(d, {
299
+ ue && /* @__PURE__ */ D(p, {
294
300
  variant: "ghost",
295
301
  size: "sm",
296
302
  onClick: () => {
297
- L("all"), z(!1), G(""), $();
303
+ V("all"), U(!1), J(""), $();
298
304
  },
299
305
  children: N("movethewheels.orders.filters.clear", "Clear filters")
300
306
  })
301
307
  ]
302
308
  })
303
309
  }) }),
304
- /* @__PURE__ */ D(C, {
305
- columns: ue,
306
- data: J,
307
- isLoading: ce,
308
- error: le,
310
+ /* @__PURE__ */ D(oe, {
311
+ columns: ge,
312
+ data: de,
313
+ isLoading: me,
314
+ error: he,
309
315
  onRetry: Y,
310
316
  searchable: !0,
311
317
  searchPlaceholder: N("movethewheels.orders.searchPlaceholder", "Search orders..."),
312
318
  searchFields: ["orderNumber", "customerInfo"],
313
- searchQuery: W,
319
+ searchQuery: q,
314
320
  onSearchQueryChange: (e) => {
315
- G(e), V(0);
321
+ J(e), G(0);
316
322
  },
317
323
  onRowClick: (e) => Q(`orders/${e.id}`),
318
324
  getRowId: (e) => e.id,
319
- pageIndex: B,
320
- pageSize: H,
321
- onPageChange: V,
325
+ pageIndex: W,
326
+ pageSize: K,
327
+ onPageChange: G,
322
328
  onPageSizeChange: (e) => {
323
- U(e), V(0);
329
+ ce(e), G(0);
324
330
  },
325
- totalItems: oe,
326
- hasNextPage: se,
331
+ totalItems: fe,
332
+ hasNextPage: pe,
327
333
  emptyMessage: N("movethewheels.orders.empty", "No orders found"),
328
334
  emptyIllustration: "empty-data",
329
335
  emptyTitle: N("movethewheels.orders.emptyTitle", "No orders yet"),
330
336
  emptyDescription: N("movethewheels.orders.emptyDescription", "Create your first order to start moving shipments through the pipeline."),
331
- emptyAction: /* @__PURE__ */ O(d, {
337
+ emptyAction: /* @__PURE__ */ O(p, {
332
338
  onClick: () => Q("orders/new"),
333
- children: [/* @__PURE__ */ D(a, {
339
+ children: [/* @__PURE__ */ D(i, {
334
340
  size: 16,
335
341
  className: "mr-1.5"
336
342
  }), N("movethewheels.orders.actions.newOrder", "New Order")]
@@ -13,76 +13,82 @@ import { MetricCard as f, MetricGrid as p } from "../components/MetricCard.js";
13
13
  import { DataTable as m } from "../components/DataTable.js";
14
14
  import { formatCurrency as h } from "../utils/formatters.js";
15
15
  import { useDebouncedValue as g } from "../hooks/useDebouncedValue.js";
16
- import { useState as _ } from "react";
17
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
18
- import { CTAOverflowMenu as b, PagePurpose as x } from "@burdenoff/fe-libs/ui";
16
+ import { useEntityExport as _ } from "../hooks/useEntityExport.js";
17
+ import { ExportStatusBanner as v } from "../components/ExportStatusBanner.js";
18
+ import { useState as y } from "react";
19
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
20
+ import { CTAOverflowMenu as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
19
21
  //#region src/movethewheels/pages/ProductsPage.tsx
20
- function S() {
21
- let { basePath: S, navigate: C } = s(), [w, T] = _(0), [E, D] = _(25), [O, k] = _(""), A = g(O), { products: j, totalProducts: M, hasMore: N, isLoading: P, error: F, refetch: I } = l({
22
- limit: E,
23
- offset: w * E,
24
- search: A
25
- }), { stats: L } = c(), R = (e) => C?.(o(S, e));
26
- return /* @__PURE__ */ y(d, {
22
+ function w() {
23
+ let { basePath: w, navigate: T } = s(), { state: E, isExporting: D, startExport: O, dismiss: k } = _("products", "product"), [A, j] = y(0), [M, N] = y(25), [P, F] = y(""), I = g(P), { products: L, totalProducts: R, hasMore: z, isLoading: B, error: V, refetch: H } = l({
24
+ limit: M,
25
+ offset: A * M,
26
+ search: I
27
+ }), { stats: U } = c(), W = (e) => T?.(o(w, e));
28
+ return /* @__PURE__ */ x(d, {
27
29
  title: "Products",
28
- subtitle: `${L.total} products`,
29
- icon: /* @__PURE__ */ v(t, { size: 24 }),
30
- headerActions: /* @__PURE__ */ v(b, {
30
+ subtitle: `${U.total} products`,
31
+ icon: /* @__PURE__ */ b(t, { size: 24 }),
32
+ headerActions: /* @__PURE__ */ b(S, {
31
33
  primary: {
32
34
  label: "Add Product",
33
- icon: /* @__PURE__ */ v(n, { size: 16 }),
34
- onSelect: () => R("inventory/products/new")
35
+ icon: /* @__PURE__ */ b(n, { size: 16 }),
36
+ onSelect: () => W("inventory/products/new")
35
37
  },
36
38
  actions: [{
37
39
  label: "Refresh",
38
- icon: /* @__PURE__ */ v(r, { size: 16 }),
39
- onSelect: () => I()
40
+ icon: /* @__PURE__ */ b(r, { size: 16 }),
41
+ onSelect: () => H()
40
42
  }, {
41
- label: "Export",
42
- icon: /* @__PURE__ */ v(e, { size: 16 }),
43
- onSelect: () => R("import-export")
43
+ label: D ? "Exporting…" : "Export",
44
+ icon: /* @__PURE__ */ b(e, { size: 16 }),
45
+ onSelect: O
44
46
  }]
45
47
  }),
46
48
  children: [
47
- /* @__PURE__ */ v(x, {
48
- icon: /* @__PURE__ */ v(t, { size: 18 }),
49
+ /* @__PURE__ */ b(C, {
50
+ icon: /* @__PURE__ */ b(t, { size: 18 }),
49
51
  children: "The catalog of items you ship. Each product's dimensions, weight, value and handling flags (fragile, hazardous, temperature-controlled) drive how it's packed, priced and routed — keep them accurate so shipments are quoted and handled correctly."
50
52
  }),
51
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
53
+ /* @__PURE__ */ b(v, {
54
+ state: E,
55
+ onDismiss: k
56
+ }),
57
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
52
58
  className: "mb-3 text-sm font-medium text-text-secondary",
53
59
  children: "Catalog at a glance"
54
- }), /* @__PURE__ */ y(p, {
60
+ }), /* @__PURE__ */ x(p, {
55
61
  columns: 3,
56
62
  children: [
57
- /* @__PURE__ */ v(f, {
63
+ /* @__PURE__ */ b(f, {
58
64
  label: "Total products",
59
- value: L.total,
60
- icon: /* @__PURE__ */ v(t, { size: 20 }),
65
+ value: U.total,
66
+ icon: /* @__PURE__ */ b(t, { size: 20 }),
61
67
  accent: "brand"
62
68
  }),
63
- /* @__PURE__ */ v(f, {
69
+ /* @__PURE__ */ b(f, {
64
70
  label: "Special handling",
65
- value: L.specialHandling,
66
- icon: /* @__PURE__ */ v(a, { size: 20 }),
71
+ value: U.specialHandling,
72
+ icon: /* @__PURE__ */ b(a, { size: 20 }),
67
73
  accent: "warning",
68
74
  subtitle: "Fragile or hazardous"
69
75
  }),
70
- /* @__PURE__ */ v(f, {
76
+ /* @__PURE__ */ b(f, {
71
77
  label: "Temp-controlled",
72
- value: L.temperatureControlled,
73
- icon: /* @__PURE__ */ v(i, { size: 20 }),
78
+ value: U.temperatureControlled,
79
+ icon: /* @__PURE__ */ b(i, { size: 20 }),
74
80
  accent: "blue"
75
81
  })
76
82
  ]
77
83
  })] }),
78
- /* @__PURE__ */ v(m, {
84
+ /* @__PURE__ */ b(m, {
79
85
  columns: [
80
86
  {
81
87
  id: "sku",
82
88
  header: "SKU",
83
89
  accessorKey: "sku",
84
90
  sortable: !0,
85
- cell: (e) => /* @__PURE__ */ v("span", {
91
+ cell: (e) => /* @__PURE__ */ b("span", {
86
92
  className: "font-mono",
87
93
  children: e.sku
88
94
  })
@@ -92,10 +98,10 @@ function S() {
92
98
  header: "Product Name",
93
99
  accessorKey: "name",
94
100
  sortable: !0,
95
- cell: (e) => /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
101
+ cell: (e) => /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
96
102
  className: "font-medium",
97
103
  children: e.name
98
- }), /* @__PURE__ */ v("p", {
104
+ }), /* @__PURE__ */ b("p", {
99
105
  className: "text-sm text-text-secondary line-clamp-1",
100
106
  children: e.description ?? "Not provided"
101
107
  })] })
@@ -105,7 +111,7 @@ function S() {
105
111
  header: "Category",
106
112
  accessorKey: "category",
107
113
  sortable: !0,
108
- cell: (e) => /* @__PURE__ */ v(u, {
114
+ cell: (e) => /* @__PURE__ */ b(u, {
109
115
  variant: "outline",
110
116
  children: e.category ?? "Not provided"
111
117
  })
@@ -127,7 +133,7 @@ function S() {
127
133
  header: "Value",
128
134
  accessorKey: "value",
129
135
  sortable: !0,
130
- cell: (e) => /* @__PURE__ */ v("span", {
136
+ cell: (e) => /* @__PURE__ */ b("span", {
131
137
  className: "font-medium",
132
138
  children: e.value === void 0 ? "Not provided" : h(e.value)
133
139
  })
@@ -135,20 +141,20 @@ function S() {
135
141
  {
136
142
  id: "flags",
137
143
  header: "Flags",
138
- cell: (e) => /* @__PURE__ */ y("div", {
144
+ cell: (e) => /* @__PURE__ */ x("div", {
139
145
  className: "flex gap-1",
140
146
  children: [
141
- e.fragile && /* @__PURE__ */ v(u, {
147
+ e.fragile && /* @__PURE__ */ b(u, {
142
148
  variant: "destructive",
143
149
  className: "text-xs",
144
150
  children: "Fragile"
145
151
  }),
146
- e.hazardous && /* @__PURE__ */ v(u, {
152
+ e.hazardous && /* @__PURE__ */ b(u, {
147
153
  variant: "destructive",
148
154
  className: "text-xs",
149
155
  children: "Hazardous"
150
156
  }),
151
- e.temperatureControlled && /* @__PURE__ */ v(u, {
157
+ e.temperatureControlled && /* @__PURE__ */ b(u, {
152
158
  variant: "secondary",
153
159
  className: "text-xs",
154
160
  children: "Temp Control"
@@ -157,10 +163,10 @@ function S() {
157
163
  })
158
164
  }
159
165
  ],
160
- data: j,
161
- isLoading: P,
162
- error: F,
163
- onRetry: I,
166
+ data: L,
167
+ isLoading: B,
168
+ error: V,
169
+ onRetry: H,
164
170
  searchable: !0,
165
171
  searchPlaceholder: "Search products...",
166
172
  searchFields: [
@@ -168,20 +174,20 @@ function S() {
168
174
  "sku",
169
175
  "category"
170
176
  ],
171
- searchQuery: O,
177
+ searchQuery: P,
172
178
  onSearchQueryChange: (e) => {
173
- k(e), T(0);
179
+ F(e), j(0);
174
180
  },
175
- onRowClick: (e) => R(`inventory/products/${e.id}`),
181
+ onRowClick: (e) => W(`inventory/products/${e.id}`),
176
182
  getRowId: (e) => e.id,
177
- pageIndex: w,
178
- pageSize: E,
179
- onPageChange: T,
183
+ pageIndex: A,
184
+ pageSize: M,
185
+ onPageChange: j,
180
186
  onPageSizeChange: (e) => {
181
- D(e), T(0);
187
+ N(e), j(0);
182
188
  },
183
- totalItems: M,
184
- hasNextPage: N,
189
+ totalItems: R,
190
+ hasNextPage: z,
185
191
  emptyIllustration: "empty-files",
186
192
  emptyTitle: "No products yet",
187
193
  emptyDescription: "Add products to your catalog so they can be added to orders and stocked in warehouses."
@@ -190,4 +196,4 @@ function S() {
190
196
  });
191
197
  }
192
198
  //#endregion
193
- export { S as default };
199
+ export { w as default };