@strapi/i18n 0.0.0-next.614aaf36aaf7e94667b876f02949c3651d9715da → 0.0.0-next.62638801ce303ba9d03355a9f041541cc6668ae0
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.
- package/dist/admin/components/BulkLocaleActionModal.js +262 -0
- package/dist/admin/components/BulkLocaleActionModal.js.map +1 -0
- package/dist/admin/components/BulkLocaleActionModal.mjs +260 -0
- package/dist/admin/components/BulkLocaleActionModal.mjs.map +1 -0
- package/dist/admin/components/CMHeaderActions.js +995 -0
- package/dist/admin/components/CMHeaderActions.js.map +1 -0
- package/dist/admin/components/CMHeaderActions.mjs +969 -0
- package/dist/admin/components/CMHeaderActions.mjs.map +1 -0
- package/dist/admin/components/CMListViewModalsAdditionalInformation.js +69 -0
- package/dist/admin/components/CMListViewModalsAdditionalInformation.js.map +1 -0
- package/dist/admin/components/CMListViewModalsAdditionalInformation.mjs +65 -0
- package/dist/admin/components/CMListViewModalsAdditionalInformation.mjs.map +1 -0
- package/dist/admin/components/CheckboxConfirmation.js +155 -0
- package/dist/admin/components/CheckboxConfirmation.js.map +1 -0
- package/dist/admin/components/CheckboxConfirmation.mjs +134 -0
- package/dist/admin/components/CheckboxConfirmation.mjs.map +1 -0
- package/dist/admin/components/CreateLocale.js +399 -0
- package/dist/admin/components/CreateLocale.js.map +1 -0
- package/dist/admin/components/CreateLocale.mjs +373 -0
- package/dist/admin/components/CreateLocale.mjs.map +1 -0
- package/dist/admin/components/DeleteLocale.js +90 -0
- package/dist/admin/components/DeleteLocale.js.map +1 -0
- package/dist/admin/components/DeleteLocale.mjs +69 -0
- package/dist/admin/components/DeleteLocale.mjs.map +1 -0
- package/dist/admin/components/EditLocale.js +212 -0
- package/dist/admin/components/EditLocale.js.map +1 -0
- package/dist/admin/components/EditLocale.mjs +190 -0
- package/dist/admin/components/EditLocale.mjs.map +1 -0
- package/dist/admin/components/LocaleListCell.js +102 -0
- package/dist/admin/components/LocaleListCell.js.map +1 -0
- package/dist/admin/components/LocaleListCell.mjs +100 -0
- package/dist/admin/components/LocaleListCell.mjs.map +1 -0
- package/dist/admin/components/LocalePicker.js +105 -0
- package/dist/admin/components/LocalePicker.js.map +1 -0
- package/dist/admin/components/LocalePicker.mjs +84 -0
- package/dist/admin/components/LocalePicker.mjs.map +1 -0
- package/dist/admin/components/LocaleTable.js +143 -0
- package/dist/admin/components/LocaleTable.js.map +1 -0
- package/dist/admin/components/LocaleTable.mjs +122 -0
- package/dist/admin/components/LocaleTable.mjs.map +1 -0
- package/dist/admin/constants.js +37 -0
- package/dist/admin/constants.js.map +1 -0
- package/dist/admin/constants.mjs +35 -0
- package/dist/admin/constants.mjs.map +1 -0
- package/dist/admin/contentManagerHooks/editView.js +109 -0
- package/dist/admin/contentManagerHooks/editView.js.map +1 -0
- package/dist/admin/contentManagerHooks/editView.mjs +88 -0
- package/dist/admin/contentManagerHooks/editView.mjs.map +1 -0
- package/dist/admin/contentManagerHooks/listView.js +44 -0
- package/dist/admin/contentManagerHooks/listView.js.map +1 -0
- package/dist/admin/contentManagerHooks/listView.mjs +42 -0
- package/dist/admin/contentManagerHooks/listView.mjs.map +1 -0
- package/dist/admin/contentReleasesHooks/releaseDetailsView.js +20 -0
- package/dist/admin/contentReleasesHooks/releaseDetailsView.js.map +1 -0
- package/dist/admin/contentReleasesHooks/releaseDetailsView.mjs +18 -0
- package/dist/admin/contentReleasesHooks/releaseDetailsView.mjs.map +1 -0
- package/dist/admin/hooks/useAILocalizationJobsPolling.js +110 -0
- package/dist/admin/hooks/useAILocalizationJobsPolling.js.map +1 -0
- package/dist/admin/hooks/useAILocalizationJobsPolling.mjs +89 -0
- package/dist/admin/hooks/useAILocalizationJobsPolling.mjs.map +1 -0
- package/dist/admin/hooks/useI18n.js +78 -0
- package/dist/admin/hooks/useI18n.js.map +1 -0
- package/dist/admin/hooks/useI18n.mjs +57 -0
- package/dist/admin/hooks/useI18n.mjs.map +1 -0
- package/dist/admin/index.js +221 -16
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +203 -15
- package/dist/admin/index.mjs.map +1 -1
- package/dist/admin/middlewares/extendCTBAttributeInitialData.js +71 -0
- package/dist/admin/middlewares/extendCTBAttributeInitialData.js.map +1 -0
- package/dist/admin/middlewares/extendCTBAttributeInitialData.mjs +69 -0
- package/dist/admin/middlewares/extendCTBAttributeInitialData.mjs.map +1 -0
- package/dist/admin/middlewares/extendCTBInitialData.js +40 -0
- package/dist/admin/middlewares/extendCTBInitialData.js.map +1 -0
- package/dist/admin/middlewares/extendCTBInitialData.mjs +38 -0
- package/dist/admin/middlewares/extendCTBInitialData.mjs.map +1 -0
- package/dist/admin/middlewares/rbac-middleware.js +49 -0
- package/dist/admin/middlewares/rbac-middleware.js.map +1 -0
- package/dist/admin/middlewares/rbac-middleware.mjs +28 -0
- package/dist/admin/middlewares/rbac-middleware.mjs.map +1 -0
- package/dist/admin/pages/SettingsPage.js +182 -0
- package/dist/admin/pages/SettingsPage.js.map +1 -0
- package/dist/admin/pages/SettingsPage.mjs +179 -0
- package/dist/admin/pages/SettingsPage.mjs.map +1 -0
- package/dist/admin/pluginId.js +6 -0
- package/dist/admin/pluginId.js.map +1 -0
- package/dist/admin/pluginId.mjs +4 -0
- package/dist/admin/pluginId.mjs.map +1 -0
- package/dist/admin/services/aiLocalizationJobs.js +26 -0
- package/dist/admin/services/aiLocalizationJobs.js.map +1 -0
- package/dist/admin/services/aiLocalizationJobs.mjs +24 -0
- package/dist/admin/services/aiLocalizationJobs.mjs.map +1 -0
- package/dist/admin/services/api.js +15 -0
- package/dist/admin/services/api.js.map +1 -0
- package/dist/admin/services/api.mjs +13 -0
- package/dist/admin/services/api.mjs.map +1 -0
- package/dist/admin/services/locales.js +72 -0
- package/dist/admin/services/locales.js.map +1 -0
- package/dist/admin/services/locales.mjs +66 -0
- package/dist/admin/services/locales.mjs.map +1 -0
- package/dist/admin/services/relations.js +23 -0
- package/dist/admin/services/relations.js.map +1 -0
- package/dist/admin/services/relations.mjs +21 -0
- package/dist/admin/services/relations.mjs.map +1 -0
- package/dist/admin/services/settings.js +30 -0
- package/dist/admin/services/settings.js.map +1 -0
- package/dist/admin/services/settings.mjs +27 -0
- package/dist/admin/services/settings.mjs.map +1 -0
- package/dist/admin/src/components/CMHeaderActions.d.ts +17 -4
- package/dist/admin/src/components/LocaleListCell.d.ts +2 -1
- package/dist/admin/src/hooks/useAILocalizationJobsPolling.d.ts +9 -0
- package/dist/admin/src/services/aiLocalizationJobs.d.ts +6 -0
- package/dist/admin/src/services/api.d.ts +1 -1
- package/dist/admin/src/services/locales.d.ts +1 -1
- package/dist/admin/src/services/relations.d.ts +1 -1
- package/dist/admin/src/services/settings.d.ts +5 -0
- package/dist/admin/src/utils/schemas.d.ts +642 -16
- package/dist/admin/{chunks/de-nEMWvIiY.js → translations/de.json.js} +2 -2
- package/dist/admin/translations/de.json.js.map +1 -0
- package/dist/admin/{chunks/de-Cm8mYdaO.mjs → translations/de.json.mjs} +1 -1
- package/dist/admin/translations/de.json.mjs.map +1 -0
- package/dist/admin/{chunks/dk-CYATLPVe.js → translations/dk.json.js} +2 -2
- package/dist/admin/translations/dk.json.js.map +1 -0
- package/dist/admin/{chunks/dk-BeUFOegB.mjs → translations/dk.json.mjs} +1 -1
- package/dist/admin/translations/dk.json.mjs.map +1 -0
- package/dist/admin/{chunks/en-CG5cUCbD.js → translations/en.json.js} +12 -2
- package/dist/admin/translations/en.json.js.map +1 -0
- package/dist/admin/{chunks/en-eWSaCeOb.mjs → translations/en.json.mjs} +11 -1
- package/dist/admin/translations/en.json.mjs.map +1 -0
- package/dist/admin/{chunks/es-CWsogTGm.js → translations/es.json.js} +2 -2
- package/dist/admin/translations/es.json.js.map +1 -0
- package/dist/admin/{chunks/es-DqF_IdAc.mjs → translations/es.json.mjs} +1 -1
- package/dist/admin/translations/es.json.mjs.map +1 -0
- package/dist/admin/{chunks/fr-CC7UFcYd.js → translations/fr.json.js} +2 -2
- package/dist/admin/translations/fr.json.js.map +1 -0
- package/dist/admin/{chunks/fr-CyARbZ3c.mjs → translations/fr.json.mjs} +1 -1
- package/dist/admin/translations/fr.json.mjs.map +1 -0
- package/dist/admin/{chunks/ko-XwGmfhoq.js → translations/ko.json.js} +2 -2
- package/dist/admin/translations/ko.json.js.map +1 -0
- package/dist/admin/{chunks/ko-Ax4NSedM.mjs → translations/ko.json.mjs} +1 -1
- package/dist/admin/translations/ko.json.mjs.map +1 -0
- package/dist/admin/{chunks/pl-B_vzY_ZB.js → translations/pl.json.js} +2 -2
- package/dist/admin/translations/pl.json.js.map +1 -0
- package/dist/admin/{chunks/pl-B-aqvMqL.mjs → translations/pl.json.mjs} +1 -1
- package/dist/admin/translations/pl.json.mjs.map +1 -0
- package/dist/admin/{chunks/ru-WzHcJV1f.js → translations/ru.json.js} +2 -2
- package/dist/admin/translations/ru.json.js.map +1 -0
- package/dist/admin/{chunks/ru-VkPjQ-Sk.mjs → translations/ru.json.mjs} +1 -1
- package/dist/admin/translations/ru.json.mjs.map +1 -0
- package/dist/admin/{chunks/tr-CcWp6u3w.js → translations/tr.json.js} +2 -2
- package/dist/admin/translations/tr.json.js.map +1 -0
- package/dist/admin/{chunks/tr-DcTR88c9.mjs → translations/tr.json.mjs} +1 -1
- package/dist/admin/translations/tr.json.mjs.map +1 -0
- package/dist/admin/{chunks/uk-CO6JHYRC.js → translations/uk.json.js} +2 -2
- package/dist/admin/translations/uk.json.js.map +1 -0
- package/dist/admin/{chunks/uk-CMz6iPag.mjs → translations/uk.json.mjs} +1 -1
- package/dist/admin/translations/uk.json.mjs.map +1 -0
- package/dist/admin/{chunks/zh-Hans-DnU2bhri.js → translations/zh-Hans.json.js} +2 -2
- package/dist/admin/translations/zh-Hans.json.js.map +1 -0
- package/dist/admin/{chunks/zh-Hans-L3wsRegj.mjs → translations/zh-Hans.json.mjs} +1 -1
- package/dist/admin/translations/zh-Hans.json.mjs.map +1 -0
- package/dist/admin/{chunks/zh-C9So4SGq.js → translations/zh.json.js} +2 -2
- package/dist/admin/translations/zh.json.js.map +1 -0
- package/dist/admin/{chunks/zh-RZyMiPIs.mjs → translations/zh.json.mjs} +1 -1
- package/dist/admin/translations/zh.json.mjs.map +1 -0
- package/dist/admin/utils/baseQuery.js +8 -0
- package/dist/admin/utils/baseQuery.js.map +1 -0
- package/dist/admin/utils/baseQuery.mjs +6 -0
- package/dist/admin/utils/baseQuery.mjs.map +1 -0
- package/dist/admin/utils/clean.js +70 -0
- package/dist/admin/utils/clean.js.map +1 -0
- package/dist/admin/utils/clean.mjs +68 -0
- package/dist/admin/utils/clean.mjs.map +1 -0
- package/dist/admin/utils/fields.js +34 -0
- package/dist/admin/utils/fields.js.map +1 -0
- package/dist/admin/utils/fields.mjs +31 -0
- package/dist/admin/utils/fields.mjs.map +1 -0
- package/dist/admin/utils/getTranslation.js +8 -0
- package/dist/admin/utils/getTranslation.js.map +1 -0
- package/dist/admin/utils/getTranslation.mjs +6 -0
- package/dist/admin/utils/getTranslation.mjs.map +1 -0
- package/dist/admin/utils/prefixPluginTranslations.js +11 -0
- package/dist/admin/utils/prefixPluginTranslations.js.map +1 -0
- package/dist/admin/utils/prefixPluginTranslations.mjs +9 -0
- package/dist/admin/utils/prefixPluginTranslations.mjs.map +1 -0
- package/dist/admin/utils/schemas.js +74 -0
- package/dist/admin/utils/schemas.js.map +1 -0
- package/dist/admin/utils/schemas.mjs +72 -0
- package/dist/admin/utils/schemas.mjs.map +1 -0
- package/dist/admin/utils/strings.js +6 -0
- package/dist/admin/utils/strings.js.map +1 -0
- package/dist/admin/utils/strings.mjs +4 -0
- package/dist/admin/utils/strings.mjs.map +1 -0
- package/dist/server/bootstrap.js +95 -0
- package/dist/server/bootstrap.js.map +1 -0
- package/dist/server/bootstrap.mjs +93 -0
- package/dist/server/bootstrap.mjs.map +1 -0
- package/dist/server/constants/index.js +29 -0
- package/dist/server/constants/index.js.map +1 -0
- package/dist/server/constants/index.mjs +25 -0
- package/dist/server/constants/index.mjs.map +1 -0
- package/dist/server/constants/iso-locales.json.js +2427 -0
- package/dist/server/constants/iso-locales.json.js.map +1 -0
- package/dist/server/constants/iso-locales.json.mjs +2425 -0
- package/dist/server/constants/iso-locales.json.mjs.map +1 -0
- package/dist/server/content-types/index.js +10 -0
- package/dist/server/content-types/index.js.map +1 -0
- package/dist/server/content-types/index.mjs +8 -0
- package/dist/server/content-types/index.mjs.map +1 -0
- package/dist/server/content-types/locale/index.js +10 -0
- package/dist/server/content-types/locale/index.js.map +1 -0
- package/dist/server/content-types/locale/index.mjs +8 -0
- package/dist/server/content-types/locale/index.mjs.map +1 -0
- package/dist/server/content-types/locale/schema.json.js +46 -0
- package/dist/server/content-types/locale/schema.json.js.map +1 -0
- package/dist/server/content-types/locale/schema.json.mjs +38 -0
- package/dist/server/content-types/locale/schema.json.mjs.map +1 -0
- package/dist/server/controllers/ai-localization-jobs.js +47 -0
- package/dist/server/controllers/ai-localization-jobs.js.map +1 -0
- package/dist/server/controllers/ai-localization-jobs.mjs +45 -0
- package/dist/server/controllers/ai-localization-jobs.mjs.map +1 -0
- package/dist/server/controllers/content-types.js +76 -0
- package/dist/server/controllers/content-types.js.map +1 -0
- package/dist/server/controllers/content-types.mjs +74 -0
- package/dist/server/controllers/content-types.mjs.map +1 -0
- package/dist/server/controllers/index.js +18 -0
- package/dist/server/controllers/index.js.map +1 -0
- package/dist/server/controllers/index.mjs +16 -0
- package/dist/server/controllers/index.mjs.map +1 -0
- package/dist/server/controllers/iso-locales.js +13 -0
- package/dist/server/controllers/iso-locales.js.map +1 -0
- package/dist/server/controllers/iso-locales.mjs +11 -0
- package/dist/server/controllers/iso-locales.mjs.map +1 -0
- package/dist/server/controllers/locales.js +108 -0
- package/dist/server/controllers/locales.js.map +1 -0
- package/dist/server/controllers/locales.mjs +87 -0
- package/dist/server/controllers/locales.mjs.map +1 -0
- package/dist/server/controllers/settings.js +24 -0
- package/dist/server/controllers/settings.js.map +1 -0
- package/dist/server/controllers/settings.mjs +22 -0
- package/dist/server/controllers/settings.mjs.map +1 -0
- package/dist/server/controllers/validate-locale-creation.js +47 -0
- package/dist/server/controllers/validate-locale-creation.js.map +1 -0
- package/dist/server/controllers/validate-locale-creation.mjs +45 -0
- package/dist/server/controllers/validate-locale-creation.mjs.map +1 -0
- package/dist/server/domain/locale.js +11 -0
- package/dist/server/domain/locale.js.map +1 -0
- package/dist/server/domain/locale.mjs +9 -0
- package/dist/server/domain/locale.mjs.map +1 -0
- package/dist/server/graphql.js +115 -0
- package/dist/server/graphql.js.map +1 -0
- package/dist/server/graphql.mjs +113 -0
- package/dist/server/graphql.mjs.map +1 -0
- package/dist/server/index.js +10 -3712
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +7 -3691
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/models/ai-localization-job.js +60 -0
- package/dist/server/models/ai-localization-job.js.map +1 -0
- package/dist/server/models/ai-localization-job.mjs +57 -0
- package/dist/server/models/ai-localization-job.mjs.map +1 -0
- package/dist/server/register.js +81 -0
- package/dist/server/register.js.map +1 -0
- package/dist/server/register.mjs +79 -0
- package/dist/server/register.mjs.map +1 -0
- package/dist/server/routes/admin.js +142 -0
- package/dist/server/routes/admin.js.map +1 -0
- package/dist/server/routes/admin.mjs +140 -0
- package/dist/server/routes/admin.mjs.map +1 -0
- package/dist/server/routes/content-api.js +19 -0
- package/dist/server/routes/content-api.js.map +1 -0
- package/dist/server/routes/content-api.mjs +17 -0
- package/dist/server/routes/content-api.mjs.map +1 -0
- package/dist/server/routes/index.js +12 -0
- package/dist/server/routes/index.js.map +1 -0
- package/dist/server/routes/index.mjs +10 -0
- package/dist/server/routes/index.mjs.map +1 -0
- package/dist/server/routes/validation/locale.js +57 -0
- package/dist/server/routes/validation/locale.js.map +1 -0
- package/dist/server/routes/validation/locale.mjs +36 -0
- package/dist/server/routes/validation/locale.mjs.map +1 -0
- package/dist/server/services/ai-localization-jobs.js +64 -0
- package/dist/server/services/ai-localization-jobs.js.map +1 -0
- package/dist/server/services/ai-localization-jobs.mjs +62 -0
- package/dist/server/services/ai-localization-jobs.mjs.map +1 -0
- package/dist/server/services/ai-localizations.js +268 -0
- package/dist/server/services/ai-localizations.js.map +1 -0
- package/dist/server/services/ai-localizations.mjs +266 -0
- package/dist/server/services/ai-localizations.mjs.map +1 -0
- package/dist/server/services/content-types.js +157 -0
- package/dist/server/services/content-types.js.map +1 -0
- package/dist/server/services/content-types.mjs +155 -0
- package/dist/server/services/content-types.mjs.map +1 -0
- package/dist/server/services/index.js +28 -0
- package/dist/server/services/index.js.map +1 -0
- package/dist/server/services/index.mjs +26 -0
- package/dist/server/services/index.mjs.map +1 -0
- package/dist/server/services/iso-locales.js +12 -0
- package/dist/server/services/iso-locales.js.map +1 -0
- package/dist/server/services/iso-locales.mjs +10 -0
- package/dist/server/services/iso-locales.mjs.map +1 -0
- package/dist/server/services/locales.js +114 -0
- package/dist/server/services/locales.js.map +1 -0
- package/dist/server/services/locales.mjs +112 -0
- package/dist/server/services/locales.mjs.map +1 -0
- package/dist/server/services/localizations.js +68 -0
- package/dist/server/services/localizations.js.map +1 -0
- package/dist/server/services/localizations.mjs +66 -0
- package/dist/server/services/localizations.mjs.map +1 -0
- package/dist/server/services/metrics.js +30 -0
- package/dist/server/services/metrics.js.map +1 -0
- package/dist/server/services/metrics.mjs +28 -0
- package/dist/server/services/metrics.mjs.map +1 -0
- package/dist/server/services/permissions/actions.js +136 -0
- package/dist/server/services/permissions/actions.js.map +1 -0
- package/dist/server/services/permissions/actions.mjs +134 -0
- package/dist/server/services/permissions/actions.mjs.map +1 -0
- package/dist/server/services/permissions/engine.js +52 -0
- package/dist/server/services/permissions/engine.js.map +1 -0
- package/dist/server/services/permissions/engine.mjs +50 -0
- package/dist/server/services/permissions/engine.mjs.map +1 -0
- package/dist/server/services/permissions/sections-builder.js +45 -0
- package/dist/server/services/permissions/sections-builder.js.map +1 -0
- package/dist/server/services/permissions/sections-builder.mjs +43 -0
- package/dist/server/services/permissions/sections-builder.mjs.map +1 -0
- package/dist/server/services/permissions.js +14 -0
- package/dist/server/services/permissions.js.map +1 -0
- package/dist/server/services/permissions.mjs +12 -0
- package/dist/server/services/permissions.mjs.map +1 -0
- package/dist/server/services/sanitize/index.js +34 -0
- package/dist/server/services/sanitize/index.js.map +1 -0
- package/dist/server/services/sanitize/index.mjs +32 -0
- package/dist/server/services/sanitize/index.mjs.map +1 -0
- package/dist/server/services/settings.js +25 -0
- package/dist/server/services/settings.js.map +1 -0
- package/dist/server/services/settings.mjs +23 -0
- package/dist/server/services/settings.mjs.map +1 -0
- package/dist/server/src/bootstrap.d.ts.map +1 -1
- package/dist/server/src/controllers/ai-localization-jobs.d.ts +17 -0
- package/dist/server/src/controllers/ai-localization-jobs.d.ts.map +1 -0
- package/dist/server/src/controllers/index.d.ts +10 -0
- package/dist/server/src/controllers/index.d.ts.map +1 -1
- package/dist/server/src/controllers/settings.d.ts +7 -0
- package/dist/server/src/controllers/settings.d.ts.map +1 -0
- package/dist/server/src/index.d.ts +47 -8
- package/dist/server/src/index.d.ts.map +1 -1
- package/dist/server/src/models/ai-localization-job.d.ts +5 -0
- package/dist/server/src/models/ai-localization-job.d.ts.map +1 -0
- package/dist/server/src/models/index.d.ts +5 -0
- package/dist/server/src/models/index.d.ts.map +1 -0
- package/dist/server/src/register.d.ts +1 -1
- package/dist/server/src/register.d.ts.map +1 -1
- package/dist/server/src/routes/admin.d.ts.map +1 -1
- package/dist/server/src/routes/content-api.d.ts +5 -8
- package/dist/server/src/routes/content-api.d.ts.map +1 -1
- package/dist/server/src/routes/index.d.ts +3 -7
- package/dist/server/src/routes/index.d.ts.map +1 -1
- package/dist/server/src/routes/validation/index.d.ts +2 -0
- package/dist/server/src/routes/validation/index.d.ts.map +1 -0
- package/dist/server/src/routes/validation/locale.d.ts +41 -0
- package/dist/server/src/routes/validation/locale.d.ts.map +1 -0
- package/dist/server/src/services/ai-localization-jobs.d.ts +26 -0
- package/dist/server/src/services/ai-localization-jobs.d.ts.map +1 -0
- package/dist/server/src/services/ai-localizations.d.ts +18 -0
- package/dist/server/src/services/ai-localizations.d.ts.map +1 -0
- package/dist/server/src/services/index.d.ts +33 -0
- package/dist/server/src/services/index.d.ts.map +1 -1
- package/dist/server/src/services/settings.d.ts +13 -0
- package/dist/server/src/services/settings.d.ts.map +1 -0
- package/dist/server/src/utils/index.d.ts +7 -1
- package/dist/server/src/utils/index.d.ts.map +1 -1
- package/dist/server/src/validation/settings.d.ts +12 -0
- package/dist/server/src/validation/settings.d.ts.map +1 -0
- package/dist/server/utils/index.js +16 -0
- package/dist/server/utils/index.js.map +1 -0
- package/dist/server/utils/index.mjs +13 -0
- package/dist/server/utils/index.mjs.map +1 -0
- package/dist/server/validation/content-types.js +18 -0
- package/dist/server/validation/content-types.js.map +1 -0
- package/dist/server/validation/content-types.mjs +16 -0
- package/dist/server/validation/content-types.mjs.map +1 -0
- package/dist/server/validation/locales.js +23 -0
- package/dist/server/validation/locales.js.map +1 -0
- package/dist/server/validation/locales.mjs +20 -0
- package/dist/server/validation/locales.mjs.map +1 -0
- package/dist/server/validation/settings.js +11 -0
- package/dist/server/validation/settings.js.map +1 -0
- package/dist/server/validation/settings.mjs +9 -0
- package/dist/server/validation/settings.mjs.map +1 -0
- package/dist/shared/contracts/ai-localization-jobs.d.ts +27 -0
- package/dist/shared/contracts/ai-localization-jobs.d.ts.map +1 -0
- package/dist/shared/contracts/settings.d.ts +40 -0
- package/dist/shared/contracts/shared.d.ts.map +1 -0
- package/package.json +13 -10
- package/dist/admin/chunks/SettingsPage-BOEeBbiM.mjs +0 -797
- package/dist/admin/chunks/SettingsPage-BOEeBbiM.mjs.map +0 -1
- package/dist/admin/chunks/SettingsPage-Mg2Ygywx.js +0 -820
- package/dist/admin/chunks/SettingsPage-Mg2Ygywx.js.map +0 -1
- package/dist/admin/chunks/de-Cm8mYdaO.mjs.map +0 -1
- package/dist/admin/chunks/de-nEMWvIiY.js.map +0 -1
- package/dist/admin/chunks/dk-BeUFOegB.mjs.map +0 -1
- package/dist/admin/chunks/dk-CYATLPVe.js.map +0 -1
- package/dist/admin/chunks/en-CG5cUCbD.js.map +0 -1
- package/dist/admin/chunks/en-eWSaCeOb.mjs.map +0 -1
- package/dist/admin/chunks/es-CWsogTGm.js.map +0 -1
- package/dist/admin/chunks/es-DqF_IdAc.mjs.map +0 -1
- package/dist/admin/chunks/fr-CC7UFcYd.js.map +0 -1
- package/dist/admin/chunks/fr-CyARbZ3c.mjs.map +0 -1
- package/dist/admin/chunks/index--VTS8j_L.mjs +0 -2008
- package/dist/admin/chunks/index--VTS8j_L.mjs.map +0 -1
- package/dist/admin/chunks/index-hJ67XV0K.js +0 -2037
- package/dist/admin/chunks/index-hJ67XV0K.js.map +0 -1
- package/dist/admin/chunks/ko-Ax4NSedM.mjs.map +0 -1
- package/dist/admin/chunks/ko-XwGmfhoq.js.map +0 -1
- package/dist/admin/chunks/pl-B-aqvMqL.mjs.map +0 -1
- package/dist/admin/chunks/pl-B_vzY_ZB.js.map +0 -1
- package/dist/admin/chunks/ru-VkPjQ-Sk.mjs.map +0 -1
- package/dist/admin/chunks/ru-WzHcJV1f.js.map +0 -1
- package/dist/admin/chunks/tr-CcWp6u3w.js.map +0 -1
- package/dist/admin/chunks/tr-DcTR88c9.mjs.map +0 -1
- package/dist/admin/chunks/uk-CMz6iPag.mjs.map +0 -1
- package/dist/admin/chunks/uk-CO6JHYRC.js.map +0 -1
- package/dist/admin/chunks/zh-C9So4SGq.js.map +0 -1
- package/dist/admin/chunks/zh-Hans-DnU2bhri.js.map +0 -1
- package/dist/admin/chunks/zh-Hans-L3wsRegj.mjs.map +0 -1
- package/dist/admin/chunks/zh-RZyMiPIs.mjs.map +0 -1
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { identity, propEq } from 'lodash/fp';
|
|
2
|
+
import { errors } from '@strapi/utils';
|
|
3
|
+
|
|
4
|
+
const { ValidationError } = errors;
|
|
5
|
+
const LOCALE_SCALAR_TYPENAME = 'I18NLocaleCode';
|
|
6
|
+
const LOCALE_ARG_PLUGIN_NAME = 'I18NLocaleArg';
|
|
7
|
+
var graphqlProvider = (({ strapi: strapi1 })=>({
|
|
8
|
+
register () {
|
|
9
|
+
const { service: getGraphQLService } = strapi1.plugin('graphql');
|
|
10
|
+
const { service: getI18NService } = strapi1.plugin('i18n');
|
|
11
|
+
const { isLocalizedContentType } = getI18NService('content-types');
|
|
12
|
+
const extensionService = getGraphQLService('extension');
|
|
13
|
+
extensionService.shadowCRUD('plugin::i18n.locale').disableMutations();
|
|
14
|
+
// Disable unwanted fields for localized content types
|
|
15
|
+
Object.entries(strapi1.contentTypes).forEach(([uid, ct])=>{
|
|
16
|
+
if (isLocalizedContentType(ct)) {
|
|
17
|
+
// Disable locale field in localized inputs
|
|
18
|
+
extensionService.shadowCRUD(uid).field('locale').disableInput();
|
|
19
|
+
// Disable localizations field in localized inputs
|
|
20
|
+
extensionService.shadowCRUD(uid).field('localizations').disableInput();
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
extensionService.use(({ nexus, typeRegistry })=>{
|
|
24
|
+
const i18nLocaleArgPlugin = getI18nLocaleArgPlugin({
|
|
25
|
+
nexus,
|
|
26
|
+
typeRegistry
|
|
27
|
+
});
|
|
28
|
+
const i18nLocaleScalar = getLocaleScalar({
|
|
29
|
+
nexus
|
|
30
|
+
});
|
|
31
|
+
return {
|
|
32
|
+
plugins: [
|
|
33
|
+
i18nLocaleArgPlugin
|
|
34
|
+
],
|
|
35
|
+
types: [
|
|
36
|
+
i18nLocaleScalar
|
|
37
|
+
],
|
|
38
|
+
resolversConfig: {
|
|
39
|
+
// Modify the default scope associated to find and findOne locale queries to match the actual action name
|
|
40
|
+
'Query.i18NLocale': {
|
|
41
|
+
auth: {
|
|
42
|
+
scope: 'plugin::i18n.locales.listLocales'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
'Query.i18NLocales': {
|
|
46
|
+
auth: {
|
|
47
|
+
scope: 'plugin::i18n.locales.listLocales'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}));
|
|
55
|
+
const getLocaleScalar = ({ nexus })=>{
|
|
56
|
+
const { service: getI18NService } = strapi.plugin('i18n');
|
|
57
|
+
const locales = getI18NService('iso-locales').getIsoLocales();
|
|
58
|
+
return nexus.scalarType({
|
|
59
|
+
name: LOCALE_SCALAR_TYPENAME,
|
|
60
|
+
description: 'A string used to identify an i18n locale',
|
|
61
|
+
serialize: identity,
|
|
62
|
+
parseValue: identity,
|
|
63
|
+
parseLiteral (ast) {
|
|
64
|
+
if (ast.kind !== 'StringValue') {
|
|
65
|
+
throw new ValidationError('Locale cannot represent non string type');
|
|
66
|
+
}
|
|
67
|
+
const isValidLocale = ast.value === '*' || locales.find(propEq('code', ast.value));
|
|
68
|
+
if (!isValidLocale) {
|
|
69
|
+
throw new ValidationError('Unknown locale supplied');
|
|
70
|
+
}
|
|
71
|
+
return ast.value;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
const getI18nLocaleArgPlugin = ({ nexus, typeRegistry })=>{
|
|
76
|
+
const { service: getI18NService } = strapi.plugin('i18n');
|
|
77
|
+
const { isLocalizedContentType } = getI18NService('content-types');
|
|
78
|
+
return nexus.plugin({
|
|
79
|
+
name: LOCALE_ARG_PLUGIN_NAME,
|
|
80
|
+
onAddOutputField (config) {
|
|
81
|
+
// Add the locale arg to the queries on localized CTs
|
|
82
|
+
const { parentType } = config;
|
|
83
|
+
// Only target queries or mutations
|
|
84
|
+
if (parentType !== 'Query' && parentType !== 'Mutation') {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
let contentType;
|
|
88
|
+
if (config?.extensions?.strapi?.contentType) {
|
|
89
|
+
contentType = config.extensions.strapi.contentType;
|
|
90
|
+
} else {
|
|
91
|
+
const registryType = typeRegistry.get(config.type);
|
|
92
|
+
if (!registryType) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
contentType = registryType.config.contentType;
|
|
96
|
+
}
|
|
97
|
+
// Ignore non-localized content types
|
|
98
|
+
if (!isLocalizedContentType(contentType)) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (!config.args) {
|
|
102
|
+
config.args = {};
|
|
103
|
+
}
|
|
104
|
+
config.args.locale = nexus.arg({
|
|
105
|
+
type: LOCALE_SCALAR_TYPENAME,
|
|
106
|
+
description: 'The locale to use for the query'
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export { graphqlProvider as default };
|
|
113
|
+
//# sourceMappingURL=graphql.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql.mjs","sources":["../../server/src/graphql.ts"],"sourcesContent":["import { propEq, identity } from 'lodash/fp';\nimport { errors } from '@strapi/utils';\nimport type { Core } from '@strapi/types';\n\nconst { ValidationError } = errors;\n\nconst LOCALE_SCALAR_TYPENAME = 'I18NLocaleCode';\nconst LOCALE_ARG_PLUGIN_NAME = 'I18NLocaleArg';\n\nexport default ({ strapi }: { strapi: Core.Strapi }) => ({\n register() {\n const { service: getGraphQLService } = strapi.plugin('graphql');\n const { service: getI18NService } = strapi.plugin('i18n');\n\n const { isLocalizedContentType } = getI18NService('content-types');\n\n const extensionService = getGraphQLService('extension');\n\n extensionService.shadowCRUD('plugin::i18n.locale').disableMutations();\n\n // Disable unwanted fields for localized content types\n Object.entries(strapi.contentTypes).forEach(([uid, ct]) => {\n if (isLocalizedContentType(ct)) {\n // Disable locale field in localized inputs\n extensionService.shadowCRUD(uid).field('locale').disableInput();\n\n // Disable localizations field in localized inputs\n extensionService.shadowCRUD(uid).field('localizations').disableInput();\n }\n });\n\n extensionService.use(({ nexus, typeRegistry }: any) => {\n const i18nLocaleArgPlugin = getI18nLocaleArgPlugin({ nexus, typeRegistry });\n const i18nLocaleScalar = getLocaleScalar({ nexus });\n return {\n plugins: [i18nLocaleArgPlugin],\n types: [i18nLocaleScalar],\n\n resolversConfig: {\n // Modify the default scope associated to find and findOne locale queries to match the actual action name\n 'Query.i18NLocale': { auth: { scope: 'plugin::i18n.locales.listLocales' } },\n 'Query.i18NLocales': { auth: { scope: 'plugin::i18n.locales.listLocales' } },\n },\n };\n });\n },\n});\n\nconst getLocaleScalar = ({ nexus }: any) => {\n const { service: getI18NService } = strapi.plugin('i18n');\n\n const locales = getI18NService('iso-locales').getIsoLocales();\n\n return nexus.scalarType({\n name: LOCALE_SCALAR_TYPENAME,\n\n description: 'A string used to identify an i18n locale',\n\n serialize: identity,\n parseValue: identity,\n\n parseLiteral(ast: any) {\n if (ast.kind !== 'StringValue') {\n throw new ValidationError('Locale cannot represent non string type');\n }\n\n const isValidLocale = ast.value === '*' || locales.find(propEq('code', ast.value));\n\n if (!isValidLocale) {\n throw new ValidationError('Unknown locale supplied');\n }\n\n return ast.value;\n },\n });\n};\n\nconst getI18nLocaleArgPlugin = ({ nexus, typeRegistry }: any) => {\n const { service: getI18NService } = strapi.plugin('i18n');\n\n const { isLocalizedContentType } = getI18NService('content-types');\n\n return nexus.plugin({\n name: LOCALE_ARG_PLUGIN_NAME,\n\n onAddOutputField(config: any) {\n // Add the locale arg to the queries on localized CTs\n\n const { parentType } = config;\n\n // Only target queries or mutations\n if (parentType !== 'Query' && parentType !== 'Mutation') {\n return;\n }\n\n let contentType;\n\n if (config?.extensions?.strapi?.contentType) {\n contentType = config.extensions.strapi.contentType;\n } else {\n const registryType = typeRegistry.get(config.type);\n\n if (!registryType) {\n return;\n }\n\n contentType = registryType.config.contentType;\n }\n\n // Ignore non-localized content types\n if (!isLocalizedContentType(contentType)) {\n return;\n }\n\n if (!config.args) {\n config.args = {};\n }\n\n config.args.locale = nexus.arg({\n type: LOCALE_SCALAR_TYPENAME,\n description: 'The locale to use for the query',\n });\n },\n });\n};\n"],"names":["ValidationError","errors","LOCALE_SCALAR_TYPENAME","LOCALE_ARG_PLUGIN_NAME","strapi","register","service","getGraphQLService","plugin","getI18NService","isLocalizedContentType","extensionService","shadowCRUD","disableMutations","Object","entries","contentTypes","forEach","uid","ct","field","disableInput","use","nexus","typeRegistry","i18nLocaleArgPlugin","getI18nLocaleArgPlugin","i18nLocaleScalar","getLocaleScalar","plugins","types","resolversConfig","auth","scope","locales","getIsoLocales","scalarType","name","description","serialize","identity","parseValue","parseLiteral","ast","kind","isValidLocale","value","find","propEq","onAddOutputField","config","parentType","contentType","extensions","registryType","get","type","args","locale","arg"],"mappings":";;;AAIA,MAAM,EAAEA,eAAe,EAAE,GAAGC,MAAAA;AAE5B,MAAMC,sBAAyB,GAAA,gBAAA;AAC/B,MAAMC,sBAAyB,GAAA,eAAA;AAE/B,sBAAe,CAAA,CAAC,EAAEC,QAAAA,OAAM,EAA2B,IAAM;AACvDC,QAAAA,QAAAA,CAAAA,GAAAA;AACE,YAAA,MAAM,EAAEC,OAASC,EAAAA,iBAAiB,EAAE,GAAGH,OAAAA,CAAOI,MAAM,CAAC,SAAA,CAAA;AACrD,YAAA,MAAM,EAAEF,OAASG,EAAAA,cAAc,EAAE,GAAGL,OAAAA,CAAOI,MAAM,CAAC,MAAA,CAAA;AAElD,YAAA,MAAM,EAAEE,sBAAsB,EAAE,GAAGD,cAAe,CAAA,eAAA,CAAA;AAElD,YAAA,MAAME,mBAAmBJ,iBAAkB,CAAA,WAAA,CAAA;YAE3CI,gBAAiBC,CAAAA,UAAU,CAAC,qBAAA,CAAA,CAAuBC,gBAAgB,EAAA;;YAGnEC,MAAOC,CAAAA,OAAO,CAACX,OAAAA,CAAOY,YAAY,CAAA,CAAEC,OAAO,CAAC,CAAC,CAACC,GAAAA,EAAKC,EAAG,CAAA,GAAA;AACpD,gBAAA,IAAIT,uBAAuBS,EAAK,CAAA,EAAA;;AAE9BR,oBAAAA,gBAAAA,CAAiBC,UAAU,CAACM,GAAAA,CAAAA,CAAKE,KAAK,CAAC,UAAUC,YAAY,EAAA;;AAG7DV,oB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