@medusajs/dashboard 2.10.4-snapshot-20250922165717 → 2.10.4-snapshot-20250923121159

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 (48) hide show
  1. package/dist/{add-campaign-promotions-FE4BXGVN.mjs → add-campaign-promotions-JOVLXLS4.mjs} +3 -3
  2. package/dist/{api-key-management-detail-SAVBCKX7.mjs → api-key-management-detail-I7T67TXF.mjs} +1 -1
  3. package/dist/{api-key-management-sales-channels-WL5L5XWM.mjs → api-key-management-sales-channels-6GN6RVZ2.mjs} +1 -1
  4. package/dist/app.css +0 -3
  5. package/dist/app.js +3330 -3318
  6. package/dist/app.mjs +2 -2
  7. package/dist/{campaign-detail-KTOLZNTA.mjs → campaign-detail-NRZHGINV.mjs} +3 -3
  8. package/dist/{chunk-JO6QASTJ.mjs → chunk-37UXEJF2.mjs} +1 -1
  9. package/dist/{chunk-7YZF3THS.mjs → chunk-BHZAQZYP.mjs} +1 -1
  10. package/dist/{chunk-KMUDF36P.mjs → chunk-JIQQKKLO.mjs} +1 -1
  11. package/dist/{chunk-S45XMWVD.mjs → chunk-JMQ6V54O.mjs} +1 -1
  12. package/dist/{chunk-CGK6IVLN.mjs → chunk-OLUNPPBR.mjs} +1 -1
  13. package/dist/{chunk-IINWRJA6.mjs → chunk-RVOPC44F.mjs} +27 -27
  14. package/dist/{chunk-UNM3LPTG.mjs → chunk-YM4QJC6Y.mjs} +24 -11
  15. package/dist/{chunk-JELVERJM.mjs → chunk-ZJA7VBUR.mjs} +6 -2
  16. package/dist/{customer-group-list-GPIKR66X.mjs → customer-group-list-D26UKQMR.mjs} +1 -1
  17. package/dist/{inventory-detail-5433AAQ2.mjs → inventory-detail-QHL7TJFZ.mjs} +1 -1
  18. package/dist/location-list-62KBWY4T.mjs +316 -0
  19. package/dist/{location-sales-channels-2BOIPBBG.mjs → location-sales-channels-O5XLIPAR.mjs} +1 -1
  20. package/dist/{order-list-ZCMNSZYB.mjs → order-list-73DBATIK.mjs} +2 -2
  21. package/dist/{product-attributes-ZZPEBDCK.mjs → product-attributes-FQDJCNUB.mjs} +3 -3
  22. package/dist/{product-create-FCDCIDCH.mjs → product-create-W37RQLON.mjs} +4 -4
  23. package/dist/{product-detail-2ZUONC23.mjs → product-detail-TANIKAEK.mjs} +4 -4
  24. package/dist/{product-edit-G3Z6FCN6.mjs → product-edit-DO76GHBI.mjs} +3 -3
  25. package/dist/{product-list-WGX66SGI.mjs → product-list-KJ3HXPLB.mjs} +2 -2
  26. package/dist/{product-media-APQKPFTT.mjs → product-media-VG4YM2W6.mjs} +2 -2
  27. package/dist/{product-organization-BYT4TKMZ.mjs → product-organization-OOVUGXNP.mjs} +3 -3
  28. package/dist/{product-sales-channels-UGPAXFAV.mjs → product-sales-channels-QEJRSCAU.mjs} +1 -1
  29. package/dist/{product-shipping-profile-YDN4X6S2.mjs → product-shipping-profile-FFMKOF6B.mjs} +3 -3
  30. package/dist/{promotion-detail-6ZD7Z6BF.mjs → promotion-detail-GONXLJZ2.mjs} +112 -63
  31. package/dist/{promotion-list-GI64LDWI.mjs → promotion-list-NNEMVJ6I.mjs} +3 -3
  32. package/dist/{reset-password-SXA6YKTJ.mjs → reset-password-ANJHGYUE.mjs} +1 -1
  33. package/dist/{sales-channel-list-ADIJMXNV.mjs → sales-channel-list-LKVHXUXW.mjs} +1 -1
  34. package/dist/{tax-region-create-W3K5IFD3.mjs → tax-region-create-IWM4755I.mjs} +1 -1
  35. package/dist/{user-list-3YFYZFSK.mjs → user-list-MKJLB5CQ.mjs} +1 -1
  36. package/package.json +9 -9
  37. package/src/components/data-table/data-table.tsx +64 -46
  38. package/src/i18n/translations/$schema.json +90 -67
  39. package/src/i18n/translations/en.json +6 -2
  40. package/src/routes/locations/location-list/index.ts +0 -1
  41. package/src/routes/locations/location-list/location-list.tsx +51 -19
  42. package/src/routes/locations/location-list/use-location-list-table-columns.tsx +185 -0
  43. package/src/routes/locations/location-list/use-location-list-table-query.tsx +22 -0
  44. package/dist/chunk-BKJC5BGQ.mjs +0 -53
  45. package/dist/location-list-BKK2PAKF.mjs +0 -297
  46. package/src/routes/locations/location-list/components/location-list-header/index.ts +0 -1
  47. package/src/routes/locations/location-list/components/location-list-header/location-list-header.tsx +0 -21
  48. package/src/routes/locations/location-list/loader.ts +0 -36
