@lokalise/harmony 2.1.0-exp-testingContracts.4 → 2.1.0-exp-testingContracts.6
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 +1 -0
- package/dist/harmony.cjs.map +1 -1
- package/dist/harmony.mjs +2 -1
- package/dist/harmony103.cjs +1 -1
- package/dist/harmony103.mjs +1 -1
- package/dist/harmony104.cjs +7 -7
- package/dist/harmony104.mjs +7 -7
- package/dist/harmony107.cjs +1 -1
- package/dist/harmony107.mjs +1 -1
- package/dist/harmony108.cjs +1 -1
- package/dist/harmony108.mjs +1 -1
- package/dist/harmony109.cjs +11 -3
- package/dist/harmony109.cjs.map +1 -1
- package/dist/harmony109.mjs +11 -3
- package/dist/harmony109.mjs.map +1 -1
- package/dist/harmony110.cjs +21 -18
- package/dist/harmony110.cjs.map +1 -1
- package/dist/harmony110.mjs +20 -17
- package/dist/harmony110.mjs.map +1 -1
- package/dist/harmony111.cjs +13 -75
- package/dist/harmony111.cjs.map +1 -1
- package/dist/harmony111.mjs +13 -75
- package/dist/harmony111.mjs.map +1 -1
- package/dist/harmony112.cjs +2 -11
- package/dist/harmony112.cjs.map +1 -1
- package/dist/harmony112.mjs +3 -12
- package/dist/harmony112.mjs.map +1 -1
- package/dist/harmony113.cjs +18 -34
- package/dist/harmony113.cjs.map +1 -1
- package/dist/harmony113.mjs +18 -34
- package/dist/harmony113.mjs.map +1 -1
- package/dist/harmony114.cjs +75 -8
- package/dist/harmony114.cjs.map +1 -1
- package/dist/harmony114.mjs +75 -8
- package/dist/harmony114.mjs.map +1 -1
- package/dist/harmony115.cjs +11 -46
- package/dist/harmony115.cjs.map +1 -1
- package/dist/harmony115.mjs +11 -46
- package/dist/harmony115.mjs.map +1 -1
- package/dist/harmony116.cjs +35 -10
- package/dist/harmony116.cjs.map +1 -1
- package/dist/harmony116.mjs +34 -9
- package/dist/harmony116.mjs.map +1 -1
- package/dist/harmony117.cjs +8 -10
- package/dist/harmony117.cjs.map +1 -1
- package/dist/harmony117.mjs +9 -11
- package/dist/harmony117.mjs.map +1 -1
- package/dist/harmony118.cjs +47 -21
- package/dist/harmony118.cjs.map +1 -1
- package/dist/harmony118.mjs +46 -20
- package/dist/harmony118.mjs.map +1 -1
- package/dist/harmony119.cjs +9 -14
- package/dist/harmony119.cjs.map +1 -1
- package/dist/harmony119.mjs +8 -13
- package/dist/harmony119.mjs.map +1 -1
- package/dist/harmony122.cjs +84 -96
- package/dist/harmony122.cjs.map +1 -1
- package/dist/harmony122.mjs +84 -79
- package/dist/harmony122.mjs.map +1 -1
- package/dist/harmony123.cjs +30 -20
- package/dist/harmony123.cjs.map +1 -1
- package/dist/harmony123.mjs +30 -20
- package/dist/harmony123.mjs.map +1 -1
- package/dist/harmony124.cjs +20 -7
- package/dist/harmony124.cjs.map +1 -1
- package/dist/harmony124.mjs +20 -7
- package/dist/harmony124.mjs.map +1 -1
- package/dist/harmony125.cjs +6 -16
- package/dist/harmony125.cjs.map +1 -1
- package/dist/harmony125.mjs +7 -17
- package/dist/harmony125.mjs.map +1 -1
- package/dist/harmony126.cjs +16 -7
- package/dist/harmony126.cjs.map +1 -1
- package/dist/harmony126.mjs +16 -7
- package/dist/harmony126.mjs.map +1 -1
- package/dist/harmony127.cjs +3 -3
- package/dist/harmony127.cjs.map +1 -1
- package/dist/harmony127.mjs +3 -3
- package/dist/harmony127.mjs.map +1 -1
- package/dist/harmony128.cjs +7 -14
- package/dist/harmony128.cjs.map +1 -1
- package/dist/harmony128.mjs +7 -14
- package/dist/harmony128.mjs.map +1 -1
- package/dist/harmony129.cjs +15 -9
- package/dist/harmony129.cjs.map +1 -1
- package/dist/harmony129.mjs +14 -8
- package/dist/harmony129.mjs.map +1 -1
- package/dist/harmony130.cjs +98 -11
- package/dist/harmony130.cjs.map +1 -1
- package/dist/harmony130.mjs +81 -11
- package/dist/harmony130.mjs.map +1 -1
- package/dist/harmony131.cjs +9 -15
- package/dist/harmony131.cjs.map +1 -1
- package/dist/harmony131.mjs +8 -14
- package/dist/harmony131.mjs.map +1 -1
- package/dist/harmony132.cjs +6 -13
- package/dist/harmony132.cjs.map +1 -1
- package/dist/harmony132.mjs +8 -15
- package/dist/harmony132.mjs.map +1 -1
- package/dist/harmony133.cjs +12 -7
- package/dist/harmony133.cjs.map +1 -1
- package/dist/harmony133.mjs +14 -9
- package/dist/harmony133.mjs.map +1 -1
- package/dist/harmony134.cjs +13 -20
- package/dist/harmony134.cjs.map +1 -1
- package/dist/harmony134.mjs +15 -22
- package/dist/harmony134.mjs.map +1 -1
- package/dist/harmony135.cjs +7 -9
- package/dist/harmony135.cjs.map +1 -1
- package/dist/harmony135.mjs +9 -11
- package/dist/harmony135.mjs.map +1 -1
- package/dist/harmony136.cjs +18 -30
- package/dist/harmony136.cjs.map +1 -1
- package/dist/harmony136.mjs +20 -32
- package/dist/harmony136.mjs.map +1 -1
- package/dist/harmony137.cjs +6 -6
- package/dist/harmony137.cjs.map +1 -1
- package/dist/harmony137.mjs +6 -6
- package/dist/harmony137.mjs.map +1 -1
- package/dist/harmony138.cjs +29 -13
- package/dist/harmony138.cjs.map +1 -1
- package/dist/harmony138.mjs +30 -14
- package/dist/harmony138.mjs.map +1 -1
- package/dist/harmony139.cjs +7 -31
- package/dist/harmony139.cjs.map +1 -1
- package/dist/harmony139.mjs +8 -32
- package/dist/harmony139.mjs.map +1 -1
- package/dist/harmony140.cjs +22 -21
- package/dist/harmony140.cjs.map +1 -1
- package/dist/harmony140.mjs +21 -20
- package/dist/harmony140.mjs.map +1 -1
- package/dist/harmony141.cjs +30 -15
- package/dist/harmony141.cjs.map +1 -1
- package/dist/harmony141.mjs +32 -17
- package/dist/harmony141.mjs.map +1 -1
- package/dist/harmony142.cjs +18 -3
- package/dist/harmony142.cjs.map +1 -1
- package/dist/harmony142.mjs +18 -3
- package/dist/harmony142.mjs.map +1 -1
- package/dist/harmony143.cjs +21 -15
- package/dist/harmony143.cjs.map +1 -1
- package/dist/harmony143.mjs +20 -14
- package/dist/harmony143.mjs.map +1 -1
- package/dist/harmony144.cjs +6 -87
- package/dist/harmony144.cjs.map +1 -1
- package/dist/harmony144.mjs +5 -86
- package/dist/harmony144.mjs.map +1 -1
- package/dist/harmony145.cjs +16 -31
- package/dist/harmony145.cjs.map +1 -1
- package/dist/harmony145.mjs +15 -30
- package/dist/harmony145.mjs.map +1 -1
- package/dist/harmony146.cjs +11 -6
- package/dist/harmony146.cjs.map +1 -1
- package/dist/harmony146.mjs +10 -5
- package/dist/harmony146.mjs.map +1 -1
- package/dist/harmony147.cjs +4 -4
- package/dist/harmony147.mjs +4 -4
- package/dist/harmony148.cjs +6 -4
- package/dist/harmony148.cjs.map +1 -1
- package/dist/harmony148.mjs +5 -3
- package/dist/harmony148.mjs.map +1 -1
- package/dist/harmony149.cjs +3 -3
- package/dist/harmony149.cjs.map +1 -1
- package/dist/harmony149.mjs +3 -3
- 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 +3 -14
- package/dist/harmony151.cjs.map +1 -1
- package/dist/harmony151.mjs +3 -14
- package/dist/harmony151.mjs.map +1 -1
- package/dist/harmony152.cjs +6 -6
- package/dist/harmony152.cjs.map +1 -1
- package/dist/harmony152.mjs +6 -6
- package/dist/harmony152.mjs.map +1 -1
- package/dist/harmony153.cjs +14 -3
- package/dist/harmony153.cjs.map +1 -1
- package/dist/harmony153.mjs +14 -3
- package/dist/harmony153.mjs.map +1 -1
- package/dist/harmony154.cjs +4 -10
- package/dist/harmony154.cjs.map +1 -1
- package/dist/harmony154.mjs +3 -9
- package/dist/harmony154.mjs.map +1 -1
- package/dist/harmony155.cjs +97 -7
- package/dist/harmony155.cjs.map +1 -1
- package/dist/harmony155.mjs +96 -6
- package/dist/harmony155.mjs.map +1 -1
- package/dist/harmony156.cjs +14 -10
- package/dist/harmony156.cjs.map +1 -1
- package/dist/harmony156.mjs +13 -9
- package/dist/harmony156.mjs.map +1 -1
- package/dist/harmony157.cjs +15 -25
- package/dist/harmony157.cjs.map +1 -1
- package/dist/harmony157.mjs +14 -24
- package/dist/harmony157.mjs.map +1 -1
- package/dist/harmony158.cjs +37 -7
- package/dist/harmony158.cjs.map +1 -1
- package/dist/harmony158.mjs +36 -6
- package/dist/harmony158.mjs.map +1 -1
- package/dist/harmony159.cjs +29 -13
- package/dist/harmony159.cjs.map +1 -1
- package/dist/harmony159.mjs +28 -12
- package/dist/harmony159.mjs.map +1 -1
- package/dist/harmony160.cjs +6 -3
- package/dist/harmony160.cjs.map +1 -1
- package/dist/harmony160.mjs +6 -3
- package/dist/harmony160.mjs.map +1 -1
- package/dist/harmony161.cjs +6 -10
- package/dist/harmony161.cjs.map +1 -1
- package/dist/harmony161.mjs +5 -9
- package/dist/harmony161.mjs.map +1 -1
- package/dist/harmony162.cjs +10 -97
- package/dist/harmony162.cjs.map +1 -1
- package/dist/harmony162.mjs +9 -96
- package/dist/harmony162.mjs.map +1 -1
- package/dist/harmony163.cjs +25 -14
- package/dist/harmony163.cjs.map +1 -1
- package/dist/harmony163.mjs +24 -13
- package/dist/harmony163.mjs.map +1 -1
- package/dist/harmony164.cjs +7 -15
- package/dist/harmony164.cjs.map +1 -1
- package/dist/harmony164.mjs +6 -14
- package/dist/harmony164.mjs.map +1 -1
- package/dist/harmony165.cjs +13 -37
- package/dist/harmony165.cjs.map +1 -1
- package/dist/harmony165.mjs +12 -36
- package/dist/harmony165.mjs.map +1 -1
- package/dist/harmony166.cjs +7 -29
- package/dist/harmony166.cjs.map +1 -1
- package/dist/harmony166.mjs +6 -28
- package/dist/harmony166.mjs.map +1 -1
- package/dist/harmony17.cjs +1 -1
- package/dist/harmony17.mjs +1 -1
- package/dist/harmony20.cjs +1 -1
- package/dist/harmony20.mjs +1 -1
- package/dist/harmony28.cjs +1 -1
- package/dist/harmony28.mjs +1 -1
- package/dist/harmony29.cjs +1 -1
- package/dist/harmony29.mjs +1 -1
- package/dist/harmony32.cjs +1 -1
- package/dist/harmony32.mjs +1 -1
- package/dist/harmony33.cjs +1 -1
- package/dist/harmony33.mjs +1 -1
- package/dist/harmony34.cjs +1 -1
- package/dist/harmony34.mjs +1 -1
- package/dist/harmony39.cjs +1 -1
- package/dist/harmony39.mjs +1 -1
- package/dist/harmony40.cjs +1 -1
- package/dist/harmony40.mjs +1 -1
- package/dist/harmony41.cjs +1 -1
- package/dist/harmony41.mjs +1 -1
- package/dist/harmony42.cjs +2 -2
- package/dist/harmony42.mjs +2 -2
- package/dist/harmony43.cjs +2 -2
- package/dist/harmony43.mjs +2 -2
- package/dist/harmony44.cjs +1 -1
- package/dist/harmony44.mjs +1 -1
- package/dist/harmony53.cjs +3 -3
- package/dist/harmony53.cjs.map +1 -1
- package/dist/harmony53.mjs +1 -1
- package/dist/harmony53.mjs.map +1 -1
- package/dist/harmony78.cjs +74 -74
- package/dist/harmony78.cjs.map +1 -1
- package/dist/harmony78.mjs +1 -1
- package/dist/harmony78.mjs.map +1 -1
- package/dist/harmony79.cjs +52 -52
- package/dist/harmony79.cjs.map +1 -1
- package/dist/harmony79.mjs +1 -1
- package/dist/harmony79.mjs.map +1 -1
- package/dist/harmony80.cjs +4 -4
- package/dist/harmony80.cjs.map +1 -1
- package/dist/harmony80.mjs +1 -1
- package/dist/harmony80.mjs.map +1 -1
- package/dist/harmony81.cjs +18 -18
- package/dist/harmony81.cjs.map +1 -1
- package/dist/harmony81.mjs +1 -1
- package/dist/harmony81.mjs.map +1 -1
- package/dist/harmony82.cjs +15 -15
- package/dist/harmony82.cjs.map +1 -1
- package/dist/harmony82.mjs +1 -1
- package/dist/harmony82.mjs.map +1 -1
- package/dist/harmony83.cjs +96 -96
- package/dist/harmony83.cjs.map +1 -1
- package/dist/harmony83.mjs +1 -1
- package/dist/harmony83.mjs.map +1 -1
- package/dist/harmony84.cjs +24 -24
- package/dist/harmony84.cjs.map +1 -1
- package/dist/harmony84.mjs +1 -1
- package/dist/harmony84.mjs.map +1 -1
- package/dist/harmony85.cjs +14 -14
- package/dist/harmony85.cjs.map +1 -1
- package/dist/harmony85.mjs +1 -1
- package/dist/harmony85.mjs.map +1 -1
- package/dist/harmony86.cjs +2 -2
- package/dist/harmony86.cjs.map +1 -1
- package/dist/harmony86.mjs +1 -1
- package/dist/harmony86.mjs.map +1 -1
- package/dist/harmony87.cjs +40 -40
- package/dist/harmony87.cjs.map +1 -1
- package/dist/harmony87.mjs +1 -1
- package/dist/harmony87.mjs.map +1 -1
- package/dist/harmony88.cjs +27 -27
- package/dist/harmony88.cjs.map +1 -1
- package/dist/harmony88.mjs +1 -1
- package/dist/harmony88.mjs.map +1 -1
- package/dist/harmony89.cjs +10 -10
- package/dist/harmony89.cjs.map +1 -1
- package/dist/harmony89.mjs +1 -1
- package/dist/harmony89.mjs.map +1 -1
- package/dist/harmony90.cjs +2 -0
- package/dist/harmony90.cjs.map +1 -1
- package/dist/harmony90.mjs +2 -0
- package/dist/harmony90.mjs.map +1 -1
- package/dist/harmony95.cjs +1 -1
- package/dist/harmony95.mjs +1 -1
- package/dist/harmony97.cjs +2 -2
- package/dist/harmony97.mjs +2 -2
- package/dist/types/src/features/auth/core/types/jwtTokenPayload.d.ts +35 -8
- package/dist/types/src/features/auth/core/types/jwtTokenPayload.fixture.d.ts +1 -1
- package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedProjectContributor.d.ts +3 -3
- package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedUser.d.ts +2 -2
- package/dist/types/src/features/auth/frontend/services/generateTokenFromClassicSession.d.ts +4 -1
- package/dist/types/src/features/auth/frontend/services/refreshExpiredToken.d.ts +4 -1
- package/dist/types/src/features/navigation/hooks/useNavigationQueries.d.ts +48 -48
- package/dist/types/src/features/publicApi/TESTING_CONTRACTS.d.ts +239 -1
- package/dist/types/src/features/publicApi/contributors.d.ts +1072 -5
- package/dist/types/src/features/publicApi/hooks/useAddContributorsMutation.d.ts +7 -7
- package/dist/types/src/features/publicApi/hooks/useAddLanguagesToProjectMutation.d.ts +2 -2
- package/dist/types/src/features/publicApi/hooks/useCreateProjectMutation.d.ts +14 -14
- package/dist/types/src/features/publicApi/hooks/useCreateScoreMutation.d.ts +3 -3
- package/dist/types/src/features/publicApi/hooks/useListProjectsQuery.d.ts +1 -1
- package/dist/types/src/features/publicApi/hooks/useListTeamsQuery.d.ts +1 -1
- package/dist/types/src/features/publicApi/hooks/useRetrieveContributorQuery.d.ts +2 -2
- package/dist/types/src/features/publicApi/hooks/useRetrieveUserPermissions.d.ts +1 -1
- package/dist/types/src/features/publicApi/hooks/useUpdateContributorMutation.d.ts +5 -5
- package/dist/types/src/features/publicApi/hooks/useUpdateProjectMutation.d.ts +13 -13
- package/dist/types/src/features/publicApi/languages.d.ts +368 -3
- package/dist/types/src/features/publicApi/permissionTemplates.d.ts +117 -1
- package/dist/types/src/features/publicApi/projects.d.ts +1965 -6
- package/dist/types/src/features/publicApi/score.d.ts +290 -3
- package/dist/types/src/features/publicApi/team.d.ts +374 -2
- package/dist/types/src/features/publicApi/teamUsers.d.ts +318 -3
- package/dist/types/src/features/publicApi/types/contributorTypes.d.ts +834 -84
- package/dist/types/src/features/publicApi/types/languageTypes.d.ts +212 -22
- package/dist/types/src/features/publicApi/types/paginationTypes.d.ts +8 -2
- package/dist/types/src/features/publicApi/types/permissionTemplateTypes.d.ts +76 -71
- package/dist/types/src/features/publicApi/types/permissionTypes.d.ts +24 -48
- package/dist/types/src/features/publicApi/types/projectTypes.d.ts +1097 -211
- package/dist/types/src/features/publicApi/types/scoreTypes.d.ts +96 -32
- package/dist/types/src/features/publicApi/types/sharedTypes.d.ts +126 -30
- package/dist/types/src/features/publicApi/types/teamRoleTypes.d.ts +2 -7
- package/dist/types/src/features/publicApi/types/teamTypes.d.ts +328 -65
- package/dist/types/src/features/publicApi/types/teamUserTypes.d.ts +208 -91
- package/dist/types/src/features/publicApi/types/userTokenTypes.d.ts +39 -9
- package/dist/types/src/features/publicApi/userToken.d.ts +53 -1
- package/package.json +1 -1
package/dist/harmony127.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony127.cjs","sources":["../src/features/permissions/utils/
|
|
1
|
+
{"version":3,"file":"harmony127.cjs","sources":["../src/features/permissions/utils/hasAny.ts"],"sourcesContent":["export const hasAny = <T extends string>(seed: T | T[] | undefined, ...items: T[]) => {\n\tif (!seed) return false\n\tif (items.length === 0) return false\n\tconst seedArray = Array.isArray(seed) ? seed : [seed]\n\tif (seedArray.length === 0) return false\n\treturn items.some((item) => seedArray.includes(item))\n}\n"],"names":[],"mappings":";;AAAa,MAAA,SAAS,CAAmB,SAA8B,UAAe;AACjF,MAAA,CAAC,KAAa,QAAA;AACd,MAAA,MAAM,WAAW,EAAU,QAAA;AAC/B,QAAM,YAAY,MAAM,QAAQ,IAAI,IAAI,OAAO,CAAC,IAAI;AAChD,MAAA,UAAU,WAAW,EAAU,QAAA;AACnC,SAAO,MAAM,KAAK,CAAC,SAAS,UAAU,SAAS,IAAI,CAAC;AACrD;;"}
|
package/dist/harmony127.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const
|
|
1
|
+
const hasAny = (seed, ...items) => {
|
|
2
2
|
if (!seed) return false;
|
|
3
3
|
if (items.length === 0) return false;
|
|
4
4
|
const seedArray = Array.isArray(seed) ? seed : [seed];
|
|
5
5
|
if (seedArray.length === 0) return false;
|
|
6
|
-
return items.
|
|
6
|
+
return items.some((item) => seedArray.includes(item));
|
|
7
7
|
};
|
|
8
8
|
export {
|
|
9
|
-
|
|
9
|
+
hasAny
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=harmony127.mjs.map
|
package/dist/harmony127.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony127.mjs","sources":["../src/features/permissions/utils/
|
|
1
|
+
{"version":3,"file":"harmony127.mjs","sources":["../src/features/permissions/utils/hasAny.ts"],"sourcesContent":["export const hasAny = <T extends string>(seed: T | T[] | undefined, ...items: T[]) => {\n\tif (!seed) return false\n\tif (items.length === 0) return false\n\tconst seedArray = Array.isArray(seed) ? seed : [seed]\n\tif (seedArray.length === 0) return false\n\treturn items.some((item) => seedArray.includes(item))\n}\n"],"names":[],"mappings":"AAAa,MAAA,SAAS,CAAmB,SAA8B,UAAe;AACjF,MAAA,CAAC,KAAa,QAAA;AACd,MAAA,MAAM,WAAW,EAAU,QAAA;AAC/B,QAAM,YAAY,MAAM,QAAQ,IAAI,IAAI,OAAO,CAAC,IAAI;AAChD,MAAA,UAAU,WAAW,EAAU,QAAA;AACnC,SAAO,MAAM,KAAK,CAAC,SAAS,UAAU,SAAS,IAAI,CAAC;AACrD;"}
|
package/dist/harmony128.cjs
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const actionResolvers = {
|
|
10
|
-
accessMarketingProjects: accessMarketingProjects.accessMarketingProjects,
|
|
11
|
-
canDownloadFiles: canDownloadFiles.canDownloadFiles,
|
|
12
|
-
canUploadFiles: canUploadFiles.canUploadFiles,
|
|
13
|
-
createProjects: createProjects.createProjects,
|
|
14
|
-
deleteProjects: deleteProjects.deleteProjects,
|
|
15
|
-
manageContributors: manageContributors.manageContributors
|
|
3
|
+
const has = (seed, ...items) => {
|
|
4
|
+
if (!seed) return false;
|
|
5
|
+
if (items.length === 0) return false;
|
|
6
|
+
const seedArray = Array.isArray(seed) ? seed : [seed];
|
|
7
|
+
if (seedArray.length === 0) return false;
|
|
8
|
+
return items.every((item) => seedArray.includes(item));
|
|
16
9
|
};
|
|
17
|
-
exports.
|
|
10
|
+
exports.has = has;
|
|
18
11
|
//# sourceMappingURL=harmony128.cjs.map
|
package/dist/harmony128.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony128.cjs","sources":["../src/features/permissions/
|
|
1
|
+
{"version":3,"file":"harmony128.cjs","sources":["../src/features/permissions/utils/has.ts"],"sourcesContent":["export const has = <T extends string>(seed: T | T[] | undefined, ...items: T[]) => {\n\tif (!seed) return false\n\tif (items.length === 0) return false\n\tconst seedArray = Array.isArray(seed) ? seed : [seed]\n\tif (seedArray.length === 0) return false\n\treturn items.every((item) => seedArray.includes(item))\n}\n"],"names":[],"mappings":";;AAAa,MAAA,MAAM,CAAmB,SAA8B,UAAe;AAC9E,MAAA,CAAC,KAAa,QAAA;AACd,MAAA,MAAM,WAAW,EAAU,QAAA;AAC/B,QAAM,YAAY,MAAM,QAAQ,IAAI,IAAI,OAAO,CAAC,IAAI;AAChD,MAAA,UAAU,WAAW,EAAU,QAAA;AACnC,SAAO,MAAM,MAAM,CAAC,SAAS,UAAU,SAAS,IAAI,CAAC;AACtD;;"}
|
package/dist/harmony128.mjs
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const actionResolvers = {
|
|
8
|
-
accessMarketingProjects,
|
|
9
|
-
canDownloadFiles,
|
|
10
|
-
canUploadFiles,
|
|
11
|
-
createProjects,
|
|
12
|
-
deleteProjects,
|
|
13
|
-
manageContributors
|
|
1
|
+
const has = (seed, ...items) => {
|
|
2
|
+
if (!seed) return false;
|
|
3
|
+
if (items.length === 0) return false;
|
|
4
|
+
const seedArray = Array.isArray(seed) ? seed : [seed];
|
|
5
|
+
if (seedArray.length === 0) return false;
|
|
6
|
+
return items.every((item) => seedArray.includes(item));
|
|
14
7
|
};
|
|
15
8
|
export {
|
|
16
|
-
|
|
9
|
+
has
|
|
17
10
|
};
|
|
18
11
|
//# sourceMappingURL=harmony128.mjs.map
|
package/dist/harmony128.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony128.mjs","sources":["../src/features/permissions/
|
|
1
|
+
{"version":3,"file":"harmony128.mjs","sources":["../src/features/permissions/utils/has.ts"],"sourcesContent":["export const has = <T extends string>(seed: T | T[] | undefined, ...items: T[]) => {\n\tif (!seed) return false\n\tif (items.length === 0) return false\n\tconst seedArray = Array.isArray(seed) ? seed : [seed]\n\tif (seedArray.length === 0) return false\n\treturn items.every((item) => seedArray.includes(item))\n}\n"],"names":[],"mappings":"AAAa,MAAA,MAAM,CAAmB,SAA8B,UAAe;AAC9E,MAAA,CAAC,KAAa,QAAA;AACd,MAAA,MAAM,WAAW,EAAU,QAAA;AAC/B,QAAM,YAAY,MAAM,QAAQ,IAAI,IAAI,OAAO,CAAC,IAAI;AAChD,MAAA,UAAU,WAAW,EAAU,QAAA;AACnC,SAAO,MAAM,MAAM,CAAC,SAAS,UAAU,SAAS,IAAI,CAAC;AACtD;"}
|
package/dist/harmony129.cjs
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const accessMarketingProjects = require("./harmony149.cjs");
|
|
4
|
+
const deleteProjects = require("./harmony150.cjs");
|
|
5
|
+
const manageContributors = require("./harmony151.cjs");
|
|
6
|
+
const canDownloadFiles = require("./harmony152.cjs");
|
|
7
|
+
const canUploadFiles = require("./harmony153.cjs");
|
|
8
|
+
const createProjects = require("./harmony154.cjs");
|
|
9
|
+
const actionResolvers = {
|
|
10
|
+
accessMarketingProjects: accessMarketingProjects.accessMarketingProjects,
|
|
11
|
+
canDownloadFiles: canDownloadFiles.canDownloadFiles,
|
|
12
|
+
canUploadFiles: canUploadFiles.canUploadFiles,
|
|
13
|
+
createProjects: createProjects.createProjects,
|
|
14
|
+
deleteProjects: deleteProjects.deleteProjects,
|
|
15
|
+
manageContributors: manageContributors.manageContributors
|
|
8
16
|
};
|
|
9
|
-
exports.
|
|
10
|
-
exports.default = styles;
|
|
11
|
-
exports.link = link;
|
|
17
|
+
exports.actionResolvers = actionResolvers;
|
|
12
18
|
//# 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/permissions/action.ts"],"sourcesContent":["import { accessMarketingProjects } from '@features/permissions/action-resolvers/accessMarketingProjects'\nimport { deleteProjects } from '@features/permissions/action-resolvers/deleteProjects'\nimport { manageContributors } from '@features/permissions/action-resolvers/manageContributors'\nimport { canDownloadFiles } from './action-resolvers/canDownloadFiles'\nimport { canUploadFiles } from './action-resolvers/canUploadFiles'\nimport { createProjects } from './action-resolvers/createProjects'\nimport type { ActionResolver } from './types'\n\nexport const actionResolvers = {\n\taccessMarketingProjects,\n\tcanDownloadFiles,\n\tcanUploadFiles,\n\tcreateProjects,\n\tdeleteProjects,\n\tmanageContributors,\n} satisfies Record<string, ActionResolver>\n\nexport type Action = keyof typeof actionResolvers\n"],"names":["accessMarketingProjects","canDownloadFiles","canUploadFiles","createProjects","deleteProjects","manageContributors"],"mappings":";;;;;;;;AAQO,MAAM,kBAAkB;AAAA,EAAA,yBAC9BA,wBAAA;AAAA,EAAA,kBACAC,iBAAA;AAAA,EAAA,gBACAC,eAAA;AAAA,EAAA,gBACAC,eAAA;AAAA,EAAA,gBACAC,eAAA;AAAA,EACAC,oBAAAA,mBAAAA;AACD;;"}
|
package/dist/harmony129.mjs
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { accessMarketingProjects } from "./harmony149.mjs";
|
|
2
|
+
import { deleteProjects } from "./harmony150.mjs";
|
|
3
|
+
import { manageContributors } from "./harmony151.mjs";
|
|
4
|
+
import { canDownloadFiles } from "./harmony152.mjs";
|
|
5
|
+
import { canUploadFiles } from "./harmony153.mjs";
|
|
6
|
+
import { createProjects } from "./harmony154.mjs";
|
|
7
|
+
const actionResolvers = {
|
|
8
|
+
accessMarketingProjects,
|
|
9
|
+
canDownloadFiles,
|
|
10
|
+
canUploadFiles,
|
|
11
|
+
createProjects,
|
|
12
|
+
deleteProjects,
|
|
13
|
+
manageContributors
|
|
6
14
|
};
|
|
7
15
|
export {
|
|
8
|
-
|
|
9
|
-
styles as default,
|
|
10
|
-
link
|
|
16
|
+
actionResolvers
|
|
11
17
|
};
|
|
12
18
|
//# 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/permissions/action.ts"],"sourcesContent":["import { accessMarketingProjects } from '@features/permissions/action-resolvers/accessMarketingProjects'\nimport { deleteProjects } from '@features/permissions/action-resolvers/deleteProjects'\nimport { manageContributors } from '@features/permissions/action-resolvers/manageContributors'\nimport { canDownloadFiles } from './action-resolvers/canDownloadFiles'\nimport { canUploadFiles } from './action-resolvers/canUploadFiles'\nimport { createProjects } from './action-resolvers/createProjects'\nimport type { ActionResolver } from './types'\n\nexport const actionResolvers = {\n\taccessMarketingProjects,\n\tcanDownloadFiles,\n\tcanUploadFiles,\n\tcreateProjects,\n\tdeleteProjects,\n\tmanageContributors,\n} satisfies Record<string, ActionResolver>\n\nexport type Action = keyof typeof actionResolvers\n"],"names":[],"mappings":";;;;;;AAQO,MAAM,kBAAkB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;"}
|
package/dist/harmony130.cjs
CHANGED
|
@@ -1,15 +1,102 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const debounce = require("./harmony147.cjs");
|
|
5
|
+
const throttle = require("./harmony148.cjs");
|
|
6
|
+
function _interopNamespaceDefault(e) {
|
|
7
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
8
|
+
if (e) {
|
|
9
|
+
for (const k in e) {
|
|
10
|
+
if (k !== "default") {
|
|
11
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: () => e[k]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
n.default = e;
|
|
20
|
+
return Object.freeze(n);
|
|
21
|
+
}
|
|
22
|
+
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
23
|
+
const patchResizeCallback = (resizeCallback, refreshMode, refreshRate, refreshOptions) => {
|
|
24
|
+
switch (refreshMode) {
|
|
25
|
+
case "debounce":
|
|
26
|
+
return debounce.default(resizeCallback, refreshRate, refreshOptions);
|
|
27
|
+
case "throttle":
|
|
28
|
+
return throttle.default(resizeCallback, refreshRate, refreshOptions);
|
|
29
|
+
default:
|
|
30
|
+
return resizeCallback;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const useCallbackRef = (
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
35
|
+
(callback) => {
|
|
36
|
+
const callbackRef = React__namespace.useRef(callback);
|
|
37
|
+
React__namespace.useEffect(() => {
|
|
38
|
+
callbackRef.current = callback;
|
|
39
|
+
});
|
|
40
|
+
return React__namespace.useMemo(() => (...args) => {
|
|
41
|
+
var _a;
|
|
42
|
+
return (_a = callbackRef.current) === null || _a === void 0 ? void 0 : _a.call(callbackRef, ...args);
|
|
43
|
+
}, []);
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
const useRefProxy = (
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
|
+
(targetRef) => {
|
|
49
|
+
const [refElement, setRefElement] = React__namespace.useState((targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) || null);
|
|
50
|
+
if (targetRef) {
|
|
51
|
+
setTimeout(() => {
|
|
52
|
+
if (targetRef.current !== refElement) {
|
|
53
|
+
setRefElement(targetRef.current);
|
|
54
|
+
}
|
|
55
|
+
}, 0);
|
|
56
|
+
}
|
|
57
|
+
const refProxy = React__namespace.useMemo(() => new Proxy((node) => {
|
|
58
|
+
if (node !== refElement) {
|
|
59
|
+
setRefElement(node);
|
|
60
|
+
}
|
|
61
|
+
}, {
|
|
62
|
+
get(target, prop) {
|
|
63
|
+
if (prop === "current") {
|
|
64
|
+
return refElement;
|
|
65
|
+
}
|
|
66
|
+
return target[prop];
|
|
67
|
+
},
|
|
68
|
+
set(target, prop, value) {
|
|
69
|
+
if (prop === "current") {
|
|
70
|
+
setRefElement(value);
|
|
71
|
+
} else {
|
|
72
|
+
target[prop] = value;
|
|
73
|
+
}
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
}), [refElement]);
|
|
77
|
+
return { refProxy, refElement, setRefElement };
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
const getDimensions = (entry, box) => {
|
|
81
|
+
if (box === "border-box") {
|
|
82
|
+
return {
|
|
83
|
+
width: entry.borderBoxSize[0].inlineSize,
|
|
84
|
+
height: entry.borderBoxSize[0].blockSize
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
if (box === "content-box") {
|
|
88
|
+
return {
|
|
89
|
+
width: entry.contentBoxSize[0].inlineSize,
|
|
90
|
+
height: entry.contentBoxSize[0].blockSize
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
width: entry.contentRect.width,
|
|
95
|
+
height: entry.contentRect.height
|
|
96
|
+
};
|
|
13
97
|
};
|
|
14
|
-
exports.
|
|
98
|
+
exports.getDimensions = getDimensions;
|
|
99
|
+
exports.patchResizeCallback = patchResizeCallback;
|
|
100
|
+
exports.useCallbackRef = useCallbackRef;
|
|
101
|
+
exports.useRefProxy = useRefProxy;
|
|
15
102
|
//# 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":["../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":["debounce","throttle","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAOK,MAAC,sBAAsB,CAAC,gBAAgB,aAAa,aAAa,mBAAmB;AACtF,UAAQ,aAAW;AAAA,IACf,KAAK;AACD,aAAOA,iBAAS,gBAAgB,aAAa,cAAc;AAAA,IAC/D,KAAK;AACD,aAAOC,iBAAS,gBAAgB,aAAa,cAAc;AAAA,IAC/D;AACI,aAAO;AAAA,EACnB;AACA;AAKK,MAAC;AAAA;AAAA,EAEN,CAAC,aAAa;AACV,UAAM,cAAcC,iBAAM,OAAO,QAAQ;AACzCA,qBAAM,UAAU,MAAM;AAClB,kBAAY,UAAU;AAAA,IAC9B,CAAK;AACD,WAAOA,iBAAM,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,IAAIA,iBAAM,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,WAAWA,iBAAM,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/harmony130.mjs
CHANGED
|
@@ -1,15 +1,85 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import debounce from "./harmony147.mjs";
|
|
3
|
+
import throttle from "./harmony148.mjs";
|
|
4
|
+
const patchResizeCallback = (resizeCallback, refreshMode, refreshRate, refreshOptions) => {
|
|
5
|
+
switch (refreshMode) {
|
|
6
|
+
case "debounce":
|
|
7
|
+
return debounce(resizeCallback, refreshRate, refreshOptions);
|
|
8
|
+
case "throttle":
|
|
9
|
+
return throttle(resizeCallback, refreshRate, refreshOptions);
|
|
10
|
+
default:
|
|
11
|
+
return resizeCallback;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
const useCallbackRef = (
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
+
(callback) => {
|
|
17
|
+
const callbackRef = React.useRef(callback);
|
|
18
|
+
React.useEffect(() => {
|
|
19
|
+
callbackRef.current = callback;
|
|
20
|
+
});
|
|
21
|
+
return React.useMemo(() => (...args) => {
|
|
22
|
+
var _a;
|
|
23
|
+
return (_a = callbackRef.current) === null || _a === void 0 ? void 0 : _a.call(callbackRef, ...args);
|
|
24
|
+
}, []);
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
const useRefProxy = (
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29
|
+
(targetRef) => {
|
|
30
|
+
const [refElement, setRefElement] = React.useState((targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) || null);
|
|
31
|
+
if (targetRef) {
|
|
32
|
+
setTimeout(() => {
|
|
33
|
+
if (targetRef.current !== refElement) {
|
|
34
|
+
setRefElement(targetRef.current);
|
|
35
|
+
}
|
|
36
|
+
}, 0);
|
|
37
|
+
}
|
|
38
|
+
const refProxy = React.useMemo(() => new Proxy((node) => {
|
|
39
|
+
if (node !== refElement) {
|
|
40
|
+
setRefElement(node);
|
|
41
|
+
}
|
|
42
|
+
}, {
|
|
43
|
+
get(target, prop) {
|
|
44
|
+
if (prop === "current") {
|
|
45
|
+
return refElement;
|
|
46
|
+
}
|
|
47
|
+
return target[prop];
|
|
48
|
+
},
|
|
49
|
+
set(target, prop, value) {
|
|
50
|
+
if (prop === "current") {
|
|
51
|
+
setRefElement(value);
|
|
52
|
+
} else {
|
|
53
|
+
target[prop] = value;
|
|
54
|
+
}
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
}), [refElement]);
|
|
58
|
+
return { refProxy, refElement, setRefElement };
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
const getDimensions = (entry, box) => {
|
|
62
|
+
if (box === "border-box") {
|
|
63
|
+
return {
|
|
64
|
+
width: entry.borderBoxSize[0].inlineSize,
|
|
65
|
+
height: entry.borderBoxSize[0].blockSize
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
if (box === "content-box") {
|
|
69
|
+
return {
|
|
70
|
+
width: entry.contentBoxSize[0].inlineSize,
|
|
71
|
+
height: entry.contentBoxSize[0].blockSize
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
width: entry.contentRect.width,
|
|
76
|
+
height: entry.contentRect.height
|
|
77
|
+
};
|
|
11
78
|
};
|
|
12
79
|
export {
|
|
13
|
-
|
|
80
|
+
getDimensions,
|
|
81
|
+
patchResizeCallback,
|
|
82
|
+
useCallbackRef,
|
|
83
|
+
useRefProxy
|
|
14
84
|
};
|
|
15
85
|
//# 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":["../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/harmony131.cjs
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const { jwt } = useSidebar.useSidebar();
|
|
9
|
-
if (!permissions.canCreateTeam(jwt)) {
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13
|
-
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { onClick: onCreateTeam, children: "Create new team" }),
|
|
14
|
-
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuDivider, {})
|
|
15
|
-
] });
|
|
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
|
|
16
8
|
};
|
|
17
|
-
exports.
|
|
9
|
+
exports.active = active;
|
|
10
|
+
exports.default = styles;
|
|
11
|
+
exports.link = link;
|
|
18
12
|
//# sourceMappingURL=harmony131.cjs.map
|
package/dist/harmony131.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony131.cjs","sources":[
|
|
1
|
+
{"version":3,"file":"harmony131.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
package/dist/harmony131.mjs
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const { jwt } = useSidebar();
|
|
7
|
-
if (!canCreateTeam(jwt)) {
|
|
8
|
-
return null;
|
|
9
|
-
}
|
|
10
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11
|
-
/* @__PURE__ */ jsx(MenuItem, { onClick: onCreateTeam, children: "Create new team" }),
|
|
12
|
-
/* @__PURE__ */ jsx(MenuDivider, {})
|
|
13
|
-
] });
|
|
1
|
+
const link = "_link_18vhx_1";
|
|
2
|
+
const active = "_active_18vhx_18";
|
|
3
|
+
const styles = {
|
|
4
|
+
link,
|
|
5
|
+
active
|
|
14
6
|
};
|
|
15
7
|
export {
|
|
16
|
-
|
|
8
|
+
active,
|
|
9
|
+
styles as default,
|
|
10
|
+
link
|
|
17
11
|
};
|
|
18
12
|
//# sourceMappingURL=harmony131.mjs.map
|
package/dist/harmony131.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony131.mjs","sources":[
|
|
1
|
+
{"version":3,"file":"harmony131.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
package/dist/harmony132.cjs
CHANGED
|
@@ -1,22 +1,15 @@
|
|
|
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("./
|
|
4
|
+
const useSidebar = require("./harmony115.cjs");
|
|
5
5
|
const louis = require("@lokalise/louis");
|
|
6
|
-
const permissions = require("./
|
|
7
|
-
const
|
|
8
|
-
const CreateNewTeamPlaceholder = ({ onClick }) => {
|
|
6
|
+
const permissions = require("./harmony116.cjs");
|
|
7
|
+
const BillingMenuItem = () => {
|
|
9
8
|
const { jwt } = useSidebar.useSidebar();
|
|
10
|
-
if (!permissions.
|
|
9
|
+
if (!permissions.canChangeBilling(jwt)) {
|
|
11
10
|
return null;
|
|
12
11
|
}
|
|
13
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
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
|
-
] });
|
|
12
|
+
return /* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { href: "/team#billing", children: "Billing" });
|
|
20
13
|
};
|
|
21
|
-
exports.
|
|
14
|
+
exports.BillingMenuItem = BillingMenuItem;
|
|
22
15
|
//# 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/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/harmony132.mjs
CHANGED
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useSidebar } from "./
|
|
3
|
-
import { MenuItem
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const CreateNewTeamPlaceholder = ({ onClick }) => {
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useSidebar } from "./harmony115.mjs";
|
|
3
|
+
import { MenuItem } from "@lokalise/louis";
|
|
4
|
+
import { canChangeBilling } from "./harmony116.mjs";
|
|
5
|
+
const BillingMenuItem = () => {
|
|
7
6
|
const { jwt } = useSidebar();
|
|
8
|
-
if (!
|
|
7
|
+
if (!canChangeBilling(jwt)) {
|
|
9
8
|
return null;
|
|
10
9
|
}
|
|
11
|
-
return /* @__PURE__ */
|
|
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
|
-
] });
|
|
10
|
+
return /* @__PURE__ */ jsx(MenuItem, { href: "/team#billing", children: "Billing" });
|
|
18
11
|
};
|
|
19
12
|
export {
|
|
20
|
-
|
|
13
|
+
BillingMenuItem
|
|
21
14
|
};
|
|
22
15
|
//# 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/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;"}
|