@mercurjs/admin 2.1.1 → 2.1.2-canary.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 (61) hide show
  1. package/dist/{add-campaign-promotions-WILFAFL4.js → add-campaign-promotions-NBZZUJRI.js} +3 -3
  2. package/dist/{campaign-detail-S44LA6AX.js → campaign-detail-WIFJRZ5U.js} +4 -4
  3. package/dist/{chunk-OVB4R5U5.js → chunk-2MNDOYVE.js} +3 -2
  4. package/dist/{chunk-7IKRJNID.js → chunk-4JN4BMC7.js} +1 -1
  5. package/dist/{chunk-Z433IE4R.js → chunk-5AGYKTCN.js} +1 -1
  6. package/dist/{chunk-NYOSVNJ4.js → chunk-7AMAENN3.js} +1 -1
  7. package/dist/{chunk-TVL4IXSL.js → chunk-BURG4MO3.js} +8 -8
  8. package/dist/{chunk-JRFNFYXA.js → chunk-CQFXSD2L.js} +1 -1
  9. package/dist/{chunk-BAJODL3V.js → chunk-GIU72QEP.js} +1 -1
  10. package/dist/{chunk-FQFW3DUZ.js → chunk-HO7Z6MC3.js} +1 -1
  11. package/dist/{chunk-3TOCWPCQ.js → chunk-NNCIV74Y.js} +5 -5
  12. package/dist/{chunk-3U4C3UKN.js → chunk-OF4WDRBY.js} +1 -1
  13. package/dist/{chunk-5Q2DL7Z2.js → chunk-Q3JUPLQV.js} +1 -1
  14. package/dist/{chunk-WX6UWXY6.js → chunk-Q64H5G5C.js} +3 -3
  15. package/dist/{chunk-YJNCEGX4.js → chunk-QOQSXNEF.js} +3 -1
  16. package/dist/{chunk-LET54CD5.js → chunk-QZBAACYC.js} +3 -2
  17. package/dist/{chunk-LVLDW6FV.js → chunk-TDQEXNX5.js} +1 -1
  18. package/dist/{chunk-P5VTTPU2.js → chunk-UEFWVPQ7.js} +1 -1
  19. package/dist/{chunk-NEAMPCCU.js → chunk-VBJFCAKU.js} +20 -11
  20. package/dist/{chunk-H55UROTU.js → chunk-VC3WCDSC.js} +1 -1
  21. package/dist/{chunk-6KIROGNM.js → chunk-VTK4AZCW.js} +1 -1
  22. package/dist/{chunk-ZEBQKDHR.js → chunk-XII5XCYR.js} +1 -1
  23. package/dist/{chunk-IXHIM2HR.js → chunk-XILJNA3R.js} +1 -1
  24. package/dist/{chunk-DSIZONVE.js → chunk-XZYRXNWO.js} +3 -1
  25. package/dist/{chunk-SMPTZ2RM.js → chunk-Y3I3LXKW.js} +24 -15
  26. package/dist/{chunk-NSUWKSBC.js → chunk-YU7EUWRO.js} +1 -1
  27. package/dist/{chunk-3CU7XPUR.js → chunk-Z4CSKRJ4.js} +1 -1
  28. package/dist/{chunk-PJSWOWXT.js → chunk-ZQW43GJA.js} +545 -14
  29. package/dist/{collection-list-7L64AQM5.js → collection-list-OFZNSMTS.js} +2 -2
  30. package/dist/{commission-rate-create-CUSB36XK.js → commission-rate-create-US6HFJ5L.js} +22 -22
  31. package/dist/{commission-rate-detail-7I4M7GOE.js → commission-rate-detail-D5WUXKER.js} +1 -1
  32. package/dist/{commission-rate-edit-KPY5EXDK.js → commission-rate-edit-VA6VE2H4.js} +20 -18
  33. package/dist/{commission-rate-list-CFKHN2F5.js → commission-rate-list-TFMQC26F.js} +1 -1
  34. package/dist/index.js +48 -48
  35. package/dist/{login-T5DP5BZ3.js → login-EWHQY6G3.js} +1 -1
  36. package/dist/{order-detail-PSJFXQV7.js → order-detail-SFIBIQTI.js} +1 -1
  37. package/dist/{order-edit-billing-address-2WTUR5PX.js → order-edit-billing-address-3I2USVYP.js} +1 -1
  38. package/dist/{order-list-DEFD5MI5.js → order-list-IDKVSUYO.js} +2 -2
  39. package/dist/pages/index.js +25 -25
  40. package/dist/{payout-detail-C5WLFRRT.js → payout-detail-DZFTTDUR.js} +1 -1
  41. package/dist/{payout-list-WQIMALHI.js → payout-list-75YIMPCS.js} +1 -1
  42. package/dist/{product-create-WVC72ZZ2.js → product-create-5QGZGWVR.js} +3 -3
  43. package/dist/{product-detail-7T5PLGCJ.js → product-detail-XXA3V6V3.js} +2 -2
  44. package/dist/{product-export-773L2V63.js → product-export-IJBCSQ5H.js} +1 -1
  45. package/dist/{product-list-G23MTE7S.js → product-list-XXSHUGNI.js} +1 -1
  46. package/dist/{product-media-CBKZEHLD.js → product-media-ZU65PJHB.js} +2 -2
  47. package/dist/{product-tag-detail-U3TJRILA.js → product-tag-detail-2H7EJV5J.js} +1 -1
  48. package/dist/{product-tag-list-CT33WG55.js → product-tag-list-6LTEJAI7.js} +2 -2
  49. package/dist/{product-variant-detail-7UVACNQV.js → product-variant-detail-T2OM45NJ.js} +2 -2
  50. package/dist/{promotion-detail-6ZCWQYON.js → promotion-detail-C2Z7FGWU.js} +3 -3
  51. package/dist/{promotion-list-ZARTSDFP.js → promotion-list-M2EGW2DU.js} +4 -4
  52. package/dist/{refund-reason-list-VLARTCJF.js → refund-reason-list-7G23NIRL.js} +2 -2
  53. package/dist/{reset-password-J4XCWJXV.js → reset-password-IPDGIVOR.js} +1 -1
  54. package/dist/{return-reason-list-IGZ3HCXY.js → return-reason-list-J5S45BMZ.js} +2 -2
  55. package/dist/{store-details-NFUGBVH3.js → store-details-6NDWU65D.js} +2 -2
  56. package/dist/{store-edit-U2Q6LMXR.js → store-edit-UFA6UH4Q.js} +2 -2
  57. package/dist/{store-list-CWVEPRJM.js → store-list-TJXHXAPH.js} +2 -2
  58. package/dist/{tax-region-create-CQCW6ELU.js → tax-region-create-AIWG4DWV.js} +1 -1
  59. package/dist/{tax-region-tax-override-create-GLAYEGAP.js → tax-region-tax-override-create-2MNB5QSB.js} +2 -2
  60. package/dist/{tax-region-tax-override-edit-JZDKFEJC.js → tax-region-tax-override-edit-JCG5D2HY.js} +2 -2
  61. package/package.json +4 -4
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  usePromotionTableColumns,
3
3
  usePromotionTableQuery
