@lokalise/harmony 4.7.2 → 4.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (418) hide show
  1. package/README.md +8 -0
  2. package/dist/harmony.cjs +159 -159
  3. package/dist/harmony.mjs +89 -89
  4. package/dist/harmony100.cjs +10 -17
  5. package/dist/harmony100.cjs.map +1 -1
  6. package/dist/harmony100.mjs +10 -17
  7. package/dist/harmony100.mjs.map +1 -1
  8. package/dist/harmony110.cjs +4 -4
  9. package/dist/harmony110.mjs +4 -4
  10. package/dist/harmony118.cjs +1 -1
  11. package/dist/harmony118.mjs +1 -1
  12. package/dist/harmony119.cjs +1 -1
  13. package/dist/harmony119.mjs +1 -1
  14. package/dist/harmony12.cjs +55 -30
  15. package/dist/harmony12.cjs.map +1 -1
  16. package/dist/harmony12.mjs +55 -30
  17. package/dist/harmony12.mjs.map +1 -1
  18. package/dist/harmony120.cjs +1 -1
  19. package/dist/harmony120.mjs +1 -1
  20. package/dist/harmony125.cjs +1 -1
  21. package/dist/harmony125.mjs +1 -1
  22. package/dist/harmony13.cjs +30 -22
  23. package/dist/harmony13.cjs.map +1 -1
  24. package/dist/harmony13.mjs +30 -22
  25. package/dist/harmony13.mjs.map +1 -1
  26. package/dist/harmony136.cjs +2 -2
  27. package/dist/harmony136.mjs +2 -2
  28. package/dist/harmony137.cjs +2 -2
  29. package/dist/harmony137.mjs +2 -2
  30. package/dist/harmony138.cjs +20 -8
  31. package/dist/harmony138.cjs.map +1 -1
  32. package/dist/harmony138.mjs +20 -8
  33. package/dist/harmony138.mjs.map +1 -1
  34. package/dist/harmony139.cjs +3 -3
  35. package/dist/harmony139.cjs.map +1 -1
  36. package/dist/harmony139.mjs +3 -3
  37. package/dist/harmony139.mjs.map +1 -1
  38. package/dist/harmony14.cjs +11 -52
  39. package/dist/harmony14.cjs.map +1 -1
  40. package/dist/harmony14.mjs +11 -52
  41. package/dist/harmony14.mjs.map +1 -1
  42. package/dist/harmony140.cjs +7 -20
  43. package/dist/harmony140.cjs.map +1 -1
  44. package/dist/harmony140.mjs +7 -20
  45. package/dist/harmony140.mjs.map +1 -1
  46. package/dist/harmony141.cjs +21 -20
  47. package/dist/harmony141.cjs.map +1 -1
  48. package/dist/harmony141.mjs +21 -20
  49. package/dist/harmony141.mjs.map +1 -1
  50. package/dist/harmony149.cjs +1 -1
  51. package/dist/harmony149.mjs +1 -1
  52. package/dist/harmony15.cjs +55 -9
  53. package/dist/harmony15.cjs.map +1 -1
  54. package/dist/harmony15.mjs +55 -9
  55. package/dist/harmony15.mjs.map +1 -1
  56. package/dist/harmony152.cjs +1 -1
  57. package/dist/harmony152.mjs +1 -1
  58. package/dist/harmony16.cjs +30 -5
  59. package/dist/harmony16.cjs.map +1 -1
  60. package/dist/harmony16.mjs +30 -5
  61. package/dist/harmony16.mjs.map +1 -1
  62. package/dist/harmony160.cjs +2 -2
  63. package/dist/harmony160.mjs +2 -2
  64. package/dist/harmony162.cjs +1 -1
  65. package/dist/harmony162.mjs +1 -1
  66. package/dist/harmony163.cjs +1 -1
  67. package/dist/harmony163.mjs +1 -1
  68. package/dist/harmony164.cjs +1 -1
  69. package/dist/harmony164.mjs +1 -1
  70. package/dist/harmony165.cjs +2 -2
  71. package/dist/harmony165.mjs +2 -2
  72. package/dist/harmony166.cjs +1 -1
  73. package/dist/harmony166.mjs +1 -1
  74. package/dist/harmony167.cjs +1 -1
  75. package/dist/harmony167.mjs +1 -1
  76. package/dist/harmony168.cjs +2 -2
  77. package/dist/harmony168.mjs +2 -2
  78. package/dist/harmony17.cjs +18 -15
  79. package/dist/harmony17.cjs.map +1 -1
  80. package/dist/harmony17.mjs +18 -15
  81. package/dist/harmony17.mjs.map +1 -1
  82. package/dist/harmony18.cjs +28 -32
  83. package/dist/harmony18.cjs.map +1 -1
  84. package/dist/harmony18.mjs +28 -32
  85. package/dist/harmony18.mjs.map +1 -1
  86. package/dist/harmony19.cjs +14 -5
  87. package/dist/harmony19.cjs.map +1 -1
  88. package/dist/harmony19.mjs +14 -5
  89. package/dist/harmony19.mjs.map +1 -1
  90. package/dist/harmony20.cjs +13 -10
  91. package/dist/harmony20.cjs.map +1 -1
  92. package/dist/harmony20.mjs +13 -10
  93. package/dist/harmony20.mjs.map +1 -1
  94. package/dist/harmony21.cjs +13 -10
  95. package/dist/harmony21.cjs.map +1 -1
  96. package/dist/harmony21.mjs +13 -10
  97. package/dist/harmony21.mjs.map +1 -1
  98. package/dist/harmony22.cjs +13 -17
  99. package/dist/harmony22.cjs.map +1 -1
  100. package/dist/harmony22.mjs +13 -17
  101. package/dist/harmony22.mjs.map +1 -1
  102. package/dist/harmony23.cjs +13 -15
  103. package/dist/harmony23.cjs.map +1 -1
  104. package/dist/harmony23.mjs +13 -15
  105. package/dist/harmony23.mjs.map +1 -1
  106. package/dist/harmony24.cjs +13 -141
  107. package/dist/harmony24.cjs.map +1 -1
  108. package/dist/harmony24.mjs +13 -141
  109. package/dist/harmony24.mjs.map +1 -1
  110. package/dist/harmony25.cjs +13 -19
  111. package/dist/harmony25.cjs.map +1 -1
  112. package/dist/harmony25.mjs +13 -19
  113. package/dist/harmony25.mjs.map +1 -1
  114. package/dist/harmony26.cjs +12 -13
  115. package/dist/harmony26.cjs.map +1 -1
  116. package/dist/harmony26.mjs +12 -13
  117. package/dist/harmony26.mjs.map +1 -1
  118. package/dist/harmony27.cjs +20 -15
  119. package/dist/harmony27.cjs.map +1 -1
  120. package/dist/harmony27.mjs +21 -16
  121. package/dist/harmony27.mjs.map +1 -1
  122. package/dist/harmony28.cjs +12 -17
  123. package/dist/harmony28.cjs.map +1 -1
  124. package/dist/harmony28.mjs +13 -18
  125. package/dist/harmony28.mjs.map +1 -1
  126. package/dist/harmony29.cjs +12 -19
  127. package/dist/harmony29.cjs.map +1 -1
  128. package/dist/harmony29.mjs +12 -19
  129. package/dist/harmony29.mjs.map +1 -1
  130. package/dist/harmony30.cjs +16 -19
  131. package/dist/harmony30.cjs.map +1 -1
  132. package/dist/harmony30.mjs +16 -19
  133. package/dist/harmony30.mjs.map +1 -1
  134. package/dist/harmony31.cjs +15 -8
  135. package/dist/harmony31.cjs.map +1 -1
  136. package/dist/harmony31.mjs +15 -8
  137. package/dist/harmony31.mjs.map +1 -1
  138. package/dist/harmony32.cjs +15 -11
  139. package/dist/harmony32.cjs.map +1 -1
  140. package/dist/harmony32.mjs +15 -11
  141. package/dist/harmony32.mjs.map +1 -1
  142. package/dist/harmony33.cjs +14 -13
  143. package/dist/harmony33.cjs.map +1 -1
  144. package/dist/harmony33.mjs +14 -13
  145. package/dist/harmony33.mjs.map +1 -1
  146. package/dist/harmony34.cjs +16 -13
  147. package/dist/harmony34.cjs.map +1 -1
  148. package/dist/harmony34.mjs +16 -13
  149. package/dist/harmony34.mjs.map +1 -1
  150. package/dist/harmony35.cjs +16 -13
  151. package/dist/harmony35.cjs.map +1 -1
  152. package/dist/harmony35.mjs +16 -13
  153. package/dist/harmony35.mjs.map +1 -1
  154. package/dist/harmony36.cjs +14 -13
  155. package/dist/harmony36.cjs.map +1 -1
  156. package/dist/harmony36.mjs +14 -13
  157. package/dist/harmony36.mjs.map +1 -1
  158. package/dist/harmony37.cjs +16 -13
  159. package/dist/harmony37.cjs.map +1 -1
  160. package/dist/harmony37.mjs +16 -13
  161. package/dist/harmony37.mjs.map +1 -1
  162. package/dist/harmony38.cjs +16 -7
  163. package/dist/harmony38.cjs.map +1 -1
  164. package/dist/harmony38.mjs +16 -7
  165. package/dist/harmony38.mjs.map +1 -1
  166. package/dist/harmony39.cjs +16 -7
  167. package/dist/harmony39.cjs.map +1 -1
  168. package/dist/harmony39.mjs +16 -7
  169. package/dist/harmony39.mjs.map +1 -1
  170. package/dist/harmony40.cjs +16 -7
  171. package/dist/harmony40.cjs.map +1 -1
  172. package/dist/harmony40.mjs +16 -7
  173. package/dist/harmony40.mjs.map +1 -1
  174. package/dist/harmony41.cjs +16 -7
  175. package/dist/harmony41.cjs.map +1 -1
  176. package/dist/harmony41.mjs +16 -7
  177. package/dist/harmony41.mjs.map +1 -1
  178. package/dist/harmony42.cjs +16 -8
  179. package/dist/harmony42.cjs.map +1 -1
  180. package/dist/harmony42.mjs +16 -8
  181. package/dist/harmony42.mjs.map +1 -1
  182. package/dist/harmony43.cjs +14 -8
  183. package/dist/harmony43.cjs.map +1 -1
  184. package/dist/harmony43.mjs +14 -8
  185. package/dist/harmony43.mjs.map +1 -1
  186. package/dist/harmony44.cjs +16 -16
  187. package/dist/harmony44.cjs.map +1 -1
  188. package/dist/harmony44.mjs +16 -16
  189. package/dist/harmony44.mjs.map +1 -1
  190. package/dist/harmony45.cjs +17 -6
  191. package/dist/harmony45.cjs.map +1 -1
  192. package/dist/harmony45.mjs +17 -6
  193. package/dist/harmony45.mjs.map +1 -1
  194. package/dist/harmony46.cjs +18 -5
  195. package/dist/harmony46.cjs.map +1 -1
  196. package/dist/harmony46.mjs +18 -5
  197. package/dist/harmony46.mjs.map +1 -1
  198. package/dist/harmony47.cjs +14 -40
  199. package/dist/harmony47.cjs.map +1 -1
  200. package/dist/harmony47.mjs +14 -40
  201. package/dist/harmony47.mjs.map +1 -1
  202. package/dist/harmony48.cjs +14 -64
  203. package/dist/harmony48.cjs.map +1 -1
  204. package/dist/harmony48.mjs +14 -64
  205. package/dist/harmony48.mjs.map +1 -1
  206. package/dist/harmony49.cjs +14 -11
  207. package/dist/harmony49.cjs.map +1 -1
  208. package/dist/harmony49.mjs +14 -11
  209. package/dist/harmony49.mjs.map +1 -1
  210. package/dist/harmony5.cjs +7 -5
  211. package/dist/harmony5.cjs.map +1 -1
  212. package/dist/harmony5.mjs +7 -5
  213. package/dist/harmony5.mjs.map +1 -1
  214. package/dist/harmony50.cjs +105 -55
  215. package/dist/harmony50.cjs.map +1 -1
  216. package/dist/harmony50.mjs +104 -54
  217. package/dist/harmony50.mjs.map +1 -1
  218. package/dist/harmony51.cjs +13 -28
  219. package/dist/harmony51.cjs.map +1 -1
  220. package/dist/harmony51.mjs +13 -28
  221. package/dist/harmony51.mjs.map +1 -1
  222. package/dist/harmony52.cjs +124 -11
  223. package/dist/harmony52.cjs.map +1 -1
  224. package/dist/harmony52.mjs +123 -10
  225. package/dist/harmony52.mjs.map +1 -1
  226. package/dist/harmony53.cjs +82 -55
  227. package/dist/harmony53.cjs.map +1 -1
  228. package/dist/harmony53.mjs +81 -54
  229. package/dist/harmony53.mjs.map +1 -1
  230. package/dist/harmony54.cjs +5 -29
  231. package/dist/harmony54.cjs.map +1 -1
  232. package/dist/harmony54.mjs +5 -29
  233. package/dist/harmony54.mjs.map +1 -1
  234. package/dist/harmony55.cjs +20 -16
  235. package/dist/harmony55.cjs.map +1 -1
  236. package/dist/harmony55.mjs +20 -16
  237. package/dist/harmony55.mjs.map +1 -1
  238. package/dist/harmony56.cjs +23 -27
  239. package/dist/harmony56.cjs.map +1 -1
  240. package/dist/harmony56.mjs +23 -27
  241. package/dist/harmony56.mjs.map +1 -1
  242. package/dist/harmony57.cjs +151 -13
  243. package/dist/harmony57.cjs.map +1 -1
  244. package/dist/harmony57.mjs +150 -12
  245. package/dist/harmony57.mjs.map +1 -1
  246. package/dist/harmony58.cjs +37 -14
  247. package/dist/harmony58.cjs.map +1 -1
  248. package/dist/harmony58.mjs +37 -14
  249. package/dist/harmony58.mjs.map +1 -1
  250. package/dist/harmony59.cjs +26 -14
  251. package/dist/harmony59.cjs.map +1 -1
  252. package/dist/harmony59.mjs +26 -14
  253. package/dist/harmony59.mjs.map +1 -1
  254. package/dist/harmony6.cjs +1 -1
  255. package/dist/harmony6.mjs +2 -2
  256. package/dist/harmony60.cjs +85 -13
  257. package/dist/harmony60.cjs.map +1 -1
  258. package/dist/harmony60.mjs +85 -13
  259. package/dist/harmony60.mjs.map +1 -1
  260. package/dist/harmony61.cjs +47 -14
  261. package/dist/harmony61.cjs.map +1 -1
  262. package/dist/harmony61.mjs +47 -14
  263. package/dist/harmony61.mjs.map +1 -1
  264. package/dist/harmony62.cjs +18 -14
  265. package/dist/harmony62.cjs.map +1 -1
  266. package/dist/harmony62.mjs +18 -14
  267. package/dist/harmony62.mjs.map +1 -1
  268. package/dist/harmony63.cjs +30 -14
  269. package/dist/harmony63.cjs.map +1 -1
  270. package/dist/harmony63.mjs +30 -14
  271. package/dist/harmony63.mjs.map +1 -1
  272. package/dist/harmony64.cjs +22 -12
  273. package/dist/harmony64.cjs.map +1 -1
  274. package/dist/harmony64.mjs +22 -12
  275. package/dist/harmony64.mjs.map +1 -1
  276. package/dist/harmony65.cjs +52 -22
  277. package/dist/harmony65.cjs.map +1 -1
  278. package/dist/harmony65.mjs +52 -22
  279. package/dist/harmony65.mjs.map +1 -1
  280. package/dist/harmony66.cjs +8 -12
  281. package/dist/harmony66.cjs.map +1 -1
  282. package/dist/harmony66.mjs +8 -12
  283. package/dist/harmony66.mjs.map +1 -1
  284. package/dist/harmony67.cjs +4 -12
  285. package/dist/harmony67.cjs.map +1 -1
  286. package/dist/harmony67.mjs +4 -12
  287. package/dist/harmony67.mjs.map +1 -1
  288. package/dist/harmony68.cjs +14 -16
  289. package/dist/harmony68.cjs.map +1 -1
  290. package/dist/harmony68.mjs +14 -16
  291. package/dist/harmony68.mjs.map +1 -1
  292. package/dist/harmony69.cjs +30 -15
  293. package/dist/harmony69.cjs.map +1 -1
  294. package/dist/harmony69.mjs +30 -15
  295. package/dist/harmony69.mjs.map +1 -1
  296. package/dist/harmony7.cjs +1 -1
  297. package/dist/harmony7.mjs +1 -1
  298. package/dist/harmony70.cjs +5 -15
  299. package/dist/harmony70.cjs.map +1 -1
  300. package/dist/harmony70.mjs +5 -15
  301. package/dist/harmony70.mjs.map +1 -1
  302. package/dist/harmony71.cjs +11 -15
  303. package/dist/harmony71.cjs.map +1 -1
  304. package/dist/harmony71.mjs +11 -15
  305. package/dist/harmony71.mjs.map +1 -1
  306. package/dist/harmony72.cjs +10 -16
  307. package/dist/harmony72.cjs.map +1 -1
  308. package/dist/harmony72.mjs +10 -16
  309. package/dist/harmony72.mjs.map +1 -1
  310. package/dist/harmony73.cjs +17 -16
  311. package/dist/harmony73.cjs.map +1 -1
  312. package/dist/harmony73.mjs +17 -16
  313. package/dist/harmony73.mjs.map +1 -1
  314. package/dist/harmony74.cjs +16 -15
  315. package/dist/harmony74.cjs.map +1 -1
  316. package/dist/harmony74.mjs +16 -15
  317. package/dist/harmony74.mjs.map +1 -1
  318. package/dist/harmony75.cjs +142 -17
  319. package/dist/harmony75.cjs.map +1 -1
  320. package/dist/harmony75.mjs +142 -17
  321. package/dist/harmony75.mjs.map +1 -1
  322. package/dist/harmony76.cjs +19 -16
  323. package/dist/harmony76.cjs.map +1 -1
  324. package/dist/harmony76.mjs +19 -16
  325. package/dist/harmony76.mjs.map +1 -1
  326. package/dist/harmony77.cjs +13 -16
  327. package/dist/harmony77.cjs.map +1 -1
  328. package/dist/harmony77.mjs +13 -16
  329. package/dist/harmony77.mjs.map +1 -1
  330. package/dist/harmony78.cjs +15 -15
  331. package/dist/harmony78.cjs.map +1 -1
  332. package/dist/harmony78.mjs +16 -16
  333. package/dist/harmony78.mjs.map +1 -1
  334. package/dist/harmony79.cjs +16 -15
  335. package/dist/harmony79.cjs.map +1 -1
  336. package/dist/harmony79.mjs +17 -16
  337. package/dist/harmony79.mjs.map +1 -1
  338. package/dist/harmony80.cjs +18 -15
  339. package/dist/harmony80.cjs.map +1 -1
  340. package/dist/harmony80.mjs +18 -15
  341. package/dist/harmony80.mjs.map +1 -1
  342. package/dist/harmony81.cjs +20 -15
  343. package/dist/harmony81.cjs.map +1 -1
  344. package/dist/harmony81.mjs +20 -15
  345. package/dist/harmony81.mjs.map +1 -1
  346. package/dist/harmony82.cjs +8 -15
  347. package/dist/harmony82.cjs.map +1 -1
  348. package/dist/harmony82.mjs +8 -15
  349. package/dist/harmony82.mjs.map +1 -1
  350. package/dist/harmony83.cjs +9 -15
  351. package/dist/harmony83.cjs.map +1 -1
  352. package/dist/harmony83.mjs +9 -15
  353. package/dist/harmony83.mjs.map +1 -1
  354. package/dist/harmony84.cjs +13 -17
  355. package/dist/harmony84.cjs.map +1 -1
  356. package/dist/harmony84.mjs +13 -17
  357. package/dist/harmony84.mjs.map +1 -1
  358. package/dist/harmony85.cjs +14 -14
  359. package/dist/harmony85.cjs.map +1 -1
  360. package/dist/harmony85.mjs +14 -14
  361. package/dist/harmony85.mjs.map +1 -1
  362. package/dist/harmony86.cjs +14 -14
  363. package/dist/harmony86.cjs.map +1 -1
  364. package/dist/harmony86.mjs +14 -14
  365. package/dist/harmony86.mjs.map +1 -1
  366. package/dist/harmony87.cjs +14 -14
  367. package/dist/harmony87.cjs.map +1 -1
  368. package/dist/harmony87.mjs +14 -14
  369. package/dist/harmony87.mjs.map +1 -1
  370. package/dist/harmony88.cjs +14 -105
  371. package/dist/harmony88.cjs.map +1 -1
  372. package/dist/harmony88.mjs +14 -105
  373. package/dist/harmony88.mjs.map +1 -1
  374. package/dist/harmony89.cjs +8 -16
  375. package/dist/harmony89.cjs.map +1 -1
  376. package/dist/harmony89.mjs +8 -16
  377. package/dist/harmony89.mjs.map +1 -1
  378. package/dist/harmony90.cjs +8 -124
  379. package/dist/harmony90.cjs.map +1 -1
  380. package/dist/harmony90.mjs +8 -124
  381. package/dist/harmony90.mjs.map +1 -1
  382. package/dist/harmony91.cjs +8 -82
  383. package/dist/harmony91.cjs.map +1 -1
  384. package/dist/harmony91.mjs +8 -82
  385. package/dist/harmony91.mjs.map +1 -1
  386. package/dist/harmony92.cjs +8 -6
  387. package/dist/harmony92.cjs.map +1 -1
  388. package/dist/harmony92.mjs +8 -6
  389. package/dist/harmony92.mjs.map +1 -1
  390. package/dist/harmony93.cjs +9 -22
  391. package/dist/harmony93.cjs.map +1 -1
  392. package/dist/harmony93.mjs +9 -22
  393. package/dist/harmony93.mjs.map +1 -1
  394. package/dist/harmony94.cjs +9 -24
  395. package/dist/harmony94.cjs.map +1 -1
  396. package/dist/harmony94.mjs +9 -24
  397. package/dist/harmony94.mjs.map +1 -1
  398. package/dist/harmony95.cjs +17 -152
  399. package/dist/harmony95.cjs.map +1 -1
  400. package/dist/harmony95.mjs +17 -152
  401. package/dist/harmony95.mjs.map +1 -1
  402. package/dist/harmony96.cjs +5 -36
  403. package/dist/harmony96.cjs.map +1 -1
  404. package/dist/harmony96.mjs +5 -36
  405. package/dist/harmony96.mjs.map +1 -1
  406. package/dist/harmony97.cjs +4 -25
  407. package/dist/harmony97.cjs.map +1 -1
  408. package/dist/harmony97.mjs +4 -25
  409. package/dist/harmony97.mjs.map +1 -1
  410. package/dist/harmony98.cjs +38 -84
  411. package/dist/harmony98.cjs.map +1 -1
  412. package/dist/harmony98.mjs +38 -84
  413. package/dist/harmony98.mjs.map +1 -1
  414. package/dist/harmony99.cjs +63 -46
  415. package/dist/harmony99.cjs.map +1 -1
  416. package/dist/harmony99.mjs +63 -46
  417. package/dist/harmony99.mjs.map +1 -1
  418. package/package.json +2 -1
