@admin-layout/tailwind-design-pro 12.2.4-alpha.1 → 12.2.4-alpha.101
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/README.md +80 -0
- package/lib/components/LanguageMenu/LanguageMenu.d.ts.map +1 -1
- package/lib/components/LanguageMenu/LanguageMenu.js +6 -2
- package/lib/components/LanguageMenu/LanguageMenu.js.map +1 -1
- package/lib/components/Layout/BasicLayout/index.d.ts +19 -0
- package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/index.js +63 -14
- package/lib/components/Layout/BasicLayout/index.js.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.js +1 -1
- package/lib/components/Layout/BasicLayout/utils.js.map +1 -1
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js +1 -1
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.js +12 -4
- package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/MainHeader.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/MainHeader.js +2 -1
- package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/NavbarSlotStrip.d.ts +12 -0
- package/lib/components/Layout/GlobalHeader/NavbarSlotStrip.d.ts.map +1 -0
- package/lib/components/Layout/GlobalHeader/NavbarSlotStrip.js +36 -0
- package/lib/components/Layout/GlobalHeader/NavbarSlotStrip.js.map +1 -0
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts +1 -2
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.js +10 -72
- package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightMenu.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightMenu.js +16 -80
- package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/SearchBar.d.ts +43 -0
- package/lib/components/Layout/GlobalHeader/SearchBar.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/SearchBar.js +380 -43
- package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/index.d.ts +1 -0
- package/lib/components/Layout/GlobalHeader/index.d.ts.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.d.ts +20 -8
- package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.js +255 -88
- package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
- package/lib/components/Layout/Sidebar/BottomMenu.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/BottomMenu.js +55 -82
- package/lib/components/Layout/Sidebar/BottomMenu.js.map +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.js +80 -19
- package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -1
- package/lib/components/Layout/Sidebar/MainSidebar.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/MainSidebar.js +31 -26
- package/lib/components/Layout/Sidebar/MainSidebar.js.map +1 -1
- package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/MainSidebarMenu.js +228 -51
- package/lib/components/Layout/Sidebar/MainSidebarMenu.js.map +1 -1
- package/lib/components/Layout/Sidebar/MenuDynamicDialog.d.ts +12 -0
- package/lib/components/Layout/Sidebar/MenuDynamicDialog.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/MenuDynamicDialog.js +79 -0
- package/lib/components/Layout/Sidebar/MenuDynamicDialog.js.map +1 -0
- package/lib/components/Layout/Sidebar/PerplexSidebar.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/PerplexSidebar.js +45 -36
- package/lib/components/Layout/Sidebar/PerplexSidebar.js.map +1 -1
- package/lib/components/Layout/Sidebar/PerplexSidebarFlyoutContext.d.ts +25 -0
- package/lib/components/Layout/Sidebar/PerplexSidebarFlyoutContext.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/PerplexSidebarFlyoutContext.js +287 -0
- package/lib/components/Layout/Sidebar/PerplexSidebarFlyoutContext.js.map +1 -0
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js +322 -45
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js.map +1 -1
- package/lib/components/Layout/Sidebar/SidebarRailFX.d.ts +23 -0
- package/lib/components/Layout/Sidebar/SidebarRailFX.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/SidebarRailFX.js +229 -0
- package/lib/components/Layout/Sidebar/SidebarRailFX.js.map +1 -0
- package/lib/components/Layout/SidebarControlsContext.d.ts +17 -0
- package/lib/components/Layout/SidebarControlsContext.d.ts.map +1 -0
- package/lib/components/Layout/SidebarControlsContext.js +21 -0
- package/lib/components/Layout/SidebarControlsContext.js.map +1 -0
- package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/TailwindLayout.js +22 -3
- package/lib/components/Layout/TailwindLayout.js.map +1 -1
- package/lib/components/Layout/defaultPermissions.d.ts +134 -0
- package/lib/components/Layout/defaultPermissions.d.ts.map +1 -0
- package/lib/components/Layout/defaultPermissions.js +134 -0
- package/lib/components/Layout/defaultPermissions.js.map +1 -0
- package/lib/components/Layout/getPageTitle.js +2 -2
- package/lib/components/Layout/getPageTitle.js.map +1 -1
- package/lib/components/Layout/slot-fill/RightContent.d.ts +3 -1
- package/lib/components/Layout/slot-fill/RightContent.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/RightContent.js +4 -6
- package/lib/components/Layout/slot-fill/RightContent.js.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.js +21 -18
- package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js +8 -14
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js.map +1 -1
- package/lib/components/SettingDrawer/components/CheckBoxTheme.js +2 -2
- package/lib/components/SettingDrawer/components/CheckBoxTheme.js.map +1 -1
- package/lib/components/SettingDrawer/components/DeviceTabs.js +2 -2
- package/lib/components/SettingDrawer/components/DeviceTabs.js.map +1 -1
- package/lib/components/SettingDrawer/components/InvitationSettings.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/InvitationSettings.js +7 -3
- package/lib/components/SettingDrawer/components/InvitationSettings.js.map +1 -1
- package/lib/components/SettingDrawer/components/LayoutChange.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/LayoutChange.js +8 -11
- package/lib/components/SettingDrawer/components/LayoutChange.js.map +1 -1
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js +5 -5
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js.map +1 -1
- package/lib/components/SettingDrawer/components/NavigationsModes.js +3 -3
- package/lib/components/SettingDrawer/components/NavigationsModes.js.map +1 -1
- package/lib/components/SettingDrawer/components/RegionalSettings.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/RegionalSettings.js +40 -97
- package/lib/components/SettingDrawer/components/RegionalSettings.js.map +1 -1
- package/lib/components/SettingDrawer/components/SettingsActions.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/SettingsActions.js +27 -25
- package/lib/components/SettingDrawer/components/SettingsActions.js.map +1 -1
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js +4 -3
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js.map +1 -1
- package/lib/components/SettingDrawer/components/Switch.js +2 -2
- package/lib/components/SettingDrawer/components/ThemeColor.js +1 -1
- package/lib/components/SettingDrawer/components/ThemeColor.js.map +1 -1
- package/lib/components/SettingDrawer/components/ThemeSelector.js +1 -1
- package/lib/components/SettingDrawer/components/WebFontsSelector.js +1 -1
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.d.ts.map +1 -1
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.js +13 -9
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.js.map +1 -1
- package/lib/components/SettingDrawer/utils/constants.d.ts.map +1 -1
- package/lib/components/SettingDrawer/utils/constants.js +3 -0
- package/lib/components/SettingDrawer/utils/constants.js.map +1 -1
- package/lib/components/SettingDrawer/utils/helper.js +1 -1
- package/lib/components/SettingDrawer/utils/transformers.d.ts +16 -0
- package/lib/components/SettingDrawer/utils/transformers.d.ts.map +1 -1
- package/lib/components/SettingDrawer/utils/transformers.js +39 -2
- package/lib/components/SettingDrawer/utils/transformers.js.map +1 -1
- package/lib/components/SettingsThemeApplier/SettingsThemeApplier.d.ts +10 -0
- package/lib/components/SettingsThemeApplier/SettingsThemeApplier.d.ts.map +1 -0
- package/lib/components/SettingsThemeApplier/SettingsThemeApplier.js +23 -0
- package/lib/components/SettingsThemeApplier/SettingsThemeApplier.js.map +1 -0
- package/lib/components/SettingsThemeApplier/index.d.ts +2 -0
- package/lib/components/SettingsThemeApplier/index.d.ts.map +1 -0
- package/lib/components/index.js +1 -1
- package/lib/components/typings.d.ts +29 -0
- package/lib/components/typings.d.ts.map +1 -1
- package/lib/compute.js +2 -1
- package/lib/compute.js.map +1 -1
- package/lib/helpers/DynamicIcon.js +7 -1
- package/lib/helpers/DynamicIcon.js.map +1 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.d.ts.map +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/routes.json +6 -1
- package/lib/styles/index.css +321 -0
- package/lib/utils/settingsTheme.d.ts +40 -0
- package/lib/utils/settingsTheme.d.ts.map +1 -0
- package/lib/utils/settingsTheme.js +106 -0
- package/lib/utils/settingsTheme.js.map +1 -0
- package/package.json +9 -7
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { GlobalHeaderRightProps } from '../../typings';
|
|
3
|
-
export declare const useHorizontalScroll: () => React.RefObject<HTMLDivElement>;
|
|
4
3
|
export declare const RightContent: React.FC<GlobalHeaderRightProps>;
|
|
5
4
|
//# sourceMappingURL=RightContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RightContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/RightContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"RightContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/RightContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEvD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAqBzD,CAAC"}
|
|
@@ -1,86 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
const elRef = useRef(null);
|
|
3
|
-
useEffect(() => {
|
|
4
|
-
const el = elRef.current;
|
|
5
|
-
if (el) {
|
|
6
|
-
const onWheel = e => {
|
|
7
|
-
if (e.deltaY === 0) return;
|
|
8
|
-
e.preventDefault();
|
|
9
|
-
el.scrollTo({
|
|
10
|
-
left: el.scrollLeft + e.deltaY,
|
|
11
|
-
behavior: 'smooth'
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
el.addEventListener('wheel', onWheel);
|
|
15
|
-
return () => {
|
|
16
|
-
el.removeEventListener('wheel', onWheel);
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
}, []);
|
|
20
|
-
return elRef;
|
|
21
|
-
};
|
|
22
|
-
const RightContent = props => {
|
|
1
|
+
import React__default from'react';import {LanguageMenu}from'../../LanguageMenu/LanguageMenu.js';import OrganizationDropDown from'./OrganizationDropdown.js';import {RightContentSlot}from'../slot-fill/RightContent.js';const RightContent = props => {
|
|
23
2
|
const {
|
|
24
|
-
theme,
|
|
25
|
-
layout,
|
|
26
3
|
upperMenus,
|
|
27
4
|
routeParams,
|
|
28
5
|
collapsed,
|
|
29
6
|
settings
|
|
30
7
|
} = props;
|
|
31
|
-
|
|
32
|
-
const scrollRef = useHorizontalScroll();
|
|
33
|
-
// TODO: uncomment this once the extension API is updated
|
|
34
|
-
// const controller: any = useExtensionController();
|
|
35
|
-
// useEffect(() => {
|
|
36
|
-
// if (controller) {
|
|
37
|
-
// const subscription = controller.services.contribution.getContributions().subscribe(({ pageNavBar }) => {
|
|
38
|
-
// setNavBarItems(pageNavBar || []);
|
|
39
|
-
// });
|
|
40
|
-
// return () => subscription.unsubscribe();
|
|
41
|
-
// }
|
|
42
|
-
// }, [controller]);
|
|
43
|
-
useEffect(() => {
|
|
44
|
-
const ele = document.getElementById('item-wrapper');
|
|
45
|
-
if (ele) {
|
|
46
|
-
if (check(ele)) {
|
|
47
|
-
ele.style.boxShadow = 'inset 0 0 5px #e2e2e2';
|
|
48
|
-
} else {
|
|
49
|
-
ele.style.boxShadow = 'none';
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
const check = el => {
|
|
54
|
-
const curOverflow = el.style.overflow;
|
|
55
|
-
if (!curOverflow || curOverflow === 'visible') {
|
|
56
|
-
el.style.overflow = 'hidden';
|
|
57
|
-
}
|
|
58
|
-
const isOverflowing = el.clientWidth < el.scrollWidth || el.clientHeight < el.scrollHeight;
|
|
59
|
-
el.style.overflow = curOverflow;
|
|
60
|
-
return isOverflowing;
|
|
61
|
-
};
|
|
62
|
-
return React.createElement("div", {
|
|
8
|
+
return React__default.createElement("div", {
|
|
63
9
|
className: `flex items-center ${collapsed ? 'ml-2.5' : 'ml-0'}`
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
if (item.position === 'right' && item.component) {
|
|
70
|
-
return React.createElement("div", {
|
|
71
|
-
key: index,
|
|
72
|
-
className: "flex-shrink-0"
|
|
73
|
-
}, item.component(props));
|
|
74
|
-
}
|
|
75
|
-
return null;
|
|
76
|
-
})), React.createElement("div", {
|
|
10
|
+
}, React__default.createElement("div", {
|
|
11
|
+
className: "relative flex items-center flex-shrink-0"
|
|
12
|
+
}, React__default.createElement(RightContentSlot, {
|
|
13
|
+
...props
|
|
14
|
+
})), React__default.createElement("div", {
|
|
77
15
|
className: "relative"
|
|
78
|
-
},
|
|
16
|
+
}, React__default.createElement(LanguageMenu, null)), React__default.createElement("div", {
|
|
79
17
|
className: "relative"
|
|
80
|
-
},
|
|
18
|
+
}, React__default.createElement(OrganizationDropDown, {
|
|
81
19
|
upperMenus: upperMenus,
|
|
82
20
|
routeParams: routeParams,
|
|
83
21
|
collapsed: collapsed,
|
|
84
22
|
settings: settings
|
|
85
23
|
})));
|
|
86
|
-
};export{RightContent
|
|
24
|
+
};export{RightContent};//# sourceMappingURL=RightContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RightContent.js","sources":["../../../../src/components/Layout/GlobalHeader/RightContent.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RightContent.js","sources":["../../../../src/components/Layout/GlobalHeader/RightContent.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"wNAMO,MAAM,YAAY,GAAqC,KAAC,IAAO;QAClE;AAEA,IAAA,UACI;eACI;AACI,IAAA,SAAA;;;SAKJA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA;aACI,EAAA,CAAA,kBAAC,EAAA,SAAA,GAAA,QACG,GAAA,MAAA,CAAU;AAQ9B,GAAE,EAAAA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RightMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/RightMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"RightMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/RightMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAMpE,OAAO,EAAE,eAAe,EAAU,MAAM,eAAe,CAAC;AAExD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0N/C,CAAC"}
|
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
import React__default,{useState,useRef,useEffect}from'react';import {Link}from'@remix-run/react';import {generateMenuPath}from'../util.js';import {renderDynamicIcon}from'../../../helpers/DynamicIcon.js';import
|
|
2
|
-
path,
|
|
3
|
-
onClose
|
|
4
|
-
}) => {
|
|
5
|
-
const [dialog, setDialog] = useState(null);
|
|
6
|
-
useEffect(() => {
|
|
7
|
-
if (!dialog) {
|
|
8
|
-
switchDialogs(path).then(component => {
|
|
9
|
-
setDialog(component);
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
}, []);
|
|
13
|
-
return dialog ? React__default.createElement(dialog.default, {
|
|
14
|
-
onClose: onClose
|
|
15
|
-
}) : React__default.createElement("div", null, "Loading...");
|
|
16
|
-
};
|
|
17
|
-
const RightMenu = ({
|
|
1
|
+
import React__default,{useState,useRef,useEffect,useMemo}from'react';import {Link}from'@remix-run/react';import {generateMenuPath}from'../util.js';import {renderDynamicIcon}from'../../../helpers/DynamicIcon.js';import {MenuDynamicDialog}from'../Sidebar/MenuDynamicDialog.js';const RightMenu = ({
|
|
18
2
|
menuData,
|
|
19
3
|
routeParams,
|
|
20
4
|
getMenuSeparation,
|
|
@@ -58,18 +42,6 @@ const RightMenu = ({
|
|
|
58
42
|
document.removeEventListener('keydown', handleEscKey);
|
|
59
43
|
};
|
|
60
44
|
}, [isOpen]);
|
|
61
|
-
const newMenuData = menuData?.filter(m => !m.hideInMenu)?.map(m => {
|
|
62
|
-
if (!m.hideInMenu) {
|
|
63
|
-
const path = generateMenuPath(m.path, routeParams);
|
|
64
|
-
return {
|
|
65
|
-
...m,
|
|
66
|
-
path
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
useEffect(() => {
|
|
71
|
-
setMenusList(getMenuSeparation(newMenuData));
|
|
72
|
-
}, [authorities]);
|
|
73
45
|
const conversionPath = path => {
|
|
74
46
|
if (path && path.indexOf('http') === 0) {
|
|
75
47
|
return path;
|
|
@@ -79,6 +51,15 @@ const RightMenu = ({
|
|
|
79
51
|
}
|
|
80
52
|
return `/${path || ''}`.replace(/\/+/g, '/');
|
|
81
53
|
};
|
|
54
|
+
const MenuData = useMemo(() => {
|
|
55
|
+
return (menuData || []).filter(m => !m.hideInMenu).map(m => ({
|
|
56
|
+
...m,
|
|
57
|
+
path: generateMenuPath(m.path, routeParams)
|
|
58
|
+
}));
|
|
59
|
+
}, [menuData, routeParams]);
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
setMenusList(getMenuSeparation(MenuData));
|
|
62
|
+
}, [MenuData, authorities, getMenuSeparation]);
|
|
82
63
|
const getMenuItemModal = item => {
|
|
83
64
|
// const icon = this.getIcon(item.icon);
|
|
84
65
|
const {
|
|
@@ -149,62 +130,17 @@ const RightMenu = ({
|
|
|
149
130
|
key,
|
|
150
131
|
name
|
|
151
132
|
} = item;
|
|
152
|
-
|
|
133
|
+
if (key !== openedModalKey) {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
return React__default.createElement(MenuDynamicDialog, {
|
|
153
137
|
key: k,
|
|
154
|
-
|
|
155
|
-
}, React__default.createElement("div", {
|
|
156
|
-
className: "flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"
|
|
157
|
-
}, React__default.createElement("div", {
|
|
158
|
-
className: "fixed inset-0 transition-opacity",
|
|
159
|
-
"aria-hidden": "true"
|
|
160
|
-
}, React__default.createElement("div", {
|
|
161
|
-
className: "absolute inset-0 bg-black bg-opacity-50",
|
|
162
|
-
onClick: () => {
|
|
163
|
-
onClose();
|
|
164
|
-
setOpenedModalKey(null);
|
|
165
|
-
}
|
|
166
|
-
})), React__default.createElement("span", {
|
|
167
|
-
className: "hidden sm:inline-block sm:align-middle sm:h-screen",
|
|
168
|
-
"aria-hidden": "true"
|
|
169
|
-
}, "\u200B"), React__default.createElement("div", {
|
|
170
|
-
className: "inline-block align-bottom rounded-themed-lg text-left overflow-hidden shadow-themed-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full themed-modal",
|
|
171
|
-
role: "dialog",
|
|
172
|
-
"aria-modal": "true",
|
|
173
|
-
"aria-labelledby": "modal-headline"
|
|
174
|
-
}, React__default.createElement("div", {
|
|
175
|
-
className: "px-4 pt-5 pb-4 sm:p-6 sm:pb-4"
|
|
176
|
-
}, React__default.createElement("div", {
|
|
177
|
-
className: "flex justify-end"
|
|
178
|
-
}, React__default.createElement("button", {
|
|
179
|
-
type: "button",
|
|
180
|
-
className: "rounded-themed text-muted-foreground hover:text-foreground focus-themed",
|
|
181
|
-
onClick: () => {
|
|
182
|
-
onClose();
|
|
183
|
-
setOpenedModalKey(null);
|
|
184
|
-
}
|
|
185
|
-
}, React__default.createElement("span", {
|
|
186
|
-
className: "sr-only"
|
|
187
|
-
}, "Close"), React__default.createElement("svg", {
|
|
188
|
-
className: "h-6 w-6",
|
|
189
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
190
|
-
fill: "none",
|
|
191
|
-
viewBox: "0 0 24 24",
|
|
192
|
-
stroke: "currentColor",
|
|
193
|
-
"aria-hidden": "true"
|
|
194
|
-
}, React__default.createElement("path", {
|
|
195
|
-
strokeLinecap: "round",
|
|
196
|
-
strokeLinejoin: "round",
|
|
197
|
-
strokeWidth: "2",
|
|
198
|
-
d: "M6 18L18 6M6 6l12 12"
|
|
199
|
-
})))), React__default.createElement("div", {
|
|
200
|
-
className: "mt-2"
|
|
201
|
-
}, React__default.createElement(DialogComponent, {
|
|
202
|
-
path: dialogPath,
|
|
138
|
+
dialogPath: dialogPath,
|
|
203
139
|
onClose: () => {
|
|
204
140
|
onClose();
|
|
205
141
|
setOpenedModalKey(null);
|
|
206
142
|
}
|
|
207
|
-
})
|
|
143
|
+
});
|
|
208
144
|
});
|
|
209
145
|
};
|
|
210
146
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RightMenu.js","sources":["../../../../src/components/Layout/GlobalHeader/RightMenu.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"
|
|
1
|
+
{"version":3,"file":"RightMenu.js","sources":["../../../../src/components/Layout/GlobalHeader/RightMenu.tsx"],"sourcesContent":[null],"names":["React","RouterLink"],"mappings":"yRAQa,SAAS,GAA8B,CAAC;UAS3C;aACC;AACP,EAAA,iBAAO;AACP,EAAA,QAAM;AACN,EAAA,QAAM;aACN;;MAGA;QACA,CAAA,SAAM,EAAU,wBAAoB,EAAM;QAE1C,CAAA,MAAA,EAAA,SAAA,CAAA,GAAA,QAAA,CAAA,KAAA,CAAA;QACA,CAAA,cAAe,EAAA,iBAAA,CAAA,GAAAA,cAAA,CAAA,QAAA,CAAA,IAAA,CAAA;AACX,EAAA,MAAA,OAAM,GAAA,MAAA,CAAA,IAAA,CAAA;AACF,EAAA,MAAA;;;AAGJ,IAAA,CAAA,EAAA,GAAE,IAAA;;AAGF;AACI,EAAA,MAAA,MAAA,SAAU,SAAQ,CAAA,IAAA,CAAQ;kBACtB,MAAA,SAAiB,CAAA,KAAA,CAAA;kBACpB,GAAA,MAAA,SAAA,CAAA,CA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AAA;;sBAGK;AAOJ,MAAA,SAAA,EAAA,6EAEiB;AAMT,MAAA,IAAA,EAAA;mCAQS,CAAE;AAGX,MAAA,SAAA,EAAA;wBAQA,CAAS,aAAa;AAGtB,EAAA,CAAA;qBAQA,GAAA;mBAGA,GAAA,EAAA;UAQZ,UAAA,GAAe,SAEtB,EAAA,UAAA,EAAA,MAAA,CAAA,CAAA,IAAA,CAAA,CAAA,KAAA,KAAA,IAAA,CAAA;AACN,IAAE,MAAA,WAAA,GAAA,SAAA,EAAA,WAAA,EAAA,MAAA,CAAA,CAAA,IAAA,CAAA,CAAA,KAAA,KAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,8 +1,51 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { SearchResult } from '../../../redux/searchReducer';
|
|
3
|
+
/**
|
|
4
|
+
* A data module the search can scope into (e.g. projects, tasks). When a nav
|
|
5
|
+
* result matches a descriptor, the user can press Tab to scope the search into
|
|
6
|
+
* that module's data (fetched via {@link SearchBarProps.moduleSearch}).
|
|
7
|
+
*/
|
|
8
|
+
export interface SearchModuleDescriptor {
|
|
9
|
+
/** Connector module key, e.g. 'projects'. */
|
|
10
|
+
module: string;
|
|
11
|
+
/** Human label shown in the scope chip, e.g. 'Projects'. */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Whether a nav result maps to this module. Full control via `match`, or… */
|
|
14
|
+
match?: (result: SearchResult) => boolean;
|
|
15
|
+
/** …a simple case-insensitive substring test against the result url. */
|
|
16
|
+
routeIncludes?: string;
|
|
17
|
+
}
|
|
18
|
+
/** One data hit returned by a scoped module search (normalized by the host). */
|
|
19
|
+
export interface ModuleSearchHit {
|
|
20
|
+
id: string;
|
|
21
|
+
title: string;
|
|
22
|
+
subtitle?: string;
|
|
23
|
+
url?: string;
|
|
24
|
+
module?: string;
|
|
25
|
+
type?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ModuleSearchInput {
|
|
28
|
+
module: string;
|
|
29
|
+
query: string;
|
|
30
|
+
}
|
|
2
31
|
interface SearchBarProps {
|
|
3
32
|
className?: string;
|
|
4
33
|
placeholder?: string;
|
|
5
34
|
style?: React.CSSProperties;
|
|
35
|
+
navigationItems?: any[];
|
|
36
|
+
showMetadata?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Searchable data modules. When the highlighted nav result matches one,
|
|
39
|
+
* Tab scopes the search into that module's data instead of the default
|
|
40
|
+
* within-page search.
|
|
41
|
+
*/
|
|
42
|
+
searchModules?: SearchModuleDescriptor[];
|
|
43
|
+
/**
|
|
44
|
+
* Fetches data hits for a scoped module - wired by the host app to cdecli
|
|
45
|
+
* (e.g. the executeConnectorAction mutation). Required for module scoping;
|
|
46
|
+
* page-section scoping works without it.
|
|
47
|
+
*/
|
|
48
|
+
moduleSearch?: (input: ModuleSearchInput) => Promise<ModuleSearchHit[]>;
|
|
6
49
|
}
|
|
7
50
|
export declare const SearchBar: React.FC<SearchBarProps>;
|
|
8
51
|
export default SearchBar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/SearchBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SearchBar.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/SearchBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAI3D,OAAO,EAAmC,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAI7F;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACnC,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY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