4
- } from "./chunk-ZEBQKDHR.js";
5
- import "./chunk-H55UROTU.js";
4
+ } from "./chunk-XII5XCYR.js";
5
+ import "./chunk-VC3WCDSC.js";
6
6
  import "./chunk-JHIMVLB2.js";
7
7
  import "./chunk-FMFVTERD.js";
8
8
  import "./chunk-DB6ANJBO.js";
@@ -15,7 +15,7 @@ import {
15
15
  import "./chunk-YBZWO4ZV.js";
16
16
  import "./chunk-KAZ5BYTQ.js";
17
17
  import "./chunk-634XVU3D.js";
18
- import "./chunk-PJSWOWXT.js";
18
+ import "./chunk-ZQW43GJA.js";
19
19
  import "./chunk-TKGWSUEI.js";
20
20
  import {
21
21
  KeyboundForm
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  CAMPAIGN_DETAIL_FIELDS,
3
3
  CampaignDetailPage
4
- } from "./chunk-NSUWKSBC.js";
5
- import "./chunk-ZEBQKDHR.js";
4
+ } from "./chunk-YU7EUWRO.js";
5
+ import "./chunk-XII5XCYR.js";
6
6
  import "./chunk-RK5N3XIX.js";
7
- import "./chunk-H55UROTU.js";
7
+ import "./chunk-VC3WCDSC.js";
8
8
  import "./chunk-JHIMVLB2.js";
9
9
  import "./chunk-FMFVTERD.js";
10
10
  import "./chunk-DB6ANJBO.js";
@@ -17,7 +17,7 @@ import "./chunk-KAZ5BYTQ.js";
17
17
  import "./chunk-634XVU3D.js";
18
18
  import "./chunk-XIZLPYEE.js";
19
19
  import "./chunk-IQPN4PZJ.js";
