@strapi/i18n 0.0.0-experimental.e9144fc8a193f9875a2c0832d689c14001c79f00 → 0.0.0-experimental.e99215433ba1d6e5497350812df274f426dbdba3

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 (388) 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 +836 -0
  6. package/dist/admin/components/CMHeaderActions.js.map +1 -0
  7. package/dist/admin/components/CMHeaderActions.mjs +810 -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 +102 -0
  30. package/dist/admin/components/LocaleListCell.js.map +1 -0
  31. package/dist/admin/components/LocaleListCell.mjs +100 -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 +44 -0
  50. package/dist/admin/contentManagerHooks/listView.js.map +1 -0
  51. package/dist/admin/contentManagerHooks/listView.mjs +42 -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 +221 -16
  62. package/dist/admin/index.js.map +1 -1
  63. package/dist/admin/index.mjs +203 -15
  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 +7 -1
  102. package/dist/admin/src/components/LocaleListCell.d.ts +2 -1
  103. package/dist/admin/src/services/api.d.ts +1 -1
  104. package/dist/admin/src/services/locales.d.ts +1 -1
  105. package/dist/admin/src/services/relations.d.ts +1 -1
  106. package/dist/admin/src/services/settings.d.ts +5 -0
  107. package/dist/admin/src/utils/schemas.d.ts +642 -16
  108. package/dist/admin/{chunks/de-nEMWvIiY.js → translations/de.json.js} +2 -2
  109. package/dist/admin/translations/de.json.js.map +1 -0
  110. package/dist/admin/{chunks/de-Cm8mYdaO.js → translations/de.json.mjs} +1 -1
  111. package/dist/admin/translations/de.json.mjs.map +1 -0
  112. package/dist/admin/{chunks/dk-CYATLPVe.js → translations/dk.json.js} +2 -2
  113. package/dist/admin/translations/dk.json.js.map +1 -0
  114. package/dist/admin/{chunks/dk-BeUFOegB.js → translations/dk.json.mjs} +1 -1
  115. package/dist/admin/translations/dk.json.mjs.map +1 -0
  116. package/dist/admin/{chunks/en-CG5cUCbD.js → translations/en.json.js} +9 -2
  117. package/dist/admin/translations/en.json.js.map +1 -0
  118. package/dist/admin/{chunks/en-eWSaCeOb.js → translations/en.json.mjs} +8 -1
  119. package/dist/admin/translations/en.json.mjs.map +1 -0
  120. package/dist/admin/{chunks/es-CWsogTGm.js → translations/es.json.js} +2 -2
  121. package/dist/admin/translations/es.json.js.map +1 -0
  122. package/dist/admin/{chunks/es-DqF_IdAc.js → translations/es.json.mjs} +1 -1
  123. package/dist/admin/translations/es.json.mjs.map +1 -0
  124. package/dist/admin/{chunks/fr-CC7UFcYd.js → translations/fr.json.js} +2 -2
  125. package/dist/admin/translations/fr.json.js.map +1 -0
  126. package/dist/admin/{chunks/fr-CyARbZ3c.js → translations/fr.json.mjs} +1 -1
  127. package/dist/admin/translations/fr.json.mjs.map +1 -0
  128. package/dist/admin/{chunks/ko-XwGmfhoq.js → translations/ko.json.js} +2 -2
  129. package/dist/admin/translations/ko.json.js.map +1 -0
  130. package/dist/admin/{chunks/ko-Ax4NSedM.js → translations/ko.json.mjs} +1 -1
  131. package/dist/admin/translations/ko.json.mjs.map +1 -0
  132. package/dist/admin/{chunks/pl-B_vzY_ZB.js → translations/pl.json.js} +2 -2
  133. package/dist/admin/translations/pl.json.js.map +1 -0
  134. package/dist/admin/{chunks/pl-B-aqvMqL.js → translations/pl.json.mjs} +1 -1
  135. package/dist/admin/translations/pl.json.mjs.map +1 -0
  136. package/dist/admin/{chunks/ru-WzHcJV1f.js → translations/ru.json.js} +2 -2
  137. package/dist/admin/translations/ru.json.js.map +1 -0
  138. package/dist/admin/{chunks/ru-VkPjQ-Sk.js → translations/ru.json.mjs} +1 -1
  139. package/dist/admin/translations/ru.json.mjs.map +1 -0
  140. package/dist/admin/{chunks/tr-CcWp6u3w.js → translations/tr.json.js} +2 -2
  141. package/dist/admin/translations/tr.json.js.map +1 -0
  142. package/dist/admin/{chunks/tr-DcTR88c9.js → translations/tr.json.mjs} +1 -1
  143. package/dist/admin/translations/tr.json.mjs.map +1 -0
  144. package/dist/admin/translations/uk.json.js +82 -0
  145. package/dist/admin/translations/uk.json.js.map +1 -0
  146. package/dist/admin/translations/uk.json.mjs +80 -0
  147. package/dist/admin/translations/uk.json.mjs.map +1 -0
  148. package/dist/admin/{chunks/zh-Hans-DnU2bhri.js → translations/zh-Hans.json.js} +2 -2
  149. package/dist/admin/translations/zh-Hans.json.js.map +1 -0
  150. package/dist/admin/{chunks/zh-Hans-L3wsRegj.js → translations/zh-Hans.json.mjs} +1 -1
  151. package/dist/admin/translations/zh-Hans.json.mjs.map +1 -0
  152. package/dist/admin/{chunks/zh-C9So4SGq.js → translations/zh.json.js} +2 -2
  153. package/dist/admin/translations/zh.json.js.map +1 -0
  154. package/dist/admin/{chunks/zh-RZyMiPIs.js → translations/zh.json.mjs} +1 -1
  155. package/dist/admin/translations/zh.json.mjs.map +1 -0
  156. package/dist/admin/utils/baseQuery.js +8 -0
  157. package/dist/admin/utils/baseQuery.js.map +1 -0
  158. package/dist/admin/utils/baseQuery.mjs +6 -0
  159. package/dist/admin/utils/baseQuery.mjs.map +1 -0
  160. package/dist/admin/utils/clean.js +70 -0
  161. package/dist/admin/utils/clean.js.map +1 -0
  162. package/dist/admin/utils/clean.mjs +68 -0
  163. package/dist/admin/utils/clean.mjs.map +1 -0
  164. package/dist/admin/utils/fields.js +34 -0
  165. package/dist/admin/utils/fields.js.map +1 -0
  166. package/dist/admin/utils/fields.mjs +31 -0
  167. package/dist/admin/utils/fields.mjs.map +1 -0
  168. package/dist/admin/utils/getTranslation.js +8 -0
  169. package/dist/admin/utils/getTranslation.js.map +1 -0
  170. package/dist/admin/utils/getTranslation.mjs +6 -0
  171. package/dist/admin/utils/getTranslation.mjs.map +1 -0
  172. package/dist/admin/utils/prefixPluginTranslations.js +11 -0
  173. package/dist/admin/utils/prefixPluginTranslations.js.map +1 -0
  174. package/dist/admin/utils/prefixPluginTranslations.mjs +9 -0
  175. package/dist/admin/utils/prefixPluginTranslations.mjs.map +1 -0
  176. package/dist/admin/utils/schemas.js +74 -0
  177. package/dist/admin/utils/schemas.js.map +1 -0
  178. package/dist/admin/utils/schemas.mjs +72 -0
  179. package/dist/admin/utils/schemas.mjs.map +1 -0
  180. package/dist/admin/utils/strings.js +6 -0
  181. package/dist/admin/utils/strings.js.map +1 -0
  182. package/dist/admin/utils/strings.mjs +4 -0
  183. package/dist/admin/utils/strings.mjs.map +1 -0
  184. package/dist/server/bootstrap.js +79 -0
  185. package/dist/server/bootstrap.js.map +1 -0
  186. package/dist/server/bootstrap.mjs +77 -0
  187. package/dist/server/bootstrap.mjs.map +1 -0
  188. package/dist/server/constants/index.js +29 -0
  189. package/dist/server/constants/index.js.map +1 -0
  190. package/dist/server/constants/index.mjs +25 -0
  191. package/dist/server/constants/index.mjs.map +1 -0
  192. package/dist/server/constants/iso-locales.json.js +2427 -0
  193. package/dist/server/constants/iso-locales.json.js.map +1 -0
  194. package/dist/server/constants/iso-locales.json.mjs +2425 -0
  195. package/dist/server/constants/iso-locales.json.mjs.map +1 -0
  196. package/dist/server/content-types/index.js +10 -0
  197. package/dist/server/content-types/index.js.map +1 -0
  198. package/dist/server/content-types/index.mjs +8 -0
  199. package/dist/server/content-types/index.mjs.map +1 -0
  200. package/dist/server/content-types/locale/index.js +10 -0
  201. package/dist/server/content-types/locale/index.js.map +1 -0
  202. package/dist/server/content-types/locale/index.mjs +8 -0
  203. package/dist/server/content-types/locale/index.mjs.map +1 -0
  204. package/dist/server/content-types/locale/schema.json.js +46 -0
  205. package/dist/server/content-types/locale/schema.json.js.map +1 -0
  206. package/dist/server/content-types/locale/schema.json.mjs +38 -0
  207. package/dist/server/content-types/locale/schema.json.mjs.map +1 -0
  208. package/dist/server/controllers/content-types.js +76 -0
  209. package/dist/server/controllers/content-types.js.map +1 -0
  210. package/dist/server/controllers/content-types.mjs +74 -0
  211. package/dist/server/controllers/content-types.mjs.map +1 -0
  212. package/dist/server/controllers/index.js +16 -0
  213. package/dist/server/controllers/index.js.map +1 -0
  214. package/dist/server/controllers/index.mjs +14 -0
  215. package/dist/server/controllers/index.mjs.map +1 -0
  216. package/dist/server/controllers/iso-locales.js +13 -0
  217. package/dist/server/controllers/iso-locales.js.map +1 -0
  218. package/dist/server/controllers/iso-locales.mjs +11 -0
  219. package/dist/server/controllers/iso-locales.mjs.map +1 -0
  220. package/dist/server/controllers/locales.js +108 -0
  221. package/dist/server/controllers/locales.js.map +1 -0
  222. package/dist/server/controllers/locales.mjs +87 -0
  223. package/dist/server/controllers/locales.mjs.map +1 -0
  224. package/dist/server/controllers/settings.js +24 -0
  225. package/dist/server/controllers/settings.js.map +1 -0
  226. package/dist/server/controllers/settings.mjs +22 -0
  227. package/dist/server/controllers/settings.mjs.map +1 -0
  228. package/dist/server/controllers/validate-locale-creation.js +47 -0
  229. package/dist/server/controllers/validate-locale-creation.js.map +1 -0
  230. package/dist/server/controllers/validate-locale-creation.mjs +45 -0
  231. package/dist/server/controllers/validate-locale-creation.mjs.map +1 -0
  232. package/dist/server/domain/locale.js +11 -0
  233. package/dist/server/domain/locale.js.map +1 -0
  234. package/dist/server/domain/locale.mjs +9 -0
  235. package/dist/server/domain/locale.mjs.map +1 -0
  236. package/dist/server/graphql.js +115 -0
  237. package/dist/server/graphql.js.map +1 -0
  238. package/dist/server/graphql.mjs +113 -0
  239. package/dist/server/graphql.mjs.map +1 -0
  240. package/dist/server/index.js +10 -3712
  241. package/dist/server/index.js.map +1 -1
  242. package/dist/server/index.mjs +7 -3691
  243. package/dist/server/index.mjs.map +1 -1
  244. package/dist/server/register.js +79 -0
  245. package/dist/server/register.js.map +1 -0
  246. package/dist/server/register.mjs +77 -0
  247. package/dist/server/register.mjs.map +1 -0
  248. package/dist/server/routes/admin.js +122 -0
  249. package/dist/server/routes/admin.js.map +1 -0
  250. package/dist/server/routes/admin.mjs +120 -0
  251. package/dist/server/routes/admin.mjs.map +1 -0
  252. package/dist/server/routes/content-api.js +19 -0
  253. package/dist/server/routes/content-api.js.map +1 -0
  254. package/dist/server/routes/content-api.mjs +17 -0
  255. package/dist/server/routes/content-api.mjs.map +1 -0
  256. package/dist/server/routes/index.js +12 -0
  257. package/dist/server/routes/index.js.map +1 -0
  258. package/dist/server/routes/index.mjs +10 -0
  259. package/dist/server/routes/index.mjs.map +1 -0
  260. package/dist/server/routes/validation/locale.js +57 -0
  261. package/dist/server/routes/validation/locale.js.map +1 -0
  262. package/dist/server/routes/validation/locale.mjs +36 -0
  263. package/dist/server/routes/validation/locale.mjs.map +1 -0
  264. package/dist/server/services/ai-localizations.js +143 -0
  265. package/dist/server/services/ai-localizations.js.map +1 -0
  266. package/dist/server/services/ai-localizations.mjs +141 -0
  267. package/dist/server/services/ai-localizations.mjs.map +1 -0
  268. package/dist/server/services/content-types.js +157 -0
  269. package/dist/server/services/content-types.js.map +1 -0
  270. package/dist/server/services/content-types.mjs +155 -0
  271. package/dist/server/services/content-types.mjs.map +1 -0
  272. package/dist/server/services/index.js +26 -0
  273. package/dist/server/services/index.js.map +1 -0
  274. package/dist/server/services/index.mjs +24 -0
  275. package/dist/server/services/index.mjs.map +1 -0
  276. package/dist/server/services/iso-locales.js +12 -0
  277. package/dist/server/services/iso-locales.js.map +1 -0
  278. package/dist/server/services/iso-locales.mjs +10 -0
  279. package/dist/server/services/iso-locales.mjs.map +1 -0
  280. package/dist/server/services/locales.js +114 -0
  281. package/dist/server/services/locales.js.map +1 -0
  282. package/dist/server/services/locales.mjs +112 -0
  283. package/dist/server/services/locales.mjs.map +1 -0
  284. package/dist/server/services/localizations.js +68 -0
  285. package/dist/server/services/localizations.js.map +1 -0
  286. package/dist/server/services/localizations.mjs +66 -0
  287. package/dist/server/services/localizations.mjs.map +1 -0
  288. package/dist/server/services/metrics.js +30 -0
  289. package/dist/server/services/metrics.js.map +1 -0
  290. package/dist/server/services/metrics.mjs +28 -0
  291. package/dist/server/services/metrics.mjs.map +1 -0
  292. package/dist/server/services/permissions/actions.js +136 -0
  293. package/dist/server/services/permissions/actions.js.map +1 -0
  294. package/dist/server/services/permissions/actions.mjs +134 -0
  295. package/dist/server/services/permissions/actions.mjs.map +1 -0
  296. package/dist/server/services/permissions/engine.js +52 -0
  297. package/dist/server/services/permissions/engine.js.map +1 -0
  298. package/dist/server/services/permissions/engine.mjs +50 -0
  299. package/dist/server/services/permissions/engine.mjs.map +1 -0
  300. package/dist/server/services/permissions/sections-builder.js +45 -0
  301. package/dist/server/services/permissions/sections-builder.js.map +1 -0
  302. package/dist/server/services/permissions/sections-builder.mjs +43 -0
  303. package/dist/server/services/permissions/sections-builder.mjs.map +1 -0
  304. package/dist/server/services/permissions.js +14 -0
  305. package/dist/server/services/permissions.js.map +1 -0
  306. package/dist/server/services/permissions.mjs +12 -0
  307. package/dist/server/services/permissions.mjs.map +1 -0
  308. package/dist/server/services/sanitize/index.js +34 -0
  309. package/dist/server/services/sanitize/index.js.map +1 -0
  310. package/dist/server/services/sanitize/index.mjs +32 -0
  311. package/dist/server/services/sanitize/index.mjs.map +1 -0
  312. package/dist/server/services/settings.js +25 -0
  313. package/dist/server/services/settings.js.map +1 -0
  314. package/dist/server/services/settings.mjs +23 -0
  315. package/dist/server/services/settings.mjs.map +1 -0
  316. package/dist/server/src/controllers/index.d.ts +4 -0
  317. package/dist/server/src/controllers/index.d.ts.map +1 -1
  318. package/dist/server/src/controllers/settings.d.ts +7 -0
  319. package/dist/server/src/controllers/settings.d.ts.map +1 -0
  320. package/dist/server/src/index.d.ts +26 -7
  321. package/dist/server/src/index.d.ts.map +1 -1
  322. package/dist/server/src/routes/admin.d.ts.map +1 -1
  323. package/dist/server/src/routes/content-api.d.ts +5 -8
  324. package/dist/server/src/routes/content-api.d.ts.map +1 -1
  325. package/dist/server/src/routes/index.d.ts +3 -7
  326. package/dist/server/src/routes/index.d.ts.map +1 -1
  327. package/dist/server/src/routes/validation/index.d.ts +2 -0
  328. package/dist/server/src/routes/validation/index.d.ts.map +1 -0
  329. package/dist/server/src/routes/validation/locale.d.ts +41 -0
  330. package/dist/server/src/routes/validation/locale.d.ts.map +1 -0
  331. package/dist/server/src/services/ai-localizations.d.ts +17 -0
  332. package/dist/server/src/services/ai-localizations.d.ts.map +1 -0
  333. package/dist/server/src/services/index.d.ts +19 -0
  334. package/dist/server/src/services/index.d.ts.map +1 -1
  335. package/dist/server/src/services/settings.d.ts +13 -0
  336. package/dist/server/src/services/settings.d.ts.map +1 -0
  337. package/dist/server/src/utils/index.d.ts +5 -1
  338. package/dist/server/src/utils/index.d.ts.map +1 -1
  339. package/dist/server/src/validation/settings.d.ts +12 -0
  340. package/dist/server/src/validation/settings.d.ts.map +1 -0
  341. package/dist/server/utils/index.js +16 -0
  342. package/dist/server/utils/index.js.map +1 -0
  343. package/dist/server/utils/index.mjs +13 -0
  344. package/dist/server/utils/index.mjs.map +1 -0
  345. package/dist/server/validation/content-types.js +18 -0
  346. package/dist/server/validation/content-types.js.map +1 -0
  347. package/dist/server/validation/content-types.mjs +16 -0
  348. package/dist/server/validation/content-types.mjs.map +1 -0
  349. package/dist/server/validation/locales.js +23 -0
  350. package/dist/server/validation/locales.js.map +1 -0
  351. package/dist/server/validation/locales.mjs +20 -0
  352. package/dist/server/validation/locales.mjs.map +1 -0
  353. package/dist/server/validation/settings.js +11 -0
  354. package/dist/server/validation/settings.js.map +1 -0
  355. package/dist/server/validation/settings.mjs +9 -0
  356. package/dist/server/validation/settings.mjs.map +1 -0
  357. package/dist/shared/contracts/settings.d.ts +40 -0
  358. package/package.json +11 -9
  359. package/dist/admin/chunks/SettingsPage-B6ikxVOg.js +0 -820
  360. package/dist/admin/chunks/SettingsPage-B6ikxVOg.js.map +0 -1
  361. package/dist/admin/chunks/SettingsPage-Kg4GAThm.js +0 -797
  362. package/dist/admin/chunks/SettingsPage-Kg4GAThm.js.map +0 -1
  363. package/dist/admin/chunks/de-Cm8mYdaO.js.map +0 -1
  364. package/dist/admin/chunks/de-nEMWvIiY.js.map +0 -1
  365. package/dist/admin/chunks/dk-BeUFOegB.js.map +0 -1
  366. package/dist/admin/chunks/dk-CYATLPVe.js.map +0 -1
  367. package/dist/admin/chunks/en-CG5cUCbD.js.map +0 -1
  368. package/dist/admin/chunks/en-eWSaCeOb.js.map +0 -1
  369. package/dist/admin/chunks/es-CWsogTGm.js.map +0 -1
  370. package/dist/admin/chunks/es-DqF_IdAc.js.map +0 -1
  371. package/dist/admin/chunks/fr-CC7UFcYd.js.map +0 -1
  372. package/dist/admin/chunks/fr-CyARbZ3c.js.map +0 -1
  373. package/dist/admin/chunks/index-Dch-2xao.js +0 -2035
  374. package/dist/admin/chunks/index-Dch-2xao.js.map +0 -1
  375. package/dist/admin/chunks/index-DyvbIjH9.js +0 -2006
  376. package/dist/admin/chunks/index-DyvbIjH9.js.map +0 -1
  377. package/dist/admin/chunks/ko-Ax4NSedM.js.map +0 -1
  378. package/dist/admin/chunks/ko-XwGmfhoq.js.map +0 -1
  379. package/dist/admin/chunks/pl-B-aqvMqL.js.map +0 -1
  380. package/dist/admin/chunks/pl-B_vzY_ZB.js.map +0 -1
  381. package/dist/admin/chunks/ru-VkPjQ-Sk.js.map +0 -1
  382. package/dist/admin/chunks/ru-WzHcJV1f.js.map +0 -1
  383. package/dist/admin/chunks/tr-CcWp6u3w.js.map +0 -1
  384. package/dist/admin/chunks/tr-DcTR88c9.js.map +0 -1
  385. package/dist/admin/chunks/zh-C9So4SGq.js.map +0 -1
  386. package/dist/admin/chunks/zh-Hans-DnU2bhri.js.map +0 -1
  387. package/dist/admin/chunks/zh-Hans-L3wsRegj.js.map +0 -1
  388. package/dist/admin/chunks/zh-RZyMiPIs.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../../../../server/src/routes/validation/locale.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B;;;GAGG;AACH,qBAAa,wBAAwB;IACnC,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC;gBAErB,MAAM,EAAE,IAAI,CAAC,MAAM;IAItC;;;;OAIG;IACH,IAAI,MAAM;;;;;;;;;sBAWT;IAED;;;;OAIG;IACH,IAAI,OAAO;;;;;;;;;uBAEV;CACF"}
