@lokalise/harmony 2.0.4 → 2.0.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.
Files changed (335) hide show
  1. package/dist/harmony.cjs +1 -1
  2. package/dist/harmony.mjs +3 -3
  3. package/dist/harmony102.cjs +1 -1
  4. package/dist/harmony102.mjs +1 -1
  5. package/dist/harmony103.cjs +7 -7
  6. package/dist/harmony103.mjs +7 -7
  7. package/dist/harmony105.cjs +2 -2
  8. package/dist/harmony105.mjs +2 -2
  9. package/dist/harmony106.cjs +2 -165
  10. package/dist/harmony106.cjs.map +1 -1
  11. package/dist/harmony106.mjs +3 -166
  12. package/dist/harmony106.mjs.map +1 -1
  13. package/dist/harmony107.cjs +16 -42
  14. package/dist/harmony107.cjs.map +1 -1
  15. package/dist/harmony107.mjs +16 -42
  16. package/dist/harmony107.mjs.map +1 -1
  17. package/dist/harmony108.cjs +75 -13
  18. package/dist/harmony108.cjs.map +1 -1
  19. package/dist/harmony108.mjs +75 -13
  20. package/dist/harmony108.mjs.map +1 -1
  21. package/dist/harmony109.cjs +10 -10
  22. package/dist/harmony109.cjs.map +1 -1
  23. package/dist/harmony109.mjs +10 -10
  24. package/dist/harmony109.mjs.map +1 -1
  25. package/dist/harmony110.cjs +35 -13
  26. package/dist/harmony110.cjs.map +1 -1
  27. package/dist/harmony110.mjs +34 -12
  28. package/dist/harmony110.mjs.map +1 -1
  29. package/dist/harmony111.cjs +9 -3
  30. package/dist/harmony111.cjs.map +1 -1
  31. package/dist/harmony111.mjs +9 -3
  32. package/dist/harmony111.mjs.map +1 -1
  33. package/dist/harmony112.cjs +41 -12
  34. package/dist/harmony112.cjs.map +1 -1
  35. package/dist/harmony112.mjs +43 -14
  36. package/dist/harmony112.mjs.map +1 -1
  37. package/dist/harmony113.cjs +9 -76
  38. package/dist/harmony113.cjs.map +1 -1
  39. package/dist/harmony113.mjs +8 -75
  40. package/dist/harmony113.mjs.map +1 -1
  41. package/dist/harmony114.cjs +10 -10
  42. package/dist/harmony114.cjs.map +1 -1
  43. package/dist/harmony114.mjs +10 -10
  44. package/dist/harmony114.mjs.map +1 -1
  45. package/dist/harmony115.cjs +13 -35
  46. package/dist/harmony115.cjs.map +1 -1
  47. package/dist/harmony115.mjs +12 -34
  48. package/dist/harmony115.mjs.map +1 -1
  49. package/dist/harmony116.cjs +10 -8
  50. package/dist/harmony116.cjs.map +1 -1
  51. package/dist/harmony116.mjs +11 -9
  52. package/dist/harmony116.mjs.map +1 -1
  53. package/dist/harmony117.cjs +21 -47
  54. package/dist/harmony117.cjs.map +1 -1
  55. package/dist/harmony117.mjs +20 -46
  56. package/dist/harmony117.mjs.map +1 -1
  57. package/dist/harmony118.cjs +166 -9
  58. package/dist/harmony118.cjs.map +1 -1
  59. package/dist/harmony118.mjs +165 -8
  60. package/dist/harmony118.mjs.map +1 -1
  61. package/dist/harmony119.cjs +44 -11
  62. package/dist/harmony119.cjs.map +1 -1
  63. package/dist/harmony119.mjs +44 -11
  64. package/dist/harmony119.mjs.map +1 -1
  65. package/dist/harmony120.cjs +14 -21
  66. package/dist/harmony120.cjs.map +1 -1
  67. package/dist/harmony120.mjs +13 -20
  68. package/dist/harmony120.mjs.map +1 -1
  69. package/dist/harmony121.cjs +98 -6
  70. package/dist/harmony121.cjs.map +1 -1
  71. package/dist/harmony121.mjs +82 -7
  72. package/dist/harmony121.mjs.map +1 -1
  73. package/dist/harmony122.cjs +6 -16
  74. package/dist/harmony122.cjs.map +1 -1
  75. package/dist/harmony122.mjs +7 -17
  76. package/dist/harmony122.mjs.map +1 -1
  77. package/dist/harmony123.cjs +16 -7
  78. package/dist/harmony123.cjs.map +1 -1
  79. package/dist/harmony123.mjs +16 -7
  80. package/dist/harmony123.mjs.map +1 -1
  81. package/dist/harmony124.cjs +3 -3
  82. package/dist/harmony124.cjs.map +1 -1
  83. package/dist/harmony124.mjs +3 -3
  84. package/dist/harmony124.mjs.map +1 -1
  85. package/dist/harmony125.cjs +7 -14
  86. package/dist/harmony125.cjs.map +1 -1
  87. package/dist/harmony125.mjs +7 -14
  88. package/dist/harmony125.mjs.map +1 -1
  89. package/dist/harmony126.cjs +15 -20
  90. package/dist/harmony126.cjs.map +1 -1
  91. package/dist/harmony126.mjs +15 -20
  92. package/dist/harmony126.mjs.map +1 -1
  93. package/dist/harmony127.cjs +20 -87
  94. package/dist/harmony127.cjs.map +1 -1
  95. package/dist/harmony127.mjs +20 -87
  96. package/dist/harmony127.mjs.map +1 -1
  97. package/dist/harmony128.cjs +10 -31
  98. package/dist/harmony128.cjs.map +1 -1
  99. package/dist/harmony128.mjs +9 -30
  100. package/dist/harmony128.mjs.map +1 -1
  101. package/dist/harmony129.cjs +11 -98
  102. package/dist/harmony129.cjs.map +1 -1
  103. package/dist/harmony129.mjs +11 -81
  104. package/dist/harmony129.mjs.map +1 -1
  105. package/dist/harmony130.cjs +15 -9
  106. package/dist/harmony130.cjs.map +1 -1
  107. package/dist/harmony130.mjs +14 -8
  108. package/dist/harmony130.mjs.map +1 -1
  109. package/dist/harmony131.cjs +13 -6
  110. package/dist/harmony131.cjs.map +1 -1
  111. package/dist/harmony131.mjs +15 -8
  112. package/dist/harmony131.mjs.map +1 -1
  113. package/dist/harmony132.cjs +7 -12
  114. package/dist/harmony132.cjs.map +1 -1
  115. package/dist/harmony132.mjs +9 -14
  116. package/dist/harmony132.mjs.map +1 -1
  117. package/dist/harmony133.cjs +20 -13
  118. package/dist/harmony133.cjs.map +1 -1
  119. package/dist/harmony133.mjs +22 -15
  120. package/dist/harmony133.mjs.map +1 -1
  121. package/dist/harmony134.cjs +9 -7
  122. package/dist/harmony134.cjs.map +1 -1
  123. package/dist/harmony134.mjs +11 -9
  124. package/dist/harmony134.mjs.map +1 -1
  125. package/dist/harmony135.cjs +30 -18
  126. package/dist/harmony135.cjs.map +1 -1
  127. package/dist/harmony135.mjs +32 -20
  128. package/dist/harmony135.mjs.map +1 -1
  129. package/dist/harmony136.cjs +6 -6
  130. package/dist/harmony136.cjs.map +1 -1
  131. package/dist/harmony136.mjs +6 -6
  132. package/dist/harmony136.mjs.map +1 -1
  133. package/dist/harmony137.cjs +13 -29
  134. package/dist/harmony137.cjs.map +1 -1
  135. package/dist/harmony137.mjs +14 -30
  136. package/dist/harmony137.mjs.map +1 -1
  137. package/dist/harmony138.cjs +31 -7
  138. package/dist/harmony138.cjs.map +1 -1
  139. package/dist/harmony138.mjs +32 -8
  140. package/dist/harmony138.mjs.map +1 -1
  141. package/dist/harmony139.cjs +21 -22
  142. package/dist/harmony139.cjs.map +1 -1
  143. package/dist/harmony139.mjs +20 -21
  144. package/dist/harmony139.mjs.map +1 -1
  145. package/dist/harmony140.cjs +15 -30
  146. package/dist/harmony140.cjs.map +1 -1
  147. package/dist/harmony140.mjs +17 -32
  148. package/dist/harmony140.mjs.map +1 -1
  149. package/dist/harmony141.cjs +3 -18
  150. package/dist/harmony141.cjs.map +1 -1
  151. package/dist/harmony141.mjs +3 -18
  152. package/dist/harmony141.mjs.map +1 -1
  153. package/dist/harmony142.cjs +15 -21
  154. package/dist/harmony142.cjs.map +1 -1
  155. package/dist/harmony142.mjs +14 -20
  156. package/dist/harmony142.mjs.map +1 -1
  157. package/dist/harmony143.cjs +87 -6
  158. package/dist/harmony143.cjs.map +1 -1
  159. package/dist/harmony143.mjs +86 -5
  160. package/dist/harmony143.mjs.map +1 -1
  161. package/dist/harmony144.cjs +31 -16
  162. package/dist/harmony144.cjs.map +1 -1
  163. package/dist/harmony144.mjs +30 -15
  164. package/dist/harmony144.mjs.map +1 -1
  165. package/dist/harmony145.cjs +6 -4
  166. package/dist/harmony145.cjs.map +1 -1
  167. package/dist/harmony145.mjs +5 -3
  168. package/dist/harmony145.mjs.map +1 -1
  169. package/dist/harmony146.cjs +6 -4
  170. package/dist/harmony146.cjs.map +1 -1
  171. package/dist/harmony146.mjs +5 -3
  172. package/dist/harmony146.mjs.map +1 -1
  173. package/dist/harmony147.cjs +3 -3
  174. package/dist/harmony147.cjs.map +1 -1
  175. package/dist/harmony147.mjs +3 -3
  176. package/dist/harmony147.mjs.map +1 -1
  177. package/dist/harmony148.cjs +3 -14
  178. package/dist/harmony148.cjs.map +1 -1
  179. package/dist/harmony148.mjs +3 -14
  180. package/dist/harmony148.mjs.map +1 -1
  181. package/dist/harmony149.cjs +3 -14
  182. package/dist/harmony149.cjs.map +1 -1
  183. package/dist/harmony149.mjs +3 -14
  184. package/dist/harmony149.mjs.map +1 -1
  185. package/dist/harmony150.cjs +14 -3
  186. package/dist/harmony150.cjs.map +1 -1
  187. package/dist/harmony150.mjs +14 -3
  188. package/dist/harmony150.mjs.map +1 -1
  189. package/dist/harmony151.cjs +15 -6
  190. package/dist/harmony151.cjs.map +1 -1
  191. package/dist/harmony151.mjs +14 -5
  192. package/dist/harmony151.mjs.map +1 -1
  193. package/dist/harmony152.cjs +4 -6
  194. package/dist/harmony152.cjs.map +1 -1
  195. package/dist/harmony152.mjs +3 -5
  196. package/dist/harmony152.mjs.map +1 -1
  197. package/dist/harmony153.cjs +96 -10
  198. package/dist/harmony153.cjs.map +1 -1
  199. package/dist/harmony153.mjs +96 -10
  200. package/dist/harmony153.mjs.map +1 -1
  201. package/dist/harmony154.cjs +14 -10
  202. package/dist/harmony154.cjs.map +1 -1
  203. package/dist/harmony154.mjs +13 -9
  204. package/dist/harmony154.mjs.map +1 -1
  205. package/dist/harmony155.cjs +15 -7
  206. package/dist/harmony155.cjs.map +1 -1
  207. package/dist/harmony155.mjs +14 -6
  208. package/dist/harmony155.mjs.map +1 -1
  209. package/dist/harmony156.cjs +37 -10
  210. package/dist/harmony156.cjs.map +1 -1
  211. package/dist/harmony156.mjs +36 -9
  212. package/dist/harmony156.mjs.map +1 -1
  213. package/dist/harmony157.cjs +29 -25
  214. package/dist/harmony157.cjs.map +1 -1
  215. package/dist/harmony157.mjs +28 -24
  216. package/dist/harmony157.mjs.map +1 -1
  217. package/dist/harmony158.cjs +6 -3
  218. package/dist/harmony158.cjs.map +1 -1
  219. package/dist/harmony158.mjs +6 -3
  220. package/dist/harmony158.mjs.map +1 -1
  221. package/dist/harmony159.cjs +3 -9
  222. package/dist/harmony159.cjs.map +1 -1
  223. package/dist/harmony159.mjs +3 -9
  224. package/dist/harmony159.mjs.map +1 -1
  225. package/dist/harmony160.cjs +6 -3
  226. package/dist/harmony160.cjs.map +1 -1
  227. package/dist/harmony160.mjs +6 -3
  228. package/dist/harmony160.mjs.map +1 -1
  229. package/dist/harmony161.cjs +24 -32
  230. package/dist/harmony161.cjs.map +1 -1
  231. package/dist/harmony161.mjs +23 -31
  232. package/dist/harmony161.mjs.map +1 -1
  233. package/dist/harmony162.cjs +7 -97
  234. package/dist/harmony162.cjs.map +1 -1
  235. package/dist/harmony162.mjs +6 -96
  236. package/dist/harmony162.mjs.map +1 -1
  237. package/dist/harmony163.cjs +13 -14
  238. package/dist/harmony163.cjs.map +1 -1
  239. package/dist/harmony163.mjs +12 -13
  240. package/dist/harmony163.mjs.map +1 -1
  241. package/dist/harmony164.cjs +7 -15
  242. package/dist/harmony164.cjs.map +1 -1
  243. package/dist/harmony164.mjs +6 -14
  244. package/dist/harmony164.mjs.map +1 -1
  245. package/dist/harmony165.cjs +10 -36
  246. package/dist/harmony165.cjs.map +1 -1
  247. package/dist/harmony165.mjs +10 -36
  248. package/dist/harmony165.mjs.map +1 -1
  249. package/dist/harmony166.cjs +31 -27
  250. package/dist/harmony166.cjs.map +1 -1
  251. package/dist/harmony166.mjs +31 -27
  252. package/dist/harmony166.mjs.map +1 -1
  253. package/dist/harmony167.cjs +1 -1
  254. package/dist/harmony167.mjs +1 -1
  255. package/dist/harmony168.cjs +1 -1
  256. package/dist/harmony168.mjs +1 -1
  257. package/dist/harmony169.cjs +2 -2
  258. package/dist/harmony169.mjs +2 -2
  259. package/dist/harmony17.cjs +1 -1
  260. package/dist/harmony17.mjs +1 -1
  261. package/dist/harmony170.cjs +11 -4
  262. package/dist/harmony170.cjs.map +1 -1
  263. package/dist/harmony170.mjs +11 -4
  264. package/dist/harmony170.mjs.map +1 -1
  265. package/dist/harmony171.cjs +15 -10
  266. package/dist/harmony171.cjs.map +1 -1
  267. package/dist/harmony171.mjs +15 -10
  268. package/dist/harmony171.mjs.map +1 -1
  269. package/dist/harmony172.cjs +18 -13
  270. package/dist/harmony172.cjs.map +1 -1
  271. package/dist/harmony172.mjs +18 -13
  272. package/dist/harmony172.mjs.map +1 -1
  273. package/dist/harmony173.cjs +10 -19
  274. package/dist/harmony173.cjs.map +1 -1
  275. package/dist/harmony173.mjs +10 -19
  276. package/dist/harmony173.mjs.map +1 -1
  277. package/dist/harmony174.cjs +4 -12
  278. package/dist/harmony174.cjs.map +1 -1
  279. package/dist/harmony174.mjs +4 -12
  280. package/dist/harmony174.mjs.map +1 -1
  281. package/dist/harmony20.cjs +1 -1
  282. package/dist/harmony20.mjs +1 -1
  283. package/dist/harmony28.cjs +1 -1
  284. package/dist/harmony28.mjs +1 -1
  285. package/dist/harmony29.cjs +1 -1
  286. package/dist/harmony29.mjs +1 -1
  287. package/dist/harmony32.cjs +1 -1
  288. package/dist/harmony32.mjs +1 -1
  289. package/dist/harmony33.cjs +1 -1
  290. package/dist/harmony33.mjs +1 -1
  291. package/dist/harmony34.cjs +1 -1
  292. package/dist/harmony34.mjs +1 -1
  293. package/dist/harmony39.cjs +1 -1
  294. package/dist/harmony39.mjs +1 -1
  295. package/dist/harmony40.cjs +1 -1
  296. package/dist/harmony40.mjs +1 -1
  297. package/dist/harmony41.cjs +1 -1
  298. package/dist/harmony41.mjs +1 -1
  299. package/dist/harmony42.cjs +2 -2
  300. package/dist/harmony42.mjs +2 -2
  301. package/dist/harmony43.cjs +2 -2
  302. package/dist/harmony43.mjs +2 -2
  303. package/dist/harmony44.cjs +1 -1
  304. package/dist/harmony44.mjs +1 -1
  305. package/dist/harmony45.cjs +2 -0
  306. package/dist/harmony45.cjs.map +1 -1
  307. package/dist/harmony45.mjs +2 -0
  308. package/dist/harmony45.mjs.map +1 -1
  309. package/dist/harmony81.cjs +5 -20
  310. package/dist/harmony81.cjs.map +1 -1
  311. package/dist/harmony81.mjs +5 -20
  312. package/dist/harmony81.mjs.map +1 -1
  313. package/dist/harmony82.cjs +5 -1
  314. package/dist/harmony82.cjs.map +1 -1
  315. package/dist/harmony82.mjs +5 -1
  316. package/dist/harmony82.mjs.map +1 -1
  317. package/dist/harmony88.cjs +2 -1
  318. package/dist/harmony88.cjs.map +1 -1
  319. package/dist/harmony88.mjs +3 -2
  320. package/dist/harmony88.mjs.map +1 -1
  321. package/dist/harmony94.cjs +1 -1
  322. package/dist/harmony94.mjs +1 -1
  323. package/dist/harmony96.cjs +2 -2
  324. package/dist/harmony96.mjs +2 -2
  325. package/dist/harmony98.cjs +2 -2
  326. package/dist/harmony98.mjs +2 -2
  327. package/dist/types/src/features/permissions/types.d.ts +5 -1
  328. package/dist/types/src/features/publicApi/permissionTemplates.d.ts +5 -5
  329. package/dist/types/src/features/publicApi/projects.d.ts +15 -15
  330. package/dist/types/src/features/publicApi/teamUsers.d.ts +5 -5
  331. package/dist/types/src/features/publicApi/types/permissionTemplateTypes.d.ts +9 -10
  332. package/dist/types/src/features/publicApi/types/permissionTypes.d.ts +4 -4
  333. package/dist/types/src/features/publicApi/types/projectTypes.d.ts +24 -24
  334. package/dist/types/src/features/publicApi/types/teamUserTypes.d.ts +8 -8
  335. package/package.json +1 -1
