@strapi/i18n 0.0.0-next.a28002c793bc4de2a8b3c6c5b9c2336c5a6db7a9 → 0.0.0-next.aa9c4618783d5e736a3c470cb132b4b7ac807584
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 +727 -0
- package/dist/admin/components/CMHeaderActions.js.map +1 -0
- package/dist/admin/components/CMHeaderActions.mjs +702 -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 +395 -0
- package/dist/admin/components/CreateLocale.js.map +1 -0
- package/dist/admin/components/CreateLocale.mjs +369 -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 +82 -0
- package/dist/admin/components/LocaleListCell.js.map +1 -0
- package/dist/admin/components/LocaleListCell.mjs +80 -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 +43 -0
- package/dist/admin/contentManagerHooks/listView.js.map +1 -0
- package/dist/admin/contentManagerHooks/listView.mjs +41 -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/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 +225 -5
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +201 -5
- 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/api.js +14 -0
- package/dist/admin/services/api.js.map +1 -0
- package/dist/admin/services/api.mjs +12 -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 +29 -0
- package/dist/admin/services/settings.js.map +1 -0
- package/dist/admin/services/settings.mjs +26 -0
- package/dist/admin/services/settings.mjs.map +1 -0
- package/dist/admin/src/components/CMHeaderActions.d.ts +1 -1
- package/dist/admin/src/components/tests/CreateLocale.test.d.ts +1 -0
- package/dist/admin/src/components/tests/DeleteLocale.test.d.ts +1 -0
- package/dist/admin/src/components/tests/EditLocale.test.d.ts +1 -0
- package/dist/admin/src/components/tests/LocaleListCell.test.d.ts +1 -0
- package/dist/admin/src/contentReleasesHooks/releaseDetailsView.d.ts +1 -1
- package/dist/admin/src/pages/tests/SettingsPage.test.d.ts +1 -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/tests/server.d.ts +1 -0
- package/dist/admin/tests/utils.d.ts +6 -0
- package/dist/admin/translations/de.json.js +66 -0
- package/dist/admin/translations/de.json.js.map +1 -0
- package/dist/admin/translations/de.json.mjs +64 -0
- package/dist/admin/translations/de.json.mjs.map +1 -0
- package/dist/admin/translations/dk.json.js +66 -0
- package/dist/admin/translations/dk.json.js.map +1 -0
- package/dist/admin/translations/dk.json.mjs +64 -0
- package/dist/admin/translations/dk.json.mjs.map +1 -0
- package/dist/admin/translations/en.json.js +83 -0
- package/dist/admin/translations/en.json.js.map +1 -0
- package/dist/admin/translations/en.json.mjs +81 -0
- package/dist/admin/translations/en.json.mjs.map +1 -0
- package/dist/admin/translations/es.json.js +66 -0
- package/dist/admin/translations/es.json.js.map +1 -0
- package/dist/admin/translations/es.json.mjs +64 -0
- package/dist/admin/translations/es.json.mjs.map +1 -0
- package/dist/admin/translations/fr.json.js +66 -0
- package/dist/admin/translations/fr.json.js.map +1 -0
- package/dist/admin/translations/fr.json.mjs +64 -0
- package/dist/admin/translations/fr.json.mjs.map +1 -0
- package/dist/admin/translations/ko.json.js +65 -0
- package/dist/admin/translations/ko.json.js.map +1 -0
- package/dist/admin/translations/ko.json.mjs +63 -0
- package/dist/admin/translations/ko.json.mjs.map +1 -0
- package/dist/admin/translations/pl.json.js +66 -0
- package/dist/admin/translations/pl.json.js.map +1 -0
- package/dist/admin/translations/pl.json.mjs +64 -0
- package/dist/admin/translations/pl.json.mjs.map +1 -0
- package/dist/admin/translations/ru.json.js +68 -0
- package/dist/admin/translations/ru.json.js.map +1 -0
- package/dist/admin/translations/ru.json.mjs +66 -0
- package/dist/admin/translations/ru.json.mjs.map +1 -0
- package/dist/admin/translations/tr.json.js +66 -0
- package/dist/admin/translations/tr.json.js.map +1 -0
- package/dist/admin/translations/tr.json.mjs +64 -0
- package/dist/admin/translations/tr.json.mjs.map +1 -0
- package/dist/admin/translations/uk.json.js +82 -0
- package/dist/admin/translations/uk.json.js.map +1 -0
- package/dist/admin/translations/uk.json.mjs +80 -0
- package/dist/admin/translations/uk.json.mjs.map +1 -0
- package/dist/admin/translations/zh-Hans.json.js +57 -0
- package/dist/admin/translations/zh-Hans.json.js.map +1 -0
- package/dist/admin/translations/zh-Hans.json.mjs +55 -0
- package/dist/admin/translations/zh-Hans.json.mjs.map +1 -0
- package/dist/admin/translations/zh.json.js +66 -0
- package/dist/admin/translations/zh.json.js.map +1 -0
- package/dist/admin/translations/zh.json.mjs +64 -0
- 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 +79 -0
- package/dist/server/bootstrap.js.map +1 -0
- package/dist/server/bootstrap.mjs +77 -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 +2423 -0
- package/dist/server/constants/iso-locales.json.js.map +1 -0
- package/dist/server/constants/iso-locales.json.mjs +2421 -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/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 +16 -0
- package/dist/server/controllers/index.js.map +1 -0
- package/dist/server/controllers/index.mjs +14 -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 +18 -3460
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +17 -3443
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/register.js +79 -0
- package/dist/server/register.js.map +1 -0
- package/dist/server/register.mjs +77 -0
- package/dist/server/register.mjs.map +1 -0
- package/dist/server/routes/admin.js +122 -0
- package/dist/server/routes/admin.js.map +1 -0
- package/dist/server/routes/admin.mjs +120 -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-localizations.js +28 -0
- package/dist/server/services/ai-localizations.js.map +1 -0
- package/dist/server/services/ai-localizations.mjs +26 -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 +26 -0
- package/dist/server/services/index.js.map +1 -0
- package/dist/server/services/index.mjs +24 -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/controllers/index.d.ts +4 -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 +22 -7
- package/dist/server/src/index.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-localizations.d.ts +8 -0
- package/dist/server/src/services/ai-localizations.d.ts.map +1 -0
- package/dist/server/src/services/index.d.ts +15 -0
- package/dist/server/src/services/index.d.ts.map +1 -1
- package/dist/server/src/services/localizations.d.ts +1 -1
- package/dist/server/src/services/localizations.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 +3 -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/content-manager.d.ts +1 -1
- package/dist/shared/contracts/settings.d.ts +40 -0
- package/dist/shared/contracts/shared.d.ts +1 -1
- package/package.json +17 -12
- package/dist/_chunks/SettingsPage-B-KzAqT3.mjs +0 -554
- package/dist/_chunks/SettingsPage-B-KzAqT3.mjs.map +0 -1
- package/dist/_chunks/SettingsPage-hyOi94O9.js +0 -573
- package/dist/_chunks/SettingsPage-hyOi94O9.js.map +0 -1
- package/dist/_chunks/de-BOhNX_-5.js +0 -65
- package/dist/_chunks/de-BOhNX_-5.js.map +0 -1
- package/dist/_chunks/de-D80IRBP9.mjs +0 -65
- package/dist/_chunks/de-D80IRBP9.mjs.map +0 -1
- package/dist/_chunks/dk-CJ6Zzz78.mjs +0 -65
- package/dist/_chunks/dk-CJ6Zzz78.mjs.map +0 -1
- package/dist/_chunks/dk-cjXm0p3m.js +0 -65
- package/dist/_chunks/dk-cjXm0p3m.js.map +0 -1
- package/dist/_chunks/en-BTyF7WVW.mjs +0 -80
- package/dist/_chunks/en-BTyF7WVW.mjs.map +0 -1
- package/dist/_chunks/en-UlC0jh2t.js +0 -80
- package/dist/_chunks/en-UlC0jh2t.js.map +0 -1
- package/dist/_chunks/es-V8WnPN7w.mjs +0 -65
- package/dist/_chunks/es-V8WnPN7w.mjs.map +0 -1
- package/dist/_chunks/es-hr9b_HLp.js +0 -65
- package/dist/_chunks/es-hr9b_HLp.js.map +0 -1
- package/dist/_chunks/fr-BFmBbE0H.js +0 -65
- package/dist/_chunks/fr-BFmBbE0H.js.map +0 -1
- package/dist/_chunks/fr-F94noFiV.mjs +0 -65
- package/dist/_chunks/fr-F94noFiV.mjs.map +0 -1
- package/dist/_chunks/index-BcYj5jo9.mjs +0 -1589
- package/dist/_chunks/index-BcYj5jo9.mjs.map +0 -1
- package/dist/_chunks/index-C8NzsAKp.js +0 -1610
- package/dist/_chunks/index-C8NzsAKp.js.map +0 -1
- package/dist/_chunks/ko-C40pNQ9b.js +0 -64
- package/dist/_chunks/ko-C40pNQ9b.js.map +0 -1
- package/dist/_chunks/ko-CF-P3Car.mjs +0 -64
- package/dist/_chunks/ko-CF-P3Car.mjs.map +0 -1
- package/dist/_chunks/pl-Dxr9RUmD.mjs +0 -65
- package/dist/_chunks/pl-Dxr9RUmD.mjs.map +0 -1
- package/dist/_chunks/pl-JtWBy-JQ.js +0 -65
- package/dist/_chunks/pl-JtWBy-JQ.js.map +0 -1
- package/dist/_chunks/ru-B-4sVwXN.mjs +0 -67
- package/dist/_chunks/ru-B-4sVwXN.mjs.map +0 -1
- package/dist/_chunks/ru-COSWt3Nu.js +0 -67
- package/dist/_chunks/ru-COSWt3Nu.js.map +0 -1
- package/dist/_chunks/tr-BVj1O5ch.js +0 -65
- package/dist/_chunks/tr-BVj1O5ch.js.map +0 -1
- package/dist/_chunks/tr-Ccu6Yj11.mjs +0 -65
- package/dist/_chunks/tr-Ccu6Yj11.mjs.map +0 -1
- package/dist/_chunks/zh-BIz395Ms.mjs +0 -65
- package/dist/_chunks/zh-BIz395Ms.mjs.map +0 -1
- package/dist/_chunks/zh-Hans-Bfo6_TCM.mjs +0 -56
- package/dist/_chunks/zh-Hans-Bfo6_TCM.mjs.map +0 -1
- package/dist/_chunks/zh-Hans-DIEm_EMC.js +0 -56
- package/dist/_chunks/zh-Hans-DIEm_EMC.js.map +0 -1
- package/dist/_chunks/zh-wkBPBkhc.js +0 -65
- package/dist/_chunks/zh-wkBPBkhc.js.map +0 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var permissions = require('./permissions.js');
|
|
4
|
+
var metrics = require('./metrics.js');
|
|
5
|
+
var localizations = require('./localizations.js');
|
|
6
|
+
var locales = require('./locales.js');
|
|
7
|
+
var isoLocales = require('./iso-locales.js');
|
|
8
|
+
var contentTypes = require('./content-types.js');
|
|
9
|
+
var index = require('./sanitize/index.js');
|
|
10
|
+
var settings = require('./settings.js');
|
|
11
|
+
var aiLocalizations = require('./ai-localizations.js');
|
|
12
|
+
|
|
13
|
+
var services = {
|
|
14
|
+
permissions,
|
|
15
|
+
metrics,
|
|
16
|
+
localizations,
|
|
17
|
+
locales,
|
|
18
|
+
sanitize: index,
|
|
19
|
+
'iso-locales': isoLocales,
|
|
20
|
+
'content-types': contentTypes,
|
|
21
|
+
aiLocalizations: aiLocalizations.createAILocalizationsService,
|
|
22
|
+
settings: settings.createSettingsService
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
module.exports = services;
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../server/src/services/index.ts"],"sourcesContent":["import permissions from './permissions';\nimport metrics from './metrics';\nimport localizations from './localizations';\nimport locales from './locales';\nimport isoLocales from './iso-locales';\nimport contentTypes from './content-types';\nimport sanitize from './sanitize';\nimport { createSettingsService } from './settings';\nimport { createAILocalizationsService } from './ai-localizations';\n\nexport default {\n permissions,\n metrics,\n localizations,\n locales,\n sanitize,\n 'iso-locales': isoLocales,\n 'content-types': contentTypes,\n aiLocalizations: createAILocalizationsService,\n settings: createSettingsService,\n};\n"],"names":["permissions","metrics","localizations","locales","sanitize","isoLocales","contentTypes","aiLocalizations","createAILocalizationsService","settings","createSettingsService"],"mappings":";;;;;;;;;;;;AAUA,eAAe;AACbA,IAAAA,WAAAA;AACAC,IAAAA,OAAAA;AACAC,IAAAA,aAAAA;AACAC,IAAAA,OAAAA;AACAC,cAAAA,KAAAA;IACA,aAAeC,EAAAA,UAAAA;IACf,eAAiBC,EAAAA,YAAAA;IACjBC,eAAiBC,EAAAA,4CAAAA;IACjBC,QAAUC,EAAAA;AACZ,CAAE;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import permissions from './permissions.mjs';
|
|
2
|
+
import metrics from './metrics.mjs';
|
|
3
|
+
import localizations from './localizations.mjs';
|
|
4
|
+
import locales from './locales.mjs';
|
|
5
|
+
import isoLocalesService from './iso-locales.mjs';
|
|
6
|
+
import contentTypes from './content-types.mjs';
|
|
7
|
+
import sanitize from './sanitize/index.mjs';
|
|
8
|
+
import { createSettingsService } from './settings.mjs';
|
|
9
|
+
import { createAILocalizationsService } from './ai-localizations.mjs';
|
|
10
|
+
|
|
11
|
+
var services = {
|
|
12
|
+
permissions,
|
|
13
|
+
metrics,
|
|
14
|
+
localizations,
|
|
15
|
+
locales,
|
|
16
|
+
sanitize,
|
|
17
|
+
'iso-locales': isoLocalesService,
|
|
18
|
+
'content-types': contentTypes,
|
|
19
|
+
aiLocalizations: createAILocalizationsService,
|
|
20
|
+
settings: createSettingsService
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { services as default };
|
|
24
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../server/src/services/index.ts"],"sourcesContent":["import permissions from './permissions';\nimport metrics from './metrics';\nimport localizations from './localizations';\nimport locales from './locales';\nimport isoLocales from './iso-locales';\nimport contentTypes from './content-types';\nimport sanitize from './sanitize';\nimport { createSettingsService } from './settings';\nimport { createAILocalizationsService } from './ai-localizations';\n\nexport default {\n permissions,\n metrics,\n localizations,\n locales,\n sanitize,\n 'iso-locales': isoLocales,\n 'content-types': contentTypes,\n aiLocalizations: createAILocalizationsService,\n settings: createSettingsService,\n};\n"],"names":["permissions","metrics","localizations","locales","sanitize","isoLocales","contentTypes","aiLocalizations","createAILocalizationsService","settings","createSettingsService"],"mappings":";;;;;;;;;;AAUA,eAAe;AACbA,IAAAA,WAAAA;AACAC,IAAAA,OAAAA;AACAC,IAAAA,aAAAA;AACAC,IAAAA,OAAAA;AACAC,IAAAA,QAAAA;IACA,aAAeC,EAAAA,iBAAAA;IACf,eAAiBC,EAAAA,YAAAA;IACjBC,eAAiBC,EAAAA,4BAAAA;IACjBC,QAAUC,EAAAA;AACZ,CAAE;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('../constants/index.js');
|
|
4
|
+
var isoLocales = require('../constants/iso-locales.json.js');
|
|
5
|
+
|
|
6
|
+
const getIsoLocales = ()=>isoLocales;
|
|
7
|
+
const isoLocalesService = ()=>({
|
|
8
|
+
getIsoLocales
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
module.exports = isoLocalesService;
|
|
12
|
+
//# sourceMappingURL=iso-locales.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iso-locales.js","sources":["../../../server/src/services/iso-locales.ts"],"sourcesContent":["import { isoLocales } from '../constants';\n\nconst getIsoLocales = () => isoLocales;\n\nconst isoLocalesService = () => ({\n getIsoLocales,\n});\n\ntype ISOLocalesService = typeof isoLocalesService;\n\nexport default isoLocalesService;\nexport type { ISOLocalesService };\n"],"names":["getIsoLocales","isoLocales","isoLocalesService"],"mappings":";;;;;AAEA,MAAMA,gBAAgB,IAAMC,UAAAA;AAEtBC,MAAAA,iBAAAA,GAAoB,KAAO;AAC/BF,QAAAA;KACF;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import '../constants/index.mjs';
|
|
2
|
+
import isoLocales from '../constants/iso-locales.json.mjs';
|
|
3
|
+
|
|
4
|
+
const getIsoLocales = ()=>isoLocales;
|
|
5
|
+
const isoLocalesService = ()=>({
|
|
6
|
+
getIsoLocales
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export { isoLocalesService as default };
|
|
10
|
+
//# sourceMappingURL=iso-locales.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iso-locales.mjs","sources":["../../../server/src/services/iso-locales.ts"],"sourcesContent":["import { isoLocales } from '../constants';\n\nconst getIsoLocales = () => isoLocales;\n\nconst isoLocalesService = () => ({\n getIsoLocales,\n});\n\ntype ISOLocalesService = typeof isoLocalesService;\n\nexport default isoLocalesService;\nexport type { ISOLocalesService };\n"],"names":["getIsoLocales","isoLocales","isoLocalesService"],"mappings":";;;AAEA,MAAMA,gBAAgB,IAAMC,UAAAA;AAEtBC,MAAAA,iBAAAA,GAAoB,KAAO;AAC/BF,QAAAA;KACF;;;;"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var fp = require('lodash/fp');
|
|
4
|
+
var index$1 = require('../constants/index.js');
|
|
5
|
+
var index = require('../utils/index.js');
|
|
6
|
+
|
|
7
|
+
const find = (params = {})=>strapi.db.query('plugin::i18n.locale').findMany({
|
|
8
|
+
where: params
|
|
9
|
+
});
|
|
10
|
+
const findById = (id)=>strapi.db.query('plugin::i18n.locale').findOne({
|
|
11
|
+
where: {
|
|
12
|
+
id
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
const findByCode = (code)=>strapi.db.query('plugin::i18n.locale').findOne({
|
|
16
|
+
where: {
|
|
17
|
+
code
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
const count = (params = {})=>strapi.db.query('plugin::i18n.locale').count({
|
|
21
|
+
where: params
|
|
22
|
+
});
|
|
23
|
+
const create = async (locale)=>{
|
|
24
|
+
const result = await strapi.db.query('plugin::i18n.locale').create({
|
|
25
|
+
data: locale
|
|
26
|
+
});
|
|
27
|
+
index.getService('metrics').sendDidUpdateI18nLocalesEvent();
|
|
28
|
+
return result;
|
|
29
|
+
};
|
|
30
|
+
const update = async (params, updates)=>{
|
|
31
|
+
const result = await strapi.db.query('plugin::i18n.locale').update({
|
|
32
|
+
where: params,
|
|
33
|
+
data: updates
|
|
34
|
+
});
|
|
35
|
+
index.getService('metrics').sendDidUpdateI18nLocalesEvent();
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
const deleteFn = async ({ id })=>{
|
|
39
|
+
const localeToDelete = await findById(id);
|
|
40
|
+
if (localeToDelete) {
|
|
41
|
+
await deleteAllLocalizedEntriesFor({
|
|
42
|
+
locale: localeToDelete.code
|
|
43
|
+
});
|
|
44
|
+
const result = await strapi.db.query('plugin::i18n.locale').delete({
|
|
45
|
+
where: {
|
|
46
|
+
id
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
index.getService('metrics').sendDidUpdateI18nLocalesEvent();
|
|
50
|
+
return result;
|
|
51
|
+
}
|
|
52
|
+
return localeToDelete;
|
|
53
|
+
};
|
|
54
|
+
const setDefaultLocale = ({ code })=>index.getCoreStore().set({
|
|
55
|
+
key: 'default_locale',
|
|
56
|
+
value: code
|
|
57
|
+
});
|
|
58
|
+
const getDefaultLocale = ()=>index.getCoreStore().get({
|
|
59
|
+
key: 'default_locale'
|
|
60
|
+
});
|
|
61
|
+
const setIsDefault = async (locales)=>{
|
|
62
|
+
if (fp.isNil(locales)) {
|
|
63
|
+
return locales;
|
|
64
|
+
}
|
|
65
|
+
const actualDefault = await getDefaultLocale();
|
|
66
|
+
if (Array.isArray(locales)) {
|
|
67
|
+
return locales.map((locale)=>({
|
|
68
|
+
...locale,
|
|
69
|
+
isDefault: actualDefault === locale.code
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
// single locale
|
|
73
|
+
return {
|
|
74
|
+
...locales,
|
|
75
|
+
isDefault: actualDefault === locales.code
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
const initDefaultLocale = async ()=>{
|
|
79
|
+
const existingLocalesNb = await strapi.db.query('plugin::i18n.locale').count();
|
|
80
|
+
if (existingLocalesNb === 0) {
|
|
81
|
+
await create(index$1.DEFAULT_LOCALE);
|
|
82
|
+
await setDefaultLocale({
|
|
83
|
+
code: index$1.DEFAULT_LOCALE.code
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const deleteAllLocalizedEntriesFor = async ({ locale })=>{
|
|
88
|
+
const { isLocalizedContentType } = index.getService('content-types');
|
|
89
|
+
const localizedModels = Object.values(strapi.contentTypes).filter(isLocalizedContentType);
|
|
90
|
+
for (const model of localizedModels){
|
|
91
|
+
// FIXME: delete many content & their associations
|
|
92
|
+
await strapi.db.query(model.uid).deleteMany({
|
|
93
|
+
where: {
|
|
94
|
+
locale
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
const locales = ()=>({
|
|
100
|
+
find,
|
|
101
|
+
findById,
|
|
102
|
+
findByCode,
|
|
103
|
+
create,
|
|
104
|
+
update,
|
|
105
|
+
count,
|
|
106
|
+
setDefaultLocale,
|
|
107
|
+
getDefaultLocale,
|
|
108
|
+
setIsDefault,
|
|
109
|
+
delete: deleteFn,
|
|
110
|
+
initDefaultLocale
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
module.exports = locales;
|
|
114
|
+
//# sourceMappingURL=locales.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locales.js","sources":["../../../server/src/services/locales.ts"],"sourcesContent":["import { isNil } from 'lodash/fp';\nimport { DEFAULT_LOCALE } from '../constants';\nimport { getService, getCoreStore } from '../utils';\n\nconst find = (params: any = {}) =>\n strapi.db.query('plugin::i18n.locale').findMany({ where: params });\n\nconst findById = (id: any) => strapi.db.query('plugin::i18n.locale').findOne({ where: { id } });\n\nconst findByCode = (code: any) =>\n strapi.db.query('plugin::i18n.locale').findOne({ where: { code } });\n\nconst count = (params: any = {}) => strapi.db.query('plugin::i18n.locale').count({ where: params });\n\nconst create = async (locale: any) => {\n const result = await strapi.db.query('plugin::i18n.locale').create({ data: locale });\n\n getService('metrics').sendDidUpdateI18nLocalesEvent();\n\n return result;\n};\n\nconst update = async (params: any, updates: any) => {\n const result = await strapi.db\n .query('plugin::i18n.locale')\n .update({ where: params, data: updates });\n\n getService('metrics').sendDidUpdateI18nLocalesEvent();\n\n return result;\n};\n\nconst deleteFn = async ({ id }: any) => {\n const localeToDelete = await findById(id);\n\n if (localeToDelete) {\n await deleteAllLocalizedEntriesFor({ locale: localeToDelete.code });\n const result = await strapi.db.query('plugin::i18n.locale').delete({ where: { id } });\n\n getService('metrics').sendDidUpdateI18nLocalesEvent();\n\n return result;\n }\n\n return localeToDelete;\n};\n\nconst setDefaultLocale = ({ code }: any) =>\n getCoreStore().set({ key: 'default_locale', value: code });\n\nconst getDefaultLocale = () => getCoreStore().get({ key: 'default_locale' });\n\nconst setIsDefault = async (locales: any) => {\n if (isNil(locales)) {\n return locales;\n }\n\n const actualDefault = await getDefaultLocale();\n\n if (Array.isArray(locales)) {\n return locales.map((locale) => ({ ...locale, isDefault: actualDefault === locale.code }));\n }\n // single locale\n return { ...locales, isDefault: actualDefault === locales.code };\n};\n\nconst initDefaultLocale = async () => {\n const existingLocalesNb = await strapi.db.query('plugin::i18n.locale').count();\n if (existingLocalesNb === 0) {\n await create(DEFAULT_LOCALE);\n await setDefaultLocale({ code: DEFAULT_LOCALE.code });\n }\n};\n\nconst deleteAllLocalizedEntriesFor = async ({ locale }: any) => {\n const { isLocalizedContentType } = getService('content-types');\n\n const localizedModels = Object.values(strapi.contentTypes).filter(isLocalizedContentType);\n\n for (const model of localizedModels) {\n // FIXME: delete many content & their associations\n await strapi.db.query(model.uid).deleteMany({ where: { locale } });\n }\n};\n\nconst locales = () => ({\n find,\n findById,\n findByCode,\n create,\n update,\n count,\n setDefaultLocale,\n getDefaultLocale,\n setIsDefault,\n delete: deleteFn,\n initDefaultLocale,\n});\n\ntype LocaleService = typeof locales;\n\nexport default locales;\nexport type { LocaleService };\n"],"names":["find","params","strapi","db","query","findMany","where","findById","id","findOne","findByCode","code","count","create","locale","result","data","getService","sendDidUpdateI18nLocalesEvent","update","updates","deleteFn","localeToDelete","deleteAllLocalizedEntriesFor","delete","setDefaultLocale","getCoreStore","set","key","value","getDefaultLocale","get","setIsDefault","locales","isNil","actualDefault","Array","isArray","map","isDefault","initDefaultLocale","existingLocalesNb","DEFAULT_LOCALE","isLocalizedContentType","localizedModels","Object","values","contentTypes","filter","model","uid","deleteMany"],"mappings":";;;;;;AAIA,MAAMA,IAAO,GAAA,CAACC,MAAc,GAAA,EAAE,GAC5BC,MAAOC,CAAAA,EAAE,CAACC,KAAK,CAAC,qBAAA,CAAA,CAAuBC,QAAQ,CAAC;QAAEC,KAAOL,EAAAA;AAAO,KAAA,CAAA;AAElE,MAAMM,QAAAA,GAAW,CAACC,EAAAA,GAAYN,MAAOC,CAAAA,EAAE,CAACC,KAAK,CAAC,qBAAuBK,CAAAA,CAAAA,OAAO,CAAC;QAAEH,KAAO,EAAA;AAAEE,YAAAA;AAAG;AAAE,KAAA,CAAA;AAE7F,MAAME,UAAAA,GAAa,CAACC,IAAAA,GAClBT,MAAOC,CAAAA,EAAE,CAACC,KAAK,CAAC,qBAAuBK,CAAAA,CAAAA,OAAO,CAAC;QAAEH,KAAO,EAAA;AAAEK,YAAAA;AAAK;AAAE,KAAA,CAAA;AAEnE,MAAMC,KAAQ,GAAA,CAACX,MAAc,GAAA,EAAE,GAAKC,MAAOC,CAAAA,EAAE,CAACC,KAAK,CAAC,qBAAA,CAAA,CAAuBQ,KAAK,CAAC;QAAEN,KAAOL,EAAAA;AAAO,KAAA,CAAA;AAEjG,MAAMY,SAAS,OAAOC,MAAAA,GAAAA;IACpB,MAAMC,MAAAA,GAAS,MAA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E,CAACC,KAAK,CAAC6C,KAAMC,CAAAA,GAAG,CAAEC,CAAAA,UAAU,CAAC;YAAE7C,KAAO,EAAA;AAAEQ,gBAAAA;AAAO;AAAE,SAAA,CAAA;AAClE;AACF,CAAA;AAEMmB,MAAAA,OAAAA,GAAU,KAAO;AACrBjC,QAAAA,IAAAA;AACAO,QAAAA,QAAAA;AACAG,QAAAA,UAAAA;AACAG,QAAAA,MAAAA;AACAM,QAAAA,MAAAA;AACAP,QAAAA,KAAAA;AACAa,QAAAA,gBAAAA;AACAK,QAAAA,gBAAAA;AACAE,QAAAA,YAAAA;QACAR,MAAQH,EAAAA,QAAAA;AACRmB,QAAAA;KACF;;;;"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { isNil } from 'lodash/fp';
|
|
2
|
+
import { DEFAULT_LOCALE } from '../constants/index.mjs';
|
|
3
|
+
import { getService, getCoreStore } from '../utils/index.mjs';
|
|
4
|
+
|
|
5
|
+
const find = (params = {})=>strapi.db.query('plugin::i18n.locale').findMany({
|
|
6
|
+
where: params
|
|
7
|
+
});
|
|
8
|
+
const findById = (id)=>strapi.db.query('plugin::i18n.locale').findOne({
|
|
9
|
+
where: {
|
|
10
|
+
id
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
const findByCode = (code)=>strapi.db.query('plugin::i18n.locale').findOne({
|
|
14
|
+
where: {
|
|
15
|
+
code
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
const count = (params = {})=>strapi.db.query('plugin::i18n.locale').count({
|
|
19
|
+
where: params
|
|
20
|
+
});
|
|
21
|
+
const create = async (locale)=>{
|
|
22
|
+
const result = await strapi.db.query('plugin::i18n.locale').create({
|
|
23
|
+
data: locale
|
|
24
|
+
});
|
|
25
|
+
getService('metrics').sendDidUpdateI18nLocalesEvent();
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
const update = async (params, updates)=>{
|
|
29
|
+
const result = await strapi.db.query('plugin::i18n.locale').update({
|
|
30
|
+
where: params,
|
|
31
|
+
data: updates
|
|
32
|
+
});
|
|
33
|
+
getService('metrics').sendDidUpdateI18nLocalesEvent();
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
const deleteFn = async ({ id })=>{
|
|
37
|
+
const localeToDelete = await findById(id);
|
|
38
|
+
if (localeToDelete) {
|
|
39
|
+
await deleteAllLocalizedEntriesFor({
|
|
40
|
+
locale: localeToDelete.code
|
|
41
|
+
});
|
|
42
|
+
const result = await strapi.db.query('plugin::i18n.locale').delete({
|
|
43
|
+
where: {
|
|
44
|
+
id
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
getService('metrics').sendDidUpdateI18nLocalesEvent();
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
return localeToDelete;
|
|
51
|
+
};
|
|
52
|
+
const setDefaultLocale = ({ code })=>getCoreStore().set({
|
|
53
|
+
key: 'default_locale',
|
|
54
|
+
value: code
|
|
55
|
+
});
|
|
56
|
+
const getDefaultLocale = ()=>getCoreStore().get({
|
|
57
|
+
key: 'default_locale'
|
|
58
|
+
});
|
|
59
|
+
const setIsDefault = async (locales)=>{
|
|
60
|
+
if (isNil(locales)) {
|
|
61
|
+
return locales;
|
|
62
|
+
}
|
|
63
|
+
const actualDefault = await getDefaultLocale();
|
|
64
|
+
if (Array.isArray(locales)) {
|
|
65
|
+
return locales.map((locale)=>({
|
|
66
|
+
...locale,
|
|
67
|
+
isDefault: actualDefault === locale.code
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
// single locale
|
|
71
|
+
return {
|
|
72
|
+
...locales,
|
|
73
|
+
isDefault: actualDefault === locales.code
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
const initDefaultLocale = async ()=>{
|
|
77
|
+
const existingLocalesNb = await strapi.db.query('plugin::i18n.locale').count();
|
|
78
|
+
if (existingLocalesNb === 0) {
|
|
79
|
+
await create(DEFAULT_LOCALE);
|
|
80
|
+
await setDefaultLocale({
|
|
81
|
+
code: DEFAULT_LOCALE.code
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
const deleteAllLocalizedEntriesFor = async ({ locale })=>{
|
|
86
|
+
const { isLocalizedContentType } = getService('content-types');
|
|
87
|
+
const localizedModels = Object.values(strapi.contentTypes).filter(isLocalizedContentType);
|
|
88
|
+
for (const model of localizedModels){
|
|
89
|
+
// FIXME: delete many content & their associations
|
|
90
|
+
await strapi.db.query(model.uid).deleteMany({
|
|
91
|
+
where: {
|
|
92
|
+
locale
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const locales = ()=>({
|
|
98
|
+
find,
|
|
99
|
+
findById,
|
|
100
|
+
findByCode,
|
|
101
|
+
create,
|
|
102
|
+
update,
|
|
103
|
+
count,
|
|
104
|
+
setDefaultLocale,
|
|
105
|
+
getDefaultLocale,
|
|
106
|
+
setIsDefault,
|
|
107
|
+
delete: deleteFn,
|
|
108
|
+
initDefaultLocale
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
export { locales as default };
|
|
112
|
+
//# sourceMappingURL=locales.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locales.mjs","sources":["../../../server/src/services/locales.ts"],"sourcesContent":["import { isNil } from 'lodash/fp';\nimport { DEFAULT_LOCALE } from '../constants';\nimport { getService, getCoreStore } from '../utils';\n\nconst find = (params: any = {}) =>\n strapi.db.query('plugin::i18n.locale').findMany({ where: params });\n\nconst findById = (id: any) => strapi.db.query('plugin::i18n.locale').findOne({ where: { id } });\n\nconst findByCode = (code: any) =>\n strapi.db.query('plugin::i18n.locale').findOne({ where: { code } });\n\nconst count = (params: any = {}) => strapi.db.query('plugin::i18n.locale').count({ where: params });\n\nconst create = async (locale: any) => {\n const result = await strapi.db.query('plugin::i18n.locale').create({ data: locale });\n\n getService('metrics').sendDidUpdateI18nLocalesEvent();\n\n return result;\n};\n\nconst update = async (params: any, updates: any) => {\n const result = await strapi.db\n .query('plugin::i18n.locale')\n .update({ where: params, data: updates });\n\n getService('metrics').sendDidUpdateI18nLocalesEvent();\n\n return result;\n};\n\nconst deleteFn = async ({ id }: any) => {\n const localeToDelete = await findById(id);\n\n if (localeToDelete) {\n await deleteAllLocalizedEntriesFor({ locale: localeToDelete.code });\n const result = await strapi.db.query('plugin::i18n.locale').delete({ where: { id } });\n\n getService('metrics').sendDidUpdateI18nLocalesEvent();\n\n return result;\n }\n\n return localeToDelete;\n};\n\nconst setDefaultLocale = ({ code }: any) =>\n getCoreStore().set({ key: 'default_locale', value: code });\n\nconst getDefaultLocale = () => getCoreStore().get({ key: 'default_locale' });\n\nconst setIsDefault = async (locales: any) => {\n if (isNil(locales)) {\n return locales;\n }\n\n const actualDefault = await getDefaultLocale();\n\n if (Array.isArray(locales)) {\n return locales.map((locale) => ({ ...locale, isDefault: actualDefault === locale.code }));\n }\n // single locale\n return { ...locales, isDefault: actualDefault === locales.code };\n};\n\nconst initDefaultLocale = async () => {\n const existingLocalesNb = await strapi.db.query('plugin::i18n.locale').count();\n if (existingLocalesNb === 0) {\n await create(DEFAULT_LOCALE);\n await setDefaultLocale({ code: DEFAULT_LOCALE.code });\n }\n};\n\nconst deleteAllLocalizedEntriesFor = async ({ locale }: any) => {\n const { isLocalizedContentType } = getService('content-types');\n\n const localizedModels = Object.values(strapi.contentTypes).filter(isLocalizedContentType);\n\n for (const model of localizedModels) {\n // FIXME: delete many content & their associations\n await strapi.db.query(model.uid).deleteMany({ where: { locale } });\n }\n};\n\nconst locales = () => ({\n find,\n findById,\n findByCode,\n create,\n update,\n count,\n setDefaultLocale,\n getDefaultLocale,\n setIsDefault,\n delete: deleteFn,\n initDefaultLocale,\n});\n\ntype LocaleService = typeof locales;\n\nexport default locales;\nexport type { LocaleService };\n"],"names":["find","params","strapi","db","query","findMany","where","findById","id","findOne","findByCode","code","count","create","locale","result","data","getService","sendDidUpdateI18nLocalesEvent","update","updates","deleteFn","localeToDelete","deleteAllLocalizedEntriesFor","delete","setDefaultLocale","getCoreStore","set","key","value","getDefaultLocale","get","setIsDefault","locales","isNil","actualDefault","Array","isArray","map","isDefault","initDefaultLocale","existingLocalesNb","DEFAULT_LOCALE","isLocalizedContentType","localizedModels","Object","values","contentTypes","filter","model","uid","deleteMany"],"mappings":";;;;AAIA,MAAMA,IAAO,GAAA,CAACC,MAAc,GAAA,EAAE,GAC5BC,MAAOC,CAAAA,EAAE,CAACC,KAAK,CAAC,qBAAA,CAAA,CAAuBC,QAAQ,CAAC;QAAEC,KAAOL,EAAAA;AAAO,KAAA,CAAA;AAElE,MAAMM,QAAAA,GAAW,CAACC,EAAAA,GAAYN,MAAOC,CAAAA,EAAE,CAACC,KAAK,CAAC,qBAAuBK,CAAAA,CAAAA,OAAO,CAAC;QAAEH,KAAO,EAAA;AAAEE,YAAAA;AAAG;AAAE,KAAA,CAAA;AAE7F,MAAME,UAAAA,GAAa,CAACC,IAAAA,GAClBT,MAAOC,CAAAA,EAAE,CAACC,KAAK,CAAC,qBAAuBK,CAAAA,CAAAA,OAAO,CAAC;QAAEH,KAAO,EAAA;AAAEK,YAAAA;AAAK;AAAE,KAAA,CAAA;AAEnE,MAAMC,KAAQ,GAAA,CAACX,MAAc,GAAA,EAAE,GAAKC,MAAOC,CAAAA,EAAE,CAACC,KAAK,CAAC,qBAAA,CAAA,CAAuBQ,KAAK,CAAC;QAAEN,KAAOL,EAAAA;AAAO,KAAA,CAAA;AAEjG,MAAMY,SAAS,OAAOC,MAAAA,GAAAA;IACpB,MAAMC,MAAAA,GAAS,MAAMb,MAAOC,CAAAA,EAAE,CAACC,KAAK,CAAC,qBAAuBS,CAAAA,CAAAA,MAAM,CAAC;QAAEG,IAAMF,EAAAA;AAAO,KAAA,CAAA;AAElFG,IAAAA,UAAAA,CAAW,WAAWC,6BAA6B,EAAA;IAEnD,OAAOH,MAAAA;AACT,CAAA;AAEA,MAAMI,MAAAA,GAAS,OAAOlB,MAAamB,EAAAA,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,MAAAA;AACAM,QAAAA,MAAAA;AACAP,QAAAA,KAAAA;AACAa,QAAAA,gBAAAA;AACAK,QAAAA,gBAAAA;AACAE,QAAAA,YAAAA;QACAR,MAAQH,EAAAA,QAAAA;AACRmB,QAAAA;KACF;;;;"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var fp = require('lodash/fp');
|
|
4
|
+
var utils = require('@strapi/utils');
|
|
5
|
+
var index = require('../utils/index.js');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Update non localized fields of all the related localizations of an entry with the entry values
|
|
9
|
+
*/ const syncNonLocalizedAttributes = async (sourceEntry, model)=>{
|
|
10
|
+
const { copyNonLocalizedAttributes } = index.getService('content-types');
|
|
11
|
+
const nonLocalizedAttributes = copyNonLocalizedAttributes(model, sourceEntry);
|
|
12
|
+
if (fp.isEmpty(nonLocalizedAttributes)) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const uid = model.uid;
|
|
16
|
+
const documentId = sourceEntry.documentId;
|
|
17
|
+
const locale = sourceEntry.locale;
|
|
18
|
+
const status = sourceEntry?.publishedAt ? 'published' : 'draft';
|
|
19
|
+
// Find all the entries that need to be updated
|
|
20
|
+
// this is every other entry of the document in the same status but a different locale
|
|
21
|
+
const localeEntriesToUpdate = await strapi.db.query(uid).findMany({
|
|
22
|
+
where: {
|
|
23
|
+
documentId,
|
|
24
|
+
publishedAt: status === 'published' ? {
|
|
25
|
+
$ne: null
|
|
26
|
+
} : null,
|
|
27
|
+
locale: {
|
|
28
|
+
$ne: locale
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
select: [
|
|
32
|
+
'locale',
|
|
33
|
+
'id'
|
|
34
|
+
]
|
|
35
|
+
});
|
|
36
|
+
const entryData = await strapi.documents(uid).omitComponentData(nonLocalizedAttributes);
|
|
37
|
+
await utils.async.map(localeEntriesToUpdate, async (entry)=>{
|
|
38
|
+
const transformedData = await strapi.documents.utils.transformData(fp.cloneDeep(nonLocalizedAttributes), {
|
|
39
|
+
uid,
|
|
40
|
+
status,
|
|
41
|
+
locale: entry.locale,
|
|
42
|
+
allowMissingId: true
|
|
43
|
+
});
|
|
44
|
+
// Update or create non localized components for the entry
|
|
45
|
+
const componentData = await strapi.documents(uid).updateComponents(entry, transformedData);
|
|
46
|
+
// Update every other locale entry of this documentId in the same status
|
|
47
|
+
await strapi.db.query(uid).update({
|
|
48
|
+
where: {
|
|
49
|
+
documentId,
|
|
50
|
+
publishedAt: status === 'published' ? {
|
|
51
|
+
$ne: null
|
|
52
|
+
} : null,
|
|
53
|
+
locale: {
|
|
54
|
+
$eq: entry.locale
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
// The data we send to the update function is the entry data merged with
|
|
58
|
+
// the updated component data
|
|
59
|
+
data: Object.assign(fp.cloneDeep(entryData), componentData)
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
const localizations = ()=>({
|
|
64
|
+
syncNonLocalizedAttributes
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
module.exports = localizations;
|
|
68
|
+
//# sourceMappingURL=localizations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localizations.js","sources":["../../../server/src/services/localizations.ts"],"sourcesContent":["import { cloneDeep, isEmpty } from 'lodash/fp';\n\nimport type { Schema } from '@strapi/types';\nimport { async } from '@strapi/utils';\nimport { getService } from '../utils';\n\n/**\n * Update non localized fields of all the related localizations of an entry with the entry values\n */\nconst syncNonLocalizedAttributes = async (sourceEntry: any, model: Schema.ContentType) => {\n const { copyNonLocalizedAttributes } = getService('content-types');\n\n const nonLocalizedAttributes = copyNonLocalizedAttributes(model, sourceEntry);\n if (isEmpty(nonLocalizedAttributes)) {\n return;\n }\n\n const uid = model.uid;\n const documentId = sourceEntry.documentId;\n const locale = sourceEntry.locale;\n const status = sourceEntry?.publishedAt ? 'published' : 'draft';\n\n // Find all the entries that need to be updated\n // this is every other entry of the document in the same status but a different locale\n const localeEntriesToUpdate = await strapi.db.query(uid).findMany({\n where: {\n documentId,\n publishedAt: status === 'published' ? { $ne: null } : null,\n locale: { $ne: locale },\n },\n select: ['locale', 'id'],\n });\n\n const entryData = await strapi.documents(uid).omitComponentData(nonLocalizedAttributes);\n\n await async.map(localeEntriesToUpdate, async (entry: any) => {\n const transformedData = await strapi.documents.utils.transformData(\n cloneDeep(nonLocalizedAttributes),\n {\n uid,\n status,\n locale: entry.locale,\n allowMissingId: true,\n }\n );\n\n // Update or create non localized components for the entry\n const componentData = await strapi\n .documents(uid)\n .updateComponents(entry, transformedData as any);\n\n // Update every other locale entry of this documentId in the same status\n await strapi.db.query(uid).update({\n where: {\n documentId,\n publishedAt: status === 'published' ? { $ne: null } : null,\n locale: { $eq: entry.locale },\n },\n // The data we send to the update function is the entry data merged with\n // the updated component data\n data: Object.assign(cloneDeep(entryData), componentData),\n });\n });\n};\n\nconst localizations = () => ({\n syncNonLocalizedAttributes,\n});\n\ntype LocalizationsService = typeof localizations;\n\nexport default localizations;\nexport type { LocalizationsService };\n"],"names":["syncNonLocalizedAttributes","sourceEntry","model","copyNonLocalizedAttributes","getService","nonLocalizedAttributes","isEmpty","uid","documentId","locale","status","publishedAt","localeEntriesToUpdate","strapi","db","query","findMany","where","$ne","select","entryData","documents","omitComponentData","async","map","entry","transformedData","utils","transformData","cloneDeep","allowMissingId","componentData","updateComponents","update","$eq","data","Object","assign","localizations"],"mappings":";;;;;;AAMA;;IAGA,MAAMA,0BAA6B,GAAA,OAAOC,WAAkBC,EAAAA,KAAAA,GAAAA;AAC1D,IAAA,MAAM,EAAEC,0BAA0B,EAAE,GAAGC,gBAAW,CAAA,eAAA,CAAA;IAElD,MAAMC,sBAAAA,GAAyBF,2BAA2BD,KAAOD,EAAAA,WAAAA,CAAAA;AACjE,IAAA,IAAIK,WAAQD,sBAAyB,CAAA,EAAA;AACnC,QAAA;AACF;IAEA,MAAME,GAAAA,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LT,gBAAAA,UAAAA;AACAG,gBAAAA,WAAAA,EAAaD,WAAW,WAAc,GAAA;oBAAEQ,GAAK,EAAA;iBAAS,GAAA,IAAA;gBACtDT,MAAQ,EAAA;AAAEyB,oBAAAA,GAAAA,EAAKT,MAAMhB;AAAO;AAC9B,aAAA;;;AAGA0B,YAAAA,IAAAA,EAAMC,MAAOC,CAAAA,MAAM,CAACR,YAAAA,CAAUT,SAAYW,CAAAA,EAAAA,aAAAA;AAC5C,SAAA,CAAA;AACF,KAAA,CAAA;AACF,CAAA;AAEMO,MAAAA,aAAAA,GAAgB,KAAO;AAC3BtC,QAAAA;KACF;;;;"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { isEmpty, cloneDeep } from 'lodash/fp';
|
|
2
|
+
import { async } from '@strapi/utils';
|
|
3
|
+
import { getService } from '../utils/index.mjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Update non localized fields of all the related localizations of an entry with the entry values
|
|
7
|
+
*/ const syncNonLocalizedAttributes = async (sourceEntry, model)=>{
|
|
8
|
+
const { copyNonLocalizedAttributes } = getService('content-types');
|
|
9
|
+
const nonLocalizedAttributes = copyNonLocalizedAttributes(model, sourceEntry);
|
|
10
|
+
if (isEmpty(nonLocalizedAttributes)) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const uid = model.uid;
|
|
14
|
+
const documentId = sourceEntry.documentId;
|
|
15
|
+
const locale = sourceEntry.locale;
|
|
16
|
+
const status = sourceEntry?.publishedAt ? 'published' : 'draft';
|
|
17
|
+
// Find all the entries that need to be updated
|
|
18
|
+
// this is every other entry of the document in the same status but a different locale
|
|
19
|
+
const localeEntriesToUpdate = await strapi.db.query(uid).findMany({
|
|
20
|
+
where: {
|
|
21
|
+
documentId,
|
|
22
|
+
publishedAt: status === 'published' ? {
|
|
23
|
+
$ne: null
|
|
24
|
+
} : null,
|
|
25
|
+
locale: {
|
|
26
|
+
$ne: locale
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
select: [
|
|
30
|
+
'locale',
|
|
31
|
+
'id'
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
const entryData = await strapi.documents(uid).omitComponentData(nonLocalizedAttributes);
|
|
35
|
+
await async.map(localeEntriesToUpdate, async (entry)=>{
|
|
36
|
+
const transformedData = await strapi.documents.utils.transformData(cloneDeep(nonLocalizedAttributes), {
|
|
37
|
+
uid,
|
|
38
|
+
status,
|
|
39
|
+
locale: entry.locale,
|
|
40
|
+
allowMissingId: true
|
|
41
|
+
});
|
|
42
|
+
// Update or create non localized components for the entry
|
|
43
|
+
const componentData = await strapi.documents(uid).updateComponents(entry, transformedData);
|
|
44
|
+
// Update every other locale entry of this documentId in the same status
|
|
45
|
+
await strapi.db.query(uid).update({
|
|
46
|
+
where: {
|
|
47
|
+
documentId,
|
|
48
|
+
publishedAt: status === 'published' ? {
|
|
49
|
+
$ne: null
|
|
50
|
+
} : null,
|
|
51
|
+
locale: {
|
|
52
|
+
$eq: entry.locale
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
// The data we send to the update function is the entry data merged with
|
|
56
|
+
// the updated component data
|
|
57
|
+
data: Object.assign(cloneDeep(entryData), componentData)
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
const localizations = ()=>({
|
|
62
|
+
syncNonLocalizedAttributes
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
export { localizations as default };
|
|
66
|
+
//# sourceMappingURL=localizations.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localizations.mjs","sources":["../../../server/src/services/localizations.ts"],"sourcesContent":["import { cloneDeep, isEmpty } from 'lodash/fp';\n\nimport type { Schema } from '@strapi/types';\nimport { async } from '@strapi/utils';\nimport { getService } from '../utils';\n\n/**\n * Update non localized fields of all the related localizations of an entry with the entry values\n */\nconst syncNonLocalizedAttributes = async (sourceEntry: any, model: Schema.ContentType) => {\n const { copyNonLocalizedAttributes } = getService('content-types');\n\n const nonLocalizedAttributes = copyNonLocalizedAttributes(model, sourceEntry);\n if (isEmpty(nonLocalizedAttributes)) {\n return;\n }\n\n const uid = model.uid;\n const documentId = sourceEntry.documentId;\n const locale = sourceEntry.locale;\n const status = sourceEntry?.publishedAt ? 'published' : 'draft';\n\n // Find all the entries that need to be updated\n // this is every other entry of the document in the same status but a different locale\n const localeEntriesToUpdate = await strapi.db.query(uid).findMany({\n where: {\n documentId,\n publishedAt: status === 'published' ? { $ne: null } : null,\n locale: { $ne: locale },\n },\n select: ['locale', 'id'],\n });\n\n const entryData = await strapi.documents(uid).omitComponentData(nonLocalizedAttributes);\n\n await async.map(localeEntriesToUpdate, async (entry: any) => {\n const transformedData = await strapi.documents.utils.transformData(\n cloneDeep(nonLocalizedAttributes),\n {\n uid,\n status,\n locale: entry.locale,\n allowMissingId: true,\n }\n );\n\n // Update or create non localized components for the entry\n const componentData = await strapi\n .documents(uid)\n .updateComponents(entry, transformedData as any);\n\n // Update every other locale entry of this documentId in the same status\n await strapi.db.query(uid).update({\n where: {\n documentId,\n publishedAt: status === 'published' ? { $ne: null } : null,\n locale: { $eq: entry.locale },\n },\n // The data we send to the update function is the entry data merged with\n // the updated component data\n data: Object.assign(cloneDeep(entryData), componentData),\n });\n });\n};\n\nconst localizations = () => ({\n syncNonLocalizedAttributes,\n});\n\ntype LocalizationsService = typeof localizations;\n\nexport default localizations;\nexport type { LocalizationsService };\n"],"names":["syncNonLocalizedAttributes","sourceEntry","model","copyNonLocalizedAttributes","getService","nonLocalizedAttributes","isEmpty","uid","documentId","locale","status","publishedAt","localeEntriesToUpdate","strapi","db","query","findMany","where","$ne","select","entryData","documents","omitComponentData","async","map","entry","transformedData","utils","transformData","cloneDeep","allowMissingId","componentData","updateComponents","update","$eq","data","Object","assign","localizations"],"mappings":";;;;AAMA;;IAGA,MAAMA,0BAA6B,GAAA,OAAOC,WAAkBC,EAAAA,KAAAA,GAAAA;AAC1D,IAAA,MAAM,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B,MACzBQ,CAAAA,SAAS,CAACd,GACVyB,CAAAA,CAAAA,gBAAgB,CAACP,KAAOC,EAAAA,eAAAA,CAAAA;;AAG3B,QAAA,MAAMb,OAAOC,EAAE,CAACC,KAAK,CAACR,GAAAA,CAAAA,CAAK0B,MAAM,CAAC;YAChChB,KAAO,EAAA;AACLT,gBAAAA,UAAAA;AACAG,gBAAAA,WAAAA,EAAaD,WAAW,WAAc,GAAA;oBAAEQ,GAAK,EAAA;iBAAS,GAAA,IAAA;gBACtDT,MAAQ,EAAA;AAAEyB,oBAAAA,GAAAA,EAAKT,MAAMhB;AAAO;AAC9B,aAAA;;;AAGA0B,YAAAA,IAAAA,EAAMC,MAAOC,CAAAA,MAAM,CAACR,SAAAA,CAAUT,SAAYW,CAAAA,EAAAA,aAAAA;AAC5C,SAAA,CAAA;AACF,KAAA,CAAA;AACF,CAAA;AAEMO,MAAAA,aAAAA,GAAgB,KAAO;AAC3BtC,QAAAA;KACF;;;;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var fp = require('lodash/fp');
|
|
4
|
+
var index = require('../utils/index.js');
|
|
5
|
+
|
|
6
|
+
const sendDidInitializeEvent = async ()=>{
|
|
7
|
+
const { isLocalizedContentType } = index.getService('content-types');
|
|
8
|
+
// TODO: V5: This event should be renamed numberOfContentTypes in V5 as the name is already taken to describe the number of content types using i18n.
|
|
9
|
+
const numberOfContentTypes = fp.reduce((sum, contentType)=>isLocalizedContentType(contentType) ? sum + 1 : sum, 0)(strapi.contentTypes);
|
|
10
|
+
await strapi.telemetry.send('didInitializeI18n', {
|
|
11
|
+
groupProperties: {
|
|
12
|
+
numberOfContentTypes
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
const sendDidUpdateI18nLocalesEvent = async ()=>{
|
|
17
|
+
const numberOfLocales = await index.getService('locales').count();
|
|
18
|
+
await strapi.telemetry.send('didUpdateI18nLocales', {
|
|
19
|
+
groupProperties: {
|
|
20
|
+
numberOfLocales
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
const metrics = ()=>({
|
|
25
|
+
sendDidInitializeEvent,
|
|
26
|
+
sendDidUpdateI18nLocalesEvent
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
module.exports = metrics;
|
|
30
|
+
//# sourceMappingURL=metrics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics.js","sources":["../../../server/src/services/metrics.ts"],"sourcesContent":["import { reduce } from 'lodash/fp';\nimport { getService } from '../utils';\n\nconst sendDidInitializeEvent = async () => {\n const { isLocalizedContentType } = getService('content-types');\n\n // TODO: V5: This event should be renamed numberOfContentTypes in V5 as the name is already taken to describe the number of content types using i18n.\n const numberOfContentTypes = reduce(\n (sum, contentType) => (isLocalizedContentType(contentType) ? sum + 1 : sum),\n 0\n )(strapi.contentTypes as any);\n\n await strapi.telemetry.send('didInitializeI18n', { groupProperties: { numberOfContentTypes } });\n};\n\nconst sendDidUpdateI18nLocalesEvent = async () => {\n const numberOfLocales = await getService('locales').count();\n\n await strapi.telemetry.send('didUpdateI18nLocales', {\n groupProperties: { numberOfLocales },\n });\n};\n\nconst metrics = () => ({\n sendDidInitializeEvent,\n sendDidUpdateI18nLocalesEvent,\n});\n\ntype MetricsService = typeof metrics;\n\nexport default metrics;\nexport type { MetricsService };\n"],"names":["sendDidInitializeEvent","isLocalizedContentType","getService","numberOfContentTypes","reduce","sum","contentType","strapi","contentTypes","telemetry","send","groupProperties","sendDidUpdateI18nLocalesEvent","numberOfLocales","count","metrics"],"mappings":";;;;;AAGA,MAAMA,sBAAyB,GAAA,UAAA;AAC7B,IAAA,MAAM,EAAEC,sBAAsB,EAAE,GAAGC,gBAAW,CAAA,eAAA,CAAA;;AAG9C,IAAA,MAAMC,oBAAuBC,GAAAA,SAAAA,CAC3B,CAACC,GAAAA,EAAKC,WAAiBL,GAAAA,sBAAAA,CAAuBK,WAAeD,CAAAA,GAAAA,GAAAA,GAAM,CAAIA,GAAAA,GAAAA,EACvE,CACAE,CAAAA,CAAAA,MAAAA,CAAOC,YAAY,CAAA;AAErB,IAAA,MAAMD,MAAOE,CAAAA,SAAS,CAACC,IAAI,CAAC,mBAAqB,EAAA;QAAEC,eAAiB,EAAA;AAAER,YAAAA;AAAqB;AAAE,KAAA,CAAA;AAC/F,CAAA;AAEA,MAAMS,6BAAgC,GAAA,UAAA;AACpC,IAAA,MAAMC,eAAkB,GAAA,MAAMX,gBAAW,CAAA,SAAA,CAAA,CAAWY,KAAK,EAAA;AAEzD,IAAA,MAAMP,MAAOE,CAAAA,SAAS,CAACC,IAAI,CAAC,sBAAwB,EAAA;QAClDC,eAAiB,EAAA;AAAEE,YAAAA;AAAgB;AACrC,KAAA,CAAA;AACF,CAAA;AAEME,MAAAA,OAAAA,GAAU,KAAO;AACrBf,QAAAA,sBAAAA;AACAY,QAAAA;KACF;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { reduce } from 'lodash/fp';
|
|
2
|
+
import { getService } from '../utils/index.mjs';
|
|
3
|
+
|
|
4
|
+
const sendDidInitializeEvent = async ()=>{
|
|
5
|
+
const { isLocalizedContentType } = getService('content-types');
|
|
6
|
+
// TODO: V5: This event should be renamed numberOfContentTypes in V5 as the name is already taken to describe the number of content types using i18n.
|
|
7
|
+
const numberOfContentTypes = reduce((sum, contentType)=>isLocalizedContentType(contentType) ? sum + 1 : sum, 0)(strapi.contentTypes);
|
|
8
|
+
await strapi.telemetry.send('didInitializeI18n', {
|
|
9
|
+
groupProperties: {
|
|
10
|
+
numberOfContentTypes
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
const sendDidUpdateI18nLocalesEvent = async ()=>{
|
|
15
|
+
const numberOfLocales = await getService('locales').count();
|
|
16
|
+
await strapi.telemetry.send('didUpdateI18nLocales', {
|
|
17
|
+
groupProperties: {
|
|
18
|
+
numberOfLocales
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
const metrics = ()=>({
|
|
23
|
+
sendDidInitializeEvent,
|
|
24
|
+
sendDidUpdateI18nLocalesEvent
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export { metrics as default };
|
|
28
|
+
//# sourceMappingURL=metrics.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics.mjs","sources":["../../../server/src/services/metrics.ts"],"sourcesContent":["import { reduce } from 'lodash/fp';\nimport { getService } from '../utils';\n\nconst sendDidInitializeEvent = async () => {\n const { isLocalizedContentType } = getService('content-types');\n\n // TODO: V5: This event should be renamed numberOfContentTypes in V5 as the name is already taken to describe the number of content types using i18n.\n const numberOfContentTypes = reduce(\n (sum, contentType) => (isLocalizedContentType(contentType) ? sum + 1 : sum),\n 0\n )(strapi.contentTypes as any);\n\n await strapi.telemetry.send('didInitializeI18n', { groupProperties: { numberOfContentTypes } });\n};\n\nconst sendDidUpdateI18nLocalesEvent = async () => {\n const numberOfLocales = await getService('locales').count();\n\n await strapi.telemetry.send('didUpdateI18nLocales', {\n groupProperties: { numberOfLocales },\n });\n};\n\nconst metrics = () => ({\n sendDidInitializeEvent,\n sendDidUpdateI18nLocalesEvent,\n});\n\ntype MetricsService = typeof metrics;\n\nexport default metrics;\nexport type { MetricsService };\n"],"names":["sendDidInitializeEvent","isLocalizedContentType","getService","numberOfContentTypes","reduce","sum","contentType","strapi","contentTypes","telemetry","send","groupProperties","sendDidUpdateI18nLocalesEvent","numberOfLocales","count","metrics"],"mappings":";;;AAGA,MAAMA,sBAAyB,GAAA,UAAA;AAC7B,IAAA,MAAM,EAAEC,sBAAsB,EAAE,GAAGC,UAAW,CAAA,eAAA,CAAA;;AAG9C,IAAA,MAAMC,oBAAuBC,GAAAA,MAAAA,CAC3B,CAACC,GAAAA,EAAKC,WAAiBL,GAAAA,sBAAAA,CAAuBK,WAAeD,CAAAA,GAAAA,GAAAA,GAAM,CAAIA,GAAAA,GAAAA,EACvE,CACAE,CAAAA,CAAAA,MAAAA,CAAOC,YAAY,CAAA;AAErB,IAAA,MAAMD,MAAOE,CAAAA,SAAS,CAACC,IAAI,CAAC,mBAAqB,EAAA;QAAEC,eAAiB,EAAA;AAAER,YAAAA;AAAqB;AAAE,KAAA,CAAA;AAC/F,CAAA;AAEA,MAAMS,6BAAgC,GAAA,UAAA;AACpC,IAAA,MAAMC,eAAkB,GAAA,MAAMX,UAAW,CAAA,SAAA,CAAA,CAAWY,KAAK,EAAA;AAEzD,IAAA,MAAMP,MAAOE,CAAAA,SAAS,CAACC,IAAI,CAAC,sBAAwB,EAAA;QAClDC,eAAiB,EAAA;AAAEE,YAAAA;AAAgB;AACrC,KAAA,CAAA;AACF,CAAA;AAEME,MAAAA,OAAAA,GAAU,KAAO;AACrBf,QAAAA,sBAAAA;AACAY,QAAAA;KACF;;;;"}
|