@strapi/i18n 0.0.0-next.a4bb06d54b493ab973659d0200e0e42937988850 → 0.0.0-next.aa9c4618783d5e736a3c470cb132b4b7ac807584

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 (421) hide show
  1. package/dist/admin/components/BulkLocaleActionModal.js +262 -0
  2. package/dist/admin/components/BulkLocaleActionModal.js.map +1 -0
  3. package/dist/admin/components/BulkLocaleActionModal.mjs +260 -0
  4. package/dist/admin/components/BulkLocaleActionModal.mjs.map +1 -0
  5. package/dist/admin/components/CMHeaderActions.js +727 -0
  6. package/dist/admin/components/CMHeaderActions.js.map +1 -0
  7. package/dist/admin/components/CMHeaderActions.mjs +702 -0
  8. package/dist/admin/components/CMHeaderActions.mjs.map +1 -0
  9. package/dist/admin/components/CMListViewModalsAdditionalInformation.js +69 -0
  10. package/dist/admin/components/CMListViewModalsAdditionalInformation.js.map +1 -0
  11. package/dist/admin/components/CMListViewModalsAdditionalInformation.mjs +65 -0
  12. package/dist/admin/components/CMListViewModalsAdditionalInformation.mjs.map +1 -0
  13. package/dist/admin/components/CheckboxConfirmation.js +155 -0
  14. package/dist/admin/components/CheckboxConfirmation.js.map +1 -0
  15. package/dist/admin/components/CheckboxConfirmation.mjs +134 -0
  16. package/dist/admin/components/CheckboxConfirmation.mjs.map +1 -0
  17. package/dist/admin/components/CreateLocale.js +395 -0
  18. package/dist/admin/components/CreateLocale.js.map +1 -0
  19. package/dist/admin/components/CreateLocale.mjs +369 -0
  20. package/dist/admin/components/CreateLocale.mjs.map +1 -0
  21. package/dist/admin/components/DeleteLocale.js +90 -0
  22. package/dist/admin/components/DeleteLocale.js.map +1 -0
  23. package/dist/admin/components/DeleteLocale.mjs +69 -0
  24. package/dist/admin/components/DeleteLocale.mjs.map +1 -0
  25. package/dist/admin/components/EditLocale.js +212 -0
  26. package/dist/admin/components/EditLocale.js.map +1 -0
  27. package/dist/admin/components/EditLocale.mjs +190 -0
  28. package/dist/admin/components/EditLocale.mjs.map +1 -0
  29. package/dist/admin/components/LocaleListCell.js +82 -0
  30. package/dist/admin/components/LocaleListCell.js.map +1 -0
  31. package/dist/admin/components/LocaleListCell.mjs +80 -0
  32. package/dist/admin/components/LocaleListCell.mjs.map +1 -0
  33. package/dist/admin/components/LocalePicker.js +105 -0
  34. package/dist/admin/components/LocalePicker.js.map +1 -0
  35. package/dist/admin/components/LocalePicker.mjs +84 -0
  36. package/dist/admin/components/LocalePicker.mjs.map +1 -0
  37. package/dist/admin/components/LocaleTable.js +143 -0
  38. package/dist/admin/components/LocaleTable.js.map +1 -0
  39. package/dist/admin/components/LocaleTable.mjs +122 -0
  40. package/dist/admin/components/LocaleTable.mjs.map +1 -0
  41. package/dist/admin/constants.js +37 -0
  42. package/dist/admin/constants.js.map +1 -0
  43. package/dist/admin/constants.mjs +35 -0
  44. package/dist/admin/constants.mjs.map +1 -0
  45. package/dist/admin/contentManagerHooks/editView.js +109 -0
  46. package/dist/admin/contentManagerHooks/editView.js.map +1 -0
  47. package/dist/admin/contentManagerHooks/editView.mjs +88 -0
  48. package/dist/admin/contentManagerHooks/editView.mjs.map +1 -0
  49. package/dist/admin/contentManagerHooks/listView.js +43 -0
  50. package/dist/admin/contentManagerHooks/listView.js.map +1 -0
  51. package/dist/admin/contentManagerHooks/listView.mjs +41 -0
  52. package/dist/admin/contentManagerHooks/listView.mjs.map +1 -0
  53. package/dist/admin/contentReleasesHooks/releaseDetailsView.js +20 -0
  54. package/dist/admin/contentReleasesHooks/releaseDetailsView.js.map +1 -0
  55. package/dist/admin/contentReleasesHooks/releaseDetailsView.mjs +18 -0
  56. package/dist/admin/contentReleasesHooks/releaseDetailsView.mjs.map +1 -0
  57. package/dist/admin/hooks/useI18n.js +78 -0
  58. package/dist/admin/hooks/useI18n.js.map +1 -0
  59. package/dist/admin/hooks/useI18n.mjs +57 -0
  60. package/dist/admin/hooks/useI18n.mjs.map +1 -0
  61. package/dist/admin/index.js +225 -5
  62. package/dist/admin/index.js.map +1 -1
  63. package/dist/admin/index.mjs +201 -5
  64. package/dist/admin/index.mjs.map +1 -1
  65. package/dist/admin/middlewares/extendCTBAttributeInitialData.js +71 -0
  66. package/dist/admin/middlewares/extendCTBAttributeInitialData.js.map +1 -0
  67. package/dist/admin/middlewares/extendCTBAttributeInitialData.mjs +69 -0
  68. package/dist/admin/middlewares/extendCTBAttributeInitialData.mjs.map +1 -0
  69. package/dist/admin/middlewares/extendCTBInitialData.js +40 -0
  70. package/dist/admin/middlewares/extendCTBInitialData.js.map +1 -0
  71. package/dist/admin/middlewares/extendCTBInitialData.mjs +38 -0
  72. package/dist/admin/middlewares/extendCTBInitialData.mjs.map +1 -0
  73. package/dist/admin/middlewares/rbac-middleware.js +49 -0
  74. package/dist/admin/middlewares/rbac-middleware.js.map +1 -0
  75. package/dist/admin/middlewares/rbac-middleware.mjs +28 -0
  76. package/dist/admin/middlewares/rbac-middleware.mjs.map +1 -0
  77. package/dist/admin/pages/SettingsPage.js +182 -0
  78. package/dist/admin/pages/SettingsPage.js.map +1 -0
  79. package/dist/admin/pages/SettingsPage.mjs +179 -0
  80. package/dist/admin/pages/SettingsPage.mjs.map +1 -0
  81. package/dist/admin/pluginId.js +6 -0
  82. package/dist/admin/pluginId.js.map +1 -0
  83. package/dist/admin/pluginId.mjs +4 -0
  84. package/dist/admin/pluginId.mjs.map +1 -0
  85. package/dist/admin/services/api.js +14 -0
  86. package/dist/admin/services/api.js.map +1 -0
  87. package/dist/admin/services/api.mjs +12 -0
  88. package/dist/admin/services/api.mjs.map +1 -0
  89. package/dist/admin/services/locales.js +72 -0
  90. package/dist/admin/services/locales.js.map +1 -0
  91. package/dist/admin/services/locales.mjs +66 -0
  92. package/dist/admin/services/locales.mjs.map +1 -0
  93. package/dist/admin/services/relations.js +23 -0
  94. package/dist/admin/services/relations.js.map +1 -0
  95. package/dist/admin/services/relations.mjs +21 -0
  96. package/dist/admin/services/relations.mjs.map +1 -0
  97. package/dist/admin/services/settings.js +29 -0
  98. package/dist/admin/services/settings.js.map +1 -0
  99. package/dist/admin/services/settings.mjs +26 -0
  100. package/dist/admin/services/settings.mjs.map +1 -0
  101. package/dist/admin/src/components/CMHeaderActions.d.ts +1 -1
  102. package/dist/admin/src/components/tests/CreateLocale.test.d.ts +1 -0
  103. package/dist/admin/src/components/tests/DeleteLocale.test.d.ts +1 -0
  104. package/dist/admin/src/components/tests/EditLocale.test.d.ts +1 -0
  105. package/dist/admin/src/components/tests/LocaleListCell.test.d.ts +1 -0
  106. package/dist/admin/src/contentReleasesHooks/releaseDetailsView.d.ts +1 -1
  107. package/dist/admin/src/pages/tests/SettingsPage.test.d.ts +1 -0
  108. package/dist/admin/src/services/api.d.ts +1 -1
  109. package/dist/admin/src/services/locales.d.ts +1 -1
  110. package/dist/admin/src/services/relations.d.ts +1 -1
  111. package/dist/admin/src/services/settings.d.ts +5 -0
  112. package/dist/admin/src/utils/schemas.d.ts +642 -16
  113. package/dist/admin/tests/server.d.ts +1 -0
  114. package/dist/admin/tests/utils.d.ts +6 -0
  115. package/dist/admin/translations/de.json.js +66 -0
  116. package/dist/admin/translations/de.json.js.map +1 -0
  117. package/dist/admin/translations/de.json.mjs +64 -0
  118. package/dist/admin/translations/de.json.mjs.map +1 -0
  119. package/dist/admin/translations/dk.json.js +66 -0
  120. package/dist/admin/translations/dk.json.js.map +1 -0
  121. package/dist/admin/translations/dk.json.mjs +64 -0
  122. package/dist/admin/translations/dk.json.mjs.map +1 -0
  123. package/dist/admin/translations/en.json.js +83 -0
  124. package/dist/admin/translations/en.json.js.map +1 -0
  125. package/dist/admin/translations/en.json.mjs +81 -0
  126. package/dist/admin/translations/en.json.mjs.map +1 -0
  127. package/dist/admin/translations/es.json.js +66 -0
  128. package/dist/admin/translations/es.json.js.map +1 -0
  129. package/dist/admin/translations/es.json.mjs +64 -0
  130. package/dist/admin/translations/es.json.mjs.map +1 -0
  131. package/dist/admin/translations/fr.json.js +66 -0
  132. package/dist/admin/translations/fr.json.js.map +1 -0
  133. package/dist/admin/translations/fr.json.mjs +64 -0
  134. package/dist/admin/translations/fr.json.mjs.map +1 -0
  135. package/dist/admin/translations/ko.json.js +65 -0
  136. package/dist/admin/translations/ko.json.js.map +1 -0
  137. package/dist/admin/translations/ko.json.mjs +63 -0
  138. package/dist/admin/translations/ko.json.mjs.map +1 -0
  139. package/dist/admin/translations/pl.json.js +66 -0
  140. package/dist/admin/translations/pl.json.js.map +1 -0
  141. package/dist/admin/translations/pl.json.mjs +64 -0
  142. package/dist/admin/translations/pl.json.mjs.map +1 -0
  143. package/dist/admin/translations/ru.json.js +68 -0
  144. package/dist/admin/translations/ru.json.js.map +1 -0
  145. package/dist/admin/translations/ru.json.mjs +66 -0
  146. package/dist/admin/translations/ru.json.mjs.map +1 -0
  147. package/dist/admin/translations/tr.json.js +66 -0
  148. package/dist/admin/translations/tr.json.js.map +1 -0
  149. package/dist/admin/translations/tr.json.mjs +64 -0
  150. package/dist/admin/translations/tr.json.mjs.map +1 -0
  151. package/dist/admin/translations/uk.json.js +82 -0
  152. package/dist/admin/translations/uk.json.js.map +1 -0
  153. package/dist/admin/translations/uk.json.mjs +80 -0
  154. package/dist/admin/translations/uk.json.mjs.map +1 -0
  155. package/dist/admin/translations/zh-Hans.json.js +57 -0
  156. package/dist/admin/translations/zh-Hans.json.js.map +1 -0
  157. package/dist/admin/translations/zh-Hans.json.mjs +55 -0
  158. package/dist/admin/translations/zh-Hans.json.mjs.map +1 -0
  159. package/dist/admin/translations/zh.json.js +66 -0
  160. package/dist/admin/translations/zh.json.js.map +1 -0
  161. package/dist/admin/translations/zh.json.mjs +64 -0
  162. package/dist/admin/translations/zh.json.mjs.map +1 -0
  163. package/dist/admin/utils/baseQuery.js +8 -0
  164. package/dist/admin/utils/baseQuery.js.map +1 -0
  165. package/dist/admin/utils/baseQuery.mjs +6 -0
  166. package/dist/admin/utils/baseQuery.mjs.map +1 -0
  167. package/dist/admin/utils/clean.js +70 -0
  168. package/dist/admin/utils/clean.js.map +1 -0
  169. package/dist/admin/utils/clean.mjs +68 -0
  170. package/dist/admin/utils/clean.mjs.map +1 -0
  171. package/dist/admin/utils/fields.js +34 -0
  172. package/dist/admin/utils/fields.js.map +1 -0
  173. package/dist/admin/utils/fields.mjs +31 -0
  174. package/dist/admin/utils/fields.mjs.map +1 -0
  175. package/dist/admin/utils/getTranslation.js +8 -0
  176. package/dist/admin/utils/getTranslation.js.map +1 -0
  177. package/dist/admin/utils/getTranslation.mjs +6 -0
  178. package/dist/admin/utils/getTranslation.mjs.map +1 -0
  179. package/dist/admin/utils/prefixPluginTranslations.js +11 -0
  180. package/dist/admin/utils/prefixPluginTranslations.js.map +1 -0
  181. package/dist/admin/utils/prefixPluginTranslations.mjs +9 -0
  182. package/dist/admin/utils/prefixPluginTranslations.mjs.map +1 -0
  183. package/dist/admin/utils/schemas.js +74 -0
  184. package/dist/admin/utils/schemas.js.map +1 -0
  185. package/dist/admin/utils/schemas.mjs +72 -0
  186. package/dist/admin/utils/schemas.mjs.map +1 -0
  187. package/dist/admin/utils/strings.js +6 -0
  188. package/dist/admin/utils/strings.js.map +1 -0
  189. package/dist/admin/utils/strings.mjs +4 -0
  190. package/dist/admin/utils/strings.mjs.map +1 -0
  191. package/dist/server/bootstrap.js +79 -0
  192. package/dist/server/bootstrap.js.map +1 -0
  193. package/dist/server/bootstrap.mjs +77 -0
  194. package/dist/server/bootstrap.mjs.map +1 -0
  195. package/dist/server/constants/index.js +29 -0
  196. package/dist/server/constants/index.js.map +1 -0
  197. package/dist/server/constants/index.mjs +25 -0
  198. package/dist/server/constants/index.mjs.map +1 -0
  199. package/dist/server/constants/iso-locales.json.js +2423 -0
  200. package/dist/server/constants/iso-locales.json.js.map +1 -0
  201. package/dist/server/constants/iso-locales.json.mjs +2421 -0
  202. package/dist/server/constants/iso-locales.json.mjs.map +1 -0
  203. package/dist/server/content-types/index.js +10 -0
  204. package/dist/server/content-types/index.js.map +1 -0
  205. package/dist/server/content-types/index.mjs +8 -0
  206. package/dist/server/content-types/index.mjs.map +1 -0
  207. package/dist/server/content-types/locale/index.js +10 -0
  208. package/dist/server/content-types/locale/index.js.map +1 -0
  209. package/dist/server/content-types/locale/index.mjs +8 -0
  210. package/dist/server/content-types/locale/index.mjs.map +1 -0
  211. package/dist/server/content-types/locale/schema.json.js +46 -0
  212. package/dist/server/content-types/locale/schema.json.js.map +1 -0
  213. package/dist/server/content-types/locale/schema.json.mjs +38 -0
  214. package/dist/server/content-types/locale/schema.json.mjs.map +1 -0
  215. package/dist/server/controllers/content-types.js +76 -0
  216. package/dist/server/controllers/content-types.js.map +1 -0
  217. package/dist/server/controllers/content-types.mjs +74 -0
  218. package/dist/server/controllers/content-types.mjs.map +1 -0
  219. package/dist/server/controllers/index.js +16 -0
  220. package/dist/server/controllers/index.js.map +1 -0
  221. package/dist/server/controllers/index.mjs +14 -0
  222. package/dist/server/controllers/index.mjs.map +1 -0
  223. package/dist/server/controllers/iso-locales.js +13 -0
  224. package/dist/server/controllers/iso-locales.js.map +1 -0
  225. package/dist/server/controllers/iso-locales.mjs +11 -0
  226. package/dist/server/controllers/iso-locales.mjs.map +1 -0
  227. package/dist/server/controllers/locales.js +108 -0
  228. package/dist/server/controllers/locales.js.map +1 -0
  229. package/dist/server/controllers/locales.mjs +87 -0
  230. package/dist/server/controllers/locales.mjs.map +1 -0
  231. package/dist/server/controllers/settings.js +24 -0
  232. package/dist/server/controllers/settings.js.map +1 -0
  233. package/dist/server/controllers/settings.mjs +22 -0
  234. package/dist/server/controllers/settings.mjs.map +1 -0
  235. package/dist/server/controllers/validate-locale-creation.js +47 -0
  236. package/dist/server/controllers/validate-locale-creation.js.map +1 -0
  237. package/dist/server/controllers/validate-locale-creation.mjs +45 -0
  238. package/dist/server/controllers/validate-locale-creation.mjs.map +1 -0
  239. package/dist/server/domain/locale.js +11 -0
  240. package/dist/server/domain/locale.js.map +1 -0
  241. package/dist/server/domain/locale.mjs +9 -0
  242. package/dist/server/domain/locale.mjs.map +1 -0
  243. package/dist/server/graphql.js +115 -0
  244. package/dist/server/graphql.js.map +1 -0
  245. package/dist/server/graphql.mjs +113 -0
  246. package/dist/server/graphql.mjs.map +1 -0
  247. package/dist/server/index.js +18 -3460
  248. package/dist/server/index.js.map +1 -1
  249. package/dist/server/index.mjs +17 -3443
  250. package/dist/server/index.mjs.map +1 -1
  251. package/dist/server/register.js +79 -0
  252. package/dist/server/register.js.map +1 -0
  253. package/dist/server/register.mjs +77 -0
  254. package/dist/server/register.mjs.map +1 -0
  255. package/dist/server/routes/admin.js +122 -0
  256. package/dist/server/routes/admin.js.map +1 -0
  257. package/dist/server/routes/admin.mjs +120 -0
  258. package/dist/server/routes/admin.mjs.map +1 -0
  259. package/dist/server/routes/content-api.js +19 -0
  260. package/dist/server/routes/content-api.js.map +1 -0
  261. package/dist/server/routes/content-api.mjs +17 -0
  262. package/dist/server/routes/content-api.mjs.map +1 -0
  263. package/dist/server/routes/index.js +12 -0
  264. package/dist/server/routes/index.js.map +1 -0
  265. package/dist/server/routes/index.mjs +10 -0
  266. package/dist/server/routes/index.mjs.map +1 -0
  267. package/dist/server/routes/validation/locale.js +57 -0
  268. package/dist/server/routes/validation/locale.js.map +1 -0
  269. package/dist/server/routes/validation/locale.mjs +36 -0
  270. package/dist/server/routes/validation/locale.mjs.map +1 -0
  271. package/dist/server/services/ai-localizations.js +28 -0
  272. package/dist/server/services/ai-localizations.js.map +1 -0
  273. package/dist/server/services/ai-localizations.mjs +26 -0
  274. package/dist/server/services/ai-localizations.mjs.map +1 -0
  275. package/dist/server/services/content-types.js +157 -0
  276. package/dist/server/services/content-types.js.map +1 -0
  277. package/dist/server/services/content-types.mjs +155 -0
  278. package/dist/server/services/content-types.mjs.map +1 -0
  279. package/dist/server/services/index.js +26 -0
  280. package/dist/server/services/index.js.map +1 -0
  281. package/dist/server/services/index.mjs +24 -0
  282. package/dist/server/services/index.mjs.map +1 -0
  283. package/dist/server/services/iso-locales.js +12 -0
  284. package/dist/server/services/iso-locales.js.map +1 -0
  285. package/dist/server/services/iso-locales.mjs +10 -0
  286. package/dist/server/services/iso-locales.mjs.map +1 -0
  287. package/dist/server/services/locales.js +114 -0
  288. package/dist/server/services/locales.js.map +1 -0
  289. package/dist/server/services/locales.mjs +112 -0
  290. package/dist/server/services/locales.mjs.map +1 -0
  291. package/dist/server/services/localizations.js +68 -0
  292. package/dist/server/services/localizations.js.map +1 -0
  293. package/dist/server/services/localizations.mjs +66 -0
  294. package/dist/server/services/localizations.mjs.map +1 -0
  295. package/dist/server/services/metrics.js +30 -0
  296. package/dist/server/services/metrics.js.map +1 -0
  297. package/dist/server/services/metrics.mjs +28 -0
  298. package/dist/server/services/metrics.mjs.map +1 -0
  299. package/dist/server/services/permissions/actions.js +136 -0
  300. package/dist/server/services/permissions/actions.js.map +1 -0
  301. package/dist/server/services/permissions/actions.mjs +134 -0
  302. package/dist/server/services/permissions/actions.mjs.map +1 -0
  303. package/dist/server/services/permissions/engine.js +52 -0
  304. package/dist/server/services/permissions/engine.js.map +1 -0
  305. package/dist/server/services/permissions/engine.mjs +50 -0
  306. package/dist/server/services/permissions/engine.mjs.map +1 -0
  307. package/dist/server/services/permissions/sections-builder.js +45 -0
  308. package/dist/server/services/permissions/sections-builder.js.map +1 -0
  309. package/dist/server/services/permissions/sections-builder.mjs +43 -0
  310. package/dist/server/services/permissions/sections-builder.mjs.map +1 -0
  311. package/dist/server/services/permissions.js +14 -0
  312. package/dist/server/services/permissions.js.map +1 -0
  313. package/dist/server/services/permissions.mjs +12 -0
  314. package/dist/server/services/permissions.mjs.map +1 -0
  315. package/dist/server/services/sanitize/index.js +34 -0
  316. package/dist/server/services/sanitize/index.js.map +1 -0
  317. package/dist/server/services/sanitize/index.mjs +32 -0
  318. package/dist/server/services/sanitize/index.mjs.map +1 -0
  319. package/dist/server/services/settings.js +25 -0
  320. package/dist/server/services/settings.js.map +1 -0
  321. package/dist/server/services/settings.mjs +23 -0
  322. package/dist/server/services/settings.mjs.map +1 -0
  323. package/dist/server/src/controllers/index.d.ts +4 -0
  324. package/dist/server/src/controllers/index.d.ts.map +1 -1
  325. package/dist/server/src/controllers/settings.d.ts +7 -0
  326. package/dist/server/src/controllers/settings.d.ts.map +1 -0
  327. package/dist/server/src/index.d.ts +22 -7
  328. package/dist/server/src/index.d.ts.map +1 -1
  329. package/dist/server/src/routes/admin.d.ts.map +1 -1
  330. package/dist/server/src/routes/content-api.d.ts +5 -8
  331. package/dist/server/src/routes/content-api.d.ts.map +1 -1
  332. package/dist/server/src/routes/index.d.ts +3 -7
  333. package/dist/server/src/routes/index.d.ts.map +1 -1
  334. package/dist/server/src/routes/validation/index.d.ts +2 -0
  335. package/dist/server/src/routes/validation/index.d.ts.map +1 -0
  336. package/dist/server/src/routes/validation/locale.d.ts +41 -0
  337. package/dist/server/src/routes/validation/locale.d.ts.map +1 -0
  338. package/dist/server/src/services/ai-localizations.d.ts +8 -0
  339. package/dist/server/src/services/ai-localizations.d.ts.map +1 -0
  340. package/dist/server/src/services/index.d.ts +15 -0
  341. package/dist/server/src/services/index.d.ts.map +1 -1
  342. package/dist/server/src/services/localizations.d.ts +1 -1
  343. package/dist/server/src/services/localizations.d.ts.map +1 -1
  344. package/dist/server/src/services/settings.d.ts +13 -0
  345. package/dist/server/src/services/settings.d.ts.map +1 -0
  346. package/dist/server/src/utils/index.d.ts +3 -1
  347. package/dist/server/src/utils/index.d.ts.map +1 -1
  348. package/dist/server/src/validation/settings.d.ts +12 -0
  349. package/dist/server/src/validation/settings.d.ts.map +1 -0
  350. package/dist/server/utils/index.js +16 -0
  351. package/dist/server/utils/index.js.map +1 -0
  352. package/dist/server/utils/index.mjs +13 -0
  353. package/dist/server/utils/index.mjs.map +1 -0
  354. package/dist/server/validation/content-types.js +18 -0
  355. package/dist/server/validation/content-types.js.map +1 -0
  356. package/dist/server/validation/content-types.mjs +16 -0
  357. package/dist/server/validation/content-types.mjs.map +1 -0
  358. package/dist/server/validation/locales.js +23 -0
  359. package/dist/server/validation/locales.js.map +1 -0
  360. package/dist/server/validation/locales.mjs +20 -0
  361. package/dist/server/validation/locales.mjs.map +1 -0
  362. package/dist/server/validation/settings.js +11 -0
  363. package/dist/server/validation/settings.js.map +1 -0
  364. package/dist/server/validation/settings.mjs +9 -0
  365. package/dist/server/validation/settings.mjs.map +1 -0
  366. package/dist/shared/contracts/content-manager.d.ts +1 -1
  367. package/dist/shared/contracts/settings.d.ts +40 -0
  368. package/dist/shared/contracts/shared.d.ts +1 -1
  369. package/package.json +17 -12
  370. package/dist/_chunks/SettingsPage-B6QDUmu9.mjs +0 -554
  371. package/dist/_chunks/SettingsPage-B6QDUmu9.mjs.map +0 -1
  372. package/dist/_chunks/SettingsPage-BsHtr3lV.js +0 -573
  373. package/dist/_chunks/SettingsPage-BsHtr3lV.js.map +0 -1
  374. package/dist/_chunks/de-9eCAqqrB.mjs +0 -66
  375. package/dist/_chunks/de-9eCAqqrB.mjs.map +0 -1
  376. package/dist/_chunks/de-DtWiGdHl.js +0 -66
  377. package/dist/_chunks/de-DtWiGdHl.js.map +0 -1
  378. package/dist/_chunks/dk-2qBjxt-P.mjs +0 -66
  379. package/dist/_chunks/dk-2qBjxt-P.mjs.map +0 -1
  380. package/dist/_chunks/dk-D8C-casx.js +0 -66
  381. package/dist/_chunks/dk-D8C-casx.js.map +0 -1
  382. package/dist/_chunks/en-BKBz3tro.js +0 -81
  383. package/dist/_chunks/en-BKBz3tro.js.map +0 -1
  384. package/dist/_chunks/en-DlXfy6Gy.mjs +0 -81
  385. package/dist/_chunks/en-DlXfy6Gy.mjs.map +0 -1
  386. package/dist/_chunks/es-DS-XFGSw.js +0 -66
  387. package/dist/_chunks/es-DS-XFGSw.js.map +0 -1
  388. package/dist/_chunks/es-DlmMVaBG.mjs +0 -66
  389. package/dist/_chunks/es-DlmMVaBG.mjs.map +0 -1
  390. package/dist/_chunks/fr-3S6ke71d.mjs +0 -66
  391. package/dist/_chunks/fr-3S6ke71d.mjs.map +0 -1
  392. package/dist/_chunks/fr-BTjekDpq.js +0 -66
  393. package/dist/_chunks/fr-BTjekDpq.js.map +0 -1
  394. package/dist/_chunks/index-3XgwXL6T.js +0 -1628
  395. package/dist/_chunks/index-3XgwXL6T.js.map +0 -1
  396. package/dist/_chunks/index-iEQ79W05.mjs +0 -1607
  397. package/dist/_chunks/index-iEQ79W05.mjs.map +0 -1
  398. package/dist/_chunks/ko-DmcGUBQ3.js +0 -65
  399. package/dist/_chunks/ko-DmcGUBQ3.js.map +0 -1
  400. package/dist/_chunks/ko-qTjQ8IMw.mjs +0 -65
  401. package/dist/_chunks/ko-qTjQ8IMw.mjs.map +0 -1
  402. package/dist/_chunks/pl-B67TSHqT.mjs +0 -66
  403. package/dist/_chunks/pl-B67TSHqT.mjs.map +0 -1
  404. package/dist/_chunks/pl-Cn5RYonZ.js +0 -66
  405. package/dist/_chunks/pl-Cn5RYonZ.js.map +0 -1
  406. package/dist/_chunks/ru-BMBgVL3s.js +0 -68
  407. package/dist/_chunks/ru-BMBgVL3s.js.map +0 -1
  408. package/dist/_chunks/ru-hagMa57T.mjs +0 -68
  409. package/dist/_chunks/ru-hagMa57T.mjs.map +0 -1
  410. package/dist/_chunks/tr-CarUU76c.js +0 -66
  411. package/dist/_chunks/tr-CarUU76c.js.map +0 -1
  412. package/dist/_chunks/tr-Dw_jmkG-.mjs +0 -66
  413. package/dist/_chunks/tr-Dw_jmkG-.mjs.map +0 -1
  414. package/dist/_chunks/zh-57YM4amO.mjs +0 -66
  415. package/dist/_chunks/zh-57YM4amO.mjs.map +0 -1
  416. package/dist/_chunks/zh-CukOviB0.js +0 -66
  417. package/dist/_chunks/zh-CukOviB0.js.map +0 -1
  418. package/dist/_chunks/zh-Hans-DSHIXAa3.js +0 -57
  419. package/dist/_chunks/zh-Hans-DSHIXAa3.js.map +0 -1
  420. package/dist/_chunks/zh-Hans-Dyc-aR-h.mjs +0 -57
  421. package/dist/_chunks/zh-Hans-Dyc-aR-h.mjs.map +0 -1
