@strapi/i18n 0.0.0-next.926e9af9369b89a571145e3c8fa1ce6bfd6cc0ab → 0.0.0-next.92e60e369ae0e382a5d486de347f6d286ab22987

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 +2 -1
  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 -3460
  263. package/dist/server/index.js.map +1 -1
  264. package/dist/server/index.mjs +17 -3443
  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 +19 -13
  407. package/dist/_chunks/SettingsPage-B-KzAqT3.mjs +0 -554
  408. package/dist/_chunks/SettingsPage-B-KzAqT3.mjs.map +0 -1
  409. package/dist/_chunks/SettingsPage-hyOi94O9.js +0 -573
  410. package/dist/_chunks/SettingsPage-hyOi94O9.js.map +0 -1
  411. package/dist/_chunks/de-BOhNX_-5.js +0 -65
  412. package/dist/_chunks/de-BOhNX_-5.js.map +0 -1
  413. package/dist/_chunks/de-D80IRBP9.mjs +0 -65
  414. package/dist/_chunks/de-D80IRBP9.mjs.map +0 -1
  415. package/dist/_chunks/dk-CJ6Zzz78.mjs +0 -65
  416. package/dist/_chunks/dk-CJ6Zzz78.mjs.map +0 -1
  417. package/dist/_chunks/dk-cjXm0p3m.js +0 -65
  418. package/dist/_chunks/dk-cjXm0p3m.js.map +0 -1
  419. package/dist/_chunks/en-BTyF7WVW.mjs +0 -80
  420. package/dist/_chunks/en-BTyF7WVW.mjs.map +0 -1
  421. package/dist/_chunks/en-UlC0jh2t.js +0 -80
  422. package/dist/_chunks/en-UlC0jh2t.js.map +0 -1
  423. package/dist/_chunks/es-V8WnPN7w.mjs +0 -65
  424. package/dist/_chunks/es-V8WnPN7w.mjs.map +0 -1
  425. package/dist/_chunks/es-hr9b_HLp.js +0 -65
  426. package/dist/_chunks/es-hr9b_HLp.js.map +0 -1
  427. package/dist/_chunks/fr-BFmBbE0H.js +0 -65
  428. package/dist/_chunks/fr-BFmBbE0H.js.map +0 -1
  429. package/dist/_chunks/fr-F94noFiV.mjs +0 -65
  430. package/dist/_chunks/fr-F94noFiV.mjs.map +0 -1
  431. package/dist/_chunks/index-BcYj5jo9.mjs +0 -1589
  432. package/dist/_chunks/index-BcYj5jo9.mjs.map +0 -1
  433. package/dist/_chunks/index-C8NzsAKp.js +0 -1610
  434. package/dist/_chunks/index-C8NzsAKp.js.map +0 -1
  435. package/dist/_chunks/ko-C40pNQ9b.js +0 -64
  436. package/dist/_chunks/ko-C40pNQ9b.js.map +0 -1
  437. package/dist/_chunks/ko-CF-P3Car.mjs +0 -64
  438. package/dist/_chunks/ko-CF-P3Car.mjs.map +0 -1
  439. package/dist/_chunks/pl-Dxr9RUmD.mjs +0 -65
  440. package/dist/_chunks/pl-Dxr9RUmD.mjs.map +0 -1
  441. package/dist/_chunks/pl-JtWBy-JQ.js +0 -65
  442. package/dist/_chunks/pl-JtWBy-JQ.js.map +0 -1
  443. package/dist/_chunks/ru-B-4sVwXN.mjs +0 -67
  444. package/dist/_chunks/ru-B-4sVwXN.mjs.map +0 -1
  445. package/dist/_chunks/ru-COSWt3Nu.js +0 -67
  446. package/dist/_chunks/ru-COSWt3Nu.js.map +0 -1
  447. package/dist/_chunks/tr-BVj1O5ch.js +0 -65
  448. package/dist/_chunks/tr-BVj1O5ch.js.map +0 -1
  449. package/dist/_chunks/tr-Ccu6Yj11.mjs +0 -65
  450. package/dist/_chunks/tr-Ccu6Yj11.mjs.map +0 -1
  451. package/dist/_chunks/zh-BIz395Ms.mjs +0 -65
  452. package/dist/_chunks/zh-BIz395Ms.mjs.map +0 -1
  453. package/dist/_chunks/zh-Hans-Bfo6_TCM.mjs +0 -56
  454. package/dist/_chunks/zh-Hans-Bfo6_TCM.mjs.map +0 -1
  455. package/dist/_chunks/zh-Hans-DIEm_EMC.js +0 -56
  456. package/dist/_chunks/zh-Hans-DIEm_EMC.js.map +0 -1
  457. package/dist/_chunks/zh-wkBPBkhc.js +0 -65
  458. package/dist/_chunks/zh-wkBPBkhc.js.map +0 -1
