@mantajs/dashboard 0.1.13 → 0.1.14
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.
- package/LICENSE +21 -0
- package/README.md +253 -0
- package/dist/{api-key-management-detail-TM6K63HF.mjs → api-key-management-detail-SZR6LLZY.mjs} +16 -16
- package/dist/{api-key-management-sales-channels-4GOYD6BF.mjs → api-key-management-sales-channels-WZAGFYC5.mjs} +6 -6
- package/dist/app.css +0 -20
- package/dist/app.js +11155 -11278
- package/dist/app.mjs +8 -8
- package/dist/campaign-create-FJOECKGT.mjs +1 -1
- package/dist/{chunk-LISLAU2F.mjs → chunk-FBYTX6K7.mjs} +7 -7
- package/dist/{chunk-VHUQFKRO.mjs → chunk-M5AMBSF6.mjs} +188 -181
- package/dist/{collection-list-KLL2VLDE.mjs → collection-list-EFER73U6.mjs} +10 -10
- package/dist/{customer-detail-DN46Z4Z7.mjs → customer-detail-NCPDOSIN.mjs} +15 -15
- package/dist/{customer-group-list-UW5KXNKV.mjs → customer-group-list-KZHWADWX.mjs} +17 -17
- package/dist/{home-524EFXYO.mjs → home-KFQGXKRT.mjs} +1 -1
- package/dist/{inventory-detail-42PY5NFS.mjs → inventory-detail-2MFCIKDT.mjs} +16 -16
- package/dist/{inventory-stock-MCURFEYD.mjs → inventory-stock-3PPGJ2JD.mjs} +8 -9
- package/dist/{location-fulfillment-providers-KQUDIYAF.mjs → location-fulfillment-providers-TXNXNHRD.mjs} +16 -16
- package/dist/{location-list-YDMTR5QM.mjs → location-list-KVBA6J47.mjs} +4 -4
- package/dist/{location-sales-channels-WGVKHV3B.mjs → location-sales-channels-P6O7KJAO.mjs} +6 -6
- package/dist/{location-service-zone-shipping-option-create-5XHKSHIS.mjs → location-service-zone-shipping-option-create-XXHX5DWG.mjs} +15 -15
- package/dist/{location-service-zone-shipping-option-pricing-VTD5YQ7X.mjs → location-service-zone-shipping-option-pricing-5HN2Z5RB.mjs} +2 -2
- package/dist/{order-export-Z7RZH5EX.mjs → order-export-IFN234IN.mjs} +12 -12
- package/dist/{order-list-BXZST6UW.mjs → order-list-57XK2DRD.mjs} +10 -10
- package/dist/{product-attributes-NT25DQN6.mjs → product-attributes-TGLEKV7Y.mjs} +8 -8
- package/dist/{product-create-GZANVK54.mjs → product-create-IGJXOMQN.mjs} +28 -28
- package/dist/{product-detail-P3LEJNTC.mjs → product-detail-ZZMHLWWL.mjs} +19 -19
- package/dist/{product-edit-ZWEDI4DK.mjs → product-edit-AH2FVEYF.mjs} +8 -8
- package/dist/{product-export-TJYITBFD.mjs → product-export-TX7U6SYH.mjs} +10 -10
- package/dist/{product-list-7EB54CNP.mjs → product-list-RZNYCKTQ.mjs} +13 -13
- package/dist/{product-media-WN2GYSM3.mjs → product-media-CG4RFOTX.mjs} +2 -2
- package/dist/{product-organization-3PJP3Y43.mjs → product-organization-C4LU2WFS.mjs} +8 -8
- package/dist/{product-sales-channels-KZMXJISB.mjs → product-sales-channels-XBALPVAL.mjs} +6 -6
- package/dist/{product-tag-detail-JPH3QX6V.mjs → product-tag-detail-JPNWE5QK.mjs} +12 -12
- package/dist/{product-tag-list-AOR3RSJW.mjs → product-tag-list-KOYJZMGY.mjs} +12 -12
- package/dist/promotion-add-campaign-DO67QK6M.mjs +1 -1
- package/dist/{refund-reason-list-GKHO2WDS.mjs → refund-reason-list-YROTDEQW.mjs} +12 -12
- package/dist/{sales-channel-list-SWDVR3IS.mjs → sales-channel-list-BHMHTVP5.mjs} +13 -13
- package/dist/{tax-region-detail-D22AOV54.mjs → tax-region-detail-JDWO7JFL.mjs} +17 -17
- package/dist/{tax-region-province-detail-B5FBOF3U.mjs → tax-region-province-detail-NEYURIVX.mjs} +17 -17
- package/dist/{tax-region-tax-override-create-XDO7RON2.mjs → tax-region-tax-override-create-EBTFIY7C.mjs} +19 -19
- package/dist/{tax-region-tax-override-edit-3RTRDVDI.mjs → tax-region-tax-override-edit-UUKEKERW.mjs} +15 -15
- package/dist/{user-list-XFW3SHWQ.mjs → user-list-YTZQNYSO.mjs} +5 -5
- package/dist/vite-plugin/index.js +79 -21
- package/dist/vite-plugin/index.mjs +79 -21
- package/package.json +29 -3
- package/src/components/layout/main-layout/main-layout.tsx +2 -2
- package/src/dashboard-app/dashboard-app.tsx +2 -1
- package/src/dashboard-app/forms/hooks.tsx +1 -1
- package/src/dashboard-app/links/utils.ts +1 -1
- package/src/dashboard-app/routes/get-route.map.tsx +0 -8
- package/src/dashboard-app/routes/merge-extension-routes.ts +13 -4
- package/src/dashboard-app/routes/utils.ts +1 -1
- package/src/dashboard-app/utils/sort-menu-items-by-rank.ts +9 -7
- package/src/index.css +2 -8
- package/src/routes/home/home.tsx +1 -1
- package/src/routes/inventory/inventory-stock/components/inventory-stock-form/inventory-stock-form.tsx +1 -1
- package/src/vite-env.d.ts +4 -4
- package/src/vite-plugin/index.ts +91 -21
- package/dist/dashboard-C2M5PQNL.mjs +0 -135
- package/src/routes/dashboard/dashboard.tsx +0 -174
- package/src/routes/dashboard/index.ts +0 -1
- package/dist/{add-campaign-promotions-H7C2TJIH.mjs → add-campaign-promotions-OYPGISTF.mjs} +6 -6
- package/dist/{add-locales-47HF5EWF.mjs → add-locales-F4BOSZNU.mjs} +10 -10
- package/dist/{api-key-management-list-DPFW5U7B.mjs → api-key-management-list-2T35G3KT.mjs} +4 -4
- package/dist/{campaign-budget-edit-NLP7CWGC.mjs → campaign-budget-edit-B5MSE26J.mjs} +3 -3
- package/dist/{campaign-detail-JWCA2BOR.mjs → campaign-detail-2SHJIBIS.mjs} +9 -9
- package/dist/{campaign-list-CXECHCH4.mjs → campaign-list-PEOTTWBA.mjs} +2 -2
- package/dist/{categories-metadata-WYRXRAIH.mjs → categories-metadata-4OV6MKAD.mjs} +7 -7
- package/dist/{category-create-RCWOWE4W.mjs → category-create-G2JK5KDF.mjs} +3 -3
- package/dist/{category-detail-3GT2DMFA.mjs → category-detail-2TPOPANL.mjs} +9 -9
- package/dist/{category-list-C3JVQYQF.mjs → category-list-WHGMREI2.mjs} +4 -4
- package/dist/{category-products-KHRVHYTY.mjs → category-products-LKS7U7MI.mjs} +13 -13
- package/dist/{chunk-RCTRYC7L.mjs → chunk-5FMYPGTX.mjs} +3 -3
- package/dist/{chunk-5WXY5NFW.mjs → chunk-DODQ3KJT.mjs} +3 -3
- package/dist/{chunk-QV7RN52R.mjs → chunk-JUZ754L2.mjs} +3 -3
- package/dist/{chunk-5YS7C2IA.mjs → chunk-KCWP7RF5.mjs} +3 -3
- package/dist/{chunk-K737PKHV.mjs → chunk-KSDXSKJ7.mjs} +3 -3
- package/dist/{collection-add-products-5U6UXZO5.mjs → collection-add-products-KTACHFJO.mjs} +12 -12
- package/dist/{collection-detail-62PCW5E4.mjs → collection-detail-7GFJ3MAT.mjs} +9 -9
- package/dist/{collection-metadata-72WIRMTB.mjs → collection-metadata-EVPJGU6A.mjs} +7 -7
- package/dist/{customer-group-add-customers-OHFJCJAX.mjs → customer-group-add-customers-XMR2WBXX.mjs} +6 -6
- package/dist/{customer-group-detail-W2JHFS5S.mjs → customer-group-detail-GWTXNJ3C.mjs} +13 -13
- package/dist/{customer-list-RRV4GEKX.mjs → customer-list-UI5EQDII.mjs} +2 -2
- package/dist/{customers-add-customer-group-CG24Z4SE.mjs → customers-add-customer-group-3XYEAGX4.mjs} +16 -16
- package/dist/{edit-rules-IMAV7O5S.mjs → edit-rules-OOIFNR4Z.mjs} +7 -7
- package/dist/{inventory-create-PUU6JZLV.mjs → inventory-create-HQNGRBCA.mjs} +16 -16
- package/dist/{inventory-list-R5DC2CUH.mjs → inventory-list-IPORNDO4.mjs} +4 -4
- package/dist/{inventory-metadata-S66XTCLQ.mjs → inventory-metadata-RC7I7WAH.mjs} +7 -7
- package/dist/{location-detail-ULAMYS5R.mjs → location-detail-POZVJTS7.mjs} +8 -8
- package/dist/{location-service-zone-create-QINLHG5Y.mjs → location-service-zone-create-J43WN6G4.mjs} +3 -3
- package/dist/{location-service-zone-manage-areas-T5DBC22A.mjs → location-service-zone-manage-areas-6ZPMKMSX.mjs} +3 -3
- package/dist/{location-service-zone-shipping-option-edit-GGMKFUXK.mjs → location-service-zone-shipping-option-edit-4CGPQ3VT.mjs} +3 -3
- package/dist/{login-WK4YY6KQ.mjs → login-IMDOL4BZ.mjs} +7 -7
- package/dist/{order-create-claim-AB33KP6F.mjs → order-create-claim-H75RPNWI.mjs} +20 -20
- package/dist/{order-create-edit-QKGYBXVY.mjs → order-create-edit-6ZOYALA6.mjs} +15 -15
- package/dist/{order-create-exchange-YYNNY3HT.mjs → order-create-exchange-BUZTV7O7.mjs} +20 -20
- package/dist/{order-create-fulfillment-B4UKJX5F.mjs → order-create-fulfillment-YJS27E6Y.mjs} +9 -9
- package/dist/{order-create-refund-7MWFY4N3.mjs → order-create-refund-MY2VRRFA.mjs} +15 -15
- package/dist/{order-create-return-UZ2BDDH5.mjs → order-create-return-W3KT5LKU.mjs} +8 -8
- package/dist/{order-create-shipment-626Z6TQY.mjs → order-create-shipment-QMFZC6ZM.mjs} +9 -9
- package/dist/{order-detail-HISCRCUI.mjs → order-detail-VYLTG5MG.mjs} +20 -20
- package/dist/{order-edit-billing-address-3KER7QBF.mjs → order-edit-billing-address-ZZ4KK47F.mjs} +9 -9
- package/dist/{order-edit-email-4VZBU7P3.mjs → order-edit-email-TCRXOK3W.mjs} +9 -9
- package/dist/{order-edit-shipping-address-RKSV6BV6.mjs → order-edit-shipping-address-C3K5IZRG.mjs} +9 -9
- package/dist/{order-metadata-3F3KZ3GQ.mjs → order-metadata-5ESVMAPY.mjs} +9 -9
- package/dist/{order-receive-return-DA7KQHSO.mjs → order-receive-return-7N3532LA.mjs} +10 -10
- package/dist/{order-request-transfer-FP4FQQXG.mjs → order-request-transfer-VUPJ2FET.mjs} +9 -9
- package/dist/{price-list-configuration-MTUTPHQE.mjs → price-list-configuration-OH3KGRDN.mjs} +5 -5
- package/dist/{price-list-create-6TE264GD.mjs → price-list-create-77TLF2P2.mjs} +14 -14
- package/dist/{price-list-detail-ZML6WEJG.mjs → price-list-detail-KDMHC6V4.mjs} +12 -12
- package/dist/{price-list-list-P4O3ONES.mjs → price-list-list-JJXWBCTJ.mjs} +5 -5
- package/dist/{price-list-prices-add-BZIVC7QO.mjs → price-list-prices-add-RWB7WFOE.mjs} +14 -14
- package/dist/{price-list-prices-edit-42U6MFTL.mjs → price-list-prices-edit-ICTQBHHM.mjs} +2 -2
- package/dist/{product-create-variant-5HSS43Z7.mjs → product-create-variant-7EIWI54C.mjs} +13 -13
- package/dist/{product-image-variants-edit-S336246K.mjs → product-image-variants-edit-DWZWPK64.mjs} +12 -12
- package/dist/{product-import-72B4A7NT.mjs → product-import-NPPDYH7E.mjs} +7 -7
- package/dist/{product-metadata-QC3M4MYP.mjs → product-metadata-YNSTB5IC.mjs} +7 -7
- package/dist/{product-prices-WEGXAXQO.mjs → product-prices-LAVS64HJ.mjs} +1 -1
- package/dist/{product-stock-C5XB6GSY.mjs → product-stock-PEGYC4J5.mjs} +11 -11
- package/dist/{product-tag-create-TBICZVLL.mjs → product-tag-create-DJQIEWOF.mjs} +7 -7
- package/dist/{product-tag-edit-3DQJQ5YE.mjs → product-tag-edit-76EA7NLB.mjs} +7 -7
- package/dist/{product-tag-metadata-MQ5SCB3J.mjs → product-tag-metadata-HMCF2W4C.mjs} +7 -7
- package/dist/{product-type-detail-N2MDJT6X.mjs → product-type-detail-IJ6FGSB2.mjs} +9 -9
- package/dist/{product-type-list-BZDXJ2HH.mjs → product-type-list-MQ2PW2IE.mjs} +2 -2
- package/dist/{product-type-metadata-WPX7ZGF4.mjs → product-type-metadata-5Y5M2IQP.mjs} +7 -7
- package/dist/{product-variant-detail-PR4HNZ5A.mjs → product-variant-detail-N7YAKUOH.mjs} +8 -8
- package/dist/{product-variant-edit-UZBA2SBV.mjs → product-variant-edit-L2T5V2HJ.mjs} +11 -11
- package/dist/{product-variant-metadata-3YFLI23Q.mjs → product-variant-metadata-VTAPSZ24.mjs} +7 -7
- package/dist/{promotion-create-QDNLZXBY.mjs → promotion-create-I7OYJO55.mjs} +11 -11
- package/dist/{promotion-detail-P2C5XMVT.mjs → promotion-detail-Q7MMF7CC.mjs} +8 -8
- package/dist/{promotion-edit-details-DDT7MQVJ.mjs → promotion-edit-details-6BSOOWQN.mjs} +4 -4
- package/dist/{promotion-list-JFBYPMYZ.mjs → promotion-list-L22GJE3P.mjs} +2 -2
- package/dist/{refund-reason-create-DY22FUI4.mjs → refund-reason-create-UFAJFFFX.mjs} +7 -7
- package/dist/{refund-reason-edit-GLTVSOTD.mjs → refund-reason-edit-HM42SYVK.mjs} +7 -7
- package/dist/{region-add-countries-7P7MDPO2.mjs → region-add-countries-2VAVXMJQ.mjs} +3 -3
- package/dist/{region-create-DIZZS7HR.mjs → region-create-NA7Y2LN4.mjs} +6 -6
- package/dist/{region-detail-PL2IAQ4V.mjs → region-detail-3BARMXUE.mjs} +2 -2
- package/dist/{region-edit-2XQSSCPV.mjs → region-edit-WAU347DP.mjs} +3 -3
- package/dist/{region-list-J7R4D635.mjs → region-list-V4R2REMH.mjs} +2 -2
- package/dist/{region-metadata-ISC23DPY.mjs → region-metadata-UZXRJHUJ.mjs} +7 -7
- package/dist/{reservation-detail-7HTLPUEY.mjs → reservation-detail-JRY5S7TS.mjs} +9 -9
- package/dist/{reservation-list-IQ7T3RF2.mjs → reservation-list-HSF22GFZ.mjs} +4 -4
- package/dist/{reservation-metadata-E55IGDZR.mjs → reservation-metadata-UQZXHUCV.mjs} +9 -9
- package/dist/{return-reason-list-EGGZ7O6G.mjs → return-reason-list-EYLIXARO.mjs} +4 -4
- package/dist/{sales-channel-add-products-M37VZP3G.mjs → sales-channel-add-products-WNHRWOZS.mjs} +14 -14
- package/dist/{sales-channel-detail-4E2NPXYK.mjs → sales-channel-detail-GKI35W5H.mjs} +10 -10
- package/dist/{sales-channel-metadata-TXFO5GWM.mjs → sales-channel-metadata-GY2GM5OH.mjs} +8 -8
- package/dist/{shipping-option-type-create-Q47KBJCI.mjs → shipping-option-type-create-WKI3RSYP.mjs} +7 -7
- package/dist/{shipping-option-type-detail-UM6CAZRM.mjs → shipping-option-type-detail-RJ75KMFI.mjs} +7 -7
- package/dist/{shipping-option-type-edit-UB3ORRBC.mjs → shipping-option-type-edit-4KGCJFG3.mjs} +7 -7
- package/dist/{shipping-option-type-list-H3VQNXL7.mjs → shipping-option-type-list-NAT6DIHR.mjs} +11 -11
- package/dist/{shipping-profile-metadata-3VGQN6KZ.mjs → shipping-profile-metadata-6D3FYDC4.mjs} +7 -7
- package/dist/{shipping-profiles-list-RCSILIP5.mjs → shipping-profiles-list-WRPIJBZZ.mjs} +4 -4
- package/dist/{store-add-currencies-JCQAADSP.mjs → store-add-currencies-OX2WXFMS.mjs} +3 -3
- package/dist/{store-add-locales-S2HKXAPY.mjs → store-add-locales-37443R2E.mjs} +10 -10
- package/dist/{store-detail-LRVBWDU5.mjs → store-detail-IIKGTBWO.mjs} +11 -11
- package/dist/{store-metadata-X7X7J26V.mjs → store-metadata-3P5YI3YQ.mjs} +7 -7
- package/dist/{tax-region-create-BH4AS4OU.mjs → tax-region-create-BFOF2UVZ.mjs} +7 -7
- package/dist/{tax-region-edit-AGUULZKA.mjs → tax-region-edit-I2DTFHH4.mjs} +7 -7
- package/dist/{tax-region-list-ZYTJG7HC.mjs → tax-region-list-P4LDOPZD.mjs} +1 -1
- package/dist/{translation-list-3EGUQC7L.mjs → translation-list-2QIA5IZ4.mjs} +7 -7
- package/dist/{translations-edit-IWXQCTSI.mjs → translations-edit-K7EMV5N3.mjs} +8 -8
- package/dist/{user-invite-AQQMVG4K.mjs → user-invite-GAGIM5DO.mjs} +5 -5
- package/dist/{user-metadata-CGFMJKPT.mjs → user-metadata-WQ57HEMA.mjs} +7 -7
- package/dist/{workflow-execution-detail-QKA2H2VA.mjs → workflow-execution-detail-RRZJQZV6.mjs} +7 -7
- package/dist/{workflow-execution-list-N6YFMSXW.mjs → workflow-execution-list-C3EJMVSZ.mjs} +4 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-present MantaJS Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
# @mantajs/dashboard
|
|
2
|
+
|
|
3
|
+
A customizable fork of `@medusajs/dashboard` that lets you **override components**, **override routes**, and **define your own sidebar menu** — without modifying the original dashboard source code.
|
|
4
|
+
|
|
5
|
+
Drop-in replacement for `@medusajs/dashboard` via package manager resolutions/overrides.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Yarn
|
|
11
|
+
yarn add @mantajs/dashboard
|
|
12
|
+
|
|
13
|
+
# npm
|
|
14
|
+
npm install @mantajs/dashboard
|
|
15
|
+
|
|
16
|
+
# pnpm
|
|
17
|
+
pnpm add @mantajs/dashboard
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Using as a dashboard replacement
|
|
21
|
+
|
|
22
|
+
In your Medusa backend's `package.json`, add a resolution/override to swap `@medusajs/dashboard` with `@mantajs/dashboard`. The syntax depends on your package manager:
|
|
23
|
+
|
|
24
|
+
#### Yarn (v1 & v4+)
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"resolutions": {
|
|
29
|
+
"@medusajs/dashboard": "npm:@mantajs/dashboard@^0.1.13"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
#### npm (v8.3+)
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"overrides": {
|
|
39
|
+
"@medusajs/dashboard": "npm:@mantajs/dashboard@^0.1.13"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
#### pnpm
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"pnpm": {
|
|
49
|
+
"overrides": {
|
|
50
|
+
"@medusajs/dashboard": "npm:@mantajs/dashboard@^0.1.13"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Then register the Vite plugin in your `medusa-config.ts`:
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
import { defineConfig } from "@medusajs/framework/config"
|
|
60
|
+
import { customDashboardPlugin } from "@mantajs/dashboard/vite-plugin"
|
|
61
|
+
|
|
62
|
+
export default defineConfig({
|
|
63
|
+
// ...
|
|
64
|
+
admin: {
|
|
65
|
+
vite: () => ({
|
|
66
|
+
plugins: [customDashboardPlugin()],
|
|
67
|
+
}),
|
|
68
|
+
},
|
|
69
|
+
})
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Run `medusa build` (or `medusa develop`) and the custom dashboard will be compiled in place of the stock one.
|
|
73
|
+
|
|
74
|
+
## Features
|
|
75
|
+
|
|
76
|
+
### 1. Component Overrides
|
|
77
|
+
|
|
78
|
+
Replace any dashboard component by placing a file with the **same name** in your project's `src/admin/components/` directory. The plugin **recursively scans** the entire `components/` tree, so you can organize overrides in subdirectories.
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
your-project/
|
|
82
|
+
└── src/
|
|
83
|
+
└── admin/
|
|
84
|
+
└── components/
|
|
85
|
+
├── product-general-section.tsx ← flat override (works)
|
|
86
|
+
├── orders/
|
|
87
|
+
│ └── order-activity-section.tsx ← nested override (works too)
|
|
88
|
+
└── forms/
|
|
89
|
+
└── shipping-address-form.tsx ← deeply nested (works too)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**How it works:**
|
|
93
|
+
|
|
94
|
+
During Vite's pre-bundling phase, the plugin redirects the dashboard's `dist/app.mjs` entry to source files. It then intercepts individual source file loads and swaps any component whose filename matches one of your overrides.
|
|
95
|
+
|
|
96
|
+
Matching is done by **file name** (without extension), regardless of subdirectory depth. For example:
|
|
97
|
+
|
|
98
|
+
| Your file | Overrides |
|
|
99
|
+
|-----------|-----------|
|
|
100
|
+
| `product-general-section.tsx` | `src/routes/products/.../product-general-section.tsx` |
|
|
101
|
+
| `orders/order-list.tsx` | `src/routes/orders/order-list/order-list.tsx` |
|
|
102
|
+
| `layout/main-layout.tsx` | `src/components/layout/main-layout/main-layout.tsx` |
|
|
103
|
+
|
|
104
|
+
Your override component must export a `default` export:
|
|
105
|
+
|
|
106
|
+
```tsx
|
|
107
|
+
// src/admin/components/orders/order-activity-section.tsx
|
|
108
|
+
const OrderActivitySection = () => {
|
|
109
|
+
return <div>My custom order activity section</div>
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export default OrderActivitySection
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Important notes:**
|
|
116
|
+
|
|
117
|
+
- Override files are discovered **recursively** in `src/admin/components/` and all its subdirectories.
|
|
118
|
+
- Matching is based on **file name only** — the subdirectory structure is for your own organization and does not affect matching.
|
|
119
|
+
- If two files in different subdirectories share the same name, the plugin logs a warning in development and uses the one that comes last alphabetically by full path.
|
|
120
|
+
- Index/barrel files (`index.ts`) are never overridden to preserve re-exports.
|
|
121
|
+
- The plugin forces Vite to re-optimize dependencies when overrides are present, so changes are always picked up.
|
|
122
|
+
|
|
123
|
+
### 2. Route Overrides
|
|
124
|
+
|
|
125
|
+
Add new pages or replace existing ones using Medusa's standard admin extension system.
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
your-project/
|
|
129
|
+
└── src/
|
|
130
|
+
└── admin/
|
|
131
|
+
└── routes/
|
|
132
|
+
└── custom-page/
|
|
133
|
+
└── page.tsx ← adds /custom-page to the dashboard
|
|
134
|
+
└── orders/
|
|
135
|
+
└── page.tsx ← overrides the /orders page
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**How merging works:**
|
|
139
|
+
|
|
140
|
+
- If your extension route has a path that **doesn't exist** in the dashboard, it's added as a new route.
|
|
141
|
+
- If your extension route has the **same path** as a built-in route, your component **replaces** the original.
|
|
142
|
+
- Children of the original route that you **don't redefine** are preserved. For example, overriding `/orders` keeps `/orders/:id` intact.
|
|
143
|
+
|
|
144
|
+
This uses Medusa's `@medusajs/admin-vite-plugin` to discover routes in `src/admin/routes/`, combined with a custom merge function that ensures backward compatibility.
|
|
145
|
+
|
|
146
|
+
### 3. Custom Menu Configuration
|
|
147
|
+
|
|
148
|
+
Define your own sidebar menu by creating a `src/admin/menu.config.tsx` file:
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
your-project/
|
|
152
|
+
└── src/
|
|
153
|
+
└── admin/
|
|
154
|
+
└── menu.config.tsx
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
```tsx
|
|
158
|
+
// src/admin/menu.config.tsx
|
|
159
|
+
import { ShoppingCart, Users, BuildingStorefront } from "@medusajs/icons"
|
|
160
|
+
import type { MenuConfig } from "@mantajs/dashboard/vite-plugin"
|
|
161
|
+
|
|
162
|
+
const config: MenuConfig = {
|
|
163
|
+
items: [
|
|
164
|
+
{
|
|
165
|
+
icon: <ShoppingCart />,
|
|
166
|
+
label: "orders.domain",
|
|
167
|
+
to: "/orders",
|
|
168
|
+
useTranslation: true,
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
icon: <Users />,
|
|
172
|
+
label: "customers.domain",
|
|
173
|
+
to: "/customers",
|
|
174
|
+
useTranslation: true,
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
icon: <BuildingStorefront />,
|
|
178
|
+
label: "My Custom Page",
|
|
179
|
+
to: "/custom-page",
|
|
180
|
+
items: [
|
|
181
|
+
{ label: "Sub Page", to: "/custom-page/sub" },
|
|
182
|
+
],
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export default config
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**Menu item properties:**
|
|
191
|
+
|
|
192
|
+
| Property | Type | Description |
|
|
193
|
+
|----------|------|-------------|
|
|
194
|
+
| `icon` | `ReactNode` | Icon component (use `@medusajs/icons`) |
|
|
195
|
+
| `label` | `string` | Display label or i18n translation key |
|
|
196
|
+
| `to` | `string` | Route path |
|
|
197
|
+
| `useTranslation` | `boolean` | If `true`, `label` is treated as an i18n key |
|
|
198
|
+
| `items` | `MenuNestedItem[]` | Optional nested items |
|
|
199
|
+
|
|
200
|
+
**Types:**
|
|
201
|
+
|
|
202
|
+
```ts
|
|
203
|
+
import type { MenuConfig, MenuItem, MenuNestedItem } from "@mantajs/dashboard/vite-plugin"
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
When no `menu.config.ts` is found, the dashboard falls back to its built-in sidebar menu.
|
|
207
|
+
|
|
208
|
+
## Exports
|
|
209
|
+
|
|
210
|
+
| Import | Description |
|
|
211
|
+
|--------|-------------|
|
|
212
|
+
| `@mantajs/dashboard` | Main dashboard app (DashboardPlugin type, render function) |
|
|
213
|
+
| `@mantajs/dashboard/css` | Dashboard stylesheet |
|
|
214
|
+
| `@mantajs/dashboard/vite-plugin` | Vite plugin + menu types |
|
|
215
|
+
|
|
216
|
+
## Development
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
# Install dependencies
|
|
220
|
+
yarn install
|
|
221
|
+
|
|
222
|
+
# Start dev server (standalone dashboard)
|
|
223
|
+
yarn dev
|
|
224
|
+
|
|
225
|
+
# Build for distribution
|
|
226
|
+
yarn build
|
|
227
|
+
|
|
228
|
+
# Run tests
|
|
229
|
+
yarn test
|
|
230
|
+
|
|
231
|
+
# Validate i18n translations
|
|
232
|
+
yarn i18n:validate
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Environment Variables
|
|
236
|
+
|
|
237
|
+
| Variable | Default | Description |
|
|
238
|
+
|----------|---------|-------------|
|
|
239
|
+
| `VITE_MEDUSA_BACKEND_URL` | `http://localhost:9000` | Medusa backend URL |
|
|
240
|
+
| `VITE_MEDUSA_STOREFRONT_URL` | `http://localhost:8000` | Storefront URL |
|
|
241
|
+
| `VITE_MEDUSA_BASE` | `/` | Base path for the dashboard |
|
|
242
|
+
| `VITE_MEDUSA_PROJECT` | — | Path to a Medusa project to load admin extensions from |
|
|
243
|
+
|
|
244
|
+
## Compatibility
|
|
245
|
+
|
|
246
|
+
- **Medusa v2** (2.13.x)
|
|
247
|
+
- **React 18**
|
|
248
|
+
- **Vite 5**
|
|
249
|
+
- **TypeScript 5.6+**
|
|
250
|
+
|
|
251
|
+
## License
|
|
252
|
+
|
|
253
|
+
[MIT](LICENSE)
|
package/dist/{api-key-management-detail-TM6K63HF.mjs → api-key-management-detail-SZR6LLZY.mjs}
RENAMED
|
@@ -19,7 +19,11 @@ import {
|
|
|
19
19
|
import "./chunk-R4ZOO4ON.mjs";
|
|
20
20
|
import {
|
|
21
21
|
DataTable
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-KCWP7RF5.mjs";
|
|
23
|
+
import "./chunk-C76H5USB.mjs";
|
|
24
|
+
import {
|
|
25
|
+
useDate
|
|
26
|
+
} from "./chunk-DFFLVEZ5.mjs";
|
|
23
27
|
import "./chunk-G4BWCU5P.mjs";
|
|
24
28
|
import {
|
|
25
29
|
useExtension
|
|
@@ -33,14 +37,14 @@ import {
|
|
|
33
37
|
} from "./chunk-OZPB6JBL.mjs";
|
|
34
38
|
import "./chunk-OC7BQLYI.mjs";
|
|
35
39
|
import "./chunk-S4DMV3ZT.mjs";
|
|
36
|
-
import "./chunk-C76H5USB.mjs";
|
|
37
|
-
import {
|
|
38
|
-
useDate
|
|
39
|
-
} from "./chunk-DFFLVEZ5.mjs";
|
|
40
40
|
import "./chunk-535OVBXR.mjs";
|
|
41
41
|
import "./chunk-4GQYRG3L.mjs";
|
|
42
42
|
import "./chunk-I4OBEAOJ.mjs";
|
|
43
43
|
import "./chunk-FAB3VINY.mjs";
|
|
44
|
+
import "./chunk-HI6URQ7H.mjs";
|
|
45
|
+
import "./chunk-6CLQKVAU.mjs";
|
|
46
|
+
import "./chunk-KI7TOXBR.mjs";
|
|
47
|
+
import "./chunk-QBIQEVTU.mjs";
|
|
44
48
|
import {
|
|
45
49
|
apiKeysQueryKeys,
|
|
46
50
|
useApiKey,
|
|
@@ -48,10 +52,6 @@ import {
|
|
|
48
52
|
useDeleteApiKey,
|
|
49
53
|
useRevokeApiKey
|
|
50
54
|
} from "./chunk-C32SLRTC.mjs";
|
|
51
|
-
import "./chunk-HI6URQ7H.mjs";
|
|
52
|
-
import "./chunk-6CLQKVAU.mjs";
|
|
53
|
-
import "./chunk-KI7TOXBR.mjs";
|
|
54
|
-
import "./chunk-QBIQEVTU.mjs";
|
|
55
55
|
import "./chunk-WAXMT4IY.mjs";
|
|
56
56
|
import "./chunk-DYDGGABK.mjs";
|
|
57
57
|
import "./chunk-LGNTHZ5Y.mjs";
|
|
@@ -59,22 +59,22 @@ import "./chunk-CN7JXSGW.mjs";
|
|
|
59
59
|
import {
|
|
60
60
|
useUser
|
|
61
61
|
} from "./chunk-5BQQRHQS.mjs";
|
|
62
|
-
import "./chunk-6F74MBBU.mjs";
|
|
63
62
|
import "./chunk-FWRPGWPC.mjs";
|
|
63
|
+
import "./chunk-5AFMB7XQ.mjs";
|
|
64
|
+
import "./chunk-6F74MBBU.mjs";
|
|
64
65
|
import "./chunk-A63RZVX6.mjs";
|
|
65
66
|
import "./chunk-HBXV7ENS.mjs";
|
|
66
67
|
import "./chunk-CDORR33H.mjs";
|
|
68
|
+
import "./chunk-73OGFYCU.mjs";
|
|
69
|
+
import "./chunk-R3FD2XEU.mjs";
|
|
67
70
|
import "./chunk-6X2UTJF3.mjs";
|
|
68
|
-
import "./chunk-VCSSQVPD.mjs";
|
|
69
|
-
import "./chunk-HP2JH45P.mjs";
|
|
70
|
-
import "./chunk-SQDIZZDW.mjs";
|
|
71
71
|
import {
|
|
72
72
|
useSalesChannels
|
|
73
73
|
} from "./chunk-RNV5E7NV.mjs";
|
|
74
74
|
import "./chunk-3BF5SC66.mjs";
|
|
75
|
-
import "./chunk-
|
|
76
|
-
import "./chunk-
|
|
77
|
-
import "./chunk-
|
|
75
|
+
import "./chunk-VCSSQVPD.mjs";
|
|
76
|
+
import "./chunk-HP2JH45P.mjs";
|
|
77
|
+
import "./chunk-SQDIZZDW.mjs";
|
|
78
78
|
import "./chunk-3TPUO6MD.mjs";
|
|
79
79
|
import "./chunk-7AXHHXCX.mjs";
|
|
80
80
|
import {
|
|
@@ -8,6 +8,12 @@ import {
|
|
|
8
8
|
useSalesChannelTableQuery
|
|
9
9
|
} from "./chunk-APGDAT7X.mjs";
|
|
10
10
|
import "./chunk-BTYBTKWK.mjs";
|
|
11
|
+
import "./chunk-R4ZOO4ON.mjs";
|
|
12
|
+
import {
|
|
13
|
+
DataTable
|
|
14
|
+
} from "./chunk-KCWP7RF5.mjs";
|
|
15
|
+
import "./chunk-C76H5USB.mjs";
|
|
16
|
+
import "./chunk-DFFLVEZ5.mjs";
|
|
11
17
|
import "./chunk-IUCDCPJU.mjs";
|
|
12
18
|
import {
|
|
13
19
|
KeyboundForm
|
|
@@ -17,18 +23,12 @@ import {
|
|
|
17
23
|
RouteFocusModal,
|
|
18
24
|
useRouteModal
|
|
19
25
|
} from "./chunk-D6UW7URG.mjs";
|
|
20
|
-
import "./chunk-R4ZOO4ON.mjs";
|
|
21
|
-
import {
|
|
22
|
-
DataTable
|
|
23
|
-
} from "./chunk-5YS7C2IA.mjs";
|
|
24
26
|
import "./chunk-G4BWCU5P.mjs";
|
|
25
27
|
import "./chunk-OZPB6JBL.mjs";
|
|
26
28
|
import {
|
|
27
29
|
ConditionalTooltip
|
|
28
30
|
} from "./chunk-OC7BQLYI.mjs";
|
|
29
31
|
import "./chunk-S4DMV3ZT.mjs";
|
|
30
|
-
import "./chunk-C76H5USB.mjs";
|
|
31
|
-
import "./chunk-DFFLVEZ5.mjs";
|
|
32
32
|
import "./chunk-535OVBXR.mjs";
|
|
33
33
|
import "./chunk-OBQI23QM.mjs";
|
|
34
34
|
import {
|
package/dist/app.css
CHANGED
|
@@ -1908,9 +1908,6 @@ video {
|
|
|
1908
1908
|
.w-2\.5 {
|
|
1909
1909
|
width: 0.625rem;
|
|
1910
1910
|
}
|
|
1911
|
-
.w-20 {
|
|
1912
|
-
width: 5rem;
|
|
1913
|
-
}
|
|
1914
1911
|
.w-24 {
|
|
1915
1912
|
width: 6rem;
|
|
1916
1913
|
}
|
|
@@ -2580,9 +2577,6 @@ video {
|
|
|
2580
2577
|
.divide-dashed > :not([hidden]) ~ :not([hidden]) {
|
|
2581
2578
|
border-style: dashed;
|
|
2582
2579
|
}
|
|
2583
|
-
.divide-ui-border-base > :not([hidden]) ~ :not([hidden]) {
|
|
2584
|
-
border-color: var(--border-base);
|
|
2585
|
-
}
|
|
2586
2580
|
.self-start {
|
|
2587
2581
|
align-self: flex-start;
|
|
2588
2582
|
}
|
|
@@ -2724,9 +2718,6 @@ video {
|
|
|
2724
2718
|
.border-0 {
|
|
2725
2719
|
border-width: 0px;
|
|
2726
2720
|
}
|
|
2727
|
-
.border-2 {
|
|
2728
|
-
border-width: 2px;
|
|
2729
|
-
}
|
|
2730
2721
|
.border-\[0\.5px\] {
|
|
2731
2722
|
border-width: 0.5px;
|
|
2732
2723
|
}
|
|
@@ -2830,9 +2821,6 @@ video {
|
|
|
2830
2821
|
.border-t-ui-border-menu-top {
|
|
2831
2822
|
border-top-color: var(--border-menu-top);
|
|
2832
2823
|
}
|
|
2833
|
-
.border-t-ui-fg-base {
|
|
2834
|
-
border-top-color: var(--fg-base);
|
|
2835
|
-
}
|
|
2836
2824
|
.\!bg-ui-bg-base {
|
|
2837
2825
|
background-color: var(--bg-base) !important;
|
|
2838
2826
|
}
|
|
@@ -4037,11 +4025,6 @@ video {
|
|
|
4037
4025
|
-moz-appearance: textfield;
|
|
4038
4026
|
appearance: textfield;
|
|
4039
4027
|
}
|
|
4040
|
-
.worfklow-grid {
|
|
4041
|
-
background-image: radial-gradient(black 1px, transparent 0);
|
|
4042
|
-
background-size: 40px 40px;
|
|
4043
|
-
background: repeat;
|
|
4044
|
-
}
|
|
4045
4028
|
.data-\[state\=checked\]\:txt-compact-small-plus[data-state=checked] {
|
|
4046
4029
|
font-size: 0.8125rem;
|
|
4047
4030
|
line-height: 1.25rem;
|
|
@@ -5083,9 +5066,6 @@ video {
|
|
|
5083
5066
|
.lg\:grid-cols-2 {
|
|
5084
5067
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
5085
5068
|
}
|
|
5086
|
-
.lg\:grid-cols-4 {
|
|
5087
|
-
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
5088
|
-
}
|
|
5089
5069
|
.lg\:grid-cols-6 {
|
|
5090
5070
|
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
5091
5071
|
}
|