@lokalise/harmony 1.40.3-exp-epic2x.6 → 1.40.3-exp-epic2x.7
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/harmony100.cjs +10 -9
- package/dist/harmony100.cjs.map +1 -1
- package/dist/harmony100.mjs +12 -11
- package/dist/harmony100.mjs.map +1 -1
- package/dist/harmony101.cjs +11 -20
- package/dist/harmony101.cjs.map +1 -1
- package/dist/harmony101.mjs +11 -20
- package/dist/harmony101.mjs.map +1 -1
- package/dist/harmony105.cjs +87 -9
- package/dist/harmony105.cjs.map +1 -1
- package/dist/harmony105.mjs +86 -8
- package/dist/harmony105.mjs.map +1 -1
- package/dist/harmony106.cjs +29 -11
- package/dist/harmony106.cjs.map +1 -1
- package/dist/harmony106.mjs +29 -11
- package/dist/harmony106.mjs.map +1 -1
- package/dist/harmony107.cjs +9 -15
- package/dist/harmony107.cjs.map +1 -1
- package/dist/harmony107.mjs +8 -14
- package/dist/harmony107.mjs.map +1 -1
- package/dist/harmony108.cjs +6 -13
- package/dist/harmony108.cjs.map +1 -1
- package/dist/harmony108.mjs +8 -15
- package/dist/harmony108.mjs.map +1 -1
- package/dist/harmony109.cjs +12 -7
- package/dist/harmony109.cjs.map +1 -1
- package/dist/harmony109.mjs +14 -9
- package/dist/harmony109.mjs.map +1 -1
- package/dist/harmony110.cjs +13 -20
- package/dist/harmony110.cjs.map +1 -1
- package/dist/harmony110.mjs +15 -22
- package/dist/harmony110.mjs.map +1 -1
- package/dist/harmony111.cjs +7 -9
- package/dist/harmony111.cjs.map +1 -1
- package/dist/harmony111.mjs +9 -11
- package/dist/harmony111.mjs.map +1 -1
- package/dist/harmony112.cjs +18 -29
- package/dist/harmony112.cjs.map +1 -1
- package/dist/harmony112.mjs +20 -31
- package/dist/harmony112.mjs.map +1 -1
- package/dist/harmony113.cjs +6 -6
- package/dist/harmony113.cjs.map +1 -1
- package/dist/harmony113.mjs +6 -6
- package/dist/harmony113.mjs.map +1 -1
- package/dist/harmony114.cjs +28 -13
- package/dist/harmony114.cjs.map +1 -1
- package/dist/harmony114.mjs +29 -14
- package/dist/harmony114.mjs.map +1 -1
- package/dist/harmony115.cjs +7 -31
- package/dist/harmony115.cjs.map +1 -1
- package/dist/harmony115.mjs +8 -32
- package/dist/harmony115.mjs.map +1 -1
- package/dist/harmony116.cjs +22 -21
- package/dist/harmony116.cjs.map +1 -1
- package/dist/harmony116.mjs +21 -20
- package/dist/harmony116.mjs.map +1 -1
- package/dist/harmony117.cjs +30 -15
- package/dist/harmony117.cjs.map +1 -1
- package/dist/harmony117.mjs +32 -17
- package/dist/harmony117.mjs.map +1 -1
- package/dist/harmony118.cjs +18 -3
- package/dist/harmony118.cjs.map +1 -1
- package/dist/harmony118.mjs +18 -3
- package/dist/harmony118.mjs.map +1 -1
- package/dist/harmony119.cjs +21 -15
- package/dist/harmony119.cjs.map +1 -1
- package/dist/harmony119.mjs +20 -14
- package/dist/harmony119.mjs.map +1 -1
- package/dist/harmony120.cjs +6 -87
- package/dist/harmony120.cjs.map +1 -1
- package/dist/harmony120.mjs +5 -86
- package/dist/harmony120.mjs.map +1 -1
- package/dist/harmony121.cjs +16 -31
- package/dist/harmony121.cjs.map +1 -1
- package/dist/harmony121.mjs +15 -30
- package/dist/harmony121.mjs.map +1 -1
- package/dist/harmony77.cjs +2 -2
- package/dist/harmony77.mjs +2 -2
- package/dist/harmony80.cjs +2 -2
- package/dist/harmony80.mjs +2 -2
- package/dist/harmony84.cjs +1 -1
- package/dist/harmony84.mjs +1 -1
- package/dist/harmony85.cjs +7 -7
- package/dist/harmony85.mjs +7 -7
- package/dist/harmony87.cjs +2 -2
- package/dist/harmony87.mjs +2 -2
- package/dist/harmony88.cjs +165 -2
- package/dist/harmony88.cjs.map +1 -1
- package/dist/harmony88.mjs +166 -3
- package/dist/harmony88.mjs.map +1 -1
- package/dist/harmony89.cjs +42 -16
- package/dist/harmony89.cjs.map +1 -1
- package/dist/harmony89.mjs +42 -16
- package/dist/harmony89.mjs.map +1 -1
- package/dist/harmony90.cjs +3 -76
- package/dist/harmony90.cjs.map +1 -1
- package/dist/harmony90.mjs +3 -76
- package/dist/harmony90.mjs.map +1 -1
- package/dist/harmony91.cjs +17 -11
- package/dist/harmony91.cjs.map +1 -1
- package/dist/harmony91.mjs +17 -11
- package/dist/harmony91.mjs.map +1 -1
- package/dist/harmony92.cjs +76 -30
- package/dist/harmony92.cjs.map +1 -1
- package/dist/harmony92.mjs +76 -30
- package/dist/harmony92.mjs.map +1 -1
- package/dist/harmony93.cjs +12 -9
- package/dist/harmony93.cjs.map +1 -1
- package/dist/harmony93.mjs +12 -9
- package/dist/harmony93.mjs.map +1 -1
- package/dist/harmony94.cjs +30 -47
- package/dist/harmony94.cjs.map +1 -1
- package/dist/harmony94.mjs +30 -47
- package/dist/harmony94.mjs.map +1 -1
- package/dist/harmony95.cjs +10 -10
- package/dist/harmony95.cjs.map +1 -1
- package/dist/harmony95.mjs +9 -9
- package/dist/harmony95.mjs.map +1 -1
- package/dist/harmony96.cjs +44 -163
- package/dist/harmony96.cjs.map +1 -1
- package/dist/harmony96.mjs +44 -163
- package/dist/harmony96.mjs.map +1 -1
- package/dist/harmony97.cjs +9 -44
- package/dist/harmony97.cjs.map +1 -1
- package/dist/harmony97.mjs +8 -43
- package/dist/harmony97.mjs.map +1 -1
- package/dist/harmony98.cjs +9 -10
- package/dist/harmony98.cjs.map +1 -1
- package/dist/harmony98.mjs +11 -12
- package/dist/harmony98.mjs.map +1 -1
- package/dist/harmony99.cjs +20 -11
- package/dist/harmony99.cjs.map +1 -1
- package/dist/harmony99.mjs +20 -11
- package/dist/harmony99.mjs.map +1 -1
- package/dist/types/src/components/Sidebar/types.d.ts +1 -1
- package/dist/types/src/node.d.ts +1 -1
- package/package.json +1 -1
package/dist/harmony93.cjs
CHANGED
@@ -1,12 +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
|
-
|
3
|
+
const SidebarContext = require("./harmony90.cjs");
|
4
|
+
const React = require("react");
|
5
|
+
const useSidebar = () => {
|
6
|
+
const context = React.useContext(SidebarContext.SidebarContext);
|
7
|
+
if (!context) {
|
8
|
+
throw new Error(
|
9
|
+
"You are using useSidebar hook outside its context. Please review your code implementation"
|
10
|
+
);
|
11
|
+
}
|
12
|
+
return context;
|
13
|
+
};
|
14
|
+
exports.useSidebar = useSidebar;
|
12
15
|
//# sourceMappingURL=harmony93.cjs.map
|
package/dist/harmony93.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony93.cjs","sources":["../src/components/Sidebar/
|
1
|
+
{"version":3,"file":"harmony93.cjs","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":["useContext","SidebarContext"],"mappings":";;;;AAGO,MAAM,aAAa,MAAM;AACzB,QAAA,UAAUA,iBAAWC,6BAAc;AAEzC,MAAI,CAAC,SAAS;AACb,UAAM,IAAI;AAAA,MACT;AAAA,IACD;AAAA,EAAA;AAGM,SAAA;AACR;;"}
|
package/dist/harmony93.mjs
CHANGED
@@ -1,12 +1,15 @@
|
|
1
|
-
import {
|
2
|
-
import
|
3
|
-
const
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
import { SidebarContext } from "./harmony90.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"
|
8
|
+
);
|
9
|
+
}
|
10
|
+
return context;
|
11
|
+
};
|
9
12
|
export {
|
10
|
-
|
13
|
+
useSidebar
|
11
14
|
};
|
12
15
|
//# sourceMappingURL=harmony93.mjs.map
|
package/dist/harmony93.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony93.mjs","sources":["../src/components/Sidebar/
|
1
|
+
{"version":3,"file":"harmony93.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/harmony94.cjs
CHANGED
@@ -1,50 +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
|
-
louis.MenuItem,
|
34
|
-
{
|
35
|
-
href: "https://developers.lokalise.com/reference/lokalise-rest-api",
|
36
|
-
target: "_blank",
|
37
|
-
children: "API reference"
|
38
|
-
}
|
39
|
-
),
|
40
|
-
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { href: "https://github.com/lokalise/lokalise-cli-2-go", target: "_blank", children: "CLI tool" }),
|
41
|
-
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuDivider, {}),
|
42
|
-
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { href: "https://lokalise.com/blog/category/product-updates/", target: "_blank", children: "What’s new" }),
|
43
|
-
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { href: "https://lokalise.com/blog/", target: "_blank", children: "Blog" }),
|
44
|
-
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { href: "https://lokalise.com/product/apps", target: "_blank", children: "Apps" })
|
45
|
-
] })
|
46
|
-
}
|
47
|
-
);
|
48
|
-
};
|
49
|
-
exports.HelpMenu = HelpMenu;
|
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;
|
50
33
|
//# sourceMappingURL=harmony94.cjs.map
|
package/dist/harmony94.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony94.cjs","sources":["../src/
|
1
|
+
{"version":3,"file":"harmony94.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/harmony94.mjs
CHANGED
@@ -1,50 +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
|
-
/* @__PURE__ */ jsx(MenuDivider, {}),
|
25
|
-
keyboardShortcuts && /* @__PURE__ */ jsxs(MenuItem, { className: styles.shortcutMenu, onClick: keyboardShortcuts.onClick, children: [
|
26
|
-
"Keyboard shortcuts",
|
27
|
-
" ",
|
28
|
-
/* @__PURE__ */ jsx("span", { className: styles.shortcutLabel, children: keyboardShortcuts.label })
|
29
|
-
] }),
|
30
|
-
/* @__PURE__ */ jsx(
|
31
|
-
MenuItem,
|
32
|
-
{
|
33
|
-
href: "https://developers.lokalise.com/reference/lokalise-rest-api",
|
34
|
-
target: "_blank",
|
35
|
-
children: "API reference"
|
36
|
-
}
|
37
|
-
),
|
38
|
-
/* @__PURE__ */ jsx(MenuItem, { href: "https://github.com/lokalise/lokalise-cli-2-go", target: "_blank", children: "CLI tool" }),
|
39
|
-
/* @__PURE__ */ jsx(MenuDivider, {}),
|
40
|
-
/* @__PURE__ */ jsx(MenuItem, { href: "https://lokalise.com/blog/category/product-updates/", target: "_blank", children: "What’s new" }),
|
41
|
-
/* @__PURE__ */ jsx(MenuItem, { href: "https://lokalise.com/blog/", target: "_blank", children: "Blog" }),
|
42
|
-
/* @__PURE__ */ jsx(MenuItem, { href: "https://lokalise.com/product/apps", target: "_blank", children: "Apps" })
|
43
|
-
] })
|
44
|
-
}
|
45
|
-
);
|
46
|
-
};
|
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
|
+
);
|
47
24
|
export {
|
48
|
-
|
25
|
+
canAccessProfileSettings,
|
26
|
+
canAccessProviderDashboard,
|
27
|
+
canAccessReporting,
|
28
|
+
canAccessTeamSettings,
|
29
|
+
canChangeBilling,
|
30
|
+
canCreateTeam,
|
31
|
+
canUpgradePlan
|
49
32
|
};
|
50
33
|
//# sourceMappingURL=harmony94.mjs.map
|
package/dist/harmony94.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony94.mjs","sources":["../src/
|
1
|
+
{"version":3,"file":"harmony94.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;"}
|
package/dist/harmony95.cjs
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
"use strict";
|
2
|
-
Object.
|
3
|
-
const
|
4
|
-
const
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
exports.
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
4
|
+
const Avatar_module = require("./harmony120.cjs");
|
5
|
+
const Avatar = ({
|
6
|
+
src,
|
7
|
+
href = "/",
|
8
|
+
ariaLabel = "Lokalise App Home",
|
9
|
+
alt = "Lokalise Logo"
|
10
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx("a", { className: Avatar_module.default.logoLink, href, "aria-label": ariaLabel, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt }) });
|
11
|
+
exports.Avatar = Avatar;
|
12
12
|
//# sourceMappingURL=harmony95.cjs.map
|
package/dist/harmony95.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony95.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"harmony95.cjs","sources":["../src/components/Sidebar/Widgets/Avatar/Avatar.tsx"],"sourcesContent":["import styles from './Avatar.module.css'\n\ntype AvatarProps = {\n\t/** URL of the avatar/logo image */\n\tsrc: string\n\t/** Link destination when avatar is clicked. Defaults to '/' */\n\thref?: string\n\t/** Accessibility label for the avatar link. Defaults to 'Home' */\n\tariaLabel?: string\n\t/** Alt text for the avatar image. Defaults to 'Lokalise' */\n\talt?: string\n}\n\n/**\n * Display company main avatar / logo in the top section of the Sidebar.\n * Used as the main branding element and home navigation link.\n *\n * @example\n * ```\n * <Avatar src=\"/logo.png\" href=\"/\" ariaLabel=\"Home\" alt=\"\" />\n * ```\n */\n\nexport const Avatar = ({\n\tsrc,\n\thref = '/',\n\tariaLabel = 'Lokalise App Home',\n\talt = 'Lokalise Logo',\n}: AvatarProps) => (\n\t<a className={styles.logoLink} href={href} aria-label={ariaLabel}>\n\t\t<img src={src} alt={alt} />\n\t</a>\n)\n"],"names":["jsx","styles"],"mappings":";;;;AAuBO,MAAM,SAAS,CAAC;AAAA,EACtB;AAAA,EACA,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,MAAM;AACP,MACEA,2BAAAA,IAAA,KAAA,EAAE,WAAWC,cAAA,QAAO,UAAU,MAAY,cAAY,WACtD,UAACD,2BAAAA,IAAA,OAAA,EAAI,KAAU,IAAA,CAAU,EAC1B,CAAA;;"}
|
package/dist/harmony95.mjs
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
2
|
+
import styles from "./harmony120.mjs";
|
3
|
+
const Avatar = ({
|
4
|
+
src,
|
5
|
+
href = "/",
|
6
|
+
ariaLabel = "Lokalise App Home",
|
7
|
+
alt = "Lokalise Logo"
|
8
|
+
}) => /* @__PURE__ */ jsx("a", { className: styles.logoLink, href, "aria-label": ariaLabel, children: /* @__PURE__ */ jsx("img", { src, alt }) });
|
7
9
|
export {
|
8
|
-
|
9
|
-
sidebarContainer,
|
10
|
-
sidebarSkeleton
|
10
|
+
Avatar
|
11
11
|
};
|
12
12
|
//# sourceMappingURL=harmony95.mjs.map
|
package/dist/harmony95.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony95.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"harmony95.mjs","sources":["../src/components/Sidebar/Widgets/Avatar/Avatar.tsx"],"sourcesContent":["import styles from './Avatar.module.css'\n\ntype AvatarProps = {\n\t/** URL of the avatar/logo image */\n\tsrc: string\n\t/** Link destination when avatar is clicked. Defaults to '/' */\n\thref?: string\n\t/** Accessibility label for the avatar link. Defaults to 'Home' */\n\tariaLabel?: string\n\t/** Alt text for the avatar image. Defaults to 'Lokalise' */\n\talt?: string\n}\n\n/**\n * Display company main avatar / logo in the top section of the Sidebar.\n * Used as the main branding element and home navigation link.\n *\n * @example\n * ```\n * <Avatar src=\"/logo.png\" href=\"/\" ariaLabel=\"Home\" alt=\"\" />\n * ```\n */\n\nexport const Avatar = ({\n\tsrc,\n\thref = '/',\n\tariaLabel = 'Lokalise App Home',\n\talt = 'Lokalise Logo',\n}: AvatarProps) => (\n\t<a className={styles.logoLink} href={href} aria-label={ariaLabel}>\n\t\t<img src={src} alt={alt} />\n\t</a>\n)\n"],"names":[],"mappings":";;AAuBO,MAAM,SAAS,CAAC;AAAA,EACtB;AAAA,EACA,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,MAAM;AACP,MACE,oBAAA,KAAA,EAAE,WAAW,OAAO,UAAU,MAAY,cAAY,WACtD,UAAC,oBAAA,OAAA,EAAI,KAAU,IAAA,CAAU,EAC1B,CAAA;"}
|
package/dist/harmony96.cjs
CHANGED
@@ -1,169 +1,50 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
-
const
|
4
|
-
const
|
5
|
-
const
|
6
|
-
const
|
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
|
-
},
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
4
|
+
const louis = require("@lokalise/louis");
|
5
|
+
const clsx = require("./harmony73.cjs");
|
6
|
+
const HelpMenu_module = require("./harmony121.cjs");
|
7
|
+
const HelpMenu = ({ contactSupport, keyboardShortcuts }) => {
|
8
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
9
|
+
louis.Menu,
|
10
|
+
{
|
11
|
+
menuButton: ({ opened }) => /* @__PURE__ */ jsxRuntime.jsx(louis.Tooltip, { placement: "right", tooltip: "Help", children: /* @__PURE__ */ jsxRuntime.jsx(
|
12
|
+
"button",
|
65
13
|
{
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
14
|
+
type: "button",
|
15
|
+
className: clsx.clsx(HelpMenu_module.default.dropdownButton, {
|
16
|
+
[HelpMenu_module.default.dropdownButtonActive]: opened
|
17
|
+
}),
|
18
|
+
"data-testid": "sidebar-help-menu-button",
|
19
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(louis.HelpCenterIcon, { size: "25px" })
|
71
20
|
}
|
72
|
-
|
73
|
-
{
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
},
|
100
|
-
{
|
101
|
-
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]);
|
21
|
+
) }),
|
22
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(louis.MenuList, { placement: "right-start", children: [
|
23
|
+
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { href: "https://lokalise.com/blog/category/tutorials/", target: "_blank", children: "Tutorials" }),
|
24
|
+
contactSupport && /* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { onClick: contactSupport.onClick, children: "Contact support" }),
|
25
|
+
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { href: "https://docs.lokalise.com/en/", target: "_blank", children: "Documentation" }),
|
26
|
+
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuDivider, {}),
|
27
|
+
keyboardShortcuts && /* @__PURE__ */ jsxRuntime.jsxs(louis.MenuItem, { className: HelpMenu_module.default.shortcutMenu, onClick: keyboardShortcuts.onClick, children: [
|
28
|
+
"Keyboard shortcuts",
|
29
|
+
" ",
|
30
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: HelpMenu_module.default.shortcutLabel, children: keyboardShortcuts.label })
|
31
|
+
] }),
|
32
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
33
|
+
louis.MenuItem,
|
34
|
+
{
|
35
|
+
href: "https://developers.lokalise.com/reference/lokalise-rest-api",
|
36
|
+
target: "_blank",
|
37
|
+
children: "API reference"
|
38
|
+
}
|
39
|
+
),
|
40
|
+
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { href: "https://github.com/lokalise/lokalise-cli-2-go", target: "_blank", children: "CLI tool" }),
|
41
|
+
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuDivider, {}),
|
42
|
+
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { href: "https://lokalise.com/blog/category/product-updates/", target: "_blank", children: "What’s new" }),
|
43
|
+
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { href: "https://lokalise.com/blog/", target: "_blank", children: "Blog" }),
|
44
|
+
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { href: "https://lokalise.com/product/apps", target: "_blank", children: "Apps" })
|
45
|
+
] })
|
46
|
+
}
|
47
|
+
);
|
167
48
|
};
|
168
|
-
exports.
|
49
|
+
exports.HelpMenu = HelpMenu;
|
169
50
|
//# sourceMappingURL=harmony96.cjs.map
|