Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.

Commit 5bd6fc9

Browse files
authored
Merge pull request #2 from perseidesjs/feat/update-to-medusa-v-1-20-10
feat: Updated to Medusa UI v1.20.10
2 parents ce0195c + a5c04d8 commit 5bd6fc9

File tree

5 files changed

+59
-58
lines changed

5 files changed

+59
-58
lines changed

package.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
"@babel/traverse": "7.22.5",
1515
"@hookform/error-message": "^2.0.1",
1616
"@hookform/resolvers": "^3.3.1",
17-
"@medusajs/icons": "^1.1.0",
18-
"@medusajs/ui": "^2.4.0",
17+
"@medusajs/icons": "^1.2.2",
18+
"@medusajs/medusa": "^1.7.7",
1919
"@medusajs/ui-preset": "^1.1.1",
20+
"@medusajs/ui": "^3.0.1",
2021
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
2122
"@radix-ui/react-accordion": "^1.0.1",
2223
"@radix-ui/react-avatar": "^1.0.1",
@@ -32,43 +33,51 @@
3233
"@segment/analytics-next": "^1.51.1",
3334
"@svgr/webpack": "^8.0.1",
3435
"@swc/core": "^1.3.61",
35-
"@tailwindcss/forms": "^0.5.3",
36+
"@tailwindcss/forms": "^0.5.7",
37+
"@tailwindcss/line-clamp": "^0.3.1",
3638
"@tanstack/react-query": "4.22.0",
3739
"@tanstack/react-table": "^8.7.9",
38-
"autoprefixer": "^10.4.13",
40+
"autoprefixer": "^10.4.19",
41+
"axios": "^1.1.3",
3942
"chokidar": "^3.5.3",
4043
"clsx": "^1.2.1",
44+
"confetti-js": "^0.0.18",
4145
"copy-to-clipboard": "^3.3.1",
4246
"copy-webpack-plugin": "^11.0.0",
47+
"crypto-browserify": "^3.12.0",
4348
"css-loader": "^6.8.1",
4449
"emoji-picker-react": "^4.4.3",
4550
"framer-motion": "^9.1.6",
4651
"html-webpack-plugin": "^5.5.1",
47-
"i18next": "^22.5.0",
4852
"i18next-browser-languagedetector": "^7.0.1",
4953
"i18next-http-backend": "^2.2.1",
54+
"i18next": "^22.5.0",
55+
"immutability-helper": "^3.1.1",
56+
"iso8601-duration": "^1.3.0",
57+
"lodash": "^4.17.21",
5058
"md5": "^2.3.0",
51-
"medusa-react": "^9.0.13",
59+
"medusa-react": "^9.0.18",
5260
"mini-css-extract-plugin": "^2.7.6",
5361
"moment": "^2.29.4",
5462
"path-browserify": "^1.0.1",
5563
"pluralize": "^8.0.0",
56-
"postcss": "^8.4.21",
5764
"postcss-loader": "^7.3.2",
5865
"postcss-preset-env": "^8.4.1",
66+
"postcss": "^8.4.38",
5967
"prism-react-renderer": "^2.0.4",
6068
"process": "^0.11.10",
6169
"query-string": "^8.1.0",
62-
"react": "^18.2.0",
70+
"randomatic": "^3.1.1",
6371
"react-collapsible": "^2.8.3",
6472
"react-country-flag": "^3.0.2",
6573
"react-currency-input-field": "^3.6.8",
6674
"react-datepicker": "^4.8.0",
6775
"react-dev-utils": "^12.0.1",
68-
"react-dnd": "^16.0.1",
6976
"react-dnd-html5-backend": "^16.0.1",
77+
"react-dnd": "^16.0.1",
7078
"react-dom": "^18.2.0",
7179
"react-helmet-async": "^1.3.0",
80+
"react-helmet": "^6.0.0",
7281
"react-highlight-words": "^0.18.0",
7382
"react-hook-form": "7.38.0",
7483
"react-hot-toast": "2.4.0",
@@ -81,29 +90,20 @@
8190
"react-router-dom": "6.8.0",
8291
"react-select": "^5.5.4",
8392
"react-table": "^7.7.0",
93+
"react": "^18.2.0",
94+
"stream-browserify": "^3.0.0",
8495
"style-loader": "^3.3.3",
8596
"swc-loader": "^0.2.3",
8697
"swc-minify-webpack-plugin": "^2.1.1",
87-
"tailwindcss": "3.2.2",
8898
"tailwindcss-radix": "^2.7.0",
99+
"tailwindcss": "^3.4.3",
89100
"ts-dedent": "^2.2.0",
90101
"type-fest": "^3.6.0",
91-
"webpack": "^5.84.1",
102+
"uuid": "^8.3.2",
92103
"webpack-dev-server": "4.15.0",
104+
"webpack": "^5.84.1",
93105
"webpackbar": "^5.0.2",
94-
"zod": "^3.22.2",
95-
"@medusajs/medusa": "^1.7.7",
96-
"@tailwindcss/line-clamp": "^0.3.1",
97-
"axios": "^1.1.3",
98-
"confetti-js": "^0.0.18",
99-
"crypto-browserify": "^3.12.0",
100-
"immutability-helper": "^3.1.1",
101-
"iso8601-duration": "^1.3.0",
102-
"lodash": "^4.17.21",
103-
"randomatic": "^3.1.1",
104-
"react-helmet": "^6.0.0",
105-
"stream-browserify": "^3.0.0",
106-
"uuid": "^8.3.2"
106+
"zod": "^3.22.2"
107107
},
108108
"devDependencies": {
109109
"@babel/types": "7.22.5",

src/components/molecules/actionables.tsx

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -41,32 +41,34 @@ const Actionables: React.FC<ActionablesProps> = ({
4141
)}
4242
</DropdownMenu.Trigger>
4343

44-
<DropdownMenu.Content
45-
sideOffset={5}
46-
className="bg-grey-0 border-grey-20 rounded-rounded shadow-dropdown p-xsmall z-30 min-w-[200px] border"
47-
>
48-
{actions.map((action, i) => {
49-
return (
50-
<DropdownMenu.Item className="mb-1 last:mb-0" key={i}>
51-
{
52-
<Button
53-
variant="ghost"
54-
size="small"
55-
className={clsx("flex w-full justify-start", {
56-
"text-rose-50": action?.variant === "danger",
57-
"pointer-events-none select-none opacity-50":
58-
action?.disabled,
59-
})}
60-
onClick={action?.onClick}
61-
>
62-
{action.icon}
63-
{action.label}
64-
</Button>
65-
}
66-
</DropdownMenu.Item>
67-
)
68-
})}
69-
</DropdownMenu.Content>
44+
<DropdownMenu.Portal>
45+
<DropdownMenu.Content
46+
sideOffset={5}
47+
className="bg-grey-0 border-grey-20 rounded-rounded shadow-dropdown p-xsmall z-50 min-w-[200px] border"
48+
>
49+
{actions.map((action, i) => {
50+
return (
51+
<DropdownMenu.Item className="mb-1 last:mb-0" key={i}>
52+
{
53+
<Button
54+
variant="ghost"
55+
size="small"
56+
className={clsx("flex w-full justify-start", {
57+
"text-rose-50": action?.variant === "danger",
58+
"pointer-events-none select-none opacity-50":
59+
action?.disabled,
60+
})}
61+
onClick={action?.onClick}
62+
>
63+
{action.icon}
64+
{action.label}
65+
</Button>
66+
}
67+
</DropdownMenu.Item>
68+
)
69+
})}
70+
</DropdownMenu.Content>
71+
</DropdownMenu.Portal>
7072
</DropdownMenu.Root>
7173
</div>
7274
)

