@lokalise/harmony 2.1.0-exp-testingContracts.4 → 2.1.0-exp-testingContracts.5

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.
Files changed (264) hide show
  1. package/dist/harmony.cjs +1 -0
  2. package/dist/harmony.cjs.map +1 -1
  3. package/dist/harmony.mjs +2 -1
  4. package/dist/harmony103.cjs +1 -1
  5. package/dist/harmony103.mjs +1 -1
  6. package/dist/harmony104.cjs +7 -7
  7. package/dist/harmony104.mjs +7 -7
  8. package/dist/harmony107.cjs +1 -1
  9. package/dist/harmony107.mjs +1 -1
  10. package/dist/harmony108.cjs +1 -1
  11. package/dist/harmony108.mjs +1 -1
  12. package/dist/harmony109.cjs +14 -3
  13. package/dist/harmony109.cjs.map +1 -1
  14. package/dist/harmony109.mjs +14 -3
  15. package/dist/harmony109.mjs.map +1 -1
  16. package/dist/harmony110.cjs +3 -18
  17. package/dist/harmony110.cjs.map +1 -1
  18. package/dist/harmony110.mjs +3 -18
  19. package/dist/harmony110.mjs.map +1 -1
  20. package/dist/harmony111.cjs +12 -70
  21. package/dist/harmony111.cjs.map +1 -1
  22. package/dist/harmony111.mjs +14 -72
  23. package/dist/harmony111.mjs.map +1 -1
  24. package/dist/harmony112.cjs +75 -11
  25. package/dist/harmony112.cjs.map +1 -1
  26. package/dist/harmony112.mjs +75 -11
  27. package/dist/harmony112.mjs.map +1 -1
  28. package/dist/harmony113.cjs +12 -34
  29. package/dist/harmony113.cjs.map +1 -1
  30. package/dist/harmony113.mjs +12 -34
  31. package/dist/harmony113.mjs.map +1 -1
  32. package/dist/harmony114.cjs +34 -9
  33. package/dist/harmony114.cjs.map +1 -1
  34. package/dist/harmony114.mjs +34 -9
  35. package/dist/harmony114.mjs.map +1 -1
  36. package/dist/harmony115.cjs +8 -46
  37. package/dist/harmony115.cjs.map +1 -1
  38. package/dist/harmony115.mjs +9 -47
  39. package/dist/harmony115.mjs.map +1 -1
  40. package/dist/harmony116.cjs +47 -9
  41. package/dist/harmony116.cjs.map +1 -1
  42. package/dist/harmony116.mjs +46 -8
  43. package/dist/harmony116.mjs.map +1 -1
  44. package/dist/harmony117.cjs +10 -12
  45. package/dist/harmony117.cjs.map +1 -1
  46. package/dist/harmony117.mjs +9 -11
  47. package/dist/harmony117.mjs.map +1 -1
  48. package/dist/harmony118.cjs +12 -22
  49. package/dist/harmony118.cjs.map +1 -1
  50. package/dist/harmony118.mjs +11 -21
  51. package/dist/harmony118.mjs.map +1 -1
  52. package/dist/harmony119.cjs +21 -14
  53. package/dist/harmony119.cjs.map +1 -1
  54. package/dist/harmony119.mjs +20 -13
  55. package/dist/harmony119.mjs.map +1 -1
  56. package/dist/harmony122.cjs +2 -2
  57. package/dist/harmony122.mjs +2 -2
  58. package/dist/harmony128.cjs +6 -6
  59. package/dist/harmony128.mjs +6 -6
  60. package/dist/harmony129.cjs +87 -9
  61. package/dist/harmony129.cjs.map +1 -1
  62. package/dist/harmony129.mjs +86 -8
  63. package/dist/harmony129.mjs.map +1 -1
  64. package/dist/harmony130.cjs +29 -11
  65. package/dist/harmony130.cjs.map +1 -1
  66. package/dist/harmony130.mjs +29 -11
  67. package/dist/harmony130.mjs.map +1 -1
  68. package/dist/harmony131.cjs +6 -16
  69. package/dist/harmony131.cjs.map +1 -1
  70. package/dist/harmony131.mjs +5 -15
  71. package/dist/harmony131.mjs.map +1 -1
  72. package/dist/harmony132.cjs +6 -20
  73. package/dist/harmony132.cjs.map +1 -1
  74. package/dist/harmony132.mjs +5 -19
  75. package/dist/harmony132.mjs.map +1 -1
  76. package/dist/harmony133.cjs +9 -10
  77. package/dist/harmony133.cjs.map +1 -1
  78. package/dist/harmony133.mjs +8 -9
  79. package/dist/harmony133.mjs.map +1 -1
  80. package/dist/harmony134.cjs +6 -20
  81. package/dist/harmony134.cjs.map +1 -1
  82. package/dist/harmony134.mjs +7 -21
  83. package/dist/harmony134.mjs.map +1 -1
  84. package/dist/harmony135.cjs +9 -6
  85. package/dist/harmony135.cjs.map +1 -1
  86. package/dist/harmony135.mjs +11 -8
  87. package/dist/harmony135.mjs.map +1 -1
  88. package/dist/harmony136.cjs +14 -33
  89. package/dist/harmony136.cjs.map +1 -1
  90. package/dist/harmony136.mjs +16 -35
  91. package/dist/harmony136.mjs.map +1 -1
  92. package/dist/harmony137.cjs +7 -9
  93. package/dist/harmony137.cjs.map +1 -1
  94. package/dist/harmony137.mjs +9 -11
  95. package/dist/harmony137.mjs.map +1 -1
  96. package/dist/harmony138.cjs +18 -14
  97. package/dist/harmony138.cjs.map +1 -1
  98. package/dist/harmony138.mjs +19 -15
  99. package/dist/harmony138.mjs.map +1 -1
  100. package/dist/harmony139.cjs +7 -31
  101. package/dist/harmony139.cjs.map +1 -1
  102. package/dist/harmony139.mjs +8 -32
  103. package/dist/harmony139.mjs.map +1 -1
  104. package/dist/harmony140.cjs +38 -21
  105. package/dist/harmony140.cjs.map +1 -1
  106. package/dist/harmony140.mjs +37 -20
  107. package/dist/harmony140.mjs.map +1 -1
  108. package/dist/harmony141.cjs +9 -18
  109. package/dist/harmony141.cjs.map +1 -1
  110. package/dist/harmony141.mjs +10 -19
  111. package/dist/harmony141.mjs.map +1 -1
  112. package/dist/harmony142.cjs +22 -6
  113. package/dist/harmony142.cjs.map +1 -1
  114. package/dist/harmony142.mjs +21 -5
  115. package/dist/harmony142.mjs.map +1 -1
  116. package/dist/harmony143.cjs +36 -15
  117. package/dist/harmony143.cjs.map +1 -1
  118. package/dist/harmony143.mjs +35 -14
  119. package/dist/harmony143.mjs.map +1 -1
  120. package/dist/harmony144.cjs +21 -87
  121. package/dist/harmony144.cjs.map +1 -1
  122. package/dist/harmony144.mjs +20 -86
  123. package/dist/harmony144.mjs.map +1 -1
  124. package/dist/harmony145.cjs +21 -30
  125. package/dist/harmony145.cjs.map +1 -1
  126. package/dist/harmony145.mjs +21 -30
  127. package/dist/harmony145.mjs.map +1 -1
  128. package/dist/harmony146.cjs +6 -5
  129. package/dist/harmony146.cjs.map +1 -1
  130. package/dist/harmony146.mjs +6 -5
  131. package/dist/harmony147.cjs +15 -5
  132. package/dist/harmony147.cjs.map +1 -1
  133. package/dist/harmony147.mjs +15 -5
  134. package/dist/harmony147.mjs.map +1 -1
  135. package/dist/harmony148.cjs +10 -3
  136. package/dist/harmony148.cjs.map +1 -1
  137. package/dist/harmony148.mjs +10 -3
  138. package/dist/harmony148.mjs.map +1 -1
  139. package/dist/harmony149.cjs +2 -2
  140. package/dist/harmony149.cjs.map +1 -1
  141. package/dist/harmony149.mjs +2 -2
  142. package/dist/harmony149.mjs.map +1 -1
  143. package/dist/harmony150.cjs +2 -2
  144. package/dist/harmony150.cjs.map +1 -1
  145. package/dist/harmony150.mjs +2 -2
  146. package/dist/harmony150.mjs.map +1 -1
  147. package/dist/harmony151.cjs +2 -13
  148. package/dist/harmony151.cjs.map +1 -1
  149. package/dist/harmony151.mjs +2 -13
  150. package/dist/harmony151.mjs.map +1 -1
  151. package/dist/harmony152.cjs +5 -5
  152. package/dist/harmony152.cjs.map +1 -1
  153. package/dist/harmony152.mjs +5 -5
  154. package/dist/harmony152.mjs.map +1 -1
  155. package/dist/harmony153.cjs +13 -2
  156. package/dist/harmony153.cjs.map +1 -1
  157. package/dist/harmony153.mjs +13 -2
  158. package/dist/harmony153.mjs.map +1 -1
  159. package/dist/harmony154.cjs +4 -10
  160. package/dist/harmony154.cjs.map +1 -1
  161. package/dist/harmony154.mjs +3 -9
  162. package/dist/harmony154.mjs.map +1 -1
  163. package/dist/harmony155.cjs +97 -7
  164. package/dist/harmony155.cjs.map +1 -1
  165. package/dist/harmony155.mjs +96 -6
  166. package/dist/harmony155.mjs.map +1 -1
  167. package/dist/harmony156.cjs +14 -10
  168. package/dist/harmony156.cjs.map +1 -1
  169. package/dist/harmony156.mjs +13 -9
  170. package/dist/harmony156.mjs.map +1 -1
  171. package/dist/harmony157.cjs +15 -25
  172. package/dist/harmony157.cjs.map +1 -1
  173. package/dist/harmony157.mjs +14 -24
  174. package/dist/harmony157.mjs.map +1 -1
  175. package/dist/harmony158.cjs +37 -7
  176. package/dist/harmony158.cjs.map +1 -1
  177. package/dist/harmony158.mjs +36 -6
  178. package/dist/harmony158.mjs.map +1 -1
  179. package/dist/harmony159.cjs +29 -13
  180. package/dist/harmony159.cjs.map +1 -1
  181. package/dist/harmony159.mjs +28 -12
  182. package/dist/harmony159.mjs.map +1 -1
  183. package/dist/harmony160.cjs +6 -3
  184. package/dist/harmony160.cjs.map +1 -1
  185. package/dist/harmony160.mjs +6 -3
  186. package/dist/harmony160.mjs.map +1 -1
  187. package/dist/harmony161.cjs +6 -10
  188. package/dist/harmony161.cjs.map +1 -1
  189. package/dist/harmony161.mjs +5 -9
  190. package/dist/harmony161.mjs.map +1 -1
  191. package/dist/harmony162.cjs +10 -97
  192. package/dist/harmony162.cjs.map +1 -1
  193. package/dist/harmony162.mjs +9 -96
  194. package/dist/harmony162.mjs.map +1 -1
  195. package/dist/harmony163.cjs +25 -14
  196. package/dist/harmony163.cjs.map +1 -1
  197. package/dist/harmony163.mjs +24 -13
  198. package/dist/harmony163.mjs.map +1 -1
  199. package/dist/harmony164.cjs +7 -15
  200. package/dist/harmony164.cjs.map +1 -1
  201. package/dist/harmony164.mjs +6 -14
  202. package/dist/harmony164.mjs.map +1 -1
  203. package/dist/harmony165.cjs +13 -37
  204. package/dist/harmony165.cjs.map +1 -1
  205. package/dist/harmony165.mjs +12 -36
  206. package/dist/harmony165.mjs.map +1 -1
  207. package/dist/harmony166.cjs +7 -29
  208. package/dist/harmony166.cjs.map +1 -1
  209. package/dist/harmony166.mjs +6 -28
  210. package/dist/harmony166.mjs.map +1 -1
  211. package/dist/harmony167.cjs +13 -32
  212. package/dist/harmony167.cjs.map +1 -1
  213. package/dist/harmony167.mjs +13 -32
  214. package/dist/harmony167.mjs.map +1 -1
  215. package/dist/harmony168.cjs +14 -12
  216. package/dist/harmony168.cjs.map +1 -1
  217. package/dist/harmony168.mjs +14 -12
  218. package/dist/harmony168.mjs.map +1 -1
  219. package/dist/harmony169.cjs +14 -13
  220. package/dist/harmony169.cjs.map +1 -1
  221. package/dist/harmony169.mjs +14 -13
  222. package/dist/harmony169.mjs.map +1 -1
  223. package/dist/harmony17.cjs +1 -1
  224. package/dist/harmony17.mjs +1 -1
  225. package/dist/harmony170.cjs +31 -15
  226. package/dist/harmony170.cjs.map +1 -1
  227. package/dist/harmony170.mjs +31 -15
  228. package/dist/harmony170.mjs.map +1 -1
  229. package/dist/harmony171.cjs +1 -1
  230. package/dist/harmony171.mjs +1 -1
  231. package/dist/harmony173.cjs +3 -3
  232. package/dist/harmony173.mjs +3 -3
  233. package/dist/harmony175.cjs +6 -4
  234. package/dist/harmony175.cjs.map +1 -1
  235. package/dist/harmony175.mjs +6 -4
  236. package/dist/harmony175.mjs.map +1 -1
  237. package/dist/harmony176.cjs +11 -5
  238. package/dist/harmony176.cjs.map +1 -1
  239. package/dist/harmony176.mjs +11 -5
  240. package/dist/harmony176.mjs.map +1 -1
  241. package/dist/harmony177.cjs +31 -11
  242. package/dist/harmony177.cjs.map +1 -1
  243. package/dist/harmony177.mjs +31 -11
  244. package/dist/harmony177.mjs.map +1 -1
  245. package/dist/harmony178.cjs +10 -28
  246. package/dist/harmony178.cjs.map +1 -1
  247. package/dist/harmony178.mjs +10 -28
  248. package/dist/harmony178.mjs.map +1 -1
  249. package/dist/harmony179.cjs +4 -14
  250. package/dist/harmony179.cjs.map +1 -1
  251. package/dist/harmony179.mjs +4 -14
  252. package/dist/harmony179.mjs.map +1 -1
  253. package/dist/harmony28.cjs +1 -1
  254. package/dist/harmony28.mjs +1 -1
  255. package/dist/harmony29.cjs +1 -1
  256. package/dist/harmony29.mjs +1 -1
  257. package/dist/harmony90.cjs +2 -0
  258. package/dist/harmony90.cjs.map +1 -1
  259. package/dist/harmony90.mjs +2 -0
  260. package/dist/harmony90.mjs.map +1 -1
  261. package/dist/harmony97.cjs +2 -2
  262. package/dist/harmony97.mjs +2 -2
  263. package/dist/types/src/features/publicApi/TESTING_CONTRACTS.d.ts +1 -0
  264. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"harmony144.mjs","sources":["../src/features/navigation/utils/toolbarVisibility.ts"],"sourcesContent":["import { hasAdminRight, hasAnyAdminRight } from '@features/auth/utils/permissions'\nimport type { Project } from '@features/node'\n\ntype ToolbarVisibility = {\n\tdisabled: boolean\n\tvisible: boolean\n}\n\nexport type ToolbarVisibilityMap = {\n\tupload: ToolbarVisibility\n\tdownload: ToolbarVisibility\n\tapps: ToolbarVisibility\n\tcontentManagement: ToolbarVisibility\n\teditor: ToolbarVisibility\n\tfiles: ToolbarVisibility\n\ttasks: ToolbarVisibility\n\tworkflows: ToolbarVisibility\n\tcontributors: ToolbarVisibility\n\tscreenshots: ToolbarVisibility\n\tglossary: ToolbarVisibility\n\tmore: ToolbarVisibility\n\tsettings: ToolbarVisibility\n\tbranches: ToolbarVisibility\n\totaBundles: ToolbarVisibility\n\tautomations: ToolbarVisibility\n\tduplicateFinder: ToolbarVisibility\n\tactivity: ToolbarVisibility\n\tstatistics: ToolbarVisibility\n}\n\nexport const getProjectNavigationVisibilityMap = (\n\tproject: Project,\n\tadminRights: string[],\n\tisFeatureEnabled: (key: string) => boolean,\n): ToolbarVisibilityMap => ({\n\tupload: {\n\t\tvisible: hasAdminRight(adminRights, 'upload'),\n\t\tdisabled: false,\n\t},\n\tdownload: {\n\t\tvisible: hasAdminRight(adminRights, 'download'),\n\t\tdisabled: false,\n\t},\n\t// TODO: HOME-1009, Clean up after permission management\n\t// -- There is a plan for \"Install apps\" permission. Right..?\n\tapps: {\n\t\tvisible: true,\n\t\tdisabled: false,\n\t},\n\t// TODO: HOME-1009, Clean up after permission management\n\t// -- There is a plan for \"Install apps\" permission. Right..?\n\tcontentManagement: {\n\t\tvisible: project.project_type === 'content_integration' && hasAdminRight(adminRights, 'keys'),\n\t\tdisabled: false,\n\t},\n\teditor: {\n\t\tvisible: true,\n\t\tdisabled: false,\n\t},\n\tfiles: {\n\t\tvisible:\n\t\t\tisFeatureEnabled('lionLfcFilesManagement') &&\n\t\t\tproject.project_type === 'paged_documents' &&\n\t\t\thasAnyAdminRight(adminRights, ['upload', 'download']),\n\t\tdisabled: false,\n\t},\n\ttasks: {\n\t\tvisible: hasAdminRight(adminRights, 'tasks'),\n\t\tdisabled: false,\n\t},\n\tcontributors: {\n\t\tvisible: hasAdminRight(adminRights, 'contributors'),\n\t\tdisabled: false,\n\t},\n\tworkflows: {\n\t\tvisible: hasAdminRight(adminRights, 'settings'),\n\t\tdisabled: false,\n\t},\n\tscreenshots: {\n\t\tvisible: hasAdminRight(adminRights, 'screenshots'),\n\t\tdisabled: false,\n\t},\n\tglossary: {\n\t\tvisible: hasAdminRight(adminRights, 'glossary'),\n\t\tdisabled: false,\n\t},\n\tmore: {\n\t\tvisible: true,\n\t\tdisabled: false,\n\t},\n\tsettings: {\n\t\tvisible: hasAdminRight(adminRights, 'settings'),\n\t\tdisabled: false,\n\t},\n\tbranches: {\n\t\tvisible:\n\t\t\t!!project.settings?.branching &&\n\t\t\thasAnyAdminRight(adminRights, ['branches_create', 'create_branches', 'branches_merge']),\n\t\tdisabled: false,\n\t},\n\totaBundles: {\n\t\tvisible:\n\t\t\thasAnyAdminRight(adminRights, ['download', 'settings', 'keys']) &&\n\t\t\tproject.project_type === 'localization_files',\n\t\tdisabled: false,\n\t},\n\tautomations: {\n\t\tvisible: hasAdminRight(adminRights, 'settings'),\n\t\tdisabled: false,\n\t},\n\tduplicateFinder: {\n\t\tvisible: hasAdminRight(adminRights, 'keys') && project.project_type === 'localization_files',\n\t\tdisabled: false,\n\t},\n\tactivity: {\n\t\tvisible: !!project.settings?.offline_translation || hasAdminRight(adminRights, 'activity'),\n\t\tdisabled: false,\n\t},\n\tstatistics: {\n\t\tvisible: hasAdminRight(adminRights, 'statistics'),\n\t\tdisabled: false,\n\t},\n})\n"],"names":[],"mappings":";AA8BO,MAAM,oCAAoC,CAChD,SACA,aACA,qBAC2B;;AAAA;AAAA,IAC3B,QAAQ;AAAA,MACP,SAAS,cAAc,aAAa,QAAQ;AAAA,MAC5C,UAAU;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACT,SAAS,cAAc,aAAa,UAAU;AAAA,MAC9C,UAAU;AAAA,IACX;AAAA;AAAA;AAAA,IAGA,MAAM;AAAA,MACL,SAAS;AAAA,MACT,UAAU;AAAA,IACX;AAAA;AAAA;AAAA,IAGA,mBAAmB;AAAA,MAClB,SAAS,QAAQ,iBAAiB,yBAAyB,cAAc,aAAa,MAAM;AAAA,MAC5F,UAAU;AAAA,IACX;AAAA,IACA,QAAQ;AAAA,MACP,SAAS;AAAA,MACT,UAAU;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACN,SACC,iBAAiB,wBAAwB,KACzC,QAAQ,iBAAiB,qBACzB,iBAAiB,aAAa,CAAC,UAAU,UAAU,CAAC;AAAA,MACrD,UAAU;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACN,SAAS,cAAc,aAAa,OAAO;AAAA,MAC3C,UAAU;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACb,SAAS,cAAc,aAAa,cAAc;AAAA,MAClD,UAAU;AAAA,IACX;AAAA,IACA,WAAW;AAAA,MACV,SAAS,cAAc,aAAa,UAAU;AAAA,MAC9C,UAAU;AAAA,IACX;AAAA,IACA,aAAa;AAAA,MACZ,SAAS,cAAc,aAAa,aAAa;AAAA,MACjD,UAAU;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACT,SAAS,cAAc,aAAa,UAAU;AAAA,MAC9C,UAAU;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACL,SAAS;AAAA,MACT,UAAU;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACT,SAAS,cAAc,aAAa,UAAU;AAAA,MAC9C,UAAU;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACT,SACC,CAAC,GAAC,aAAQ,aAAR,mBAAkB,cACpB,iBAAiB,aAAa,CAAC,mBAAmB,mBAAmB,gBAAgB,CAAC;AAAA,MACvF,UAAU;AAAA,IACX;AAAA,IACA,YAAY;AAAA,MACX,SACC,iBAAiB,aAAa,CAAC,YAAY,YAAY,MAAM,CAAC,KAC9D,QAAQ,iBAAiB;AAAA,MAC1B,UAAU;AAAA,IACX;AAAA,IACA,aAAa;AAAA,MACZ,SAAS,cAAc,aAAa,UAAU;AAAA,MAC9C,UAAU;AAAA,IACX;AAAA,IACA,iBAAiB;AAAA,MAChB,SAAS,cAAc,aAAa,MAAM,KAAK,QAAQ,iBAAiB;AAAA,MACxE,UAAU;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACT,SAAS,CAAC,GAAC,aAAQ,aAAR,mBAAkB,wBAAuB,cAAc,aAAa,UAAU;AAAA,MACzF,UAAU;AAAA,IACX;AAAA,IACA,YAAY;AAAA,MACX,SAAS,cAAc,aAAa,YAAY;AAAA,MAChD,UAAU;AAAA,IAAA;AAAA,EAEZ;AAAA;"}