@@ -0,0 +1,17 @@
1
+ import type { Core, Modules, UID } from '@strapi/types';
2
+ declare const createAILocalizationsService: ({ strapi }: {
3
+ strapi: Core.Strapi;
4
+ }) => {
5
+ isEnabled(): Promise<boolean>;
6
+ /**
7
+ * Checks if there are localizations that need to be generated for the given document,
8
+ * and if so, calls the AI service and saves the results to the database.
9
+ * Works for both single and collection types, on create and update.
10
+ */
11
+ generateDocumentLocalizations({ model, document, }: {
12
+ model: UID.ContentType;
13
+ document: Modules.Documents.AnyDocument;
14
+ }): Promise<void>;
15
+ };
16
+ export { createAILocalizationsService };
17
+ //# sourceMappingURL=ai-localizations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-localizations.d.ts","sourceRoot":"","sources":["../../../../server/src/services/ai-localizations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAIxD,QAAA,MAAM,4BAA4B,eAAgB;IAAE,MAAM,EAAE,KAAK,MAAM,CAAA;CAAE;;IA4BrE;;;;OAIG;wDAIA;QACD,KAAK,EAAE,IAAI,WAAW,CAAC;QACvB,QAAQ,EAAE,QAAQ,SAAS,CAAC,WAAW,CAAC;KACzC;CAkIJ,CAAC;AAEF,OAAO,EAAE,4BAA4B,EAAE,CAAC"}
@@ -76,6 +76,25 @@ declare const _default: {
76
76
  fillNonLocalizedAttributes: (entry: any, relatedEntry: any, { model }: any) => void;
77
77
  getNestedPopulateOfNonLocalizedAttributes: (modelUID: any) => string[];
78
78
  };
