@medusajs/dashboard 2.11.3-snapshot-20251103115905 → 2.11.4-snapshot-20251105174837

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 (110) hide show
  1. package/dist/{add-campaign-promotions-ZUJD7HBF.mjs → add-campaign-promotions-LEOARUW3.mjs} +4 -4
  2. package/dist/{api-key-management-detail-MFQTHUN6.mjs → api-key-management-detail-RLTUSE44.mjs} +5 -5
  3. package/dist/{api-key-management-list-22GXXJUC.mjs → api-key-management-list-4KEBDRVQ.mjs} +5 -5
  4. package/dist/{api-key-management-sales-channels-MV6FMA4C.mjs → api-key-management-sales-channels-IGRPAJJ2.mjs} +5 -5
  5. package/dist/app.js +3672 -424
  6. package/dist/app.mjs +3 -3
  7. package/dist/{campaign-detail-IKHUALTL.mjs → campaign-detail-VM2EHCYQ.mjs} +5 -5
  8. package/dist/{campaign-list-3452F4Y6.mjs → campaign-list-XRDVPCXE.mjs} +6 -6
  9. package/dist/{category-detail-D4PYJJGJ.mjs → category-detail-ZXA36JL5.mjs} +4 -4
  10. package/dist/{category-list-MLLB5U6K.mjs → category-list-AI2IGO67.mjs} +4 -4
  11. package/dist/{category-products-K5INZSSV.mjs → category-products-Z5LZJ32F.mjs} +4 -4
  12. package/dist/{chunk-PFKKVLZX.mjs → chunk-3OGLDF4U.mjs} +1 -1
  13. package/dist/{chunk-PJ5EUKOB.mjs → chunk-43WSJSKM.mjs} +1 -1
  14. package/dist/{chunk-Q33G337Z.mjs → chunk-6WFWT22M.mjs} +1 -1
  15. package/dist/{chunk-2D44OO7A.mjs → chunk-76FLG6KU.mjs} +1 -1
  16. package/dist/{chunk-IVZ6BMDB.mjs → chunk-A4C2VYJH.mjs} +1 -1
  17. package/dist/{chunk-SJ3E4T6B.mjs → chunk-BBLXCYME.mjs} +1 -1
  18. package/dist/{chunk-XXROCJ7D.mjs → chunk-BT4EIAAA.mjs} +3 -3
  19. package/dist/{chunk-FKIOYL3D.mjs → chunk-CB3UMLV2.mjs} +1 -1
  20. package/dist/{chunk-PYIPIUAY.mjs → chunk-E2J2KSDG.mjs} +3323 -91
  21. package/dist/{chunk-VAIHVNV6.mjs → chunk-EZNWSOIF.mjs} +1 -1
  22. package/dist/{chunk-ORMX5RJQ.mjs → chunk-F7E4I7W6.mjs} +1 -1
  23. package/dist/{chunk-ZUUKLYH4.mjs → chunk-IFICCCPS.mjs} +1 -1
  24. package/dist/{chunk-2WZUO66T.mjs → chunk-L7BOZCK7.mjs} +1 -1
  25. package/dist/{chunk-67ORSRVT.mjs → chunk-MHC2COUJ.mjs} +7 -0
  26. package/dist/{chunk-Y2XQE25L.mjs → chunk-N32YWZXM.mjs} +2 -2
  27. package/dist/{chunk-QXXHLVRQ.mjs → chunk-NJ6OPV6N.mjs} +1 -1
  28. package/dist/{chunk-TUCPFNIY.mjs → chunk-QPMPMKGJ.mjs} +3 -3
  29. package/dist/{chunk-VWXNC2B5.mjs → chunk-R7OR4HQQ.mjs} +1 -1
  30. package/dist/{chunk-S34JJVBQ.mjs → chunk-RXXSK34K.mjs} +2 -2
  31. package/dist/{chunk-YL4UEHO3.mjs → chunk-UDR6GM4C.mjs} +1 -1
  32. package/dist/{chunk-W77EPLUD.mjs → chunk-UQKW4TKL.mjs} +1 -1
  33. package/dist/{chunk-VLOA5XAC.mjs → chunk-YCDDT44O.mjs} +8 -4
  34. package/dist/{chunk-GLVCH422.mjs → chunk-YNULA6PU.mjs} +1 -1
  35. package/dist/{collection-add-products-TWIDVZMU.mjs → collection-add-products-T2N7QSJ3.mjs} +4 -4
  36. package/dist/{collection-detail-B33WPVIW.mjs → collection-detail-G6XV2433.mjs} +4 -4
  37. package/dist/{collection-list-DAW7WOX5.mjs → collection-list-5UAWKYF3.mjs} +4 -4
  38. package/dist/{customer-detail-ATJGSJTH.mjs → customer-detail-47EEVPS2.mjs} +6 -6
  39. package/dist/{customer-group-add-customers-57THRZ6D.mjs → customer-group-add-customers-TPKDPKQB.mjs} +6 -6
  40. package/dist/{customer-group-detail-OVZIWNPP.mjs → customer-group-detail-B2OAKFTS.mjs} +6 -6
  41. package/dist/{customer-group-list-SADXXHAE.mjs → customer-group-list-BOJHNJII.mjs} +3 -3
  42. package/dist/{customer-list-TE7VNBX6.mjs → customer-list-7K5U27LG.mjs} +6 -6
  43. package/dist/{customers-add-customer-group-XNPZ47LK.mjs → customers-add-customer-group-K6TUA74U.mjs} +4 -4
  44. package/dist/{inventory-detail-I2CNJC6Y.mjs → inventory-detail-ASB73KWV.mjs} +4 -4
  45. package/dist/{inventory-list-I7IXI4KC.mjs → inventory-list-C2MMQTES.mjs} +4 -4
  46. package/dist/{location-fulfillment-providers-F7MMM5KC.mjs → location-fulfillment-providers-XP6WHPBF.mjs} +4 -4
  47. package/dist/{location-sales-channels-J3V26P3Q.mjs → location-sales-channels-56Q6CXKL.mjs} +5 -5
  48. package/dist/{location-service-zone-create-27MNMKPQ.mjs → location-service-zone-create-ULDHY2U2.mjs} +5 -5
  49. package/dist/{location-service-zone-manage-areas-U3EPNWSI.mjs → location-service-zone-manage-areas-IYJNAX7D.mjs} +5 -5
  50. package/dist/{manage-locations-ZRCDYW5V.mjs → manage-locations-WMH3RQMR.mjs} +1 -1
  51. package/dist/{order-create-claim-VFFKHCI6.mjs → order-create-claim-7NKA24P7.mjs} +4 -4
  52. package/dist/{order-create-edit-7TFUOMST.mjs → order-create-edit-LJX4W7NG.mjs} +4 -4
  53. package/dist/{order-create-exchange-CXQ5ZM3Q.mjs → order-create-exchange-3SGVPVEW.mjs} +4 -4
  54. package/dist/{order-create-return-AYWH3WMR.mjs → order-create-return-D46V464L.mjs} +4 -4
  55. package/dist/{order-detail-IFXJNVTV.mjs → order-detail-D32BXAWE.mjs} +2 -2
  56. package/dist/{order-list-4N3OV2PU.mjs → order-list-E6MQYTOJ.mjs} +8 -8
  57. package/dist/{price-list-configuration-4XY4JW4I.mjs → price-list-configuration-5AMFLA3C.mjs} +5 -5
  58. package/dist/{price-list-create-VFQVCUWV.mjs → price-list-create-SF6ELAMF.mjs} +5 -5
  59. package/dist/{price-list-detail-32UKOWNW.mjs → price-list-detail-ESVZHRYB.mjs} +5 -5
  60. package/dist/{price-list-list-TKXSU27S.mjs → price-list-list-JANFOZQI.mjs} +4 -4
  61. package/dist/{price-list-prices-add-AY75YZ7D.mjs → price-list-prices-add-5FADNOGB.mjs} +4 -4
  62. package/dist/{product-attributes-3GCAY7KW.mjs → product-attributes-5MY4SGFX.mjs} +4 -4
  63. package/dist/{product-create-4TD7FQC7.mjs → product-create-OWPAOIJU.mjs} +7 -7
  64. package/dist/{product-detail-J7T7MNUY.mjs → product-detail-XLUTUYUE.mjs} +6 -6
  65. package/dist/{product-edit-MJ7VAIVY.mjs → product-edit-XDWFGRKM.mjs} +4 -4
  66. package/dist/{product-export-X64NQWTS.mjs → product-export-NVWDLE4I.mjs} +3 -3
  67. package/dist/{product-image-variants-edit-J6A5G4AC.mjs → product-image-variants-edit-E6I5E6QB.mjs} +4 -4
  68. package/dist/{product-import-HDNC36SM.mjs → product-import-5VLF2ZN4.mjs} +6 -6
  69. package/dist/{product-list-E7HS4SBG.mjs → product-list-D2PWRKUE.mjs} +7 -7
  70. package/dist/{product-organization-263TICCI.mjs → product-organization-NGKGAMVF.mjs} +4 -4
  71. package/dist/{product-sales-channels-RHZQXWAY.mjs → product-sales-channels-IPOW5T64.mjs} +5 -5
  72. package/dist/{product-shipping-profile-GVTR3MHD.mjs → product-shipping-profile-DHTDAKYL.mjs} +4 -4
  73. package/dist/{product-tag-detail-CK5F4DU3.mjs → product-tag-detail-FXWXYI5Z.mjs} +10 -10
  74. package/dist/{product-tag-list-VNROS2W3.mjs → product-tag-list-IVXSYMFL.mjs} +10 -10
  75. package/dist/{product-type-detail-7K5RLART.mjs → product-type-detail-BWLICDYA.mjs} +4 -4
  76. package/dist/{product-type-list-2ZQ2NE3R.mjs → product-type-list-LDCQKDKZ.mjs} +6 -6
  77. package/dist/{product-variant-detail-3SO2MX22.mjs → product-variant-detail-BSRN246J.mjs} +4 -4
  78. package/dist/{profile-detail-UTJBWZSA.mjs → profile-detail-5Z3SFDB4.mjs} +1 -1
  79. package/dist/{profile-edit-OOYMTKX6.mjs → profile-edit-2MJF3JMT.mjs} +1 -1
  80. package/dist/{promotion-detail-ZDINJASC.mjs → promotion-detail-6HFB6Y6E.mjs} +3 -3
  81. package/dist/{promotion-list-MN6YJCYA.mjs → promotion-list-2VADJJQM.mjs} +4 -4
  82. package/dist/{refund-reason-list-SFTHVSPC.mjs → refund-reason-list-ZYTUTZBO.mjs} +8 -8
  83. package/dist/{region-add-countries-KGFPZSRE.mjs → region-add-countries-VK4EJ4LD.mjs} +4 -4
  84. package/dist/{region-create-YJJRTAYO.mjs → region-create-PYW22J5X.mjs} +4 -4
  85. package/dist/{region-detail-ERE4ZF2I.mjs → region-detail-6ORFQWHD.mjs} +4 -4
  86. package/dist/{region-list-W55C3CTH.mjs → region-list-YLAWL5RJ.mjs} +4 -4
  87. package/dist/{reservation-list-IEUC3KXK.mjs → reservation-list-4BFZSJIH.mjs} +5 -5
  88. package/dist/{return-reason-list-CBOVMQZF.mjs → return-reason-list-JTXR53J7.mjs} +10 -10
  89. package/dist/{sales-channel-add-products-7RKUDBXN.mjs → sales-channel-add-products-IVZVKUVT.mjs} +4 -4
  90. package/dist/{sales-channel-detail-TKVVIAS5.mjs → sales-channel-detail-ZRL7SHZV.mjs} +4 -4
  91. package/dist/{sales-channel-list-SI7JVBOI.mjs → sales-channel-list-IMUI5QXS.mjs} +5 -5
  92. package/dist/{shipping-option-type-list-YPCCUVFZ.mjs → shipping-option-type-list-XRDHS2W5.mjs} +5 -5
  93. package/dist/{shipping-profiles-list-KYYSHLSZ.mjs → shipping-profiles-list-2DGSDS7S.mjs} +4 -4
  94. package/dist/{store-add-currencies-SNSW7A6O.mjs → store-add-currencies-M6Y2Y5BO.mjs} +4 -4
  95. package/dist/{store-detail-3ZV7FCPV.mjs → store-detail-QOCZCOUL.mjs} +4 -4
  96. package/dist/{tax-region-detail-TTYUBJ3V.mjs → tax-region-detail-LUS323UE.mjs} +13 -13
  97. package/dist/{tax-region-province-detail-YCY56CRL.mjs → tax-region-province-detail-SRM2JTYP.mjs} +13 -13
  98. package/dist/{tax-region-tax-override-create-R3PNDP43.mjs → tax-region-tax-override-create-TUJHJXIQ.mjs} +11 -11
  99. package/dist/{tax-region-tax-override-edit-QLD7MIQY.mjs → tax-region-tax-override-edit-H5W5BMGJ.mjs} +12 -12
  100. package/dist/{user-invite-FQNKJKMD.mjs → user-invite-W6QLJ6H4.mjs} +4 -4
  101. package/dist/{user-list-6EVTLPJE.mjs → user-list-V2JUUJID.mjs} +4 -4
  102. package/dist/{workflow-execution-list-JOVBPL45.mjs → workflow-execution-list-AULV5YFO.mjs} +4 -4
  103. package/package.json +9 -9
  104. package/src/components/common/infinite-list/infinite-list.tsx +9 -4
  105. package/src/dashboard-app/dashboard-app.tsx +10 -2
  106. package/src/dashboard-app/routes/utils.ts +14 -6
  107. package/src/i18n/languages.ts +7 -0
  108. package/src/i18n/translations/index.ts +4 -0
  109. package/src/i18n/translations/ptPT.json +3219 -0
  110. package/src/routes/products/product-import/helpers/import-template.ts +6 -6