1
+ {"version":3,"file":"harmony144.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
@@ -1,33 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const navigationItems = [
4
- {
5
- key: "editor",
6
- labelKey: "Editor",
7
- path: ({ projectId }) => `/project/${projectId}/editor`
8
- },
9
- {
10
- key: "dashboard",
11
- labelKey: "Download",
12
- path: ({ projectId }) => `/project/${projectId}/dashboard`
13
- },
14
- {
15
- key: "contributors",
16
- labelKey: "Contributors",
17
- path: ({ projectId }) => `/project/${projectId}/contributors`
18
- },
19
- {
20
- key: "orders",
21
- labelKey: "Human proofreading",
22
- path: ({ projectId }) => `/project/${projectId}/orders`,
23
- shouldShow: ({ flags }) => flags.ap_feature_hraas === "on"
24
- },
25
- {
26
- key: "billing",
27
- labelKey: "Billing",
28
- path: ({ projectId }) => `/project/${projectId}/billing`,
29
- shouldShow: ({ flags }) => flags.ap_feature_billing === "on"
30
- }
31
- ];
32
- exports.navigationItems = navigationItems;
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const louis = require("@lokalise/louis");
5
+ const clsx = require("./harmony93.cjs");
6
+ const UpgradeIcon_module = require("./harmony166.cjs");
7
+ const UpgradeIcon = ({ className = "" }) => {
8
+ return /* @__PURE__ */ jsxRuntime.jsx(
9
+ "div",
10
+ {
11
+ "aria-label": "Upgrade Icon",
12
+ className: clsx.clsx(
13
+ UpgradeIcon_module.default.iconContainer,
14
+ "flex-row",
15
+ "items-center",
16
+ "justify-center",
17
+ className
18
+ ),
19
+ children: /* @__PURE__ */ jsxRuntime.jsx(louis.CaretUpIcon, {})
20
+ }
21
+ );
22
+ };
23
+ exports.UpgradeIcon = UpgradeIcon;
33
24
  //# sourceMappingURL=harmony145.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony145.cjs","sources":["../src/features/navigation/schemas/navigationSchema.ts"],"sourcesContent":["import type { DropdownItem, NavItemIcon } from '@features/navigation/types/navigation'\n\nexport type NavKey = 'editor' | 'contributors' | 'orders' | 'billing' | 'settings' | 'dashboard'\n\nexport interface NavigationItem {\n\tkey: NavKey\n\tlabelKey: string // TODO: i18n key inside this package\n\tpath: ({ projectId }: { projectId: string }) => string\n\n\ticon?: NavItemIcon\n\tdropdown?: DropdownItem[][]\n\tbadge?: number | ((ctx: NavCtx) => number)\n\n\tshouldShow?: (ctx: NavCtx) => boolean\n\tdisabled?: boolean | ((ctx: NavCtx) => boolean)\n\tisActive?: (pathname: string) => boolean // custom match, else fallback\n}\n\n/** What the gate functions receive */\nexport interface NavCtx {\n\tflags: Record<string, string>\n\tpathname: string\n\tpermissions?: Array<string> // e.g. contributor admin_rights //TODO: Provide type for permissions\n}\n\n// TODO: Handle Translations on harmony side.\nexport const navigationItems: NavigationItem[] = [\n\t{\n\t\tkey: 'editor',\n\t\tlabelKey: 'Editor',\n\t\tpath: ({ projectId }) => `/project/${projectId}/editor`,\n\t},\n\t{\n\t\tkey: 'dashboard',\n\t\tlabelKey: 'Download',\n\t\tpath: ({ projectId }) => `/project/${projectId}/dashboard`,\n\t},\n\t{\n\t\tkey: 'contributors',\n\t\tlabelKey: 'Contributors',\n\t\tpath: ({ projectId }) => `/project/${projectId}/contributors`,\n\t},\n\n\t{\n\t\tkey: 'orders',\n\t\tlabelKey: 'Human proofreading',\n\t\tpath: ({ projectId }) => `/project/${projectId}/orders`,\n\t\tshouldShow: ({ flags }) => flags.ap_feature_hraas === 'on',\n\t},\n\t{\n\t\tkey: 'billing',\n\t\tlabelKey: 'Billing',\n\t\tpath: ({ projectId }) => `/project/${projectId}/billing`,\n\t\tshouldShow: ({ flags }) => flags.ap_feature_billing === 'on',\n\t},\n]\n"],"names":[],"mappings":";;AA0BO,MAAM,kBAAoC;AAAA,EAChD;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,EAC/C;AAAA,EACA;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,EAC/C;AAAA,EACA;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,EAC/C;AAAA,EAEA;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,IAC9C,YAAY,CAAC,EAAE,YAAY,MAAM,qBAAqB;AAAA,EACvD;AAAA,EACA;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,IAC9C,YAAY,CAAC,EAAE,YAAY,MAAM,uBAAuB;AAAA,EAAA;AAE1D;;"}
1
+ {"version":3,"file":"harmony145.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/UpgradeIcon/UpgradeIcon.tsx"],"sourcesContent":["import { CaretUpIcon } from '@lokalise/louis'\nimport clsx from 'clsx'\nimport styles from './UpgradeIcon.module.css'\n\ntype UpgradeIconProps = {\n\tclassName?: string\n}\n\nexport const UpgradeIcon = ({ className = '' }: UpgradeIconProps) => {\n\treturn (\n\t\t<div\n\t\t\taria-label={'Upgrade Icon'}\n\t\t\tclassName={clsx(\n\t\t\t\tstyles.iconContainer,\n\t\t\t\t'flex-row',\n\t\t\t\t'items-center',\n\t\t\t\t'justify-center',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<CaretUpIcon />\n\t\t</div>\n\t)\n}\n"],"names":["jsx","clsx","styles","CaretUpIcon"],"mappings":";;;;;;AAQO,MAAM,cAAc,CAAC,EAAE,YAAY,SAA2B;AAEnE,SAAAA,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,cAAY;AAAA,MACZ,WAAWC,KAAA;AAAA,QACVC,mBAAAA,QAAO;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,MAEA,yCAACC,MAAAA,aAAY,CAAA,CAAA;AAAA,IAAA;AAAA,EACd;AAEF;;"}
@@ -1,33 +1,24 @@
1
- const navigationItems = [
2
- {
3
- key: "editor",
4
- labelKey: "Editor",
5
- path: ({ projectId }) => `/project/${projectId}/editor`
6
- },
7
- {
8
- key: "dashboard",
9
- labelKey: "Download",
10
- path: ({ projectId }) => `/project/${projectId}/dashboard`
11
- },
12
- {
13
- key: "contributors",
14
- labelKey: "Contributors",
15
- path: ({ projectId }) => `/project/${projectId}/contributors`
16
- },
17
- {
18
- key: "orders",
19
- labelKey: "Human proofreading",
20
- path: ({ projectId }) => `/project/${projectId}/orders`,
21
- shouldShow: ({ flags }) => flags.ap_feature_hraas === "on"
22
- },
23
- {
24
- key: "billing",
25
- labelKey: "Billing",
26
- path: ({ projectId }) => `/project/${projectId}/billing`,
27
- shouldShow: ({ flags }) => flags.ap_feature_billing === "on"
28
- }
29
- ];
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { CaretUpIcon } from "@lokalise/louis";
3
+ import { clsx } from "./harmony93.mjs";
4
+ import styles from "./harmony166.mjs";
5
+ const UpgradeIcon = ({ className = "" }) => {
6
+ return /* @__PURE__ */ jsx(
7
+ "div",
8
+ {
9
+ "aria-label": "Upgrade Icon",
10
+ className: clsx(
11
+ styles.iconContainer,
12
+ "flex-row",
13
+ "items-center",
14
+ "justify-center",
15
+ className
16
+ ),
17
+ children: /* @__PURE__ */ jsx(CaretUpIcon, {})
18
+ }
19
+ );
20
+ };
30
21
  export {
31
- navigationItems
22
+ UpgradeIcon
32
23
  };