@@ -1,11 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const ActionResolverContext = require("./harmony37.cjs");
5
- const canPerformAction = require("./harmony44.cjs");
6
- const useCanPerformAction = (action) => {
7
- const context = ActionResolverContext.useActionResolverContext();
8
- return React.useMemo(() => canPerformAction.canPerformAction(action, context), [action, context]);
3
+ const languages = require("./harmony13.cjs");
4
+ const frontendHttpClient = require("@lokalise/frontend-http-client");
5
+ const reactQuery = require("@tanstack/react-query");
6
+ const listProjectLanguagesKey = {
7
+ projectIdKey: (projectId) => ["listProjectLanguages", projectId]
9
8
  };
10
- exports.useCanPerformAction = useCanPerformAction;
9
+ function useListProjectLanguagesQuery(wretchClient, headers, overrides) {
10
+ return reactQuery.useQuery({
11
+ ...overrides,
12
+ queryFn: async ({ queryKey: [_, projectId] }) => frontendHttpClient.sendByGetRoute(wretchClient, languages.listProjectLanguages, {
13
+ headers: await headers.resolve(),
14
+ pathParams: { projectId }
15
+ })
16
+ });
17
+ }
18
+ exports.listProjectLanguagesKey = listProjectLanguagesKey;
19
+ exports.useListProjectLanguagesQuery = useListProjectLanguagesQuery;
11
20
  //# sourceMappingURL=harmony38.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony38.cjs","sources":["../src/features/permissions/hooks/useCanPerformAction.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport type { Action } from '../actionResolvers'\nimport { useActionResolverContext } from '../context/ActionResolverContext'\nimport { canPerformAction } from '../core/canPerformAction'\n\n/**\n * React hook to determine if the current user has permission to perform a specific action.\n *\n * This hook is useful for conditionally rendering UI elements or triggering logic\n * based on whether the user can perform a given action.\n * It leverages the permissions context and returns a boolean indicating the user's ability.\n *\n * @param action The action to check permission for (e.g. 'accessMarketingProjects', 'deleteProjects').\n * @returns {boolean} True if the user can perform the action, otherwise false.\n *\n * @example\n * // Check if the user can access marketing projects\n * const canAccess = useCanPerformAction(\"accessMarketingProjects\");\n * if (canAccess) {\n * // show marketing dashboard\n * }\n */\nexport const useCanPerformAction = (action: Action): boolean => {\n\tconst context = useActionResolverContext()\n\n\treturn useMemo(() => canPerformAction(action, context), [action, context])\n}\n"],"names":["useActionResolverContext","useMemo","canPerformAction"],"mappings":";;;;;AAsBa,MAAA,sBAAsB,CAAC,WAA4B;AAC/D,QAAM,UAAUA,sBAAAA,yBAAyB;AAElC,SAAAC,MAAA,QAAQ,MAAMC,iBAAAA,iBAAiB,QAAQ,OAAO,GAAG,CAAC,QAAQ,OAAO,CAAC;AAC1E;;"}
1
+ {"version":3,"file":"harmony38.cjs","sources":["../src/features/publicApi/hooks/useListProjectLanguagesQuery.ts"],"sourcesContent":["import type { HeaderBuilder } from '@features/auth/core/headers/headerBuilder'\nimport { listProjectLanguages } from '@features/publicApi/languages'\nimport type { ListProjectLanguagesResponse } from '@features/publicApi/types/languageTypes'\nimport type { ProjectApiBaseHeaders } from '@features/publicApi/types/projectTypes'\nimport { sendByGetRoute } from '@lokalise/frontend-http-client'\nimport { useQuery } from '@tanstack/react-query'\nimport type { ApiQueryOverrides } from '@utils/types/apiQueryOverrides'\nimport type { Wretch } from 'wretch/types'\n\nexport const listProjectLanguagesKey = {\n\tprojectIdKey: (projectId: string) => ['listProjectLanguages', projectId] as const,\n}\n\n/**\n * A react-router wrapper about the listProjectLanguages public API endpoint\n *\n * @param wretchClient - Wretch instance configured to a public API instance.\n * @param headers - A header builder instance to resolve the headers for the request.\n * @param overrides - Additional options to pass to the query.\n */\nexport function useListProjectLanguagesQuery<T, S = ListProjectLanguagesResponse>(\n\twretchClient: Wretch<T>,\n\theaders: HeaderBuilder<ProjectApiBaseHeaders>,\n\toverrides: ApiQueryOverrides<ListProjectLanguagesResponse, typeof listProjectLanguagesKey, S>,\n) {\n\treturn useQuery({\n\t\t...overrides,\n\t\tqueryFn: async ({ queryKey: [_, projectId] }) =>\n\t\t\tsendByGetRoute(wretchClient, listProjectLanguages, {\n\t\t\t\theaders: await headers.resolve(),\n\t\t\t\tpathParams: { projectId },\n\t\t\t}),\n\t})\n}\n"],"names":["useQuery","sendByGetRoute","listProjectLanguages"],"mappings":";;;;;AASO,MAAM,0BAA0B;AAAA,EACtC,cAAc,CAAC,cAAsB,CAAC,wBAAwB,SAAS;AACxE;AASgB,SAAA,6BACf,cACA,SACA,WACC;AACD,SAAOA,oBAAS;AAAA,IACf,GAAG;AAAA,IACH,SAAS,OAAO,EAAE,UAAU,CAAC,GAAG,SAAS,QACxCC,mBAAAA,eAAe,cAAcC,gCAAsB;AAAA,MAClD,SAAS,MAAM,QAAQ,QAAQ;AAAA,MAC/B,YAAY,EAAE,UAAU;AAAA,IACxB,CAAA;AAAA,EAAA,CACF;AACF;;;"}
@@ -1,11 +1,20 @@
1
- import { useMemo } from "react";
2
- import { useActionResolverContext } from "./harmony37.mjs";
3
- import { canPerformAction } from "./harmony44.mjs";
4
- const useCanPerformAction = (action) => {
5
- const context = useActionResolverContext();
6
- return useMemo(() => canPerformAction(action, context), [action, context]);
1
+ import { listProjectLanguages } from "./harmony13.mjs";
2
+ import { sendByGetRoute } from "@lokalise/frontend-http-client";
3
+ import { useQuery } from "@tanstack/react-query";
4
+ const listProjectLanguagesKey = {
5
+ projectIdKey: (projectId) => ["listProjectLanguages", projectId]
7
6
  };
7
+ function useListProjectLanguagesQuery(wretchClient, headers, overrides) {
8
+ return useQuery({
9
+ ...overrides,
10
+ queryFn: async ({ queryKey: [_, projectId] }) => sendByGetRoute(wretchClient, listProjectLanguages, {
11
+ headers: await headers.resolve(),
12
+ pathParams: { projectId }
13
+ })
14
+ });
15
+ }
8
16
  export {
9
- useCanPerformAction
17
+ listProjectLanguagesKey,
18
+ useListProjectLanguagesQuery
10
19
  };
11
20
  //# sourceMappingURL=harmony38.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony38.mjs","sources":["../src/features/permissions/hooks/useCanPerformAction.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport type { Action } from '../actionResolvers'\nimport { useActionResolverContext } from '../context/ActionResolverContext'\nimport { canPerformAction } from '../core/canPerformAction'\n\n/**\n * React hook to determine if the current user has permission to perform a specific action.\n *\n * This hook is useful for conditionally rendering UI elements or triggering logic\n * based on whether the user can perform a given action.\n * It leverages the permissions context and returns a boolean indicating the user's ability.\n *\n * @param action The action to check permission for (e.g. 'accessMarketingProjects', 'deleteProjects').\n * @returns {boolean} True if the user can perform the action, otherwise false.\n *\n * @example\n * // Check if the user can access marketing projects\n * const canAccess = useCanPerformAction(\"accessMarketingProjects\");\n * if (canAccess) {\n * // show marketing dashboard\n * }\n */\nexport const useCanPerformAction = (action: Action): boolean => {\n\tconst context = useActionResolverContext()\n\n\treturn useMemo(() => canPerformAction(action, context), [action, context])\n}\n"],"names":[],"mappings":";;;AAsBa,MAAA,sBAAsB,CAAC,WAA4B;AAC/D,QAAM,UAAU,yBAAyB;AAElC,SAAA,QAAQ,MAAM,iBAAiB,QAAQ,OAAO,GAAG,CAAC,QAAQ,OAAO,CAAC;AAC1E;"}
1
+ {"version":3,"file":"harmony38.mjs","sources":["../src/features/publicApi/hooks/useListProjectLanguagesQuery.ts"],"sourcesContent":["import type { HeaderBuilder } from '@features/auth/core/headers/headerBuilder'\nimport { listProjectLanguages } from '@features/publicApi/languages'\nimport type { ListProjectLanguagesResponse } from '@features/publicApi/types/languageTypes'\nimport type { ProjectApiBaseHeaders } from '@features/publicApi/types/projectTypes'\nimport { sendByGetRoute } from '@lokalise/frontend-http-client'\nimport { useQuery } from '@tanstack/react-query'\nimport type { ApiQueryOverrides } from '@utils/types/apiQueryOverrides'\nimport type { Wretch } from 'wretch/types'\n\nexport const listProjectLanguagesKey = {\n\tprojectIdKey: (projectId: string) => ['listProjectLanguages', projectId] as const,\n}\n\n/**\n * A react-router wrapper about the listProjectLanguages public API endpoint\n *\n * @param wretchClient - Wretch instance configured to a public API instance.\n * @param headers - A header builder instance to resolve the headers for the request.\n * @param overrides - Additional options to pass to the query.\n */\nexport function useListProjectLanguagesQuery<T, S = ListProjectLanguagesResponse>(\n\twretchClient: Wretch<T>,\n\theaders: HeaderBuilder<ProjectApiBaseHeaders>,\n\toverrides: ApiQueryOverrides<ListProjectLanguagesResponse, typeof listProjectLanguagesKey, S>,\n) {\n\treturn useQuery({\n\t\t...overrides,\n\t\tqueryFn: async ({ queryKey: [_, projectId] }) =>\n\t\t\tsendByGetRoute(wretchClient, listProjectLanguages, {\n\t\t\t\theaders: await headers.resolve(),\n\t\t\t\tpathParams: { projectId },\n\t\t\t}),\n\t})\n}\n"],"names":[],"mappings":";;;AASO,MAAM,0BAA0B;AAAA,EACtC,cAAc,CAAC,cAAsB,CAAC,wBAAwB,SAAS;AACxE;AASgB,SAAA,6BACf,cACA,SACA,WACC;AACD,SAAO,SAAS;AAAA,IACf,GAAG;AAAA,IACH,SAAS,OAAO,EAAE,UAAU,CAAC,GAAG,SAAS,QACxC,eAAe,cAAc,sBAAsB;AAAA,MAClD,SAAS,MAAM,QAAQ,QAAQ;AAAA,MAC/B,YAAY,EAAE,UAAU;AAAA,IACxB,CAAA;AAAA,EAAA,CACF;AACF;"}
@@ -1,11 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const ActionResolverContext = require("./harmony37.cjs");
5
- const createCanPerformActionResolver = require("./harmony45.cjs");
6
- const useCanPerformActionResolver = () => {
7
- const context = ActionResolverContext.useActionResolverContext();
8
- return React.useMemo(() => createCanPerformActionResolver.createCanPerformActionResolver(context), [context]);
3
+ const frontendHttpClient = require("@lokalise/frontend-http-client");
4
+ const reactQuery = require("@tanstack/react-query");
5
+ const projects = require("./harmony15.cjs");
6
+ const listProjectsKey = {
7
+ paramsKey: (params) => ["listProjects", params]
9
8
  };
10
- exports.useCanPerformActionResolver = useCanPerformActionResolver;
9
+ function useListProjectsQuery(wretchClient, headers, overrides) {
10
+ return reactQuery.useQuery({
11
+ ...overrides,
12
+ queryFn: async ({ queryKey: [_, params] }) => frontendHttpClient.sendByGetRoute(wretchClient, projects.listProjects, {
13
+ headers: await headers.resolve(),
14
+ queryParams: params
15
+ })
16
+ });
17
+ }
18
+ exports.listProjectsKey = listProjectsKey;
19
+ exports.useListProjectsQuery = useListProjectsQuery;
11
20
  //# sourceMappingURL=harmony39.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony39.cjs","sources":["../src/features/permissions/hooks/useCanPerformActionResolver.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { useActionResolverContext } from '../context/ActionResolverContext'\nimport { createCanPerformActionResolver } from '../core/createCanPerformActionResolver'\n\n/**\n * A hook that gets the action resolver context from React context and binds it to a\n * can perform action resolver. This is useful for partially applying the context\n * when it's available and allowing actions to be resolve outside the React context.\n *\n * @returns {CanPerformActionResolver} A function to resolve if an action is permitted.\n *\n * @example\n * const { canPerformAnyAction } = useCanPerformActionResolver();\n * const canEdit = canPerformAnyAction('edit_article');\n */\nexport const useCanPerformActionResolver = () => {\n\tconst context = useActionResolverContext()\n\n\treturn useMemo(() => createCanPerformActionResolver(context), [context])\n}\n"],"names":["useActionResolverContext","useMemo","createCanPerformActionResolver"],"mappings":";;;;;AAeO,MAAM,8BAA8B,MAAM;AAChD,QAAM,UAAUA,sBAAAA,yBAAyB;AAEzC,SAAOC,MAAAA,QAAQ,MAAMC,+BAAA,+BAA+B,OAAO,GAAG,CAAC,OAAO,CAAC;AACxE;;"}
1
+ {"version":3,"file":"harmony39.cjs","sources":["../src/features/publicApi/hooks/useListProjectsQuery.ts"],"sourcesContent":["import type { HeaderBuilder } from '@features/auth/core/headers/headerBuilder'\nimport type {\n\tListProjectsRequestQuery,\n\tListProjectsSuccessResponseBody,\n\tProjectApiBaseHeaders,\n} from '@features/publicApi/types/projectTypes'\nimport { sendByGetRoute } from '@lokalise/frontend-http-client'\nimport { useQuery } from '@tanstack/react-query'\nimport type { ApiQueryOverrides } from '@utils/types/apiQueryOverrides'\nimport type { Wretch } from 'wretch'\nimport { listProjects } from '../projects'\n\n/**\n * Factory for the listProjects public API endpoint key\n */\nexport const listProjectsKey = {\n\tparamsKey: (params: ListProjectsRequestQuery) => ['listProjects', params] as const,\n}\n\n/**\n * A react-router wrapper about the listProjects public API endpoint\n *\n * @param wretchClient - Wretch instance configured to a public API instance.\n * @param headers - A header builder instance to resolve the headers.\n * @param overrides - Additional options to pass to the query.\n */\nexport function useListProjectsQuery<T, S = ListProjectsSuccessResponseBody>(\n\twretchClient: Wretch<T>,\n\theaders: HeaderBuilder<ProjectApiBaseHeaders>,\n\toverrides: ApiQueryOverrides<ListProjectsSuccessResponseBody, typeof listProjectsKey, S>,\n) {\n\treturn useQuery({\n\t\t...overrides,\n\t\tqueryFn: async ({ queryKey: [_, params] }) =>\n\t\t\tsendByGetRoute(wretchClient, listProjects, {\n\t\t\t\theaders: await headers.resolve(),\n\t\t\t\tqueryParams: params,\n\t\t\t}),\n\t})\n}\n"],"names":["useQuery","sendByGetRoute","listProjects"],"mappings":";;;;;AAeO,MAAM,kBAAkB;AAAA,EAC9B,WAAW,CAAC,WAAqC,CAAC,gBAAgB,MAAM;AACzE;AASgB,SAAA,qBACf,cACA,SACA,WACC;AACD,SAAOA,oBAAS;AAAA,IACf,GAAG;AAAA,IACH,SAAS,OAAO,EAAE,UAAU,CAAC,GAAG,MAAM,QACrCC,mBAAAA,eAAe,cAAcC,uBAAc;AAAA,MAC1C,SAAS,MAAM,QAAQ,QAAQ;AAAA,MAC/B,aAAa;AAAA,IACb,CAAA;AAAA,EAAA,CACF;AACF;;;"}
@@ -1,11 +1,20 @@
1
- import { useMemo } from "react";
2
- import { useActionResolverContext } from "./harmony37.mjs";
3
- import { createCanPerformActionResolver } from "./harmony45.mjs";
4
- const useCanPerformActionResolver = () => {
5
- const context = useActionResolverContext();
6
- return useMemo(() => createCanPerformActionResolver(context), [context]);
1
+ import { sendByGetRoute } from "@lokalise/frontend-http-client";
2
+ import { useQuery } from "@tanstack/react-query";
3
+ import { listProjects } from "./harmony15.mjs";
4
+ const listProjectsKey = {
5
+ paramsKey: (params) => ["listProjects", params]
7
6
  };
7
+ function useListProjectsQuery(wretchClient, headers, overrides) {
8
+ return useQuery({
9
+ ...overrides,
10
+ queryFn: async ({ queryKey: [_, params] }) => sendByGetRoute(wretchClient, listProjects, {
11
+ headers: await headers.resolve(),
12
+ queryParams: params
13
+ })
14
+ });
15
+ }
8
16
  export {
9
- useCanPerformActionResolver
17
+ listProjectsKey,
18
+ useListProjectsQuery
10
19
  };
11
20
  //# sourceMappingURL=harmony39.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony39.mjs","sources":["../src/features/permissions/hooks/useCanPerformActionResolver.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { useActionResolverContext } from '../context/ActionResolverContext'\nimport { createCanPerformActionResolver } from '../core/createCanPerformActionResolver'\n\n/**\n * A hook that gets the action resolver context from React context and binds it to a\n * can perform action resolver. This is useful for partially applying the context\n * when it's available and allowing actions to be resolve outside the React context.\n *\n * @returns {CanPerformActionResolver} A function to resolve if an action is permitted.\n *\n * @example\n * const { canPerformAnyAction } = useCanPerformActionResolver();\n * const canEdit = canPerformAnyAction('edit_article');\n */\nexport const useCanPerformActionResolver = () => {\n\tconst context = useActionResolverContext()\n\n\treturn useMemo(() => createCanPerformActionResolver(context), [context])\n}\n"],"names":[],"mappings":";;;AAeO,MAAM,8BAA8B,MAAM;AAChD,QAAM,UAAU,yBAAyB;AAEzC,SAAO,QAAQ,MAAM,+BAA+B,OAAO,GAAG,CAAC,OAAO,CAAC;AACxE;"}
1
+ {"version":3,"file":"harmony39.mjs","sources":["../src/features/publicApi/hooks/useListProjectsQuery.ts"],"sourcesContent":["import type { HeaderBuilder } from '@features/auth/core/headers/headerBuilder'\nimport type {\n\tListProjectsRequestQuery,\n\tListProjectsSuccessResponseBody,\n\tProjectApiBaseHeaders,\n} from '@features/publicApi/types/projectTypes'\nimport { sendByGetRoute } from '@lokalise/frontend-http-client'\nimport { useQuery } from '@tanstack/react-query'\nimport type { ApiQueryOverrides } from '@utils/types/apiQueryOverrides'\nimport type { Wretch } from 'wretch'\nimport { listProjects } from '../projects'\n\n/**\n * Factory for the listProjects public API endpoint key\n */\nexport const listProjectsKey = {\n\tparamsKey: (params: ListProjectsRequestQuery) => ['listProjects', params] as const,\n}\n\n/**\n * A react-router wrapper about the listProjects public API endpoint\n *\n * @param wretchClient - Wretch instance configured to a public API instance.\n * @param headers - A header builder instance to resolve the headers.\n * @param overrides - Additional options to pass to the query.\n */\nexport function useListProjectsQuery<T, S = ListProjectsSuccessResponseBody>(\n\twretchClient: Wretch<T>,\n\theaders: HeaderBuilder<ProjectApiBaseHeaders>,\n\toverrides: ApiQueryOverrides<ListProjectsSuccessResponseBody, typeof listProjectsKey, S>,\n) {\n\treturn useQuery({\n\t\t...overrides,\n\t\tqueryFn: async ({ queryKey: [_, params] }) =>\n\t\t\tsendByGetRoute(wretchClient, listProjects, {\n\t\t\t\theaders: await headers.resolve(),\n\t\t\t\tqueryParams: params,\n\t\t\t}),\n\t})\n}\n"],"names":[],"mappings":";;;AAeO,MAAM,kBAAkB;AAAA,EAC9B,WAAW,CAAC,WAAqC,CAAC,gBAAgB,MAAM;AACzE;AASgB,SAAA,qBACf,cACA,SACA,WACC;AACD,SAAO,SAAS;AAAA,IACf,GAAG;AAAA,IACH,SAAS,OAAO,EAAE,UAAU,CAAC,GAAG,MAAM,QACrC,eAAe,cAAc,cAAc;AAAA,MAC1C,SAAS,MAAM,QAAQ,QAAQ;AAAA,MAC/B,aAAa;AAAA,IACb,CAAA;AAAA,EAAA,CACF;AACF;"}
@@ -1,11 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const ActionResolverContext = require("./harmony37.cjs");
5
- const canPerformAction = require("./harmony44.cjs");
6
- const useCanPerformAllActions = (...actions) => {
7
- const context = ActionResolverContext.useActionResolverContext();
8
- return React.useMemo(() => canPerformAction.canPerformAllActions(actions, context), [context, actions.join()]);
3
+ const frontendHttpClient = require("@lokalise/frontend-http-client");
4
+ const reactQuery = require("@tanstack/react-query");
5
+ const aiConfigurations = require("./harmony136.cjs");
6
+ const listTeamLanguagesKeys = {
7
+ teamLanguagesKey: (params) => ["listTeamLanguages", params]
9
8
  };
10
- exports.useCanPerformAllActions = useCanPerformAllActions;
9
+ function useListTeamLanguagesQuery(wretchClient, headers, overrides) {
10
+ return reactQuery.useQuery({
11
+ ...overrides,
12
+ queryFn: async ({ queryKey: [_, pathParams] }) => frontendHttpClient.sendByGetRoute(wretchClient, aiConfigurations.listTeamLanguages, {
13
+ pathParams,
14
+ headers: await headers.resolve()
15
+ })
16
+ });
17
+ }
18
+ exports.listTeamLanguagesKeys = listTeamLanguagesKeys;
19
+ exports.useListTeamLanguagesQuery = useListTeamLanguagesQuery;
11
20
  //# sourceMappingURL=harmony40.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony40.cjs","sources":["../src/features/permissions/hooks/useCanPerformAllActions.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport type { Action } from '../actionResolvers'\nimport { useActionResolverContext } from '../context/ActionResolverContext'\nimport { canPerformAllActions } from '../core/canPerformAction'\n\n/**\n * React hook to determine if the current user has permission to perform all the specified actions.\n *\n * This hook is useful for conditionally rendering UI elements or triggering logic\n * that require the user to have multiple permissions.\n * It returns true only if the user can perform every action in the provided list.\n *\n * @param actions A list of actions to check permissions for (e.g. 'accessMarketingProjects', 'deleteProjects').\n * @returns {boolean} True if the user can perform all actions, otherwise false.\n *\n * @example\n * // Check if the user can both access marketing projects and delete projects\n * const canDoAll = useCanPerformAllActions(\"accessMarketingProjects\", \"deleteProjects\");\n * if (canDoAll) {\n * // show danger zone\n * }\n */\nexport const useCanPerformAllActions = (...actions: Action[]): boolean => {\n\tconst context = useActionResolverContext()\n\n\t// The reason for using `actions.join()` is to ensure that the memoization will not recompute\n\t// unless the actions themselves change. This is required as collecting the actions with `...actions`\n\t// will result in a new array reference on every render, which would cause the memoization to invalidate.\n\t// biome-ignore lint/correctness/useExhaustiveDependencies: Explained above\n\treturn useMemo(() => canPerformAllActions(actions, context), [context, actions.join()])\n}\n"],"names":["useActionResolverContext","useMemo","canPerformAllActions"],"mappings":";;;;;AAsBa,MAAA,0BAA0B,IAAI,YAA+B;AACzE,QAAM,UAAUA,sBAAAA,yBAAyB;AAMlC,SAAAC,MAAA,QAAQ,MAAMC,iBAAA,qBAAqB,SAAS,OAAO,GAAG,CAAC,SAAS,QAAQ,KAAK,CAAC,CAAC;AACvF;;"}
1
+ {"version":3,"file":"harmony40.cjs","sources":["../src/features/publicApi/hooks/useListTeamLanguagesQuery.ts"],"sourcesContent":["import type {\n\tBaseApiEndpointHeader,\n\tHeaderBuilder,\n\tListTeamLanguagesPathParams,\n\tListTeamLanguagesResponseBody,\n} from '@features/node'\nimport { sendByGetRoute } from '@lokalise/frontend-http-client'\nimport { useQuery } from '@tanstack/react-query'\nimport type { ApiQueryOverrides } from '@utils/types/apiQueryOverrides'\nimport type { Wretch } from 'wretch'\nimport { listTeamLanguages } from '../aiConfigurations'\n\n/**\n * Factory for creating keys for the useListTeamLanguagesQuery hook\n */\nexport const listTeamLanguagesKeys = {\n\tteamLanguagesKey: (params: ListTeamLanguagesPathParams) => ['listTeamLanguages', params] as const,\n}\n\n/**\n * A react-query wrapper about the listTeamLanguages public API endpoint\n *\n * @param wretchClient - Wretch instance configured to a public API instance.\n * @param headers - A header builder instance to resolve the headers for the request.\n * @param overrides - Additional options to pass to the query.\n */\nexport function useListTeamLanguagesQuery<T, S = ListTeamLanguagesResponseBody>(\n\twretchClient: Wretch<T>,\n\theaders: HeaderBuilder<BaseApiEndpointHeader>,\n\toverrides: ApiQueryOverrides<ListTeamLanguagesResponseBody, typeof listTeamLanguagesKeys, S>,\n) {\n\treturn useQuery({\n\t\t...overrides,\n\t\tqueryFn: async ({ queryKey: [_, pathParams] }) =>\n\t\t\tsendByGetRoute(wretchClient, listTeamLanguages, {\n\t\t\t\tpathParams,\n\t\t\t\theaders: await headers.resolve(),\n\t\t\t}),\n\t})\n}\n"],"names":["useQuery","sendByGetRoute","listTeamLanguages"],"mappings":";;;;;AAeO,MAAM,wBAAwB;AAAA,EACpC,kBAAkB,CAAC,WAAwC,CAAC,qBAAqB,MAAM;AACxF;AASgB,SAAA,0BACf,cACA,SACA,WACC;AACD,SAAOA,oBAAS;AAAA,IACf,GAAG;AAAA,IACH,SAAS,OAAO,EAAE,UAAU,CAAC,GAAG,UAAU,QACzCC,mBAAAA,eAAe,cAAcC,oCAAmB;AAAA,MAC/C;AAAA,MACA,SAAS,MAAM,QAAQ,QAAQ;AAAA,IAC/B,CAAA;AAAA,EAAA,CACF;AACF;;;"}
@@ -1,11 +1,20 @@
1
- import { useMemo } from "react";
2
- import { useActionResolverContext } from "./harmony37.mjs";
3
- import { canPerformAllActions } from "./harmony44.mjs";
4
- const useCanPerformAllActions = (...actions) => {
5
- const context = useActionResolverContext();
6
- return useMemo(() => canPerformAllActions(actions, context), [context, actions.join()]);
1
+ import { sendByGetRoute } from "@lokalise/frontend-http-client";
2
+ import { useQuery } from "@tanstack/react-query";
3
+ import { listTeamLanguages } from "./harmony136.mjs";
4
+ const listTeamLanguagesKeys = {
5
+ teamLanguagesKey: (params) => ["listTeamLanguages", params]
7
6
  };
7
+ function useListTeamLanguagesQuery(wretchClient, headers, overrides) {
8
+ return useQuery({
9
+ ...overrides,
10
+ queryFn: async ({ queryKey: [_, pathParams] }) => sendByGetRoute(wretchClient, listTeamLanguages, {
11
+ pathParams,
12
+ headers: await headers.resolve()
13
+ })
14
+ });
15
+ }
8
16
  export {
9
- useCanPerformAllActions
17
+ listTeamLanguagesKeys,
18
+ useListTeamLanguagesQuery
10
19
  };
11
20
  //# sourceMappingURL=harmony40.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony40.mjs","sources":["../src/features/permissions/hooks/useCanPerformAllActions.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport type { Action } from '../actionResolvers'\nimport { useActionResolverContext } from '../context/ActionResolverContext'\nimport { canPerformAllActions } from '../core/canPerformAction'\n\n/**\n * React hook to determine if the current user has permission to perform all the specified actions.\n *\n * This hook is useful for conditionally rendering UI elements or triggering logic\n * that require the user to have multiple permissions.\n * It returns true only if the user can perform every action in the provided list.\n *\n * @param actions A list of actions to check permissions for (e.g. 'accessMarketingProjects', 'deleteProjects').\n * @returns {boolean} True if the user can perform all actions, otherwise false.\n *\n * @example\n * // Check if the user can both access marketing projects and delete projects\n * const canDoAll = useCanPerformAllActions(\"accessMarketingProjects\", \"deleteProjects\");\n * if (canDoAll) {\n * // show danger zone\n * }\n */\nexport const useCanPerformAllActions = (...actions: Action[]): boolean => {\n\tconst context = useActionResolverContext()\n\n\t// The reason for using `actions.join()` is to ensure that the memoization will not recompute\n\t// unless the actions themselves change. This is required as collecting the actions with `...actions`\n\t// will result in a new array reference on every render, which would cause the memoization to invalidate.\n\t// biome-ignore lint/correctness/useExhaustiveDependencies: Explained above\n\treturn useMemo(() => canPerformAllActions(actions, context), [context, actions.join()])\n}\n"],"names":[],"mappings":";;;AAsBa,MAAA,0BAA0B,IAAI,YAA+B;AACzE,QAAM,UAAU,yBAAyB;AAMlC,SAAA,QAAQ,MAAM,qBAAqB,SAAS,OAAO,GAAG,CAAC,SAAS,QAAQ,KAAK,CAAC,CAAC;AACvF;"}
1
+ {"version":3,"file":"harmony40.mjs","sources":["../src/features/publicApi/hooks/useListTeamLanguagesQuery.ts"],"sourcesContent":["import type {\n\tBaseApiEndpointHeader,\n\tHeaderBuilder,\n\tListTeamLanguagesPathParams,\n\tListTeamLanguagesResponseBody,\n} from '@features/node'\nimport { sendByGetRoute } from '@lokalise/frontend-http-client'\nimport { useQuery } from '@tanstack/react-query'\nimport type { ApiQueryOverrides } from '@utils/types/apiQueryOverrides'\nimport type { Wretch } from 'wretch'\nimport { listTeamLanguages } from '../aiConfigurations'\n\n/**\n * Factory for creating keys for the useListTeamLanguagesQuery hook\n */\nexport const listTeamLanguagesKeys = {\n\tteamLanguagesKey: (params: ListTeamLanguagesPathParams) => ['listTeamLanguages', params] as const,\n}\n\n/**\n * A react-query wrapper about the listTeamLanguages public API endpoint\n *\n * @param wretchClient - Wretch instance configured to a public API instance.\n * @param headers - A header builder instance to resolve the headers for the request.\n * @param overrides - Additional options to pass to the query.\n */\nexport function useListTeamLanguagesQuery<T, S = ListTeamLanguagesResponseBody>(\n\twretchClient: Wretch<T>,\n\theaders: HeaderBuilder<BaseApiEndpointHeader>,\n\toverrides: ApiQueryOverrides<ListTeamLanguagesResponseBody, typeof listTeamLanguagesKeys, S>,\n) {\n\treturn useQuery({\n\t\t...overrides,\n\t\tqueryFn: async ({ queryKey: [_, pathParams] }) =>\n\t\t\tsendByGetRoute(wretchClient, listTeamLanguages, {\n\t\t\t\tpathParams,\n\t\t\t\theaders: await headers.resolve(),\n\t\t\t}),\n\t})\n}\n"],"names":[],"mappings":";;;AAeO,MAAM,wBAAwB;AAAA,EACpC,kBAAkB,CAAC,WAAwC,CAAC,qBAAqB,MAAM;AACxF;AASgB,SAAA,0BACf,cACA,SACA,WACC;AACD,SAAO,SAAS;AAAA,IACf,GAAG;AAAA,IACH,SAAS,OAAO,EAAE,UAAU,CAAC,GAAG,UAAU,QACzC,eAAe,cAAc,mBAAmB;AAAA,MAC/C;AAAA,MACA,SAAS,MAAM,QAAQ,QAAQ;AAAA,IAC/B,CAAA;AAAA,EAAA,CACF;AACF;"}
@@ -1,11 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const ActionResolverContext = require("./harmony37.cjs");
5
- const canPerformAction = require("./harmony44.cjs");
6
- const useCanPerformAnyAction = (...actions) => {
7
- const context = ActionResolverContext.useActionResolverContext();
8
- return React.useMemo(() => canPerformAction.canPerformAnyAction(actions, context), [context, actions.join()]);
3
+ const frontendHttpClient = require("@lokalise/frontend-http-client");
4
+ const reactQuery = require("@tanstack/react-query");
5
+ const team = require("./harmony17.cjs");
6
+ const listTeamsKey = {
7
+ paramsKey: (params) => ["listTeams", params]
9
8
  };
10
- exports.useCanPerformAnyAction = useCanPerformAnyAction;
9
+ function useListTeamsQuery(wretchClient, headers, overrides) {
10
+ return reactQuery.useQuery({
11
+ ...overrides,
12
+ queryFn: async ({ queryKey: [_, params] }) => frontendHttpClient.sendByGetRoute(wretchClient, team.listTeams, {
13
+ headers: await headers.resolve(),
14
+ queryParams: params
15
+ })
16
+ });
17
+ }
18
+ exports.listTeamsKey = listTeamsKey;
19
+ exports.useListTeamsQuery = useListTeamsQuery;
11
20
  //# sourceMappingURL=harmony41.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony41.cjs","sources":["../src/features/permissions/hooks/useCanPerformAnyAction.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport type { Action } from '../actionResolvers'\nimport { useActionResolverContext } from '../context/ActionResolverContext'\nimport { canPerformAnyAction } from '../core/canPerformAction'\n\n/**\n * React hook to determine if the current user has permission to perform at least one of the specified actions.\n *\n * This hook is useful for conditionally rendering UI elements or triggering logic\n * that should be available if the user has any of a set of permissions.\n * It returns true if the user can perform at least one action in the provided list.\n *\n * @param actions A list of actions to check permissions for (e.g. 'accessMarketingProjects', 'deleteProjects').\n * @returns {boolean} True if the user can perform any action, otherwise false.\n *\n * @example\n * // Check if the user can either access marketing projects or delete projects\n * const canDoAny = useCanPerformAnyAction(\"accessMarketingProjects\", \"deleteProjects\");\n * if (canDoAny) {\n * // show details or enable actions\n * }\n */\nexport const useCanPerformAnyAction = (...actions: Action[]): boolean => {\n\tconst context = useActionResolverContext()\n\n\t// The reason for using `actions.join()` is to ensure that the memoization will not recompute\n\t// unless the actions themselves change. This is required as collecting the actions with `...actions`\n\t// will result in a new array reference on every render, which would cause the memoization to invalidate.\n\t// biome-ignore lint/correctness/useExhaustiveDependencies: Explained above\n\treturn useMemo(() => canPerformAnyAction(actions, context), [context, actions.join()])\n}\n"],"names":["useActionResolverContext","useMemo","canPerformAnyAction"],"mappings":";;;;;AAsBa,MAAA,yBAAyB,IAAI,YAA+B;AACxE,QAAM,UAAUA,sBAAAA,yBAAyB;AAMlC,SAAAC,MAAA,QAAQ,MAAMC,iBAAA,oBAAoB,SAAS,OAAO,GAAG,CAAC,SAAS,QAAQ,KAAK,CAAC,CAAC;AACtF;;"}
1
+ {"version":3,"file":"harmony41.cjs","sources":["../src/features/publicApi/hooks/useListTeamsQuery.ts"],"sourcesContent":["import type { HeaderBuilder } from '@features/auth/core/headers/headerBuilder'\nimport type { ProjectApiBaseHeaders } from '@features/publicApi/types/projectTypes'\nimport type { ListTeamsQueryParams, ListTeamsResponse } from '@features/publicApi/types/teamTypes'\nimport { sendByGetRoute } from '@lokalise/frontend-http-client'\nimport { useQuery } from '@tanstack/react-query'\nimport type { ApiQueryOverrides } from '@utils/types/apiQueryOverrides'\nimport type { Wretch } from 'wretch'\nimport { listTeams } from '../team'\n\n/**\n * Factory for the listTeams public API endpoint key\n */\nexport const listTeamsKey = {\n\tparamsKey: (params: ListTeamsQueryParams) => ['listTeams', params] as const,\n}\n\n/**\n * A react-router wrapper about the listTeams public API endpoint\n *\n * @param wretchClient - Wretch instance configured to a public API instance.\n * @param headers - A header builder instance to resolve the headers.\n * @param overrides - Additional options to pass to the query.\n */\nexport function useListTeamsQuery<T, S = ListTeamsResponse>(\n\twretchClient: Wretch<T>,\n\theaders: HeaderBuilder<ProjectApiBaseHeaders>,\n\toverrides: ApiQueryOverrides<ListTeamsResponse, typeof listTeamsKey, S>,\n) {\n\treturn useQuery({\n\t\t...overrides,\n\t\tqueryFn: async ({ queryKey: [_, params] }) =>\n\t\t\tsendByGetRoute(wretchClient, listTeams, {\n\t\t\t\theaders: await headers.resolve(),\n\t\t\t\tqueryParams: params,\n\t\t\t}),\n\t})\n}\n"],"names":["useQuery","sendByGetRoute","listTeams"],"mappings":";;;;;AAYO,MAAM,eAAe;AAAA,EAC3B,WAAW,CAAC,WAAiC,CAAC,aAAa,MAAM;AAClE;AASgB,SAAA,kBACf,cACA,SACA,WACC;AACD,SAAOA,oBAAS;AAAA,IACf,GAAG;AAAA,IACH,SAAS,OAAO,EAAE,UAAU,CAAC,GAAG,MAAM,QACrCC,mBAAAA,eAAe,cAAcC,gBAAW;AAAA,MACvC,SAAS,MAAM,QAAQ,QAAQ;AAAA,MAC/B,aAAa;AAAA,IACb,CAAA;AAAA,EAAA,CACF;AACF;;;"}
@@ -1,11 +1,20 @@
1
- import { useMemo } from "react";
2
- import { useActionResolverContext } from "./harmony37.mjs";
3
- import { canPerformAnyAction } from "./harmony44.mjs";
4
- const useCanPerformAnyAction = (...actions) => {
5
- const context = useActionResolverContext();
6
- return useMemo(() => canPerformAnyAction(actions, context), [context, actions.join()]);
1
+ import { sendByGetRoute } from "@lokalise/frontend-http-client";
2
+ import { useQuery } from "@tanstack/react-query";
3
+ import { listTeams } from "./harmony17.mjs";
4
+ const listTeamsKey = {
5
+ paramsKey: (params) => ["listTeams", params]
7
6
  };
7
+ function useListTeamsQuery(wretchClient, headers, overrides) {
8
+ return useQuery({
9
+ ...overrides,
10
+ queryFn: async ({ queryKey: [_, params] }) => sendByGetRoute(wretchClient, listTeams, {
11
+ headers: await headers.resolve(),
12
+ queryParams: params
13
+ })
14
+ });
15
+ }
8
16
  export {
9
- useCanPerformAnyAction
17
+ listTeamsKey,
18
+ useListTeamsQuery
10
19
  };
11
20
  //# sourceMappingURL=harmony41.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony41.mjs","sources":["../src/features/permissions/hooks/useCanPerformAnyAction.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport type { Action } from '../actionResolvers'\nimport { useActionResolverContext } from '../context/ActionResolverContext'\nimport { canPerformAnyAction } from '../core/canPerformAction'\n\n/**\n * React hook to determine if the current user has permission to perform at least one of the specified actions.\n *\n * This hook is useful for conditionally rendering UI elements or triggering logic\n * that should be available if the user has any of a set of permissions.\n * It returns true if the user can perform at least one action in the provided list.\n *\n * @param actions A list of actions to check permissions for (e.g. 'accessMarketingProjects', 'deleteProjects').\n * @returns {boolean} True if the user can perform any action, otherwise false.\n *\n * @example\n * // Check if the user can either access marketing projects or delete projects\n * const canDoAny = useCanPerformAnyAction(\"accessMarketingProjects\", \"deleteProjects\");\n * if (canDoAny) {\n * // show details or enable actions\n * }\n */\nexport const useCanPerformAnyAction = (...actions: Action[]): boolean => {\n\tconst context = useActionResolverContext()\n\n\t// The reason for using `actions.join()` is to ensure that the memoization will not recompute\n\t// unless the actions themselves change. This is required as collecting the actions with `...actions`\n\t// will result in a new array reference on every render, which would cause the memoization to invalidate.\n\t// biome-ignore lint/correctness/useExhaustiveDependencies: Explained above\n\treturn useMemo(() => canPerformAnyAction(actions, context), [context, actions.join()])\n}\n"],"names":[],"mappings":";;;AAsBa,MAAA,yBAAyB,IAAI,YAA+B;AACxE,QAAM,UAAU,yBAAyB;AAMlC,SAAA,QAAQ,MAAM,oBAAoB,SAAS,OAAO,GAAG,CAAC,SAAS,QAAQ,KAAK,CAAC,CAAC;AACtF;"}
1
+ {"version":3,"file":"harmony41.mjs","sources":["../src/features/publicApi/hooks/useListTeamsQuery.ts"],"sourcesContent":["import type { HeaderBuilder } from '@features/auth/core/headers/headerBuilder'\nimport type { ProjectApiBaseHeaders } from '@features/publicApi/types/projectTypes'\nimport type { ListTeamsQueryParams, ListTeamsResponse } from '@features/publicApi/types/teamTypes'\nimport { sendByGetRoute } from '@lokalise/frontend-http-client'\nimport { useQuery } from '@tanstack/react-query'\nimport type { ApiQueryOverrides } from '@utils/types/apiQueryOverrides'\nimport type { Wretch } from 'wretch'\nimport { listTeams } from '../team'\n\n/**\n * Factory for the listTeams public API endpoint key\n */\nexport const listTeamsKey = {\n\tparamsKey: (params: ListTeamsQueryParams) => ['listTeams', params] as const,\n}\n\n/**\n * A react-router wrapper about the listTeams public API endpoint\n *\n * @param wretchClient - Wretch instance configured to a public API instance.\n * @param headers - A header builder instance to resolve the headers.\n * @param overrides - Additional options to pass to the query.\n */\nexport function useListTeamsQuery<T, S = ListTeamsResponse>(\n\twretchClient: Wretch<T>,\n\theaders: HeaderBuilder<ProjectApiBaseHeaders>,\n\toverrides: ApiQueryOverrides<ListTeamsResponse, typeof listTeamsKey, S>,\n) {\n\treturn useQuery({\n\t\t...overrides,\n\t\tqueryFn: async ({ queryKey: [_, params] }) =>\n\t\t\tsendByGetRoute(wretchClient, listTeams, {\n\t\t\t\theaders: await headers.resolve(),\n\t\t\t\tqueryParams: params,\n\t\t\t}),\n\t})\n}\n"],"names":[],"mappings":";;;AAYO,MAAM,eAAe;AAAA,EAC3B,WAAW,CAAC,WAAiC,CAAC,aAAa,MAAM;AAClE;AASgB,SAAA,kBACf,cACA,SACA,WACC;AACD,SAAO,SAAS;AAAA,IACf,GAAG;AAAA,IACH,SAAS,OAAO,EAAE,UAAU,CAAC,GAAG,MAAM,QACrC,eAAe,cAAc,WAAW;AAAA,MACvC,SAAS,MAAM,QAAQ,QAAQ;AAAA,MAC/B,aAAa;AAAA,IACb,CAAA;AAAA,EAAA,CACF;AACF;"}
@@ -1,12 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const ActionResolverContext = require("./harmony37.cjs");
5
- const hasAny = require("./harmony138.cjs");
6
- const useHasAnyFeatureFlags = (...features) => {
7
- const { enabledFeatureFlags } = ActionResolverContext.useActionResolverContext();
8
- const key = features.join("");
9
- return React.useMemo(() => hasAny.hasAny(enabledFeatureFlags, ...features), [key, enabledFeatureFlags]);
3
+ const frontendHttpClient = require("@lokalise/frontend-http-client");
4
+ const reactQuery = require("@tanstack/react-query");
5
+ const teamUsers = require("./harmony18.cjs");
6
+ const listTeamUsersKey = {
7
+ paramsKey: (params) => ["listTeamUsers", params]
10
8
  };
11
- exports.useHasAnyFeatureFlags = useHasAnyFeatureFlags;
9
+ function useListTeamUsersQuery(wretchClient, headers, overrides) {
10
+ return reactQuery.useQuery({
11
+ ...overrides,
12
+ queryFn: async ({ queryKey: [_, params] }) => frontendHttpClient.sendByGetRoute(wretchClient, teamUsers.listTeamUsers, {
13
+ headers: await headers.resolve(),
14
+ pathParams: params
15
+ })
16
+ });
17
+ }
18
+ exports.listTeamUsersKey = listTeamUsersKey;
19
+ exports.useListTeamUsersQuery = useListTeamUsersQuery;
12
20
  //# sourceMappingURL=harmony42.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony42.cjs","sources":["../src/features/permissions/hooks/useHasAnyFeatureFlags.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { useActionResolverContext } from '../context/ActionResolverContext'\nimport type { FeatureFlag } from '../types/featureFlagTypes'\nimport { hasAny } from '../utils/hasAny'\n\nexport const useHasAnyFeatureFlags = (...features: FeatureFlag[]) => {\n\tconst { enabledFeatureFlags } = useActionResolverContext()\n\tconst key = features.join('')\n\n\t// biome-ignore lint/correctness/useExhaustiveDependencies: Using key as spreading parameters will create a new array on every render.\n\treturn useMemo(() => hasAny(enabledFeatureFlags, ...features), [key, enabledFeatureFlags])\n}\n"],"names":["useActionResolverContext","useMemo","hasAny"],"mappings":";;;;;AAKa,MAAA,wBAAwB,IAAI,aAA4B;AAC9D,QAAA,EAAE,oBAAoB,IAAIA,+CAAyB;AACnD,QAAA,MAAM,SAAS,KAAK,EAAE;AAGrB,SAAAC,MAAA,QAAQ,MAAMC,OAAAA,OAAO,qBAAqB,GAAG,QAAQ,GAAG,CAAC,KAAK,mBAAmB,CAAC;AAC1F;;"}
1
+ {"version":3,"file":"harmony42.cjs","sources":["../src/features/publicApi/hooks/useListTeamUsersQuery.ts"],"sourcesContent":["import type { HeaderBuilder } from '@features/auth/core/headers/headerBuilder'\nimport type { ProjectApiBaseHeaders } from '@features/publicApi/types/projectTypes'\nimport type { ListTeamUsersResponse, TeamPathParams } from '@features/publicApi/types/teamUserTypes'\nimport { sendByGetRoute } from '@lokalise/frontend-http-client'\nimport { useQuery } from '@tanstack/react-query'\nimport type { ApiQueryOverrides } from '@utils/types/apiQueryOverrides'\nimport type { Wretch } from 'wretch'\nimport { listTeamUsers } from '../teamUsers'\n\n/**\n * Factory for the listTeamUsers public API endpoint key\n */\nexport const listTeamUsersKey = {\n\tparamsKey: (params: TeamPathParams) => ['listTeamUsers', params] as const,\n}\n\n/**\n * A react-router wrapper about the listTeamUsers public API endpoint\n *\n * @param wretchClient - Wretch instance configured to a public API instance.\n * @param headers - A header builder instance to resolve the headers.\n * @param overrides - Additional options to pass to the query.\n */\nexport function useListTeamUsersQuery<T, S = ListTeamUsersResponse>(\n\twretchClient: Wretch<T>,\n\theaders: HeaderBuilder<ProjectApiBaseHeaders>,\n\toverrides: ApiQueryOverrides<ListTeamUsersResponse, typeof listTeamUsersKey, S>,\n) {\n\treturn useQuery({\n\t\t...overrides,\n\t\tqueryFn: async ({ queryKey: [_, params] }) =>\n\t\t\tsendByGetRoute(wretchClient, listTeamUsers, {\n\t\t\t\theaders: await headers.resolve(),\n\t\t\t\tpathParams: params,\n\t\t\t}),\n\t})\n}\n"],"names":["useQuery","sendByGetRoute","listTeamUsers"],"mappings":";;;;;AAYO,MAAM,mBAAmB;AAAA,EAC/B,WAAW,CAAC,WAA2B,CAAC,iBAAiB,MAAM;AAChE;AASgB,SAAA,sBACf,cACA,SACA,WACC;AACD,SAAOA,oBAAS;AAAA,IACf,GAAG;AAAA,IACH,SAAS,OAAO,EAAE,UAAU,CAAC,GAAG,MAAM,QACrCC,mBAAAA,eAAe,cAAcC,yBAAe;AAAA,MAC3C,SAAS,MAAM,QAAQ,QAAQ;AAAA,MAC/B,YAAY;AAAA,IACZ,CAAA;AAAA,EAAA,CACF;AACF;;;"}
@@ -1,12 +1,20 @@
1
- import { useMemo } from "react";
2
- import { useActionResolverContext } from "./harmony37.mjs";
3
- import { hasAny } from "./harmony138.mjs";
4
- const useHasAnyFeatureFlags = (...features) => {
5
- const { enabledFeatureFlags } = useActionResolverContext();
6
- const key = features.join("");
7
- return useMemo(() => hasAny(enabledFeatureFlags, ...features), [key, enabledFeatureFlags]);
1
+ import { sendByGetRoute } from "@lokalise/frontend-http-client";
2
+ import { useQuery } from "@tanstack/react-query";
3
+ import { listTeamUsers } from "./harmony18.mjs";
4
+ const listTeamUsersKey = {
5
+ paramsKey: (params) => ["listTeamUsers", params]
8
6
  };
7
+ function useListTeamUsersQuery(wretchClient, headers, overrides) {
8
+ return useQuery({
9
+ ...overrides,
10
+ queryFn: async ({ queryKey: [_, params] }) => sendByGetRoute(wretchClient, listTeamUsers, {
11
+ headers: await headers.resolve(),
12
+ pathParams: params
13
+ })
14
+ });
15
+ }
9
16
  export {
10
- useHasAnyFeatureFlags
17
+ listTeamUsersKey,
18
+ useListTeamUsersQuery
11
19
  };
12
20
  //# sourceMappingURL=harmony42.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony42.mjs","sources":["../src/features/permissions/hooks/useHasAnyFeatureFlags.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { useActionResolverContext } from '../context/ActionResolverContext'\nimport type { FeatureFlag } from '../types/featureFlagTypes'\nimport { hasAny } from '../utils/hasAny'\n\nexport const useHasAnyFeatureFlags = (...features: FeatureFlag[]) => {\n\tconst { enabledFeatureFlags } = useActionResolverContext()\n\tconst key = features.join('')\n\n\t// biome-ignore lint/correctness/useExhaustiveDependencies: Using key as spreading parameters will create a new array on every render.\n\treturn useMemo(() => hasAny(enabledFeatureFlags, ...features), [key, enabledFeatureFlags])\n}\n"],"names":[],"mappings":";;;AAKa,MAAA,wBAAwB,IAAI,aAA4B;AAC9D,QAAA,EAAE,oBAAoB,IAAI,yBAAyB;AACnD,QAAA,MAAM,SAAS,KAAK,EAAE;AAGrB,SAAA,QAAQ,MAAM,OAAO,qBAAqB,GAAG,QAAQ,GAAG,CAAC,KAAK,mBAAmB,CAAC;AAC1F;"}
1
+ {"version":3,"file":"harmony42.mjs","sources":["../src/features/publicApi/hooks/useListTeamUsersQuery.ts"],"sourcesContent":["import type { HeaderBuilder } from '@features/auth/core/headers/headerBuilder'\nimport type { ProjectApiBaseHeaders } from '@features/publicApi/types/projectTypes'\nimport type { ListTeamUsersResponse, TeamPathParams } from '@features/publicApi/types/teamUserTypes'\nimport { sendByGetRoute } from '@lokalise/frontend-http-client'\nimport { useQuery } from '@tanstack/react-query'\nimport type { ApiQueryOverrides } from '@utils/types/apiQueryOverrides'\nimport type { Wretch } from 'wretch'\nimport { listTeamUsers } from '../teamUsers'\n\n/**\n * Factory for the listTeamUsers public API endpoint key\n */\nexport const listTeamUsersKey = {\n\tparamsKey: (params: TeamPathParams) => ['listTeamUsers', params] as const,\n}\n\n/**\n * A react-router wrapper about the listTeamUsers public API endpoint\n *\n * @param wretchClient - Wretch instance configured to a public API instance.\n * @param headers - A header builder instance to resolve the headers.\n * @param overrides - Additional options to pass to the query.\n */\nexport function useListTeamUsersQuery<T, S = ListTeamUsersResponse>(\n\twretchClient: Wretch<T>,\n\theaders: HeaderBuilder<ProjectApiBaseHeaders>,\n\toverrides: ApiQueryOverrides<ListTeamUsersResponse, typeof listTeamUsersKey, S>,\n) {\n\treturn useQuery({\n\t\t...overrides,\n\t\tqueryFn: async ({ queryKey: [_, params] }) =>\n\t\t\tsendByGetRoute(wretchClient, listTeamUsers, {\n\t\t\t\theaders: await headers.resolve(),\n\t\t\t\tpathParams: params,\n\t\t\t}),\n\t})\n}\n"],"names":[],"mappings":";;;AAYO,MAAM,mBAAmB;AAAA,EAC/B,WAAW,CAAC,WAA2B,CAAC,iBAAiB,MAAM;AAChE;AASgB,SAAA,sBACf,cACA,SACA,WACC;AACD,SAAO,SAAS;AAAA,IACf,GAAG;AAAA,IACH,SAAS,OAAO,EAAE,UAAU,CAAC,GAAG,MAAM,QACrC,eAAe,cAAc,eAAe;AAAA,MAC3C,SAAS,MAAM,QAAQ,QAAQ;AAAA,MAC/B,YAAY;AAAA,IACZ,CAAA;AAAA,EAAA,CACF;AACF;"}
@@ -1,12 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const ActionResolverContext = require("./harmony37.cjs");
5
- const has = require("./harmony139.cjs");
6
- const useHasAllFeatureFlags = (...features) => {
7
- const { enabledFeatureFlags } = ActionResolverContext.useActionResolverContext();
8
- const key = features.join("");
9
- return React.useMemo(() => has.has(enabledFeatureFlags, ...features), [key, enabledFeatureFlags]);
3
+ const frontendHttpClient = require("@lokalise/frontend-http-client");
4
+ const reactQuery = require("@tanstack/react-query");
5
+ const contributors = require("./harmony12.cjs");
6
+ const retrieveContributorKeys = {
7
+ projectUserKey: (params) => ["RetrieveContributor", params]
10
8
  };
11
- exports.useHasAllFeatureFlags = useHasAllFeatureFlags;
9
+ const useRetrieveContributorQuery = (wretchClient, headers, overrides) => reactQuery.useQuery({
10
+ ...overrides,
11
+ queryFn: async ({ queryKey: [_, params] }) => frontendHttpClient.sendByGetRoute(wretchClient, contributors.retrieveContributor, {
12
+ pathParams: params,
13
+ headers: await headers.resolve()
14
+ })
15
+ });
16
+ exports.retrieveContributorKeys = retrieveContributorKeys;
17
+ exports.useRetrieveContributorQuery = useRetrieveContributorQuery;
12
18
  //# sourceMappingURL=harmony43.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony43.cjs","sources":["../src/features/permissions/hooks/useHasAllFeatureFlags.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { useActionResolverContext } from '../context/ActionResolverContext'\nimport type { FeatureFlag } from '../types/featureFlagTypes'\nimport { has } from '../utils/has'\n\nexport const useHasAllFeatureFlags = (...features: FeatureFlag[]) => {\n\tconst { enabledFeatureFlags } = useActionResolverContext()\n\tconst key = features.join('')\n\n\t// biome-ignore lint/correctness/useExhaustiveDependencies: Using key as spreading parameters will create a new array on every render.\n\treturn useMemo(() => has(enabledFeatureFlags, ...features), [key, enabledFeatureFlags])\n}\n"],"names":["useActionResolverContext","useMemo","has"],"mappings":";;;;;AAKa,MAAA,wBAAwB,IAAI,aAA4B;AAC9D,QAAA,EAAE,oBAAoB,IAAIA,+CAAyB;AACnD,QAAA,MAAM,SAAS,KAAK,EAAE;AAGrB,SAAAC,MAAA,QAAQ,MAAMC,IAAAA,IAAI,qBAAqB,GAAG,QAAQ,GAAG,CAAC,KAAK,mBAAmB,CAAC;AACvF;;"}
1
+ {"version":3,"file":"harmony43.cjs","sources":["../src/features/publicApi/hooks/useRetrieveContributorQuery.ts"],"sourcesContent":["import type { HeaderBuilder } from '@features/auth/core/headers/headerBuilder'\nimport type {\n\tContributorApiBaseHeader,\n\tRetrieveContributorPathParams,\n\tRetrieveContributorResponse,\n} from '@features/publicApi/types/contributorTypes'\nimport { sendByGetRoute } from '@lokalise/frontend-http-client'\nimport { useQuery } from '@tanstack/react-query'\nimport type { ApiQueryOverrides } from '@utils/types/apiQueryOverrides'\nimport type { Wretch } from 'wretch'\nimport { retrieveContributor } from '../contributors'\n\n/**\n * Factory for creating keys for the useRetrieveContributorQuery hook\n */\nexport const retrieveContributorKeys = {\n\tprojectUserKey: (params: RetrieveContributorPathParams) =>\n\t\t['RetrieveContributor', params] as const,\n}\n\n/**\n * A react-router wrapper about the retrieveContributor public API endpoint\n *\n * @param wretchClient - Wretch instance configured to a public API instance.\n * @param headers - A header builder instance to resolve headers for the request.\n * @param overrides - Additional options to pass to the query.\n */\nexport const useRetrieveContributorQuery = <T, S = RetrieveContributorResponse>(\n\twretchClient: Wretch<T>,\n\theaders: HeaderBuilder<ContributorApiBaseHeader>,\n\toverrides: ApiQueryOverrides<RetrieveContributorResponse, typeof retrieveContributorKeys, S>,\n) =>\n\tuseQuery({\n\t\t...overrides,\n\t\tqueryFn: async ({ queryKey: [_, params] }) =>\n\t\t\tsendByGetRoute(wretchClient, retrieveContributor, {\n\t\t\t\tpathParams: params,\n\t\t\t\theaders: await headers.resolve(),\n\t\t\t}),\n\t})\n"],"names":["useQuery","sendByGetRoute","retrieveContributor"],"mappings":";;;;;AAeO,MAAM,0BAA0B;AAAA,EACtC,gBAAgB,CAAC,WAChB,CAAC,uBAAuB,MAAM;AAChC;AASO,MAAM,8BAA8B,CAC1C,cACA,SACA,cAEAA,WAAAA,SAAS;AAAA,EACR,GAAG;AAAA,EACH,SAAS,OAAO,EAAE,UAAU,CAAC,GAAG,MAAM,QACrCC,mBAAAA,eAAe,cAAcC,kCAAqB;AAAA,IACjD,YAAY;AAAA,IACZ,SAAS,MAAM,QAAQ,QAAQ;AAAA,EAC/B,CAAA;AACH,CAAC;;;"}
@@ -1,12 +1,18 @@
1
- import { useMemo } from "react";
2
- import { useActionResolverContext } from "./harmony37.mjs";
3
- import { has } from "./harmony139.mjs";
4
- const useHasAllFeatureFlags = (...features) => {
5
- const { enabledFeatureFlags } = useActionResolverContext();
6
- const key = features.join("");
7
- return useMemo(() => has(enabledFeatureFlags, ...features), [key, enabledFeatureFlags]);
1
+ import { sendByGetRoute } from "@lokalise/frontend-http-client";
2
+ import { useQuery } from "@tanstack/react-query";
3
+ import { retrieveContributor } from "./harmony12.mjs";
4
+ const retrieveContributorKeys = {
5
+ projectUserKey: (params) => ["RetrieveContributor", params]
8
6
  };
7
+ const useRetrieveContributorQuery = (wretchClient, headers, overrides) => useQuery({
8
+ ...overrides,
9
+ queryFn: async ({ queryKey: [_, params] }) => sendByGetRoute(wretchClient, retrieveContributor, {
10
+ pathParams: params,
11
+ headers: await headers.resolve()
12
+ })
13
+ });
9
14
  export {
10
- useHasAllFeatureFlags
15
+ retrieveContributorKeys,
16
+ useRetrieveContributorQuery
11
17
  };
12
18
  //# sourceMappingURL=harmony43.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony43.mjs","sources":["../src/features/permissions/hooks/useHasAllFeatureFlags.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { useActionResolverContext } from '../context/ActionResolverContext'\nimport type { FeatureFlag } from '../types/featureFlagTypes'\nimport { has } from '../utils/has'\n\nexport const useHasAllFeatureFlags = (...features: FeatureFlag[]) => {\n\tconst { enabledFeatureFlags } = useActionResolverContext()\n\tconst key = features.join('')\n\n\t// biome-ignore lint/correctness/useExhaustiveDependencies: Using key as spreading parameters will create a new array on every render.\n\treturn useMemo(() => has(enabledFeatureFlags, ...features), [key, enabledFeatureFlags])\n}\n"],"names":[],"mappings":";;;AAKa,MAAA,wBAAwB,IAAI,aAA4B;AAC9D,QAAA,EAAE,oBAAoB,IAAI,yBAAyB;AACnD,QAAA,MAAM,SAAS,KAAK,EAAE;AAGrB,SAAA,QAAQ,MAAM,IAAI,qBAAqB,GAAG,QAAQ,GAAG,CAAC,KAAK,mBAAmB,CAAC;AACvF;"}
1
+ {"version":3,"file":"harmony43.mjs","sources":["../src/features/publicApi/hooks/useRetrieveContributorQuery.ts"],"sourcesContent":["import type { HeaderBuilder } from '@features/auth/core/headers/headerBuilder'\nimport type {\n\tContributorApiBaseHeader,\n\tRetrieveContributorPathParams,\n\tRetrieveContributorResponse,\n} from '@features/publicApi/types/contributorTypes'\nimport { sendByGetRoute } from '@lokalise/frontend-http-client'\nimport { useQuery } from '@tanstack/react-query'\nimport type { ApiQueryOverrides } from '@utils/types/apiQueryOverrides'\nimport type { Wretch } from 'wretch'\nimport { retrieveContributor } from '../contributors'\n\n/**\n * Factory for creating keys for the useRetrieveContributorQuery hook\n */\nexport const retrieveContributorKeys = {\n\tprojectUserKey: (params: RetrieveContributorPathParams) =>\n\t\t['RetrieveContributor', params] as const,\n}\n\n/**\n * A react-router wrapper about the retrieveContributor public API endpoint\n *\n * @param wretchClient - Wretch instance configured to a public API instance.\n * @param headers - A header builder instance to resolve headers for the request.\n * @param overrides - Additional options to pass to the query.\n */\nexport const useRetrieveContributorQuery = <T, S = RetrieveContributorResponse>(\n\twretchClient: Wretch<T>,\n\theaders: HeaderBuilder<ContributorApiBaseHeader>,\n\toverrides: ApiQueryOverrides<RetrieveContributorResponse, typeof retrieveContributorKeys, S>,\n) =>\n\tuseQuery({\n\t\t...overrides,\n\t\tqueryFn: async ({ queryKey: [_, params] }) =>\n\t\t\tsendByGetRoute(wretchClient, retrieveContributor, {\n\t\t\t\tpathParams: params,\n\t\t\t\theaders: await headers.resolve(),\n\t\t\t}),\n\t})\n"],"names":[],"mappings":";;;AAeO,MAAM,0BAA0B;AAAA,EACtC,gBAAgB,CAAC,WAChB,CAAC,uBAAuB,MAAM;AAChC;AASO,MAAM,8BAA8B,CAC1C,cACA,SACA,cAEA,SAAS;AAAA,EACR,GAAG;AAAA,EACH,SAAS,OAAO,EAAE,UAAU,CAAC,GAAG,MAAM,QACrC,eAAe,cAAc,qBAAqB;AAAA,IACjD,YAAY;AAAA,IACZ,SAAS,MAAM,QAAQ,QAAQ;AAAA,EAC/B,CAAA;AACH,CAAC;"}
@@ -1,20 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const actionResolvers = require("./harmony140.cjs");
4
- function canPerformAction(action, context) {
5
- const resolver = actionResolvers.actionResolvers[action];
6
- if (!resolver) {
7
- throw new Error(`Action resolver for "${action}" not found`);
8
- }
9
- return resolver(context);
3
+ const frontendHttpClient = require("@lokalise/frontend-http-client");
4
+ const reactQuery = require("@tanstack/react-query");
5
+ const projects = require("./harmony15.cjs");
6
+ const retrieveProjectQueryKey = {
7
+ projectIdKey: (projectId) => ["retrieveProject", projectId]
8
+ };
9
+ function useRetrieveProjectQuery(wretchClient, headers, overrides) {
10
+ return reactQuery.useQuery({
11
+ ...overrides,
12
+ queryFn: async ({ queryKey: [_, projectId] }) => frontendHttpClient.sendByGetRoute(wretchClient, projects.retrieveProject, {
13
+ headers: await headers.resolve(),
14
+ pathParams: { projectId }
15
+ })
16
+ });
10
17
  }
11
- function canPerformAnyAction(actions, context) {
12
- return actions.some((action) => canPerformAction(action, context));
13
- }
14
- function canPerformAllActions(actions, context) {
15
- return actions.every((action) => canPerformAction(action, context));
16
- }
17
- exports.canPerformAction = canPerformAction;
18
- exports.canPerformAllActions = canPerformAllActions;
19
- exports.canPerformAnyAction = canPerformAnyAction;
18
+ exports.retrieveProjectQueryKey = retrieveProjectQueryKey;
19
+ exports.useRetrieveProjectQuery = useRetrieveProjectQuery;
20
20
  //# sourceMappingURL=harmony44.cjs.map