@@ -9,23 +9,23 @@ import "./chunk-LQTHYS2Z.mjs";
9
9
  import {
10
10
  _DataTable,
11
11
  useDataTable
12
- } from "./chunk-PJ5EUKOB.mjs";
12
+ } from "./chunk-43WSJSKM.mjs";
13
13
  import "./chunk-HQKGZADC.mjs";
14
14
  import "./chunk-EMIHDNB7.mjs";
15
- import "./chunk-FKIOYL3D.mjs";
15
+ import "./chunk-CB3UMLV2.mjs";
16
16
  import {
17
17
  SingleColumnPage
18
18
  } from "./chunk-GIZFNLKK.mjs";
19
19
  import {
20
20
  useQueryParams
21
21
  } from "./chunk-C76H5USB.mjs";
22
- import "./chunk-PFKKVLZX.mjs";
22
+ import "./chunk-3OGLDF4U.mjs";
23
23
  import {
24
24
  useExtension
25
25
  } from "./chunk-C5P5PL3E.mjs";
26
26
  import "./chunk-LPEUYMRK.mjs";
27
27
  import "./chunk-S4DMV3ZT.mjs";
28
- import "./chunk-67ORSRVT.mjs";
28
+ import "./chunk-MHC2COUJ.mjs";
29
29
  import {
30
30
  useWorkflowExecutions
31
31
  } from "./chunk-QTCZFYFH.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/dashboard",
