@strapi/i18n 0.0.0-next.c823b10e981295994d8b0733c78fa065aec064ee → 0.0.0-next.cb374d6b06692607bcfbd4d5131bafd4c990aa29

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 (458) 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 +995 -0
  6. package/dist/admin/components/CMHeaderActions.js.map +1 -0
  7. package/dist/admin/components/CMHeaderActions.mjs +969 -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 +399 -0
  18. package/dist/admin/components/CreateLocale.js.map +1 -0
  19. package/dist/admin/components/CreateLocale.mjs +373 -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/useAILocalizationJobsPolling.js +110 -0
  58. package/dist/admin/hooks/useAILocalizationJobsPolling.js.map +1 -0
  59. package/dist/admin/hooks/useAILocalizationJobsPolling.mjs +89 -0
  60. package/dist/admin/hooks/useAILocalizationJobsPolling.mjs.map +1 -0
  61. package/dist/admin/hooks/useI18n.js +78 -0
  62. package/dist/admin/hooks/useI18n.js.map +1 -0
  63. package/dist/admin/hooks/useI18n.mjs +57 -0
  64. package/dist/admin/hooks/useI18n.mjs.map +1 -0
  65. package/dist/admin/index.js +226 -5
  66. package/dist/admin/index.js.map +1 -1
  67. package/dist/admin/index.mjs +202 -5
  68. package/dist/admin/index.mjs.map +1 -1
  69. package/dist/admin/middlewares/extendCTBAttributeInitialData.js +71 -0
  70. package/dist/admin/middlewares/extendCTBAttributeInitialData.js.map +1 -0
  71. package/dist/admin/middlewares/extendCTBAttributeInitialData.mjs +69 -0
  72. package/dist/admin/middlewares/extendCTBAttributeInitialData.mjs.map +1 -0
  73. package/dist/admin/middlewares/extendCTBInitialData.js +40 -0
  74. package/dist/admin/middlewares/extendCTBInitialData.js.map +1 -0
  75. package/dist/admin/middlewares/extendCTBInitialData.mjs +38 -0
  76. package/dist/admin/middlewares/extendCTBInitialData.mjs.map +1 -0
  77. package/dist/admin/middlewares/rbac-middleware.js +49 -0
  78. package/dist/admin/middlewares/rbac-middleware.js.map +1 -0
  79. package/dist/admin/middlewares/rbac-middleware.mjs +28 -0
  80. package/dist/admin/middlewares/rbac-middleware.mjs.map +1 -0
  81. package/dist/admin/pages/SettingsPage.js +182 -0
  82. package/dist/admin/pages/SettingsPage.js.map +1 -0
  83. package/dist/admin/pages/SettingsPage.mjs +179 -0
  84. package/dist/admin/pages/SettingsPage.mjs.map +1 -0
  85. package/dist/admin/pluginId.js +6 -0
  86. package/dist/admin/pluginId.js.map +1 -0
  87. package/dist/admin/pluginId.mjs +4 -0
  88. package/dist/admin/pluginId.mjs.map +1 -0
  89. package/dist/admin/services/aiLocalizationJobs.js +26 -0
  90. package/dist/admin/services/aiLocalizationJobs.js.map +1 -0
  91. package/dist/admin/services/aiLocalizationJobs.mjs +24 -0
  92. package/dist/admin/services/aiLocalizationJobs.mjs.map +1 -0
  93. package/dist/admin/services/api.js +15 -0
  94. package/dist/admin/services/api.js.map +1 -0
  95. package/dist/admin/services/api.mjs +13 -0
  96. package/dist/admin/services/api.mjs.map +1 -0
  97. package/dist/admin/services/locales.js +72 -0
  98. package/dist/admin/services/locales.js.map +1 -0
  99. package/dist/admin/services/locales.mjs +66 -0
  100. package/dist/admin/services/locales.mjs.map +1 -0
  101. package/dist/admin/services/relations.js +23 -0
  102. package/dist/admin/services/relations.js.map +1 -0
  103. package/dist/admin/services/relations.mjs +21 -0
  104. package/dist/admin/services/relations.mjs.map +1 -0
  105. package/dist/admin/services/settings.js +30 -0
  106. package/dist/admin/services/settings.js.map +1 -0
  107. package/dist/admin/services/settings.mjs +27 -0
  108. package/dist/admin/services/settings.mjs.map +1 -0
  109. package/dist/admin/src/components/CMHeaderActions.d.ts +18 -5
  110. package/dist/admin/src/components/LocaleListCell.d.ts +5 -4
  111. package/dist/admin/src/components/tests/CreateLocale.test.d.ts +1 -0
  112. package/dist/admin/src/components/tests/DeleteLocale.test.d.ts +1 -0
  113. package/dist/admin/src/components/tests/EditLocale.test.d.ts +1 -0
  114. package/dist/admin/src/components/tests/LocaleListCell.test.d.ts +1 -0
  115. package/dist/admin/src/contentReleasesHooks/releaseDetailsView.d.ts +1 -1
  116. package/dist/admin/src/hooks/useAILocalizationJobsPolling.d.ts +9 -0
  117. package/dist/admin/src/pages/tests/SettingsPage.test.d.ts +1 -0
  118. package/dist/admin/src/services/aiLocalizationJobs.d.ts +6 -0
  119. package/dist/admin/src/services/api.d.ts +1 -1
  120. package/dist/admin/src/services/locales.d.ts +1 -1
  121. package/dist/admin/src/services/relations.d.ts +1 -1
  122. package/dist/admin/src/services/settings.d.ts +5 -0
  123. package/dist/admin/src/utils/schemas.d.ts +642 -16
  124. package/dist/admin/tests/server.d.ts +1 -0
  125. package/dist/admin/tests/utils.d.ts +6 -0
  126. package/dist/admin/translations/de.json.js +66 -0
  127. package/dist/admin/translations/de.json.js.map +1 -0
  128. package/dist/admin/translations/de.json.mjs +64 -0
  129. package/dist/admin/translations/de.json.mjs.map +1 -0
  130. package/dist/admin/translations/dk.json.js +66 -0
  131. package/dist/admin/translations/dk.json.js.map +1 -0
  132. package/dist/admin/translations/dk.json.mjs +64 -0
  133. package/dist/admin/translations/dk.json.mjs.map +1 -0
  134. package/dist/admin/translations/en.json.js +91 -0
  135. package/dist/admin/translations/en.json.js.map +1 -0
  136. package/dist/admin/translations/en.json.mjs +89 -0
  137. package/dist/admin/translations/en.json.mjs.map +1 -0
  138. package/dist/admin/translations/es.json.js +66 -0
  139. package/dist/admin/translations/es.json.js.map +1 -0
  140. package/dist/admin/translations/es.json.mjs +64 -0
  141. package/dist/admin/translations/es.json.mjs.map +1 -0
  142. package/dist/admin/translations/fr.json.js +66 -0
  143. package/dist/admin/translations/fr.json.js.map +1 -0
  144. package/dist/admin/translations/fr.json.mjs +64 -0
  145. package/dist/admin/translations/fr.json.mjs.map +1 -0
  146. package/dist/admin/translations/ko.json.js +65 -0
  147. package/dist/admin/translations/ko.json.js.map +1 -0
  148. package/dist/admin/translations/ko.json.mjs +63 -0
  149. package/dist/admin/translations/ko.json.mjs.map +1 -0
  150. package/dist/admin/translations/pl.json.js +66 -0
  151. package/dist/admin/translations/pl.json.js.map +1 -0
  152. package/dist/admin/translations/pl.json.mjs +64 -0
  153. package/dist/admin/translations/pl.json.mjs.map +1 -0
  154. package/dist/admin/translations/ru.json.js +68 -0
  155. package/dist/admin/translations/ru.json.js.map +1 -0
  156. package/dist/admin/translations/ru.json.mjs +66 -0
  157. package/dist/admin/translations/ru.json.mjs.map +1 -0
  158. package/dist/admin/translations/tr.json.js +66 -0
  159. package/dist/admin/translations/tr.json.js.map +1 -0
  160. package/dist/admin/translations/tr.json.mjs +64 -0
  161. package/dist/admin/translations/tr.json.mjs.map +1 -0
  162. package/dist/admin/translations/uk.json.js +82 -0
  163. package/dist/admin/translations/uk.json.js.map +1 -0
  164. package/dist/admin/translations/uk.json.mjs +80 -0
  165. package/dist/admin/translations/uk.json.mjs.map +1 -0
  166. package/dist/admin/translations/zh-Hans.json.js +57 -0
  167. package/dist/admin/translations/zh-Hans.json.js.map +1 -0
  168. package/dist/admin/translations/zh-Hans.json.mjs +55 -0
  169. package/dist/admin/translations/zh-Hans.json.mjs.map +1 -0
  170. package/dist/admin/translations/zh.json.js +66 -0
  171. package/dist/admin/translations/zh.json.js.map +1 -0
  172. package/dist/admin/translations/zh.json.mjs +64 -0
  173. package/dist/admin/translations/zh.json.mjs.map +1 -0
  174. package/dist/admin/utils/baseQuery.js +8 -0
  175. package/dist/admin/utils/baseQuery.js.map +1 -0
  176. package/dist/admin/utils/baseQuery.mjs +6 -0
  177. package/dist/admin/utils/baseQuery.mjs.map +1 -0
  178. package/dist/admin/utils/clean.js +70 -0
  179. package/dist/admin/utils/clean.js.map +1 -0
  180. package/dist/admin/utils/clean.mjs +68 -0
  181. package/dist/admin/utils/clean.mjs.map +1 -0
  182. package/dist/admin/utils/fields.js +34 -0
  183. package/dist/admin/utils/fields.js.map +1 -0
  184. package/dist/admin/utils/fields.mjs +31 -0
  185. package/dist/admin/utils/fields.mjs.map +1 -0
  186. package/dist/admin/utils/getTranslation.js +8 -0
  187. package/dist/admin/utils/getTranslation.js.map +1 -0
  188. package/dist/admin/utils/getTranslation.mjs +6 -0
  189. package/dist/admin/utils/getTranslation.mjs.map +1 -0
  190. package/dist/admin/utils/prefixPluginTranslations.js +11 -0
  191. package/dist/admin/utils/prefixPluginTranslations.js.map +1 -0
  192. package/dist/admin/utils/prefixPluginTranslations.mjs +9 -0
  193. package/dist/admin/utils/prefixPluginTranslations.mjs.map +1 -0
  194. package/dist/admin/utils/schemas.js +74 -0
  195. package/dist/admin/utils/schemas.js.map +1 -0
  196. package/dist/admin/utils/schemas.mjs +72 -0
  197. package/dist/admin/utils/schemas.mjs.map +1 -0
  198. package/dist/admin/utils/strings.js +6 -0
  199. package/dist/admin/utils/strings.js.map +1 -0
  200. package/dist/admin/utils/strings.mjs +4 -0
  201. package/dist/admin/utils/strings.mjs.map +1 -0
  202. package/dist/server/bootstrap.js +95 -0
  203. package/dist/server/bootstrap.js.map +1 -0
  204. package/dist/server/bootstrap.mjs +93 -0
  205. package/dist/server/bootstrap.mjs.map +1 -0
  206. package/dist/server/constants/index.js +29 -0
  207. package/dist/server/constants/index.js.map +1 -0
  208. package/dist/server/constants/index.mjs +25 -0
  209. package/dist/server/constants/index.mjs.map +1 -0
  210. package/dist/server/constants/iso-locales.json.js +2427 -0
  211. package/dist/server/constants/iso-locales.json.js.map +1 -0
  212. package/dist/server/constants/iso-locales.json.mjs +2425 -0
  213. package/dist/server/constants/iso-locales.json.mjs.map +1 -0
  214. package/dist/server/content-types/index.js +10 -0
  215. package/dist/server/content-types/index.js.map +1 -0
  216. package/dist/server/content-types/index.mjs +8 -0
  217. package/dist/server/content-types/index.mjs.map +1 -0
  218. package/dist/server/content-types/locale/index.js +10 -0
  219. package/dist/server/content-types/locale/index.js.map +1 -0
  220. package/dist/server/content-types/locale/index.mjs +8 -0
  221. package/dist/server/content-types/locale/index.mjs.map +1 -0
  222. package/dist/server/content-types/locale/schema.json.js +46 -0
  223. package/dist/server/content-types/locale/schema.json.js.map +1 -0
  224. package/dist/server/content-types/locale/schema.json.mjs +38 -0
  225. package/dist/server/content-types/locale/schema.json.mjs.map +1 -0
  226. package/dist/server/controllers/ai-localization-jobs.js +47 -0
  227. package/dist/server/controllers/ai-localization-jobs.js.map +1 -0
  228. package/dist/server/controllers/ai-localization-jobs.mjs +45 -0
  229. package/dist/server/controllers/ai-localization-jobs.mjs.map +1 -0
  230. package/dist/server/controllers/content-types.js +76 -0
  231. package/dist/server/controllers/content-types.js.map +1 -0
  232. package/dist/server/controllers/content-types.mjs +74 -0
  233. package/dist/server/controllers/content-types.mjs.map +1 -0
  234. package/dist/server/controllers/index.js +18 -0
  235. package/dist/server/controllers/index.js.map +1 -0
  236. package/dist/server/controllers/index.mjs +16 -0
  237. package/dist/server/controllers/index.mjs.map +1 -0
  238. package/dist/server/controllers/iso-locales.js +13 -0
  239. package/dist/server/controllers/iso-locales.js.map +1 -0
  240. package/dist/server/controllers/iso-locales.mjs +11 -0
  241. package/dist/server/controllers/iso-locales.mjs.map +1 -0
  242. package/dist/server/controllers/locales.js +108 -0
  243. package/dist/server/controllers/locales.js.map +1 -0
  244. package/dist/server/controllers/locales.mjs +87 -0
  245. package/dist/server/controllers/locales.mjs.map +1 -0
  246. package/dist/server/controllers/settings.js +24 -0
  247. package/dist/server/controllers/settings.js.map +1 -0
  248. package/dist/server/controllers/settings.mjs +22 -0
  249. package/dist/server/controllers/settings.mjs.map +1 -0
  250. package/dist/server/controllers/validate-locale-creation.js +47 -0
  251. package/dist/server/controllers/validate-locale-creation.js.map +1 -0
  252. package/dist/server/controllers/validate-locale-creation.mjs +45 -0
  253. package/dist/server/controllers/validate-locale-creation.mjs.map +1 -0
  254. package/dist/server/domain/locale.js +11 -0
  255. package/dist/server/domain/locale.js.map +1 -0
  256. package/dist/server/domain/locale.mjs +9 -0
  257. package/dist/server/domain/locale.mjs.map +1 -0
  258. package/dist/server/graphql.js +115 -0
  259. package/dist/server/graphql.js.map +1 -0
  260. package/dist/server/graphql.mjs +113 -0
  261. package/dist/server/graphql.mjs.map +1 -0
  262. package/dist/server/index.js +18 -3453
  263. package/dist/server/index.js.map +1 -1
  264. package/dist/server/index.mjs +17 -3435
  265. package/dist/server/index.mjs.map +1 -1
  266. package/dist/server/models/ai-localization-job.js +60 -0
  267. package/dist/server/models/ai-localization-job.js.map +1 -0
  268. package/dist/server/models/ai-localization-job.mjs +57 -0
  269. package/dist/server/models/ai-localization-job.mjs.map +1 -0
  270. package/dist/server/register.js +81 -0
  271. package/dist/server/register.js.map +1 -0
  272. package/dist/server/register.mjs +79 -0
  273. package/dist/server/register.mjs.map +1 -0
  274. package/dist/server/routes/admin.js +142 -0
  275. package/dist/server/routes/admin.js.map +1 -0
  276. package/dist/server/routes/admin.mjs +140 -0
  277. package/dist/server/routes/admin.mjs.map +1 -0
  278. package/dist/server/routes/content-api.js +19 -0
  279. package/dist/server/routes/content-api.js.map +1 -0
  280. package/dist/server/routes/content-api.mjs +17 -0
  281. package/dist/server/routes/content-api.mjs.map +1 -0
  282. package/dist/server/routes/index.js +12 -0
  283. package/dist/server/routes/index.js.map +1 -0
  284. package/dist/server/routes/index.mjs +10 -0
  285. package/dist/server/routes/index.mjs.map +1 -0
  286. package/dist/server/routes/validation/locale.js +57 -0
  287. package/dist/server/routes/validation/locale.js.map +1 -0
  288. package/dist/server/routes/validation/locale.mjs +36 -0
  289. package/dist/server/routes/validation/locale.mjs.map +1 -0
  290. package/dist/server/services/ai-localization-jobs.js +64 -0
  291. package/dist/server/services/ai-localization-jobs.js.map +1 -0
  292. package/dist/server/services/ai-localization-jobs.mjs +62 -0
  293. package/dist/server/services/ai-localization-jobs.mjs.map +1 -0
  294. package/dist/server/services/ai-localizations.js +268 -0
  295. package/dist/server/services/ai-localizations.js.map +1 -0
  296. package/dist/server/services/ai-localizations.mjs +266 -0
  297. package/dist/server/services/ai-localizations.mjs.map +1 -0
  298. package/dist/server/services/content-types.js +157 -0
  299. package/dist/server/services/content-types.js.map +1 -0
  300. package/dist/server/services/content-types.mjs +155 -0
  301. package/dist/server/services/content-types.mjs.map +1 -0
  302. package/dist/server/services/index.js +28 -0
  303. package/dist/server/services/index.js.map +1 -0
  304. package/dist/server/services/index.mjs +26 -0
  305. package/dist/server/services/index.mjs.map +1 -0
  306. package/dist/server/services/iso-locales.js +12 -0
  307. package/dist/server/services/iso-locales.js.map +1 -0
  308. package/dist/server/services/iso-locales.mjs +10 -0
  309. package/dist/server/services/iso-locales.mjs.map +1 -0
  310. package/dist/server/services/locales.js +114 -0
  311. package/dist/server/services/locales.js.map +1 -0
  312. package/dist/server/services/locales.mjs +112 -0
  313. package/dist/server/services/locales.mjs.map +1 -0
  314. package/dist/server/services/localizations.js +68 -0
  315. package/dist/server/services/localizations.js.map +1 -0
  316. package/dist/server/services/localizations.mjs +66 -0
  317. package/dist/server/services/localizations.mjs.map +1 -0
  318. package/dist/server/services/metrics.js +30 -0
  319. package/dist/server/services/metrics.js.map +1 -0
  320. package/dist/server/services/metrics.mjs +28 -0
  321. package/dist/server/services/metrics.mjs.map +1 -0
  322. package/dist/server/services/permissions/actions.js +136 -0
  323. package/dist/server/services/permissions/actions.js.map +1 -0
  324. package/dist/server/services/permissions/actions.mjs +134 -0
  325. package/dist/server/services/permissions/actions.mjs.map +1 -0
  326. package/dist/server/services/permissions/engine.js +52 -0
  327. package/dist/server/services/permissions/engine.js.map +1 -0
  328. package/dist/server/services/permissions/engine.mjs +50 -0
  329. package/dist/server/services/permissions/engine.mjs.map +1 -0
  330. package/dist/server/services/permissions/sections-builder.js +45 -0
  331. package/dist/server/services/permissions/sections-builder.js.map +1 -0
  332. package/dist/server/services/permissions/sections-builder.mjs +43 -0
  333. package/dist/server/services/permissions/sections-builder.mjs.map +1 -0
  334. package/dist/server/services/permissions.js +14 -0
  335. package/dist/server/services/permissions.js.map +1 -0
  336. package/dist/server/services/permissions.mjs +12 -0
  337. package/dist/server/services/permissions.mjs.map +1 -0
  338. package/dist/server/services/sanitize/index.js +34 -0
  339. package/dist/server/services/sanitize/index.js.map +1 -0
  340. package/dist/server/services/sanitize/index.mjs +32 -0
  341. package/dist/server/services/sanitize/index.mjs.map +1 -0
  342. package/dist/server/services/settings.js +25 -0
  343. package/dist/server/services/settings.js.map +1 -0
  344. package/dist/server/services/settings.mjs +23 -0
  345. package/dist/server/services/settings.mjs.map +1 -0
  346. package/dist/server/src/bootstrap.d.ts.map +1 -1
  347. package/dist/server/src/controllers/ai-localization-jobs.d.ts +17 -0
  348. package/dist/server/src/controllers/ai-localization-jobs.d.ts.map +1 -0
  349. package/dist/server/src/controllers/index.d.ts +10 -0
  350. package/dist/server/src/controllers/index.d.ts.map +1 -1
  351. package/dist/server/src/controllers/settings.d.ts +7 -0
  352. package/dist/server/src/controllers/settings.d.ts.map +1 -0
  353. package/dist/server/src/index.d.ts +47 -8
  354. package/dist/server/src/index.d.ts.map +1 -1
  355. package/dist/server/src/models/ai-localization-job.d.ts +5 -0
  356. package/dist/server/src/models/ai-localization-job.d.ts.map +1 -0
  357. package/dist/server/src/models/index.d.ts +5 -0
  358. package/dist/server/src/models/index.d.ts.map +1 -0
  359. package/dist/server/src/register.d.ts +1 -1
  360. package/dist/server/src/register.d.ts.map +1 -1
  361. package/dist/server/src/routes/admin.d.ts.map +1 -1
  362. package/dist/server/src/routes/content-api.d.ts +5 -8
  363. package/dist/server/src/routes/content-api.d.ts.map +1 -1
  364. package/dist/server/src/routes/index.d.ts +3 -7
  365. package/dist/server/src/routes/index.d.ts.map +1 -1
  366. package/dist/server/src/routes/validation/index.d.ts +2 -0
  367. package/dist/server/src/routes/validation/index.d.ts.map +1 -0
  368. package/dist/server/src/routes/validation/locale.d.ts +41 -0
  369. package/dist/server/src/routes/validation/locale.d.ts.map +1 -0
  370. package/dist/server/src/services/ai-localization-jobs.d.ts +26 -0
  371. package/dist/server/src/services/ai-localization-jobs.d.ts.map +1 -0
  372. package/dist/server/src/services/ai-localizations.d.ts +18 -0
  373. package/dist/server/src/services/ai-localizations.d.ts.map +1 -0
  374. package/dist/server/src/services/index.d.ts +33 -0
  375. package/dist/server/src/services/index.d.ts.map +1 -1
  376. package/dist/server/src/services/localizations.d.ts +1 -1
  377. package/dist/server/src/services/localizations.d.ts.map +1 -1
  378. package/dist/server/src/services/settings.d.ts +13 -0
  379. package/dist/server/src/services/settings.d.ts.map +1 -0
  380. package/dist/server/src/utils/index.d.ts +7 -1
  381. package/dist/server/src/utils/index.d.ts.map +1 -1
  382. package/dist/server/src/validation/settings.d.ts +12 -0
  383. package/dist/server/src/validation/settings.d.ts.map +1 -0
  384. package/dist/server/utils/index.js +16 -0
  385. package/dist/server/utils/index.js.map +1 -0
  386. package/dist/server/utils/index.mjs +13 -0
  387. package/dist/server/utils/index.mjs.map +1 -0
  388. package/dist/server/validation/content-types.js +18 -0
  389. package/dist/server/validation/content-types.js.map +1 -0
  390. package/dist/server/validation/content-types.mjs +16 -0
  391. package/dist/server/validation/content-types.mjs.map +1 -0
  392. package/dist/server/validation/locales.js +23 -0
  393. package/dist/server/validation/locales.js.map +1 -0
  394. package/dist/server/validation/locales.mjs +20 -0
  395. package/dist/server/validation/locales.mjs.map +1 -0
  396. package/dist/server/validation/settings.js +11 -0
  397. package/dist/server/validation/settings.js.map +1 -0
  398. package/dist/server/validation/settings.mjs +9 -0
  399. package/dist/server/validation/settings.mjs.map +1 -0
  400. package/dist/shared/contracts/ai-localization-jobs.d.ts +27 -0
  401. package/dist/shared/contracts/ai-localization-jobs.d.ts.map +1 -0
  402. package/dist/shared/contracts/content-manager.d.ts +1 -1
  403. package/dist/shared/contracts/settings.d.ts +40 -0
  404. package/dist/shared/contracts/shared.d.ts +1 -1
  405. package/dist/shared/contracts/shared.d.ts.map +1 -0
  406. package/package.json +22 -17
  407. package/dist/_chunks/SettingsPage-BHvunuIF.mjs +0 -554
  408. package/dist/_chunks/SettingsPage-BHvunuIF.mjs.map +0 -1
  409. package/dist/_chunks/SettingsPage-Bcj7380u.js +0 -574
  410. package/dist/_chunks/SettingsPage-Bcj7380u.js.map +0 -1
  411. package/dist/_chunks/de-9eCAqqrB.mjs +0 -66
  412. package/dist/_chunks/de-9eCAqqrB.mjs.map +0 -1
  413. package/dist/_chunks/de-DtWiGdHl.js +0 -66
  414. package/dist/_chunks/de-DtWiGdHl.js.map +0 -1
  415. package/dist/_chunks/dk-2qBjxt-P.mjs +0 -66
  416. package/dist/_chunks/dk-2qBjxt-P.mjs.map +0 -1
  417. package/dist/_chunks/dk-D8C-casx.js +0 -66
  418. package/dist/_chunks/dk-D8C-casx.js.map +0 -1
  419. package/dist/_chunks/en-BKBz3tro.js +0 -81
  420. package/dist/_chunks/en-BKBz3tro.js.map +0 -1
  421. package/dist/_chunks/en-DlXfy6Gy.mjs +0 -81
  422. package/dist/_chunks/en-DlXfy6Gy.mjs.map +0 -1
  423. package/dist/_chunks/es-DS-XFGSw.js +0 -66
  424. package/dist/_chunks/es-DS-XFGSw.js.map +0 -1
  425. package/dist/_chunks/es-DlmMVaBG.mjs +0 -66
  426. package/dist/_chunks/es-DlmMVaBG.mjs.map +0 -1
  427. package/dist/_chunks/fr-3S6ke71d.mjs +0 -66
  428. package/dist/_chunks/fr-3S6ke71d.mjs.map +0 -1
  429. package/dist/_chunks/fr-BTjekDpq.js +0 -66
  430. package/dist/_chunks/fr-BTjekDpq.js.map +0 -1
  431. package/dist/_chunks/index-BKZbxhpm.js +0 -1637
  432. package/dist/_chunks/index-BKZbxhpm.js.map +0 -1
  433. package/dist/_chunks/index-DUdrr5PR.mjs +0 -1615
  434. package/dist/_chunks/index-DUdrr5PR.mjs.map +0 -1
  435. package/dist/_chunks/ko-DmcGUBQ3.js +0 -65
  436. package/dist/_chunks/ko-DmcGUBQ3.js.map +0 -1
  437. package/dist/_chunks/ko-qTjQ8IMw.mjs +0 -65
  438. package/dist/_chunks/ko-qTjQ8IMw.mjs.map +0 -1
  439. package/dist/_chunks/pl-B67TSHqT.mjs +0 -66
  440. package/dist/_chunks/pl-B67TSHqT.mjs.map +0 -1
  441. package/dist/_chunks/pl-Cn5RYonZ.js +0 -66
  442. package/dist/_chunks/pl-Cn5RYonZ.js.map +0 -1
  443. package/dist/_chunks/ru-BMBgVL3s.js +0 -68
  444. package/dist/_chunks/ru-BMBgVL3s.js.map +0 -1
  445. package/dist/_chunks/ru-hagMa57T.mjs +0 -68
  446. package/dist/_chunks/ru-hagMa57T.mjs.map +0 -1
  447. package/dist/_chunks/tr-CarUU76c.js +0 -66
  448. package/dist/_chunks/tr-CarUU76c.js.map +0 -1
  449. package/dist/_chunks/tr-Dw_jmkG-.mjs +0 -66
  450. package/dist/_chunks/tr-Dw_jmkG-.mjs.map +0 -1
  451. package/dist/_chunks/zh-57YM4amO.mjs +0 -66
  452. package/dist/_chunks/zh-57YM4amO.mjs.map +0 -1
  453. package/dist/_chunks/zh-CukOviB0.js +0 -66
  454. package/dist/_chunks/zh-CukOviB0.js.map +0 -1
  455. package/dist/_chunks/zh-Hans-DSHIXAa3.js +0 -57
  456. package/dist/_chunks/zh-Hans-DSHIXAa3.js.map +0 -1
  457. package/dist/_chunks/zh-Hans-Dyc-aR-h.mjs +0 -57
  458. package/dist/_chunks/zh-Hans-Dyc-aR-h.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CMHeaderActions.mjs","sources":["../../../admin/src/components/CMHeaderActions.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { skipToken } from '@reduxjs/toolkit/query';\nimport {\n useNotification,\n useQueryParams,\n Table,\n useAPIErrorHandler,\n FormErrors,\n useForm,\n} from '@strapi/admin/strapi-admin';\nimport { useAIAvailability } from '@strapi/admin/strapi-admin/ee';\nimport {\n type DocumentActionComponent,\n type DocumentActionProps,\n unstable_useDocument as useDocument,\n unstable_useDocumentActions as useDocumentActions,\n buildValidParams,\n HeaderActionProps,\n} from '@strapi/content-manager/strapi-admin';\nimport {\n Flex,\n Status,\n Typography,\n Button,\n Modal,\n Field,\n SingleSelect,\n SingleSelectOption,\n Dialog,\n type StatusVariant,\n Box,\n Link,\n} from '@strapi/design-system';\nimport { WarningCircle, ListPlus, Trash, Earth, Cross, Plus, Sparkle, Loader } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\nimport { NavLink, useNavigate } from 'react-router-dom';\nimport { styled } from 'styled-components';\n\nimport { useAILocalizationJobsPolling } from '../hooks/useAILocalizationJobsPolling';\nimport { useI18n } from '../hooks/useI18n';\nimport { useGetAILocalizationJobsByDocumentQuery } from '../services/aiLocalizationJobs';\nimport { useGetLocalesQuery } from '../services/locales';\nimport { useGetManyDraftRelationCountQuery } from '../services/relations';\nimport { useGetSettingsQuery } from '../services/settings';\nimport { cleanData } from '../utils/clean';\nimport { getTranslation } from '../utils/getTranslation';\nimport { capitalize } from '../utils/strings';\n\nimport { BulkLocaleActionModal } from './BulkLocaleActionModal';\n\nimport type { Locale } from '../../../shared/contracts/locales';\nimport type { I18nBaseQuery } from '../types';\nimport type { Modules } from '@strapi/types';\n\n/* -------------------------------------------------------------------------------------------------\n * LocalePickerAction\n * -----------------------------------------------------------------------------------------------*/\n\ninterface LocaleOptionProps {\n isDraftAndPublishEnabled: boolean;\n locale: Locale;\n status: 'draft' | 'published' | 'modified';\n entryExists: boolean;\n translationStatus?: 'processing' | 'failed' | 'completed' | undefined;\n}\n\nconst statusVariants: Record<LocaleOptionProps['status'], StatusVariant> = {\n draft: 'secondary',\n published: 'success',\n modified: 'alternative',\n};\n\nconst LocaleOption = ({\n isDraftAndPublishEnabled,\n locale,\n status,\n entryExists,\n}: LocaleOptionProps) => {\n const { formatMessage } = useIntl();\n\n if (!entryExists) {\n return formatMessage(\n {\n id: getTranslation('CMEditViewLocalePicker.locale.create'),\n defaultMessage: 'Create <bold>{locale}</bold> locale',\n },\n {\n bold: (locale: React.ReactNode) => <b>{locale}</b>,\n locale: locale.name,\n }\n );\n }\n\n return (\n <Flex width=\"100%\" gap={1} justifyContent=\"space-between\">\n <Typography>{locale.name}</Typography>\n {isDraftAndPublishEnabled ? (\n <Status\n display=\"flex\"\n paddingLeft=\"6px\"\n paddingRight=\"6px\"\n paddingTop=\"2px\"\n paddingBottom=\"2px\"\n size=\"S\"\n variant={statusVariants[status]}\n >\n <Typography tag=\"span\" variant=\"pi\" fontWeight=\"bold\">\n {capitalize(status)}\n </Typography>\n </Status>\n ) : null}\n </Flex>\n );\n};\n\nconst LocaleOptionStartIcon = ({\n entryWithLocaleExists,\n translationStatus,\n index,\n}: {\n entryWithLocaleExists: boolean;\n translationStatus?: 'processing' | 'failed' | 'completed' | undefined;\n index?: number;\n}) => {\n const isAiAvailable = useAIAvailability();\n\n if (!entryWithLocaleExists) {\n return <Plus />;\n }\n\n if (isAiAvailable && index !== 0 && translationStatus === 'failed') {\n return <WarningCircle fill=\"warning600\" />;\n }\n\n return null;\n};\n\nconst LocalePickerAction = ({\n document,\n meta,\n model,\n collectionType,\n documentId,\n}: HeaderActionProps) => {\n const { formatMessage } = useIntl();\n const [{ query }, setQuery] = useQueryParams<I18nBaseQuery>();\n const { hasI18n, canCreate, canRead } = useI18n();\n const { data: locales = [] } = useGetLocalesQuery();\n const currentDesiredLocale = query.plugins?.i18n?.locale;\n const { schema } = useDocument({\n model,\n collectionType,\n documentId,\n params: { locale: currentDesiredLocale },\n });\n const { data: jobData } = useGetAILocalizationJobsByDocumentQuery({\n documentId: documentId!,\n model: model!,\n collectionType: collectionType!,\n });\n const { data: settings } = useGetSettingsQuery();\n const isAiAvailable = useAIAvailability();\n const setValues = useForm('LocalePickerAction', (state) => state.setValues);\n\n const handleSelect = React.useCallback(\n (value: string) => {\n setQuery(\n {\n plugins: {\n ...query.plugins,\n i18n: {\n locale: value,\n },\n },\n },\n 'push',\n true\n );\n },\n [query.plugins, setQuery]\n );\n\n const nonTranslatedFields = React.useMemo(() => {\n if (!schema?.attributes) return [];\n return Object.keys(schema.attributes).filter((field) => {\n const attribute = schema.attributes[field] as Record<string, unknown>;\n return (attribute?.pluginOptions as any)?.i18n?.localized === false;\n });\n }, [schema?.attributes]);\n\n const sourceLocaleData = React.useMemo(() => {\n if (!Array.isArray(locales) || !meta?.availableLocales) return null;\n\n const defaultLocale = locales.find((locale: Locale) => locale.isDefault);\n const existingLocales = meta.availableLocales.map((loc) => loc.locale);\n\n const sourceLocaleCode =\n defaultLocale &&\n existingLocales.includes(defaultLocale.code) &&\n defaultLocale.code !== currentDesiredLocale\n ? defaultLocale.code\n : existingLocales.find((locale) => locale !== currentDesiredLocale);\n\n if (!sourceLocaleCode) return null;\n\n // Find the document data from availableLocales (now includes non-translatable fields)\n const sourceLocaleDoc = meta.availableLocales.find((loc) => loc.locale === sourceLocaleCode);\n\n return sourceLocaleDoc\n ? { locale: sourceLocaleCode, data: sourceLocaleDoc as Record<string, unknown> }\n : null;\n }, [locales, meta?.availableLocales, currentDesiredLocale]);\n\n /**\n * Prefilling form with non-translatable fields from already existing locale\n */\n React.useEffect(() => {\n // Only run when creating a new locale (no document ID yet) and when we have non-translatable fields\n if (!document?.id && nonTranslatedFields.length > 0 && sourceLocaleData?.data) {\n const dataToSet = nonTranslatedFields.reduce(\n (acc: Record<string, unknown>, field: string) => {\n acc[field] = sourceLocaleData.data[field];\n return acc;\n },\n {}\n );\n\n if (Object.keys(dataToSet).length > 0) {\n setValues(dataToSet);\n }\n }\n }, [document?.id, nonTranslatedFields, sourceLocaleData?.data, setValues]);\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 doesLocaleExist = locales.find((loc) => loc.code === currentDesiredLocale);\n const defaultLocale = locales.find((locale) => locale.isDefault);\n if (!doesLocaleExist && defaultLocale?.code) {\n handleSelect(defaultLocale.code);\n }\n }, [handleSelect, hasI18n, locales, currentDesiredLocale]);\n\n const currentLocale = Array.isArray(locales)\n ? locales.find((locale) => locale.code === currentDesiredLocale)\n : undefined;\n\n // Use meta.availableLocales instead of document.localizations\n // meta.availableLocales contains all locales for the document, even when creating new locales\n const availableLocales = meta?.availableLocales ?? [];\n const documentLocalizations = document?.localizations ?? [];\n\n // Prefer meta.availableLocales as it's more reliable, fallback to document.localizations\n const allLocalizations = availableLocales.length > 0 ? availableLocales : documentLocalizations;\n\n const allCurrentLocales = [\n { status: getDocumentStatus(document, meta), locale: currentLocale?.code },\n ...allLocalizations,\n ];\n\n if (!hasI18n || !Array.isArray(locales) || locales.length === 0) {\n return null;\n }\n\n const displayedLocales = locales.filter((locale) => {\n /**\n * If you can read we allow you to see the locale exists\n * otherwise the locale is hidden.\n */\n return canRead.includes(locale.code);\n });\n\n const localesSortingDefaultFirst = displayedLocales.sort((a, b) =>\n a.isDefault ? -1 : b.isDefault ? 1 : 0\n );\n\n return {\n label: formatMessage({\n id: getTranslation('Settings.locales.modal.locales.label'),\n defaultMessage: 'Locales',\n }),\n options: localesSortingDefaultFirst.map((locale, index) => {\n const entryWithLocaleExists = allCurrentLocales.some((doc) => doc.locale === locale.code);\n\n const currentLocaleDoc = allCurrentLocales.find((doc) =>\n 'locale' in doc ? doc.locale === locale.code : false\n );\n\n const permissionsToCheck = currentLocaleDoc ? canRead : canCreate;\n\n if (isAiAvailable && settings?.data?.aiLocalizations) {\n return {\n _render: () => (\n <React.Fragment key={index}>\n <SingleSelectOption\n disabled={!permissionsToCheck.includes(locale.code)}\n key={locale.code}\n startIcon={\n <LocaleOptionStartIcon\n entryWithLocaleExists={entryWithLocaleExists}\n translationStatus={jobData?.data?.status}\n index={index}\n />\n }\n value={locale.code}\n >\n <LocaleOption\n isDraftAndPublishEnabled={!!schema?.options?.draftAndPublish}\n locale={locale}\n status={currentLocaleDoc?.status}\n entryExists={entryWithLocaleExists}\n />\n </SingleSelectOption>\n {localesSortingDefaultFirst.length > 1 && index === 0 && (\n <Box paddingRight={4} paddingLeft={4} paddingTop={2} paddingBottom={2}>\n <Typography variant=\"sigma\">\n {formatMessage({\n id: getTranslation('CMEditViewLocalePicker.locale.ai-translations'),\n defaultMessage: 'AI Translations',\n })}\n </Typography>\n </Box>\n )}\n </React.Fragment>\n ),\n };\n }\n\n return {\n disabled: !permissionsToCheck.includes(locale.code),\n value: locale.code,\n label: (\n <LocaleOption\n isDraftAndPublishEnabled={!!schema?.options?.draftAndPublish}\n locale={locale}\n status={currentLocaleDoc?.status}\n entryExists={entryWithLocaleExists}\n translationStatus={jobData?.data?.status}\n />\n ),\n startIcon: <LocaleOptionStartIcon entryWithLocaleExists={entryWithLocaleExists} />,\n };\n }),\n customizeContent: () => currentLocale?.name,\n onSelect: handleSelect,\n value: currentLocale,\n };\n};\n\ntype UseDocument = typeof useDocument;\n\nconst getDocumentStatus = (\n document: ReturnType<UseDocument>['document'],\n meta: ReturnType<UseDocument>['meta']\n): 'draft' | 'published' | 'modified' => {\n const docStatus = document?.status;\n const statuses = meta?.availableStatus ?? [];\n\n /**\n * Creating an entry\n */\n if (!docStatus) {\n return 'draft';\n }\n\n /**\n * We're viewing a draft, but the document could have a published version\n */\n if (docStatus === 'draft' && statuses.find((doc) => doc.publishedAt !== null)) {\n return 'published';\n }\n\n return docStatus;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * AISettingsStatusAction\n * -----------------------------------------------------------------------------------------------*/\n\nconst AITranslationStatusIcon = styled(Status)<{ $isAISettingEnabled: boolean }>`\n display: flex;\n gap: ${({ theme }) => theme.spaces[1]};\n justify-content: center;\n align-items: center;\n height: 100%;\n\n // Disabled state\n ${({ $isAISettingEnabled, theme }) =>\n !$isAISettingEnabled &&\n `\n background-color: ${theme.colors.neutral150};\n `}\n\n svg {\n ${({ $isAISettingEnabled, theme }) =>\n !$isAISettingEnabled &&\n `\n fill: ${theme.colors.neutral300};\n `}\n }\n`;\n\nconst SpinningLoader = styled(Loader)`\n @keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n animation: spin 2s linear infinite;\n`;\n\nconst AITranslationStatusAction = ({ documentId, model, collectionType }: HeaderActionProps) => {\n const { formatMessage } = useIntl();\n const isAIAvailable = useAIAvailability();\n const { data: settings } = useGetSettingsQuery();\n const isAISettingEnabled = settings?.data?.aiLocalizations;\n const { hasI18n } = useI18n();\n\n // Poll for AI localizations jobs when AI is enabled and we have a documentId\n const { status } = useAILocalizationJobsPolling({\n documentId,\n model,\n collectionType,\n });\n const statusVariant = (() => {\n if (status === 'failed') {\n return 'warning';\n }\n\n if (isAISettingEnabled) {\n return 'alternative';\n }\n\n return 'neutral';\n })();\n\n // Do not display this action when i18n is not available\n if (!hasI18n) {\n return null;\n }\n\n // Do not display this action when AI is not available\n if (!isAIAvailable) {\n return null;\n }\n\n return {\n _status: {\n message: (\n <Box\n height=\"100%\"\n aria-label={formatMessage({\n id: getTranslation('CMEditViewAITranslation.status-aria-label'),\n defaultMessage: 'AI Translation Status',\n })}\n >\n <AITranslationStatusIcon\n $isAISettingEnabled={Boolean(isAISettingEnabled)}\n variant={statusVariant}\n size=\"S\"\n >\n {status === 'processing' ? <SpinningLoader /> : <Sparkle />}\n </AITranslationStatusIcon>\n </Box>\n ),\n tooltip: (\n <Flex direction=\"column\" padding={4} alignItems=\"flex-start\" width=\"25rem\">\n <Typography variant=\"pi\" fontWeight=\"600\">\n {formatMessage(\n {\n id: getTranslation('CMEditViewAITranslation.status-title'),\n defaultMessage:\n '{enabled, select, true {AI translation enabled} false {AI translation disabled} other {AI translation disabled}}',\n },\n { enabled: isAISettingEnabled }\n )}\n </Typography>\n <Typography variant=\"pi\" paddingTop={1} paddingBottom={3}>\n {formatMessage({\n id: getTranslation('CMEditViewAITranslation.status-description'),\n defaultMessage:\n 'Our AI translates content in all locales each time you save a modification in the default locale.',\n })}\n </Typography>\n <Link\n fontSize=\"inherit\"\n tag={NavLink}\n to=\"/settings/internationalization\"\n style={{ alignSelf: 'flex-end' }}\n >\n <Typography variant=\"pi\" textAlign=\"right\">\n {formatMessage(\n {\n id: getTranslation('CMEditViewAITranslation.settings-link'),\n defaultMessage:\n '{enabled, select, true {Disable it in settings} false {Enable it in settings} other {Enable it in settings}}',\n },\n { enabled: isAISettingEnabled }\n )}\n </Typography>\n </Link>\n </Flex>\n ),\n },\n };\n};\n\n/* -------------------------------------------------------------------------------------------------\n * FillFromAnotherLocaleAction\n * -----------------------------------------------------------------------------------------------*/\n\nconst FillFromAnotherLocaleAction = ({\n documentId,\n meta,\n model,\n collectionType,\n}: HeaderActionProps) => {\n const { formatMessage } = useIntl();\n const [{ query }] = useQueryParams<I18nBaseQuery>();\n const { hasI18n } = useI18n();\n const currentDesiredLocale = query.plugins?.i18n?.locale;\n const [localeSelected, setLocaleSelected] = React.useState<string | null>(null);\n const setValues = useForm('FillFromAnotherLocale', (state) => state.setValues);\n\n const { getDocument } = useDocumentActions();\n const { schema, components } = useDocument({\n model,\n documentId,\n collectionType,\n params: { locale: currentDesiredLocale },\n });\n const { data: locales = [] } = useGetLocalesQuery();\n\n const isAIAvailable = useAIAvailability();\n const { data: settings } = useGetSettingsQuery();\n const isAISettingEnabled = settings?.data?.aiLocalizations;\n\n const availableLocales = Array.isArray(locales)\n ? locales.filter((locale) => meta?.availableLocales.some((l) => l.locale === locale.code))\n : [];\n\n const fillFromLocale = (onClose: () => void) => async () => {\n const response = await getDocument({\n collectionType,\n model,\n documentId,\n params: { locale: localeSelected },\n });\n if (!response || !schema) {\n return;\n }\n\n const { data } = response;\n\n const cleanedData = cleanData(data, schema, components);\n\n setValues(cleanedData);\n\n onClose();\n };\n\n if (!hasI18n) {\n return null;\n }\n\n // Do not display this action when AI is available and AI translations are enabled\n if (isAIAvailable && isAISettingEnabled) {\n return null;\n }\n\n return {\n type: 'icon',\n icon: <Earth />,\n disabled: availableLocales.length === 0,\n label: formatMessage({\n id: getTranslation('CMEditViewCopyLocale.copy-text'),\n defaultMessage: 'Fill in from another locale',\n }),\n dialog: {\n type: 'dialog',\n title: formatMessage({\n id: getTranslation('CMEditViewCopyLocale.dialog.title'),\n defaultMessage: 'Confirmation',\n }),\n content: ({ onClose }: { onClose: () => void }) => (\n <>\n <Dialog.Body>\n <Flex direction=\"column\" gap={3}>\n <WarningCircle width=\"24px\" height=\"24px\" fill=\"danger600\" />\n <Typography textAlign=\"center\">\n {formatMessage({\n id: getTranslation('CMEditViewCopyLocale.dialog.body'),\n defaultMessage:\n 'Your current content will be erased and filled by the content of the selected locale:',\n })}\n </Typography>\n <Field.Root width=\"100%\">\n <Field.Label>\n {formatMessage({\n id: getTranslation('CMEditViewCopyLocale.dialog.field.label'),\n defaultMessage: 'Locale',\n })}\n </Field.Label>\n <SingleSelect\n value={localeSelected}\n placeholder={formatMessage({\n id: getTranslation('CMEditViewCopyLocale.dialog.field.placeholder'),\n defaultMessage: 'Select one locale...',\n })}\n // @ts-expect-error – the DS will handle numbers, but we're not allowing the API.\n onChange={(value) => setLocaleSelected(value)}\n >\n {availableLocales.map((locale) => (\n <SingleSelectOption key={locale.code} value={locale.code}>\n {locale.name}\n </SingleSelectOption>\n ))}\n </SingleSelect>\n </Field.Root>\n </Flex>\n </Dialog.Body>\n <Dialog.Footer>\n <Flex gap={2} width=\"100%\">\n <Button flex=\"auto\" variant=\"tertiary\" onClick={onClose}>\n {formatMessage({\n id: getTranslation('CMEditViewCopyLocale.cancel-text'),\n defaultMessage: 'No, cancel',\n })}\n </Button>\n <Button flex=\"auto\" variant=\"success\" onClick={fillFromLocale(onClose)}>\n {formatMessage({\n id: getTranslation('CMEditViewCopyLocale.submit-text'),\n defaultMessage: 'Yes, fill in',\n })}\n </Button>\n </Flex>\n </Dialog.Footer>\n </>\n ),\n },\n };\n};\n\n/* -------------------------------------------------------------------------------------------------\n * DeleteLocaleAction\n * -----------------------------------------------------------------------------------------------*/\n\nconst DeleteLocaleAction: DocumentActionComponent = ({\n document,\n documentId,\n model,\n collectionType,\n}) => {\n const { formatMessage } = useIntl();\n const navigate = useNavigate();\n const { toggleNotification } = useNotification();\n const { delete: deleteAction, isLoading } = useDocumentActions();\n const { hasI18n, canDelete } = useI18n();\n\n // Get the current locale object, using the URL instead of document so it works while creating\n const [{ query }] = useQueryParams<I18nBaseQuery>();\n const { data: locales = [] } = useGetLocalesQuery();\n const currentDesiredLocale = query.plugins?.i18n?.locale;\n const locale = !('error' in locales) && locales.find((loc) => loc.code === currentDesiredLocale);\n\n if (!hasI18n) {\n return null;\n }\n\n return {\n disabled:\n (document?.locale && !canDelete.includes(document.locale)) || !document || !document.id,\n position: ['header', 'table-row'],\n label: formatMessage(\n {\n id: getTranslation('actions.delete.label'),\n defaultMessage: 'Delete entry ({locale})',\n },\n { locale: locale && locale.name }\n ),\n icon: <StyledTrash />,\n variant: 'danger',\n dialog: {\n type: 'dialog',\n title: formatMessage({\n id: getTranslation('actions.delete.dialog.title'),\n defaultMessage: 'Confirmation',\n }),\n content: (\n <Flex direction=\"column\" gap={2}>\n <WarningCircle width=\"24px\" height=\"24px\" fill=\"danger600\" />\n <Typography tag=\"p\" variant=\"omega\" textAlign=\"center\">\n {formatMessage({\n id: getTranslation('actions.delete.dialog.body'),\n defaultMessage: 'Are you sure?',\n })}\n </Typography>\n </Flex>\n ),\n loading: isLoading,\n onConfirm: async () => {\n const unableToDelete =\n // We are unable to delete a collection type without a document ID\n // & unable to delete generally if there is no document locale\n (collectionType !== 'single-types' && !documentId) || !document?.locale;\n\n if (unableToDelete) {\n console.error(\n \"You're trying to delete a document without an id or locale, this is likely a bug with Strapi. Please open an issue.\"\n );\n\n toggleNotification({\n message: formatMessage({\n id: getTranslation('actions.delete.error'),\n defaultMessage: 'An error occurred while trying to delete the document locale.',\n }),\n type: 'danger',\n });\n\n return;\n }\n\n const res = await deleteAction({\n documentId,\n model,\n collectionType,\n params: { locale: document.locale },\n });\n\n if (!('error' in res)) {\n navigate({ pathname: `../${collectionType}/${model}` }, { replace: true });\n }\n },\n },\n };\n};\n\nexport type LocaleStatus = {\n locale: string;\n status: Modules.Documents.Params.PublicationStatus.Kind | 'modified';\n};\n\ninterface ExtendedDocumentActionProps extends DocumentActionProps {\n action?: 'bulk-publish' | 'bulk-unpublish';\n}\n\n/* -------------------------------------------------------------------------------------------------\n * BulkLocaleAction\n *\n * This component is used to handle bulk publish and unpublish actions on locales.\n * -----------------------------------------------------------------------------------------------*/\n\nconst BulkLocaleAction: DocumentActionComponent = ({\n document,\n documentId,\n model,\n collectionType,\n action,\n meta,\n}: ExtendedDocumentActionProps) => {\n const locale = document?.locale ?? null;\n const [{ query }] = useQueryParams<{ status: 'draft' | 'published' }>();\n\n const params = React.useMemo(() => buildValidParams(query), [query]);\n const isOnPublishedTab = query.status === 'published';\n\n const { formatMessage } = useIntl();\n const { hasI18n, canPublish } = useI18n();\n const { toggleNotification } = useNotification();\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();\n\n const [selectedRows, setSelectedRows] = React.useState<any[]>([]);\n const [isDraftRelationConfirmationOpen, setIsDraftRelationConfirmationOpen] =\n React.useState<boolean>(false);\n\n const { publishMany: publishManyAction, unpublishMany: unpublishManyAction } =\n useDocumentActions();\n\n const { schema, validate } = useDocument(\n {\n model,\n collectionType,\n documentId,\n params: {\n locale,\n },\n },\n {\n // No need to fetch the document, the data is already available in the `document` prop\n skip: true,\n }\n );\n\n const { data: localesMetadata = [] } = useGetLocalesQuery(hasI18n ? undefined : skipToken);\n\n const headers = [\n {\n label: formatMessage({\n id: 'global.name',\n defaultMessage: 'Name',\n }),\n name: 'name',\n },\n {\n label: formatMessage({\n id: getTranslation('CMEditViewBulkLocale.status'),\n defaultMessage: 'Status',\n }),\n name: 'status',\n },\n {\n label: formatMessage({\n id: getTranslation('CMEditViewBulkLocale.publication-status'),\n defaultMessage: 'Publication Status',\n }),\n name: 'publication-status',\n },\n ];\n\n // Extract the rows for the bulk locale publish modal and any validation\n // errors per locale\n const [rows, validationErrors] = React.useMemo(() => {\n if (!document) {\n return [[], {}];\n }\n\n const metaLocalizations = (meta?.availableLocales ?? []).map((locale) => ({\n locale: locale.locale,\n status: (locale.status ?? 'draft') as LocaleStatus['status'],\n }));\n\n const documentLocalizations = (\n (document.localizations ?? []) as Array<{\n locale?: string | null;\n status?: Modules.Documents.Params.PublicationStatus.Kind | 'modified' | null;\n }>\n ).map((doc) => ({\n locale: doc.locale ?? undefined,\n status: (doc.status ?? 'draft') as LocaleStatus['status'],\n }));\n\n const localesMap = new Map<string, LocaleStatus>();\n\n metaLocalizations.forEach(({ locale, status }) => {\n if (locale) {\n localesMap.set(locale, { locale, status });\n }\n });\n\n documentLocalizations.forEach(({ locale, status }) => {\n if (locale) {\n localesMap.set(locale, { locale, status });\n }\n });\n\n // Build the rows for the bulk locale publish modal by combining the current\n // document with all the available locales from the document meta\n const locales: LocaleStatus[] = [];\n\n if (document?.locale) {\n locales.push({\n locale: document.locale,\n status: (document.status ?? 'draft') as LocaleStatus['status'],\n });\n }\n\n locales.push(\n ...Array.from(localesMap.entries())\n .filter(([locale]) => locale !== document?.locale)\n .map(([, value]) => value)\n );\n\n if (locales.length === 0 && document?.locale) {\n locales.push({\n locale: document.locale,\n status: (document.status ?? 'draft') as LocaleStatus['status'],\n });\n }\n\n // Build the validation errors for each locale.\n const allDocuments = [document, ...(document.localizations ?? [])];\n const errors = allDocuments.reduce<FormErrors>((errs, document) => {\n if (!document) {\n return errs;\n }\n\n // Validate each locale entry via the useDocument validate function and store any errors in a dictionary\n const validation = validate(document as Modules.Documents.AnyDocument);\n if (validation !== null) {\n errs[document.locale] = validation;\n }\n return errs;\n }, {});\n\n return [locales, errors];\n }, [document, meta?.availableLocales, validate]);\n\n const isBulkPublish = action === 'bulk-publish';\n const localesForAction = selectedRows.reduce((acc: string[], selectedRow: LocaleStatus) => {\n const isValidLocale =\n // Validation errors are irrelevant if we are trying to unpublish\n !isBulkPublish || !Object.keys(validationErrors).includes(selectedRow.locale);\n\n const shouldAddLocale = isBulkPublish\n ? selectedRow.status !== 'published' && isValidLocale\n : selectedRow.status !== 'draft' && isValidLocale;\n\n if (shouldAddLocale) {\n acc.push(selectedRow.locale);\n }\n\n return acc;\n }, []);\n\n // TODO skipping this for now as there is a bug with the draft relation count that will be worked on separately\n // see https://www.notion.so/strapi/Count-draft-relations-56901b492efb45ab90d42fe975b32bd8?pvs=4\n const enableDraftRelationsCount = false;\n const {\n data: draftRelationsCount = 0,\n isLoading: isDraftRelationsLoading,\n error: isDraftRelationsError,\n } = useGetManyDraftRelationCountQuery(\n {\n model,\n documentIds: [documentId!],\n locale: localesForAction,\n },\n {\n skip: !enableDraftRelationsCount || !documentId || localesForAction.length === 0,\n }\n );\n\n React.useEffect(() => {\n if (isDraftRelationsError) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(isDraftRelationsError),\n });\n }\n }, [isDraftRelationsError, toggleNotification, formatAPIError]);\n\n if (!schema?.options?.draftAndPublish) {\n return null;\n }\n\n if (!hasI18n) {\n return null;\n }\n\n if (!documentId) {\n return null;\n }\n\n // This document action can be enabled given that draft and publish and i18n are\n // enabled and we can publish the current locale.\n\n const publish = async () => {\n await publishManyAction({\n model,\n documentIds: [documentId],\n params: {\n ...params,\n locale: localesForAction,\n },\n });\n\n setSelectedRows([]);\n };\n\n const unpublish = async () => {\n await unpublishManyAction({\n model,\n documentIds: [documentId],\n params: {\n ...params,\n locale: localesForAction,\n },\n });\n\n setSelectedRows([]);\n };\n\n const handleAction = async () => {\n if (draftRelationsCount > 0) {\n setIsDraftRelationConfirmationOpen(true);\n } else if (isBulkPublish) {\n await publish();\n } else {\n await unpublish();\n }\n };\n\n if (isDraftRelationConfirmationOpen) {\n return {\n label: formatMessage({\n id: 'app.components.ConfirmDialog.title',\n defaultMessage: 'Confirmation',\n }),\n variant: 'danger',\n dialog: {\n onCancel: () => {\n setIsDraftRelationConfirmationOpen(false);\n },\n onConfirm: async () => {\n await publish();\n\n setIsDraftRelationConfirmationOpen(false);\n },\n type: 'dialog',\n title: formatMessage({\n id: getTranslation('actions.publish.dialog.title'),\n defaultMessage: 'Confirmation',\n }),\n content: (\n <Flex direction=\"column\" alignItems=\"center\" gap={2}>\n <WarningCircle width=\"2.4rem\" height=\"2.4rem\" fill=\"danger600\" />\n <Typography textAlign=\"center\">\n {formatMessage({\n id: getTranslation('CMEditViewBulkLocale.draft-relation-warning'),\n defaultMessage:\n 'Some locales are related to draft entries. Publishing them could leave broken links in your app.',\n })}\n </Typography>\n <Typography textAlign=\"center\">\n {formatMessage({\n id: getTranslation('CMEditViewBulkLocale.continue-confirmation'),\n defaultMessage: 'Are you sure you want to continue?',\n })}\n </Typography>\n </Flex>\n ),\n },\n };\n }\n\n const hasPermission = selectedRows\n .map(({ locale }) => locale)\n .every((locale) => canPublish.includes(locale));\n\n return {\n label: formatMessage({\n id: getTranslation(`CMEditViewBulkLocale.${isBulkPublish ? 'publish' : 'unpublish'}-title`),\n defaultMessage: `${isBulkPublish ? 'Publish' : 'Unpublish'} Multiple Locales`,\n }),\n variant: isBulkPublish ? 'secondary' : 'danger',\n icon: isBulkPublish ? <ListPlus /> : <Cross />,\n disabled: isOnPublishedTab || canPublish.length === 0,\n position: ['panel'],\n dialog: {\n type: 'modal',\n title: formatMessage({\n id: getTranslation(`CMEditViewBulkLocale.${isBulkPublish ? 'publish' : 'unpublish'}-title`),\n defaultMessage: `${isBulkPublish ? 'Publish' : 'Unpublish'} Multiple Locales`,\n }),\n content: () => {\n return (\n <Table.Root\n headers={headers}\n rows={rows.map((row) => ({\n ...row,\n id: row.locale,\n }))}\n selectedRows={selectedRows}\n onSelectedRowsChange={(tableSelectedRows) => setSelectedRows(tableSelectedRows)}\n >\n <BulkLocaleActionModal\n validationErrors={validationErrors}\n headers={headers}\n rows={rows}\n localesMetadata={localesMetadata as Locale[]}\n action={action ?? 'bulk-publish'}\n />\n </Table.Root>\n );\n },\n footer: () => (\n <Modal.Footer justifyContent=\"flex-end\">\n <Button\n loading={isDraftRelationsLoading}\n disabled={!hasPermission || localesForAction.length === 0}\n variant=\"default\"\n onClick={handleAction}\n >\n {formatMessage({\n id: isBulkPublish ? 'app.utils.publish' : 'app.utils.unpublish',\n defaultMessage: isBulkPublish ? 'Publish' : 'Unpublish',\n })}\n </Button>\n </Modal.Footer>\n ),\n },\n };\n};\n\n/* -------------------------------------------------------------------------------------------------\n * BulkLocalePublishAction\n * -----------------------------------------------------------------------------------------------*/\nconst BulkLocalePublishAction: DocumentActionComponent = (props: ExtendedDocumentActionProps) => {\n return BulkLocaleAction({ action: 'bulk-publish', ...props });\n};\n\n/* -------------------------------------------------------------------------------------------------\n * BulkLocaleUnpublishAction\n * -----------------------------------------------------------------------------------------------*/\nconst BulkLocaleUnpublishAction: DocumentActionComponent = (props: ExtendedDocumentActionProps) => {\n return BulkLocaleAction({ action: 'bulk-unpublish', ...props });\n};\n\n/**\n * Because the icon system is completely broken, we have to do\n * this to remove the fill from the cog.\n */\nconst StyledTrash = styled(Trash)`\n path {\n fill: currentColor;\n }\n`;\n\nexport {\n BulkLocalePublishAction,\n BulkLocaleUnpublishAction,\n DeleteLocaleAction,\n LocalePickerAction,\n FillFromAnotherLocaleAction,\n AITranslationStatusAction,\n};\n"],"names":["statusVariants","draft","published","modified","LocaleOption","isDraftAndPublishEnabled","locale","status","entryExists","formatMessage","useIntl","id","getTranslation","defaultMessage","bold","_jsx","b","name","_jsxs","Flex","width","gap","justifyContent","Typography","Status","display","paddingLeft","paddingRight","paddingTop","paddingBottom","size","variant","tag","fontWeight","capitalize","LocaleOptionStartIcon","entryWithLocaleExists","translationStatus","index","isAiAvailable","useAIAvailability","Plus","WarningCircle","fill","LocalePickerAction","document","meta","model","collectionType","documentId","query","setQuery","useQueryParams","hasI18n","canCreate","canRead","useI18n","data","locales","useGetLocalesQuery","currentDesiredLocale","plugins","i18n","schema","useDocument","params","jobData","useGetAILocalizationJobsByDocumentQuery","settings","useGetSettingsQuery","setValues","useForm","state","handleSelect","React","useCallback","value","nonTranslatedFields","useMemo","attributes","Object","keys","filter","field","attribute","pluginOptions","localized","sourceLocaleData","Array","isArray","availableLocales","defaultLocale","find","isDefault","existingLocales","map","loc","sourceLocaleCode","includes","code","sourceLocaleDoc","useEffect","length","dataToSet","reduce","acc","doesLocaleExist","currentLocale","undefined","documentLocalizations","localizations","allLocalizations","allCurrentLocales","getDocumentStatus","displayedLocales","localesSortingDefaultFirst","sort","a","label","options","some","doc","currentLocaleDoc","permissionsToCheck","aiLocalizations","_render","Fragment","SingleSelectOption","disabled","startIcon","draftAndPublish","Box","customizeContent","onSelect","docStatus","statuses","availableStatus","publishedAt","AITranslationStatusIcon","styled","theme","spaces","$isAISettingEnabled","colors","neutral150","neutral300","SpinningLoader","Loader","AITranslationStatusAction","isAIAvailable","isAISettingEnabled","useAILocalizationJobsPolling","statusVariant","_status","message","height","aria-label","Boolean","Sparkle","tooltip","direction","padding","alignItems","enabled","Link","fontSize","NavLink","to","style","alignSelf","textAlign","FillFromAnotherLocaleAction","localeSelected","setLocaleSelected","useState","getDocument","useDocumentActions","components","l","fillFromLocale","onClose","response","cleanedData","cleanData","type","icon","Earth","dialog","title","content","_Fragment","Dialog","Body","Field","Root","Label","SingleSelect","placeholder","onChange","Footer","Button","flex","onClick","DeleteLocaleAction","navigate","useNavigate","toggleNotification","useNotification","delete","deleteAction","isLoading","canDelete","position","StyledTrash","loading","onConfirm","unableToDelete","console","error","res","pathname","replace","BulkLocaleAction","action","buildValidParams","isOnPublishedTab","canPublish","_unstableFormatAPIError","formatAPIError","useAPIErrorHandler","selectedRows","setSelectedRows","isDraftRelationConfirmationOpen","setIsDraftRelationConfirmationOpen","publishMany","publishManyAction","unpublishMany","unpublishManyAction","validate","skip","localesMetadata","skipToken","headers","rows","validationErrors","metaLocalizations","localesMap","Map","forEach","set","push","from","entries","allDocuments","errors","errs","validation","isBulkPublish","localesForAction","selectedRow","isValidLocale","shouldAddLocale","enableDraftRelationsCount","draftRelationsCount","isDraftRelationsLoading","isDraftRelationsError","useGetManyDraftRelationCountQuery","documentIds","publish","unpublish","handleAction","onCancel","hasPermission","every","ListPlus","Cross","Table","row","onSelectedRowsChange","tableSelectedRows","BulkLocaleActionModal","footer","Modal","BulkLocalePublishAction","props","BulkLocaleUnpublishAction","Trash"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmEA,MAAMA,cAAqE,GAAA;IACzEC,KAAO,EAAA,WAAA;IACPC,SAAW,EAAA,SAAA;IACXC,QAAU,EAAA;AACZ,CAAA;AAEA,MAAMC,YAAAA,GAAe,CAAC,EACpBC,wBAAwB,EACxBC,MAAM,EACNC,MAAM,EACNC,WAAW,EACO,GAAA;IAClB,MAAM,EAAEC,aAAa,EAAE,GAAGC,OAAAA,EAAAA;AAE1B,IAAA,IAAI,CAACF,WAAa,EAAA;AAChB,QAAA,OAAOC,aACL,CAAA;AACEE,YAAAA,EAAAA,EAAIC,cAAe,CAAA,sCAAA,CAAA;YACnBC,cAAgB,EAAA;SAElB,EAAA;YACEC,IAAM,EAAA,CAACR,uBAA4BS,GAACC,CAAAA,GAAAA,EAAAA;AAAGV,oBAAAA,QAAAA,EAAAA;;AACvCA,YAAAA,MAAAA,EAAQA,OAAOW;AACjB,SAAA,CAAA;AAEJ;AAEA,IAAA,qBACEC,IA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AA,GAAc1E,MAAOmJ,CAAAA,KAAAA,CAAM;;;;AAIjC,CAAC;;;;"}
@@ -0,0 +1,69 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ require('react');
5
+ var designSystem = require('@strapi/design-system');
6
+ var reactIntl = require('react-intl');
7
+ var useI18n = require('../hooks/useI18n.js');
8
+ var getTranslation = require('../utils/getTranslation.js');
9
+
10
+ const Emphasis = (chunks)=>{
11
+ return /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
12
+ fontWeight: "semiBold",
13
+ textColor: "danger500",
14
+ children: chunks
15
+ });
16
+ };
17
+ const DeleteModalAdditionalInfo = ()=>{
18
+ const { hasI18n } = useI18n.useI18n();
19
+ const { formatMessage } = reactIntl.useIntl();
20
+ if (!hasI18n) {
21
+ return null;
22
+ }
23
+ return /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
24
+ textColor: "danger500",
25
+ children: formatMessage({
26
+ id: getTranslation.getTranslation('Settings.list.actions.deleteAdditionalInfos'),
27
+ defaultMessage: 'This will delete the active locale versions <em>(from Internationalization)</em>'
28
+ }, {
29
+ em: Emphasis
30
+ })
31
+ });
32
+ };
33
+ const PublishModalAdditionalInfo = ()=>{
34
+ const { hasI18n } = useI18n.useI18n();
35
+ const { formatMessage } = reactIntl.useIntl();
36
+ if (!hasI18n) {
37
+ return null;
38
+ }
39
+ return /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
40
+ textColor: "danger500",
41
+ children: formatMessage({
42
+ id: getTranslation.getTranslation('Settings.list.actions.publishAdditionalInfos'),
43
+ defaultMessage: 'This will publish the active locale versions <em>(from Internationalization)</em>'
44
+ }, {
45
+ em: Emphasis
46
+ })
47
+ });
48
+ };
49
+ const UnpublishModalAdditionalInfo = ()=>{
50
+ const { hasI18n } = useI18n.useI18n();
51
+ const { formatMessage } = reactIntl.useIntl();
52
+ if (!hasI18n) {
53
+ return null;
54
+ }
55
+ return /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
56
+ textColor: "danger500",
57
+ children: formatMessage({
58
+ id: getTranslation.getTranslation('Settings.list.actions.unpublishAdditionalInfos'),
59
+ defaultMessage: 'This will unpublish the active locale versions <em>(from Internationalization)</em>'
60
+ }, {
61
+ em: Emphasis
62
+ })
63
+ });
64
+ };
65
+
66
+ exports.DeleteModalAdditionalInfo = DeleteModalAdditionalInfo;
67
+ exports.PublishModalAdditionalInfo = PublishModalAdditionalInfo;
68
+ exports.UnpublishModalAdditionalInfo = UnpublishModalAdditionalInfo;
69
+ //# sourceMappingURL=CMListViewModalsAdditionalInformation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CMListViewModalsAdditionalInformation.js","sources":["../../../admin/src/components/CMListViewModalsAdditionalInformation.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Typography } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\n\nimport { useI18n } from '../hooks/useI18n';\nimport { getTranslation } from '../utils/getTranslation';\n\nconst Emphasis = (chunks: React.ReactNode) => {\n return (\n <Typography fontWeight=\"semiBold\" textColor=\"danger500\">\n {chunks}\n </Typography>\n );\n};\n\nconst DeleteModalAdditionalInfo = () => {\n const { hasI18n } = useI18n();\n const { formatMessage } = useIntl();\n\n if (!hasI18n) {\n return null;\n }\n\n return (\n <Typography textColor=\"danger500\">\n {formatMessage(\n {\n id: getTranslation('Settings.list.actions.deleteAdditionalInfos'),\n defaultMessage:\n 'This will delete the active locale versions <em>(from Internationalization)</em>',\n },\n {\n em: Emphasis,\n }\n )}\n </Typography>\n );\n};\n\nconst PublishModalAdditionalInfo = () => {\n const { hasI18n } = useI18n();\n const { formatMessage } = useIntl();\n\n if (!hasI18n) {\n return null;\n }\n\n return (\n <Typography textColor=\"danger500\">\n {formatMessage(\n {\n id: getTranslation('Settings.list.actions.publishAdditionalInfos'),\n defaultMessage:\n 'This will publish the active locale versions <em>(from Internationalization)</em>',\n },\n {\n em: Emphasis,\n }\n )}\n </Typography>\n );\n};\n\nconst UnpublishModalAdditionalInfo = () => {\n const { hasI18n } = useI18n();\n const { formatMessage } = useIntl();\n\n if (!hasI18n) {\n return null;\n }\n\n return (\n <Typography textColor=\"danger500\">\n {formatMessage(\n {\n id: getTranslation('Settings.list.actions.unpublishAdditionalInfos'),\n defaultMessage:\n 'This will unpublish the active locale versions <em>(from Internationalization)</em>',\n },\n {\n em: Emphasis,\n }\n )}\n </Typography>\n );\n};\n\nexport { DeleteModalAdditionalInfo, PublishModalAdditionalInfo, UnpublishModalAdditionalInfo };\n"],"names":["Emphasis","chunks","_jsx","Typography","fontWeight","textColor","DeleteModalAdditionalInfo","hasI18n","useI18n","formatMessage","useIntl","id","getTranslation","defaultMessage","em","PublishModalAdditionalInfo","UnpublishModalAdditionalInfo"],"mappings":";;;;;;;;;AAQA,MAAMA,WAAW,CAACC,MAAAA,GAAAA;AAChB,IAAA,qBACEC,cAACC,CAAAA,uBAAAA,EAAAA;QAAWC,UAAW,EAAA,UAAA;QAAWC,SAAU,EAAA,WAAA;AACzCJ,QAAAA,QAAAA,EAAAA;;AAGP,CAAA;AAEA,MAAMK,yBAA4B,GAAA,IAAA;IAChC,MAAM,EAAEC,OAAO,EAAE,GAAGC,eAAAA,EAAAA;IACpB,MAAM,EAAEC,aAAa,EAAE,GAAGC,iBAAAA,EAAAA;AAE1B,IAAA,IAAI,CAACH,OAAS,EAAA;QACZ,OAAO,IAAA;AACT;AAEA,IAAA,qBACEL,cAACC,CAAAA,uBAAAA,EAAAA;QAAWE,SAAU,EAAA,WAAA;kBACnBI,aACC,CAAA;AACEE,YAAAA,EAAAA,EAAIC,6BAAe,CAAA,6CAAA,CAAA;YACnBC,cACE,EAAA;SAEJ,EAAA;YACEC,EAAId,EAAAA;AACN,SAAA;;AAIR;AAEA,MAAMe,0BAA6B,GAAA,IAAA;IACjC,MAAM,EAAER,OAAO,EAAE,GAAGC,eAAAA,EAAAA;IACpB,MAAM,EAAEC,aAAa,EAAE,GAAGC,iBAAAA,EAAAA;AAE1B,IAAA,IAAI,CAACH,OAAS,EAAA;QACZ,OAAO,IAAA;AACT;AAEA,IAAA,qBACEL,cAACC,CAAAA,uBAAAA,EAAAA;QAAWE,SAAU,EAAA,WAAA;kBACnBI,aACC,CAAA;AACEE,YAAAA,EAAAA,EAAIC,6BAAe,CAAA,8CAAA,CAAA;YACnBC,cACE,EAAA;SAEJ,EAAA;YACEC,EAAId,EAAAA;AACN,SAAA;;AAIR;AAEA,MAAMgB,4BAA+B,GAAA,IAAA;IACnC,MAAM,EAAET,OAAO,EAAE,GAAGC,eAAAA,EAAAA;IACpB,MAAM,EAAEC,aAAa,EAAE,GAAGC,iBAAAA,EAAAA;AAE1B,IAAA,IAAI,CAACH,OAAS,EAAA;QACZ,OAAO,IAAA;AACT;AAEA,IAAA,qBACEL,cAACC,CAAAA,uBAAAA,EAAAA;QAAWE,SAAU,EAAA,WAAA;kBACnBI,aACC,CAAA;AACEE,YAAAA,EAAAA,EAAIC,6BAAe,CAAA,gDAAA,CAAA;YACnBC,cACE,EAAA;SAEJ,EAAA;YACEC,EAAId,EAAAA;AACN,SAAA;;AAIR;;;;;;"}
@@ -0,0 +1,65 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import 'react';
3
+ import { Typography } from '@strapi/design-system';
4
+ import { useIntl } from 'react-intl';
5
+ import { useI18n } from '../hooks/useI18n.mjs';
6
+ import { getTranslation } from '../utils/getTranslation.mjs';
7
+
8
+ const Emphasis = (chunks)=>{
9
+ return /*#__PURE__*/ jsx(Typography, {
10
+ fontWeight: "semiBold",
11
+ textColor: "danger500",
12
+ children: chunks
13
+ });
14
+ };
15
+ const DeleteModalAdditionalInfo = ()=>{
16
+ const { hasI18n } = useI18n();
17
+ const { formatMessage } = useIntl();
18
+ if (!hasI18n) {
19
+ return null;
20
+ }
21
+ return /*#__PURE__*/ jsx(Typography, {
22
+ textColor: "danger500",
23
+ children: formatMessage({
24
+ id: getTranslation('Settings.list.actions.deleteAdditionalInfos'),
25
+ defaultMessage: 'This will delete the active locale versions <em>(from Internationalization)</em>'
26
+ }, {
27
+ em: Emphasis
28
+ })
29
+ });
30
+ };
31
+ const PublishModalAdditionalInfo = ()=>{
32
+ const { hasI18n } = useI18n();
33
+ const { formatMessage } = useIntl();
34
+ if (!hasI18n) {
35
+ return null;
36
+ }
37
+ return /*#__PURE__*/ jsx(Typography, {
38
+ textColor: "danger500",
39
+ children: formatMessage({
40
+ id: getTranslation('Settings.list.actions.publishAdditionalInfos'),
41
+ defaultMessage: 'This will publish the active locale versions <em>(from Internationalization)</em>'
42
+ }, {
43
+ em: Emphasis
44
+ })
45
+ });
46
+ };
47
+ const UnpublishModalAdditionalInfo = ()=>{
48
+ const { hasI18n } = useI18n();
49
+ const { formatMessage } = useIntl();
50
+ if (!hasI18n) {
51
+ return null;
52
+ }
53
+ return /*#__PURE__*/ jsx(Typography, {
54
+ textColor: "danger500",
55
+ children: formatMessage({
56
+ id: getTranslation('Settings.list.actions.unpublishAdditionalInfos'),
57
+ defaultMessage: 'This will unpublish the active locale versions <em>(from Internationalization)</em>'
58
+ }, {
59
+ em: Emphasis
60
+ })
61
+ });
62
+ };
63
+
64
+ export { DeleteModalAdditionalInfo, PublishModalAdditionalInfo, UnpublishModalAdditionalInfo };
65
+ //# sourceMappingURL=CMListViewModalsAdditionalInformation.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CMListViewModalsAdditionalInformation.mjs","sources":["../../../admin/src/components/CMListViewModalsAdditionalInformation.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Typography } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\n\nimport { useI18n } from '../hooks/useI18n';\nimport { getTranslation } from '../utils/getTranslation';\n\nconst Emphasis = (chunks: React.ReactNode) => {\n return (\n <Typography fontWeight=\"semiBold\" textColor=\"danger500\">\n {chunks}\n </Typography>\n );\n};\n\nconst DeleteModalAdditionalInfo = () => {\n const { hasI18n } = useI18n();\n const { formatMessage } = useIntl();\n\n if (!hasI18n) {\n return null;\n }\n\n return (\n <Typography textColor=\"danger500\">\n {formatMessage(\n {\n id: getTranslation('Settings.list.actions.deleteAdditionalInfos'),\n defaultMessage:\n 'This will delete the active locale versions <em>(from Internationalization)</em>',\n },\n {\n em: Emphasis,\n }\n )}\n </Typography>\n );\n};\n\nconst PublishModalAdditionalInfo = () => {\n const { hasI18n } = useI18n();\n const { formatMessage } = useIntl();\n\n if (!hasI18n) {\n return null;\n }\n\n return (\n <Typography textColor=\"danger500\">\n {formatMessage(\n {\n id: getTranslation('Settings.list.actions.publishAdditionalInfos'),\n defaultMessage:\n 'This will publish the active locale versions <em>(from Internationalization)</em>',\n },\n {\n em: Emphasis,\n }\n )}\n </Typography>\n );\n};\n\nconst UnpublishModalAdditionalInfo = () => {\n const { hasI18n } = useI18n();\n const { formatMessage } = useIntl();\n\n if (!hasI18n) {\n return null;\n }\n\n return (\n <Typography textColor=\"danger500\">\n {formatMessage(\n {\n id: getTranslation('Settings.list.actions.unpublishAdditionalInfos'),\n defaultMessage:\n 'This will unpublish the active locale versions <em>(from Internationalization)</em>',\n },\n {\n em: Emphasis,\n }\n )}\n </Typography>\n );\n};\n\nexport { DeleteModalAdditionalInfo, PublishModalAdditionalInfo, UnpublishModalAdditionalInfo };\n"],"names":["Emphasis","chunks","_jsx","Typography","fontWeight","textColor","DeleteModalAdditionalInfo","hasI18n","useI18n","formatMessage","useIntl","id","getTranslation","defaultMessage","em","PublishModalAdditionalInfo","UnpublishModalAdditionalInfo"],"mappings":";;;;;;;AAQA,MAAMA,WAAW,CAACC,MAAAA,GAAAA;AAChB,IAAA,qBACEC,GAACC,CAAAA,UAAAA,EAAAA;QAAWC,UAAW,EAAA,UAAA;QAAWC,SAAU,EAAA,WAAA;AACzCJ,QAAAA,QAAAA,EAAAA;;AAGP,CAAA;AAEA,MAAMK,yBAA4B,GAAA,IAAA;IAChC,MAAM,EAAEC,OAAO,EAAE,GAAGC,OAAAA,EAAAA;IACpB,MAAM,EAAEC,aAAa,EAAE,GAAGC,OAAAA,EAAAA;AAE1B,IAAA,IAAI,CAACH,OAAS,EAAA;QACZ,OAAO,IAAA;AACT;AAEA,IAAA,qBACEL,GAACC,CAAAA,UAAAA,EAAAA;QAAWE,SAAU,EAAA,WAAA;kBACnBI,aACC,CAAA;AACEE,YAAAA,EAAAA,EAAIC,cAAe,CAAA,6CAAA,CAAA;YACnBC,cACE,EAAA;SAEJ,EAAA;YACEC,EAAId,EAAAA;AACN,SAAA;;AAIR;AAEA,MAAMe,0BAA6B,GAAA,IAAA;IACjC,MAAM,EAAER,OAAO,EAAE,GAAGC,OAAAA,EAAAA;IACpB,MAAM,EAAEC,aAAa,EAAE,GAAGC,OAAAA,EAAAA;AAE1B,IAAA,IAAI,CAACH,OAAS,EAAA;QACZ,OAAO,IAAA;AACT;AAEA,IAAA,qBACEL,GAACC,CAAAA,UAAAA,EAAAA;QAAWE,SAAU,EAAA,WAAA;kBACnBI,aACC,CAAA;AACEE,YAAAA,EAAAA,EAAIC,cAAe,CAAA,8CAAA,CAAA;YACnBC,cACE,EAAA;SAEJ,EAAA;YACEC,EAAId,EAAAA;AACN,SAAA;;AAIR;AAEA,MAAMgB,4BAA+B,GAAA,IAAA;IACnC,MAAM,EAAET,OAAO,EAAE,GAAGC,OAAAA,EAAAA;IACpB,MAAM,EAAEC,aAAa,EAAE,GAAGC,OAAAA,EAAAA;AAE1B,IAAA,IAAI,CAACH,OAAS,EAAA;QACZ,OAAO,IAAA;AACT;AAEA,IAAA,qBACEL,GAACC,CAAAA,UAAAA,EAAAA;QAAWE,SAAU,EAAA,WAAA;kBACnBI,aACC,CAAA;AACEE,YAAAA,EAAAA,EAAIC,cAAe,CAAA,gDAAA,CAAA;YACnBC,cACE,EAAA;SAEJ,EAAA;YACEC,EAAId,EAAAA;AACN,SAAA;;AAIR;;;;"}
@@ -0,0 +1,155 @@
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 icons = require('@strapi/icons');
7
+ var reactIntl = require('react-intl');
8
+ var styledComponents = require('styled-components');
9
+ var getTranslation = require('../utils/getTranslation.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 TextAlignTypography = styledComponents.styled(designSystem.Typography)`
31
+ text-align: center;
32
+ `;
33
+ const CheckboxConfirmation = ({ description, isCreating = false, intlLabel, name, onChange, value })=>{
34
+ const { formatMessage } = reactIntl.useIntl();
35
+ const [isOpen, setIsOpen] = React__namespace.useState(false);
36
+ const handleChange = (value)=>{
37
+ if (isCreating || value) {
38
+ return onChange({
39
+ target: {
40
+ name,
41
+ value,
42
+ type: 'checkbox'
43
+ }
44
+ });
45
+ }
46
+ if (!value) {
47
+ return setIsOpen(true);
48
+ }
49
+ return null;
50
+ };
51
+ const handleConfirm = ()=>{
52
+ onChange({
53
+ target: {
54
+ name,
55
+ value: false,
56
+ type: 'checkbox'
57
+ }
58
+ });
59
+ };
60
+ const label = intlLabel.id ? formatMessage({
61
+ id: intlLabel.id,
62
+ defaultMessage: intlLabel.defaultMessage
63
+ }, {
64
+ ...intlLabel.values
65
+ }) : name;
66
+ const hint = description ? formatMessage({
67
+ id: description.id,
68
+ defaultMessage: description.defaultMessage
69
+ }, {
70
+ ...description.values
71
+ }) : '';
72
+ return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Dialog.Root, {
73
+ open: isOpen,
74
+ onOpenChange: setIsOpen,
75
+ children: [
76
+ /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Field.Root, {
77
+ hint: hint,
78
+ name: name,
79
+ children: [
80
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Checkbox, {
81
+ onCheckedChange: handleChange,
82
+ checked: value,
83
+ children: label
84
+ }),
85
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Field.Hint, {})
86
+ ]
87
+ }),
88
+ /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Dialog.Content, {
89
+ children: [
90
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Dialog.Header, {
91
+ children: formatMessage({
92
+ id: getTranslation.getTranslation('CheckboxConfirmation.Modal.title'),
93
+ defaultMessage: 'Disable localization'
94
+ })
95
+ }),
96
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Dialog.Body, {
97
+ icon: /*#__PURE__*/ jsxRuntime.jsx(icons.WarningCircle, {}),
98
+ children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
99
+ direction: "column",
100
+ alignItems: "stretch",
101
+ gap: 2,
102
+ children: [
103
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Flex, {
104
+ justifyContent: "center",
105
+ children: /*#__PURE__*/ jsxRuntime.jsx(TextAlignTypography, {
106
+ children: formatMessage({
107
+ id: getTranslation.getTranslation('CheckboxConfirmation.Modal.content'),
108
+ defaultMessage: 'Disabling localization will engender the deletion of all your content but the one associated to your default locale (if existing).'
109
+ })
110
+ })
111
+ }),
112
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Flex, {
113
+ justifyContent: "center",
114
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
115
+ fontWeight: "semiBold",
116
+ children: formatMessage({
117
+ id: getTranslation.getTranslation('CheckboxConfirmation.Modal.body'),
118
+ defaultMessage: 'Do you want to disable it?'
119
+ })
120
+ })
121
+ })
122
+ ]
123
+ })
124
+ }),
125
+ /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Dialog.Footer, {
126
+ children: [
127
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Dialog.Cancel, {
128
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Button, {
129
+ variant: "tertiary",
130
+ children: formatMessage({
131
+ id: 'components.popUpWarning.button.cancel',
132
+ defaultMessage: 'No, cancel'
133
+ })
134
+ })
135
+ }),
136
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Dialog.Action, {
137
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Button, {
138
+ variant: "danger-light",
139
+ onClick: handleConfirm,
140
+ children: formatMessage({
141
+ id: getTranslation.getTranslation('CheckboxConfirmation.Modal.button-confirm'),
142
+ defaultMessage: 'Yes, disable'
143
+ })
144
+ })
145
+ })
146
+ ]
147
+ })
148
+ ]
149
+ })
150
+ ]
151
+ });
152
+ };
153
+
154
+ exports.CheckboxConfirmation = CheckboxConfirmation;
155
+ //# sourceMappingURL=CheckboxConfirmation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckboxConfirmation.js","sources":["../../../admin/src/components/CheckboxConfirmation.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Button, Checkbox, Dialog, Field, Flex, Typography } from '@strapi/design-system';\nimport { WarningCircle } from '@strapi/icons';\nimport { MessageDescriptor, useIntl } from 'react-intl';\nimport { styled } from 'styled-components';\n\nimport { getTranslation } from '../utils/getTranslation';\n\nconst TextAlignTypography = styled(Typography)`\n text-align: center;\n`;\n\ninterface IntlMessage extends MessageDescriptor {\n values: object;\n}\n\ninterface CheckboxConfirmationProps {\n description: IntlMessage;\n intlLabel: IntlMessage;\n isCreating?: boolean;\n name: string;\n onChange: (event: { target: { name: string; value: boolean; type: string } }) => void;\n value: boolean;\n}\n\nconst CheckboxConfirmation = ({\n description,\n isCreating = false,\n intlLabel,\n name,\n onChange,\n value,\n}: CheckboxConfirmationProps) => {\n const { formatMessage } = useIntl();\n const [isOpen, setIsOpen] = React.useState(false);\n\n const handleChange = (value: boolean) => {\n if (isCreating || value) {\n return onChange({ target: { name, value, type: 'checkbox' } });\n }\n\n if (!value) {\n return setIsOpen(true);\n }\n\n return null;\n };\n\n const handleConfirm = () => {\n onChange({ target: { name, value: false, type: 'checkbox' } });\n };\n\n const label = intlLabel.id\n ? formatMessage(\n { id: intlLabel.id, defaultMessage: intlLabel.defaultMessage },\n { ...intlLabel.values }\n )\n : name;\n\n const hint = description\n ? formatMessage(\n { id: description.id, defaultMessage: description.defaultMessage },\n { ...description.values }\n )\n : '';\n\n return (\n <Dialog.Root open={isOpen} onOpenChange={setIsOpen}>\n <Field.Root hint={hint} name={name}>\n <Checkbox onCheckedChange={handleChange} checked={value}>\n {label}\n </Checkbox>\n <Field.Hint />\n </Field.Root>\n <Dialog.Content>\n <Dialog.Header>\n {formatMessage({\n id: getTranslation('CheckboxConfirmation.Modal.title'),\n defaultMessage: 'Disable localization',\n })}\n </Dialog.Header>\n <Dialog.Body icon={<WarningCircle />}>\n <Flex direction=\"column\" alignItems=\"stretch\" gap={2}>\n <Flex justifyContent=\"center\">\n <TextAlignTypography>\n {formatMessage({\n id: getTranslation('CheckboxConfirmation.Modal.content'),\n defaultMessage:\n 'Disabling localization will engender the deletion of all your content but the one associated to your default locale (if existing).',\n })}\n </TextAlignTypography>\n </Flex>\n <Flex justifyContent=\"center\">\n <Typography fontWeight=\"semiBold\">\n {formatMessage({\n id: getTranslation('CheckboxConfirmation.Modal.body'),\n defaultMessage: 'Do you want to disable it?',\n })}\n </Typography>\n </Flex>\n </Flex>\n </Dialog.Body>\n <Dialog.Footer>\n <Dialog.Cancel>\n <Button variant=\"tertiary\">\n {formatMessage({\n id: 'components.popUpWarning.button.cancel',\n defaultMessage: 'No, cancel',\n })}\n </Button>\n </Dialog.Cancel>\n <Dialog.Action>\n <Button variant=\"danger-light\" onClick={handleConfirm}>\n {formatMessage({\n id: getTranslation('CheckboxConfirmation.Modal.button-confirm'),\n defaultMessage: 'Yes, disable',\n })}\n </Button>\n </Dialog.Action>\n </Dialog.Footer>\n </Dialog.Content>\n </Dialog.Root>\n );\n};\n\nexport { CheckboxConfirmation };\n"],"names":["TextAlignTypography","styled","Typography","CheckboxConfirmation","description","isCreating","intlLabel","name","onChange","value","formatMessage","useIntl","isOpen","setIsOpen","React","useState","handleChange","target","type","handleConfirm","label","id","defaultMessage","values","hint","_jsxs","Dialog","Root","open","onOpenChange","Field","_jsx","Checkbox","onCheckedChange","checked","Hint","Content","Header","getTranslation","Body","icon","WarningCircle","Flex","direction","alignItems","gap","justifyContent","fontWeight","Footer","Cancel","Button","variant","Action","onClick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAMA,mBAAAA,GAAsBC,uBAAOC,CAAAA,uBAAAA,CAAW;;AAE9C,CAAC;AAeD,MAAMC,oBAAuB,GAAA,CAAC,EAC5BC,WAAW,EACXC,UAAa,GAAA,KAAK,EAClBC,SAAS,EACTC,IAAI,EACJC,QAAQ,EACRC,KAAK,EACqB,GAAA;IAC1B,MAAM,EAAEC,aAAa,EAAE,GAAGC,iBAAAA,EAAAA;AAC1B,IAAA,MAAM,CAACC,MAAQC,EAAAA,SAAAA,CAAU,GAAGC,gBAAAA,CAAMC,QAAQ,CAAC,KAAA,CAAA;AAE3C,IAAA,MAAMC,eAAe,CAACP,KAAAA,GAAAA;AACpB,QAAA,IAAIJ,cAAcI,KAAO,EAAA;AACvB,YAAA,OAAOD,QAAS,CAAA;gBAAES,MAAQ,EAAA;AAAEV,oBAAAA,IAAAA;AAAME,oBAAAA,KAAAA;oBAAOS,IAAM,EAAA;AAAW;AAAE,aAAA,CAAA;AAC9D;AAEA,QAAA,IAAI,CAACT,KAAO,EAAA;AACV,YAAA,OAAOI,SAAU,CAAA,IAAA,CAAA;AACnB;QAEA,OAAO,IAAA;AACT,KAAA;AAEA,IAAA,MAAMM,aAAgB,GAAA,IAAA;QACpBX,QAAS,CAAA;YAAES,MAAQ,EAAA;AAAEV,gBAAAA,IAAAA;gBAAME,KAAO,EAAA,KAAA;gBAAOS,IAAM,EAAA;AAAW;A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from 'react';
3
+ import { Typography, Dialog, Field, Checkbox, Flex, Button } from '@strapi/design-system';
4
+ import { WarningCircle } from '@strapi/icons';
5
+ import { useIntl } from 'react-intl';
6
+ import { styled } from 'styled-components';
7
+ import { getTranslation } from '../utils/getTranslation.mjs';
8
+
9
+ const TextAlignTypography = styled(Typography)`
10
+ text-align: center;
11
+ `;
12
+ const CheckboxConfirmation = ({ description, isCreating = false, intlLabel, name, onChange, value })=>{
13
+ const { formatMessage } = useIntl();
14
+ const [isOpen, setIsOpen] = React.useState(false);
15
+ const handleChange = (value)=>{
16
+ if (isCreating || value) {
17
+ return onChange({
18
+ target: {
19
+ name,
20
+ value,
21
+ type: 'checkbox'
22
+ }
23
+ });
24
+ }
25
+ if (!value) {
26
+ return setIsOpen(true);
27
+ }
28
+ return null;
29
+ };
30
+ const handleConfirm = ()=>{
31
+ onChange({
32
+ target: {
33
+ name,
34
+ value: false,
35
+ type: 'checkbox'
36
+ }
37
+ });
38
+ };
39
+ const label = intlLabel.id ? formatMessage({
40
+ id: intlLabel.id,
41
+ defaultMessage: intlLabel.defaultMessage
42
+ }, {
43
+ ...intlLabel.values
44
+ }) : name;
45
+ const hint = description ? formatMessage({
46
+ id: description.id,
47
+ defaultMessage: description.defaultMessage
48
+ }, {
49
+ ...description.values
50
+ }) : '';
51
+ return /*#__PURE__*/ jsxs(Dialog.Root, {
52
+ open: isOpen,
53
+ onOpenChange: setIsOpen,
54
+ children: [
55
+ /*#__PURE__*/ jsxs(Field.Root, {
56
+ hint: hint,
57
+ name: name,
58
+ children: [
59
+ /*#__PURE__*/ jsx(Checkbox, {
60
+ onCheckedChange: handleChange,
61
+ checked: value,
62
+ children: label
63
+ }),
64
+ /*#__PURE__*/ jsx(Field.Hint, {})
65
+ ]
66
+ }),
67
+ /*#__PURE__*/ jsxs(Dialog.Content, {
68
+ children: [
69
+ /*#__PURE__*/ jsx(Dialog.Header, {
70
+ children: formatMessage({
71
+ id: getTranslation('CheckboxConfirmation.Modal.title'),
72
+ defaultMessage: 'Disable localization'
73
+ })
74
+ }),
75
+ /*#__PURE__*/ jsx(Dialog.Body, {
76
+ icon: /*#__PURE__*/ jsx(WarningCircle, {}),
77
+ children: /*#__PURE__*/ jsxs(Flex, {
78
+ direction: "column",
79
+ alignItems: "stretch",
80
+ gap: 2,
81
+ children: [
82
+ /*#__PURE__*/ jsx(Flex, {
83
+ justifyContent: "center",
84
+ children: /*#__PURE__*/ jsx(TextAlignTypography, {
85
+ children: formatMessage({
86
+ id: getTranslation('CheckboxConfirmation.Modal.content'),
87
+ defaultMessage: 'Disabling localization will engender the deletion of all your content but the one associated to your default locale (if existing).'
88
+ })
89
+ })
90
+ }),
91
+ /*#__PURE__*/ jsx(Flex, {
92
+ justifyContent: "center",
93
+ children: /*#__PURE__*/ jsx(Typography, {
94
+ fontWeight: "semiBold",
95
+ children: formatMessage({
96
+ id: getTranslation('CheckboxConfirmation.Modal.body'),
97
+ defaultMessage: 'Do you want to disable it?'
98
+ })
99
+ })
100
+ })
101
+ ]
102
+ })
103
+ }),
104
+ /*#__PURE__*/ jsxs(Dialog.Footer, {
105
+ children: [
106
+ /*#__PURE__*/ jsx(Dialog.Cancel, {
107
+ children: /*#__PURE__*/ jsx(Button, {
108
+ variant: "tertiary",
109
+ children: formatMessage({
110
+ id: 'components.popUpWarning.button.cancel',
111
+ defaultMessage: 'No, cancel'
112
+ })
113
+ })
114
+ }),
115
+ /*#__PURE__*/ jsx(Dialog.Action, {
116
+ children: /*#__PURE__*/ jsx(Button, {
117
+ variant: "danger-light",
118
+ onClick: handleConfirm,
119
+ children: formatMessage({
120
+ id: getTranslation('CheckboxConfirmation.Modal.button-confirm'),
121
+ defaultMessage: 'Yes, disable'
122
+ })
123
+ })
124
+ })
125
+ ]
126
+ })
127
+ ]
128
+ })
129
+ ]
130
+ });
131
+ };
132
+
133
+ export { CheckboxConfirmation };
134
+ //# sourceMappingURL=CheckboxConfirmation.mjs.map