@@ -1,33 +1,12 @@
1
1
  "use strict";
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;
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
8
+ };
9
+ exports.active = active;
10
+ exports.default = styles;
11
+ exports.link = link;
33
12
  //# sourceMappingURL=harmony128.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony128.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":"harmony128.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -1,33 +1,12 @@
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
+ const link = "_link_18vhx_1";
2
+ const active = "_active_18vhx_18";
3
+ const styles = {
4
+ link,
5
+ active
6
+ };
30
7
  export {
31
- navigationItems
8
+ active,
9
+ styles as default,
10
+ link
32
11
  };
33
12
  //# sourceMappingURL=harmony128.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony128.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":"harmony128.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1,102 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const debounce = require("./harmony151.cjs");
5
- const throttle = require("./harmony152.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
- };
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const useSidebar = require("./harmony109.cjs");
5
+ const louis = require("@lokalise/louis");
6
+ const permissions = require("./harmony110.cjs");
7
+ const BillingMenuItem = () => {
8
+ const { jwt } = useSidebar.useSidebar();
9
+ if (!permissions.canChangeBilling(jwt)) {
10
+ return null;
11
+ }
12
+ return /* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { href: "/team#billing", children: "Billing" });
97
13
  };
98
- exports.getDimensions = getDimensions;
99
- exports.patchResizeCallback = patchResizeCallback;
100
- exports.useCallbackRef = useCallbackRef;
101
- exports.useRefProxy = useRefProxy;
14
+ exports.BillingMenuItem = BillingMenuItem;
102
15
  //# sourceMappingURL=harmony129.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony129.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]}
1
+ {"version":3,"file":"harmony129.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;;"}
@@ -1,85 +1,15 @@
1
- import * as React from "react";
2
- import debounce from "./harmony151.mjs";
3
- import throttle from "./harmony152.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
- };
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useSidebar } from "./harmony109.mjs";
3
+ import { MenuItem } from "@lokalise/louis";
4
+ import { canChangeBilling } from "./harmony110.mjs";
5
+ const BillingMenuItem = () => {
6
+ const { jwt } = useSidebar();
7
+ if (!canChangeBilling(jwt)) {
8
+ return null;
9
+ }
10
+ return /* @__PURE__ */ jsx(MenuItem, { href: "/team#billing", children: "Billing" });
78
11
  };