3
- "version": "2.11.3-snapshot-20251103115905",
3
+ "version": "2.11.4-snapshot-20251105174837",
4
4
  "scripts": {
5
5
  "generate:static": "node ./scripts/generate-currencies.js && prettier --write ./src/lib/currencies.ts",
6
6
  "dev": "vite",
@@ -46,10 +46,10 @@
46
46
  "@dnd-kit/utilities": "^3.2.2",
47
47
  "@hookform/error-message": "^2.0.1",
48
48
  "@hookform/resolvers": "3.4.2",
49
- "@medusajs/admin-shared": "2.11.3-snapshot-20251103115905",
50
- "@medusajs/icons": "2.11.3-snapshot-20251103115905",
51
- "@medusajs/js-sdk": "2.11.3-snapshot-20251103115905",
52
- "@medusajs/ui": "4.0.27-snapshot-20251103115905",
49
+ "@medusajs/admin-shared": "2.11.4-snapshot-20251105174837",
50
+ "@medusajs/icons": "2.11.4-snapshot-20251105174837",
51
+ "@medusajs/js-sdk": "2.11.4-snapshot-20251105174837",
52
+ "@medusajs/ui": "4.0.28-snapshot-20251105174837",
53
53
  "@radix-ui/react-dialog": "1.1.4",
54
54
  "@radix-ui/react-dismissable-layer": "1.1.4",
55
55
  "@tanstack/react-query": "5.64.2",
@@ -81,10 +81,10 @@
81
81
  "zod": "3.25.76"
82
82
  },
