@strapi/i18n 0.0.0-next.973df62640087231761ffaeb1c2b5d0d706346d8 → 0.0.0-next.9c630ba4333dffc2c1c8150d9226dfbb67b02e09
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 +957 -0
- package/dist/admin/components/CMHeaderActions.js.map +1 -0
- package/dist/admin/components/CMHeaderActions.mjs +931 -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 +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 +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 +18 -5
- 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 -3453
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +17 -3435
- 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 +272 -0
- package/dist/server/services/ai-localizations.js.map +1 -0
- package/dist/server/services/ai-localizations.mjs +270 -0
- package/dist/server/services/ai-localizations.mjs.map +1 -0
- package/dist/server/services/content-types.js +157 -0
- package/dist/server/services/content-types.js.map +1 -0
- package/dist/server/services/content-types.mjs +155 -0
- package/dist/server/services/content-types.mjs.map +1 -0
- package/dist/server/services/index.js +28 -0
- package/dist/server/services/index.js.map +1 -0
- package/dist/server/services/index.mjs +26 -0
- package/dist/server/services/index.mjs.map +1 -0
- package/dist/server/services/iso-locales.js +12 -0
- package/dist/server/services/iso-locales.js.map +1 -0
- package/dist/server/services/iso-locales.mjs +10 -0
- package/dist/server/services/iso-locales.mjs.map +1 -0
- package/dist/server/services/locales.js +114 -0
- package/dist/server/services/locales.js.map +1 -0
- package/dist/server/services/locales.mjs +112 -0
- package/dist/server/services/locales.mjs.map +1 -0
- package/dist/server/services/localizations.js +68 -0
- package/dist/server/services/localizations.js.map +1 -0
- package/dist/server/services/localizations.mjs +66 -0
- package/dist/server/services/localizations.mjs.map +1 -0
- package/dist/server/services/metrics.js +30 -0
- package/dist/server/services/metrics.js.map +1 -0
- package/dist/server/services/metrics.mjs +28 -0
- package/dist/server/services/metrics.mjs.map +1 -0
- package/dist/server/services/permissions/actions.js +136 -0
- package/dist/server/services/permissions/actions.js.map +1 -0
- package/dist/server/services/permissions/actions.mjs +134 -0
- package/dist/server/services/permissions/actions.mjs.map +1 -0
- package/dist/server/services/permissions/engine.js +52 -0
- package/dist/server/services/permissions/engine.js.map +1 -0
- package/dist/server/services/permissions/engine.mjs +50 -0
- package/dist/server/services/permissions/engine.mjs.map +1 -0
- package/dist/server/services/permissions/sections-builder.js +45 -0
- package/dist/server/services/permissions/sections-builder.js.map +1 -0
- package/dist/server/services/permissions/sections-builder.mjs +43 -0
- package/dist/server/services/permissions/sections-builder.mjs.map +1 -0
- package/dist/server/services/permissions.js +14 -0
- package/dist/server/services/permissions.js.map +1 -0
- package/dist/server/services/permissions.mjs +12 -0
- package/dist/server/services/permissions.mjs.map +1 -0
- package/dist/server/services/sanitize/index.js +34 -0
- package/dist/server/services/sanitize/index.js.map +1 -0
- package/dist/server/services/sanitize/index.mjs +32 -0
- package/dist/server/services/sanitize/index.mjs.map +1 -0
- package/dist/server/services/settings.js +25 -0
- package/dist/server/services/settings.js.map +1 -0
- package/dist/server/services/settings.mjs +23 -0
- package/dist/server/services/settings.mjs.map +1 -0
- package/dist/server/src/bootstrap.d.ts.map +1 -1
- package/dist/server/src/controllers/ai-localization-jobs.d.ts +17 -0
- package/dist/server/src/controllers/ai-localization-jobs.d.ts.map +1 -0
- package/dist/server/src/controllers/index.d.ts +10 -0
- package/dist/server/src/controllers/index.d.ts.map +1 -1
- package/dist/server/src/controllers/settings.d.ts +7 -0
- package/dist/server/src/controllers/settings.d.ts.map +1 -0
- package/dist/server/src/index.d.ts +47 -8
- package/dist/server/src/index.d.ts.map +1 -1
- package/dist/server/src/models/ai-localization-job.d.ts +5 -0
- package/dist/server/src/models/ai-localization-job.d.ts.map +1 -0
- package/dist/server/src/models/index.d.ts +5 -0
- package/dist/server/src/models/index.d.ts.map +1 -0
- package/dist/server/src/register.d.ts +1 -1
- package/dist/server/src/register.d.ts.map +1 -1
- package/dist/server/src/routes/admin.d.ts.map +1 -1
- package/dist/server/src/routes/content-api.d.ts +5 -8
- package/dist/server/src/routes/content-api.d.ts.map +1 -1
- package/dist/server/src/routes/index.d.ts +3 -7
- package/dist/server/src/routes/index.d.ts.map +1 -1
- package/dist/server/src/routes/validation/index.d.ts +2 -0
- package/dist/server/src/routes/validation/index.d.ts.map +1 -0
- package/dist/server/src/routes/validation/locale.d.ts +41 -0
- package/dist/server/src/routes/validation/locale.d.ts.map +1 -0
- package/dist/server/src/services/ai-localization-jobs.d.ts +26 -0
- package/dist/server/src/services/ai-localization-jobs.d.ts.map +1 -0
- package/dist/server/src/services/ai-localizations.d.ts +18 -0
- package/dist/server/src/services/ai-localizations.d.ts.map +1 -0
- package/dist/server/src/services/index.d.ts +33 -0
- package/dist/server/src/services/index.d.ts.map +1 -1
- package/dist/server/src/services/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 +7 -1
- package/dist/server/src/utils/index.d.ts.map +1 -1
- package/dist/server/src/validation/settings.d.ts +12 -0
- package/dist/server/src/validation/settings.d.ts.map +1 -0
- package/dist/server/utils/index.js +16 -0
- package/dist/server/utils/index.js.map +1 -0
- package/dist/server/utils/index.mjs +13 -0
- package/dist/server/utils/index.mjs.map +1 -0
- package/dist/server/validation/content-types.js +18 -0
- package/dist/server/validation/content-types.js.map +1 -0
- package/dist/server/validation/content-types.mjs +16 -0
- package/dist/server/validation/content-types.mjs.map +1 -0
- package/dist/server/validation/locales.js +23 -0
- package/dist/server/validation/locales.js.map +1 -0
- package/dist/server/validation/locales.mjs +20 -0
- package/dist/server/validation/locales.mjs.map +1 -0
- package/dist/server/validation/settings.js +11 -0
- package/dist/server/validation/settings.js.map +1 -0
- package/dist/server/validation/settings.mjs +9 -0
- package/dist/server/validation/settings.mjs.map +1 -0
- package/dist/shared/contracts/ai-localization-jobs.d.ts +27 -0
- package/dist/shared/contracts/ai-localization-jobs.d.ts.map +1 -0
- package/dist/shared/contracts/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 +21 -16
- package/dist/_chunks/SettingsPage-D0hqaut-.js +0 -574
- package/dist/_chunks/SettingsPage-D0hqaut-.js.map +0 -1
- package/dist/_chunks/SettingsPage-D67CaQAB.mjs +0 -554
- package/dist/_chunks/SettingsPage-D67CaQAB.mjs.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-BKBz3tro.js +0 -81
- package/dist/_chunks/en-BKBz3tro.js.map +0 -1
- package/dist/_chunks/en-DlXfy6Gy.mjs +0 -81
- package/dist/_chunks/en-DlXfy6Gy.mjs.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-46DNtLCn.js +0 -1635
- package/dist/_chunks/index-46DNtLCn.js.map +0 -1
- package/dist/_chunks/index-CNR8i3KM.mjs +0 -1613
- package/dist/_chunks/index-CNR8i3KM.mjs.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,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const PERMISSIONS = {
|
|
4
|
+
accessMain: [
|
|
5
|
+
{
|
|
6
|
+
action: 'plugin::i18n.locale.read',
|
|
7
|
+
subject: null
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
create: [
|
|
11
|
+
{
|
|
12
|
+
action: 'plugin::i18n.locale.create',
|
|
13
|
+
subject: null
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
delete: [
|
|
17
|
+
{
|
|
18
|
+
action: 'plugin::i18n.locale.delete',
|
|
19
|
+
subject: null
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
update: [
|
|
23
|
+
{
|
|
24
|
+
action: 'plugin::i18n.locale.update',
|
|
25
|
+
subject: null
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
read: [
|
|
29
|
+
{
|
|
30
|
+
action: 'plugin::i18n.locale.read',
|
|
31
|
+
subject: null
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
exports.PERMISSIONS = PERMISSIONS;
|
|
37
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../admin/src/constants.ts"],"sourcesContent":["export const PERMISSIONS = {\n accessMain: [{ action: 'plugin::i18n.locale.read', subject: null }],\n create: [{ action: 'plugin::i18n.locale.create', subject: null }],\n delete: [{ action: 'plugin::i18n.locale.delete', subject: null }],\n update: [{ action: 'plugin::i18n.locale.update', subject: null }],\n read: [{ action: 'plugin::i18n.locale.read', subject: null }],\n};\n"],"names":["PERMISSIONS","accessMain","action","subject","create","delete","update","read"],"mappings":";;MAAaA,WAAc,GAAA;IACzBC,UAAY,EAAA;AAAC,QAAA;YAAEC,MAAQ,EAAA,0BAAA;YAA4BC,OAAS,EAAA;AAAK;AAAE,KAAA;IACnEC,MAAQ,EAAA;AAAC,QAAA;YAAEF,MAAQ,EAAA,4BAAA;YAA8BC,OAAS,EAAA;AAAK;AAAE,KAAA;IACjEE,MAAQ,EAAA;AAAC,QAAA;YAAEH,MAAQ,EAAA,4BAAA;YAA8BC,OAAS,EAAA;AAAK;AAAE,KAAA;IACjEG,MAAQ,EAAA;AAAC,QAAA;YAAEJ,MAAQ,EAAA,4BAAA;YAA8BC,OAAS,EAAA;AAAK;AAAE,KAAA;IACjEI,IAAM,EAAA;AAAC,QAAA;YAAEL,MAAQ,EAAA,0BAAA;YAA4BC,OAAS,EAAA;AAAK;AAAE;AAC/D;;;;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const PERMISSIONS = {
|
|
2
|
+
accessMain: [
|
|
3
|
+
{
|
|
4
|
+
action: 'plugin::i18n.locale.read',
|
|
5
|
+
subject: null
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
create: [
|
|
9
|
+
{
|
|
10
|
+
action: 'plugin::i18n.locale.create',
|
|
11
|
+
subject: null
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
delete: [
|
|
15
|
+
{
|
|
16
|
+
action: 'plugin::i18n.locale.delete',
|
|
17
|
+
subject: null
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
update: [
|
|
21
|
+
{
|
|
22
|
+
action: 'plugin::i18n.locale.update',
|
|
23
|
+
subject: null
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
read: [
|
|
27
|
+
{
|
|
28
|
+
action: 'plugin::i18n.locale.read',
|
|
29
|
+
subject: null
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { PERMISSIONS };
|
|
35
|
+
//# sourceMappingURL=constants.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.mjs","sources":["../../admin/src/constants.ts"],"sourcesContent":["export const PERMISSIONS = {\n accessMain: [{ action: 'plugin::i18n.locale.read', subject: null }],\n create: [{ action: 'plugin::i18n.locale.create', subject: null }],\n delete: [{ action: 'plugin::i18n.locale.delete', subject: null }],\n update: [{ action: 'plugin::i18n.locale.update', subject: null }],\n read: [{ action: 'plugin::i18n.locale.read', subject: null }],\n};\n"],"names":["PERMISSIONS","accessMain","action","subject","create","delete","update","read"],"mappings":"MAAaA,WAAc,GAAA;IACzBC,UAAY,EAAA;AAAC,QAAA;YAAEC,MAAQ,EAAA,0BAAA;YAA4BC,OAAS,EAAA;AAAK;AAAE,KAAA;IACnEC,MAAQ,EAAA;AAAC,QAAA;YAAEF,MAAQ,EAAA,4BAAA;YAA8BC,OAAS,EAAA;AAAK;AAAE,KAAA;IACjEE,MAAQ,EAAA;AAAC,QAAA;YAAEH,MAAQ,EAAA,4BAAA;YAA8BC,OAAS,EAAA;AAAK;AAAE,KAAA;IACjEG,MAAQ,EAAA;AAAC,QAAA;YAAEJ,MAAQ,EAAA,4BAAA;YAA8BC,OAAS,EAAA;AAAK;AAAE,KAAA;IACjEI,IAAM,EAAA;AAAC,QAAA;YAAEL,MAAQ,EAAA,0BAAA;YAA4BC,OAAS,EAAA;AAAK;AAAE;AAC/D;;;;"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var designSystem = require('@strapi/design-system');
|
|
6
|
+
var icons = require('@strapi/icons');
|
|
7
|
+
var reactIntl = require('react-intl');
|
|
8
|
+
var styledComponents = require('styled-components');
|
|
9
|
+
var getTranslation = require('../utils/getTranslation.js');
|
|
10
|
+
|
|
11
|
+
function _interopNamespaceDefault(e) {
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
29
|
+
|
|
30
|
+
const mutateEditViewHook = ({ layout })=>{
|
|
31
|
+
// If i18n isn't explicitly enabled on the content type, then no field can be localized
|
|
32
|
+
if (!('i18n' in layout.options) || typeof layout.options.i18n === 'object' && layout.options.i18n !== null && 'localized' in layout.options.i18n && !layout.options.i18n.localized) {
|
|
33
|
+
return {
|
|
34
|
+
layout
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const components = Object.entries(layout.components).reduce((acc, [key, componentLayout])=>{
|
|
38
|
+
return {
|
|
39
|
+
...acc,
|
|
40
|
+
[key]: {
|
|
41
|
+
...componentLayout,
|
|
42
|
+
layout: componentLayout.layout.map((row)=>row.map(addLabelActionToField))
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}, {});
|
|
46
|
+
return {
|
|
47
|
+
layout: {
|
|
48
|
+
...layout,
|
|
49
|
+
components,
|
|
50
|
+
layout: layout.layout.map((panel)=>panel.map((row)=>row.map(addLabelActionToField)))
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
const addLabelActionToField = (field)=>{
|
|
55
|
+
const isFieldLocalized = doesFieldHaveI18nPluginOpt(field.attribute.pluginOptions) ? field.attribute.pluginOptions.i18n.localized : true;
|
|
56
|
+
const labelActionProps = {
|
|
57
|
+
title: {
|
|
58
|
+
id: isFieldLocalized ? getTranslation.getTranslation('Field.localized') : getTranslation.getTranslation('Field.not-localized'),
|
|
59
|
+
defaultMessage: isFieldLocalized ? 'This value is unique for the selected locale' : 'This value is the same across all locales'
|
|
60
|
+
},
|
|
61
|
+
icon: isFieldLocalized ? /*#__PURE__*/ jsxRuntime.jsx(icons.Earth, {}) : null
|
|
62
|
+
};
|
|
63
|
+
return {
|
|
64
|
+
...field,
|
|
65
|
+
labelAction: isFieldLocalized ? /*#__PURE__*/ jsxRuntime.jsx(LabelAction, {
|
|
66
|
+
...labelActionProps
|
|
67
|
+
}) : null
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
const doesFieldHaveI18nPluginOpt = (pluginOpts)=>{
|
|
71
|
+
if (!pluginOpts) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
return 'i18n' in pluginOpts && typeof pluginOpts.i18n === 'object' && pluginOpts.i18n !== null && 'localized' in pluginOpts.i18n;
|
|
75
|
+
};
|
|
76
|
+
const LabelAction = ({ title, icon })=>{
|
|
77
|
+
const { formatMessage } = reactIntl.useIntl();
|
|
78
|
+
return /*#__PURE__*/ jsxRuntime.jsxs(Span, {
|
|
79
|
+
tag: "span",
|
|
80
|
+
children: [
|
|
81
|
+
/*#__PURE__*/ jsxRuntime.jsx(designSystem.VisuallyHidden, {
|
|
82
|
+
tag: "span",
|
|
83
|
+
children: formatMessage(title)
|
|
84
|
+
}),
|
|
85
|
+
/*#__PURE__*/ jsxRuntime.jsx(designSystem.Tooltip, {
|
|
86
|
+
label: formatMessage(title),
|
|
87
|
+
children: /*#__PURE__*/ React__namespace.cloneElement(icon, {
|
|
88
|
+
'aria-hidden': true,
|
|
89
|
+
focusable: false
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
const Span = styledComponents.styled(designSystem.Flex)`
|
|
96
|
+
svg {
|
|
97
|
+
width: 12px;
|
|
98
|
+
height: 12px;
|
|
99
|
+
|
|
100
|
+
fill: ${({ theme })=>theme.colors.neutral500};
|
|
101
|
+
|
|
102
|
+
path {
|
|
103
|
+
fill: ${({ theme })=>theme.colors.neutral500};
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
`;
|
|
107
|
+
|
|
108
|
+
exports.mutateEditViewHook = mutateEditViewHook;
|
|
109
|
+
//# sourceMappingURL=editView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editView.js","sources":["../../../admin/src/contentManagerHooks/editView.tsx"],"sourcesContent":["/* eslint-disable check-file/filename-naming-convention */\nimport * as React from 'react';\n\nimport { Flex, Tooltip, VisuallyHidden } from '@strapi/design-system';\nimport { Earth } from '@strapi/icons';\nimport { MessageDescriptor, useIntl } from 'react-intl';\nimport { styled } from 'styled-components';\n\nimport { getTranslation } from '../utils/getTranslation';\n\nimport type { EditFieldLayout, EditLayout } from '@strapi/content-manager/strapi-admin';\n\ninterface MutateEditViewArgs {\n layout: EditLayout;\n}\n\nconst mutateEditViewHook = ({ layout }: MutateEditViewArgs): MutateEditViewArgs => {\n // If i18n isn't explicitly enabled on the content type, then no field can be localized\n if (\n !('i18n' in layout.options) ||\n (typeof layout.options.i18n === 'object' &&\n layout.options.i18n !== null &&\n 'localized' in layout.options.i18n &&\n !layout.options.i18n.localized)\n ) {\n return { layout };\n }\n\n const components = Object.entries(layout.components).reduce<EditLayout['components']>(\n (acc, [key, componentLayout]) => {\n return {\n ...acc,\n [key]: {\n ...componentLayout,\n layout: componentLayout.layout.map((row) => row.map(addLabelActionToField)),\n },\n };\n },\n {}\n );\n\n return {\n layout: {\n ...layout,\n components,\n layout: layout.layout.map((panel) => panel.map((row) => row.map(addLabelActionToField))),\n },\n } satisfies Pick<MutateEditViewArgs, 'layout'>;\n};\n\nconst addLabelActionToField = (field: EditFieldLayout) => {\n const isFieldLocalized = doesFieldHaveI18nPluginOpt(field.attribute.pluginOptions)\n ? field.attribute.pluginOptions.i18n.localized\n : true || ['uid', 'relation'].includes(field.attribute.type);\n\n const labelActionProps = {\n title: {\n id: isFieldLocalized\n ? getTranslation('Field.localized')\n : getTranslation('Field.not-localized'),\n defaultMessage: isFieldLocalized\n ? 'This value is unique for the selected locale'\n : 'This value is the same across all locales',\n },\n icon: isFieldLocalized ? <Earth /> : null,\n };\n\n return {\n ...field,\n labelAction: isFieldLocalized ? <LabelAction {...labelActionProps} /> : null,\n };\n};\n\nconst doesFieldHaveI18nPluginOpt = (\n pluginOpts?: object\n): pluginOpts is { i18n: { localized: boolean } } => {\n if (!pluginOpts) {\n return false;\n }\n\n return (\n 'i18n' in pluginOpts &&\n typeof pluginOpts.i18n === 'object' &&\n pluginOpts.i18n !== null &&\n 'localized' in pluginOpts.i18n\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * LabelAction\n * -----------------------------------------------------------------------------------------------*/\n\ninterface LabelActionProps {\n title: MessageDescriptor;\n icon: React.ReactNode;\n}\n\nconst LabelAction = ({ title, icon }: LabelActionProps) => {\n const { formatMessage } = useIntl();\n\n return (\n <Span tag=\"span\">\n <VisuallyHidden tag=\"span\">{formatMessage(title)}</VisuallyHidden>\n <Tooltip label={formatMessage(title)}>\n {React.cloneElement(icon as React.ReactElement, {\n 'aria-hidden': true,\n focusable: false, // See: https://allyjs.io/tutorials/focusing-in-svg.html#making-svg-elements-focusable\n })}\n </Tooltip>\n </Span>\n );\n};\n\nconst Span = styled(Flex)`\n svg {\n width: 12px;\n height: 12px;\n\n fill: ${({ theme }) => theme.colors.neutral500};\n\n path {\n fill: ${({ theme }) => theme.colors.neutral500};\n }\n }\n`;\n\nexport { mutateEditViewHook };\n"],"names":["mutateEditViewHook","layout","options","i18n","localized","components","Object","entries","reduce","acc","key","componentLayout","map","row","addLabelActionToField","panel","field","isFieldLocalized","doesFieldHaveI18nPluginOpt","attribute","pluginOptions","labelActionProps","title","id","getTranslation","defaultMessage","icon","_jsx","Earth","labelAction","LabelAction","pluginOpts","formatMessage","useIntl","_jsxs","Span","tag","VisuallyHidden","Tooltip","label","React","cloneElement","focusable","styled","Flex","theme","colors","neutral500"],"mappings":"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"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Flex, VisuallyHidden, Tooltip } from '@strapi/design-system';
|
|
4
|
+
import { Earth } from '@strapi/icons';
|
|
5
|
+
import { useIntl } from 'react-intl';
|
|
6
|
+
import { styled } from 'styled-components';
|
|
7
|
+
import { getTranslation } from '../utils/getTranslation.mjs';
|
|
8
|
+
|
|
9
|
+
const mutateEditViewHook = ({ layout })=>{
|
|
10
|
+
// If i18n isn't explicitly enabled on the content type, then no field can be localized
|
|
11
|
+
if (!('i18n' in layout.options) || typeof layout.options.i18n === 'object' && layout.options.i18n !== null && 'localized' in layout.options.i18n && !layout.options.i18n.localized) {
|
|
12
|
+
return {
|
|
13
|
+
layout
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
const components = Object.entries(layout.components).reduce((acc, [key, componentLayout])=>{
|
|
17
|
+
return {
|
|
18
|
+
...acc,
|
|
19
|
+
[key]: {
|
|
20
|
+
...componentLayout,
|
|
21
|
+
layout: componentLayout.layout.map((row)=>row.map(addLabelActionToField))
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
}, {});
|
|
25
|
+
return {
|
|
26
|
+
layout: {
|
|
27
|
+
...layout,
|
|
28
|
+
components,
|
|
29
|
+
layout: layout.layout.map((panel)=>panel.map((row)=>row.map(addLabelActionToField)))
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
const addLabelActionToField = (field)=>{
|
|
34
|
+
const isFieldLocalized = doesFieldHaveI18nPluginOpt(field.attribute.pluginOptions) ? field.attribute.pluginOptions.i18n.localized : true;
|
|
35
|
+
const labelActionProps = {
|
|
36
|
+
title: {
|
|
37
|
+
id: isFieldLocalized ? getTranslation('Field.localized') : getTranslation('Field.not-localized'),
|
|
38
|
+
defaultMessage: isFieldLocalized ? 'This value is unique for the selected locale' : 'This value is the same across all locales'
|
|
39
|
+
},
|
|
40
|
+
icon: isFieldLocalized ? /*#__PURE__*/ jsx(Earth, {}) : null
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
...field,
|
|
44
|
+
labelAction: isFieldLocalized ? /*#__PURE__*/ jsx(LabelAction, {
|
|
45
|
+
...labelActionProps
|
|
46
|
+
}) : null
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
const doesFieldHaveI18nPluginOpt = (pluginOpts)=>{
|
|
50
|
+
if (!pluginOpts) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
return 'i18n' in pluginOpts && typeof pluginOpts.i18n === 'object' && pluginOpts.i18n !== null && 'localized' in pluginOpts.i18n;
|
|
54
|
+
};
|
|
55
|
+
const LabelAction = ({ title, icon })=>{
|
|
56
|
+
const { formatMessage } = useIntl();
|
|
57
|
+
return /*#__PURE__*/ jsxs(Span, {
|
|
58
|
+
tag: "span",
|
|
59
|
+
children: [
|
|
60
|
+
/*#__PURE__*/ jsx(VisuallyHidden, {
|
|
61
|
+
tag: "span",
|
|
62
|
+
children: formatMessage(title)
|
|
63
|
+
}),
|
|
64
|
+
/*#__PURE__*/ jsx(Tooltip, {
|
|
65
|
+
label: formatMessage(title),
|
|
66
|
+
children: /*#__PURE__*/ React.cloneElement(icon, {
|
|
67
|
+
'aria-hidden': true,
|
|
68
|
+
focusable: false
|
|
69
|
+
})
|
|
70
|
+
})
|
|
71
|
+
]
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
const Span = styled(Flex)`
|
|
75
|
+
svg {
|
|
76
|
+
width: 12px;
|
|
77
|
+
height: 12px;
|
|
78
|
+
|
|
79
|
+
fill: ${({ theme })=>theme.colors.neutral500};
|
|
80
|
+
|
|
81
|
+
path {
|
|
82
|
+
fill: ${({ theme })=>theme.colors.neutral500};
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
`;
|
|
86
|
+
|
|
87
|
+
export { mutateEditViewHook };
|
|
88
|
+
//# sourceMappingURL=editView.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editView.mjs","sources":["../../../admin/src/contentManagerHooks/editView.tsx"],"sourcesContent":["/* eslint-disable check-file/filename-naming-convention */\nimport * as React from 'react';\n\nimport { Flex, Tooltip, VisuallyHidden } from '@strapi/design-system';\nimport { Earth } from '@strapi/icons';\nimport { MessageDescriptor, useIntl } from 'react-intl';\nimport { styled } from 'styled-components';\n\nimport { getTranslation } from '../utils/getTranslation';\n\nimport type { EditFieldLayout, EditLayout } from '@strapi/content-manager/strapi-admin';\n\ninterface MutateEditViewArgs {\n layout: EditLayout;\n}\n\nconst mutateEditViewHook = ({ layout }: MutateEditViewArgs): MutateEditViewArgs => {\n // If i18n isn't explicitly enabled on the content type, then no field can be localized\n if (\n !('i18n' in layout.options) ||\n (typeof layout.options.i18n === 'object' &&\n layout.options.i18n !== null &&\n 'localized' in layout.options.i18n &&\n !layout.options.i18n.localized)\n ) {\n return { layout };\n }\n\n const components = Object.entries(layout.components).reduce<EditLayout['components']>(\n (acc, [key, componentLayout]) => {\n return {\n ...acc,\n [key]: {\n ...componentLayout,\n layout: componentLayout.layout.map((row) => row.map(addLabelActionToField)),\n },\n };\n },\n {}\n );\n\n return {\n layout: {\n ...layout,\n components,\n layout: layout.layout.map((panel) => panel.map((row) => row.map(addLabelActionToField))),\n },\n } satisfies Pick<MutateEditViewArgs, 'layout'>;\n};\n\nconst addLabelActionToField = (field: EditFieldLayout) => {\n const isFieldLocalized = doesFieldHaveI18nPluginOpt(field.attribute.pluginOptions)\n ? field.attribute.pluginOptions.i18n.localized\n : true || ['uid', 'relation'].includes(field.attribute.type);\n\n const labelActionProps = {\n title: {\n id: isFieldLocalized\n ? getTranslation('Field.localized')\n : getTranslation('Field.not-localized'),\n defaultMessage: isFieldLocalized\n ? 'This value is unique for the selected locale'\n : 'This value is the same across all locales',\n },\n icon: isFieldLocalized ? <Earth /> : null,\n };\n\n return {\n ...field,\n labelAction: isFieldLocalized ? <LabelAction {...labelActionProps} /> : null,\n };\n};\n\nconst doesFieldHaveI18nPluginOpt = (\n pluginOpts?: object\n): pluginOpts is { i18n: { localized: boolean } } => {\n if (!pluginOpts) {\n return false;\n }\n\n return (\n 'i18n' in pluginOpts &&\n typeof pluginOpts.i18n === 'object' &&\n pluginOpts.i18n !== null &&\n 'localized' in pluginOpts.i18n\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * LabelAction\n * -----------------------------------------------------------------------------------------------*/\n\ninterface LabelActionProps {\n title: MessageDescriptor;\n icon: React.ReactNode;\n}\n\nconst LabelAction = ({ title, icon }: LabelActionProps) => {\n const { formatMessage } = useIntl();\n\n return (\n <Span tag=\"span\">\n <VisuallyHidden tag=\"span\">{formatMessage(title)}</VisuallyHidden>\n <Tooltip label={formatMessage(title)}>\n {React.cloneElement(icon as React.ReactElement, {\n 'aria-hidden': true,\n focusable: false, // See: https://allyjs.io/tutorials/focusing-in-svg.html#making-svg-elements-focusable\n })}\n </Tooltip>\n </Span>\n );\n};\n\nconst Span = styled(Flex)`\n svg {\n width: 12px;\n height: 12px;\n\n fill: ${({ theme }) => theme.colors.neutral500};\n\n path {\n fill: ${({ theme }) => theme.colors.neutral500};\n }\n }\n`;\n\nexport { mutateEditViewHook };\n"],"names":["mutateEditViewHook","layout","options","i18n","localized","components","Object","entries","reduce","acc","key","componentLayout","map","row","addLabelActionToField","panel","field","isFieldLocalized","doesFieldHaveI18nPluginOpt","attribute","pluginOptions","labelActionProps","title","id","getTranslation","defaultMessage","icon","_jsx","Earth","labelAction","LabelAction","pluginOpts","formatMessage","useIntl","_jsxs","Span","tag","VisuallyHidden","Tooltip","label","React","cloneElement","focusable","styled","Flex","theme","colors","neutral500"],"mappings":"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"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var LocaleListCell = require('../components/LocaleListCell.js');
|
|
5
|
+
var fields = require('../utils/fields.js');
|
|
6
|
+
var getTranslation = require('../utils/getTranslation.js');
|
|
7
|
+
|
|
8
|
+
const addColumnToTableHook = ({ displayedHeaders, layout })=>{
|
|
9
|
+
const { options } = layout;
|
|
10
|
+
const isFieldLocalized = fields.doesPluginOptionsHaveI18nLocalized(options) ? options.i18n.localized : false;
|
|
11
|
+
if (!isFieldLocalized) {
|
|
12
|
+
return {
|
|
13
|
+
displayedHeaders,
|
|
14
|
+
layout
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
return {
|
|
18
|
+
displayedHeaders: [
|
|
19
|
+
...displayedHeaders,
|
|
20
|
+
{
|
|
21
|
+
attribute: {
|
|
22
|
+
type: 'string'
|
|
23
|
+
},
|
|
24
|
+
label: {
|
|
25
|
+
id: getTranslation.getTranslation('list-view.table.header.label'),
|
|
26
|
+
defaultMessage: 'Available in'
|
|
27
|
+
},
|
|
28
|
+
searchable: false,
|
|
29
|
+
sortable: false,
|
|
30
|
+
name: 'locales',
|
|
31
|
+
// @ts-expect-error – ID is seen as number | string; this will change when we move the type over.
|
|
32
|
+
cellFormatter: (props, _header, meta)=>/*#__PURE__*/ jsxRuntime.jsx(LocaleListCell.LocaleListCell, {
|
|
33
|
+
...props,
|
|
34
|
+
...meta,
|
|
35
|
+
documentId: props.documentId
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
layout
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
exports.addColumnToTableHook = addColumnToTableHook;
|
|
44
|
+
//# sourceMappingURL=listView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listView.js","sources":["../../../admin/src/contentManagerHooks/listView.tsx"],"sourcesContent":["/* eslint-disable check-file/filename-naming-convention */\nimport { LocaleListCell } from '../components/LocaleListCell';\nimport { doesPluginOptionsHaveI18nLocalized } from '../utils/fields';\nimport { getTranslation } from '../utils/getTranslation';\n\nimport type { ListFieldLayout, ListLayout } from '@strapi/content-manager/strapi-admin';\n\n/* -------------------------------------------------------------------------------------------------\n * addColumnToTableHook\n * -----------------------------------------------------------------------------------------------*/\ninterface AddColumnToTableHookArgs {\n layout: ListLayout;\n displayedHeaders: ListFieldLayout[];\n}\n\nconst addColumnToTableHook = ({ displayedHeaders, layout }: AddColumnToTableHookArgs) => {\n const { options } = layout;\n\n const isFieldLocalized = doesPluginOptionsHaveI18nLocalized(options)\n ? options.i18n.localized\n : false;\n\n if (!isFieldLocalized) {\n return { displayedHeaders, layout };\n }\n\n return {\n displayedHeaders: [\n ...displayedHeaders,\n {\n attribute: { type: 'string' },\n label: {\n id: getTranslation('list-view.table.header.label'),\n defaultMessage: 'Available in',\n },\n searchable: false,\n sortable: false,\n name: 'locales',\n // @ts-expect-error – ID is seen as number | string; this will change when we move the type over.\n cellFormatter: (props, _header, meta) => (\n <LocaleListCell {...props} {...meta} documentId={props.documentId} />\n ),\n },\n ],\n layout,\n };\n};\n\nexport { addColumnToTableHook };\n"],"names":["addColumnToTableHook","displayedHeaders","layout","options","isFieldLocalized","doesPluginOptionsHaveI18nLocalized","i18n","localized","attribute","type","label","id","getTranslation","defaultMessage","searchable","sortable","name","cellFormatter","props","_header","meta","_jsx","LocaleListCell","documentId"],"mappings":";;;;;;;AAeA,MAAMA,uBAAuB,CAAC,EAAEC,gBAAgB,EAAEC,MAAM,EAA4B,GAAA;IAClF,MAAM,EAAEC,OAAO,EAAE,GAAGD,MAAAA;AAEpB,IAAA,MAAME,mBAAmBC,yCAAmCF,CAAAA,OAAAA,CAAAA,GACxDA,QAAQG,IAAI,CAACC,SAAS,GACtB,KAAA;AAEJ,IAAA,IAAI,CAACH,gBAAkB,EAAA;QACrB,OAAO;AAAEH,YAAAA,gBAAAA;AAAkBC,YAAAA;AAAO,SAAA;AACpC;IAEA,OAAO;QACLD,gBAAkB,EAAA;AACbA,YAAAA,GAAAA,gBAAAA;AACH,YAAA;gBACEO,SAAW,EAAA;oBAAEC,IAAM,EAAA;AAAS,iBAAA;gBAC5BC,KAAO,EAAA;AACLC,oBAAAA,EAAAA,EAAIC,6BAAe,CAAA,8BAAA,CAAA;oBACnBC,cAAgB,EAAA;AAClB,iBAAA;gBACAC,UAAY,EAAA,KAAA;gBACZC,QAAU,EAAA,KAAA;gBACVC,IAAM,EAAA,SAAA;;AAENC,gBAAAA,aAAAA,EAAe,CAACC,KAAAA,EAAOC,OAASC,EAAAA,IAAAA,iBAC9BC,cAACC,CAAAA,6BAAAA,EAAAA;AAAgB,wBAAA,GAAGJ,KAAK;AAAG,wBAAA,GAAGE,IAAI;AAAEG,wBAAAA,UAAAA,EAAYL,MAAMK;;AAE3D;AACD,SAAA;AACDrB,QAAAA;AACF,KAAA;AACF;;;;"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { LocaleListCell } from '../components/LocaleListCell.mjs';
|
|
3
|
+
import { doesPluginOptionsHaveI18nLocalized } from '../utils/fields.mjs';
|
|
4
|
+
import { getTranslation } from '../utils/getTranslation.mjs';
|
|
5
|
+
|
|
6
|
+
const addColumnToTableHook = ({ displayedHeaders, layout })=>{
|
|
7
|
+
const { options } = layout;
|
|
8
|
+
const isFieldLocalized = doesPluginOptionsHaveI18nLocalized(options) ? options.i18n.localized : false;
|
|
9
|
+
if (!isFieldLocalized) {
|
|
10
|
+
return {
|
|
11
|
+
displayedHeaders,
|
|
12
|
+
layout
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
displayedHeaders: [
|
|
17
|
+
...displayedHeaders,
|
|
18
|
+
{
|
|
19
|
+
attribute: {
|
|
20
|
+
type: 'string'
|
|
21
|
+
},
|
|
22
|
+
label: {
|
|
23
|
+
id: getTranslation('list-view.table.header.label'),
|
|
24
|
+
defaultMessage: 'Available in'
|
|
25
|
+
},
|
|
26
|
+
searchable: false,
|
|
27
|
+
sortable: false,
|
|
28
|
+
name: 'locales',
|
|
29
|
+
// @ts-expect-error – ID is seen as number | string; this will change when we move the type over.
|
|
30
|
+
cellFormatter: (props, _header, meta)=>/*#__PURE__*/ jsx(LocaleListCell, {
|
|
31
|
+
...props,
|
|
32
|
+
...meta,
|
|
33
|
+
documentId: props.documentId
|
|
34
|
+
})
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
layout
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export { addColumnToTableHook };
|
|
42
|
+
//# sourceMappingURL=listView.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listView.mjs","sources":["../../../admin/src/contentManagerHooks/listView.tsx"],"sourcesContent":["/* eslint-disable check-file/filename-naming-convention */\nimport { LocaleListCell } from '../components/LocaleListCell';\nimport { doesPluginOptionsHaveI18nLocalized } from '../utils/fields';\nimport { getTranslation } from '../utils/getTranslation';\n\nimport type { ListFieldLayout, ListLayout } from '@strapi/content-manager/strapi-admin';\n\n/* -------------------------------------------------------------------------------------------------\n * addColumnToTableHook\n * -----------------------------------------------------------------------------------------------*/\ninterface AddColumnToTableHookArgs {\n layout: ListLayout;\n displayedHeaders: ListFieldLayout[];\n}\n\nconst addColumnToTableHook = ({ displayedHeaders, layout }: AddColumnToTableHookArgs) => {\n const { options } = layout;\n\n const isFieldLocalized = doesPluginOptionsHaveI18nLocalized(options)\n ? options.i18n.localized\n : false;\n\n if (!isFieldLocalized) {\n return { displayedHeaders, layout };\n }\n\n return {\n displayedHeaders: [\n ...displayedHeaders,\n {\n attribute: { type: 'string' },\n label: {\n id: getTranslation('list-view.table.header.label'),\n defaultMessage: 'Available in',\n },\n searchable: false,\n sortable: false,\n name: 'locales',\n // @ts-expect-error – ID is seen as number | string; this will change when we move the type over.\n cellFormatter: (props, _header, meta) => (\n <LocaleListCell {...props} {...meta} documentId={props.documentId} />\n ),\n },\n ],\n layout,\n };\n};\n\nexport { addColumnToTableHook };\n"],"names":["addColumnToTableHook","displayedHeaders","layout","options","isFieldLocalized","doesPluginOptionsHaveI18nLocalized","i18n","localized","attribute","type","label","id","getTranslation","defaultMessage","searchable","sortable","name","cellFormatter","props","_header","meta","_jsx","LocaleListCell","documentId"],"mappings":";;;;;AAeA,MAAMA,uBAAuB,CAAC,EAAEC,gBAAgB,EAAEC,MAAM,EAA4B,GAAA;IAClF,MAAM,EAAEC,OAAO,EAAE,GAAGD,MAAAA;AAEpB,IAAA,MAAME,mBAAmBC,kCAAmCF,CAAAA,OAAAA,CAAAA,GACxDA,QAAQG,IAAI,CAACC,SAAS,GACtB,KAAA;AAEJ,IAAA,IAAI,CAACH,gBAAkB,EAAA;QACrB,OAAO;AAAEH,YAAAA,gBAAAA;AAAkBC,YAAAA;AAAO,SAAA;AACpC;IAEA,OAAO;QACLD,gBAAkB,EAAA;AACbA,YAAAA,GAAAA,gBAAAA;AACH,YAAA;gBACEO,SAAW,EAAA;oBAAEC,IAAM,EAAA;AAAS,iBAAA;gBAC5BC,KAAO,EAAA;AACLC,oBAAAA,EAAAA,EAAIC,cAAe,CAAA,8BAAA,CAAA;oBACnBC,cAAgB,EAAA;AAClB,iBAAA;gBACAC,UAAY,EAAA,KAAA;gBACZC,QAAU,EAAA,KAAA;gBACVC,IAAM,EAAA,SAAA;;AAENC,gBAAAA,aAAAA,EAAe,CAACC,KAAAA,EAAOC,OAASC,EAAAA,IAAAA,iBAC9BC,GAACC,CAAAA,cAAAA,EAAAA;AAAgB,wBAAA,GAAGJ,KAAK;AAAG,wBAAA,GAAGE,IAAI;AAAEG,wBAAAA,UAAAA,EAAYL,MAAMK;;AAE3D;AACD,SAAA;AACDrB,QAAAA;AACF,KAAA;AACF;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const addLocaleToReleasesHook = ({ displayedHeaders = [] })=>{
|
|
4
|
+
return {
|
|
5
|
+
displayedHeaders: [
|
|
6
|
+
...displayedHeaders,
|
|
7
|
+
{
|
|
8
|
+
label: {
|
|
9
|
+
id: 'content-releases.page.ReleaseDetails.table.header.label.locale',
|
|
10
|
+
defaultMessage: 'locale'
|
|
11
|
+
},
|
|
12
|
+
name: 'locale'
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
hasI18nEnabled: true
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
exports.addLocaleToReleasesHook = addLocaleToReleasesHook;
|
|
20
|
+
//# sourceMappingURL=releaseDetailsView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"releaseDetailsView.js","sources":["../../../admin/src/contentReleasesHooks/releaseDetailsView.ts"],"sourcesContent":["import type { Schema } from '@strapi/types';\n/* -------------------------------------------------------------------------------------------------\n * addLocaleToReleasesHook\n * -----------------------------------------------------------------------------------------------*/\ninterface AddLocaleToReleasesHookArgs {\n displayedHeaders: {\n key: string;\n fieldSchema: Schema.Attribute.Kind | 'custom';\n metadatas: {\n label: { id: string; defaultMessage: string };\n searchable: boolean;\n sortable: boolean;\n };\n name: string;\n }[];\n hasI18nEnabled: boolean;\n}\n\nconst addLocaleToReleasesHook = ({ displayedHeaders = [] }: AddLocaleToReleasesHookArgs) => {\n return {\n displayedHeaders: [\n ...displayedHeaders,\n {\n label: {\n id: 'content-releases.page.ReleaseDetails.table.header.label.locale',\n defaultMessage: 'locale',\n },\n name: 'locale',\n },\n ],\n hasI18nEnabled: true,\n };\n};\n\nexport { addLocaleToReleasesHook };\n"],"names":["addLocaleToReleasesHook","displayedHeaders","label","id","defaultMessage","name","hasI18nEnabled"],"mappings":";;AAkBA,MAAMA,uBAA0B,GAAA,CAAC,EAAEC,gBAAAA,GAAmB,EAAE,EAA+B,GAAA;IACrF,OAAO;QACLA,gBAAkB,EAAA;AACbA,YAAAA,GAAAA,gBAAAA;AACH,YAAA;gBACEC,KAAO,EAAA;oBACLC,EAAI,EAAA,gEAAA;oBACJC,cAAgB,EAAA;AAClB,iBAAA;gBACAC,IAAM,EAAA;AACR;AACD,SAAA;QACDC,cAAgB,EAAA;AAClB,KAAA;AACF;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const addLocaleToReleasesHook = ({ displayedHeaders = [] })=>{
|
|
2
|
+
return {
|
|
3
|
+
displayedHeaders: [
|
|
4
|
+
...displayedHeaders,
|
|
5
|
+
{
|
|
6
|
+
label: {
|
|
7
|
+
id: 'content-releases.page.ReleaseDetails.table.header.label.locale',
|
|
8
|
+
defaultMessage: 'locale'
|
|
9
|
+
},
|
|
10
|
+
name: 'locale'
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
hasI18nEnabled: true
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { addLocaleToReleasesHook };
|
|
18
|
+
//# sourceMappingURL=releaseDetailsView.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"releaseDetailsView.mjs","sources":["../../../admin/src/contentReleasesHooks/releaseDetailsView.ts"],"sourcesContent":["import type { Schema } from '@strapi/types';\n/* -------------------------------------------------------------------------------------------------\n * addLocaleToReleasesHook\n * -----------------------------------------------------------------------------------------------*/\ninterface AddLocaleToReleasesHookArgs {\n displayedHeaders: {\n key: string;\n fieldSchema: Schema.Attribute.Kind | 'custom';\n metadatas: {\n label: { id: string; defaultMessage: string };\n searchable: boolean;\n sortable: boolean;\n };\n name: string;\n }[];\n hasI18nEnabled: boolean;\n}\n\nconst addLocaleToReleasesHook = ({ displayedHeaders = [] }: AddLocaleToReleasesHookArgs) => {\n return {\n displayedHeaders: [\n ...displayedHeaders,\n {\n label: {\n id: 'content-releases.page.ReleaseDetails.table.header.label.locale',\n defaultMessage: 'locale',\n },\n name: 'locale',\n },\n ],\n hasI18nEnabled: true,\n };\n};\n\nexport { addLocaleToReleasesHook };\n"],"names":["addLocaleToReleasesHook","displayedHeaders","label","id","defaultMessage","name","hasI18nEnabled"],"mappings":"AAkBA,MAAMA,uBAA0B,GAAA,CAAC,EAAEC,gBAAAA,GAAmB,EAAE,EAA+B,GAAA;IACrF,OAAO;QACLA,gBAAkB,EAAA;AACbA,YAAAA,GAAAA,gBAAAA;AACH,YAAA;gBACEC,KAAO,EAAA;oBACLC,EAAI,EAAA,gEAAA;oBACJC,cAAgB,EAAA;AAClB,iBAAA;gBACAC,IAAM,EAAA;AACR;AACD,SAAA;QACDC,cAAgB,EAAA;AAClB,KAAA;AACF;;;;"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var strapiAdmin = require('@strapi/admin/strapi-admin');
|
|
5
|
+
var reactIntl = require('react-intl');
|
|
6
|
+
var reactRedux = require('react-redux');
|
|
7
|
+
var aiLocalizationJobs = require('../services/aiLocalizationJobs.js');
|
|
8
|
+
var getTranslation = require('../utils/getTranslation.js');
|
|
9
|
+
|
|
10
|
+
function _interopNamespaceDefault(e) {
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
28
|
+
|
|
29
|
+
const useAILocalizationJobsPolling = ({ documentId, model, collectionType })=>{
|
|
30
|
+
const { toggleNotification } = strapiAdmin.useNotification();
|
|
31
|
+
const { formatMessage } = reactIntl.useIntl();
|
|
32
|
+
const dispatch = reactRedux.useDispatch();
|
|
33
|
+
const [previousJobStatus, setPreviousJobStatus] = React__namespace.useState(null);
|
|
34
|
+
/**
|
|
35
|
+
* NOTE:
|
|
36
|
+
* Due to a limitation with RTK query it is not possible to dynamically update the polling interval
|
|
37
|
+
* @see https://github.com/reduxjs/redux-toolkit/issues/1651
|
|
38
|
+
*/ const { data: initialJobData } = aiLocalizationJobs.useGetAILocalizationJobsByDocumentQuery({
|
|
39
|
+
documentId: documentId,
|
|
40
|
+
model: model,
|
|
41
|
+
collectionType: collectionType
|
|
42
|
+
});
|
|
43
|
+
const shouldPoll = initialJobData?.data?.status === 'processing' || previousJobStatus === 'processing';
|
|
44
|
+
const { data: jobData } = aiLocalizationJobs.useGetAILocalizationJobsByDocumentQuery({
|
|
45
|
+
documentId: documentId,
|
|
46
|
+
model: model,
|
|
47
|
+
collectionType: collectionType
|
|
48
|
+
}, {
|
|
49
|
+
skip: !shouldPoll,
|
|
50
|
+
pollingInterval: 1000
|
|
51
|
+
});
|
|
52
|
+
const job = jobData?.data || initialJobData?.data;
|
|
53
|
+
const currentJobStatus = job?.status;
|
|
54
|
+
const invalidateDocument = React__namespace.useCallback(()=>{
|
|
55
|
+
dispatch(strapiAdmin.adminApi.util.invalidateTags([
|
|
56
|
+
{
|
|
57
|
+
// @ts-expect-error tag isn't available
|
|
58
|
+
type: 'Document',
|
|
59
|
+
id: collectionType !== 'single-types' ? `${model}_${documentId}` : model
|
|
60
|
+
}
|
|
61
|
+
]));
|
|
62
|
+
}, [
|
|
63
|
+
dispatch,
|
|
64
|
+
collectionType,
|
|
65
|
+
model,
|
|
66
|
+
documentId
|
|
67
|
+
]);
|
|
68
|
+
// Check for job status changes and trigger callbacks
|
|
69
|
+
React__namespace.useEffect(()=>{
|
|
70
|
+
if (!currentJobStatus) return;
|
|
71
|
+
// Detect transition from 'processing' to a terminal state
|
|
72
|
+
if (previousJobStatus === 'processing' && currentJobStatus === 'completed') {
|
|
73
|
+
toggleNotification({
|
|
74
|
+
type: 'success',
|
|
75
|
+
message: formatMessage({
|
|
76
|
+
id: getTranslation.getTranslation('CMEditViewAITranslation.job-completed'),
|
|
77
|
+
defaultMessage: 'AI translation completed successfully!'
|
|
78
|
+
})
|
|
79
|
+
});
|
|
80
|
+
invalidateDocument();
|
|
81
|
+
}
|
|
82
|
+
if (previousJobStatus === 'processing' && currentJobStatus === 'failed') {
|
|
83
|
+
toggleNotification({
|
|
84
|
+
type: 'warning',
|
|
85
|
+
message: formatMessage({
|
|
86
|
+
id: getTranslation.getTranslation('CMEditViewAITranslation.job-failed'),
|
|
87
|
+
defaultMessage: 'AI translation failed. Please try again.'
|
|
88
|
+
})
|
|
89
|
+
});
|
|
90
|
+
invalidateDocument();
|
|
91
|
+
}
|
|
92
|
+
// Update the previous status if it changed
|
|
93
|
+
if (previousJobStatus !== currentJobStatus) {
|
|
94
|
+
setPreviousJobStatus(currentJobStatus);
|
|
95
|
+
}
|
|
96
|
+
}, [
|
|
97
|
+
currentJobStatus,
|
|
98
|
+
previousJobStatus,
|
|
99
|
+
setPreviousJobStatus,
|
|
100
|
+
toggleNotification,
|
|
101
|
+
formatMessage,
|
|
102
|
+
invalidateDocument
|
|
103
|
+
]);
|
|
104
|
+
return {
|
|
105
|
+
status: job?.status
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
exports.useAILocalizationJobsPolling = useAILocalizationJobsPolling;
|
|
110
|
+
//# sourceMappingURL=useAILocalizationJobsPolling.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAILocalizationJobsPolling.js","sources":["../../../admin/src/hooks/useAILocalizationJobsPolling.ts"],"sourcesContent":["import * as React from 'react';\n\nimport { useNotification, adminApi } from '@strapi/admin/strapi-admin';\nimport { useIntl } from 'react-intl';\nimport { useDispatch } from 'react-redux';\n\nimport { AILocalizationJobs } from '../../../shared/contracts/ai-localization-jobs';\nimport { useGetAILocalizationJobsByDocumentQuery } from '../services/aiLocalizationJobs';\nimport { getTranslation } from '../utils/getTranslation';\n\ninterface UseAILocalizationJobsPollingOptions {\n documentId?: string;\n model?: string;\n collectionType?: string;\n}\n\nexport const useAILocalizationJobsPolling = ({\n documentId,\n model,\n collectionType,\n}: UseAILocalizationJobsPollingOptions) => {\n const { toggleNotification } = useNotification();\n const { formatMessage } = useIntl();\n const dispatch = useDispatch();\n\n const [previousJobStatus, setPreviousJobStatus] = React.useState<\n AILocalizationJobs['status'] | null\n >(null);\n\n /**\n * NOTE:\n * Due to a limitation with RTK query it is not possible to dynamically update the polling interval\n * @see https://github.com/reduxjs/redux-toolkit/issues/1651\n */\n const { data: initialJobData } = useGetAILocalizationJobsByDocumentQuery({\n documentId: documentId!,\n model: model!,\n collectionType: collectionType!,\n });\n\n const shouldPoll =\n initialJobData?.data?.status === 'processing' || previousJobStatus === 'processing';\n const { data: jobData } = useGetAILocalizationJobsByDocumentQuery(\n { documentId: documentId!, model: model!, collectionType: collectionType! },\n {\n skip: !shouldPoll,\n pollingInterval: 1000,\n }\n );\n\n const job = jobData?.data || initialJobData?.data;\n const currentJobStatus = job?.status;\n\n const invalidateDocument = React.useCallback(() => {\n dispatch(\n adminApi.util.invalidateTags([\n {\n // @ts-expect-error tag isn't available\n type: 'Document',\n id: collectionType !== 'single-types' ? `${model}_${documentId}` : model,\n },\n ])\n );\n }, [dispatch, collectionType, model, documentId]);\n\n // Check for job status changes and trigger callbacks\n React.useEffect(() => {\n if (!currentJobStatus) return;\n\n // Detect transition from 'processing' to a terminal state\n if (previousJobStatus === 'processing' && currentJobStatus === 'completed') {\n toggleNotification({\n type: 'success',\n message: formatMessage({\n id: getTranslation('CMEditViewAITranslation.job-completed'),\n defaultMessage: 'AI translation completed successfully!',\n }),\n });\n invalidateDocument();\n }\n\n if (previousJobStatus === 'processing' && currentJobStatus === 'failed') {\n toggleNotification({\n type: 'warning',\n message: formatMessage({\n id: getTranslation('CMEditViewAITranslation.job-failed'),\n defaultMessage: 'AI translation failed. Please try again.',\n }),\n });\n invalidateDocument();\n }\n\n // Update the previous status if it changed\n if (previousJobStatus !== currentJobStatus) {\n setPreviousJobStatus(currentJobStatus);\n }\n }, [\n currentJobStatus,\n previousJobStatus,\n setPreviousJobStatus,\n toggleNotification,\n formatMessage,\n invalidateDocument,\n ]);\n\n return {\n status: job?.status,\n };\n};\n"],"names":["useAILocalizationJobsPolling","documentId","model","collectionType","toggleNotification","useNotification","formatMessage","useIntl","dispatch","useDispatch","previousJobStatus","setPreviousJobStatus","React","useState","data","initialJobData","useGetAILocalizationJobsByDocumentQuery","shouldPoll","status","jobData","skip","pollingInterval","job","currentJobStatus","invalidateDocument","useCallback","adminApi","util","invalidateTags","type","id","useEffect","message","getTranslation","defaultMessage"],"mappings":"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"}
|