@@ -0,0 +1,179 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import 'react';
3
+ import { useNotification, useRBAC, Page, Layouts, useAPIErrorHandler } from '@strapi/admin/strapi-admin';
4
+ import { useAIAvailability } from '@strapi/admin/strapi-admin/ee';
5
+ import { Flex, Box, Typography, Field, Toggle, EmptyStateLayout, Tooltip } from '@strapi/design-system';
6
+ import { Sparkle } from '@strapi/icons';
7
+ import { EmptyDocuments } from '@strapi/icons/symbols';
8
+ import { useIntl } from 'react-intl';
9
+ import { CreateLocale } from '../components/CreateLocale.mjs';
10
+ import { LocaleTable } from '../components/LocaleTable.mjs';
11
+ import { PERMISSIONS } from '../constants.mjs';
12
+ import { useGetLocalesQuery } from '../services/locales.mjs';
13
+ import { useGetSettingsQuery, useUpdateSettingsMutation } from '../services/settings.mjs';
14
+ import { getTranslation } from '../utils/getTranslation.mjs';
15
+
16
+ const SettingsErrrorTooltip = ({ children, error })=>{
17
+ const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();
18
+ if (error) {
19
+ return /*#__PURE__*/ jsx(Tooltip, {
20
+ label: formatAPIError(error),
21
+ style: {
22
+ maxWidth: '200px'
23
+ },
24
+ children: children
25
+ });
26
+ }
27
+ return children;
28
+ };
29
+ const SettingsPage = ()=>{
30
+ const { formatMessage } = useIntl();
31
+ const { toggleNotification } = useNotification();
32
+ const { data: locales, isLoading: isLoadingLocales, error } = useGetLocalesQuery();
33
+ const { isLoading: isLoadingRBAC, allowedActions: { canUpdate, canCreate, canDelete } } = useRBAC(PERMISSIONS);
34
+ const isAIAvailable = useAIAvailability();
35
+ // Settings state management
36
+ const { data: settings, isLoading: isLoadingSettings, error: settingsError } = useGetSettingsQuery();
37
+ const [updateSettings] = useUpdateSettingsMutation();
38
+ const handleToggleChange = async (checked)=>{
39
+ try {
40
+ await updateSettings({
41
+ aiLocalizations: checked
42
+ }).unwrap();
43
+ toggleNotification({
44
+ type: 'success',
45
+ message: formatMessage({
46
+ id: 'notification.form.success.fields'
47
+ })
48
+ });
49
+ } catch (err) {
50
+ console.error(err);
51
+ toggleNotification({
52
+ type: 'danger',
53
+ message: formatMessage({
54
+ id: 'notification.error',
55
+ defaultMessage: 'An error occurred'
56
+ })
57
+ });
58
+ }
59
+ };
60
+ const isLoading = isLoadingLocales || isLoadingRBAC || isLoadingSettings;
61
+ if (isLoading) {
62
+ return /*#__PURE__*/ jsx(Page.Loading, {});
63
+ }
64
+ if (error || !Array.isArray(locales)) {
65
+ return /*#__PURE__*/ jsx(Page.Error, {});
66
+ }
67
+ return /*#__PURE__*/ jsxs(Page.Main, {
68
+ tabIndex: -1,
69
+ children: [
70
+ /*#__PURE__*/ jsx(Layouts.Header, {
71
+ primaryAction: /*#__PURE__*/ jsx(CreateLocale, {
72
+ disabled: !canCreate
73
+ }),
74
+ title: formatMessage({
75
+ id: getTranslation('plugin.name'),
76
+ defaultMessage: 'Internationalization'
77
+ }),
78
+ subtitle: formatMessage({
79
+ id: getTranslation('Settings.list.description'),
80
+ defaultMessage: 'Configure the settings'
81
+ })
82
+ }),
83
+ /*#__PURE__*/ jsxs(Layouts.Content, {
84
+ children: [
85
+ isAIAvailable && window.strapi.future.isEnabled('unstableAILocalizations') && /*#__PURE__*/ jsxs(Flex, {
86
+ background: "neutral0",
87
+ padding: 6,
88
+ marginBottom: 6,
89
+ shadow: "filterShadow",
90
+ hasRadius: true,
91
+ children: [
92
+ /*#__PURE__*/ jsxs(Flex, {
93
+ direction: "column",
94
+ alignItems: "stretch",
95
+ gap: 1,
96
+ flex: 1,
97
+ children: [
98
+ /*#__PURE__*/ jsxs(Flex, {
99
+ gap: 1,
100
+ children: [
101
+ /*#__PURE__*/ jsx(Box, {
102
+ color: "alternative700",
103
+ children: /*#__PURE__*/ jsx(Sparkle, {})
104
+ }),
105
+ /*#__PURE__*/ jsx(Typography, {
106
+ variant: "delta",
107
+ tag: "h2",
108
+ children: formatMessage({
109
+ id: getTranslation('Settings.aiLocalizations.label'),
110
+ defaultMessage: 'AI Translations'
111
+ })
112
+ })
113
+ ]
114
+ }),
115
+ /*#__PURE__*/ jsx(Typography, {
116
+ variant: "pi",
117
+ textColor: "neutral600",
118
+ fontSize: "14px",
119
+ children: formatMessage({
120
+ id: getTranslation('Settings.aiLocalizations.description'),
121
+ defaultMessage: 'Everytime you save in the Content Manager, our AI will use your default locale to translate all other locales automatically.'
122
+ })
123
+ })
124
+ ]
125
+ }),
126
+ /*#__PURE__*/ jsx(Field.Root, {
127
+ name: "aiLocalizations",
128
+ minWidth: "200px",
129
+ children: /*#__PURE__*/ jsx(SettingsErrrorTooltip, {
130
+ error: settingsError,
131
+ children: /*#__PURE__*/ jsx(Toggle, {
132
+ disabled: Boolean(settingsError),
133
+ checked: settings?.data?.aiLocalizations ?? false,
134
+ offLabel: formatMessage({
135
+ id: 'app.components.ToggleCheckbox.disabled-label',
136
+ defaultMessage: 'Disabled'
137
+ }),
138
+ onLabel: formatMessage({
139
+ id: 'app.components.ToggleCheckbox.enabled-label',
140
+ defaultMessage: 'Enabled'
141
+ }),
142
+ onChange: (e)=>handleToggleChange(e.target.checked)
143
+ })
144
+ })
145
+ })
146
+ ]
147
+ }),
148
+ locales.length > 0 ? /*#__PURE__*/ jsx(LocaleTable, {
149
+ locales: locales,
150
+ canDelete: canDelete,
151
+ canUpdate: canUpdate
152
+ }) : /*#__PURE__*/ jsx(EmptyStateLayout, {
153
+ icon: /*#__PURE__*/ jsx(EmptyDocuments, {
154
+ width: undefined,
155
+ height: undefined
156
+ }),
157
+ content: formatMessage({
158
+ id: getTranslation('Settings.list.empty.title'),
159
+ defaultMessage: 'There are no locales'
160
+ }),
161
+ action: /*#__PURE__*/ jsx(CreateLocale, {
162
+ disabled: !canCreate,
163
+ variant: "secondary"
164
+ })
165
+ })
166
+ ]
167
+ })
168
+ ]
169
+ });
170
+ };
171
+ const ProtectedSettingsPage = ()=>{
172
+ return /*#__PURE__*/ jsx(Page.Protect, {
173
+ permissions: PERMISSIONS.read,
174
+ children: /*#__PURE__*/ jsx(SettingsPage, {})
175
+ });
176
+ };
177
+
178
+ export { ProtectedSettingsPage, SettingsPage };
179
+ //# sourceMappingURL=SettingsPage.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingsPage.mjs","sources":["../../../admin/src/pages/SettingsPage.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { SerializedError } from '@reduxjs/toolkit';\nimport {\n Page,\n useAPIErrorHandler,\n useNotification,\n useRBAC,\n Layouts,\n BaseQueryError,\n} from '@strapi/admin/strapi-admin';\nimport { useAIAvailability } from '@strapi/admin/strapi-admin/ee';\nimport {\n Box,\n EmptyStateLayout,\n Field,\n Flex,\n Tooltip,\n Toggle,\n Typography,\n} from '@strapi/design-system';\nimport { Sparkle } from '@strapi/icons';\nimport { EmptyDocuments } from '@strapi/icons/symbols';\nimport { useIntl } from 'react-intl';\n\nimport { CreateLocale } from '../components/CreateLocale';\nimport { LocaleTable } from '../components/LocaleTable';\nimport { PERMISSIONS } from '../constants';\nimport { useGetLocalesQuery } from '../services/locales';\nimport { useGetSettingsQuery, useUpdateSettingsMutation } from '../services/settings';\nimport { getTranslation } from '../utils/getTranslation';\n\nconst SettingsErrrorTooltip = ({\n children,\n error,\n}: {\n children: React.ReactNode;\n error: BaseQueryError | SerializedError | undefined;\n}) => {\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();\n\n if (error) {\n return (\n <Tooltip label={formatAPIError(error)} style={{ maxWidth: '200px' }}>\n {children}\n </Tooltip>\n );\n }\n\n return children;\n};\n\nconst SettingsPage = () => {\n const { formatMessage } = useIntl();\n const { toggleNotification } = useNotification();\n const { data: locales, isLoading: isLoadingLocales, error } = useGetLocalesQuery();\n const {\n isLoading: isLoadingRBAC,\n allowedActions: { canUpdate, canCreate, canDelete },\n } = useRBAC(PERMISSIONS);\n const isAIAvailable = useAIAvailability();\n\n // Settings state management\n const {\n data: settings,\n isLoading: isLoadingSettings,\n error: settingsError,\n } = useGetSettingsQuery();\n const [updateSettings] = useUpdateSettingsMutation();\n\n const handleToggleChange = async (checked: boolean) => {\n try {\n await updateSettings({ aiLocalizations: checked }).unwrap();\n\n toggleNotification({\n type: 'success',\n message: formatMessage({ id: 'notification.form.success.fields' }),\n });\n } catch (err) {\n console.error(err);\n toggleNotification({\n type: 'danger',\n message: formatMessage({\n id: 'notification.error',\n defaultMessage: 'An error occurred',\n }),\n });\n }\n };\n\n const isLoading = isLoadingLocales || isLoadingRBAC || isLoadingSettings;\n\n if (isLoading) {\n return <Page.Loading />;\n }\n\n if (error || !Array.isArray(locales)) {\n return <Page.Error />;\n }\n\n return (\n <Page.Main tabIndex={-1}>\n <Layouts.Header\n primaryAction={<CreateLocale disabled={!canCreate} />}\n title={formatMessage({\n id: getTranslation('plugin.name'),\n defaultMessage: 'Internationalization',\n })}\n subtitle={formatMessage({\n id: getTranslation('Settings.list.description'),\n defaultMessage: 'Configure the settings',\n })}\n />\n <Layouts.Content>\n {isAIAvailable && window.strapi.future.isEnabled('unstableAILocalizations') && (\n <Flex background=\"neutral0\" padding={6} marginBottom={6} shadow=\"filterShadow\" hasRadius>\n <Flex direction=\"column\" alignItems=\"stretch\" gap={1} flex={1}>\n <Flex gap={1}>\n <Box color=\"alternative700\">\n <Sparkle />\n </Box>\n <Typography variant=\"delta\" tag=\"h2\">\n {formatMessage({\n id: getTranslation('Settings.aiLocalizations.label'),\n defaultMessage: 'AI Translations',\n })}\n </Typography>\n </Flex>\n <Typography variant=\"pi\" textColor=\"neutral600\" fontSize=\"14px\">\n {formatMessage({\n id: getTranslation('Settings.aiLocalizations.description'),\n defaultMessage:\n 'Everytime you save in the Content Manager, our AI will use your default locale to translate all other locales automatically.',\n })}\n </Typography>\n </Flex>\n <Field.Root name=\"aiLocalizations\" minWidth=\"200px\">\n <SettingsErrrorTooltip error={settingsError}>\n <Toggle\n disabled={Boolean(settingsError)}\n checked={settings?.data?.aiLocalizations ?? false}\n offLabel={formatMessage({\n id: 'app.components.ToggleCheckbox.disabled-label',\n defaultMessage: 'Disabled',\n })}\n onLabel={formatMessage({\n id: 'app.components.ToggleCheckbox.enabled-label',\n defaultMessage: 'Enabled',\n })}\n onChange={(e) => handleToggleChange(e.target.checked)}\n />\n </SettingsErrrorTooltip>\n </Field.Root>\n </Flex>\n )}\n {locales.length > 0 ? (\n <LocaleTable locales={locales} canDelete={canDelete} canUpdate={canUpdate} />\n ) : (\n <EmptyStateLayout\n icon={<EmptyDocuments width={undefined} height={undefined} />}\n content={formatMessage({\n id: getTranslation('Settings.list.empty.title'),\n defaultMessage: 'There are no locales',\n })}\n action={<CreateLocale disabled={!canCreate} variant=\"secondary\" />}\n />\n )}\n </Layouts.Content>\n </Page.Main>\n );\n};\n\nconst ProtectedSettingsPage = () => {\n return (\n <Page.Protect permissions={PERMISSIONS.read}>\n <SettingsPage />\n </Page.Protect>\n );\n};\n\nexport { ProtectedSettingsPage, SettingsPage };\n"],"names":["SettingsErrrorTooltip","children","error","_unstableFormatAPIError","formatAPIError","useAPIErrorHandler","_jsx","Tooltip","label","style","maxWidth","SettingsPage","formatMessage","useIntl","toggleNotification","useNotification","data","locales","isLoading","isLoadingLocales","useGetLocalesQuery","isLoadingRBAC","allowedActions","canUpdate","canCreate","canDelete","useRBAC","PERMISSIONS","isAIAvailable","useAIAvailability","settings","isLoadingSettings","settingsError","useGetSettingsQuery","updateSettings","useUpdateSettingsMutation","handleToggleChange","checked","aiLocalizations","unwrap","type","message","id","err","console","defaultMessage","Page","Loading","Array","isArray","Error","_jsxs","Main","tabIndex","Layouts","Header","primaryAction","CreateLocale","disabled","title","getTranslation","subtitle","Content","window","strapi","future","isEnabled","Flex","background","padding","marginBottom","shadow","hasRadius","direction","alignItems","gap","flex","Box","color","Sparkle","Typography","variant","tag","textColor","fontSize","Field","Root","name","minWidth","Toggle","Boolean","offLabel","onLabel","onChange","e","target","length","LocaleTable","EmptyStateLayout","icon","EmptyDocuments","width","undefined","height","content","action","ProtectedSettingsPage","Protect","permissions","read"],"mappings":";;;;;;;;;;;;;;;AAgCA,MAAMA,wBAAwB,CAAC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F,IAAI;AACzC,QAAA,QAAA,gBAAAvG,GAACK,CAAAA,YAAAA,EAAAA,EAAAA;;AAGP;;;;"}
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ const pluginId = 'i18n';
4
+
5
+ exports.pluginId = pluginId;
6
+ //# sourceMappingURL=pluginId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pluginId.js","sources":["../../admin/src/pluginId.ts"],"sourcesContent":["export const pluginId = 'i18n';\n"],"names":["pluginId"],"mappings":";;AAAO,MAAMA,WAAW;;;;"}
@@ -0,0 +1,4 @@
1
+ const pluginId = 'i18n';
2
+
3
+ export { pluginId };
4
+ //# sourceMappingURL=pluginId.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pluginId.mjs","sources":["../../admin/src/pluginId.ts"],"sourcesContent":["export const pluginId = 'i18n';\n"],"names":["pluginId"],"mappings":"AAAO,MAAMA,WAAW;;;;"}
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var strapiAdmin = require('@strapi/admin/strapi-admin');
4
+
5
+ const i18nApi = strapiAdmin.adminApi.enhanceEndpoints({
6
+ addTagTypes: [
7
+ 'Locale',
8
+ 'KeyStatistics',
9
+ 'Settings'
10
+ ]
11
+ });
12
+
13
+ exports.i18nApi = i18nApi;
14
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sources":["../../../admin/src/services/api.ts"],"sourcesContent":["import { adminApi } from '@strapi/admin/strapi-admin';\n\nconst i18nApi = adminApi.enhanceEndpoints({\n addTagTypes: ['Locale', 'KeyStatistics', 'Settings'],\n});\n\nexport { i18nApi };\n"],"names":["i18nApi","adminApi","enhanceEndpoints","addTagTypes"],"mappings":";;;;AAEMA,MAAAA,OAAAA,GAAUC,oBAASC,CAAAA,gBAAgB,CAAC;IACxCC,WAAa,EAAA;AAAC,QAAA,QAAA;AAAU,QAAA,eAAA;AAAiB,QAAA;AAAW;AACtD,CAAA;;;;"}
@@ -0,0 +1,12 @@
1
+ import { adminApi } from '@strapi/admin/strapi-admin';
2
+
3
+ const i18nApi = adminApi.enhanceEndpoints({
4
+ addTagTypes: [
5
+ 'Locale',
6
+ 'KeyStatistics',
7
+ 'Settings'
8
+ ]
9
+ });
10
+
11
+ export { i18nApi };
12
+ //# sourceMappingURL=api.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.mjs","sources":["../../../admin/src/services/api.ts"],"sourcesContent":["import { adminApi } from '@strapi/admin/strapi-admin';\n\nconst i18nApi = adminApi.enhanceEndpoints({\n addTagTypes: ['Locale', 'KeyStatistics', 'Settings'],\n});\n\nexport { i18nApi };\n"],"names":["i18nApi","adminApi","enhanceEndpoints","addTagTypes"],"mappings":";;AAEMA,MAAAA,OAAAA,GAAUC,QAASC,CAAAA,gBAAgB,CAAC;IACxCC,WAAa,EAAA;AAAC,QAAA,QAAA;AAAU,QAAA,eAAA;AAAiB,QAAA;AAAW;AACtD,CAAA;;;;"}
@@ -0,0 +1,72 @@
1
+ 'use strict';
2
+
3
+ var api = require('./api.js');
4
+
5
+ const localesApi = api.i18nApi.injectEndpoints({
6
+ endpoints: (builder)=>({
7
+ createLocale: builder.mutation({
8
+ query: (data)=>({
9
+ url: '/i18n/locales',
10
+ method: 'POST',
11
+ data
12
+ }),
13
+ invalidatesTags: [
14
+ {
15
+ type: 'Locale',
16
+ id: 'LIST'
17
+ },
18
+ 'HomepageKeyStatistics'
19
+ ]
20
+ }),
21
+ deleteLocale: builder.mutation({
22
+ query: (id)=>({
23
+ url: `/i18n/locales/${id}`,
24
+ method: 'DELETE'
25
+ }),
26
+ invalidatesTags: (result, error, id)=>[
27
+ {
28
+ type: 'Locale',
29
+ id
30
+ },
31
+ 'HomepageKeyStatistics'
32
+ ]
33
+ }),
34
+ getLocales: builder.query({
35
+ query: ()=>'/i18n/locales',
36
+ providesTags: (res)=>[
37
+ {
38
+ type: 'Locale',
39
+ id: 'LIST'
40
+ },
41
+ ...Array.isArray(res) ? res.map((locale)=>({
42
+ type: 'Locale',
43
+ id: locale.id
44
+ })) : []
45
+ ]
46
+ }),
47
+ getDefaultLocales: builder.query({
48
+ query: ()=>'/i18n/iso-locales'
49
+ }),
50
+ updateLocale: builder.mutation({
51
+ query: ({ id, ...data })=>({
52
+ url: `/i18n/locales/${id}`,
53
+ method: 'PUT',
54
+ data
55
+ }),
56
+ invalidatesTags: (result, error, { id })=>[
57
+ {
58
+ type: 'Locale',
59
+ id
60
+ }
61
+ ]
62
+ })
63
+ })
64
+ });
65
+ const { useCreateLocaleMutation, useDeleteLocaleMutation, useGetLocalesQuery, useGetDefaultLocalesQuery, useUpdateLocaleMutation } = localesApi;
66
+
67
+ exports.useCreateLocaleMutation = useCreateLocaleMutation;
68
+ exports.useDeleteLocaleMutation = useDeleteLocaleMutation;
69
+ exports.useGetDefaultLocalesQuery = useGetDefaultLocalesQuery;
70
+ exports.useGetLocalesQuery = useGetLocalesQuery;
71
+ exports.useUpdateLocaleMutation = useUpdateLocaleMutation;
72
+ //# sourceMappingURL=locales.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locales.js","sources":["../../../admin/src/services/locales.ts"],"sourcesContent":["import { i18nApi } from './api';\n\nimport type { GetISOLocales } from '../../../shared/contracts/iso-locales';\nimport type {\n GetLocales,\n CreateLocale,\n DeleteLocale,\n UpdateLocale,\n} from '../../../shared/contracts/locales';\n\nconst localesApi = i18nApi.injectEndpoints({\n endpoints: (builder) => ({\n createLocale: builder.mutation<CreateLocale.Response, CreateLocale.Request['body']>({\n query: (data) => ({\n url: '/i18n/locales',\n method: 'POST',\n data,\n }),\n invalidatesTags: [{ type: 'Locale', id: 'LIST' }, 'HomepageKeyStatistics'],\n }),\n deleteLocale: builder.mutation<DeleteLocale.Response, DeleteLocale.Params['id']>({\n query: (id) => ({\n url: `/i18n/locales/${id}`,\n method: 'DELETE',\n }),\n invalidatesTags: (result, error, id) => [{ type: 'Locale', id }, 'HomepageKeyStatistics'],\n }),\n getLocales: builder.query<GetLocales.Response, void>({\n query: () => '/i18n/locales',\n providesTags: (res) => [\n { type: 'Locale', id: 'LIST' },\n ...(Array.isArray(res)\n ? res.map((locale) => ({\n type: 'Locale' as const,\n id: locale.id,\n }))\n : []),\n ],\n }),\n getDefaultLocales: builder.query<GetISOLocales.Response, void>({\n query: () => '/i18n/iso-locales',\n }),\n updateLocale: builder.mutation<\n UpdateLocale.Response,\n UpdateLocale.Request['body'] & UpdateLocale.Params\n >({\n query: ({ id, ...data }) => ({\n url: `/i18n/locales/${id}`,\n method: 'PUT',\n data,\n }),\n invalidatesTags: (result, error, { id }) => [{ type: 'Locale', id }],\n }),\n }),\n});\n\nconst {\n useCreateLocaleMutation,\n useDeleteLocaleMutation,\n useGetLocalesQuery,\n useGetDefaultLocalesQuery,\n useUpdateLocaleMutation,\n} = localesApi;\n\nexport {\n useCreateLocaleMutation,\n useDeleteLocaleMutation,\n useGetLocalesQuery,\n useGetDefaultLocalesQuery,\n useUpdateLocaleMutation,\n};\n"],"names":["localesApi","i18nApi","injectEndpoints","endpoints","builder","createLocale","mutation","query","data","url","method","invalidatesTags","type","id","deleteLocale","result","error","getLocales","providesTags","res","Array","isArray","map","locale","getDefaultLocales","updateLocale","useCreateLocaleMutation","useDeleteLocaleMutation","useGetLocalesQuery","useGetDefaultLocalesQuery","useUpdateLocaleMutation"],"mappings":";;;;AAUA,MAAMA,UAAAA,GAAaC,WAAQC,CAAAA,eAAe,CAAC;IACzCC,SAAW,EAAA,CAACC,WAAa;YACvBC,YAAcD,EAAAA,OAAAA,CAAQE,QAAQ,CAAsD;gBAClFC,KAAO,EAAA,CAACC,QAAU;wBAChBC,GAAK,EAAA,eAAA;wBACLC,MAAQ,EAAA,MAAA;AACRF,wBAAAA;qBACF,CAAA;gBACAG,eAAiB,EAAA;AAAC,oBAAA;wBAAEC,IAAM,EAAA,QAAA;wBAAUC,EAAI,EAAA;AAAO,qBAAA;AAAG,oBAAA;AAAwB;AAC5E,aAAA,CAAA;YACAC,Y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EAAA,QAAA;AAAUC,4BAAAA;AAAG;AAAE;AACtE,aAAA;SACF;AACF,CAAA,CAAA;AAEM,MAAA,EACJa,uBAAuB,EACvBC,uBAAuB,EACvBC,kBAAkB,EAClBC,yBAAyB,EACzBC,uBAAuB,EACxB,GAAG9B;;;;;;;;"}
@@ -0,0 +1,66 @@
1
+ import { i18nApi } from './api.mjs';
2
+
3
+ const localesApi = i18nApi.injectEndpoints({
4
+ endpoints: (builder)=>({
5
+ createLocale: builder.mutation({
6
+ query: (data)=>({
7
+ url: '/i18n/locales',
8
+ method: 'POST',
9
+ data
10
+ }),
11
+ invalidatesTags: [
12
+ {
13
+ type: 'Locale',
14
+ id: 'LIST'
15
+ },
16
+ 'HomepageKeyStatistics'
17
+ ]
18
+ }),
19
+ deleteLocale: builder.mutation({
20
+ query: (id)=>({
21
+ url: `/i18n/locales/${id}`,
22
+ method: 'DELETE'
23
+ }),
24
+ invalidatesTags: (result, error, id)=>[
25
+ {
26
+ type: 'Locale',
27
+ id
28
+ },
29
+ 'HomepageKeyStatistics'
30
+ ]
31
+ }),
32
+ getLocales: builder.query({
33
+ query: ()=>'/i18n/locales',
34
+ providesTags: (res)=>[
35
+ {
36
+ type: 'Locale',
37
+ id: 'LIST'
38
+ },
39
+ ...Array.isArray(res) ? res.map((locale)=>({
40
+ type: 'Locale',
41
+ id: locale.id
42
+ })) : []
43
+ ]
44
+ }),
45
+ getDefaultLocales: builder.query({
46
+ query: ()=>'/i18n/iso-locales'
47
+ }),
48
+ updateLocale: builder.mutation({
49
+ query: ({ id, ...data })=>({
50
+ url: `/i18n/locales/${id}`,
51
+ method: 'PUT',
52
+ data
53
+ }),
54
+ invalidatesTags: (result, error, { id })=>[
55
+ {
56
+ type: 'Locale',
57
+ id
58
+ }
59
+ ]
60
+ })
61
+ })
62
+ });
63
+ const { useCreateLocaleMutation, useDeleteLocaleMutation, useGetLocalesQuery, useGetDefaultLocalesQuery, useUpdateLocaleMutation } = localesApi;
64
+
65
+ export { useCreateLocaleMutation, useDeleteLocaleMutation, useGetDefaultLocalesQuery, useGetLocalesQuery, useUpdateLocaleMutation };
66
+ //# sourceMappingURL=locales.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locales.mjs","sources":["../../../admin/src/services/locales.ts"],"sourcesContent":["import { i18nApi } from './api';\n\nimport type { GetISOLocales } from '../../../shared/contracts/iso-locales';\nimport type {\n GetLocales,\n CreateLocale,\n DeleteLocale,\n UpdateLocale,\n} from '../../../shared/contracts/locales';\n\nconst localesApi = i18nApi.injectEndpoints({\n endpoints: (builder) => ({\n createLocale: builder.mutation<CreateLocale.Response, CreateLocale.Request['body']>({\n query: (data) => ({\n url: '/i18n/locales',\n method: 'POST',\n data,\n }),\n invalidatesTags: [{ type: 'Locale', id: 'LIST' }, 'HomepageKeyStatistics'],\n }),\n deleteLocale: builder.mutation<DeleteLocale.Response, DeleteLocale.Params['id']>({\n query: (id) => ({\n url: `/i18n/locales/${id}`,\n method: 'DELETE',\n }),\n invalidatesTags: (result, error, id) => [{ type: 'Locale', id }, 'HomepageKeyStatistics'],\n }),\n getLocales: builder.query<GetLocales.Response, void>({\n query: () => '/i18n/locales',\n providesTags: (res) => [\n { type: 'Locale', id: 'LIST' },\n ...(Array.isArray(res)\n ? res.map((locale) => ({\n type: 'Locale' as const,\n id: locale.id,\n }))\n : []),\n ],\n }),\n getDefaultLocales: builder.query<GetISOLocales.Response, void>({\n query: () => '/i18n/iso-locales',\n }),\n updateLocale: builder.mutation<\n UpdateLocale.Response,\n UpdateLocale.Request['body'] & UpdateLocale.Params\n >({\n query: ({ id, ...data }) => ({\n url: `/i18n/locales/${id}`,\n method: 'PUT',\n data,\n }),\n invalidatesTags: (result, error, { id }) => [{ type: 'Locale', id }],\n }),\n }),\n});\n\nconst {\n useCreateLocaleMutation,\n useDeleteLocaleMutation,\n useGetLocalesQuery,\n useGetDefaultLocalesQuery,\n useUpdateLocaleMutation,\n} = localesApi;\n\nexport {\n useCreateLocaleMutation,\n useDeleteLocaleMutation,\n useGetLocalesQuery,\n useGetDefaultLocalesQuery,\n useUpdateLocaleMutation,\n};\n"],"names":["localesApi","i18nApi","injectEndpoints","endpoints","builder","createLocale","mutation","query","data","url","method","invalidatesTags","type","id","deleteLocale","result","error","getLocales","providesTags","res","Array","isArray","map","locale","getDefaultLocales","updateLocale","useCreateLocaleMutation","useDeleteLocaleMutation","useGetLocalesQuery","useGetDefaultLocalesQuery","useUpdateLocaleMutation"],"mappings":";;AAUA,MAAMA,UAAAA,GAAaC,OAAQC,CAAAA,eAAe,CAAC;IACzCC,SAAW,EAAA,CAACC,WAAa;YACvBC,YAAcD,EAAAA,OAAAA,CAAQE,QAAQ,CAAsD;gBAClFC,KAAO,EAAA,CAACC,QAAU;wBAChBC,GAAK,EAAA,eAAA;wBACLC,MAAQ,EAAA,MAAA;AACRF,wBAAAA;qBACF,CAAA;gBACAG,eAAiB,EAAA;AAAC,oBAAA;wBAAEC,IAAM,EAAA,QAAA;wBAAUC,EAAI,EAAA;AAAO,qBAAA;AAAG,oBAAA;AAAwB;AAC5E,aAAA,CAAA;YACAC,YAAcV,EAAAA,OAAAA,CAAQE,QAAQ,CAAmD;gBAC/EC,KAAO,EAAA,CAACM,MAAQ;AACdJ,wBAAAA,GAAAA,EAAK,CAAC,cAAc,EAAEI,EAAAA,CAAG,CAAC;wBAC1BH,MAAQ,EAAA;qBACV,CAAA;gBACAC,eAAiB,EAAA,CAACI,MAAQC,EAAAA,KAAAA,EAAOH,EAAO,GAAA;AAAC,wBAAA;4BAAED,IAAM,EAAA,QAAA;AAAUC,4BAAAA;AAAG,yBAAA;AAAG,wBAAA;AAAwB;AAC3F,aAAA,CAAA;YACAI,UAAYb,EAAAA,OAAAA,CAAQG,KAAK,CAA4B;AACnDA,gBAAAA,KAAAA,EAAO,IAAM,eAAA;AACbW,gBAAAA,YAAAA,EAAc,CAACC,GAAQ,GAAA;AACrB,wBAAA;4BAAEP,IAAM,EAAA,QAAA;4BAAUC,EAAI,EAAA;AAAO,yBAAA;2BACzBO,KAAMC,CAAAA,OAAO,CAACF,GACdA,CAAAA,GAAAA,GAAAA,CAAIG,GAAG,CAAC,CAACC,UAAY;gCACnBX,IAAM,EAAA,QAAA;AACNC,gCAAAA,EAAAA,EAAIU,OAAOV;AACb,6BAAA,KACA;AACL;AACH,aAAA,CAAA;YACAW,iBAAmBpB,EAAAA,OAAAA,CAAQG,KAAK,CAA+B;AAC7DA,gBAAAA,KAAAA,EAAO,IAAM;AACf,aAAA,CAAA;YACAkB,YAAcrB,EAAAA,OAAAA,CAAQE,QAAQ,CAG5B;AACAC,gBAAAA,KAAAA,EAAO,CAAC,EAAEM,EAAE,EAAE,GAAGL,IAAAA,EAAM,IAAM;AAC3BC,wBAAAA,GAAAA,EAAK,CAAC,cAAc,EAAEI,EAAAA,CAAG,CAAC;wBAC1BH,MAAQ,EAAA,KAAA;AACRF,wBAAAA;qBACF,CAAA;AACAG,gBAAAA,eAAAA,EAAiB,CAACI,MAAQC,EAAAA,KAAAA,EAAO,EAAEH,EAAE,EAAE,GAAK;AAAC,wBAAA;4BAAED,IAAM,EAAA,QAAA;AAAUC,4BAAAA;AAAG;AAAE;AACtE,aAAA;SACF;AACF,CAAA,CAAA;AAEM,MAAA,EACJa,uBAAuB,EACvBC,uBAAuB,EACvBC,kBAAkB,EAClBC,yBAAyB,EACzBC,uBAAuB,EACxB,GAAG9B;;;;"}
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ var api = require('./api.js');
4
+
5
+ const relationsApi = api.i18nApi.injectEndpoints({
6
+ overrideExisting: true,
7
+ endpoints: (builder)=>({
8
+ getManyDraftRelationCount: builder.query({
9
+ query: ({ model, ...params })=>({
10
+ url: `/content-manager/collection-types/${model}/actions/countManyEntriesDraftRelations`,
11
+ method: 'GET',
12
+ config: {
13
+ params
14
+ }
15
+ }),
16
+ transformResponse: (response)=>response.data
17
+ })
18
+ })
19
+ });
20
+ const { useGetManyDraftRelationCountQuery } = relationsApi;
21
+
22
+ exports.useGetManyDraftRelationCountQuery = useGetManyDraftRelationCountQuery;
23
+ //# sourceMappingURL=relations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relations.js","sources":["../../../admin/src/services/relations.ts"],"sourcesContent":["import { i18nApi } from './api';\n\nimport type { CountManyEntriesDraftRelations } from '../../../shared/contracts/content-manager';\n\nconst relationsApi = i18nApi.injectEndpoints({\n overrideExisting: true,\n endpoints: (builder) => ({\n getManyDraftRelationCount: builder.query<\n CountManyEntriesDraftRelations.Response['data'],\n CountManyEntriesDraftRelations.Request['query'] & {\n model: string;\n }\n >({\n query: ({ model, ...params }) => ({\n url: `/content-manager/collection-types/${model}/actions/countManyEntriesDraftRelations`,\n method: 'GET',\n config: {\n params,\n },\n }),\n transformResponse: (response: CountManyEntriesDraftRelations.Response) => response.data,\n }),\n }),\n});\n\nconst { useGetManyDraftRelationCountQuery } = relationsApi;\n\nexport { useGetManyDraftRelationCountQuery };\n"],"names":["relationsApi","i18nApi","injectEndpoints","overrideExisting","endpoints","builder","getManyDraftRelationCount","query","model","params","url","method","config","transformResponse","response","data","useGetManyDraftRelationCountQuery"],"mappings":";;;;AAIA,MAAMA,YAAAA,GAAeC,WAAQC,CAAAA,eAAe,CAAC;IAC3CC,gBAAkB,EAAA,IAAA;IAClBC,SAAW,EAAA,CAACC,WAAa;YACvBC,yBAA2BD,EAAAA,OAAAA,CAAQE,KAAK,CAKtC;AACAA,gBAAAA,KAAAA,EAAO,CAAC,EAAEC,KAAK,EAAE,GAAGC,MAAAA,EAAQ,IAAM;AAChCC,wBAAAA,GAAAA,EAAK,CAAC,kCAAkC,EAAEF,KAAAA,CAAM,uCAAuC,CAAC;wBACxFG,MAAQ,EAAA,KAAA;wBACRC,MAAQ,EAAA;AACNH,4BAAAA;AACF;qBACF,CAAA;gBACAI,iBAAmB,EAAA,CAACC,QAAsDA,GAAAA,QAAAA,CAASC;AACrF,aAAA;SACF;AACF,CAAA,CAAA;AAEM,MAAA,EAAEC,iCAAiC,EAAE,GAAGhB;;;;"}
@@ -0,0 +1,21 @@
1
+ import { i18nApi } from './api.mjs';
2
+
3
+ const relationsApi = i18nApi.injectEndpoints({
4
+ overrideExisting: true,
5
+ endpoints: (builder)=>({
6
+ getManyDraftRelationCount: builder.query({
7
+ query: ({ model, ...params })=>({
8
+ url: `/content-manager/collection-types/${model}/actions/countManyEntriesDraftRelations`,
9
+ method: 'GET',
10
+ config: {
11
+ params
12
+ }
13
+ }),
14
+ transformResponse: (response)=>response.data
15
+ })
16
+ })
17
+ });
18
+ const { useGetManyDraftRelationCountQuery } = relationsApi;
19
+
20
+ export { useGetManyDraftRelationCountQuery };
21
+ //# sourceMappingURL=relations.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relations.mjs","sources":["../../../admin/src/services/relations.ts"],"sourcesContent":["import { i18nApi } from './api';\n\nimport type { CountManyEntriesDraftRelations } from '../../../shared/contracts/content-manager';\n\nconst relationsApi = i18nApi.injectEndpoints({\n overrideExisting: true,\n endpoints: (builder) => ({\n getManyDraftRelationCount: builder.query<\n CountManyEntriesDraftRelations.Response['data'],\n CountManyEntriesDraftRelations.Request['query'] & {\n model: string;\n }\n >({\n query: ({ model, ...params }) => ({\n url: `/content-manager/collection-types/${model}/actions/countManyEntriesDraftRelations`,\n method: 'GET',\n config: {\n params,\n },\n }),\n transformResponse: (response: CountManyEntriesDraftRelations.Response) => response.data,\n }),\n }),\n});\n\nconst { useGetManyDraftRelationCountQuery } = relationsApi;\n\nexport { useGetManyDraftRelationCountQuery };\n"],"names":["relationsApi","i18nApi","injectEndpoints","overrideExisting","endpoints","builder","getManyDraftRelationCount","query","model","params","url","method","config","transformResponse","response","data","useGetManyDraftRelationCountQuery"],"mappings":";;AAIA,MAAMA,YAAAA,GAAeC,OAAQC,CAAAA,eAAe,CAAC;IAC3CC,gBAAkB,EAAA,IAAA;IAClBC,SAAW,EAAA,CAACC,WAAa;YACvBC,yBAA2BD,EAAAA,OAAAA,CAAQE,KAAK,CAKtC;AACAA,gBAAAA,KAAAA,EAAO,CAAC,EAAEC,KAAK,EAAE,GAAGC,MAAAA,EAAQ,IAAM;AAChCC,wBAAAA,GAAAA,EAAK,CAAC,kCAAkC,EAAEF,KAAAA,CAAM,uCAAuC,CAAC;wBACxFG,MAAQ,EAAA,KAAA;wBACRC,MAAQ,EAAA;AACNH,4BAAAA;AACF;qBACF,CAAA;gBACAI,iBAAmB,EAAA,CAACC,QAAsDA,GAAAA,QAAAA,CAASC;AACrF,aAAA;SACF;AACF,CAAA,CAAA;AAEM,MAAA,EAAEC,iCAAiC,EAAE,GAAGhB;;;;"}
@@ -0,0 +1,29 @@
1
+ 'use strict';
2
+
3
+ var api = require('./api.js');
4
+
5
+ const settingsApi = api.i18nApi.injectEndpoints({
6
+ endpoints: (builder)=>({
7
+ getSettings: builder.query({
8
+ query: ()=>'/i18n/settings',
9
+ providesTags: [
10
+ 'Settings'
11
+ ]
12
+ }),
13
+ updateSettings: builder.mutation({
14
+ query: (data)=>({
15
+ url: '/i18n/settings',
16
+ method: 'PUT',
17
+ data
18
+ }),
19
+ invalidatesTags: [
20
+ 'Settings'
21
+ ]
22
+ })
23
+ })
24
+ });
25
+ const { useGetSettingsQuery, useUpdateSettingsMutation } = settingsApi;
26
+
27
+ exports.useGetSettingsQuery = useGetSettingsQuery;
28
+ exports.useUpdateSettingsMutation = useUpdateSettingsMutation;
29
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sources":["../../../admin/src/services/settings.ts"],"sourcesContent":["import { i18nApi } from './api';\n\nimport type { GetSettings, UpdateSettings } from '../../../shared/contracts/settings';\n\nconst settingsApi = i18nApi.injectEndpoints({\n endpoints: (builder) => ({\n getSettings: builder.query<GetSettings.Response['data'], void>({\n query: () => '/i18n/settings',\n providesTags: ['Settings'],\n }),\n updateSettings: builder.mutation<UpdateSettings.Response, UpdateSettings.Request['body']>({\n query: (data) => ({\n url: '/i18n/settings',\n method: 'PUT',\n data,\n }),\n invalidatesTags: ['Settings'],\n }),\n }),\n});\n\nconst { useGetSettingsQuery, useUpdateSettingsMutation } = settingsApi;\n\nexport { useGetSettingsQuery, useUpdateSettingsMutation };\n"],"names":["settingsApi","i18nApi","injectEndpoints","endpoints","builder","getSettings","query","providesTags","updateSettings","mutation","data","url","method","invalidatesTags","useGetSettingsQuery","useUpdateSettingsMutation"],"mappings":";;;;AAIA,MAAMA,WAAAA,GAAcC,WAAQC,CAAAA,eAAe,CAAC;IAC1CC,SAAW,EAAA,CAACC,WAAa;YACvBC,WAAaD,EAAAA,OAAAA,CAAQE,KAAK,CAAqC;AAC7DA,gBAAAA,KAAAA,EAAO,IAAM,gBAAA;gBACbC,YAAc,EAAA;AAAC,oBAAA;AAAW;AAC5B,aAAA,CAAA;YACAC,cAAgBJ,EAAAA,OAAAA,CAAQK,QAAQ,CAA0D;gBACxFH,KAAO,EAAA,CAACI,QAAU;wBAChBC,GAAK,EAAA,gBAAA;wBACLC,MAAQ,EAAA,KAAA;AACRF,wBAAAA;qBACF,CAAA;gBACAG,eAAiB,EAAA;AAAC,oBAAA;AAAW;AAC/B,aAAA;SACF;AACF,CAAA,CAAA;AAEA,MAAM,EAAEC,mBAAmB,EAAEC,yBAAyB,EAAE,GAAGf;;;;;"}
@@ -0,0 +1,26 @@
1
+ import { i18nApi } from './api.mjs';
2
+
3
+ const settingsApi = i18nApi.injectEndpoints({
4
+ endpoints: (builder)=>({
5
+ getSettings: builder.query({
6
+ query: ()=>'/i18n/settings',
7
+ providesTags: [
8
+ 'Settings'
9
+ ]
10
+ }),
11
+ updateSettings: builder.mutation({
12
+ query: (data)=>({
13
+ url: '/i18n/settings',
14
+ method: 'PUT',
15
+ data
16
+ }),
17
+ invalidatesTags: [
18
+ 'Settings'
19
+ ]
20
+ })
21
+ })
22
+ });
23
+ const { useGetSettingsQuery, useUpdateSettingsMutation } = settingsApi;
24
+
25
+ export { useGetSettingsQuery, useUpdateSettingsMutation };
26
+ //# sourceMappingURL=settings.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.mjs","sources":["../../../admin/src/services/settings.ts"],"sourcesContent":["import { i18nApi } from './api';\n\nimport type { GetSettings, UpdateSettings } from '../../../shared/contracts/settings';\n\nconst settingsApi = i18nApi.injectEndpoints({\n endpoints: (builder) => ({\n getSettings: builder.query<GetSettings.Response['data'], void>({\n query: () => '/i18n/settings',\n providesTags: ['Settings'],\n }),\n updateSettings: builder.mutation<UpdateSettings.Response, UpdateSettings.Request['body']>({\n query: (data) => ({\n url: '/i18n/settings',\n method: 'PUT',\n data,\n }),\n invalidatesTags: ['Settings'],\n }),\n }),\n});\n\nconst { useGetSettingsQuery, useUpdateSettingsMutation } = settingsApi;\n\nexport { useGetSettingsQuery, useUpdateSettingsMutation };\n"],"names":["settingsApi","i18nApi","injectEndpoints","endpoints","builder","getSettings","query","providesTags","updateSettings","mutation","data","url","method","invalidatesTags","useGetSettingsQuery","useUpdateSettingsMutation"],"mappings":";;AAIA,MAAMA,WAAAA,GAAcC,OAAQC,CAAAA,eAAe,CAAC;IAC1CC,SAAW,EAAA,CAACC,WAAa;YACvBC,WAAaD,EAAAA,OAAAA,CAAQE,KAAK,CAAqC;AAC7DA,gBAAAA,KAAAA,EAAO,IAAM,gBAAA;gBACbC,YAAc,EAAA;AAAC,oBAAA;AAAW;AAC5B,aAAA,CAAA;YACAC,cAAgBJ,EAAAA,OAAAA,CAAQK,QAAQ,CAA0D;gBACxFH,KAAO,EAAA,CAACI,QAAU;wBAChBC,GAAK,EAAA,gBAAA;wBACLC,MAAQ,EAAA,KAAA;AACRF,wBAAAA;qBACF,CAAA;gBACAG,eAAiB,EAAA;AAAC,oBAAA;AAAW;AAC/B,aAAA;SACF;AACF,CAAA,CAAA;AAEA,MAAM,EAAEC,mBAAmB,EAAEC,yBAAyB,EAAE,GAAGf;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { type DocumentActionComponent, HeaderActionProps } from '@strapi/content-manager/strapi-admin';
2
- import { Modules } from '@strapi/types';
3
2
  import type { Locale } from '../../../shared/contracts/locales';