79
12
  export {
80
- getDimensions,
81
- patchResizeCallback,
82
- useCallbackRef,
83
- useRefProxy
13
+ BillingMenuItem
84
14
  };
85
15
  //# sourceMappingURL=harmony129.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony129.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]}
1
+ {"version":3,"file":"harmony129.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;"}
@@ -1,12 +1,18 @@
1
1
  "use strict";
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
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const useSidebar = require("./harmony109.cjs");
5
+ const louis = require("@lokalise/louis");
6
+ const permissions = require("./harmony110.cjs");
7
+ const CreateNewTeam = ({ onCreateTeam }) => {
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
+ ] });
8
16
  };
9
- exports.active = active;
10
- exports.default = styles;
11
- exports.link = link;
17
+ exports.CreateNewTeam = CreateNewTeam;
12
18
  //# sourceMappingURL=harmony130.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony130.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
1
+ {"version":3,"file":"harmony130.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeam/CreateNewTeam.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuDivider, MenuItem } from '@lokalise/louis'\nimport { canCreateTeam } from '@utils/user/permissions'\n\ntype CreateNewTeamProps = {\n\tonCreateTeam: () => void\n}\n\n/**\n * A menu item component for creating a new team.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <CreateNewTeam onCreateTeam={handleCreateTeam} />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const CreateNewTeam = ({ onCreateTeam }: CreateNewTeamProps) => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canCreateTeam(jwt)) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem onClick={onCreateTeam}>Create new team</MenuItem>\n\t\t\t<MenuDivider />\n\t\t</>\n\t)\n}\n"],"names":["useSidebar","canCreateTeam","jsxs","Fragment","jsx","MenuItem","MenuDivider"],"mappings":";;;;;;AAqBO,MAAM,gBAAgB,CAAC,EAAE,mBAAuC;AAChE,QAAA,EAAE,IAAI,IAAIA,sBAAW;AAEvB,MAAA,CAACC,YAAAA,cAAc,GAAG,GAAG;AACjB,WAAA;AAAA,EAAA;AAGR,SAEEC,2BAAA,KAAAC,qBAAA,EAAA,UAAA;AAAA,IAACC,2BAAA,IAAAC,MAAA,UAAA,EAAS,SAAS,cAAc,UAAe,mBAAA;AAAA,mCAC/CC,MAAY,aAAA,CAAA,CAAA;AAAA,EAAA,GACd;AAEF;;"}
@@ -1,12 +1,18 @@
1
- const link = "_link_18vhx_1";
2
- const active = "_active_18vhx_18";
3
- const styles = {
4
- link,
5
- active
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { useSidebar } from "./harmony109.mjs";
3
+ import { MenuItem, MenuDivider } from "@lokalise/louis";
4
+ import { canCreateTeam } from "./harmony110.mjs";
5
+ const CreateNewTeam = ({ onCreateTeam }) => {
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
+ ] });
6
14
  };