79
+ 'ai-localizations': ({ strapi }: {
80
+ strapi: import("@strapi/types/dist/core").Strapi;
81
+ }) => {
82
+ isEnabled(): Promise<boolean>;
83
+ generateDocumentLocalizations({ model, document, }: {
84
+ model: import("@strapi/types/dist/uid").ContentType;
85
+ document: import("@strapi/types/dist/modules/documents").AnyDocument;
86
+ }): Promise<void>;
87
+ };
88
+ settings: ({ strapi }: {
89
+ strapi: import("@strapi/types/dist/core").Strapi;
90
+ }) => {
91
+ getSettings: () => Promise<import("yup/lib/object").AssertsShape<{
92
+ aiLocalizations: import("yup").BooleanSchema<boolean, Record<string, any>, boolean>;
93
+ }> | null>;
94
+ setSettings: (value: import("yup/lib/object").AssertsShape<{
95
+ aiLocalizations: import("yup").BooleanSchema<boolean, Record<string, any>, boolean>;
96
+ }>) => Promise<void>;
97
+ };
79
98
  };
80
99
  export default _default;
81
100
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,wBAQE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,wBAUE"}
@@ -0,0 +1,13 @@
1
+ import type { Core } from '@strapi/types';
2
+ import type { Settings } from '../validation/settings';
3
+ declare const createSettingsService: ({ strapi }: {
4
+ strapi: Core.Strapi;
5
+ }) => {
6
+ getSettings: () => Promise<import("yup/lib/object").AssertsShape<{
7
+ aiLocalizations: import("yup").BooleanSchema<boolean, Record<string, any>, boolean>;
8
+ }> | null>;
9
+ setSettings: (value: Settings) => Promise<void>;
10
+ };
11
+ export { createSettingsService };
12
+ export type SettingsService = ReturnType<typeof createSettingsService>;
13
+ //# sourceMappingURL=settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../server/src/services/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,QAAA,MAAM,qBAAqB,eAAgB;IAAE,MAAM,EAAE,KAAK,MAAM,CAAA;CAAE;;;;yBASpC,QAAQ;CAQrC,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC;AACjC,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -5,14 +5,18 @@ import type { MetricsService } from '../services/metrics';
5
5
  import type { ISOLocalesService } from '../services/iso-locales';