33
24
  //# sourceMappingURL=harmony145.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony145.mjs","sources":["../src/features/navigation/schemas/navigationSchema.ts"],"sourcesContent":["import type { DropdownItem, NavItemIcon } from '@features/navigation/types/navigation'\n\nexport type NavKey = 'editor' | 'contributors' | 'orders' | 'billing' | 'settings' | 'dashboard'\n\nexport interface NavigationItem {\n\tkey: NavKey\n\tlabelKey: string // TODO: i18n key inside this package\n\tpath: ({ projectId }: { projectId: string }) => string\n\n\ticon?: NavItemIcon\n\tdropdown?: DropdownItem[][]\n\tbadge?: number | ((ctx: NavCtx) => number)\n\n\tshouldShow?: (ctx: NavCtx) => boolean\n\tdisabled?: boolean | ((ctx: NavCtx) => boolean)\n\tisActive?: (pathname: string) => boolean // custom match, else fallback\n}\n\n/** What the gate functions receive */\nexport interface NavCtx {\n\tflags: Record<string, string>\n\tpathname: string\n\tpermissions?: Array<string> // e.g. contributor admin_rights //TODO: Provide type for permissions\n}\n\n// TODO: Handle Translations on harmony side.\nexport const navigationItems: NavigationItem[] = [\n\t{\n\t\tkey: 'editor',\n\t\tlabelKey: 'Editor',\n\t\tpath: ({ projectId }) => `/project/${projectId}/editor`,\n\t},\n\t{\n\t\tkey: 'dashboard',\n\t\tlabelKey: 'Download',\n\t\tpath: ({ projectId }) => `/project/${projectId}/dashboard`,\n\t},\n\t{\n\t\tkey: 'contributors',\n\t\tlabelKey: 'Contributors',\n\t\tpath: ({ projectId }) => `/project/${projectId}/contributors`,\n\t},\n\n\t{\n\t\tkey: 'orders',\n\t\tlabelKey: 'Human proofreading',\n\t\tpath: ({ projectId }) => `/project/${projectId}/orders`,\n\t\tshouldShow: ({ flags }) => flags.ap_feature_hraas === 'on',\n\t},\n\t{\n\t\tkey: 'billing',\n\t\tlabelKey: 'Billing',\n\t\tpath: ({ projectId }) => `/project/${projectId}/billing`,\n\t\tshouldShow: ({ flags }) => flags.ap_feature_billing === 'on',\n\t},\n]\n"],"names":[],"mappings":"AA0BO,MAAM,kBAAoC;AAAA,EAChD;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,EAC/C;AAAA,EACA;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,EAC/C;AAAA,EACA;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,EAC/C;AAAA,EAEA;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,IAC9C,YAAY,CAAC,EAAE,YAAY,MAAM,qBAAqB;AAAA,EACvD;AAAA,EACA;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,IAC9C,YAAY,CAAC,EAAE,YAAY,MAAM,uBAAuB;AAAA,EAAA;AAE1D;"}