7
15
  export {
8
- active,
9
- styles as default,
10
- link
16
+ CreateNewTeam
11
17
  };
12
18
  //# sourceMappingURL=harmony130.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony130.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
1
+ {"version":3,"file":"harmony130.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeam/CreateNewTeam.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuDivider, MenuItem } from '@lokalise/louis'\nimport { canCreateTeam } from '@utils/user/permissions'\n\ntype CreateNewTeamProps = {\n\tonCreateTeam: () => void\n}\n\n/**\n * A menu item component for creating a new team.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <CreateNewTeam onCreateTeam={handleCreateTeam} />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const CreateNewTeam = ({ onCreateTeam }: CreateNewTeamProps) => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canCreateTeam(jwt)) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem onClick={onCreateTeam}>Create new team</MenuItem>\n\t\t\t<MenuDivider />\n\t\t</>\n\t)\n}\n"],"names":[],"mappings":";;;;AAqBO,MAAM,gBAAgB,CAAC,EAAE,mBAAuC;AAChE,QAAA,EAAE,IAAI,IAAI,WAAW;AAEvB,MAAA,CAAC,cAAc,GAAG,GAAG;AACjB,WAAA;AAAA,EAAA;AAGR,SAEE,qBAAA,UAAA,EAAA,UAAA;AAAA,IAAC,oBAAA,UAAA,EAAS,SAAS,cAAc,UAAe,mBAAA;AAAA,wBAC/C,aAAY,CAAA,CAAA;AAAA,EAAA,GACd;AAEF;"}
@@ -1,15 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
- const useSidebar = require("./harmony114.cjs");
4
+ const useSidebar = require("./harmony109.cjs");
5
5
  const louis = require("@lokalise/louis");