src/domain/discounts/details/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const Edit = () => {
2323

2424
const { discount, isLoading, error } = useAdminDiscount(
2525
id!,
26-
{ expand: "rule,rule.conditions" },
26+
{ expand: "rule,rule.conditions,regions" },
2727
{
2828
enabled: !!id,
2929
}

src/domain/orders/details/returns/index.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import {
22
AdminGetVariantsVariantInventoryRes,
33
AdminPostOrdersOrderReturnsReq,
4-
InventoryLevelDTO,
4+
LevelWithAvailability,
55
Order,
66
LineItem as RawLineItem,
7-
StockLocationDTO,
87
} from "@medusajs/medusa"
98
import LayeredModal, {
109
LayeredModalContext,
@@ -100,7 +99,7 @@ const ReturnMenu: React.FC<ReturnMenuProps> = ({ order, onDismiss }) => {
10099
}, [order.items])
101100

102101
const [inventoryMap, setInventoryMap] = useState<
103-
Map<string, InventoryLevelDTO[]>
102+
Map<string, LevelWithAvailability[]>
104103
>(new Map())
105104

106105
React.useEffect(() => {
@@ -122,7 +121,7 @@ const ReturnMenu: React.FC<ReturnMenuProps> = ({ order, onDismiss }) => {
122121
.filter((it) => !!it)
123122
.map((item) => {
124123
const { variant } = item as AdminGetVariantsVariantInventoryRes
125-
return [variant.id, variant.inventory[0].location_levels]
124+
return [variant.id, variant.inventory[0]?.location_levels]
126125
})
127126
)
128127
}

src/domain/product-categories/utils/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ export const getDefaultCategoryValues = (t: TFunction, category?: ProductCategor
4848
),
4949
},
5050
is_active: {
51-
value: category?.is_active ? (category?.is_active ? CategoryStatus.Active : CategoryStatus.Inactive) : CategoryStatus.Active,
51+
value: category?.is_active ? CategoryStatus.Active : CategoryStatus.Inactive,
5252
label: category?.is_active
53-
? t("modals-active", "Public") as string
53+
? t("modals-active", "Active") as string
5454
: t("modals-inactive", "Inactive") as string,
5555
},
5656
is_public: {
57-
value: category?.is_internal ? (category?.is_internal ? CategoryVisibility.Private : CategoryVisibility.Public) : CategoryVisibility.Public,
57+
value: category?.is_internal ? CategoryVisibility.Private : CategoryVisibility.Public,
5858
label: category?.is_internal
5959
? t("modals-private", "Private") as string
6060
: t("modals-public", "Public") as string,

0 commit comments

Comments
 (0)