1
+ {"version":3,"file":"harmony145.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/UpgradeIcon/UpgradeIcon.tsx"],"sourcesContent":["import { CaretUpIcon } from '@lokalise/louis'\nimport clsx from 'clsx'\nimport styles from './UpgradeIcon.module.css'\n\ntype UpgradeIconProps = {\n\tclassName?: string\n}\n\nexport const UpgradeIcon = ({ className = '' }: UpgradeIconProps) => {\n\treturn (\n\t\t<div\n\t\t\taria-label={'Upgrade Icon'}\n\t\t\tclassName={clsx(\n\t\t\t\tstyles.iconContainer,\n\t\t\t\t'flex-row',\n\t\t\t\t'items-center',\n\t\t\t\t'justify-center',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<CaretUpIcon />\n\t\t</div>\n\t)\n}\n"],"names":[],"mappings":";;;;AAQO,MAAM,cAAc,CAAC,EAAE,YAAY,SAA2B;AAEnE,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,cAAY;AAAA,MACZ,WAAW;AAAA,QACV,OAAO;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,MAEA,8BAAC,aAAY,CAAA,CAAA;AAAA,IAAA;AAAA,EACd;AAEF;"}
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const _commonjsHelpers = require("./harmony176.cjs");
4
- const debounce$1 = require("./harmony162.cjs");
5
- var debounceExports = debounce$1.__require();
6
- const debounce = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(debounceExports);
7
- exports.default = debounce;
3
+ const logoLink = "_logoLink_1baxb_1";
4
+ const styles = {
5
+ logoLink
6
+ };
7
+ exports.default = styles;
8
+ exports.logoLink = logoLink;
8
9
  //# sourceMappingURL=harmony146.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony146.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