6
- const permissions = require("./harmony115.cjs");
7
- const BillingMenuItem = () => {
6
+ const permissions = require("./harmony110.cjs");
7
+ const CreateNewTeamPlaceholder_module = require("./harmony158.cjs");
8
+ const CreateNewTeamPlaceholder = ({ onClick }) => {
8
9
  const { jwt } = useSidebar.useSidebar();
9
- if (!permissions.canChangeBilling(jwt)) {
10
+ if (!permissions.canCreateTeam(jwt)) {
10
11
  return null;
11
12
  }
12
- return /* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { href: "/team#billing", children: "Billing" });
13
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14
+ /* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { onClick, "data-testid": "sidebar-create-new-team-placeholder", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
15
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: CreateNewTeamPlaceholder_module.default.mainLabel, children: "Create new team" }),
16
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: CreateNewTeamPlaceholder_module.default.subLabel, children: "Switch to Expert to create a new team" })
17
+ ] }) }),
18
+ /* @__PURE__ */ jsxRuntime.jsx(louis.MenuDivider, {})
19
+ ] });
13
20
  };
14
- exports.BillingMenuItem = BillingMenuItem;
21
+ exports.CreateNewTeamPlaceholder = CreateNewTeamPlaceholder;
15
22
  //# sourceMappingURL=harmony131.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony131.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/BillingMenuItem/BillingMenuItem.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuItem } from '@lokalise/louis'\nimport { canChangeBilling } from '@utils/user/permissions'\n\n/**\n * A menu item component for navigating to the billing section.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <BillingMenuItem />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const BillingMenuItem = () => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canChangeBilling(jwt)) {\n\t\treturn null\n\t}\n\n\treturn <MenuItem href=\"/team#billing\">Billing</MenuItem>\n}\n"],"names":["useSidebar","canChangeBilling","jsx","MenuItem"],"mappings":";;;;;;AAiBO,MAAM,kBAAkB,MAAM;AAC9B,QAAA,EAAE,IAAI,IAAIA,sBAAW;AAEvB,MAAA,CAACC,YAAAA,iBAAiB,GAAG,GAAG;AACpB,WAAA;AAAA,EAAA;AAGR,SAAQC,2BAAAA,IAAAC,MAAAA,UAAA,EAAS,MAAK,iBAAgB,UAAO,WAAA;AAC9C;;"}