6
6
  import type { LocalizationsService } from '../services/localizations';
7
7
  import type { SanitizeService } from '../services/sanitize';
8
+ import type { SettingsService } from '../services/settings';
9
+ import type { createAILocalizationsService } from '../services/ai-localizations';
8
10
  type S = {
9
11
  permissions: PermissionsService;
10
12
  metrics: MetricsService;
11
13
  locales: LocaleService;
12
14
  localizations: LocalizationsService;
15
+ settings: SettingsService;
13
16
  ['iso-locales']: ISOLocalesService;
14
17
  ['content-types']: ContentTypesService;
15
18
  sanitize: SanitizeService;
19
+ ['ai-localizations']: ReturnType<typeof createAILocalizationsService>;
16
20
  };
17
21
  declare const getCoreStore: () => {
18
22
  get(params?: Partial<{
@@ -38,6 +42,6 @@ declare const getCoreStore: () => {
38
42
  tag?: string | undefined;
39
43
  }> | undefined): Promise<void>;
40
44
  };
41
- declare const getService: <T extends keyof S>(name: T) => ReturnType<S[T]>;
45
+ declare const getService: <T extends keyof S>(name: T) => S[T] extends (...args: any) => any ? ReturnType<S[T]> : S[T];
42
46
  export { getService, getCoreStore };
43
47
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,KAAK,CAAC,GAAG;IACP,WAAW,EAAE,kBAAkB,CAAC;IAChC,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,aAAa,CAAC;IACvB,aAAa,EAAE,oBAAoB,CAAC;IACpC,CAAC,aAAa,CAAC,EAAE,iBAAiB,CAAC;IACnC,CAAC,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACvC,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;CAEjB,CAAC;AAGF,QAAA,MAAM,UAAU,4BAA6B,CAAC,KAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAE/D,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAEjF,KAAK,CAAC,GAAG;IACP,WAAW,EAAE,kBAAkB,CAAC;IAChC,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,aAAa,CAAC;IACvB,aAAa,EAAE,oBAAoB,CAAC;IACpC,QAAQ,EAAE,eAAe,CAAC;IAC1B,CAAC,aAAa,CAAC,EAAE,iBAAiB,CAAC;IACnC,CAAC,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACvC,QAAQ,EAAE,eAAe,CAAC;IAC1B,CAAC,kBAAkB,CAAC,EAAE,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAC;CACvE,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;CAEjB,CAAC;AAGF,QAAA,MAAM,UAAU,4BACR,CAAC,KACN,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAE7D,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { yup } from '@strapi/utils';
2
+ declare const settingsSchema: import("yup/lib/object").OptionalObjectSchema<{
3
+ aiLocalizations: yup.BooleanSchema<boolean, Record<string, any>, boolean>;
4
+ }, Record<string, any>, import("yup/lib/object").TypeOfShape<{
5
+ aiLocalizations: yup.BooleanSchema<boolean, Record<string, any>, boolean>;
6
+ }>>;
7
+ declare const _default: (body: unknown, errorMessage?: string | undefined) => Promise<import("yup/lib/object").AssertsShape<{
8
+ aiLocalizations: yup.BooleanSchema<boolean, Record<string, any>, boolean>;
9
+ }>>;
10
+ export default _default;
11
+ export type Settings = yup.InferType<typeof settingsSchema>;
12
+ //# sourceMappingURL=settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../server/src/validation/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,eAAe,CAAC;AAEvD,QAAA,MAAM,cAAc;;;;GAElB,CAAC;;;;AAEH,wBAAiD;AAEjD,MAAM,MAAM,QAAQ,GAAG,GAAG,CAAC,SAAS,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ const getCoreStore = ()=>{
4
+ return strapi.store({
5
+ type: 'plugin',
6
+ name: 'i18n'
7
+ });
8
+ };
9
+ // retrieve a local service
10
+ const getService = (name)=>{
11
+ return strapi.plugin('i18n').service(name);
12
+ };
13
+
14
+ exports.getCoreStore = getCoreStore;
15
+ exports.getService = getService;
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../server/src/utils/index.ts"],"sourcesContent":["import type { LocaleService } from '../services/locales';\nimport type { PermissionsService } from '../services/permissions';\nimport type { ContentTypesService } from '../services/content-types';\nimport type { MetricsService } from '../services/metrics';\nimport type { ISOLocalesService } from '../services/iso-locales';\nimport type { LocalizationsService } from '../services/localizations';\nimport type { SanitizeService } from '../services/sanitize';\nimport type { SettingsService } from '../services/settings';\nimport type { createAILocalizationsService } from '../services/ai-localizations';\n\ntype S = {\n permissions: PermissionsService;\n metrics: MetricsService;\n locales: LocaleService;\n localizations: LocalizationsService;\n settings: SettingsService;\n ['iso-locales']: ISOLocalesService;\n ['content-types']: ContentTypesService;\n sanitize: SanitizeService;\n ['ai-localizations']: ReturnType<typeof createAILocalizationsService>;\n};\n\nconst getCoreStore = () => {\n return strapi.store({ type: 'plugin', name: 'i18n' });\n};\n\n// retrieve a local service\nconst getService = <T extends keyof S>(\n name: T\n): S[T] extends (...args: any) => any ? ReturnType<S[T]> : S[T] => {\n return strapi.plugin('i18n').service(name);\n};\n\nexport { getService, getCoreStore };\n"],"names":["getCoreStore","strapi","store","type","name","getService","plugin","service"],"mappings":";;AAsBA,MAAMA,YAAe,GAAA,IAAA;IACnB,OAAOC,MAAAA,CAAOC,KAAK,CAAC;QAAEC,IAAM,EAAA,QAAA;QAAUC,IAAM,EAAA;AAAO,KAAA,CAAA;AACrD;AAEA;AACA,MAAMC,aAAa,CACjBD,IAAAA,GAAAA;AAEA,IAAA,OAAOH,MAAOK,CAAAA,MAAM,CAAC,MAAA,CAAA,CAAQC,OAAO,CAACH,IAAAA,CAAAA;AACvC;;;;;"}
@@ -0,0 +1,13 @@
1
+ const getCoreStore = ()=>{
2
+ return strapi.store({
3
+ type: 'plugin',
4
+ name: 'i18n'
5
+ });
6
+ };
7
+ // retrieve a local service
8
+ const getService = (name)=>{
9
+ return strapi.plugin('i18n').service(name);
10
+ };
11
+
12
+ export { getCoreStore, getService };
13
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../server/src/utils/index.ts"],"sourcesContent":["import type { LocaleService } from '../services/locales';\nimport type { PermissionsService } from '../services/permissions';\nimport type { ContentTypesService } from '../services/content-types';\nimport type { MetricsService } from '../services/metrics';\nimport type { ISOLocalesService } from '../services/iso-locales';\nimport type { LocalizationsService } from '../services/localizations';\nimport type { SanitizeService } from '../services/sanitize';\nimport type { SettingsService } from '../services/settings';\nimport type { createAILocalizationsService } from '../services/ai-localizations';\n\ntype S = {\n permissions: PermissionsService;\n metrics: MetricsService;\n locales: LocaleService;\n localizations: LocalizationsService;\n settings: SettingsService;\n ['iso-locales']: ISOLocalesService;\n ['content-types']: ContentTypesService;\n sanitize: SanitizeService;\n ['ai-localizations']: ReturnType<typeof createAILocalizationsService>;\n};\n\nconst getCoreStore = () => {\n return strapi.store({ type: 'plugin', name: 'i18n' });\n};\n\n// retrieve a local service\nconst getService = <T extends keyof S>(\n name: T\n): S[T] extends (...args: any) => any ? ReturnType<S[T]> : S[T] => {\n return strapi.plugin('i18n').service(name);\n};\n\nexport { getService, getCoreStore };\n"],"names":["getCoreStore","strapi","store","type","name","getService","plugin","service"],"mappings":"AAsBA,MAAMA,YAAe,GAAA,IAAA;IACnB,OAAOC,MAAAA,CAAOC,KAAK,CAAC;QAAEC,IAAM,EAAA,QAAA;QAAUC,IAAM,EAAA;AAAO,KAAA,CAAA;AACrD;AAEA;AACA,MAAMC,aAAa,CACjBD,IAAAA,GAAAA;AAEA,IAAA,OAAOH,MAAOK,CAAAA,MAAM,CAAC,MAAA,CAAA,CAAQC,OAAO,CAACH,IAAAA,CAAAA;AACvC;;;;"}
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ var utils = require('@strapi/utils');
4
+ var fp = require('lodash/fp');
5
+
6
+ const validateGetNonLocalizedAttributesSchema = utils.yup.object().shape({
7
+ model: utils.yup.string().required(),
8
+ id: utils.yup.mixed().when('model', {
9
+ is: (model)=>fp.get('kind', strapi.contentType(model)) === 'singleType',
10
+ then: utils.yup.strapiID().nullable(),
11
+ otherwise: utils.yup.strapiID().required()
12
+ }),
13
+ locale: utils.yup.string().required()
14
+ }).noUnknown().required();
15
+ const validateGetNonLocalizedAttributesInput = utils.validateYupSchema(validateGetNonLocalizedAttributesSchema);
16
+
17
+ exports.validateGetNonLocalizedAttributesInput = validateGetNonLocalizedAttributesInput;
18
+ //# sourceMappingURL=content-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-types.js","sources":["../../../server/src/validation/content-types.ts"],"sourcesContent":["import { yup, validateYupSchema } from '@strapi/utils';\n\nimport { get } from 'lodash/fp';\n\nconst validateGetNonLocalizedAttributesSchema = yup\n .object()\n .shape({\n model: yup.string().required(),\n id: yup.mixed().when('model', {\n is: (model: any) => get('kind', strapi.contentType(model)) === 'singleType',\n then: yup.strapiID().nullable(),\n otherwise: yup.strapiID().required(),\n }),\n locale: yup.string().required(),\n })\n .noUnknown()\n .required();\n\nconst validateGetNonLocalizedAttributesInput = validateYupSchema(\n validateGetNonLocalizedAttributesSchema\n);\n\nexport { validateGetNonLocalizedAttributesInput };\n"],"names":["validateGetNonLocalizedAttributesSchema","yup","object","shape","model","string","required","id","mixed","when","is","get","strapi","contentType","then","strapiID","nullable","otherwise","locale","noUnknown","validateGetNonLocalizedAttributesInput","validateYupSchema"],"mappings":";;;;;AAIA,MAAMA,uCAA0CC,GAAAA,SAAAA,CAC7CC,MAAM,EAAA,CACNC,KAAK,CAAC;IACLC,KAAOH,EAAAA,SAAAA,CAAII,MAAM,EAAA,CAAGC,QAAQ,EAAA;AAC5BC,IAAAA,EAAAA,EAAIN,SAAIO,CAAAA,KAAK,EAAGC,CAAAA,IAAI,CAAC,OAAS,EAAA;AAC5BC,QAAAA,EAAAA,EAAI,CAACN,KAAeO,GAAAA,MAAAA,CAAI,QAAQC,MAAOC,CAAAA,WAAW,CAACT,KAAY,CAAA,CAAA,KAAA,YAAA;QAC/DU,IAAMb,EAAAA,SAAAA,CAAIc,QAAQ,EAAA,CAAGC,QAAQ,EAAA;QAC7BC,SAAWhB,EAAAA,SAAAA,CAAIc,QAAQ,EAAA,CAAGT,QAAQ;AACpC,KAAA,CAAA;IACAY,MAAQjB,EAAAA,SAAAA,CAAII,MAAM,EAAA,CAAGC,QAAQ;AAC/B,CACCa,CAAAA,CAAAA,SAAS,GACTb,QAAQ,EAAA;AAEX,MAAMc,yCAAyCC,uBAC7CrB,CAAAA,uCAAAA;;;;"}
@@ -0,0 +1,16 @@
1
+ import { yup, validateYupSchema } from '@strapi/utils';
2
+ import { get } from 'lodash/fp';
3
+
4
+ const validateGetNonLocalizedAttributesSchema = yup.object().shape({
5
+ model: yup.string().required(),
6
+ id: yup.mixed().when('model', {
7
+ is: (model)=>get('kind', strapi.contentType(model)) === 'singleType',
8
+ then: yup.strapiID().nullable(),
9
+ otherwise: yup.strapiID().required()
10
+ }),
11
+ locale: yup.string().required()
12
+ }).noUnknown().required();
13
+ const validateGetNonLocalizedAttributesInput = validateYupSchema(validateGetNonLocalizedAttributesSchema);
14
+
15
+ export { validateGetNonLocalizedAttributesInput };
16
+ //# sourceMappingURL=content-types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-types.mjs","sources":["../../../server/src/validation/content-types.ts"],"sourcesContent":["import { yup, validateYupSchema } from '@strapi/utils';\n\nimport { get } from 'lodash/fp';\n\nconst validateGetNonLocalizedAttributesSchema = yup\n .object()\n .shape({\n model: yup.string().required(),\n id: yup.mixed().when('model', {\n is: (model: any) => get('kind', strapi.contentType(model)) === 'singleType',\n then: yup.strapiID().nullable(),\n otherwise: yup.strapiID().required(),\n }),\n locale: yup.string().required(),\n })\n .noUnknown()\n .required();\n\nconst validateGetNonLocalizedAttributesInput = validateYupSchema(\n validateGetNonLocalizedAttributesSchema\n);\n\nexport { validateGetNonLocalizedAttributesInput };\n"],"names":["validateGetNonLocalizedAttributesSchema","yup","object","shape","model","string","required","id","mixed","when","is","get","strapi","contentType","then","strapiID","nullable","otherwise","locale","noUnknown","validateGetNonLocalizedAttributesInput","validateYupSchema"],"mappings":";;;AAIA,MAAMA,uCAA0CC,GAAAA,GAAAA,CAC7CC,MAAM,EAAA,CACNC,KAAK,CAAC;IACLC,KAAOH,EAAAA,GAAAA,CAAII,MAAM,EAAA,CAAGC,QAAQ,EAAA;AAC5BC,IAAAA,EAAAA,EAAIN,GAAIO,CAAAA,KAAK,EAAGC,CAAAA,IAAI,CAAC,OAAS,EAAA;AAC5BC,QAAAA,EAAAA,EAAI,CAACN,KAAeO,GAAAA,GAAAA,CAAI,QAAQC,MAAOC,CAAAA,WAAW,CAACT,KAAY,CAAA,CAAA,KAAA,YAAA;QAC/DU,IAAMb,EAAAA,GAAAA,CAAIc,QAAQ,EAAA,CAAGC,QAAQ,EAAA;QAC7BC,SAAWhB,EAAAA,GAAAA,CAAIc,QAAQ,EAAA,CAAGT,QAAQ;AACpC,KAAA,CAAA;IACAY,MAAQjB,EAAAA,GAAAA,CAAII,MAAM,EAAA,CAAGC,QAAQ;AAC/B,CACCa,CAAAA,CAAAA,SAAS,GACTb,QAAQ,EAAA;AAEX,MAAMc,yCAAyCC,iBAC7CrB,CAAAA,uCAAAA;;;;"}
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ var fp = require('lodash/fp');
4
+ var utils = require('@strapi/utils');
5
+ require('../constants/index.js');
6
+ var isoLocales = require('../constants/iso-locales.json.js');
7
+
8
+ const allowedLocaleCodes = isoLocales.map(fp.prop('code'));
9
+ const createLocaleSchema = utils.yup.object().shape({
10
+ name: utils.yup.string().max(50).nullable(),
11
+ code: utils.yup.string().oneOf(allowedLocaleCodes).required(),
12
+ isDefault: utils.yup.boolean().required()
13
+ }).noUnknown();
14
+ const updateLocaleSchema = utils.yup.object().shape({
15
+ name: utils.yup.string().min(1).max(50).nullable(),
16
+ isDefault: utils.yup.boolean()
17
+ }).noUnknown();
18
+ const validateCreateLocaleInput = utils.validateYupSchema(createLocaleSchema);
19
+ const validateUpdateLocaleInput = utils.validateYupSchema(updateLocaleSchema);
20
+
21
+ exports.validateCreateLocaleInput = validateCreateLocaleInput;
22
+ exports.validateUpdateLocaleInput = validateUpdateLocaleInput;
23
+ //# sourceMappingURL=locales.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locales.js","sources":["../../../server/src/validation/locales.ts"],"sourcesContent":["import { prop } from 'lodash/fp';\nimport { yup, validateYupSchema } from '@strapi/utils';\n\nimport { isoLocales } from '../constants';\n\nconst allowedLocaleCodes = isoLocales.map(prop('code'));\n\nconst createLocaleSchema = yup\n .object()\n .shape({\n name: yup.string().max(50).nullable(),\n code: yup.string().oneOf(allowedLocaleCodes).required(),\n isDefault: yup.boolean().required(),\n })\n .noUnknown();\n\nconst updateLocaleSchema = yup\n .object()\n .shape({\n name: yup.string().min(1).max(50).nullable(),\n isDefault: yup.boolean(),\n })\n .noUnknown();\n\nconst validateCreateLocaleInput = validateYupSchema(createLocaleSchema);\nconst validateUpdateLocaleInput = validateYupSchema(updateLocaleSchema);\n\nexport { validateCreateLocaleInput, validateUpdateLocaleInput };\n"],"names":["allowedLocaleCodes","isoLocales","map","prop","createLocaleSchema","yup","object","shape","name","string","max","nullable","code","oneOf","required","isDefault","boolean","noUnknown","updateLocaleSchema","min","validateCreateLocaleInput","validateYupSchema","validateUpdateLocaleInput"],"mappings":";;;;;;;AAKA,MAAMA,kBAAqBC,GAAAA,UAAAA,CAAWC,GAAG,CAACC,OAAK,CAAA,MAAA,CAAA,CAAA;AAE/C,MAAMC,kBAAqBC,GAAAA,SAAAA,CACxBC,MAAM,EAAA,CACNC,KAAK,CAAC;AACLC,IAAAA,IAAAA,EAAMH,UAAII,MAAM,EAAA,CAAGC,GAAG,CAAC,IAAIC,QAAQ,EAAA;AACnCC,IAAAA,IAAAA,EAAMP,UAAII,MAAM,EAAA,CAAGI,KAAK,CAACb,oBAAoBc,QAAQ,EAAA;IACrDC,SAAWV,EAAAA,SAAAA,CAAIW,OAAO,EAAA,CAAGF,QAAQ;AACnC,CAAA,CAAA,CACCG,SAAS,EAAA;AAEZ,MAAMC,kBAAqBb,GAAAA,SAAAA,CACxBC,MAAM,EAAA,CACNC,KAAK,CAAC;IACLC,IAAMH,EAAAA,SAAAA,CAAII,MAAM,EAAGU,CAAAA,GAAG,CAAC,CAAGT,CAAAA,CAAAA,GAAG,CAAC,EAAA,CAAA,CAAIC,QAAQ,EAAA;AAC1CI,IAAAA,SAAAA,EAAWV,UAAIW,OAAO;AACxB,CAAA,CAAA,CACCC,SAAS,EAAA;AAEZ,MAAMG,4BAA4BC,uBAAkBjB,CAAAA,kBAAAA;AACpD,MAAMkB,4BAA4BD,uBAAkBH,CAAAA,kBAAAA;;;;;"}
@@ -0,0 +1,20 @@
1
+ import { prop } from 'lodash/fp';
2
+ import { yup, validateYupSchema } from '@strapi/utils';
3
+ import '../constants/index.mjs';
4
+ import isoLocales from '../constants/iso-locales.json.mjs';
5
+
6
+ const allowedLocaleCodes = isoLocales.map(prop('code'));
7
+ const createLocaleSchema = yup.object().shape({
8
+ name: yup.string().max(50).nullable(),
9
+ code: yup.string().oneOf(allowedLocaleCodes).required(),
10
+ isDefault: yup.boolean().required()
11
+ }).noUnknown();
12
+ const updateLocaleSchema = yup.object().shape({
13
+ name: yup.string().min(1).max(50).nullable(),
14
+ isDefault: yup.boolean()
15
+ }).noUnknown();
16
+ const validateCreateLocaleInput = validateYupSchema(createLocaleSchema);
17
+ const validateUpdateLocaleInput = validateYupSchema(updateLocaleSchema);
18
+
19
+ export { validateCreateLocaleInput, validateUpdateLocaleInput };
20
+ //# sourceMappingURL=locales.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locales.mjs","sources":["../../../server/src/validation/locales.ts"],"sourcesContent":["import { prop } from 'lodash/fp';\nimport { yup, validateYupSchema } from '@strapi/utils';\n\nimport { isoLocales } from '../constants';\n\nconst allowedLocaleCodes = isoLocales.map(prop('code'));\n\nconst createLocaleSchema = yup\n .object()\n .shape({\n name: yup.string().max(50).nullable(),\n code: yup.string().oneOf(allowedLocaleCodes).required(),\n isDefault: yup.boolean().required(),\n })\n .noUnknown();\n\nconst updateLocaleSchema = yup\n .object()\n .shape({\n name: yup.string().min(1).max(50).nullable(),\n isDefault: yup.boolean(),\n })\n .noUnknown();\n\nconst validateCreateLocaleInput = validateYupSchema(createLocaleSchema);\nconst validateUpdateLocaleInput = validateYupSchema(updateLocaleSchema);\n\nexport { validateCreateLocaleInput, validateUpdateLocaleInput };\n"],"names":["allowedLocaleCodes","isoLocales","map","prop","createLocaleSchema","yup","object","shape","name","string","max","nullable","code","oneOf","required","isDefault","boolean","noUnknown","updateLocaleSchema","min","validateCreateLocaleInput","validateYupSchema","validateUpdateLocaleInput"],"mappings":";;;;;AAKA,MAAMA,kBAAqBC,GAAAA,UAAAA,CAAWC,GAAG,CAACC,IAAK,CAAA,MAAA,CAAA,CAAA;AAE/C,MAAMC,kBAAqBC,GAAAA,GAAAA,CACxBC,MAAM,EAAA,CACNC,KAAK,CAAC;AACLC,IAAAA,IAAAA,EAAMH,IAAII,MAAM,EAAA,CAAGC,GAAG,CAAC,IAAIC,QAAQ,EAAA;AACnCC,IAAAA,IAAAA,EAAMP,IAAII,MAAM,EAAA,CAAGI,KAAK,CAACb,oBAAoBc,QAAQ,EAAA;IACrDC,SAAWV,EAAAA,GAAAA,CAAIW,OAAO,EAAA,CAAGF,QAAQ;AACnC,CAAA,CAAA,CACCG,SAAS,EAAA;AAEZ,MAAMC,kBAAqBb,GAAAA,GAAAA,CACxBC,MAAM,EAAA,CACNC,KAAK,CAAC;IACLC,IAAMH,EAAAA,GAAAA,CAAII,MAAM,EAAGU,CAAAA,GAAG,CAAC,CAAGT,CAAAA,CAAAA,GAAG,CAAC,EAAA,CAAA,CAAIC,QAAQ,EAAA;AAC1CI,IAAAA,SAAAA,EAAWV,IAAIW,OAAO;AACxB,CAAA,CAAA,CACCC,SAAS,EAAA;AAEZ,MAAMG,4BAA4BC,iBAAkBjB,CAAAA,kBAAAA;AACpD,MAAMkB,4BAA4BD,iBAAkBH,CAAAA,kBAAAA;;;;"}
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var utils = require('@strapi/utils');
4
+
5
+ const settingsSchema = utils.yup.object({
6
+ aiLocalizations: utils.yup.boolean().default(false)
7
+ });
8
+ var validateSettings = utils.validateYupSchema(settingsSchema);
9
+
10
+ module.exports = validateSettings;
11
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sources":["../../../server/src/validation/settings.ts"],"sourcesContent":["import { yup, validateYupSchema } from '@strapi/utils';\n\nconst settingsSchema = yup.object({\n aiLocalizations: yup.boolean().default(false),\n});\n\nexport default validateYupSchema(settingsSchema);\n\nexport type Settings = yup.InferType<typeof settingsSchema>;\n"],"names":["settingsSchema","yup","object","aiLocalizations","boolean","default","validateYupSchema"],"mappings":";;;;AAEA,MAAMA,cAAAA,GAAiBC,SAAIC,CAAAA,MAAM,CAAC;AAChCC,IAAAA,eAAAA,EAAiBF,SAAIG,CAAAA,OAAO,EAAGC,CAAAA,OAAO,CAAC,KAAA;AACzC,CAAA,CAAA;AAEA,uBAAeC,wBAAkBN,cAAgB,CAAA;;;;"}
@@ -0,0 +1,9 @@
1
+ import { yup, validateYupSchema } from '@strapi/utils';
2
+
3
+ const settingsSchema = yup.object({
4
+ aiLocalizations: yup.boolean().default(false)
5
+ });
6
+ var validateSettings = validateYupSchema(settingsSchema);
7
+
8
+ export { validateSettings as default };
9
+ //# sourceMappingURL=settings.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.mjs","sources":["../../../server/src/validation/settings.ts"],"sourcesContent":["import { yup, validateYupSchema } from '@strapi/utils';\n\nconst settingsSchema = yup.object({\n aiLocalizations: yup.boolean().default(false),\n});\n\nexport default validateYupSchema(settingsSchema);\n\nexport type Settings = yup.InferType<typeof settingsSchema>;\n"],"names":["settingsSchema","yup","object","aiLocalizations","boolean","default","validateYupSchema"],"mappings":";;AAEA,MAAMA,cAAAA,GAAiBC,GAAIC,CAAAA,MAAM,CAAC;AAChCC,IAAAA,eAAAA,EAAiBF,GAAIG,CAAAA,OAAO,EAAGC,CAAAA,OAAO,CAAC,KAAA;AACzC,CAAA,CAAA;AAEA,uBAAeC,kBAAkBN,cAAgB,CAAA;;;;"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Used to store user configurations related to i18n.
3
+ * E.g the AI metadata flag for automatic translations.
4
+ */
5
+ import { errors } from '@strapi/utils';
6
+ import type { Utils } from '@strapi/types';
7
+ export interface Settings {
8
+ data: {
9
+ aiLocalizations?: boolean;
10
+ };
11
+ }
12
+ export type SettingsData = Settings['data'];
13
+ /**
14
+ * GET /i18n/settings
15
+ *
16
+ * Return the stored settings for the i18n plugin.
17
+ */
18
+ export declare namespace GetSettings {
19
+ interface Request {
20
+ query?: {};
21
+ }
22
+ interface Response {
23
+ data: Settings;
24
+ }
25
+ }
26
+ /**
27
+ * PUT /i18n/settings
28
+ *
29
+ * Update the stored settings
30
+ */
31
+ export declare namespace UpdateSettings {
32
+ interface Request {
33
+ body: Settings['data'];
34
+ }
35
+ type Response = Utils.OneOf<{
36
+ data: Settings['data'];
37
+ }, {
38
+ error?: errors.ApplicationError | errors.ValidationError;
39
+ }>;
40
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/i18n",
3
- "version": "0.0.0-experimental.e9144fc8a193f9875a2c0832d689c14001c79f00",
3
+ "version": "0.0.0-experimental.e99215433ba1d6e5497350812df274f426dbdba3",
4
4
  "description": "Create read and update content in different languages, both from the Admin Panel and from the API",
5
5
  "repository": {
6
6
  "type": "git",
@@ -57,22 +57,24 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@reduxjs/toolkit": "1.9.7",
60
- "@strapi/design-system": "2.0.0-rc.14",
61
- "@strapi/icons": "2.0.0-rc.14",
62
- "@strapi/utils": "0.0.0-experimental.e9144fc8a193f9875a2c0832d689c14001c79f00",
60
+ "@strapi/design-system": "2.0.0-rc.30",
61
+ "@strapi/icons": "2.0.0-rc.30",
62
+ "@strapi/utils": "0.0.0-experimental.e99215433ba1d6e5497350812df274f426dbdba3",
63
63
  "lodash": "4.17.21",
64
64
  "qs": "6.11.1",
65
65
  "react-intl": "6.6.2",
66
66
  "react-redux": "8.1.3",
67
- "yup": "0.32.9"
67
+ "yup": "0.32.9",
68
+ "zod": "3.25.67"
68
69
  },
69
70
  "devDependencies": {
70
- "@strapi/admin": "0.0.0-experimental.e9144fc8a193f9875a2c0832d689c14001c79f00",
71
- "@strapi/admin-test-utils": "0.0.0-experimental.e9144fc8a193f9875a2c0832d689c14001c79f00",
72
- "@strapi/content-manager": "0.0.0-experimental.e9144fc8a193f9875a2c0832d689c14001c79f00",
73
- "@strapi/types": "0.0.0-experimental.e9144fc8a193f9875a2c0832d689c14001c79f00",
71
+ "@strapi/admin": "0.0.0-experimental.e99215433ba1d6e5497350812df274f426dbdba3",
72
+ "@strapi/admin-test-utils": "0.0.0-experimental.e99215433ba1d6e5497350812df274f426dbdba3",
73
+ "@strapi/content-manager": "0.0.0-experimental.e99215433ba1d6e5497350812df274f426dbdba3",
74
+ "@strapi/types": "0.0.0-experimental.e99215433ba1d6e5497350812df274f426dbdba3",
74
75
  "@testing-library/react": "15.0.7",
75
76
  "@testing-library/user-event": "14.5.2",
77
+ "koa": "2.16.1",
76
78
  "msw": "1.3.0",
77
79
  "react": "18.3.1",
78
80
  "react-dom": "18.3.1",