@@ -1,7 +1,204 @@
1
- import { i } from "../_chunks/index-BcYj5jo9.mjs";
2
- import "lodash/get";
3
- import "yup";
4
- export {
5
- i as default
1
+ import get from 'lodash/get';
2
+ import * as yup from 'yup';
3
+ import { CheckboxConfirmation } from './components/CheckboxConfirmation.mjs';
4
+ import { AITranslationStatusAction, LocalePickerAction, FillFromAnotherLocaleAction, DeleteLocaleAction, BulkLocalePublishAction, BulkLocaleUnpublishAction } from './components/CMHeaderActions.mjs';
5
+ import { PublishModalAdditionalInfo, UnpublishModalAdditionalInfo, DeleteModalAdditionalInfo } from './components/CMListViewModalsAdditionalInformation.mjs';
6
+ import { LocalePicker } from './components/LocalePicker.mjs';
7
+ import { PERMISSIONS } from './constants.mjs';
8
+ import { mutateEditViewHook } from './contentManagerHooks/editView.mjs';
9
+ import { addColumnToTableHook } from './contentManagerHooks/listView.mjs';
10
+ import { addLocaleToReleasesHook } from './contentReleasesHooks/releaseDetailsView.mjs';
11
+ import { extendCTBAttributeInitialDataMiddleware } from './middlewares/extendCTBAttributeInitialData.mjs';
12
+ import { extendCTBInitialDataMiddleware } from './middlewares/extendCTBInitialData.mjs';
13
+ import { localeMiddleware } from './middlewares/rbac-middleware.mjs';
14
+ import { pluginId } from './pluginId.mjs';
15
+ import { i18nApi } from './services/api.mjs';
16
+ import { LOCALIZED_FIELDS } from './utils/fields.mjs';
17
+ import { getTranslation } from './utils/getTranslation.mjs';
18
+ import { prefixPluginTranslations } from './utils/prefixPluginTranslations.mjs';
19
+ import { mutateCTBContentTypeSchema } from './utils/schemas.mjs';
20
+
21
+ function __variableDynamicImportRuntime1__(path) {
22
+ switch (path) {
23
+ case './translations/de.json': return import('./translations/de.json.mjs');
24
+ case './translations/dk.json': return import('./translations/dk.json.mjs');
25
+ case './translations/en.json': return import('./translations/en.json.mjs');
26
+ case './translations/es.json': return import('./translations/es.json.mjs');
27
+ case './translations/fr.json': return import('./translations/fr.json.mjs');
28
+ case './translations/ko.json': return import('./translations/ko.json.mjs');
29
+ case './translations/pl.json': return import('./translations/pl.json.mjs');
30
+ case './translations/ru.json': return import('./translations/ru.json.mjs');
31
+ case './translations/tr.json': return import('./translations/tr.json.mjs');
32
+ case './translations/uk.json': return import('./translations/uk.json.mjs');
33
+ case './translations/zh-Hans.json': return import('./translations/zh-Hans.json.mjs');
34
+ case './translations/zh.json': return import('./translations/zh.json.mjs');
35
+ default: return new Promise(function(resolve, reject) {
36
+ (typeof queueMicrotask === 'function' ? queueMicrotask : setTimeout)(
37
+ reject.bind(null, new Error("Unknown variable dynamic import: " + path))
38
+ );
39
+ })
40
+ }
41
+ }
42
+ // eslint-disable-next-line import/no-default-export
43
+ var index = {
44
+ register (app) {
45
+ app.addMiddlewares([
46
+ extendCTBAttributeInitialDataMiddleware,
47
+ extendCTBInitialDataMiddleware
48
+ ]);
49
+ app.addMiddlewares([
50
+ ()=>i18nApi.middleware
51
+ ]);
52
+ app.addReducers({
53
+ [i18nApi.reducerPath]: i18nApi.reducer
54
+ });
55
+ app.addRBACMiddleware([
56
+ localeMiddleware
57
+ ]);
58
+ app.registerPlugin({
59
+ id: pluginId,
60
+ name: pluginId
61
+ });
62
+ },
63
+ bootstrap (app) {
64
+ // // Hook that adds a column into the CM's LV table
65
+ app.registerHook('Admin/CM/pages/ListView/inject-column-in-table', addColumnToTableHook);
66
+ app.registerHook('Admin/CM/pages/EditView/mutate-edit-view-layout', mutateEditViewHook);
67
+ // Hooks that checks if the locale is present in the release
68
+ app.registerHook('ContentReleases/pages/ReleaseDetails/add-locale-in-releases', addLocaleToReleasesHook);
69
+ // Add the settings link
70
+ app.addSettingsLink('global', {
71
+ intlLabel: {
72
+ id: getTranslation('plugin.name'),
73
+ defaultMessage: 'Internationalization'
74
+ },
75
+ id: 'internationalization',
76
+ to: 'internationalization',
77
+ Component: ()=>import('./pages/SettingsPage.mjs').then((mod)=>({
78
+ default: mod.ProtectedSettingsPage
79
+ })),
80
+ permissions: PERMISSIONS.accessMain
81
+ });
82
+ const contentManager = app.getPlugin('content-manager');
83
+ contentManager.apis.addDocumentHeaderAction([
84
+ AITranslationStatusAction,
85
+ LocalePickerAction,
86
+ FillFromAnotherLocaleAction
87
+ ]);
88
+ contentManager.apis.addDocumentAction((actions)=>{
89
+ const indexOfDeleteAction = actions.findIndex((action)=>action.type === 'delete');
90
+ actions.splice(indexOfDeleteAction, 0, DeleteLocaleAction);
91
+ return actions;
92
+ });
93
+ contentManager.apis.addDocumentAction((actions)=>{
94
+ // When enabled the bulk locale publish action should be the first action
95
+ // in 'More Document Actions' and therefore the third action in the array
96
+ actions.splice(2, 0, BulkLocalePublishAction);
97
+ actions.splice(5, 0, BulkLocaleUnpublishAction);
98
+ return actions;
99
+ });
100
+ contentManager.injectComponent('listView', 'actions', {
101
+ name: 'i18n-locale-filter',
102
+ Component: LocalePicker
103
+ });
104
+ contentManager.injectComponent('listView', 'publishModalAdditionalInfos', {
105
+ name: 'i18n-publish-bullets-in-modal',
106
+ Component: PublishModalAdditionalInfo
107
+ });
108
+ contentManager.injectComponent('listView', 'unpublishModalAdditionalInfos', {
109
+ name: 'i18n-unpublish-bullets-in-modal',
110
+ Component: UnpublishModalAdditionalInfo
111
+ });
112
+ contentManager.injectComponent('listView', 'deleteModalAdditionalInfos', {
113
+ name: 'i18n-delete-bullets-in-modal',
114
+ Component: DeleteModalAdditionalInfo
115
+ });
116
+ const ctbPlugin = app.getPlugin('content-type-builder');
117
+ if (ctbPlugin) {
118
+ const ctbFormsAPI = ctbPlugin.apis.forms;
119
+ ctbFormsAPI.addContentTypeSchemaMutation(mutateCTBContentTypeSchema);
120
+ ctbFormsAPI.components.add({
121
+ id: 'checkboxConfirmation',
122
+ component: CheckboxConfirmation
123
+ });
124
+ ctbFormsAPI.extendContentType({
125
+ validator: ()=>({
126
+ i18n: yup.object().shape({
127
+ localized: yup.bool()
128
+ })
129
+ }),
130
+ form: {
131
+ advanced () {
132
+ return [
133
+ {
134
+ name: 'pluginOptions.i18n.localized',
135
+ description: {
136
+ id: getTranslation('plugin.schema.i18n.localized.description-content-type'),
137
+ defaultMessage: 'Allows translating an entry into different languages'
138
+ },
139
+ type: 'checkboxConfirmation',
140
+ intlLabel: {
141
+ id: getTranslation('plugin.schema.i18n.localized.label-content-type'),
142
+ defaultMessage: 'Localization'
143
+ }
144
+ }
145
+ ];
146
+ }
147
+ }
148
+ });
149
+ ctbFormsAPI.extendFields(LOCALIZED_FIELDS, {
150
+ form: {
151
+ advanced ({ contentTypeSchema, forTarget, type, step }) {
152
+ if (forTarget !== 'contentType') {
153
+ return [];
154
+ }
155
+ const hasI18nEnabled = get(contentTypeSchema, [
156
+ 'pluginOptions',
157
+ 'i18n',
158
+ 'localized'
159
+ ], false);
160
+ if (!hasI18nEnabled) {
161
+ return [];
162
+ }
163
+ if (type === 'component' && step === '1') {
164
+ return [];
165
+ }
166
+ return [
167
+ {
168
+ name: 'pluginOptions.i18n.localized',
169
+ description: {
170
+ id: getTranslation('plugin.schema.i18n.localized.description-field'),
171
+ defaultMessage: 'The field can have different values in each locale'
172
+ },
173
+ type: 'checkbox',
174
+ intlLabel: {
175
+ id: getTranslation('plugin.schema.i18n.localized.label-field'),
176
+ defaultMessage: 'Enable localization for this field'
177
+ }
178
+ }
179
+ ];
180
+ }
181
+ }
182
+ });
183
+ }
184
+ },
185
+ async registerTrads ({ locales }) {
186
+ const importedTrads = await Promise.all(locales.map((locale)=>{
187
+ return __variableDynamicImportRuntime1__(`./translations/${locale}.json`).then(({ default: data })=>{
188
+ return {
189
+ data: prefixPluginTranslations(data, pluginId),
190
+ locale
191
+ };
192
+ }).catch(()=>{
193
+ return {
194
+ data: {},
195
+ locale
196
+ };
197
+ });
198
+ }));
199
+ return Promise.resolve(importedTrads);
200
+ }
6
201
  };
202
+
203
+ export { index as default };
7
204
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../admin/src/index.ts"],"sourcesContent":["import get from 'lodash/get';\nimport * as yup from 'yup';\n\nimport { CheckboxConfirmation } from './components/CheckboxConfirmation';\nimport {\n BulkLocalePublishAction,\n BulkLocaleUnpublishAction,\n DeleteLocaleAction,\n LocalePickerAction,\n FillFromAnotherLocaleAction,\n AITranslationStatusAction,\n} from './components/CMHeaderActions';\nimport {\n DeleteModalAdditionalInfo,\n PublishModalAdditionalInfo,\n UnpublishModalAdditionalInfo,\n} from './components/CMListViewModalsAdditionalInformation';\nimport { LocalePicker } from './components/LocalePicker';\nimport { PERMISSIONS } from './constants';\nimport { mutateEditViewHook } from './contentManagerHooks/editView';\nimport { addColumnToTableHook } from './contentManagerHooks/listView';\nimport { addLocaleToReleasesHook } from './contentReleasesHooks/releaseDetailsView';\nimport { extendCTBAttributeInitialDataMiddleware } from './middlewares/extendCTBAttributeInitialData';\nimport { extendCTBInitialDataMiddleware } from './middlewares/extendCTBInitialData';\nimport { localeMiddleware } from './middlewares/rbac-middleware';\nimport { pluginId } from './pluginId';\nimport { i18nApi } from './services/api';\nimport { LOCALIZED_FIELDS } from './utils/fields';\nimport { getTranslation } from './utils/getTranslation';\nimport { prefixPluginTranslations } from './utils/prefixPluginTranslations';\nimport { mutateCTBContentTypeSchema } from './utils/schemas';\n\nimport type { DocumentActionComponent } from '@strapi/content-manager/strapi-admin';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n register(app: any) {\n app.addMiddlewares([extendCTBAttributeInitialDataMiddleware, extendCTBInitialDataMiddleware]);\n app.addMiddlewares([() => i18nApi.middleware]);\n app.addReducers({\n [i18nApi.reducerPath]: i18nApi.reducer,\n });\n app.addRBACMiddleware([localeMiddleware]);\n app.registerPlugin({\n id: pluginId,\n name: pluginId,\n });\n },\n bootstrap(app: any) {\n // // Hook that adds a column into the CM's LV table\n app.registerHook('Admin/CM/pages/ListView/inject-column-in-table', addColumnToTableHook);\n app.registerHook('Admin/CM/pages/EditView/mutate-edit-view-layout', mutateEditViewHook);\n // Hooks that checks if the locale is present in the release\n app.registerHook(\n 'ContentReleases/pages/ReleaseDetails/add-locale-in-releases',\n addLocaleToReleasesHook\n );\n\n // Add the settings link\n app.addSettingsLink('global', {\n intlLabel: {\n id: getTranslation('plugin.name'),\n defaultMessage: 'Internationalization',\n },\n id: 'internationalization',\n to: 'internationalization',\n Component: () =>\n import('./pages/SettingsPage').then((mod) => ({ default: mod.ProtectedSettingsPage })),\n permissions: PERMISSIONS.accessMain,\n });\n\n const contentManager = app.getPlugin('content-manager');\n\n contentManager.apis.addDocumentHeaderAction([\n AITranslationStatusAction,\n LocalePickerAction,\n FillFromAnotherLocaleAction,\n ]);\n contentManager.apis.addDocumentAction((actions: DocumentActionComponent[]) => {\n const indexOfDeleteAction = actions.findIndex((action) => action.type === 'delete');\n actions.splice(indexOfDeleteAction, 0, DeleteLocaleAction);\n return actions;\n });\n\n contentManager.apis.addDocumentAction((actions: DocumentActionComponent[]) => {\n // When enabled the bulk locale publish action should be the first action\n // in 'More Document Actions' and therefore the third action in the array\n actions.splice(2, 0, BulkLocalePublishAction);\n actions.splice(5, 0, BulkLocaleUnpublishAction);\n return actions;\n });\n\n contentManager.injectComponent('listView', 'actions', {\n name: 'i18n-locale-filter',\n Component: LocalePicker,\n });\n\n contentManager.injectComponent('listView', 'publishModalAdditionalInfos', {\n name: 'i18n-publish-bullets-in-modal',\n Component: PublishModalAdditionalInfo,\n });\n\n contentManager.injectComponent('listView', 'unpublishModalAdditionalInfos', {\n name: 'i18n-unpublish-bullets-in-modal',\n Component: UnpublishModalAdditionalInfo,\n });\n\n contentManager.injectComponent('listView', 'deleteModalAdditionalInfos', {\n name: 'i18n-delete-bullets-in-modal',\n Component: DeleteModalAdditionalInfo,\n });\n\n const ctbPlugin = app.getPlugin('content-type-builder');\n\n if (ctbPlugin) {\n const ctbFormsAPI = ctbPlugin.apis.forms;\n ctbFormsAPI.addContentTypeSchemaMutation(mutateCTBContentTypeSchema);\n ctbFormsAPI.components.add({ id: 'checkboxConfirmation', component: CheckboxConfirmation });\n\n ctbFormsAPI.extendContentType({\n validator: () => ({\n i18n: yup.object().shape({\n localized: yup.bool(),\n }),\n }),\n form: {\n advanced() {\n return [\n {\n name: 'pluginOptions.i18n.localized',\n description: {\n id: getTranslation('plugin.schema.i18n.localized.description-content-type'),\n defaultMessage: 'Allows translating an entry into different languages',\n },\n type: 'checkboxConfirmation',\n intlLabel: {\n id: getTranslation('plugin.schema.i18n.localized.label-content-type'),\n defaultMessage: 'Localization',\n },\n },\n ];\n },\n },\n });\n\n ctbFormsAPI.extendFields(LOCALIZED_FIELDS, {\n form: {\n advanced({ contentTypeSchema, forTarget, type, step }: any) {\n if (forTarget !== 'contentType') {\n return [];\n }\n\n const hasI18nEnabled = get(\n contentTypeSchema,\n ['pluginOptions', 'i18n', 'localized'],\n false\n );\n\n if (!hasI18nEnabled) {\n return [];\n }\n\n if (type === 'component' && step === '1') {\n return [];\n }\n\n return [\n {\n name: 'pluginOptions.i18n.localized',\n description: {\n id: getTranslation('plugin.schema.i18n.localized.description-field'),\n defaultMessage: 'The field can have different values in each locale',\n },\n type: 'checkbox',\n intlLabel: {\n id: getTranslation('plugin.schema.i18n.localized.label-field'),\n defaultMessage: 'Enable localization for this field',\n },\n },\n ];\n },\n },\n });\n }\n },\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, pluginId),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n"],"names":["register","app","addMiddlewares","extendCTBAttributeInitialDataMiddleware","extendCTBInitialDataMiddleware","i18nApi","middleware","addReducers","reducerPath","reducer","addRBACMiddleware","localeMiddleware","registerPlugin","id","pluginId","name","bootstrap","registerHook","addColumnToTableHook","mutateEditViewHook","addLocaleToReleasesHook","addSettingsLink","intlLabel","getTranslation","defaultMessage","to","Component","then","mod","default","ProtectedSettingsPage","permissions","PERMISSIONS","accessMain","contentManager","getPlugin","apis","addDocumentHeaderAction","AITranslationStatusAction","LocalePickerAction","FillFromAnotherLocaleAction","addDocumentAction","actions","indexOfDeleteAction","findIndex","action","type","splice","DeleteLocaleAction","BulkLocalePublishAction","BulkLocaleUnpublishAction","injectComponent","LocalePicker","PublishModalAdditionalInfo","UnpublishModalAdditionalInfo","DeleteModalAdditionalInfo","ctbPlugin","ctbFormsAPI","forms","addContentTypeSchemaMutation","mutateCTBContentTypeSchema","components","add","component","CheckboxConfirmation","extendContentType","validator","i18n","yup","object","shape","localized","bool","form","advanced","description","extendFields","LOCALIZED_FIELDS","contentTypeSchema","forTarget","step","hasI18nEnabled","get","registerTrads","locales","importedTrads","Promise","all","map","locale","data","prefixPluginTranslations","catch","resolve"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA;AACA,YAAe;AACbA,IAAAA,QAAAA,CAAAA,CAASC,GAAQ,EAAA;AACfA,QAAAA,GAAAA,CAAIC,cAAc,CAAC;AAACC,YAAAA,uCAAAA;AAAyCC,YAAAA;AAA+B,SAAA,CAAA;AAC5FH,QAAAA,GAAAA,CAAIC,cAAc,CAAC;AAAC,YAAA,IAAMG,QAAQC;AAAW,SAAA,CAAA;AAC7CL,QAAAA,GAAAA,CAAIM,WAAW,CAAC;AACd,YAAA,CAACF,OAAQG,CAAAA,WAAW,GAAGH,QAAQI;AACjC,SAAA,CAAA;AACAR,QAAAA,GAAAA,CAAIS,iBAAiB,CAAC;AAACC,YAAAA;AAAiB,SAAA,CAAA;AACxCV,QAAAA,GAAAA,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AA,UAAA;gCACNxB,SAAW,EAAA;AACTT,oCAAAA,EAAAA,EAAIU,cAAe,CAAA,0CAAA,CAAA;oCACnBC,cAAgB,EAAA;AAClB;AACF;AACD,yBAAA;AACH;AACF;AACF,aAAA,CAAA;AACF;AACF,KAAA;IACA,MAAM2D,aAAAA,CAAAA,CAAc,EAAEC,OAAO,EAAyB,EAAA;QACpD,MAAMC,aAAAA,GAAgB,MAAMC,OAAQC,CAAAA,GAAG,CACrCH,OAAQI,CAAAA,GAAG,CAAC,CAACC,MAAAA,GAAAA;AACX,YAAA,OAAO,iCAAM,CAAC,CAAC,eAAe,EAAEA,MAAO,CAAA,KAAK,CAAC,CAAA,CAC1C9D,IAAI,CAAC,CAAC,EAAEE,OAAAA,EAAS6D,IAAI,EAAE,GAAA;gBACtB,OAAO;AACLA,oBAAAA,IAAAA,EAAMC,yBAAyBD,IAAM5E,EAAAA,QAAAA,CAAAA;AACrC2E,oBAAAA;AACF,iBAAA;AACF,aAAA,CAAA,CACCG,KAAK,CAAC,IAAA;gBACL,OAAO;AACLF,oBAAAA,IAAAA,EAAM,EAAC;AACPD,oBAAAA;AACF,iBAAA;AACF,aAAA,CAAA;AACJ,SAAA,CAAA,CAAA;QAGF,OAAOH,OAAAA,CAAQO,OAAO,CAACR,aAAAA,CAAAA;AACzB;AACF,CAAE;;;;"}
@@ -0,0 +1,71 @@
1
+ 'use strict';
2
+
3
+ var get = require('lodash/get');
4
+
5
+ const extendCTBAttributeInitialDataMiddleware = ()=>{
6
+ return ({ getState })=>(next)=>(action)=>{
7
+ const enhanceAction = ({ uid })=>{
8
+ // the block here is to catch the error when trying to access the state
9
+ // of the ctb when the plugin is not mounted
10
+ try {
11
+ const store = getState();
12
+ const type = get(store, [
13
+ 'content-type-builder_dataManagerProvider',
14
+ 'current',
15
+ 'contentTypes',
16
+ uid
17
+ ]);
18
+ if (!type || type.modelType !== 'contentType') {
19
+ return next(action);
20
+ }
21
+ const hasi18nEnabled = get(type, [
22
+ 'pluginOptions',
23
+ 'i18n',
24
+ 'localized'
25
+ ], false);
26
+ if (hasi18nEnabled) {
27
+ return next({
28
+ ...action,
29
+ payload: {
30
+ ...action.payload,
31
+ options: {
32
+ pluginOptions: {
33
+ ...action?.payload?.options?.pluginOptions ?? {},
34
+ i18n: {
35
+ localized: true
36
+ }
37
+ }
38
+ }
39
+ }
40
+ });
41
+ }
42
+ return next(action);
43
+ } catch (err) {
44
+ return next(action);
45
+ }
46
+ };
47
+ const { payload = {}, type } = action ?? {};
48
+ if (type === 'formModal/setAttributeDataSchema' && ![
49
+ 'relation',
50
+ 'component'
51
+ ].includes(payload.attributeType) && !payload.isEditing) {
52
+ return enhanceAction({
53
+ uid: payload.uid
54
+ });
55
+ }
56
+ if (type === 'formModal/setCustomFieldDataSchema' && !payload.isEditing) {
57
+ return enhanceAction({
58
+ uid: payload.uid
59
+ });
60
+ }
61
+ if (type === 'formModal/resetPropsAndSetFormForAddingAnExistingCompo' || type === 'formModal/resetPropsAndSaveCurrentData') {
62
+ return enhanceAction({
63
+ uid: payload.uid
64
+ });
65
+ }
66
+ return next(action);
67
+ };
68
+ };
69
+
70
+ exports.extendCTBAttributeInitialDataMiddleware = extendCTBAttributeInitialDataMiddleware;
71
+ //# sourceMappingURL=extendCTBAttributeInitialData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extendCTBAttributeInitialData.js","sources":["../../../admin/src/middlewares/extendCTBAttributeInitialData.ts"],"sourcesContent":["import get from 'lodash/get';\n\nimport type { Middleware } from '@reduxjs/toolkit';\nimport type { Store } from '@strapi/admin/strapi-admin';\n\nconst extendCTBAttributeInitialDataMiddleware: () => Middleware<\n object,\n ReturnType<Store['getState']>\n> = () => {\n return ({ getState }) =>\n (next) =>\n (action) => {\n const enhanceAction = ({ uid }: { uid: string }) => {\n // the block here is to catch the error when trying to access the state\n // of the ctb when the plugin is not mounted\n try {\n const store = getState();\n\n const type = get(store, [\n 'content-type-builder_dataManagerProvider',\n 'current',\n 'contentTypes',\n uid,\n ]);\n\n if (!type || type.modelType !== 'contentType') {\n return next(action);\n }\n\n const hasi18nEnabled = get(type, ['pluginOptions', 'i18n', 'localized'], false);\n\n if (hasi18nEnabled) {\n return next({\n ...action,\n payload: {\n ...action.payload,\n options: {\n pluginOptions: {\n ...(action?.payload?.options?.pluginOptions ?? {}),\n i18n: {\n localized: true,\n },\n },\n },\n },\n });\n }\n\n return next(action);\n } catch (err) {\n return next(action);\n }\n };\n\n const { payload = {}, type } = action ?? {};\n\n if (\n type === 'formModal/setAttributeDataSchema' &&\n !['relation', 'component'].includes(payload.attributeType) &&\n !payload.isEditing\n ) {\n return enhanceAction({\n uid: payload.uid,\n });\n }\n\n if (type === 'formModal/setCustomFieldDataSchema' && !payload.isEditing) {\n return enhanceAction({\n uid: payload.uid,\n });\n }\n\n if (\n type === 'formModal/resetPropsAndSetFormForAddingAnExistingCompo' ||\n type === 'formModal/resetPropsAndSaveCurrentData'\n ) {\n return enhanceAction({\n uid: payload.uid,\n });\n }\n\n return next(action);\n };\n};\n\nexport { extendCTBAttributeInitialDataMiddleware };\n"],"names":["extendCTBAttributeInitialDataMiddleware","getState","next","action","enhanceAction","uid","store","type","get","modelType","hasi18nEnabled","payload","options","pluginOptions","i18n","localized","err","includes","attributeType","isEditing"],"mappings":";;;;AAKA,MAAMA,uCAGF,GAAA,IAAA;AACF,IAAA,OAAO,CAAC,EAAEC,QAAQ,EAAE,GAClB,CAACC,OACD,CAACC,MAAAA,GAAAA;AACC,gBAAA,MAAMC,aAAgB,GAAA,CAAC,EAAEC,GAAG,EAAmB,GAAA;;;oBAG7C,IAAI;AACF,wBAAA,MAAMC,KAAQL,GAAAA,QAAAA,EAAAA;wBAEd,MAAMM,IAAAA,GAAOC,IAAIF,KAAO,EAAA;AACtB,4BAAA,0CAAA;AACA,4BAAA,SAAA;AACA,4BAAA,cAAA;AACAD,4BAAAA;AACD,yBAAA,CAAA;AAED,wBAAA,IAAI,CAACE,IAAAA,IAAQA,IAAKE,CAAAA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AAA,KAAS,wDACTA,IAAAA,IAAAA,KAAS,wCACT,EAAA;AACA,oBAAA,OAAOH,aAAc,CAAA;AACnBC,wBAAAA,GAAAA,EAAKM,QAAQN;AACf,qBAAA,CAAA;AACF;AAEA,gBAAA,OAAOH,IAAKC,CAAAA,MAAAA,CAAAA;AACd,aAAA;AACJ;;;;"}
@@ -0,0 +1,69 @@
1
+ import get from 'lodash/get';
2
+
3
+ const extendCTBAttributeInitialDataMiddleware = ()=>{
4
+ return ({ getState })=>(next)=>(action)=>{
5
+ const enhanceAction = ({ uid })=>{
6
+ // the block here is to catch the error when trying to access the state
7
+ // of the ctb when the plugin is not mounted
8
+ try {
9
+ const store = getState();
10
+ const type = get(store, [
11
+ 'content-type-builder_dataManagerProvider',
12
+ 'current',
13
+ 'contentTypes',
14
+ uid
15
+ ]);
16
+ if (!type || type.modelType !== 'contentType') {
17
+ return next(action);
18
+ }
19
+ const hasi18nEnabled = get(type, [
20
+ 'pluginOptions',
21
+ 'i18n',
22
+ 'localized'
23
+ ], false);
24
+ if (hasi18nEnabled) {
25
+ return next({
26
+ ...action,
27
+ payload: {
28
+ ...action.payload,
29
+ options: {
30
+ pluginOptions: {
31
+ ...action?.payload?.options?.pluginOptions ?? {},
32
+ i18n: {
33
+ localized: true
34
+ }
35
+ }
36
+ }
37
+ }
38
+ });
39
+ }
40
+ return next(action);
41
+ } catch (err) {
42
+ return next(action);
43
+ }
44
+ };
45
+ const { payload = {}, type } = action ?? {};
46
+ if (type === 'formModal/setAttributeDataSchema' && ![
47
+ 'relation',
48
+ 'component'
49
+ ].includes(payload.attributeType) && !payload.isEditing) {
50
+ return enhanceAction({
51
+ uid: payload.uid
52
+ });
53
+ }
54
+ if (type === 'formModal/setCustomFieldDataSchema' && !payload.isEditing) {
55
+ return enhanceAction({
56
+ uid: payload.uid
57
+ });
58
+ }
59
+ if (type === 'formModal/resetPropsAndSetFormForAddingAnExistingCompo' || type === 'formModal/resetPropsAndSaveCurrentData') {
60
+ return enhanceAction({
61
+ uid: payload.uid
62
+ });
63
+ }
64
+ return next(action);
65
+ };
66
+ };
67
+
68
+ export { extendCTBAttributeInitialDataMiddleware };
69
+ //# sourceMappingURL=extendCTBAttributeInitialData.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extendCTBAttributeInitialData.mjs","sources":["../../../admin/src/middlewares/extendCTBAttributeInitialData.ts"],"sourcesContent":["import get from 'lodash/get';\n\nimport type { Middleware } from '@reduxjs/toolkit';\nimport type { Store } from '@strapi/admin/strapi-admin';\n\nconst extendCTBAttributeInitialDataMiddleware: () => Middleware<\n object,\n ReturnType<Store['getState']>\n> = () => {\n return ({ getState }) =>\n (next) =>\n (action) => {\n const enhanceAction = ({ uid }: { uid: string }) => {\n // the block here is to catch the error when trying to access the state\n // of the ctb when the plugin is not mounted\n try {\n const store = getState();\n\n const type = get(store, [\n 'content-type-builder_dataManagerProvider',\n 'current',\n 'contentTypes',\n uid,\n ]);\n\n if (!type || type.modelType !== 'contentType') {\n return next(action);\n }\n\n const hasi18nEnabled = get(type, ['pluginOptions', 'i18n', 'localized'], false);\n\n if (hasi18nEnabled) {\n return next({\n ...action,\n payload: {\n ...action.payload,\n options: {\n pluginOptions: {\n ...(action?.payload?.options?.pluginOptions ?? {}),\n i18n: {\n localized: true,\n },\n },\n },\n },\n });\n }\n\n return next(action);\n } catch (err) {\n return next(action);\n }\n };\n\n const { payload = {}, type } = action ?? {};\n\n if (\n type === 'formModal/setAttributeDataSchema' &&\n !['relation', 'component'].includes(payload.attributeType) &&\n !payload.isEditing\n ) {\n return enhanceAction({\n uid: payload.uid,\n });\n }\n\n if (type === 'formModal/setCustomFieldDataSchema' && !payload.isEditing) {\n return enhanceAction({\n uid: payload.uid,\n });\n }\n\n if (\n type === 'formModal/resetPropsAndSetFormForAddingAnExistingCompo' ||\n type === 'formModal/resetPropsAndSaveCurrentData'\n ) {\n return enhanceAction({\n uid: payload.uid,\n });\n }\n\n return next(action);\n };\n};\n\nexport { extendCTBAttributeInitialDataMiddleware };\n"],"names":["extendCTBAttributeInitialDataMiddleware","getState","next","action","enhanceAction","uid","store","type","get","modelType","hasi18nEnabled","payload","options","pluginOptions","i18n","localized","err","includes","attributeType","isEditing"],"mappings":";;AAKA,MAAMA,uCAGF,GAAA,IAAA;AACF,IAAA,OAAO,CAAC,EAAEC,QAAQ,EAAE,GAClB,CAACC,OACD,CAACC,MAAAA,GAAAA;AACC,gBAAA,MAAMC,aAAgB,GAAA,CAAC,EAAEC,GAAG,EAAmB,GAAA;;;oBAG7C,IAAI;AACF,wBAAA,MAAMC,KAAQL,GAAAA,QAAAA,EAAAA;wBAEd,MAAMM,IAAAA,GAAOC,IAAIF,KAAO,EAAA;AACtB,4BAAA,0CAAA;AACA,4BAAA,SAAA;AACA,4BAAA,cAAA;AACAD,4BAAAA;AACD,yBAAA,CAAA;AAED,wBAAA,IAAI,CAACE,IAAAA,IAAQA,IAAKE,CAAAA,SAAS,KAAK,aAAe,EAAA;AAC7C,4BAAA,OAAOP,IAAKC,CAAAA,MAAAA,CAAAA;AACd;wBAEA,MAAMO,cAAAA,GAAiBF,IAAID,IAAM,EAAA;AAAC,4BAAA,eAAA;AAAiB,4BAAA,MAAA;AAAQ,4BAAA;yBAAY,EAAE,KAAA,CAAA;AAEzE,wBAAA,IAAIG,cAAgB,EAAA;AAClB,4BAAA,OAAOR,IAAK,CAAA;AACV,gCAAA,GAAGC,MAAM;gCACTQ,OAAS,EAAA;AACP,oCAAA,GAAGR,OAAOQ,OAAO;oCACjBC,OAAS,EAAA;wCACPC,aAAe,EAAA;AACb,4CAAA,GAAIV,MAAQQ,EAAAA,OAAAA,EAASC,OAASC,EAAAA,aAAAA,IAAiB,EAAE;4CACjDC,IAAM,EAAA;gDACJC,SAAW,EAAA;AACb;AACF;AACF;AACF;AACF,6BAAA,CAAA;AACF;AAEA,wBAAA,OAAOb,IAAKC,CAAAA,MAAAA,CAAAA;AACd,qBAAA,CAAE,OAAOa,GAAK,EAAA;AACZ,wBAAA,OAAOd,IAAKC,CAAAA,MAAAA,CAAAA;AACd;AACF,iBAAA;gBAEA,MAAM,EAAEQ,UAAU,EAAE,EAAEJ,IAAI,EAAE,GAAGJ,MAAAA,IAAU,EAAC;gBAE1C,IACEI,IAAAA,KAAS,sCACT,CAAC;AAAC,oBAAA,UAAA;AAAY,oBAAA;iBAAY,CAACU,QAAQ,CAACN,OAAQO,CAAAA,aAAa,KACzD,CAACP,OAAAA,CAAQQ,SAAS,EAClB;AACA,oBAAA,OAAOf,aAAc,CAAA;AACnBC,wBAAAA,GAAAA,EAAKM,QAAQN;AACf,qBAAA,CAAA;AACF;AAEA,gBAAA,IAAIE,IAAS,KAAA,oCAAA,IAAwC,CAACI,OAAAA,CAAQQ,SAAS,EAAE;AACvE,oBAAA,OAAOf,aAAc,CAAA;AACnBC,wBAAAA,GAAAA,EAAKM,QAAQN;AACf,qBAAA,CAAA;AACF;gBAEA,IACEE,IAAAA,KAAS,wDACTA,IAAAA,IAAAA,KAAS,wCACT,EAAA;AACA,oBAAA,OAAOH,aAAc,CAAA;AACnBC,wBAAAA,GAAAA,EAAKM,QAAQN;AACf,qBAAA,CAAA;AACF;AAEA,gBAAA,OAAOH,IAAKC,CAAAA,MAAAA,CAAAA;AACd,aAAA;AACJ;;;;"}
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ const extendCTBInitialDataMiddleware = ()=>{
4
+ return ()=>(next)=>(action)=>{
5
+ if (action.type === 'ContentTypeBuilder/FormModal/SET_DATA_TO_EDIT' && action.modalType === 'contentType') {
6
+ const i18n = {
7
+ localized: false
8
+ };
9
+ const pluginOptions = action.data.pluginOptions ? {
10
+ ...action.data.pluginOptions,
11
+ i18n
12
+ } : {
13
+ i18n
14
+ };
15
+ const data = {
16
+ ...action.data,
17
+ pluginOptions
18
+ };
19
+ if (action.actionType === 'create') {
20
+ return next({
21
+ ...action,
22
+ data
23
+ });
24
+ }
25
+ // Override the action if the pluginOption config does not contain i18n
26
+ // In this case we need to set the proper initialData shape
27
+ if (!action.data.pluginOptions?.i18n?.localized) {
28
+ return next({
29
+ ...action,
30
+ data
31
+ });
32
+ }
33
+ }
34
+ // action is not the one we want to override
35
+ return next(action);
36
+ };
37
+ };
38
+
39
+ exports.extendCTBInitialDataMiddleware = extendCTBInitialDataMiddleware;
40
+ //# sourceMappingURL=extendCTBInitialData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extendCTBInitialData.js","sources":["../../../admin/src/middlewares/extendCTBInitialData.ts"],"sourcesContent":["import type { Middleware } from '@reduxjs/toolkit';\nimport type { Store } from '@strapi/admin/strapi-admin';\n\nconst extendCTBInitialDataMiddleware: () => Middleware<\n object,\n ReturnType<Store['getState']>\n> = () => {\n return () => (next) => (action) => {\n if (\n action.type === 'ContentTypeBuilder/FormModal/SET_DATA_TO_EDIT' &&\n action.modalType === 'contentType'\n ) {\n const i18n = { localized: false };\n\n const pluginOptions = action.data.pluginOptions\n ? { ...action.data.pluginOptions, i18n }\n : { i18n };\n\n const data = { ...action.data, pluginOptions };\n\n if (action.actionType === 'create') {\n return next({ ...action, data });\n }\n\n // Override the action if the pluginOption config does not contain i18n\n // In this case we need to set the proper initialData shape\n if (!action.data.pluginOptions?.i18n?.localized) {\n return next({ ...action, data });\n }\n }\n\n // action is not the one we want to override\n return next(action);\n };\n};\n\nexport { extendCTBInitialDataMiddleware };\n"],"names":["extendCTBInitialDataMiddleware","next","action","type","modalType","i18n","localized","pluginOptions","data","actionType"],"mappings":";;AAGA,MAAMA,8BAGF,GAAA,IAAA;IACF,OAAO,IAAM,CAACC,IAAAA,GAAS,CAACC,MAAAA,GAAAA;AACtB,gBAAA,IACEA,OAAOC,IAAI,KAAK,mDAChBD,MAAOE,CAAAA,SAAS,KAAK,aACrB,EAAA;AACA,oBAAA,MAAMC,IAAO,GAAA;wBAAEC,SAAW,EAAA;AAAM,qBAAA;AAEhC,oBAAA,MAAMC,aAAgBL,GAAAA,MAAAA,CAAOM,IAAI,CAACD,aAAa,GAC3C;wBAAE,GAAGL,MAAAA,CAAOM,IAAI,CAACD,aAAa;AAAEF,wBAAAA;qBAChC,GAAA;AAAEA,wBAAAA;AAAK,qBAAA;AAEX,oBAAA,MAAMG,IAAO,GAAA;AAAE,wBAAA,GAAGN,OAAOM,IAAI;AAAED,wBAAAA;AAAc,qBAAA;oBAE7C,IAAIL,MAAAA,CAAOO,UAAU,KAAK,QAAU,EAAA;AAClC,wBAAA,OAAOR,IAAK,CAAA;AAAE,4BAAA,GAAGC,MAAM;AAAEM,4BAAAA;AAAK,yBAAA,CAAA;AAChC;;;AAIA,oBAAA,IAAI,CAACN,MAAOM,CAAAA,IAAI,CAACD,aAAa,EAAEF,MAAMC,SAAW,EAAA;AAC/C,wBAAA,OAAOL,IAAK,CAAA;AAAE,4BAAA,GAAGC,MAAM;AAAEM,4BAAAA;AAAK,yBAAA,CAAA;AAChC;AACF;;AAGA,gBAAA,OAAOP,IAAKC,CAAAA,MAAAA,CAAAA;AACd,aAAA;AACF;;;;"}
@@ -0,0 +1,38 @@
1
+ const extendCTBInitialDataMiddleware = ()=>{
2
+ return ()=>(next)=>(action)=>{
3
+ if (action.type === 'ContentTypeBuilder/FormModal/SET_DATA_TO_EDIT' && action.modalType === 'contentType') {
4
+ const i18n = {
5
+ localized: false
6
+ };
7
+ const pluginOptions = action.data.pluginOptions ? {
8
+ ...action.data.pluginOptions,
9
+ i18n
10
+ } : {
11
+ i18n
12
+ };
13
+ const data = {
14
+ ...action.data,
15
+ pluginOptions
16
+ };
17
+ if (action.actionType === 'create') {
18
+ return next({
19
+ ...action,
20
+ data
21
+ });
22
+ }
23
+ // Override the action if the pluginOption config does not contain i18n
24
+ // In this case we need to set the proper initialData shape
25
+ if (!action.data.pluginOptions?.i18n?.localized) {
26
+ return next({
27
+ ...action,
28
+ data
29
+ });
30
+ }
31
+ }
32
+ // action is not the one we want to override
33
+ return next(action);
34
+ };
35
+ };
36
+
37
+ export { extendCTBInitialDataMiddleware };
38
+ //# sourceMappingURL=extendCTBInitialData.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extendCTBInitialData.mjs","sources":["../../../admin/src/middlewares/extendCTBInitialData.ts"],"sourcesContent":["import type { Middleware } from '@reduxjs/toolkit';\nimport type { Store } from '@strapi/admin/strapi-admin';\n\nconst extendCTBInitialDataMiddleware: () => Middleware<\n object,\n ReturnType<Store['getState']>\n> = () => {\n return () => (next) => (action) => {\n if (\n action.type === 'ContentTypeBuilder/FormModal/SET_DATA_TO_EDIT' &&\n action.modalType === 'contentType'\n ) {\n const i18n = { localized: false };\n\n const pluginOptions = action.data.pluginOptions\n ? { ...action.data.pluginOptions, i18n }\n : { i18n };\n\n const data = { ...action.data, pluginOptions };\n\n if (action.actionType === 'create') {\n return next({ ...action, data });\n }\n\n // Override the action if the pluginOption config does not contain i18n\n // In this case we need to set the proper initialData shape\n if (!action.data.pluginOptions?.i18n?.localized) {\n return next({ ...action, data });\n }\n }\n\n // action is not the one we want to override\n return next(action);\n };\n};\n\nexport { extendCTBInitialDataMiddleware };\n"],"names":["extendCTBInitialDataMiddleware","next","action","type","modalType","i18n","localized","pluginOptions","data","actionType"],"mappings":"AAGA,MAAMA,8BAGF,GAAA,IAAA;IACF,OAAO,IAAM,CAACC,IAAAA,GAAS,CAACC,MAAAA,GAAAA;AACtB,gBAAA,IACEA,OAAOC,IAAI,KAAK,mDAChBD,MAAOE,CAAAA,SAAS,KAAK,aACrB,EAAA;AACA,oBAAA,MAAMC,IAAO,GAAA;wBAAEC,SAAW,EAAA;AAAM,qBAAA;AAEhC,oBAAA,MAAMC,aAAgBL,GAAAA,MAAAA,CAAOM,IAAI,CAACD,aAAa,GAC3C;wBAAE,GAAGL,MAAAA,CAAOM,IAAI,CAACD,aAAa;AAAEF,wBAAAA;qBAChC,GAAA;AAAEA,wBAAAA;AAAK,qBAAA;AAEX,oBAAA,MAAMG,IAAO,GAAA;AAAE,wBAAA,GAAGN,OAAOM,IAAI;AAAED,wBAAAA;AAAc,qBAAA;oBAE7C,IAAIL,MAAAA,CAAOO,UAAU,KAAK,QAAU,EAAA;AAClC,wBAAA,OAAOR,IAAK,CAAA;AAAE,4BAAA,GAAGC,MAAM;AAAEM,4BAAAA;AAAK,yBAAA,CAAA;AAChC;;;AAIA,oBAAA,IAAI,CAACN,MAAOM,CAAAA,IAAI,CAACD,aAAa,EAAEF,MAAMC,SAAW,EAAA;AAC/C,wBAAA,OAAOL,IAAK,CAAA;AAAE,4BAAA,GAAGC,MAAM;AAAEM,4BAAAA;AAAK,yBAAA,CAAA;AAChC;AACF;;AAGA,gBAAA,OAAOP,IAAKC,CAAAA,MAAAA,CAAAA;AACd,aAAA;AACF;;;;"}
@@ -0,0 +1,49 @@
1
+ 'use strict';
2
+
3
+ var qs = require('qs');
4
+ var reactRouterDom = require('react-router-dom');
5
+
6
+ function _interopNamespaceDefault(e) {
7
+ var n = Object.create(null);
8
+ if (e) {
9
+ Object.keys(e).forEach(function (k) {
10
+ if (k !== 'default') {
11
+ var d = Object.getOwnPropertyDescriptor(e, k);
12
+ Object.defineProperty(n, k, d.get ? d : {
13
+ enumerable: true,
14
+ get: function () { return e[k]; }
15
+ });
16
+ }
17
+ });
18
+ }
19
+ n.default = e;
20
+ return Object.freeze(n);
21
+ }
22
+
23
+ var qs__namespace = /*#__PURE__*/_interopNamespaceDefault(qs);
24
+
25
+ const localeMiddleware = (ctx)=>(next)=>(permissions)=>{
26
+ const match = reactRouterDom.matchPath('/content-manager/:collectionType/:model?/:id', ctx.pathname);
27
+ if (!match) {
28
+ return next(permissions);
29
+ }
30
+ const search = qs__namespace.parse(ctx.search);
31
+ if (typeof search !== 'object') {
32
+ return next(permissions);
33
+ }
34
+ if (!('plugins' in search && typeof search.plugins === 'object')) {
35
+ return next(permissions);
36
+ }
37
+ if (!('i18n' in search.plugins && typeof search.plugins.i18n === 'object' && !Array.isArray(search.plugins.i18n))) {
38
+ return next(permissions);
39
+ }
40
+ const { locale } = search.plugins.i18n;
41
+ if (typeof locale !== 'string') {
42
+ return next(permissions);
43
+ }
44
+ const revisedPermissions = permissions.filter((permission)=>!permission.properties?.locales || permission.properties.locales.includes(locale));
45
+ return next(revisedPermissions);
46
+ };
47
+
48
+ exports.localeMiddleware = localeMiddleware;
49
+ //# sourceMappingURL=rbac-middleware.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rbac-middleware.js","sources":["../../../admin/src/middlewares/rbac-middleware.ts"],"sourcesContent":["/* eslint-disable check-file/filename-naming-convention */\nimport * as qs from 'qs';\nimport { matchPath } from 'react-router-dom';\n\nimport type { RBACMiddleware } from '@strapi/admin/strapi-admin';\n\nconst localeMiddleware: RBACMiddleware = (ctx) => (next) => (permissions) => {\n const match = matchPath('/content-manager/:collectionType/:model?/:id', ctx.pathname);\n\n if (!match) {\n return next(permissions);\n }\n\n const search = qs.parse(ctx.search);\n\n if (typeof search !== 'object') {\n return next(permissions);\n }\n\n if (!('plugins' in search && typeof search.plugins === 'object')) {\n return next(permissions);\n }\n\n if (\n !(\n 'i18n' in search.plugins &&\n typeof search.plugins.i18n === 'object' &&\n !Array.isArray(search.plugins.i18n)\n )\n ) {\n return next(permissions);\n }\n\n const { locale } = search.plugins.i18n;\n\n if (typeof locale !== 'string') {\n return next(permissions);\n }\n\n const revisedPermissions = permissions.filter(\n (permission) =>\n !permission.properties?.locales || permission.properties.locales.includes(locale)\n );\n\n return next(revisedPermissions);\n};\n\nexport { localeMiddleware };\n"],"names":["localeMiddleware","ctx","next","permissions","match","matchPath","pathname","search","qs","parse","plugins","i18n","Array","isArray","locale","revisedPermissions","filter","permission","properties","locales","includes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAMA,gBAAmC,GAAA,CAACC,GAAQ,GAAA,CAACC,OAAS,CAACC,WAAAA,GAAAA;AAC3D,YAAA,MAAMC,KAAQC,GAAAA,wBAAAA,CAAU,8CAAgDJ,EAAAA,GAAAA,CAAIK,QAAQ,CAAA;AAEpF,YAAA,IAAI,CAACF,KAAO,EAAA;AACV,gBAAA,OAAOF,IAAKC,CAAAA,WAAAA,CAAAA;AACd;AAEA,YAAA,MAAMI,MAASC,GAAAA,aAAAA,CAAGC,KAAK,CAACR,IAAIM,MAAM,CAAA;YAElC,IAAI,OAAOA,WAAW,QAAU,EAAA;AAC9B,gBAAA,OAAOL,IAAKC,CAAAA,WAAAA,CAAAA;AACd;YAEA,IAAI,EAAE,SAAaI,IAAAA,MAAAA,IAAU,OAAOA,MAAOG,CAAAA,OAAO,KAAK,QAAO,CAAI,EAAA;AAChE,gBAAA,OAAOR,IAAKC,CAAAA,WAAAA,CAAAA;AACd;YAEA,IACE,EACE,MAAUI,IAAAA,MAAAA,CAAOG,OAAO,IACxB,OAAOH,MAAOG,CAAAA,OAAO,CAACC,IAAI,KAAK,QAC/B,IAAA,CAACC,MAAMC,OAAO,CAACN,OAAOG,OAAO,CAACC,IAAI,CAAA,CAEpC,EAAA;AACA,gBAAA,OAAOT,IAAKC,CAAAA,WAAAA,CAAAA;AACd;AAEA,YAAA,MAAM,EAAEW,MAAM,EAAE,GAAGP,MAAOG,CAAAA,OAAO,CAACC,IAAI;YAEtC,IAAI,OAAOG,WAAW,QAAU,EAAA;AAC9B,gBAAA,OAAOZ,IAAKC,CAAAA,WAAAA,CAAAA;AACd;AAEA,YAAA,MAAMY,qBAAqBZ,WAAYa,CAAAA,MAAM,CAC3C,CAACC,aACC,CAACA,UAAAA,CAAWC,UAAU,EAAEC,WAAWF,UAAWC,CAAAA,UAAU,CAACC,OAAO,CAACC,QAAQ,CAACN,MAAAA,CAAAA,CAAAA;AAG9E,YAAA,OAAOZ,IAAKa,CAAAA,kBAAAA,CAAAA;AACd;;;;"}
@@ -0,0 +1,28 @@
1
+ import * as qs from 'qs';
2
+ import { matchPath } from 'react-router-dom';
3
+
4
+ const localeMiddleware = (ctx)=>(next)=>(permissions)=>{
5
+ const match = matchPath('/content-manager/:collectionType/:model?/:id', ctx.pathname);
6
+ if (!match) {
7
+ return next(permissions);
8
+ }
9
+ const search = qs.parse(ctx.search);
10
+ if (typeof search !== 'object') {
11
+ return next(permissions);
12
+ }
13
+ if (!('plugins' in search && typeof search.plugins === 'object')) {
14
+ return next(permissions);
15
+ }
16
+ if (!('i18n' in search.plugins && typeof search.plugins.i18n === 'object' && !Array.isArray(search.plugins.i18n))) {
17
+ return next(permissions);
18
+ }
19
+ const { locale } = search.plugins.i18n;
20
+ if (typeof locale !== 'string') {
21
+ return next(permissions);
22
+ }
23
+ const revisedPermissions = permissions.filter((permission)=>!permission.properties?.locales || permission.properties.locales.includes(locale));
24
+ return next(revisedPermissions);
25
+ };
26
+
27
+ export { localeMiddleware };
28
+ //# sourceMappingURL=rbac-middleware.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rbac-middleware.mjs","sources":["../../../admin/src/middlewares/rbac-middleware.ts"],"sourcesContent":["/* eslint-disable check-file/filename-naming-convention */\nimport * as qs from 'qs';\nimport { matchPath } from 'react-router-dom';\n\nimport type { RBACMiddleware } from '@strapi/admin/strapi-admin';\n\nconst localeMiddleware: RBACMiddleware = (ctx) => (next) => (permissions) => {\n const match = matchPath('/content-manager/:collectionType/:model?/:id', ctx.pathname);\n\n if (!match) {\n return next(permissions);\n }\n\n const search = qs.parse(ctx.search);\n\n if (typeof search !== 'object') {\n return next(permissions);\n }\n\n if (!('plugins' in search && typeof search.plugins === 'object')) {\n return next(permissions);\n }\n\n if (\n !(\n 'i18n' in search.plugins &&\n typeof search.plugins.i18n === 'object' &&\n !Array.isArray(search.plugins.i18n)\n )\n ) {\n return next(permissions);\n }\n\n const { locale } = search.plugins.i18n;\n\n if (typeof locale !== 'string') {\n return next(permissions);\n }\n\n const revisedPermissions = permissions.filter(\n (permission) =>\n !permission.properties?.locales || permission.properties.locales.includes(locale)\n );\n\n return next(revisedPermissions);\n};\n\nexport { localeMiddleware };\n"],"names":["localeMiddleware","ctx","next","permissions","match","matchPath","pathname","search","qs","parse","plugins","i18n","Array","isArray","locale","revisedPermissions","filter","permission","properties","locales","includes"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