@mantajs/dashboard 0.1.7 → 0.1.9
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 +15 -21
- package/dist/app.mjs +1 -1
- package/dist/{chunk-ZQVS3F3X.mjs → chunk-DWLO2F7H.mjs} +18 -33
- package/dist/{product-attributes-DZZZDS2K.mjs → product-attributes-UJ4WTBZH.mjs} +1 -1
- package/dist/{product-create-P26FHFTZ.mjs → product-create-5HMCLMAO.mjs} +1 -1
- package/dist/{product-detail-6VCLGLEL.mjs → product-detail-D2EGSWFF.mjs} +1 -1
- package/dist/{product-edit-D75EWPGG.mjs → product-edit-4HWE7N3O.mjs} +1 -1
- package/dist/{product-organization-FESACGNN.mjs → product-organization-2Q76MMR4.mjs} +1 -1
- package/package.json +1 -1
- package/src/components/layout/main-layout/main-layout.tsx +11 -26
package/dist/app.js
CHANGED
|
@@ -100375,10 +100375,11 @@ 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_menu_config, import_jsx_runtime22,
|
|
100378
|
+
var MedusaIcons, import_icons10, import_ui14, import_radix_ui5, import_react_i18next10, import_react_router_dom9, import_menu_config, import_jsx_runtime22, getIcon, MainLayout, MainSidebar, Logout2, Header, getDefaultMedusaRoutes, useCoreRoutes, Searchbar, CoreRouteSection, getMainMenuPaths, 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";
|
|
100382
|
+
MedusaIcons = __toESM(require("@medusajs/icons"));
|
|
100382
100383
|
import_icons10 = require("@medusajs/icons");
|
|
100383
100384
|
import_ui14 = require("@medusajs/ui");
|
|
100384
100385
|
import_radix_ui5 = require("radix-ui");
|
|
@@ -100396,16 +100397,9 @@ var init_main_layout = __esm({
|
|
|
100396
100397
|
init_use_document_direction();
|
|
100397
100398
|
import_menu_config = __toESM(require("virtual:dashboard/menu-config"));
|
|
100398
100399
|
import_jsx_runtime22 = require("react/jsx-runtime");
|
|
100399
|
-
|
|
100400
|
-
|
|
100401
|
-
|
|
100402
|
-
Buildings: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons10.Buildings, {}),
|
|
100403
|
-
Users: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons10.Users, {}),
|
|
100404
|
-
ReceiptPercent: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons10.ReceiptPercent, {}),
|
|
100405
|
-
CurrencyDollar: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons10.CurrencyDollar, {}),
|
|
100406
|
-
BuildingStorefront: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons10.BuildingStorefront, {}),
|
|
100407
|
-
CogSixTooth: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons10.CogSixTooth, {}),
|
|
100408
|
-
SquaresPlus: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons10.SquaresPlus, {})
|
|
100400
|
+
getIcon = (name) => {
|
|
100401
|
+
const IconComponent = MedusaIcons[name] || MedusaIcons.SquaresPlus;
|
|
100402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(IconComponent, {});
|
|
100409
100403
|
};
|
|
100410
100404
|
MainLayout = () => {
|
|
100411
100405
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Shell, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MainSidebar, {}) });
|
|
@@ -100511,7 +100505,7 @@ var init_main_layout = __esm({
|
|
|
100511
100505
|
] }),
|
|
100512
100506
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_ui14.DropdownMenu.Separator, {}),
|
|
100513
100507
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_ui14.DropdownMenu.Item, { className: "gap-x-2", asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react_router_dom9.Link, { to: "/settings/store", children: [
|
|
100514
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
100508
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BuildingStorefront, { className: "text-ui-fg-subtle" }),
|
|
100515
100509
|
t5("app.nav.main.storeSettings")
|
|
100516
100510
|
] }) }),
|
|
100517
100511
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_ui14.DropdownMenu.Separator, {}),
|
|
@@ -100522,21 +100516,21 @@ var init_main_layout = __esm({
|
|
|
100522
100516
|
) });
|
|
100523
100517
|
};
|
|
100524
100518
|
getDefaultMedusaRoutes = (t5) => [
|
|
100525
|
-
{ icon:
|
|
100526
|
-
{ icon:
|
|
100519
|
+
{ icon: getIcon("ShoppingCart"), label: t5("orders.domain"), to: "/orders", items: [] },
|
|
100520
|
+
{ icon: getIcon("Tag"), label: t5("products.domain"), to: "/products", items: [
|
|
100527
100521
|
{ label: t5("collections.domain"), to: "/collections" },
|
|
100528
100522
|
{ label: t5("categories.domain"), to: "/categories" }
|
|
100529
100523
|
] },
|
|
100530
|
-
{ icon:
|
|
100524
|
+
{ icon: getIcon("Buildings"), label: t5("inventory.domain"), to: "/inventory", items: [
|
|
100531
100525
|
{ label: t5("reservations.domain"), to: "/reservations" }
|
|
100532
100526
|
] },
|
|
100533
|
-
{ icon:
|
|
100527
|
+
{ icon: getIcon("Users"), label: t5("customers.domain"), to: "/customers", items: [
|
|
100534
100528
|
{ label: t5("customerGroups.domain"), to: "/customer-groups" }
|
|
100535
100529
|
] },
|
|
100536
|
-
{ icon:
|
|
100530
|
+
{ icon: getIcon("ReceiptPercent"), label: t5("promotions.domain"), to: "/promotions", items: [
|
|
100537
100531
|
{ label: t5("campaigns.domain"), to: "/campaigns" }
|
|
100538
100532
|
] },
|
|
100539
|
-
{ icon:
|
|
100533
|
+
{ icon: getIcon("CurrencyDollar"), label: t5("priceLists.domain"), to: "/price-lists" }
|
|
100540
100534
|
];
|
|
100541
100535
|
useCoreRoutes = () => {
|
|
100542
100536
|
const { t: t5 } = (0, import_react_i18next10.useTranslation)();
|
|
@@ -100544,7 +100538,7 @@ var init_main_layout = __esm({
|
|
|
100544
100538
|
return getDefaultMedusaRoutes(t5);
|
|
100545
100539
|
}
|
|
100546
100540
|
return import_menu_config.default.items.map((item) => ({
|
|
100547
|
-
icon:
|
|
100541
|
+
icon: getIcon(item.icon),
|
|
100548
100542
|
label: item.useTranslation ? t5(item.label) : item.label,
|
|
100549
100543
|
to: item.to,
|
|
100550
100544
|
items: item.items?.map((sub2) => ({
|
|
@@ -100628,7 +100622,7 @@ var init_main_layout = __esm({
|
|
|
100628
100622
|
{
|
|
100629
100623
|
to: item.to,
|
|
100630
100624
|
label: item.label,
|
|
100631
|
-
icon: item.icon ? item.icon : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
100625
|
+
icon: item.icon ? item.icon : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SquaresPlus, {}),
|
|
100632
100626
|
items: item.items,
|
|
100633
100627
|
translationNs: item.translationNs,
|
|
100634
100628
|
type: "extension"
|
|
@@ -100648,7 +100642,7 @@ var init_main_layout = __esm({
|
|
|
100648
100642
|
label: t5("app.nav.settings.header"),
|
|
100649
100643
|
to: "/settings",
|
|
100650
100644
|
from: location.pathname,
|
|
100651
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
100645
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CogSixTooth, {})
|
|
100652
100646
|
}
|
|
100653
100647
|
) });
|
|
100654
100648
|
};
|
package/dist/app.mjs
CHANGED
|
@@ -94515,21 +94515,13 @@ var ProtectedRoute = () => {
|
|
|
94515
94515
|
};
|
|
94516
94516
|
|
|
94517
94517
|
// src/components/layout/main-layout/main-layout.tsx
|
|
94518
|
+
import * as MedusaIcons from "@medusajs/icons";
|
|
94518
94519
|
import {
|
|
94519
|
-
BuildingStorefront,
|
|
94520
|
-
Buildings,
|
|
94521
94520
|
ChevronDownMini,
|
|
94522
|
-
CogSixTooth,
|
|
94523
|
-
CurrencyDollar,
|
|
94524
94521
|
EllipsisHorizontal as EllipsisHorizontal2,
|
|
94525
94522
|
MagnifyingGlass as MagnifyingGlass2,
|
|
94526
94523
|
MinusMini,
|
|
94527
|
-
OpenRectArrowOut as OpenRectArrowOut2
|
|
94528
|
-
ReceiptPercent,
|
|
94529
|
-
ShoppingCart,
|
|
94530
|
-
SquaresPlus,
|
|
94531
|
-
Tag,
|
|
94532
|
-
Users
|
|
94524
|
+
OpenRectArrowOut as OpenRectArrowOut2
|
|
94533
94525
|
} from "@medusajs/icons";
|
|
94534
94526
|
import { Avatar as Avatar2, Divider, DropdownMenu as DropdownMenu3, Text as Text5, clx as clx6 } from "@medusajs/ui";
|
|
94535
94527
|
import { Collapsible as RadixCollapsible2 } from "radix-ui";
|
|
@@ -95394,16 +95386,9 @@ var UserItem = () => {
|
|
|
95394
95386
|
// src/components/layout/main-layout/main-layout.tsx
|
|
95395
95387
|
import menuConfig from "virtual:dashboard/menu-config";
|
|
95396
95388
|
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
95397
|
-
var
|
|
95398
|
-
|
|
95399
|
-
|
|
95400
|
-
Buildings: /* @__PURE__ */ jsx13(Buildings, {}),
|
|
95401
|
-
Users: /* @__PURE__ */ jsx13(Users, {}),
|
|
95402
|
-
ReceiptPercent: /* @__PURE__ */ jsx13(ReceiptPercent, {}),
|
|
95403
|
-
CurrencyDollar: /* @__PURE__ */ jsx13(CurrencyDollar, {}),
|
|
95404
|
-
BuildingStorefront: /* @__PURE__ */ jsx13(BuildingStorefront, {}),
|
|
95405
|
-
CogSixTooth: /* @__PURE__ */ jsx13(CogSixTooth, {}),
|
|
95406
|
-
SquaresPlus: /* @__PURE__ */ jsx13(SquaresPlus, {})
|
|
95389
|
+
var getIcon = (name) => {
|
|
95390
|
+
const IconComponent = MedusaIcons[name] || MedusaIcons.SquaresPlus;
|
|
95391
|
+
return /* @__PURE__ */ jsx13(IconComponent, {});
|
|
95407
95392
|
};
|
|
95408
95393
|
var MainLayout = () => {
|
|
95409
95394
|
return /* @__PURE__ */ jsx13(Shell, { children: /* @__PURE__ */ jsx13(MainSidebar, {}) });
|
|
@@ -95520,21 +95505,21 @@ var Header = () => {
|
|
|
95520
95505
|
) });
|
|
95521
95506
|
};
|
|
95522
95507
|
var getDefaultMedusaRoutes = (t2) => [
|
|
95523
|
-
{ icon:
|
|
95524
|
-
{ icon:
|
|
95508
|
+
{ icon: getIcon("ShoppingCart"), label: t2("orders.domain"), to: "/orders", items: [] },
|
|
95509
|
+
{ icon: getIcon("Tag"), label: t2("products.domain"), to: "/products", items: [
|
|
95525
95510
|
{ label: t2("collections.domain"), to: "/collections" },
|
|
95526
95511
|
{ label: t2("categories.domain"), to: "/categories" }
|
|
95527
95512
|
] },
|
|
95528
|
-
{ icon:
|
|
95513
|
+
{ icon: getIcon("Buildings"), label: t2("inventory.domain"), to: "/inventory", items: [
|
|
95529
95514
|
{ label: t2("reservations.domain"), to: "/reservations" }
|
|
95530
95515
|
] },
|
|
95531
|
-
{ icon:
|
|
95516
|
+
{ icon: getIcon("Users"), label: t2("customers.domain"), to: "/customers", items: [
|
|
95532
95517
|
{ label: t2("customerGroups.domain"), to: "/customer-groups" }
|
|
95533
95518
|
] },
|
|
95534
|
-
{ icon:
|
|
95519
|
+
{ icon: getIcon("ReceiptPercent"), label: t2("promotions.domain"), to: "/promotions", items: [
|
|
95535
95520
|
{ label: t2("campaigns.domain"), to: "/campaigns" }
|
|
95536
95521
|
] },
|
|
95537
|
-
{ icon:
|
|
95522
|
+
{ icon: getIcon("CurrencyDollar"), label: t2("priceLists.domain"), to: "/price-lists" }
|
|
95538
95523
|
];
|
|
95539
95524
|
var useCoreRoutes = () => {
|
|
95540
95525
|
const { t: t2 } = useTranslation9();
|
|
@@ -95542,7 +95527,7 @@ var useCoreRoutes = () => {
|
|
|
95542
95527
|
return getDefaultMedusaRoutes(t2);
|
|
95543
95528
|
}
|
|
95544
95529
|
return menuConfig.items.map((item) => ({
|
|
95545
|
-
icon:
|
|
95530
|
+
icon: getIcon(item.icon),
|
|
95546
95531
|
label: item.useTranslation ? t2(item.label) : item.label,
|
|
95547
95532
|
to: item.to,
|
|
95548
95533
|
items: item.items?.map((sub) => ({
|
|
@@ -95961,7 +95946,7 @@ function getRouteMap({
|
|
|
95961
95946
|
children: [
|
|
95962
95947
|
{
|
|
95963
95948
|
path: "create",
|
|
95964
|
-
lazy: () => import("./product-create-
|
|
95949
|
+
lazy: () => import("./product-create-5HMCLMAO.mjs")
|
|
95965
95950
|
},
|
|
95966
95951
|
{
|
|
95967
95952
|
path: "import",
|
|
@@ -95977,7 +95962,7 @@ function getRouteMap({
|
|
|
95977
95962
|
path: ":id",
|
|
95978
95963
|
errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
|
|
95979
95964
|
lazy: async () => {
|
|
95980
|
-
const { Breadcrumb, loader } = await import("./product-detail-
|
|
95965
|
+
const { Breadcrumb, loader } = await import("./product-detail-D2EGSWFF.mjs");
|
|
95981
95966
|
return {
|
|
95982
95967
|
Component: Outlet4,
|
|
95983
95968
|
loader,
|
|
@@ -95989,11 +95974,11 @@ function getRouteMap({
|
|
|
95989
95974
|
children: [
|
|
95990
95975
|
{
|
|
95991
95976
|
path: "",
|
|
95992
|
-
lazy: () => import("./product-detail-
|
|
95977
|
+
lazy: () => import("./product-detail-D2EGSWFF.mjs"),
|
|
95993
95978
|
children: [
|
|
95994
95979
|
{
|
|
95995
95980
|
path: "edit",
|
|
95996
|
-
lazy: () => import("./product-edit-
|
|
95981
|
+
lazy: () => import("./product-edit-4HWE7N3O.mjs")
|
|
95997
95982
|
},
|
|
95998
95983
|
{
|
|
95999
95984
|
path: "edit-variant",
|
|
@@ -96005,11 +95990,11 @@ function getRouteMap({
|
|
|
96005
95990
|
},
|
|
96006
95991
|
{
|
|
96007
95992
|
path: "attributes",
|
|
96008
|
-
lazy: () => import("./product-attributes-
|
|
95993
|
+
lazy: () => import("./product-attributes-UJ4WTBZH.mjs")
|
|
96009
95994
|
},
|
|
96010
95995
|
{
|
|
96011
95996
|
path: "organization",
|
|
96012
|
-
lazy: () => import("./product-organization-
|
|
95997
|
+
lazy: () => import("./product-organization-2Q76MMR4.mjs")
|
|
96013
95998
|
},
|
|
96014
95999
|
{
|
|
96015
96000
|
path: "shipping-profile",
|
package/package.json
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
|
+
import * as MedusaIcons from "@medusajs/icons"
|
|
1
2
|
import {
|
|
2
|
-
BuildingStorefront,
|
|
3
|
-
Buildings,
|
|
4
3
|
ChevronDownMini,
|
|
5
|
-
CogSixTooth,
|
|
6
|
-
CurrencyDollar,
|
|
7
4
|
EllipsisHorizontal,
|
|
8
5
|
MagnifyingGlass,
|
|
9
6
|
MinusMini,
|
|
10
7
|
OpenRectArrowOut,
|
|
11
|
-
ReceiptPercent,
|
|
12
|
-
ShoppingCart,
|
|
13
|
-
SquaresPlus,
|
|
14
|
-
Tag,
|
|
15
|
-
Users,
|
|
16
8
|
} from "@medusajs/icons"
|
|
17
9
|
import { Avatar, Divider, DropdownMenu, Text, clx } from "@medusajs/ui"
|
|
18
10
|
import { Collapsible as RadixCollapsible } from "radix-ui"
|
|
@@ -33,16 +25,9 @@ import { useDocumentDirection } from "../../../hooks/use-document-direction"
|
|
|
33
25
|
import menuConfig from "virtual:dashboard/menu-config"
|
|
34
26
|
import type { MenuConfig } from "../../../vite-plugin/types"
|
|
35
27
|
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Buildings: <Buildings />,
|
|
40
|
-
Users: <Users />,
|
|
41
|
-
ReceiptPercent: <ReceiptPercent />,
|
|
42
|
-
CurrencyDollar: <CurrencyDollar />,
|
|
43
|
-
BuildingStorefront: <BuildingStorefront />,
|
|
44
|
-
CogSixTooth: <CogSixTooth />,
|
|
45
|
-
SquaresPlus: <SquaresPlus />,
|
|
28
|
+
const getIcon = (name: string): React.ReactNode => {
|
|
29
|
+
const IconComponent = (MedusaIcons as any)[name] || MedusaIcons.SquaresPlus
|
|
30
|
+
return <IconComponent />
|
|
46
31
|
}
|
|
47
32
|
|
|
48
33
|
export const MainLayout = () => {
|
|
@@ -192,21 +177,21 @@ const Header = () => {
|
|
|
192
177
|
}
|
|
193
178
|
|
|
194
179
|
const getDefaultMedusaRoutes = (t: (key: string) => string): Omit<INavItem, "pathname">[] => [
|
|
195
|
-
{ icon:
|
|
196
|
-
{ icon:
|
|
180
|
+
{ icon: getIcon("ShoppingCart"), label: t("orders.domain"), to: "/orders", items: [] },
|
|
181
|
+
{ icon: getIcon("Tag"), label: t("products.domain"), to: "/products", items: [
|
|
197
182
|
{ label: t("collections.domain"), to: "/collections" },
|
|
198
183
|
{ label: t("categories.domain"), to: "/categories" },
|
|
199
184
|
]},
|
|
200
|
-
{ icon:
|
|
185
|
+
{ icon: getIcon("Buildings"), label: t("inventory.domain"), to: "/inventory", items: [
|
|
201
186
|
{ label: t("reservations.domain"), to: "/reservations" },
|
|
202
187
|
]},
|
|
203
|
-
{ icon:
|
|
188
|
+
{ icon: getIcon("Users"), label: t("customers.domain"), to: "/customers", items: [
|
|
204
189
|
{ label: t("customerGroups.domain"), to: "/customer-groups" },
|
|
205
190
|
]},
|
|
206
|
-
{ icon:
|
|
191
|
+
{ icon: getIcon("ReceiptPercent"), label: t("promotions.domain"), to: "/promotions", items: [
|
|
207
192
|
{ label: t("campaigns.domain"), to: "/campaigns" },
|
|
208
193
|
]},
|
|
209
|
-
{ icon:
|
|
194
|
+
{ icon: getIcon("CurrencyDollar"), label: t("priceLists.domain"), to: "/price-lists" },
|
|
210
195
|
]
|
|
211
196
|
|
|
212
197
|
const useCoreRoutes = (): Omit<INavItem, "pathname">[] => {
|
|
@@ -217,7 +202,7 @@ const useCoreRoutes = (): Omit<INavItem, "pathname">[] => {
|
|
|
217
202
|
}
|
|
218
203
|
|
|
219
204
|
return (menuConfig as MenuConfig).items.map((item) => ({
|
|
220
|
-
icon:
|
|
205
|
+
icon: getIcon(item.icon),
|
|
221
206
|
label: item.useTranslation ? t(item.label) : item.label,
|
|
222
207
|
to: item.to,
|
|
223
208
|
items: item.items?.map((sub) => ({
|