1
+ {"version":3,"file":"harmony131.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeamPlaceholder/CreateNewTeamPlaceholder.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuDivider, MenuItem } from '@lokalise/louis'\nimport { canCreateTeam } from '@utils/user/permissions'\nimport styles from './CreateNewTeamPlaceholder.module.css'\n\ntype CreateNewTeamPlaceholderProps = {\n\tonClick: () => void\n}\n\n/**\n * A placeholder menu item for creating a new team.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <CreateNewTeamPlaceholder onClick={handleCreateTeam} />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const CreateNewTeamPlaceholder = ({ onClick }: CreateNewTeamPlaceholderProps) => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canCreateTeam(jwt)) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem onClick={onClick} data-testid=\"sidebar-create-new-team-placeholder\">\n\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t<span className={styles.mainLabel}>Create new team</span>\n\t\t\t\t\t<span className={styles.subLabel}>Switch to Expert to create a new team</span>\n\t\t\t\t</div>\n\t\t\t</MenuItem>\n\t\t\t<MenuDivider />\n\t\t</>\n\t)\n}\n"],"names":["useSidebar","canCreateTeam","jsxs","Fragment","jsx","MenuItem","styles","MenuDivider"],"mappings":";;;;;;;AAsBO,MAAM,2BAA2B,CAAC,EAAE,cAA6C;AACjF,QAAA,EAAE,IAAI,IAAIA,sBAAW;AAEvB,MAAA,CAACC,YAAAA,cAAc,GAAG,GAAG;AACjB,WAAA;AAAA,EAAA;AAGR,SAEEC,2BAAA,KAAAC,qBAAA,EAAA,UAAA;AAAA,IAAAC,2BAAAA,IAACC,kBAAS,SAAkB,eAAY,uCACvC,UAACH,2BAAAA,KAAA,OAAA,EAAI,WAAU,iBACd,UAAA;AAAA,MAAAE,2BAAA,IAAC,QAAK,EAAA,WAAWE,gCAAO,QAAA,WAAW,UAAe,mBAAA;AAAA,MACjDF,2BAAA,IAAA,QAAA,EAAK,WAAWE,gCAAA,QAAO,UAAU,UAAqC,wCAAA,CAAA;AAAA,IAAA,EAAA,CACxE,EACD,CAAA;AAAA,mCACCC,MAAY,aAAA,CAAA,CAAA;AAAA,EAAA,GACd;AAEF;;"}
@@ -1,15 +1,22 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { useSidebar } from "./harmony114.mjs";
3
- import { MenuItem } from "@lokalise/louis";
4
- import { canChangeBilling } from "./harmony115.mjs";
5
- const BillingMenuItem = () => {
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { useSidebar } from "./harmony109.mjs";
3
+ import { MenuItem, MenuDivider } from "@lokalise/louis";
4
+ import { canCreateTeam } from "./harmony110.mjs";
5
+ import styles from "./harmony158.mjs";
6
+ const CreateNewTeamPlaceholder = ({ onClick }) => {
6
7
  const { jwt } = useSidebar();
7
- if (!canChangeBilling(jwt)) {
8
+ if (!canCreateTeam(jwt)) {
8
9
  return null;
9
10
  }
10
- return /* @__PURE__ */ jsx(MenuItem, { href: "/team#billing", children: "Billing" });
11
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
12
+ /* @__PURE__ */ jsx(MenuItem, { onClick, "data-testid": "sidebar-create-new-team-placeholder", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
13
+ /* @__PURE__ */ jsx("span", { className: styles.mainLabel, children: "Create new team" }),
14
+ /* @__PURE__ */ jsx("span", { className: styles.subLabel, children: "Switch to Expert to create a new team" })
15
+ ] }) }),
16
+ /* @__PURE__ */ jsx(MenuDivider, {})
17
+ ] });
11
18
  };
12
19
  export {
13
- BillingMenuItem
20
+ CreateNewTeamPlaceholder
14
21
  };
15
22
  //# sourceMappingURL=harmony131.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony131.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/BillingMenuItem/BillingMenuItem.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuItem } from '@lokalise/louis'\nimport { canChangeBilling } from '@utils/user/permissions'\n\n/**\n * A menu item component for navigating to the billing section.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <BillingMenuItem />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const BillingMenuItem = () => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canChangeBilling(jwt)) {\n\t\treturn null\n\t}\n\n\treturn <MenuItem href=\"/team#billing\">Billing</MenuItem>\n}\n"],"names":[],"mappings":";;;;AAiBO,MAAM,kBAAkB,MAAM;AAC9B,QAAA,EAAE,IAAI,IAAI,WAAW;AAEvB,MAAA,CAAC,iBAAiB,GAAG,GAAG;AACpB,WAAA;AAAA,EAAA;AAGR,SAAQ,oBAAA,UAAA,EAAS,MAAK,iBAAgB,UAAO,WAAA;AAC9C;"}