83
83
  "devDependencies": {
84
- "@medusajs/admin-shared": "2.11.3-snapshot-20251103115905",
85
- "@medusajs/admin-vite-plugin": "2.11.3-snapshot-20251103115905",
86
- "@medusajs/types": "2.11.3-snapshot-20251103115905",
87
- "@medusajs/ui-preset": "2.11.3-snapshot-20251103115905"
84
+ "@medusajs/admin-shared": "2.11.4-snapshot-20251105174837",
85
+ "@medusajs/admin-vite-plugin": "2.11.4-snapshot-20251105174837",
86
+ "@medusajs/types": "2.11.4-snapshot-20251105174837",
87
+ "@medusajs/ui-preset": "2.11.4-snapshot-20251105174837"
88
88
  },
89
89
  "packageManager": "yarn@3.2.1"
90
90
  }
@@ -65,6 +65,13 @@ export const InfiniteList = <
65
65
  const parentRef = useRef<HTMLDivElement>(null)
66
66
  const startObserver = useRef<IntersectionObserver>()
67
67
  const endObserver = useRef<IntersectionObserver>()
68
+ const fetchNextPageRef = useRef(fetchNextPage)
69
+ const fetchPreviousPageRef = useRef(fetchPreviousPage)
70
+
71
+ useEffect(() => {
72
+ fetchNextPageRef.current = fetchNextPage
73
+ fetchPreviousPageRef.current = fetchPreviousPage
74
+ }, [fetchNextPage, fetchPreviousPage])
68
75
 