1
+ {"version":3,"file":"harmony146.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,8 +1,9 @@
1
- import { getDefaultExportFromCjs } from "./harmony176.mjs";
2
- import { __require as requireDebounce } from "./harmony162.mjs";
3
- var debounceExports = requireDebounce();
4
- const debounce = /* @__PURE__ */ getDefaultExportFromCjs(debounceExports);
1
+ const logoLink = "_logoLink_1baxb_1";
2
+ const styles = {
3
+ logoLink
4
+ };
5
5
  export {
6
- debounce as default
6
+ styles as default,
7
+ logoLink
7
8
  };
8
9
  //# sourceMappingURL=harmony146.mjs.map
@@ -1,8 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const _commonjsHelpers = require("./harmony176.cjs");
4
- const throttle$1 = require("./harmony166.cjs");
5
- var throttleExports = throttle$1.__require();
6
- const throttle = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(throttleExports);
7
- exports.default = throttle;
3
+ const shortcutMenu = "_shortcutMenu_ujdmb_1";
4
+ const shortcutLabel = "_shortcutLabel_ujdmb_5";
5
+ const dropdownButton = "_dropdownButton_ujdmb_12";
6
+ const dropdownButtonActive = "_dropdownButtonActive_ujdmb_30";
7
+ const styles = {
8
+ shortcutMenu,
9
+ shortcutLabel,
10
+ dropdownButton,
11
+ dropdownButtonActive
12
+ };
13
+ exports.default = styles;
14
+ exports.dropdownButton = dropdownButton;
15
+ exports.dropdownButtonActive = dropdownButtonActive;
16
+ exports.shortcutLabel = shortcutLabel;
17
+ exports.shortcutMenu = shortcutMenu;
8
18
  //# sourceMappingURL=harmony147.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony147.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
1
+ {"version":3,"file":"harmony147.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,18 @@
1
- import { getDefaultExportFromCjs } from "./harmony176.mjs";
2
- import { __require as requireThrottle } from "./harmony166.mjs";
3
- var throttleExports = requireThrottle();
4
- const throttle = /* @__PURE__ */ getDefaultExportFromCjs(throttleExports);
1
+ const shortcutMenu = "_shortcutMenu_ujdmb_1";
2
+ const shortcutLabel = "_shortcutLabel_ujdmb_5";
3
+ const dropdownButton = "_dropdownButton_ujdmb_12";
4
+ const dropdownButtonActive = "_dropdownButtonActive_ujdmb_30";
5
+ const styles = {
6
+ shortcutMenu,
7
+ shortcutLabel,
8
+ dropdownButton,
9
+ dropdownButtonActive
10
+ };
5
11
  export {
6
- throttle as default
12
+ styles as default,
13
+ dropdownButton,
14
+ dropdownButtonActive,
15
+ shortcutLabel,
16
+ shortcutMenu
7
17
  };
8
18
  //# sourceMappingURL=harmony147.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony147.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"harmony147.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -1,6 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const has = require("./harmony127.cjs");
4
- const accessMarketingProjects = ({ enabledFeatureFlags }) => has.has(enabledFeatureFlags, "homeMarketingBeta");
5
- exports.accessMarketingProjects = accessMarketingProjects;
3
+ const hasAdminRight = (adminRights, right) => {
4
+ if (!Array.isArray(adminRights)) return false;
5
+ return adminRights.includes(right);
6
+ };
7
+ const hasAnyAdminRight = (adminRights, rights) => {
8
+ if (!Array.isArray(adminRights)) return false;
9
+ return rights.some((right) => adminRights.includes(right));
10
+ };
11
+ exports.hasAdminRight = hasAdminRight;
12
+ exports.hasAnyAdminRight = hasAnyAdminRight;
6
13
  //# sourceMappingURL=harmony148.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony148.cjs","sources":["../src/features/permissions/action-resolvers/accessMarketingProjects.ts"],"sourcesContent":["import type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const accessMarketingProjects: ActionResolver = ({ enabledFeatureFlags }) =>\n\thas(enabledFeatureFlags, 'homeMarketingBeta')\n"],"names":["has"],"mappings":";;;AAGO,MAAM,0BAA0C,CAAC,EAAE,oBACzD,MAAAA,IAAA,IAAI,qBAAqB,mBAAmB;;"}
1
+ {"version":3,"file":"harmony148.cjs","sources":["../src/features/auth/utils/permissions.ts"],"sourcesContent":["// Helper function to check if user has a specific admin right\nexport const hasAdminRight = (adminRights: string[], right: string): boolean => {\n\tif (!Array.isArray(adminRights)) return false\n\treturn adminRights.includes(right)\n}\n\n// Helper function to check if user has any of the specified admin rights\nexport const hasAnyAdminRight = (adminRights: string[], rights: string[]): boolean => {\n\tif (!Array.isArray(adminRights)) return false\n\treturn rights.some((right) => adminRights.includes(right))\n}\n"],"names":[],"mappings":";;AACa,MAAA,gBAAgB,CAAC,aAAuB,UAA2B;AAC/E,MAAI,CAAC,MAAM,QAAQ,WAAW,EAAU,QAAA;AACjC,SAAA,YAAY,SAAS,KAAK;AAClC;AAGa,MAAA,mBAAmB,CAAC,aAAuB,WAA8B;AACrF,MAAI,CAAC,MAAM,QAAQ,WAAW,EAAU,QAAA;AACxC,SAAO,OAAO,KAAK,CAAC,UAAU,YAAY,SAAS,KAAK,CAAC;AAC1D;;;"}
@@ -1,6 +1,13 @@
1
- import { has } from "./harmony127.mjs";
2
- const accessMarketingProjects = ({ enabledFeatureFlags }) => has(enabledFeatureFlags, "homeMarketingBeta");
1
+ const hasAdminRight = (adminRights, right) => {
2
+ if (!Array.isArray(adminRights)) return false;
3
+ return adminRights.includes(right);
4
+ };
5
+ const hasAnyAdminRight = (adminRights, rights) => {
6
+ if (!Array.isArray(adminRights)) return false;
7
+ return rights.some((right) => adminRights.includes(right));
8
+ };
3
9
  export {
4
- accessMarketingProjects
10
+ hasAdminRight,
11
+ hasAnyAdminRight
5
12
  };
6
13
  //# sourceMappingURL=harmony148.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony148.mjs","sources":["../src/features/permissions/action-resolvers/accessMarketingProjects.ts"],"sourcesContent":["import type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const accessMarketingProjects: ActionResolver = ({ enabledFeatureFlags }) =>\n\thas(enabledFeatureFlags, 'homeMarketingBeta')\n"],"names":[],"mappings":";AAGO,MAAM,0BAA0C,CAAC,EAAE,oBACzD,MAAA,IAAI,qBAAqB,mBAAmB;"}
1
+ {"version":3,"file":"harmony148.mjs","sources":["../src/features/auth/utils/permissions.ts"],"sourcesContent":["// Helper function to check if user has a specific admin right\nexport const hasAdminRight = (adminRights: string[], right: string): boolean => {\n\tif (!Array.isArray(adminRights)) return false\n\treturn adminRights.includes(right)\n}\n\n// Helper function to check if user has any of the specified admin rights\nexport const hasAnyAdminRight = (adminRights: string[], rights: string[]): boolean => {\n\tif (!Array.isArray(adminRights)) return false\n\treturn rights.some((right) => adminRights.includes(right))\n}\n"],"names":[],"mappings":"AACa,MAAA,gBAAgB,CAAC,aAAuB,UAA2B;AAC/E,MAAI,CAAC,MAAM,QAAQ,WAAW,EAAU,QAAA;AACjC,SAAA,YAAY,SAAS,KAAK;AAClC;AAGa,MAAA,mBAAmB,CAAC,aAAuB,WAA8B;AACrF,MAAI,CAAC,MAAM,QAAQ,WAAW,EAAU,QAAA;AACxC,SAAO,OAAO,KAAK,CAAC,UAAU,YAAY,SAAS,KAAK,CAAC;AAC1D;"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const has = require("./harmony127.cjs");
4
- const deleteProjects = ({ projectPermissions }) => has.has(projectPermissions, "settings");
5
- exports.deleteProjects = deleteProjects;
4
+ const accessMarketingProjects = ({ enabledFeatureFlags }) => has.has(enabledFeatureFlags, "homeMarketingBeta");
5
+ exports.accessMarketingProjects = accessMarketingProjects;
6
6
  //# sourceMappingURL=harmony149.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony149.cjs","sources":["../src/features/permissions/action-resolvers/deleteProjects.ts"],"sourcesContent":["import type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const deleteProjects: ActionResolver = ({ projectPermissions }) =>\n\thas(projectPermissions, 'settings')\n"],"names":["has"],"mappings":";;;AAGO,MAAM,iBAAiC,CAAC,EAAE,mBAChD,MAAAA,IAAA,IAAI,oBAAoB,UAAU;;"}
1
+ {"version":3,"file":"harmony149.cjs","sources":["../src/features/permissions/action-resolvers/accessMarketingProjects.ts"],"sourcesContent":["import type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const accessMarketingProjects: ActionResolver = ({ enabledFeatureFlags }) =>\n\thas(enabledFeatureFlags, 'homeMarketingBeta')\n"],"names":["has"],"mappings":";;;AAGO,MAAM,0BAA0C,CAAC,EAAE,oBACzD,MAAAA,IAAA,IAAI,qBAAqB,mBAAmB;;"}
@@ -1,6 +1,6 @@
1
1
  import { has } from "./harmony127.mjs";
2
- const deleteProjects = ({ projectPermissions }) => has(projectPermissions, "settings");
2
+ const accessMarketingProjects = ({ enabledFeatureFlags }) => has(enabledFeatureFlags, "homeMarketingBeta");
3
3
  export {
4
- deleteProjects
4
+ accessMarketingProjects
5
5
  };
6
6
  //# sourceMappingURL=harmony149.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony149.mjs","sources":["../src/features/permissions/action-resolvers/deleteProjects.ts"],"sourcesContent":["import type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const deleteProjects: ActionResolver = ({ projectPermissions }) =>\n\thas(projectPermissions, 'settings')\n"],"names":[],"mappings":";AAGO,MAAM,iBAAiC,CAAC,EAAE,mBAChD,MAAA,IAAI,oBAAoB,UAAU;"}
1
+ {"version":3,"file":"harmony149.mjs","sources":["../src/features/permissions/action-resolvers/accessMarketingProjects.ts"],"sourcesContent":["import type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const accessMarketingProjects: ActionResolver = ({ enabledFeatureFlags }) =>\n\thas(enabledFeatureFlags, 'homeMarketingBeta')\n"],"names":[],"mappings":";AAGO,MAAM,0BAA0C,CAAC,EAAE,oBACzD,MAAA,IAAI,qBAAqB,mBAAmB;"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const has = require("./harmony127.cjs");
4
- const manageContributors = ({ projectPermissions }) => has.has(projectPermissions, "contributors");
5
- exports.manageContributors = manageContributors;
4
+ const deleteProjects = ({ projectPermissions }) => has.has(projectPermissions, "settings");
5
+ exports.deleteProjects = deleteProjects;
6
6
  //# sourceMappingURL=harmony150.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony150.cjs","sources":["../src/features/permissions/action-resolvers/manageContributors.ts"],"sourcesContent":["import type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const manageContributors: ActionResolver = ({ projectPermissions }) =>\n\thas(projectPermissions, 'contributors')\n"],"names":["has"],"mappings":";;;AAGO,MAAM,qBAAqC,CAAC,EAAE,mBACpD,MAAAA,IAAA,IAAI,oBAAoB,cAAc;;"}
1
+ {"version":3,"file":"harmony150.cjs","sources":["../src/features/permissions/action-resolvers/deleteProjects.ts"],"sourcesContent":["import type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const deleteProjects: ActionResolver = ({ projectPermissions }) =>\n\thas(projectPermissions, 'settings')\n"],"names":["has"],"mappings":";;;AAGO,MAAM,iBAAiC,CAAC,EAAE,mBAChD,MAAAA,IAAA,IAAI,oBAAoB,UAAU;;"}
@@ -1,6 +1,6 @@
1
1
  import { has } from "./harmony127.mjs";
2
- const manageContributors = ({ projectPermissions }) => has(projectPermissions, "contributors");
2
+ const deleteProjects = ({ projectPermissions }) => has(projectPermissions, "settings");
3
3
  export {
4
- manageContributors
4
+ deleteProjects
5
5
  };
6
6
  //# sourceMappingURL=harmony150.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony150.mjs","sources":["../src/features/permissions/action-resolvers/manageContributors.ts"],"sourcesContent":["import type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const manageContributors: ActionResolver = ({ projectPermissions }) =>\n\thas(projectPermissions, 'contributors')\n"],"names":[],"mappings":";AAGO,MAAM,qBAAqC,CAAC,EAAE,mBACpD,MAAA,IAAI,oBAAoB,cAAc;"}
1
+ {"version":3,"file":"harmony150.mjs","sources":["../src/features/permissions/action-resolvers/deleteProjects.ts"],"sourcesContent":["import type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const deleteProjects: ActionResolver = ({ projectPermissions }) =>\n\thas(projectPermissions, 'settings')\n"],"names":[],"mappings":";AAGO,MAAM,iBAAiC,CAAC,EAAE,mBAChD,MAAA,IAAI,oBAAoB,UAAU;"}
@@ -1,17 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const canPerformActionByProjectType = require("./harmony167.cjs");
4
- const hasAny = require("./harmony126.cjs");
5
3
  const has = require("./harmony127.cjs");
6
- const canDownloadFiles = ({ projectType, projectPermissions }) => canPerformActionByProjectType.canPerformActionByProjectType(projectType, {
7
- classic: () => has.has(projectPermissions, "download"),
8
- // This is a temporary workaround for the marketing project type - upload and download permissions are not yet supported
9
- // so to restrict translators from accessing the upload/download page we are checking that they have any permissions at all.
10
- // The reason for this is that, at the moment, the Translators role will assign no permissions to the user. So we are effectively
11
- // simulating a check for 'is this user a translator?' (since project 'roles' don't actually exist).
12
- // The correct check is to check for upload permission, so when that is implemented this will continue to work as expected,
13
- // but will need to remove this first part of the check.
14
- marketing: () => hasAny.hasAny(projectPermissions, "contributors", "settings", "manage_languages") || has.has(projectPermissions, "download")
15
- });
16
- exports.canDownloadFiles = canDownloadFiles;
4
+ const manageContributors = ({ projectPermissions }) => has.has(projectPermissions, "contributors");
5
+ exports.manageContributors = manageContributors;
17
6
  //# sourceMappingURL=harmony151.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony151.cjs","sources":["../src/features/permissions/action-resolvers/canDownloadFiles.ts"],"sourcesContent":["import { canPerformActionByProjectType } from '@features/permissions/utils/canPerformActionByProjectType'\nimport { hasAny } from '@features/permissions/utils/hasAny'\nimport type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const canDownloadFiles: ActionResolver = ({ projectType, projectPermissions }) =>\n\tcanPerformActionByProjectType(projectType, {\n\t\tclassic: () => has(projectPermissions, 'download'),\n\n\t\t// This is a temporary workaround for the marketing project type - upload and download permissions are not yet supported\n\t\t// so to restrict translators from accessing the upload/download page we are checking that they have any permissions at all.\n\t\t// The reason for this is that, at the moment, the Translators role will assign no permissions to the user. So we are effectively\n\t\t// simulating a check for 'is this user a translator?' (since project 'roles' don't actually exist).\n\t\t// The correct check is to check for upload permission, so when that is implemented this will continue to work as expected,\n\t\t// but will need to remove this first part of the check.\n\t\tmarketing: () =>\n\t\t\thasAny(projectPermissions, 'contributors', 'settings', 'manage_languages') ||\n\t\t\thas(projectPermissions, 'download'),\n\t})\n"],"names":["canPerformActionByProjectType","has","hasAny"],"mappings":";;;;;AAKO,MAAM,mBAAmC,CAAC,EAAE,aAAa,mBAAmB,MAClFA,8BAAAA,8BAA8B,aAAa;AAAA,EAC1C,SAAS,MAAMC,IAAAA,IAAI,oBAAoB,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjD,WAAW,MACVC,cAAO,oBAAoB,gBAAgB,YAAY,kBAAkB,KACzED,QAAI,oBAAoB,UAAU;AACpC,CAAC;;"}
1
+ {"version":3,"file":"harmony151.cjs","sources":["../src/features/permissions/action-resolvers/manageContributors.ts"],"sourcesContent":["import type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const manageContributors: ActionResolver = ({ projectPermissions }) =>\n\thas(projectPermissions, 'contributors')\n"],"names":["has"],"mappings":";;;AAGO,MAAM,qBAAqC,CAAC,EAAE,mBACpD,MAAAA,IAAA,IAAI,oBAAoB,cAAc;;"}
@@ -1,17 +1,6 @@
1
- import { canPerformActionByProjectType } from "./harmony167.mjs";
2
- import { hasAny } from "./harmony126.mjs";
3
1
  import { has } from "./harmony127.mjs";
4
- const canDownloadFiles = ({ projectType, projectPermissions }) => canPerformActionByProjectType(projectType, {
5
- classic: () => has(projectPermissions, "download"),
6
- // This is a temporary workaround for the marketing project type - upload and download permissions are not yet supported
7
- // so to restrict translators from accessing the upload/download page we are checking that they have any permissions at all.
8
- // The reason for this is that, at the moment, the Translators role will assign no permissions to the user. So we are effectively
9
- // simulating a check for 'is this user a translator?' (since project 'roles' don't actually exist).
10
- // The correct check is to check for upload permission, so when that is implemented this will continue to work as expected,
11
- // but will need to remove this first part of the check.
12
- marketing: () => hasAny(projectPermissions, "contributors", "settings", "manage_languages") || has(projectPermissions, "download")
13
- });
2
+ const manageContributors = ({ projectPermissions }) => has(projectPermissions, "contributors");
14
3
  export {
15
- canDownloadFiles
4
+ manageContributors
16
5
  };
17
6
  //# sourceMappingURL=harmony151.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony151.mjs","sources":["../src/features/permissions/action-resolvers/canDownloadFiles.ts"],"sourcesContent":["import { canPerformActionByProjectType } from '@features/permissions/utils/canPerformActionByProjectType'\nimport { hasAny } from '@features/permissions/utils/hasAny'\nimport type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const canDownloadFiles: ActionResolver = ({ projectType, projectPermissions }) =>\n\tcanPerformActionByProjectType(projectType, {\n\t\tclassic: () => has(projectPermissions, 'download'),\n\n\t\t// This is a temporary workaround for the marketing project type - upload and download permissions are not yet supported\n\t\t// so to restrict translators from accessing the upload/download page we are checking that they have any permissions at all.\n\t\t// The reason for this is that, at the moment, the Translators role will assign no permissions to the user. So we are effectively\n\t\t// simulating a check for 'is this user a translator?' (since project 'roles' don't actually exist).\n\t\t// The correct check is to check for upload permission, so when that is implemented this will continue to work as expected,\n\t\t// but will need to remove this first part of the check.\n\t\tmarketing: () =>\n\t\t\thasAny(projectPermissions, 'contributors', 'settings', 'manage_languages') ||\n\t\t\thas(projectPermissions, 'download'),\n\t})\n"],"names":[],"mappings":";;;AAKO,MAAM,mBAAmC,CAAC,EAAE,aAAa,mBAAmB,MAClF,8BAA8B,aAAa;AAAA,EAC1C,SAAS,MAAM,IAAI,oBAAoB,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjD,WAAW,MACV,OAAO,oBAAoB,gBAAgB,YAAY,kBAAkB,KACzE,IAAI,oBAAoB,UAAU;AACpC,CAAC;"}
1
+ {"version":3,"file":"harmony151.mjs","sources":["../src/features/permissions/action-resolvers/manageContributors.ts"],"sourcesContent":["import type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const manageContributors: ActionResolver = ({ projectPermissions }) =>\n\thas(projectPermissions, 'contributors')\n"],"names":[],"mappings":";AAGO,MAAM,qBAAqC,CAAC,EAAE,mBACpD,MAAA,IAAI,oBAAoB,cAAc;"}
@@ -1,17 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const canPerformActionByProjectType = require("./harmony167.cjs");
3
+ const canPerformActionByProjectType = require("./harmony170.cjs");
4
4
  const hasAny = require("./harmony126.cjs");
5
5
  const has = require("./harmony127.cjs");
6
- const canUploadFiles = ({ projectPermissions, projectType }) => canPerformActionByProjectType.canPerformActionByProjectType(projectType, {
7
- classic: () => has.has(projectPermissions, "upload"),
6
+ const canDownloadFiles = ({ projectType, projectPermissions }) => canPerformActionByProjectType.canPerformActionByProjectType(projectType, {
7
+ classic: () => has.has(projectPermissions, "download"),
8
8
  // This is a temporary workaround for the marketing project type - upload and download permissions are not yet supported
9
9
  // so to restrict translators from accessing the upload/download page we are checking that they have any permissions at all.
10
10
  // The reason for this is that, at the moment, the Translators role will assign no permissions to the user. So we are effectively
11
11
  // simulating a check for 'is this user a translator?' (since project 'roles' don't actually exist).
12
12
  // The correct check is to check for upload permission, so when that is implemented this will continue to work as expected,
13
13
  // but will need to remove this first part of the check.
14
- marketing: () => hasAny.hasAny(projectPermissions, "contributors", "settings", "manage_languages") || has.has(projectPermissions, "upload")
14
+ marketing: () => hasAny.hasAny(projectPermissions, "contributors", "settings", "manage_languages") || has.has(projectPermissions, "download")
15
15
  });
16
- exports.canUploadFiles = canUploadFiles;
16
+ exports.canDownloadFiles = canDownloadFiles;
17
17
  //# sourceMappingURL=harmony152.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony152.cjs","sources":["../src/features/permissions/action-resolvers/canUploadFiles.ts"],"sourcesContent":["import { canPerformActionByProjectType } from '@features/permissions/utils/canPerformActionByProjectType'\nimport { hasAny } from '@features/permissions/utils/hasAny'\nimport type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const canUploadFiles: ActionResolver = ({ projectPermissions, projectType }) =>\n\tcanPerformActionByProjectType(projectType, {\n\t\tclassic: () => has(projectPermissions, 'upload'),\n\n\t\t// This is a temporary workaround for the marketing project type - upload and download permissions are not yet supported\n\t\t// so to restrict translators from accessing the upload/download page we are checking that they have any permissions at all.\n\t\t// The reason for this is that, at the moment, the Translators role will assign no permissions to the user. So we are effectively\n\t\t// simulating a check for 'is this user a translator?' (since project 'roles' don't actually exist).\n\t\t// The correct check is to check for upload permission, so when that is implemented this will continue to work as expected,\n\t\t// but will need to remove this first part of the check.\n\t\tmarketing: () =>\n\t\t\thasAny(projectPermissions, 'contributors', 'settings', 'manage_languages') ||\n\t\t\thas(projectPermissions, 'upload'),\n\t})\n"],"names":["canPerformActionByProjectType","has","hasAny"],"mappings":";;;;;AAKO,MAAM,iBAAiC,CAAC,EAAE,oBAAoB,YAAY,MAChFA,8BAAAA,8BAA8B,aAAa;AAAA,EAC1C,SAAS,MAAMC,IAAAA,IAAI,oBAAoB,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ/C,WAAW,MACVC,cAAO,oBAAoB,gBAAgB,YAAY,kBAAkB,KACzED,QAAI,oBAAoB,QAAQ;AAClC,CAAC;;"}
1
+ {"version":3,"file":"harmony152.cjs","sources":["../src/features/permissions/action-resolvers/canDownloadFiles.ts"],"sourcesContent":["import { canPerformActionByProjectType } from '@features/permissions/utils/canPerformActionByProjectType'\nimport { hasAny } from '@features/permissions/utils/hasAny'\nimport type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const canDownloadFiles: ActionResolver = ({ projectType, projectPermissions }) =>\n\tcanPerformActionByProjectType(projectType, {\n\t\tclassic: () => has(projectPermissions, 'download'),\n\n\t\t// This is a temporary workaround for the marketing project type - upload and download permissions are not yet supported\n\t\t// so to restrict translators from accessing the upload/download page we are checking that they have any permissions at all.\n\t\t// The reason for this is that, at the moment, the Translators role will assign no permissions to the user. So we are effectively\n\t\t// simulating a check for 'is this user a translator?' (since project 'roles' don't actually exist).\n\t\t// The correct check is to check for upload permission, so when that is implemented this will continue to work as expected,\n\t\t// but will need to remove this first part of the check.\n\t\tmarketing: () =>\n\t\t\thasAny(projectPermissions, 'contributors', 'settings', 'manage_languages') ||\n\t\t\thas(projectPermissions, 'download'),\n\t})\n"],"names":["canPerformActionByProjectType","has","hasAny"],"mappings":";;;;;AAKO,MAAM,mBAAmC,CAAC,EAAE,aAAa,mBAAmB,MAClFA,8BAAAA,8BAA8B,aAAa;AAAA,EAC1C,SAAS,MAAMC,IAAAA,IAAI,oBAAoB,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjD,WAAW,MACVC,cAAO,oBAAoB,gBAAgB,YAAY,kBAAkB,KACzED,QAAI,oBAAoB,UAAU;AACpC,CAAC;;"}
@@ -1,17 +1,17 @@
1
- import { canPerformActionByProjectType } from "./harmony167.mjs";
1
+ import { canPerformActionByProjectType } from "./harmony170.mjs";
2
2
  import { hasAny } from "./harmony126.mjs";
3
3
  import { has } from "./harmony127.mjs";
4
- const canUploadFiles = ({ projectPermissions, projectType }) => canPerformActionByProjectType(projectType, {
5
- classic: () => has(projectPermissions, "upload"),
4
+ const canDownloadFiles = ({ projectType, projectPermissions }) => canPerformActionByProjectType(projectType, {
5
+ classic: () => has(projectPermissions, "download"),
6
6
  // This is a temporary workaround for the marketing project type - upload and download permissions are not yet supported
7
7
  // so to restrict translators from accessing the upload/download page we are checking that they have any permissions at all.
8
8
  // The reason for this is that, at the moment, the Translators role will assign no permissions to the user. So we are effectively
9
9
  // simulating a check for 'is this user a translator?' (since project 'roles' don't actually exist).
10
10
  // The correct check is to check for upload permission, so when that is implemented this will continue to work as expected,
11
11
  // but will need to remove this first part of the check.
12
- marketing: () => hasAny(projectPermissions, "contributors", "settings", "manage_languages") || has(projectPermissions, "upload")
12
+ marketing: () => hasAny(projectPermissions, "contributors", "settings", "manage_languages") || has(projectPermissions, "download")
13
13
  });
14
14
  export {
15
- canUploadFiles
15
+ canDownloadFiles
16
16
  };
17
17
  //# sourceMappingURL=harmony152.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony152.mjs","sources":["../src/features/permissions/action-resolvers/canUploadFiles.ts"],"sourcesContent":["import { canPerformActionByProjectType } from '@features/permissions/utils/canPerformActionByProjectType'\nimport { hasAny } from '@features/permissions/utils/hasAny'\nimport type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const canUploadFiles: ActionResolver = ({ projectPermissions, projectType }) =>\n\tcanPerformActionByProjectType(projectType, {\n\t\tclassic: () => has(projectPermissions, 'upload'),\n\n\t\t// This is a temporary workaround for the marketing project type - upload and download permissions are not yet supported\n\t\t// so to restrict translators from accessing the upload/download page we are checking that they have any permissions at all.\n\t\t// The reason for this is that, at the moment, the Translators role will assign no permissions to the user. So we are effectively\n\t\t// simulating a check for 'is this user a translator?' (since project 'roles' don't actually exist).\n\t\t// The correct check is to check for upload permission, so when that is implemented this will continue to work as expected,\n\t\t// but will need to remove this first part of the check.\n\t\tmarketing: () =>\n\t\t\thasAny(projectPermissions, 'contributors', 'settings', 'manage_languages') ||\n\t\t\thas(projectPermissions, 'upload'),\n\t})\n"],"names":[],"mappings":";;;AAKO,MAAM,iBAAiC,CAAC,EAAE,oBAAoB,YAAY,MAChF,8BAA8B,aAAa;AAAA,EAC1C,SAAS,MAAM,IAAI,oBAAoB,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ/C,WAAW,MACV,OAAO,oBAAoB,gBAAgB,YAAY,kBAAkB,KACzE,IAAI,oBAAoB,QAAQ;AAClC,CAAC;"}
1
+ {"version":3,"file":"harmony152.mjs","sources":["../src/features/permissions/action-resolvers/canDownloadFiles.ts"],"sourcesContent":["import { canPerformActionByProjectType } from '@features/permissions/utils/canPerformActionByProjectType'\nimport { hasAny } from '@features/permissions/utils/hasAny'\nimport type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const canDownloadFiles: ActionResolver = ({ projectType, projectPermissions }) =>\n\tcanPerformActionByProjectType(projectType, {\n\t\tclassic: () => has(projectPermissions, 'download'),\n\n\t\t// This is a temporary workaround for the marketing project type - upload and download permissions are not yet supported\n\t\t// so to restrict translators from accessing the upload/download page we are checking that they have any permissions at all.\n\t\t// The reason for this is that, at the moment, the Translators role will assign no permissions to the user. So we are effectively\n\t\t// simulating a check for 'is this user a translator?' (since project 'roles' don't actually exist).\n\t\t// The correct check is to check for upload permission, so when that is implemented this will continue to work as expected,\n\t\t// but will need to remove this first part of the check.\n\t\tmarketing: () =>\n\t\t\thasAny(projectPermissions, 'contributors', 'settings', 'manage_languages') ||\n\t\t\thas(projectPermissions, 'download'),\n\t})\n"],"names":[],"mappings":";;;AAKO,MAAM,mBAAmC,CAAC,EAAE,aAAa,mBAAmB,MAClF,8BAA8B,aAAa;AAAA,EAC1C,SAAS,MAAM,IAAI,oBAAoB,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjD,WAAW,MACV,OAAO,oBAAoB,gBAAgB,YAAY,kBAAkB,KACzE,IAAI,oBAAoB,UAAU;AACpC,CAAC;"}
@@ -1,6 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const canPerformActionByProjectType = require("./harmony170.cjs");
3
4
  const hasAny = require("./harmony126.cjs");
4
- const createProjects = ({ teamRole }) => hasAny.hasAny(teamRole, "owner", "biller", "admin");
5
- exports.createProjects = createProjects;
5
+ const has = require("./harmony127.cjs");
6
+ const canUploadFiles = ({ projectPermissions, projectType }) => canPerformActionByProjectType.canPerformActionByProjectType(projectType, {
7
+ classic: () => has.has(projectPermissions, "upload"),
8
+ // This is a temporary workaround for the marketing project type - upload and download permissions are not yet supported
9
+ // so to restrict translators from accessing the upload/download page we are checking that they have any permissions at all.
10
+ // The reason for this is that, at the moment, the Translators role will assign no permissions to the user. So we are effectively
11
+ // simulating a check for 'is this user a translator?' (since project 'roles' don't actually exist).
12
+ // The correct check is to check for upload permission, so when that is implemented this will continue to work as expected,
13
+ // but will need to remove this first part of the check.
14
+ marketing: () => hasAny.hasAny(projectPermissions, "contributors", "settings", "manage_languages") || has.has(projectPermissions, "upload")
15
+ });
16
+ exports.canUploadFiles = canUploadFiles;
6
17
  //# sourceMappingURL=harmony153.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony153.cjs","sources":["../src/features/permissions/action-resolvers/createProjects.ts"],"sourcesContent":["import { hasAny } from '@features/permissions/utils/hasAny'\nimport type { ActionResolver } from '../types'\n\nexport const createProjects: ActionResolver = ({ teamRole }) =>\n\thasAny(teamRole, 'owner', 'biller', 'admin')\n"],"names":["hasAny"],"mappings":";;;AAGa,MAAA,iBAAiC,CAAC,EAAE,eAChDA,OAAO,OAAA,UAAU,SAAS,UAAU,OAAO;;"}
1
+ {"version":3,"file":"harmony153.cjs","sources":["../src/features/permissions/action-resolvers/canUploadFiles.ts"],"sourcesContent":["import { canPerformActionByProjectType } from '@features/permissions/utils/canPerformActionByProjectType'\nimport { hasAny } from '@features/permissions/utils/hasAny'\nimport type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const canUploadFiles: ActionResolver = ({ projectPermissions, projectType }) =>\n\tcanPerformActionByProjectType(projectType, {\n\t\tclassic: () => has(projectPermissions, 'upload'),\n\n\t\t// This is a temporary workaround for the marketing project type - upload and download permissions are not yet supported\n\t\t// so to restrict translators from accessing the upload/download page we are checking that they have any permissions at all.\n\t\t// The reason for this is that, at the moment, the Translators role will assign no permissions to the user. So we are effectively\n\t\t// simulating a check for 'is this user a translator?' (since project 'roles' don't actually exist).\n\t\t// The correct check is to check for upload permission, so when that is implemented this will continue to work as expected,\n\t\t// but will need to remove this first part of the check.\n\t\tmarketing: () =>\n\t\t\thasAny(projectPermissions, 'contributors', 'settings', 'manage_languages') ||\n\t\t\thas(projectPermissions, 'upload'),\n\t})\n"],"names":["canPerformActionByProjectType","has","hasAny"],"mappings":";;;;;AAKO,MAAM,iBAAiC,CAAC,EAAE,oBAAoB,YAAY,MAChFA,8BAAAA,8BAA8B,aAAa;AAAA,EAC1C,SAAS,MAAMC,IAAAA,IAAI,oBAAoB,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ/C,WAAW,MACVC,cAAO,oBAAoB,gBAAgB,YAAY,kBAAkB,KACzED,QAAI,oBAAoB,QAAQ;AAClC,CAAC;;"}
@@ -1,6 +1,17 @@
1
+ import { canPerformActionByProjectType } from "./harmony170.mjs";
1
2
  import { hasAny } from "./harmony126.mjs";
2
- const createProjects = ({ teamRole }) => hasAny(teamRole, "owner", "biller", "admin");
3
+ import { has } from "./harmony127.mjs";
4
+ const canUploadFiles = ({ projectPermissions, projectType }) => canPerformActionByProjectType(projectType, {
5
+ classic: () => has(projectPermissions, "upload"),
6
+ // This is a temporary workaround for the marketing project type - upload and download permissions are not yet supported
7
+ // so to restrict translators from accessing the upload/download page we are checking that they have any permissions at all.
8
+ // The reason for this is that, at the moment, the Translators role will assign no permissions to the user. So we are effectively
9
+ // simulating a check for 'is this user a translator?' (since project 'roles' don't actually exist).
10
+ // The correct check is to check for upload permission, so when that is implemented this will continue to work as expected,
11
+ // but will need to remove this first part of the check.
12
+ marketing: () => hasAny(projectPermissions, "contributors", "settings", "manage_languages") || has(projectPermissions, "upload")
13
+ });
3
14
  export {
4
- createProjects
15
+ canUploadFiles
5
16
  };
6
17
  //# sourceMappingURL=harmony153.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony153.mjs","sources":["../src/features/permissions/action-resolvers/createProjects.ts"],"sourcesContent":["import { hasAny } from '@features/permissions/utils/hasAny'\nimport type { ActionResolver } from '../types'\n\nexport const createProjects: ActionResolver = ({ teamRole }) =>\n\thasAny(teamRole, 'owner', 'biller', 'admin')\n"],"names":[],"mappings":";AAGa,MAAA,iBAAiC,CAAC,EAAE,eAChD,OAAO,UAAU,SAAS,UAAU,OAAO;"}
1
+ {"version":3,"file":"harmony153.mjs","sources":["../src/features/permissions/action-resolvers/canUploadFiles.ts"],"sourcesContent":["import { canPerformActionByProjectType } from '@features/permissions/utils/canPerformActionByProjectType'\nimport { hasAny } from '@features/permissions/utils/hasAny'\nimport type { ActionResolver } from '../types'\nimport { has } from '../utils/has'\n\nexport const canUploadFiles: ActionResolver = ({ projectPermissions, projectType }) =>\n\tcanPerformActionByProjectType(projectType, {\n\t\tclassic: () => has(projectPermissions, 'upload'),\n\n\t\t// This is a temporary workaround for the marketing project type - upload and download permissions are not yet supported\n\t\t// so to restrict translators from accessing the upload/download page we are checking that they have any permissions at all.\n\t\t// The reason for this is that, at the moment, the Translators role will assign no permissions to the user. So we are effectively\n\t\t// simulating a check for 'is this user a translator?' (since project 'roles' don't actually exist).\n\t\t// The correct check is to check for upload permission, so when that is implemented this will continue to work as expected,\n\t\t// but will need to remove this first part of the check.\n\t\tmarketing: () =>\n\t\t\thasAny(projectPermissions, 'contributors', 'settings', 'manage_languages') ||\n\t\t\thas(projectPermissions, 'upload'),\n\t})\n"],"names":[],"mappings":";;;AAKO,MAAM,iBAAiC,CAAC,EAAE,oBAAoB,YAAY,MAChF,8BAA8B,aAAa;AAAA,EAC1C,SAAS,MAAM,IAAI,oBAAoB,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ/C,WAAW,MACV,OAAO,oBAAoB,gBAAgB,YAAY,kBAAkB,KACzE,IAAI,oBAAoB,QAAQ;AAClC,CAAC;"}