@strapi/i18n 0.0.0-next.ce84fada19d58a7dfbdd553035e6558f8befcba4 → 0.0.0-next.ce8ed0c8aa03361c3009f41af96f742be028ffd9
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 +968 -0
- package/dist/admin/components/CMHeaderActions.js.map +1 -0
- package/dist/admin/components/CMHeaderActions.mjs +942 -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 +394 -0
- package/dist/admin/components/CreateLocale.js.map +1 -0
- package/dist/admin/components/CreateLocale.mjs +368 -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 +226 -5
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +202 -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/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 +19 -6
- package/dist/admin/src/components/LocaleListCell.d.ts +5 -4
- 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/hooks/useAILocalizationJobsPolling.d.ts +9 -0
- package/dist/admin/src/pages/tests/SettingsPage.test.d.ts +1 -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/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 +91 -0
- package/dist/admin/translations/en.json.js.map +1 -0
- package/dist/admin/translations/en.json.mjs +89 -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 +81 -0
- package/dist/server/bootstrap.js.map +1 -0
- package/dist/server/bootstrap.mjs +79 -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 +18 -3430
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +17 -3412
- 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 +53 -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 +39 -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/sanitize/index.d.ts +11 -0
- package/dist/server/src/services/sanitize/index.d.ts.map +1 -0
- 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 +9 -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/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/dist/shared/contracts/shared.d.ts.map +1 -0
- package/package.json +22 -17
- package/dist/_chunks/SettingsPage-DbRFoF_H.mjs +0 -554
- package/dist/_chunks/SettingsPage-DbRFoF_H.mjs.map +0 -1
- package/dist/_chunks/SettingsPage-uGJv15wR.js +0 -574
- package/dist/_chunks/SettingsPage-uGJv15wR.js.map +0 -1
- package/dist/_chunks/de-9eCAqqrB.mjs +0 -66
- package/dist/_chunks/de-9eCAqqrB.mjs.map +0 -1
- package/dist/_chunks/de-DtWiGdHl.js +0 -66
- package/dist/_chunks/de-DtWiGdHl.js.map +0 -1
- package/dist/_chunks/dk-2qBjxt-P.mjs +0 -66
- package/dist/_chunks/dk-2qBjxt-P.mjs.map +0 -1
- package/dist/_chunks/dk-D8C-casx.js +0 -66
- package/dist/_chunks/dk-D8C-casx.js.map +0 -1
- package/dist/_chunks/en-BYRZFDBV.mjs +0 -81
- package/dist/_chunks/en-BYRZFDBV.mjs.map +0 -1
- package/dist/_chunks/en-Dk9At9_Z.js +0 -81
- package/dist/_chunks/en-Dk9At9_Z.js.map +0 -1
- package/dist/_chunks/es-DS-XFGSw.js +0 -66
- package/dist/_chunks/es-DS-XFGSw.js.map +0 -1
- package/dist/_chunks/es-DlmMVaBG.mjs +0 -66
- package/dist/_chunks/es-DlmMVaBG.mjs.map +0 -1
- package/dist/_chunks/fr-3S6ke71d.mjs +0 -66
- package/dist/_chunks/fr-3S6ke71d.mjs.map +0 -1
- package/dist/_chunks/fr-BTjekDpq.js +0 -66
- package/dist/_chunks/fr-BTjekDpq.js.map +0 -1
- package/dist/_chunks/index-7_EUScSl.mjs +0 -1614
- package/dist/_chunks/index-7_EUScSl.mjs.map +0 -1
- package/dist/_chunks/index-BGtXLYX-.js +0 -1636
- package/dist/_chunks/index-BGtXLYX-.js.map +0 -1
- package/dist/_chunks/ko-DmcGUBQ3.js +0 -65
- package/dist/_chunks/ko-DmcGUBQ3.js.map +0 -1
- package/dist/_chunks/ko-qTjQ8IMw.mjs +0 -65
- package/dist/_chunks/ko-qTjQ8IMw.mjs.map +0 -1
- package/dist/_chunks/pl-B67TSHqT.mjs +0 -66
- package/dist/_chunks/pl-B67TSHqT.mjs.map +0 -1
- package/dist/_chunks/pl-Cn5RYonZ.js +0 -66
- package/dist/_chunks/pl-Cn5RYonZ.js.map +0 -1
- package/dist/_chunks/ru-BMBgVL3s.js +0 -68
- package/dist/_chunks/ru-BMBgVL3s.js.map +0 -1
- package/dist/_chunks/ru-hagMa57T.mjs +0 -68
- package/dist/_chunks/ru-hagMa57T.mjs.map +0 -1
- package/dist/_chunks/tr-CarUU76c.js +0 -66
- package/dist/_chunks/tr-CarUU76c.js.map +0 -1
- package/dist/_chunks/tr-Dw_jmkG-.mjs +0 -66
- package/dist/_chunks/tr-Dw_jmkG-.mjs.map +0 -1
- package/dist/_chunks/zh-57YM4amO.mjs +0 -66
- package/dist/_chunks/zh-57YM4amO.mjs.map +0 -1
- package/dist/_chunks/zh-CukOviB0.js +0 -66
- package/dist/_chunks/zh-CukOviB0.js.map +0 -1
- package/dist/_chunks/zh-Hans-DSHIXAa3.js +0 -57
- package/dist/_chunks/zh-Hans-DSHIXAa3.js.map +0 -1
- package/dist/_chunks/zh-Hans-Dyc-aR-h.mjs +0 -57
- package/dist/_chunks/zh-Hans-Dyc-aR-h.mjs.map +0 -1
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var strapiAdmin = require('@strapi/admin/strapi-admin');
|
|
6
|
+
var designSystem = require('@strapi/design-system');
|
|
7
|
+
var icons = require('@strapi/icons');
|
|
8
|
+
var reactIntl = require('react-intl');
|
|
9
|
+
var locales = require('../services/locales.js');
|
|
10
|
+
var baseQuery = require('../utils/baseQuery.js');
|
|
11
|
+
var getTranslation = require('../utils/getTranslation.js');
|
|
12
|
+
var CreateLocale = require('./CreateLocale.js');
|
|
13
|
+
|
|
14
|
+
function _interopNamespaceDefault(e) {
|
|
15
|
+
var n = Object.create(null);
|
|
16
|
+
if (e) {
|
|
17
|
+
Object.keys(e).forEach(function (k) {
|
|
18
|
+
if (k !== 'default') {
|
|
19
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
20
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return e[k]; }
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
n.default = e;
|
|
28
|
+
return Object.freeze(n);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
32
|
+
|
|
33
|
+
const EditLocale = (props)=>{
|
|
34
|
+
const { formatMessage } = reactIntl.useIntl();
|
|
35
|
+
const [visible, setVisible] = React__namespace.useState(false);
|
|
36
|
+
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
37
|
+
children: [
|
|
38
|
+
/*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
|
|
39
|
+
onClick: ()=>setVisible(true),
|
|
40
|
+
label: formatMessage({
|
|
41
|
+
id: getTranslation.getTranslation('Settings.list.actions.edit'),
|
|
42
|
+
defaultMessage: 'Edit {name} locale'
|
|
43
|
+
}, {
|
|
44
|
+
name: props.name
|
|
45
|
+
}),
|
|
46
|
+
variant: "ghost",
|
|
47
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(icons.Pencil, {})
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ jsxRuntime.jsx(EditModal, {
|
|
50
|
+
...props,
|
|
51
|
+
open: visible,
|
|
52
|
+
onOpenChange: setVisible
|
|
53
|
+
})
|
|
54
|
+
]
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* @internal
|
|
59
|
+
* @description Exported to be used when someone clicks on a table row.
|
|
60
|
+
*/ const EditModal = ({ id, code, isDefault, name, open, onOpenChange })=>{
|
|
61
|
+
const { toggleNotification } = strapiAdmin.useNotification();
|
|
62
|
+
const { _unstableFormatAPIError: formatAPIError, _unstableFormatValidationErrors: formatValidationErrors } = strapiAdmin.useAPIErrorHandler();
|
|
63
|
+
const refetchPermissions = strapiAdmin.useAuth('EditModal', (state)=>state.refetchPermissions);
|
|
64
|
+
const { formatMessage } = reactIntl.useIntl();
|
|
65
|
+
const titleId = designSystem.useId();
|
|
66
|
+
const [updateLocale] = locales.useUpdateLocaleMutation();
|
|
67
|
+
const handleSubmit = async ({ code: _code, ...data }, helpers)=>{
|
|
68
|
+
try {
|
|
69
|
+
/**
|
|
70
|
+
* We don't need to send the code, because the
|
|
71
|
+
* code can never be changed.
|
|
72
|
+
*/ const res = await updateLocale({
|
|
73
|
+
id,
|
|
74
|
+
...data
|
|
75
|
+
});
|
|
76
|
+
if ('error' in res) {
|
|
77
|
+
if (baseQuery.isBaseQueryError(res.error) && res.error.name === 'ValidationError') {
|
|
78
|
+
helpers.setErrors(formatValidationErrors(res.error));
|
|
79
|
+
} else {
|
|
80
|
+
toggleNotification({
|
|
81
|
+
type: 'danger',
|
|
82
|
+
message: formatAPIError(res.error)
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
toggleNotification({
|
|
88
|
+
type: 'success',
|
|
89
|
+
message: formatMessage({
|
|
90
|
+
id: getTranslation.getTranslation('Settings.locales.modal.edit.success'),
|
|
91
|
+
defaultMessage: 'Locale successfully edited'
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
refetchPermissions();
|
|
95
|
+
onOpenChange(false);
|
|
96
|
+
} catch (err) {
|
|
97
|
+
toggleNotification({
|
|
98
|
+
type: 'danger',
|
|
99
|
+
message: formatMessage({
|
|
100
|
+
id: 'notification.error',
|
|
101
|
+
defaultMessage: 'An error occurred, please try again'
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
return /*#__PURE__*/ jsxRuntime.jsx(designSystem.Modal.Root, {
|
|
107
|
+
open: open,
|
|
108
|
+
onOpenChange: onOpenChange,
|
|
109
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Modal.Content, {
|
|
110
|
+
children: /*#__PURE__*/ jsxRuntime.jsxs(strapiAdmin.Form, {
|
|
111
|
+
method: "PUT",
|
|
112
|
+
onSubmit: handleSubmit,
|
|
113
|
+
initialValues: {
|
|
114
|
+
code,
|
|
115
|
+
name,
|
|
116
|
+
isDefault
|
|
117
|
+
},
|
|
118
|
+
validationSchema: CreateLocale.LOCALE_SCHEMA,
|
|
119
|
+
children: [
|
|
120
|
+
/*#__PURE__*/ jsxRuntime.jsx(designSystem.Modal.Header, {
|
|
121
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Modal.Title, {
|
|
122
|
+
children: formatMessage({
|
|
123
|
+
id: getTranslation.getTranslation('Settings.list.actions.edit'),
|
|
124
|
+
defaultMessage: 'Edit a locale'
|
|
125
|
+
}, {
|
|
126
|
+
name
|
|
127
|
+
})
|
|
128
|
+
})
|
|
129
|
+
}),
|
|
130
|
+
/*#__PURE__*/ jsxRuntime.jsx(designSystem.Modal.Body, {
|
|
131
|
+
children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Tabs.Root, {
|
|
132
|
+
variant: "simple",
|
|
133
|
+
defaultValue: "basic",
|
|
134
|
+
children: [
|
|
135
|
+
/*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
|
|
136
|
+
justifyContent: "space-between",
|
|
137
|
+
children: [
|
|
138
|
+
/*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
|
|
139
|
+
tag: "h2",
|
|
140
|
+
variant: "beta",
|
|
141
|
+
id: titleId,
|
|
142
|
+
children: formatMessage({
|
|
143
|
+
id: getTranslation.getTranslation('Settings.locales.modal.title'),
|
|
144
|
+
defaultMessage: 'Configuration'
|
|
145
|
+
})
|
|
146
|
+
}),
|
|
147
|
+
/*#__PURE__*/ jsxRuntime.jsxs(designSystem.Tabs.List, {
|
|
148
|
+
"aria-labelledby": titleId,
|
|
149
|
+
children: [
|
|
150
|
+
/*#__PURE__*/ jsxRuntime.jsx(designSystem.Tabs.Trigger, {
|
|
151
|
+
value: "basic",
|
|
152
|
+
children: formatMessage({
|
|
153
|
+
id: getTranslation.getTranslation('Settings.locales.modal.base'),
|
|
154
|
+
defaultMessage: 'Basic settings'
|
|
155
|
+
})
|
|
156
|
+
}),
|
|
157
|
+
/*#__PURE__*/ jsxRuntime.jsx(designSystem.Tabs.Trigger, {
|
|
158
|
+
value: "advanced",
|
|
159
|
+
children: formatMessage({
|
|
160
|
+
id: getTranslation.getTranslation('Settings.locales.modal.advanced'),
|
|
161
|
+
defaultMessage: 'Advanced settings'
|
|
162
|
+
})
|
|
163
|
+
})
|
|
164
|
+
]
|
|
165
|
+
})
|
|
166
|
+
]
|
|
167
|
+
}),
|
|
168
|
+
/*#__PURE__*/ jsxRuntime.jsx(designSystem.Divider, {}),
|
|
169
|
+
/*#__PURE__*/ jsxRuntime.jsxs(designSystem.Box, {
|
|
170
|
+
paddingTop: 7,
|
|
171
|
+
paddingBottom: 7,
|
|
172
|
+
children: [
|
|
173
|
+
/*#__PURE__*/ jsxRuntime.jsx(designSystem.Tabs.Content, {
|
|
174
|
+
value: "basic",
|
|
175
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(CreateLocale.BaseForm, {
|
|
176
|
+
mode: "edit"
|
|
177
|
+
})
|
|
178
|
+
}),
|
|
179
|
+
/*#__PURE__*/ jsxRuntime.jsx(designSystem.Tabs.Content, {
|
|
180
|
+
value: "advanced",
|
|
181
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(CreateLocale.AdvancedForm, {
|
|
182
|
+
isDefaultLocale: isDefault
|
|
183
|
+
})
|
|
184
|
+
})
|
|
185
|
+
]
|
|
186
|
+
})
|
|
187
|
+
]
|
|
188
|
+
})
|
|
189
|
+
}),
|
|
190
|
+
/*#__PURE__*/ jsxRuntime.jsxs(designSystem.Modal.Footer, {
|
|
191
|
+
children: [
|
|
192
|
+
/*#__PURE__*/ jsxRuntime.jsx(designSystem.Modal.Close, {
|
|
193
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Button, {
|
|
194
|
+
variant: "tertiary",
|
|
195
|
+
children: formatMessage({
|
|
196
|
+
id: 'app.components.Button.cancel',
|
|
197
|
+
defaultMessage: 'Cancel'
|
|
198
|
+
})
|
|
199
|
+
})
|
|
200
|
+
}),
|
|
201
|
+
/*#__PURE__*/ jsxRuntime.jsx(CreateLocale.SubmitButton, {})
|
|
202
|
+
]
|
|
203
|
+
})
|
|
204
|
+
]
|
|
205
|
+
})
|
|
206
|
+
})
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
exports.EditLocale = EditLocale;
|
|
211
|
+
exports.EditModal = EditModal;
|
|
212
|
+
//# sourceMappingURL=EditLocale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditLocale.js","sources":["../../../admin/src/components/EditLocale.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport {\n useNotification,\n useAPIErrorHandler,\n Form,\n FormHelpers,\n useAuth,\n} from '@strapi/admin/strapi-admin';\nimport {\n Box,\n Button,\n Divider,\n Flex,\n IconButton,\n Modal,\n Tabs,\n Typography,\n useId,\n} from '@strapi/design-system';\nimport { Pencil } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\n\nimport { Locale, UpdateLocale } from '../../../shared/contracts/locales';\nimport { useUpdateLocaleMutation } from '../services/locales';\nimport { isBaseQueryError } from '../utils/baseQuery';\nimport { getTranslation } from '../utils/getTranslation';\n\nimport { AdvancedForm, BaseForm, LOCALE_SCHEMA, SubmitButton } from './CreateLocale';\n\n/* -------------------------------------------------------------------------------------------------\n * EditLocale\n * -----------------------------------------------------------------------------------------------*/\n\ninterface EditLocaleProps extends Omit<EditModalProps, 'open' | 'onOpenChange'> {}\n\nconst EditLocale = (props: EditLocaleProps) => {\n const { formatMessage } = useIntl();\n const [visible, setVisible] = React.useState(false);\n\n return (\n <>\n <IconButton\n onClick={() => setVisible(true)}\n label={formatMessage(\n {\n id: getTranslation('Settings.list.actions.edit'),\n defaultMessage: 'Edit {name} locale',\n },\n {\n name: props.name,\n }\n )}\n variant=\"ghost\"\n >\n <Pencil />\n </IconButton>\n <EditModal {...props} open={visible} onOpenChange={setVisible} />\n </>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * EditModal\n * -----------------------------------------------------------------------------------------------*/\n\ninterface EditModalProps extends Pick<Locale, 'id' | 'isDefault' | 'name' | 'code'> {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n}\n\ntype FormValues = UpdateLocale.Request['body'] & { code: string };\n\n/**\n * @internal\n * @description Exported to be used when someone clicks on a table row.\n */\nconst EditModal = ({ id, code, isDefault, name, open, onOpenChange }: EditModalProps) => {\n const { toggleNotification } = useNotification();\n const {\n _unstableFormatAPIError: formatAPIError,\n _unstableFormatValidationErrors: formatValidationErrors,\n } = useAPIErrorHandler();\n const refetchPermissions = useAuth('EditModal', (state) => state.refetchPermissions);\n const { formatMessage } = useIntl();\n const titleId = useId();\n\n const [updateLocale] = useUpdateLocaleMutation();\n const handleSubmit = async (\n { code: _code, ...data }: FormValues,\n helpers: FormHelpers<FormValues>\n ) => {\n try {\n /**\n * We don't need to send the code, because the\n * code can never be changed.\n */\n const res = await updateLocale({\n id,\n ...data,\n });\n\n if ('error' in res) {\n if (isBaseQueryError(res.error) && res.error.name === 'ValidationError') {\n helpers.setErrors(formatValidationErrors(res.error));\n } else {\n toggleNotification({ type: 'danger', message: formatAPIError(res.error) });\n }\n\n return;\n }\n\n toggleNotification({\n type: 'success',\n message: formatMessage({\n id: getTranslation('Settings.locales.modal.edit.success'),\n defaultMessage: 'Locale successfully edited',\n }),\n });\n\n refetchPermissions();\n onOpenChange(false);\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage({\n id: 'notification.error',\n defaultMessage: 'An error occurred, please try again',\n }),\n });\n }\n };\n\n return (\n <Modal.Root open={open} onOpenChange={onOpenChange}>\n <Modal.Content>\n <Form\n method=\"PUT\"\n onSubmit={handleSubmit}\n initialValues={{\n code,\n name,\n isDefault,\n }}\n validationSchema={LOCALE_SCHEMA}\n >\n <Modal.Header>\n <Modal.Title>\n {formatMessage(\n {\n id: getTranslation('Settings.list.actions.edit'),\n defaultMessage: 'Edit a locale',\n },\n {\n name,\n }\n )}\n </Modal.Title>\n </Modal.Header>\n <Modal.Body>\n <Tabs.Root variant=\"simple\" defaultValue=\"basic\">\n <Flex justifyContent=\"space-between\">\n <Typography tag=\"h2\" variant=\"beta\" id={titleId}>\n {formatMessage({\n id: getTranslation('Settings.locales.modal.title'),\n defaultMessage: 'Configuration',\n })}\n </Typography>\n <Tabs.List aria-labelledby={titleId}>\n <Tabs.Trigger value=\"basic\">\n {formatMessage({\n id: getTranslation('Settings.locales.modal.base'),\n defaultMessage: 'Basic settings',\n })}\n </Tabs.Trigger>\n <Tabs.Trigger value=\"advanced\">\n {formatMessage({\n id: getTranslation('Settings.locales.modal.advanced'),\n defaultMessage: 'Advanced settings',\n })}\n </Tabs.Trigger>\n </Tabs.List>\n </Flex>\n <Divider />\n <Box paddingTop={7} paddingBottom={7}>\n <Tabs.Content value=\"basic\">\n <BaseForm mode=\"edit\" />\n </Tabs.Content>\n <Tabs.Content value=\"advanced\">\n <AdvancedForm isDefaultLocale={isDefault} />\n </Tabs.Content>\n </Box>\n </Tabs.Root>\n </Modal.Body>\n <Modal.Footer>\n <Modal.Close>\n <Button variant=\"tertiary\">\n {formatMessage({ id: 'app.components.Button.cancel', defaultMessage: 'Cancel' })}\n </Button>\n </Modal.Close>\n <SubmitButton />\n </Modal.Footer>\n </Form>\n </Modal.Content>\n </Modal.Root>\n );\n};\n\nexport { EditLocale, EditModal };\n"],"names":["EditLocale","props","formatMessage","useIntl","visible","setVisible","React","useState","_jsxs","_Fragment","_jsx","IconButton","onClick","label","id","getTranslation","defaultMessage","name","variant","Pencil","EditModal","open","onOpenChange","code","isDefault","toggleNotification","useNotification","_unstableFormatAPIError","formatAPIError","_unstableFormatValidationErrors","formatValidationErrors","useAPIErrorHandler","refetchPermissions","useAuth","state","titleId","useId","updateLocale","useUpdateLocaleMutation","handleSubmit","_code","data","helpers","res","isBaseQueryError","error","setErrors","type","message","err","Modal","Root","Content","Form","method","onSubmit","initialValues","validationSchema","LOCALE_SCHEMA","Header","Title","Body","Tabs","defaultValue","Flex","justifyContent","Typography","tag","List","aria-labelledby","Trigger","value","Divider","Box","paddingTop","paddingBottom","BaseForm","mode","AdvancedForm","isDef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React from 'react';
|
|
3
|
+
import { useNotification, useAPIErrorHandler, useAuth, Form } from '@strapi/admin/strapi-admin';
|
|
4
|
+
import { IconButton, useId, Modal, Tabs, Flex, Typography, Divider, Box, Button } from '@strapi/design-system';
|
|
5
|
+
import { Pencil } from '@strapi/icons';
|
|
6
|
+
import { useIntl } from 'react-intl';
|
|
7
|
+
import { useUpdateLocaleMutation } from '../services/locales.mjs';
|
|
8
|
+
import { isBaseQueryError } from '../utils/baseQuery.mjs';
|
|
9
|
+
import { getTranslation } from '../utils/getTranslation.mjs';
|
|
10
|
+
import { LOCALE_SCHEMA, BaseForm, AdvancedForm, SubmitButton } from './CreateLocale.mjs';
|
|
11
|
+
|
|
12
|
+
const EditLocale = (props)=>{
|
|
13
|
+
const { formatMessage } = useIntl();
|
|
14
|
+
const [visible, setVisible] = React.useState(false);
|
|
15
|
+
return /*#__PURE__*/ jsxs(Fragment, {
|
|
16
|
+
children: [
|
|
17
|
+
/*#__PURE__*/ jsx(IconButton, {
|
|
18
|
+
onClick: ()=>setVisible(true),
|
|
19
|
+
label: formatMessage({
|
|
20
|
+
id: getTranslation('Settings.list.actions.edit'),
|
|
21
|
+
defaultMessage: 'Edit {name} locale'
|
|
22
|
+
}, {
|
|
23
|
+
name: props.name
|
|
24
|
+
}),
|
|
25
|
+
variant: "ghost",
|
|
26
|
+
children: /*#__PURE__*/ jsx(Pencil, {})
|
|
27
|
+
}),
|
|
28
|
+
/*#__PURE__*/ jsx(EditModal, {
|
|
29
|
+
...props,
|
|
30
|
+
open: visible,
|
|
31
|
+
onOpenChange: setVisible
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* @internal
|
|
38
|
+
* @description Exported to be used when someone clicks on a table row.
|
|
39
|
+
*/ const EditModal = ({ id, code, isDefault, name, open, onOpenChange })=>{
|
|
40
|
+
const { toggleNotification } = useNotification();
|
|
41
|
+
const { _unstableFormatAPIError: formatAPIError, _unstableFormatValidationErrors: formatValidationErrors } = useAPIErrorHandler();
|
|
42
|
+
const refetchPermissions = useAuth('EditModal', (state)=>state.refetchPermissions);
|
|
43
|
+
const { formatMessage } = useIntl();
|
|
44
|
+
const titleId = useId();
|
|
45
|
+
const [updateLocale] = useUpdateLocaleMutation();
|
|
46
|
+
const handleSubmit = async ({ code: _code, ...data }, helpers)=>{
|
|
47
|
+
try {
|
|
48
|
+
/**
|
|
49
|
+
* We don't need to send the code, because the
|
|
50
|
+
* code can never be changed.
|
|
51
|
+
*/ const res = await updateLocale({
|
|
52
|
+
id,
|
|
53
|
+
...data
|
|
54
|
+
});
|
|
55
|
+
if ('error' in res) {
|
|
56
|
+
if (isBaseQueryError(res.error) && res.error.name === 'ValidationError') {
|
|
57
|
+
helpers.setErrors(formatValidationErrors(res.error));
|
|
58
|
+
} else {
|
|
59
|
+
toggleNotification({
|
|
60
|
+
type: 'danger',
|
|
61
|
+
message: formatAPIError(res.error)
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
toggleNotification({
|
|
67
|
+
type: 'success',
|
|
68
|
+
message: formatMessage({
|
|
69
|
+
id: getTranslation('Settings.locales.modal.edit.success'),
|
|
70
|
+
defaultMessage: 'Locale successfully edited'
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
refetchPermissions();
|
|
74
|
+
onOpenChange(false);
|
|
75
|
+
} catch (err) {
|
|
76
|
+
toggleNotification({
|
|
77
|
+
type: 'danger',
|
|
78
|
+
message: formatMessage({
|
|
79
|
+
id: 'notification.error',
|
|
80
|
+
defaultMessage: 'An error occurred, please try again'
|
|
81
|
+
})
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
return /*#__PURE__*/ jsx(Modal.Root, {
|
|
86
|
+
open: open,
|
|
87
|
+
onOpenChange: onOpenChange,
|
|
88
|
+
children: /*#__PURE__*/ jsx(Modal.Content, {
|
|
89
|
+
children: /*#__PURE__*/ jsxs(Form, {
|
|
90
|
+
method: "PUT",
|
|
91
|
+
onSubmit: handleSubmit,
|
|
92
|
+
initialValues: {
|
|
93
|
+
code,
|
|
94
|
+
name,
|
|
95
|
+
isDefault
|
|
96
|
+
},
|
|
97
|
+
validationSchema: LOCALE_SCHEMA,
|
|
98
|
+
children: [
|
|
99
|
+
/*#__PURE__*/ jsx(Modal.Header, {
|
|
100
|
+
children: /*#__PURE__*/ jsx(Modal.Title, {
|
|
101
|
+
children: formatMessage({
|
|
102
|
+
id: getTranslation('Settings.list.actions.edit'),
|
|
103
|
+
defaultMessage: 'Edit a locale'
|
|
104
|
+
}, {
|
|
105
|
+
name
|
|
106
|
+
})
|
|
107
|
+
})
|
|
108
|
+
}),
|
|
109
|
+
/*#__PURE__*/ jsx(Modal.Body, {
|
|
110
|
+
children: /*#__PURE__*/ jsxs(Tabs.Root, {
|
|
111
|
+
variant: "simple",
|
|
112
|
+
defaultValue: "basic",
|
|
113
|
+
children: [
|
|
114
|
+
/*#__PURE__*/ jsxs(Flex, {
|
|
115
|
+
justifyContent: "space-between",
|
|
116
|
+
children: [
|
|
117
|
+
/*#__PURE__*/ jsx(Typography, {
|
|
118
|
+
tag: "h2",
|
|
119
|
+
variant: "beta",
|
|
120
|
+
id: titleId,
|
|
121
|
+
children: formatMessage({
|
|
122
|
+
id: getTranslation('Settings.locales.modal.title'),
|
|
123
|
+
defaultMessage: 'Configuration'
|
|
124
|
+
})
|
|
125
|
+
}),
|
|
126
|
+
/*#__PURE__*/ jsxs(Tabs.List, {
|
|
127
|
+
"aria-labelledby": titleId,
|
|
128
|
+
children: [
|
|
129
|
+
/*#__PURE__*/ jsx(Tabs.Trigger, {
|
|
130
|
+
value: "basic",
|
|
131
|
+
children: formatMessage({
|
|
132
|
+
id: getTranslation('Settings.locales.modal.base'),
|
|
133
|
+
defaultMessage: 'Basic settings'
|
|
134
|
+
})
|
|
135
|
+
}),
|
|
136
|
+
/*#__PURE__*/ jsx(Tabs.Trigger, {
|
|
137
|
+
value: "advanced",
|
|
138
|
+
children: formatMessage({
|
|
139
|
+
id: getTranslation('Settings.locales.modal.advanced'),
|
|
140
|
+
defaultMessage: 'Advanced settings'
|
|
141
|
+
})
|
|
142
|
+
})
|
|
143
|
+
]
|
|
144
|
+
})
|
|
145
|
+
]
|
|
146
|
+
}),
|
|
147
|
+
/*#__PURE__*/ jsx(Divider, {}),
|
|
148
|
+
/*#__PURE__*/ jsxs(Box, {
|
|
149
|
+
paddingTop: 7,
|
|
150
|
+
paddingBottom: 7,
|
|
151
|
+
children: [
|
|
152
|
+
/*#__PURE__*/ jsx(Tabs.Content, {
|
|
153
|
+
value: "basic",
|
|
154
|
+
children: /*#__PURE__*/ jsx(BaseForm, {
|
|
155
|
+
mode: "edit"
|
|
156
|
+
})
|
|
157
|
+
}),
|
|
158
|
+
/*#__PURE__*/ jsx(Tabs.Content, {
|
|
159
|
+
value: "advanced",
|
|
160
|
+
children: /*#__PURE__*/ jsx(AdvancedForm, {
|
|
161
|
+
isDefaultLocale: isDefault
|
|
162
|
+
})
|
|
163
|
+
})
|
|
164
|
+
]
|
|
165
|
+
})
|
|
166
|
+
]
|
|
167
|
+
})
|
|
168
|
+
}),
|
|
169
|
+
/*#__PURE__*/ jsxs(Modal.Footer, {
|
|
170
|
+
children: [
|
|
171
|
+
/*#__PURE__*/ jsx(Modal.Close, {
|
|
172
|
+
children: /*#__PURE__*/ jsx(Button, {
|
|
173
|
+
variant: "tertiary",
|
|
174
|
+
children: formatMessage({
|
|
175
|
+
id: 'app.components.Button.cancel',
|
|
176
|
+
defaultMessage: 'Cancel'
|
|
177
|
+
})
|
|
178
|
+
})
|
|
179
|
+
}),
|
|
180
|
+
/*#__PURE__*/ jsx(SubmitButton, {})
|
|
181
|
+
]
|
|
182
|
+
})
|
|
183
|
+
]
|
|
184
|
+
})
|
|
185
|
+
})
|
|
186
|
+
});
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
export { EditLocale, EditModal };
|
|
190
|
+
//# sourceMappingURL=EditLocale.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditLocale.mjs","sources":["../../../admin/src/components/EditLocale.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport {\n useNotification,\n useAPIErrorHandler,\n Form,\n FormHelpers,\n useAuth,\n} from '@strapi/admin/strapi-admin';\nimport {\n Box,\n Button,\n Divider,\n Flex,\n IconButton,\n Modal,\n Tabs,\n Typography,\n useId,\n} from '@strapi/design-system';\nimport { Pencil } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\n\nimport { Locale, UpdateLocale } from '../../../shared/contracts/locales';\nimport { useUpdateLocaleMutation } from '../services/locales';\nimport { isBaseQueryError } from '../utils/baseQuery';\nimport { getTranslation } from '../utils/getTranslation';\n\nimport { AdvancedForm, BaseForm, LOCALE_SCHEMA, SubmitButton } from './CreateLocale';\n\n/* -------------------------------------------------------------------------------------------------\n * EditLocale\n * -----------------------------------------------------------------------------------------------*/\n\ninterface EditLocaleProps extends Omit<EditModalProps, 'open' | 'onOpenChange'> {}\n\nconst EditLocale = (props: EditLocaleProps) => {\n const { formatMessage } = useIntl();\n const [visible, setVisible] = React.useState(false);\n\n return (\n <>\n <IconButton\n onClick={() => setVisible(true)}\n label={formatMessage(\n {\n id: getTranslation('Settings.list.actions.edit'),\n defaultMessage: 'Edit {name} locale',\n },\n {\n name: props.name,\n }\n )}\n variant=\"ghost\"\n >\n <Pencil />\n </IconButton>\n <EditModal {...props} open={visible} onOpenChange={setVisible} />\n </>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * EditModal\n * -----------------------------------------------------------------------------------------------*/\n\ninterface EditModalProps extends Pick<Locale, 'id' | 'isDefault' | 'name' | 'code'> {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n}\n\ntype FormValues = UpdateLocale.Request['body'] & { code: string };\n\n/**\n * @internal\n * @description Exported to be used when someone clicks on a table row.\n */\nconst EditModal = ({ id, code, isDefault, name, open, onOpenChange }: EditModalProps) => {\n const { toggleNotification } = useNotification();\n const {\n _unstableFormatAPIError: formatAPIError,\n _unstableFormatValidationErrors: formatValidationErrors,\n } = useAPIErrorHandler();\n const refetchPermissions = useAuth('EditModal', (state) => state.refetchPermissions);\n const { formatMessage } = useIntl();\n const titleId = useId();\n\n const [updateLocale] = useUpdateLocaleMutation();\n const handleSubmit = async (\n { code: _code, ...data }: FormValues,\n helpers: FormHelpers<FormValues>\n ) => {\n try {\n /**\n * We don't need to send the code, because the\n * code can never be changed.\n */\n const res = await updateLocale({\n id,\n ...data,\n });\n\n if ('error' in res) {\n if (isBaseQueryError(res.error) && res.error.name === 'ValidationError') {\n helpers.setErrors(formatValidationErrors(res.error));\n } else {\n toggleNotification({ type: 'danger', message: formatAPIError(res.error) });\n }\n\n return;\n }\n\n toggleNotification({\n type: 'success',\n message: formatMessage({\n id: getTranslation('Settings.locales.modal.edit.success'),\n defaultMessage: 'Locale successfully edited',\n }),\n });\n\n refetchPermissions();\n onOpenChange(false);\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage({\n id: 'notification.error',\n defaultMessage: 'An error occurred, please try again',\n }),\n });\n }\n };\n\n return (\n <Modal.Root open={open} onOpenChange={onOpenChange}>\n <Modal.Content>\n <Form\n method=\"PUT\"\n onSubmit={handleSubmit}\n initialValues={{\n code,\n name,\n isDefault,\n }}\n validationSchema={LOCALE_SCHEMA}\n >\n <Modal.Header>\n <Modal.Title>\n {formatMessage(\n {\n id: getTranslation('Settings.list.actions.edit'),\n defaultMessage: 'Edit a locale',\n },\n {\n name,\n }\n )}\n </Modal.Title>\n </Modal.Header>\n <Modal.Body>\n <Tabs.Root variant=\"simple\" defaultValue=\"basic\">\n <Flex justifyContent=\"space-between\">\n <Typography tag=\"h2\" variant=\"beta\" id={titleId}>\n {formatMessage({\n id: getTranslation('Settings.locales.modal.title'),\n defaultMessage: 'Configuration',\n })}\n </Typography>\n <Tabs.List aria-labelledby={titleId}>\n <Tabs.Trigger value=\"basic\">\n {formatMessage({\n id: getTranslation('Settings.locales.modal.base'),\n defaultMessage: 'Basic settings',\n })}\n </Tabs.Trigger>\n <Tabs.Trigger value=\"advanced\">\n {formatMessage({\n id: getTranslation('Settings.locales.modal.advanced'),\n defaultMessage: 'Advanced settings',\n })}\n </Tabs.Trigger>\n </Tabs.List>\n </Flex>\n <Divider />\n <Box paddingTop={7} paddingBottom={7}>\n <Tabs.Content value=\"basic\">\n <BaseForm mode=\"edit\" />\n </Tabs.Content>\n <Tabs.Content value=\"advanced\">\n <AdvancedForm isDefaultLocale={isDefault} />\n </Tabs.Content>\n </Box>\n </Tabs.Root>\n </Modal.Body>\n <Modal.Footer>\n <Modal.Close>\n <Button variant=\"tertiary\">\n {formatMessage({ id: 'app.components.Button.cancel', defaultMessage: 'Cancel' })}\n </Button>\n </Modal.Close>\n <SubmitButton />\n </Modal.Footer>\n </Form>\n </Modal.Content>\n </Modal.Root>\n );\n};\n\nexport { EditLocale, EditModal };\n"],"names":["EditLocale","props","formatMessage","useIntl","visible","setVisible","React","useState","_jsxs","_Fragment","_jsx","IconButton","onClick","label","id","getTranslation","defaultMessage","name","variant","Pencil","EditModal","open","onOpenChange","code","isDefault","toggleNotification","useNotification","_unstableFormatAPIError","formatAPIError","_unstableFormatValidationErrors","formatValidationErrors","useAPIErrorHandler","refetchPermissions","useAuth","state","titleId","useId","updateLocale","useUpdateLocaleMutation","handleSubmit","_code","data","helpers","res","isBaseQueryError","error","setErrors","type","message","err","Modal","Root","Content","Form","method","onSubmit","initialValues","validationSchema","LOCALE_SCHEMA","Header","Title","Body","Tabs","defaultValue","Flex","justifyContent","Typography","tag","List","aria-labelledby","Trigger","value","Divider","Box","paddingTop","paddingBottom","BaseForm","mode","AdvancedForm","isDefaultLocale","Footer","Close","Button","SubmitButton"],"mappings":";;;;;;;;;;;AAoCA,MAAMA,aAAa,CAACC,KAAAA,GAAAA;IAClB,MAAM,EAAEC,aAAa,EAAE,GAAGC,OAAAA,EAAAA;AAC1B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A;8DACjBrE,aAAc,CAAA;AACbY,wDAAAA,EAAAA,EAAIC,cAAe,CAAA,iCAAA,CAAA;wDACnBC,cAAgB,EAAA;AAClB,qDAAA;;;;;;8CAINN,GAAC8D,CAAAA,OAAAA,EAAAA,EAAAA,CAAAA;8CACDhE,IAACiE,CAAAA,GAAAA,EAAAA;oCAAIC,UAAY,EAAA,CAAA;oCAAGC,aAAe,EAAA,CAAA;;AACjC,sDAAAjE,GAAA,CAACoD,KAAKV,OAAO,EAAA;4CAACmB,KAAM,EAAA,OAAA;AAClB,4CAAA,QAAA,gBAAA7D,GAACkE,CAAAA,QAAAA,EAAAA;gDAASC,IAAK,EAAA;;;AAEjB,sDAAAnE,GAAA,CAACoD,KAAKV,OAAO,EAAA;4CAACmB,KAAM,EAAA,UAAA;AAClB,4CAAA,QAAA,gBAAA7D,GAACoE,CAAAA,YAAAA,EAAAA;gDAAaC,eAAiBvD,EAAAA;;;;;;;;AAKvC,kCAAAhB,IAAA,CAAC0C,MAAM8B,MAAM,EAAA;;AACX,0CAAAtE,GAAA,CAACwC,MAAM+B,KAAK,EAAA;AACV,gCAAA,QAAA,gBAAAvE,GAACwE,CAAAA,MAAAA,EAAAA;oCAAOhE,OAAQ,EAAA,UAAA;8CACbhB,aAAc,CAAA;wCAAEY,EAAI,EAAA,8BAAA;wCAAgCE,cAAgB,EAAA;AAAS,qCAAA;;;0CAGlFN,GAACyE,CAAAA,YAAAA,EAAAA,EAAAA;;;;;;;AAMb;;;;"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var strapiAdmin = require('@strapi/admin/strapi-admin');
|
|
5
|
+
var designSystem = require('@strapi/design-system');
|
|
6
|
+
var qs = require('qs');
|
|
7
|
+
var reactIntl = require('react-intl');
|
|
8
|
+
var reactRouterDom = require('react-router-dom');
|
|
9
|
+
var locales = require('../services/locales.js');
|
|
10
|
+
var getTranslation = require('../utils/getTranslation.js');
|
|
11
|
+
|
|
12
|
+
const LocaleListCell = ({ locale: currentLocale, localizations, documentId })=>{
|
|
13
|
+
const { locale: language, formatMessage } = reactIntl.useIntl();
|
|
14
|
+
const { data: locales$1 = [] } = locales.useGetLocalesQuery();
|
|
15
|
+
const navigate = reactRouterDom.useNavigate();
|
|
16
|
+
const [{ query }] = strapiAdmin.useQueryParams();
|
|
17
|
+
const formatter = designSystem.useCollator(language, {
|
|
18
|
+
sensitivity: 'base'
|
|
19
|
+
});
|
|
20
|
+
if (!Array.isArray(locales$1) || !localizations) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
const availableLocales = localizations.map((loc)=>loc.locale);
|
|
24
|
+
const localesForDocument = locales$1.reduce((acc, locale)=>{
|
|
25
|
+
const createdLocale = [
|
|
26
|
+
currentLocale,
|
|
27
|
+
...availableLocales
|
|
28
|
+
].find((loc)=>{
|
|
29
|
+
return loc === locale.code;
|
|
30
|
+
});
|
|
31
|
+
if (createdLocale) {
|
|
32
|
+
const name = locale.isDefault ? `${locale.name} (default)` : locale.name;
|
|
33
|
+
acc.push({
|
|
34
|
+
code: locale.code,
|
|
35
|
+
name
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return acc;
|
|
39
|
+
}, []).toSorted((a, b)=>formatter.compare(a.name, b.name));
|
|
40
|
+
const getDisplayText = ()=>{
|
|
41
|
+
const displayedLocales = localesForDocument.slice(0, 2);
|
|
42
|
+
const remainingCount = localesForDocument.length - 2;
|
|
43
|
+
const baseText = displayedLocales.map(({ name })=>name).join(', ');
|
|
44
|
+
if (remainingCount <= 0) {
|
|
45
|
+
return baseText;
|
|
46
|
+
}
|
|
47
|
+
return formatMessage({
|
|
48
|
+
id: getTranslation.getTranslation('CMListView.popover.display-locales.more'),
|
|
49
|
+
defaultMessage: '{locales} + {count} more'
|
|
50
|
+
}, {
|
|
51
|
+
locales: baseText,
|
|
52
|
+
count: remainingCount
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
const handleLocaleClick = (localeCode)=>{
|
|
56
|
+
navigate({
|
|
57
|
+
pathname: documentId,
|
|
58
|
+
search: qs.stringify({
|
|
59
|
+
plugins: {
|
|
60
|
+
...query.plugins,
|
|
61
|
+
i18n: {
|
|
62
|
+
locale: localeCode
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Menu.Root, {
|
|
69
|
+
children: [
|
|
70
|
+
/*#__PURE__*/ jsxRuntime.jsx(designSystem.Menu.Trigger, {
|
|
71
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Flex, {
|
|
72
|
+
minWidth: "100%",
|
|
73
|
+
alignItems: "center",
|
|
74
|
+
justifyContent: "center",
|
|
75
|
+
fontWeight: "regular",
|
|
76
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
|
|
77
|
+
textColor: "neutral800",
|
|
78
|
+
ellipsis: true,
|
|
79
|
+
marginRight: 2,
|
|
80
|
+
children: getDisplayText()
|
|
81
|
+
})
|
|
82
|
+
})
|
|
83
|
+
}),
|
|
84
|
+
/*#__PURE__*/ jsxRuntime.jsx(designSystem.Menu.Content, {
|
|
85
|
+
children: localesForDocument.map(({ code, name })=>/*#__PURE__*/ jsxRuntime.jsx(designSystem.Menu.Item, {
|
|
86
|
+
onClick: (e)=>{
|
|
87
|
+
e.stopPropagation();
|
|
88
|
+
handleLocaleClick(code);
|
|
89
|
+
},
|
|
90
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
|
|
91
|
+
textColor: "neutral800",
|
|
92
|
+
fontWeight: "regular",
|
|
93
|
+
children: name
|
|
94
|
+
})
|
|
95
|
+
}, code))
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
exports.LocaleListCell = LocaleListCell;
|
|
102
|
+
//# sourceMappingURL=LocaleListCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocaleListCell.js","sources":["../../../admin/src/components/LocaleListCell.tsx"],"sourcesContent":["import { useQueryParams } from '@strapi/admin/strapi-admin';\nimport { Flex, Menu, Typography, useCollator } from '@strapi/design-system';\nimport { stringify } from 'qs';\nimport { useIntl } from 'react-intl';\nimport { useNavigate } from 'react-router-dom';\n\nimport { useGetLocalesQuery } from '../services/locales';\nimport { getTranslation } from '../utils/getTranslation';\n\nimport type { I18nBaseQuery } from '../types';\n\ninterface LocaleListCellProps {\n localizations: { locale: string }[];\n locale: string;\n documentId: string;\n}\n\nconst LocaleListCell = ({\n locale: currentLocale,\n localizations,\n documentId,\n}: LocaleListCellProps) => {\n const { locale: language, formatMessage } = useIntl();\n const { data: locales = [] } = useGetLocalesQuery();\n const navigate = useNavigate();\n const [{ query }] = useQueryParams<I18nBaseQuery>();\n const formatter = useCollator(language, {\n sensitivity: 'base',\n });\n\n if (!Array.isArray(locales) || !localizations) {\n return null;\n }\n\n const availableLocales = localizations.map((loc) => loc.locale);\n\n const localesForDocument = locales\n .reduce<Array<{ code: string; name: string }>>((acc, locale) => {\n const createdLocale = [currentLocale, ...availableLocales].find((loc) => {\n return loc === locale.code;\n });\n\n if (createdLocale) {\n const name = locale.isDefault ? `${locale.name} (default)` : locale.name;\n acc.push({ code: locale.code, name });\n }\n\n return acc;\n }, [])\n .toSorted((a, b) => formatter.compare(a.name, b.name));\n\n const getDisplayText = () => {\n const displayedLocales = localesForDocument.slice(0, 2);\n const remainingCount = localesForDocument.length - 2;\n\n const baseText = displayedLocales.map(({ name }) => name).join(', ');\n\n if (remainingCount <= 0) {\n return baseText;\n }\n\n return formatMessage(\n {\n id: getTranslation('CMListView.popover.display-locales.more'),\n defaultMessage: '{locales} + {count} more',\n },\n { locales: baseText, count: remainingCount }\n );\n };\n\n const handleLocaleClick = (localeCode: string) => {\n navigate({\n pathname: documentId,\n search: stringify({\n plugins: {\n ...query.plugins,\n i18n: { locale: localeCode },\n },\n }),\n });\n };\n\n return (\n <Menu.Root>\n <Menu.Trigger>\n <Flex minWidth=\"100%\" alignItems=\"center\" justifyContent=\"center\" fontWeight=\"regular\">\n <Typography textColor=\"neutral800\" ellipsis marginRight={2}>\n {getDisplayText()}\n </Typography>\n </Flex>\n </Menu.Trigger>\n <Menu.Content>\n {localesForDocument.map(({ code, name }) => (\n <Menu.Item\n key={code}\n onClick={(e: React.MouseEvent) => {\n e.stopPropagation();\n handleLocaleClick(code);\n }}\n >\n <Typography textColor=\"neutral800\" fontWeight=\"regular\">\n {name}\n </Typography>\n </Menu.Item>\n ))}\n </Menu.Content>\n </Menu.Root>\n );\n};\n\nexport { LocaleListCell };\nexport type { LocaleListCellProps };\n"],"names":["LocaleListCell","locale","currentLocale","localizations","documentId","language","formatMessage","useIntl","data","locales","useGetLocalesQuery","navigate","useNavigate","query","useQueryParams","formatter","useCollator","sensitivity","Array","isArray","availableLocales","map","loc","localesForDocument","reduce","acc","createdLocale","find","code","name","isDefault","push","toSorted","a","b","compare","getDisplayText","displayedLocales","slice","remainingCount","length","baseText","join","id","getTranslation","defaultMessage","count","handleLocaleClick","localeCode","pathname","search","stringify","plugins","i18n","_jsxs","Menu","Root","_jsx","Trigger","Flex","minWidth","alignItems","justifyContent","fontWeight","Typography","textColor","ellipsis","marginRight","Content","Item","onClick","e","stopPropagation"],"mappings":";;;;;;;;;;;AAiBMA,MAAAA,cAAAA,GAAiB,CAAC,EACtBC,MAAAA,EAAQC,aAAa,EACrBC,aAAa,EACbC,UAAU,EACU,GAAA;AACpB,IAAA,MAAM,EAAEH,MAAQI,EAAAA,QAAQ,EAAEC,aAAa,EAAE,GAAGC,iBAAAA,EAAAA;AAC5C,IAAA,MAAM,EAAEC,IAAAA,EAAMC,SAAU,GAAA,EAAE,EAAE,GAAGC,0BAAAA,EAAAA;AAC/B,IAAA,MAAMC,QAAWC,GAAAA,0BAAAA,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