forked from medusajs/medusa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(inventory,dashboard,types,core-flows,js-sdk,medusa): Improve inv…
…entory UX (medusajs#10630) * feat(dashboard): Add UI for bulk editing inventory stock (medusajs#10556) * progress * cleanup types * add changeset * fix 0 values * format schema * add delete event and allow copy/pasting enabled for some fields * add response types * add tests * work on fixing setValue behaviour * cleanup toggle logic * add loading state * format schema * add support for bidirectional actions in DataGrid and update Checkbox and RadioGroup * update lock * lint * fix 404 * address feedback * update cursor on bidirectional select
- Loading branch information
1 parent
c591545
commit bc22b81
Showing
82 changed files
with
2,719 additions
and
288 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"@medusajs/inventory": patch | ||
"@medusajs/dashboard": patch | ||
"@medusajs/core-flows": patch | ||
"@medusajs/js-sdk": patch | ||
"@medusajs/types": patch | ||
"@medusajs/medusa": patch | ||
--- | ||
|
||
feat(inventory,dashboard,core-flows,js-sdk,types,medusa): Improve inventory management UX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/admin/dashboard/src/components/common/logo-box/avatar-box.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/admin/dashboard/src/components/common/logo-box/logo-box.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/admin/dashboard/src/components/common/progress-bar/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./progress-bar" |
33 changes: 33 additions & 0 deletions
33
packages/admin/dashboard/src/components/common/progress-bar/progress-bar.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { motion } from "motion/react" | ||
|
||
interface ProgressBarProps { | ||
/** | ||
* The duration of the animation in seconds. | ||
* | ||
* @default 2 | ||
*/ | ||
duration?: number | ||
} | ||
|
||
export const ProgressBar = ({ duration = 2 }: ProgressBarProps) => { | ||
return ( | ||
<motion.div | ||
className="bg-ui-fg-subtle size-full" | ||
initial={{ | ||
width: "0%", | ||
}} | ||
transition={{ | ||
delay: 0.2, | ||
duration, | ||
ease: "linear", | ||
}} | ||
animate={{ | ||
width: "90%", | ||
}} | ||
exit={{ | ||
width: "100%", | ||
transition: { duration: 0.2, ease: "linear" }, | ||
}} | ||
/> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/admin/dashboard/src/components/data-grid/components/data-grid-duplicate-cell.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ReactNode } from "react" | ||
import { useDataGridDuplicateCell } from "../hooks" | ||
|
||
interface DataGridDuplicateCellProps<TValue> { | ||
duplicateOf: string | ||
children?: ReactNode | ((props: { value: TValue }) => ReactNode) | ||
} | ||
export const DataGridDuplicateCell = <TValue,>({ | ||
duplicateOf, | ||
children, | ||
}: DataGridDuplicateCellProps<TValue>) => { | ||
const { watchedValue } = useDataGridDuplicateCell({ duplicateOf }) | ||
|
||
return ( | ||
<div className="bg-ui-bg-base txt-compact-small text-ui-fg-subtle flex size-full cursor-not-allowed items-center justify-between overflow-hidden px-4 py-2.5 outline-none"> | ||
{typeof children === "function" | ||
? children({ value: watchedValue }) | ||
: children} | ||
</div> | ||
) | ||
} |
22 changes: 15 additions & 7 deletions
22
packages/admin/dashboard/src/components/data-grid/components/data-grid-readonly-cell.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.