@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 @@
|
|
|
1
|
+
{"version":3,"file":"de.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"de.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dk.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dk.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -20,8 +20,16 @@ var en = {
|
|
|
20
20
|
"CMEditViewBulkLocale.publication-status": "Publication Status",
|
|
21
21
|
"CMEditViewBulkLocale.draft-relation-warning": "Some locales are related to draft entries. Publishing them could leave broken links in your app.",
|
|
22
22
|
"CMEditViewBulkLocale.continue-confirmation": "Are you sure you want to continue?",
|
|
23
|
+
"CMEditViewAITranslation.status-aria-label": "AI Translation Status",
|
|
24
|
+
"CMEditViewAITranslation.status-title": "{enabled, select, true {AI translation enabled} false {AI translation disabled} other {AI translation disabled}}",
|
|
25
|
+
"CMEditViewAITranslation.status-description": "Our AI translates content in all locales each time you save a modification in the default locale.",
|
|
26
|
+
"CMEditViewAITranslation.settings-link": "{enabled, select, true {Disable it in settings} false {Enable it in settings} other {Enable it in settings}}",
|
|
27
|
+
"CMEditViewAITranslation.job-completed": "AI translation completed successfully!",
|
|
28
|
+
"CMEditViewAITranslation.job-failed": "AI translation failed. Please try again.",
|
|
23
29
|
"CMEditViewLocalePicker.locale.create": "Create <bold>{locale}</bold> locale",
|
|
30
|
+
"CMEditViewLocalePicker.locale.ai-translations": "AI Translations:",
|
|
24
31
|
"CMListView.popover.display-locales.label": "Display translated locales",
|
|
32
|
+
"CMListView.popover.display-locales.more": "{locales} + {count} more",
|
|
25
33
|
"CheckboxConfirmation.Modal.body": "Do you want to disable it?",
|
|
26
34
|
"CheckboxConfirmation.Modal.button-confirm": "Yes, disable",
|
|
27
35
|
"CheckboxConfirmation.Modal.content": "Disabling localization will engender the deletion of all your content but the one associated to your default locale (if existing).",
|
|
@@ -36,6 +44,8 @@ var en = {
|
|
|
36
44
|
"Settings.list.description": "Configure the settings for the Internationalization plugin",
|
|
37
45
|
"Settings.list.empty.description": "This is not a usual behavior, meaning that you have eventually modified the database manually. Make sure to have at least one locale saved in your database in order to be able to use Strapi correctly.",
|
|
38
46
|
"Settings.list.empty.title": "There are no locales.",
|
|
47
|
+
"Settings.aiLocalizations.label": "AI Translations",
|
|
48
|
+
"Settings.aiLocalizations.description": "Everytime you save in the Content Manager, our AI will use your default locale to translate all other locales automatically.",
|
|
39
49
|
"Settings.locales.default": "Default",
|
|
40
50
|
"Settings.locales.list.sort.default": "Sort by the default locale",
|
|
41
51
|
"Settings.locales.list.sort.displayName": "Sort by display name",
|
|
@@ -77,5 +87,5 @@ var en = {
|
|
|
77
87
|
"plugin.schema.i18n.localized.label-field": "Enable localization for this field"
|
|
78
88
|
};
|
|
79
89
|
|
|
80
|
-
exports
|
|
81
|
-
//# sourceMappingURL=en
|
|
90
|
+
module.exports = en;
|
|
91
|
+
//# sourceMappingURL=en.json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -18,8 +18,16 @@ var en = {
|
|
|
18
18
|
"CMEditViewBulkLocale.publication-status": "Publication Status",
|
|
19
19
|
"CMEditViewBulkLocale.draft-relation-warning": "Some locales are related to draft entries. Publishing them could leave broken links in your app.",
|
|
20
20
|
"CMEditViewBulkLocale.continue-confirmation": "Are you sure you want to continue?",
|
|
21
|
+
"CMEditViewAITranslation.status-aria-label": "AI Translation Status",
|
|
22
|
+
"CMEditViewAITranslation.status-title": "{enabled, select, true {AI translation enabled} false {AI translation disabled} other {AI translation disabled}}",
|
|
23
|
+
"CMEditViewAITranslation.status-description": "Our AI translates content in all locales each time you save a modification in the default locale.",
|
|
24
|
+
"CMEditViewAITranslation.settings-link": "{enabled, select, true {Disable it in settings} false {Enable it in settings} other {Enable it in settings}}",
|
|
25
|
+
"CMEditViewAITranslation.job-completed": "AI translation completed successfully!",
|
|
26
|
+
"CMEditViewAITranslation.job-failed": "AI translation failed. Please try again.",
|
|
21
27
|
"CMEditViewLocalePicker.locale.create": "Create <bold>{locale}</bold> locale",
|
|
28
|
+
"CMEditViewLocalePicker.locale.ai-translations": "AI Translations:",
|
|
22
29
|
"CMListView.popover.display-locales.label": "Display translated locales",
|
|
30
|
+
"CMListView.popover.display-locales.more": "{locales} + {count} more",
|
|
23
31
|
"CheckboxConfirmation.Modal.body": "Do you want to disable it?",
|
|
24
32
|
"CheckboxConfirmation.Modal.button-confirm": "Yes, disable",
|
|
25
33
|
"CheckboxConfirmation.Modal.content": "Disabling localization will engender the deletion of all your content but the one associated to your default locale (if existing).",
|
|
@@ -34,6 +42,8 @@ var en = {
|
|
|
34
42
|
"Settings.list.description": "Configure the settings for the Internationalization plugin",
|
|
35
43
|
"Settings.list.empty.description": "This is not a usual behavior, meaning that you have eventually modified the database manually. Make sure to have at least one locale saved in your database in order to be able to use Strapi correctly.",
|
|
36
44
|
"Settings.list.empty.title": "There are no locales.",
|
|
45
|
+
"Settings.aiLocalizations.label": "AI Translations",
|
|
46
|
+
"Settings.aiLocalizations.description": "Everytime you save in the Content Manager, our AI will use your default locale to translate all other locales automatically.",
|
|
37
47
|
"Settings.locales.default": "Default",
|
|
38
48
|
"Settings.locales.list.sort.default": "Sort by the default locale",
|
|
39
49
|
"Settings.locales.list.sort.displayName": "Sort by display name",
|
|
@@ -76,4 +86,4 @@ var en = {
|
|
|
76
86
|
};
|
|
77
87
|
|
|
78
88
|
export { en as default };
|
|
79
|
-
//# sourceMappingURL=en
|
|
89
|
+
//# sourceMappingURL=en.json.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fr.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fr.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ko.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ko.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pl.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pl.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ru.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ru.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tr.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tr.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uk.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uk.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh-Hans.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh-Hans.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseQuery.js","sources":["../../../admin/src/utils/baseQuery.ts"],"sourcesContent":["import { SerializedError } from '@reduxjs/toolkit';\nimport { type ApiError, type UnknownApiError } from '@strapi/admin/strapi-admin';\n\ntype BaseQueryError = ApiError | UnknownApiError | SerializedError;\n\nconst isBaseQueryError = (error: BaseQueryError): error is ApiError | UnknownApiError => {\n return error.name !== undefined;\n};\n\nexport { isBaseQueryError };\n"],"names":["isBaseQueryError","error","name","undefined"],"mappings":";;AAKA,MAAMA,mBAAmB,CAACC,KAAAA,GAAAA;IACxB,OAAOA,KAAAA,CAAMC,IAAI,KAAKC,SAAAA;AACxB;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseQuery.mjs","sources":["../../../admin/src/utils/baseQuery.ts"],"sourcesContent":["import { SerializedError } from '@reduxjs/toolkit';\nimport { type ApiError, type UnknownApiError } from '@strapi/admin/strapi-admin';\n\ntype BaseQueryError = ApiError | UnknownApiError | SerializedError;\n\nconst isBaseQueryError = (error: BaseQueryError): error is ApiError | UnknownApiError => {\n return error.name !== undefined;\n};\n\nexport { isBaseQueryError };\n"],"names":["isBaseQueryError","error","name","undefined"],"mappings":"AAKA,MAAMA,mBAAmB,CAACC,KAAAA,GAAAA;IACxB,OAAOA,KAAAA,CAAMC,IAAI,KAAKC,SAAAA;AACxB;;;;"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const cleanData = (data, schema, components)=>{
|
|
4
|
+
const cleanedData = removeFields(data, [
|
|
5
|
+
'createdAt',
|
|
6
|
+
'createdBy',
|
|
7
|
+
'updatedAt',
|
|
8
|
+
'updatedBy',
|
|
9
|
+
'id',
|
|
10
|
+
'documentId',
|
|
11
|
+
'publishedAt',
|
|
12
|
+
'strapi_stage',
|
|
13
|
+
'strapi_assignee',
|
|
14
|
+
'locale',
|
|
15
|
+
'status'
|
|
16
|
+
]);
|
|
17
|
+
const cleanedDataWithoutPasswordAndRelation = recursiveRemoveFieldTypes(cleanedData, schema, components, [
|
|
18
|
+
'relation',
|
|
19
|
+
'password'
|
|
20
|
+
]);
|
|
21
|
+
return cleanedDataWithoutPasswordAndRelation;
|
|
22
|
+
};
|
|
23
|
+
const removeFields = (data, fields)=>{
|
|
24
|
+
return Object.keys(data).reduce((acc, current)=>{
|
|
25
|
+
if (fields.includes(current)) {
|
|
26
|
+
return acc;
|
|
27
|
+
}
|
|
28
|
+
acc[current] = data[current];
|
|
29
|
+
return acc;
|
|
30
|
+
}, {});
|
|
31
|
+
};
|
|
32
|
+
const recursiveRemoveFieldTypes = (data, schema, components, fields)=>{
|
|
33
|
+
return Object.keys(data).reduce((acc, current)=>{
|
|
34
|
+
const attribute = schema.attributes[current] ?? {
|
|
35
|
+
type: undefined
|
|
36
|
+
};
|
|
37
|
+
if (fields.includes(attribute.type)) {
|
|
38
|
+
return acc;
|
|
39
|
+
}
|
|
40
|
+
if (attribute.type === 'dynamiczone') {
|
|
41
|
+
acc[current] = data[current].map((componentValue, index)=>{
|
|
42
|
+
const { id: _, ...rest } = recursiveRemoveFieldTypes(componentValue, components[componentValue.__component], components, fields);
|
|
43
|
+
return {
|
|
44
|
+
...rest,
|
|
45
|
+
__temp_key__: index + 1
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
} else if (attribute.type === 'component') {
|
|
49
|
+
const { repeatable, component } = attribute;
|
|
50
|
+
if (repeatable) {
|
|
51
|
+
acc[current] = (data[current] ?? []).map((compoData, index)=>{
|
|
52
|
+
const { id: _, ...rest } = recursiveRemoveFieldTypes(compoData, components[component], components, fields);
|
|
53
|
+
return {
|
|
54
|
+
...rest,
|
|
55
|
+
__temp_key__: index + 1
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
} else if (data[current]) {
|
|
59
|
+
const { id: _, ...rest } = recursiveRemoveFieldTypes(data[current], components[component], components, fields);
|
|
60
|
+
acc[current] = rest;
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
acc[current] = data[current];
|
|
64
|
+
}
|
|
65
|
+
return acc;
|
|
66
|
+
}, {});
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
exports.cleanData = cleanData;
|
|
70
|
+
//# sourceMappingURL=clean.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clean.js","sources":["../../../admin/src/utils/clean.ts"],"sourcesContent":["import type { Schema } from '@strapi/types';\n\ntype Data = Record<keyof Schema.ContentType['attributes'], any>;\n\nconst cleanData = (\n data: Data,\n schema: Schema.ContentType,\n components: Record<string, Schema.Component>\n) => {\n const cleanedData = removeFields(data, [\n 'createdAt',\n 'createdBy',\n 'updatedAt',\n 'updatedBy',\n 'id',\n 'documentId',\n 'publishedAt',\n 'strapi_stage',\n 'strapi_assignee',\n 'locale',\n 'status',\n ]);\n\n const cleanedDataWithoutPasswordAndRelation = recursiveRemoveFieldTypes(\n cleanedData,\n schema,\n components,\n ['relation', 'password']\n );\n\n return cleanedDataWithoutPasswordAndRelation;\n};\n\nconst removeFields = (data: Data, fields: Array<keyof Schema.ContentType['attributes']>) => {\n return Object.keys(data).reduce((acc, current) => {\n if (fields.includes(current)) {\n return acc;\n }\n acc[current] = data[current];\n return acc;\n }, {} as Data);\n};\n\nconst recursiveRemoveFieldTypes = (\n data: Data,\n schema: Schema.Schema,\n components: Record<string, Schema.Component>,\n fields: Array<keyof Schema.ContentType['attributes']>\n) => {\n return Object.keys(data).reduce((acc, current) => {\n const attribute = schema.attributes[current] ?? { type: undefined };\n\n if (fields.includes(attribute.type)) {\n return acc;\n }\n\n if (attribute.type === 'dynamiczone') {\n acc[current] = data[current].map((componentValue: any, index: number) => {\n const { id: _, ...rest } = recursiveRemoveFieldTypes(\n componentValue,\n components[componentValue.__component],\n components,\n fields\n );\n\n return {\n ...rest,\n __temp_key__: index + 1,\n };\n });\n } else if (attribute.type === 'component') {\n const { repeatable, component } = attribute;\n\n if (repeatable) {\n acc[current] = (data[current] ?? []).map((compoData: any, index: number) => {\n const { id: _, ...rest } = recursiveRemoveFieldTypes(\n compoData,\n components[component],\n components,\n fields\n );\n\n return {\n ...rest,\n __temp_key__: index + 1,\n };\n });\n } else if (data[current]) {\n const { id: _, ...rest } = recursiveRemoveFieldTypes(\n data[current],\n components[component],\n components,\n fields\n );\n\n acc[current] = rest;\n }\n } else {\n acc[current] = data[current];\n }\n\n return acc;\n }, {} as any);\n};\n\nexport { cleanData };\n"],"names":["cleanData","data","schema","components","cleanedData","removeFields","cleanedDataWithoutPasswordAndRelation","recursiveRemoveFieldTypes","fields","Object","keys","reduce","acc","current","includes","attribute","attributes","type","undefined","map","componentValue","index","id","_","rest","__component","__temp_key__","repeatable","component","compoData"],"mappings":"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"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
const cleanData = (data, schema, components)=>{
|
|
2
|
+
const cleanedData = removeFields(data, [
|
|
3
|
+
'createdAt',
|
|
4
|
+
'createdBy',
|
|
5
|
+
'updatedAt',
|
|
6
|
+
'updatedBy',
|
|
7
|
+
'id',
|
|
8
|
+
'documentId',
|
|
9
|
+
'publishedAt',
|
|
10
|
+
'strapi_stage',
|
|
11
|
+
'strapi_assignee',
|
|
12
|
+
'locale',
|
|
13
|
+
'status'
|
|
14
|
+
]);
|
|
15
|
+
const cleanedDataWithoutPasswordAndRelation = recursiveRemoveFieldTypes(cleanedData, schema, components, [
|
|
16
|
+
'relation',
|
|
17
|
+
'password'
|
|
18
|
+
]);
|
|
19
|
+
return cleanedDataWithoutPasswordAndRelation;
|
|
20
|
+
};
|
|
21
|
+
const removeFields = (data, fields)=>{
|
|
22
|
+
return Object.keys(data).reduce((acc, current)=>{
|
|
23
|
+
if (fields.includes(current)) {
|
|
24
|
+
return acc;
|
|
25
|
+
}
|
|
26
|
+
acc[current] = data[current];
|
|
27
|
+
return acc;
|
|
28
|
+
}, {});
|
|
29
|
+
};
|
|
30
|
+
const recursiveRemoveFieldTypes = (data, schema, components, fields)=>{
|
|
31
|
+
return Object.keys(data).reduce((acc, current)=>{
|
|
32
|
+
const attribute = schema.attributes[current] ?? {
|
|
33
|
+
type: undefined
|
|
34
|
+
};
|
|
35
|
+
if (fields.includes(attribute.type)) {
|
|
36
|
+
return acc;
|
|
37
|
+
}
|
|
38
|
+
if (attribute.type === 'dynamiczone') {
|
|
39
|
+
acc[current] = data[current].map((componentValue, index)=>{
|
|
40
|
+
const { id: _, ...rest } = recursiveRemoveFieldTypes(componentValue, components[componentValue.__component], components, fields);
|
|
41
|
+
return {
|
|
42
|
+
...rest,
|
|
43
|
+
__temp_key__: index + 1
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
} else if (attribute.type === 'component') {
|
|
47
|
+
const { repeatable, component } = attribute;
|
|
48
|
+
if (repeatable) {
|
|
49
|
+
acc[current] = (data[current] ?? []).map((compoData, index)=>{
|
|
50
|
+
const { id: _, ...rest } = recursiveRemoveFieldTypes(compoData, components[component], components, fields);
|
|
51
|
+
return {
|
|
52
|
+
...rest,
|
|
53
|
+
__temp_key__: index + 1
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
} else if (data[current]) {
|
|
57
|
+
const { id: _, ...rest } = recursiveRemoveFieldTypes(data[current], components[component], components, fields);
|
|
58
|
+
acc[current] = rest;
|
|
59
|
+
}
|
|
60
|
+
} else {
|
|
61
|
+
acc[current] = data[current];
|
|
62
|
+
}
|
|
63
|
+
return acc;
|
|
64
|
+
}, {});
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export { cleanData };
|
|
68
|
+
//# sourceMappingURL=clean.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clean.mjs","sources":["../../../admin/src/utils/clean.ts"],"sourcesContent":["import type { Schema } from '@strapi/types';\n\ntype Data = Record<keyof Schema.ContentType['attributes'], any>;\n\nconst cleanData = (\n data: Data,\n schema: Schema.ContentType,\n components: Record<string, Schema.Component>\n) => {\n const cleanedData = removeFields(data, [\n 'createdAt',\n 'createdBy',\n 'updatedAt',\n 'updatedBy',\n 'id',\n 'documentId',\n 'publishedAt',\n 'strapi_stage',\n 'strapi_assignee',\n 'locale',\n 'status',\n ]);\n\n const cleanedDataWithoutPasswordAndRelation = recursiveRemoveFieldTypes(\n cleanedData,\n schema,\n components,\n ['relation', 'password']\n );\n\n return cleanedDataWithoutPasswordAndRelation;\n};\n\nconst removeFields = (data: Data, fields: Array<keyof Schema.ContentType['attributes']>) => {\n return Object.keys(data).reduce((acc, current) => {\n if (fields.includes(current)) {\n return acc;\n }\n acc[current] = data[current];\n return acc;\n }, {} as Data);\n};\n\nconst recursiveRemoveFieldTypes = (\n data: Data,\n schema: Schema.Schema,\n components: Record<string, Schema.Component>,\n fields: Array<keyof Schema.ContentType['attributes']>\n) => {\n return Object.keys(data).reduce((acc, current) => {\n const attribute = schema.attributes[current] ?? { type: undefined };\n\n if (fields.includes(attribute.type)) {\n return acc;\n }\n\n if (attribute.type === 'dynamiczone') {\n acc[current] = data[current].map((componentValue: any, index: number) => {\n const { id: _, ...rest } = recursiveRemoveFieldTypes(\n componentValue,\n components[componentValue.__component],\n components,\n fields\n );\n\n return {\n ...rest,\n __temp_key__: index + 1,\n };\n });\n } else if (attribute.type === 'component') {\n const { repeatable, component } = attribute;\n\n if (repeatable) {\n acc[current] = (data[current] ?? []).map((compoData: any, index: number) => {\n const { id: _, ...rest } = recursiveRemoveFieldTypes(\n compoData,\n components[component],\n components,\n fields\n );\n\n return {\n ...rest,\n __temp_key__: index + 1,\n };\n });\n } else if (data[current]) {\n const { id: _, ...rest } = recursiveRemoveFieldTypes(\n data[current],\n components[component],\n components,\n fields\n );\n\n acc[current] = rest;\n }\n } else {\n acc[current] = data[current];\n }\n\n return acc;\n }, {} as any);\n};\n\nexport { cleanData };\n"],"names":["cleanData","data","schema","components","cleanedData","removeFields","cleanedDataWithoutPasswordAndRelation","recursiveRemoveFieldTypes","fields","Object","keys","reduce","acc","current","includes","attribute","attributes","type","undefined","map","componentValue","index","id","_","rest","__component","__temp_key__","repeatable","component","compoData"],"mappings":"AAIMA,MAAAA,SAAAA,GAAY,CAChBC,IAAAA,EACAC,MACAC,EAAAA,UAAAA,GAAAA;IAEA,MAAMC,WAAAA,GAAcC,aAAaJ,IAAM,EAAA;AACrC,QAAA,WAAA;AACA,QAAA,WAAA;AACA,QAAA,WAAA;AACA,QAAA,WAAA;AACA,QAAA,IAAA;AACA,QAAA,YAAA;AACA,QAAA,aAAA;AACA,QAAA,cAAA;AACA,QAAA,iBAAA;AACA,QAAA,QAAA;AACA,QAAA;AACD,KAAA,CAAA;AAED,IAAA,MAAMK,qCAAwCC,GAAAA,yBAAAA,CAC5CH,WACAF,EAAAA,MAAAA,EACAC,UACA,EAAA;AAAC,QAAA,UAAA;AAAY,QAAA;AAAW,KAAA,CAAA;IAG1B,OAAOG,qCAAAA;AACT;AAEA,MAAMD,YAAAA,GAAe,CAACJ,IAAYO,EAAAA,MAAAA,GAAAA;AAChC,IAAA,OAAOC,OAAOC,IAAI,CAACT,MAAMU,MAAM,CAAC,CAACC,GAAKC,EAAAA,OAAAA,GAAAA;QACpC,IAAIL,MAAAA,CAAOM,QAAQ,CAACD,OAAU,CAAA,EAAA;YAC5B,OAAOD,GAAAA;AACT;AACAA,QAAAA,GAAG,CAACC,OAAAA,CAAQ,GAAGZ,IAAI,CAACY,OAAQ,CAAA;QAC5B,OAAOD,GAAAA;AACT,KAAA,EAAG,EAAC,CAAA;AACN,CAAA;AAEA,MAAML,yBAA4B,GAAA,CAChCN,IACAC,EAAAA,MAAAA,EACAC,UACAK,EAAAA,MAAAA,GAAAA;AAEA,IAAA,OAAOC,OAAOC,IAAI,CAACT,MAAMU,MAAM,CAAC,CAACC,GAAKC,EAAAA,OAAAA,GAAAA;AACpC,QAAA,MAAME,SAAYb,GAAAA,MAAAA,CAAOc,UAAU,CAACH,QAAQ,IAAI;YAAEI,IAAMC,EAAAA;AAAU,SAAA;AAElE,QAAA,IAAIV,MAAOM,CAAAA,QAAQ,CAACC,SAAAA,CAAUE,IAAI,CAAG,EAAA;YACnC,OAAOL,GAAAA;AACT;QAEA,IAAIG,SAAAA,CAAUE,IAAI,KAAK,aAAe,EAAA;YACpCL,GAAG,CAACC,OAAQ,CAAA,GAAGZ,IAAI,CAACY,QAAQ,CAACM,GAAG,CAAC,CAACC,cAAqBC,EAAAA,KAAAA,GAAAA;AACrD,gBAAA,MAAM,EAAEC,EAAAA,EAAIC,CAAC,EAAE,GAAGC,IAAM,EAAA,GAAGjB,yBACzBa,CAAAA,cAAAA,EACAjB,UAAU,CAACiB,cAAAA,CAAeK,WAAW,CAAC,EACtCtB,UACAK,EAAAA,MAAAA,CAAAA;gBAGF,OAAO;AACL,oBAAA,GAAGgB,IAAI;AACPE,oBAAAA,YAAAA,EAAcL,KAAQ,GAAA;AACxB,iBAAA;AACF,aAAA,CAAA;AACF,SAAA,MAAO,IAAIN,SAAAA,CAAUE,IAAI,KAAK,WAAa,EAAA;AACzC,YAAA,MAAM,EAAEU,UAAU,EAAEC,SAAS,EAAE,GAAGb,SAAAA;AAElC,YAAA,IAAIY,UAAY,EAAA;AACdf,gBAAAA,GAAG,CAACC,OAAAA,CAAQ,GAAIZ,CAAAA,IAAI,CAACY,OAAQ,CAAA,IAAI,EAAE,EAAEM,GAAG,CAAC,CAACU,SAAgBR,EAAAA,KAAAA,GAAAA;AACxD,oBAAA,MAAM,EAAEC,EAAAA,EAAIC,CAAC,EAAE,GAAGC,IAAAA,EAAM,GAAGjB,yBAAAA,CACzBsB,SACA1B,EAAAA,UAAU,CAACyB,SAAAA,CAAU,EACrBzB,UACAK,EAAAA,MAAAA,CAAAA;oBAGF,OAAO;AACL,wBAAA,GAAGgB,IAAI;AACPE,wBAAAA,YAAAA,EAAcL,KAAQ,GAAA;AACxB,qBAAA;AACF,iBAAA,CAAA;AACF,aAAA,MAAO,IAAIpB,IAAI,CAACY,OAAAA,CAAQ,EAAE;AACxB,gBAAA,MAAM,EAAES,EAAIC,EAAAA,CAAC,EAAE,GAAGC,MAAM,GAAGjB,yBAAAA,CACzBN,IAAI,CAACY,QAAQ,EACbV,UAAU,CAACyB,SAAAA,CAAU,EACrBzB,UACAK,EAAAA,MAAAA,CAAAA;gBAGFI,GAAG,CAACC,QAAQ,GAAGW,IAAAA;AACjB;SACK,MAAA;AACLZ,YAAAA,GAAG,CAACC,OAAAA,CAAQ,GAAGZ,IAAI,CAACY,OAAQ,CAAA;AAC9B;QAEA,OAAOD,GAAAA;AACT,KAAA,EAAG,EAAC,CAAA;AACN,CAAA;;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var has = require('lodash/has');
|
|
4
|
+
|
|
5
|
+
const LOCALIZED_FIELDS = [
|
|
6
|
+
'biginteger',
|
|
7
|
+
'boolean',
|
|
8
|
+
'component',
|
|
9
|
+
'date',
|
|
10
|
+
'datetime',
|
|
11
|
+
'decimal',
|
|
12
|
+
'dynamiczone',
|
|
13
|
+
'email',
|
|
14
|
+
'enumeration',
|
|
15
|
+
'float',
|
|
16
|
+
'integer',
|
|
17
|
+
'json',
|
|
18
|
+
'media',
|
|
19
|
+
'number',
|
|
20
|
+
'password',
|
|
21
|
+
'richtext',
|
|
22
|
+
'blocks',
|
|
23
|
+
'string',
|
|
24
|
+
'text',
|
|
25
|
+
'time'
|
|
26
|
+
];
|
|
27
|
+
const doesPluginOptionsHaveI18nLocalized = (opts)=>has(opts, [
|
|
28
|
+
'i18n',
|
|
29
|
+
'localized'
|
|
30
|
+
]);
|
|
31
|
+
|
|
32
|
+
exports.LOCALIZED_FIELDS = LOCALIZED_FIELDS;
|
|
33
|
+
exports.doesPluginOptionsHaveI18nLocalized = doesPluginOptionsHaveI18nLocalized;
|
|
34
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sources":["../../../admin/src/utils/fields.ts"],"sourcesContent":["import has from 'lodash/has';\n\nconst LOCALIZED_FIELDS = [\n 'biginteger',\n 'boolean',\n 'component',\n 'date',\n 'datetime',\n 'decimal',\n 'dynamiczone',\n 'email',\n 'enumeration',\n 'float',\n 'integer',\n 'json',\n 'media',\n 'number',\n 'password',\n 'richtext',\n 'blocks',\n 'string',\n 'text',\n 'time',\n];\n\nconst doesPluginOptionsHaveI18nLocalized = (\n opts?: object\n): opts is { i18n: { localized: boolean } } => has(opts, ['i18n', 'localized']);\n\nexport { LOCALIZED_FIELDS, doesPluginOptionsHaveI18nLocalized };\n"],"names":["LOCALIZED_FIELDS","doesPluginOptionsHaveI18nLocalized","opts","has"],"mappings":";;;;AAEA,MAAMA,gBAAmB,GAAA;AACvB,IAAA,YAAA;AACA,IAAA,SAAA;AACA,IAAA,WAAA;AACA,IAAA,MAAA;AACA,IAAA,UAAA;AACA,IAAA,SAAA;AACA,IAAA,aAAA;AACA,IAAA,OAAA;AACA,IAAA,aAAA;AACA,IAAA,OAAA;AACA,IAAA,SAAA;AACA,IAAA,MAAA;AACA,IAAA,OAAA;AACA,IAAA,QAAA;AACA,IAAA,UAAA;AACA,IAAA,UAAA;AACA,IAAA,QAAA;AACA,IAAA,QAAA;AACA,IAAA,MAAA;AACA,IAAA;AACD;AAED,MAAMC,kCAAqC,GAAA,CACzCC,IAC6CC,GAAAA,GAAAA,CAAID,IAAM,EAAA;AAAC,QAAA,MAAA;AAAQ,QAAA;AAAY,KAAA;;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import has from 'lodash/has';
|
|
2
|
+
|
|
3
|
+
const LOCALIZED_FIELDS = [
|
|
4
|
+
'biginteger',
|
|
5
|
+
'boolean',
|
|
6
|
+
'component',
|
|
7
|
+
'date',
|
|
8
|
+
'datetime',
|
|
9
|
+
'decimal',
|
|
10
|
+
'dynamiczone',
|
|
11
|
+
'email',
|
|
12
|
+
'enumeration',
|
|
13
|
+
'float',
|
|
14
|
+
'integer',
|
|
15
|
+
'json',
|
|
16
|
+
'media',
|
|
17
|
+
'number',
|
|
18
|
+
'password',
|
|
19
|
+
'richtext',
|
|
20
|
+
'blocks',
|
|
21
|
+
'string',
|
|
22
|
+
'text',
|
|
23
|
+
'time'
|
|
24
|
+
];
|
|
25
|
+
const doesPluginOptionsHaveI18nLocalized = (opts)=>has(opts, [
|
|
26
|
+
'i18n',
|
|
27
|
+
'localized'
|
|
28
|
+
]);
|
|
29
|
+
|
|
30
|
+
export { LOCALIZED_FIELDS, doesPluginOptionsHaveI18nLocalized };
|
|
31
|
+
//# sourceMappingURL=fields.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.mjs","sources":["../../../admin/src/utils/fields.ts"],"sourcesContent":["import has from 'lodash/has';\n\nconst LOCALIZED_FIELDS = [\n 'biginteger',\n 'boolean',\n 'component',\n 'date',\n 'datetime',\n 'decimal',\n 'dynamiczone',\n 'email',\n 'enumeration',\n 'float',\n 'integer',\n 'json',\n 'media',\n 'number',\n 'password',\n 'richtext',\n 'blocks',\n 'string',\n 'text',\n 'time',\n];\n\nconst doesPluginOptionsHaveI18nLocalized = (\n opts?: object\n): opts is { i18n: { localized: boolean } } => has(opts, ['i18n', 'localized']);\n\nexport { LOCALIZED_FIELDS, doesPluginOptionsHaveI18nLocalized };\n"],"names":["LOCALIZED_FIELDS","doesPluginOptionsHaveI18nLocalized","opts","has"],"mappings":";;AAEA,MAAMA,gBAAmB,GAAA;AACvB,IAAA,YAAA;AACA,IAAA,SAAA;AACA,IAAA,WAAA;AACA,IAAA,MAAA;AACA,IAAA,UAAA;AACA,IAAA,SAAA;AACA,IAAA,aAAA;AACA,IAAA,OAAA;AACA,IAAA,aAAA;AACA,IAAA,OAAA;AACA,IAAA,SAAA;AACA,IAAA,MAAA;AACA,IAAA,OAAA;AACA,IAAA,QAAA;AACA,IAAA,UAAA;AACA,IAAA,UAAA;AACA,IAAA,QAAA;AACA,IAAA,QAAA;AACA,IAAA,MAAA;AACA,IAAA;AACD;AAED,MAAMC,kCAAqC,GAAA,CACzCC,IAC6CC,GAAAA,GAAAA,CAAID,IAAM,EAAA;AAAC,QAAA,MAAA;AAAQ,QAAA;AAAY,KAAA;;;;"}
|