@mantajs/dashboard 0.1.0 → 0.1.2
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/dist/app.js +12 -3
- package/dist/app.mjs +1 -1
- package/dist/{chunk-HWHFHWIB.mjs → chunk-4ORJNP5R.mjs} +17 -8
- package/dist/{product-attributes-WGLFWXTC.mjs → product-attributes-WKZCBOVW.mjs} +1 -1
- package/dist/{product-create-O3LW54UN.mjs → product-create-BFV7NSQO.mjs} +1 -1
- package/dist/{product-detail-Q3MTTA4P.mjs → product-detail-TJCADPVY.mjs} +1 -1
- package/dist/{product-edit-6C5XFLX6.mjs → product-edit-B7BGAO43.mjs} +1 -1
- package/dist/{product-organization-33W4FFCO.mjs → product-organization-HZNGDALF.mjs} +1 -1
- package/package.json +8 -8
- package/src/components/layout/main-layout/main-layout.tsx +12 -1
package/dist/app.js
CHANGED
|
@@ -100375,7 +100375,7 @@ var init_user_menu2 = __esm({
|
|
|
100375
100375
|
});
|
|
100376
100376
|
|
|
100377
100377
|
// src/components/layout/main-layout/main-layout.tsx
|
|
100378
|
-
var import_icons10, import_ui14, import_radix_ui5, import_react_i18next10, import_react_router_dom9, import_jsx_runtime22, MainLayout, MainSidebar, Logout2, Header, useCoreRoutes, Searchbar, CoreRouteSection, ExtensionRouteSection, UtilitySection, UserSection;
|
|
100378
|
+
var import_icons10, import_ui14, import_radix_ui5, import_react_i18next10, import_react_router_dom9, import_jsx_runtime22, MainLayout, MainSidebar, Logout2, Header, useCoreRoutes, Searchbar, CoreRouteSection, MAIN_MENU_PATHS, ExtensionRouteSection, UtilitySection, UserSection;
|
|
100379
100379
|
var init_main_layout = __esm({
|
|
100380
100380
|
"src/components/layout/main-layout/main-layout.tsx"() {
|
|
100381
100381
|
"use strict";
|
|
@@ -100521,7 +100521,13 @@ var init_main_layout = __esm({
|
|
|
100521
100521
|
{
|
|
100522
100522
|
icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons10.BuildingStorefront, {}),
|
|
100523
100523
|
label: "Companies",
|
|
100524
|
-
to: "/companies"
|
|
100524
|
+
to: "/companies",
|
|
100525
|
+
items: [
|
|
100526
|
+
{
|
|
100527
|
+
label: "Employees",
|
|
100528
|
+
to: "/employees"
|
|
100529
|
+
}
|
|
100530
|
+
]
|
|
100525
100531
|
},
|
|
100526
100532
|
{
|
|
100527
100533
|
icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons10.Tag, {}),
|
|
@@ -100622,10 +100628,13 @@ var init_main_layout = __esm({
|
|
|
100622
100628
|
})
|
|
100623
100629
|
] });
|
|
100624
100630
|
};
|
|
100631
|
+
MAIN_MENU_PATHS = ["/companies", "/employees"];
|
|
100625
100632
|
ExtensionRouteSection = () => {
|
|
100626
100633
|
const { t: t5 } = (0, import_react_i18next10.useTranslation)();
|
|
100627
100634
|
const { getMenu } = useExtension();
|
|
100628
|
-
const menuItems = getMenu("coreExtensions").filter(
|
|
100635
|
+
const menuItems = getMenu("coreExtensions").filter(
|
|
100636
|
+
(item) => !item.nested && !MAIN_MENU_PATHS.includes(item.to) && !MAIN_MENU_PATHS.includes(item.path)
|
|
100637
|
+
);
|
|
100629
100638
|
if (!menuItems.length) {
|
|
100630
100639
|
return null;
|
|
100631
100640
|
}
|
package/dist/app.mjs
CHANGED
|
@@ -95519,7 +95519,13 @@ var useCoreRoutes = () => {
|
|
|
95519
95519
|
{
|
|
95520
95520
|
icon: /* @__PURE__ */ jsx13(BuildingStorefront, {}),
|
|
95521
95521
|
label: "Companies",
|
|
95522
|
-
to: "/companies"
|
|
95522
|
+
to: "/companies",
|
|
95523
|
+
items: [
|
|
95524
|
+
{
|
|
95525
|
+
label: "Employees",
|
|
95526
|
+
to: "/employees"
|
|
95527
|
+
}
|
|
95528
|
+
]
|
|
95523
95529
|
},
|
|
95524
95530
|
{
|
|
95525
95531
|
icon: /* @__PURE__ */ jsx13(Tag, {}),
|
|
@@ -95620,10 +95626,13 @@ var CoreRouteSection = () => {
|
|
|
95620
95626
|
})
|
|
95621
95627
|
] });
|
|
95622
95628
|
};
|
|
95629
|
+
var MAIN_MENU_PATHS = ["/companies", "/employees"];
|
|
95623
95630
|
var ExtensionRouteSection = () => {
|
|
95624
95631
|
const { t: t2 } = useTranslation9();
|
|
95625
95632
|
const { getMenu } = useExtension();
|
|
95626
|
-
const menuItems = getMenu("coreExtensions").filter(
|
|
95633
|
+
const menuItems = getMenu("coreExtensions").filter(
|
|
95634
|
+
(item) => !item.nested && !MAIN_MENU_PATHS.includes(item.to) && !MAIN_MENU_PATHS.includes(item.path)
|
|
95635
|
+
);
|
|
95627
95636
|
if (!menuItems.length) {
|
|
95628
95637
|
return null;
|
|
95629
95638
|
}
|
|
@@ -95970,7 +95979,7 @@ function getRouteMap({
|
|
|
95970
95979
|
children: [
|
|
95971
95980
|
{
|
|
95972
95981
|
path: "create",
|
|
95973
|
-
lazy: () => import("./product-create-
|
|
95982
|
+
lazy: () => import("./product-create-BFV7NSQO.mjs")
|
|
95974
95983
|
},
|
|
95975
95984
|
{
|
|
95976
95985
|
path: "import",
|
|
@@ -95986,7 +95995,7 @@ function getRouteMap({
|
|
|
95986
95995
|
path: ":id",
|
|
95987
95996
|
errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
|
|
95988
95997
|
lazy: async () => {
|
|
95989
|
-
const { Breadcrumb, loader } = await import("./product-detail-
|
|
95998
|
+
const { Breadcrumb, loader } = await import("./product-detail-TJCADPVY.mjs");
|
|
95990
95999
|
return {
|
|
95991
96000
|
Component: Outlet4,
|
|
95992
96001
|
loader,
|
|
@@ -95998,11 +96007,11 @@ function getRouteMap({
|
|
|
95998
96007
|
children: [
|
|
95999
96008
|
{
|
|
96000
96009
|
path: "",
|
|
96001
|
-
lazy: () => import("./product-detail-
|
|
96010
|
+
lazy: () => import("./product-detail-TJCADPVY.mjs"),
|
|
96002
96011
|
children: [
|
|
96003
96012
|
{
|
|
96004
96013
|
path: "edit",
|
|
96005
|
-
lazy: () => import("./product-edit-
|
|
96014
|
+
lazy: () => import("./product-edit-B7BGAO43.mjs")
|
|
96006
96015
|
},
|
|
96007
96016
|
{
|
|
96008
96017
|
path: "edit-variant",
|
|
@@ -96014,11 +96023,11 @@ function getRouteMap({
|
|
|
96014
96023
|
},
|
|
96015
96024
|
{
|
|
96016
96025
|
path: "attributes",
|
|
96017
|
-
lazy: () => import("./product-attributes-
|
|
96026
|
+
lazy: () => import("./product-attributes-WKZCBOVW.mjs")
|
|
96018
96027
|
},
|
|
96019
96028
|
{
|
|
96020
96029
|
path: "organization",
|
|
96021
|
-
lazy: () => import("./product-organization-
|
|
96030
|
+
lazy: () => import("./product-organization-HZNGDALF.mjs")
|
|
96022
96031
|
},
|
|
96023
96032
|
{
|
|
96024
96033
|
path: "shipping-profile",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mantajs/dashboard",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "B2B Admin Dashboard for Medusa - Fork of @medusajs/dashboard",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"@dnd-kit/utilities": "^3.2.2",
|
|
41
41
|
"@hookform/error-message": "^2.0.1",
|
|
42
42
|
"@hookform/resolvers": "3.4.2",
|
|
43
|
-
"@medusajs/admin-shared": "2.13.
|
|
44
|
-
"@medusajs/icons": "2.13.
|
|
45
|
-
"@medusajs/js-sdk": "2.13.
|
|
43
|
+
"@medusajs/admin-shared": "2.13.1",
|
|
44
|
+
"@medusajs/icons": "2.13.1",
|
|
45
|
+
"@medusajs/js-sdk": "2.13.1",
|
|
46
46
|
"@medusajs/ui": "4.1.0",
|
|
47
47
|
"@radix-ui/react-dialog": "1.1.4",
|
|
48
48
|
"@radix-ui/react-dismissable-layer": "1.1.4",
|
|
@@ -74,10 +74,10 @@
|
|
|
74
74
|
"zod": "3.25.76"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@medusajs/admin-shared": "2.13.
|
|
78
|
-
"@medusajs/admin-vite-plugin": "2.13.
|
|
79
|
-
"@medusajs/types": "2.13.
|
|
80
|
-
"@medusajs/ui-preset": "2.13.
|
|
77
|
+
"@medusajs/admin-shared": "2.13.1",
|
|
78
|
+
"@medusajs/admin-vite-plugin": "2.13.1",
|
|
79
|
+
"@medusajs/types": "2.13.1",
|
|
80
|
+
"@medusajs/ui-preset": "2.13.1",
|
|
81
81
|
"@vitejs/plugin-react": "^4.0.0",
|
|
82
82
|
"tsup": "^8.0.0",
|
|
83
83
|
"typescript": "^5.6.2",
|
|
@@ -191,6 +191,12 @@ const useCoreRoutes = (): Omit<INavItem, "pathname">[] => {
|
|
|
191
191
|
icon: <BuildingStorefront />,
|
|
192
192
|
label: "Companies",
|
|
193
193
|
to: "/companies",
|
|
194
|
+
items: [
|
|
195
|
+
{
|
|
196
|
+
label: "Employees",
|
|
197
|
+
to: "/employees",
|
|
198
|
+
},
|
|
199
|
+
],
|
|
194
200
|
},
|
|
195
201
|
{
|
|
196
202
|
icon: <Tag />,
|
|
@@ -307,11 +313,16 @@ const CoreRouteSection = () => {
|
|
|
307
313
|
)
|
|
308
314
|
}
|
|
309
315
|
|
|
316
|
+
// Paths already in the main menu (to avoid duplication in Extensions)
|
|
317
|
+
const MAIN_MENU_PATHS = ["/companies", "/employees"]
|
|
318
|
+
|
|
310
319
|
const ExtensionRouteSection = () => {
|
|
311
320
|
const { t } = useTranslation()
|
|
312
321
|
const { getMenu } = useExtension()
|
|
313
322
|
|
|
314
|
-
const menuItems = getMenu("coreExtensions").filter(
|
|
323
|
+
const menuItems = getMenu("coreExtensions").filter(
|
|
324
|
+
(item) => !item.nested && !MAIN_MENU_PATHS.includes(item.to) && !MAIN_MENU_PATHS.includes(item.path)
|
|
325
|
+
)
|
|
315
326
|
|
|
316
327
|
if (!menuItems.length) {
|
|
317
328
|
return null
|