1
+ {"version":3,"file":"harmony131.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeamPlaceholder/CreateNewTeamPlaceholder.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuDivider, MenuItem } from '@lokalise/louis'\nimport { canCreateTeam } from '@utils/user/permissions'\nimport styles from './CreateNewTeamPlaceholder.module.css'\n\ntype CreateNewTeamPlaceholderProps = {\n\tonClick: () => void\n}\n\n/**\n * A placeholder menu item for creating a new team.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <CreateNewTeamPlaceholder onClick={handleCreateTeam} />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const CreateNewTeamPlaceholder = ({ onClick }: CreateNewTeamPlaceholderProps) => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canCreateTeam(jwt)) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem onClick={onClick} data-testid=\"sidebar-create-new-team-placeholder\">\n\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t<span className={styles.mainLabel}>Create new team</span>\n\t\t\t\t\t<span className={styles.subLabel}>Switch to Expert to create a new team</span>\n\t\t\t\t</div>\n\t\t\t</MenuItem>\n\t\t\t<MenuDivider />\n\t\t</>\n\t)\n}\n"],"names":[],"mappings":";;;;;AAsBO,MAAM,2BAA2B,CAAC,EAAE,cAA6C;AACjF,QAAA,EAAE,IAAI,IAAI,WAAW;AAEvB,MAAA,CAAC,cAAc,GAAG,GAAG;AACjB,WAAA;AAAA,EAAA;AAGR,SAEE,qBAAA,UAAA,EAAA,UAAA;AAAA,IAAA,oBAAC,YAAS,SAAkB,eAAY,uCACvC,UAAC,qBAAA,OAAA,EAAI,WAAU,iBACd,UAAA;AAAA,MAAA,oBAAC,QAAK,EAAA,WAAW,OAAO,WAAW,UAAe,mBAAA;AAAA,MACjD,oBAAA,QAAA,EAAK,WAAW,OAAO,UAAU,UAAqC,wCAAA,CAAA;AAAA,IAAA,EAAA,CACxE,EACD,CAAA;AAAA,wBACC,aAAY,CAAA,CAAA;AAAA,EAAA,GACd;AAEF;"}
@@ -1,18 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
- const useSidebar = require("./harmony114.cjs");
5
4
  const louis = require("@lokalise/louis");
6
- const permissions = require("./harmony115.cjs");
7
- const CreateNewTeam = ({ onCreateTeam }) => {
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
- ] });
5
+ const DarkModeToggle_module = require("./harmony159.cjs");
6
+ const DarkModeToggle = ({ onToggle, isDarkMode }) => {
7
+ return /* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { onClick: onToggle, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-row justify-between gap-1 ${DarkModeToggle_module.default.switchContainer}`, children: [
8
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Dark mode" }),
9
+ /* @__PURE__ */ jsxRuntime.jsx(louis.Switch, { defaultChecked: isDarkMode, "aria-label": "Toggle dark mode" })
10
+ ] }) });
16
11
  };
17
- exports.CreateNewTeam = CreateNewTeam;
12
+ exports.DarkModeToggle = DarkModeToggle;
18
13
  //# sourceMappingURL=harmony132.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony132.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeam/CreateNewTeam.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuDivider, MenuItem } from '@lokalise/louis'\nimport { canCreateTeam } from '@utils/user/permissions'\n\ntype CreateNewTeamProps = {\n\tonCreateTeam: () => void\n}\n\n/**\n * A menu item component for creating a new team.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <CreateNewTeam onCreateTeam={handleCreateTeam} />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const CreateNewTeam = ({ onCreateTeam }: CreateNewTeamProps) => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canCreateTeam(jwt)) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem onClick={onCreateTeam}>Create new team</MenuItem>\n\t\t\t<MenuDivider />\n\t\t</>\n\t)\n}\n"],"names":["useSidebar","canCreateTeam","jsxs","Fragment","jsx","MenuItem","MenuDivider"],"mappings":";;;;;;AAqBO,MAAM,gBAAgB,CAAC,EAAE,mBAAuC;AAChE,QAAA,EAAE,IAAI,IAAIA,sBAAW;AAEvB,MAAA,CAACC,YAAAA,cAAc,GAAG,GAAG;AACjB,WAAA;AAAA,EAAA;AAGR,SAEEC,2BAAA,KAAAC,qBAAA,EAAA,UAAA;AAAA,IAACC,2BAAA,IAAAC,MAAA,UAAA,EAAS,SAAS,cAAc,UAAe,mBAAA;AAAA,mCAC/CC,MAAY,aAAA,CAAA,CAAA;AAAA,EAAA,GACd;AAEF;;"}
