@admin-layout/tailwind-design-pro 12.0.16-alpha.92 → 12.2.1-alpha.0
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 +40 -0
- package/lib/components/LanguageMenu/LanguageMenu.d.ts +2 -1
- package/lib/components/LanguageMenu/LanguageMenu.d.ts.map +1 -1
- package/lib/components/LanguageMenu/LanguageMenu.js +25 -32
- package/lib/components/LanguageMenu/LanguageMenu.js.map +1 -1
- package/lib/components/Layout/BasicLayout/index.d.ts +1 -1
- package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/index.js +96 -103
- package/lib/components/Layout/BasicLayout/index.js.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.d.ts +2 -2
- package/lib/components/Layout/BasicLayout/utils.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.js +69 -88
- package/lib/components/Layout/BasicLayout/utils.js.map +1 -1
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js +25 -30
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalFooter/Copyright.d.ts +2 -1
- package/lib/components/Layout/GlobalFooter/Copyright.d.ts.map +1 -1
- package/lib/components/Layout/GlobalFooter/Footer.d.ts +2 -1
- package/lib/components/Layout/GlobalFooter/Footer.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.js +32 -43
- package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/MainHeader.js +71 -81
- package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js +26 -30
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.js +25 -29
- package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightMenu.js +112 -136
- package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/SearchBar.js +36 -45
- package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.js +1 -2
- package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
- package/lib/components/Layout/Sidebar/BottomMenu.js +148 -184
- package/lib/components/Layout/Sidebar/BottomMenu.js.map +1 -1
- package/lib/components/Layout/Sidebar/Divider.d.ts +2 -1
- package/lib/components/Layout/Sidebar/Divider.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/Divider.js +26 -28
- package/lib/components/Layout/Sidebar/Divider.js.map +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.d.ts +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.js +10 -11
- package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -1
- package/lib/components/Layout/Sidebar/MainSidebar.js +75 -97
- package/lib/components/Layout/Sidebar/MainSidebar.js.map +1 -1
- package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts +1 -1
- package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/MainSidebarMenu.js +113 -129
- package/lib/components/Layout/Sidebar/MainSidebarMenu.js.map +1 -1
- package/lib/components/Layout/Sidebar/PerplexSidebar.js +108 -133
- package/lib/components/Layout/Sidebar/PerplexSidebar.js.map +1 -1
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js +71 -85
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js.map +1 -1
- package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/TailwindLayout.js +13 -19
- package/lib/components/Layout/TailwindLayout.js.map +1 -1
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts +3 -2
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/AdditionalSettings.js +2 -2
- package/lib/components/Layout/slot-fill/AdditionalSettings.js.map +1 -1
- package/lib/components/Layout/slot-fill/Footer.d.ts +3 -2
- package/lib/components/Layout/slot-fill/Footer.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/Footer.js +2 -2
- package/lib/components/Layout/slot-fill/Footer.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderNotice.d.ts +3 -2
- package/lib/components/Layout/slot-fill/HeaderNotice.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderNotice.js +2 -2
- package/lib/components/Layout/slot-fill/HeaderNotice.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts +2 -1
- package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js +2 -2
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts +2 -1
- package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js +2 -2
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js.map +1 -1
- package/lib/components/Layout/slot-fill/Logo.d.ts +3 -2
- package/lib/components/Layout/slot-fill/Logo.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/Logo.js +2 -2
- package/lib/components/Layout/slot-fill/Logo.js.map +1 -1
- package/lib/components/Layout/slot-fill/RightContent.d.ts +2 -1
- package/lib/components/Layout/slot-fill/RightContent.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/RightContent.js +2 -2
- package/lib/components/Layout/slot-fill/RightContent.js.map +1 -1
- package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts +3 -2
- package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/SideMenuLogo.js +2 -2
- package/lib/components/Layout/slot-fill/SideMenuLogo.js.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.d.ts +2 -1
- package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.js +117 -144
- package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts +2 -1
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js +17 -23
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js.map +1 -1
- package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts +2 -1
- package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/CheckBoxTheme.js +85 -97
- package/lib/components/SettingDrawer/components/CheckBoxTheme.js.map +1 -1
- package/lib/components/SettingDrawer/components/DeviceTabs.d.ts +2 -1
- package/lib/components/SettingDrawer/components/DeviceTabs.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/DeviceTabs.js +67 -75
- package/lib/components/SettingDrawer/components/DeviceTabs.js.map +1 -1
- package/lib/components/SettingDrawer/components/InvitationSettings.d.ts +2 -1
- package/lib/components/SettingDrawer/components/InvitationSettings.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/InvitationSettings.js +41 -52
- package/lib/components/SettingDrawer/components/InvitationSettings.js.map +1 -1
- package/lib/components/SettingDrawer/components/LayoutChange.d.ts +2 -1
- package/lib/components/SettingDrawer/components/LayoutChange.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/LayoutChange.js +75 -94
- package/lib/components/SettingDrawer/components/LayoutChange.js.map +1 -1
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts +2 -1
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js +50 -63
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js.map +1 -1
- package/lib/components/SettingDrawer/components/NavigationsModes.d.ts +2 -1
- package/lib/components/SettingDrawer/components/NavigationsModes.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/NavigationsModes.js +272 -290
- package/lib/components/SettingDrawer/components/NavigationsModes.js.map +1 -1
- package/lib/components/SettingDrawer/components/RegionalSettings.d.ts +2 -1
- package/lib/components/SettingDrawer/components/RegionalSettings.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/RegionalSettings.js +437 -535
- package/lib/components/SettingDrawer/components/RegionalSettings.js.map +1 -1
- package/lib/components/SettingDrawer/components/SettingsActions.d.ts +2 -1
- package/lib/components/SettingDrawer/components/SettingsActions.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/SettingsActions.js +29 -56
- package/lib/components/SettingDrawer/components/SettingsActions.js.map +1 -1
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts +2 -1
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js +13 -16
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js.map +1 -1
- package/lib/components/SettingDrawer/components/Switch.d.ts +2 -1
- package/lib/components/SettingDrawer/components/Switch.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/Switch.js +8 -10
- package/lib/components/SettingDrawer/components/Switch.js.map +1 -1
- package/lib/components/SettingDrawer/components/ThemeColor.d.ts +2 -1
- package/lib/components/SettingDrawer/components/ThemeColor.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/ThemeColor.js +24 -26
- package/lib/components/SettingDrawer/components/ThemeColor.js.map +1 -1
- package/lib/components/SettingDrawer/components/ThemeSelector.d.ts +2 -1
- package/lib/components/SettingDrawer/components/ThemeSelector.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/ThemeSelector.js +11 -13
- package/lib/components/SettingDrawer/components/ThemeSelector.js.map +1 -1
- package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts +1 -0
- package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/WebFontsSelector.js +17 -19
- package/lib/components/SettingDrawer/components/WebFontsSelector.js.map +1 -1
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.d.ts.map +1 -1
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.js +0 -4
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.js.map +1 -1
- package/lib/components/SettingDrawer/utils/transformers.d.ts.map +1 -1
- package/lib/components/SettingDrawer/utils/transformers.js +0 -3
- package/lib/components/SettingDrawer/utils/transformers.js.map +1 -1
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +3 -3
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
- package/lib/helpers/DynamicIcon.d.ts +1 -1
- package/lib/helpers/DynamicIcon.d.ts.map +1 -1
- package/lib/helpers/DynamicIcon.js +16 -17
- package/lib/helpers/DynamicIcon.js.map +1 -1
- package/lib/machines/settingsMachine.d.ts.map +1 -1
- package/lib/machines/settingsMachine.js +0 -6
- package/lib/machines/settingsMachine.js.map +1 -1
- package/lib/utils/__tests__/analytics-utils.test.d.ts +2 -0
- package/lib/utils/__tests__/analytics-utils.test.d.ts.map +1 -0
- package/lib/utils/__tests__/menu.test.d.ts +2 -0
- package/lib/utils/__tests__/menu.test.d.ts.map +1 -0
- package/lib/utils/__tests__/selectors.test.d.ts +2 -0
- package/lib/utils/__tests__/selectors.test.d.ts.map +1 -0
- package/lib/utils/__tests__/settingsMachine.test.d.ts.map +1 -0
- package/lib/utils/__tests__/settingsUtils.test.d.ts +2 -0
- package/lib/utils/__tests__/settingsUtils.test.d.ts.map +1 -0
- package/package.json +6 -6
- package/lib/machines/settingsMachine.test.d.ts.map +0 -1
- /package/lib/{machines → utils/__tests__}/settingsMachine.test.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default,{useState,useRef,useEffect}from'react';import {Link}from'@remix-run/react';import {useTranslation}from'react-i18next';import {generateMenuPath}from'@admin-layout/client';const OrganizationDropDown = props => {
|
|
2
2
|
const {
|
|
3
3
|
theme,
|
|
4
4
|
layout,
|
|
@@ -38,36 +38,32 @@ import {jsxs,jsx}from'react/jsx-runtime';import {useState,useRef,useEffect}from'
|
|
|
38
38
|
const handleMouseLeave = () => {
|
|
39
39
|
setIsProfileMenuOpen(false);
|
|
40
40
|
};
|
|
41
|
-
return
|
|
41
|
+
return React__default.createElement("div", {
|
|
42
42
|
ref: dropdownRef,
|
|
43
43
|
className: "relative",
|
|
44
44
|
onMouseEnter: handleMouseEnter,
|
|
45
|
-
onMouseLeave: handleMouseLeave
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}, menu?.key || menu?.name)
|
|
70
|
-
}, menu?.key || menu?.name))
|
|
71
|
-
})]
|
|
72
|
-
});
|
|
45
|
+
onMouseLeave: handleMouseLeave
|
|
46
|
+
}, React__default.createElement("button", {
|
|
47
|
+
className: "align-middle rounded-full flex items-center focus-themed",
|
|
48
|
+
onClick: toggleProfileMenu,
|
|
49
|
+
"aria-label": "Account",
|
|
50
|
+
"aria-haspopup": "true"
|
|
51
|
+
}, React__default.createElement("img", {
|
|
52
|
+
className: "object-cover w-8 h-8 rounded-full",
|
|
53
|
+
src: "https://e7.pngegg.com/pngimages/241/832/png-clipart-business-management-computer-software-apartment-organization-user-avatar-blue-angle.png",
|
|
54
|
+
alt: "",
|
|
55
|
+
"aria-hidden": "true"
|
|
56
|
+
}), React__default.createElement("span", {
|
|
57
|
+
className: "ml-2 text-foreground"
|
|
58
|
+
}, routeParams?.orgName)), isProfileMenuOpen && React__default.createElement("ul", {
|
|
59
|
+
className: "absolute right-0 w-56 p-2 space-y-2 themed-dropdown",
|
|
60
|
+
"aria-label": "submenu"
|
|
61
|
+
}, upperMenus && upperMenus[0]?.children?.map(menu => React__default.createElement("li", {
|
|
62
|
+
className: "flex",
|
|
63
|
+
key: menu?.key || menu?.name
|
|
64
|
+
}, React__default.createElement(Link, {
|
|
65
|
+
key: menu?.key || menu?.name,
|
|
66
|
+
to: generateMenuPath(menu?.path, routeParams),
|
|
67
|
+
className: "w-full px-3 py-2 hover:bg-muted rounded-themed transition-colors duration-150 text-foreground"
|
|
68
|
+
}, t(menu?.name))))));
|
|
73
69
|
};export{OrganizationDropDown as default};//# sourceMappingURL=OrganizationDropdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrganizationDropdown.js","sources":["../../../../src/components/Layout/GlobalHeader/OrganizationDropdown.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OrganizationDropdown.js","sources":["../../../../src/components/Layout/GlobalHeader/OrganizationDropdown.tsx"],"sourcesContent":[null],"names":[],"mappings":"gMAMA,MAAM,oBAAoB,GAAqC,KAAC,IAAO;AACnE,EAAA,MAAA;IACA,KAAA;IACA,MAAM;AACN,IAAA;IACA,WAAW;IAEX,SAAA;IACA;AACI,GAAA,GAAA,KAAA;QACA,CAAA,uBAAA,EAA0B,0BAAQ,CAAA,GAAA,QAAA,CAAA,KAAA,CAAA;AACtC,EAAA,MAAE,CAAA,iBAAA,EAAA,oBAAA,CAAA,GAAA,QAAA,CAAA,KAAA,CAAA;QAEF,WAAA,GAAA,MAAA,CAAA,IAAA,CAAA;QACA;AACI,IAAA,CAAA;AACI,IAAA;oBACI,CAAA,MAAA,CAAA;;AAER,EAAA,MAAA,iBAAE,GAAA,MAAA;AAEF,IAAA,oBAAS,CAAA,CAAA;AACT,IAAA,0BAAY,CAAA,KAAA,CAAA;AACR,EAAA,CAAA;AACJ;WACG,CAAA,MAAA;IAEP,MAAA,kBAAsB,GAAA,KAAA,IAAA;MACtB,IAAM,WAAA,CAAA,OAAmB,IAAG,CAAE,WAAA,CAAA,OAAA,CAAA,QAAA,CAAA,KAAA,CAAA,MAAA,CAAA,EAAA;QAC1B,oBAAoB,CAAC,KAAK,CAAC;AAC/B,MAAE;IAEF,CAAA;YACI,CAAA,gBAAqB,CAAA,WAAO,EAAA,kBAAA,CAAA;AAChC,IAAA,OAAE,MAAA;AAEF,MAAA,QACI,CAAA,mBAAA,CAAA,WAAU,EAAA,kBAAa,CAAA;;AAOf,EAAA,CAAA,EAAA,EAAA,CAAA;;QASH,gBAAA,GAAiB,MACd;wBAEoB,CAAC,IAAE,CAAA;AAEP,EAAA,CAAA;AAahC,EAAE,MAAA,gBAAA,GAAA,MAAA;AAEF,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as React from'react';import {useState,useEffect,useRef}from'react';import {LanguageMenu}from'../../LanguageMenu/LanguageMenu.js';import OrganizationDropDown from'./OrganizationDropdown.js';const useHorizontalScroll = () => {
|
|
2
2
|
const elRef = useRef(null);
|
|
3
3
|
useEffect(() => {
|
|
4
4
|
const el = elRef.current;
|
|
@@ -59,32 +59,28 @@ const RightContent = props => {
|
|
|
59
59
|
el.style.overflow = curOverflow;
|
|
60
60
|
return isOverflowing;
|
|
61
61
|
};
|
|
62
|
-
return
|
|
63
|
-
className: `flex items-center ${collapsed ? 'ml-2.5' : 'ml-0'}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
settings: settings
|
|
87
|
-
})
|
|
88
|
-
})]
|
|
89
|
-
});
|
|
62
|
+
return React.createElement("div", {
|
|
63
|
+
className: `flex items-center ${collapsed ? 'ml-2.5' : 'ml-0'}`
|
|
64
|
+
}, React.createElement("div", {
|
|
65
|
+
id: "item-wrapper",
|
|
66
|
+
ref: scrollRef,
|
|
67
|
+
className: "flex overflow-x-auto scrollbar-hide whitespace-nowrap space-x-2 py-2 px-1"
|
|
68
|
+
}, navBarItems.map((item, index) => {
|
|
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", {
|
|
77
|
+
className: "relative"
|
|
78
|
+
}, React.createElement(LanguageMenu, null)), React.createElement("div", {
|
|
79
|
+
className: "relative"
|
|
80
|
+
}, React.createElement(OrganizationDropDown, {
|
|
81
|
+
upperMenus: upperMenus,
|
|
82
|
+
routeParams: routeParams,
|
|
83
|
+
collapsed: collapsed,
|
|
84
|
+
settings: settings
|
|
85
|
+
})));
|
|
90
86
|
};export{RightContent,useHorizontalScroll};//# sourceMappingURL=RightContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RightContent.js","sources":["../../../../src/components/Layout/GlobalHeader/RightContent.tsx"],"sourcesContent":[null],"names":[
|
|
1
|
+
{"version":3,"file":"RightContent.js","sources":["../../../../src/components/Layout/GlobalHeader/RightContent.tsx"],"sourcesContent":[null],"names":[],"mappings":"oMAOO,MAAM,mBAAmB,GAAG,MAAK;AACpC,EAAA,MAAA,QAAW,MAAG,CAAA,IAAuB,CAAA;WAErC,CAAA,MAAa;AACT,IAAA,MAAA,EAAA,GAAM,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,YAAA;YACvC,CAAA,QAAA,GAAc;IAClB,OAAC,aAAA;AAED,EAAA,CAAA;AAegB,EAAA,OAAA,KAAA,CAAA,aAAY,CAAA,KAAA,EAAA;AAChB,IAAA,SACE,EAAA,CAAA,kBAAA,EAAA,SAAA,GAAA,QAAA,GAAA,MAAA,CAAA;UAEN,CAAA,aAAA,CAAA,KAAA,EAAA;sBACI;SAIJ,SAAA;aACI,EAAA;AAShB,GAAE,EAAA,WAAA,CAAA,GAAA,CAAA,CAAA,IAAA,EAAA,KAAA,KAAA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
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 switchDialogs from'@app/dialog/WrappedDialogsSwitch';const DialogComponent = ({
|
|
2
2
|
path,
|
|
3
3
|
onClose
|
|
4
4
|
}) => {
|
|
@@ -10,11 +10,9 @@ import {jsxs,Fragment,jsx}from'react/jsx-runtime';import React__default,{useStat
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
}, []);
|
|
13
|
-
return dialog ?
|
|
13
|
+
return dialog ? React__default.createElement(dialog.default, {
|
|
14
14
|
onClose: onClose
|
|
15
|
-
}) :
|
|
16
|
-
children: "Loading..."
|
|
17
|
-
});
|
|
15
|
+
}) : React__default.createElement("div", null, "Loading...");
|
|
18
16
|
};
|
|
19
17
|
const RightMenu = ({
|
|
20
18
|
menuData,
|
|
@@ -88,18 +86,16 @@ const RightMenu = ({
|
|
|
88
86
|
name,
|
|
89
87
|
icon
|
|
90
88
|
} = item;
|
|
91
|
-
return
|
|
89
|
+
return React__default.createElement("button", {
|
|
92
90
|
onClick: () => {
|
|
93
91
|
setOpenedModalKey(key);
|
|
94
92
|
setIsOpen(false); // Close the dropdown when opening a modal
|
|
95
93
|
},
|
|
96
94
|
className: "flex items-center w-full px-3 py-2 text-left text-foreground hover:bg-muted",
|
|
97
|
-
role: "menuitem"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}), t(name)]
|
|
102
|
-
});
|
|
95
|
+
role: "menuitem"
|
|
96
|
+
}, React__default.createElement("div", {
|
|
97
|
+
className: "mr-3"
|
|
98
|
+
}, renderDynamicIcon(icon)), t(name));
|
|
103
99
|
};
|
|
104
100
|
/**
|
|
105
101
|
* Judge whether it is http link.return or a Link
|
|
@@ -116,31 +112,26 @@ const RightMenu = ({
|
|
|
116
112
|
} = item;
|
|
117
113
|
// Is it a http link
|
|
118
114
|
if (/^https?:\/\//.test(itemPath)) {
|
|
119
|
-
return
|
|
115
|
+
return React__default.createElement("a", {
|
|
120
116
|
href: itemPath,
|
|
121
117
|
target: target,
|
|
122
118
|
onClick: onClose,
|
|
123
119
|
className: "flex items-center w-full p-3 text-foreground hover:bg-muted",
|
|
124
|
-
role: "menuitem"
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
children: name
|
|
131
|
-
})]
|
|
132
|
-
});
|
|
120
|
+
role: "menuitem"
|
|
121
|
+
}, React__default.createElement("div", {
|
|
122
|
+
className: "mr-3"
|
|
123
|
+
}, renderDynamicIcon(icon), " "), React__default.createElement("span", {
|
|
124
|
+
className: "ml-1"
|
|
125
|
+
}, name));
|
|
133
126
|
}
|
|
134
|
-
return
|
|
127
|
+
return React__default.createElement(Link, {
|
|
135
128
|
to: itemPath,
|
|
136
129
|
onClick: onClose,
|
|
137
130
|
className: "flex items-center w-full px-3 py-2 text-left text-foreground hover:bg-muted",
|
|
138
|
-
role: "menuitem"
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}), name]
|
|
143
|
-
});
|
|
131
|
+
role: "menuitem"
|
|
132
|
+
}, React__default.createElement("div", {
|
|
133
|
+
className: "mr-3"
|
|
134
|
+
}, renderDynamicIcon(icon)), name);
|
|
144
135
|
};
|
|
145
136
|
const getMenuModals = () => {
|
|
146
137
|
let dialogMenus = [];
|
|
@@ -158,115 +149,100 @@ const RightMenu = ({
|
|
|
158
149
|
key,
|
|
159
150
|
name
|
|
160
151
|
} = item;
|
|
161
|
-
return key === openedModalKey &&
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
onClose: () => {
|
|
218
|
-
onClose();
|
|
219
|
-
setOpenedModalKey(null);
|
|
220
|
-
}
|
|
221
|
-
})
|
|
222
|
-
})]
|
|
223
|
-
})
|
|
224
|
-
})]
|
|
225
|
-
})
|
|
226
|
-
}, k);
|
|
152
|
+
return key === openedModalKey && React__default.createElement("div", {
|
|
153
|
+
key: k,
|
|
154
|
+
className: "fixed inset-0 z-50 overflow-y-auto"
|
|
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,
|
|
203
|
+
onClose: () => {
|
|
204
|
+
onClose();
|
|
205
|
+
setOpenedModalKey(null);
|
|
206
|
+
}
|
|
207
|
+
}))))));
|
|
227
208
|
});
|
|
228
209
|
};
|
|
229
|
-
return
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
className: `
|
|
210
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
211
|
+
className: "relative",
|
|
212
|
+
ref: menuRef,
|
|
213
|
+
onMouseEnter: onOpen
|
|
214
|
+
}, React__default.createElement("button", {
|
|
215
|
+
className: `
|
|
236
216
|
inline-flex items-center justify-center bg-muted hover:bg-muted-foreground text-foreground rounded-full h-12 w-12 min-w-[48px] outline-none transform transition-colors duration-200
|
|
237
217
|
`,
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
}, k))]
|
|
269
|
-
})]
|
|
270
|
-
}), getMenuModals()]
|
|
271
|
-
});
|
|
218
|
+
"aria-expanded": "false",
|
|
219
|
+
onClick: toggleMenu
|
|
220
|
+
}, picture ? React__default.createElement("img", {
|
|
221
|
+
src: picture,
|
|
222
|
+
className: "rounded-full",
|
|
223
|
+
alt: "User"
|
|
224
|
+
}) : null), isOpen && React__default.createElement("div", {
|
|
225
|
+
className: "bg-background absolute right-0 mt-2 w-72 rounded-themed shadow-themed-lg py-1 themed-dropdown ring-1 ring-border focus:outline-none z-40",
|
|
226
|
+
role: "menu",
|
|
227
|
+
"aria-orientation": "vertical",
|
|
228
|
+
"aria-labelledby": "user-menu"
|
|
229
|
+
}, MenusList?.upperMenus?.map((item, k) => React__default.createElement("div", {
|
|
230
|
+
key: k,
|
|
231
|
+
className: "px-1 py-1"
|
|
232
|
+
}, item.modal ? getMenuItemModal(item) : getMenuItemPath(item))), MenusList?.upperMenus?.length > 0 && MenusList?.middleMenus?.length > 0 && React__default.createElement("hr", {
|
|
233
|
+
className: "border-border my-1"
|
|
234
|
+
}), MenusList?.middleMenus?.map((item, k) => React__default.createElement("div", {
|
|
235
|
+
key: k,
|
|
236
|
+
className: "px-1 py-1"
|
|
237
|
+
}, item.modal ? getMenuItemModal(item) : getMenuItemPath(item))), MenusList?.middleMenus?.length > 0 && MenusList?.lowerMenus?.length > 0 && React__default.createElement("hr", {
|
|
238
|
+
className: "border-border my-1"
|
|
239
|
+
}), MenusList?.lowerMenus?.map((item, k) => React__default.createElement("div", {
|
|
240
|
+
key: k,
|
|
241
|
+
className: "px-1 py-1"
|
|
242
|
+
}, item.modal ? getMenuItemModal(item) : getMenuItemPath(item))), MenusList?.lowerMenus?.length > 0 && MenusList?.bottomMenus?.length > 0 && React__default.createElement("hr", {
|
|
243
|
+
className: "border-border my-1"
|
|
244
|
+
}), MenusList?.bottomMenus?.map((item, k) => React__default.createElement("div", {
|
|
245
|
+
key: k,
|
|
246
|
+
className: "px-1 py-1"
|
|
247
|
+
}, item.modal ? getMenuItemModal(item) : getMenuItemPath(item))))), getMenuModals());
|
|
272
248
|
};export{RightMenu};//# sourceMappingURL=RightMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RightMenu.js","sources":["../../../../src/components/Layout/GlobalHeader/RightMenu.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"RightMenu.js","sources":["../../../../src/components/Layout/GlobalHeader/RightMenu.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"uQASA,MAAM,eAAe,GAAkB,CAAC;MACpC;;;eAIQ,EAAA,SAAc,IAAI,QAAQ,CAAA,IAAA,CAAA;kBACtB;AACJ,IAAA,IAAA,CAAA,MAAG,EAAA;mBACN,CAAA,IAAA,CAAA,CAAA,IAAA,CAAA,SAAA,IAAA;QACF,SAAI,CAAA,SAAA,CAAA;AAEP,MAAA,CAAA,CAAA;AACJ,IAAE;AAEF,EAAA,CAAA,EAAA,EAAO;SASH,uBAAkB,CAAA,aAAa,CAAG,MAAA,CAAA,OAA+B,EAAA;IACjE,OAAO,EAAA;AACP,GAAA,CAAA,GAAAA,cAAO,CAAA,aAAc,CAAE,KAAA,EAAA,IAAA,EAAA,YAAqB,CAAK;AACjD,CAAA;AACQ,MAAC,SAAQ,GAAG,CAAA;UACpB;aAEM;;UAEA;UAEN;aACS;AACL,EAAA;AACI,CAAA,KAAA;kBACI,EAAA,YAAgB,CAAC,GAAA,QAAA,EAAA;eACpB,EAAA,SAAA,CAAA,GAAA,QAAA,CAAA,KAAA,CAAA;AACL,EAAA,MAAA,CAAC,cAAC,EAAA,iBAAA,CAAA,GAAAA,cAAA,CAAA,QAAA,CAAA,IAAA,CAAA;QAEF,OAAA,GAAA,MAAA,CAAA,IAAA,CAAA;AACA,EAAA,MAAA;AACI,IAAA;;cAEC;AACL,GAAA,CAAA;;AAGI,EAAA,MAAA,MAAA,GAAA,MAAS,SAAA,CAAA,IAAgB,CAAC;AAC1B,EAAA,MAAA,OAAA,GAAA,MAAS,SAAA,CAAA;QACb,UAAC,GAAA,MAAA,SAAA,CAAA,CAAA,MAAA,CAAA;AAED;AACI,EAAA,SAAA,CAAA,MAAA;AACA,IAAA,MAAA,kBAAS,GAAA,KAAA,IAAmB;AAChC,MAAA,IAAE,OAAA,CAAA,OAAA,IAAA,CAAA,OAAA,CAAA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AA,KAAA,KAAA,IAAA,CAAA;;uBAEV,SAAA,EAAA,UACa,EAAA,MACd,CAAA,CAAA,IAAS,CAAA,CAAA,KAAA,KAAU,IAElB,CAAA;AAGJ,IAAA,MAAA,WAAM,GACH,SAAA,EAAA,WAAA,EAAA,MACI,CAAA,CAAA,IAAA,CAAS,CAAA,KAAC,KAAA,IAAA,CAAA;AAMT,IAAA,IAAA,UAAA,EAAA,SAAW,CAAA,EAAA,WAAgB,cACxB,CAAA,MAAA,CAAA,GAAA,UAAA,CAAA;mBAOH,EAAA,MAAW,iBAAY,qBAAyB,CAAA,GAAA,WAAa,CAAA;AAG7D,IAAA,IAAA,UAAA,EAAA,SAAW,CAAA,EAAA,WAAgB,cAAc,CACtC,MAAA,CAAA,GAAA,UAAA,CAAA;mBAOH,EAAA,MAAW,iBAAa,qBAAyB,CAAA,GAAA,WAAY,CAAA;AAG7D,IAAA,OAAA,WAAA,CAAA,IAAW,CAAA,IAAA,EAAA,CAAA;;kBAWX;QAQZ,GAAA;AAGb,QAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default,{useRef,useState,useEffect}from'react';import {useDispatch,useSelector}from'react-redux';import {useNavigate}from'@remix-run/react';import {icons}from'../../../icons.js';import {setSearchQuery,setSearchResult}from'../../../redux/searchReducer.js';const {
|
|
2
2
|
SearchIcon
|
|
3
3
|
} = icons;
|
|
4
4
|
const SearchBar = ({
|
|
@@ -70,49 +70,40 @@ const SearchBar = ({
|
|
|
70
70
|
}
|
|
71
71
|
setIsOpen(false);
|
|
72
72
|
};
|
|
73
|
-
return
|
|
73
|
+
return React__default.createElement("div", {
|
|
74
74
|
ref: searchRef,
|
|
75
|
-
className: `relative ${className}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
})]
|
|
110
|
-
}), result.description && jsx("span", {
|
|
111
|
-
className: "block text-sm text-muted-foreground truncate",
|
|
112
|
-
children: result.description
|
|
113
|
-
})]
|
|
114
|
-
}, result.id))
|
|
115
|
-
})
|
|
116
|
-
})]
|
|
117
|
-
});
|
|
75
|
+
className: `relative ${className}`
|
|
76
|
+
}, React__default.createElement("div", {
|
|
77
|
+
className: "relative w-full focus-within:text-primary"
|
|
78
|
+
}, React__default.createElement("div", {
|
|
79
|
+
className: "absolute inset-y-0 flex items-center pl-2"
|
|
80
|
+
}, React__default.createElement(SearchIcon, {
|
|
81
|
+
className: `w-4 h-4 ${isSearching ? 'animate-spin' : ''}`
|
|
82
|
+
})), React__default.createElement("input", {
|
|
83
|
+
className: "w-full pl-8 pr-2 text-sm themed-input focus-themed",
|
|
84
|
+
type: "text",
|
|
85
|
+
placeholder: placeholder,
|
|
86
|
+
"aria-label": "Search",
|
|
87
|
+
value: searchQuery,
|
|
88
|
+
onChange: handleSearchChange,
|
|
89
|
+
onKeyDown: handleKeyDown,
|
|
90
|
+
onFocus: () => setIsOpen(true),
|
|
91
|
+
style: style
|
|
92
|
+
})), isOpen && searchResults.length > 0 && React__default.createElement("div", {
|
|
93
|
+
className: "absolute z-50 w-full mt-1 themed-dropdown"
|
|
94
|
+
}, React__default.createElement("ul", {
|
|
95
|
+
className: "py-1 overflow-auto text-base leading-6 rounded-themed shadow-themed-sm max-h-60 focus:outline-none sm:text-sm sm:leading-5"
|
|
96
|
+
}, searchResults.map((result, index) => React__default.createElement("li", {
|
|
97
|
+
key: result.id,
|
|
98
|
+
className: `relative py-2 pl-3 pr-9 cursor-pointer select-none ${index === selectedIndex ? 'text-primary-foreground bg-primary' : 'text-foreground hover:bg-muted'}`,
|
|
99
|
+
onClick: () => handleResultClick(result)
|
|
100
|
+
}, React__default.createElement("div", {
|
|
101
|
+
className: "flex items-center"
|
|
102
|
+
}, React__default.createElement("span", {
|
|
103
|
+
className: "block truncate font-medium"
|
|
104
|
+
}, result.title), result.type && React__default.createElement("span", {
|
|
105
|
+
className: "ml-2 px-2 py-0.5 text-xs rounded-themed bg-muted text-muted-foreground"
|
|
106
|
+
}, result.type)), result.description && React__default.createElement("span", {
|
|
107
|
+
className: "block text-sm text-muted-foreground truncate"
|
|
108
|
+
}, result.description))))));
|
|
118
109
|
};export{SearchBar,SearchBar as default};//# sourceMappingURL=SearchBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.js","sources":["../../../../src/components/Layout/GlobalHeader/SearchBar.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchBar.js","sources":["../../../../src/components/Layout/GlobalHeader/SearchBar.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"6QAMA,MAAM;AAQN,EAAA;AACI,CAAA,GAAA,KAAA;AACM,MAAA,SAAW,GAAA,CAAA;AACjB,EAAA;aACO,GAAA,QAAQ;;AAEf,CAAA,KAAA;QAEA,QAAA,GAAA,WAAA,EAAA;AACA,EAAA,MAAA,sBAAwB,EAAG;AACvB,EAAA,MAAA,YAAW,MAAG,CAAK,IAAC,CAAA;AACpB,EAAA,MAAA,CAAA,MAAA,EAAS,SAAA,CAAA,GAAA,QAAqB,CAAC,KAAC,CAAA;AAChC,EAAA,MAAA,CAAA,aAAW,EAAI,gBAAK,CAAA,GAAA,QAAA,CAAA,EAAA,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CAAA,gBAAiB,CAAA,WAAA,EAAA,kBAAA,CAAA;AACrB,IAAA,OAAE,MAAA;MAEF,QACI,CAAA,mBAAA,CAAA,WAAU,EAAA,kBAAoB,CAAA;;;AAGlB;AAEJ,EAAA,MAAA,iBAAA,GAAA,MAAA,IAAA;QAcH,MAAM,CAAA,GAAI,EAAA;AAEH,MAAA,QAAA,CAAA,MAAA,CAAA,GAAA,CAAA;AAMoB,IAAA;AACA,IAAA,SAAA,CAAA,KAAA,CAAA;;AAKJ,EAAA,OAAAA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AACC,IAAA,GAAA,EAAA,SAAA;gBAMJ,oBAAkB,CAAA;AAYnD,GAAE,EAAAA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAEF,IAAA,SAAA,EAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
1
|
import { filterRoutesWithLocale, transformData, addProLayoutParentKeys, removeUnnecessaryProperties, menuDataRender } from '@admin-layout/client';
|
|
3
2
|
import { matchParentRoute } from '@admin-layout/client/lib/utils/parentRoute.js';
|
|
4
3
|
import { ClientTypes } from '@common-stack/client-core';
|
|
@@ -86,7 +85,7 @@ const ProTailwindLayout = props => {
|
|
|
86
85
|
const params = {
|
|
87
86
|
orgName: orgName
|
|
88
87
|
};
|
|
89
|
-
return
|
|
88
|
+
return React.createElement(BasicLayoutEnhanced, {
|
|
90
89
|
routeParams: params,
|
|
91
90
|
permissions: permissions,
|
|
92
91
|
menuData: filteredMenuData,
|