@lokalise/harmony 1.36.1 → 1.37.1-exp-epic2x.1

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 (365) hide show
  1. package/dist/harmony.cjs +1 -3
  2. package/dist/harmony.cjs.map +1 -1
  3. package/dist/harmony.css +110 -317
  4. package/dist/harmony.mjs +2 -4
  5. package/dist/harmony100.cjs +10 -12
  6. package/dist/harmony100.cjs.map +1 -1
  7. package/dist/harmony100.mjs +9 -11
  8. package/dist/harmony100.mjs.map +1 -1
  9. package/dist/harmony101.cjs +27 -9
  10. package/dist/harmony101.cjs.map +1 -1
  11. package/dist/harmony101.mjs +29 -11
  12. package/dist/harmony101.mjs.map +1 -1
  13. package/dist/harmony102.cjs +14 -21
  14. package/dist/harmony102.cjs.map +1 -1
  15. package/dist/harmony102.mjs +13 -20
  16. package/dist/harmony102.mjs.map +1 -1
  17. package/dist/harmony103.cjs +35 -12
  18. package/dist/harmony103.cjs.map +1 -1
  19. package/dist/harmony103.mjs +35 -12
  20. package/dist/harmony103.mjs.map +1 -1
  21. package/dist/harmony104.cjs +14 -18
  22. package/dist/harmony104.cjs.map +1 -1
  23. package/dist/harmony104.mjs +14 -18
  24. package/dist/harmony104.mjs.map +1 -1
  25. package/dist/harmony105.cjs +22 -21
  26. package/dist/harmony105.cjs.map +1 -1
  27. package/dist/harmony105.mjs +21 -20
  28. package/dist/harmony105.mjs.map +1 -1
  29. package/dist/harmony106.cjs +34 -5
  30. package/dist/harmony106.cjs.map +1 -1
  31. package/dist/harmony106.mjs +34 -5
  32. package/dist/harmony106.mjs.map +1 -1
  33. package/dist/harmony107.cjs +21 -132
  34. package/dist/harmony107.cjs.map +1 -1
  35. package/dist/harmony107.mjs +20 -131
  36. package/dist/harmony107.mjs.map +1 -1
  37. package/dist/harmony108.cjs +21 -12
  38. package/dist/harmony108.cjs.map +1 -1
  39. package/dist/harmony108.mjs +20 -11
  40. package/dist/harmony108.mjs.map +1 -1
  41. package/dist/harmony109.cjs +7 -6
  42. package/dist/harmony109.cjs.map +1 -1
  43. package/dist/harmony109.mjs +6 -5
  44. package/dist/harmony109.mjs.map +1 -1
  45. package/dist/harmony110.cjs +15 -40
  46. package/dist/harmony110.cjs.map +1 -1
  47. package/dist/harmony110.mjs +14 -39
  48. package/dist/harmony110.mjs.map +1 -1
  49. package/dist/harmony111.cjs +6 -61
  50. package/dist/harmony111.cjs.map +1 -1
  51. package/dist/harmony111.mjs +5 -60
  52. package/dist/harmony111.mjs.map +1 -1
  53. package/dist/harmony112.cjs +6 -8
  54. package/dist/harmony112.cjs.map +1 -1
  55. package/dist/harmony112.mjs +5 -7
  56. package/dist/harmony112.mjs.map +1 -1
  57. package/dist/harmony113.cjs +6 -3
  58. package/dist/harmony113.cjs.map +1 -1
  59. package/dist/harmony113.mjs +6 -3
  60. package/dist/harmony113.mjs.map +1 -1
  61. package/dist/harmony114.cjs +6 -99
  62. package/dist/harmony114.cjs.map +1 -1
  63. package/dist/harmony114.mjs +5 -81
  64. package/dist/harmony114.mjs.map +1 -1
  65. package/dist/harmony115.cjs +10 -63
  66. package/dist/harmony115.cjs.map +1 -1
  67. package/dist/harmony115.mjs +9 -62
  68. package/dist/harmony115.mjs.map +1 -1
  69. package/dist/harmony116.cjs +24 -88
  70. package/dist/harmony116.cjs.map +1 -1
  71. package/dist/harmony116.mjs +23 -87
  72. package/dist/harmony116.mjs.map +1 -1
  73. package/dist/harmony117.cjs +3 -15
  74. package/dist/harmony117.cjs.map +1 -1
  75. package/dist/harmony117.mjs +3 -15
  76. package/dist/harmony117.mjs.map +1 -1
  77. package/dist/harmony118.cjs +12 -5
  78. package/dist/harmony118.cjs.map +1 -1
  79. package/dist/harmony118.mjs +12 -5
  80. package/dist/harmony118.mjs.map +1 -1
  81. package/dist/harmony119.cjs +6 -5
  82. package/dist/harmony119.cjs.map +1 -1
  83. package/dist/harmony119.mjs +6 -5
  84. package/dist/harmony122.cjs +1 -1
  85. package/dist/harmony122.mjs +1 -1
  86. package/dist/harmony123.cjs +2 -2
  87. package/dist/harmony123.mjs +2 -2
  88. package/dist/harmony125.cjs +13 -7
  89. package/dist/harmony125.cjs.map +1 -1
  90. package/dist/harmony125.mjs +13 -7
  91. package/dist/harmony125.mjs.map +1 -1
  92. package/dist/harmony126.cjs +15 -57
  93. package/dist/harmony126.cjs.map +1 -1
  94. package/dist/harmony126.mjs +15 -57
  95. package/dist/harmony126.mjs.map +1 -1
  96. package/dist/harmony127.cjs +15 -59
  97. package/dist/harmony127.cjs.map +1 -1
  98. package/dist/harmony127.mjs +15 -59
  99. package/dist/harmony127.mjs.map +1 -1
  100. package/dist/harmony128.cjs +12 -19
  101. package/dist/harmony128.cjs.map +1 -1
  102. package/dist/harmony128.mjs +11 -18
  103. package/dist/harmony128.mjs.map +1 -1
  104. package/dist/harmony129.cjs +15 -12
  105. package/dist/harmony129.cjs.map +1 -1
  106. package/dist/harmony129.mjs +15 -12
  107. package/dist/harmony129.mjs.map +1 -1
  108. package/dist/harmony13.cjs +1 -1
  109. package/dist/harmony13.mjs +1 -1
  110. package/dist/harmony130.cjs +19 -13
  111. package/dist/harmony130.cjs.map +1 -1
  112. package/dist/harmony130.mjs +19 -13
  113. package/dist/harmony130.mjs.map +1 -1
  114. package/dist/harmony131.cjs +10 -14
  115. package/dist/harmony131.cjs.map +1 -1
  116. package/dist/harmony131.mjs +10 -14
  117. package/dist/harmony131.mjs.map +1 -1
  118. package/dist/harmony132.cjs +5 -10
  119. package/dist/harmony132.cjs.map +1 -1
  120. package/dist/harmony132.mjs +5 -10
  121. package/dist/harmony132.mjs.map +1 -1
  122. package/dist/harmony133.cjs +11 -15
  123. package/dist/harmony133.cjs.map +1 -1
  124. package/dist/harmony133.mjs +11 -15
  125. package/dist/harmony133.mjs.map +1 -1
  126. package/dist/harmony134.cjs +28 -17
  127. package/dist/harmony134.cjs.map +1 -1
  128. package/dist/harmony134.mjs +28 -17
  129. package/dist/harmony134.mjs.map +1 -1
  130. package/dist/harmony135.cjs +12 -10
  131. package/dist/harmony135.cjs.map +1 -1
  132. package/dist/harmony135.mjs +12 -10
  133. package/dist/harmony135.mjs.map +1 -1
  134. package/dist/harmony16.cjs +1 -1
  135. package/dist/harmony16.mjs +1 -1
  136. package/dist/harmony23.cjs +1 -1
  137. package/dist/harmony23.mjs +1 -1
  138. package/dist/harmony24.cjs +1 -1
  139. package/dist/harmony24.mjs +1 -1
  140. package/dist/harmony31.cjs +4 -4
  141. package/dist/harmony31.cjs.map +1 -1
  142. package/dist/harmony31.mjs +5 -5
  143. package/dist/harmony31.mjs.map +1 -1
  144. package/dist/harmony38.cjs.map +1 -1
  145. package/dist/harmony38.mjs.map +1 -1
  146. package/dist/harmony4.cjs +15 -24
  147. package/dist/harmony4.cjs.map +1 -1
  148. package/dist/harmony4.mjs +15 -24
  149. package/dist/harmony4.mjs.map +1 -1
  150. package/dist/harmony40.cjs.map +1 -1
  151. package/dist/harmony40.mjs.map +1 -1
  152. package/dist/harmony44.cjs.map +1 -1
  153. package/dist/harmony44.mjs.map +1 -1
  154. package/dist/harmony5.cjs +1 -1
  155. package/dist/harmony5.mjs +1 -1
  156. package/dist/harmony6.cjs +3 -3
  157. package/dist/harmony6.mjs +3 -3
  158. package/dist/harmony64.cjs +4 -15
  159. package/dist/harmony64.cjs.map +1 -1
  160. package/dist/harmony64.mjs +4 -15
  161. package/dist/harmony64.mjs.map +1 -1
  162. package/dist/harmony7.cjs +1 -1
  163. package/dist/harmony7.mjs +1 -1
  164. package/dist/harmony72.cjs +1 -1
  165. package/dist/harmony72.mjs +1 -1
  166. package/dist/harmony73.cjs +51 -6
  167. package/dist/harmony73.cjs.map +1 -1
  168. package/dist/harmony73.mjs +50 -5
  169. package/dist/harmony73.mjs.map +1 -1
  170. package/dist/harmony74.cjs +38 -8
  171. package/dist/harmony74.cjs.map +1 -1
  172. package/dist/harmony74.mjs +38 -8
  173. package/dist/harmony74.mjs.map +1 -1
  174. package/dist/harmony75.cjs +9 -18
  175. package/dist/harmony75.cjs.map +1 -1
  176. package/dist/harmony75.mjs +8 -17
  177. package/dist/harmony75.mjs.map +1 -1
  178. package/dist/harmony76.cjs +6 -21
  179. package/dist/harmony76.cjs.map +1 -1
  180. package/dist/harmony76.mjs +8 -23
  181. package/dist/harmony76.mjs.map +1 -1
  182. package/dist/harmony77.cjs +28 -4
  183. package/dist/harmony77.cjs.map +1 -1
  184. package/dist/harmony77.mjs +28 -4
  185. package/dist/harmony77.mjs.map +1 -1
  186. package/dist/harmony78.cjs +3 -32
  187. package/dist/harmony78.cjs.map +1 -1
  188. package/dist/harmony78.mjs +3 -32
  189. package/dist/harmony78.mjs.map +1 -1
  190. package/dist/harmony79.cjs +30 -29
  191. package/dist/harmony79.cjs.map +1 -1
  192. package/dist/harmony79.mjs +31 -30
  193. package/dist/harmony79.mjs.map +1 -1
  194. package/dist/harmony80.cjs +25 -17
  195. package/dist/harmony80.cjs.map +1 -1
  196. package/dist/harmony80.mjs +25 -17
  197. package/dist/harmony80.mjs.map +1 -1
  198. package/dist/harmony81.cjs +3 -31
  199. package/dist/harmony81.cjs.map +1 -1
  200. package/dist/harmony81.mjs +3 -31
  201. package/dist/harmony81.mjs.map +1 -1
  202. package/dist/harmony82.cjs +12 -53
  203. package/dist/harmony82.cjs.map +1 -1
  204. package/dist/harmony82.mjs +14 -55
  205. package/dist/harmony82.mjs.map +1 -1
  206. package/dist/harmony83.cjs +75 -9
  207. package/dist/harmony83.cjs.map +1 -1
  208. package/dist/harmony83.mjs +74 -8
  209. package/dist/harmony83.mjs.map +1 -1
  210. package/dist/harmony84.cjs +11 -7
  211. package/dist/harmony84.cjs.map +1 -1
  212. package/dist/harmony84.mjs +12 -8
  213. package/dist/harmony84.mjs.map +1 -1
  214. package/dist/harmony85.cjs +29 -28
  215. package/dist/harmony85.cjs.map +1 -1
  216. package/dist/harmony85.mjs +29 -28
  217. package/dist/harmony85.mjs.map +1 -1
  218. package/dist/harmony86.cjs +9 -3
  219. package/dist/harmony86.cjs.map +1 -1
  220. package/dist/harmony86.mjs +9 -3
  221. package/dist/harmony86.mjs.map +1 -1
  222. package/dist/harmony87.cjs +42 -28
  223. package/dist/harmony87.cjs.map +1 -1
  224. package/dist/harmony87.mjs +44 -30
  225. package/dist/harmony87.mjs.map +1 -1
  226. package/dist/harmony88.cjs +6 -3
  227. package/dist/harmony88.cjs.map +1 -1
  228. package/dist/harmony88.mjs +6 -3
  229. package/dist/harmony88.mjs.map +1 -1
  230. package/dist/harmony89.cjs +12 -10
  231. package/dist/harmony89.cjs.map +1 -1
  232. package/dist/harmony89.mjs +11 -9
  233. package/dist/harmony89.mjs.map +1 -1
  234. package/dist/harmony90.cjs +20 -8
  235. package/dist/harmony90.cjs.map +1 -1
  236. package/dist/harmony90.mjs +20 -8
  237. package/dist/harmony90.mjs.map +1 -1
  238. package/dist/harmony91.cjs +9 -54
  239. package/dist/harmony91.cjs.map +1 -1
  240. package/dist/harmony91.mjs +11 -56
  241. package/dist/harmony91.mjs.map +1 -1
  242. package/dist/harmony92.cjs +12 -42
  243. package/dist/harmony92.cjs.map +1 -1
  244. package/dist/harmony92.mjs +11 -41
  245. package/dist/harmony92.mjs.map +1 -1
  246. package/dist/harmony93.cjs +98 -4
  247. package/dist/harmony93.cjs.map +1 -1
  248. package/dist/harmony93.mjs +82 -5
  249. package/dist/harmony93.mjs.map +1 -1
  250. package/dist/harmony94.cjs +14 -9
  251. package/dist/harmony94.cjs.map +1 -1
  252. package/dist/harmony94.mjs +13 -8
  253. package/dist/harmony94.mjs.map +1 -1
  254. package/dist/harmony95.cjs +21 -25
  255. package/dist/harmony95.cjs.map +1 -1
  256. package/dist/harmony95.mjs +20 -24
  257. package/dist/harmony95.mjs.map +1 -1
  258. package/dist/harmony96.cjs +6 -3
  259. package/dist/harmony96.cjs.map +1 -1
  260. package/dist/harmony96.mjs +6 -3
  261. package/dist/harmony96.mjs.map +1 -1
  262. package/dist/harmony97.cjs +11 -18
  263. package/dist/harmony97.cjs.map +1 -1
  264. package/dist/harmony97.mjs +12 -19
  265. package/dist/harmony97.mjs.map +1 -1
  266. package/dist/harmony98.cjs +17 -12
  267. package/dist/harmony98.cjs.map +1 -1
  268. package/dist/harmony98.mjs +16 -11
  269. package/dist/harmony98.mjs.map +1 -1
  270. package/dist/harmony99.cjs +17 -8
  271. package/dist/harmony99.cjs.map +1 -1
  272. package/dist/harmony99.mjs +19 -10
  273. package/dist/harmony99.mjs.map +1 -1
  274. package/dist/types/src/components/Sidebar/Sidebar.d.ts +15 -49
  275. package/dist/types/src/components/Sidebar/SidebarContent/SidebarContent.d.ts +7 -0
  276. package/dist/types/src/components/Sidebar/SidebarContext.d.ts +3 -0
  277. package/dist/types/src/components/Sidebar/SidebarProvider.d.ts +3 -0
  278. package/dist/types/src/components/Sidebar/Widgets/Avatar/Avatar.d.ts +5 -0
  279. package/dist/types/src/components/Sidebar/Widgets/HelpMenu/HelpMenu.d.ts +13 -0
  280. package/dist/types/src/components/Sidebar/Widgets/HelpMenu/HelpMenu.test.d.ts +1 -0
  281. package/dist/types/src/components/Sidebar/Widgets/IconLink/IconLink.test.d.ts +1 -0
  282. package/dist/types/src/components/Sidebar/Widgets/Menu/Menu.d.ts +3 -2
  283. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/BillingMenuItem/BillingMenuItem.d.ts +13 -0
  284. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeam/CreateNewTeam.d.ts +17 -0
  285. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeam/CreateNewTeam.test.d.ts +1 -0
  286. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeamPlaceholder/CreateNewTeamPlaceholder.d.ts +17 -0
  287. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeamPlaceholder/CreateNewTeamPlaceholder.test.d.ts +1 -0
  288. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/DarkModeToggle/DarkModeToggle.d.ts +18 -0
  289. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileMenu.d.ts +11 -24
  290. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileMenu.stories.d.ts +3 -5
  291. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileSettingsMenuItem/ProfileSettingsMenuItem.d.ts +10 -35
  292. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileSettingsMenuItem/ProfileSettingsMenuItem.test.d.ts +1 -0
  293. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProviderMenuItem/ProviderMenuItem.d.ts +13 -0
  294. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProviderMenuItem/ProviderMenuItem.test.d.ts +1 -0
  295. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/TeamMenuItem/TeamMenuItem.d.ts +1 -3
  296. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/TeamMenuItem/TeamMenuItem.test.d.ts +1 -0
  297. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/TeamSettingsMenuItem/TeamSettingsMenuItem.d.ts +13 -0
  298. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/TeamSettingsMenuItem/TeamSettingsMenuItem.test.d.ts +1 -0
  299. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/TeamSwitch/TeamSwitch.d.ts +5 -7
  300. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/TeamSwitch/TeamSwitch.test.d.ts +1 -0
  301. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/UpgradeMenuItem/UpgradeMenuItem.d.ts +6 -9
  302. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/UpgradeMenuItem/UpgradeMenuItem.test.d.ts +1 -0
  303. package/dist/types/src/components/Sidebar/Widgets/Tasks/utils/content.d.ts +4 -0
  304. package/dist/types/src/components/Sidebar/hooks/useSidebar.d.ts +1 -0
  305. package/dist/types/src/components/Sidebar/hooks/useSidebarDataLoader.d.ts +5 -0
  306. package/dist/types/src/components/Sidebar/types.d.ts +72 -0
  307. package/dist/types/src/features/auth/core/types/jwtTokenPayload.d.ts +16 -10
  308. package/dist/types/src/features/auth/core/types/jwtTokenPayload.fixture.d.ts +15 -11
  309. package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedSessionPayload.d.ts +7 -5
  310. package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedUser.d.ts +1 -1
  311. package/dist/types/src/features/publicApi/hooks/useCreateProjectMutation.d.ts +1 -1
  312. package/dist/types/src/features/publicApi/hooks/useCreateScoreMutation.d.ts +2 -2
  313. package/dist/types/src/features/publicApi/hooks/useDeleteScoreMutation.d.ts +2 -2
  314. package/dist/types/src/features/publicApi/hooks/useGetProjectPermissionMetaQuery.d.ts +2 -2
  315. package/dist/types/src/features/publicApi/hooks/useGetScoreQuery.d.ts +4 -3
  316. package/dist/types/src/features/publicApi/hooks/useGetTeamUsersQuery.d.ts +1 -1
  317. package/dist/types/src/features/publicApi/hooks/useListPermissionTemplates.d.ts +1 -1
  318. package/dist/types/src/features/publicApi/hooks/useListProjectsQuery.d.ts +1 -1
  319. package/dist/types/src/features/publicApi/hooks/useListTeamUsersQuery.d.ts +1 -1
  320. package/dist/types/src/features/publicApi/hooks/useRetrieveProjectQuery.d.ts +1 -1
  321. package/dist/types/src/features/publicApi/hooks/useUpdateProjectMutation.d.ts +1 -1
  322. package/dist/types/src/features/publicApi/permissionTemplates.d.ts +4 -4
  323. package/dist/types/src/features/publicApi/projects.d.ts +18 -18
  324. package/dist/types/src/features/publicApi/score.d.ts +8 -4
  325. package/dist/types/src/features/publicApi/teamUsers.d.ts +8 -8
  326. package/dist/types/src/features/publicApi/types/permissionTemplateTypes.d.ts +6 -6
  327. package/dist/types/src/features/publicApi/types/permissionTypes.d.ts +2 -2
  328. package/dist/types/src/features/publicApi/types/projectTypes.d.ts +18 -18
  329. package/dist/types/src/features/publicApi/types/scoreTypes.d.ts +8 -33
  330. package/dist/types/src/features/publicApi/types/teamUserTypes.d.ts +10 -10
  331. package/dist/types/src/utils/user/permissions.d.ts +9 -0
  332. package/dist/types/src/utils/user/permissions.test.d.ts +1 -0
  333. package/dist/types/tests/mocks/sidebar/sidebar.d.ts +19 -0
  334. package/dist/types/tests/utils/sidebar.d.ts +4 -0
  335. package/package.json +1 -1
  336. package/dist/harmony136.cjs +0 -9
  337. package/dist/harmony136.cjs.map +0 -1
  338. package/dist/harmony136.mjs +0 -9
  339. package/dist/harmony136.mjs.map +0 -1
  340. package/dist/harmony137.cjs +0 -15
  341. package/dist/harmony137.cjs.map +0 -1
  342. package/dist/harmony137.mjs +0 -15
  343. package/dist/harmony137.mjs.map +0 -1
  344. package/dist/harmony138.cjs +0 -35
  345. package/dist/harmony138.cjs.map +0 -1
  346. package/dist/harmony138.mjs +0 -35
  347. package/dist/harmony138.mjs.map +0 -1
  348. package/dist/harmony139.cjs +0 -17
  349. package/dist/harmony139.cjs.map +0 -1
  350. package/dist/harmony139.mjs +0 -17
  351. package/dist/harmony139.mjs.map +0 -1
  352. package/dist/harmony140.cjs +0 -49
  353. package/dist/harmony140.cjs.map +0 -1
  354. package/dist/harmony140.mjs +0 -49
  355. package/dist/harmony140.mjs.map +0 -1
  356. package/dist/harmony141.cjs +0 -15
  357. package/dist/harmony141.cjs.map +0 -1
  358. package/dist/harmony141.mjs +0 -15
  359. package/dist/harmony141.mjs.map +0 -1
  360. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuContent.d.ts +0 -6
  361. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuContext.d.ts +0 -3
  362. package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuProvider.d.ts +0 -7
  363. package/dist/types/src/components/Sidebar/utils/index.d.ts +0 -4
  364. /package/dist/types/src/components/Sidebar/Widgets/{ProfileMenu/ProfileMenu.test.d.ts → Avatar/Avatar.test.d.ts} +0 -0
  365. /package/dist/types/src/components/Sidebar/{UpgradeIcon → Widgets/ProfileMenu/UpgradeIcon}/UpgradeIcon.d.ts +0 -0
