Commit Graph

31 Commits

Author SHA1 Message Date
Carlos R. L. Rodrigues
cc73802ab3 chore(order): dml (#10292)
* ../../core/types/src/dml/index.ts

* ../../core/types/src/dml/index.ts

* fix: relationships mapping

* handle nullable foreign keys types

* handle nullable foreign keys types

* handle nullable foreign keys types

* continue to update product category repository

* fix all product category repositories issues

* fix product category service types

* fix product module service types

* fix product module service types

* fix repository template type

* refactor: use a singleton DMLToMikroORM factory instance

Since the MikroORM MetadataStorage is global, we will also have to turn DML
to MikroORM entities conversion use a global bucket as well

* refactor: update product module to use DML in tests

* wip: tests

* WIP product linkable fixes

* continue type fixing and start test fixing

* test: fix more tests

* fix repository

* fix pivot table computaion + fix mikro orm repository

* fix many to many management and configuration

* fix many to many management and configuration

* fix many to many management and configuration

* update product tag relation configuration

* Introduce experimental dml hooks to fix some issues with categories

* more fixes

* fix product tests

* add missing id prefixes

* fix product category handle management

* test: fix more failing tests

* test: make it all green

* test: fix breaking tests

* fix: build issues

* fix: build issues

* fix: more breaking tests

* refactor: fix issues after merge

* refactor: fix issues after merge

* refactor: surpress types error

* test: fix DML failing tests

* improve many to many inference + tests

* Wip fix columns from product entity

* remove product model before create hook and manage handle validation and transformation at the service level

* test: fix breaking unit tests

* fix: product module service to not update handle on product update

* fix define link and joiner config

* test: fix joiner config test

* test: fix joiner config test

* fix joiner config primary keys

* Fix joiner config builder

* Fix joiner config builder

* test: remove only modifier from test

* refactor: remove hooks usage from product collection

* refactor: remove hooks usage from product-option

* refactor: remove hooks usage for computing category handle

* refactor: remove hooks usage from productCategory model

* refactor: remove hooks from DML

* refactor: remove cruft

* order dml

* cleanup

* re add foerign key indexes

* wip

* chore: remove unused types

* wip

* changes

* rm raw

* autoincrement

* wip

* rel

* refactor: cleanup

* migration and models configuration adjustments

* cleanup

* number searchable

* fix random ordering

* fix

* test: fix product-category tests

* test: update breaking DML tests

* test: array assertion to not care about ordering

* fix: temporarily apply id ordering for products

* types

* wip

* WIP type improvements

* update order models

* partially fix types temporarely

* rel

* fix: recursive type issue

* improve type inference breaks

* improve type inference breaks

* update models

* rm nullable

* default value

* repository

* update default value handling

* fix unit tests

* WIP

* toMikroORM

* fix relations

* cascades

* fix

* experimental dml hooks

* rm migration

* serial

* nullable autoincrement

* fix model

* model changes

* fix one to one DML

* order test

* fix addresses

* fix unit tests

* Re align dml entity name inference

* update model table name config

* update model table name config

* revert

* update return relation

* WIP

* hasOne

* models

* fix

* model

* initial commit

* cart service

* order module

* utils unit test

* index engine

* changeset

* merge

* fix hasOne with fk

* update

* free text filter per entity

* tests

* prod category

* property string many to many

* fix big number

* link modules migration set names

* merge

* shipping option rules

* serializer

* unit test

* fix test mikro orm init

* fix test mikro orm init

* Maintain merge object properties

* fix test mikro orm init

* prevent unit test from connecting to db

* wip

* fix test

* fix test

* link test

* schema

* models

* auto increment

* hook

* model hooks

* order

* wip

* orm version

* request return field

* fix return configuration on order model

* workflows

* core flows

* unit test

* test

* base repo

* test

* base repo

* test fix

* inventory move

* locking inventory

* test

* free text fix

* rm timeout mock

* migrate fulfillment values

* v6.4.3

* cleanup

* link-modules update sql

* revert test

* remove fake timers

---------

Co-authored-by: adrien2p <adrien.deperetti@gmail.com>
Co-authored-by: Harminder Virk <virk.officials@gmail.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-01-21 08:04:47 -05:00
Kasper Fabricius Kristensen
147c0e5a35 feat(ui,dashboard): Add DataTable block (#10024)
**What**
- Adds opinionated DataTable block to `@medusajs/ui` 
- Adds new DataTable to `@medusajs/dashboard` that uses the above mentioned block as the primitive.

The PR also replaces the table on /customer-groups and the variants table on /products/:id with the new DataTable, to provide an example of it's usage. The previous DataTable component has been renamed to `_DataTable` and has been deprecated.

**Note**
This PR has a lot of LOC. 5,346 of these changes are the fr.json file, which wasn't formatted correctly before. When adding the new translations needed for this PR the file was formatted which caused each line to change to have the proper indentation.

Resolves CMRC-333
2025-01-20 13:26:12 +00:00
olivermrbl
3919b26eb6 chore: Version packages 2025-01-07 13:31:40 +01:00
Kasper Fabricius Kristensen
f7aaf2c8bb chore(ui,icons): Add React 19/19-rc to peer dependencies (#10458)
Resolves SUP-478
2024-12-20 12:18:30 +00:00
olivermrbl
0e342b491d chore: Version packages 2024-12-10 14:01:50 +01:00
olivermrbl
4ccab16336 chore: Version packages 2024-10-25 17:19:36 +02:00
olivermrbl
2fbebb60e3 chore: Release 2024-10-22 20:43:47 +02:00
Kasper Fabricius Kristensen
1f682daf5c fix(dashboard,ui): Fixes to Combobox and CategoryCombobox (#9537)
**What**
- Fixes the Combobox to keep the width of the content constant.
- Brings CategoryCombobox inline with the other Combobox component
- Adds keyboard navigation to the CategoryCombobox: You can now navigate options using ArrowUp and ArrowDown, and if an option has children you can use ArrowRight to see the children options.
- Add "outline-none" to the Drawer component to stop it from flashing whenever focus is dropped.
- Removes a dependency that was added to the UI package by mistake

Resolves CC-155
2024-10-12 14:46:32 +00:00
Kasper Fabricius Kristensen
894db4a150 feat(dashboard): Hitting escape restores previous value (#8654)
* feat(dashboard): Hitting escape restores previous value

* update lock
2024-08-19 14:02:30 +02:00
Kasper Fabricius Kristensen
046a34bdfc feat(dashboard,types,js-sdk,ui): Tax Regions UI (#7935) 2024-07-10 09:26:43 +00:00
Kasper Fabricius Kristensen
6e613f4f50 feat: Update toast design (#8018)
**What**
- Updates the Toast component and `toast` util to match the latest design. 
- Updates every usage of `toast` as `dismissableLabel` is no longer a valid prop, as we now render a X mark instead of a text button.
2024-07-09 16:14:19 +00:00
Kasper Fabricius Kristensen
4736d9e2dd fix(dashboard): JSON view (#8038)
* updated json view

* cleanup

* cleanup
2024-07-09 16:45:22 +02:00
Kasper Fabricius Kristensen
a84e5a6ced fix(ui,dashboard): Revamp DatePicker component (#7891)
**What**
- Revamps the DatePicker component. 
- Addresses all issues with broken DatePickers across admin.

**Note**
- Part of this PR is adding a I18nProvider which is used to set the locale that is used for our DatePicker and Calendar components. Per default they use the browser locale. In the current implementation, we are grabbing the locale to use from the language that is picked in the "Profile" section. This means that currently the only possible locale is "en-US", meaning times uses AM/PM. This is likely not what we want, but we need to make a decision on how we want to handle this globally, will create a ticket for it and we can then clean it up later on.
- This PR does not include "presets" or a DateRange picker that were part of the old implementation. Will open tickets to re-add this later on, but since we aren't using it in admin any where it makes sense to address later.
- This PR also bumps and pin every `@radix-ui` dependency in `@medusajs/ui` and `@medusajs/dashboard`. Our different versions were pulling in multiple versions of internal radix dependencies which were breaking Popover and Dialog behaviour across admin. One thing to note is that Radix have started to print warnings for missing Descriptions and Titles in dialogs. We should add these as we go, for better accessibility. Its not an urgent task but something we can add as we clean up admin over the following weeks. 

CLOSES CORE-2382
2024-07-02 08:59:32 +00:00
Adrien de Peretti
71f4f46cb9 chore(medusa): cleanup medusa package (#7206) 2024-05-07 12:48:49 +02:00
github-actions[bot]
2c807df99d chore: Version Packages (#6839)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-01 09:48:24 +02:00
Kasper Fabricius Kristensen
c3260a2c5a feat(ui, dashboard): Toast rework (#7076)
**What**
- Re-works how toasts work in Medusa UI. API is now built on top of `sonner` instead of `@radix-ui/react-toast`. This is a breaking change, and we will need to update the documentation once this has been merged and released (cc: @shahednasser).
- Adds an example of usage in the products list table in the new admin dashboard. As part of the coming weeks cleanup we will add toasts everywhere that they are currently missing.

CLOSES CORE-1977
2024-04-16 13:14:58 +00:00
github-actions[bot]
74e17ee6f9 chore: Version Packages (#6757)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-26 18:04:04 +01:00
github-actions[bot]
26c9bada0a chore: Version Packages (#6360)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-20 10:21:30 +01:00
Kasper Fabricius Kristensen
2d00625729 feat(dashboard): Workflow executions (#6564)
**What**
- v1 of executions domain

**TODO in follow up PR**
I think it might be a good idea for Carlos or Adrien to go over the design with Ludvig, and make sure we are displaying what is relevant to developers, and how things should be displayed. So this PR is just the initial implementation, and does not handle displaying things like compensation steps (not part of the current design), step input (not supported by the API but part of the design), etc.

Closes CORE-1751, CORE-1755
2024-03-09 18:46:10 +00:00
github-actions[bot]
580143cd53 chore: Version Packages (#6348)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-09 10:25:33 +01:00
github-actions[bot]
16851c557d chore: Version Packages (#6241)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-08 16:23:19 +01:00
Kasper Fabricius Kristensen
73fd92a1af feat(dashboard): Log in, reset password, and accept invite pages (#6310) 2024-02-05 11:16:10 +01:00
Kasper Fabricius Kristensen
8cbf6c60fe feat(dashboard): DataTable component (#6297) 2024-02-02 21:56:55 +01:00
github-actions[bot]
3d0ae72887 chore: Version Packages (#6039)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-25 16:23:53 +01:00
github-actions[bot]
7f5e638f61 chore: Version Packages (#5754)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-14 15:27:39 +01:00
Kasper Fabricius Kristensen
591ba2388d fix(ui): Bump cva and minor type fixes (#5818)
**What**
- Bumps `class-variance-authority` to new beta version - `cva@beta`.
- Updates all usages of `cva` to new API.
- Clear up the naming of types in `usePrompt`

**Why**
- A bug in how `class-variance-authority` exported its types mean that we were relying on patching the package to ensure that the correct types made it into the build of our UI package. This was important to ensure intellisense for component variants, such as `<Button size="large" />`. Previously in the UI monorepo, having the patch was enough to ensure that the correct types made it into the build, but that was not the case after we moved the design system to the core repo. The issue with types is fixed in the `@1` version of `cva` which is currently in beta. I have pinpointed the version to the current beta version to ensure stability despite the package currently being in beta.
2023-12-07 20:13:44 +00:00
github-actions[bot]
935e9f0561 chore: Version Packages (#5673)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-27 16:43:51 +00:00
github-actions[bot]
f4085dbede chore: Version Packages (#5622)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-21 08:46:09 +00:00
github-actions[bot]
71d59d2c81 chore: Version Packages (#5527)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-10 10:28:21 +01:00
Kasper Fabricius Kristensen
e3f1da92db fix(admin-ui, ui): Align @types/react versions across UI packages (#5596)
* fix: Align @types/react versions across UI packages

* update codeowners
2023-11-10 08:31:30 +01:00
Kasper Fabricius Kristensen
e4ce2f4e07 chore(ui,icons,ui-preset,toolbox): Move design system packages to monorepo (#5470) 2023-11-07 22:17:44 +01:00