@mercurjs/vendor 2.2.0-canary.21 → 2.2.0-canary.23

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 (51) hide show
  1. package/dist/{[id]-ZEFQ7FQQ.js → [id]-35EHXGJK.js} +2 -2
  2. package/dist/{[id]-3JICOSAI.js → [id]-5PXEWKER.js} +2 -2
  3. package/dist/{[id]-PD3ISUL5.js → [id]-BGVYXNSX.js} +3 -3
  4. package/dist/{[id]-FIP4UMQ4.js → [id]-PGKXY75Z.js} +58 -28
  5. package/dist/{[id]-XUKQKCDN.js → [id]-W5RBRUBB.js} +2 -2
  6. package/dist/{[id]-E7DYRMMO.js → [id]-YJIKYRC4.js} +2 -2
  7. package/dist/{add-GYXNRUAE.js → add-EE67SXQJ.js} +2 -2
  8. package/dist/{add-customer-groups-KIGBZT5G.js → add-customer-groups-MB2GJP77.js} +6 -1
  9. package/dist/{add-promotions-EQ5MMQKG.js → add-promotions-EEQV6QFY.js} +3 -3
  10. package/dist/{categories-3P2DRH5V.js → categories-JM5HQP3Q.js} +1 -1
  11. package/dist/{chunk-RT3G3GEK.js → chunk-5IFNEL6A.js} +1 -1
  12. package/dist/{chunk-4RFPRO2W.js → chunk-7DZCHZHR.js} +1 -1
  13. package/dist/{chunk-ZZIJSTXN.js → chunk-AYCX7QNB.js} +21 -9
  14. package/dist/{chunk-4OIOYUQE.js → chunk-BYQDKFTG.js} +3 -8
  15. package/dist/{chunk-PVZBDWLK.js → chunk-GRH7C3QN.js} +1 -1
  16. package/dist/{chunk-R4JLYNUA.js → chunk-KIOTMXSI.js} +2 -2
  17. package/dist/{chunk-LRMWYKSF.js → chunk-KPF6WMZI.js} +1 -1
  18. package/dist/{chunk-3L2DVCOC.js → chunk-MDRCW3OQ.js} +1 -1
  19. package/dist/{chunk-N6MGVXXQ.js → chunk-MP2H5ZC6.js} +1 -1
  20. package/dist/{chunk-HZCSJLGH.js → chunk-OCKJNR4P.js} +1 -1
  21. package/dist/{chunk-4EQIJMQT.js → chunk-QPZDRSZB.js} +1 -1
  22. package/dist/{chunk-AKKIZD2P.js → chunk-UUDRVBJX.js} +1 -1
  23. package/dist/{chunk-H7BVANDX.js → chunk-XCPANKUF.js} +37 -10
  24. package/dist/{chunk-II3ACSV2.js → chunk-YNGA3GRX.js} +1 -1
  25. package/dist/{collections-7M7O23NO.js → collections-66Q55JUI.js} +3 -3
  26. package/dist/{create-SJSLOXOW.js → create-7TV3IEVG.js} +4 -4
  27. package/dist/{create-NR7ULWQS.js → create-IGK3RHU7.js} +3 -3
  28. package/dist/{customer-group-add-customers-GTM556QA.js → customer-group-add-customers-QPIYYEXU.js} +1 -1
  29. package/dist/{customer-group-create-OYHAXX2T.js → customer-group-create-DQHTB3SK.js} +9 -2
  30. package/dist/{customer-group-detail-KW62TLWA.js → customer-group-detail-B446EA7L.js} +2 -2
  31. package/dist/{customer-group-edit-WH7O4N4L.js → customer-group-edit-H255WS2E.js} +2 -1
  32. package/dist/{customer-groups-UJFZBZ2B.js → customer-groups-YIEFOZ4F.js} +12 -4
  33. package/dist/{customers-4WKIFPUU.js → customers-6KNDRYB4.js} +2 -2
  34. package/dist/{edit-YTS77SJS.js → edit-DQFUUWUB.js} +2 -2
  35. package/dist/{edit-3EN2H52W.js → edit-FPTAY3EX.js} +3 -3
  36. package/dist/{edit-price-K6K2FTMF.js → edit-price-BNEAFMUE.js} +1 -0
  37. package/dist/{edit-stock-6TUSJD5R.js → edit-stock-XK6NE4NH.js} +1 -0
  38. package/dist/index.js +44 -44
  39. package/dist/{invite-VWNUFOFI.js → invite-QMJJAEB5.js} +1 -1
  40. package/dist/{media-KIIJ6WSZ.js → media-EBDOAHHL.js} +3 -3
  41. package/dist/{offer-variant-detail-page-ORH56HZI.js → offer-variant-detail-page-2X5JF5LG.js} +4 -23
  42. package/dist/pages/index.js +12 -12
  43. package/dist/{product-tags-MW2JMRFY.js → product-tags-3XMULQGD.js} +2 -2
  44. package/dist/{products-TZS2OPK3.js → products-KNJDYGOO.js} +4 -4
  45. package/dist/{promotions-JYO23G6N.js → promotions-VCNOCGYA.js} +4 -4
  46. package/dist/{register-SR2SYX4Q.js → register-V77I2H42.js} +1 -1
  47. package/dist/{reset-password-N22YRMR3.js → reset-password-HVJ7JG6D.js} +1 -1
  48. package/dist/{return-reasons-POR5YPTF.js → return-reasons-IHEACVG3.js} +2 -2
  49. package/dist/{settings-MHBYIZ2I.js → settings-CGD3WPJK.js} +2 -2
  50. package/dist/{team-MY24J5WO.js → team-WSE7PKUH.js} +1 -1
  51. package/package.json +1 -1
