@headless-adminapp/fluent 1.4.18 → 1.4.19
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.
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AppHeaderContainer = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
-
const react_nav_preview_1 = require("@fluentui/react-nav-preview");
|
|
7
6
|
const app_1 = require("@headless-adminapp/app/app");
|
|
8
7
|
const hooks_1 = require("@headless-adminapp/app/auth/hooks");
|
|
9
8
|
const useIsSkipAuthCheck_1 = require("@headless-adminapp/app/auth/hooks/useIsSkipAuthCheck");
|
|
@@ -28,7 +27,7 @@ const AppHeaderContainer = ({ onNavToggle, }) => {
|
|
|
28
27
|
exports.AppHeaderContainer = AppHeaderContainer;
|
|
29
28
|
const NavHamburger = ({ onNavToggle }) => {
|
|
30
29
|
const isMobile = (0, hooks_2.useIsMobile)();
|
|
31
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Hamburger, { style: {
|
|
32
31
|
color: 'inherit',
|
|
33
32
|
width: !isMobile ? 44 : undefined,
|
|
34
33
|
maxWidth: !isMobile ? 44 : undefined,
|
|
@@ -37,7 +36,7 @@ const NavHamburger = ({ onNavToggle }) => {
|
|
|
37
36
|
const NavBackButton = () => {
|
|
38
37
|
const isMobile = (0, hooks_2.useIsMobile)();
|
|
39
38
|
const router = (0, route_1.useRouter)();
|
|
40
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
39
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Hamburger, { style: {
|
|
41
40
|
color: 'inherit',
|
|
42
41
|
width: !isMobile ? 44 : undefined,
|
|
43
42
|
maxWidth: !isMobile ? 44 : undefined,
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NavCategoryItemComponent = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
-
const react_nav_preview_1 = require("@fluentui/react-nav-preview");
|
|
7
6
|
const icons_1 = require("@headless-adminapp/icons");
|
|
8
7
|
const useStyles = (0, react_components_1.makeStyles)({
|
|
9
8
|
activeNavCategoryItem: {
|
|
@@ -15,6 +14,6 @@ const useStyles = (0, react_components_1.makeStyles)({
|
|
|
15
14
|
const NavCategoryItemComponent = ({ item, isActive, }) => {
|
|
16
15
|
const styles = useStyles();
|
|
17
16
|
const Icon = item.Icon ?? icons_1.IconPlaceholder;
|
|
18
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.NavCategoryItem, { icon: (0, jsx_runtime_1.jsx)(Icon, { filled: isActive, color: isActive ? 'var(--colorNeutralForeground2BrandSelected)' : undefined }), className: isActive ? styles.activeNavCategoryItem : undefined, children: item.label }));
|
|
19
18
|
};
|
|
20
19
|
exports.NavCategoryItemComponent = NavCategoryItemComponent;
|
|
@@ -3,11 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NavItemComponent = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
-
const react_nav_preview_1 = require("@fluentui/react-nav-preview");
|
|
7
6
|
const usePrefetch_1 = require("./usePrefetch");
|
|
8
7
|
const NavItemComponent = ({ item, onClick, isMini, }) => {
|
|
9
8
|
(0, usePrefetch_1.usePrefetch)(item);
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.NavItem, { href: item.link, onClick: (event) => {
|
|
11
10
|
event.preventDefault();
|
|
12
11
|
onClick(item);
|
|
13
12
|
}, style: {
|
|
@@ -3,11 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NavSubItemComponent = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
-
const react_nav_preview_1 = require("@fluentui/react-nav-preview");
|
|
7
6
|
const usePrefetch_1 = require("./usePrefetch");
|
|
8
7
|
const NavSubItemComponent = ({ item, onClick, }) => {
|
|
9
8
|
(0, usePrefetch_1.usePrefetch)(item);
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.NavSubItem, { href: item.link, onClick: (event) => {
|
|
11
10
|
event.preventDefault();
|
|
12
11
|
onClick(item);
|
|
13
12
|
}, style: {
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NavigationContainer = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
-
const react_nav_preview_1 = require("@fluentui/react-nav-preview");
|
|
7
6
|
const app_1 = require("@headless-adminapp/app/app");
|
|
8
7
|
const locale_1 = require("@headless-adminapp/app/locale");
|
|
9
8
|
const hooks_1 = require("@headless-adminapp/app/route/hooks");
|
|
@@ -58,17 +57,17 @@ const NavigationContainer = ({ open, type, onOpenChange, isMini, }) => {
|
|
|
58
57
|
router.push(item.link);
|
|
59
58
|
}
|
|
60
59
|
};
|
|
61
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: styles.root, children: (0, jsx_runtime_1.jsx)(
|
|
60
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: styles.root, children: (0, jsx_runtime_1.jsx)(react_components_1.NavDrawer, { selectedValue: "active", selectedCategoryValue: "active", defaultOpenCategories: ['active'], open: open || isMini, type: type, onOpenChange: (_value, data) => onOpenChange(data.open), onNavItemSelect: () => {
|
|
62
61
|
// do nothing
|
|
63
|
-
}, style: { width: isMini ? 60 : undefined }, children: (0, jsx_runtime_1.jsx)(
|
|
62
|
+
}, style: { width: isMini ? 60 : undefined }, children: (0, jsx_runtime_1.jsx)(react_components_1.NavDrawerBody, { style: {
|
|
64
63
|
paddingTop: 8,
|
|
65
|
-
}, children: sections.map((section, index) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [!section.hideLabel && !isMini && ((0, jsx_runtime_1.jsx)(
|
|
64
|
+
}, children: sections.map((section, index) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [!section.hideLabel && !isMini && ((0, jsx_runtime_1.jsx)(react_components_1.NavSectionHeader, { children: section.label })), isMini && index > 0 && ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(react_components_1.Divider, { style: { opacity: 0.5 } }) })), section.items.map((item) => {
|
|
66
65
|
if (item.type === app_2.PageType.Category) {
|
|
67
66
|
const isActive = item.items.some((subItem) => subItem.active);
|
|
68
67
|
if (isMini) {
|
|
69
68
|
return ((0, jsx_runtime_1.jsx)(NavMiniCategoryMenu_1.NavMiniCategoryMenu, { isActive: isActive, item: item, onSelect: handleNavigation }, item.key));
|
|
70
69
|
}
|
|
71
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
70
|
+
return ((0, jsx_runtime_1.jsxs)(react_components_1.NavCategory, { value: isActive ? 'active' : '', children: [(0, jsx_runtime_1.jsx)(NavCategoryItemComponent_1.NavCategoryItemComponent, { item: item, isActive: isActive }), (0, jsx_runtime_1.jsx)(react_components_1.NavSubItemGroup, { children: item.items.map((subItem) => ((0, jsx_runtime_1.jsx)(NavSubItemComponent_1.NavSubItemComponent, { item: subItem, onClick: handleNavigation }, subItem.key))) })] }, item.key));
|
|
72
71
|
}
|
|
73
72
|
return ((0, jsx_runtime_1.jsx)(NavItemComponent_1.NavItemComponent, { item: item, onClick: handleNavigation, isMini: isMini }, item.key));
|
|
74
73
|
})] }, section.label))) }) }) }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@headless-adminapp/fluent",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.19",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
"@fluentui/react-calendar-compat": "^0.3.7",
|
|
25
25
|
"@fluentui/react-components": "^9.68.3",
|
|
26
26
|
"@fluentui/react-datepicker-compat": "^0.6.12",
|
|
27
|
-
"@fluentui/react-nav-preview": "^0.13.9",
|
|
28
27
|
"@fluentui/react-timepicker-compat": "^0.4.13",
|
|
29
28
|
"@tanstack/react-query": "^5.84.2"
|
|
30
29
|
},
|
|
@@ -52,5 +51,5 @@
|
|
|
52
51
|
"uuid": "11.0.3",
|
|
53
52
|
"yup": "^1.4.0"
|
|
54
53
|
},
|
|
55
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "65c5192a870badd4de4c135261d5aeafae063756"
|
|
56
55
|
}
|