@lokalise/harmony 4.7.1 → 4.7.2
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/harmony107.cjs +2 -2
- package/dist/harmony107.mjs +2 -2
- package/dist/harmony109.cjs +2 -2
- package/dist/harmony109.mjs +2 -2
- package/dist/harmony117.cjs +2 -2
- package/dist/harmony117.mjs +2 -2
- package/dist/harmony119.cjs +166 -11
- package/dist/harmony119.cjs.map +1 -1
- package/dist/harmony119.mjs +166 -11
- package/dist/harmony119.mjs.map +1 -1
- package/dist/harmony120.cjs +44 -21
- package/dist/harmony120.cjs.map +1 -1
- package/dist/harmony120.mjs +43 -20
- package/dist/harmony120.mjs.map +1 -1
- package/dist/harmony122.cjs +1 -1
- package/dist/harmony122.mjs +1 -1
- package/dist/harmony123.cjs +12 -12
- package/dist/harmony123.mjs +12 -12
- package/dist/harmony126.cjs +1 -1
- package/dist/harmony126.mjs +1 -1
- package/dist/harmony127.cjs +1 -1
- package/dist/harmony127.mjs +1 -1
- package/dist/harmony129.cjs +11 -165
- package/dist/harmony129.cjs.map +1 -1
- package/dist/harmony129.mjs +11 -165
- package/dist/harmony129.mjs.map +1 -1
- package/dist/harmony130.cjs +12 -44
- package/dist/harmony130.cjs.map +1 -1
- package/dist/harmony130.mjs +11 -43
- package/dist/harmony130.mjs.map +1 -1
- package/dist/harmony131.cjs +9 -10
- package/dist/harmony131.cjs.map +1 -1
- package/dist/harmony131.mjs +11 -12
- package/dist/harmony131.mjs.map +1 -1
- package/dist/harmony132.cjs +20 -11
- package/dist/harmony132.cjs.map +1 -1
- package/dist/harmony132.mjs +20 -11
- package/dist/harmony132.mjs.map +1 -1
- package/dist/harmony134.cjs +87 -20
- package/dist/harmony134.cjs.map +1 -1
- package/dist/harmony134.mjs +87 -20
- package/dist/harmony134.mjs.map +1 -1
- package/dist/harmony135.cjs +30 -8
- package/dist/harmony135.cjs.map +1 -1
- package/dist/harmony135.mjs +30 -8
- package/dist/harmony135.mjs.map +1 -1
- package/dist/harmony136.cjs +49 -8
- package/dist/harmony136.cjs.map +1 -1
- package/dist/harmony136.mjs +49 -8
- package/dist/harmony136.mjs.map +1 -1
- package/dist/harmony137.cjs +11 -21
- package/dist/harmony137.cjs.map +1 -1
- package/dist/harmony137.mjs +11 -21
- package/dist/harmony137.mjs.map +1 -1
- package/dist/harmony138.cjs +8 -49
- package/dist/harmony138.cjs.map +1 -1
- package/dist/harmony138.mjs +8 -49
- package/dist/harmony138.mjs.map +1 -1
- package/dist/harmony139.cjs +8 -11
- package/dist/harmony139.cjs.map +1 -1
- package/dist/harmony139.mjs +8 -11
- package/dist/harmony139.mjs.map +1 -1
- package/dist/harmony140.cjs +21 -9
- package/dist/harmony140.cjs.map +1 -1
- package/dist/harmony140.mjs +20 -8
- package/dist/harmony140.mjs.map +1 -1
- package/dist/harmony141.cjs +20 -12
- package/dist/harmony141.cjs.map +1 -1
- package/dist/harmony141.mjs +20 -12
- package/dist/harmony141.mjs.map +1 -1
- package/dist/harmony142.cjs +9 -15
- package/dist/harmony142.cjs.map +1 -1
- package/dist/harmony142.mjs +8 -14
- package/dist/harmony142.mjs.map +1 -1
- package/dist/harmony143.cjs +4 -11
- package/dist/harmony143.cjs.map +1 -1
- package/dist/harmony143.mjs +7 -14
- package/dist/harmony143.mjs.map +1 -1
- package/dist/harmony144.cjs +12 -7
- package/dist/harmony144.cjs.map +1 -1
- package/dist/harmony144.mjs +14 -9
- package/dist/harmony144.mjs.map +1 -1
- package/dist/harmony145.cjs +11 -18
- package/dist/harmony145.cjs.map +1 -1
- package/dist/harmony145.mjs +14 -21
- package/dist/harmony145.mjs.map +1 -1
- package/dist/harmony146.cjs +7 -9
- package/dist/harmony146.cjs.map +1 -1
- package/dist/harmony146.mjs +9 -11
- package/dist/harmony146.mjs.map +1 -1
- package/dist/harmony147.cjs +17 -29
- package/dist/harmony147.cjs.map +1 -1
- package/dist/harmony147.mjs +19 -31
- package/dist/harmony147.mjs.map +1 -1
- package/dist/harmony148.cjs +4 -4
- package/dist/harmony148.cjs.map +1 -1
- package/dist/harmony148.mjs +5 -5
- package/dist/harmony148.mjs.map +1 -1
- package/dist/harmony149.cjs +28 -12
- package/dist/harmony149.cjs.map +1 -1
- package/dist/harmony149.mjs +29 -13
- package/dist/harmony149.mjs.map +1 -1
- package/dist/harmony150.cjs +5 -29
- package/dist/harmony150.cjs.map +1 -1
- package/dist/harmony150.mjs +7 -31
- package/dist/harmony150.mjs.map +1 -1
- package/dist/harmony151.cjs +22 -21
- package/dist/harmony151.cjs.map +1 -1
- package/dist/harmony151.mjs +21 -20
- package/dist/harmony151.mjs.map +1 -1
- package/dist/harmony152.cjs +30 -15
- package/dist/harmony152.cjs.map +1 -1
- package/dist/harmony152.mjs +32 -17
- package/dist/harmony152.mjs.map +1 -1
- package/dist/harmony153.cjs +18 -3
- package/dist/harmony153.cjs.map +1 -1
- package/dist/harmony153.mjs +18 -3
- package/dist/harmony153.mjs.map +1 -1
- package/dist/harmony154.cjs +21 -15
- package/dist/harmony154.cjs.map +1 -1
- package/dist/harmony154.mjs +20 -14
- package/dist/harmony154.mjs.map +1 -1
- package/dist/harmony155.cjs +6 -87
- package/dist/harmony155.cjs.map +1 -1
- package/dist/harmony155.mjs +5 -86
- package/dist/harmony155.mjs.map +1 -1
- package/dist/harmony156.cjs +16 -31
- package/dist/harmony156.cjs.map +1 -1
- package/dist/harmony156.mjs +15 -30
- package/dist/harmony156.mjs.map +1 -1
- package/dist/harmony157.cjs +2 -2
- package/dist/harmony157.mjs +2 -2
- package/dist/harmony158.cjs +2 -2
- package/dist/harmony158.mjs +2 -2
- package/dist/harmony159.cjs +10 -8
- package/dist/harmony159.cjs.map +1 -1
- package/dist/harmony159.mjs +10 -8
- package/dist/harmony159.mjs.map +1 -1
- package/dist/harmony160.cjs +8 -2
- package/dist/harmony160.cjs.map +1 -1
- package/dist/harmony160.mjs +8 -2
- package/dist/harmony160.mjs.map +1 -1
- package/dist/harmony161.cjs +2 -3
- package/dist/harmony161.cjs.map +1 -1
- package/dist/harmony161.mjs +2 -3
- package/dist/harmony161.mjs.map +1 -1
- package/dist/harmony162.cjs +3 -3
- package/dist/harmony162.cjs.map +1 -1
- package/dist/harmony162.mjs +3 -3
- package/dist/harmony162.mjs.map +1 -1
- package/dist/harmony163.cjs +3 -3
- package/dist/harmony163.cjs.map +1 -1
- package/dist/harmony163.mjs +3 -3
- package/dist/harmony163.mjs.map +1 -1
- package/dist/harmony164.cjs +3 -14
- package/dist/harmony164.cjs.map +1 -1
- package/dist/harmony164.mjs +3 -14
- package/dist/harmony164.mjs.map +1 -1
- package/dist/harmony165.cjs +14 -3
- package/dist/harmony165.cjs.map +1 -1
- package/dist/harmony165.mjs +14 -3
- package/dist/harmony165.mjs.map +1 -1
- package/dist/harmony166.cjs +3 -3
- package/dist/harmony166.cjs.map +1 -1
- package/dist/harmony166.mjs +3 -3
- package/dist/harmony166.mjs.map +1 -1
- package/dist/harmony167.cjs +3 -14
- package/dist/harmony167.cjs.map +1 -1
- package/dist/harmony167.mjs +3 -14
- package/dist/harmony167.mjs.map +1 -1
- package/dist/harmony168.cjs +14 -96
- package/dist/harmony168.cjs.map +1 -1
- package/dist/harmony168.mjs +14 -96
- package/dist/harmony168.mjs.map +1 -1
- package/dist/harmony169.cjs +94 -11
- package/dist/harmony169.cjs.map +1 -1
- package/dist/harmony169.mjs +94 -11
- package/dist/harmony169.mjs.map +1 -1
- package/dist/harmony170.cjs +12 -13
- package/dist/harmony170.cjs.map +1 -1
- package/dist/harmony170.mjs +12 -13
- package/dist/harmony170.mjs.map +1 -1
- package/dist/harmony171.cjs +13 -35
- package/dist/harmony171.cjs.map +1 -1
- package/dist/harmony171.mjs +13 -35
- package/dist/harmony171.mjs.map +1 -1
- package/dist/harmony172.cjs +32 -24
- package/dist/harmony172.cjs.map +1 -1
- package/dist/harmony172.mjs +32 -24
- package/dist/harmony172.mjs.map +1 -1
- package/dist/harmony173.cjs +28 -10
- package/dist/harmony173.cjs.map +1 -1
- package/dist/harmony173.mjs +28 -10
- package/dist/harmony173.mjs.map +1 -1
- package/dist/harmony184.cjs +1 -1
- package/dist/harmony184.mjs +1 -1
- package/dist/harmony185.cjs +1 -1
- package/dist/harmony185.mjs +1 -1
- package/dist/harmony187.cjs +3 -3
- package/dist/harmony187.mjs +3 -3
- package/dist/harmony189.cjs +4 -6
- package/dist/harmony189.cjs.map +1 -1
- package/dist/harmony189.mjs +4 -6
- package/dist/harmony189.mjs.map +1 -1
- package/dist/harmony190.cjs +5 -11
- package/dist/harmony190.cjs.map +1 -1
- package/dist/harmony190.mjs +5 -11
- package/dist/harmony190.mjs.map +1 -1
- package/dist/harmony191.cjs +11 -31
- package/dist/harmony191.cjs.map +1 -1
- package/dist/harmony191.mjs +11 -31
- package/dist/harmony191.mjs.map +1 -1
- package/dist/harmony192.cjs +28 -10
- package/dist/harmony192.cjs.map +1 -1
- package/dist/harmony192.mjs +28 -10
- package/dist/harmony192.mjs.map +1 -1
- package/dist/harmony193.cjs +14 -4
- package/dist/harmony193.cjs.map +1 -1
- package/dist/harmony193.mjs +14 -4
- package/dist/harmony193.mjs.map +1 -1
- package/dist/harmony21.cjs +1 -1
- package/dist/harmony21.mjs +1 -1
- package/dist/harmony42.cjs +1 -1
- package/dist/harmony42.mjs +1 -1
- package/dist/harmony43.cjs +1 -1
- package/dist/harmony43.mjs +1 -1
- package/dist/harmony44.cjs +1 -1
- package/dist/harmony44.mjs +1 -1
- package/dist/harmony60.cjs +1 -1
- package/dist/harmony60.mjs +1 -1
- package/dist/harmony62.cjs +1 -1
- package/dist/harmony62.mjs +1 -1
- package/dist/harmony72.cjs +1 -1
- package/dist/harmony72.mjs +1 -1
- package/dist/harmony73.cjs +1 -1
- package/dist/harmony73.mjs +1 -1
- package/dist/harmony78.cjs +1 -1
- package/dist/harmony78.mjs +1 -1
- package/dist/harmony85.cjs +1 -1
- package/dist/harmony85.mjs +1 -1
- package/dist/harmony98.cjs +2 -1
- package/dist/harmony98.cjs.map +1 -1
- package/dist/harmony98.mjs +2 -1
- package/dist/harmony98.mjs.map +1 -1
- package/dist/types/src/features/navigation/fixtures/AppSidebar.fixtures.d.ts +2 -0
- package/dist/types/src/features/publicApi/team.d.ts +2 -0
- package/dist/types/src/features/publicApi/types/teamTypes.d.ts +6 -1
- package/package.json +1 -1
package/dist/harmony120.mjs
CHANGED
|
@@ -1,24 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { useCallback, useMemo } from "react";
|
|
2
|
+
import { useNavigationClient } from "./harmony17.mjs";
|
|
3
|
+
import { navigationItems } from "./harmony135.mjs";
|
|
4
|
+
const useNextgenNavigation = (activeKey, enabled, project, contributor) => {
|
|
5
|
+
const navigationClient = useNavigationClient();
|
|
6
|
+
const nextgenUrl = navigationClient.getNextgenUrl();
|
|
7
|
+
const navigate = useCallback(
|
|
8
|
+
(path) => {
|
|
9
|
+
window.location.href = `${nextgenUrl}${path}`;
|
|
10
|
+
},
|
|
11
|
+
[nextgenUrl]
|
|
12
|
+
);
|
|
13
|
+
return useMemo(() => {
|
|
14
|
+
if (!enabled) {
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
17
|
+
const projectId = (project == null ? void 0 : project.uuid) || "";
|
|
18
|
+
const context = {
|
|
19
|
+
flags: {},
|
|
20
|
+
// TODO: getFeatureFlags(features),
|
|
21
|
+
pathname: window.location.pathname,
|
|
22
|
+
permissions: []
|
|
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]);
|
|
14
43
|
};
|
|
15
44
|
export {
|
|
16
|
-
|
|
17
|
-
classes as default,
|
|
18
|
-
disabled,
|
|
19
|
-
projectNavigationItem,
|
|
20
|
-
projectNavigationItemDisabled,
|
|
21
|
-
tag,
|
|
22
|
-
withNavLinkStyle
|
|
45
|
+
useNextgenNavigation
|
|
23
46
|
};
|
|
24
47
|
//# sourceMappingURL=harmony120.mjs.map
|
package/dist/harmony120.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony120.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"harmony120.mjs","sources":["../src/features/navigation/hooks/useNextgenNavigation.ts"],"sourcesContent":["import type { Contributor, Project } from '@features/node'\nimport { useCallback, useMemo } from 'react'\nimport { useNavigationClient } from '../providers/NavigationClientProvider'\n// TODO: react-router-dom as peer dependencies works only inside next-gen apps. It shouldn't be like that.\n// Because of that we can't use THE WHOLE package in legacy apps, therefore it should be implemented in legacy apps as well(almost impossible),\n// so this dependency should be installed as direct dependency. or we should think about other options\n// import { useNavigate } from \"react-router-dom\";\nimport { navigationItems } from '../schemas/navigationSchema'\n\n// TODO: Unify navigation items for next-gen and legacy apps\n/**\n * Hook to generate navigation items for new applications\n */\nexport const useNextgenNavigation = (\n\tactiveKey: string,\n\tenabled: boolean,\n\tproject?: Project,\n\tcontributor?: Contributor,\n) => {\n\tconst navigationClient = useNavigationClient()\n\tconst nextgenUrl = navigationClient.getNextgenUrl()\n\n\tconst navigate = useCallback(\n\t\t(path: string) => {\n\t\t\t// TODO: Define navigate logic here\n\t\t\twindow.location.href = `${nextgenUrl}${path}`\n\t\t},\n\t\t[nextgenUrl],\n\t)\n\n\treturn useMemo(() => {\n\t\tif (!enabled) {\n\t\t\treturn []\n\t\t}\n\n\t\tconst projectId = project?.uuid || ''\n\n\t\t// Context for filtering and transforming navigation items\n\t\tconst context = {\n\t\t\tflags: {}, // TODO: getFeatureFlags(features),\n\t\t\tpathname: window.location.pathname,\n\t\t\tpermissions: contributor?.admin_rights || [],\n\t\t}\n\n\t\t// Filter and map items\n\t\treturn (\n\t\t\tnavigationItems\n\t\t\t\t// Filter based on conditions\n\t\t\t\t.filter((item) => (item.shouldShow ? item.shouldShow(context) : true))\n\t\t\t\t// Map to NavigationTabsItem shape\n\t\t\t\t.map((item) => {\n\t\t\t\t\tconst disabled =\n\t\t\t\t\t\ttypeof item.disabled === 'function' ? item.disabled(context) : !!item.disabled\n\n\t\t\t\t\tconst badge = typeof item.badge === 'function' ? item.badge(context) : item.badge\n\n\t\t\t\t\t// Create isActive function\n\t\t\t\t\tconst isActive = (input: string) =>\n\t\t\t\t\t\titem.isActive ? item.isActive(input) : item.key === activeKey || input === item.key\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tkey: item.key,\n\t\t\t\t\t\tlabel: item.labelKey, // You can apply translations here if needed\n\t\t\t\t\t\ticon: item.icon,\n\t\t\t\t\t\tvisible: true,\n\t\t\t\t\t\tbadge,\n\t\t\t\t\t\tdisabled,\n\t\t\t\t\t\tdropdown: item.dropdown,\n\t\t\t\t\t\tisActive,\n\t\t\t\t\t\tlink: `${nextgenUrl}${item.path({ projectId })}`,\n\t\t\t\t\t\tonClick: () => navigate(item.path({ projectId })),\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t)\n\t}, [project, activeKey, enabled, navigate, contributor, nextgenUrl])\n}\n\n// TODO: Helper to convert features to flags format\n// const getFeatureFlags = (features) => {\n// \tif (!features) return {}\n//\n// \t// Convert features to the format expected by navigation schema\n// \treturn Object.keys(features).reduce((flags, key) => {\n// \t\tflags[key] = features[key] ? 'on' : 'off'\n// \t\treturn flags\n// \t}, {})\n// }\n"],"names":[],"mappings":";;;AAaO,MAAM,uBAAuB,CACnC,WACA,SACA,SACA,gBACI;AACJ,QAAM,mBAAmB,oBAAoB;AACvC,QAAA,aAAa,iBAAiB,cAAc;AAElD,QAAM,WAAW;AAAA,IAChB,CAAC,SAAiB;AAEjB,aAAO,SAAS,OAAO,GAAG,UAAU,GAAG,IAAI;AAAA,IAC5C;AAAA,IACA,CAAC,UAAU;AAAA,EACZ;AAEA,SAAO,QAAQ,MAAM;AACpB,QAAI,CAAC,SAAS;AACb,aAAO,CAAC;AAAA,IAAA;AAGH,UAAA,aAAY,mCAAS,SAAQ;AAGnC,UAAM,UAAU;AAAA,MACf,OAAO,CAAC;AAAA;AAAA,MACR,UAAU,OAAO,SAAS;AAAA,MAC1B,aAA0C,CAAA;AAAA,IAC3C;AAGA,WACC,gBAEE,OAAO,CAAC,SAAU,KAAK,aAAa,KAAK,WAAW,OAAO,IAAI,IAAK,EAEpE,IAAI,CAAC,SAAS;AACR,YAAA,WACL,OAAO,KAAK,aAAa,aAAa,KAAK,SAAS,OAAO,IAAI,CAAC,CAAC,KAAK;AAEjE,YAAA,QAAQ,OAAO,KAAK,UAAU,aAAa,KAAK,MAAM,OAAO,IAAI,KAAK;AAG5E,YAAM,WAAW,CAAC,UACjB,KAAK,WAAW,KAAK,SAAS,KAAK,IAAI,KAAK,QAAQ,aAAa,UAAU,KAAK;AAE1E,aAAA;AAAA,QACN,KAAK,KAAK;AAAA,QACV,OAAO,KAAK;AAAA;AAAA,QACZ,MAAM,KAAK;AAAA,QACX,SAAS;AAAA,QACT;AAAA,QACA;AAAA,QACA,UAAU,KAAK;AAAA,QACf;AAAA,QACA,MAAM,GAAG,UAAU,GAAG,KAAK,KAAK,EAAE,UAAW,CAAA,CAAC;AAAA,QAC9C,SAAS,MAAM,SAAS,KAAK,KAAK,EAAE,UAAA,CAAW,CAAC;AAAA,MACjD;AAAA,IAAA,CACA;AAAA,EAAA,GAED,CAAC,SAAS,WAAW,SAAS,UAAU,aAAa,UAAU,CAAC;AACpE;"}
|
package/dist/harmony122.cjs
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const louis = require("@lokalise/louis");
|
|
5
5
|
const clsx = require("./harmony103.cjs");
|
|
6
|
-
const IconLink_module = require("./
|
|
6
|
+
const IconLink_module = require("./harmony142.cjs");
|
|
7
7
|
const IconLink = ({ label, to, icon: Icon }) => {
|
|
8
8
|
return /* @__PURE__ */ jsxRuntime.jsx(louis.Tooltip, { placement: "right", tooltip: label, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9
9
|
louis.Link,
|
package/dist/harmony122.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Tooltip, Link } from "@lokalise/louis";
|
|
3
3
|
import { clsx } from "./harmony103.mjs";
|
|
4
|
-
import styles from "./
|
|
4
|
+
import styles from "./harmony142.mjs";
|
|
5
5
|
const IconLink = ({ label, to, icon: Icon }) => {
|
|
6
6
|
return /* @__PURE__ */ jsx(Tooltip, { placement: "right", tooltip: label, children: /* @__PURE__ */ jsx(
|
|
7
7
|
Link,
|
package/dist/harmony123.cjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const BillingMenuItem = require("./
|
|
5
|
-
const CreateNewTeam = require("./
|
|
6
|
-
const CreateNewTeamPlaceholder = require("./
|
|
7
|
-
const DarkModeToggle = require("./
|
|
8
|
-
const ProfileSettingsMenuItem = require("./
|
|
9
|
-
const ProviderMenuItem = require("./
|
|
10
|
-
const TeamMenuItem = require("./
|
|
11
|
-
const TeamSettingsMenuItem = require("./
|
|
12
|
-
const TeamSwitch = require("./
|
|
13
|
-
const UpgradeMenuItem = require("./
|
|
4
|
+
const BillingMenuItem = require("./harmony143.cjs");
|
|
5
|
+
const CreateNewTeam = require("./harmony144.cjs");
|
|
6
|
+
const CreateNewTeamPlaceholder = require("./harmony145.cjs");
|
|
7
|
+
const DarkModeToggle = require("./harmony146.cjs");
|
|
8
|
+
const ProfileSettingsMenuItem = require("./harmony147.cjs");
|
|
9
|
+
const ProviderMenuItem = require("./harmony148.cjs");
|
|
10
|
+
const TeamMenuItem = require("./harmony149.cjs");
|
|
11
|
+
const TeamSettingsMenuItem = require("./harmony150.cjs");
|
|
12
|
+
const TeamSwitch = require("./harmony151.cjs");
|
|
13
|
+
const UpgradeMenuItem = require("./harmony152.cjs");
|
|
14
14
|
const useSidebar = require("./harmony124.cjs");
|
|
15
15
|
const louis = require("@lokalise/louis");
|
|
16
16
|
const permissions = require("./harmony125.cjs");
|
|
17
17
|
const clsx = require("./harmony103.cjs");
|
|
18
|
-
const ProfileMenu_module = require("./
|
|
19
|
-
const UpgradeIcon = require("./
|
|
18
|
+
const ProfileMenu_module = require("./harmony153.cjs");
|
|
19
|
+
const UpgradeIcon = require("./harmony154.cjs");
|
|
20
20
|
const ProfileMenu = ({ config }) => {
|
|
21
21
|
const {
|
|
22
22
|
jwt,
|
package/dist/harmony123.mjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { BillingMenuItem } from "./
|
|
3
|
-
import { CreateNewTeam } from "./
|
|
4
|
-
import { CreateNewTeamPlaceholder } from "./
|
|
5
|
-
import { DarkModeToggle } from "./
|
|
6
|
-
import { ProfileSettingsMenuItem } from "./
|
|
7
|
-
import { ProviderMenuItem } from "./
|
|
8
|
-
import { TeamMenuItem } from "./
|
|
9
|
-
import { TeamSettingsMenuItem } from "./
|
|
10
|
-
import { TeamSwitch } from "./
|
|
11
|
-
import { UpgradeMenuItem } from "./
|
|
2
|
+
import { BillingMenuItem } from "./harmony143.mjs";
|
|
3
|
+
import { CreateNewTeam } from "./harmony144.mjs";
|
|
4
|
+
import { CreateNewTeamPlaceholder } from "./harmony145.mjs";
|
|
5
|
+
import { DarkModeToggle } from "./harmony146.mjs";
|
|
6
|
+
import { ProfileSettingsMenuItem } from "./harmony147.mjs";
|
|
7
|
+
import { ProviderMenuItem } from "./harmony148.mjs";
|
|
8
|
+
import { TeamMenuItem } from "./harmony149.mjs";
|
|
9
|
+
import { TeamSettingsMenuItem } from "./harmony150.mjs";
|
|
10
|
+
import { TeamSwitch } from "./harmony151.mjs";
|
|
11
|
+
import { UpgradeMenuItem } from "./harmony152.mjs";
|
|
12
12
|
import { useSidebar } from "./harmony124.mjs";
|
|
13
13
|
import { Menu, MenuList, MenuDivider, MenuItem, UserIcon } from "@lokalise/louis";
|
|
14
14
|
import { canAccessProfileSettings, canUpgradePlan } from "./harmony125.mjs";
|
|
15
15
|
import { clsx } from "./harmony103.mjs";
|
|
16
|
-
import styles from "./
|
|
17
|
-
import { UpgradeIcon } from "./
|
|
16
|
+
import styles from "./harmony153.mjs";
|
|
17
|
+
import { UpgradeIcon } from "./harmony154.mjs";
|
|
18
18
|
const ProfileMenu = ({ config }) => {
|
|
19
19
|
const {
|
|
20
20
|
jwt,
|
package/dist/harmony126.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const Avatar_module = require("./
|
|
4
|
+
const Avatar_module = require("./harmony155.cjs");
|
|
5
5
|
const Avatar = ({
|
|
6
6
|
src,
|
|
7
7
|
href = "/",
|
package/dist/harmony126.mjs
CHANGED
package/dist/harmony127.cjs
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const louis = require("@lokalise/louis");
|
|
5
5
|
const clsx = require("./harmony103.cjs");
|
|
6
|
-
const HelpMenu_module = require("./
|
|
6
|
+
const HelpMenu_module = require("./harmony156.cjs");
|
|
7
7
|
const HelpMenu = ({ contactSupport, keyboardShortcuts }) => {
|
|
8
8
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9
9
|
louis.Menu,
|
package/dist/harmony127.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Menu, MenuList, MenuItem, MenuDivider, Tooltip, HelpCenterIcon } from "@lokalise/louis";
|
|
3
3
|
import { clsx } from "./harmony103.mjs";
|
|
4
|
-
import styles from "./
|
|
4
|
+
import styles from "./harmony156.mjs";
|
|
5
5
|
const HelpMenu = ({ contactSupport, keyboardShortcuts }) => {
|
|
6
6
|
return /* @__PURE__ */ jsx(
|
|
7
7
|
Menu,
|
package/dist/harmony129.cjs
CHANGED
|
@@ -1,169 +1,15 @@
|
|
|
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
|
-
return [];
|
|
14
|
-
}
|
|
15
|
-
const navigationVisibility = toolbarVisibility.getProjectNavigationVisibilityMap(
|
|
16
|
-
project,
|
|
17
|
-
adminRights,
|
|
18
|
-
() => true
|
|
19
|
-
);
|
|
20
|
-
const appsNavigationItem = {
|
|
21
|
-
key: "apps",
|
|
22
|
-
label: "Apps",
|
|
23
|
-
isActive: (input) => input === "apps",
|
|
24
|
-
link: `${expertUrl}/apps/${project.project_id}/`,
|
|
25
|
-
...navigationVisibility.apps
|
|
26
|
-
};
|
|
27
|
-
const appsNavigationItemArrInMainMenu = [];
|
|
28
|
-
const appsNavigationItemArrInMoreMenu = [];
|
|
29
|
-
if (project.project_type === "content_integration") {
|
|
30
|
-
appsNavigationItemArrInMoreMenu.push(appsNavigationItem);
|
|
31
|
-
} else {
|
|
32
|
-
appsNavigationItemArrInMainMenu.push(appsNavigationItem);
|
|
33
|
-
}
|
|
34
|
-
return [
|
|
35
|
-
{
|
|
36
|
-
key: "edit",
|
|
37
|
-
label: "Editor",
|
|
38
|
-
link: `${expertUrl}/project/${project.project_id}/`,
|
|
39
|
-
isActive: (input) => input === "edit",
|
|
40
|
-
...navigationVisibility.editor
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
key: "files",
|
|
44
|
-
label: "Files",
|
|
45
|
-
link: `${expertUrl}/files/${project.project_id}/`,
|
|
46
|
-
isActive: (input) => input === "files",
|
|
47
|
-
...navigationVisibility.files
|
|
48
|
-
},
|
|
49
|
-
...project.project_type === "content_integration" ? [
|
|
50
|
-
{
|
|
51
|
-
key: "contentManagement",
|
|
52
|
-
label: "Content management",
|
|
53
|
-
isActive: (input) => input === "apps",
|
|
54
|
-
link: `${expertUrl}/apps/${project.project_id}/${marketingSupportProjectSelectedAppSlug}`,
|
|
55
|
-
...navigationVisibility.contentManagement
|
|
56
|
-
}
|
|
57
|
-
] : [
|
|
58
|
-
{
|
|
59
|
-
key: "upload",
|
|
60
|
-
label: "Upload",
|
|
61
|
-
link: `${expertUrl}/upload/${project.project_id}/`,
|
|
62
|
-
isActive: (input) => input === "upload",
|
|
63
|
-
...navigationVisibility.upload
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
key: "download",
|
|
67
|
-
label: "Download",
|
|
68
|
-
link: `${expertUrl}/download/${project.project_id}/`,
|
|
69
|
-
isActive: (input) => input === "download",
|
|
70
|
-
...navigationVisibility.download
|
|
71
|
-
}
|
|
72
|
-
],
|
|
73
|
-
{
|
|
74
|
-
key: "tasks",
|
|
75
|
-
label: "Tasks",
|
|
76
|
-
link: `${expertUrl}/tasks/${project.project_id}/`,
|
|
77
|
-
isActive: (input) => input === "tasks",
|
|
78
|
-
// TODO: Add task count
|
|
79
|
-
// badge: taskCount,
|
|
80
|
-
...navigationVisibility.tasks
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
key: "workflows",
|
|
84
|
-
label: "Workflows",
|
|
85
|
-
link: `${expertUrl}/workflows/${project.project_id}/`,
|
|
86
|
-
isActive: (input) => input === "workflows",
|
|
87
|
-
novel: "New",
|
|
88
|
-
onClick: () => {
|
|
89
|
-
window.location.assign(`${expertUrl}/workflows/${project.project_id}/`);
|
|
90
|
-
},
|
|
91
|
-
...navigationVisibility.workflows
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
key: "contributors",
|
|
95
|
-
label: "Contributors",
|
|
96
|
-
link: `${expertUrl}/contributors/${project.project_id}/`,
|
|
97
|
-
isActive: (input) => input === "contributors",
|
|
98
|
-
...navigationVisibility.contributors
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
key: "screenshots",
|
|
102
|
-
label: "Screenshots",
|
|
103
|
-
link: `${expertUrl}/screenshots/${project.project_id}/`,
|
|
104
|
-
isActive: (input) => input === "screenshots",
|
|
105
|
-
...navigationVisibility.screenshots
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
key: "glossary",
|
|
109
|
-
label: "Glossary",
|
|
110
|
-
link: `${expertUrl}/glossary/${project.project_id}/`,
|
|
111
|
-
isActive: (input) => input === "glossary",
|
|
112
|
-
...navigationVisibility.glossary
|
|
113
|
-
},
|
|
114
|
-
...appsNavigationItemArrInMainMenu,
|
|
115
|
-
{
|
|
116
|
-
key: "more",
|
|
117
|
-
label: "More...",
|
|
118
|
-
isActive: (input) => ["settings", "statistics", "duplicates", "live edit"].includes(input),
|
|
119
|
-
...navigationVisibility.more,
|
|
120
|
-
dropdown: [
|
|
121
|
-
[
|
|
122
|
-
{
|
|
123
|
-
link: `${expertUrl}/settings/${project.project_id}/`,
|
|
124
|
-
label: "Settings",
|
|
125
|
-
...navigationVisibility.settings
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
link: `${expertUrl}/settings/${project.project_id}/#branches`,
|
|
129
|
-
label: "Branches",
|
|
130
|
-
...navigationVisibility.branches
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
link: `${expertUrl}/settings/${project.project_id}/#ota-bundles`,
|
|
134
|
-
label: "OTA Bundles",
|
|
135
|
-
...navigationVisibility.otaBundles
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
link: `${expertUrl}/settings/${project.project_id}/#project-automations`,
|
|
139
|
-
label: "Automations",
|
|
140
|
-
...navigationVisibility.automations
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
link: `${expertUrl}/dupes/${project.project_id}/`,
|
|
144
|
-
label: "Duplicate finder",
|
|
145
|
-
...navigationVisibility.duplicateFinder
|
|
146
|
-
}
|
|
147
|
-
],
|
|
148
|
-
[
|
|
149
|
-
...appsNavigationItemArrInMoreMenu,
|
|
150
|
-
{
|
|
151
|
-
// 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.
|
|
152
|
-
label: "Activity",
|
|
153
|
-
onClick: () => {
|
|
154
|
-
},
|
|
155
|
-
...navigationVisibility.activity
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
link: `${expertUrl}/statistics/${project.project_id}/`,
|
|
159
|
-
label: "Statistics",
|
|
160
|
-
...navigationVisibility.statistics
|
|
161
|
-
}
|
|
162
|
-
]
|
|
163
|
-
]
|
|
164
|
-
}
|
|
165
|
-
];
|
|
166
|
-
}, [project, adminRights, enabled, expertUrl]);
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const louis = require("@lokalise/louis");
|
|
5
|
+
const SortingIcon = ({ direction }) => {
|
|
6
|
+
if (direction === "asc") {
|
|
7
|
+
return /* @__PURE__ */ jsxRuntime.jsx(louis.SortAscendingIcon, { ariaLabel: "ascending sorting" });
|
|
8
|
+
}
|
|
9
|
+
if (direction === "desc") {
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsx(louis.SortDescendingIcon, { ariaLabel: "descending sorting" });
|
|
11
|
+
}
|
|
12
|
+
return /* @__PURE__ */ jsxRuntime.jsx(louis.SortIcon, { ariaLabel: "sorting" });
|
|
167
13
|
};
|
|
168
|
-
exports.
|
|
14
|
+
exports.SortingIcon = SortingIcon;
|
|
169
15
|
//# sourceMappingURL=harmony129.cjs.map
|
package/dist/harmony129.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony129.cjs","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":["useNavigationClient","useMemo","getProjectNavigationVisibilityMap"],"mappings":";;;;;AAqBO,MAAM,sBAAsB,CAClC,SACA,SACA,gBACI;AAEE,QAAA,eAAc,2CAAa,iBAAgB,CAAC;AAElD,QAAM,yCAAyC;AAC/C,QAAM,mBAAmBA,yBAAAA,oBAAoB;AACvC,QAAA,YAAY,iBAAiB,aAAa;AAEhD,SAAOC,cAAQ,MAAM;AAEhB,QAAA,CAAC,WAAW,CAAC,SAAS;AACzB,aAAO,CAAC;AAAA,IAAA;AAWT,UAAM,uBAAuBC,kBAAA;AAAA,MAC5B;AAAA,MACA;AAAA,MACA,MAAM;AAAA,IACP;AAEA,UAAM,qBAAyC;AAAA,MAC9C,KAAK;AAAA,MACL,OAAO;AAAA,MACP,UAAU,CAAC,UAAkB,UAAU;AAAA,MACvC,MAAM,GAAG,SAAS,SAAS,QAAQ,UAAU;AAAA,MAC7C,GAAG,qBAAqB;AAAA,IACzB;AAEA,UAAM,kCAAwD,CAAC;AAC/D,UAAM,kCAAwD,CAAC;AAE3D,QAAA,QAAQ,iBAAiB,uBAAuB;AACnD,sCAAgC,KAAK,kBAAkB;AAAA,IAAA,OACjD;AACN,sCAAgC,KAAK,kBAAkB;AAAA,IAAA;AAGjD,WAAA;AAAA,MACN;AAAA,QACC,KAAK;AAAA,QACL,OAAO;AAAA,QACP,MAAM,GAAG,SAAS,YAAY,QAAQ,UAAU;AAAA,QAChD,UAAU,CAAC,UAAkB,UAAU;AAAA,QACvC,GAAG,qBAAqB;AAAA,MACzB;AAAA,MACA;AAAA,QACC,KAAK;AAAA,Q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AAA;AAAA,UAE1B;AAAA,UACA;AAAA,YACC,GAAG;AAAA,YACH;AAAA;AAAA,cAEC,OAAO;AAAA,cACP,SAAS,MAAM;AAAA,cASf;AAAA,cACA,GAAG,qBAAqB;AAAA,YACzB;AAAA,YACA;AAAA,cACC,MAAM,GAAG,SAAS,eAAe,QAAQ,UAAU;AAAA,cACnD,OAAO;AAAA,cACP,GAAG,qBAAqB;AAAA,YAAA;AAAA,UACzB;AAAA,QACD;AAAA,MACD;AAAA,IAEF;AAAA,KACE,CAAC,SAAS,aAAa,SAAS,SAAS,CAAC;AAC9C;;"}
|
|
1
|
+
{"version":3,"file":"harmony129.cjs","sources":["../src/components/Table/components/SortingIcon.tsx"],"sourcesContent":["import { SortAscendingIcon, SortDescendingIcon, SortIcon } from '@lokalise/louis'\nimport type { SortDirection } from '@tanstack/react-table'\n\ntype SortingIconProps = {\n\tdirection: SortDirection | false\n}\n\nexport const SortingIcon = ({ direction }: SortingIconProps) => {\n\tif (direction === 'asc') {\n\t\treturn <SortAscendingIcon ariaLabel=\"ascending sorting\" />\n\t}\n\tif (direction === 'desc') {\n\t\treturn <SortDescendingIcon ariaLabel=\"descending sorting\" />\n\t}\n\treturn <SortIcon ariaLabel=\"sorting\" />\n}\n"],"names":["jsx","SortAscendingIcon","SortDescendingIcon","SortIcon"],"mappings":";;;;AAOO,MAAM,cAAc,CAAC,EAAE,gBAAkC;AAC/D,MAAI,cAAc,OAAO;AACjB,WAAAA,2BAAA,IAACC,MAAkB,mBAAA,EAAA,WAAU,oBAAoB,CAAA;AAAA,EAAA;AAEzD,MAAI,cAAc,QAAQ;AAClB,WAAAD,2BAAA,IAACE,MAAmB,oBAAA,EAAA,WAAU,qBAAqB,CAAA;AAAA,EAAA;AAEpD,SAAAF,2BAAA,IAACG,MAAS,UAAA,EAAA,WAAU,UAAU,CAAA;AACtC;;"}
|
package/dist/harmony129.mjs
CHANGED
|
@@ -1,169 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return [];
|
|
12
|
-
}
|
|
13
|
-
const navigationVisibility = getProjectNavigationVisibilityMap(
|
|
14
|
-
project,
|
|
15
|
-
adminRights,
|
|
16
|
-
() => true
|
|
17
|
-
);
|
|
18
|
-
const appsNavigationItem = {
|
|
19
|
-
key: "apps",
|
|
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]);
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { SortAscendingIcon, SortDescendingIcon, SortIcon } from "@lokalise/louis";
|
|
3
|
+
const SortingIcon = ({ direction }) => {
|
|
4
|
+
if (direction === "asc") {
|
|
5
|
+
return /* @__PURE__ */ jsx(SortAscendingIcon, { ariaLabel: "ascending sorting" });
|
|
6
|
+
}
|
|
7
|
+
if (direction === "desc") {
|
|
8
|
+
return /* @__PURE__ */ jsx(SortDescendingIcon, { ariaLabel: "descending sorting" });
|
|
9
|
+
}
|
|
10
|
+
return /* @__PURE__ */ jsx(SortIcon, { ariaLabel: "sorting" });
|
|
165
11
|
};
|
|
166
12
|
export {
|
|
167
|
-
|
|
13
|
+
SortingIcon
|
|
168
14
|
};
|
|
169
15
|
//# sourceMappingURL=harmony129.mjs.map
|
package/dist/harmony129.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony129.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":";;;AAqBO,MAAM,sBAAsB,CAClC,SACA,SACA,gBACI;AAEE,QAAA,eAAc,2CAAa,iBAAgB,CAAC;AAElD,QAAM,yCAAyC;AAC/C,QAAM,mBAAmB,oBAAoB;AACvC,QAAA,YAAY,iBAAiB,aAAa;AAEhD,SAAO,QAAQ,MAAM;AAEhB,QAAA,CAAC,WAAW,CAAC,SAAS;AACzB,aAAO,CAAC;AAAA,IAAA;AAWT,UAAM,uBAAuB;AAAA,MAC5B;AAAA,MACA;AAAA,MACA,MAAM;AAAA,IACP;AAEA,UAAM,qBAAyC;AAAA,MAC9C,KAAK;AAAA,MACL,OAAO;AAAA,MACP,UAAU,CAAC,UAAkB,UAAU;AAAA,MACvC,MAAM,GAAG,SAAS,SAAS,QAAQ,UAAU;AAAA,MAC7C,GAAG,qBAAqB;AAAA,IACzB;AAEA,UAAM,kCAAwD,CAAC;AAC/D,UAAM,kCAAwD,CAAC;AAE3D,QAAA,QAAQ,iBAAiB,uBAAuB;AACnD,sCAAgC,KAAK,kBAAkB;AAAA,IAAA,OACjD;AACN,sCAAgC,KAAK,kBAAkB;AAAA,IAAA;AAGjD,W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cACC,MAAM,GAAG,SAAS,aAAa,QAAQ,UAAU;AAAA,cACjD,OAAO;AAAA,cACP,GAAG,qBAAqB;AAAA,YACzB;AAAA,YACA;AAAA,cACC,MAAM,GAAG,SAAS,UAAU,QAAQ,UAAU;AAAA,cAC9C,OAAO;AAAA,cACP,GAAG,qBAAqB;AAAA,YAAA;AAAA,UAE1B;AAAA,UACA;AAAA,YACC,GAAG;AAAA,YACH;AAAA;AAAA,cAEC,OAAO;AAAA,cACP,SAAS,MAAM;AAAA,cASf;AAAA,cACA,GAAG,qBAAqB;AAAA,YACzB;AAAA,YACA;AAAA,cACC,MAAM,GAAG,SAAS,eAAe,QAAQ,UAAU;AAAA,cACnD,OAAO;AAAA,cACP,GAAG,qBAAqB;AAAA,YAAA;AAAA,UACzB;AAAA,QACD;AAAA,MACD;AAAA,IAEF;AAAA,KACE,CAAC,SAAS,aAAa,SAAS,SAAS,CAAC;AAC9C;"}
|
|
1
|
+
{"version":3,"file":"harmony129.mjs","sources":["../src/components/Table/components/SortingIcon.tsx"],"sourcesContent":["import { SortAscendingIcon, SortDescendingIcon, SortIcon } from '@lokalise/louis'\nimport type { SortDirection } from '@tanstack/react-table'\n\ntype SortingIconProps = {\n\tdirection: SortDirection | false\n}\n\nexport const SortingIcon = ({ direction }: SortingIconProps) => {\n\tif (direction === 'asc') {\n\t\treturn <SortAscendingIcon ariaLabel=\"ascending sorting\" />\n\t}\n\tif (direction === 'desc') {\n\t\treturn <SortDescendingIcon ariaLabel=\"descending sorting\" />\n\t}\n\treturn <SortIcon ariaLabel=\"sorting\" />\n}\n"],"names":[],"mappings":";;AAOO,MAAM,cAAc,CAAC,EAAE,gBAAkC;AAC/D,MAAI,cAAc,OAAO;AACjB,WAAA,oBAAC,mBAAkB,EAAA,WAAU,oBAAoB,CAAA;AAAA,EAAA;AAEzD,MAAI,cAAc,QAAQ;AAClB,WAAA,oBAAC,oBAAmB,EAAA,WAAU,qBAAqB,CAAA;AAAA,EAAA;AAEpD,SAAA,oBAAC,UAAS,EAAA,WAAU,UAAU,CAAA;AACtC;"}
|