@@ -5,7 +5,7 @@ import "./chunk-N335VHD3.js";
5
5
  import "./chunk-EBZ5VZEO.js";
6
6
  import "./chunk-4F5GP7J7.js";
7
7
  import "./chunk-7TIZP4YG.js";
8
- import "./chunk-II3ACSV2.js";
8
+ import "./chunk-YNGA3GRX.js";
9
9
  import "./chunk-BI2AYXZQ.js";
10
10
  import "./chunk-MG4GKUJW.js";
11
11
  import "./chunk-AYVH6Q5O.js";
@@ -14,7 +14,7 @@ import "./chunk-DY3XQPHC.js";
14
14
  import "./chunk-VKOE5J66.js";
15
15
  import "./chunk-42R54Z2X.js";
16
16
  import "./chunk-GJM5XI3E.js";
17
- import "./chunk-PVZBDWLK.js";
17
+ import "./chunk-GRH7C3QN.js";
18
18
  import "./chunk-27WLUOI2.js";
19
19
  import "./chunk-N3T24SEK.js";
20
20
  import "./chunk-JHIMVLB2.js";
@@ -120,7 +120,7 @@ var CollectionIconSection = ({
120
120
  collection
121
121
  }) => {
122
122
  const { t } = useTranslation2();
123
- const icon = getCollectionIcon(collection.images);
123
+ const icon = getCollectionIcon(collection.media_images);
124
124
  return /* @__PURE__ */ jsxs2(Container2, { className: "divide-y p-0", "data-testid": "collection-icon-section", children: [
125
125
  /* @__PURE__ */ jsx2("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx2(Heading2, { children: t("collections.icon.label") }) }),
126
126
  /* @__PURE__ */ jsx2("div", { className: "px-6 py-4", children: icon ? /* @__PURE__ */ jsx2("div", { className: "bg-ui-bg-base shadow-elevation-card-rest relative aspect-square w-24 overflow-hidden rounded-[8px]", children: /* @__PURE__ */ jsx2(
@@ -156,7 +156,7 @@ var CollectionMediaSection = ({
156
156
  collection
157
157
  }) => {
158
158
  const { t } = useTranslation3();
159
- const gallery = getCollectionGallery(collection.images);
159
+ const gallery = getCollectionGallery(collection.media_images);
160
160
  return /* @__PURE__ */ jsxs3(Container3, { className: "divide-y p-0", "data-testid": "collection-media-section", children: [
161
161
  /* @__PURE__ */ jsx3("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx3(Heading3, { children: t("collections.media.label") }) }),
162
162
  /* @__PURE__ */ jsx3("div", { className: "px-6 py-4", children: gallery.length > 0 ? /* @__PURE__ */ jsx3("div", { className: "grid grid-cols-[repeat(auto-fill,minmax(96px,1fr))] gap-4", children: gallery.map((image) => /* @__PURE__ */ jsxs3(
@@ -7,8 +7,8 @@ import {
7
7
  import {
8
8
  usePromotionTableColumns,
9
9
  usePromotionTableQuery
10
- } from "./chunk-LRMWYKSF.js";
11
- import "./chunk-N6MGVXXQ.js";
10
+ } from "./chunk-KPF6WMZI.js";
11
+ import "./chunk-MP2H5ZC6.js";
12
12
  import "./chunk-JHIMVLB2.js";
13
13
  import {
14
14
  usePromotionTableFilters
@@ -27,7 +27,7 @@ import "./chunk-3EF54XFY.js";
27
27
  import {
28
28
  currencies
29
29
  } from "./chunk-IQPN4PZJ.js";
30
- import "./chunk-ZZIJSTXN.js";
30
+ import "./chunk-AYCX7QNB.js";
31
31
  import {
32
32
  TwoColumnPage
33
33
  } from "./chunk-YV6MK4PZ.js";
@@ -141,8 +141,8 @@ var CustomerAddressSection = ({
141
141
  {
142
142
  className: "flex h-full flex-col overflow-hidden p-6",
143
143
  icon: null,
144
- title: t2("general.noRecordsTitle"),
145
- message: t2("general.noRecordsMessage")
144
+ title: t2("customers.addresses.emptyTitle"),
145
+ message: t2("customers.addresses.emptyMessage")
146
146
  }
147
147
  ) }) : /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-y-2 p-3", children: addresses.map((address) => {
148
148
  const country = getCountryByIso2(address.country_code)?.display_name ?? address.country_code?.toUpperCase();
@@ -238,6 +238,7 @@ import {
238
238
  toast,
239
239
  usePrompt
240
240
  } from "@medusajs/ui";
241
+ import { keepPreviousData } from "@tanstack/react-query";
241
242
  import { createColumnHelper } from "@tanstack/react-table";
242
243
  import { t } from "i18next";
243
244
  import { useMemo, useState } from "react";
@@ -247,32 +248,53 @@ import { Link } from "react-router-dom";
247
248
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
248
249
  var PAGE_SIZE = 10;
249
250
  var PREFIX = "cusgr";
251
+ var DEFAULT_ORDER = "-created_at";
250
252
  var CustomerGroupSection = ({
251
253
  customer
252
254
  }) => {
253
255
  const prompt = usePrompt();
254
256
  const [rowSelection, setRowSelection] = useState({});
255
- const { raw } = useCustomerGroupTableQuery({
257
+ const { searchParams, raw } = useCustomerGroupTableQuery({
256
258
  pageSize: PAGE_SIZE,
257
259
  prefix: PREFIX
258
260
  });
259
261
  const flatCustomerGroups = customer.groups ?? [];
260
- const groupIds = flatCustomerGroups.map((g) => g.id);
261
- const { customer_groups: groupsWithCounts } = useCustomerGroups(
262
- { id: groupIds, fields: "id,customers.id", limit: groupIds.length || 1 },
263
- { enabled: groupIds.length > 0 }
262
+ const groupIds = useMemo(
263
+ () => (customer.groups ?? []).map((g) => g.id),
264
+ [customer.groups]
264
265
  );
266
+ const {
267
+ customer_groups: customerGroups = [],
268
+ count = 0,
269
+ isLoading,
270
+ isError,
271
+ error
272
+ } = useCustomerGroups(
273
+ {
274
+ ...searchParams,
275
+ id: groupIds,
276
+ order: searchParams.order || DEFAULT_ORDER,
277
+ fields: "id,name,created_at,updated_at,customers.id"
278
+ },
279
+ {
280
+ enabled: groupIds.length > 0,
281
+ placeholderData: keepPreviousData
282
+ }
283
+ );
284
+ if (isError) {
285
+ throw error;
286
+ }
265
287
  const customerCountByGroup = {};
266
- for (const g of groupsWithCounts ?? []) {
288
+ for (const g of customerGroups) {
267
289
  customerCountByGroup[g.id] = g.customers?.length ?? 0;
268
290
  }
269
291
  const { mutateAsync: batchCustomerCustomerGroups } = useBatchCustomerCustomerGroups(customer.id);
270
292
  const filters = useCustomerGroupTableFilters();
271
293
  const columns = useColumns(customer.id, customerCountByGroup);
272
294
  const { table } = useDataTable({
273
- data: flatCustomerGroups ?? [],
295
+ data: customerGroups,
274
296
  columns,
275
- count: flatCustomerGroups?.length ?? 0,
297
+ count,
276
298
  getRowId: (row) => row.id,
277
299
  enablePagination: true,
278
300
  enableRowSelection: true,
@@ -285,30 +307,33 @@ var CustomerGroupSection = ({
285
307
  });
286
308
  const handleRemove = async () => {
287
309
  const selectedIds = Object.keys(rowSelection);
310
+ const selectedGroups = flatCustomerGroups.filter(
311
+ (g) => selectedIds.includes(g.id)
312
+ );
313
+ const names = selectedGroups.map((g) => g.name);
314
+ const isSingle = selectedGroups.length === 1;
288
315
  const res = await prompt({
289
316
  title: t("general.areYouSure"),
290
- description: t("customers.groups.removeMany", {
291
- groups: flatCustomerGroups?.filter((g) => selectedIds.includes(g.id)).map((g) => g.name).join(",")
292
- }),
317
+ description: isSingle ? t("customers.groups.remove", { name: names[0] }) : t("customers.groups.removeMany", { groups: names.join(", ") }),
293
318
  confirmText: t("actions.remove"),
294
319
  cancelText: t("actions.cancel")
295
320
  });
296
321
  if (!res) {
297
322
  return;
298
323
  }
299
- const customerGroupIds = flatCustomerGroups?.filter((g) => selectedIds.includes(g.id)).map((g) => g.id) ?? [];
324
+ const customerGroupIds = selectedGroups.map((g) => g.id);
300
325
  await batchCustomerCustomerGroups(
301
326
  { remove: customerGroupIds, add: [] },
302
327
  {
303
328
  onSuccess: () => {
304
329
  toast.success(
305
- t("customers.groups.removed.success", {
306
- groups: flatCustomerGroups?.filter((g) => selectedIds.includes(g.id)).map((g) => g.name)
330
+ isSingle ? t("customers.groups.removed.successOne", { groups: names[0] }) : t("customers.groups.removed.successMany", {
331
+ groups: names.join(", ")
307
332
  })
308
333
  );
309
334
  },
310
- onError: (error) => {
311
- toast.error(error.message);
335
+ onError: (e) => {
336
+ toast.error(e.message);
312
337
  }
313
338
  }
314
339
  );
@@ -324,8 +349,8 @@ var CustomerGroupSection = ({
324
349
  table,
325
350
  columns,
326
351
  pageSize: PAGE_SIZE,
327
- isLoading: false,
328
- count: flatCustomerGroups?.length ?? 0,
352
+ isLoading,
353
+ count,
329
354
  prefix: PREFIX,
330
355
  navigateTo: (row) => `/customer-groups/${row.original.id}`,
331
356
  filters,
@@ -336,6 +361,7 @@ var CustomerGroupSection = ({
336
361
  { key: "created_at", label: t("fields.createdAt") },
337
362
  { key: "updated_at", label: t("fields.updatedAt") }
338
363
  ],
364
+ defaultOrderBy: DEFAULT_ORDER,
339
365
  commands: [
340
366
  {
341
367
  action: handleRemove,
@@ -345,7 +371,9 @@ var CustomerGroupSection = ({
345
371
  ],
346
372
  queryObject: raw,
347
373
  noRecords: {
348
- message: t("customers.groups.list.noRecordsMessage")
374
+ title: t("customers.groups.list.emptyTitle"),
375
+ message: t("customers.groups.list.noRecordsMessage"),
376
+ icon: null
349
377
  }
350
378
  }
351
379
  )
@@ -371,6 +399,11 @@ var CustomerGroupRowActions = ({
371
399
  return;
372
400
  }
373
401
  await mutateAsync([customerId], {
402
+ onSuccess: () => {
403
+ toast.success(
404
+ t2("customers.groups.removed.successOne", { groups: group.name })
405
+ );
406
+ },
374
407
  onError: (error) => {
375
408
  toast.error(error.message);
376
409
  }
@@ -472,18 +505,13 @@ var CustomerOrderSection = ({
472
505
  pageSize: PAGE_SIZE2,
473
506
  prefix: PREFIX2
474
507
  });
475
- const { orders, isLoading, isError, error } = useOrders({
508
+ const { orders, count, isLoading, isError, error } = useOrders({
476
509
  fields: DEFAULT_FIELDS + "," + DEFAULT_RELATIONS,
477
- limit: searchParams.limit,
478
- offset: searchParams.offset,
479
- created_at: searchParams.created_at,
480
- updated_at: searchParams.updated_at,
481
- order: searchParams.order,
510
+ ...searchParams,
482
511
  customer_id: customer.id
483
512
  });
484
513
  const columns = useColumns2();
485
514
  const filters = useOrderTableFilters();
486
- const count = orders?.length || 0;
487
515
  const { table } = useDataTable({
488
516
  data: orders ?? [],
489
517
  columns,
@@ -503,6 +531,7 @@ var CustomerOrderSection = ({
503
531
  columns,
504
532
  table,
505
533
  pagination: true,
534
+ search: true,
506
535
  navigateTo: (row) => `/orders/${row.original.id}`,
507
536
  filters,
508
537
  count,
@@ -522,6 +551,7 @@ var CustomerOrderSection = ({
522
551
  label: t2("fields.updatedAt")
523
552
  }
524
553
  ],
554
+ defaultOrderBy: "-display_id",
525
555
  queryObject: raw,
526
556
  prefix: PREFIX2
527
557
  }
@@ -6,13 +6,13 @@ import {
6
6
  } from "./chunk-BWGPN6XV.js";
7
7
  import {
8
8
  StatusCell
9
- } from "./chunk-N6MGVXXQ.js";
9
+ } from "./chunk-MP2H5ZC6.js";
10
10
  import "./chunk-FMFVTERD.js";
11
11
  import "./chunk-DB6ANJBO.js";
12
12
  import {
13
13
  NoRecords
14
14
  } from "./chunk-3EF54XFY.js";
15
- import "./chunk-ZZIJSTXN.js";
15
+ import "./chunk-AYCX7QNB.js";
16
16
  import {
17
17
  TwoColumnPage
18
18
  } from "./chunk-YV6MK4PZ.js";
@@ -124,7 +124,7 @@ var CategoryIconSection = ({
124
124
  category
125
125
  }) => {
126
126
  const { t } = useTranslation2();
127
- const icon = getCategoryIcon(category.images);
127
+ const icon = getCategoryIcon(category.media_images);
128
128
  return /* @__PURE__ */ jsxs2(Container2, { className: "divide-y p-0", "data-testid": "category-icon-section", children: [
129
129
  /* @__PURE__ */ jsx2("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx2(Heading2, { children: t("categories.icon.label") }) }),
130
130
  /* @__PURE__ */ jsx2("div", { className: "px-6 py-4", children: icon ? /* @__PURE__ */ jsx2("div", { className: "bg-ui-bg-base shadow-elevation-card-rest relative aspect-square w-24 overflow-hidden rounded-[8px]", children: /* @__PURE__ */ jsx2(
@@ -160,7 +160,7 @@ var CategoryMediaSection = ({
160
160
  category
161
161
  }) => {
162
162
  const { t } = useTranslation3();
163
- const gallery = getCategoryGallery(category.images);
163
+ const gallery = getCategoryGallery(category.media_images);
164
164
  return /* @__PURE__ */ jsxs3(Container3, { className: "divide-y p-0", "data-testid": "category-media-section", children: [
165
165
  /* @__PURE__ */ jsx3("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx3(Heading3, { children: t("categories.media.label") }) }),
166
166
  /* @__PURE__ */ jsx3("div", { className: "px-6 py-4", children: gallery.length > 0 ? /* @__PURE__ */ jsx3("div", { className: "grid grid-cols-[repeat(auto-fill,minmax(96px,1fr))] gap-4", children: gallery.map((image) => /* @__PURE__ */ jsxs3(
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-XRNDVICA.js";
13
13
  import "./chunk-6IJMSVC6.js";
14
14
  import "./chunk-7TIZP4YG.js";
15
- import "./chunk-II3ACSV2.js";
15
+ import "./chunk-YNGA3GRX.js";
16
16
  import "./chunk-BI2AYXZQ.js";
17
17
  import "./chunk-MG4GKUJW.js";
18
18
  import "./chunk-AYVH6Q5O.js";
@@ -21,7 +21,7 @@ import "./chunk-DY3XQPHC.js";
21
21
  import "./chunk-VKOE5J66.js";
22
22
  import "./chunk-42R54Z2X.js";
23
23
  import "./chunk-GJM5XI3E.js";
24
- import "./chunk-PVZBDWLK.js";
24
+ import "./chunk-GRH7C3QN.js";
25
25
  import "./chunk-27WLUOI2.js";
26
26
  import "./chunk-N3T24SEK.js";
27
27
  import "./chunk-JHIMVLB2.js";
@@ -152,7 +152,12 @@ var AddCustomerGroupsForm = ({
152
152
  add: data.customer_group_ids,
153
153
  remove: []
154
154
  });
155
- toast.success("Customer groups added successfully");
155
+ const names = data.customer_group_ids.map((id) => customer_groups?.find((g) => g.id === id)?.name).filter(Boolean);
156
+ toast.success(
157
+ names.length === 1 ? t("customers.groups.add.successOne", { groups: names[0] }) : t("customers.groups.add.successMany", {
158
+ groups: names.join(", ")
159
+ })
160
+ );
156
161
  handleSuccess(`/customers/${customerId}`);
157
162
  } catch (e) {
158
163
  toast.error(e.message);
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  usePromotionTableColumns,
3
3
  usePromotionTableQuery
4
- } from "./chunk-LRMWYKSF.js";
5
- import "./chunk-N6MGVXXQ.js";
4
+ } from "./chunk-KPF6WMZI.js";
5
+ import "./chunk-MP2H5ZC6.js";
6
6
  import "./chunk-JHIMVLB2.js";
7
7
  import {
8
8
  usePromotionTableFilters
@@ -18,7 +18,7 @@ import {
18
18
  import "./chunk-YN3FGNJM.js";
19
19
  import "./chunk-KCHYLLVG.js";
20
20
  import "./chunk-3EF54XFY.js";
21
- import "./chunk-ZZIJSTXN.js";
21
+ import "./chunk-AYCX7QNB.js";
22
22
  import "./chunk-TKGWSUEI.js";
23
23
  import {
24
24
  KeyboundForm
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CategoryListPage
3
- } from "./chunk-AKKIZD2P.js";
3
+ } from "./chunk-UUDRVBJX.js";
4
4
  import "./chunk-JHIMVLB2.js";
5
5
  import "./chunk-LYYM7H7H.js";
6
6
  import "./chunk-FQERBIVS.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-AJLGY3LQ.js";
4
4
  import {
5
5
  i18n
6
- } from "./chunk-ZZIJSTXN.js";
6
+ } from "./chunk-AYCX7QNB.js";
7
7
 
8
8
  // src/pages/products/create/constants.ts
9
9
  import { z } from "zod";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  usePromotionTableColumns,
3
3
  usePromotionTableQuery
4
- } from "./chunk-LRMWYKSF.js";
4
+ } from "./chunk-KPF6WMZI.js";
5
5
  import {
6
6
  usePromotionTableFilters
7
7
  } from "./chunk-S2WEYEQR.js";
@@ -10052,20 +10052,23 @@ var en_default = {
10052
10052
  },
10053
10053
  groups: {
10054
10054
  label: "Customer groups",
10055
- remove: 'Are you sure you want to remove the customer from "{{name}}" customer group?',
10056
- removeMany: "Are you sure you want to remove customer from following customer groups: {{groups}}?",
10055
+ remove: "You are about to remove customer from {{name}} group. This action cannot be undone.",
10056
+ removeMany: "You are about to remove customer from {{groups}} groups. This action cannot be undone.",
10057
10057
  alreadyAddedTooltip: "The customer is already in this customer group.",
10058
10058
  list: {
10059
+ emptyTitle: "No customer groups yet",
10059
10060
  noRecordsMessage: "This customer doesn't belong to any group."
10060
10061
  },
10061
10062
  add: {
10062
- success: "Customer added to: {{groups}}.",
10063
+ successOne: "Customer was successfully added to {{groups}} group.",
10064
+ successMany: "Customer was successfully added to {{groups}} groups.",
10063
10065
  list: {
10064
10066
  noRecordsMessage: "Please create a customer group first."
10065
10067
  }
10066
10068
  },
10067
10069
  removed: {
10068
- success: "Customer removed from: {{groups}}.",
10070
+ successOne: "Customer was successfully removed from {{groups}} group.",
10071
+ successMany: "Customer was successfully removed from {{groups}} groups.",
10069
10072
  list: {
10070
10073
  noRecordsMessage: "Please create a customer group first."
10071
10074
  }
@@ -10091,6 +10094,8 @@ var en_default = {
10091
10094
  hasAccount: "Has account",
10092
10095
  addresses: {
10093
10096
  title: "Addresses",
10097
+ emptyTitle: "No addresses yet",
10098
+ emptyMessage: "This customer doesn't have any addresses",
10094
10099
  fields: {
10095
10100
  addressName: "Address name",
10096
10101
  address1: "Address 1",
@@ -10114,10 +10119,13 @@ var en_default = {
10114
10119
  customerGroups: {
10115
10120
  domain: "Customer Groups",
10116
10121
  subtitle: "Organize customers into groups. Groups can have different promotions and prices.",
10122
+ validation: {
10123
+ nameRequired: "Please enter a name."
10124
+ },
10117
10125
  list: {
10118
10126
  empty: {
10119
- heading: "No customer groups",
10120
- description: "There are no customer groups to display."
10127
+ heading: "No customer groups yet",
10128
+ description: "Create customer groups to organize customers"
10121
10129
  },
10122
10130
  filtered: {
10123
10131
  heading: "No results",
@@ -10127,7 +10135,8 @@ var en_default = {
10127
10135
  create: {
10128
10136
  header: "Create Customer Group",
10129
10137
  hint: "Create a new customer group to segment your customers.",
10130
- successToast: "Customer group {{name}} was successfully created."
10138
+ successToast: "Customer group {{name}} was successfully created.",
10139
+ alreadyExistsToast: "Customer group with name {{name}} already exists."
10131
10140
  },
10132
10141
  edit: {
10133
10142
  header: "Edit Customer Group",
@@ -10151,10 +10160,13 @@ var en_default = {
10151
10160
  title_one: "Remove customer",
10152
10161
  title_other: "Remove customers",
10153
10162
  description_one: "You are about to remove {{count}} customer from the customer group. This action cannot be undone.",
10154
- description_other: "You are about to remove {{count}} customers from the customer group. This action cannot be undone."
10163
+ description_other: "You are about to remove {{count}} customers from the customer group. This action cannot be undone.",
10164
+ successToast_one: "Customer was successfully removed from the group.",
10165
+ successToast_other: "Customers were successfully removed from the group."
10155
10166
  },
10156
10167
  list: {
10157
- noRecordsMessage: "This group doesn't have customers."
10168
+ noRecordsTitle: "No customers yet",
10169
+ noRecordsMessage: "This group doesn't have any customers"
10158
10170
  }
10159
10171
  }
10160
10172
  },
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-GJM5XI3E.js";
4
4
  import {
5
5
  useCustomerTableQuery
6
- } from "./chunk-PVZBDWLK.js";
6
+ } from "./chunk-GRH7C3QN.js";
7
7
  import {
8
8
  useCustomerTableFilters
9
9
  } from "./chunk-UO6IX5Y7.js";
@@ -62,16 +62,10 @@ var CustomerListDataTable = () => {
62
62
  });
63
63
  const { customers, count, isLoading, isError, error } = useCustomers(
64
64
  {
65
- offset: searchParams.offset,
66
- limit: searchParams.limit
65
+ ...searchParams
67
66
  },
68
67
  {
69
68
  placeholderData: keepPreviousData
70
- },
71
- {
72
- has_account: searchParams.has_account,
73
- order: searchParams.order,
74
- q: searchParams.q
75
69
  }
76
70
  );
77
71
  const filters = useCustomerTableFilters();
@@ -115,6 +109,7 @@ var CustomerListDataTable = () => {
115
109
  label: t("fields.updatedAt")
116
110
  }
117
111
  ],
112
+ defaultOrderBy: "-created_at",
118
113
  isLoading,
119
114
  navigateTo: (row) => row.original.id,
120
115
  queryObject: raw,
@@ -25,7 +25,7 @@ var useCustomerTableQuery = ({
25
25
  offset: offset ? Number(offset) : 0,
26
26
  groups: groups?.split(","),
27
27
  has_account: has_account ? has_account === "true" : void 0,
28
- order,
28
+ order: order ? order : "-created_at",
29
29
  created_at: created_at ? JSON.parse(created_at) : void 0,
30
30
  updated_at: updated_at ? JSON.parse(updated_at) : void 0,
31
31
  q
@@ -26,13 +26,13 @@ import {
26
26
  } from "./chunk-OVPAOBZB.js";
27
27
  import {
28
28
  UploadMediaFormItem
29
- } from "./chunk-3L2DVCOC.js";
29
+ } from "./chunk-MDRCW3OQ.js";
30
30
  import {
31
31
  PRODUCT_CREATE_FORM_DEFAULTS,
32
32
  ProductCreateSchema,
33
33
  generateVariantsFromAttributes,
34
34
  normalizeProductFormValues
35
- } from "./chunk-RT3G3GEK.js";
35
+ } from "./chunk-5IFNEL6A.js";
36
36
  import {
37
37
  ChipInput
38
38
  } from "./chunk-KDE4HKH2.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StatusCell
3
- } from "./chunk-N6MGVXXQ.js";
3
+ } from "./chunk-MP2H5ZC6.js";
4
4
  import {
5
5
  TextCell,
6
6
  TextHeader
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FileUpload,
3
3
  formatFileSize
4
- } from "./chunk-RT3G3GEK.js";
4
+ } from "./chunk-5IFNEL6A.js";
5
5
  import {
6
6
  Form
7
7
  } from "./chunk-3QSRE5LS.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-DB6ANJBO.js";
4
4
  import {
5
5
  i18n
6
- } from "./chunk-ZZIJSTXN.js";
6
+ } from "./chunk-AYCX7QNB.js";
7
7
 
8
8
  // src/lib/promotions.ts
9
9
  var promotionStatusMap = {
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-EBZ5VZEO.js";
11
11
  import {
12
12
  useCollectionTableColumns
13
- } from "./chunk-II3ACSV2.js";
13
+ } from "./chunk-YNGA3GRX.js";
14
14
  import {
15
15
  useCollectionTableQuery,
16
16
  useProductTagTableQuery
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useCollectionTableColumns
3
- } from "./chunk-II3ACSV2.js";
3
+ } from "./chunk-YNGA3GRX.js";
4
4
  import {
5
5
  useCollectionTableQuery
6
6
  } from "./chunk-BI2AYXZQ.js";
@@ -99,7 +99,7 @@ var useCategoryTableColumns = () => {
99
99
  )) });
100
100
  }
101
101
  const gallery = getCategoryGallery(
102
- row.original.images
102
+ row.original.media_images
103
103
  );
104
104
  const thumbnailSrc = gallery.find((image) => image.is_thumbnail)?.url ?? gallery[0]?.url ?? null;
105
105
  return /* @__PURE__ */ jsxs2("div", { className: "flex size-full items-center gap-x-3 overflow-hidden", children: [