20
- import "./chunk-PJSWOWXT.js";
20
+ import "./chunk-ZQW43GJA.js";
21
21
  import "./chunk-INNFZYX2.js";
22
22
  import "./chunk-BDGZ4EQO.js";
23
23
  import "./chunk-LAVHRER2.js";
@@ -23,7 +23,8 @@ import { useTranslation } from "react-i18next";
23
23
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
24
24
  var PAGE_SIZE = 10;
25
25
  var PayoutListTitle = () => {
26
- return /* @__PURE__ */ jsx(Heading, { level: "h2", children: "Payouts" });
26
+ const { t } = useTranslation();
27
+ return /* @__PURE__ */ jsx(Heading, { level: "h2", children: t("payouts.domain") });
27
28
  };
28
29
  var PayoutListActions = ({ children }) => {
29
30
  return /* @__PURE__ */ jsx("div", { className: "flex items-center gap-x-2", children: Children.count(children) > 0 ? children : null });
@@ -73,7 +74,7 @@ var PayoutListDataTable = () => {
73
74
  ],
74
75
  queryObject: raw,
75
76
  noRecords: {
76
- message: "No payouts found"
77
+ message: t("payouts.list.empty")
77
78
  }
78
79
  }
79
80
  );
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-SMQT3ZNO.js";
8
8
  import {
9
9
  i18n
10
- } from "./chunk-PJSWOWXT.js";
10
+ } from "./chunk-ZQW43GJA.js";
11
11
 
12
12
  // src/pages/products/product-create/constants.ts
13
13
  import { z } from "zod";
@@ -35,7 +35,7 @@ import {
35
35
  ProductCreateSchema,
36
36
  decorateVariantsWithDefaultValues,
37
37
  normalizeProductFormValues
38
- } from "./chunk-7IKRJNID.js";
38
+ } from "./chunk-4JN4BMC7.js";
39
39
  import {
40
40
  ChipInput
41
41
  } from "./chunk-NCYTM57J.js";
@@ -28,7 +28,7 @@ import {
28
28
  } from "./chunk-2ZFELO2L.js";
29
29
  import {
30
30
  useShippingOptionTableQuery
31
- } from "./chunk-FQFW3DUZ.js";
31
+ } from "./chunk-HO7Z6MC3.js";
32
32
  import {
33
33
  useProductTypeTableQuery
34
34
  } from "./chunk-VOHEQ7B5.js";