1
+ {"version":3,"file":"harmony132.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/DarkModeToggle/DarkModeToggle.tsx"],"sourcesContent":["import { MenuItem, Switch } from '@lokalise/louis'\nimport styles from './DarkModeToggle.module.css'\n\ntype DarkModeToggleProps = {\n\tonToggle: () => void\n\tisDarkMode: boolean\n}\n\n/**\n * A menu item component for toggling dark mode.\n * Displays a switch and label, and calls the provided onToggle handler when clicked.\n *\n * @example\n * ```\n * <DarkModeToggle\n * isDarkMode={isDarkMode}\n * onToggle={handleToggleDarkMode}\n * />\n * ```\n */\n\nexport const DarkModeToggle = ({ onToggle, isDarkMode }: DarkModeToggleProps) => {\n\treturn (\n\t\t<MenuItem onClick={onToggle}>\n\t\t\t<div className={`flex-row justify-between gap-1 ${styles.switchContainer}`}>\n\t\t\t\t<span>Dark mode</span>\n\t\t\t\t<Switch defaultChecked={isDarkMode} aria-label=\"Toggle dark mode\" />\n\t\t\t</div>\n\t\t</MenuItem>\n\t)\n}\n"],"names":["jsx","MenuItem","jsxs","styles","Switch"],"mappings":";;;;;AAqBO,MAAM,iBAAiB,CAAC,EAAE,UAAU,iBAAsC;AAE/E,SAAAA,2BAAAA,IAACC,MAAAA,UAAS,EAAA,SAAS,UAClB,UAAAC,2BAAA,KAAC,SAAI,WAAW,kCAAkCC,sBAAO,QAAA,eAAe,IACvE,UAAA;AAAA,IAAAH,2BAAAA,IAAC,UAAK,UAAS,YAAA,CAAA;AAAA,IACdA,2BAAA,IAAAI,MAAA,QAAA,EAAO,gBAAgB,YAAY,cAAW,mBAAmB,CAAA;AAAA,EAAA,EAAA,CACnE,EACD,CAAA;AAEF;;"}
@@ -1,18 +1,13 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { useSidebar } from "./harmony114.mjs";
3
- import { MenuItem, MenuDivider } from "@lokalise/louis";
4
- import { canCreateTeam } from "./harmony115.mjs";
5
- const CreateNewTeam = ({ onCreateTeam }) => {
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
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { MenuItem, Switch } from "@lokalise/louis";
3
+ import styles from "./harmony159.mjs";
4
+ const DarkModeToggle = ({ onToggle, isDarkMode }) => {
5
+ return /* @__PURE__ */ jsx(MenuItem, { onClick: onToggle, children: /* @__PURE__ */ jsxs("div", { className: `flex-row justify-between gap-1 ${styles.switchContainer}`, children: [
6
+ /* @__PURE__ */ jsx("span", { children: "Dark mode" }),
7
+ /* @__PURE__ */ jsx(Switch, { defaultChecked: isDarkMode, "aria-label": "Toggle dark mode" })
8
+ ] }) });
14
9
  };
15
10
  export {
16
- CreateNewTeam
11
+ DarkModeToggle
17
12
  };
18
13
  //# sourceMappingURL=harmony132.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony132.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeam/CreateNewTeam.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuDivider, MenuItem } from '@lokalise/louis'\nimport { canCreateTeam } from '@utils/user/permissions'\n\ntype CreateNewTeamProps = {\n\tonCreateTeam: () => void\n}\n\n/**\n * A menu item component for creating a new team.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <CreateNewTeam onCreateTeam={handleCreateTeam} />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const CreateNewTeam = ({ onCreateTeam }: CreateNewTeamProps) => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canCreateTeam(jwt)) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem onClick={onCreateTeam}>Create new team</MenuItem>\n\t\t\t<MenuDivider />\n\t\t</>\n\t)\n}\n"],"names":[],"mappings":";;;;AAqBO,MAAM,gBAAgB,CAAC,EAAE,mBAAuC;AAChE,QAAA,EAAE,IAAI,IAAI,WAAW;AAEvB,MAAA,CAAC,cAAc,GAAG,GAAG;AACjB,WAAA;AAAA,EAAA;AAGR,SAEE,qBAAA,UAAA,EAAA,UAAA;AAAA,IAAC,oBAAA,UAAA,EAAS,SAAS,cAAc,UAAe,mBAAA;AAAA,wBAC/C,aAAY,CAAA,CAAA;AAAA,EAAA,GACd;AAEF;"}
1
+ {"version":3,"file":"harmony132.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/DarkModeToggle/DarkModeToggle.tsx"],"sourcesContent":["import { MenuItem, Switch } from '@lokalise/louis'\nimport styles from './DarkModeToggle.module.css'\n\ntype DarkModeToggleProps = {\n\tonToggle: () => void\n\tisDarkMode: boolean\n}\n\n/**\n * A menu item component for toggling dark mode.\n * Displays a switch and label, and calls the provided onToggle handler when clicked.\n *\n * @example\n * ```\n * <DarkModeToggle\n * isDarkMode={isDarkMode}\n * onToggle={handleToggleDarkMode}\n * />\n * ```\n */\n\nexport const DarkModeToggle = ({ onToggle, isDarkMode }: DarkModeToggleProps) => {\n\treturn (\n\t\t<MenuItem onClick={onToggle}>\n\t\t\t<div className={`flex-row justify-between gap-1 ${styles.switchContainer}`}>\n\t\t\t\t<span>Dark mode</span>\n\t\t\t\t<Switch defaultChecked={isDarkMode} aria-label=\"Toggle dark mode\" />\n\t\t\t</div>\n\t\t</MenuItem>\n\t)\n}\n"],"names":[],"mappings":";;;AAqBO,MAAM,iBAAiB,CAAC,EAAE,UAAU,iBAAsC;AAE/E,SAAA,oBAAC,UAAS,EAAA,SAAS,UAClB,UAAA,qBAAC,SAAI,WAAW,kCAAkC,OAAO,eAAe,IACvE,UAAA;AAAA,IAAA,oBAAC,UAAK,UAAS,YAAA,CAAA;AAAA,IACd,oBAAA,QAAA,EAAO,gBAAgB,YAAY,cAAW,mBAAmB,CAAA;AAAA,EAAA,EAAA,CACnE,EACD,CAAA;AAEF;"}