@@ -2,59 +2,14 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const louis = require("@lokalise/louis");
5
- const clsx = require("./harmony70.cjs");
6
- const UpgradeIcon = require("./harmony97.cjs");
7
- const ProfileMenuContent_module = require("./harmony105.cjs");
8
- const ProfileMenuContext = require("./harmony93.cjs");
9
- const ProfileMenuContent = ({ children }) => {
10
- const {
11
- currentTeam,
12
- otherTeams,
13
- showUpgradeCta,
14
- showBillingButton,
15
- allowTeamCreation,
16
- isProviderAlpha,
17
- canAccessTeamSettings,
18
- isEndOfTrialActive,
19
- isTeamSuspended,
20
- isFullyAuthenticated
21
- } = ProfileMenuContext.useProfileMenu();
22
- return /* @__PURE__ */ jsxRuntime.jsx(
23
- louis.Menu,
24
- {
25
- menuButton: () => /* @__PURE__ */ jsxRuntime.jsxs("button", { className: ProfileMenuContent_module.default.profileButton, "aria-label": "Profile menu", type: "button", children: [
26
- (currentTeam == null ? void 0 : currentTeam.logoUrl) ? /* @__PURE__ */ jsxRuntime.jsx(
27
- "img",
28
- {
29
- src: currentTeam.logoUrl,
30
- className: clsx.clsx(ProfileMenuContent_module.default.profileImage, {
31
- [ProfileMenuContent_module.default.profileImageHighlight]: showUpgradeCta
32
- }),
33
- alt: "Team Logo"
34
- }
35
- ) : /* @__PURE__ */ jsxRuntime.jsx(
36
- "div",
37
- {
38
- className: clsx.clsx(ProfileMenuContent_module.default.userIconWrapper, "flex-row", "align-center", "items-center", {
39
- [ProfileMenuContent_module.default.profileImageHighlight]: showUpgradeCta
40
- }),
41
- children: /* @__PURE__ */ jsxRuntime.jsx(louis.UserIcon, { size: "25px" })
42
- }
43
- ),
44
- showUpgradeCta && /* @__PURE__ */ jsxRuntime.jsx(UpgradeIcon.UpgradeIcon, { className: ProfileMenuContent_module.default.profileImageUpgradeIcon })
45
- ] }),
46
- children: /* @__PURE__ */ jsxRuntime.jsx(louis.MenuList, { placement: "right-end", className: ProfileMenuContent_module.default.menuContainer, children: children({
47
- allowTeamCreation,
48
- otherTeams,
49
- canAccessTeamSettings,
50
- isEndOfTrialActive,
51
- isTeamSuspended,
52
- showBillingButton,
53
- isProviderAlpha,
54
- isFullyAuthenticated
55
- }) })
56
- }
57
- );
5
+ const SortingIcon = ({ direction }) => {
6
+ if (direction === "asc") {
7
+ return /* @__PURE__ */ jsxRuntime.jsx(louis.SortAscendingIcon, { ariaLabel: "ascending sorting" });
8
+ }
9
+ if (direction === "desc") {
10
+ return /* @__PURE__ */ jsxRuntime.jsx(louis.SortDescendingIcon, { ariaLabel: "descending sorting" });
11
+ }
12
+ return /* @__PURE__ */ jsxRuntime.jsx(louis.SortIcon, { ariaLabel: "sorting" });
58
13
  };
59
- exports.ProfileMenuContent = ProfileMenuContent;
14
+ exports.SortingIcon = SortingIcon;
60
15
  //# sourceMappingURL=harmony91.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony91.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuContent.tsx"],"sourcesContent":["import { Menu, MenuList, UserIcon } from '@lokalise/louis'\nimport clsx from 'clsx'\nimport type { ReactNode } from 'react'\nimport { UpgradeIcon } from '../../UpgradeIcon/UpgradeIcon'\nimport styles from './ProfileMenuContent.module.css'\nimport { useProfileMenu } from './ProfileMenuContext'\nimport type { SidebarProfileMenuRenderProps } from './types'\n\nexport type ProfileMenuContentProps = {\n\tchildren: (props: SidebarProfileMenuRenderProps) => ReactNode\n}\n\nexport const ProfileMenuContent = ({ children }: ProfileMenuContentProps) => {\n\tconst {\n\t\tcurrentTeam,\n\t\totherTeams,\n\t\tshowUpgradeCta,\n\t\tshowBillingButton,\n\t\tallowTeamCreation,\n\t\tisProviderAlpha,\n\t\tcanAccessTeamSettings,\n\t\tisEndOfTrialActive,\n\t\tisTeamSuspended,\n\t\tisFullyAuthenticated,\n\t} = useProfileMenu()\n\n\treturn (\n\t\t<Menu\n\t\t\tmenuButton={() => (\n\t\t\t\t<button className={styles.profileButton} aria-label=\"Profile menu\" type=\"button\">\n\t\t\t\t\t{currentTeam?.logoUrl ? (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={currentTeam.logoUrl}\n\t\t\t\t\t\t\tclassName={clsx(styles.profileImage, {\n\t\t\t\t\t\t\t\t[styles.profileImageHighlight]: showUpgradeCta,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\talt=\"Team Logo\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={clsx(styles.userIconWrapper, 'flex-row', 'align-center', 'items-center', {\n\t\t\t\t\t\t\t\t[styles.profileImageHighlight]: showUpgradeCta,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<UserIcon size={'25px'} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{showUpgradeCta && <UpgradeIcon className={styles.profileImageUpgradeIcon} />}\n\t\t\t\t</button>\n\t\t\t)}\n\t\t>\n\t\t\t<MenuList placement=\"right-end\" className={styles.menuContainer}>\n\t\t\t\t{children({\n\t\t\t\t\tallowTeamCreation,\n\t\t\t\t\totherTeams,\n\t\t\t\t\tcanAccessTeamSettings,\n\t\t\t\t\tisEndOfTrialActive,\n\t\t\t\t\tisTeamSuspended,\n\t\t\t\t\tshowBillingButton,\n\t\t\t\t\tisProviderAlpha,\n\t\t\t\t\tisFullyAuthenticated,\n\t\t\t\t})}\n\t\t\t</MenuList>\n\t\t</Menu>\n\t)\n}\n"],"names":["useProfileMenu","jsx","Menu","jsxs","styles","clsx","UserIcon","UpgradeIcon","MenuList"],"mappings":";;;;;;;;AAYO,MAAM,qBAAqB,CAAC,EAAE,eAAwC;AACtE,QAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACGA,kCAAe;AAGlB,SAAAC,2BAAA;AAAA,IAACC,MAAA;AAAA,IAAA;AAAA,MACA,YAAY,MACXC,2BAAAA,KAAC,UAAO,EAAA,WAAWC,0BAAAA,QAAO,eAAe,cAAW,gBAAe,MAAK,UACtE,UAAA;AAAA,SAAA,2CAAa,WACbH,2BAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,KAAK,YAAY;AAAA,YACjB,WAAWI,KAAAA,KAAKD,0BAAA,QAAO,cAAc;AAAA,cACpC,CAACA,0BAAAA,QAAO,qBAAqB,GAAG;AAAA,YAAA,CAChC;AAAA,YACD,KAAI;AAAA,UAAA;AAAA,QAAA,IAGLH,2BAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,WAAWI,KAAK,KAAAD,0BAAA,QAAO,iBAAiB,YAAY,gBAAgB,gBAAgB;AAAA,cACnF,CAACA,0BAAAA,QAAO,qBAAqB,GAAG;AAAA,YAAA,CAChC;AAAA,YAED,UAAAH,2BAAAA,IAACK,MAAAA,UAAS,EAAA,MAAM,OAAQ,CAAA;AAAA,UAAA;AAAA,QACzB;AAAA,QAEA,kBAAkBL,2BAAA,IAACM,YAAY,aAAA,EAAA,WAAWH,0BAAAA,QAAO,wBAAyB,CAAA;AAAA,MAAA,GAC5E;AAAA,MAGD,yCAACI,gBAAS,EAAA,WAAU,aAAY,WAAWJ,kCAAO,eAChD,UAAS,SAAA;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA,CACA,EACF,CAAA;AAAA,IAAA;AAAA,EACD;AAEF;;"}
1
+ {"version":3,"file":"harmony91.cjs","sources":["../src/components/Table/components/SortingIcon.tsx"],"sourcesContent":["import { SortAscendingIcon, SortDescendingIcon, SortIcon } from '@lokalise/louis'\nimport type { SortDirection } from '@tanstack/react-table'\n\ntype SortingIconProps = {\n\tdirection: SortDirection | false\n}\n\nexport const SortingIcon = ({ direction }: SortingIconProps) => {\n\tif (direction === 'asc') {\n\t\treturn <SortAscendingIcon ariaLabel=\"ascending sorting\" />\n\t}\n\tif (direction === 'desc') {\n\t\treturn <SortDescendingIcon ariaLabel=\"descending sorting\" />\n\t}\n\treturn <SortIcon ariaLabel=\"sorting\" />\n}\n"],"names":["jsx","SortAscendingIcon","SortDescendingIcon","SortIcon"],"mappings":";;;;AAOO,MAAM,cAAc,CAAC,EAAE,gBAAkC;AAC/D,MAAI,cAAc,OAAO;AACjB,WAAAA,2BAAA,IAACC,MAAkB,mBAAA,EAAA,WAAU,oBAAoB,CAAA;AAAA,EAAA;AAEzD,MAAI,cAAc,QAAQ;AAClB,WAAAD,2BAAA,IAACE,MAAmB,oBAAA,EAAA,WAAU,qBAAqB,CAAA;AAAA,EAAA;AAEpD,SAAAF,2BAAA,IAACG,MAAS,UAAA,EAAA,WAAU,UAAU,CAAA;AACtC;;"}
@@ -1,60 +1,15 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { Menu, MenuList, UserIcon } from "@lokalise/louis";
3
- import { clsx } from "./harmony70.mjs";
4
- import { UpgradeIcon } from "./harmony97.mjs";
5
- import styles from "./harmony105.mjs";
6
- import { useProfileMenu } from "./harmony93.mjs";
7
- const ProfileMenuContent = ({ children }) => {
8
- const {
9
- currentTeam,
10
- otherTeams,
11
- showUpgradeCta,
12
- showBillingButton,
13
- allowTeamCreation,
14
- isProviderAlpha,
15
- canAccessTeamSettings,
16
- isEndOfTrialActive,
17
- isTeamSuspended,
18
- isFullyAuthenticated
19
- } = useProfileMenu();
20
- return /* @__PURE__ */ jsx(
21
- Menu,
22
- {
23
- menuButton: () => /* @__PURE__ */ jsxs("button", { className: styles.profileButton, "aria-label": "Profile menu", type: "button", children: [
24
- (currentTeam == null ? void 0 : currentTeam.logoUrl) ? /* @__PURE__ */ jsx(
25
- "img",
26
- {
27
- src: currentTeam.logoUrl,
28
- className: clsx(styles.profileImage, {
29
- [styles.profileImageHighlight]: showUpgradeCta
30
- }),
31
- alt: "Team Logo"
32
- }
33
- ) : /* @__PURE__ */ jsx(
34
- "div",
35
- {
36
- className: clsx(styles.userIconWrapper, "flex-row", "align-center", "items-center", {
37
- [styles.profileImageHighlight]: showUpgradeCta
38
- }),
39
- children: /* @__PURE__ */ jsx(UserIcon, { size: "25px" })
40
- }
41
- ),
42
- showUpgradeCta && /* @__PURE__ */ jsx(UpgradeIcon, { className: styles.profileImageUpgradeIcon })
43
- ] }),
44
- children: /* @__PURE__ */ jsx(MenuList, { placement: "right-end", className: styles.menuContainer, children: children({
45
- allowTeamCreation,
46
- otherTeams,
47
- canAccessTeamSettings,
48
- isEndOfTrialActive,
49
- isTeamSuspended,
50
- showBillingButton,
51
- isProviderAlpha,
52
- isFullyAuthenticated
53
- }) })
54
- }
55
- );
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { SortAscendingIcon, SortDescendingIcon, SortIcon } from "@lokalise/louis";
3
+ const SortingIcon = ({ direction }) => {
4
+ if (direction === "asc") {
5
+ return /* @__PURE__ */ jsx(SortAscendingIcon, { ariaLabel: "ascending sorting" });
6
+ }
7
+ if (direction === "desc") {
8
+ return /* @__PURE__ */ jsx(SortDescendingIcon, { ariaLabel: "descending sorting" });
9
+ }
10
+ return /* @__PURE__ */ jsx(SortIcon, { ariaLabel: "sorting" });
56
11
  };
57
12
  export {
58
- ProfileMenuContent
13
+ SortingIcon
59
14
  };
60
15
  //# sourceMappingURL=harmony91.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony91.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuContent.tsx"],"sourcesContent":["import { Menu, MenuList, UserIcon } from '@lokalise/louis'\nimport clsx from 'clsx'\nimport type { ReactNode } from 'react'\nimport { UpgradeIcon } from '../../UpgradeIcon/UpgradeIcon'\nimport styles from './ProfileMenuContent.module.css'\nimport { useProfileMenu } from './ProfileMenuContext'\nimport type { SidebarProfileMenuRenderProps } from './types'\n\nexport type ProfileMenuContentProps = {\n\tchildren: (props: SidebarProfileMenuRenderProps) => ReactNode\n}\n\nexport const ProfileMenuContent = ({ children }: ProfileMenuContentProps) => {\n\tconst {\n\t\tcurrentTeam,\n\t\totherTeams,\n\t\tshowUpgradeCta,\n\t\tshowBillingButton,\n\t\tallowTeamCreation,\n\t\tisProviderAlpha,\n\t\tcanAccessTeamSettings,\n\t\tisEndOfTrialActive,\n\t\tisTeamSuspended,\n\t\tisFullyAuthenticated,\n\t} = useProfileMenu()\n\n\treturn (\n\t\t<Menu\n\t\t\tmenuButton={() => (\n\t\t\t\t<button className={styles.profileButton} aria-label=\"Profile menu\" type=\"button\">\n\t\t\t\t\t{currentTeam?.logoUrl ? (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={currentTeam.logoUrl}\n\t\t\t\t\t\t\tclassName={clsx(styles.profileImage, {\n\t\t\t\t\t\t\t\t[styles.profileImageHighlight]: showUpgradeCta,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\talt=\"Team Logo\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={clsx(styles.userIconWrapper, 'flex-row', 'align-center', 'items-center', {\n\t\t\t\t\t\t\t\t[styles.profileImageHighlight]: showUpgradeCta,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<UserIcon size={'25px'} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{showUpgradeCta && <UpgradeIcon className={styles.profileImageUpgradeIcon} />}\n\t\t\t\t</button>\n\t\t\t)}\n\t\t>\n\t\t\t<MenuList placement=\"right-end\" className={styles.menuContainer}>\n\t\t\t\t{children({\n\t\t\t\t\tallowTeamCreation,\n\t\t\t\t\totherTeams,\n\t\t\t\t\tcanAccessTeamSettings,\n\t\t\t\t\tisEndOfTrialActive,\n\t\t\t\t\tisTeamSuspended,\n\t\t\t\t\tshowBillingButton,\n\t\t\t\t\tisProviderAlpha,\n\t\t\t\t\tisFullyAuthenticated,\n\t\t\t\t})}\n\t\t\t</MenuList>\n\t\t</Menu>\n\t)\n}\n"],"names":[],"mappings":";;;;;;AAYO,MAAM,qBAAqB,CAAC,EAAE,eAAwC;AACtE,QAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACG,eAAe;AAGlB,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,YAAY,MACX,qBAAC,UAAO,EAAA,WAAW,OAAO,eAAe,cAAW,gBAAe,MAAK,UACtE,UAAA;AAAA,SAAA,2CAAa,WACb;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,KAAK,YAAY;AAAA,YACjB,WAAW,KAAK,OAAO,cAAc;AAAA,cACpC,CAAC,OAAO,qBAAqB,GAAG;AAAA,YAAA,CAChC;AAAA,YACD,KAAI;AAAA,UAAA;AAAA,QAAA,IAGL;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,WAAW,KAAK,OAAO,iBAAiB,YAAY,gBAAgB,gBAAgB;AAAA,cACnF,CAAC,OAAO,qBAAqB,GAAG;AAAA,YAAA,CAChC;AAAA,YAED,UAAA,oBAAC,UAAS,EAAA,MAAM,OAAQ,CAAA;AAAA,UAAA;AAAA,QACzB;AAAA,QAEA,kBAAkB,oBAAC,aAAY,EAAA,WAAW,OAAO,wBAAyB,CAAA;AAAA,MAAA,GAC5E;AAAA,MAGD,8BAAC,UAAS,EAAA,WAAU,aAAY,WAAW,OAAO,eAChD,UAAS,SAAA;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA,CACA,EACF,CAAA;AAAA,IAAA;AAAA,EACD;AAEF;"}
1
+ {"version":3,"file":"harmony91.mjs","sources":["../src/components/Table/components/SortingIcon.tsx"],"sourcesContent":["import { SortAscendingIcon, SortDescendingIcon, SortIcon } from '@lokalise/louis'\nimport type { SortDirection } from '@tanstack/react-table'\n\ntype SortingIconProps = {\n\tdirection: SortDirection | false\n}\n\nexport const SortingIcon = ({ direction }: SortingIconProps) => {\n\tif (direction === 'asc') {\n\t\treturn <SortAscendingIcon ariaLabel=\"ascending sorting\" />\n\t}\n\tif (direction === 'desc') {\n\t\treturn <SortDescendingIcon ariaLabel=\"descending sorting\" />\n\t}\n\treturn <SortIcon ariaLabel=\"sorting\" />\n}\n"],"names":[],"mappings":";;AAOO,MAAM,cAAc,CAAC,EAAE,gBAAkC;AAC/D,MAAI,cAAc,OAAO;AACjB,WAAA,oBAAC,mBAAkB,EAAA,WAAU,oBAAoB,CAAA;AAAA,EAAA;AAEzD,MAAI,cAAc,QAAQ;AAClB,WAAA,oBAAC,oBAAmB,EAAA,WAAU,qBAAqB,CAAA;AAAA,EAAA;AAEpD,SAAA,oBAAC,UAAS,EAAA,WAAU,UAAU,CAAA;AACtC;"}
@@ -1,45 +1,15 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const plan = require("./harmony8.cjs");
5
- const types = require("./harmony106.cjs");
6
- const ProfileMenuContext = require("./harmony93.cjs");
7
- const billingRoles = [
8
- types.SidebarTeamRoles.biller,
9
- types.SidebarTeamRoles.owner,
10
- types.SidebarTeamRoles.admin
11
- ];
12
- const teamSettingsRoles = [
13
- types.SidebarTeamRoles.biller,
14
- types.SidebarTeamRoles.owner,
15
- types.SidebarTeamRoles.admin
16
- ];
17
- const upgradeCtaRoles = [
18
- types.SidebarTeamRoles.biller,
19
- types.SidebarTeamRoles.owner
20
- ];
21
- const ProfileMenuProvider = ({ children, config }) => {
22
- const { teams, currentTeamId, planId, isEndOfTrialActive, isFullyAuthenticated, userTeamRole } = config;
23
- const currentTeam = teams.find((t) => t.id === currentTeamId);
24
- const otherTeams = teams.filter((t) => t.id !== currentTeamId);
25
- const canChangeBilling = billingRoles.includes(userTeamRole);
26
- const canAccessTeamSettings = teamSettingsRoles.includes(userTeamRole);
27
- const isOnFreeOrTrialPlan = plan.isFreePlan(planId) || plan.isTrialPlan(planId);
28
- const showUpgradeCta = isFullyAuthenticated && isOnFreeOrTrialPlan && upgradeCtaRoles.includes(userTeamRole);
29
- const showBillingButton = isFullyAuthenticated && canAccessTeamSettings && canChangeBilling;
30
- const allowTeamCreation = isFullyAuthenticated && !isEndOfTrialActive;
31
- const providerValue = {
32
- ...config,
33
- currentTeam,
34
- otherTeams,
35
- canChangeBilling,
36
- canAccessTeamSettings,
37
- isOnFreeOrTrialPlan,
38
- showUpgradeCta,
39
- showBillingButton,
40
- allowTeamCreation
41
- };
42
- return /* @__PURE__ */ jsxRuntime.jsx(ProfileMenuContext.ProfileMenuContext.Provider, { value: providerValue, children });
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const headerSortButton = "_headerSortButton_b5tlh_1";
4
+ const centeredCell = "_centeredCell_b5tlh_15";
5
+ const rightAlignedCell = "_rightAlignedCell_b5tlh_19";
6
+ const styles = {
7
+ headerSortButton,
8
+ centeredCell,
9
+ rightAlignedCell
43
10
  };
44
- exports.ProfileMenuProvider = ProfileMenuProvider;
11
+ exports.centeredCell = centeredCell;
12
+ exports.default = styles;
13
+ exports.headerSortButton = headerSortButton;
14
+ exports.rightAlignedCell = rightAlignedCell;
45
15
  //# sourceMappingURL=harmony92.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony92.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuProvider.tsx"],"sourcesContent":["import { isFreePlan, isTrialPlan } from '@utils'\nimport type { PropsWithChildren } from 'react'\nimport { type SidebarTeamRole, SidebarTeamRoles } from '../../types'\nimport { ProfileMenuContext } from './ProfileMenuContext'\nimport type { SidebarProfileMenuConfig } from './types'\n\ntype ProfileMenuProviderProps = PropsWithChildren<{\n\tconfig: SidebarProfileMenuConfig\n}>\n\nconst billingRoles: ReadonlyArray<SidebarTeamRole> = [\n\tSidebarTeamRoles.biller,\n\tSidebarTeamRoles.owner,\n\tSidebarTeamRoles.admin,\n]\n\nconst teamSettingsRoles: ReadonlyArray<SidebarTeamRole> = [\n\tSidebarTeamRoles.biller,\n\tSidebarTeamRoles.owner,\n\tSidebarTeamRoles.admin,\n]\n\nconst upgradeCtaRoles: ReadonlyArray<SidebarTeamRole> = [\n\tSidebarTeamRoles.biller,\n\tSidebarTeamRoles.owner,\n]\n\nexport const ProfileMenuProvider = ({ children, config }: ProfileMenuProviderProps) => {\n\tconst { teams, currentTeamId, planId, isEndOfTrialActive, isFullyAuthenticated, userTeamRole } =\n\t\tconfig\n\n\tconst currentTeam = teams.find((t) => t.id === currentTeamId)\n\n\tconst otherTeams = teams.filter((t) => t.id !== currentTeamId)\n\n\tconst canChangeBilling = billingRoles.includes(userTeamRole)\n\n\tconst canAccessTeamSettings = teamSettingsRoles.includes(userTeamRole)\n\n\tconst isOnFreeOrTrialPlan = isFreePlan(planId) || isTrialPlan(planId)\n\n\tconst showUpgradeCta =\n\t\tisFullyAuthenticated && isOnFreeOrTrialPlan && upgradeCtaRoles.includes(userTeamRole)\n\n\tconst showBillingButton = isFullyAuthenticated && canAccessTeamSettings && canChangeBilling\n\n\tconst allowTeamCreation = isFullyAuthenticated && !isEndOfTrialActive\n\n\tconst providerValue = {\n\t\t...config,\n\t\tcurrentTeam,\n\t\totherTeams,\n\t\tcanChangeBilling,\n\t\tcanAccessTeamSettings,\n\t\tisOnFreeOrTrialPlan,\n\t\tshowUpgradeCta,\n\t\tshowBillingButton,\n\t\tallowTeamCreation,\n\t}\n\n\treturn <ProfileMenuContext.Provider value={providerValue}>{children}</ProfileMenuContext.Provider>\n}\n"],"names":["SidebarTeamRoles","isFreePlan","isTrialPlan","ProfileMenuContext"],"mappings":";;;;;;AAUA,MAAM,eAA+C;AAAA,EACpDA,MAAAA,iBAAiB;AAAA,EACjBA,MAAAA,iBAAiB;AAAA,EACjBA,uBAAiB;AAClB;AAEA,MAAM,oBAAoD;AAAA,EACzDA,MAAAA,iBAAiB;AAAA,EACjBA,MAAAA,iBAAiB;AAAA,EACjBA,uBAAiB;AAClB;AAEA,MAAM,kBAAkD;AAAA,EACvDA,MAAAA,iBAAiB;AAAA,EACjBA,uBAAiB;AAClB;AAEO,MAAM,sBAAsB,CAAC,EAAE,UAAU,aAAuC;AACtF,QAAM,EAAE,OAAO,eAAe,QAAQ,oBAAoB,sBAAsB,iBAC/E;AAED,QAAM,cAAc,MAAM,KAAK,CAAC,MAAM,EAAE,OAAO,aAAa;AAE5D,QAAM,aAAa,MAAM,OAAO,CAAC,MAAM,EAAE,OAAO,aAAa;AAEvD,QAAA,mBAAmB,aAAa,SAAS,YAAY;AAErD,QAAA,wBAAwB,kBAAkB,SAAS,YAAY;AAErE,QAAM,sBAAsBC,KAAA,WAAW,MAAM,KAAKC,KAAAA,YAAY,MAAM;AAEpE,QAAM,iBACL,wBAAwB,uBAAuB,gBAAgB,SAAS,YAAY;AAE/E,QAAA,oBAAoB,wBAAwB,yBAAyB;AAErE,QAAA,oBAAoB,wBAAwB,CAAC;AAEnD,QAAM,gBAAgB;AAAA,IACrB,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAEA,wCAAQC,mBAAAA,mBAAmB,UAAnB,EAA4B,OAAO,eAAgB,UAAS;AACrE;;"}
1
+ {"version":3,"file":"harmony92.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
@@ -1,45 +1,15 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { isFreePlan, isTrialPlan } from "./harmony8.mjs";
3
- import { SidebarTeamRoles } from "./harmony106.mjs";
4
- import { ProfileMenuContext } from "./harmony93.mjs";
5
- const billingRoles = [
6
- SidebarTeamRoles.biller,
7
- SidebarTeamRoles.owner,
8
- SidebarTeamRoles.admin
9
- ];
10
- const teamSettingsRoles = [
11
- SidebarTeamRoles.biller,
12
- SidebarTeamRoles.owner,
13
- SidebarTeamRoles.admin
14
- ];
15
- const upgradeCtaRoles = [
16
- SidebarTeamRoles.biller,
17
- SidebarTeamRoles.owner
18
- ];
19
- const ProfileMenuProvider = ({ children, config }) => {
20
- const { teams, currentTeamId, planId, isEndOfTrialActive, isFullyAuthenticated, userTeamRole } = config;
21
- const currentTeam = teams.find((t) => t.id === currentTeamId);
22
- const otherTeams = teams.filter((t) => t.id !== currentTeamId);
23
- const canChangeBilling = billingRoles.includes(userTeamRole);
24
- const canAccessTeamSettings = teamSettingsRoles.includes(userTeamRole);
25
- const isOnFreeOrTrialPlan = isFreePlan(planId) || isTrialPlan(planId);
26
- const showUpgradeCta = isFullyAuthenticated && isOnFreeOrTrialPlan && upgradeCtaRoles.includes(userTeamRole);
27
- const showBillingButton = isFullyAuthenticated && canAccessTeamSettings && canChangeBilling;
28
- const allowTeamCreation = isFullyAuthenticated && !isEndOfTrialActive;
29
- const providerValue = {
30
- ...config,
31
- currentTeam,
32
- otherTeams,
33
- canChangeBilling,
34
- canAccessTeamSettings,
35
- isOnFreeOrTrialPlan,
36
- showUpgradeCta,
37
- showBillingButton,
38
- allowTeamCreation
39
- };
40
- return /* @__PURE__ */ jsx(ProfileMenuContext.Provider, { value: providerValue, children });
1
+ const headerSortButton = "_headerSortButton_b5tlh_1";
2
+ const centeredCell = "_centeredCell_b5tlh_15";
3
+ const rightAlignedCell = "_rightAlignedCell_b5tlh_19";
4
+ const styles = {
5
+ headerSortButton,
6
+ centeredCell,
7
+ rightAlignedCell
41
8
  };
42
9
  export {
43
- ProfileMenuProvider
10
+ centeredCell,
11
+ styles as default,
12
+ headerSortButton,
13
+ rightAlignedCell
44
14
  };
45
15
  //# sourceMappingURL=harmony92.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony92.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuProvider.tsx"],"sourcesContent":["import { isFreePlan, isTrialPlan } from '@utils'\nimport type { PropsWithChildren } from 'react'\nimport { type SidebarTeamRole, SidebarTeamRoles } from '../../types'\nimport { ProfileMenuContext } from './ProfileMenuContext'\nimport type { SidebarProfileMenuConfig } from './types'\n\ntype ProfileMenuProviderProps = PropsWithChildren<{\n\tconfig: SidebarProfileMenuConfig\n}>\n\nconst billingRoles: ReadonlyArray<SidebarTeamRole> = [\n\tSidebarTeamRoles.biller,\n\tSidebarTeamRoles.owner,\n\tSidebarTeamRoles.admin,\n]\n\nconst teamSettingsRoles: ReadonlyArray<SidebarTeamRole> = [\n\tSidebarTeamRoles.biller,\n\tSidebarTeamRoles.owner,\n\tSidebarTeamRoles.admin,\n]\n\nconst upgradeCtaRoles: ReadonlyArray<SidebarTeamRole> = [\n\tSidebarTeamRoles.biller,\n\tSidebarTeamRoles.owner,\n]\n\nexport const ProfileMenuProvider = ({ children, config }: ProfileMenuProviderProps) => {\n\tconst { teams, currentTeamId, planId, isEndOfTrialActive, isFullyAuthenticated, userTeamRole } =\n\t\tconfig\n\n\tconst currentTeam = teams.find((t) => t.id === currentTeamId)\n\n\tconst otherTeams = teams.filter((t) => t.id !== currentTeamId)\n\n\tconst canChangeBilling = billingRoles.includes(userTeamRole)\n\n\tconst canAccessTeamSettings = teamSettingsRoles.includes(userTeamRole)\n\n\tconst isOnFreeOrTrialPlan = isFreePlan(planId) || isTrialPlan(planId)\n\n\tconst showUpgradeCta =\n\t\tisFullyAuthenticated && isOnFreeOrTrialPlan && upgradeCtaRoles.includes(userTeamRole)\n\n\tconst showBillingButton = isFullyAuthenticated && canAccessTeamSettings && canChangeBilling\n\n\tconst allowTeamCreation = isFullyAuthenticated && !isEndOfTrialActive\n\n\tconst providerValue = {\n\t\t...config,\n\t\tcurrentTeam,\n\t\totherTeams,\n\t\tcanChangeBilling,\n\t\tcanAccessTeamSettings,\n\t\tisOnFreeOrTrialPlan,\n\t\tshowUpgradeCta,\n\t\tshowBillingButton,\n\t\tallowTeamCreation,\n\t}\n\n\treturn <ProfileMenuContext.Provider value={providerValue}>{children}</ProfileMenuContext.Provider>\n}\n"],"names":[],"mappings":";;;;AAUA,MAAM,eAA+C;AAAA,EACpD,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAClB;AAEA,MAAM,oBAAoD;AAAA,EACzD,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAClB;AAEA,MAAM,kBAAkD;AAAA,EACvD,iBAAiB;AAAA,EACjB,iBAAiB;AAClB;AAEO,MAAM,sBAAsB,CAAC,EAAE,UAAU,aAAuC;AACtF,QAAM,EAAE,OAAO,eAAe,QAAQ,oBAAoB,sBAAsB,iBAC/E;AAED,QAAM,cAAc,MAAM,KAAK,CAAC,MAAM,EAAE,OAAO,aAAa;AAE5D,QAAM,aAAa,MAAM,OAAO,CAAC,MAAM,EAAE,OAAO,aAAa;AAEvD,QAAA,mBAAmB,aAAa,SAAS,YAAY;AAErD,QAAA,wBAAwB,kBAAkB,SAAS,YAAY;AAErE,QAAM,sBAAsB,WAAW,MAAM,KAAK,YAAY,MAAM;AAEpE,QAAM,iBACL,wBAAwB,uBAAuB,gBAAgB,SAAS,YAAY;AAE/E,QAAA,oBAAoB,wBAAwB,yBAAyB;AAErE,QAAA,oBAAoB,wBAAwB,CAAC;AAEnD,QAAM,gBAAgB;AAAA,IACrB,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAEA,6BAAQ,mBAAmB,UAAnB,EAA4B,OAAO,eAAgB,UAAS;AACrE;"}
1
+ {"version":3,"file":"harmony92.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,8 +1,102 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const React = require("react");
4
- const ProfileMenuContext = React.createContext({});
5
- const useProfileMenu = () => React.useContext(ProfileMenuContext);
6
- exports.ProfileMenuContext = ProfileMenuContext;
7
- exports.useProfileMenu = useProfileMenu;
4
+ const debounce = require("./harmony111.cjs");
5
+ const throttle = require("./harmony112.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
+ };
97
+ };
98
+ exports.getDimensions = getDimensions;
99
+ exports.patchResizeCallback = patchResizeCallback;
100
+ exports.useCallbackRef = useCallbackRef;
101
+ exports.useRefProxy = useRefProxy;
8
102
  //# sourceMappingURL=harmony93.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony93.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { SidebarProfileMenuContextProps } from './types'\n\nexport const ProfileMenuContext = createContext({} as SidebarProfileMenuContextProps)\n\nexport const useProfileMenu = () => useContext(ProfileMenuContext)\n"],"names":["createContext","useContext"],"mappings":";;;AAGa,MAAA,qBAAqBA,MAAc,cAAA,CAAoC,CAAA;AAEvE,MAAA,iBAAiB,MAAMC,MAAAA,WAAW,kBAAkB;;;"}
1
+ {"version":3,"file":"harmony93.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,8 +1,85 @@
1
- import { useContext, createContext } from "react";
2
- const ProfileMenuContext = createContext({});
3
- const useProfileMenu = () => useContext(ProfileMenuContext);
1
+ import * as React from "react";
2
+ import debounce from "./harmony111.mjs";
3
+ import throttle from "./harmony112.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
+ };
78
+ };
4
79
  export {
5
- ProfileMenuContext,
6
- useProfileMenu
80
+ getDimensions,
81
+ patchResizeCallback,
82
+ useCallbackRef,
83
+ useRefProxy
7
84
  };
8
85
  //# sourceMappingURL=harmony93.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony93.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { SidebarProfileMenuContextProps } from './types'\n\nexport const ProfileMenuContext = createContext({} as SidebarProfileMenuContextProps)\n\nexport const useProfileMenu = () => useContext(ProfileMenuContext)\n"],"names":[],"mappings":";AAGa,MAAA,qBAAqB,cAAc,CAAoC,CAAA;AAEvE,MAAA,iBAAiB,MAAM,WAAW,kBAAkB;"}
1
+ {"version":3,"file":"harmony93.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,12 +1,17 @@
1
1
  "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const container = "_container_q5pot_1";
4
- const profileEmail = "_profileEmail_q5pot_5";
5
- const styles = {
6
- container,
7
- profileEmail
2
+ var __defProp = Object.defineProperty;
3
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
6
+ const jwtTokenPayload = require("./harmony16.cjs");
7
+ const _NewJwtIssuedEvent = class _NewJwtIssuedEvent extends CustomEvent {
8
+ constructor(token) {
9
+ super(_NewJwtIssuedEvent.eventName, {
10
+ detail: { token, payload: jwtTokenPayload.parseJwtTokenPayload(token.accessToken) }
11
+ });
12
+ }
8
13
  };
9
- exports.container = container;
10
- exports.default = styles;
11
- exports.profileEmail = profileEmail;
14
+ __publicField(_NewJwtIssuedEvent, "eventName", "new-jwt-issued");
15
+ let NewJwtIssuedEvent = _NewJwtIssuedEvent;
16
+ exports.NewJwtIssuedEvent = NewJwtIssuedEvent;
12
17
  //# sourceMappingURL=harmony94.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony94.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
1
+ {"version":3,"file":"harmony94.cjs","sources":["../src/features/auth/frontend/events/NewJwtIssuedEvent.ts"],"sourcesContent":["import type { JwtTokenPayload } from '@features/auth/core/types/jwtTokenPayload'\nimport { parseJwtTokenPayload } from '@features/auth/core/utils/jwtTokenPayload'\nimport type { JwtToken } from '@features/publicApi/types/userTokenTypes'\n\ntype NewJwtIssuedEventDetail = {\n\ttoken: JwtToken\n\tpayload: JwtTokenPayload | undefined\n}\n\n/**\n * This event is emitted when a new JWT token is issued or refreshed.\n */\nexport class NewJwtIssuedEvent extends CustomEvent<NewJwtIssuedEventDetail> {\n\tstatic readonly eventName = 'new-jwt-issued' as const\n\n\tconstructor(token: JwtToken) {\n\t\tsuper(NewJwtIssuedEvent.eventName, {\n\t\t\tdetail: { token, payload: parseJwtTokenPayload(token.accessToken) },\n\t\t})\n\t}\n}\n\nexport const isNewJwtIssuedEvent = (event: Event): event is NewJwtIssuedEvent =>\n\tevent.type === NewJwtIssuedEvent.eventName\n\ndeclare global {\n\tinterface WindowEventMap {\n\t\t[NewJwtIssuedEvent.eventName]: NewJwtIssuedEvent\n\t}\n}\n"],"names":["parseJwtTokenPayload"],"mappings":";;;;;;AAYO,MAAM,qBAAN,MAAM,2BAA0B,YAAqC;AAAA,EAG3E,YAAY,OAAiB;AAC5B,UAAM,mBAAkB,WAAW;AAAA,MAClC,QAAQ,EAAE,OAAO,SAASA,gBAAAA,qBAAqB,MAAM,WAAW,EAAE;AAAA,IAAA,CAClE;AAAA,EAAA;AAEH;AAPC,cADY,oBACI,aAAY;AADtB,IAAM,oBAAN;;"}
@@ -1,12 +1,17 @@
1
- const container = "_container_q5pot_1";
2
- const profileEmail = "_profileEmail_q5pot_5";
3
- const styles = {
4
- container,
5
- profileEmail
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+ import { parseJwtTokenPayload } from "./harmony16.mjs";
5
+ const _NewJwtIssuedEvent = class _NewJwtIssuedEvent extends CustomEvent {
6
+ constructor(token) {
7
+ super(_NewJwtIssuedEvent.eventName, {
8
+ detail: { token, payload: parseJwtTokenPayload(token.accessToken) }
9
+ });
10
+ }
6
11
  };
12
+ __publicField(_NewJwtIssuedEvent, "eventName", "new-jwt-issued");
13
+ let NewJwtIssuedEvent = _NewJwtIssuedEvent;
7
14
  export {
8
- container,
9
- styles as default,
10
- profileEmail
15
+ NewJwtIssuedEvent
11
16
  };
12
17
  //# sourceMappingURL=harmony94.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony94.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
1
+ {"version":3,"file":"harmony94.mjs","sources":["../src/features/auth/frontend/events/NewJwtIssuedEvent.ts"],"sourcesContent":["import type { JwtTokenPayload } from '@features/auth/core/types/jwtTokenPayload'\nimport { parseJwtTokenPayload } from '@features/auth/core/utils/jwtTokenPayload'\nimport type { JwtToken } from '@features/publicApi/types/userTokenTypes'\n\ntype NewJwtIssuedEventDetail = {\n\ttoken: JwtToken\n\tpayload: JwtTokenPayload | undefined\n}\n\n/**\n * This event is emitted when a new JWT token is issued or refreshed.\n */\nexport class NewJwtIssuedEvent extends CustomEvent<NewJwtIssuedEventDetail> {\n\tstatic readonly eventName = 'new-jwt-issued' as const\n\n\tconstructor(token: JwtToken) {\n\t\tsuper(NewJwtIssuedEvent.eventName, {\n\t\t\tdetail: { token, payload: parseJwtTokenPayload(token.accessToken) },\n\t\t})\n\t}\n}\n\nexport const isNewJwtIssuedEvent = (event: Event): event is NewJwtIssuedEvent =>\n\tevent.type === NewJwtIssuedEvent.eventName\n\ndeclare global {\n\tinterface WindowEventMap {\n\t\t[NewJwtIssuedEvent.eventName]: NewJwtIssuedEvent\n\t}\n}\n"],"names":[],"mappings":";;;;AAYO,MAAM,qBAAN,MAAM,2BAA0B,YAAqC;AAAA,EAG3E,YAAY,OAAiB;AAC5B,UAAM,mBAAkB,WAAW;AAAA,MAClC,QAAQ,EAAE,OAAO,SAAS,qBAAqB,MAAM,WAAW,EAAE;AAAA,IAAA,CAClE;AAAA,EAAA;AAEH;AAPC,cADY,oBACI,aAAY;AADtB,IAAM,oBAAN;"}