@lokalise/harmony 2.0.1 → 2.0.3
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.cjs +2 -1
- package/dist/harmony.cjs.map +1 -1
- package/dist/harmony.mjs +3 -2
- package/dist/harmony103.cjs +2 -1
- package/dist/harmony103.cjs.map +1 -1
- package/dist/harmony103.mjs +4 -3
- package/dist/harmony103.mjs.map +1 -1
- package/dist/harmony110.cjs +1 -1
- package/dist/harmony110.mjs +1 -1
- package/dist/harmony111.cjs +12 -12
- package/dist/harmony111.mjs +12 -12
- package/dist/harmony113.cjs +4 -0
- package/dist/harmony113.cjs.map +1 -1
- package/dist/harmony113.mjs +4 -0
- package/dist/harmony113.mjs.map +1 -1
- package/dist/harmony114.cjs +1 -1
- package/dist/harmony114.mjs +1 -1
- package/dist/harmony115.cjs +1 -1
- package/dist/harmony115.mjs +1 -1
- package/dist/harmony121.cjs +99 -20
- package/dist/harmony121.cjs.map +1 -1
- package/dist/harmony121.mjs +82 -20
- package/dist/harmony121.mjs.map +1 -1
- package/dist/harmony126.cjs +6 -6
- package/dist/harmony126.mjs +6 -6
- package/dist/harmony127.cjs +1 -1
- package/dist/harmony127.mjs +1 -1
- package/dist/harmony129.cjs +21 -10
- package/dist/harmony129.cjs.map +1 -1
- package/dist/harmony129.mjs +20 -9
- package/dist/harmony129.mjs.map +1 -1
- package/dist/harmony130.cjs +9 -12
- package/dist/harmony130.cjs.map +1 -1
- package/dist/harmony130.mjs +8 -11
- package/dist/harmony130.mjs.map +1 -1
- package/dist/harmony131.cjs +4 -7
- package/dist/harmony131.cjs.map +1 -1
- package/dist/harmony131.mjs +7 -10
- package/dist/harmony131.mjs.map +1 -1
- package/dist/harmony132.cjs +3 -7
- package/dist/harmony132.cjs.map +1 -1
- package/dist/harmony132.mjs +3 -7
- package/dist/harmony132.mjs.map +1 -1
- package/dist/harmony133.cjs +16 -7
- package/dist/harmony133.cjs.map +1 -1
- package/dist/harmony133.mjs +18 -9
- package/dist/harmony133.mjs.map +1 -1
- package/dist/harmony134.cjs +7 -23
- package/dist/harmony134.cjs.map +1 -1
- package/dist/harmony134.mjs +8 -24
- package/dist/harmony134.mjs.map +1 -1
- package/dist/harmony135.cjs +18 -4
- package/dist/harmony135.cjs.map +1 -1
- package/dist/harmony135.mjs +20 -6
- package/dist/harmony135.mjs.map +1 -1
- package/dist/harmony136.cjs +6 -32
- package/dist/harmony136.cjs.map +1 -1
- package/dist/harmony136.mjs +8 -34
- package/dist/harmony136.mjs.map +1 -1
- package/dist/harmony137.cjs +32 -6
- package/dist/harmony137.cjs.map +1 -1
- package/dist/harmony137.mjs +34 -8
- package/dist/harmony137.mjs.map +1 -1
- package/dist/harmony138.cjs +7 -17
- package/dist/harmony138.cjs.map +1 -1
- package/dist/harmony138.mjs +7 -17
- package/dist/harmony138.mjs.map +1 -1
- package/dist/harmony139.cjs +12 -26
- package/dist/harmony139.cjs.map +1 -1
- package/dist/harmony139.mjs +13 -27
- package/dist/harmony139.mjs.map +1 -1
- package/dist/harmony140.cjs +36 -21
- package/dist/harmony140.cjs.map +1 -1
- package/dist/harmony140.mjs +35 -20
- package/dist/harmony140.mjs.map +1 -1
- package/dist/harmony141.cjs +21 -21
- package/dist/harmony141.cjs.map +1 -1
- package/dist/harmony141.mjs +20 -20
- package/dist/harmony141.mjs.map +1 -1
- package/dist/harmony142.cjs +21 -6
- package/dist/harmony142.cjs.map +1 -1
- package/dist/harmony142.mjs +20 -5
- package/dist/harmony142.mjs.map +1 -1
- package/dist/harmony143.cjs +3 -12
- package/dist/harmony143.cjs.map +1 -1
- package/dist/harmony143.mjs +3 -12
- package/dist/harmony143.mjs.map +1 -1
- package/dist/harmony144.cjs +15 -99
- package/dist/harmony144.cjs.map +1 -1
- package/dist/harmony144.mjs +14 -81
- package/dist/harmony144.mjs.map +1 -1
- package/dist/harmony145.cjs +6 -4
- package/dist/harmony145.cjs.map +1 -1
- package/dist/harmony145.mjs +5 -3
- package/dist/harmony145.mjs.map +1 -1
- package/dist/harmony146.cjs +6 -4
- package/dist/harmony146.cjs.map +1 -1
- package/dist/harmony146.mjs +5 -3
- package/dist/harmony146.mjs.map +1 -1
- package/dist/harmony147.cjs +10 -3
- package/dist/harmony147.cjs.map +1 -1
- package/dist/harmony147.mjs +10 -3
- package/dist/harmony147.mjs.map +1 -1
- package/dist/harmony148.cjs +2 -13
- package/dist/harmony148.cjs.map +1 -1
- package/dist/harmony148.mjs +2 -13
- package/dist/harmony148.mjs.map +1 -1
- package/dist/harmony149.cjs +2 -13
- package/dist/harmony149.cjs.map +1 -1
- package/dist/harmony149.mjs +2 -13
- package/dist/harmony149.mjs.map +1 -1
- package/dist/harmony150.cjs +3 -3
- package/dist/harmony150.cjs.map +1 -1
- package/dist/harmony150.mjs +3 -3
- package/dist/harmony150.mjs.map +1 -1
- package/dist/harmony151.cjs +14 -10
- package/dist/harmony151.cjs.map +1 -1
- package/dist/harmony151.mjs +14 -10
- package/dist/harmony151.mjs.map +1 -1
- package/dist/harmony152.cjs +15 -6
- package/dist/harmony152.cjs.map +1 -1
- package/dist/harmony152.mjs +14 -5
- package/dist/harmony152.mjs.map +1 -1
- package/dist/harmony153.cjs +4 -6
- package/dist/harmony153.cjs.map +1 -1
- package/dist/harmony153.mjs +3 -5
- package/dist/harmony153.mjs.map +1 -1
- package/dist/harmony154.cjs +9 -32
- package/dist/harmony154.cjs.map +1 -1
- package/dist/harmony154.mjs +8 -31
- package/dist/harmony154.mjs.map +1 -1
- package/dist/harmony155.cjs +3 -6
- package/dist/harmony155.cjs.map +1 -1
- package/dist/harmony155.mjs +3 -6
- package/dist/harmony155.mjs.map +1 -1
- package/dist/harmony156.cjs +6 -3
- package/dist/harmony156.cjs.map +1 -1
- package/dist/harmony156.mjs +6 -3
- package/dist/harmony156.mjs.map +1 -1
- package/dist/harmony157.cjs +21 -6
- package/dist/harmony157.cjs.map +1 -1
- package/dist/harmony157.mjs +21 -6
- package/dist/harmony157.mjs.map +1 -1
- package/dist/harmony158.cjs +3 -21
- package/dist/harmony158.cjs.map +1 -1
- package/dist/harmony158.mjs +3 -21
- package/dist/harmony158.mjs.map +1 -1
- package/dist/harmony159.cjs +9 -3
- package/dist/harmony159.cjs.map +1 -1
- package/dist/harmony159.mjs +9 -3
- package/dist/harmony159.mjs.map +1 -1
- package/dist/harmony160.cjs +3 -9
- package/dist/harmony160.cjs.map +1 -1
- package/dist/harmony160.mjs +3 -9
- package/dist/harmony160.mjs.map +1 -1
- package/dist/harmony161.cjs +97 -7
- package/dist/harmony161.cjs.map +1 -1
- package/dist/harmony161.mjs +96 -6
- package/dist/harmony161.mjs.map +1 -1
- package/dist/harmony162.cjs +11 -94
- package/dist/harmony162.cjs.map +1 -1
- package/dist/harmony162.mjs +11 -94
- package/dist/harmony162.mjs.map +1 -1
- package/dist/harmony163.cjs +13 -12
- package/dist/harmony163.cjs.map +1 -1
- package/dist/harmony163.mjs +13 -12
- package/dist/harmony163.mjs.map +1 -1
- package/dist/harmony164.cjs +35 -13
- package/dist/harmony164.cjs.map +1 -1
- package/dist/harmony164.mjs +35 -13
- package/dist/harmony164.mjs.map +1 -1
- package/dist/harmony165.cjs +24 -32
- package/dist/harmony165.cjs.map +1 -1
- package/dist/harmony165.mjs +24 -32
- package/dist/harmony165.mjs.map +1 -1
- package/dist/harmony166.cjs +31 -27
- package/dist/harmony166.cjs.map +1 -1
- package/dist/harmony166.mjs +31 -27
- package/dist/harmony166.mjs.map +1 -1
- package/dist/harmony167.cjs +13 -4
- package/dist/harmony167.cjs.map +1 -1
- package/dist/harmony167.mjs +13 -4
- package/dist/harmony167.mjs.map +1 -1
- package/dist/harmony168.cjs +14 -12
- package/dist/harmony168.cjs.map +1 -1
- package/dist/harmony168.mjs +14 -12
- package/dist/harmony168.mjs.map +1 -1
- package/dist/harmony169.cjs +14 -13
- package/dist/harmony169.cjs.map +1 -1
- package/dist/harmony169.mjs +14 -13
- package/dist/harmony169.mjs.map +1 -1
- package/dist/harmony170.cjs +10 -15
- package/dist/harmony170.cjs.map +1 -1
- package/dist/harmony170.mjs +10 -15
- package/dist/harmony170.mjs.map +1 -1
- package/dist/harmony171.cjs +15 -10
- package/dist/harmony171.cjs.map +1 -1
- package/dist/harmony171.mjs +15 -10
- package/dist/harmony171.mjs.map +1 -1
- package/dist/harmony172.cjs +18 -13
- package/dist/harmony172.cjs.map +1 -1
- package/dist/harmony172.mjs +18 -13
- package/dist/harmony172.mjs.map +1 -1
- package/dist/harmony173.cjs +10 -19
- package/dist/harmony173.cjs.map +1 -1
- package/dist/harmony173.mjs +10 -19
- package/dist/harmony173.mjs.map +1 -1
- package/dist/harmony174.cjs +4 -12
- package/dist/harmony174.cjs.map +1 -1
- package/dist/harmony174.mjs +4 -12
- package/dist/harmony174.mjs.map +1 -1
- package/dist/harmony176.cjs +1 -1
- package/dist/harmony176.mjs +1 -1
- package/dist/harmony20.cjs +1 -1
- package/dist/harmony20.mjs +1 -1
- package/dist/harmony81.cjs +21 -1
- package/dist/harmony81.cjs.map +1 -1
- package/dist/harmony81.mjs +21 -1
- package/dist/harmony81.mjs.map +1 -1
- package/dist/harmony82.cjs +0 -19
- package/dist/harmony82.cjs.map +1 -1
- package/dist/harmony82.mjs +0 -19
- package/dist/harmony82.mjs.map +1 -1
- package/dist/harmony88.cjs +12 -9
- package/dist/harmony88.cjs.map +1 -1
- package/dist/harmony88.mjs +12 -9
- package/dist/harmony88.mjs.map +1 -1
- package/dist/harmony94.cjs +1 -1
- package/dist/harmony94.mjs +1 -1
- package/dist/types/src/components/Sidebar/types.d.ts +4 -0
- package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedProjectContributor.d.ts +1 -1
- package/dist/types/src/features/navigation/hooks/useNavigationQueries.d.ts +3 -3
- package/dist/types/src/features/publicApi/contributors.d.ts +16 -16
- package/dist/types/src/features/publicApi/hooks/useAddContributorsMutation.d.ts +1 -1
- package/dist/types/src/features/publicApi/hooks/useGetProjectPermissionMetaQuery.d.ts +2 -2
- package/dist/types/src/features/publicApi/hooks/useListContributorsQuery.d.ts +1 -1
- package/dist/types/src/features/publicApi/hooks/useRetrieveContributorQuery.d.ts +1 -1
- package/dist/types/src/features/publicApi/hooks/useRetrieveUserPermissions.d.ts +1 -1
- package/dist/types/src/features/publicApi/hooks/useUpdateContributorMutation.d.ts +1 -1
- package/dist/types/src/features/publicApi/projects.d.ts +4 -4
- package/dist/types/src/features/publicApi/teamUsers.d.ts +6 -6
- package/dist/types/src/features/publicApi/types/contributorTypes.d.ts +18 -18
- package/dist/types/src/features/publicApi/types/permissionTemplateTypes.d.ts +2 -2
- package/dist/types/src/features/publicApi/types/permissionTypes.d.ts +0 -1
- package/dist/types/src/features/publicApi/types/projectTypes.d.ts +4 -4
- package/dist/types/src/features/publicApi/types/teamUserTypes.d.ts +10 -10
- package/package.json +1 -1
package/dist/harmony121.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony121.mjs","sources":["../
|
|
1
|
+
{"version":3,"file":"harmony121.mjs","sources":["../node_modules/react-resize-detector/build/utils.js"],"sourcesContent":["import * as React from 'react';\nimport debounce from 'lodash/debounce.js';\nimport throttle from 'lodash/throttle.js';\n\n/**\n * Wraps the resize callback with a lodash debounce / throttle based on the refresh mode\n */\nconst patchResizeCallback = (resizeCallback, refreshMode, refreshRate, refreshOptions) => {\n switch (refreshMode) {\n case 'debounce':\n return debounce(resizeCallback, refreshRate, refreshOptions);\n case 'throttle':\n return throttle(resizeCallback, refreshRate, refreshOptions);\n default:\n return resizeCallback;\n }\n};\n/**\n * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a\n * prop or avoid re-executing effects when passed as a dependency\n */\nconst useCallbackRef = \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n(callback) => {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => ((...args) => { var _a; return (_a = callbackRef.current) === null || _a === void 0 ? void 0 : _a.call(callbackRef, ...args); }), []);\n};\n/** `useRef` hook doesn't handle conditional rendering or dynamic ref changes.\n * This hook creates a proxy that ensures that `refElement` is updated whenever the ref is changed. */\nconst useRefProxy = \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n(targetRef) => {\n // we are going to use this ref to store the last element that was passed to the hook\n const [refElement, setRefElement] = React.useState((targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) || null);\n // if targetRef is passed, we need to update the refElement\n // we have to use setTimeout because ref get assigned after the hook is called\n // in the future releases we are going to remove targetRef and force users to use ref returned by the hook\n if (targetRef) {\n setTimeout(() => {\n if (targetRef.current !== refElement) {\n setRefElement(targetRef.current);\n }\n }, 0);\n }\n // this is a memo that will be called every time the ref is changed\n // This proxy will properly call setState either when the ref is called as a function or when `.current` is set\n // we call setState inside to trigger rerender\n const refProxy = React.useMemo(() => new Proxy((node) => {\n if (node !== refElement) {\n setRefElement(node);\n }\n }, {\n get(target, prop) {\n if (prop === 'current') {\n return refElement;\n }\n return target[prop];\n },\n set(target, prop, value) {\n if (prop === 'current') {\n setRefElement(value);\n }\n else {\n target[prop] = value;\n }\n return true;\n },\n }), [refElement]);\n return { refProxy, refElement, setRefElement };\n};\n/** Calculates the dimensions of the element based on the current box model.\n * @see https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model\n */\nconst getDimensions = (entry, box) => {\n // Value\t Border\t Padding\t Inner Content\n // ---------------------------------------------------\n // 'border-box'\t Yes\t Yes\t Yes\n // 'content-box'\t No\t No\t Yes\n // undefined No\t No?\t Yes\n if (box === 'border-box') {\n return {\n width: entry.borderBoxSize[0].inlineSize,\n height: entry.borderBoxSize[0].blockSize,\n };\n }\n if (box === 'content-box') {\n return {\n width: entry.contentBoxSize[0].inlineSize,\n height: entry.contentBoxSize[0].blockSize,\n };\n }\n return {\n width: entry.contentRect.width,\n height: entry.contentRect.height,\n };\n};\n\nexport { getDimensions, patchResizeCallback, useCallbackRef, useRefProxy };\n//# sourceMappingURL=utils.js.map\n"],"names":[],"mappings":";;;AAOK,MAAC,sBAAsB,CAAC,gBAAgB,aAAa,aAAa,mBAAmB;AACtF,UAAQ,aAAW;AAAA,IACf,KAAK;AACD,aAAO,SAAS,gBAAgB,aAAa,cAAc;AAAA,IAC/D,KAAK;AACD,aAAO,SAAS,gBAAgB,aAAa,cAAc;AAAA,IAC/D;AACI,aAAO;AAAA,EACnB;AACA;AAKK,MAAC;AAAA;AAAA,EAEN,CAAC,aAAa;AACV,UAAM,cAAc,MAAM,OAAO,QAAQ;AACzC,UAAM,UAAU,MAAM;AAClB,kBAAY,UAAU;AAAA,IAC9B,CAAK;AACD,WAAO,MAAM,QAAQ,MAAO,IAAI,SAAS;AAAE,UAAI;AAAI,cAAQ,KAAK,YAAY,aAAa,QAAQ,OAAO,SAAS,SAAS,GAAG,KAAK,aAAa,GAAG,IAAI;AAAA,IAAI,GAAG,CAAA,CAAE;AAAA,EACnK;AAAA;AAGK,MAAC;AAAA;AAAA,EAEN,CAAC,cAAc;AAEX,UAAM,CAAC,YAAY,aAAa,IAAI,MAAM,UAAU,cAAc,QAAQ,cAAc,SAAS,SAAS,UAAU,YAAY,IAAI;AAIpI,QAAI,WAAW;AACX,iBAAW,MAAM;AACb,YAAI,UAAU,YAAY,YAAY;AAClC,wBAAc,UAAU,OAAO;AAAA,QAC/C;AAAA,MACS,GAAE,CAAC;AAAA,IACZ;AAII,UAAM,WAAW,MAAM,QAAQ,MAAM,IAAI,MAAM,CAAC,SAAS;AACrD,UAAI,SAAS,YAAY;AACrB,sBAAc,IAAI;AAAA,MAC9B;AAAA,IACA,GAAO;AAAA,MACC,IAAI,QAAQ,MAAM;AACd,YAAI,SAAS,WAAW;AACpB,iBAAO;AAAA,QACvB;AACY,eAAO,OAAO,IAAI;AAAA,MACrB;AAAA,MACD,IAAI,QAAQ,MAAM,OAAO;AACrB,YAAI,SAAS,WAAW;AACpB,wBAAc,KAAK;AAAA,QACnC,OACiB;AACD,iBAAO,IAAI,IAAI;AAAA,QAC/B;AACY,eAAO;AAAA,MACV;AAAA,IACT,CAAK,GAAG,CAAC,UAAU,CAAC;AAChB,WAAO,EAAE,UAAU,YAAY,cAAe;AAAA,EAClD;AAAA;AAIK,MAAC,gBAAgB,CAAC,OAAO,QAAQ;AAMlC,MAAI,QAAQ,cAAc;AACtB,WAAO;AAAA,MACH,OAAO,MAAM,cAAc,CAAC,EAAE;AAAA,MAC9B,QAAQ,MAAM,cAAc,CAAC,EAAE;AAAA,IAClC;AAAA,EACT;AACI,MAAI,QAAQ,eAAe;AACvB,WAAO;AAAA,MACH,OAAO,MAAM,eAAe,CAAC,EAAE;AAAA,MAC/B,QAAQ,MAAM,eAAe,CAAC,EAAE;AAAA,IACnC;AAAA,EACT;AACI,SAAO;AAAA,IACH,OAAO,MAAM,YAAY;AAAA,IACzB,QAAQ,MAAM,YAAY;AAAA,EAC7B;AACL;","x_google_ignoreList":[0]}
|
package/dist/harmony126.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const accessMarketingProjects = require("./
|
|
4
|
-
const deleteProjects = require("./
|
|
5
|
-
const manageContributors = require("./
|
|
6
|
-
const canDownloadFiles = require("./
|
|
7
|
-
const canUploadFiles = require("./
|
|
8
|
-
const createProjects = require("./
|
|
3
|
+
const accessMarketingProjects = require("./harmony148.cjs");
|
|
4
|
+
const deleteProjects = require("./harmony149.cjs");
|
|
5
|
+
const manageContributors = require("./harmony150.cjs");
|
|
6
|
+
const canDownloadFiles = require("./harmony151.cjs");
|
|
7
|
+
const canUploadFiles = require("./harmony152.cjs");
|
|
8
|
+
const createProjects = require("./harmony153.cjs");
|
|
9
9
|
const actionResolvers = {
|
|
10
10
|
accessMarketingProjects: accessMarketingProjects.accessMarketingProjects,
|
|
11
11
|
canDownloadFiles: canDownloadFiles.canDownloadFiles,
|
package/dist/harmony126.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { accessMarketingProjects } from "./
|
|
2
|
-
import { deleteProjects } from "./
|
|
3
|
-
import { manageContributors } from "./
|
|
4
|
-
import { canDownloadFiles } from "./
|
|
5
|
-
import { canUploadFiles } from "./
|
|
6
|
-
import { createProjects } from "./
|
|
1
|
+
import { accessMarketingProjects } from "./harmony148.mjs";
|
|
2
|
+
import { deleteProjects } from "./harmony149.mjs";
|
|
3
|
+
import { manageContributors } from "./harmony150.mjs";
|
|
4
|
+
import { canDownloadFiles } from "./harmony151.mjs";
|
|
5
|
+
import { canUploadFiles } from "./harmony152.mjs";
|
|
6
|
+
import { createProjects } from "./harmony153.mjs";
|
|
7
7
|
const actionResolvers = {
|
|
8
8
|
accessMarketingProjects,
|
|
9
9
|
canDownloadFiles,
|
package/dist/harmony127.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const permissions = require("./
|
|
3
|
+
const permissions = require("./harmony147.cjs");
|
|
4
4
|
const getProjectNavigationVisibilityMap = (project, adminRights, isFeatureEnabled) => {
|
|
5
5
|
var _a, _b;
|
|
6
6
|
return {
|
package/dist/harmony127.mjs
CHANGED
package/dist/harmony129.cjs
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const zod = require("zod");
|
|
4
|
+
const teamRoleTypes = require("./harmony86.cjs");
|
|
5
|
+
const JWT_TOKEN_PAYLOAD_SCHEMA = zod.z.object({
|
|
6
|
+
userId: zod.z.number(),
|
|
7
|
+
userUuid: zod.z.string().uuid(),
|
|
8
|
+
teamId: zod.z.number(),
|
|
9
|
+
teamUuid: zod.z.string().uuid(),
|
|
10
|
+
userTeamRole: teamRoleTypes.TEAM_ROLE_SCHEMA,
|
|
11
|
+
userEmail: zod.z.string().email(),
|
|
12
|
+
userName: zod.z.string(),
|
|
13
|
+
userCurrentTeamId: zod.z.number(),
|
|
14
|
+
planId: zod.z.number(),
|
|
15
|
+
planName: zod.z.string(),
|
|
16
|
+
isProviderAlpha: zod.z.boolean(),
|
|
17
|
+
isFullyAuthenticated: zod.z.boolean(),
|
|
18
|
+
isEndOfTrialActive: zod.z.boolean(),
|
|
19
|
+
isTeamSuspended: zod.z.boolean(),
|
|
20
|
+
exp: zod.z.number()
|
|
21
|
+
});
|
|
22
|
+
exports.JWT_TOKEN_PAYLOAD_SCHEMA = JWT_TOKEN_PAYLOAD_SCHEMA;
|
|
12
23
|
//# sourceMappingURL=harmony129.cjs.map
|
package/dist/harmony129.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony129.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"harmony129.cjs","sources":["../src/features/auth/core/types/jwtTokenPayload.ts"],"sourcesContent":["import { z } from 'zod'\nimport { TEAM_ROLE_SCHEMA } from '../../../publicApi/types/teamRoleTypes'\n\nexport const JWT_TOKEN_PAYLOAD_SCHEMA = z.object({\n\tuserId: z.number(),\n\tuserUuid: z.string().uuid(),\n\tteamId: z.number(),\n\tteamUuid: z.string().uuid(),\n\tuserTeamRole: TEAM_ROLE_SCHEMA,\n\tuserEmail: z.string().email(),\n\tuserName: z.string(),\n\tuserCurrentTeamId: z.number(),\n\tplanId: z.number(),\n\tplanName: z.string(),\n\tisProviderAlpha: z.boolean(),\n\tisFullyAuthenticated: z.boolean(),\n\tisEndOfTrialActive: z.boolean(),\n\tisTeamSuspended: z.boolean(),\n\texp: z.number(),\n})\nexport type JwtTokenPayload = z.infer<typeof JWT_TOKEN_PAYLOAD_SCHEMA>\n"],"names":["z","TEAM_ROLE_SCHEMA"],"mappings":";;;;AAGa,MAAA,2BAA2BA,MAAE,OAAO;AAAA,EAChD,QAAQA,MAAE,OAAO;AAAA,EACjB,UAAUA,IAAA,EAAE,OAAO,EAAE,KAAK;AAAA,EAC1B,QAAQA,MAAE,OAAO;AAAA,EACjB,UAAUA,IAAA,EAAE,OAAO,EAAE,KAAK;AAAA,EAC1B,cAAcC,cAAA;AAAA,EACd,WAAWD,IAAA,EAAE,OAAO,EAAE,MAAM;AAAA,EAC5B,UAAUA,MAAE,OAAO;AAAA,EACnB,mBAAmBA,MAAE,OAAO;AAAA,EAC5B,QAAQA,MAAE,OAAO;AAAA,EACjB,UAAUA,MAAE,OAAO;AAAA,EACnB,iBAAiBA,MAAE,QAAQ;AAAA,EAC3B,sBAAsBA,MAAE,QAAQ;AAAA,EAChC,oBAAoBA,MAAE,QAAQ;AAAA,EAC9B,iBAAiBA,MAAE,QAAQ;AAAA,EAC3B,KAAKA,MAAE,OAAO;AACf,CAAC;;"}
|
package/dist/harmony129.mjs
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { TEAM_ROLE_SCHEMA } from "./harmony86.mjs";
|
|
3
|
+
const JWT_TOKEN_PAYLOAD_SCHEMA = z.object({
|
|
4
|
+
userId: z.number(),
|
|
5
|
+
userUuid: z.string().uuid(),
|
|
6
|
+
teamId: z.number(),
|
|
7
|
+
teamUuid: z.string().uuid(),
|
|
8
|
+
userTeamRole: TEAM_ROLE_SCHEMA,
|
|
9
|
+
userEmail: z.string().email(),
|
|
10
|
+
userName: z.string(),
|
|
11
|
+
userCurrentTeamId: z.number(),
|
|
12
|
+
planId: z.number(),
|
|
13
|
+
planName: z.string(),
|
|
14
|
+
isProviderAlpha: z.boolean(),
|
|
15
|
+
isFullyAuthenticated: z.boolean(),
|
|
16
|
+
isEndOfTrialActive: z.boolean(),
|
|
17
|
+
isTeamSuspended: z.boolean(),
|
|
18
|
+
exp: z.number()
|
|
19
|
+
});
|
|
7
20
|
export {
|
|
8
|
-
|
|
9
|
-
styles as default,
|
|
10
|
-
link
|
|
21
|
+
JWT_TOKEN_PAYLOAD_SCHEMA
|
|
11
22
|
};
|
|
12
23
|
//# sourceMappingURL=harmony129.mjs.map
|
package/dist/harmony129.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony129.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"harmony129.mjs","sources":["../src/features/auth/core/types/jwtTokenPayload.ts"],"sourcesContent":["import { z } from 'zod'\nimport { TEAM_ROLE_SCHEMA } from '../../../publicApi/types/teamRoleTypes'\n\nexport const JWT_TOKEN_PAYLOAD_SCHEMA = z.object({\n\tuserId: z.number(),\n\tuserUuid: z.string().uuid(),\n\tteamId: z.number(),\n\tteamUuid: z.string().uuid(),\n\tuserTeamRole: TEAM_ROLE_SCHEMA,\n\tuserEmail: z.string().email(),\n\tuserName: z.string(),\n\tuserCurrentTeamId: z.number(),\n\tplanId: z.number(),\n\tplanName: z.string(),\n\tisProviderAlpha: z.boolean(),\n\tisFullyAuthenticated: z.boolean(),\n\tisEndOfTrialActive: z.boolean(),\n\tisTeamSuspended: z.boolean(),\n\texp: z.number(),\n})\nexport type JwtTokenPayload = z.infer<typeof JWT_TOKEN_PAYLOAD_SCHEMA>\n"],"names":[],"mappings":";;AAGa,MAAA,2BAA2B,EAAE,OAAO;AAAA,EAChD,QAAQ,EAAE,OAAO;AAAA,EACjB,UAAU,EAAE,OAAO,EAAE,KAAK;AAAA,EAC1B,QAAQ,EAAE,OAAO;AAAA,EACjB,UAAU,EAAE,OAAO,EAAE,KAAK;AAAA,EAC1B,cAAc;AAAA,EACd,WAAW,EAAE,OAAO,EAAE,MAAM;AAAA,EAC5B,UAAU,EAAE,OAAO;AAAA,EACnB,mBAAmB,EAAE,OAAO;AAAA,EAC5B,QAAQ,EAAE,OAAO;AAAA,EACjB,UAAU,EAAE,OAAO;AAAA,EACnB,iBAAiB,EAAE,QAAQ;AAAA,EAC3B,sBAAsB,EAAE,QAAQ;AAAA,EAChC,oBAAoB,EAAE,QAAQ;AAAA,EAC9B,iBAAiB,EAAE,QAAQ;AAAA,EAC3B,KAAK,EAAE,OAAO;AACf,CAAC;"}
|
package/dist/harmony130.cjs
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const { jwt } = useSidebar.useSidebar();
|
|
9
|
-
if (!permissions.canChangeBilling(jwt)) {
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
return /* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { href: "/team#billing", children: "Billing" });
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const link = "_link_18vhx_1";
|
|
4
|
+
const active = "_active_18vhx_18";
|
|
5
|
+
const styles = {
|
|
6
|
+
link,
|
|
7
|
+
active
|
|
13
8
|
};
|
|
14
|
-
exports.
|
|
9
|
+
exports.active = active;
|
|
10
|
+
exports.default = styles;
|
|
11
|
+
exports.link = link;
|
|
15
12
|
//# sourceMappingURL=harmony130.cjs.map
|
package/dist/harmony130.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony130.cjs","sources":[
|
|
1
|
+
{"version":3,"file":"harmony130.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
package/dist/harmony130.mjs
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const { jwt } = useSidebar();
|
|
7
|
-
if (!canChangeBilling(jwt)) {
|
|
8
|
-
return null;
|
|
9
|
-
}
|
|
10
|
-
return /* @__PURE__ */ jsx(MenuItem, { href: "/team#billing", children: "Billing" });
|
|
1
|
+
const link = "_link_18vhx_1";
|
|
2
|
+
const active = "_active_18vhx_18";
|
|
3
|
+
const styles = {
|
|
4
|
+
link,
|
|
5
|
+
active
|
|
11
6
|
};
|
|
12
7
|
export {
|
|
13
|
-
|
|
8
|
+
active,
|
|
9
|
+
styles as default,
|
|
10
|
+
link
|
|
14
11
|
};
|
|
15
12
|
//# sourceMappingURL=harmony130.mjs.map
|
package/dist/harmony130.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony130.mjs","sources":[
|
|
1
|
+
{"version":3,"file":"harmony130.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
package/dist/harmony131.cjs
CHANGED
|
@@ -4,15 +4,12 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const useSidebar = require("./harmony112.cjs");
|
|
5
5
|
const louis = require("@lokalise/louis");
|
|
6
6
|
const permissions = require("./harmony113.cjs");
|
|
7
|
-
const
|
|
7
|
+
const BillingMenuItem = () => {
|
|
8
8
|
const { jwt } = useSidebar.useSidebar();
|
|
9
|
-
if (!permissions.
|
|
9
|
+
if (!permissions.canChangeBilling(jwt)) {
|
|
10
10
|
return null;
|
|
11
11
|
}
|
|
12
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
13
|
-
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { onClick: onCreateTeam, children: "Create new team" }),
|
|
14
|
-
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuDivider, {})
|
|
15
|
-
] });
|
|
12
|
+
return /* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { href: "/team#billing", children: "Billing" });
|
|
16
13
|
};
|
|
17
|
-
exports.
|
|
14
|
+
exports.BillingMenuItem = BillingMenuItem;
|
|
18
15
|
//# sourceMappingURL=harmony131.cjs.map
|
package/dist/harmony131.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony131.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/
|
|
1
|
+
{"version":3,"file":"harmony131.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/BillingMenuItem/BillingMenuItem.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuItem } from '@lokalise/louis'\nimport { canChangeBilling } from '@utils/user/permissions'\n\n/**\n * A menu item component for navigating to the billing section.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <BillingMenuItem />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const BillingMenuItem = () => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canChangeBilling(jwt)) {\n\t\treturn null\n\t}\n\n\treturn <MenuItem href=\"/team#billing\">Billing</MenuItem>\n}\n"],"names":["useSidebar","canChangeBilling","jsx","MenuItem"],"mappings":";;;;;;AAiBO,MAAM,kBAAkB,MAAM;AAC9B,QAAA,EAAE,IAAI,IAAIA,sBAAW;AAEvB,MAAA,CAACC,YAAAA,iBAAiB,GAAG,GAAG;AACpB,WAAA;AAAA,EAAA;AAGR,SAAQC,2BAAAA,IAAAC,MAAAA,UAAA,EAAS,MAAK,iBAAgB,UAAO,WAAA;AAC9C;;"}
|
package/dist/harmony131.mjs
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useSidebar } from "./harmony112.mjs";
|
|
3
|
-
import { MenuItem
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
3
|
+
import { MenuItem } from "@lokalise/louis";
|
|
4
|
+
import { canChangeBilling } from "./harmony113.mjs";
|
|
5
|
+
const BillingMenuItem = () => {
|
|
6
6
|
const { jwt } = useSidebar();
|
|
7
|
-
if (!
|
|
7
|
+
if (!canChangeBilling(jwt)) {
|
|
8
8
|
return null;
|
|
9
9
|
}
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */ jsx(MenuItem, { onClick: onCreateTeam, children: "Create new team" }),
|
|
12
|
-
/* @__PURE__ */ jsx(MenuDivider, {})
|
|
13
|
-
] });
|
|
10
|
+
return /* @__PURE__ */ jsx(MenuItem, { href: "/team#billing", children: "Billing" });
|
|
14
11
|
};
|
|
15
12
|
export {
|
|
16
|
-
|
|
13
|
+
BillingMenuItem
|
|
17
14
|
};
|
|
18
15
|
//# sourceMappingURL=harmony131.mjs.map
|
package/dist/harmony131.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony131.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/
|
|
1
|
+
{"version":3,"file":"harmony131.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/BillingMenuItem/BillingMenuItem.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuItem } from '@lokalise/louis'\nimport { canChangeBilling } from '@utils/user/permissions'\n\n/**\n * A menu item component for navigating to the billing section.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <BillingMenuItem />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const BillingMenuItem = () => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canChangeBilling(jwt)) {\n\t\treturn null\n\t}\n\n\treturn <MenuItem href=\"/team#billing\">Billing</MenuItem>\n}\n"],"names":[],"mappings":";;;;AAiBO,MAAM,kBAAkB,MAAM;AAC9B,QAAA,EAAE,IAAI,IAAI,WAAW;AAEvB,MAAA,CAAC,iBAAiB,GAAG,GAAG;AACpB,WAAA;AAAA,EAAA;AAGR,SAAQ,oBAAA,UAAA,EAAS,MAAK,iBAAgB,UAAO,WAAA;AAC9C;"}
|
package/dist/harmony132.cjs
CHANGED
|
@@ -4,19 +4,15 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const useSidebar = require("./harmony112.cjs");
|
|
5
5
|
const louis = require("@lokalise/louis");
|
|
6
6
|
const permissions = require("./harmony113.cjs");
|
|
7
|
-
const
|
|
8
|
-
const CreateNewTeamPlaceholder = ({ onClick }) => {
|
|
7
|
+
const CreateNewTeam = ({ onCreateTeam }) => {
|
|
9
8
|
const { jwt } = useSidebar.useSidebar();
|
|
10
9
|
if (!permissions.canCreateTeam(jwt)) {
|
|
11
10
|
return null;
|
|
12
11
|
}
|
|
13
12
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
14
|
-
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { onClick
|
|
15
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: CreateNewTeamPlaceholder_module.default.mainLabel, children: "Create new team" }),
|
|
16
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: CreateNewTeamPlaceholder_module.default.subLabel, children: "Switch to Expert to create a new team" })
|
|
17
|
-
] }) }),
|
|
13
|
+
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { onClick: onCreateTeam, children: "Create new team" }),
|
|
18
14
|
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuDivider, {})
|
|
19
15
|
] });
|
|
20
16
|
};
|
|
21
|
-
exports.
|
|
17
|
+
exports.CreateNewTeam = CreateNewTeam;
|
|
22
18
|
//# sourceMappingURL=harmony132.cjs.map
|
package/dist/harmony132.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony132.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/
|
|
1
|
+
{"version":3,"file":"harmony132.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeam/CreateNewTeam.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuDivider, MenuItem } from '@lokalise/louis'\nimport { canCreateTeam } from '@utils/user/permissions'\n\ntype CreateNewTeamProps = {\n\tonCreateTeam: () => void\n}\n\n/**\n * A menu item component for creating a new team.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <CreateNewTeam onCreateTeam={handleCreateTeam} />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const CreateNewTeam = ({ onCreateTeam }: CreateNewTeamProps) => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canCreateTeam(jwt)) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem onClick={onCreateTeam}>Create new team</MenuItem>\n\t\t\t<MenuDivider />\n\t\t</>\n\t)\n}\n"],"names":["useSidebar","canCreateTeam","jsxs","Fragment","jsx","MenuItem","MenuDivider"],"mappings":";;;;;;AAqBO,MAAM,gBAAgB,CAAC,EAAE,mBAAuC;AAChE,QAAA,EAAE,IAAI,IAAIA,sBAAW;AAEvB,MAAA,CAACC,YAAAA,cAAc,GAAG,GAAG;AACjB,WAAA;AAAA,EAAA;AAGR,SAEEC,2BAAA,KAAAC,qBAAA,EAAA,UAAA;AAAA,IAACC,2BAAA,IAAAC,MAAA,UAAA,EAAS,SAAS,cAAc,UAAe,mBAAA;AAAA,mCAC/CC,MAAY,aAAA,CAAA,CAAA;AAAA,EAAA,GACd;AAEF;;"}
|
package/dist/harmony132.mjs
CHANGED
|
@@ -2,21 +2,17 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useSidebar } from "./harmony112.mjs";
|
|
3
3
|
import { MenuItem, MenuDivider } from "@lokalise/louis";
|
|
4
4
|
import { canCreateTeam } from "./harmony113.mjs";
|
|
5
|
-
|
|
6
|
-
const CreateNewTeamPlaceholder = ({ onClick }) => {
|
|
5
|
+
const CreateNewTeam = ({ onCreateTeam }) => {
|
|
7
6
|
const { jwt } = useSidebar();
|
|
8
7
|
if (!canCreateTeam(jwt)) {
|
|
9
8
|
return null;
|
|
10
9
|
}
|
|
11
10
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12
|
-
/* @__PURE__ */ jsx(MenuItem, { onClick
|
|
13
|
-
/* @__PURE__ */ jsx("span", { className: styles.mainLabel, children: "Create new team" }),
|
|
14
|
-
/* @__PURE__ */ jsx("span", { className: styles.subLabel, children: "Switch to Expert to create a new team" })
|
|
15
|
-
] }) }),
|
|
11
|
+
/* @__PURE__ */ jsx(MenuItem, { onClick: onCreateTeam, children: "Create new team" }),
|
|
16
12
|
/* @__PURE__ */ jsx(MenuDivider, {})
|
|
17
13
|
] });
|
|
18
14
|
};
|
|
19
15
|
export {
|
|
20
|
-
|
|
16
|
+
CreateNewTeam
|
|
21
17
|
};
|
|
22
18
|
//# sourceMappingURL=harmony132.mjs.map
|
package/dist/harmony132.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony132.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/
|
|
1
|
+
{"version":3,"file":"harmony132.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeam/CreateNewTeam.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuDivider, MenuItem } from '@lokalise/louis'\nimport { canCreateTeam } from '@utils/user/permissions'\n\ntype CreateNewTeamProps = {\n\tonCreateTeam: () => void\n}\n\n/**\n * A menu item component for creating a new team.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <CreateNewTeam onCreateTeam={handleCreateTeam} />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const CreateNewTeam = ({ onCreateTeam }: CreateNewTeamProps) => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canCreateTeam(jwt)) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem onClick={onCreateTeam}>Create new team</MenuItem>\n\t\t\t<MenuDivider />\n\t\t</>\n\t)\n}\n"],"names":[],"mappings":";;;;AAqBO,MAAM,gBAAgB,CAAC,EAAE,mBAAuC;AAChE,QAAA,EAAE,IAAI,IAAI,WAAW;AAEvB,MAAA,CAAC,cAAc,GAAG,GAAG;AACjB,WAAA;AAAA,EAAA;AAGR,SAEE,qBAAA,UAAA,EAAA,UAAA;AAAA,IAAC,oBAAA,UAAA,EAAS,SAAS,cAAc,UAAe,mBAAA;AAAA,wBAC/C,aAAY,CAAA,CAAA;AAAA,EAAA,GACd;AAEF;"}
|
package/dist/harmony133.cjs
CHANGED
|
@@ -1,13 +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 useSidebar = require("./harmony112.cjs");
|
|
4
5
|
const louis = require("@lokalise/louis");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
const permissions = require("./harmony113.cjs");
|
|
7
|
+
const CreateNewTeamPlaceholder_module = require("./harmony154.cjs");
|
|
8
|
+
const CreateNewTeamPlaceholder = ({ onClick }) => {
|
|
9
|
+
const { jwt } = useSidebar.useSidebar();
|
|
10
|
+
if (!permissions.canCreateTeam(jwt)) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
14
|
+
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { onClick, "data-testid": "sidebar-create-new-team-placeholder", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
15
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: CreateNewTeamPlaceholder_module.default.mainLabel, children: "Create new team" }),
|
|
16
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: CreateNewTeamPlaceholder_module.default.subLabel, children: "Switch to Expert to create a new team" })
|
|
17
|
+
] }) }),
|
|
18
|
+
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuDivider, {})
|
|
19
|
+
] });
|
|
11
20
|
};
|
|
12
|
-
exports.
|
|
21
|
+
exports.CreateNewTeamPlaceholder = CreateNewTeamPlaceholder;
|
|
13
22
|
//# sourceMappingURL=harmony133.cjs.map
|
package/dist/harmony133.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony133.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/
|
|
1
|
+
{"version":3,"file":"harmony133.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeamPlaceholder/CreateNewTeamPlaceholder.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuDivider, MenuItem } from '@lokalise/louis'\nimport { canCreateTeam } from '@utils/user/permissions'\nimport styles from './CreateNewTeamPlaceholder.module.css'\n\ntype CreateNewTeamPlaceholderProps = {\n\tonClick: () => void\n}\n\n/**\n * A placeholder menu item for creating a new team.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <CreateNewTeamPlaceholder onClick={handleCreateTeam} />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const CreateNewTeamPlaceholder = ({ onClick }: CreateNewTeamPlaceholderProps) => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canCreateTeam(jwt)) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem onClick={onClick} data-testid=\"sidebar-create-new-team-placeholder\">\n\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t<span className={styles.mainLabel}>Create new team</span>\n\t\t\t\t\t<span className={styles.subLabel}>Switch to Expert to create a new team</span>\n\t\t\t\t</div>\n\t\t\t</MenuItem>\n\t\t\t<MenuDivider />\n\t\t</>\n\t)\n}\n"],"names":["useSidebar","canCreateTeam","jsxs","Fragment","jsx","MenuItem","styles","MenuDivider"],"mappings":";;;;;;;AAsBO,MAAM,2BAA2B,CAAC,EAAE,cAA6C;AACjF,QAAA,EAAE,IAAI,IAAIA,sBAAW;AAEvB,MAAA,CAACC,YAAAA,cAAc,GAAG,GAAG;AACjB,WAAA;AAAA,EAAA;AAGR,SAEEC,2BAAA,KAAAC,qBAAA,EAAA,UAAA;AAAA,IAAAC,2BAAAA,IAACC,kBAAS,SAAkB,eAAY,uCACvC,UAACH,2BAAAA,KAAA,OAAA,EAAI,WAAU,iBACd,UAAA;AAAA,MAAAE,2BAAA,IAAC,QAAK,EAAA,WAAWE,gCAAO,QAAA,WAAW,UAAe,mBAAA;AAAA,MACjDF,2BAAA,IAAA,QAAA,EAAK,WAAWE,gCAAA,QAAO,UAAU,UAAqC,wCAAA,CAAA;AAAA,IAAA,EAAA,CACxE,EACD,CAAA;AAAA,mCACCC,MAAY,aAAA,CAAA,CAAA;AAAA,EAAA,GACd;AAEF;;"}
|
package/dist/harmony133.mjs
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useSidebar } from "./harmony112.mjs";
|
|
3
|
+
import { MenuItem, MenuDivider } from "@lokalise/louis";
|
|
4
|
+
import { canCreateTeam } from "./harmony113.mjs";
|
|
5
|
+
import styles from "./harmony154.mjs";
|
|
6
|
+
const CreateNewTeamPlaceholder = ({ onClick }) => {
|
|
7
|
+
const { jwt } = useSidebar();
|
|
8
|
+
if (!canCreateTeam(jwt)) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12
|
+
/* @__PURE__ */ jsx(MenuItem, { onClick, "data-testid": "sidebar-create-new-team-placeholder", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
13
|
+
/* @__PURE__ */ jsx("span", { className: styles.mainLabel, children: "Create new team" }),
|
|
14
|
+
/* @__PURE__ */ jsx("span", { className: styles.subLabel, children: "Switch to Expert to create a new team" })
|
|
15
|
+
] }) }),
|
|
16
|
+
/* @__PURE__ */ jsx(MenuDivider, {})
|
|
17
|
+
] });
|
|
9
18
|
};
|
|
10
19
|
export {
|
|
11
|
-
|
|
20
|
+
CreateNewTeamPlaceholder
|
|
12
21
|
};
|
|
13
22
|
//# sourceMappingURL=harmony133.mjs.map
|
package/dist/harmony133.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony133.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/
|
|
1
|
+
{"version":3,"file":"harmony133.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeamPlaceholder/CreateNewTeamPlaceholder.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuDivider, MenuItem } from '@lokalise/louis'\nimport { canCreateTeam } from '@utils/user/permissions'\nimport styles from './CreateNewTeamPlaceholder.module.css'\n\ntype CreateNewTeamPlaceholderProps = {\n\tonClick: () => void\n}\n\n/**\n * A placeholder menu item for creating a new team.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <CreateNewTeamPlaceholder onClick={handleCreateTeam} />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const CreateNewTeamPlaceholder = ({ onClick }: CreateNewTeamPlaceholderProps) => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canCreateTeam(jwt)) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem onClick={onClick} data-testid=\"sidebar-create-new-team-placeholder\">\n\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t<span className={styles.mainLabel}>Create new team</span>\n\t\t\t\t\t<span className={styles.subLabel}>Switch to Expert to create a new team</span>\n\t\t\t\t</div>\n\t\t\t</MenuItem>\n\t\t\t<MenuDivider />\n\t\t</>\n\t)\n}\n"],"names":[],"mappings":";;;;;AAsBO,MAAM,2BAA2B,CAAC,EAAE,cAA6C;AACjF,QAAA,EAAE,IAAI,IAAI,WAAW;AAEvB,MAAA,CAAC,cAAc,GAAG,GAAG;AACjB,WAAA;AAAA,EAAA;AAGR,SAEE,qBAAA,UAAA,EAAA,UAAA;AAAA,IAAA,oBAAC,YAAS,SAAkB,eAAY,uCACvC,UAAC,qBAAA,OAAA,EAAI,WAAU,iBACd,UAAA;AAAA,MAAA,oBAAC,QAAK,EAAA,WAAW,OAAO,WAAW,UAAe,mBAAA;AAAA,MACjD,oBAAA,QAAA,EAAK,WAAW,OAAO,UAAU,UAAqC,wCAAA,CAAA;AAAA,IAAA,EAAA,CACxE,EACD,CAAA;AAAA,wBACC,aAAY,CAAA,CAAA;AAAA,EAAA,GACd;AAEF;"}
|
package/dist/harmony134.cjs
CHANGED
|
@@ -1,29 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const useSidebar = require("./harmony112.cjs");
|
|
5
4
|
const louis = require("@lokalise/louis");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14
|
-
louis.MenuItem,
|
|
15
|
-
{
|
|
16
|
-
"data-testid": "sidebar-profile-settings-menu-item",
|
|
17
|
-
href: "/profile",
|
|
18
|
-
onClick: () => {
|
|
19
|
-
onClick == null ? void 0 : onClick();
|
|
20
|
-
},
|
|
21
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-col ${ProfileSettingsMenuItem_module.default.container}`, children: [
|
|
22
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Profile Settings" }),
|
|
23
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: ProfileSettingsMenuItem_module.default.profileEmail, children: jwt == null ? void 0 : jwt.userEmail })
|
|
24
|
-
] })
|
|
25
|
-
}
|
|
26
|
-
);
|
|
5
|
+
const DarkModeToggle_module = require("./harmony155.cjs");
|
|
6
|
+
const DarkModeToggle = ({ onToggle, isDarkMode }) => {
|
|
7
|
+
return /* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { onClick: onToggle, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-row justify-between gap-1 ${DarkModeToggle_module.default.switchContainer}`, children: [
|
|
8
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Dark mode" }),
|
|
9
|
+
/* @__PURE__ */ jsxRuntime.jsx(louis.Switch, { defaultChecked: isDarkMode, "aria-label": "Toggle dark mode" })
|
|
10
|
+
] }) });
|
|
27
11
|
};
|
|
28
|
-
exports.
|
|
12
|
+
exports.DarkModeToggle = DarkModeToggle;
|
|
29
13
|
//# sourceMappingURL=harmony134.cjs.map
|
package/dist/harmony134.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony134.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/
|
|
1
|
+
{"version":3,"file":"harmony134.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/DarkModeToggle/DarkModeToggle.tsx"],"sourcesContent":["import { MenuItem, Switch } from '@lokalise/louis'\nimport styles from './DarkModeToggle.module.css'\n\ntype DarkModeToggleProps = {\n\tonToggle: () => void\n\tisDarkMode: boolean\n}\n\n/**\n * A menu item component for toggling dark mode.\n * Displays a switch and label, and calls the provided onToggle handler when clicked.\n *\n * @example\n * ```\n * <DarkModeToggle\n * isDarkMode={isDarkMode}\n * onToggle={handleToggleDarkMode}\n * />\n * ```\n */\n\nexport const DarkModeToggle = ({ onToggle, isDarkMode }: DarkModeToggleProps) => {\n\treturn (\n\t\t<MenuItem onClick={onToggle}>\n\t\t\t<div className={`flex-row justify-between gap-1 ${styles.switchContainer}`}>\n\t\t\t\t<span>Dark mode</span>\n\t\t\t\t<Switch defaultChecked={isDarkMode} aria-label=\"Toggle dark mode\" />\n\t\t\t</div>\n\t\t</MenuItem>\n\t)\n}\n"],"names":["jsx","MenuItem","jsxs","styles","Switch"],"mappings":";;;;;AAqBO,MAAM,iBAAiB,CAAC,EAAE,UAAU,iBAAsC;AAE/E,SAAAA,2BAAAA,IAACC,MAAAA,UAAS,EAAA,SAAS,UAClB,UAAAC,2BAAA,KAAC,SAAI,WAAW,kCAAkCC,sBAAO,QAAA,eAAe,IACvE,UAAA;AAAA,IAAAH,2BAAAA,IAAC,UAAK,UAAS,YAAA,CAAA;AAAA,IACdA,2BAAA,IAAAI,MAAA,QAAA,EAAO,gBAAgB,YAAY,cAAW,mBAAmB,CAAA;AAAA,EAAA,EAAA,CACnE,EACD,CAAA;AAEF;;"}
|
package/dist/harmony134.mjs
CHANGED
|
@@ -1,29 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
return /* @__PURE__ */ jsx(
|
|
12
|
-
MenuItem,
|
|
13
|
-
{
|
|
14
|
-
"data-testid": "sidebar-profile-settings-menu-item",
|
|
15
|
-
href: "/profile",
|
|
16
|
-
onClick: () => {
|
|
17
|
-
onClick == null ? void 0 : onClick();
|
|
18
|
-
},
|
|
19
|
-
children: /* @__PURE__ */ jsxs("div", { className: `flex-col ${styles.container}`, children: [
|
|
20
|
-
/* @__PURE__ */ jsx("span", { children: "Profile Settings" }),
|
|
21
|
-
/* @__PURE__ */ jsx("span", { className: styles.profileEmail, children: jwt == null ? void 0 : jwt.userEmail })
|
|
22
|
-
] })
|
|
23
|
-
}
|
|
24
|
-
);
|
|
2
|
+
import { MenuItem, Switch } from "@lokalise/louis";
|
|
3
|
+
import styles from "./harmony155.mjs";
|
|
4
|
+
const DarkModeToggle = ({ onToggle, isDarkMode }) => {
|
|
5
|
+
return /* @__PURE__ */ jsx(MenuItem, { onClick: onToggle, children: /* @__PURE__ */ jsxs("div", { className: `flex-row justify-between gap-1 ${styles.switchContainer}`, children: [
|
|
6
|
+
/* @__PURE__ */ jsx("span", { children: "Dark mode" }),
|
|
7
|
+
/* @__PURE__ */ jsx(Switch, { defaultChecked: isDarkMode, "aria-label": "Toggle dark mode" })
|
|
8
|
+
] }) });
|
|
25
9
|
};
|
|
26
10
|
export {
|
|
27
|
-
|
|
11
|
+
DarkModeToggle
|
|
28
12
|
};
|
|
29
13
|
//# sourceMappingURL=harmony134.mjs.map
|
package/dist/harmony134.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony134.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/
|
|
1
|
+
{"version":3,"file":"harmony134.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/DarkModeToggle/DarkModeToggle.tsx"],"sourcesContent":["import { MenuItem, Switch } from '@lokalise/louis'\nimport styles from './DarkModeToggle.module.css'\n\ntype DarkModeToggleProps = {\n\tonToggle: () => void\n\tisDarkMode: boolean\n}\n\n/**\n * A menu item component for toggling dark mode.\n * Displays a switch and label, and calls the provided onToggle handler when clicked.\n *\n * @example\n * ```\n * <DarkModeToggle\n * isDarkMode={isDarkMode}\n * onToggle={handleToggleDarkMode}\n * />\n * ```\n */\n\nexport const DarkModeToggle = ({ onToggle, isDarkMode }: DarkModeToggleProps) => {\n\treturn (\n\t\t<MenuItem onClick={onToggle}>\n\t\t\t<div className={`flex-row justify-between gap-1 ${styles.switchContainer}`}>\n\t\t\t\t<span>Dark mode</span>\n\t\t\t\t<Switch defaultChecked={isDarkMode} aria-label=\"Toggle dark mode\" />\n\t\t\t</div>\n\t\t</MenuItem>\n\t)\n}\n"],"names":[],"mappings":";;;AAqBO,MAAM,iBAAiB,CAAC,EAAE,UAAU,iBAAsC;AAE/E,SAAA,oBAAC,UAAS,EAAA,SAAS,UAClB,UAAA,qBAAC,SAAI,WAAW,kCAAkC,OAAO,eAAe,IACvE,UAAA;AAAA,IAAA,oBAAC,UAAK,UAAS,YAAA,CAAA;AAAA,IACd,oBAAA,QAAA,EAAO,gBAAgB,YAAY,cAAW,mBAAmB,CAAA;AAAA,EAAA,EAAA,CACnE,EACD,CAAA;AAEF;"}
|