69
76
  useEffect(() => {
70
77
  if (isPending) {
@@ -78,7 +85,7 @@ export const InfiniteList = <
78
85
  (entries) => {
79
86
  if (entries[0].isIntersecting && hasPreviousPage) {
80
87
  startObserver.current?.disconnect()
81
- fetchPreviousPage()
88
+ fetchPreviousPageRef.current()
82
89
  }
83
90
  },
84
91
  {
@@ -90,7 +97,7 @@ export const InfiniteList = <
90
97
  (entries) => {
91
98
  if (entries[0].isIntersecting && hasNextPage) {
92
99
  endObserver.current?.disconnect()
93
- fetchNextPage()
100
+ fetchNextPageRef.current()
94
101
  }
95
102
  },
96
103
  {
@@ -113,8 +120,6 @@ export const InfiniteList = <
113
120
  endObserver.current?.disconnect()
114
121
  }
115
122
  }, [
116
- fetchNextPage,
117
- fetchPreviousPage,
118
123
  hasNextPage,
119
124
  hasPreviousPage,
120
125
  isFetching,
@@ -42,6 +42,13 @@ type DashboardAppProps = {
42
42
  plugins: DashboardPlugin[]
43
43
  }
44
44
 
45
+ /**
46
+ * Matches segments that are optional and at the end of the path.
47
+ * Example: /path/to/:id?
48
+ * Such paths can be added to the menu items without the optional segment.
49
+ */
50
+ const OPTIONAL_LAST_SEGMENT_MATCH = /\/([^\/])+\?$/
51
+
45
52
  export class DashboardApp {
46
53
  private widgets: WidgetMap
47
54
  private menus: MenuMap
@@ -129,10 +136,11 @@ export class DashboardApp {
129
136
  allMenuItems.sort((a, b) => a.path.length - b.path.length)
130
137
 
131
138
  allMenuItems.forEach((item) => {
132
- if (item.path.includes("/:")) {
139
+ item.path = item.path.replace(OPTIONAL_LAST_SEGMENT_MATCH, "")
140
+ if (item.path.includes("/:") || item.path.endsWith("/*")) {
133
141
  if (process.env.NODE_ENV === "development") {
134
142
  console.warn(
135
- `[@medusajs/dashboard] Menu item for path "${item.path}" can't be added to the sidebar as it contains a parameter.`
143
+ `[@medusajs/dashboard] Menu item for path "${item.path}" can't be added to the sidebar as it contains a mandatory parameter.`
136
144
  )
137
145
  }
138
146
  return
@@ -37,9 +37,10 @@ const createBranchRoute = (segment: string): RouteObject => ({
37
37
  const createLeafRoute = (
38
38
  Component: ComponentType,
39
39
  loader?: LoaderFunction,
40
- handle?: object
40
+ handle?: object,
41
+ path: string = ""
41
42
  ): RouteObject => ({
42
- path: "",
43
+ path,
43
44
  ErrorBoundary: ErrorBoundary,
44
45
  async lazy() {
45
46
  const result: {
@@ -149,7 +150,6 @@ const addRoute = (
149
150
 
150
151
  if (isComponentSegment || remainingSegments.length === 0) {
151
152
  route.children ||= []
152
- const leaf = createLeafRoute(Component, loader)
153
153
 
154
154
  if (handle) {
155
155
  route.handle = handle
@@ -159,9 +159,17 @@ const addRoute = (
159
159
  route.loader = loader
160
160
  }
161
161
 
162
- leaf.children = processParallelRoutes(parallelRoutes, currentFullPath)
163
- route.children.push(leaf)
164
-
162
+ // Since splat segments must occur at the end of a route, react-router enforces the segment to be a leaf.
163
+ // Therefore we can't create a child leaf route with `path: ""` and must instead modify the route itself
164
+ if (currentSegment === "*?" || currentSegment === "*") {
165
+ const leaf = createLeafRoute(Component, loader, handle, currentSegment)
166
+ leaf.children = processParallelRoutes(parallelRoutes, currentFullPath)
167
+ Object.assign(route, leaf)
168
+ } else {
169
+ const leaf = createLeafRoute(Component, loader)
170
+ leaf.children = processParallelRoutes(parallelRoutes, currentFullPath)
171
+ route.children.push(leaf)
172
+ }
165
173
  if (remainingSegments.length > 0) {
166
174
  addRoute(
167
175
  remainingSegments,
@@ -9,6 +9,7 @@ import {
9
9
  ja,
10
10
  pl,
11
11
  ptBR,
12
+ ptPT,
12
13
  th,
13
14
  tr,
14
15
  uk,
@@ -110,6 +111,12 @@ export const languages: Language[] = [
110
111
  ltr: true,
111
112
  date_locale: ptBR,
112
113
  },
114
+ {
115
+ code: "ptPT",
116
+ display_name: "Português (Portugal)",
117
+ ltr: true,
118
+ date_locale: ptPT,
119
+ },
113
120
  {
114
121
  code: "tr",
115
122
  display_name: "Türkçe",
@@ -10,6 +10,7 @@ import it from "./it.json"
10
10
  import ja from "./ja.json"
11
11
  import pl from "./pl.json"
12
12
  import ptBR from "./ptBR.json"
13
+ import ptPT from "./ptPT.json"
13
14
  import th from "./th.json"
14
15
  import tr from "./tr.json"
15
16
  import uk from "./uk.json"
@@ -67,6 +68,9 @@ export default {
67
68
  ptBR: {
68
69
  translation: ptBR,
69
70
  },
71
+ ptPT: {
72
+ translation: ptPT,
73
+ },
70
74
  th: {
71
75
  translation: th,
72
76
  },