@strapi/i18n 0.0.0-next.e1a19b9e52cdcb526515883c8289522a64c9871a → 0.0.0-next.e2e3ca14971ee768e1a227a209362264fd0132d4
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 +2 -2
- package/dist/admin/components/BulkLocaleActionModal.js.map +1 -1
- package/dist/admin/components/BulkLocaleActionModal.mjs +2 -2
- package/dist/admin/components/BulkLocaleActionModal.mjs.map +1 -1
- package/dist/admin/components/CMHeaderActions.js +294 -20
- package/dist/admin/components/CMHeaderActions.js.map +1 -1
- package/dist/admin/components/CMHeaderActions.mjs +298 -25
- package/dist/admin/components/CMHeaderActions.mjs.map +1 -1
- package/dist/admin/components/CreateLocale.js +11 -5
- package/dist/admin/components/CreateLocale.js.map +1 -1
- package/dist/admin/components/CreateLocale.mjs +12 -6
- package/dist/admin/components/CreateLocale.mjs.map +1 -1
- package/dist/admin/components/LocaleListCell.js +65 -45
- package/dist/admin/components/LocaleListCell.js.map +1 -1
- package/dist/admin/components/LocaleListCell.mjs +66 -46
- package/dist/admin/components/LocaleListCell.mjs.map +1 -1
- package/dist/admin/components/LocalePicker.js +18 -11
- package/dist/admin/components/LocalePicker.js.map +1 -1
- package/dist/admin/components/LocalePicker.mjs +19 -12
- package/dist/admin/components/LocalePicker.mjs.map +1 -1
- package/dist/admin/contentManagerHooks/editView.js +6 -3
- package/dist/admin/contentManagerHooks/editView.js.map +1 -1
- package/dist/admin/contentManagerHooks/editView.mjs +7 -4
- package/dist/admin/contentManagerHooks/editView.mjs.map +1 -1
- package/dist/admin/contentManagerHooks/listView.js +2 -1
- package/dist/admin/contentManagerHooks/listView.js.map +1 -1
- package/dist/admin/contentManagerHooks/listView.mjs +2 -1
- package/dist/admin/contentManagerHooks/listView.mjs.map +1 -1
- 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 +4 -4
- package/dist/admin/hooks/useI18n.js.map +1 -1
- package/dist/admin/hooks/useI18n.mjs +4 -4
- package/dist/admin/hooks/useI18n.mjs.map +1 -1
- package/dist/admin/index.js +1 -0
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +2 -1
- package/dist/admin/index.mjs.map +1 -1
- package/dist/admin/pages/SettingsPage.js +121 -46
- package/dist/admin/pages/SettingsPage.js.map +1 -1
- package/dist/admin/pages/SettingsPage.mjs +124 -30
- package/dist/admin/pages/SettingsPage.mjs.map +1 -1
- 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 +3 -1
- package/dist/admin/services/api.js.map +1 -1
- package/dist/admin/services/api.mjs +3 -1
- package/dist/admin/services/api.mjs.map +1 -1
- package/dist/admin/services/locales.js.map +1 -1
- package/dist/admin/services/locales.mjs.map +1 -1
- package/dist/admin/services/settings.js +30 -0
- package/dist/admin/services/settings.js.map +1 -0
- package/dist/admin/services/settings.mjs +27 -0
- package/dist/admin/services/settings.mjs.map +1 -0
- package/dist/admin/src/components/CMHeaderActions.d.ts +17 -4
- package/dist/admin/src/components/LocaleListCell.d.ts +2 -1
- package/dist/admin/src/hooks/useAILocalizationJobsPolling.d.ts +9 -0
- package/dist/admin/src/services/aiLocalizationJobs.d.ts +6 -0
- package/dist/admin/src/services/api.d.ts +1 -1
- package/dist/admin/src/services/locales.d.ts +1 -1
- package/dist/admin/src/services/relations.d.ts +1 -1
- package/dist/admin/src/services/settings.d.ts +5 -0
- package/dist/admin/translations/en.json.js +10 -0
- package/dist/admin/translations/en.json.js.map +1 -1
- package/dist/admin/translations/en.json.mjs +10 -0
- package/dist/admin/translations/en.json.mjs.map +1 -1
- package/dist/admin/utils/clean.js +2 -2
- package/dist/admin/utils/clean.js.map +1 -1
- package/dist/admin/utils/clean.mjs +2 -2
- package/dist/admin/utils/clean.mjs.map +1 -1
- package/dist/admin/utils/getTranslation.js.map +1 -1
- package/dist/admin/utils/getTranslation.mjs.map +1 -1
- package/dist/admin/utils/prefixPluginTranslations.js.map +1 -1
- package/dist/admin/utils/prefixPluginTranslations.mjs.map +1 -1
- package/dist/server/bootstrap.js +24 -8
- package/dist/server/bootstrap.js.map +1 -1
- package/dist/server/bootstrap.mjs +24 -8
- package/dist/server/bootstrap.mjs.map +1 -1
- package/dist/server/constants/iso-locales.json.js +4 -0
- package/dist/server/constants/iso-locales.json.js.map +1 -1
- package/dist/server/constants/iso-locales.json.mjs +4 -0
- package/dist/server/constants/iso-locales.json.mjs.map +1 -1
- 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/index.js +5 -1
- package/dist/server/controllers/index.js.map +1 -1
- package/dist/server/controllers/index.mjs +5 -1
- package/dist/server/controllers/index.mjs.map +1 -1
- 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/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 +3 -1
- package/dist/server/register.js.map +1 -1
- package/dist/server/register.mjs +3 -1
- package/dist/server/register.mjs.map +1 -1
- package/dist/server/routes/admin.js +40 -0
- package/dist/server/routes/admin.js.map +1 -1
- package/dist/server/routes/admin.mjs +40 -0
- package/dist/server/routes/admin.mjs.map +1 -1
- 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.map +1 -1
- package/dist/server/services/content-types.mjs.map +1 -1
- package/dist/server/services/index.js +7 -1
- package/dist/server/services/index.js.map +1 -1
- package/dist/server/services/index.mjs +7 -1
- package/dist/server/services/index.mjs.map +1 -1
- 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 +44 -1
- 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/services/ai-localization-jobs.d.ts +26 -0
- package/dist/server/src/services/ai-localization-jobs.d.ts.map +1 -0
- package/dist/server/src/services/ai-localizations.d.ts +18 -0
- package/dist/server/src/services/ai-localizations.d.ts.map +1 -0
- package/dist/server/src/services/index.d.ts +33 -0
- package/dist/server/src/services/index.d.ts.map +1 -1
- package/dist/server/src/services/settings.d.ts +13 -0
- package/dist/server/src/services/settings.d.ts.map +1 -0
- package/dist/server/src/utils/index.d.ts +7 -1
- package/dist/server/src/utils/index.d.ts.map +1 -1
- package/dist/server/src/validation/settings.d.ts +12 -0
- package/dist/server/src/validation/settings.d.ts.map +1 -0
- package/dist/server/utils/index.js.map +1 -1
- package/dist/server/utils/index.mjs.map +1 -1
- package/dist/server/validation/settings.js +11 -0
- package/dist/server/validation/settings.js.map +1 -0
- package/dist/server/validation/settings.mjs +9 -0
- package/dist/server/validation/settings.mjs.map +1 -0
- package/dist/shared/contracts/ai-localization-jobs.d.ts +27 -0
- package/dist/shared/contracts/ai-localization-jobs.d.ts.map +1 -0
- package/dist/shared/contracts/settings.d.ts +40 -0
- package/dist/shared/contracts/shared.d.ts.map +1 -0
- package/package.json +11 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsPage.mjs","sources":["../../../admin/src/pages/SettingsPage.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport {\n Page,\n useAPIErrorHandler,\n useNotification,\n useRBAC,\n Layouts,\n} from '@strapi/admin/strapi-admin';\nimport { EmptyStateLayout } from '@strapi/design-system';\nimport { EmptyDocuments } from '@strapi/icons/symbols';\nimport { useIntl } from 'react-intl';\n\nimport { CreateLocale } from '../components/CreateLocale';\nimport { LocaleTable } from '../components/LocaleTable';\nimport { PERMISSIONS } from '../constants';\nimport { useGetLocalesQuery } from '../services/locales';\nimport { getTranslation } from '../utils/getTranslation';\n\nconst SettingsPage = () => {\n const { formatMessage } = useIntl();\n const { toggleNotification } = useNotification();\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();\n const { data: locales, isLoading: isLoadingLocales, error } = useGetLocalesQuery();\n const {\n isLoading: isLoadingRBAC,\n allowedActions: { canUpdate, canCreate, canDelete },\n } = useRBAC(PERMISSIONS);\n\n React.useEffect(() => {\n if (error) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(error),\n });\n }\n }, [error, formatAPIError, toggleNotification]);\n\n const isLoading = isLoadingLocales || isLoadingRBAC;\n\n if (isLoading) {\n return <Page.Loading />;\n }\n\n if (error || !Array.isArray(locales)) {\n return <Page.Error />;\n }\n\n return (\n <Page.Main tabIndex={-1}>\n <Layouts.Header\n primaryAction={<CreateLocale disabled={!canCreate} />}\n title={formatMessage({\n id: getTranslation('plugin.name'),\n defaultMessage: 'Internationalization',\n })}\n subtitle={formatMessage({\n id: getTranslation('Settings.list.description'),\n defaultMessage: 'Configure the settings',\n })}\n />\n <Layouts.Content>\n {locales.length > 0 ? (\n <LocaleTable locales={locales} canDelete={canDelete} canUpdate={canUpdate} />\n ) : (\n <EmptyStateLayout\n icon={<EmptyDocuments width={undefined} height={undefined} />}\n content={formatMessage({\n id: getTranslation('Settings.list.empty.title'),\n defaultMessage: 'There are no locales',\n })}\n action={<CreateLocale disabled={!canCreate} variant=\"secondary\" />}\n />\n )}\n </Layouts.Content>\n </Page.Main>\n );\n};\n\nconst ProtectedSettingsPage = () => {\n return (\n <Page.Protect permissions={PERMISSIONS.read}>\n <SettingsPage />\n </Page.Protect>\n );\n};\n\nexport { ProtectedSettingsPage, SettingsPage };\n"],"names":["SettingsPage","formatMessage","useIntl","toggleNotification","useNotification","_unstableFormatAPIError","formatAPIError","useAPIErrorHandler","data","locales","isLoading","isLoadingLocales","error","useGetLocalesQuery","isLoadingRBAC","allowedActions","canUpdate","canCreate","canDelete","useRBAC","PERMISSIONS","React","useEffect","type","message","_jsx","Page","Loading","Array","isArray","Error","_jsxs","Main","tabIndex","Layouts","Header","primaryAction","CreateLocale","disabled","title","id","getTranslation","defaultMessage","subtitle","Content","length","LocaleTable","EmptyStateLayout","icon","EmptyDocuments","width","undefined","height","content","action","variant","ProtectedSettingsPage","Protect","permissions","read"],"mappings":";;;;;;;;;;;;AAmBA,MAAMA,YAAe,GAAA,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A,EAAU,CAACrB;;AACxCsB,gBAAAA,KAAAA,EAAOtC,aAAc,CAAA;AACnBuC,oBAAAA,EAAAA,EAAIC,cAAe,CAAA,aAAA,CAAA;oBACnBC,cAAgB,EAAA;AAClB,iBAAA,CAAA;AACAC,gBAAAA,QAAAA,EAAU1C,aAAc,CAAA;AACtBuC,oBAAAA,EAAAA,EAAIC,cAAe,CAAA,2BAAA,CAAA;oBACnBC,cAAgB,EAAA;AAClB,iBAAA;;AAEF,0BAAAjB,GAAA,CAACS,QAAQU,OAAO,EAAA;0BACbnC,OAAQoC,CAAAA,MAAM,GAAG,CAAA,iBAChBpB,GAACqB,CAAAA,WAAAA,EAAAA;oBAAYrC,OAASA,EAAAA,OAAAA;oBAASS,SAAWA,EAAAA,SAAAA;oBAAWF,SAAWA,EAAAA;mCAEhES,GAACsB,CAAAA,gBAAAA,EAAAA;AACCC,oBAAAA,IAAAA,gBAAMvB,GAACwB,CAAAA,cAAAA,EAAAA;wBAAeC,KAAOC,EAAAA,SAAAA;wBAAWC,MAAQD,EAAAA;;AAChDE,oBAAAA,OAAAA,EAASpD,aAAc,CAAA;AACrBuC,wBAAAA,EAAAA,EAAIC,cAAe,CAAA,2BAAA,CAAA;wBACnBC,cAAgB,EAAA;AAClB,qBAAA,CAAA;AACAY,oBAAAA,MAAAA,gBAAQ7B,GAACY,CAAAA,YAAAA,EAAAA;AAAaC,wBAAAA,QAAAA,EAAU,CAACrB,SAAAA;wBAAWsC,OAAQ,EAAA;;;;;;AAMhE;AAEA,MAAMC,qBAAwB,GAAA,IAAA;IAC5B,qBACE/B,GAAA,CAACC,KAAK+B,OAAO,EAAA;AAACC,QAAAA,WAAAA,EAAatC,YAAYuC,IAAI;AACzC,QAAA,QAAA,gBAAAlC,GAACzB,CAAAA,YAAAA,EAAAA,EAAAA;;AAGP;;;;"}
|
|
1
|
+
{"version":3,"file":"SettingsPage.mjs","sources":["../../../admin/src/pages/SettingsPage.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { SerializedError } from '@reduxjs/toolkit';\nimport {\n Page,\n useAPIErrorHandler,\n useNotification,\n useRBAC,\n Layouts,\n BaseQueryError,\n} from '@strapi/admin/strapi-admin';\nimport { useAIAvailability } from '@strapi/admin/strapi-admin/ee';\nimport {\n Box,\n EmptyStateLayout,\n Field,\n Flex,\n Tooltip,\n Toggle,\n Typography,\n} from '@strapi/design-system';\nimport { Sparkle } from '@strapi/icons';\nimport { EmptyDocuments } from '@strapi/icons/symbols';\nimport { useIntl } from 'react-intl';\n\nimport { CreateLocale } from '../components/CreateLocale';\nimport { LocaleTable } from '../components/LocaleTable';\nimport { PERMISSIONS } from '../constants';\nimport { useGetLocalesQuery } from '../services/locales';\nimport { useGetSettingsQuery, useUpdatei18nSettingsMutation } from '../services/settings';\nimport { getTranslation } from '../utils/getTranslation';\n\nconst SettingsErrrorTooltip = ({\n children,\n error,\n}: {\n children: React.ReactNode;\n error: BaseQueryError | SerializedError | undefined;\n}) => {\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();\n\n if (error) {\n return (\n <Tooltip label={formatAPIError(error)} style={{ maxWidth: '200px' }}>\n {children}\n </Tooltip>\n );\n }\n\n return children;\n};\n\nconst SettingsPage = () => {\n const { formatMessage } = useIntl();\n const { toggleNotification } = useNotification();\n const { data: locales, isLoading: isLoadingLocales, error } = useGetLocalesQuery();\n const {\n isLoading: isLoadingRBAC,\n allowedActions: { canUpdate, canCreate, canDelete },\n } = useRBAC(PERMISSIONS);\n const isAIAvailable = useAIAvailability();\n\n // Settings state management\n const {\n data: settings,\n isLoading: isLoadingSettings,\n error: settingsError,\n } = useGetSettingsQuery();\n const [updateSettings] = useUpdatei18nSettingsMutation();\n\n const handleToggleChange = async (checked: boolean) => {\n try {\n await updateSettings({ aiLocalizations: checked }).unwrap();\n\n toggleNotification({\n type: 'success',\n message: formatMessage({ id: 'notification.form.success.fields' }),\n });\n } catch (err) {\n console.error(err);\n toggleNotification({\n type: 'danger',\n message: formatMessage({\n id: 'notification.error',\n defaultMessage: 'An error occurred',\n }),\n });\n }\n };\n\n const isLoading = isLoadingLocales || isLoadingRBAC || isLoadingSettings;\n\n if (isLoading) {\n return <Page.Loading />;\n }\n\n if (error || !Array.isArray(locales)) {\n return <Page.Error />;\n }\n\n return (\n <Page.Main tabIndex={-1}>\n <Layouts.Header\n primaryAction={<CreateLocale disabled={!canCreate} />}\n title={formatMessage({\n id: getTranslation('plugin.name'),\n defaultMessage: 'Internationalization',\n })}\n subtitle={formatMessage({\n id: getTranslation('Settings.list.description'),\n defaultMessage: 'Configure the settings',\n })}\n />\n <Layouts.Content>\n {isAIAvailable && (\n <Flex background=\"neutral0\" padding={6} marginBottom={6} shadow=\"filterShadow\" hasRadius>\n <Flex direction=\"column\" alignItems=\"stretch\" gap={1} flex={1}>\n <Flex gap={1}>\n <Box color=\"alternative700\">\n <Sparkle />\n </Box>\n <Typography variant=\"delta\" tag=\"h2\">\n {formatMessage({\n id: getTranslation('Settings.aiLocalizations.label'),\n defaultMessage: 'AI Translations',\n })}\n </Typography>\n </Flex>\n <Typography variant=\"pi\" textColor=\"neutral600\" fontSize=\"14px\">\n {formatMessage({\n id: getTranslation('Settings.aiLocalizations.description'),\n defaultMessage:\n 'Everytime you save in the Content Manager, our AI will use your default locale to translate all other locales automatically.',\n })}\n </Typography>\n </Flex>\n <Field.Root name=\"aiLocalizations\" minWidth=\"200px\">\n <SettingsErrrorTooltip error={settingsError}>\n <Toggle\n disabled={Boolean(settingsError)}\n checked={settings?.data?.aiLocalizations ?? false}\n offLabel={formatMessage({\n id: 'app.components.ToggleCheckbox.disabled-label',\n defaultMessage: 'Disabled',\n })}\n onLabel={formatMessage({\n id: 'app.components.ToggleCheckbox.enabled-label',\n defaultMessage: 'Enabled',\n })}\n onChange={(e) => handleToggleChange(e.target.checked)}\n />\n </SettingsErrrorTooltip>\n </Field.Root>\n </Flex>\n )}\n {locales.length > 0 ? (\n <LocaleTable locales={locales} canDelete={canDelete} canUpdate={canUpdate} />\n ) : (\n <EmptyStateLayout\n icon={<EmptyDocuments width={undefined} height={undefined} />}\n content={formatMessage({\n id: getTranslation('Settings.list.empty.title'),\n defaultMessage: 'There are no locales',\n })}\n action={<CreateLocale disabled={!canCreate} variant=\"secondary\" />}\n />\n )}\n </Layouts.Content>\n </Page.Main>\n );\n};\n\nconst ProtectedSettingsPage = () => {\n return (\n <Page.Protect permissions={PERMISSIONS.read}>\n <SettingsPage />\n </Page.Protect>\n );\n};\n\nexport { ProtectedSettingsPage, SettingsPage };\n"],"names":["SettingsErrrorTooltip","children","error","_unstableFormatAPIError","formatAPIError","useAPIErrorHandler","_jsx","Tooltip","label","style","maxWidth","SettingsPage","formatMessage","useIntl","toggleNotification","useNotification","data","locales","isLoading","isLoadingLocales","useGetLocalesQuery","isLoadingRBAC","allowedActions","canUpdate","canCreate","canDelete","useRBAC","PERMISSIONS","isAIAvailable","useAIAvailability","settings","isLoadingSettings","settingsError","useGetSettingsQuery","updateSettings","useUpdatei18nSettingsMutation","handleToggleChange","checked","aiLocalizations","unwrap","type","message","id","err","console","defaultMessage","Page","Loading","Array","isArray","Error","_jsxs","Main","tabIndex","Layouts","Header","primaryAction","CreateLocale","disabled","title","getTranslation","subtitle","Content","Flex","background","padding","marginBottom","shadow","hasRadius","direction","alignItems","gap","flex","Box","color","Sparkle","Typography","variant","tag","textColor","fontSize","Field","Root","name","minWidth","Toggle","Boolean","offLabel","onLabel","onChange","e","target","length","LocaleTable","EmptyStateLayout","icon","EmptyDocuments","width","undefined","height","content","action","ProtectedSettingsPage","Protect","permissions","read"],"mappings":";;;;;;;;;;;;;;;AAgCA,MAAMA,wBAAwB,CAAC,EAC7BC,QAAQ,EACRC,KAAK,EAIN,GAAA;AACC,IAAA,MAAM,EAAEC,uBAAAA,EAAyBC,cAAc,EAAE,GAAGC,kBAAAA,EAAAA;AAEpD,IAAA,IAAIH,KAAO,EAAA;AACT,QAAA,qBACEI,GAACC,CAAAA,OAAAA,EAAAA;AAAQC,YAAAA,KAAA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,CAAA;AACA2C,wCAAAA,OAAAA,EAAS5E,aAAc,CAAA;4CACrB8B,EAAI,EAAA,6CAAA;4CACJG,cAAgB,EAAA;AAClB,yCAAA,CAAA;AACA4C,wCAAAA,QAAAA,EAAU,CAACC,CAAMtD,GAAAA,kBAAAA,CAAmBsD,CAAEC,CAAAA,MAAM,CAACtD,OAAO;;;;;;oBAM7DpB,OAAQ2E,CAAAA,MAAM,GAAG,CAAA,iBAChBtF,GAACuF,CAAAA,WAAAA,EAAAA;wBAAY5E,OAASA,EAAAA,OAAAA;wBAASQ,SAAWA,EAAAA,SAAAA;wBAAWF,SAAWA,EAAAA;uCAEhEjB,GAACwF,CAAAA,gBAAAA,EAAAA;AACCC,wBAAAA,IAAAA,gBAAMzF,GAAC0F,CAAAA,cAAAA,EAAAA;4BAAeC,KAAOC,EAAAA,SAAAA;4BAAWC,MAAQD,EAAAA;;AAChDE,wBAAAA,OAAAA,EAASxF,aAAc,CAAA;AACrB8B,4BAAAA,EAAAA,EAAIkB,cAAe,CAAA,2BAAA,CAAA;4BACnBf,cAAgB,EAAA;AAClB,yBAAA,CAAA;AACAwD,wBAAAA,MAAAA,gBAAQ/F,GAACmD,CAAAA,YAAAA,EAAAA;AAAaC,4BAAAA,QAAAA,EAAU,CAAClC,SAAAA;4BAAWqD,OAAQ,EAAA;;;;;;;AAMhE;AAEA,MAAMyB,qBAAwB,GAAA,IAAA;IAC5B,qBACEhG,GAAA,CAACwC,KAAKyD,OAAO,EAAA;AAACC,QAAAA,WAAAA,EAAa7E,YAAY8E,IAAI;AACzC,QAAA,QAAA,gBAAAnG,GAACK,CAAAA,YAAAA,EAAAA,EAAAA;;AAGP;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var api = require('./api.js');
|
|
4
|
+
|
|
5
|
+
// Import the same constant used by the documents service for consistency
|
|
6
|
+
const SINGLE_TYPES = 'single-types';
|
|
7
|
+
const aiLocalizationJobsApi = api.i18nApi.injectEndpoints({
|
|
8
|
+
endpoints: (builder)=>({
|
|
9
|
+
getAILocalizationJobsByDocument: builder.query({
|
|
10
|
+
query: ({ documentId, collectionType, model })=>({
|
|
11
|
+
url: collectionType === SINGLE_TYPES ? `/i18n/ai-localization-jobs/single-types/${model}` : `/i18n/ai-localization-jobs/collection-types/${model}/${documentId}`,
|
|
12
|
+
method: 'GET'
|
|
13
|
+
}),
|
|
14
|
+
providesTags: (result, error, { documentId, model, collectionType })=>[
|
|
15
|
+
{
|
|
16
|
+
type: 'AILocalizationJobs',
|
|
17
|
+
id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
})
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
const { useGetAILocalizationJobsByDocumentQuery } = aiLocalizationJobsApi;
|
|
24
|
+
|
|
25
|
+
exports.useGetAILocalizationJobsByDocumentQuery = useGetAILocalizationJobsByDocumentQuery;
|
|
26
|
+
//# sourceMappingURL=aiLocalizationJobs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aiLocalizationJobs.js","sources":["../../../admin/src/services/aiLocalizationJobs.ts"],"sourcesContent":["import { i18nApi } from './api';\n\nimport type { GetAILocalizationJobsByDocument } from '../../../shared/contracts/ai-localization-jobs';\n\n// Import the same constant used by the documents service for consistency\nconst SINGLE_TYPES = 'single-types';\n\nconst aiLocalizationJobsApi = i18nApi.injectEndpoints({\n endpoints: (builder) => ({\n getAILocalizationJobsByDocument: builder.query<\n GetAILocalizationJobsByDocument.Response,\n {\n documentId: string;\n model: string;\n collectionType: string;\n }\n >({\n query: ({ documentId, collectionType, model }) => ({\n url:\n collectionType === SINGLE_TYPES\n ? `/i18n/ai-localization-jobs/single-types/${model}`\n : `/i18n/ai-localization-jobs/collection-types/${model}/${documentId}`,\n method: 'GET',\n }),\n providesTags: (result, error, { documentId, model, collectionType }) => [\n {\n type: 'AILocalizationJobs',\n id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model,\n },\n ],\n }),\n }),\n});\n\nexport const { useGetAILocalizationJobsByDocumentQuery } = aiLocalizationJobsApi;\n"],"names":["SINGLE_TYPES","aiLocalizationJobsApi","i18nApi","injectEndpoints","endpoints","builder","getAILocalizationJobsByDocument","query","documentId","collectionType","model","url","method","providesTags","result","error","type","id","useGetAILocalizationJobsByDocumentQuery"],"mappings":";;;;AAIA;AACA,MAAMA,YAAe,GAAA,cAAA;AAErB,MAAMC,qBAAAA,GAAwBC,WAAQC,CAAAA,eAAe,CAAC;IACpDC,SAAW,EAAA,CAACC,WAAa;YACvBC,+BAAiCD,EAAAA,OAAAA,CAAQE,KAAK,CAO5C;gBACAA,KAAO,EAAA,CAAC,EAAEC,UAAU,EAAEC,cAAc,EAAEC,KAAK,EAAE,IAAM;AACjDC,wBAAAA,GAAAA,EACEF,cAAmBT,KAAAA,YAAAA,GACf,CAAC,wCAAwC,EAAEU,KAAAA,CAAAA,CAAO,GAClD,CAAC,4CAA4C,EAAEA,KAAM,CAAA,CAAC,EAAEF,UAAY,CAAA,CAAA;wBAC1EI,MAAQ,EAAA;qBACV,CAAA;gBACAC,YAAc,EAAA,CAACC,MAAQC,EAAAA,KAAAA,EAAO,EAAEP,UAAU,EAAEE,KAAK,EAAED,cAAc,EAAE,GAAK;AACtE,wBAAA;4BACEO,IAAM,EAAA,oBAAA;AACNC,4BAAAA,EAAAA,EAAIR,mBAAmBT,YAAe,GAAA,CAAA,EAAGU,MAAM,CAAC,EAAEF,YAAY,GAAGE;AACnE;AACD;AACH,aAAA;SACF;AACF,CAAA,CAAA;AAEa,MAAA,EAAEQ,uCAAuC,EAAE,GAAGjB;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { i18nApi } from './api.mjs';
|
|
2
|
+
|
|
3
|
+
// Import the same constant used by the documents service for consistency
|
|
4
|
+
const SINGLE_TYPES = 'single-types';
|
|
5
|
+
const aiLocalizationJobsApi = i18nApi.injectEndpoints({
|
|
6
|
+
endpoints: (builder)=>({
|
|
7
|
+
getAILocalizationJobsByDocument: builder.query({
|
|
8
|
+
query: ({ documentId, collectionType, model })=>({
|
|
9
|
+
url: collectionType === SINGLE_TYPES ? `/i18n/ai-localization-jobs/single-types/${model}` : `/i18n/ai-localization-jobs/collection-types/${model}/${documentId}`,
|
|
10
|
+
method: 'GET'
|
|
11
|
+
}),
|
|
12
|
+
providesTags: (result, error, { documentId, model, collectionType })=>[
|
|
13
|
+
{
|
|
14
|
+
type: 'AILocalizationJobs',
|
|
15
|
+
id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
})
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
const { useGetAILocalizationJobsByDocumentQuery } = aiLocalizationJobsApi;
|
|
22
|
+
|
|
23
|
+
export { useGetAILocalizationJobsByDocumentQuery };
|
|
24
|
+
//# sourceMappingURL=aiLocalizationJobs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aiLocalizationJobs.mjs","sources":["../../../admin/src/services/aiLocalizationJobs.ts"],"sourcesContent":["import { i18nApi } from './api';\n\nimport type { GetAILocalizationJobsByDocument } from '../../../shared/contracts/ai-localization-jobs';\n\n// Import the same constant used by the documents service for consistency\nconst SINGLE_TYPES = 'single-types';\n\nconst aiLocalizationJobsApi = i18nApi.injectEndpoints({\n endpoints: (builder) => ({\n getAILocalizationJobsByDocument: builder.query<\n GetAILocalizationJobsByDocument.Response,\n {\n documentId: string;\n model: string;\n collectionType: string;\n }\n >({\n query: ({ documentId, collectionType, model }) => ({\n url:\n collectionType === SINGLE_TYPES\n ? `/i18n/ai-localization-jobs/single-types/${model}`\n : `/i18n/ai-localization-jobs/collection-types/${model}/${documentId}`,\n method: 'GET',\n }),\n providesTags: (result, error, { documentId, model, collectionType }) => [\n {\n type: 'AILocalizationJobs',\n id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model,\n },\n ],\n }),\n }),\n});\n\nexport const { useGetAILocalizationJobsByDocumentQuery } = aiLocalizationJobsApi;\n"],"names":["SINGLE_TYPES","aiLocalizationJobsApi","i18nApi","injectEndpoints","endpoints","builder","getAILocalizationJobsByDocument","query","documentId","collectionType","model","url","method","providesTags","result","error","type","id","useGetAILocalizationJobsByDocumentQuery"],"mappings":";;AAIA;AACA,MAAMA,YAAe,GAAA,cAAA;AAErB,MAAMC,qBAAAA,GAAwBC,OAAQC,CAAAA,eAAe,CAAC;IACpDC,SAAW,EAAA,CAACC,WAAa;YACvBC,+BAAiCD,EAAAA,OAAAA,CAAQE,KAAK,CAO5C;gBACAA,KAAO,EAAA,CAAC,EAAEC,UAAU,EAAEC,cAAc,EAAEC,KAAK,EAAE,IAAM;AACjDC,wBAAAA,GAAAA,EACEF,cAAmBT,KAAAA,YAAAA,GACf,CAAC,wCAAwC,EAAEU,KAAAA,CAAAA,CAAO,GAClD,CAAC,4CAA4C,EAAEA,KAAM,CAAA,CAAC,EAAEF,UAAY,CAAA,CAAA;wBAC1EI,MAAQ,EAAA;qBACV,CAAA;gBACAC,YAAc,EAAA,CAACC,MAAQC,EAAAA,KAAAA,EAAO,EAAEP,UAAU,EAAEE,KAAK,EAAED,cAAc,EAAE,GAAK;AACtE,wBAAA;4BACEO,IAAM,EAAA,oBAAA;AACNC,4BAAAA,EAAAA,EAAIR,mBAAmBT,YAAe,GAAA,CAAA,EAAGU,MAAM,CAAC,EAAEF,YAAY,GAAGE;AACnE;AACD;AACH,aAAA;SACF;AACF,CAAA,CAAA;AAEa,MAAA,EAAEQ,uCAAuC,EAAE,GAAGjB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sources":["../../../admin/src/services/api.ts"],"sourcesContent":["import { adminApi } from '@strapi/admin/strapi-admin';\n\nconst i18nApi = adminApi.enhanceEndpoints({\n addTagTypes: ['Locale', 'KeyStatistics'],\n});\n\nexport { i18nApi };\n"],"names":["i18nApi","adminApi","enhanceEndpoints","addTagTypes"],"mappings":";;;;AAEMA,MAAAA,OAAAA,GAAUC,oBAASC,CAAAA,gBAAgB,CAAC;IACxCC,WAAa,EAAA;AAAC,QAAA,QAAA;AAAU,QAAA;
|
|
1
|
+
{"version":3,"file":"api.js","sources":["../../../admin/src/services/api.ts"],"sourcesContent":["import { adminApi } from '@strapi/admin/strapi-admin';\n\nconst i18nApi = adminApi.enhanceEndpoints({\n addTagTypes: ['Locale', 'KeyStatistics', 'Settings', 'AILocalizationJobs'],\n});\n\nexport { i18nApi };\n"],"names":["i18nApi","adminApi","enhanceEndpoints","addTagTypes"],"mappings":";;;;AAEMA,MAAAA,OAAAA,GAAUC,oBAASC,CAAAA,gBAAgB,CAAC;IACxCC,WAAa,EAAA;AAAC,QAAA,QAAA;AAAU,QAAA,eAAA;AAAiB,QAAA,UAAA;AAAY,QAAA;AAAqB;AAC5E,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.mjs","sources":["../../../admin/src/services/api.ts"],"sourcesContent":["import { adminApi } from '@strapi/admin/strapi-admin';\n\nconst i18nApi = adminApi.enhanceEndpoints({\n addTagTypes: ['Locale', 'KeyStatistics'],\n});\n\nexport { i18nApi };\n"],"names":["i18nApi","adminApi","enhanceEndpoints","addTagTypes"],"mappings":";;AAEMA,MAAAA,OAAAA,GAAUC,QAASC,CAAAA,gBAAgB,CAAC;IACxCC,WAAa,EAAA;AAAC,QAAA,QAAA;AAAU,QAAA;
|
|
1
|
+
{"version":3,"file":"api.mjs","sources":["../../../admin/src/services/api.ts"],"sourcesContent":["import { adminApi } from '@strapi/admin/strapi-admin';\n\nconst i18nApi = adminApi.enhanceEndpoints({\n addTagTypes: ['Locale', 'KeyStatistics', 'Settings', 'AILocalizationJobs'],\n});\n\nexport { i18nApi };\n"],"names":["i18nApi","adminApi","enhanceEndpoints","addTagTypes"],"mappings":";;AAEMA,MAAAA,OAAAA,GAAUC,QAASC,CAAAA,gBAAgB,CAAC;IACxCC,WAAa,EAAA;AAAC,QAAA,QAAA;AAAU,QAAA,eAAA;AAAiB,QAAA,UAAA;AAAY,QAAA;AAAqB;AAC5E,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.js","sources":["../../../admin/src/services/locales.ts"],"sourcesContent":["import { i18nApi } from './api';\n\nimport type { GetISOLocales } from '../../../shared/contracts/iso-locales';\nimport type {\n GetLocales,\n CreateLocale,\n DeleteLocale,\n UpdateLocale,\n} from '../../../shared/contracts/locales';\n\nconst localesApi = i18nApi.injectEndpoints({\n endpoints: (builder) => ({\n createLocale: builder.mutation<CreateLocale.Response, CreateLocale.Request['body']>({\n query: (data) => ({\n url: '/i18n/locales',\n method: 'POST',\n data,\n }),\n invalidatesTags: [{ type: 'Locale', id: 'LIST' }, 'HomepageKeyStatistics'],\n }),\n deleteLocale: builder.mutation<DeleteLocale.Response, DeleteLocale.Params['id']>({\n query: (id) => ({\n url: `/i18n/locales/${id}`,\n method: 'DELETE',\n }),\n invalidatesTags: (result, error, id) => [{ type: 'Locale', id }, 'HomepageKeyStatistics'],\n }),\n getLocales: builder.query<GetLocales.Response, void>({\n query: () => '/i18n/locales',\n providesTags: (res) => [\n { type: 'Locale', id: 'LIST' },\n ...(Array.isArray(res)\n ? res.map((locale) => ({\n type: 'Locale' as const,\n id: locale.id,\n }))\n : []),\n ],\n }),\n getDefaultLocales: builder.query<GetISOLocales.Response, void>({\n query: () => '/i18n/iso-locales',\n }),\n updateLocale: builder.mutation<\n UpdateLocale.Response,\n UpdateLocale.Request['body'] & UpdateLocale.Params\n >({\n query: ({ id, ...data }) => ({\n url: `/i18n/locales/${id}`,\n method: 'PUT',\n data,\n }),\n invalidatesTags: (result, error, { id }) => [{ type: 'Locale', id }],\n }),\n }),\n});\n\nconst {\n useCreateLocaleMutation,\n useDeleteLocaleMutation,\n useGetLocalesQuery,\n useGetDefaultLocalesQuery,\n useUpdateLocaleMutation,\n} = localesApi;\n\nexport {\n useCreateLocaleMutation,\n useDeleteLocaleMutation,\n useGetLocalesQuery,\n useGetDefaultLocalesQuery,\n useUpdateLocaleMutation,\n};\n"],"names":["localesApi","i18nApi","injectEndpoints","endpoints","builder","createLocale","mutation","query","data","url","method","invalidatesTags","type","id","deleteLocale","result","error","getLocales","providesTags","res","Array","isArray","map","locale","getDefaultLocales","updateLocale","useCreateLocaleMutation","useDeleteLocaleMutation","useGetLocalesQuery","useGetDefaultLocalesQuery","useUpdateLocaleMutation"],"mappings":";;;;AAUA,MAAMA,UAAAA,GAAaC,WAAQC,CAAAA,eAAe,CAAC;IACzCC,SAAW,EAAA,CAACC,WAAa;YACvBC,YAAcD,EAAAA,OAAAA,CAAQE,QAAQ,CAAsD;gBAClFC,KAAO,EAAA,CAACC,QAAU;wBAChBC,GAAK,EAAA,eAAA;wBACLC,MAAQ,EAAA,MAAA;AACRF,wBAAAA;qBACF,CAAA;gBACAG,eAAiB,EAAA;AAAC,oBAAA;wBAAEC,IAAM,EAAA,QAAA;wBAAUC,EAAI,EAAA;AAAO,qBAAA;AAAG,oBAAA;AAAwB;AAC5E,aAAA,CAAA;YACAC,YAAcV,EAAAA,OAAAA,CAAQE,QAAQ,CAAmD;gBAC/EC,KAAO,EAAA,CAACM,MAAQ;
|
|
1
|
+
{"version":3,"file":"locales.js","sources":["../../../admin/src/services/locales.ts"],"sourcesContent":["import { i18nApi } from './api';\n\nimport type { GetISOLocales } from '../../../shared/contracts/iso-locales';\nimport type {\n GetLocales,\n CreateLocale,\n DeleteLocale,\n UpdateLocale,\n} from '../../../shared/contracts/locales';\n\nconst localesApi = i18nApi.injectEndpoints({\n endpoints: (builder) => ({\n createLocale: builder.mutation<CreateLocale.Response, CreateLocale.Request['body']>({\n query: (data) => ({\n url: '/i18n/locales',\n method: 'POST',\n data,\n }),\n invalidatesTags: [{ type: 'Locale', id: 'LIST' }, 'HomepageKeyStatistics'],\n }),\n deleteLocale: builder.mutation<DeleteLocale.Response, DeleteLocale.Params['id']>({\n query: (id) => ({\n url: `/i18n/locales/${id}`,\n method: 'DELETE',\n }),\n invalidatesTags: (result, error, id) => [{ type: 'Locale', id }, 'HomepageKeyStatistics'],\n }),\n getLocales: builder.query<GetLocales.Response, void>({\n query: () => '/i18n/locales',\n providesTags: (res) => [\n { type: 'Locale', id: 'LIST' },\n ...(Array.isArray(res)\n ? res.map((locale) => ({\n type: 'Locale' as const,\n id: locale.id,\n }))\n : []),\n ],\n }),\n getDefaultLocales: builder.query<GetISOLocales.Response, void>({\n query: () => '/i18n/iso-locales',\n }),\n updateLocale: builder.mutation<\n UpdateLocale.Response,\n UpdateLocale.Request['body'] & UpdateLocale.Params\n >({\n query: ({ id, ...data }) => ({\n url: `/i18n/locales/${id}`,\n method: 'PUT',\n data,\n }),\n invalidatesTags: (result, error, { id }) => [{ type: 'Locale', id }],\n }),\n }),\n});\n\nconst {\n useCreateLocaleMutation,\n useDeleteLocaleMutation,\n useGetLocalesQuery,\n useGetDefaultLocalesQuery,\n useUpdateLocaleMutation,\n} = localesApi;\n\nexport {\n useCreateLocaleMutation,\n useDeleteLocaleMutation,\n useGetLocalesQuery,\n useGetDefaultLocalesQuery,\n useUpdateLocaleMutation,\n};\n"],"names":["localesApi","i18nApi","injectEndpoints","endpoints","builder","createLocale","mutation","query","data","url","method","invalidatesTags","type","id","deleteLocale","result","error","getLocales","providesTags","res","Array","isArray","map","locale","getDefaultLocales","updateLocale","useCreateLocaleMutation","useDeleteLocaleMutation","useGetLocalesQuery","useGetDefaultLocalesQuery","useUpdateLocaleMutation"],"mappings":";;;;AAUA,MAAMA,UAAAA,GAAaC,WAAQC,CAAAA,eAAe,CAAC;IACzCC,SAAW,EAAA,CAACC,WAAa;YACvBC,YAAcD,EAAAA,OAAAA,CAAQE,QAAQ,CAAsD;gBAClFC,KAAO,EAAA,CAACC,QAAU;wBAChBC,GAAK,EAAA,eAAA;wBACLC,MAAQ,EAAA,MAAA;AACRF,wBAAAA;qB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AAA;qBACF,CAAA;AACAG,gBAAAA,eAAAA,EAAiB,CAACI,MAAQC,EAAAA,KAAAA,EAAO,EAAEH,EAAE,EAAE,GAAK;AAAC,wBAAA;4BAAED,IAAM,EAAA,QAAA;AAAUC,4BAAAA;AAAG;AAAE;AACtE,aAAA;SACF;AACF,CAAA,CAAA;AAEM,MAAA,EACJa,uBAAuB,EACvBC,uBAAuB,EACvBC,kBAAkB,EAClBC,yBAAyB,EACzBC,uBAAuB,EACxB,GAAG9B;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.mjs","sources":["../../../admin/src/services/locales.ts"],"sourcesContent":["import { i18nApi } from './api';\n\nimport type { GetISOLocales } from '../../../shared/contracts/iso-locales';\nimport type {\n GetLocales,\n CreateLocale,\n DeleteLocale,\n UpdateLocale,\n} from '../../../shared/contracts/locales';\n\nconst localesApi = i18nApi.injectEndpoints({\n endpoints: (builder) => ({\n createLocale: builder.mutation<CreateLocale.Response, CreateLocale.Request['body']>({\n query: (data) => ({\n url: '/i18n/locales',\n method: 'POST',\n data,\n }),\n invalidatesTags: [{ type: 'Locale', id: 'LIST' }, 'HomepageKeyStatistics'],\n }),\n deleteLocale: builder.mutation<DeleteLocale.Response, DeleteLocale.Params['id']>({\n query: (id) => ({\n url: `/i18n/locales/${id}`,\n method: 'DELETE',\n }),\n invalidatesTags: (result, error, id) => [{ type: 'Locale', id }, 'HomepageKeyStatistics'],\n }),\n getLocales: builder.query<GetLocales.Response, void>({\n query: () => '/i18n/locales',\n providesTags: (res) => [\n { type: 'Locale', id: 'LIST' },\n ...(Array.isArray(res)\n ? res.map((locale) => ({\n type: 'Locale' as const,\n id: locale.id,\n }))\n : []),\n ],\n }),\n getDefaultLocales: builder.query<GetISOLocales.Response, void>({\n query: () => '/i18n/iso-locales',\n }),\n updateLocale: builder.mutation<\n UpdateLocale.Response,\n UpdateLocale.Request['body'] & UpdateLocale.Params\n >({\n query: ({ id, ...data }) => ({\n url: `/i18n/locales/${id}`,\n method: 'PUT',\n data,\n }),\n invalidatesTags: (result, error, { id }) => [{ type: 'Locale', id }],\n }),\n }),\n});\n\nconst {\n useCreateLocaleMutation,\n useDeleteLocaleMutation,\n useGetLocalesQuery,\n useGetDefaultLocalesQuery,\n useUpdateLocaleMutation,\n} = localesApi;\n\nexport {\n useCreateLocaleMutation,\n useDeleteLocaleMutation,\n useGetLocalesQuery,\n useGetDefaultLocalesQuery,\n useUpdateLocaleMutation,\n};\n"],"names":["localesApi","i18nApi","injectEndpoints","endpoints","builder","createLocale","mutation","query","data","url","method","invalidatesTags","type","id","deleteLocale","result","error","getLocales","providesTags","res","Array","isArray","map","locale","getDefaultLocales","updateLocale","useCreateLocaleMutation","useDeleteLocaleMutation","useGetLocalesQuery","useGetDefaultLocalesQuery","useUpdateLocaleMutation"],"mappings":";;AAUA,MAAMA,UAAAA,GAAaC,OAAQC,CAAAA,eAAe,CAAC;IACzCC,SAAW,EAAA,CAACC,WAAa;YACvBC,YAAcD,EAAAA,OAAAA,CAAQE,QAAQ,CAAsD;gBAClFC,KAAO,EAAA,CAACC,QAAU;wBAChBC,GAAK,EAAA,eAAA;wBACLC,MAAQ,EAAA,MAAA;AACRF,wBAAAA;qBACF,CAAA;gBACAG,eAAiB,EAAA;AAAC,oBAAA;wBAAEC,IAAM,EAAA,QAAA;wBAAUC,EAAI,EAAA;AAAO,qBAAA;AAAG,oBAAA;AAAwB;AAC5E,aAAA,CAAA;YACAC,YAAcV,EAAAA,OAAAA,CAAQE,QAAQ,CAAmD;gBAC/EC,KAAO,EAAA,CAACM,MAAQ;
|
|
1
|
+
{"version":3,"file":"locales.mjs","sources":["../../../admin/src/services/locales.ts"],"sourcesContent":["import { i18nApi } from './api';\n\nimport type { GetISOLocales } from '../../../shared/contracts/iso-locales';\nimport type {\n GetLocales,\n CreateLocale,\n DeleteLocale,\n UpdateLocale,\n} from '../../../shared/contracts/locales';\n\nconst localesApi = i18nApi.injectEndpoints({\n endpoints: (builder) => ({\n createLocale: builder.mutation<CreateLocale.Response, CreateLocale.Request['body']>({\n query: (data) => ({\n url: '/i18n/locales',\n method: 'POST',\n data,\n }),\n invalidatesTags: [{ type: 'Locale', id: 'LIST' }, 'HomepageKeyStatistics'],\n }),\n deleteLocale: builder.mutation<DeleteLocale.Response, DeleteLocale.Params['id']>({\n query: (id) => ({\n url: `/i18n/locales/${id}`,\n method: 'DELETE',\n }),\n invalidatesTags: (result, error, id) => [{ type: 'Locale', id }, 'HomepageKeyStatistics'],\n }),\n getLocales: builder.query<GetLocales.Response, void>({\n query: () => '/i18n/locales',\n providesTags: (res) => [\n { type: 'Locale', id: 'LIST' },\n ...(Array.isArray(res)\n ? res.map((locale) => ({\n type: 'Locale' as const,\n id: locale.id,\n }))\n : []),\n ],\n }),\n getDefaultLocales: builder.query<GetISOLocales.Response, void>({\n query: () => '/i18n/iso-locales',\n }),\n updateLocale: builder.mutation<\n UpdateLocale.Response,\n UpdateLocale.Request['body'] & UpdateLocale.Params\n >({\n query: ({ id, ...data }) => ({\n url: `/i18n/locales/${id}`,\n method: 'PUT',\n data,\n }),\n invalidatesTags: (result, error, { id }) => [{ type: 'Locale', id }],\n }),\n }),\n});\n\nconst {\n useCreateLocaleMutation,\n useDeleteLocaleMutation,\n useGetLocalesQuery,\n useGetDefaultLocalesQuery,\n useUpdateLocaleMutation,\n} = localesApi;\n\nexport {\n useCreateLocaleMutation,\n useDeleteLocaleMutation,\n useGetLocalesQuery,\n useGetDefaultLocalesQuery,\n useUpdateLocaleMutation,\n};\n"],"names":["localesApi","i18nApi","injectEndpoints","endpoints","builder","createLocale","mutation","query","data","url","method","invalidatesTags","type","id","deleteLocale","result","error","getLocales","providesTags","res","Array","isArray","map","locale","getDefaultLocales","updateLocale","useCreateLocaleMutation","useDeleteLocaleMutation","useGetLocalesQuery","useGetDefaultLocalesQuery","useUpdateLocaleMutation"],"mappings":";;AAUA,MAAMA,UAAAA,GAAaC,OAAQC,CAAAA,eAAe,CAAC;IACzCC,S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ACAC,gBAAAA,KAAAA,EAAO,CAAC,EAAEM,EAAE,EAAE,GAAGL,IAAAA,EAAM,IAAM;wBAC3BC,GAAK,EAAA,CAAC,cAAc,EAAEI,EAAI,CAAA,CAAA;wBAC1BH,MAAQ,EAAA,KAAA;AACRF,wBAAAA;qBACF,CAAA;AACAG,gBAAAA,eAAAA,EAAiB,CAACI,MAAQC,EAAAA,KAAAA,EAAO,EAAEH,EAAE,EAAE,GAAK;AAAC,wBAAA;4BAAED,IAAM,EAAA,QAAA;AAAUC,4BAAAA;AAAG;AAAE;AACtE,aAAA;SACF;AACF,CAAA,CAAA;AAEM,MAAA,EACJa,uBAAuB,EACvBC,uBAAuB,EACvBC,kBAAkB,EAClBC,yBAAyB,EACzBC,uBAAuB,EACxB,GAAG9B;;;;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var api = require('./api.js');
|
|
4
|
+
|
|
5
|
+
const settingsApi = api.i18nApi.injectEndpoints({
|
|
6
|
+
endpoints: (builder)=>({
|
|
7
|
+
getSettings: builder.query({
|
|
8
|
+
query: ()=>'/i18n/settings',
|
|
9
|
+
providesTags: [
|
|
10
|
+
'Settings'
|
|
11
|
+
]
|
|
12
|
+
}),
|
|
13
|
+
updatei18nSettings: builder.mutation({
|
|
14
|
+
query: (data)=>({
|
|
15
|
+
url: '/i18n/settings',
|
|
16
|
+
method: 'PUT',
|
|
17
|
+
data
|
|
18
|
+
}),
|
|
19
|
+
invalidatesTags: [
|
|
20
|
+
'Settings',
|
|
21
|
+
'AIFeatureConfig'
|
|
22
|
+
]
|
|
23
|
+
})
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
const { useGetSettingsQuery, useUpdatei18nSettingsMutation } = settingsApi;
|
|
27
|
+
|
|
28
|
+
exports.useGetSettingsQuery = useGetSettingsQuery;
|
|
29
|
+
exports.useUpdatei18nSettingsMutation = useUpdatei18nSettingsMutation;
|
|
30
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sources":["../../../admin/src/services/settings.ts"],"sourcesContent":["import { i18nApi } from './api';\n\nimport type { GetSettings, UpdateSettings } from '../../../shared/contracts/settings';\n\nconst settingsApi = i18nApi.injectEndpoints({\n endpoints: (builder) => ({\n getSettings: builder.query<GetSettings.Response['data'], void>({\n query: () => '/i18n/settings',\n providesTags: ['Settings'],\n }),\n updatei18nSettings: builder.mutation<UpdateSettings.Response, UpdateSettings.Request['body']>({\n query: (data) => ({\n url: '/i18n/settings',\n method: 'PUT',\n data,\n }),\n invalidatesTags: ['Settings', 'AIFeatureConfig'],\n }),\n }),\n});\n\nconst { useGetSettingsQuery, useUpdatei18nSettingsMutation } = settingsApi;\n\nexport { useGetSettingsQuery, useUpdatei18nSettingsMutation };\n"],"names":["settingsApi","i18nApi","injectEndpoints","endpoints","builder","getSettings","query","providesTags","updatei18nSettings","mutation","data","url","method","invalidatesTags","useGetSettingsQuery","useUpdatei18nSettingsMutation"],"mappings":";;;;AAIA,MAAMA,WAAAA,GAAcC,WAAQC,CAAAA,eAAe,CAAC;IAC1CC,SAAW,EAAA,CAACC,WAAa;YACvBC,WAAaD,EAAAA,OAAAA,CAAQE,KAAK,CAAqC;AAC7DA,gBAAAA,KAAAA,EAAO,IAAM,gBAAA;gBACbC,YAAc,EAAA;AAAC,oBAAA;AAAW;AAC5B,aAAA,CAAA;YACAC,kBAAoBJ,EAAAA,OAAAA,CAAQK,QAAQ,CAA0D;gBAC5FH,KAAO,EAAA,CAACI,QAAU;wBAChBC,GAAK,EAAA,gBAAA;wBACLC,MAAQ,EAAA,KAAA;AACRF,wBAAAA;qBACF,CAAA;gBACAG,eAAiB,EAAA;AAAC,oBAAA,UAAA;AAAY,oBAAA;AAAkB;AAClD,aAAA;SACF;AACF,CAAA,CAAA;AAEA,MAAM,EAAEC,mBAAmB,EAAEC,6BAA6B,EAAE,GAAGf;;;;;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { i18nApi } from './api.mjs';
|
|
2
|
+
|
|
3
|
+
const settingsApi = i18nApi.injectEndpoints({
|
|
4
|
+
endpoints: (builder)=>({
|
|
5
|
+
getSettings: builder.query({
|
|
6
|
+
query: ()=>'/i18n/settings',
|
|
7
|
+
providesTags: [
|
|
8
|
+
'Settings'
|
|
9
|
+
]
|
|
10
|
+
}),
|
|
11
|
+
updatei18nSettings: builder.mutation({
|
|
12
|
+
query: (data)=>({
|
|
13
|
+
url: '/i18n/settings',
|
|
14
|
+
method: 'PUT',
|
|
15
|
+
data
|
|
16
|
+
}),
|
|
17
|
+
invalidatesTags: [
|
|
18
|
+
'Settings',
|
|
19
|
+
'AIFeatureConfig'
|
|
20
|
+
]
|
|
21
|
+
})
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
const { useGetSettingsQuery, useUpdatei18nSettingsMutation } = settingsApi;
|
|
25
|
+
|
|
26
|
+
export { useGetSettingsQuery, useUpdatei18nSettingsMutation };
|
|
27
|
+
//# sourceMappingURL=settings.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.mjs","sources":["../../../admin/src/services/settings.ts"],"sourcesContent":["import { i18nApi } from './api';\n\nimport type { GetSettings, UpdateSettings } from '../../../shared/contracts/settings';\n\nconst settingsApi = i18nApi.injectEndpoints({\n endpoints: (builder) => ({\n getSettings: builder.query<GetSettings.Response['data'], void>({\n query: () => '/i18n/settings',\n providesTags: ['Settings'],\n }),\n updatei18nSettings: builder.mutation<UpdateSettings.Response, UpdateSettings.Request['body']>({\n query: (data) => ({\n url: '/i18n/settings',\n method: 'PUT',\n data,\n }),\n invalidatesTags: ['Settings', 'AIFeatureConfig'],\n }),\n }),\n});\n\nconst { useGetSettingsQuery, useUpdatei18nSettingsMutation } = settingsApi;\n\nexport { useGetSettingsQuery, useUpdatei18nSettingsMutation };\n"],"names":["settingsApi","i18nApi","injectEndpoints","endpoints","builder","getSettings","query","providesTags","updatei18nSettings","mutation","data","url","method","invalidatesTags","useGetSettingsQuery","useUpdatei18nSettingsMutation"],"mappings":";;AAIA,MAAMA,WAAAA,GAAcC,OAAQC,CAAAA,eAAe,CAAC;IAC1CC,SAAW,EAAA,CAACC,WAAa;YACvBC,WAAaD,EAAAA,OAAAA,CAAQE,KAAK,CAAqC;AAC7DA,gBAAAA,KAAAA,EAAO,IAAM,gBAAA;gBACbC,YAAc,EAAA;AAAC,oBAAA;AAAW;AAC5B,aAAA,CAAA;YACAC,kBAAoBJ,EAAAA,OAAAA,CAAQK,QAAQ,CAA0D;gBAC5FH,KAAO,EAAA,CAACI,QAAU;wBAChBC,GAAK,EAAA,gBAAA;wBACLC,MAAQ,EAAA,KAAA;AACRF,wBAAAA;qBACF,CAAA;gBACAG,eAAiB,EAAA;AAAC,oBAAA,UAAA;AAAY,oBAAA;AAAkB;AAClD,aAAA;SACF;AACF,CAAA,CAAA;AAEA,MAAM,EAAEC,mBAAmB,EAAEC,6BAA6B,EAAE,GAAGf;;;;"}
|
|
@@ -3,16 +3,29 @@ import type { Locale } from '../../../shared/contracts/locales';
|
|
|
3
3
|
import type { Modules } from '@strapi/types';
|
|
4
4
|
declare const LocalePickerAction: ({ document, meta, model, collectionType, documentId, }: HeaderActionProps) => {
|
|
5
5
|
label: string;
|
|
6
|
-
options: {
|
|
6
|
+
options: ({
|
|
7
|
+
_render: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
disabled?: undefined;
|
|
9
|
+
value?: undefined;
|
|
10
|
+
label?: undefined;
|
|
11
|
+
startIcon?: undefined;
|
|
12
|
+
} | {
|
|
7
13
|
disabled: boolean;
|
|
8
14
|
value: string;
|
|
9
15
|
label: import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
startIcon: import("react/jsx-runtime").JSX.Element
|
|
11
|
-
|
|
16
|
+
startIcon: import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
_render?: undefined;
|
|
18
|
+
})[];
|
|
12
19
|
customizeContent: () => string | undefined;
|
|
13
20
|
onSelect: (value: string) => void;
|
|
14
21
|
value: Locale | undefined;
|
|
15
22
|
} | null;
|
|
23
|
+
declare const AITranslationStatusAction: ({ documentId, model, collectionType }: HeaderActionProps) => {
|
|
24
|
+
_status: {
|
|
25
|
+
message: import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
tooltip: import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
};
|
|
28
|
+
} | null;
|
|
16
29
|
declare const FillFromAnotherLocaleAction: ({ documentId, meta, model, collectionType, }: HeaderActionProps) => {
|
|
17
30
|
type: string;
|
|
18
31
|
icon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -33,4 +46,4 @@ export type LocaleStatus = {
|
|
|
33
46
|
};
|
|
34
47
|
declare const BulkLocalePublishAction: DocumentActionComponent;
|
|
35
48
|
declare const BulkLocaleUnpublishAction: DocumentActionComponent;
|
|
36
|
-
export { BulkLocalePublishAction, BulkLocaleUnpublishAction, DeleteLocaleAction, LocalePickerAction, FillFromAnotherLocaleAction, };
|
|
49
|
+
export { BulkLocalePublishAction, BulkLocaleUnpublishAction, DeleteLocaleAction, LocalePickerAction, FillFromAnotherLocaleAction, AITranslationStatusAction, };
|
|
@@ -3,7 +3,8 @@ interface LocaleListCellProps {
|
|
|
3
3
|
locale: string;
|
|
4
4
|
}[];
|
|
5
5
|
locale: string;
|
|
6
|
+
documentId: string;
|
|
6
7
|
}
|
|
7
|
-
declare const LocaleListCell: ({ locale: currentLocale, localizations }: LocaleListCellProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
declare const LocaleListCell: ({ locale: currentLocale, localizations, documentId, }: LocaleListCellProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
9
|
export { LocaleListCell };
|
|
9
10
|
export type { LocaleListCellProps };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface UseAILocalizationJobsPollingOptions {
|
|
2
|
+
documentId?: string;
|
|
3
|
+
model?: string;
|
|
4
|
+
collectionType?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const useAILocalizationJobsPolling: ({ documentId, model, collectionType, }: UseAILocalizationJobsPollingOptions) => {
|
|
7
|
+
status: "processing" | "completed" | "failed" | undefined;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { GetAILocalizationJobsByDocument } from '../../../shared/contracts/ai-localization-jobs';
|
|
2
|
+
export declare const useGetAILocalizationJobsByDocumentQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
3
|
+
documentId: string;
|
|
4
|
+
model: string;
|
|
5
|
+
collectionType: string;
|
|
6
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "AIFeatureConfig" | "Locale" | "KeyStatistics" | "Settings" | "AILocalizationJobs", GetAILocalizationJobsByDocument.Response, "adminApi">>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const i18nApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, import("@reduxjs/toolkit/dist/query/endpointDefinitions").UpdateDefinitions<{}, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "Locale" | "KeyStatistics", never>, "adminApi", "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "Locale" | "KeyStatistics", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/dist/query/react").reactHooksModuleName>;
|
|
1
|
+
declare const i18nApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, import("@reduxjs/toolkit/dist/query/endpointDefinitions").UpdateDefinitions<{}, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "AIFeatureConfig" | "Locale" | "KeyStatistics" | "Settings" | "AILocalizationJobs", never>, "adminApi", "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "AIFeatureConfig" | "Locale" | "KeyStatistics" | "Settings" | "AILocalizationJobs", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/dist/query/react").reactHooksModuleName>;
|
|
2
2
|
export { i18nApi };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { GetISOLocales } from '../../../shared/contracts/iso-locales';
|
|
2
2
|
import type { GetLocales, CreateLocale, DeleteLocale, UpdateLocale } from '../../../shared/contracts/locales';
|
|
3
|
-
declare const useCreateLocaleMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Omit<import("../../../shared/contracts/locales").Locale, keyof import("../../../shared/contracts/shared").Entity>, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "Locale" | "KeyStatistics", CreateLocale.Response, "adminApi">>, useDeleteLocaleMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<import("@strapi/types/dist/data").ID, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "Locale" | "KeyStatistics", DeleteLocale.Response, "adminApi">>, useGetLocalesQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "Locale" | "KeyStatistics", GetLocales.Response, "adminApi">>, useGetDefaultLocalesQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "Locale" | "KeyStatistics", GetISOLocales.Response, "adminApi">>, useUpdateLocaleMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<import("../../../shared/contracts/locales").Locale, "name" | "isDefault"> & UpdateLocale.Params, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "Locale" | "KeyStatistics", UpdateLocale.Response, "adminApi">>;
|
|
3
|
+
declare const useCreateLocaleMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Omit<import("../../../shared/contracts/locales").Locale, keyof import("../../../shared/contracts/shared").Entity>, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "AIFeatureConfig" | "Locale" | "KeyStatistics" | "Settings" | "AILocalizationJobs", CreateLocale.Response, "adminApi">>, useDeleteLocaleMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<import("@strapi/types/dist/data").ID, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "AIFeatureConfig" | "Locale" | "KeyStatistics" | "Settings" | "AILocalizationJobs", DeleteLocale.Response, "adminApi">>, useGetLocalesQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "AIFeatureConfig" | "Locale" | "KeyStatistics" | "Settings" | "AILocalizationJobs", GetLocales.Response, "adminApi">>, useGetDefaultLocalesQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "AIFeatureConfig" | "Locale" | "KeyStatistics" | "Settings" | "AILocalizationJobs", GetISOLocales.Response, "adminApi">>, useUpdateLocaleMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<import("../../../shared/contracts/locales").Locale, "name" | "isDefault"> & UpdateLocale.Params, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "AIFeatureConfig" | "Locale" | "KeyStatistics" | "Settings" | "AILocalizationJobs", UpdateLocale.Response, "adminApi">>;
|
|
4
4
|
export { useCreateLocaleMutation, useDeleteLocaleMutation, useGetLocalesQuery, useGetDefaultLocalesQuery, useUpdateLocaleMutation, };
|
|
@@ -3,5 +3,5 @@ declare const useGetManyDraftRelationCountQuery: import("@reduxjs/toolkit/dist/q
|
|
|
3
3
|
locale?: string | string[] | null | undefined;
|
|
4
4
|
} & {
|
|
5
5
|
model: string;
|
|
6
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "Locale" | "KeyStatistics", number, "adminApi">>;
|
|
6
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "AIFeatureConfig" | "Locale" | "KeyStatistics" | "Settings" | "AILocalizationJobs", number, "adminApi">>;
|
|
7
7
|
export { useGetManyDraftRelationCountQuery };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { UpdateSettings } from '../../../shared/contracts/settings';
|
|
2
|
+
declare const useGetSettingsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "AIFeatureConfig" | "Locale" | "KeyStatistics" | "Settings" | "AILocalizationJobs", import("../../../shared/contracts/settings").Settings, "adminApi">>, useUpdatei18nSettingsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<{
|
|
3
|
+
aiLocalizations?: boolean | undefined;
|
|
4
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "GuidedTourMeta" | "HomepageKeyStatistics" | "AIUsage" | "AIFeatureConfig" | "Locale" | "KeyStatistics" | "Settings" | "AILocalizationJobs", UpdateSettings.Response, "adminApi">>;
|
|
5
|
+
export { useGetSettingsQuery, useUpdatei18nSettingsMutation };
|
|
@@ -20,8 +20,16 @@ var en = {
|
|
|
20
20
|
"CMEditViewBulkLocale.publication-status": "Publication Status",
|
|
21
21
|
"CMEditViewBulkLocale.draft-relation-warning": "Some locales are related to draft entries. Publishing them could leave broken links in your app.",
|
|
22
22
|
"CMEditViewBulkLocale.continue-confirmation": "Are you sure you want to continue?",
|
|
23
|
+
"CMEditViewAITranslation.status-aria-label": "AI Translation Status",
|
|
24
|
+
"CMEditViewAITranslation.status-title": "{enabled, select, true {AI translation enabled} false {AI translation disabled} other {AI translation disabled}}",
|
|
25
|
+
"CMEditViewAITranslation.status-description": "Our AI translates content in all locales each time you save a modification in the default locale.",
|
|
26
|
+
"CMEditViewAITranslation.settings-link": "{enabled, select, true {Disable it in settings} false {Enable it in settings} other {Enable it in settings}}",
|
|
27
|
+
"CMEditViewAITranslation.job-completed": "AI translation completed successfully!",
|
|
28
|
+
"CMEditViewAITranslation.job-failed": "AI translation failed. Please try again.",
|
|
23
29
|
"CMEditViewLocalePicker.locale.create": "Create <bold>{locale}</bold> locale",
|
|
30
|
+
"CMEditViewLocalePicker.locale.ai-translations": "AI Translations:",
|
|
24
31
|
"CMListView.popover.display-locales.label": "Display translated locales",
|
|
32
|
+
"CMListView.popover.display-locales.more": "{locales} + {count} more",
|
|
25
33
|
"CheckboxConfirmation.Modal.body": "Do you want to disable it?",
|
|
26
34
|
"CheckboxConfirmation.Modal.button-confirm": "Yes, disable",
|
|
27
35
|
"CheckboxConfirmation.Modal.content": "Disabling localization will engender the deletion of all your content but the one associated to your default locale (if existing).",
|
|
@@ -36,6 +44,8 @@ var en = {
|
|
|
36
44
|
"Settings.list.description": "Configure the settings for the Internationalization plugin",
|
|
37
45
|
"Settings.list.empty.description": "This is not a usual behavior, meaning that you have eventually modified the database manually. Make sure to have at least one locale saved in your database in order to be able to use Strapi correctly.",
|
|
38
46
|
"Settings.list.empty.title": "There are no locales.",
|
|
47
|
+
"Settings.aiLocalizations.label": "AI Translations",
|
|
48
|
+
"Settings.aiLocalizations.description": "Everytime you save in the Content Manager, our AI will use your default locale to translate all other locales automatically.",
|
|
39
49
|
"Settings.locales.default": "Default",
|
|
40
50
|
"Settings.locales.list.sort.default": "Sort by the default locale",
|
|
41
51
|
"Settings.locales.list.sort.displayName": "Sort by display name",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -18,8 +18,16 @@ var en = {
|
|
|
18
18
|
"CMEditViewBulkLocale.publication-status": "Publication Status",
|
|
19
19
|
"CMEditViewBulkLocale.draft-relation-warning": "Some locales are related to draft entries. Publishing them could leave broken links in your app.",
|
|
20
20
|
"CMEditViewBulkLocale.continue-confirmation": "Are you sure you want to continue?",
|
|
21
|
+
"CMEditViewAITranslation.status-aria-label": "AI Translation Status",
|
|
22
|
+
"CMEditViewAITranslation.status-title": "{enabled, select, true {AI translation enabled} false {AI translation disabled} other {AI translation disabled}}",
|
|
23
|
+
"CMEditViewAITranslation.status-description": "Our AI translates content in all locales each time you save a modification in the default locale.",
|
|
24
|
+
"CMEditViewAITranslation.settings-link": "{enabled, select, true {Disable it in settings} false {Enable it in settings} other {Enable it in settings}}",
|
|
25
|
+
"CMEditViewAITranslation.job-completed": "AI translation completed successfully!",
|
|
26
|
+
"CMEditViewAITranslation.job-failed": "AI translation failed. Please try again.",
|
|
21
27
|
"CMEditViewLocalePicker.locale.create": "Create <bold>{locale}</bold> locale",
|
|
28
|
+
"CMEditViewLocalePicker.locale.ai-translations": "AI Translations:",
|
|
22
29
|
"CMListView.popover.display-locales.label": "Display translated locales",
|
|
30
|
+
"CMListView.popover.display-locales.more": "{locales} + {count} more",
|
|
23
31
|
"CheckboxConfirmation.Modal.body": "Do you want to disable it?",
|
|
24
32
|
"CheckboxConfirmation.Modal.button-confirm": "Yes, disable",
|
|
25
33
|
"CheckboxConfirmation.Modal.content": "Disabling localization will engender the deletion of all your content but the one associated to your default locale (if existing).",
|
|
@@ -34,6 +42,8 @@ var en = {
|
|
|
34
42
|
"Settings.list.description": "Configure the settings for the Internationalization plugin",
|
|
35
43
|
"Settings.list.empty.description": "This is not a usual behavior, meaning that you have eventually modified the database manually. Make sure to have at least one locale saved in your database in order to be able to use Strapi correctly.",
|
|
36
44
|
"Settings.list.empty.title": "There are no locales.",
|
|
45
|
+
"Settings.aiLocalizations.label": "AI Translations",
|
|
46
|
+
"Settings.aiLocalizations.description": "Everytime you save in the Content Manager, our AI will use your default locale to translate all other locales automatically.",
|
|
37
47
|
"Settings.locales.default": "Default",
|
|
38
48
|
"Settings.locales.list.sort.default": "Sort by the default locale",
|
|
39
49
|
"Settings.locales.list.sort.displayName": "Sort by display name",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -55,8 +55,8 @@ const recursiveRemoveFieldTypes = (data, schema, components, fields)=>{
|
|
|
55
55
|
__temp_key__: index + 1
|
|
56
56
|
};
|
|
57
57
|
});
|
|
58
|
-
} else {
|
|
59
|
-
const { id: _, ...rest } = recursiveRemoveFieldTypes(data[current]
|
|
58
|
+
} else if (data[current]) {
|
|
59
|
+
const { id: _, ...rest } = recursiveRemoveFieldTypes(data[current], components[component], components, fields);
|
|
60
60
|
acc[current] = rest;
|
|
61
61
|
}
|
|
62
62
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean.js","sources":["../../../admin/src/utils/clean.ts"],"sourcesContent":["import type { Schema } from '@strapi/types';\n\ntype Data = Record<keyof Schema.ContentType['attributes'], any>;\n\nconst cleanData = (\n data: Data,\n schema: Schema.ContentType,\n components: Record<string, Schema.Component>\n) => {\n const cleanedData = removeFields(data, [\n 'createdAt',\n 'createdBy',\n 'updatedAt',\n 'updatedBy',\n 'id',\n 'documentId',\n 'publishedAt',\n 'strapi_stage',\n 'strapi_assignee',\n 'locale',\n 'status',\n ]);\n\n const cleanedDataWithoutPasswordAndRelation = recursiveRemoveFieldTypes(\n cleanedData,\n schema,\n components,\n ['relation', 'password']\n );\n\n return cleanedDataWithoutPasswordAndRelation;\n};\n\nconst removeFields = (data: Data, fields: Array<keyof Schema.ContentType['attributes']>) => {\n return Object.keys(data).reduce((acc, current) => {\n if (fields.includes(current)) {\n return acc;\n }\n acc[current] = data[current];\n return acc;\n }, {} as Data);\n};\n\nconst recursiveRemoveFieldTypes = (\n data: Data,\n schema: Schema.Schema,\n components: Record<string, Schema.Component>,\n fields: Array<keyof Schema.ContentType['attributes']>\n) => {\n return Object.keys(data).reduce((acc, current) => {\n const attribute = schema.attributes[current] ?? { type: undefined };\n\n if (fields.includes(attribute.type)) {\n return acc;\n }\n\n if (attribute.type === 'dynamiczone') {\n acc[current] = data[current].map((componentValue: any, index: number) => {\n const { id: _, ...rest } = recursiveRemoveFieldTypes(\n componentValue,\n components[componentValue.__component],\n components,\n fields\n );\n\n return {\n ...rest,\n __temp_key__: index + 1,\n };\n });\n } else if (attribute.type === 'component') {\n const { repeatable, component } = attribute;\n\n if (repeatable) {\n acc[current] = (data[current] ?? []).map((compoData: any, index: number) => {\n const { id: _, ...rest } = recursiveRemoveFieldTypes(\n compoData,\n components[component],\n components,\n fields\n );\n\n return {\n ...rest,\n __temp_key__: index + 1,\n };\n });\n } else {\n const { id: _, ...rest } = recursiveRemoveFieldTypes(\n data[current]
|
|
1
|
+
{"version":3,"file":"clean.js","sources":["../../../admin/src/utils/clean.ts"],"sourcesContent":["import type { Schema } from '@strapi/types';\n\ntype Data = Record<keyof Schema.ContentType['attributes'], any>;\n\nconst cleanData = (\n data: Data,\n schema: Schema.ContentType,\n components: Record<string, Schema.Component>\n) => {\n const cleanedData = removeFields(data, [\n 'createdAt',\n 'createdBy',\n 'updatedAt',\n 'updatedBy',\n 'id',\n 'documentId',\n 'publishedAt',\n 'strapi_stage',\n 'strapi_assignee',\n 'locale',\n 'status',\n ]);\n\n const cleanedDataWithoutPasswordAndRelation = recursiveRemoveFieldTypes(\n cleanedData,\n schema,\n components,\n ['relation', 'password']\n );\n\n return cleanedDataWithoutPasswordAndRelation;\n};\n\nconst removeFields = (data: Data, fields: Array<keyof Schema.ContentType['attributes']>) => {\n return Object.keys(data).reduce((acc, current) => {\n if (fields.includes(current)) {\n return acc;\n }\n acc[current] = data[current];\n return acc;\n }, {} as Data);\n};\n\nconst recursiveRemoveFieldTypes = (\n data: Data,\n schema: Schema.Schema,\n components: Record<string, Schema.Component>,\n fields: Array<keyof Schema.ContentType['attributes']>\n) => {\n return Object.keys(data).reduce((acc, current) => {\n const attribute = schema.attributes[current] ?? { type: undefined };\n\n if (fields.includes(attribute.type)) {\n return acc;\n }\n\n if (attribute.type === 'dynamiczone') {\n acc[current] = data[current].map((componentValue: any, index: number) => {\n const { id: _, ...rest } = recursiveRemoveFieldTypes(\n componentValue,\n components[componentValue.__component],\n components,\n fields\n );\n\n return {\n ...rest,\n __temp_key__: index + 1,\n };\n });\n } else if (attribute.type === 'component') {\n const { repeatable, component } = attribute;\n\n if (repeatable) {\n acc[current] = (data[current] ?? []).map((compoData: any, index: number) => {\n const { id: _, ...rest } = recursiveRemoveFieldTypes(\n compoData,\n components[component],\n components,\n fields\n );\n\n return {\n ...rest,\n __temp_key__: index + 1,\n };\n });\n } else if (data[current]) {\n const { id: _, ...rest } = recursiveRemoveFieldTypes(\n data[current],\n components[component],\n components,\n fields\n );\n\n acc[current] = rest;\n }\n } else {\n acc[current] = data[current];\n }\n\n return acc;\n }, {} as any);\n};\n\nexport { cleanData };\n"],"names":["cleanData","data","schema","components","cleanedData","removeFields","cleanedDataWithoutPasswordAndRelation","recursiveRemoveFieldTypes","fields","Object","keys","reduce","acc","current","includes","attribute","attributes","type","undefined","map","componentValue","index","id","_","rest","__component","__temp_key__","repeatable","component","compoData"],"mappings":";;AAIMA,MAAAA,SAAAA,GAAY,CAChBC,IAAAA,EACAC,MACAC,EAAAA,UAAAA,GAAAA;IAEA,MAAMC,WAAAA,GAAcC,aAAaJ,IAAM,EAAA;AACrC,QAAA,WAAA;AACA,QAAA,WAAA;AACA,QAAA,WAAA;AACA,QAAA,WAAA;AACA,QAAA,IAAA;AACA,QAAA,YAAA;AACA,QAAA,aAAA;AACA,QAAA,cAAA;AACA,QAAA,iBAAA;AACA,QAAA,QAAA;AACA,QAAA;AACD,KAAA,CAAA;AAED,IAAA,MAAMK,qCAAwCC,GAAAA,yBAAAA,CAC5CH,WACAF,EAAAA,MAAAA,EACAC,UACA,EAAA;AAAC,QAAA,UAAA;AAAY,QAAA;AAAW,KAAA,CAAA;IAG1B,OAAOG,qCAAAA;AACT;AAEA,MAAMD,YAAAA,GAAe,CAACJ,IAAYO,EAAAA,MAAAA,GAAAA;AAChC,IAAA,OAAOC,OAAOC,IAAI,CAACT,MAAMU,MAAM,CAAC,CAACC,GAAKC,EAAAA,OAAAA,GAAAA;QACpC,IAAIL,MAAAA,CAAOM,QAAQ,CAACD,OAAU,CAAA,EAAA;YAC5B,OAAOD,GAAAA;AACT;AACAA,Q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AE,EAAEM,GAAG,CAAC,CAACU,SAAgBR,EAAAA,KAAAA,GAAAA;AACxD,oBAAA,MAAM,EAAEC,EAAAA,EAAIC,CAAC,EAAE,GAAGC,IAAAA,EAAM,GAAGjB,yBAAAA,CACzBsB,SACA1B,EAAAA,UAAU,CAACyB,SAAAA,CAAU,EACrBzB,UACAK,EAAAA,MAAAA,CAAAA;oBAGF,OAAO;AACL,wBAAA,GAAGgB,IAAI;AACPE,wBAAAA,YAAAA,EAAcL,KAAQ,GAAA;AACxB,qBAAA;AACF,iBAAA,CAAA;AACF,aAAA,MAAO,IAAIpB,IAAI,CAACY,OAAAA,CAAQ,EAAE;AACxB,gBAAA,MAAM,EAAES,EAAIC,EAAAA,CAAC,EAAE,GAAGC,MAAM,GAAGjB,yBAAAA,CACzBN,IAAI,CAACY,QAAQ,EACbV,UAAU,CAACyB,SAAAA,CAAU,EACrBzB,UACAK,EAAAA,MAAAA,CAAAA;gBAGFI,GAAG,CAACC,QAAQ,GAAGW,IAAAA;AACjB;SACK,MAAA;AACLZ,YAAAA,GAAG,CAACC,OAAAA,CAAQ,GAAGZ,IAAI,CAACY,OAAQ,CAAA;AAC9B;QAEA,OAAOD,GAAAA;AACT,KAAA,EAAG,EAAC,CAAA;AACN,CAAA;;;;"}
|
|
@@ -53,8 +53,8 @@ const recursiveRemoveFieldTypes = (data, schema, components, fields)=>{
|
|
|
53
53
|
__temp_key__: index + 1
|
|
54
54
|
};
|
|
55
55
|
});
|
|
56
|
-
} else {
|
|
57
|
-
const { id: _, ...rest } = recursiveRemoveFieldTypes(data[current]
|
|
56
|
+
} else if (data[current]) {
|
|
57
|
+
const { id: _, ...rest } = recursiveRemoveFieldTypes(data[current], components[component], components, fields);
|
|
58
58
|
acc[current] = rest;
|
|
59
59
|
}
|
|
60
60
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean.mjs","sources":["../../../admin/src/utils/clean.ts"],"sourcesContent":["import type { Schema } from '@strapi/types';\n\ntype Data = Record<keyof Schema.ContentType['attributes'], any>;\n\nconst cleanData = (\n data: Data,\n schema: Schema.ContentType,\n components: Record<string, Schema.Component>\n) => {\n const cleanedData = removeFields(data, [\n 'createdAt',\n 'createdBy',\n 'updatedAt',\n 'updatedBy',\n 'id',\n 'documentId',\n 'publishedAt',\n 'strapi_stage',\n 'strapi_assignee',\n 'locale',\n 'status',\n ]);\n\n const cleanedDataWithoutPasswordAndRelation = recursiveRemoveFieldTypes(\n cleanedData,\n schema,\n components,\n ['relation', 'password']\n );\n\n return cleanedDataWithoutPasswordAndRelation;\n};\n\nconst removeFields = (data: Data, fields: Array<keyof Schema.ContentType['attributes']>) => {\n return Object.keys(data).reduce((acc, current) => {\n if (fields.includes(current)) {\n return acc;\n }\n acc[current] = data[current];\n return acc;\n }, {} as Data);\n};\n\nconst recursiveRemoveFieldTypes = (\n data: Data,\n schema: Schema.Schema,\n components: Record<string, Schema.Component>,\n fields: Array<keyof Schema.ContentType['attributes']>\n) => {\n return Object.keys(data).reduce((acc, current) => {\n const attribute = schema.attributes[current] ?? { type: undefined };\n\n if (fields.includes(attribute.type)) {\n return acc;\n }\n\n if (attribute.type === 'dynamiczone') {\n acc[current] = data[current].map((componentValue: any, index: number) => {\n const { id: _, ...rest } = recursiveRemoveFieldTypes(\n componentValue,\n components[componentValue.__component],\n components,\n fields\n );\n\n return {\n ...rest,\n __temp_key__: index + 1,\n };\n });\n } else if (attribute.type === 'component') {\n const { repeatable, component } = attribute;\n\n if (repeatable) {\n acc[current] = (data[current] ?? []).map((compoData: any, index: number) => {\n const { id: _, ...rest } = recursiveRemoveFieldTypes(\n compoData,\n components[component],\n components,\n fields\n );\n\n return {\n ...rest,\n __temp_key__: index + 1,\n };\n });\n } else {\n const { id: _, ...rest } = recursiveRemoveFieldTypes(\n data[current]
|
|
1
|
+
{"version":3,"file":"clean.mjs","sources":["../../../admin/src/utils/clean.ts"],"sourcesContent":["import type { Schema } from '@strapi/types';\n\ntype Data = Record<keyof Schema.ContentType['attributes'], any>;\n\nconst cleanData = (\n data: Data,\n schema: Schema.ContentType,\n components: Record<string, Schema.Component>\n) => {\n const cleanedData = removeFields(data, [\n 'createdAt',\n 'createdBy',\n 'updatedAt',\n 'updatedBy',\n 'id',\n 'documentId',\n 'publishedAt',\n 'strapi_stage',\n 'strapi_assignee',\n 'locale',\n 'status',\n ]);\n\n const cleanedDataWithoutPasswordAndRelation = recursiveRemoveFieldTypes(\n cleanedData,\n schema,\n components,\n ['relation', 'password']\n );\n\n return cleanedDataWithoutPasswordAndRelation;\n};\n\nconst removeFields = (data: Data, fields: Array<keyof Schema.ContentType['attributes']>) => {\n return Object.keys(data).reduce((acc, current) => {\n if (fields.includes(current)) {\n return acc;\n }\n acc[current] = data[current];\n return acc;\n }, {} as Data);\n};\n\nconst recursiveRemoveFieldTypes = (\n data: Data,\n schema: Schema.Schema,\n components: Record<string, Schema.Component>,\n fields: Array<keyof Schema.ContentType['attributes']>\n) => {\n return Object.keys(data).reduce((acc, current) => {\n const attribute = schema.attributes[current] ?? { type: undefined };\n\n if (fields.includes(attribute.type)) {\n return acc;\n }\n\n if (attribute.type === 'dynamiczone') {\n acc[current] = data[current].map((componentValue: any, index: number) => {\n const { id: _, ...rest } = recursiveRemoveFieldTypes(\n componentValue,\n components[componentValue.__component],\n components,\n fields\n );\n\n return {\n ...rest,\n __temp_key__: index + 1,\n };\n });\n } else if (attribute.type === 'component') {\n const { repeatable, component } = attribute;\n\n if (repeatable) {\n acc[current] = (data[current] ?? []).map((compoData: any, index: number) => {\n const { id: _, ...rest } = recursiveRemoveFieldTypes(\n compoData,\n components[component],\n components,\n fields\n );\n\n return {\n ...rest,\n __temp_key__: index + 1,\n };\n });\n } else if (data[current]) {\n const { id: _, ...rest } = recursiveRemoveFieldTypes(\n data[current],\n components[component],\n components,\n fields\n );\n\n acc[current] = rest;\n }\n } else {\n acc[current] = data[current];\n }\n\n return acc;\n }, {} as any);\n};\n\nexport { cleanData };\n"],"names":["cleanData","data","schema","components","cleanedData","removeFields","cleanedDataWithoutPasswordAndRelation","recursiveRemoveFieldTypes","fields","Object","keys","reduce","acc","current","includes","attribute","attributes","type","undefined","map","componentValue","index","id","_","rest","__component","__temp_key__","repeatable","component","compoData"],"mappings":"AAIMA,MAAAA,SAAAA,GAAY,CAChBC,IAAAA,EACAC,MACAC,EAAAA,UAAAA,GAAAA;IAEA,MAAMC,WAAAA,GAAcC,aAAaJ,IAAM,EAAA;AACrC,QAAA,WAAA;AACA,QAAA,WAAA;AACA,QAAA,WAAA;AACA,QAAA,WAAA;AACA,QAAA,IAAA;AACA,QAAA,YAAA;AACA,QAAA,aAAA;AACA,QAAA,cAAA;AACA,QAAA,iBAAA;AACA,QAAA,QAAA;AACA,QAAA;AACD,KAAA,CAAA;AAED,IAAA,MAAMK,qCAAwCC,GAAAA,yBAAAA,CAC5CH,WACAF,EAAAA,MAAAA,EACAC,UACA,EAAA;AAAC,QAAA,UAAA;AAAY,QAAA;AAAW,KAAA,CAAA;IAG1B,OAAOG,qCAAAA;AACT;AAEA,MAAMD,YAAAA,GAAe,CAACJ,IAAYO,EAAAA,MAAAA,GAAAA;AAChC,IAAA,OAAOC,OAAOC,IAAI,CAACT,MAAMU,MAAM,CAAC,CAACC,GAAKC,EAAAA,OAAAA,GAAAA;QACpC,IAAIL,MAAAA,CAAOM,QAAQ,CAACD,OAAU,CAAA,EAAA;YAC5B,OAAOD,GAAAA;AACT;AACAA,QAAAA,GAAG,CAACC,OAAAA,CAAQ,GAAGZ,IAAI,CAACY,OAAQ,CAAA;QAC5B,OAAOD,GAAAA;AACT,KAAA,EAAG,EAAC,CAAA;AACN,CAAA;AAEA,MAAML,yBAA4B,GAAA,CAChCN,IACAC,EAAAA,MAAAA,EACAC,UACAK,EAAAA,MAAAA,GAAAA;AAEA,IAAA,OAAOC,OAAOC,IAAI,CAACT,MAAMU,MAAM,CAAC,CAACC,GAAKC,EAAAA,OAAAA,GAAAA;AACpC,QAAA,MAAME,SAAYb,GAAAA,MA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AAA;AACF,aAAA,MAAO,IAAIpB,IAAI,CAACY,OAAAA,CAAQ,EAAE;AACxB,gBAAA,MAAM,EAAES,EAAIC,EAAAA,CAAC,EAAE,GAAGC,MAAM,GAAGjB,yBAAAA,CACzBN,IAAI,CAACY,QAAQ,EACbV,UAAU,CAACyB,SAAAA,CAAU,EACrBzB,UACAK,EAAAA,MAAAA,CAAAA;gBAGFI,GAAG,CAACC,QAAQ,GAAGW,IAAAA;AACjB;SACK,MAAA;AACLZ,YAAAA,GAAG,CAACC,OAAAA,CAAQ,GAAGZ,IAAI,CAACY,OAAQ,CAAA;AAC9B;QAEA,OAAOD,GAAAA;AACT,KAAA,EAAG,EAAC,CAAA;AACN,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTranslation.js","sources":["../../../admin/src/utils/getTranslation.ts"],"sourcesContent":["import { pluginId } from '../pluginId';\n\nconst getTranslation = (id: string) => `${pluginId}.${id}`;\n\nexport { getTranslation };\n"],"names":["getTranslation","id","pluginId"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"getTranslation.js","sources":["../../../admin/src/utils/getTranslation.ts"],"sourcesContent":["import { pluginId } from '../pluginId';\n\nconst getTranslation = (id: string) => `${pluginId}.${id}`;\n\nexport { getTranslation };\n"],"names":["getTranslation","id","pluginId"],"mappings":";;;;AAEA,MAAMA,iBAAiB,CAACC,EAAAA,GAAe,GAAGC,iBAAS,CAAA,CAAC,EAAED,EAAI,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTranslation.mjs","sources":["../../../admin/src/utils/getTranslation.ts"],"sourcesContent":["import { pluginId } from '../pluginId';\n\nconst getTranslation = (id: string) => `${pluginId}.${id}`;\n\nexport { getTranslation };\n"],"names":["getTranslation","id","pluginId"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"getTranslation.mjs","sources":["../../../admin/src/utils/getTranslation.ts"],"sourcesContent":["import { pluginId } from '../pluginId';\n\nconst getTranslation = (id: string) => `${pluginId}.${id}`;\n\nexport { getTranslation };\n"],"names":["getTranslation","id","pluginId"],"mappings":";;AAEA,MAAMA,iBAAiB,CAACC,EAAAA,GAAe,GAAGC,QAAS,CAAA,CAAC,EAAED,EAAI,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefixPluginTranslations.js","sources":["../../../admin/src/utils/prefixPluginTranslations.ts"],"sourcesContent":["type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n if (!pluginId) {\n throw new TypeError(\"pluginId can't be empty\");\n }\n return Object.keys(trad).reduce((acc, current) => {\n acc[`${pluginId}.${current}`] = trad[current];\n return acc;\n }, {} as TradOptions);\n};\n\nexport { prefixPluginTranslations };\n"],"names":["prefixPluginTranslations","trad","pluginId","Object","keys","reduce","acc","current"],"mappings":";;AAEMA,MAAAA,wBAAAA,GAA2B,CAACC,IAAmBC,EAAAA,QAAAA,GAAAA;AAInD,IAAA,OAAOC,OAAOC,IAAI,CAACH,MAAMI,MAAM,CAAC,CAACC,GAAKC,EAAAA,OAAAA,GAAAA;
|
|
1
|
+
{"version":3,"file":"prefixPluginTranslations.js","sources":["../../../admin/src/utils/prefixPluginTranslations.ts"],"sourcesContent":["type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n if (!pluginId) {\n throw new TypeError(\"pluginId can't be empty\");\n }\n return Object.keys(trad).reduce((acc, current) => {\n acc[`${pluginId}.${current}`] = trad[current];\n return acc;\n }, {} as TradOptions);\n};\n\nexport { prefixPluginTranslations };\n"],"names":["prefixPluginTranslations","trad","pluginId","Object","keys","reduce","acc","current"],"mappings":";;AAEMA,MAAAA,wBAAAA,GAA2B,CAACC,IAAmBC,EAAAA,QAAAA,GAAAA;AAInD,IAAA,OAAOC,OAAOC,IAAI,CAACH,MAAMI,MAAM,CAAC,CAACC,GAAKC,EAAAA,OAAAA,GAAAA;QACpCD,GAAG,CAAC,CAAGJ,EAAAA,QAAAA,CAAS,CAAC,EAAEK,SAAS,CAAC,GAAGN,IAAI,CAACM,OAAQ,CAAA;QAC7C,OAAOD,GAAAA;AACT,KAAA,EAAG,EAAC,CAAA;AACN;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefixPluginTranslations.mjs","sources":["../../../admin/src/utils/prefixPluginTranslations.ts"],"sourcesContent":["type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n if (!pluginId) {\n throw new TypeError(\"pluginId can't be empty\");\n }\n return Object.keys(trad).reduce((acc, current) => {\n acc[`${pluginId}.${current}`] = trad[current];\n return acc;\n }, {} as TradOptions);\n};\n\nexport { prefixPluginTranslations };\n"],"names":["prefixPluginTranslations","trad","pluginId","Object","keys","reduce","acc","current"],"mappings":"AAEMA,MAAAA,wBAAAA,GAA2B,CAACC,IAAmBC,EAAAA,QAAAA,GAAAA;AAInD,IAAA,OAAOC,OAAOC,IAAI,CAACH,MAAMI,MAAM,CAAC,CAACC,GAAKC,EAAAA,OAAAA,GAAAA;
|
|
1
|
+
{"version":3,"file":"prefixPluginTranslations.mjs","sources":["../../../admin/src/utils/prefixPluginTranslations.ts"],"sourcesContent":["type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n if (!pluginId) {\n throw new TypeError(\"pluginId can't be empty\");\n }\n return Object.keys(trad).reduce((acc, current) => {\n acc[`${pluginId}.${current}`] = trad[current];\n return acc;\n }, {} as TradOptions);\n};\n\nexport { prefixPluginTranslations };\n"],"names":["prefixPluginTranslations","trad","pluginId","Object","keys","reduce","acc","current"],"mappings":"AAEMA,MAAAA,wBAAAA,GAA2B,CAACC,IAAmBC,EAAAA,QAAAA,GAAAA;AAInD,IAAA,OAAOC,OAAOC,IAAI,CAACH,MAAMI,MAAM,CAAC,CAACC,GAAKC,EAAAA,OAAAA,GAAAA;QACpCD,GAAG,CAAC,CAAGJ,EAAAA,QAAAA,CAAS,CAAC,EAAEK,SAAS,CAAC,GAAGN,IAAI,CAACM,OAAQ,CAAA;QAC7C,OAAOD,GAAAA;AACT,KAAA,EAAG,EAAC,CAAA;AACN;;;;"}
|