@@ -198,7 +198,7 @@ var useOrderGroupTableFilters = () => {
198
198
  // src/pages/orders/order-list/components/order-list-table/order-list-data-table.tsx
199
199
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
200
200
  var PAGE_SIZE = 20;
201
- function transformOrderGroups(orderGroups) {
201
+ function transformOrderGroups(orderGroups, t) {
202
202
  return orderGroups.map((group) => {
203
203
  const orders = group.orders ?? [];
204
204
  const orderIds = orders.map((o) => `#${o.display_id}`).join(", ");
@@ -228,7 +228,7 @@ function transformOrderGroups(orderGroups) {
228
228
  id: group.id,
229
229
  display_id: `#G${group.display_id}`,
230
230
  order_ids: orderIds,
231
- vendor: `${group.seller_count} vendors`,
231
+ vendor: t("orders.fields.vendorsCount", { count: group.seller_count }),
232
232
  created_at: new Date(group.created_at),
233
233
  updated_at: new Date(group.updated_at),
234
234
  customer_name: customerName,
@@ -255,8 +255,8 @@ var OrderListDataTable = () => {
255
255
  }
256
256
  );
257
257
  const rows = useMemo2(
258
- () => transformOrderGroups(order_groups ?? []),
259
- [order_groups]
258
+ () => transformOrderGroups(order_groups ?? [], t),
259
+ [order_groups, t]
260
260
  );
261
261
  const filters = useOrderGroupTableFilters();
262
262
  const columns = useColumns();
@@ -286,7 +286,7 @@ var OrderListDataTable = () => {
286
286
  isLoading,
287
287
  pageSize: PAGE_SIZE,
288
288
  orderBy: [
289
- { key: "display_id", label: "Display ID" },
289
+ { key: "display_id", label: t("orders.fields.displayId") },
290
290
  { key: "created_at", label: t("fields.createdAt") },
291
291
  { key: "updated_at", label: t("fields.updatedAt") }
292
292
  ],
@@ -303,7 +303,7 @@ var useColumns = () => {
303
303
  return useMemo2(
304
304
  () => [
305
305
  columnHelper.accessor("display_id", {
306
- header: () => /* @__PURE__ */ jsx2(TextHeader, { text: "Group ID" }),
306
+ header: () => /* @__PURE__ */ jsx2(TextHeader, { text: t("orders.fields.groupId") }),
307
307
  cell: ({ row, getValue }) => {
308
308
  if (row.original._type === "order") {
309
309
  return null;
@@ -337,7 +337,7 @@ var useColumns = () => {
337
337
  }
338
338
  }),
339
339
  columnHelper.accessor("order_ids", {
340
- header: () => /* @__PURE__ */ jsx2(TextHeader, { text: "Order IDs" }),
340
+ header: () => /* @__PURE__ */ jsx2(TextHeader, { text: t("orders.fields.orderIds") }),
341
341
  cell: ({ row, getValue }) => {
342
342
  if (row.original._type === "group") {
343
343
  return /* @__PURE__ */ jsx2(TextCell, { text: getValue() });
@@ -346,7 +346,7 @@ var useColumns = () => {
346
346
  }
347
347
  }),
348
348
  columnHelper.accessor("vendor", {
349
- header: () => /* @__PURE__ */ jsx2(TextHeader, { text: "Vendor" }),
349
+ header: () => /* @__PURE__ */ jsx2(TextHeader, { text: t("orders.fields.vendor") }),
350
350
  cell: ({ getValue }) => /* @__PURE__ */ jsx2(TextCell, { text: getValue() })
351
351
  }),
352
352
  columnHelper.accessor("created_at", {
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-BDGZ4EQO.js";
18
18
  import {
19
19
  useReturnReasonTableQuery
20
- } from "./chunk-FQFW3DUZ.js";
20
+ } from "./chunk-HO7Z6MC3.js";
21
21
 
22
22
  // src/pages/return-reasons/return-reason-list/return-reason-list.tsx
23
23
  import { Children } from "react";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-WCEMRNW4.js";
10
10
  import {
11
11
  ProductSellerSection
12
- } from "./chunk-YJNCEGX4.js";
12
+ } from "./chunk-QOQSXNEF.js";
13
13
  import {
14
14
  SectionRow
15
15
  } from "./chunk-3XPXUIK3.js";
@@ -174,7 +174,7 @@ var useSellersTableQuery = ({
174
174
  status: status?.split(",") ?? ACTIVE_STATUSES,
175
175
  is_premium: is_premium ? is_premium === "true" : void 0,
176
176
  q,
177
- order: order ? order : void 0
177
+ order: order ? order : "-created_at"
178
178
  };
179
179
  return {
180
180
  searchParams,
@@ -1767,19 +1767,19 @@ var Fulfillment = ({
1767
1767
  enabled: showLocation
1768
1768
  }
1769
1769
  );
1770
- let statusText = fulfillment.requires_shipping ? isPickUpFulfillment ? "Awaiting pickup" : "Awaiting shipping" : "Awaiting delivery";
1770
+ let statusText = fulfillment.requires_shipping ? isPickUpFulfillment ? t("orders.fulfillment.status.awaitingPickup") : t("orders.fulfillment.status.awaitingShipping") : t("orders.fulfillment.status.awaitingDelivery");
1771
1771
  let statusColor = "blue";
1772
1772
  let statusTimestamp = fulfillment.created_at;
1773
1773
  if (fulfillment.canceled_at) {
1774
- statusText = "Canceled";
1774
+ statusText = t("orders.fulfillment.status.canceled");
1775
1775
  statusColor = "red";
1776
1776
  statusTimestamp = fulfillment.canceled_at;
1777
1777
  } else if (fulfillment.delivered_at) {
1778
- statusText = "Delivered";
1778
+ statusText = t("orders.fulfillment.status.delivered");
1779
1779
  statusColor = "green";
1780
1780
  statusTimestamp = fulfillment.delivered_at;
1781
1781
  } else if (fulfillment.shipped_at) {
1782
- statusText = "Shipped";
1782
+ statusText = t("orders.fulfillment.status.shipped");
1783
1783
  statusColor = "green";
1784
1784
  statusTimestamp = fulfillment.shipped_at;
1785
1785
  }
@@ -1923,7 +1923,7 @@ var Fulfillment = ({
1923
1923
  target: "_blank",
1924
1924
  rel: "noopener noreferrer",
1925
1925
  className: "text-ui-fg-interactive hover:text-ui-fg-interactive-hover transition-fg",
1926
- children: /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", as: "span", children: "Label" })
1926
+ children: /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", as: "span", children: t("orders.fulfillment.labelLink") })
1927
1927
  }
1928
1928
  )
1929
1929
  ] }, tlink.tracking_number);
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-RK5N3XIX.js";
4
4
  import {
5
5
  getPromotionStatus
6
- } from "./chunk-H55UROTU.js";
6
+ } from "./chunk-VC3WCDSC.js";
7
7
  import {
8
8
  formatPercentage
9
9
  } from "./chunk-QDPLZDMX.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  usePromotionTableColumns,
3
3
  usePromotionTableQuery
4
- } from "./chunk-ZEBQKDHR.js";
4
+ } from "./chunk-XII5XCYR.js";
5
5
  import {
6
6
  _DataTable,
7
7
  useDataTable
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-KOURHC2N.js";
20
20
  import {
21
21
  useSellersTableQuery
22
- } from "./chunk-FQFW3DUZ.js";
22
+ } from "./chunk-HO7Z6MC3.js";
23
23
  import {
24
24
  require_dist
25
25
  } from "./chunk-ZZO3INVE.js";
@@ -99,7 +99,7 @@ var useSellersTableColumns = () => {
99
99
  () => [
100
100
  columnHelper.display({
101
101
  id: "name",
102
- header: t("stores.fields.name"),
102
+ header: t("stores.fields.seller"),
103
103
  cell: ({ row }) => row.original.name
104
104
  }),
105
105
  columnHelper.display({
@@ -183,7 +183,7 @@ var StoreListDataTable = () => {
183
183
  pagination: true,
184
184
  navigateTo: (row) => `/stores/${row.original.id}`,
185
185
  orderBy: [
186
- { key: "name", label: t("stores.fields.name") },
186
+ { key: "name", label: t("stores.fields.seller") },
187
187
  { key: "email", label: t("stores.fields.email") },
188
188
  { key: "created_at", label: t("fields.createdAt") }
189
189
  ],
@@ -1,14 +1,16 @@
1
1
  // src/pages/products/product-detail/components/product-seller-section/product-seller-section.tsx
2
2
  import { TriangleRightMini } from "@medusajs/icons";
3
3
  import { Avatar, Container, Heading } from "@medusajs/ui";
4
+ import { useTranslation } from "react-i18next";
4
5
  import { Link } from "react-router-dom";
5
6
  import { jsx, jsxs } from "react/jsx-runtime";
6
7
  var ProductSellerSection = ({ seller }) => {
8
+ const { t } = useTranslation();
7
9
  if (!seller) {
8
10
  return null;
9
11
  }
10
12
  return /* @__PURE__ */ jsxs(Container, { className: "p-0", children: [
11
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx(Heading, { level: "h2", children: "Associated Store" }) }),
13
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx(Heading, { level: "h2", children: t("products.associatedStore") }) }),
12
14
  /* @__PURE__ */ jsx("div", { className: "txt-small flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx(
13
15
  Link,
14
16
  {
@@ -241,13 +241,14 @@ var ProductActions = ({ product }) => {
241
241
  };
242
242
  var columnHelper = createColumnHelper();
243
243
  var useColumns = () => {
244
+ const { t } = useTranslation();
244
245
  const base = useProductTableColumns();
245
246
  const columns = useMemo(
246
247
  () => [
247
248
  ...base,
248
249
  columnHelper.display({
249
250
  id: "seller",
250
- header: "Seller",
251
+ header: t("store.domain"),
251
252
  cell: ({ row }) => {
252
253
  const seller = row.original.seller;
253
254
  return seller?.name || "-";
@@ -268,7 +269,7 @@ var useColumns = () => {
268
269
  }
269
270
  })
270
271
  ],
271
- [base]
272
+ [base, t]
272
273
  );
273
274
  return columns;
274
275
  };
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-KOURHC2N.js";
20
20
  import {
21
21
  useProductTagTableQuery
22
- } from "./chunk-FQFW3DUZ.js";
22
+ } from "./chunk-HO7Z6MC3.js";
23
23
  import {
24
24
  useProductTags
25
25
  } from "./chunk-PBQ5M44A.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-33XUAKRP.js";
10
10
  import {
11
11
  ProductSellerSection
12
- } from "./chunk-YJNCEGX4.js";
12
+ } from "./chunk-QOQSXNEF.js";
13
13
  import {
14
14
  SectionRow
15
15
  } from "./chunk-3XPXUIK3.js";
@@ -74,7 +74,7 @@ var CommissionRateListDataTable = () => {
74
74
  pagination: true,
75
75
  search: true,
76
76
  orderBy: [
77
- { key: "name", label: "Name" },
77
+ { key: "name", label: t("commissionRates.fields.name") },
78
78
  { key: "created_at", label: t("fields.createdAt") },
79
79
  { key: "updated_at", label: t("fields.updatedAt") }
80
80
  ]
@@ -90,7 +90,9 @@ var CommissionRateActions = ({
90
90
  const handleDelete = async () => {
91
91
  const res = await prompt({
92
92
  title: t("general.areYouSure"),
93
- description: `Are you sure you want to delete the commission rate "${commissionRate.name}"?`,
93
+ description: t("commissionRates.delete.description", {
94
+ name: commissionRate.name
95
+ }),
94
96
  confirmText: t("actions.delete"),
95
97
  cancelText: t("actions.cancel")
96
98
  });
@@ -99,7 +101,7 @@ var CommissionRateActions = ({
99
101
  }
100
102
  await mutateAsync(void 0, {
101
103
  onSuccess: () => {
102
- toast.success("Commission rate deleted successfully");
104
+ toast.success(t("commissionRates.delete.successToast"));
103
105
  },
104
106
  onError: (e) => {
105
107
  toast.error(e.message);
@@ -134,24 +136,30 @@ var CommissionRateActions = ({
134
136
  };
135
137
  var columnHelper = createColumnHelper();
136
138
  var useColumns = () => {
139
+ const { t } = useTranslation();
137
140
  return useMemo(
138
141
  () => [
139
142
  columnHelper.accessor("code", {
140
- header: "Code",
143
+ header: t("commissionRates.fields.code"),
141
144
  cell: ({ getValue }) => /* @__PURE__ */ jsx(Badge, { size: "2xsmall", className: "uppercase", children: getValue() })
142
145
  }),
143
146
  columnHelper.accessor("type", {
144
- header: () => /* @__PURE__ */ jsx(TextHeader, { text: "Type" }),
147
+ header: () => /* @__PURE__ */ jsx(TextHeader, { text: t("commissionRates.fields.type.label") }),
145
148
  cell: ({ getValue }) => {
146
149
  const type = getValue();
147
- return /* @__PURE__ */ jsx(TextCell, { text: type === "percentage" ? "Percentage" : "Fixed" });
150
+ return /* @__PURE__ */ jsx(
151
+ TextCell,
152
+ {
153
+ text: type === "percentage" ? t("commissionRates.fields.type.percentage") : t("commissionRates.fields.type.fixed")
154
+ }
155
+ );
148
156
  }
149
157
  }),
150
158
  columnHelper.accessor("is_enabled", {
151
- header: "Status",
159
+ header: t("fields.status"),
152
160
  cell: ({ getValue }) => {
153
161
  const enabled = getValue();
154
- return /* @__PURE__ */ jsx(StatusBadge, { color: enabled ? "green" : "grey", children: enabled ? "Enabled" : "Disabled" });
162
+ return /* @__PURE__ */ jsx(StatusBadge, { color: enabled ? "green" : "grey", children: enabled ? t("commissionRates.status.enabled") : t("commissionRates.status.disabled") });
155
163
  }
156
164
  }),
157
165
  columnHelper.display({
@@ -159,7 +167,7 @@ var useColumns = () => {
159
167
  cell: ({ row }) => /* @__PURE__ */ jsx(CommissionRateActions, { commissionRate: row.original })
160
168
  })
161
169
  ],
162
- []
170
+ [t]
163
171
  );
164
172
  };
165
173
 
@@ -170,9 +178,10 @@ import { useTranslation as useTranslation2 } from "react-i18next";
170
178
  import { Link } from "react-router-dom";
171
179
  import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
172
180
  var CommissionRateListTitle = () => {
181
+ const { t } = useTranslation2();
173
182
  return /* @__PURE__ */ jsxs("div", { children: [
174
- /* @__PURE__ */ jsx2(Heading, { children: "Commission Rates" }),
175
- /* @__PURE__ */ jsx2(Text, { className: "text-ui-fg-subtle", size: "small", children: "Manage commission rates and rules for your marketplace." })
183
+ /* @__PURE__ */ jsx2(Heading, { children: t("commissionRates.domain") }),
184
+ /* @__PURE__ */ jsx2(Text, { className: "text-ui-fg-subtle", size: "small", children: t("commissionRates.description") })
176
185
  ] });
177
186
  };
178
187
  var CommissionRateListActions = ({
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  i18n
3
- } from "./chunk-PJSWOWXT.js";
3
+ } from "./chunk-ZQW43GJA.js";
4
4
 
5
5
  // src/lib/promotions.ts
6
6
  var getPromotionStatusMap = () => ({
@@ -40,7 +40,7 @@ import {
40
40
  } from "./chunk-VIGX66F7.js";
41
41
  import {
42
42
  useMemberTableQuery
43
- } from "./chunk-FQFW3DUZ.js";
43
+ } from "./chunk-HO7Z6MC3.js";
44
44
  import {
45
45
  require_dist
46
46
  } from "./chunk-ZZO3INVE.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getPromotionStatus
3
- } from "./chunk-H55UROTU.js";
3
+ } from "./chunk-VC3WCDSC.js";
4
4
  import {
5
5
  TextCell,
6
6
  TextHeader
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-KOURHC2N.js";
17
17
  import {
18
18
  useCollectionTableQuery
19
- } from "./chunk-FQFW3DUZ.js";
19
+ } from "./chunk-HO7Z6MC3.js";
20
20
  import {
21
21
  useCollections,
22
22
  useDeleteCollection
@@ -36,7 +36,9 @@ var payoutStatusColor = (status) => {
36
36
  };
37
37
  var PayoutGeneralSection = ({ payout }) => {
38
38
  const { t } = useTranslation();
39
- const statusText = payout.status.charAt(0).toUpperCase() + payout.status.slice(1);
39
+ const statusText = t(`payouts.status.${payout.status}`, {
40
+ defaultValue: payout.status.charAt(0).toUpperCase() + payout.status.slice(1)
41
+ });
40
42
  return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", children: [
41
43
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
42
44
  /* @__PURE__ */ jsxs(Heading, { children: [
@@ -38,6 +38,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
38
38
  var CommissionRateGeneralSection = ({
39
39
  commissionRate
40
40
  }) => {
41
+ const { t } = useTranslation();
41
42
  const formatValue = () => {
42
43
  if (commissionRate.type === "percentage") {
43
44
  return `${commissionRate.value}%`;
@@ -48,51 +49,57 @@ var CommissionRateGeneralSection = ({
48
49
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
49
50
  /* @__PURE__ */ jsx(Heading, { children: commissionRate.name }),
50
51
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
51
- /* @__PURE__ */ jsx(StatusBadge, { color: commissionRate.is_enabled ? "green" : "grey", children: commissionRate.is_enabled ? "Enabled" : "Disabled" }),
52
+ /* @__PURE__ */ jsx(StatusBadge, { color: commissionRate.is_enabled ? "green" : "grey", children: commissionRate.is_enabled ? t("commissionRates.status.enabled") : t("commissionRates.status.disabled") }),
52
53
  /* @__PURE__ */ jsx(CommissionRateActions, { commissionRate })
53
54
  ] })
54
55
  ] }),
55
56
  /* @__PURE__ */ jsx(
56
57
  SectionRow,
57
58
  {
58
- title: "Code",
59
+ title: t("commissionRates.fields.code"),
59
60
  value: /* @__PURE__ */ jsx(Badge, { size: "2xsmall", className: "uppercase", children: commissionRate.code })
60
61
  }
61
62
  ),
62
63
  /* @__PURE__ */ jsx(
63
64
  SectionRow,
64
65
  {
65
- title: "Type",
66
+ title: t("commissionRates.fields.type.label"),
66
67
  value: /* @__PURE__ */ jsx(
67
68
  Badge,
68
69
  {
69
70
  size: "2xsmall",
70
71
  color: commissionRate.type === "percentage" ? "blue" : "grey",
71
- children: commissionRate.type === "percentage" ? "Percentage" : "Fixed"
72
+ children: commissionRate.type === "percentage" ? t("commissionRates.fields.type.percentage") : t("commissionRates.fields.type.fixed")
72
73
  }
73
74
  )
74
75
  }
75
76
  ),
76
- /* @__PURE__ */ jsx(SectionRow, { title: "Value", value: formatValue() }),
77
+ /* @__PURE__ */ jsx(SectionRow, { title: t("fields.value"), value: formatValue() }),
78
+ /* @__PURE__ */ jsx(
79
+ SectionRow,
80
+ {
81
+ title: t("commissionRates.fields.target.label"),
82
+ value: commissionRate.target === "item" ? t("commissionRates.fields.target.item") : t("commissionRates.fields.target.shipping")
83
+ }
84
+ ),
77
85
  /* @__PURE__ */ jsx(
78
86
  SectionRow,
79
87
  {
80
- title: "Target",
81
- value: commissionRate.target === "item" ? "Item" : "Shipping"
88
+ title: t("commissionRates.fields.includeTax"),
89
+ value: commissionRate.include_tax ? t("general.yes") : t("general.no")
82
90
  }
83
91
  ),
84
92
  /* @__PURE__ */ jsx(
85
93
  SectionRow,
86
94
  {
87
- title: "Include Tax",
88
- value: commissionRate.include_tax ? "Yes" : "No"
95
+ title: t("commissionRates.fields.priority"),
96
+ value: String(commissionRate.priority)
89
97
  }
90
98
  ),
91
- /* @__PURE__ */ jsx(SectionRow, { title: "Priority", value: String(commissionRate.priority) }),
92
99
  commissionRate.min_amount != null && /* @__PURE__ */ jsx(
93
100
  SectionRow,
94
101
  {
95
- title: "Minimum Amount",
102
+ title: t("commissionRates.fields.minAmount"),
96
103
  value: commissionRate.currency_code ? `${commissionRate.min_amount} ${commissionRate.currency_code.toUpperCase()}` : String(commissionRate.min_amount)
97
104
  }
98
105
  )
@@ -113,7 +120,7 @@ var CommissionRateActions = ({
113
120
  {
114
121
  onSuccess: () => {
115
122
  toast.success(
116
- newEnabled ? "Commission rate enabled successfully" : "Commission rate disabled successfully"
123
+ newEnabled ? t("commissionRates.toggle.enabledToast") : t("commissionRates.toggle.disabledToast")
117
124
  );
118
125
  },
119
126
  onError: (e) => {
@@ -125,7 +132,9 @@ var CommissionRateActions = ({
125
132
  const handleDelete = async () => {
126
133
  const res = await prompt({
127
134
  title: t("general.areYouSure"),
128
- description: `Are you sure you want to delete the commission rate "${commissionRate.name}"?`,
135
+ description: t("commissionRates.delete.description", {
136
+ name: commissionRate.name
137
+ }),
129
138
  confirmText: t("actions.delete"),
130
139
  cancelText: t("actions.cancel")
131
140
  });
@@ -134,7 +143,7 @@ var CommissionRateActions = ({
134
143
  }
135
144
  await mutateAsync(void 0, {
136
145
  onSuccess: () => {
137
- toast.success("Commission rate deleted successfully");
146
+ toast.success(t("commissionRates.delete.successToast"));
138
147
  navigate("/settings/commission-rates", { replace: true });
139
148
  },
140
149
  onError: (e) => {
@@ -203,7 +212,7 @@ var CommissionRateRulesSection = ({
203
212
  const entries = Object.entries(groupedRules);
204
213
  return /* @__PURE__ */ jsxs2(Container2, { className: "divide-y p-0", children: [
205
214
  /* @__PURE__ */ jsx2("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx2(Heading2, { level: "h2", children: t("taxRegions.fields.targets.label") }) }),
206
- entries.length === 0 ? /* @__PURE__ */ jsx2("div", { className: "flex items-center justify-center px-6 py-8", children: /* @__PURE__ */ jsx2(Text, { size: "small", className: "text-ui-fg-subtle", children: "No rules configured" }) }) : /* @__PURE__ */ jsx2("div", { className: "px-6 py-4", children: /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-3", children: [
215
+ entries.length === 0 ? /* @__PURE__ */ jsx2("div", { className: "flex items-center justify-center px-6 py-8", children: /* @__PURE__ */ jsx2(Text, { size: "small", className: "text-ui-fg-subtle", children: t("commissionRates.rules.empty") }) }) : /* @__PURE__ */ jsx2("div", { className: "px-6 py-4", children: /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-3", children: [
207
216
  /* @__PURE__ */ jsx2("div", { className: "text-ui-fg-muted flex size-5 items-center justify-center", children: /* @__PURE__ */ jsx2(ArrowDownRightMini, {}) }),
208
217
  /* @__PURE__ */ jsxs2("div", { className: "flex flex-wrap items-center gap-x-1.5 gap-y-2", children: [
209
218
  /* @__PURE__ */ jsx2(
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  usePromotionTableColumns,
3
3
  usePromotionTableQuery
4
- } from "./chunk-ZEBQKDHR.js";
4
+ } from "./chunk-XII5XCYR.js";
5
5
  import {
6
6
  DateRangeDisplay
7
7
  } from "./chunk-RK5N3XIX.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-UQITHKTH.js";
10
10
  import {
11
11
  useRefundReasonTableQuery
12
- } from "./chunk-FQFW3DUZ.js";
12
+ } from "./chunk-HO7Z6MC3.js";
13
13
  import {
14
14
  useDeleteRefundReasonLazy,
15
15
  useRefundReasons