3
+ import type { Modules } from '@strapi/types';
4
4
  declare const LocalePickerAction: ({ document, meta, model, collectionType, documentId, }: HeaderActionProps) => {
5
5
  label: string;
6
6
  options: {
@@ -1,4 +1,4 @@
1
- import { Schema } from '@strapi/types';
1
+ import type { Schema } from '@strapi/types';
2
2
  interface AddLocaleToReleasesHookArgs {
3
3
  displayedHeaders: {
4
4
  key: string;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,2 +1,2 @@
1
- declare const i18nApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, import("@reduxjs/toolkit/dist/query/endpointDefinitions").UpdateDefinitions<{}, "Locale", never>, "adminApi", "Locale", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/dist/query/react").reactHooksModuleName>;
1
+ declare const i18nApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, import("@reduxjs/toolkit/dist/query/endpointDefinitions").UpdateDefinitions<{}, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "Locale" | "KeyStatistics" | "Settings", never>, "adminApi", "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "Locale" | "KeyStatistics" | "Settings", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/dist/query/react").reactHooksModuleName>;
2
2
  export { i18nApi };
@@ -1,4 +1,4 @@
1
1
  import type { GetISOLocales } from '../../../shared/contracts/iso-locales';
2
2
  import type { GetLocales, CreateLocale, DeleteLocale, UpdateLocale } from '../../../shared/contracts/locales';
3
- declare const useCreateLocaleMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Omit<import("../../../shared/contracts/locales").Locale, keyof import("../../../shared/contracts/shared").Entity>, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "Locale", CreateLocale.Response, "adminApi">>, useDeleteLocaleMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<import("@strapi/types/dist/data").ID, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "Locale", DeleteLocale.Response, "adminApi">>, useGetLocalesQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "Locale", GetLocales.Response, "adminApi">>, useGetDefaultLocalesQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "Locale", GetISOLocales.Response, "adminApi">>, useUpdateLocaleMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<import("../../../shared/contracts/locales").Locale, "name" | "isDefault"> & UpdateLocale.Params, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "Locale", UpdateLocale.Response, "adminApi">>;
3
+ declare const useCreateLocaleMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Omit<import("../../../shared/contracts/locales").Locale, keyof import("../../../shared/contracts/shared").Entity>, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "Locale" | "KeyStatistics" | "Settings", CreateLocale.Response, "adminApi">>, useDeleteLocaleMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<import("@strapi/types/dist/data").ID, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "Locale" | "KeyStatistics" | "Settings", DeleteLocale.Response, "adminApi">>, useGetLocalesQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "Locale" | "KeyStatistics" | "Settings", GetLocales.Response, "adminApi">>, useGetDefaultLocalesQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "Locale" | "KeyStatistics" | "Settings", GetISOLocales.Response, "adminApi">>, useUpdateLocaleMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<import("../../../shared/contracts/locales").Locale, "name" | "isDefault"> & UpdateLocale.Params, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "Locale" | "KeyStatistics" | "Settings", UpdateLocale.Response, "adminApi">>;
4
4
  export { useCreateLocaleMutation, useDeleteLocaleMutation, useGetLocalesQuery, useGetDefaultLocalesQuery, useUpdateLocaleMutation, };