@strapi/i18n 0.0.0-next.8f63e1055db761e0213cb6610f80c55658196ae1 → 0.0.0-next.913e7071c9410ff8af2e776e25f9fb1c38cb59dd

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 (422) 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 +226 -5
  62. package/dist/admin/index.js.map +1 -1
  63. package/dist/admin/index.mjs +202 -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 +8 -2
  102. package/dist/admin/src/components/LocaleListCell.d.ts +5 -4
  103. package/dist/admin/src/components/tests/CreateLocale.test.d.ts +1 -0
  104. package/dist/admin/src/components/tests/DeleteLocale.test.d.ts +1 -0
  105. package/dist/admin/src/components/tests/EditLocale.test.d.ts +1 -0
  106. package/dist/admin/src/components/tests/LocaleListCell.test.d.ts +1 -0
  107. package/dist/admin/src/contentReleasesHooks/releaseDetailsView.d.ts +1 -1
  108. package/dist/admin/src/pages/tests/SettingsPage.test.d.ts +1 -0
  109. package/dist/admin/src/services/api.d.ts +1 -1
  110. package/dist/admin/src/services/locales.d.ts +1 -1
  111. package/dist/admin/src/services/relations.d.ts +1 -1
  112. package/dist/admin/src/services/settings.d.ts +5 -0
  113. package/dist/admin/src/utils/schemas.d.ts +642 -16
  114. package/dist/admin/tests/server.d.ts +1 -0
  115. package/dist/admin/tests/utils.d.ts +6 -0
  116. package/dist/admin/translations/de.json.js +66 -0
  117. package/dist/admin/translations/de.json.js.map +1 -0
  118. package/dist/admin/translations/de.json.mjs +64 -0
  119. package/dist/admin/translations/de.json.mjs.map +1 -0
  120. package/dist/admin/translations/dk.json.js +66 -0
  121. package/dist/admin/translations/dk.json.js.map +1 -0
  122. package/dist/admin/translations/dk.json.mjs +64 -0
  123. package/dist/admin/translations/dk.json.mjs.map +1 -0
  124. package/dist/admin/translations/en.json.js +88 -0
  125. package/dist/admin/translations/en.json.js.map +1 -0
  126. package/dist/admin/translations/en.json.mjs +86 -0
  127. package/dist/admin/translations/en.json.mjs.map +1 -0
  128. package/dist/admin/translations/es.json.js +66 -0
  129. package/dist/admin/translations/es.json.js.map +1 -0
  130. package/dist/admin/translations/es.json.mjs +64 -0
  131. package/dist/admin/translations/es.json.mjs.map +1 -0
  132. package/dist/admin/translations/fr.json.js +66 -0
  133. package/dist/admin/translations/fr.json.js.map +1 -0
  134. package/dist/admin/translations/fr.json.mjs +64 -0
  135. package/dist/admin/translations/fr.json.mjs.map +1 -0
  136. package/dist/admin/translations/ko.json.js +65 -0
  137. package/dist/admin/translations/ko.json.js.map +1 -0
  138. package/dist/admin/translations/ko.json.mjs +63 -0
  139. package/dist/admin/translations/ko.json.mjs.map +1 -0
  140. package/dist/admin/translations/pl.json.js +66 -0
  141. package/dist/admin/translations/pl.json.js.map +1 -0
  142. package/dist/admin/translations/pl.json.mjs +64 -0
  143. package/dist/admin/translations/pl.json.mjs.map +1 -0
  144. package/dist/admin/translations/ru.json.js +68 -0
  145. package/dist/admin/translations/ru.json.js.map +1 -0
  146. package/dist/admin/translations/ru.json.mjs +66 -0
  147. package/dist/admin/translations/ru.json.mjs.map +1 -0
  148. package/dist/admin/translations/tr.json.js +66 -0
  149. package/dist/admin/translations/tr.json.js.map +1 -0
  150. package/dist/admin/translations/tr.json.mjs +64 -0
  151. package/dist/admin/translations/tr.json.mjs.map +1 -0
  152. package/dist/admin/translations/uk.json.js +82 -0
  153. package/dist/admin/translations/uk.json.js.map +1 -0
  154. package/dist/admin/translations/uk.json.mjs +80 -0
  155. package/dist/admin/translations/uk.json.mjs.map +1 -0
  156. package/dist/admin/translations/zh-Hans.json.js +57 -0
  157. package/dist/admin/translations/zh-Hans.json.js.map +1 -0
  158. package/dist/admin/translations/zh-Hans.json.mjs +55 -0
  159. package/dist/admin/translations/zh-Hans.json.mjs.map +1 -0
  160. package/dist/admin/translations/zh.json.js +66 -0
  161. package/dist/admin/translations/zh.json.js.map +1 -0
  162. package/dist/admin/translations/zh.json.mjs +64 -0
  163. package/dist/admin/translations/zh.json.mjs.map +1 -0
  164. package/dist/admin/utils/baseQuery.js +8 -0
  165. package/dist/admin/utils/baseQuery.js.map +1 -0
  166. package/dist/admin/utils/baseQuery.mjs +6 -0
  167. package/dist/admin/utils/baseQuery.mjs.map +1 -0
  168. package/dist/admin/utils/clean.js +70 -0
  169. package/dist/admin/utils/clean.js.map +1 -0
  170. package/dist/admin/utils/clean.mjs +68 -0
  171. package/dist/admin/utils/clean.mjs.map +1 -0
  172. package/dist/admin/utils/fields.js +34 -0
  173. package/dist/admin/utils/fields.js.map +1 -0
  174. package/dist/admin/utils/fields.mjs +31 -0
  175. package/dist/admin/utils/fields.mjs.map +1 -0
  176. package/dist/admin/utils/getTranslation.js +8 -0
  177. package/dist/admin/utils/getTranslation.js.map +1 -0
  178. package/dist/admin/utils/getTranslation.mjs +6 -0
  179. package/dist/admin/utils/getTranslation.mjs.map +1 -0
  180. package/dist/admin/utils/prefixPluginTranslations.js +11 -0
  181. package/dist/admin/utils/prefixPluginTranslations.js.map +1 -0
  182. package/dist/admin/utils/prefixPluginTranslations.mjs +9 -0
  183. package/dist/admin/utils/prefixPluginTranslations.mjs.map +1 -0
  184. package/dist/admin/utils/schemas.js +74 -0
  185. package/dist/admin/utils/schemas.js.map +1 -0
  186. package/dist/admin/utils/schemas.mjs +72 -0
  187. package/dist/admin/utils/schemas.mjs.map +1 -0
  188. package/dist/admin/utils/strings.js +6 -0
  189. package/dist/admin/utils/strings.js.map +1 -0
  190. package/dist/admin/utils/strings.mjs +4 -0
  191. package/dist/admin/utils/strings.mjs.map +1 -0
  192. package/dist/server/bootstrap.js +79 -0
  193. package/dist/server/bootstrap.js.map +1 -0
  194. package/dist/server/bootstrap.mjs +77 -0
  195. package/dist/server/bootstrap.mjs.map +1 -0
  196. package/dist/server/constants/index.js +29 -0
  197. package/dist/server/constants/index.js.map +1 -0
  198. package/dist/server/constants/index.mjs +25 -0
  199. package/dist/server/constants/index.mjs.map +1 -0
  200. package/dist/server/constants/iso-locales.json.js +2427 -0
  201. package/dist/server/constants/iso-locales.json.js.map +1 -0
  202. package/dist/server/constants/iso-locales.json.mjs +2425 -0
  203. package/dist/server/constants/iso-locales.json.mjs.map +1 -0
  204. package/dist/server/content-types/index.js +10 -0
  205. package/dist/server/content-types/index.js.map +1 -0
  206. package/dist/server/content-types/index.mjs +8 -0
  207. package/dist/server/content-types/index.mjs.map +1 -0
  208. package/dist/server/content-types/locale/index.js +10 -0
  209. package/dist/server/content-types/locale/index.js.map +1 -0
  210. package/dist/server/content-types/locale/index.mjs +8 -0
  211. package/dist/server/content-types/locale/index.mjs.map +1 -0
  212. package/dist/server/content-types/locale/schema.json.js +46 -0
  213. package/dist/server/content-types/locale/schema.json.js.map +1 -0
  214. package/dist/server/content-types/locale/schema.json.mjs +38 -0
  215. package/dist/server/content-types/locale/schema.json.mjs.map +1 -0
  216. package/dist/server/controllers/content-types.js +76 -0
  217. package/dist/server/controllers/content-types.js.map +1 -0
  218. package/dist/server/controllers/content-types.mjs +74 -0
  219. package/dist/server/controllers/content-types.mjs.map +1 -0
  220. package/dist/server/controllers/index.js +16 -0
  221. package/dist/server/controllers/index.js.map +1 -0
  222. package/dist/server/controllers/index.mjs +14 -0
  223. package/dist/server/controllers/index.mjs.map +1 -0
  224. package/dist/server/controllers/iso-locales.js +13 -0
  225. package/dist/server/controllers/iso-locales.js.map +1 -0
  226. package/dist/server/controllers/iso-locales.mjs +11 -0
  227. package/dist/server/controllers/iso-locales.mjs.map +1 -0
  228. package/dist/server/controllers/locales.js +108 -0
  229. package/dist/server/controllers/locales.js.map +1 -0
  230. package/dist/server/controllers/locales.mjs +87 -0
  231. package/dist/server/controllers/locales.mjs.map +1 -0
  232. package/dist/server/controllers/settings.js +24 -0
  233. package/dist/server/controllers/settings.js.map +1 -0
  234. package/dist/server/controllers/settings.mjs +22 -0
  235. package/dist/server/controllers/settings.mjs.map +1 -0
  236. package/dist/server/controllers/validate-locale-creation.js +47 -0
  237. package/dist/server/controllers/validate-locale-creation.js.map +1 -0
  238. package/dist/server/controllers/validate-locale-creation.mjs +45 -0
  239. package/dist/server/controllers/validate-locale-creation.mjs.map +1 -0
  240. package/dist/server/domain/locale.js +11 -0
  241. package/dist/server/domain/locale.js.map +1 -0
  242. package/dist/server/domain/locale.mjs +9 -0
  243. package/dist/server/domain/locale.mjs.map +1 -0
  244. package/dist/server/graphql.js +115 -0
  245. package/dist/server/graphql.js.map +1 -0
  246. package/dist/server/graphql.mjs +113 -0
  247. package/dist/server/graphql.mjs.map +1 -0
  248. package/dist/server/index.js +18 -3453
  249. package/dist/server/index.js.map +1 -1
  250. package/dist/server/index.mjs +17 -3435
  251. package/dist/server/index.mjs.map +1 -1
  252. package/dist/server/register.js +79 -0
  253. package/dist/server/register.js.map +1 -0
  254. package/dist/server/register.mjs +77 -0
  255. package/dist/server/register.mjs.map +1 -0
  256. package/dist/server/routes/admin.js +122 -0
  257. package/dist/server/routes/admin.js.map +1 -0
  258. package/dist/server/routes/admin.mjs +120 -0
  259. package/dist/server/routes/admin.mjs.map +1 -0
  260. package/dist/server/routes/content-api.js +19 -0
  261. package/dist/server/routes/content-api.js.map +1 -0
  262. package/dist/server/routes/content-api.mjs +17 -0
  263. package/dist/server/routes/content-api.mjs.map +1 -0
  264. package/dist/server/routes/index.js +12 -0
  265. package/dist/server/routes/index.js.map +1 -0
  266. package/dist/server/routes/index.mjs +10 -0
  267. package/dist/server/routes/index.mjs.map +1 -0
  268. package/dist/server/routes/validation/locale.js +57 -0
  269. package/dist/server/routes/validation/locale.js.map +1 -0
  270. package/dist/server/routes/validation/locale.mjs +36 -0
  271. package/dist/server/routes/validation/locale.mjs.map +1 -0
  272. package/dist/server/services/ai-localizations.js +143 -0
  273. package/dist/server/services/ai-localizations.js.map +1 -0
  274. package/dist/server/services/ai-localizations.mjs +141 -0
  275. package/dist/server/services/ai-localizations.mjs.map +1 -0
  276. package/dist/server/services/content-types.js +157 -0
  277. package/dist/server/services/content-types.js.map +1 -0
  278. package/dist/server/services/content-types.mjs +155 -0
  279. package/dist/server/services/content-types.mjs.map +1 -0
  280. package/dist/server/services/index.js +26 -0
  281. package/dist/server/services/index.js.map +1 -0
  282. package/dist/server/services/index.mjs +24 -0
  283. package/dist/server/services/index.mjs.map +1 -0
  284. package/dist/server/services/iso-locales.js +12 -0
  285. package/dist/server/services/iso-locales.js.map +1 -0
  286. package/dist/server/services/iso-locales.mjs +10 -0
  287. package/dist/server/services/iso-locales.mjs.map +1 -0
  288. package/dist/server/services/locales.js +114 -0
  289. package/dist/server/services/locales.js.map +1 -0
  290. package/dist/server/services/locales.mjs +112 -0
  291. package/dist/server/services/locales.mjs.map +1 -0
  292. package/dist/server/services/localizations.js +68 -0
  293. package/dist/server/services/localizations.js.map +1 -0
  294. package/dist/server/services/localizations.mjs +66 -0
  295. package/dist/server/services/localizations.mjs.map +1 -0
  296. package/dist/server/services/metrics.js +30 -0
  297. package/dist/server/services/metrics.js.map +1 -0
  298. package/dist/server/services/metrics.mjs +28 -0
  299. package/dist/server/services/metrics.mjs.map +1 -0
  300. package/dist/server/services/permissions/actions.js +136 -0
  301. package/dist/server/services/permissions/actions.js.map +1 -0
  302. package/dist/server/services/permissions/actions.mjs +134 -0
  303. package/dist/server/services/permissions/actions.mjs.map +1 -0
  304. package/dist/server/services/permissions/engine.js +52 -0
  305. package/dist/server/services/permissions/engine.js.map +1 -0
  306. package/dist/server/services/permissions/engine.mjs +50 -0
  307. package/dist/server/services/permissions/engine.mjs.map +1 -0
  308. package/dist/server/services/permissions/sections-builder.js +45 -0
  309. package/dist/server/services/permissions/sections-builder.js.map +1 -0
  310. package/dist/server/services/permissions/sections-builder.mjs +43 -0
  311. package/dist/server/services/permissions/sections-builder.mjs.map +1 -0
  312. package/dist/server/services/permissions.js +14 -0
  313. package/dist/server/services/permissions.js.map +1 -0
  314. package/dist/server/services/permissions.mjs +12 -0
  315. package/dist/server/services/permissions.mjs.map +1 -0
  316. package/dist/server/services/sanitize/index.js +34 -0
  317. package/dist/server/services/sanitize/index.js.map +1 -0
  318. package/dist/server/services/sanitize/index.mjs +32 -0
  319. package/dist/server/services/sanitize/index.mjs.map +1 -0
  320. package/dist/server/services/settings.js +25 -0
  321. package/dist/server/services/settings.js.map +1 -0
  322. package/dist/server/services/settings.mjs +23 -0
  323. package/dist/server/services/settings.mjs.map +1 -0
  324. package/dist/server/src/controllers/index.d.ts +4 -0
  325. package/dist/server/src/controllers/index.d.ts.map +1 -1
  326. package/dist/server/src/controllers/settings.d.ts +7 -0
  327. package/dist/server/src/controllers/settings.d.ts.map +1 -0
  328. package/dist/server/src/index.d.ts +26 -7
  329. package/dist/server/src/index.d.ts.map +1 -1
  330. package/dist/server/src/routes/admin.d.ts.map +1 -1
  331. package/dist/server/src/routes/content-api.d.ts +5 -8
  332. package/dist/server/src/routes/content-api.d.ts.map +1 -1
  333. package/dist/server/src/routes/index.d.ts +3 -7
  334. package/dist/server/src/routes/index.d.ts.map +1 -1
  335. package/dist/server/src/routes/validation/index.d.ts +2 -0
  336. package/dist/server/src/routes/validation/index.d.ts.map +1 -0
  337. package/dist/server/src/routes/validation/locale.d.ts +41 -0
  338. package/dist/server/src/routes/validation/locale.d.ts.map +1 -0
  339. package/dist/server/src/services/ai-localizations.d.ts +17 -0
  340. package/dist/server/src/services/ai-localizations.d.ts.map +1 -0
  341. package/dist/server/src/services/index.d.ts +19 -0
  342. package/dist/server/src/services/index.d.ts.map +1 -1
  343. package/dist/server/src/services/localizations.d.ts +1 -1
  344. package/dist/server/src/services/localizations.d.ts.map +1 -1
  345. package/dist/server/src/services/settings.d.ts +13 -0
  346. package/dist/server/src/services/settings.d.ts.map +1 -0
  347. package/dist/server/src/utils/index.d.ts +5 -1
  348. package/dist/server/src/utils/index.d.ts.map +1 -1
  349. package/dist/server/src/validation/settings.d.ts +12 -0
  350. package/dist/server/src/validation/settings.d.ts.map +1 -0
  351. package/dist/server/utils/index.js +16 -0
  352. package/dist/server/utils/index.js.map +1 -0
  353. package/dist/server/utils/index.mjs +13 -0
  354. package/dist/server/utils/index.mjs.map +1 -0
  355. package/dist/server/validation/content-types.js +18 -0
  356. package/dist/server/validation/content-types.js.map +1 -0
  357. package/dist/server/validation/content-types.mjs +16 -0
  358. package/dist/server/validation/content-types.mjs.map +1 -0
  359. package/dist/server/validation/locales.js +23 -0
  360. package/dist/server/validation/locales.js.map +1 -0
  361. package/dist/server/validation/locales.mjs +20 -0
  362. package/dist/server/validation/locales.mjs.map +1 -0
  363. package/dist/server/validation/settings.js +11 -0
  364. package/dist/server/validation/settings.js.map +1 -0
  365. package/dist/server/validation/settings.mjs +9 -0
  366. package/dist/server/validation/settings.mjs.map +1 -0
  367. package/dist/shared/contracts/content-manager.d.ts +1 -1
  368. package/dist/shared/contracts/settings.d.ts +40 -0
  369. package/dist/shared/contracts/shared.d.ts +1 -1
  370. package/package.json +20 -16
  371. package/dist/_chunks/SettingsPage-BHvunuIF.mjs +0 -554
  372. package/dist/_chunks/SettingsPage-BHvunuIF.mjs.map +0 -1
  373. package/dist/_chunks/SettingsPage-Bcj7380u.js +0 -574
  374. package/dist/_chunks/SettingsPage-Bcj7380u.js.map +0 -1
  375. package/dist/_chunks/de-9eCAqqrB.mjs +0 -66
  376. package/dist/_chunks/de-9eCAqqrB.mjs.map +0 -1
  377. package/dist/_chunks/de-DtWiGdHl.js +0 -66
  378. package/dist/_chunks/de-DtWiGdHl.js.map +0 -1
  379. package/dist/_chunks/dk-2qBjxt-P.mjs +0 -66
  380. package/dist/_chunks/dk-2qBjxt-P.mjs.map +0 -1
  381. package/dist/_chunks/dk-D8C-casx.js +0 -66
  382. package/dist/_chunks/dk-D8C-casx.js.map +0 -1
  383. package/dist/_chunks/en-BKBz3tro.js +0 -81
  384. package/dist/_chunks/en-BKBz3tro.js.map +0 -1
  385. package/dist/_chunks/en-DlXfy6Gy.mjs +0 -81
  386. package/dist/_chunks/en-DlXfy6Gy.mjs.map +0 -1
  387. package/dist/_chunks/es-DS-XFGSw.js +0 -66
  388. package/dist/_chunks/es-DS-XFGSw.js.map +0 -1
  389. package/dist/_chunks/es-DlmMVaBG.mjs +0 -66
  390. package/dist/_chunks/es-DlmMVaBG.mjs.map +0 -1
  391. package/dist/_chunks/fr-3S6ke71d.mjs +0 -66
  392. package/dist/_chunks/fr-3S6ke71d.mjs.map +0 -1
  393. package/dist/_chunks/fr-BTjekDpq.js +0 -66
  394. package/dist/_chunks/fr-BTjekDpq.js.map +0 -1
  395. package/dist/_chunks/index-BKZbxhpm.js +0 -1637
  396. package/dist/_chunks/index-BKZbxhpm.js.map +0 -1
  397. package/dist/_chunks/index-DUdrr5PR.mjs +0 -1615
  398. package/dist/_chunks/index-DUdrr5PR.mjs.map +0 -1
  399. package/dist/_chunks/ko-DmcGUBQ3.js +0 -65
  400. package/dist/_chunks/ko-DmcGUBQ3.js.map +0 -1
  401. package/dist/_chunks/ko-qTjQ8IMw.mjs +0 -65
  402. package/dist/_chunks/ko-qTjQ8IMw.mjs.map +0 -1
  403. package/dist/_chunks/pl-B67TSHqT.mjs +0 -66
  404. package/dist/_chunks/pl-B67TSHqT.mjs.map +0 -1
  405. package/dist/_chunks/pl-Cn5RYonZ.js +0 -66
  406. package/dist/_chunks/pl-Cn5RYonZ.js.map +0 -1
  407. package/dist/_chunks/ru-BMBgVL3s.js +0 -68
  408. package/dist/_chunks/ru-BMBgVL3s.js.map +0 -1
  409. package/dist/_chunks/ru-hagMa57T.mjs +0 -68
  410. package/dist/_chunks/ru-hagMa57T.mjs.map +0 -1
  411. package/dist/_chunks/tr-CarUU76c.js +0 -66
  412. package/dist/_chunks/tr-CarUU76c.js.map +0 -1
  413. package/dist/_chunks/tr-Dw_jmkG-.mjs +0 -66
  414. package/dist/_chunks/tr-Dw_jmkG-.mjs.map +0 -1
  415. package/dist/_chunks/zh-57YM4amO.mjs +0 -66
  416. package/dist/_chunks/zh-57YM4amO.mjs.map +0 -1
  417. package/dist/_chunks/zh-CukOviB0.js +0 -66
  418. package/dist/_chunks/zh-CukOviB0.js.map +0 -1
  419. package/dist/_chunks/zh-Hans-DSHIXAa3.js +0 -57
  420. package/dist/_chunks/zh-Hans-DSHIXAa3.js.map +0 -1
  421. package/dist/_chunks/zh-Hans-Dyc-aR-h.mjs +0 -57
  422. package/dist/_chunks/zh-Hans-Dyc-aR-h.mjs.map +0 -1