@@ -1,12 +1,9 @@
1
- import {
2
- BadgeListSummary
3
- } from "./chunk-BKJC5BGQ.mjs";
4
1
  import {
5
2
  DateRangeDisplay
6
3
  } from "./chunk-VAIHVNV6.mjs";
7
4
  import {
8
5
  getPromotionStatus
9
- } from "./chunk-KMUDF36P.mjs";
6
+ } from "./chunk-JIQQKKLO.mjs";
10
7
  import {
11
8
  formatPercentage
12
9
  } from "./chunk-4FM6S5CX.mjs";
@@ -21,7 +18,7 @@ import {
21
18
  } from "./chunk-2RQLKDBF.mjs";
22
19
  import "./chunk-PFKKVLZX.mjs";
23
20
  import "./chunk-4GQOUCX6.mjs";
24
- import "./chunk-JELVERJM.mjs";
21
+ import "./chunk-ZJA7VBUR.mjs";
25
22
  import {
26
23
  useExtension
27
24
  } from "./chunk-C5P5PL3E.mjs";
@@ -179,13 +176,65 @@ var CampaignSection = ({
179
176
 
180
177
  // src/routes/promotions/promotion-detail/components/promotion-conditions-section/promotion-conditions-section.tsx
181
178
  import { PencilSquare as PencilSquare2 } from "@medusajs/icons";
182
- import { Badge, Container as Container2, Heading as Heading2 } from "@medusajs/ui";
179
+ import { Badge as Badge2, Container as Container2, Heading as Heading2 } from "@medusajs/ui";
180
+ import { useTranslation as useTranslation3 } from "react-i18next";
181
+
182
+ // src/components/common/badge-list-summary/badge-list-summary.tsx
183
+ import { Badge, Tooltip, clx } from "@medusajs/ui";
183
184
  import { useTranslation as useTranslation2 } from "react-i18next";
184
185
  import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
186
+ var BadgeListSummary = ({
187
+ list,
188
+ className,
189
+ inline,
190
+ rounded = false,
191
+ n = 2
192
+ }) => {
193
+ const { t } = useTranslation2();
194
+ const title = t("general.plusCount", {
195
+ count: list.length - n
196
+ });
197
+ return /* @__PURE__ */ jsxs2(
198
+ "div",
199
+ {
200
+ className: clx(
201
+ "text-ui-fg-subtle txt-compact-small gap-x-2 overflow-hidden",
202
+ {
203
+ "inline-flex": inline,
204
+ flex: !inline
205
+ },
206
+ className
207
+ ),
208
+ children: [
209
+ list.slice(0, n).map((item) => {
210
+ return /* @__PURE__ */ jsx3(Badge, { rounded: rounded ? "full" : "base", size: "2xsmall", children: item }, item);
211
+ }),
212
+ list.length > n && /* @__PURE__ */ jsx3("div", { className: "whitespace-nowrap", children: /* @__PURE__ */ jsx3(
213
+ Tooltip,
214
+ {
215
+ content: /* @__PURE__ */ jsx3("ul", { children: list.slice(n).map((c) => /* @__PURE__ */ jsx3("li", { children: c }, c)) }),
216
+ children: /* @__PURE__ */ jsx3(
217
+ Badge,
218
+ {
219
+ rounded: rounded ? "full" : "base",
220
+ size: "2xsmall",
221
+ className: "cursor-default whitespace-nowrap",
222
+ children: title
223
+ }
224
+ )
225
+ }
226
+ ) })
227
+ ]
228
+ }
229
+ );
230
+ };
231
+
232
+ // src/routes/promotions/promotion-detail/components/promotion-conditions-section/promotion-conditions-section.tsx
233
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
185
234
  function RuleBlock({ rule }) {
186
- return /* @__PURE__ */ jsx3("div", { className: "bg-ui-bg-subtle shadow-borders-base align-center flex justify-around rounded-md p-2", children: /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle txt-compact-xsmall flex items-center whitespace-nowrap", children: [
187
- /* @__PURE__ */ jsx3(
188
- Badge,
235
+ return /* @__PURE__ */ jsx4("div", { className: "bg-ui-bg-subtle shadow-borders-base align-center flex justify-around rounded-md p-2", children: /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle txt-compact-xsmall flex items-center whitespace-nowrap", children: [
236
+ /* @__PURE__ */ jsx4(
237
+ Badge2,
189
238
  {
190
239
  size: "2xsmall",
191
240
  className: "txt-compact-xsmall-plus tag-neutral-text mx-1 inline-block truncate",
@@ -193,8 +242,8 @@ function RuleBlock({ rule }) {
193
242
  },
194
243
  "rule-attribute"
195
244
  ),
196
- /* @__PURE__ */ jsx3("span", { className: "txt-compact-2xsmall mx-1 inline-block", children: rule.operator_label }),
197
- /* @__PURE__ */ jsx3(
245
+ /* @__PURE__ */ jsx4("span", { className: "txt-compact-2xsmall mx-1 inline-block", children: rule.operator_label }),
246
+ /* @__PURE__ */ jsx4(
198
247
  BadgeListSummary,
199
248
  {
200
249
  inline: true,
@@ -209,20 +258,20 @@ var PromotionConditionsSection = ({
209
258
  ruleType,
210
259
  applicationMethodTargetType
211
260
  }) => {
212
- const { t } = useTranslation2();
213
- return /* @__PURE__ */ jsxs2(Container2, { className: "p-0", children: [
214
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-4", children: [
215
- /* @__PURE__ */ jsx3("div", { className: "flex flex-col", children: /* @__PURE__ */ jsx3(Heading2, { children: t(
261
+ const { t } = useTranslation3();
262
+ return /* @__PURE__ */ jsxs3(Container2, { className: "p-0", children: [
263
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between px-6 py-4", children: [
264
+ /* @__PURE__ */ jsx4("div", { className: "flex flex-col", children: /* @__PURE__ */ jsx4(Heading2, { children: t(
216
265
  ruleType === "target-rules" ? `promotions.fields.conditions.${ruleType}.${applicationMethodTargetType}.title` : `promotions.fields.conditions.${ruleType}.title`
217
266
  ) }) }),
218
- /* @__PURE__ */ jsx3(
267
+ /* @__PURE__ */ jsx4(
219
268
  ActionMenu,
220
269
  {
221
270
  groups: [
222
271
  {
223
272
  actions: [
224
273
  {
225
- icon: /* @__PURE__ */ jsx3(PencilSquare2, {}),
274
+ icon: /* @__PURE__ */ jsx4(PencilSquare2, {}),
226
275
  label: t("actions.edit"),
227
276
  to: `${ruleType}/edit`
228
277
  }
@@ -232,8 +281,8 @@ var PromotionConditionsSection = ({
232
281
  }
233
282
  )
234
283
  ] }),
235
- /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle flex flex-col gap-2 px-6 pb-4 pt-2", children: [
236
- !rules.length && /* @__PURE__ */ jsx3(
284
+ /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle flex flex-col gap-2 px-6 pb-4 pt-2", children: [
285
+ !rules.length && /* @__PURE__ */ jsx4(
237
286
  NoRecords,
238
287
  {
239
288
  className: "h-[180px]",
@@ -246,7 +295,7 @@ var PromotionConditionsSection = ({
246
295
  buttonVariant: "transparentIconLeft"
247
296
  }
248
297
  ),
249
- rules.map((rule) => /* @__PURE__ */ jsx3(RuleBlock, { rule }, `${rule.id}-${rule.attribute}`))
298
+ rules.map((rule) => /* @__PURE__ */ jsx4(RuleBlock, { rule }, `${rule.id}-${rule.attribute}`))
250
299
  ] })
251
300
  ] });
252
301
  };
@@ -254,7 +303,7 @@ var PromotionConditionsSection = ({
254
303
  // src/routes/promotions/promotion-detail/components/promotion-general-section/promotion-general-section.tsx
255
304
  import { PencilSquare as PencilSquare3, Trash } from "@medusajs/icons";
256
305
  import {
257
- Badge as Badge2,
306
+ Badge as Badge3,
258
307
  Container as Container3,
259
308
  Copy,
260
309
  Heading as Heading3,
@@ -262,9 +311,9 @@ import {
262
311
  Text as Text2,
263
312
  usePrompt
264
313
  } from "@medusajs/ui";
265
- import { useTranslation as useTranslation3 } from "react-i18next";
314
+ import { useTranslation as useTranslation4 } from "react-i18next";
266
315
  import { useNavigate } from "react-router-dom";
267
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
316
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
268
317
  function getDisplayValue(promotion) {
269
318
  const value = promotion.application_method?.value;
270
319
  if (!value) {
@@ -284,7 +333,7 @@ function getDisplayValue(promotion) {
284
333
  var PromotionGeneralSection = ({
285
334
  promotion
286
335
  }) => {
287
- const { t } = useTranslation3();
336
+ const { t } = useTranslation4();
288
337
  const prompt = usePrompt();
289
338
  const navigate = useNavigate();
290
339
  const { mutateAsync } = useDeletePromotion(promotion.id);
@@ -310,19 +359,19 @@ var PromotionGeneralSection = ({
310
359
  };
311
360
  const [color, text] = getPromotionStatus(promotion);
312
361
  const displayValue = getDisplayValue(promotion);
313
- return /* @__PURE__ */ jsxs3(Container3, { className: "divide-y p-0", children: [
314
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between px-6 py-4", children: [
315
- /* @__PURE__ */ jsx4("div", { className: "flex flex-col", children: /* @__PURE__ */ jsx4(Heading3, { children: promotion.code }) }),
316
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-x-2", children: [
317
- /* @__PURE__ */ jsx4(StatusBadge, { color, children: text }),
318
- /* @__PURE__ */ jsx4(
362
+ return /* @__PURE__ */ jsxs4(Container3, { className: "divide-y p-0", children: [
363
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between px-6 py-4", children: [
364
+ /* @__PURE__ */ jsx5("div", { className: "flex flex-col", children: /* @__PURE__ */ jsx5(Heading3, { children: promotion.code }) }),
365
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-x-2", children: [
366
+ /* @__PURE__ */ jsx5(StatusBadge, { color, children: text }),
367
+ /* @__PURE__ */ jsx5(
319
368
  ActionMenu,
320
369
  {
321
370
  groups: [
322
371
  {
323
372
  actions: [
324
373
  {
325
- icon: /* @__PURE__ */ jsx4(PencilSquare3, {}),
374
+ icon: /* @__PURE__ */ jsx5(PencilSquare3, {}),
326
375
  label: t("actions.edit"),
327
376
  to: `/promotions/${promotion.id}/edit`
328
377
  }
@@ -331,7 +380,7 @@ var PromotionGeneralSection = ({
331
380
  {
332
381
  actions: [
333
382
  {
334
- icon: /* @__PURE__ */ jsx4(Trash, {}),
383
+ icon: /* @__PURE__ */ jsx5(Trash, {}),
335
384
  label: t("actions.delete"),
336
385
  onClick: handleDelete
337
386
  }
@@ -342,20 +391,20 @@ var PromotionGeneralSection = ({
342
391
  )
343
392
  ] })
344
393
  ] }),
345
- /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
346
- /* @__PURE__ */ jsx4(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.campaign") }),
347
- /* @__PURE__ */ jsx4(Text2, { size: "small", leading: "compact", className: "text-pretty", children: promotion.is_automatic ? t("promotions.form.method.automatic.title") : t("promotions.form.method.code.title") })
394
+ /* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
395
+ /* @__PURE__ */ jsx5(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.campaign") }),
396
+ /* @__PURE__ */ jsx5(Text2, { size: "small", leading: "compact", className: "text-pretty", children: promotion.is_automatic ? t("promotions.form.method.automatic.title") : t("promotions.form.method.code.title") })
348
397
  ] }),
349
- /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
350
- /* @__PURE__ */ jsx4(Text2, { size: "small", weight: "plus", leading: "compact", children: t("fields.code") }),
351
- /* @__PURE__ */ jsx4(
398
+ /* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
399
+ /* @__PURE__ */ jsx5(Text2, { size: "small", weight: "plus", leading: "compact", children: t("fields.code") }),
400
+ /* @__PURE__ */ jsx5(
352
401
  Copy,
353
402
  {
354
403
  content: promotion.code,
355
404
  className: "text-ui-tag-neutral-text",
356
405
  asChild: true,
357
- children: /* @__PURE__ */ jsx4(
358
- Badge2,
406
+ children: /* @__PURE__ */ jsx5(
407
+ Badge3,
359
408
  {
360
409
  size: "2xsmall",
361
410
  rounded: "full",
@@ -366,30 +415,30 @@ var PromotionGeneralSection = ({
366
415
  }
367
416
  )
368
417
  ] }),
369
- /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
370
- /* @__PURE__ */ jsx4(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.type") }),
371
- /* @__PURE__ */ jsx4(Text2, { size: "small", leading: "compact", className: "text-pretty capitalize", children: promotion.type })
418
+ /* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
419
+ /* @__PURE__ */ jsx5(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.type") }),
420
+ /* @__PURE__ */ jsx5(Text2, { size: "small", leading: "compact", className: "text-pretty capitalize", children: promotion.type })
372
421
  ] }),
373
- /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
374
- /* @__PURE__ */ jsx4(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.value") }),
375
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-x-2", children: [
376
- /* @__PURE__ */ jsx4(Text2, { className: "inline", size: "small", leading: "compact", children: displayValue || "-" }),
377
- promotion?.application_method?.type === "fixed" && /* @__PURE__ */ jsx4(Badge2, { size: "2xsmall", rounded: "full", children: promotion?.application_method?.currency_code?.toUpperCase() })
422
+ /* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
423
+ /* @__PURE__ */ jsx5(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.value") }),
424
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-x-2", children: [
425
+ /* @__PURE__ */ jsx5(Text2, { className: "inline", size: "small", leading: "compact", children: displayValue || "-" }),
426
+ promotion?.application_method?.type === "fixed" && /* @__PURE__ */ jsx5(Badge3, { size: "2xsmall", rounded: "full", children: promotion?.application_method?.currency_code?.toUpperCase() })
378
427
  ] })
379
428
  ] }),
380
- /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
381
- /* @__PURE__ */ jsx4(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.allocation") }),
382
- /* @__PURE__ */ jsx4(Text2, { size: "small", leading: "compact", className: "text-pretty capitalize", children: promotion.application_method?.allocation })
429
+ /* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
430
+ /* @__PURE__ */ jsx5(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.allocation") }),
431
+ /* @__PURE__ */ jsx5(Text2, { size: "small", leading: "compact", className: "text-pretty capitalize", children: promotion.application_method?.allocation })
383
432
  ] }),
384
- promotion.application_method?.type === "fixed" && /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
385
- /* @__PURE__ */ jsx4(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.taxInclusive") }),
386
- /* @__PURE__ */ jsx4("div", { className: "flex items-center gap-x-2", children: /* @__PURE__ */ jsx4(Text2, { className: "inline", size: "small", leading: "compact", children: promotion.is_tax_inclusive ? t("fields.true") : t("fields.false") }) })
433
+ promotion.application_method?.type === "fixed" && /* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
434
+ /* @__PURE__ */ jsx5(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.taxInclusive") }),
435
+ /* @__PURE__ */ jsx5("div", { className: "flex items-center gap-x-2", children: /* @__PURE__ */ jsx5(Text2, { className: "inline", size: "small", leading: "compact", children: promotion.is_tax_inclusive ? t("fields.true") : t("fields.false") }) })
387
436
  ] })
388
437
  ] });
389
438
  };
390
439
 
391
440
  // src/routes/promotions/promotion-detail/promotion-detail.tsx
392
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
441
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
393
442
  var PromotionDetail = () => {
394
443
  const initialData = useLoaderData();
395
444
  const { id } = useParams2();
@@ -403,9 +452,9 @@ var PromotionDetail = () => {
403
452
  const { rules: buyRules } = usePromotionRules(id, "buy-rules", query);
404
453
  const { getWidgets } = useExtension();
405
454
  if (isLoading || !promotion) {
406
- return /* @__PURE__ */ jsx5(TwoColumnPageSkeleton, { mainSections: 3, sidebarSections: 1, showJSON: true });
455
+ return /* @__PURE__ */ jsx6(TwoColumnPageSkeleton, { mainSections: 3, sidebarSections: 1, showJSON: true });
407
456
  }
408
- return /* @__PURE__ */ jsxs4(
457
+ return /* @__PURE__ */ jsxs5(
409
458
  TwoColumnPage,
410
459
  {
411
460
  data: promotion,
@@ -418,10 +467,10 @@ var PromotionDetail = () => {
418
467
  hasOutlet: true,
419
468
  showJSON: true,
420
469
  children: [
421
- /* @__PURE__ */ jsxs4(TwoColumnPage.Main, { children: [
422
- /* @__PURE__ */ jsx5(PromotionGeneralSection, { promotion }),
423
- /* @__PURE__ */ jsx5(PromotionConditionsSection, { rules: rules || [], ruleType: "rules" }),
424
- /* @__PURE__ */ jsx5(
470
+ /* @__PURE__ */ jsxs5(TwoColumnPage.Main, { children: [
471
+ /* @__PURE__ */ jsx6(PromotionGeneralSection, { promotion }),
472
+ /* @__PURE__ */ jsx6(PromotionConditionsSection, { rules: rules || [], ruleType: "rules" }),
473
+ /* @__PURE__ */ jsx6(
425
474
  PromotionConditionsSection,
426
475
  {
427
476
  rules: targetRules || [],
@@ -429,7 +478,7 @@ var PromotionDetail = () => {
429
478
  applicationMethodTargetType: promotion.application_method.target_type || "items"
430
479
  }
431
480
  ),
432
- promotion.type === "buyget" && /* @__PURE__ */ jsx5(
481
+ promotion.type === "buyget" && /* @__PURE__ */ jsx6(
433
482
  PromotionConditionsSection,
434
483
  {
435
484
  rules: buyRules || [],
@@ -438,7 +487,7 @@ var PromotionDetail = () => {
438
487
  }
439
488
  )
440
489
  ] }),
441
- /* @__PURE__ */ jsx5(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx5(CampaignSection, { campaign: promotion.campaign }) })
490
+ /* @__PURE__ */ jsx6(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx6(CampaignSection, { campaign: promotion.campaign }) })
442
491
  ]
443
492
  }
444
493
  );
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  usePromotionTableColumns,
3
3
  usePromotionTableQuery
4
- } from "./chunk-7YZF3THS.mjs";
5
- import "./chunk-KMUDF36P.mjs";
4
+ } from "./chunk-BHZAQZYP.mjs";
5
+ import "./chunk-JIQQKKLO.mjs";
6
6
  import "./chunk-MSDRGCRR.mjs";
7
7
  import "./chunk-ADOCJB6L.mjs";
8
8
  import "./chunk-LQTHYS2Z.mjs";
@@ -25,7 +25,7 @@ import {
25
25
  import "./chunk-C76H5USB.mjs";
26
26
  import "./chunk-PFKKVLZX.mjs";
27
27
  import "./chunk-4GQOUCX6.mjs";
28
- import "./chunk-JELVERJM.mjs";
28
+ import "./chunk-ZJA7VBUR.mjs";
29
29
  import {
30
30
  useExtension
31
31
  } from "./chunk-C5P5PL3E.mjs";
@@ -3,7 +3,7 @@ import "./chunk-EQTBJSBZ.mjs";
3
3
  import "./chunk-4GQOUCX6.mjs";
4
4
  import {
5
5
  i18n
6
- } from "./chunk-JELVERJM.mjs";
6
+ } from "./chunk-ZJA7VBUR.mjs";
7
7
  import {
8
8
  Form
9
9
  } from "./chunk-OBQI23QM.mjs";
@@ -11,7 +11,7 @@ import "./chunk-2D44OO7A.mjs";
11
11
  import "./chunk-Q33G337Z.mjs";
12
12
  import {
13
13
  DataTable
14
- } from "./chunk-UNM3LPTG.mjs";
14
+ } from "./chunk-YM4QJC6Y.mjs";
15
15
  import "./chunk-C76H5USB.mjs";
16
16
  import "./chunk-PFKKVLZX.mjs";
17
17
  import {
@@ -24,7 +24,7 @@ import {
24
24
  import "./chunk-4GQOUCX6.mjs";
25
25
  import {
26
26
  i18n
27
- } from "./chunk-JELVERJM.mjs";
27
+ } from "./chunk-ZJA7VBUR.mjs";
28
28
  import "./chunk-DG7J63J2.mjs";
29
29
  import {
30
30
  Form
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-Q33G337Z.mjs";
10
10
  import {
11
11
  DataTable
12
- } from "./chunk-UNM3LPTG.mjs";
12
+ } from "./chunk-YM4QJC6Y.mjs";
13
13
  import {
14
14
  useQueryParams
15
15
  } from "./chunk-C76H5USB.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/dashboard",
3
- "version": "2.10.4-snapshot-20250922165717",
3
+ "version": "2.10.4-snapshot-20250923121159",
4
4
  "scripts": {
5
5
  "generate:static": "node ./scripts/generate-currencies.js && prettier --write ./src/lib/currencies.ts",
6
6
  "dev": "vite",
@@ -45,10 +45,10 @@
45
45
  "@dnd-kit/utilities": "^3.2.2",
46
46
  "@hookform/error-message": "^2.0.1",
47
47
  "@hookform/resolvers": "3.4.2",
48
- "@medusajs/admin-shared": "2.10.4-snapshot-20250922165717",
49
- "@medusajs/icons": "2.10.4-snapshot-20250922165717",
50
- "@medusajs/js-sdk": "2.10.4-snapshot-20250922165717",
51
- "@medusajs/ui": "4.0.24-snapshot-20250922165717",
48
+ "@medusajs/admin-shared": "2.10.4-snapshot-20250923121159",
49
+ "@medusajs/icons": "2.10.4-snapshot-20250923121159",
50
+ "@medusajs/js-sdk": "2.10.4-snapshot-20250923121159",
51
+ "@medusajs/ui": "4.0.24-snapshot-20250923121159",
52
52
  "@radix-ui/react-dialog": "1.1.4",
53
53
  "@radix-ui/react-dismissable-layer": "1.1.4",
54
54
  "@tanstack/react-query": "5.64.2",
@@ -78,10 +78,10 @@
78
78
  "zod": "3.25.76"
79
79
  },
80
80
  "devDependencies": {
81
- "@medusajs/admin-shared": "2.10.4-snapshot-20250922165717",
82
- "@medusajs/admin-vite-plugin": "2.10.4-snapshot-20250922165717",
83
- "@medusajs/types": "2.10.4-snapshot-20250922165717",
84
- "@medusajs/ui-preset": "2.10.4-snapshot-20250922165717",
81
+ "@medusajs/admin-shared": "2.10.4-snapshot-20250923121159",
82
+ "@medusajs/admin-vite-plugin": "2.10.4-snapshot-20250923121159",
83
+ "@medusajs/types": "2.10.4-snapshot-20250923121159",
84
+ "@medusajs/ui-preset": "2.10.4-snapshot-20250923121159",
85
85
  "@types/node": "^20.11.15",
86
86
  "@types/react": "^18.2.79",
87
87
  "@types/react-dom": "^18.2.25",
@@ -31,26 +31,26 @@ type DataTableActionProps = {
31
31
  label: string
32
32
  disabled?: boolean
33
33
  } & (
34
- | {
34
+ | {
35
35
  to: string
36
36
  }
37
- | {
37
+ | {
38
38
  onClick: () => void
39
39
  }
40
- )
40
+ )
41
41
 
42
42
  type DataTableActionMenuActionProps = {
43
43
  label: string
44
44
  icon: ReactNode
45
45
  disabled?: boolean
46
46
  } & (
47
- | {
47
+ | {
48
48
  to: string
49
49
  }
50
- | {
50
+ | {
51
51
  onClick: () => void
52
52
  }
53
- )
53
+ )
54
54
 
55
55
  type DataTableActionMenuGroupProps = {
56
56
  actions: DataTableActionMenuActionProps[]
@@ -138,15 +138,18 @@ export const DataTable = <TData,>({
138
138
  const isViewConfigEnabled = useFeatureFlag("view_configurations")
139
139
 
140
140
  // If view config is disabled, don't use column visibility features
141
- const effectiveEnableColumnVisibility = isViewConfigEnabled && enableColumnVisibility
141
+ const effectiveEnableColumnVisibility =
142
+ isViewConfigEnabled && enableColumnVisibility
142
143
  const effectiveEnableViewSelector = isViewConfigEnabled && enableViewSelector
143
144
 
144
145
  const enableFiltering = filters && filters.length > 0
145
- const showFilterMenu = enableFilterMenu !== undefined ? enableFilterMenu : enableFiltering
146
+ const showFilterMenu =
147
+ enableFilterMenu !== undefined ? enableFilterMenu : enableFiltering
146
148
  const enableCommands = commands && commands.length > 0
147
149
  const enableSorting = columns.some((column) => column.enableSorting)
148
150
 
149
- const [columnVisibility, setColumnVisibility] = React.useState<VisibilityState>(initialColumnVisibility)
151
+ const [columnVisibility, setColumnVisibility] =
152
+ React.useState<VisibilityState>(initialColumnVisibility)
150
153
 
151
154
  // Update column visibility when initial visibility changes
152
155
  React.useEffect(() => {
@@ -154,9 +157,12 @@ export const DataTable = <TData,>({
154
157
  const currentKeys = Object.keys(columnVisibility).sort()
155
158
  const newKeys = Object.keys(initialColumnVisibility).sort()
156
159
 
157
- const hasChanged = currentKeys.length !== newKeys.length ||
160
+ const hasChanged =
161
+ currentKeys.length !== newKeys.length ||
158
162
  currentKeys.some((key, index) => key !== newKeys[index]) ||
159
- Object.entries(initialColumnVisibility).some(([key, value]) => columnVisibility[key] !== value)
163
+ Object.entries(initialColumnVisibility).some(
164
+ ([key, value]) => columnVisibility[key] !== value
165
+ )
160
166
 
161
167
  if (hasChanged) {
162
168
  setColumnVisibility(initialColumnVisibility)
@@ -164,10 +170,13 @@ export const DataTable = <TData,>({
164
170
  }, [initialColumnVisibility])
165
171
 
166
172
  // Wrapper function to handle column visibility changes
167
- const handleColumnVisibilityChange = React.useCallback((visibility: VisibilityState) => {
168
- setColumnVisibility(visibility)
169
- onColumnVisibilityChange?.(visibility)
170
- }, [onColumnVisibilityChange])
173
+ const handleColumnVisibilityChange = React.useCallback(
174
+ (visibility: VisibilityState) => {
175
+ setColumnVisibility(visibility)
176
+ onColumnVisibilityChange?.(visibility)
177
+ },
178
+ [onColumnVisibilityChange]
179
+ )
171
180
 
172
181
  // Extract filter IDs for query param management
173
182
  const filterIds = useMemo(() => filters?.map((f) => f.id) ?? [], [filters])
@@ -231,7 +240,7 @@ export const DataTable = <TData,>({
231
240
  Array.from(prev.keys()).forEach((key) => {
232
241
  if (prefixedFilterIds.includes(key)) {
233
242
  // Extract the unprefixed key
234
- const unprefixedKey = prefix ? key.replace(`${prefix}_`, '') : key
243
+ const unprefixedKey = prefix ? key.replace(`${prefix}_`, "") : key
235
244
  if (!(unprefixedKey in value)) {
236
245
  prev.delete(key)
237
246
  }
@@ -257,11 +266,14 @@ export const DataTable = <TData,>({
257
266
  }, [order])
258
267
 
259
268
  // Memoize current configuration to prevent infinite loops
260
- const currentConfiguration = useMemo(() => ({
261
- filters: filtering,
262
- sorting: sorting,
263
- search: search,
264
- }), [filtering, sorting, search])
269
+ const currentConfiguration = useMemo(
270
+ () => ({
271
+ filters: filtering,
272
+ sorting: sorting,
273
+ search: search,
274
+ }),
275
+ [filtering, sorting, search]
276
+ )
265
277
 
266
278
  const handleSortingChange = (value: DataTableSortingState) => {
267
279
  setSearchParams((prev) => {
@@ -315,42 +327,43 @@ export const DataTable = <TData,>({
315
327
  onRowClick: rowHref ? onRowClick : undefined,
316
328
  pagination: enablePagination
317
329
  ? {
318
- state: pagination,
319
- onPaginationChange: handlePaginationChange,
320
- }
330
+ state: pagination,
331
+ onPaginationChange: handlePaginationChange,
332
+ }
321
333
  : undefined,
322
334
  filtering: enableFiltering
323
335
  ? {
324
- state: filtering,
325
- onFilteringChange: handleFilteringChange,
326
- }
336
+ state: filtering,
337
+ onFilteringChange: handleFilteringChange,
338
+ }
327
339
  : undefined,
328
340
  sorting: enableSorting
329
341
  ? {
330
- state: sorting,
331
- onSortingChange: handleSortingChange,
332
- }
342
+ state: sorting,
343
+ onSortingChange: handleSortingChange,
344
+ }
333
345
  : undefined,
334
346
  search: enableSearch
335
347
  ? {
336
- state: search,
337
- onSearchChange: handleSearchChange,
338
- }
348
+ state: search,
349
+ onSearchChange: handleSearchChange,
350
+ }
339
351
  : undefined,
340
352
  rowSelection,
341
353
  isLoading,
342
354
  columnVisibility: effectiveEnableColumnVisibility
343
355
  ? {
344
- state: columnVisibility,
345
- onColumnVisibilityChange: handleColumnVisibilityChange,
346
- }
347
- : undefined,
348
- columnOrder: effectiveEnableColumnVisibility && columnOrder && onColumnOrderChange
349
- ? {
350
- state: columnOrder,
351
- onColumnOrderChange: onColumnOrderChange,
352
- }
356
+ state: columnVisibility,
357
+ onColumnVisibilityChange: handleColumnVisibilityChange,
358
+ }
353
359
  : undefined,
360
+ columnOrder:
361
+ effectiveEnableColumnVisibility && columnOrder && onColumnOrderChange
362
+ ? {
363
+ state: columnOrder,
364
+ onColumnOrderChange: onColumnOrderChange,
365
+ }
366
+ : undefined,
354
367
  })
355
368
 
356
369
  const shouldRenderHeading = heading || subHeading
@@ -358,7 +371,9 @@ export const DataTable = <TData,>({
358
371
  return (
359
372
  <UiDataTable
360
373
  instance={instance}
361
- className={layout === "fill" ? "h-full [&_tr]:last-of-type:!border-b" : undefined}
374
+ className={
375
+ layout === "fill" ? "h-full [&_tr]:last-of-type:!border-b" : undefined
376
+ }
362
377
  >
363
378
  <UiDataTable.Toolbar
364
379
  className="flex flex-col items-start justify-between gap-2 md:flex-row md:items-center"
@@ -397,7 +412,9 @@ export const DataTable = <TData,>({
397
412
  </div>
398
413
  )}
399
414
  {actionMenu && <ActionMenu variant="primary" {...actionMenu} />}
400
- {actions && actions.length > 0 && <DataTableActions actions={actions} />}
415
+ {actions && actions.length > 0 && (
416
+ <DataTableActions actions={actions} />
417
+ )}
401
418
  {!actions && action && <DataTableAction {...action} />}
402
419
  </div>
403
420
  </div>
@@ -407,7 +424,9 @@ export const DataTable = <TData,>({
407
424
  <UiDataTable.Pagination translations={paginationTranslations} />
408
425
  )}
409
426
  {enableCommands && (
410
- <UiDataTable.CommandBar selectedLabel={(count) => `${count} selected`} />
427
+ <UiDataTable.CommandBar
428
+ selectedLabel={(count) => `${count} selected`}
429
+ />
411
430
  )}
412
431
  </UiDataTable>
413
432
  )
@@ -520,4 +539,3 @@ const DataTableActions = ({ actions }: { actions: DataTableActionProps[] }) => {
520
539
  </div>
521
540
  )
522
541
  }
523
-