@lokalise/harmony 1.40.2 → 1.40.3-exp-epic2x.1
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/harmony.css +110 -317
- package/dist/harmony100.cjs +8 -11
- package/dist/harmony100.cjs.map +1 -1
- package/dist/harmony100.mjs +8 -11
- package/dist/harmony100.mjs.map +1 -1
- package/dist/harmony101.cjs +47 -12
- package/dist/harmony101.cjs.map +1 -1
- package/dist/harmony101.mjs +46 -11
- package/dist/harmony101.mjs.map +1 -1
- package/dist/harmony102.cjs +6 -3
- package/dist/harmony102.cjs.map +1 -1
- package/dist/harmony102.mjs +6 -3
- package/dist/harmony102.mjs.map +1 -1
- package/dist/harmony103.cjs +99 -9
- package/dist/harmony103.cjs.map +1 -1
- package/dist/harmony103.mjs +81 -8
- package/dist/harmony103.mjs.map +1 -1
- package/dist/harmony104.cjs +14 -9
- package/dist/harmony104.cjs.map +1 -1
- package/dist/harmony104.mjs +13 -8
- package/dist/harmony104.mjs.map +1 -1
- package/dist/harmony105.cjs +20 -57
- package/dist/harmony105.cjs.map +1 -1
- package/dist/harmony105.mjs +20 -57
- package/dist/harmony105.mjs.map +1 -1
- package/dist/harmony106.cjs +9 -42
- package/dist/harmony106.cjs.map +1 -1
- package/dist/harmony106.mjs +8 -41
- package/dist/harmony106.mjs.map +1 -1
- package/dist/harmony107.cjs +14 -5
- package/dist/harmony107.cjs.map +1 -1
- package/dist/harmony107.mjs +14 -5
- package/dist/harmony107.mjs.map +1 -1
- package/dist/harmony108.cjs +17 -9
- package/dist/harmony108.cjs.map +1 -1
- package/dist/harmony108.mjs +16 -8
- package/dist/harmony108.mjs.map +1 -1
- package/dist/harmony109.cjs +21 -24
- package/dist/harmony109.cjs.map +1 -1
- package/dist/harmony109.mjs +20 -23
- package/dist/harmony109.mjs.map +1 -1
- package/dist/harmony110.cjs +10 -6
- package/dist/harmony110.cjs.map +1 -1
- package/dist/harmony110.mjs +9 -5
- package/dist/harmony110.mjs.map +1 -1
- package/dist/harmony111.cjs +22 -14
- package/dist/harmony111.cjs.map +1 -1
- package/dist/harmony111.mjs +24 -16
- package/dist/harmony111.mjs.map +1 -1
- package/dist/harmony112.cjs +14 -12
- package/dist/harmony112.cjs.map +1 -1
- package/dist/harmony112.mjs +13 -11
- package/dist/harmony112.mjs.map +1 -1
- package/dist/harmony113.cjs +35 -12
- package/dist/harmony113.cjs.map +1 -1
- package/dist/harmony113.mjs +35 -12
- package/dist/harmony113.mjs.map +1 -1
- package/dist/harmony114.cjs +14 -18
- package/dist/harmony114.cjs.map +1 -1
- package/dist/harmony114.mjs +14 -18
- package/dist/harmony114.mjs.map +1 -1
- package/dist/harmony115.cjs +19 -96
- package/dist/harmony115.cjs.map +1 -1
- package/dist/harmony115.mjs +19 -79
- package/dist/harmony115.mjs.map +1 -1
- package/dist/harmony116.cjs +33 -85
- package/dist/harmony116.cjs.map +1 -1
- package/dist/harmony116.mjs +33 -85
- package/dist/harmony116.mjs.map +1 -1
- package/dist/harmony117.cjs +22 -31
- package/dist/harmony117.cjs.map +1 -1
- package/dist/harmony117.mjs +21 -30
- package/dist/harmony117.mjs.map +1 -1
- package/dist/harmony118.cjs +21 -21
- package/dist/harmony118.cjs.map +1 -1
- package/dist/harmony118.mjs +20 -20
- package/dist/harmony118.mjs.map +1 -1
- package/dist/harmony119.cjs +6 -6
- package/dist/harmony119.cjs.map +1 -1
- package/dist/harmony119.mjs +5 -5
- package/dist/harmony119.mjs.map +1 -1
- package/dist/harmony120.cjs +15 -132
- package/dist/harmony120.cjs.map +1 -1
- package/dist/harmony120.mjs +14 -131
- package/dist/harmony120.mjs.map +1 -1
- package/dist/harmony121.cjs +87 -12
- package/dist/harmony121.cjs.map +1 -1
- package/dist/harmony121.mjs +86 -11
- package/dist/harmony121.mjs.map +1 -1
- package/dist/harmony122.cjs +30 -5
- package/dist/harmony122.cjs.map +1 -1
- package/dist/harmony122.mjs +30 -5
- package/dist/harmony122.mjs.map +1 -1
- package/dist/harmony123.cjs +6 -41
- package/dist/harmony123.cjs.map +1 -1
- package/dist/harmony123.mjs +5 -40
- package/dist/harmony123.mjs.map +1 -1
- package/dist/harmony124.cjs +6 -61
- package/dist/harmony124.cjs.map +1 -1
- package/dist/harmony124.mjs +5 -60
- package/dist/harmony124.mjs.map +1 -1
- package/dist/harmony125.cjs +96 -7
- package/dist/harmony125.cjs.map +1 -1
- package/dist/harmony125.mjs +96 -7
- package/dist/harmony125.mjs.map +1 -1
- package/dist/harmony126.cjs +14 -7
- package/dist/harmony126.cjs.map +1 -1
- package/dist/harmony126.mjs +13 -6
- package/dist/harmony126.mjs.map +1 -1
- package/dist/harmony127.cjs +15 -6
- package/dist/harmony127.cjs.map +1 -1
- package/dist/harmony127.mjs +14 -5
- package/dist/harmony127.mjs.map +1 -1
- package/dist/harmony128.cjs +37 -6
- package/dist/harmony128.cjs.map +1 -1
- package/dist/harmony128.mjs +36 -5
- package/dist/harmony128.mjs.map +1 -1
- package/dist/harmony129.cjs +28 -10
- package/dist/harmony129.cjs.map +1 -1
- package/dist/harmony129.mjs +28 -10
- package/dist/harmony129.mjs.map +1 -1
- package/dist/harmony130.cjs +10 -63
- package/dist/harmony130.cjs.map +1 -1
- package/dist/harmony130.mjs +9 -62
- package/dist/harmony130.mjs.map +1 -1
- package/dist/harmony131.cjs +6 -88
- package/dist/harmony131.cjs.map +1 -1
- package/dist/harmony131.mjs +5 -87
- package/dist/harmony131.mjs.map +1 -1
- package/dist/harmony132.cjs +6 -15
- package/dist/harmony132.cjs.map +1 -1
- package/dist/harmony132.mjs +6 -15
- package/dist/harmony132.mjs.map +1 -1
- package/dist/harmony133.cjs +25 -97
- package/dist/harmony133.cjs.map +1 -1
- package/dist/harmony133.mjs +24 -96
- package/dist/harmony133.mjs.map +1 -1
- package/dist/harmony134.cjs +7 -14
- package/dist/harmony134.cjs.map +1 -1
- package/dist/harmony134.mjs +6 -13
- package/dist/harmony134.mjs.map +1 -1
- package/dist/harmony135.cjs +13 -15
- package/dist/harmony135.cjs.map +1 -1
- package/dist/harmony135.mjs +12 -14
- package/dist/harmony135.mjs.map +1 -1
- package/dist/harmony136.cjs +7 -37
- package/dist/harmony136.cjs.map +1 -1
- package/dist/harmony136.mjs +6 -36
- package/dist/harmony136.mjs.map +1 -1
- package/dist/harmony137.cjs +10 -28
- package/dist/harmony137.cjs.map +1 -1
- package/dist/harmony137.mjs +10 -28
- package/dist/harmony137.mjs.map +1 -1
- package/dist/harmony138.cjs +1 -1
- package/dist/harmony138.mjs +1 -1
- package/dist/harmony139.cjs +1 -1
- package/dist/harmony139.mjs +1 -1
- package/dist/harmony14.cjs +1 -1
- package/dist/harmony14.mjs +1 -1
- package/dist/harmony140.cjs +2 -2
- package/dist/harmony140.mjs +2 -2
- package/dist/harmony141.cjs +11 -7
- package/dist/harmony141.cjs.map +1 -1
- package/dist/harmony141.mjs +11 -7
- package/dist/harmony141.mjs.map +1 -1
- package/dist/harmony142.cjs +15 -56
- package/dist/harmony142.cjs.map +1 -1
- package/dist/harmony142.mjs +15 -56
- package/dist/harmony142.mjs.map +1 -1
- package/dist/harmony143.cjs +20 -59
- package/dist/harmony143.cjs.map +1 -1
- package/dist/harmony143.mjs +20 -59
- package/dist/harmony143.mjs.map +1 -1
- package/dist/harmony144.cjs +13 -19
- package/dist/harmony144.cjs.map +1 -1
- package/dist/harmony144.mjs +12 -18
- package/dist/harmony144.mjs.map +1 -1
- package/dist/harmony145.cjs +5 -10
- package/dist/harmony145.cjs.map +1 -1
- package/dist/harmony145.mjs +5 -10
- package/dist/harmony145.mjs.map +1 -1
- package/dist/harmony146.cjs +11 -15
- package/dist/harmony146.cjs.map +1 -1
- package/dist/harmony146.mjs +11 -15
- package/dist/harmony146.mjs.map +1 -1
- package/dist/harmony147.cjs +28 -17
- package/dist/harmony147.cjs.map +1 -1
- package/dist/harmony147.mjs +28 -17
- package/dist/harmony147.mjs.map +1 -1
- package/dist/harmony148.cjs +12 -10
- package/dist/harmony148.cjs.map +1 -1
- package/dist/harmony148.mjs +12 -10
- package/dist/harmony148.mjs.map +1 -1
- package/dist/harmony17.cjs +1 -1
- package/dist/harmony17.mjs +1 -1
- package/dist/harmony25.cjs +1 -1
- package/dist/harmony25.mjs +1 -1
- package/dist/harmony26.cjs +1 -1
- package/dist/harmony26.mjs +1 -1
- package/dist/harmony4.cjs +15 -24
- package/dist/harmony4.cjs.map +1 -1
- package/dist/harmony4.mjs +15 -24
- package/dist/harmony4.mjs.map +1 -1
- package/dist/harmony5.cjs +1 -1
- package/dist/harmony5.mjs +1 -1
- package/dist/harmony6.cjs +3 -3
- package/dist/harmony6.mjs +3 -3
- package/dist/harmony7.cjs +1 -1
- package/dist/harmony7.mjs +1 -1
- package/dist/harmony75.cjs +1 -1
- package/dist/harmony75.mjs +1 -1
- package/dist/harmony76.cjs +51 -6
- package/dist/harmony76.cjs.map +1 -1
- package/dist/harmony76.mjs +50 -5
- package/dist/harmony76.mjs.map +1 -1
- package/dist/harmony77.cjs +38 -8
- package/dist/harmony77.cjs.map +1 -1
- package/dist/harmony77.mjs +38 -8
- package/dist/harmony77.mjs.map +1 -1
- package/dist/harmony78.cjs +9 -18
- package/dist/harmony78.cjs.map +1 -1
- package/dist/harmony78.mjs +8 -17
- package/dist/harmony78.mjs.map +1 -1
- package/dist/harmony79.cjs +6 -21
- package/dist/harmony79.cjs.map +1 -1
- package/dist/harmony79.mjs +8 -23
- package/dist/harmony79.mjs.map +1 -1
- package/dist/harmony8.cjs +5 -5
- package/dist/harmony8.mjs +5 -5
- package/dist/harmony80.cjs +28 -4
- package/dist/harmony80.cjs.map +1 -1
- package/dist/harmony80.mjs +28 -4
- package/dist/harmony80.mjs.map +1 -1
- package/dist/harmony81.cjs +3 -32
- package/dist/harmony81.cjs.map +1 -1
- package/dist/harmony81.mjs +3 -32
- package/dist/harmony81.mjs.map +1 -1
- package/dist/harmony82.cjs +30 -29
- package/dist/harmony82.cjs.map +1 -1
- package/dist/harmony82.mjs +31 -30
- package/dist/harmony82.mjs.map +1 -1
- package/dist/harmony83.cjs +43 -19
- package/dist/harmony83.cjs.map +1 -1
- package/dist/harmony83.mjs +43 -19
- package/dist/harmony83.mjs.map +1 -1
- package/dist/harmony84.cjs +27 -29
- package/dist/harmony84.cjs.map +1 -1
- package/dist/harmony84.mjs +27 -29
- package/dist/harmony84.mjs.map +1 -1
- package/dist/harmony85.cjs +64 -57
- package/dist/harmony85.cjs.map +1 -1
- package/dist/harmony85.mjs +64 -57
- package/dist/harmony85.mjs.map +1 -1
- package/dist/harmony86.cjs +15 -9
- package/dist/harmony86.cjs.map +1 -1
- package/dist/harmony86.mjs +14 -8
- package/dist/harmony86.mjs.map +1 -1
- package/dist/harmony87.cjs +3 -8
- package/dist/harmony87.cjs.map +1 -1
- package/dist/harmony87.mjs +3 -8
- package/dist/harmony87.mjs.map +1 -1
- package/dist/harmony88.cjs +10 -27
- package/dist/harmony88.cjs.map +1 -1
- package/dist/harmony88.mjs +11 -28
- package/dist/harmony88.mjs.map +1 -1
- package/dist/harmony89.cjs +13 -4
- package/dist/harmony89.cjs.map +1 -1
- package/dist/harmony89.mjs +12 -3
- package/dist/harmony89.mjs.map +1 -1
- package/dist/harmony90.cjs +9 -31
- package/dist/harmony90.cjs.map +1 -1
- package/dist/harmony90.mjs +10 -32
- package/dist/harmony90.mjs.map +1 -1
- package/dist/harmony91.cjs +22 -44
- package/dist/harmony91.cjs.map +1 -1
- package/dist/harmony91.mjs +21 -43
- package/dist/harmony91.mjs.map +1 -1
- package/dist/harmony92.cjs +160 -23
- package/dist/harmony92.cjs.map +1 -1
- package/dist/harmony92.mjs +160 -23
- package/dist/harmony92.mjs.map +1 -1
- package/dist/harmony93.cjs +41 -63
- package/dist/harmony93.cjs.map +1 -1
- package/dist/harmony93.mjs +41 -63
- package/dist/harmony93.mjs.map +1 -1
- package/dist/harmony94.cjs +25 -13
- package/dist/harmony94.cjs.map +1 -1
- package/dist/harmony94.mjs +26 -14
- package/dist/harmony94.mjs.map +1 -1
- package/dist/harmony95.cjs +3 -3
- package/dist/harmony95.cjs.map +1 -1
- package/dist/harmony95.mjs +3 -3
- package/dist/harmony95.mjs.map +1 -1
- package/dist/harmony96.cjs +16 -9
- package/dist/harmony96.cjs.map +1 -1
- package/dist/harmony96.mjs +18 -11
- package/dist/harmony96.mjs.map +1 -1
- package/dist/harmony97.cjs +75 -21
- package/dist/harmony97.cjs.map +1 -1
- package/dist/harmony97.mjs +74 -20
- package/dist/harmony97.mjs.map +1 -1
- package/dist/harmony98.cjs +9 -163
- package/dist/harmony98.cjs.map +1 -1
- package/dist/harmony98.mjs +10 -164
- package/dist/harmony98.mjs.map +1 -1
- package/dist/harmony99.cjs +30 -44
- package/dist/harmony99.cjs.map +1 -1
- package/dist/harmony99.mjs +30 -44
- package/dist/harmony99.mjs.map +1 -1
- package/dist/types/src/components/Sidebar/Sidebar.d.ts +15 -49
- package/dist/types/src/components/Sidebar/SidebarContent/SidebarContent.d.ts +7 -0
- package/dist/types/src/components/Sidebar/SidebarContext.d.ts +3 -0
- package/dist/types/src/components/Sidebar/SidebarProvider.d.ts +3 -0
- package/dist/types/src/components/Sidebar/Widgets/Avatar/Avatar.d.ts +5 -0
- package/dist/types/src/components/Sidebar/Widgets/HelpMenu/HelpMenu.d.ts +13 -0
- package/dist/types/src/components/Sidebar/Widgets/HelpMenu/HelpMenu.test.d.ts +1 -0
- package/dist/types/src/components/Sidebar/Widgets/IconLink/IconLink.test.d.ts +1 -0
- package/dist/types/src/components/Sidebar/Widgets/Menu/Menu.d.ts +3 -2
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/BillingMenuItem/BillingMenuItem.d.ts +13 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeam/CreateNewTeam.d.ts +17 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeam/CreateNewTeam.test.d.ts +1 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeamPlaceholder/CreateNewTeamPlaceholder.d.ts +17 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeamPlaceholder/CreateNewTeamPlaceholder.test.d.ts +1 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/DarkModeToggle/DarkModeToggle.d.ts +18 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileMenu.d.ts +11 -24
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileMenu.stories.d.ts +3 -5
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileSettingsMenuItem/ProfileSettingsMenuItem.d.ts +10 -35
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileSettingsMenuItem/ProfileSettingsMenuItem.test.d.ts +1 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProviderMenuItem/ProviderMenuItem.d.ts +13 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProviderMenuItem/ProviderMenuItem.test.d.ts +1 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/TeamMenuItem/TeamMenuItem.d.ts +1 -3
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/TeamMenuItem/TeamMenuItem.test.d.ts +1 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/TeamSettingsMenuItem/TeamSettingsMenuItem.d.ts +13 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/TeamSettingsMenuItem/TeamSettingsMenuItem.test.d.ts +1 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/TeamSwitch/TeamSwitch.d.ts +5 -7
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/TeamSwitch/TeamSwitch.test.d.ts +1 -0
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/UpgradeMenuItem/UpgradeMenuItem.d.ts +6 -9
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/UpgradeMenuItem/UpgradeMenuItem.test.d.ts +1 -0
- package/dist/types/src/components/Sidebar/Widgets/Tasks/utils/content.d.ts +4 -0
- package/dist/types/src/components/Sidebar/hooks/useSidebar.d.ts +1 -0
- package/dist/types/src/components/Sidebar/hooks/useSidebarDataLoader.d.ts +5 -0
- package/dist/types/src/components/Sidebar/types.d.ts +72 -0
- package/dist/types/src/features/auth/core/types/jwtTokenPayload.d.ts +16 -10
- package/dist/types/src/features/auth/core/types/jwtTokenPayload.fixture.d.ts +15 -11
- package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedSessionPayload.d.ts +7 -5
- package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedUser.d.ts +1 -1
- package/dist/types/src/features/publicApi/hooks/useGetProjectPermissionMetaQuery.d.ts +2 -2
- package/dist/types/src/features/publicApi/hooks/useGetTeamUsersQuery.d.ts +1 -1
- package/dist/types/src/features/publicApi/hooks/useListPermissionTemplates.d.ts +1 -1
- package/dist/types/src/features/publicApi/hooks/useListTeamUsersQuery.d.ts +1 -1
- package/dist/types/src/features/publicApi/permissionTemplates.d.ts +4 -4
- package/dist/types/src/features/publicApi/projects.d.ts +8 -8
- package/dist/types/src/features/publicApi/teamUsers.d.ts +8 -8
- package/dist/types/src/features/publicApi/types/permissionTemplateTypes.d.ts +6 -6
- package/dist/types/src/features/publicApi/types/permissionTypes.d.ts +2 -2
- package/dist/types/src/features/publicApi/types/projectTypes.d.ts +12 -12
- package/dist/types/src/features/publicApi/types/teamUserTypes.d.ts +10 -10
- package/dist/types/src/utils/user/permissions.d.ts +9 -0
- package/dist/types/src/utils/user/permissions.test.d.ts +1 -0
- package/dist/types/tests/mocks/sidebar/sidebar.d.ts +19 -0
- package/dist/types/tests/utils/sidebar.d.ts +4 -0
- package/package.json +1 -1
- package/dist/harmony149.cjs +0 -9
- package/dist/harmony149.cjs.map +0 -1
- package/dist/harmony149.mjs +0 -9
- package/dist/harmony149.mjs.map +0 -1
- package/dist/harmony150.cjs +0 -15
- package/dist/harmony150.cjs.map +0 -1
- package/dist/harmony150.mjs +0 -15
- package/dist/harmony150.mjs.map +0 -1
- package/dist/harmony151.cjs +0 -35
- package/dist/harmony151.cjs.map +0 -1
- package/dist/harmony151.mjs +0 -35
- package/dist/harmony151.mjs.map +0 -1
- package/dist/harmony152.cjs +0 -17
- package/dist/harmony152.cjs.map +0 -1
- package/dist/harmony152.mjs +0 -17
- package/dist/harmony152.mjs.map +0 -1
- package/dist/harmony153.cjs +0 -49
- package/dist/harmony153.cjs.map +0 -1
- package/dist/harmony153.mjs +0 -49
- package/dist/harmony153.mjs.map +0 -1
- package/dist/harmony154.cjs +0 -15
- package/dist/harmony154.cjs.map +0 -1
- package/dist/harmony154.mjs +0 -15
- package/dist/harmony154.mjs.map +0 -1
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuContent.d.ts +0 -6
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuContext.d.ts +0 -3
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuProvider.d.ts +0 -7
- package/dist/types/src/components/Sidebar/utils/index.d.ts +0 -4
- /package/dist/types/src/components/Sidebar/Widgets/{ProfileMenu/ProfileMenu.test.d.ts → Avatar/Avatar.test.d.ts} +0 -0
- /package/dist/types/src/components/Sidebar/{UpgradeIcon → Widgets/ProfileMenu/UpgradeIcon}/UpgradeIcon.d.ts +0 -0
package/dist/harmony98.mjs
CHANGED
@@ -1,169 +1,15 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
|
4
|
-
const
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
const expertUrl = navigationClient.getExpertUrl();
|
9
|
-
return useMemo(() => {
|
10
|
-
if (!project || !enabled) {
|
11
|
-
return [];
|
12
|
-
}
|
13
|
-
const navigationVisibility = getProjectNavigationVisibilityMap(
|
14
|
-
project,
|
15
|
-
adminRights,
|
16
|
-
() => true
|
1
|
+
import { SidebarContext } from "./harmony95.mjs";
|
2
|
+
import { useContext } from "react";
|
3
|
+
const useSidebar = () => {
|
4
|
+
const context = useContext(SidebarContext);
|
5
|
+
if (!context) {
|
6
|
+
throw new Error(
|
7
|
+
"You are using useSidebar hook outside its context. Please review your code implementation"
|
17
8
|
);
|
18
|
-
|
19
|
-
|
20
|
-
label: "Apps",
|
21
|
-
isActive: (input) => input === "apps",
|
22
|
-
link: `${expertUrl}/apps/${project.project_id}/`,
|
23
|
-
...navigationVisibility.apps
|
24
|
-
};
|
25
|
-
const appsNavigationItemArrInMainMenu = [];
|
26
|
-
const appsNavigationItemArrInMoreMenu = [];
|
27
|
-
if (project.project_type === "content_integration") {
|
28
|
-
appsNavigationItemArrInMoreMenu.push(appsNavigationItem);
|
29
|
-
} else {
|
30
|
-
appsNavigationItemArrInMainMenu.push(appsNavigationItem);
|
31
|
-
}
|
32
|
-
return [
|
33
|
-
{
|
34
|
-
key: "edit",
|
35
|
-
label: "Editor",
|
36
|
-
link: `${expertUrl}/project/${project.project_id}/`,
|
37
|
-
isActive: (input) => input === "edit",
|
38
|
-
...navigationVisibility.editor
|
39
|
-
},
|
40
|
-
{
|
41
|
-
key: "files",
|
42
|
-
label: "Files",
|
43
|
-
link: `${expertUrl}/files/${project.project_id}/`,
|
44
|
-
isActive: (input) => input === "files",
|
45
|
-
...navigationVisibility.files
|
46
|
-
},
|
47
|
-
...project.project_type === "content_integration" ? [
|
48
|
-
{
|
49
|
-
key: "contentManagement",
|
50
|
-
label: "Content management",
|
51
|
-
isActive: (input) => input === "apps",
|
52
|
-
link: `${expertUrl}/apps/${project.project_id}/${marketingSupportProjectSelectedAppSlug}`,
|
53
|
-
...navigationVisibility.contentManagement
|
54
|
-
}
|
55
|
-
] : [
|
56
|
-
{
|
57
|
-
key: "upload",
|
58
|
-
label: "Upload",
|
59
|
-
link: `${expertUrl}/upload/${project.project_id}/`,
|
60
|
-
isActive: (input) => input === "upload",
|
61
|
-
...navigationVisibility.upload
|
62
|
-
},
|
63
|
-
{
|
64
|
-
key: "download",
|
65
|
-
label: "Download",
|
66
|
-
link: `${expertUrl}/download/${project.project_id}/`,
|
67
|
-
isActive: (input) => input === "download",
|
68
|
-
...navigationVisibility.download
|
69
|
-
}
|
70
|
-
],
|
71
|
-
{
|
72
|
-
key: "tasks",
|
73
|
-
label: "Tasks",
|
74
|
-
link: `${expertUrl}/tasks/${project.project_id}/`,
|
75
|
-
isActive: (input) => input === "tasks",
|
76
|
-
// TODO: Add task count
|
77
|
-
// badge: taskCount,
|
78
|
-
...navigationVisibility.tasks
|
79
|
-
},
|
80
|
-
{
|
81
|
-
key: "workflows",
|
82
|
-
label: "Workflows",
|
83
|
-
link: `${expertUrl}/workflows/${project.project_id}/`,
|
84
|
-
isActive: (input) => input === "workflows",
|
85
|
-
novel: "New",
|
86
|
-
onClick: () => {
|
87
|
-
window.location.assign(`${expertUrl}/workflows/${project.project_id}/`);
|
88
|
-
},
|
89
|
-
...navigationVisibility.workflows
|
90
|
-
},
|
91
|
-
{
|
92
|
-
key: "contributors",
|
93
|
-
label: "Contributors",
|
94
|
-
link: `${expertUrl}/contributors/${project.project_id}/`,
|
95
|
-
isActive: (input) => input === "contributors",
|
96
|
-
...navigationVisibility.contributors
|
97
|
-
},
|
98
|
-
{
|
99
|
-
key: "screenshots",
|
100
|
-
label: "Screenshots",
|
101
|
-
link: `${expertUrl}/screenshots/${project.project_id}/`,
|
102
|
-
isActive: (input) => input === "screenshots",
|
103
|
-
...navigationVisibility.screenshots
|
104
|
-
},
|
105
|
-
{
|
106
|
-
key: "glossary",
|
107
|
-
label: "Glossary",
|
108
|
-
link: `${expertUrl}/glossary/${project.project_id}/`,
|
109
|
-
isActive: (input) => input === "glossary",
|
110
|
-
...navigationVisibility.glossary
|
111
|
-
},
|
112
|
-
...appsNavigationItemArrInMainMenu,
|
113
|
-
{
|
114
|
-
key: "more",
|
115
|
-
label: "More...",
|
116
|
-
isActive: (input) => ["settings", "statistics", "duplicates", "live edit"].includes(input),
|
117
|
-
...navigationVisibility.more,
|
118
|
-
dropdown: [
|
119
|
-
[
|
120
|
-
{
|
121
|
-
link: `${expertUrl}/settings/${project.project_id}/`,
|
122
|
-
label: "Settings",
|
123
|
-
...navigationVisibility.settings
|
124
|
-
},
|
125
|
-
{
|
126
|
-
link: `${expertUrl}/settings/${project.project_id}/#branches`,
|
127
|
-
label: "Branches",
|
128
|
-
...navigationVisibility.branches
|
129
|
-
},
|
130
|
-
{
|
131
|
-
link: `${expertUrl}/settings/${project.project_id}/#ota-bundles`,
|
132
|
-
label: "OTA Bundles",
|
133
|
-
...navigationVisibility.otaBundles
|
134
|
-
},
|
135
|
-
{
|
136
|
-
link: `${expertUrl}/settings/${project.project_id}/#project-automations`,
|
137
|
-
label: "Automations",
|
138
|
-
...navigationVisibility.automations
|
139
|
-
},
|
140
|
-
{
|
141
|
-
link: `${expertUrl}/dupes/${project.project_id}/`,
|
142
|
-
label: "Duplicate finder",
|
143
|
-
...navigationVisibility.duplicateFinder
|
144
|
-
}
|
145
|
-
],
|
146
|
-
[
|
147
|
-
...appsNavigationItemArrInMoreMenu,
|
148
|
-
{
|
149
|
-
// TODO: This could be problematic tab, because it is not a link and we can't just redirect. We need to find a workaround for that.
|
150
|
-
label: "Activity",
|
151
|
-
onClick: () => {
|
152
|
-
},
|
153
|
-
...navigationVisibility.activity
|
154
|
-
},
|
155
|
-
{
|
156
|
-
link: `${expertUrl}/statistics/${project.project_id}/`,
|
157
|
-
label: "Statistics",
|
158
|
-
...navigationVisibility.statistics
|
159
|
-
}
|
160
|
-
]
|
161
|
-
]
|
162
|
-
}
|
163
|
-
];
|
164
|
-
}, [project, adminRights, enabled, expertUrl]);
|
9
|
+
}
|
10
|
+
return context;
|
165
11
|
};
|
166
12
|
export {
|
167
|
-
|
13
|
+
useSidebar
|
168
14
|
};
|
169
15
|
//# sourceMappingURL=harmony98.mjs.map
|
package/dist/harmony98.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony98.mjs","sources":["../src/features/navigation/hooks/useExpertNavigation.ts"],"sourcesContent":["import type { Contributor, Project } from '@features/node'\nimport { useMemo } from 'react'\nimport { useNavigationClient } from '../providers/NavigationClientProvider'\nimport type { NavigationTabsItem } from '../types/navigation'\nimport { getProjectNavigationVisibilityMap } from '../utils/toolbarVisibility'\n\n// TODO: Validate features types\nexport const getIsFeatureEnabled = (features: Record<string, boolean>, name: string) => {\n\tconst featureState = features[name]\n\n\treturn (\n\t\tfeatureState !== null &&\n\t\tfeatureState !== undefined &&\n\t\t[true, 'on', 'true'].includes(featureState)\n\t)\n}\n\n/**\n * Hook to generate legacy navigation items using the existing structure\n * but with context API instead of Redux\n */\nexport const useExpertNavigation = (\n\tenabled: boolean,\n\tproject?: Project,\n\tcontributor?: Contributor,\n) => {\n\t// Use contributor data if provided, otherwise use defaults\n\tconst adminRights = contributor?.admin_rights || []\n\t// TODO: Implement selected app slug, small investigation is needed\n\tconst marketingSupportProjectSelectedAppSlug = 'selected-app-slug'\n\tconst navigationClient = useNavigationClient()\n\tconst expertUrl = navigationClient.getExpertUrl()\n\n\treturn useMemo(() => {\n\t\t// Get data from contexts instead of Redux, or use provided data\n\t\tif (!project || !enabled) {\n\t\t\treturn []\n\t\t}\n\t\t/* TODO: We're missing badges API. We need to get it from the backend or find alternative way to get task count\n\t\t * Fetch tasks and calculate count is not a good idea, because it can have pagination, therefore we can\n\t\t * ask for an additional prop in tasks response: task_count based on branch_id + project_id + task_status\n\t\t */\n\t\t// const taskCount = getTaskCount(project, branch, badges.tasks)\n\n\t\t// TODO: Implement feature flags functionality, most likely separate package\n\t\t// const isFeatureEnabled = (feature: string) => getIsFeatureEnabled(features, feature)\n\n\t\tconst navigationVisibility = getProjectNavigationVisibilityMap(\n\t\t\tproject,\n\t\t\tadminRights,\n\t\t\t() => true /*isFeatureEnabled*/,\n\t\t)\n\n\t\tconst appsNavigationItem: NavigationTabsItem = {\n\t\t\tkey: 'apps',\n\t\t\tlabel: 'Apps',\n\t\t\tisActive: (input: string) => input === 'apps',\n\t\t\tlink: `${expertUrl}/apps/${project.project_id}/`,\n\t\t\t...navigationVisibility.apps,\n\t\t}\n\n\t\tconst appsNavigationItemArrInMainMenu: NavigationTabsItem[] = []\n\t\tconst appsNavigationItemArrInMoreMenu: NavigationTabsItem[] = []\n\n\t\tif (project.project_type === 'content_integration') {\n\t\t\tappsNavigationItemArrInMoreMenu.push(appsNavigationItem)\n\t\t} else {\n\t\t\tappsNavigationItemArrInMainMenu.push(appsNavigationItem)\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tkey: 'edit',\n\t\t\t\tlabel: 'Editor',\n\t\t\t\tlink: `${expertUrl}/project/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'edit',\n\t\t\t\t...navigationVisibility.editor,\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: 'files',\n\t\t\t\tlabel: 'Files',\n\t\t\t\tlink: `${expertUrl}/files/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'files',\n\t\t\t\t...navigationVisibility.files,\n\t\t\t},\n\t\t\t...(project.project_type === 'content_integration'\n\t\t\t\t? [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tkey: 'contentManagement',\n\t\t\t\t\t\t\tlabel: 'Content management',\n\t\t\t\t\t\t\tisActive: (input: string) => input === 'apps',\n\t\t\t\t\t\t\tlink: `${expertUrl}/apps/${project.project_id}/${marketingSupportProjectSelectedAppSlug}`,\n\t\t\t\t\t\t\t...navigationVisibility.contentManagement,\n\t\t\t\t\t\t},\n\t\t\t\t\t]\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tkey: 'upload',\n\t\t\t\t\t\t\tlabel: 'Upload',\n\t\t\t\t\t\t\tlink: `${expertUrl}/upload/${project.project_id}/`,\n\t\t\t\t\t\t\tisActive: (input: string) => input === 'upload',\n\t\t\t\t\t\t\t...navigationVisibility.upload,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tkey: 'download',\n\t\t\t\t\t\t\tlabel: 'Download',\n\t\t\t\t\t\t\tlink: `${expertUrl}/download/${project.project_id}/`,\n\t\t\t\t\t\t\tisActive: (input: string) => input === 'download',\n\t\t\t\t\t\t\t...navigationVisibility.download,\n\t\t\t\t\t\t},\n\t\t\t\t\t]),\n\t\t\t{\n\t\t\t\tkey: 'tasks',\n\t\t\t\tlabel: 'Tasks',\n\t\t\t\tlink: `${expertUrl}/tasks/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'tasks',\n\t\t\t\t// TODO: Add task count\n\t\t\t\t// badge: taskCount,\n\t\t\t\t...navigationVisibility.tasks,\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: 'workflows',\n\t\t\t\tlabel: 'Workflows',\n\t\t\t\tlink: `${expertUrl}/workflows/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'workflows',\n\t\t\t\tnovel: 'New',\n\t\t\t\tonClick: () => {\n\t\t\t\t\t// TODO: Resolve analytics globally, most likely separate package\n\t\t\t\t\t// track(AnalyticsEventName.EDITOR_WORKFLOWS_TAB_CLICKED);\n\t\t\t\t\twindow.location.assign(`${expertUrl}/workflows/${project.project_id}/`)\n\t\t\t\t},\n\t\t\t\t...navigationVisibility.workflows,\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: 'contributors',\n\t\t\t\tlabel: 'Contributors',\n\t\t\t\tlink: `${expertUrl}/contributors/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'contributors',\n\t\t\t\t...navigationVisibility.contributors,\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: 'screenshots',\n\t\t\t\tlabel: 'Screenshots',\n\t\t\t\tlink: `${expertUrl}/screenshots/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'screenshots',\n\t\t\t\t...navigationVisibility.screenshots,\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: 'glossary',\n\t\t\t\tlabel: 'Glossary',\n\t\t\t\tlink: `${expertUrl}/glossary/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'glossary',\n\t\t\t\t...navigationVisibility.glossary,\n\t\t\t},\n\t\t\t...appsNavigationItemArrInMainMenu,\n\t\t\t{\n\t\t\t\tkey: 'more',\n\t\t\t\tlabel: 'More...',\n\t\t\t\tisActive: (input: string) =>\n\t\t\t\t\t['settings', 'statistics', 'duplicates', 'live edit'].includes(input),\n\t\t\t\t...navigationVisibility.more,\n\t\t\t\tdropdown: [\n\t\t\t\t\t[\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlink: `${expertUrl}/settings/${project.project_id}/`,\n\t\t\t\t\t\t\tlabel: 'Settings',\n\t\t\t\t\t\t\t...navigationVisibility.settings,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlink: `${expertUrl}/settings/${project.project_id}/#branches`,\n\t\t\t\t\t\t\tlabel: 'Branches',\n\t\t\t\t\t\t\t...navigationVisibility.branches,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlink: `${expertUrl}/settings/${project.project_id}/#ota-bundles`,\n\t\t\t\t\t\t\tlabel: 'OTA Bundles',\n\t\t\t\t\t\t\t...navigationVisibility.otaBundles,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlink: `${expertUrl}/settings/${project.project_id}/#project-automations`,\n\t\t\t\t\t\t\tlabel: 'Automations',\n\t\t\t\t\t\t\t...navigationVisibility.automations,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlink: `${expertUrl}/dupes/${project.project_id}/`,\n\t\t\t\t\t\t\tlabel: 'Duplicate finder',\n\t\t\t\t\t\t\t...navigationVisibility.duplicateFinder,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t...appsNavigationItemArrInMoreMenu,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// TODO: This could be problematic tab, because it is not a link and we can't just redirect. We need to find a workaround for that.\n\t\t\t\t\t\t\tlabel: 'Activity',\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t// const showActivityEvent = new CustomEvent(\"show-activity\", {\n\t\t\t\t\t\t\t\t// \tdetail: {\n\t\t\t\t\t\t\t\t// \t\tprojectId: project.id,\n\t\t\t\t\t\t\t\t// \t\tbranchId: branch.branchId,\n\t\t\t\t\t\t\t\t// \t\tbranchName: branch.branchName,\n\t\t\t\t\t\t\t\t// \t},\n\t\t\t\t\t\t\t\t// });\n\t\t\t\t\t\t\t\t// document.dispatchEvent(showActivityEvent);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t...navigationVisibility.activity,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlink: `${expertUrl}/statistics/${project.project_id}/`,\n\t\t\t\t\t\t\tlabel: 'Statistics',\n\t\t\t\t\t\t\t...navigationVisibility.statistics,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t},\n\t\t]\n\t}, [project, adminRights, enabled, expertUrl])\n}\n\n// TODO: Helper function for getting task count from badge data\n// const _getTaskCount = (project: any, branch: any, taskBadges: any) => {\n// \tif (!taskBadges) return 0\n\n// \t// Implementation would depend on your getTaskCountFromTasks utility\n// \t// Simplified version:\n// \tconst projectTasks = taskBadges[project.id] || {}\n// \treturn projectTasks[branch.branchId || 'master'] || 0\n// }\n"],"names":[],"mappings":"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"}
|
1
|
+
{"version":3,"file":"harmony98.mjs","sources":["../src/components/Sidebar/hooks/useSidebar.ts"],"sourcesContent":["import { SidebarContext } from '@components/Sidebar/SidebarContext'\nimport { useContext } from 'react'\n\nexport const useSidebar = () => {\n\tconst context = useContext(SidebarContext)\n\n\tif (!context) {\n\t\tthrow new Error(\n\t\t\t'You are using useSidebar hook outside its context. Please review your code implementation',\n\t\t)\n\t}\n\n\treturn context\n}\n"],"names":[],"mappings":";;AAGO,MAAM,aAAa,MAAM;AACzB,QAAA,UAAU,WAAW,cAAc;AAEzC,MAAI,CAAC,SAAS;AACb,UAAM,IAAI;AAAA,MACT;AAAA,IACD;AAAA,EAAA;AAGM,SAAA;AACR;"}
|
package/dist/harmony99.cjs
CHANGED
@@ -1,47 +1,33 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
-
const
|
4
|
-
const
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
// You can apply translations here if needed
|
34
|
-
icon: item.icon,
|
35
|
-
visible: true,
|
36
|
-
badge,
|
37
|
-
disabled,
|
38
|
-
dropdown: item.dropdown,
|
39
|
-
isActive,
|
40
|
-
link: `${nextgenUrl}${item.path({ projectId })}`,
|
41
|
-
onClick: () => navigate(item.path({ projectId }))
|
42
|
-
};
|
43
|
-
});
|
44
|
-
}, [project, activeKey, enabled, navigate, contributor, nextgenUrl]);
|
45
|
-
};
|
46
|
-
exports.useNextgenNavigation = useNextgenNavigation;
|
3
|
+
const plan = require("./harmony9.cjs");
|
4
|
+
const withJwtCheck = (checkFn) => (jwtPayload) => !!jwtPayload && checkFn(jwtPayload);
|
5
|
+
const canAccessReporting = withJwtCheck(
|
6
|
+
(jwt) => ["admin", "owner"].includes(jwt.userTeamRole)
|
7
|
+
);
|
8
|
+
const canAccessTeamSettings = withJwtCheck(
|
9
|
+
(jwt) => ["admin", "biller", "owner"].includes(jwt.userTeamRole) && jwt.isFullyAuthenticated
|
10
|
+
);
|
11
|
+
const canCreateTeam = withJwtCheck(
|
12
|
+
(jwt) => ["admin", "owner"].includes(jwt.userTeamRole) && jwt.isFullyAuthenticated && !jwt.isEndOfTrialActive
|
13
|
+
);
|
14
|
+
const canUpgradePlan = withJwtCheck(
|
15
|
+
(jwt) => ["admin", "owner", "biller"].includes(jwt.userTeamRole) && jwt.isFullyAuthenticated && (plan.isFreePlan(jwt.planId) || plan.isTrialPlan(jwt.planId))
|
16
|
+
);
|
17
|
+
const canChangeBilling = withJwtCheck(
|
18
|
+
(jwt) => ["admin", "owner", "biller"].includes(jwt.userTeamRole) && jwt.isFullyAuthenticated && !jwt.isTeamSuspended && !jwt.isEndOfTrialActive
|
19
|
+
);
|
20
|
+
const canAccessProviderDashboard = withJwtCheck(
|
21
|
+
(jwt) => jwt.isProviderAlpha && !jwt.isTeamSuspended && jwt.isFullyAuthenticated
|
22
|
+
);
|
23
|
+
const canAccessProfileSettings = withJwtCheck(
|
24
|
+
(jwt) => !jwt.isEndOfTrialActive && !jwt.isTeamSuspended
|
25
|
+
);
|
26
|
+
exports.canAccessProfileSettings = canAccessProfileSettings;
|
27
|
+
exports.canAccessProviderDashboard = canAccessProviderDashboard;
|
28
|
+
exports.canAccessReporting = canAccessReporting;
|
29
|
+
exports.canAccessTeamSettings = canAccessTeamSettings;
|
30
|
+
exports.canChangeBilling = canChangeBilling;
|
31
|
+
exports.canCreateTeam = canCreateTeam;
|
32
|
+
exports.canUpgradePlan = canUpgradePlan;
|
47
33
|
//# sourceMappingURL=harmony99.cjs.map
|
package/dist/harmony99.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony99.cjs","sources":["../src/
|
1
|
+
{"version":3,"file":"harmony99.cjs","sources":["../src/utils/user/permissions.ts"],"sourcesContent":["import type { JwtTokenPayload } from '@features/auth/core/types/jwtTokenPayload'\nimport { isFreePlan, isTrialPlan } from '@utils'\n\ntype JwtCheckFn = (jwt: JwtTokenPayload) => boolean\n\nconst withJwtCheck =\n\t(checkFn: JwtCheckFn) =>\n\t(jwtPayload: JwtTokenPayload | null | undefined): boolean =>\n\t\t!!jwtPayload && checkFn(jwtPayload)\n\nexport const canAccessStyleGuide = withJwtCheck((jwt) =>\n\t['admin', 'biller', 'owner'].includes(jwt.userTeamRole),\n)\n\nexport const canAccessReporting = withJwtCheck((jwt) =>\n\t['admin', 'owner'].includes(jwt.userTeamRole),\n)\n\nexport const canAccessTeamSettings = withJwtCheck(\n\t(jwt) => ['admin', 'biller', 'owner'].includes(jwt.userTeamRole) && jwt.isFullyAuthenticated,\n)\n\nexport const canCreateTeam = withJwtCheck(\n\t(jwt) =>\n\t\t['admin', 'owner'].includes(jwt.userTeamRole) &&\n\t\tjwt.isFullyAuthenticated &&\n\t\t!jwt.isEndOfTrialActive,\n)\n\nexport const canUpgradePlan = withJwtCheck(\n\t(jwt) =>\n\t\t['admin', 'owner', 'biller'].includes(jwt.userTeamRole) &&\n\t\tjwt.isFullyAuthenticated &&\n\t\t(isFreePlan(jwt.planId) || isTrialPlan(jwt.planId)),\n)\n\nexport const canChangeBilling = withJwtCheck(\n\t(jwt) =>\n\t\t['admin', 'owner', 'biller'].includes(jwt.userTeamRole) &&\n\t\tjwt.isFullyAuthenticated &&\n\t\t!jwt.isTeamSuspended &&\n\t\t!jwt.isEndOfTrialActive,\n)\n\nexport const canAccessProviderDashboard = withJwtCheck(\n\t(jwt) => jwt.isProviderAlpha && !jwt.isTeamSuspended && jwt.isFullyAuthenticated,\n)\n\nexport const canAccessProfileSettings = withJwtCheck(\n\t(jwt) => !jwt.isEndOfTrialActive && !jwt.isTeamSuspended,\n)\n"],"names":["isFreePlan","isTrialPlan"],"mappings":";;;AAKA,MAAM,eACL,CAAC,YACD,CAAC,eACA,CAAC,CAAC,cAAc,QAAQ,UAAU;AAM7B,MAAM,qBAAqB;AAAA,EAAa,CAAC,QAC/C,CAAC,SAAS,OAAO,EAAE,SAAS,IAAI,YAAY;AAC7C;AAEO,MAAM,wBAAwB;AAAA,EACpC,CAAC,QAAQ,CAAC,SAAS,UAAU,OAAO,EAAE,SAAS,IAAI,YAAY,KAAK,IAAI;AACzE;AAEO,MAAM,gBAAgB;AAAA,EAC5B,CAAC,QACA,CAAC,SAAS,OAAO,EAAE,SAAS,IAAI,YAAY,KAC5C,IAAI,wBACJ,CAAC,IAAI;AACP;AAEO,MAAM,iBAAiB;AAAA,EAC7B,CAAC,QACA,CAAC,SAAS,SAAS,QAAQ,EAAE,SAAS,IAAI,YAAY,KACtD,IAAI,yBACHA,KAAAA,WAAW,IAAI,MAAM,KAAKC,KAAA,YAAY,IAAI,MAAM;AACnD;AAEO,MAAM,mBAAmB;AAAA,EAC/B,CAAC,QACA,CAAC,SAAS,SAAS,QAAQ,EAAE,SAAS,IAAI,YAAY,KACtD,IAAI,wBACJ,CAAC,IAAI,mBACL,CAAC,IAAI;AACP;AAEO,MAAM,6BAA6B;AAAA,EACzC,CAAC,QAAQ,IAAI,mBAAmB,CAAC,IAAI,mBAAmB,IAAI;AAC7D;AAEO,MAAM,2BAA2B;AAAA,EACvC,CAAC,QAAQ,CAAC,IAAI,sBAAsB,CAAC,IAAI;AAC1C;;;;;;;;"}
|
package/dist/harmony99.mjs
CHANGED
@@ -1,47 +1,33 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
return navigationItems.filter((item) => item.shouldShow ? item.shouldShow(context) : true).map((item) => {
|
25
|
-
const disabled = typeof item.disabled === "function" ? item.disabled(context) : !!item.disabled;
|
26
|
-
const badge = typeof item.badge === "function" ? item.badge(context) : item.badge;
|
27
|
-
const isActive = (input) => item.isActive ? item.isActive(input) : item.key === activeKey || input === item.key;
|
28
|
-
return {
|
29
|
-
key: item.key,
|
30
|
-
label: item.labelKey,
|
31
|
-
// You can apply translations here if needed
|
32
|
-
icon: item.icon,
|
33
|
-
visible: true,
|
34
|
-
badge,
|
35
|
-
disabled,
|
36
|
-
dropdown: item.dropdown,
|
37
|
-
isActive,
|
38
|
-
link: `${nextgenUrl}${item.path({ projectId })}`,
|
39
|
-
onClick: () => navigate(item.path({ projectId }))
|
40
|
-
};
|
41
|
-
});
|
42
|
-
}, [project, activeKey, enabled, navigate, contributor, nextgenUrl]);
|
43
|
-
};
|
1
|
+
import { isFreePlan, isTrialPlan } from "./harmony9.mjs";
|
2
|
+
const withJwtCheck = (checkFn) => (jwtPayload) => !!jwtPayload && checkFn(jwtPayload);
|
3
|
+
const canAccessReporting = withJwtCheck(
|
4
|
+
(jwt) => ["admin", "owner"].includes(jwt.userTeamRole)
|
5
|
+
);
|
6
|
+
const canAccessTeamSettings = withJwtCheck(
|
7
|
+
(jwt) => ["admin", "biller", "owner"].includes(jwt.userTeamRole) && jwt.isFullyAuthenticated
|
8
|
+
);
|
9
|
+
const canCreateTeam = withJwtCheck(
|
10
|
+
(jwt) => ["admin", "owner"].includes(jwt.userTeamRole) && jwt.isFullyAuthenticated && !jwt.isEndOfTrialActive
|
11
|
+
);
|
12
|
+
const canUpgradePlan = withJwtCheck(
|
13
|
+
(jwt) => ["admin", "owner", "biller"].includes(jwt.userTeamRole) && jwt.isFullyAuthenticated && (isFreePlan(jwt.planId) || isTrialPlan(jwt.planId))
|
14
|
+
);
|
15
|
+
const canChangeBilling = withJwtCheck(
|
16
|
+
(jwt) => ["admin", "owner", "biller"].includes(jwt.userTeamRole) && jwt.isFullyAuthenticated && !jwt.isTeamSuspended && !jwt.isEndOfTrialActive
|
17
|
+
);
|
18
|
+
const canAccessProviderDashboard = withJwtCheck(
|
19
|
+
(jwt) => jwt.isProviderAlpha && !jwt.isTeamSuspended && jwt.isFullyAuthenticated
|
20
|
+
);
|
21
|
+
const canAccessProfileSettings = withJwtCheck(
|
22
|
+
(jwt) => !jwt.isEndOfTrialActive && !jwt.isTeamSuspended
|
23
|
+
);
|
44
24
|
export {
|
45
|
-
|
25
|
+
canAccessProfileSettings,
|
26
|
+
canAccessProviderDashboard,
|
27
|
+
canAccessReporting,
|
28
|
+
canAccessTeamSettings,
|
29
|
+
canChangeBilling,
|
30
|
+
canCreateTeam,
|
31
|
+
canUpgradePlan
|
46
32
|
};
|
47
33
|
//# sourceMappingURL=harmony99.mjs.map
|
package/dist/harmony99.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony99.mjs","sources":["../src/
|
1
|
+
{"version":3,"file":"harmony99.mjs","sources":["../src/utils/user/permissions.ts"],"sourcesContent":["import type { JwtTokenPayload } from '@features/auth/core/types/jwtTokenPayload'\nimport { isFreePlan, isTrialPlan } from '@utils'\n\ntype JwtCheckFn = (jwt: JwtTokenPayload) => boolean\n\nconst withJwtCheck =\n\t(checkFn: JwtCheckFn) =>\n\t(jwtPayload: JwtTokenPayload | null | undefined): boolean =>\n\t\t!!jwtPayload && checkFn(jwtPayload)\n\nexport const canAccessStyleGuide = withJwtCheck((jwt) =>\n\t['admin', 'biller', 'owner'].includes(jwt.userTeamRole),\n)\n\nexport const canAccessReporting = withJwtCheck((jwt) =>\n\t['admin', 'owner'].includes(jwt.userTeamRole),\n)\n\nexport const canAccessTeamSettings = withJwtCheck(\n\t(jwt) => ['admin', 'biller', 'owner'].includes(jwt.userTeamRole) && jwt.isFullyAuthenticated,\n)\n\nexport const canCreateTeam = withJwtCheck(\n\t(jwt) =>\n\t\t['admin', 'owner'].includes(jwt.userTeamRole) &&\n\t\tjwt.isFullyAuthenticated &&\n\t\t!jwt.isEndOfTrialActive,\n)\n\nexport const canUpgradePlan = withJwtCheck(\n\t(jwt) =>\n\t\t['admin', 'owner', 'biller'].includes(jwt.userTeamRole) &&\n\t\tjwt.isFullyAuthenticated &&\n\t\t(isFreePlan(jwt.planId) || isTrialPlan(jwt.planId)),\n)\n\nexport const canChangeBilling = withJwtCheck(\n\t(jwt) =>\n\t\t['admin', 'owner', 'biller'].includes(jwt.userTeamRole) &&\n\t\tjwt.isFullyAuthenticated &&\n\t\t!jwt.isTeamSuspended &&\n\t\t!jwt.isEndOfTrialActive,\n)\n\nexport const canAccessProviderDashboard = withJwtCheck(\n\t(jwt) => jwt.isProviderAlpha && !jwt.isTeamSuspended && jwt.isFullyAuthenticated,\n)\n\nexport const canAccessProfileSettings = withJwtCheck(\n\t(jwt) => !jwt.isEndOfTrialActive && !jwt.isTeamSuspended,\n)\n"],"names":[],"mappings":";AAKA,MAAM,eACL,CAAC,YACD,CAAC,eACA,CAAC,CAAC,cAAc,QAAQ,UAAU;AAM7B,MAAM,qBAAqB;AAAA,EAAa,CAAC,QAC/C,CAAC,SAAS,OAAO,EAAE,SAAS,IAAI,YAAY;AAC7C;AAEO,MAAM,wBAAwB;AAAA,EACpC,CAAC,QAAQ,CAAC,SAAS,UAAU,OAAO,EAAE,SAAS,IAAI,YAAY,KAAK,IAAI;AACzE;AAEO,MAAM,gBAAgB;AAAA,EAC5B,CAAC,QACA,CAAC,SAAS,OAAO,EAAE,SAAS,IAAI,YAAY,KAC5C,IAAI,wBACJ,CAAC,IAAI;AACP;AAEO,MAAM,iBAAiB;AAAA,EAC7B,CAAC,QACA,CAAC,SAAS,SAAS,QAAQ,EAAE,SAAS,IAAI,YAAY,KACtD,IAAI,yBACH,WAAW,IAAI,MAAM,KAAK,YAAY,IAAI,MAAM;AACnD;AAEO,MAAM,mBAAmB;AAAA,EAC/B,CAAC,QACA,CAAC,SAAS,SAAS,QAAQ,EAAE,SAAS,IAAI,YAAY,KACtD,IAAI,wBACJ,CAAC,IAAI,mBACL,CAAC,IAAI;AACP;AAEO,MAAM,6BAA6B;AAAA,EACzC,CAAC,QAAQ,IAAI,mBAAmB,CAAC,IAAI,mBAAmB,IAAI;AAC7D;AAEO,MAAM,2BAA2B;AAAA,EACvC,CAAC,QAAQ,CAAC,IAAI,sBAAsB,CAAC,IAAI;AAC1C;"}
|
@@ -1,53 +1,19 @@
|
|
1
|
-
import { HTMLProps
|
1
|
+
import { HTMLProps } from 'react';
|
2
|
+
import { SidebarContentProps } from './SidebarContent/SidebarContent';
|
3
|
+
import { SidebarConfig } from './types';
|
2
4
|
type SidebarProps = HTMLProps<HTMLElement> & {
|
3
|
-
|
5
|
+
config: SidebarConfig;
|
6
|
+
children?: SidebarContentProps['children'];
|
4
7
|
};
|
5
8
|
/**
|
6
|
-
* Sidebar
|
9
|
+
* The main Sidebar component. Wraps children with SidebarProvider and renders SidebarContent.
|
10
|
+
*
|
11
|
+
* @example
|
12
|
+
* ```
|
13
|
+
* <Sidebar config={sidebarConfig}>
|
14
|
+
* <YourAppContent />
|
15
|
+
* </Sidebar>
|
16
|
+
* ```
|
7
17
|
*/
|
8
|
-
declare const Sidebar: {
|
9
|
-
|
10
|
-
Top: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
11
|
-
Bottom: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
12
|
-
Avatar: ({ src, href, ariaLabel, alt, }: {
|
13
|
-
src: string;
|
14
|
-
href?: string;
|
15
|
-
ariaLabel?: string;
|
16
|
-
alt?: string;
|
17
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
18
|
-
IconLink: ({ label, to, icon: Icon }: {
|
19
|
-
to: string;
|
20
|
-
label: string;
|
21
|
-
icon: import('react').FC<import('@lokalise/louis').SvgIconProps>;
|
22
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
23
|
-
Menu: ({ children, icon: Icon }: {
|
24
|
-
icon: import('react').FC<import('@lokalise/louis').SvgIconProps>;
|
25
|
-
} & {
|
26
|
-
children?: ReactNode | undefined;
|
27
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
28
|
-
ProfileMenu: ({ config, children }: {
|
29
|
-
config: import('./Widgets/ProfileMenu/types').SidebarProfileMenuConfig;
|
30
|
-
children: import('./Widgets/ProfileMenu/ProfileMenuContent').ProfileMenuContentProps["children"];
|
31
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
32
|
-
TeamSwitch: ({ onSwitchTeam }: {
|
33
|
-
onSwitchTeam: (team: import('./types').SidebarTeam) => void;
|
34
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
35
|
-
TeamMenuItem: ({ team, onClick, hidePlanLabel }: {
|
36
|
-
team?: import('./types').SidebarTeam;
|
37
|
-
onClick?: (team: import('./types').SidebarTeam) => void;
|
38
|
-
hidePlanLabel?: boolean;
|
39
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
40
|
-
UpgradeMenuItem: ({ upgradeOptionHref }: {
|
41
|
-
upgradeOptionHref: string;
|
42
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
43
|
-
ProfileSettingsMenuItem: ({ href, onClick, userEmail, hideBottomDivider, }: {
|
44
|
-
href: string;
|
45
|
-
userEmail: string;
|
46
|
-
onClick?: () => void;
|
47
|
-
hideBottomDivider?: boolean;
|
48
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
49
|
-
Tasks: (props: {
|
50
|
-
config: import('./Widgets/Tasks/types').SidebarTasksConfig;
|
51
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
52
|
-
};
|
53
|
-
export { Sidebar };
|
18
|
+
export declare const Sidebar: ({ config, children, ...navProps }: SidebarProps) => import("react/jsx-runtime").JSX.Element;
|
19
|
+
export {};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { SidebarWidgetsConfig, SidebarContextProps } from '../types';
|
2
|
+
import { HTMLProps, ReactNode } from 'react';
|
3
|
+
export type SidebarContentProps = HTMLProps<HTMLElement> & {
|
4
|
+
widgetsConfig: SidebarWidgetsConfig;
|
5
|
+
children?: ((props: SidebarContextProps) => ReactNode) | ReactNode;
|
6
|
+
};
|
7
|
+
export declare const SidebarContent: ({ widgetsConfig, children, ...navProps }: SidebarContentProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -11,6 +11,11 @@ type AvatarProps = {
|
|
11
11
|
/**
|
12
12
|
* Display company main avatar / logo in the top section of the Sidebar.
|
13
13
|
* Used as the main branding element and home navigation link.
|
14
|
+
*
|
15
|
+
* @example
|
16
|
+
* ```
|
17
|
+
* <Avatar src="/logo.png" href="/" ariaLabel="Home" alt="" />
|
18
|
+
* ```
|
14
19
|
*/
|
15
20
|
export declare const Avatar: ({ src, href, ariaLabel, alt, }: AvatarProps) => import("react/jsx-runtime").JSX.Element;
|
16
21
|
export {};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { HelpMenuConfig } from '../../types';
|
2
|
+
/**
|
3
|
+
* Help menu component that provides links to tutorials, documentation, support, and more.
|
4
|
+
*
|
5
|
+
* @example
|
6
|
+
* ```
|
7
|
+
* <HelpMenu
|
8
|
+
* contactSupport={{ onClick: handleContactSupport }}
|
9
|
+
* keyboardShortcuts={{ onClick: handleShowShortcuts, label: '⌘K' }}
|
10
|
+
* />
|
11
|
+
* ```
|
12
|
+
*/
|
13
|
+
export declare const HelpMenu: ({ contactSupport, keyboardShortcuts }: HelpMenuConfig) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { SvgIconProps } from '@lokalise/louis';
|
2
|
-
import { FC, PropsWithChildren } from 'react';
|
2
|
+
import { ButtonHTMLAttributes, FC, PropsWithChildren } from 'react';
|
3
3
|
type MenuProps = PropsWithChildren<{
|
4
4
|
/** Icon component from @lokalise/louis to display in the menu button */
|
5
5
|
icon: FC<SvgIconProps>;
|
6
|
+
buttonProps?: Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'>;
|
6
7
|
}>;
|
7
8
|
/**
|
8
9
|
* A dropdown menu component that displays an icon button which reveals a menu list when clicked.
|
@@ -20,5 +21,5 @@ type MenuProps = PropsWithChildren<{
|
|
20
21
|
* </Menu>
|
21
22
|
* ```
|
22
23
|
*/
|
23
|
-
export declare const Menu: ({ children, icon: Icon }: MenuProps) => import("react/jsx-runtime").JSX.Element;
|
24
|
+
export declare const Menu: ({ children, icon: Icon, buttonProps }: MenuProps) => import("react/jsx-runtime").JSX.Element;
|
24
25
|
export {};
|
package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/BillingMenuItem/BillingMenuItem.d.ts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* A menu item component for navigating to the billing section.
|
3
|
+
* Checks the user's permissions using the Sidebar context and renders
|
4
|
+
* nothing if the user does not have access.
|
5
|
+
*
|
6
|
+
* @example
|
7
|
+
* ```
|
8
|
+
* <BillingMenuItem />
|
9
|
+
* ```
|
10
|
+
*
|
11
|
+
* @note This component must be used within a Sidebar Context.
|
12
|
+
*/
|
13
|
+
export declare const BillingMenuItem: () => import("react/jsx-runtime").JSX.Element | null;
|
package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeam/CreateNewTeam.d.ts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
type CreateNewTeamProps = {
|
2
|
+
onCreateTeam: () => void;
|
3
|
+
};
|
4
|
+
/**
|
5
|
+
* A menu item component for creating a new team.
|
6
|
+
* Checks the user's permissions using the Sidebar context and renders
|
7
|
+
* nothing if the user does not have access.
|
8
|
+
*
|
9
|
+
* @example
|
10
|
+
* ```
|
11
|
+
* <CreateNewTeam onCreateTeam={handleCreateTeam} />
|
12
|
+
* ```
|
13
|
+
*
|
14
|
+
* @note This component must be used within a Sidebar Context.
|
15
|
+
*/
|
16
|
+
export declare const CreateNewTeam: ({ onCreateTeam }: CreateNewTeamProps) => import("react/jsx-runtime").JSX.Element | null;
|
17
|
+
export {};
|
package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeam/CreateNewTeam.test.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
type CreateNewTeamPlaceholderProps = {
|
2
|
+
onClick: () => void;
|
3
|
+
};
|
4
|
+
/**
|
5
|
+
* A placeholder menu item for creating a new team.
|
6
|
+
* Checks the user's permissions using the Sidebar context and renders
|
7
|
+
* nothing if the user does not have access.
|
8
|
+
*
|
9
|
+
* @example
|
10
|
+
* ```
|
11
|
+
* <CreateNewTeamPlaceholder onClick={handleCreateTeam} />
|
12
|
+
* ```
|
13
|
+
*
|
14
|
+
* @note This component must be used within a Sidebar Context.
|
15
|
+
*/
|
16
|
+
export declare const CreateNewTeamPlaceholder: ({ onClick }: CreateNewTeamPlaceholderProps) => import("react/jsx-runtime").JSX.Element | null;
|
17
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|