@@ -0,0 +1,100 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { useQueryParams } from '@strapi/admin/strapi-admin';
3
+ import { useCollator, Menu, Flex, Typography } from '@strapi/design-system';
4
+ import { stringify } from 'qs';
5
+ import { useIntl } from 'react-intl';
6
+ import { useNavigate } from 'react-router-dom';
7
+ import { useGetLocalesQuery } from '../services/locales.mjs';
8
+ import { getTranslation } from '../utils/getTranslation.mjs';
9
+
10
+ const LocaleListCell = ({ locale: currentLocale, localizations, documentId })=>{
11
+ const { locale: language, formatMessage } = useIntl();
12
+ const { data: locales = [] } = useGetLocalesQuery();
13
+ const navigate = useNavigate();
14
+ const [{ query }] = useQueryParams();
15
+ const formatter = useCollator(language, {
16
+ sensitivity: 'base'
17
+ });
18
+ if (!Array.isArray(locales) || !localizations) {
19
+ return null;
20
+ }
21
+ const availableLocales = localizations.map((loc)=>loc.locale);
22
+ const localesForDocument = locales.reduce((acc, locale)=>{
23
+ const createdLocale = [
24
+ currentLocale,
25
+ ...availableLocales
26
+ ].find((loc)=>{
27
+ return loc === locale.code;
28
+ });
29
+ if (createdLocale) {
30
+ const name = locale.isDefault ? `${locale.name} (default)` : locale.name;
31
+ acc.push({
32
+ code: locale.code,
33
+ name
34
+ });
35
+ }
36
+ return acc;
37
+ }, []).toSorted((a, b)=>formatter.compare(a.name, b.name));
38
+ const getDisplayText = ()=>{
39
+ const displayedLocales = localesForDocument.slice(0, 2);
40
+ const remainingCount = localesForDocument.length - 2;
41
+ const baseText = displayedLocales.map(({ name })=>name).join(', ');
42
+ if (remainingCount <= 0) {
43
+ return baseText;
44
+ }
45
+ return formatMessage({
46
+ id: getTranslation('CMListView.popover.display-locales.more'),
47
+ defaultMessage: '{locales} + {count} more'
48
+ }, {
49
+ locales: baseText,
50
+ count: remainingCount
51
+ });
52
+ };
53
+ const handleLocaleClick = (localeCode)=>{
54
+ navigate({
55
+ pathname: documentId,
56
+ search: stringify({
57
+ plugins: {
58
+ ...query.plugins,
59
+ i18n: {
60
+ locale: localeCode
61
+ }
62
+ }
63
+ })
64
+ });
65
+ };
66
+ return /*#__PURE__*/ jsxs(Menu.Root, {
67
+ children: [
68
+ /*#__PURE__*/ jsx(Menu.Trigger, {
69
+ children: /*#__PURE__*/ jsx(Flex, {
70
+ minWidth: "100%",
71
+ alignItems: "center",
72
+ justifyContent: "center",
73
+ fontWeight: "regular",
74
+ children: /*#__PURE__*/ jsx(Typography, {
75
+ textColor: "neutral800",
76
+ ellipsis: true,
77
+ marginRight: 2,
78
+ children: getDisplayText()
79
+ })
80
+ })
81
+ }),
82
+ /*#__PURE__*/ jsx(Menu.Content, {
83
+ children: localesForDocument.map(({ code, name })=>/*#__PURE__*/ jsx(Menu.Item, {
84
+ onClick: (e)=>{
85
+ e.stopPropagation();
86
+ handleLocaleClick(code);
87
+ },
88
+ children: /*#__PURE__*/ jsx(Typography, {
89
+ textColor: "neutral800",
90
+ fontWeight: "regular",
91
+ children: name
92
+ })
93
+ }, code))
94
+ })
95
+ ]
96
+ });
97
+ };
98
+
99
+ export { LocaleListCell };
100
+ //# sourceMappingURL=LocaleListCell.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocaleListCell.mjs","sources":["../../../admin/src/components/LocaleListCell.tsx"],"sourcesContent":["import { useQueryParams } from '@strapi/admin/strapi-admin';\nimport { Flex, Menu, Typography, useCollator } from '@strapi/design-system';\nimport { stringify } from 'qs';\nimport { useIntl } from 'react-intl';\nimport { useNavigate } from 'react-router-dom';\n\nimport { useGetLocalesQuery } from '../services/locales';\nimport { getTranslation } from '../utils/getTranslation';\n\nimport type { I18nBaseQuery } from '../types';\n\ninterface LocaleListCellProps {\n localizations: { locale: string }[];\n locale: string;\n documentId: string;\n}\n\nconst LocaleListCell = ({\n locale: currentLocale,\n localizations,\n documentId,\n}: LocaleListCellProps) => {\n const { locale: language, formatMessage } = useIntl();\n const { data: locales = [] } = useGetLocalesQuery();\n const navigate = useNavigate();\n const [{ query }] = useQueryParams<I18nBaseQuery>();\n const formatter = useCollator(language, {\n sensitivity: 'base',\n });\n\n if (!Array.isArray(locales) || !localizations) {\n return null;\n }\n\n const availableLocales = localizations.map((loc) => loc.locale);\n\n const localesForDocument = locales\n .reduce<Array<{ code: string; name: string }>>((acc, locale) => {\n const createdLocale = [currentLocale, ...availableLocales].find((loc) => {\n return loc === locale.code;\n });\n\n if (createdLocale) {\n const name = locale.isDefault ? `${locale.name} (default)` : locale.name;\n acc.push({ code: locale.code, name });\n }\n\n return acc;\n }, [])\n .toSorted((a, b) => formatter.compare(a.name, b.name));\n\n const getDisplayText = () => {\n const displayedLocales = localesForDocument.slice(0, 2);\n const remainingCount = localesForDocument.length - 2;\n\n const baseText = displayedLocales.map(({ name }) => name).join(', ');\n\n if (remainingCount <= 0) {\n return baseText;\n }\n\n return formatMessage(\n {\n id: getTranslation('CMListView.popover.display-locales.more'),\n defaultMessage: '{locales} + {count} more',\n },\n { locales: baseText, count: remainingCount }\n );\n };\n\n const handleLocaleClick = (localeCode: string) => {\n navigate({\n pathname: documentId,\n search: stringify({\n plugins: {\n ...query.plugins,\n i18n: { locale: localeCode },\n },\n }),\n });\n };\n\n return (\n <Menu.Root>\n <Menu.Trigger>\n <Flex minWidth=\"100%\" alignItems=\"center\" justifyContent=\"center\" fontWeight=\"regular\">\n <Typography textColor=\"neutral800\" ellipsis marginRight={2}>\n {getDisplayText()}\n </Typography>\n </Flex>\n </Menu.Trigger>\n <Menu.Content>\n {localesForDocument.map(({ code, name }) => (\n <Menu.Item\n key={code}\n onClick={(e: React.MouseEvent) => {\n e.stopPropagation();\n handleLocaleClick(code);\n }}\n >\n <Typography textColor=\"neutral800\" fontWeight=\"regular\">\n {name}\n </Typography>\n </Menu.Item>\n ))}\n </Menu.Content>\n </Menu.Root>\n );\n};\n\nexport { LocaleListCell };\nexport type { LocaleListCellProps };\n"],"names":["LocaleListCell","locale","currentLocale","localizations","documentId","language","formatMessage","useIntl","data","locales","useGetLocalesQuery","navigate","useNavigate","query","useQueryParams","formatter","useCollator","sensitivity","Array","isArray","availableLocales","map","loc","localesForDocument","reduce","acc","createdLocale","find","code","name","isDefault","push","toSorted","a","b","compare","getDisplayText","displayedLocales","slice","remainingCount","length","baseText","join","id","getTranslation","defaultMessage","count","handleLocaleClick","localeCode","pathname","search","stringify","plugins","i18n","_jsxs","Menu","Root","_jsx","Trigger","Flex","minWidth","alignItems","justifyContent","fontWeight","Typography","textColor","ellipsis","marginRight","Content","Item","onClick","e","stopPropagation"],"mappings":";;;;;;;;;AAiBMA,MAAAA,cAAAA,GAAiB,CAAC,EACtBC,MAAAA,EAAQC,aAAa,EACrBC,aAAa,EACbC,UAAU,EACU,GAAA;AACpB,IAAA,MAAM,EAAEH,MAAQI,EAAAA,QAAQ,EAAEC,aAAa,EAAE,GAAGC,OAAAA,EAAAA;AAC5C,IAAA,MAAM,EAAEC,IAAAA,EAAMC,OAAU,GAAA,EAAE,EAAE,GAAGC,kBAAAA,EAAAA;AAC/B,IAAA,MAAMC,QAAWC,GAAAA,WAAAA,EAAAA;AACjB,IAAA,MAAM,CAAC,EAAEC,KAAK,EAAE,CAAC,GAAGC,cAAAA,EAAAA;IACpB,MAAMC,SAAAA,GAAYC,YAAYX,QAAU,EAAA;QACtCY,WAAa,EAAA;AACf,KAAA,CAAA;AAEA,IAAA,IAAI,CAACC,KAAMC,CAAAA,OAAO,CAACV,OAAAA,CAAAA,IAAY,CAACN,aAAe,EAAA;QAC7C,OAAO,IAAA;AACT;AAEA,IAAA,MAAMiB,mBAAmBjB,aAAckB,CAAAA,GAAG,CAAC,CAACC,GAAAA,GAAQA,IAAIrB,MAAM,CAAA;AAE9D,IAAA,MAAMsB,kBAAqBd,GAAAA,OAAAA,CACxBe,MAAM,CAAwC,CAACC,GAAKxB,EAAAA,MAAAA,GAAAA;AACnD,QAAA,MAAMyB,aAAgB,GAAA;AAACxB,YAAAA,aAAAA;AAAkBkB,YAAAA,GAAAA;SAAiB,CAACO,IAAI,CAAC,CAACL,GAAAA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
+ var React = require('react');
5
+ var strapiAdmin = require('@strapi/admin/strapi-admin');
6
+ var designSystem = require('@strapi/design-system');
7
+ var reactIntl = require('react-intl');
8
+ var useI18n = require('../hooks/useI18n.js');
9
+ var locales = require('../services/locales.js');
10
+ var getTranslation = require('../utils/getTranslation.js');
11
+
12
+ function _interopNamespaceDefault(e) {
13
+ var n = Object.create(null);
14
+ if (e) {
15
+ Object.keys(e).forEach(function (k) {
16
+ if (k !== 'default') {
17
+ var d = Object.getOwnPropertyDescriptor(e, k);
18
+ Object.defineProperty(n, k, d.get ? d : {
19
+ enumerable: true,
20
+ get: function () { return e[k]; }
21
+ });
22
+ }
23
+ });
24
+ }
25
+ n.default = e;
26
+ return Object.freeze(n);
27
+ }
28
+
29
+ var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
30
+
31
+ const LocalePicker = ()=>{
32
+ const { formatMessage } = reactIntl.useIntl();
33
+ const [{ query }, setQuery] = strapiAdmin.useQueryParams();
34
+ const { hasI18n, canRead, canCreate } = useI18n.useI18n();
35
+ const { data: locales$1 = [] } = locales.useGetLocalesQuery(undefined, {
36
+ skip: !hasI18n
37
+ });
38
+ const handleChange = React__namespace.useCallback((code, replace = false)=>{
39
+ setQuery({
40
+ page: 1,
41
+ plugins: {
42
+ ...query.plugins,
43
+ i18n: {
44
+ locale: code
45
+ }
46
+ }
47
+ }, 'push', replace);
48
+ }, [
49
+ query.plugins,
50
+ setQuery
51
+ ]);
52
+ React__namespace.useEffect(()=>{
53
+ if (!Array.isArray(locales$1) || !hasI18n) {
54
+ return;
55
+ }
56
+ /**
57
+ * Handle the case where the current locale query param doesn't exist
58
+ * in the list of available locales, so we redirect to the default locale.
59
+ */ const currentDesiredLocale = query.plugins?.i18n?.locale;
60
+ const doesLocaleExist = locales$1.find((loc)=>loc.code === currentDesiredLocale);
61
+ const defaultLocale = locales$1.find((locale)=>locale.isDefault);
62
+ if (!doesLocaleExist && defaultLocale?.code) {
63
+ handleChange(defaultLocale.code, true);
64
+ }
65
+ }, [
66
+ hasI18n,
67
+ handleChange,
68
+ locales$1,
69
+ query.plugins?.i18n?.locale
70
+ ]);
71
+ const sortedLocaleOptions = React__namespace.useMemo(()=>{
72
+ const displayedLocales = Array.isArray(locales$1) ? locales$1.filter((locale)=>{
73
+ /**
74
+ * If you can create or read we allow you to see the locale exists
75
+ * this is because in the ListView, you may be able to create a new entry
76
+ * in a locale you can't read.
77
+ */ return canCreate.includes(locale.code) || canRead.includes(locale.code);
78
+ }) : [];
79
+ return displayedLocales.sort((a, b)=>a.name.localeCompare(b.name)).map((locale)=>/*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
80
+ value: locale.code,
81
+ children: locale.name
82
+ }, locale.id));
83
+ }, [
84
+ locales$1,
85
+ canCreate,
86
+ canRead
87
+ ]);
88
+ if (!hasI18n || !Array.isArray(locales$1) || locales$1.length === 0) {
89
+ return null;
90
+ }
91
+ return /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelect, {
92
+ size: "S",
93
+ "aria-label": formatMessage({
94
+ id: getTranslation.getTranslation('actions.select-locale'),
95
+ defaultMessage: 'Select locale'
96
+ }),
97
+ value: query.plugins?.i18n?.locale || locales$1.find((locale)=>locale.isDefault)?.code,
98
+ // @ts-expect-error – This can be removed in V2 of the DS.
99
+ onChange: handleChange,
100
+ children: sortedLocaleOptions
101
+ });
102
+ };
103
+
104
+ exports.LocalePicker = LocalePicker;
105
+ //# sourceMappingURL=LocalePicker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocalePicker.js","sources":["../../../admin/src/components/LocalePicker.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { useQueryParams } from '@strapi/admin/strapi-admin';\nimport { SingleSelect, SingleSelectOption } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\n\nimport { useI18n } from '../hooks/useI18n';\nimport { useGetLocalesQuery } from '../services/locales';\nimport { getTranslation } from '../utils/getTranslation';\n\nimport type { I18nBaseQuery } from '../types';\n\ninterface Query extends I18nBaseQuery {\n page?: number;\n}\n\nconst LocalePicker = () => {\n const { formatMessage } = useIntl();\n const [{ query }, setQuery] = useQueryParams<Query>();\n\n const { hasI18n, canRead, canCreate } = useI18n();\n const { data: locales = [] } = useGetLocalesQuery(undefined, {\n skip: !hasI18n,\n });\n\n const handleChange = React.useCallback(\n (code: string, replace = false) => {\n setQuery(\n {\n page: 1,\n plugins: { ...query.plugins, i18n: { locale: code } },\n },\n 'push',\n replace\n );\n },\n [query.plugins, setQuery]\n );\n\n React.useEffect(() => {\n if (!Array.isArray(locales) || !hasI18n) {\n return;\n }\n /**\n * Handle the case where the current locale query param doesn't exist\n * in the list of available locales, so we redirect to the default locale.\n */\n const currentDesiredLocale = query.plugins?.i18n?.locale;\n const doesLocaleExist = locales.find((loc) => loc.code === currentDesiredLocale);\n const defaultLocale = locales.find((locale) => locale.isDefault);\n if (!doesLocaleExist && defaultLocale?.code) {\n handleChange(defaultLocale.code, true);\n }\n }, [hasI18n, handleChange, locales, query.plugins?.i18n?.locale]);\n\n const sortedLocaleOptions = React.useMemo(() => {\n const displayedLocales = Array.isArray(locales)\n ? locales.filter((locale) => {\n /**\n * If you can create or read we allow you to see the locale exists\n * this is because in the ListView, you may be able to create a new entry\n * in a locale you can't read.\n */\n return canCreate.includes(locale.code) || canRead.includes(locale.code);\n })\n : [];\n\n return displayedLocales\n .sort((a, b) => a.name.localeCompare(b.name))\n .map((locale) => (\n <SingleSelectOption key={locale.id} value={locale.code}>\n {locale.name}\n </SingleSelectOption>\n ));\n }, [locales, canCreate, canRead]);\n\n if (!hasI18n || !Array.isArray(locales) || locales.length === 0) {\n return null;\n }\n\n return (\n <SingleSelect\n size=\"S\"\n aria-label={formatMessage({\n id: getTranslation('actions.select-locale'),\n defaultMessage: 'Select locale',\n })}\n value={query.plugins?.i18n?.locale || locales.find((locale) => locale.isDefault)?.code}\n // @ts-expect-error – This can be removed in V2 of the DS.\n onChange={handleChange}\n >\n {sortedLocaleOptions}\n </SingleSelect>\n );\n};\n\nexport { LocalePicker };\n"],"names":["LocalePicker","formatMessage","useIntl","query","setQuery","useQueryParams","hasI18n","canRead","canCreate","useI18n","data","locales","useGetLocalesQuery","undefined","skip","handleChange","React","useCallback","code","replace","page","plugins","i18n","locale","useEffect","Array","isArray","currentDesiredLocale","doesLocaleExist","find","loc","defaultLocale","isDefault","sortedLocaleOptions","useMemo","displayedLocales","filter","includes","sort","a","b","name","localeCompare","map","_jsx","SingleSelectOption","value","id","length","SingleSelect","size","aria-label","getTranslation","defaultMessage","onChange"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,MAAMA,YAAe,GAAA,IAAA;IACnB,MAAM,EAAEC,aAAa,EAAE,GAAGC,iBAAAA,EAAAA;AAC1B,IAAA,MAAM,CAAC,EAAEC,KAAK,EAAE,EAAEC,SAAS,GAAGC,0BAAAA,EAAAA;AAE9B,IAAA,MAAM,EAAEC,OAAO,EAAEC,OAAO,EAAEC,SAAS,EAAE,GAAGC,eAAAA,EAAAA;AACxC,IAAA,MAAM,EAAEC,IAAMC,EAAAA,SAAAA,GAAU,EAAE,EAAE,GAAGC,2BAAmBC,SAAW,EAAA;AAC3DC,QAAAA,IAAAA,EAAM,CAACR;AACT,KAAA,CAAA;AAEA,IAAA,MAAMS,eAAeC,gBAAMC,CAAAA,WAAW,CACpC,CAACC,IAAAA,EAAcC,UAAU,KAAK,GAAA;QAC5Bf,QACE,CAAA;YACEgB,IAAM,EAAA,CAAA;YACNC,OAAS,EAAA;AAAE,gBAAA,GAAGlB,MAAMkB,OAAO;gBAAEC,IAAM,EAAA;oBAAEC,MAAQL,EAAAA;AAAK;AAAE;AACtD,SAAA,EACA,MACAC,EAAAA,OAAAA,CAAAA;KAGJ,EAAA;AAAChB,QAAAA,KAAAA,CAAMkB,OAAO;AAAEjB,QAAAA;AAAS,KAAA,CAAA;AAG3BY,IAAAA,gBAAAA,CAAMQ,SAAS,CAAC,IAAA;AACd,QAAA,IAAI,CAACC,K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,OAAOL,IAAI;AACnDK,gBAAAA,QAAAA,EAAAA,MAAAA,CAAOkB;AADelB,aAAAA,EAAAA,MAAAA,CAAOwB,EAAE,CAAA,CAAA;KAIrC,EAAA;AAACpC,QAAAA,SAAAA;AAASH,QAAAA,SAAAA;AAAWD,QAAAA;AAAQ,KAAA,CAAA;IAEhC,IAAI,CAACD,OAAW,IAAA,CAACmB,KAAMC,CAAAA,OAAO,CAACf,SAAYA,CAAAA,IAAAA,SAAAA,CAAQqC,MAAM,KAAK,CAAG,EAAA;QAC/D,OAAO,IAAA;AACT;AAEA,IAAA,qBACEJ,cAACK,CAAAA,yBAAAA,EAAAA;QACCC,IAAK,EAAA,GAAA;AACLC,QAAAA,YAAAA,EAAYlD,aAAc,CAAA;AACxB8C,YAAAA,EAAAA,EAAIK,6BAAe,CAAA,uBAAA,CAAA;YACnBC,cAAgB,EAAA;AAClB,SAAA,CAAA;AACAP,QAAAA,KAAAA,EAAO3C,KAAMkB,CAAAA,OAAO,EAAEC,IAAAA,EAAMC,MAAUZ,IAAAA,SAAAA,CAAQkB,IAAI,CAAC,CAACN,MAAAA,GAAWA,MAAOS,CAAAA,SAAS,CAAGd,EAAAA,IAAAA;;QAElFoC,QAAUvC,EAAAA,YAAAA;AAETkB,QAAAA,QAAAA,EAAAA;;AAGP;;;;"}
@@ -0,0 +1,84 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import { useQueryParams } from '@strapi/admin/strapi-admin';
4
+ import { SingleSelectOption, SingleSelect } from '@strapi/design-system';
5
+ import { useIntl } from 'react-intl';
6
+ import { useI18n } from '../hooks/useI18n.mjs';
7
+ import { useGetLocalesQuery } from '../services/locales.mjs';
8
+ import { getTranslation } from '../utils/getTranslation.mjs';
9
+
10
+ const LocalePicker = ()=>{
11
+ const { formatMessage } = useIntl();
12
+ const [{ query }, setQuery] = useQueryParams();
13
+ const { hasI18n, canRead, canCreate } = useI18n();
14
+ const { data: locales = [] } = useGetLocalesQuery(undefined, {
15
+ skip: !hasI18n
16
+ });
17
+ const handleChange = React.useCallback((code, replace = false)=>{
18
+ setQuery({
19
+ page: 1,
20
+ plugins: {
21
+ ...query.plugins,
22
+ i18n: {
23
+ locale: code
24
+ }
25
+ }
26
+ }, 'push', replace);
27
+ }, [
28
+ query.plugins,
29
+ setQuery
30
+ ]);
31
+ React.useEffect(()=>{
32
+ if (!Array.isArray(locales) || !hasI18n) {
33
+ return;
34
+ }
35
+ /**
36
+ * Handle the case where the current locale query param doesn't exist
37
+ * in the list of available locales, so we redirect to the default locale.
38
+ */ const currentDesiredLocale = query.plugins?.i18n?.locale;
39
+ const doesLocaleExist = locales.find((loc)=>loc.code === currentDesiredLocale);
40
+ const defaultLocale = locales.find((locale)=>locale.isDefault);
41
+ if (!doesLocaleExist && defaultLocale?.code) {
42
+ handleChange(defaultLocale.code, true);
43
+ }
44
+ }, [
45
+ hasI18n,
46
+ handleChange,
47
+ locales,
48
+ query.plugins?.i18n?.locale
49
+ ]);
50
+ const sortedLocaleOptions = React.useMemo(()=>{
51
+ const displayedLocales = Array.isArray(locales) ? locales.filter((locale)=>{
52
+ /**
53
+ * If you can create or read we allow you to see the locale exists
54
+ * this is because in the ListView, you may be able to create a new entry
55
+ * in a locale you can't read.
56
+ */ return canCreate.includes(locale.code) || canRead.includes(locale.code);
57
+ }) : [];
58
+ return displayedLocales.sort((a, b)=>a.name.localeCompare(b.name)).map((locale)=>/*#__PURE__*/ jsx(SingleSelectOption, {
59
+ value: locale.code,
60
+ children: locale.name
61
+ }, locale.id));
62
+ }, [
63
+ locales,
64
+ canCreate,
65
+ canRead
66
+ ]);
67
+ if (!hasI18n || !Array.isArray(locales) || locales.length === 0) {
68
+ return null;
69
+ }
70
+ return /*#__PURE__*/ jsx(SingleSelect, {
71
+ size: "S",
72
+ "aria-label": formatMessage({
73
+ id: getTranslation('actions.select-locale'),
74
+ defaultMessage: 'Select locale'
75
+ }),
76
+ value: query.plugins?.i18n?.locale || locales.find((locale)=>locale.isDefault)?.code,
77
+ // @ts-expect-error – This can be removed in V2 of the DS.
78
+ onChange: handleChange,
79
+ children: sortedLocaleOptions
80
+ });
81
+ };
82
+
83
+ export { LocalePicker };
84
+ //# sourceMappingURL=LocalePicker.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocalePicker.mjs","sources":["../../../admin/src/components/LocalePicker.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { useQueryParams } from '@strapi/admin/strapi-admin';\nimport { SingleSelect, SingleSelectOption } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\n\nimport { useI18n } from '../hooks/useI18n';\nimport { useGetLocalesQuery } from '../services/locales';\nimport { getTranslation } from '../utils/getTranslation';\n\nimport type { I18nBaseQuery } from '../types';\n\ninterface Query extends I18nBaseQuery {\n page?: number;\n}\n\nconst LocalePicker = () => {\n const { formatMessage } = useIntl();\n const [{ query }, setQuery] = useQueryParams<Query>();\n\n const { hasI18n, canRead, canCreate } = useI18n();\n const { data: locales = [] } = useGetLocalesQuery(undefined, {\n skip: !hasI18n,\n });\n\n const handleChange = React.useCallback(\n (code: string, replace = false) => {\n setQuery(\n {\n page: 1,\n plugins: { ...query.plugins, i18n: { locale: code } },\n },\n 'push',\n replace\n );\n },\n [query.plugins, setQuery]\n );\n\n React.useEffect(() => {\n if (!Array.isArray(locales) || !hasI18n) {\n return;\n }\n /**\n * Handle the case where the current locale query param doesn't exist\n * in the list of available locales, so we redirect to the default locale.\n */\n const currentDesiredLocale = query.plugins?.i18n?.locale;\n const doesLocaleExist = locales.find((loc) => loc.code === currentDesiredLocale);\n const defaultLocale = locales.find((locale) => locale.isDefault);\n if (!doesLocaleExist && defaultLocale?.code) {\n handleChange(defaultLocale.code, true);\n }\n }, [hasI18n, handleChange, locales, query.plugins?.i18n?.locale]);\n\n const sortedLocaleOptions = React.useMemo(() => {\n const displayedLocales = Array.isArray(locales)\n ? locales.filter((locale) => {\n /**\n * If you can create or read we allow you to see the locale exists\n * this is because in the ListView, you may be able to create a new entry\n * in a locale you can't read.\n */\n return canCreate.includes(locale.code) || canRead.includes(locale.code);\n })\n : [];\n\n return displayedLocales\n .sort((a, b) => a.name.localeCompare(b.name))\n .map((locale) => (\n <SingleSelectOption key={locale.id} value={locale.code}>\n {locale.name}\n </SingleSelectOption>\n ));\n }, [locales, canCreate, canRead]);\n\n if (!hasI18n || !Array.isArray(locales) || locales.length === 0) {\n return null;\n }\n\n return (\n <SingleSelect\n size=\"S\"\n aria-label={formatMessage({\n id: getTranslation('actions.select-locale'),\n defaultMessage: 'Select locale',\n })}\n value={query.plugins?.i18n?.locale || locales.find((locale) => locale.isDefault)?.code}\n // @ts-expect-error – This can be removed in V2 of the DS.\n onChange={handleChange}\n >\n {sortedLocaleOptions}\n </SingleSelect>\n );\n};\n\nexport { LocalePicker };\n"],"names":["LocalePicker","formatMessage","useIntl","query","setQuery","useQueryParams","hasI18n","canRead","canCreate","useI18n","data","locales","useGetLocalesQuery","undefined","skip","handleChange","React","useCallback","code","replace","page","plugins","i18n","locale","useEffect","Array","isArray","currentDesiredLocale","doesLocaleExist","find","loc","defaultLocale","isDefault","sortedLocaleOptions","useMemo","displayedLocales","filter","includes","sort","a","b","name","localeCompare","map","_jsx","SingleSelectOption","value","id","length","SingleSelect","size","aria-label","getTranslation","defaultMessage","onChange"],"mappings":";;;;;;;;;AAgBA,MAAMA,YAAe,GAAA,IAAA;IACnB,MAAM,EAAEC,aAAa,EAAE,GAAGC,OAAAA,EAAAA;AAC1B,IAAA,MAAM,CAAC,EAAEC,KAAK,EAAE,EAAEC,SAAS,GAAGC,cAAAA,EAAAA;AAE9B,IAAA,MAAM,EAAEC,OAAO,EAAEC,OAAO,EAAEC,SAAS,EAAE,GAAGC,OAAAA,EAAAA;AACxC,IAAA,MAAM,EAAEC,IAAMC,EAAAA,OAAAA,GAAU,EAAE,EAAE,GAAGC,mBAAmBC,SAAW,EAAA;AAC3DC,QAAAA,IAAAA,EAAM,CAACR;AACT,KAAA,CAAA;AAEA,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,EAAAA;;AAGP;;;;"}
@@ -0,0 +1,143 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var React = require('react');
5
+ var designSystem = require('@strapi/design-system');
6
+ var reactIntl = require('react-intl');
7
+ var getTranslation = require('../utils/getTranslation.js');
8
+ var DeleteLocale = require('./DeleteLocale.js');
9
+ var EditLocale = require('./EditLocale.js');
10
+
11
+ function _interopNamespaceDefault(e) {
12
+ var n = Object.create(null);
13
+ if (e) {
14
+ Object.keys(e).forEach(function (k) {
15
+ if (k !== 'default') {
16
+ var d = Object.getOwnPropertyDescriptor(e, k);
17
+ Object.defineProperty(n, k, d.get ? d : {
18
+ enumerable: true,
19
+ get: function () { return e[k]; }
20
+ });
21
+ }
22
+ });
23
+ }
24
+ n.default = e;
25
+ return Object.freeze(n);
26
+ }
27
+
28
+ var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
29
+
30
+ const LocaleTable = ({ locales = [], canDelete, canUpdate })=>{
31
+ const [editLocaleId, setEditLocaleId] = React__namespace.useState();
32
+ const { formatMessage } = reactIntl.useIntl();
33
+ const handleClick = (localeId)=>()=>{
34
+ if (canUpdate) {
35
+ setEditLocaleId(localeId);
36
+ }
37
+ };
38
+ return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Table, {
39
+ colCount: 4,
40
+ rowCount: locales.length + 1,
41
+ children: [
42
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Thead, {
43
+ children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Tr, {
44
+ children: [
45
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Th, {
46
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
47
+ variant: "sigma",
48
+ textColor: "neutral600",
49
+ children: formatMessage({
50
+ id: getTranslation.getTranslation('Settings.locales.row.id'),
51
+ defaultMessage: 'ID'
52
+ })
53
+ })
54
+ }),
55
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Th, {
56
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
57
+ variant: "sigma",
58
+ textColor: "neutral600",
59
+ children: formatMessage({
60
+ id: getTranslation.getTranslation('Settings.locales.row.displayName'),
61
+ defaultMessage: 'Display name'
62
+ })
63
+ })
64
+ }),
65
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Th, {
66
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
67
+ variant: "sigma",
68
+ textColor: "neutral600",
69
+ children: formatMessage({
70
+ id: getTranslation.getTranslation('Settings.locales.row.default-locale'),
71
+ defaultMessage: 'Default locale'
72
+ })
73
+ })
74
+ }),
75
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Th, {
76
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.VisuallyHidden, {
77
+ children: "Actions"
78
+ })
79
+ })
80
+ ]
81
+ })
82
+ }),
83
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Tbody, {
84
+ children: locales.map((locale)=>/*#__PURE__*/ jsxRuntime.jsxs(React__namespace.Fragment, {
85
+ children: [
86
+ /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Tr, {
87
+ onClick: handleClick(locale.id),
88
+ style: {
89
+ cursor: canUpdate ? 'pointer' : 'default'
90
+ },
91
+ children: [
92
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Td, {
93
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
94
+ textColor: "neutral800",
95
+ children: locale.id
96
+ })
97
+ }),
98
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Td, {
99
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
100
+ textColor: "neutral800",
101
+ children: locale.name
102
+ })
103
+ }),
104
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Td, {
105
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
106
+ textColor: "neutral800",
107
+ children: locale.isDefault ? formatMessage({
108
+ id: getTranslation.getTranslation('Settings.locales.default'),
109
+ defaultMessage: 'Default'
110
+ }) : null
111
+ })
112
+ }),
113
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Td, {
114
+ children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
115
+ gap: 1,
116
+ justifyContent: "flex-end",
117
+ onClick: (e)=>e.stopPropagation(),
118
+ children: [
119
+ canUpdate && /*#__PURE__*/ jsxRuntime.jsx(EditLocale.EditLocale, {
120
+ ...locale
121
+ }),
122
+ canDelete && !locale.isDefault && /*#__PURE__*/ jsxRuntime.jsx(DeleteLocale.DeleteLocale, {
123
+ ...locale
124
+ })
125
+ ]
126
+ })
127
+ })
128
+ ]
129
+ }),
130
+ /*#__PURE__*/ jsxRuntime.jsx(EditLocale.EditModal, {
131
+ ...locale,
132
+ onOpenChange: ()=>setEditLocaleId(undefined),
133
+ open: editLocaleId === locale.id
134
+ })
135
+ ]
136
+ }, locale.id))
137
+ })
138
+ ]
139
+ });
140
+ };
141
+
142
+ exports.LocaleTable = LocaleTable;
143
+ //# sourceMappingURL=LocaleTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocaleTable.js","sources":["../../../admin/src/components/LocaleTable.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport {\n Flex,\n Table,\n Tbody,\n Td,\n Th,\n Thead,\n Tr,\n Typography,\n VisuallyHidden,\n} from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\n\nimport { getTranslation } from '../utils/getTranslation';\n\nimport { DeleteLocale } from './DeleteLocale';\nimport { EditLocale, EditModal } from './EditLocale';\n\nimport type { Locale } from '../../../shared/contracts/locales';\n\n/* -------------------------------------------------------------------------------------------------\n * LocaleTable\n * -----------------------------------------------------------------------------------------------*/\n\ntype LocaleTableProps = {\n locales?: Locale[];\n canDelete?: boolean;\n canUpdate?: boolean;\n onDeleteLocale?: (locale: Locale) => void;\n onEditLocale?: (locale: Locale) => void;\n};\n\nconst LocaleTable = ({ locales = [], canDelete, canUpdate }: LocaleTableProps) => {\n const [editLocaleId, setEditLocaleId] = React.useState<Locale['id']>();\n const { formatMessage } = useIntl();\n\n const handleClick = (localeId: Locale['id']) => () => {\n if (canUpdate) {\n setEditLocaleId(localeId);\n }\n };\n\n return (\n <Table colCount={4} rowCount={locales.length + 1}>\n <Thead>\n <Tr>\n <Th>\n <Typography variant=\"sigma\" textColor=\"neutral600\">\n {formatMessage({\n id: getTranslation('Settings.locales.row.id'),\n defaultMessage: 'ID',\n })}\n </Typography>\n </Th>\n <Th>\n <Typography variant=\"sigma\" textColor=\"neutral600\">\n {formatMessage({\n id: getTranslation('Settings.locales.row.displayName'),\n defaultMessage: 'Display name',\n })}\n </Typography>\n </Th>\n <Th>\n <Typography variant=\"sigma\" textColor=\"neutral600\">\n {formatMessage({\n id: getTranslation('Settings.locales.row.default-locale'),\n defaultMessage: 'Default locale',\n })}\n </Typography>\n </Th>\n <Th>\n <VisuallyHidden>Actions</VisuallyHidden>\n </Th>\n </Tr>\n </Thead>\n <Tbody>\n {locales.map((locale) => (\n <React.Fragment key={locale.id}>\n <Tr\n onClick={handleClick(locale.id)}\n style={{ cursor: canUpdate ? 'pointer' : 'default' }}\n >\n <Td>\n <Typography textColor=\"neutral800\">{locale.id}</Typography>\n </Td>\n <Td>\n <Typography textColor=\"neutral800\">{locale.name}</Typography>\n </Td>\n <Td>\n <Typography textColor=\"neutral800\">\n {locale.isDefault\n ? formatMessage({\n id: getTranslation('Settings.locales.default'),\n defaultMessage: 'Default',\n })\n : null}\n </Typography>\n </Td>\n <Td>\n <Flex gap={1} justifyContent=\"flex-end\" onClick={(e) => e.stopPropagation()}>\n {canUpdate && <EditLocale {...locale} />}\n {canDelete && !locale.isDefault && <DeleteLocale {...locale} />}\n </Flex>\n </Td>\n </Tr>\n <EditModal\n {...locale}\n onOpenChange={() => setEditLocaleId(undefined)}\n open={editLocaleId === locale.id}\n />\n </React.Fragment>\n ))}\n </Tbody>\n </Table>\n );\n};\n\nexport { LocaleTable };\nexport type { LocaleTableProps };\n"],"names":["LocaleTable","locales","canDelete","canUpdate","editLocaleId","setEditLocaleId","React","useState","formatMessage","useIntl","handleClick","localeId","_jsxs","Table","colCount","rowCount","length","_jsx","Thead","Tr","Th","Typography","variant","textColor","id","getTranslation","defaultMessage","VisuallyHidden","Tbody","map","locale","Fragment","onClick","style","cursor","Td","name","isDefault","Flex","gap","justifyContent","e","stopPropagation","EditLocale","DeleteLocale","EditModal","onOpenChange","undefined","open"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCMA,MAAAA,WAAAA,GAAc,CAAC,EAAEC,OAAAA,GAAU,EAAE,EAAEC,SAAS,EAAEC,SAAS,EAAoB,GAAA;AAC3E,IAAA,MAAM,CAACC,YAAAA,EAAcC,eAAgB,CAAA,GAAGC,iBAAMC,QAAQ,EAAA;IACtD,MAAM,EAAEC,aAAa,EAAE,GAAGC,iBAAAA,EAAAA;IAE1B,MAAMC,WAAAA,GAAc,CAACC,QAA2B,GAAA,IAAA;AAC9C,YAAA,IAAIR,SAAW,EAAA;gBACbE,eAAgBM,CAAAA,QAAAA,CAAAA;AAClB;AACF,SAAA;AAEA,IAAA,qBACEC,eAACC,CAAAA,kBAAAA,EAAAA;QAAMC,QAAU,EAAA,CAAA;QAAGC,QAAUd,EAAAA,OAAAA,CAAQe,MAAM,GAAG,CAAA;;0BAC7CC,cAACC,CAAAA,kBAAAA,EAAAA;AACC,gBAAA,QAAA,gBAAAN,eAACO,CAAAA,eAAAA,EAAAA;;sCACCF,cAACG,CAAAA,eAAAA,EAAAA;AACC,4BAAA,QAAA,gBAAAH,cAACI,CAAAA,uBAAAA,EAAAA;gCAAWC,OAAQ,EAAA,OAAA;gCAAQC,SAAU,EAAA,YAAA;0CACnCf,aAAc,CAAA;AACbgB,oCAAAA,EAAAA,EAAIC,6BAAe,CAAA,yBAAA,CAAA;oCACnBC,cAAgB,EAAA;AAClB,iCAAA;;;sCAGJT,cAACG,CAAAA,eAAAA,EAAAA;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O,4CAAAA,QAAAA,EAAAA,MAAAA,CAAOM;;;kDAE7CnB,cAACkB,CAAAA,eAAAA,EAAAA;AACC,wCAAA,QAAA,gBAAAlB,cAACI,CAAAA,uBAAAA,EAAAA;4CAAWE,SAAU,EAAA,YAAA;sDACnBO,MAAOO,CAAAA,SAAS,GACb7B,aAAc,CAAA;AACZgB,gDAAAA,EAAAA,EAAIC,6BAAe,CAAA,0BAAA,CAAA;gDACnBC,cAAgB,EAAA;6CAElB,CAAA,GAAA;;;kDAGRT,cAACkB,CAAAA,eAAAA,EAAAA;AACC,wCAAA,QAAA,gBAAAvB,eAAC0B,CAAAA,iBAAAA,EAAAA;4CAAKC,GAAK,EAAA,CAAA;4CAAGC,cAAe,EAAA,UAAA;4CAAWR,OAAS,EAAA,CAACS,CAAMA,GAAAA,CAAAA,CAAEC,eAAe,EAAA;;AACtEvC,gDAAAA,SAAAA,kBAAac,cAAC0B,CAAAA,qBAAAA,EAAAA;AAAY,oDAAA,GAAGb;;AAC7B5B,gDAAAA,SAAAA,IAAa,CAAC4B,MAAAA,CAAOO,SAAS,kBAAIpB,cAAC2B,CAAAA,yBAAAA,EAAAA;AAAc,oDAAA,GAAGd;;;;;;;0CAI3Db,cAAC4B,CAAAA,oBAAAA,EAAAA;AACE,gCAAA,GAAGf,MAAM;AACVgB,gCAAAA,YAAAA,EAAc,IAAMzC,eAAgB0C,CAAAA,SAAAA,CAAAA;gCACpCC,IAAM5C,EAAAA,YAAAA,KAAiB0B,OAAON;;;AA/BbM,qBAAAA,EAAAA,MAAAA,CAAON,EAAE,CAAA;;;;AAsCxC;;;;"}
@@ -0,0 +1,122 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import { Table, Thead, Tr, Th, Typography, VisuallyHidden, Tbody, Td, Flex } from '@strapi/design-system';
4
+ import { useIntl } from 'react-intl';
5
+ import { getTranslation } from '../utils/getTranslation.mjs';
6
+ import { DeleteLocale } from './DeleteLocale.mjs';
7
+ import { EditLocale, EditModal } from './EditLocale.mjs';
8
+
9
+ const LocaleTable = ({ locales = [], canDelete, canUpdate })=>{
10
+ const [editLocaleId, setEditLocaleId] = React.useState();
11
+ const { formatMessage } = useIntl();
12
+ const handleClick = (localeId)=>()=>{
13
+ if (canUpdate) {
14
+ setEditLocaleId(localeId);
15
+ }
16
+ };
17
+ return /*#__PURE__*/ jsxs(Table, {
18
+ colCount: 4,
19
+ rowCount: locales.length + 1,
20
+ children: [
21
+ /*#__PURE__*/ jsx(Thead, {
22
+ children: /*#__PURE__*/ jsxs(Tr, {
23
+ children: [
24
+ /*#__PURE__*/ jsx(Th, {
25
+ children: /*#__PURE__*/ jsx(Typography, {
26
+ variant: "sigma",
27
+ textColor: "neutral600",
28
+ children: formatMessage({
29
+ id: getTranslation('Settings.locales.row.id'),
30
+ defaultMessage: 'ID'
31
+ })
32
+ })
33
+ }),
34
+ /*#__PURE__*/ jsx(Th, {
35
+ children: /*#__PURE__*/ jsx(Typography, {
36
+ variant: "sigma",
37
+ textColor: "neutral600",
38
+ children: formatMessage({
39
+ id: getTranslation('Settings.locales.row.displayName'),
40
+ defaultMessage: 'Display name'
41
+ })
42
+ })
43
+ }),
44
+ /*#__PURE__*/ jsx(Th, {
45
+ children: /*#__PURE__*/ jsx(Typography, {
46
+ variant: "sigma",
47
+ textColor: "neutral600",
48
+ children: formatMessage({
49
+ id: getTranslation('Settings.locales.row.default-locale'),
50
+ defaultMessage: 'Default locale'
51
+ })
52
+ })
53
+ }),
54
+ /*#__PURE__*/ jsx(Th, {
55
+ children: /*#__PURE__*/ jsx(VisuallyHidden, {
56
+ children: "Actions"
57
+ })
58
+ })
59
+ ]
60
+ })
61
+ }),
62
+ /*#__PURE__*/ jsx(Tbody, {
63
+ children: locales.map((locale)=>/*#__PURE__*/ jsxs(React.Fragment, {
64
+ children: [
65
+ /*#__PURE__*/ jsxs(Tr, {
66
+ onClick: handleClick(locale.id),
67
+ style: {
68
+ cursor: canUpdate ? 'pointer' : 'default'
69
+ },
70
+ children: [
71
+ /*#__PURE__*/ jsx(Td, {
72
+ children: /*#__PURE__*/ jsx(Typography, {
73
+ textColor: "neutral800",
74
+ children: locale.id
75
+ })
76
+ }),
77
+ /*#__PURE__*/ jsx(Td, {
78
+ children: /*#__PURE__*/ jsx(Typography, {
79
+ textColor: "neutral800",
80
+ children: locale.name
81
+ })
82
+ }),
83
+ /*#__PURE__*/ jsx(Td, {
84
+ children: /*#__PURE__*/ jsx(Typography, {
85
+ textColor: "neutral800",
86
+ children: locale.isDefault ? formatMessage({
87
+ id: getTranslation('Settings.locales.default'),
88
+ defaultMessage: 'Default'
89
+ }) : null
90
+ })
91
+ }),
92
+ /*#__PURE__*/ jsx(Td, {
93
+ children: /*#__PURE__*/ jsxs(Flex, {
94
+ gap: 1,
95
+ justifyContent: "flex-end",
96
+ onClick: (e)=>e.stopPropagation(),
97
+ children: [
98
+ canUpdate && /*#__PURE__*/ jsx(EditLocale, {
99
+ ...locale
100
+ }),
101
+ canDelete && !locale.isDefault && /*#__PURE__*/ jsx(DeleteLocale, {
102
+ ...locale
103
+ })
104
+ ]
105
+ })
106
+ })
107
+ ]
108
+ }),
109
+ /*#__PURE__*/ jsx(EditModal, {
110
+ ...locale,
111
+ onOpenChange: ()=>setEditLocaleId(undefined),
112
+ open: editLocaleId === locale.id
113
+ })
114
+ ]
115
+ }, locale.id))
116
+ })
117
+ ]
118
+ });
119
+ };
120
+
121
+ export { LocaleTable };
122
+ //# sourceMappingURL=LocaleTable.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocaleTable.mjs","sources":["../../../admin/src/components/LocaleTable.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport {\n Flex,\n Table,\n Tbody,\n Td,\n Th,\n Thead,\n Tr,\n Typography,\n VisuallyHidden,\n} from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\n\nimport { getTranslation } from '../utils/getTranslation';\n\nimport { DeleteLocale } from './DeleteLocale';\nimport { EditLocale, EditModal } from './EditLocale';\n\nimport type { Locale } from '../../../shared/contracts/locales';\n\n/* -------------------------------------------------------------------------------------------------\n * LocaleTable\n * -----------------------------------------------------------------------------------------------*/\n\ntype LocaleTableProps = {\n locales?: Locale[];\n canDelete?: boolean;\n canUpdate?: boolean;\n onDeleteLocale?: (locale: Locale) => void;\n onEditLocale?: (locale: Locale) => void;\n};\n\nconst LocaleTable = ({ locales = [], canDelete, canUpdate }: LocaleTableProps) => {\n const [editLocaleId, setEditLocaleId] = React.useState<Locale['id']>();\n const { formatMessage } = useIntl();\n\n const handleClick = (localeId: Locale['id']) => () => {\n if (canUpdate) {\n setEditLocaleId(localeId);\n }\n };\n\n return (\n <Table colCount={4} rowCount={locales.length + 1}>\n <Thead>\n <Tr>\n <Th>\n <Typography variant=\"sigma\" textColor=\"neutral600\">\n {formatMessage({\n id: getTranslation('Settings.locales.row.id'),\n defaultMessage: 'ID',\n })}\n </Typography>\n </Th>\n <Th>\n <Typography variant=\"sigma\" textColor=\"neutral600\">\n {formatMessage({\n id: getTranslation('Settings.locales.row.displayName'),\n defaultMessage: 'Display name',\n })}\n </Typography>\n </Th>\n <Th>\n <Typography variant=\"sigma\" textColor=\"neutral600\">\n {formatMessage({\n id: getTranslation('Settings.locales.row.default-locale'),\n defaultMessage: 'Default locale',\n })}\n </Typography>\n </Th>\n <Th>\n <VisuallyHidden>Actions</VisuallyHidden>\n </Th>\n </Tr>\n </Thead>\n <Tbody>\n {locales.map((locale) => (\n <React.Fragment key={locale.id}>\n <Tr\n onClick={handleClick(locale.id)}\n style={{ cursor: canUpdate ? 'pointer' : 'default' }}\n >\n <Td>\n <Typography textColor=\"neutral800\">{locale.id}</Typography>\n </Td>\n <Td>\n <Typography textColor=\"neutral800\">{locale.name}</Typography>\n </Td>\n <Td>\n <Typography textColor=\"neutral800\">\n {locale.isDefault\n ? formatMessage({\n id: getTranslation('Settings.locales.default'),\n defaultMessage: 'Default',\n })\n : null}\n </Typography>\n </Td>\n <Td>\n <Flex gap={1} justifyContent=\"flex-end\" onClick={(e) => e.stopPropagation()}>\n {canUpdate && <EditLocale {...locale} />}\n {canDelete && !locale.isDefault && <DeleteLocale {...locale} />}\n </Flex>\n </Td>\n </Tr>\n <EditModal\n {...locale}\n onOpenChange={() => setEditLocaleId(undefined)}\n open={editLocaleId === locale.id}\n />\n </React.Fragment>\n ))}\n </Tbody>\n </Table>\n );\n};\n\nexport { LocaleTable };\nexport type { LocaleTableProps };\n"],"names":["LocaleTable","locales","canDelete","canUpdate","editLocaleId","setEditLocaleId","React","useState","formatMessage","useIntl","handleClick","localeId","_jsxs","Table","colCount","rowCount","length","_jsx","Thead","Tr","Th","Typography","variant","textColor","id","getTranslation","defaultMessage","VisuallyHidden","Tbody","map","locale","Fragment","onClick","style","cursor","Td","name","isDefault","Flex","gap","justifyContent","e","stopPropagation","EditLocale","DeleteLocale","EditModal","onOpenChange","undefined","open"],"mappings":";;;;;;;;AAkCMA,MAAAA,WAAAA,GAAc,CAAC,EAAEC,OAAAA,GAAU,EAAE,EAAEC,SAAS,EAAEC,SAAS,EAAoB,GAAA;AAC3E,IAAA,MAAM,CAACC,YAAAA,EAAcC,eAAgB,CAAA,GAAGC,MAAMC,QAAQ,EAAA;IACtD,MAAM,EAAEC,aAAa,EAAE,GAAGC,OAAAA,EAAAA;IAE1B,MAAMC,WAAAA,GAAc,CAACC,QAA2B,GAAA,IAAA;AAC9C,YAAA,IAAIR,SAAW,EAAA;gBACbE,eAAgBM,CAAAA,QAAAA,CAAAA;AAClB;AACF,SAAA;AAEA,IAAA,qBACEC,IAACC,CAAAA,KAAAA,EAAAA;QAAMC,QAAU,EAAA,CAAA;QAAGC,QAAUd,EAAAA,OAAAA,CAAQe,MAAM,GAAG,CAAA;;0BAC7CC,GAACC,CAAAA,KAAAA,EAAAA;AACC,gBAAA,QAAA,gBAAAN,IAACO,CAAAA,EAAAA,EAAAA;;sCACCF,GAACG,CAAAA,EAAAA,EAAAA;AACC,4BAAA,QAAA,gBAAAH,GAACI,C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