@focus-reactive/payload-plugin-translator 0.1.0
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/LICENSE +21 -0
- package/README.md +410 -0
- package/dist/client/app/cache/CacheProvider.d.ts +7 -0
- package/dist/client/app/cache/CacheProvider.d.ts.map +1 -0
- package/dist/client/app/cache/CacheProvider.export.d.ts +9 -0
- package/dist/client/app/cache/CacheProvider.export.d.ts.map +1 -0
- package/dist/client/app/cache/CacheProvider.export.js +12 -0
- package/dist/client/app/cache/CacheProvider.export.js.map +1 -0
- package/dist/client/app/cache/CacheProvider.js +18 -0
- package/dist/client/app/cache/CacheProvider.js.map +1 -0
- package/dist/client/app/cache/CacheProvider.jsx +11 -0
- package/dist/client/app/config/TranslateKitConfigContext.d.ts +9 -0
- package/dist/client/app/config/TranslateKitConfigContext.d.ts.map +1 -0
- package/dist/client/app/config/TranslateKitConfigContext.js +23 -0
- package/dist/client/app/config/TranslateKitConfigContext.js.map +1 -0
- package/dist/client/app/config/TranslateKitConfigContext.jsx +13 -0
- package/dist/client/app/config/index.d.ts +3 -0
- package/dist/client/app/config/index.d.ts.map +1 -0
- package/dist/client/app/config/index.js +3 -0
- package/dist/client/app/config/index.js.map +1 -0
- package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.d.ts +6 -0
- package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.d.ts.map +1 -0
- package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.js +27 -0
- package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.js.map +1 -0
- package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.d.ts +6 -0
- package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.d.ts.map +1 -0
- package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.js +34 -0
- package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.js.map +1 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.d.ts +13 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.d.ts.map +1 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.js +33 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.js.map +1 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.d.ts +9 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.d.ts.map +1 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.js +20 -0
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.js.map +1 -0
- package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.d.ts +6 -0
- package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.d.ts.map +1 -0
- package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.js +27 -0
- package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.js.map +1 -0
- package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.d.ts +179 -0
- package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.d.ts.map +1 -0
- package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.js +67 -0
- package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.js.map +1 -0
- package/dist/client/entities/translation/api/queries/useDocumentTranslation.d.ts +180 -0
- package/dist/client/entities/translation/api/queries/useDocumentTranslation.d.ts.map +1 -0
- package/dist/client/entities/translation/api/queries/useDocumentTranslation.js +55 -0
- package/dist/client/entities/translation/api/queries/useDocumentTranslation.js.map +1 -0
- package/dist/client/entities/translation/index.d.ts +21 -0
- package/dist/client/entities/translation/index.d.ts.map +1 -0
- package/dist/client/entities/translation/index.js +21 -0
- package/dist/client/entities/translation/index.js.map +1 -0
- package/dist/client/entities/translation/model/enums.d.ts +7 -0
- package/dist/client/entities/translation/model/enums.d.ts.map +1 -0
- package/dist/client/entities/translation/model/enums.js +9 -0
- package/dist/client/entities/translation/model/enums.js.map +1 -0
- package/dist/client/entities/translation/model/types.d.ts +48 -0
- package/dist/client/entities/translation/model/types.d.ts.map +1 -0
- package/dist/client/entities/translation/model/types.js +3 -0
- package/dist/client/entities/translation/model/types.js.map +1 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.d.ts +8 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.js +45 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.js.map +1 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.jsx +25 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.d.ts +2 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.js +3 -0
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.js.map +1 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.d.ts +10 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.js +54 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.js.map +1 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.jsx +24 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/index.d.ts +2 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/index.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/index.js +3 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/index.js.map +1 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.d.ts +12 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.js +83 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.js.map +1 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.jsx +38 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/index.d.ts +2 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/index.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/index.js +3 -0
- package/dist/client/entities/translation/ui/PendingTranslationStatus/index.js.map +1 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.d.ts +11 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.js +66 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.js.map +1 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.jsx +32 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/index.d.ts +2 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/index.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/index.js +3 -0
- package/dist/client/entities/translation/ui/RunningTranslationStatus/index.js.map +1 -0
- package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.d.ts +8 -0
- package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.js +28 -0
- package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.js.map +1 -0
- package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.jsx +16 -0
- package/dist/client/entities/translation/ui/TranslationDirection/index.d.ts +2 -0
- package/dist/client/entities/translation/ui/TranslationDirection/index.d.ts.map +1 -0
- package/dist/client/entities/translation/ui/TranslationDirection/index.js +3 -0
- package/dist/client/entities/translation/ui/TranslationDirection/index.js.map +1 -0
- package/dist/client/features/collection-translation-form/index.client.d.ts +2 -0
- package/dist/client/features/collection-translation-form/index.client.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/index.client.js +3 -0
- package/dist/client/features/collection-translation-form/index.client.js.map +1 -0
- package/dist/client/features/collection-translation-form/index.d.ts +4 -0
- package/dist/client/features/collection-translation-form/index.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/index.js +4 -0
- package/dist/client/features/collection-translation-form/index.js.map +1 -0
- package/dist/client/features/collection-translation-form/model/constants.d.ts +16 -0
- package/dist/client/features/collection-translation-form/model/constants.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/model/constants.js +16 -0
- package/dist/client/features/collection-translation-form/model/constants.js.map +1 -0
- package/dist/client/features/collection-translation-form/model/form-model.d.ts +12 -0
- package/dist/client/features/collection-translation-form/model/form-model.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/model/form-model.js +32 -0
- package/dist/client/features/collection-translation-form/model/form-model.js.map +1 -0
- package/dist/client/features/collection-translation-form/model/index.d.ts +9 -0
- package/dist/client/features/collection-translation-form/model/index.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/model/index.js +6 -0
- package/dist/client/features/collection-translation-form/model/index.js.map +1 -0
- package/dist/client/features/collection-translation-form/model/schema.d.ts +23 -0
- package/dist/client/features/collection-translation-form/model/schema.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/model/schema.js +14 -0
- package/dist/client/features/collection-translation-form/model/schema.js.map +1 -0
- package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.d.ts +11 -0
- package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.js +64 -0
- package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.js.map +1 -0
- package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.jsx +25 -0
- package/dist/client/features/collection-translation-form/ui/index.d.ts +2 -0
- package/dist/client/features/collection-translation-form/ui/index.d.ts.map +1 -0
- package/dist/client/features/collection-translation-form/ui/index.js +3 -0
- package/dist/client/features/collection-translation-form/ui/index.js.map +1 -0
- package/dist/client/features/collection-translation-popup/index.d.ts +2 -0
- package/dist/client/features/collection-translation-popup/index.d.ts.map +1 -0
- package/dist/client/features/collection-translation-popup/index.js +3 -0
- package/dist/client/features/collection-translation-popup/index.js.map +1 -0
- package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.d.ts +8 -0
- package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.d.ts.map +1 -0
- package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.js +48 -0
- package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.js.map +1 -0
- package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.jsx +23 -0
- package/dist/client/features/collection-translation-progress/index.d.ts +2 -0
- package/dist/client/features/collection-translation-progress/index.d.ts.map +1 -0
- package/dist/client/features/collection-translation-progress/index.js +3 -0
- package/dist/client/features/collection-translation-progress/index.js.map +1 -0
- package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.d.ts +9 -0
- package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.d.ts.map +1 -0
- package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.js +108 -0
- package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.js.map +1 -0
- package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.jsx +47 -0
- package/dist/client/features/document-translation-progress-failed/index.d.ts +2 -0
- package/dist/client/features/document-translation-progress-failed/index.d.ts.map +1 -0
- package/dist/client/features/document-translation-progress-failed/index.js +3 -0
- package/dist/client/features/document-translation-progress-failed/index.js.map +1 -0
- package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.d.ts +7 -0
- package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.d.ts.map +1 -0
- package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.js +28 -0
- package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.js.map +1 -0
- package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.jsx +19 -0
- package/dist/client/features/document-translation-progress-pending/index.d.ts +2 -0
- package/dist/client/features/document-translation-progress-pending/index.d.ts.map +1 -0
- package/dist/client/features/document-translation-progress-pending/index.js +3 -0
- package/dist/client/features/document-translation-progress-pending/index.js.map +1 -0
- package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.d.ts +7 -0
- package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.d.ts.map +1 -0
- package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.js +44 -0
- package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.js.map +1 -0
- package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.jsx +34 -0
- package/dist/client/features/document-translation-progress-running/index.d.ts +2 -0
- package/dist/client/features/document-translation-progress-running/index.d.ts.map +1 -0
- package/dist/client/features/document-translation-progress-running/index.js +3 -0
- package/dist/client/features/document-translation-progress-running/index.js.map +1 -0
- package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.d.ts +7 -0
- package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.d.ts.map +1 -0
- package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.js +28 -0
- package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.js.map +1 -0
- package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.jsx +19 -0
- package/dist/client/features/open-document-translation-popup/index.d.ts +2 -0
- package/dist/client/features/open-document-translation-popup/index.d.ts.map +1 -0
- package/dist/client/features/open-document-translation-popup/index.js +3 -0
- package/dist/client/features/open-document-translation-popup/index.js.map +1 -0
- package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.d.ts +10 -0
- package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.d.ts.map +1 -0
- package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.js +35 -0
- package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.js.map +1 -0
- package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.jsx +15 -0
- package/dist/client/features/translate-document-form/index.client.d.ts +2 -0
- package/dist/client/features/translate-document-form/index.client.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/index.client.js +3 -0
- package/dist/client/features/translate-document-form/index.client.js.map +1 -0
- package/dist/client/features/translate-document-form/index.d.ts +4 -0
- package/dist/client/features/translate-document-form/index.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/index.js +4 -0
- package/dist/client/features/translate-document-form/index.js.map +1 -0
- package/dist/client/features/translate-document-form/model/constants.d.ts +18 -0
- package/dist/client/features/translate-document-form/model/constants.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/model/constants.js +18 -0
- package/dist/client/features/translate-document-form/model/constants.js.map +1 -0
- package/dist/client/features/translate-document-form/model/form-model.d.ts +12 -0
- package/dist/client/features/translate-document-form/model/form-model.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/model/form-model.js +32 -0
- package/dist/client/features/translate-document-form/model/form-model.js.map +1 -0
- package/dist/client/features/translate-document-form/model/index.d.ts +9 -0
- package/dist/client/features/translate-document-form/model/index.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/model/index.js +6 -0
- package/dist/client/features/translate-document-form/model/index.js.map +1 -0
- package/dist/client/features/translate-document-form/model/schema.d.ts +26 -0
- package/dist/client/features/translate-document-form/model/schema.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/model/schema.js +15 -0
- package/dist/client/features/translate-document-form/model/schema.js.map +1 -0
- package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.d.ts +10 -0
- package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.js +57 -0
- package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.js.map +1 -0
- package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.jsx +24 -0
- package/dist/client/features/translate-document-form/ui/index.d.ts +2 -0
- package/dist/client/features/translate-document-form/ui/index.d.ts.map +1 -0
- package/dist/client/features/translate-document-form/ui/index.js +3 -0
- package/dist/client/features/translate-document-form/ui/index.js.map +1 -0
- package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.d.ts +2 -0
- package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.d.ts.map +1 -0
- package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.js +18 -0
- package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.js.map +1 -0
- package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.jsx +4 -0
- package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.d.ts +2 -0
- package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.d.ts.map +1 -0
- package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.js +16 -0
- package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.js.map +1 -0
- package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.jsx +3 -0
- package/dist/client/shared/lib/assets/icons/ReloadIcon.d.ts +2 -0
- package/dist/client/shared/lib/assets/icons/ReloadIcon.d.ts.map +1 -0
- package/dist/client/shared/lib/assets/icons/ReloadIcon.js +14 -0
- package/dist/client/shared/lib/assets/icons/ReloadIcon.js.map +1 -0
- package/dist/client/shared/lib/assets/icons/ReloadIcon.jsx +3 -0
- package/dist/client/shared/lib/errors/handleApiError.d.ts +8 -0
- package/dist/client/shared/lib/errors/handleApiError.d.ts.map +1 -0
- package/dist/client/shared/lib/errors/handleApiError.js +24 -0
- package/dist/client/shared/lib/errors/handleApiError.js.map +1 -0
- package/dist/client/shared/lib/forms/handle-form-error.d.ts +3 -0
- package/dist/client/shared/lib/forms/handle-form-error.d.ts.map +1 -0
- package/dist/client/shared/lib/forms/handle-form-error.js +26 -0
- package/dist/client/shared/lib/forms/handle-form-error.js.map +1 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.d.ts +7 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.d.ts.map +1 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.js +12 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.js.map +1 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.d.ts +9 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.d.ts.map +1 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.js +14 -0
- package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.js.map +1 -0
- package/dist/client/shared/lib/payload/hooks/useLocaleOptions.d.ts +5 -0
- package/dist/client/shared/lib/payload/hooks/useLocaleOptions.d.ts.map +1 -0
- package/dist/client/shared/lib/payload/hooks/useLocaleOptions.js +13 -0
- package/dist/client/shared/lib/payload/hooks/useLocaleOptions.js.map +1 -0
- package/dist/client/shared/lib/utils/errors/handleApiError.d.ts +8 -0
- package/dist/client/shared/lib/utils/errors/handleApiError.d.ts.map +1 -0
- package/dist/client/shared/lib/utils/errors/handleApiError.js +24 -0
- package/dist/client/shared/lib/utils/errors/handleApiError.js.map +1 -0
- package/dist/client/shared/lib/utils/react/useToggle.d.ts +7 -0
- package/dist/client/shared/lib/utils/react/useToggle.d.ts.map +1 -0
- package/dist/client/shared/lib/utils/react/useToggle.js +24 -0
- package/dist/client/shared/lib/utils/react/useToggle.js.map +1 -0
- package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.d.ts +32 -0
- package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.d.ts.map +1 -0
- package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.js +66 -0
- package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.js.map +1 -0
- package/dist/client/shared/providers/CacheClientProvider/index.d.ts +2 -0
- package/dist/client/shared/providers/CacheClientProvider/index.d.ts.map +1 -0
- package/dist/client/shared/providers/CacheClientProvider/index.js +3 -0
- package/dist/client/shared/providers/CacheClientProvider/index.js.map +1 -0
- package/dist/client/shared/types/AccessGuard.d.ts +12 -0
- package/dist/client/shared/types/AccessGuard.d.ts.map +1 -0
- package/dist/client/shared/types/AccessGuard.js +3 -0
- package/dist/client/shared/types/AccessGuard.js.map +1 -0
- package/dist/client/shared/types/PayloadComponentExport.d.ts +3 -0
- package/dist/client/shared/types/PayloadComponentExport.d.ts.map +1 -0
- package/dist/client/shared/types/PayloadComponentExport.js +3 -0
- package/dist/client/shared/types/PayloadComponentExport.js.map +1 -0
- package/dist/client/shared/ui/Alert/Alert.d.ts +10 -0
- package/dist/client/shared/ui/Alert/Alert.d.ts.map +1 -0
- package/dist/client/shared/ui/Alert/Alert.js +40 -0
- package/dist/client/shared/ui/Alert/Alert.js.map +1 -0
- package/dist/client/shared/ui/Alert/Alert.jsx +33 -0
- package/dist/client/shared/ui/Alert/index.d.ts +2 -0
- package/dist/client/shared/ui/Alert/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Alert/index.js +3 -0
- package/dist/client/shared/ui/Alert/index.js.map +1 -0
- package/dist/client/shared/ui/Button/Button.d.ts +12 -0
- package/dist/client/shared/ui/Button/Button.d.ts.map +1 -0
- package/dist/client/shared/ui/Button/Button.js +47 -0
- package/dist/client/shared/ui/Button/Button.js.map +1 -0
- package/dist/client/shared/ui/Button/Button.jsx +35 -0
- package/dist/client/shared/ui/Button/index.d.ts +2 -0
- package/dist/client/shared/ui/Button/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Button/index.js +3 -0
- package/dist/client/shared/ui/Button/index.js.map +1 -0
- package/dist/client/shared/ui/Checkbox/Checkbox.d.ts +7 -0
- package/dist/client/shared/ui/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/client/shared/ui/Checkbox/Checkbox.js +14 -0
- package/dist/client/shared/ui/Checkbox/Checkbox.js.map +1 -0
- package/dist/client/shared/ui/Checkbox/Checkbox.jsx +6 -0
- package/dist/client/shared/ui/Checkbox/index.d.ts +2 -0
- package/dist/client/shared/ui/Checkbox/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Checkbox/index.js +3 -0
- package/dist/client/shared/ui/Checkbox/index.js.map +1 -0
- package/dist/client/shared/ui/ColorIndicator/ColorIndicator.d.ts +9 -0
- package/dist/client/shared/ui/ColorIndicator/ColorIndicator.d.ts.map +1 -0
- package/dist/client/shared/ui/ColorIndicator/ColorIndicator.js +13 -0
- package/dist/client/shared/ui/ColorIndicator/ColorIndicator.js.map +1 -0
- package/dist/client/shared/ui/ColorIndicator/ColorIndicator.jsx +7 -0
- package/dist/client/shared/ui/ColorIndicator/index.d.ts +2 -0
- package/dist/client/shared/ui/ColorIndicator/index.d.ts.map +1 -0
- package/dist/client/shared/ui/ColorIndicator/index.js +3 -0
- package/dist/client/shared/ui/ColorIndicator/index.js.map +1 -0
- package/dist/client/shared/ui/Description/Description.d.ts +8 -0
- package/dist/client/shared/ui/Description/Description.d.ts.map +1 -0
- package/dist/client/shared/ui/Description/Description.js +15 -0
- package/dist/client/shared/ui/Description/Description.js.map +1 -0
- package/dist/client/shared/ui/Description/Description.jsx +7 -0
- package/dist/client/shared/ui/Description/index.d.ts +2 -0
- package/dist/client/shared/ui/Description/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Description/index.js +3 -0
- package/dist/client/shared/ui/Description/index.js.map +1 -0
- package/dist/client/shared/ui/Divider/Divider.d.ts +11 -0
- package/dist/client/shared/ui/Divider/Divider.d.ts.map +1 -0
- package/dist/client/shared/ui/Divider/Divider.js +17 -0
- package/dist/client/shared/ui/Divider/Divider.js.map +1 -0
- package/dist/client/shared/ui/Divider/Divider.jsx +7 -0
- package/dist/client/shared/ui/Divider/index.d.ts +2 -0
- package/dist/client/shared/ui/Divider/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Divider/index.js +3 -0
- package/dist/client/shared/ui/Divider/index.js.map +1 -0
- package/dist/client/shared/ui/Label/Label.d.ts +7 -0
- package/dist/client/shared/ui/Label/Label.d.ts.map +1 -0
- package/dist/client/shared/ui/Label/Label.js +20 -0
- package/dist/client/shared/ui/Label/Label.js.map +1 -0
- package/dist/client/shared/ui/Label/Label.jsx +9 -0
- package/dist/client/shared/ui/Label/index.d.ts +2 -0
- package/dist/client/shared/ui/Label/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Label/index.js +3 -0
- package/dist/client/shared/ui/Label/index.js.map +1 -0
- package/dist/client/shared/ui/Loading/Loading.d.ts +8 -0
- package/dist/client/shared/ui/Loading/Loading.d.ts.map +1 -0
- package/dist/client/shared/ui/Loading/Loading.js +26 -0
- package/dist/client/shared/ui/Loading/Loading.js.map +1 -0
- package/dist/client/shared/ui/Loading/Loading.jsx +11 -0
- package/dist/client/shared/ui/Loading/index.d.ts +2 -0
- package/dist/client/shared/ui/Loading/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Loading/index.js +3 -0
- package/dist/client/shared/ui/Loading/index.js.map +1 -0
- package/dist/client/shared/ui/Popup/Popup.d.ts +11 -0
- package/dist/client/shared/ui/Popup/Popup.d.ts.map +1 -0
- package/dist/client/shared/ui/Popup/Popup.js +27 -0
- package/dist/client/shared/ui/Popup/Popup.js.map +1 -0
- package/dist/client/shared/ui/Popup/Popup.jsx +13 -0
- package/dist/client/shared/ui/Popup/index.d.ts +2 -0
- package/dist/client/shared/ui/Popup/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Popup/index.js +3 -0
- package/dist/client/shared/ui/Popup/index.js.map +1 -0
- package/dist/client/shared/ui/ProgressBar/ProgressBar.d.ts +10 -0
- package/dist/client/shared/ui/ProgressBar/ProgressBar.d.ts.map +1 -0
- package/dist/client/shared/ui/ProgressBar/ProgressBar.js +29 -0
- package/dist/client/shared/ui/ProgressBar/ProgressBar.js.map +1 -0
- package/dist/client/shared/ui/ProgressBar/ProgressBar.jsx +11 -0
- package/dist/client/shared/ui/ProgressBar/index.d.ts +2 -0
- package/dist/client/shared/ui/ProgressBar/index.d.ts.map +1 -0
- package/dist/client/shared/ui/ProgressBar/index.js +3 -0
- package/dist/client/shared/ui/ProgressBar/index.js.map +1 -0
- package/dist/client/shared/ui/Select/Select.d.ts +20 -0
- package/dist/client/shared/ui/Select/Select.d.ts.map +1 -0
- package/dist/client/shared/ui/Select/Select.js +54 -0
- package/dist/client/shared/ui/Select/Select.js.map +1 -0
- package/dist/client/shared/ui/Select/Select.jsx +41 -0
- package/dist/client/shared/ui/Select/index.d.ts +2 -0
- package/dist/client/shared/ui/Select/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Select/index.js +3 -0
- package/dist/client/shared/ui/Select/index.js.map +1 -0
- package/dist/client/shared/ui/StatusCounter/StatusCounter.d.ts +11 -0
- package/dist/client/shared/ui/StatusCounter/StatusCounter.d.ts.map +1 -0
- package/dist/client/shared/ui/StatusCounter/StatusCounter.js +45 -0
- package/dist/client/shared/ui/StatusCounter/StatusCounter.js.map +1 -0
- package/dist/client/shared/ui/StatusCounter/StatusCounter.jsx +26 -0
- package/dist/client/shared/ui/StatusCounter/index.d.ts +2 -0
- package/dist/client/shared/ui/StatusCounter/index.d.ts.map +1 -0
- package/dist/client/shared/ui/StatusCounter/index.js +3 -0
- package/dist/client/shared/ui/StatusCounter/index.js.map +1 -0
- package/dist/client/shared/ui/StatusIndicator/StatusIndicator.d.ts +10 -0
- package/dist/client/shared/ui/StatusIndicator/StatusIndicator.d.ts.map +1 -0
- package/dist/client/shared/ui/StatusIndicator/StatusIndicator.js +20 -0
- package/dist/client/shared/ui/StatusIndicator/StatusIndicator.js.map +1 -0
- package/dist/client/shared/ui/StatusIndicator/StatusIndicator.jsx +10 -0
- package/dist/client/shared/ui/StatusIndicator/index.d.ts +2 -0
- package/dist/client/shared/ui/StatusIndicator/index.d.ts.map +1 -0
- package/dist/client/shared/ui/StatusIndicator/index.js +3 -0
- package/dist/client/shared/ui/StatusIndicator/index.js.map +1 -0
- package/dist/client/shared/ui/Tooltip/Tooltip.d.ts +11 -0
- package/dist/client/shared/ui/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/client/shared/ui/Tooltip/Tooltip.js +32 -0
- package/dist/client/shared/ui/Tooltip/Tooltip.js.map +1 -0
- package/dist/client/shared/ui/Tooltip/Tooltip.jsx +16 -0
- package/dist/client/shared/ui/Tooltip/index.d.ts +2 -0
- package/dist/client/shared/ui/Tooltip/index.d.ts.map +1 -0
- package/dist/client/shared/ui/Tooltip/index.js +3 -0
- package/dist/client/shared/ui/Tooltip/index.js.map +1 -0
- package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.d.ts +11 -0
- package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.js +51 -0
- package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.js.map +1 -0
- package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.jsx +24 -0
- package/dist/client/shared/ui/form/FormCheckbox/index.d.ts +2 -0
- package/dist/client/shared/ui/form/FormCheckbox/index.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormCheckbox/index.js +3 -0
- package/dist/client/shared/ui/form/FormCheckbox/index.js.map +1 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.d.ts +8 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.js +37 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.js.map +1 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.jsx +21 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/index.d.ts +2 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/index.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/index.js +3 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/index.js.map +1 -0
- package/dist/client/shared/ui/form/FormSelect/FormSelect.d.ts +20 -0
- package/dist/client/shared/ui/form/FormSelect/FormSelect.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormSelect/FormSelect.js +88 -0
- package/dist/client/shared/ui/form/FormSelect/FormSelect.js.map +1 -0
- package/dist/client/shared/ui/form/FormSelect/FormSelect.jsx +44 -0
- package/dist/client/shared/ui/form/FormSelect/index.d.ts +2 -0
- package/dist/client/shared/ui/form/FormSelect/index.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormSelect/index.js +3 -0
- package/dist/client/shared/ui/form/FormSelect/index.js.map +1 -0
- package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.d.ts +12 -0
- package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.js +19 -0
- package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.js.map +1 -0
- package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.jsx +6 -0
- package/dist/client/shared/ui/form/FormSelectLocale/index.d.ts +2 -0
- package/dist/client/shared/ui/form/FormSelectLocale/index.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormSelectLocale/index.js +3 -0
- package/dist/client/shared/ui/form/FormSelectLocale/index.js.map +1 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.d.ts +19 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.js +59 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.js.map +1 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.jsx +25 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/index.d.ts +3 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/index.d.ts.map +1 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/index.js +3 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/index.js.map +1 -0
- package/dist/client/shared/utils/componentPath.d.ts +6 -0
- package/dist/client/shared/utils/componentPath.d.ts.map +1 -0
- package/dist/client/shared/utils/componentPath.js +9 -0
- package/dist/client/shared/utils/componentPath.js.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/index.d.ts +2 -0
- package/dist/client/widgets/bulk-translation-dashboard/index.d.ts.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/index.js +3 -0
- package/dist/client/widgets/bulk-translation-dashboard/index.js.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.d.ts +6 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.d.ts.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.d.ts +9 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.d.ts.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.js +15 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.js.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.jsx +11 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.js +78 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.js.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.jsx +55 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.d.ts +8 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.d.ts.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.js +24 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.js.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.jsx +17 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/index.d.ts +2 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/index.d.ts.map +1 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/index.js +3 -0
- package/dist/client/widgets/bulk-translation-dashboard/ui/index.js.map +1 -0
- package/dist/client/widgets/translate-document/index.d.ts +2 -0
- package/dist/client/widgets/translate-document/index.d.ts.map +1 -0
- package/dist/client/widgets/translate-document/index.js +3 -0
- package/dist/client/widgets/translate-document/index.js.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.d.ts +6 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.d.ts.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.export.d.ts +11 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.export.d.ts.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.export.js +18 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.export.js.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.js +87 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.js.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.jsx +55 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.server.d.ts +9 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.server.d.ts.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.server.js +23 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.server.js.map +1 -0
- package/dist/client/widgets/translate-document/ui/TranslateDocument.server.jsx +16 -0
- package/dist/client/widgets/translate-document/ui/index.d.ts +2 -0
- package/dist/client/widgets/translate-document/ui/index.d.ts.map +1 -0
- package/dist/client/widgets/translate-document/ui/index.js +3 -0
- package/dist/client/widgets/translate-document/ui/index.js.map +1 -0
- package/dist/field-config.d.ts +48 -0
- package/dist/field-config.d.ts.map +1 -0
- package/dist/field-config.js +49 -0
- package/dist/field-config.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin.d.ts +63 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +110 -0
- package/dist/plugin.js.map +1 -0
- package/dist/server/features/_lib/collection-utils.d.ts +10 -0
- package/dist/server/features/_lib/collection-utils.d.ts.map +1 -0
- package/dist/server/features/_lib/collection-utils.js +20 -0
- package/dist/server/features/_lib/collection-utils.js.map +1 -0
- package/dist/server/features/_lib/index.d.ts +2 -0
- package/dist/server/features/_lib/index.d.ts.map +1 -0
- package/dist/server/features/_lib/index.js +3 -0
- package/dist/server/features/_lib/index.js.map +1 -0
- package/dist/server/features/cancel/handler.d.ts +11 -0
- package/dist/server/features/cancel/handler.d.ts.map +1 -0
- package/dist/server/features/cancel/handler.js +20 -0
- package/dist/server/features/cancel/handler.js.map +1 -0
- package/dist/server/features/cancel/handler.test.d.ts +2 -0
- package/dist/server/features/cancel/handler.test.d.ts.map +1 -0
- package/dist/server/features/cancel/handler.test.js +63 -0
- package/dist/server/features/cancel/index.d.ts +2 -0
- package/dist/server/features/cancel/index.d.ts.map +1 -0
- package/dist/server/features/cancel/index.js +3 -0
- package/dist/server/features/cancel/index.js.map +1 -0
- package/dist/server/features/cancel/model.d.ts +12 -0
- package/dist/server/features/cancel/model.d.ts.map +1 -0
- package/dist/server/features/cancel/model.js +8 -0
- package/dist/server/features/cancel/model.js.map +1 -0
- package/dist/server/features/cancel/route.d.ts +8 -0
- package/dist/server/features/cancel/route.d.ts.map +1 -0
- package/dist/server/features/cancel/route.js +14 -0
- package/dist/server/features/cancel/route.js.map +1 -0
- package/dist/server/features/cancel-by-collection/handler.d.ts +13 -0
- package/dist/server/features/cancel-by-collection/handler.d.ts.map +1 -0
- package/dist/server/features/cancel-by-collection/handler.js +28 -0
- package/dist/server/features/cancel-by-collection/handler.js.map +1 -0
- package/dist/server/features/cancel-by-collection/handler.test.d.ts +2 -0
- package/dist/server/features/cancel-by-collection/handler.test.d.ts.map +1 -0
- package/dist/server/features/cancel-by-collection/handler.test.js +126 -0
- package/dist/server/features/cancel-by-collection/index.d.ts +2 -0
- package/dist/server/features/cancel-by-collection/index.d.ts.map +1 -0
- package/dist/server/features/cancel-by-collection/index.js +3 -0
- package/dist/server/features/cancel-by-collection/index.js.map +1 -0
- package/dist/server/features/cancel-by-collection/model.d.ts +19 -0
- package/dist/server/features/cancel-by-collection/model.d.ts.map +1 -0
- package/dist/server/features/cancel-by-collection/model.js +8 -0
- package/dist/server/features/cancel-by-collection/model.js.map +1 -0
- package/dist/server/features/cancel-by-collection/route.d.ts +9 -0
- package/dist/server/features/cancel-by-collection/route.d.ts.map +1 -0
- package/dist/server/features/cancel-by-collection/route.js +14 -0
- package/dist/server/features/cancel-by-collection/route.js.map +1 -0
- package/dist/server/features/enqueue-translation/handler.d.ts +13 -0
- package/dist/server/features/enqueue-translation/handler.d.ts.map +1 -0
- package/dist/server/features/enqueue-translation/handler.js +37 -0
- package/dist/server/features/enqueue-translation/handler.js.map +1 -0
- package/dist/server/features/enqueue-translation/handler.test.d.ts +2 -0
- package/dist/server/features/enqueue-translation/handler.test.d.ts.map +1 -0
- package/dist/server/features/enqueue-translation/handler.test.js +115 -0
- package/dist/server/features/enqueue-translation/index.d.ts +2 -0
- package/dist/server/features/enqueue-translation/index.d.ts.map +1 -0
- package/dist/server/features/enqueue-translation/index.js +3 -0
- package/dist/server/features/enqueue-translation/index.js.map +1 -0
- package/dist/server/features/enqueue-translation/model.d.ts +37 -0
- package/dist/server/features/enqueue-translation/model.d.ts.map +1 -0
- package/dist/server/features/enqueue-translation/model.js +17 -0
- package/dist/server/features/enqueue-translation/model.js.map +1 -0
- package/dist/server/features/enqueue-translation/route.d.ts +9 -0
- package/dist/server/features/enqueue-translation/route.d.ts.map +1 -0
- package/dist/server/features/enqueue-translation/route.js +14 -0
- package/dist/server/features/enqueue-translation/route.js.map +1 -0
- package/dist/server/features/get-collection-status/handler.d.ts +13 -0
- package/dist/server/features/get-collection-status/handler.d.ts.map +1 -0
- package/dist/server/features/get-collection-status/handler.js +29 -0
- package/dist/server/features/get-collection-status/handler.js.map +1 -0
- package/dist/server/features/get-collection-status/handler.test.d.ts +2 -0
- package/dist/server/features/get-collection-status/handler.test.d.ts.map +1 -0
- package/dist/server/features/get-collection-status/handler.test.js +108 -0
- package/dist/server/features/get-collection-status/index.d.ts +2 -0
- package/dist/server/features/get-collection-status/index.d.ts.map +1 -0
- package/dist/server/features/get-collection-status/index.js +3 -0
- package/dist/server/features/get-collection-status/index.js.map +1 -0
- package/dist/server/features/get-collection-status/model.d.ts +34 -0
- package/dist/server/features/get-collection-status/model.d.ts.map +1 -0
- package/dist/server/features/get-collection-status/model.js +8 -0
- package/dist/server/features/get-collection-status/model.js.map +1 -0
- package/dist/server/features/get-collection-status/route.d.ts +9 -0
- package/dist/server/features/get-collection-status/route.d.ts.map +1 -0
- package/dist/server/features/get-collection-status/route.js +14 -0
- package/dist/server/features/get-collection-status/route.js.map +1 -0
- package/dist/server/features/get-document-status/handler.d.ts +13 -0
- package/dist/server/features/get-document-status/handler.d.ts.map +1 -0
- package/dist/server/features/get-document-status/handler.js +27 -0
- package/dist/server/features/get-document-status/handler.js.map +1 -0
- package/dist/server/features/get-document-status/handler.test.d.ts +2 -0
- package/dist/server/features/get-document-status/handler.test.d.ts.map +1 -0
- package/dist/server/features/get-document-status/handler.test.js +138 -0
- package/dist/server/features/get-document-status/index.d.ts +3 -0
- package/dist/server/features/get-document-status/index.d.ts.map +1 -0
- package/dist/server/features/get-document-status/index.js +4 -0
- package/dist/server/features/get-document-status/index.js.map +1 -0
- package/dist/server/features/get-document-status/model.d.ts +59 -0
- package/dist/server/features/get-document-status/model.d.ts.map +1 -0
- package/dist/server/features/get-document-status/model.js +33 -0
- package/dist/server/features/get-document-status/model.js.map +1 -0
- package/dist/server/features/get-document-status/route.d.ts +9 -0
- package/dist/server/features/get-document-status/route.d.ts.map +1 -0
- package/dist/server/features/get-document-status/route.js +14 -0
- package/dist/server/features/get-document-status/route.js.map +1 -0
- package/dist/server/features/index.d.ts +7 -0
- package/dist/server/features/index.d.ts.map +1 -0
- package/dist/server/features/index.js +8 -0
- package/dist/server/features/index.js.map +1 -0
- package/dist/server/features/run-translation/handler.d.ts +11 -0
- package/dist/server/features/run-translation/handler.d.ts.map +1 -0
- package/dist/server/features/run-translation/handler.js +28 -0
- package/dist/server/features/run-translation/handler.js.map +1 -0
- package/dist/server/features/run-translation/handler.test.d.ts +2 -0
- package/dist/server/features/run-translation/handler.test.d.ts.map +1 -0
- package/dist/server/features/run-translation/handler.test.js +98 -0
- package/dist/server/features/run-translation/index.d.ts +2 -0
- package/dist/server/features/run-translation/index.d.ts.map +1 -0
- package/dist/server/features/run-translation/index.js +3 -0
- package/dist/server/features/run-translation/index.js.map +1 -0
- package/dist/server/features/run-translation/model.d.ts +12 -0
- package/dist/server/features/run-translation/model.d.ts.map +1 -0
- package/dist/server/features/run-translation/model.js +8 -0
- package/dist/server/features/run-translation/model.js.map +1 -0
- package/dist/server/features/run-translation/route.d.ts +8 -0
- package/dist/server/features/run-translation/route.d.ts.map +1 -0
- package/dist/server/features/run-translation/route.js +14 -0
- package/dist/server/features/run-translation/route.js.map +1 -0
- package/dist/server/features/translate-document/handler.d.ts +19 -0
- package/dist/server/features/translate-document/handler.d.ts.map +1 -0
- package/dist/server/features/translate-document/handler.js +69 -0
- package/dist/server/features/translate-document/handler.js.map +1 -0
- package/dist/server/features/translate-document/handler.test.d.ts +2 -0
- package/dist/server/features/translate-document/handler.test.d.ts.map +1 -0
- package/dist/server/features/translate-document/handler.test.js +171 -0
- package/dist/server/features/translate-document/index.d.ts +4 -0
- package/dist/server/features/translate-document/index.d.ts.map +1 -0
- package/dist/server/features/translate-document/index.js +4 -0
- package/dist/server/features/translate-document/index.js.map +1 -0
- package/dist/server/features/translate-document/model.d.ts +53 -0
- package/dist/server/features/translate-document/model.d.ts.map +1 -0
- package/dist/server/features/translate-document/model.js +30 -0
- package/dist/server/features/translate-document/model.js.map +1 -0
- package/dist/server/features/translate-document/task.d.ts +41 -0
- package/dist/server/features/translate-document/task.d.ts.map +1 -0
- package/dist/server/features/translate-document/task.js +44 -0
- package/dist/server/features/translate-document/task.js.map +1 -0
- package/dist/server/index.d.ts +4 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +5 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/modules/index.d.ts +3 -0
- package/dist/server/modules/index.d.ts.map +1 -0
- package/dist/server/modules/index.js +4 -0
- package/dist/server/modules/index.js.map +1 -0
- package/dist/server/modules/task-runner/TaskRunner.interface.d.ts +31 -0
- package/dist/server/modules/task-runner/TaskRunner.interface.d.ts.map +1 -0
- package/dist/server/modules/task-runner/TaskRunner.interface.js +10 -0
- package/dist/server/modules/task-runner/TaskRunner.interface.js.map +1 -0
- package/dist/server/modules/task-runner/TaskRunnerProvider.interface.d.ts +46 -0
- package/dist/server/modules/task-runner/TaskRunnerProvider.interface.d.ts.map +1 -0
- package/dist/server/modules/task-runner/TaskRunnerProvider.interface.js +11 -0
- package/dist/server/modules/task-runner/TaskRunnerProvider.interface.js.map +1 -0
- package/dist/server/modules/task-runner/index.d.ts +7 -0
- package/dist/server/modules/task-runner/index.d.ts.map +1 -0
- package/dist/server/modules/task-runner/index.js +4 -0
- package/dist/server/modules/task-runner/index.js.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.d.ts +20 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.js +128 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.js.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.d.ts +31 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.js +165 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.js.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.test.d.ts +2 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.test.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.test.js +188 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/index.d.ts +3 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/index.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/index.js +3 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/index.js.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.d.ts +7 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.js +40 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.js.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.test.d.ts +2 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.test.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.test.js +169 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/types.d.ts +85 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/types.d.ts.map +1 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/types.js +5 -0
- package/dist/server/modules/task-runner/payload-jobs-runner/types.js.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.d.ts +25 -0
- package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.d.ts.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.js +42 -0
- package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.js.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.d.ts +23 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.d.ts.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.js +72 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.js.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.test.d.ts +2 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.test.d.ts.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.test.js +148 -0
- package/dist/server/modules/task-runner/sync-runner/index.d.ts +2 -0
- package/dist/server/modules/task-runner/sync-runner/index.d.ts.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/index.js +3 -0
- package/dist/server/modules/task-runner/sync-runner/index.js.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/types.d.ts +18 -0
- package/dist/server/modules/task-runner/sync-runner/types.d.ts.map +1 -0
- package/dist/server/modules/task-runner/sync-runner/types.js +5 -0
- package/dist/server/modules/task-runner/sync-runner/types.js.map +1 -0
- package/dist/server/modules/task-runner/types.d.ts +41 -0
- package/dist/server/modules/task-runner/types.d.ts.map +1 -0
- package/dist/server/modules/task-runner/types.js +5 -0
- package/dist/server/modules/task-runner/types.js.map +1 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.d.ts +35 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.js +55 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.js.map +1 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/TranslationPipeline.test.js +552 -0
- package/dist/server/modules/translation-pipeline/index.d.ts +4 -0
- package/dist/server/modules/translation-pipeline/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/index.js +4 -0
- package/dist/server/modules/translation-pipeline/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.d.ts +26 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.js +97 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.d.ts +9 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.js +15 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.test.js +294 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.d.ts +3 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.js +4 -0
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.d.ts +35 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.js +128 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.d.ts +13 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.js +23 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.test.js +737 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/index.d.ts +3 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/index.js +4 -0
- package/dist/server/modules/translation-pipeline/stages/field-collector/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/index.d.ts +7 -0
- package/dist/server/modules/translation-pipeline/stages/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/index.js +7 -0
- package/dist/server/modules/translation-pipeline/stages/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.d.ts +10 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.js +28 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.d.ts +10 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.js +32 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.d.ts +24 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.js +34 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.d.ts +11 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.js +29 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.test.js +396 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.d.ts +27 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.js +6 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/index.d.ts +7 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/index.js +6 -0
- package/dist/server/modules/translation-pipeline/stages/text-expander/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.d.ts +11 -0
- package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.js +23 -0
- package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation/index.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/stages/translation/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation/index.js +3 -0
- package/dist/server/modules/translation-pipeline/stages/translation/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.d.ts +18 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.js +27 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.d.ts +8 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.js +15 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.js.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.test.js +110 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.d.ts +3 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.js +4 -0
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.d.ts +9 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.js +11 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.js.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.test.js +36 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.d.ts +10 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.js +19 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.js.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.test.d.ts +2 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.test.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.test.js +77 -0
- package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.d.ts +22 -0
- package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.js +10 -0
- package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.js.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/index.d.ts +14 -0
- package/dist/server/modules/translation-pipeline/strategies/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/strategies/index.js +16 -0
- package/dist/server/modules/translation-pipeline/strategies/index.js.map +1 -0
- package/dist/server/modules/translation-pipeline/types/FieldChunk.d.ts +18 -0
- package/dist/server/modules/translation-pipeline/types/FieldChunk.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/types/FieldChunk.js +8 -0
- package/dist/server/modules/translation-pipeline/types/FieldChunk.js.map +1 -0
- package/dist/server/modules/translation-pipeline/types/Pipeline.d.ts +21 -0
- package/dist/server/modules/translation-pipeline/types/Pipeline.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/types/Pipeline.js +6 -0
- package/dist/server/modules/translation-pipeline/types/Pipeline.js.map +1 -0
- package/dist/server/modules/translation-pipeline/types/PipelineContext.d.ts +28 -0
- package/dist/server/modules/translation-pipeline/types/PipelineContext.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/types/PipelineContext.js +6 -0
- package/dist/server/modules/translation-pipeline/types/PipelineContext.js.map +1 -0
- package/dist/server/modules/translation-pipeline/types/TextChunk.d.ts +43 -0
- package/dist/server/modules/translation-pipeline/types/TextChunk.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/types/TextChunk.js +12 -0
- package/dist/server/modules/translation-pipeline/types/TextChunk.js.map +1 -0
- package/dist/server/modules/translation-pipeline/types/index.d.ts +6 -0
- package/dist/server/modules/translation-pipeline/types/index.d.ts.map +1 -0
- package/dist/server/modules/translation-pipeline/types/index.js +3 -0
- package/dist/server/modules/translation-pipeline/types/index.js.map +1 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.d.ts +128 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.d.ts.map +1 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.js +138 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.js.map +1 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.test.d.ts +2 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.test.d.ts.map +1 -0
- package/dist/server/modules/translation-providers/OpenAITranslation.provider.test.js +214 -0
- package/dist/server/modules/translation-providers/TranslationProvider.interface.d.ts +56 -0
- package/dist/server/modules/translation-providers/TranslationProvider.interface.d.ts.map +1 -0
- package/dist/server/modules/translation-providers/TranslationProvider.interface.js +26 -0
- package/dist/server/modules/translation-providers/TranslationProvider.interface.js.map +1 -0
- package/dist/server/modules/translation-providers/index.d.ts +3 -0
- package/dist/server/modules/translation-providers/index.d.ts.map +1 -0
- package/dist/server/modules/translation-providers/index.js +3 -0
- package/dist/server/modules/translation-providers/index.js.map +1 -0
- package/dist/server/shared/access/AnyAccessGuard.d.ts +8 -0
- package/dist/server/shared/access/AnyAccessGuard.d.ts.map +1 -0
- package/dist/server/shared/access/AnyAccessGuard.js +9 -0
- package/dist/server/shared/access/AnyAccessGuard.js.map +1 -0
- package/dist/server/shared/access/handler.d.ts +8 -0
- package/dist/server/shared/access/handler.d.ts.map +1 -0
- package/dist/server/shared/access/handler.js +5 -0
- package/dist/server/shared/access/handler.js.map +1 -0
- package/dist/server/shared/access/index.d.ts +4 -0
- package/dist/server/shared/access/index.d.ts.map +1 -0
- package/dist/server/shared/access/index.js +3 -0
- package/dist/server/shared/access/index.js.map +1 -0
- package/dist/server/shared/access/types.d.ts +2 -0
- package/dist/server/shared/access/types.d.ts.map +1 -0
- package/dist/server/shared/access/types.js +3 -0
- package/dist/server/shared/access/types.js.map +1 -0
- package/dist/server/shared/field-config/getFieldConfig.d.ts +21 -0
- package/dist/server/shared/field-config/getFieldConfig.d.ts.map +1 -0
- package/dist/server/shared/field-config/getFieldConfig.js +29 -0
- package/dist/server/shared/field-config/getFieldConfig.js.map +1 -0
- package/dist/server/shared/field-config/getFieldConfig.test.d.ts +2 -0
- package/dist/server/shared/field-config/getFieldConfig.test.d.ts.map +1 -0
- package/dist/server/shared/field-config/getFieldConfig.test.js +74 -0
- package/dist/server/shared/field-config/index.d.ts +4 -0
- package/dist/server/shared/field-config/index.d.ts.map +1 -0
- package/dist/server/shared/field-config/index.js +4 -0
- package/dist/server/shared/field-config/index.js.map +1 -0
- package/dist/server/shared/field-config/types.d.ts +39 -0
- package/dist/server/shared/field-config/types.d.ts.map +1 -0
- package/dist/server/shared/field-config/types.js +22 -0
- package/dist/server/shared/field-config/types.js.map +1 -0
- package/dist/server/shared/guards/collection-guards.d.ts +7 -0
- package/dist/server/shared/guards/collection-guards.d.ts.map +1 -0
- package/dist/server/shared/guards/collection-guards.js +16 -0
- package/dist/server/shared/guards/collection-guards.js.map +1 -0
- package/dist/server/shared/guards/field-guards.d.ts +37 -0
- package/dist/server/shared/guards/field-guards.d.ts.map +1 -0
- package/dist/server/shared/guards/field-guards.js +34 -0
- package/dist/server/shared/guards/field-guards.js.map +1 -0
- package/dist/server/shared/guards/field-guards.test.d.ts +2 -0
- package/dist/server/shared/guards/field-guards.test.d.ts.map +1 -0
- package/dist/server/shared/guards/field-guards.test.js +166 -0
- package/dist/server/shared/guards/index.d.ts +4 -0
- package/dist/server/shared/guards/index.d.ts.map +1 -0
- package/dist/server/shared/guards/index.js +4 -0
- package/dist/server/shared/guards/index.js.map +1 -0
- package/dist/server/shared/http/ServerResponse.d.ts +24 -0
- package/dist/server/shared/http/ServerResponse.d.ts.map +1 -0
- package/dist/server/shared/http/ServerResponse.js +165 -0
- package/dist/server/shared/http/ServerResponse.js.map +1 -0
- package/dist/server/shared/http/ServerResponse.test.d.ts +2 -0
- package/dist/server/shared/http/ServerResponse.test.d.ts.map +1 -0
- package/dist/server/shared/http/ServerResponse.test.js +161 -0
- package/dist/server/shared/http/index.d.ts +4 -0
- package/dist/server/shared/http/index.d.ts.map +1 -0
- package/dist/server/shared/http/index.js +5 -0
- package/dist/server/shared/http/index.js.map +1 -0
- package/dist/server/shared/http/withAccessCheck.d.ts +8 -0
- package/dist/server/shared/http/withAccessCheck.d.ts.map +1 -0
- package/dist/server/shared/http/withAccessCheck.js +16 -0
- package/dist/server/shared/http/withAccessCheck.js.map +1 -0
- package/dist/server/shared/http/withAccessCheck.test.d.ts +2 -0
- package/dist/server/shared/http/withAccessCheck.test.d.ts.map +1 -0
- package/dist/server/shared/http/withAccessCheck.test.js +46 -0
- package/dist/server/shared/http/withErrorHandler.d.ts +6 -0
- package/dist/server/shared/http/withErrorHandler.d.ts.map +1 -0
- package/dist/server/shared/http/withErrorHandler.js +23 -0
- package/dist/server/shared/http/withErrorHandler.js.map +1 -0
- package/dist/server/shared/http/withErrorHandler.test.d.ts +2 -0
- package/dist/server/shared/http/withErrorHandler.test.d.ts.map +1 -0
- package/dist/server/shared/http/withErrorHandler.test.js +69 -0
- package/dist/server/shared/index.d.ts +11 -0
- package/dist/server/shared/index.d.ts.map +1 -0
- package/dist/server/shared/index.js +13 -0
- package/dist/server/shared/index.js.map +1 -0
- package/dist/server/shared/lexical/collectTextNodes.d.ts +10 -0
- package/dist/server/shared/lexical/collectTextNodes.d.ts.map +1 -0
- package/dist/server/shared/lexical/collectTextNodes.js +31 -0
- package/dist/server/shared/lexical/collectTextNodes.js.map +1 -0
- package/dist/server/shared/lexical/collectTextNodes.test.d.ts +2 -0
- package/dist/server/shared/lexical/collectTextNodes.test.d.ts.map +1 -0
- package/dist/server/shared/lexical/collectTextNodes.test.js +120 -0
- package/dist/server/shared/lexical/guards.d.ts +20 -0
- package/dist/server/shared/lexical/guards.d.ts.map +1 -0
- package/dist/server/shared/lexical/guards.js +18 -0
- package/dist/server/shared/lexical/guards.js.map +1 -0
- package/dist/server/shared/lexical/guards.test.d.ts +2 -0
- package/dist/server/shared/lexical/guards.test.d.ts.map +1 -0
- package/dist/server/shared/lexical/guards.test.js +160 -0
- package/dist/server/shared/lexical/index.d.ts +7 -0
- package/dist/server/shared/lexical/index.d.ts.map +1 -0
- package/dist/server/shared/lexical/index.js +6 -0
- package/dist/server/shared/lexical/index.js.map +1 -0
- package/dist/server/shared/lexical/isEmptyRichText.d.ts +14 -0
- package/dist/server/shared/lexical/isEmptyRichText.d.ts.map +1 -0
- package/dist/server/shared/lexical/isEmptyRichText.js +31 -0
- package/dist/server/shared/lexical/isEmptyRichText.js.map +1 -0
- package/dist/server/shared/lexical/isEmptyRichText.test.d.ts +2 -0
- package/dist/server/shared/lexical/isEmptyRichText.test.d.ts.map +1 -0
- package/dist/server/shared/lexical/isEmptyRichText.test.js +251 -0
- package/dist/server/shared/lexical/traverseLexicalTree.d.ts +11 -0
- package/dist/server/shared/lexical/traverseLexicalTree.d.ts.map +1 -0
- package/dist/server/shared/lexical/traverseLexicalTree.js +19 -0
- package/dist/server/shared/lexical/traverseLexicalTree.js.map +1 -0
- package/dist/server/shared/lexical/traverseLexicalTree.test.d.ts +2 -0
- package/dist/server/shared/lexical/traverseLexicalTree.test.d.ts.map +1 -0
- package/dist/server/shared/lexical/traverseLexicalTree.test.js +112 -0
- package/dist/server/shared/lexical/types.d.ts +20 -0
- package/dist/server/shared/lexical/types.d.ts.map +1 -0
- package/dist/server/shared/lexical/types.js +8 -0
- package/dist/server/shared/lexical/types.js.map +1 -0
- package/dist/server/shared/utils/LazyMap.d.ts +71 -0
- package/dist/server/shared/utils/LazyMap.d.ts.map +1 -0
- package/dist/server/shared/utils/LazyMap.js +95 -0
- package/dist/server/shared/utils/LazyMap.js.map +1 -0
- package/dist/server/shared/utils/LazyMap.test.d.ts +2 -0
- package/dist/server/shared/utils/LazyMap.test.d.ts.map +1 -0
- package/dist/server/shared/utils/LazyMap.test.js +262 -0
- package/dist/server/shared/utils/filterLocalizedFields.d.ts +11 -0
- package/dist/server/shared/utils/filterLocalizedFields.d.ts.map +1 -0
- package/dist/server/shared/utils/filterLocalizedFields.js +72 -0
- package/dist/server/shared/utils/filterLocalizedFields.js.map +1 -0
- package/dist/server/shared/utils/filterLocalizedFields.test.d.ts +2 -0
- package/dist/server/shared/utils/filterLocalizedFields.test.d.ts.map +1 -0
- package/dist/server/shared/utils/filterLocalizedFields.test.js +338 -0
- package/dist/server/shared/utils/getByPath.d.ts +9 -0
- package/dist/server/shared/utils/getByPath.d.ts.map +1 -0
- package/dist/server/shared/utils/getByPath.js +18 -0
- package/dist/server/shared/utils/getByPath.js.map +1 -0
- package/dist/server/shared/utils/getByPath.test.d.ts +2 -0
- package/dist/server/shared/utils/getByPath.test.d.ts.map +1 -0
- package/dist/server/shared/utils/getByPath.test.js +33 -0
- package/dist/server/shared/utils/index.d.ts +10 -0
- package/dist/server/shared/utils/index.d.ts.map +1 -0
- package/dist/server/shared/utils/index.js +10 -0
- package/dist/server/shared/utils/index.js.map +1 -0
- package/dist/server/shared/utils/isEmpty.d.ts +9 -0
- package/dist/server/shared/utils/isEmpty.d.ts.map +1 -0
- package/dist/server/shared/utils/isEmpty.js +15 -0
- package/dist/server/shared/utils/isEmpty.js.map +1 -0
- package/dist/server/shared/utils/isEmpty.test.d.ts +2 -0
- package/dist/server/shared/utils/isEmpty.test.d.ts.map +1 -0
- package/dist/server/shared/utils/isEmpty.test.js +60 -0
- package/dist/server/shared/utils/isObject.d.ts +5 -0
- package/dist/server/shared/utils/isObject.d.ts.map +1 -0
- package/dist/server/shared/utils/isObject.js +7 -0
- package/dist/server/shared/utils/isObject.js.map +1 -0
- package/dist/server/shared/utils/isObject.test.d.ts +2 -0
- package/dist/server/shared/utils/isObject.test.d.ts.map +1 -0
- package/dist/server/shared/utils/isObject.test.js +57 -0
- package/dist/server/shared/utils/normalizePath.d.ts +16 -0
- package/dist/server/shared/utils/normalizePath.d.ts.map +1 -0
- package/dist/server/shared/utils/normalizePath.js +22 -0
- package/dist/server/shared/utils/normalizePath.js.map +1 -0
- package/dist/server/shared/utils/normalizePath.test.d.ts +2 -0
- package/dist/server/shared/utils/normalizePath.test.d.ts.map +1 -0
- package/dist/server/shared/utils/normalizePath.test.js +33 -0
- package/dist/server/shared/utils/pipe.d.ts +5 -0
- package/dist/server/shared/utils/pipe.d.ts.map +1 -0
- package/dist/server/shared/utils/pipe.js +5 -0
- package/dist/server/shared/utils/pipe.js.map +1 -0
- package/dist/server/shared/utils/pipe.test.d.ts +2 -0
- package/dist/server/shared/utils/pipe.test.d.ts.map +1 -0
- package/dist/server/shared/utils/pipe.test.js +55 -0
- package/dist/server/shared/utils/setByPath.d.ts +11 -0
- package/dist/server/shared/utils/setByPath.d.ts.map +1 -0
- package/dist/server/shared/utils/setByPath.js +26 -0
- package/dist/server/shared/utils/setByPath.js.map +1 -0
- package/dist/server/shared/utils/setByPath.test.d.ts +2 -0
- package/dist/server/shared/utils/setByPath.test.d.ts.map +1 -0
- package/dist/server/shared/utils/setByPath.test.js +46 -0
- package/dist/types/AccessGuard.d.ts +12 -0
- package/dist/types/AccessGuard.d.ts.map +1 -0
- package/dist/types/AccessGuard.js +3 -0
- package/dist/types/AccessGuard.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/vitest-env.d.js +3 -0
- package/dist/vitest-env.d.js.map +1 -0
- package/package.json +91 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { DataReconcilerStage, FieldChunkCollectorStage, TranslationStage, TextChunkExpanderStage, TranslationMutatorStage } from './stages';
|
|
2
|
+
/**
|
|
3
|
+
* Main orchestrator for the translation pipeline.
|
|
4
|
+
* Coordinates all stages in sequence via PipelineContext.
|
|
5
|
+
*
|
|
6
|
+
* Pipeline stages:
|
|
7
|
+
* 1. DataReconcilerStage - Reconcile source/target data preserving full document shape
|
|
8
|
+
* 2. FieldChunkCollectorStage - Collect FieldChunks (schema-aware)
|
|
9
|
+
* 3. TextChunkExpanderStage - Expand FieldChunks to TextChunks (schema-free)
|
|
10
|
+
* 4. TranslationStage - Call translation provider
|
|
11
|
+
* 5. TranslationMutatorStage - Apply translations via mutation
|
|
12
|
+
*
|
|
13
|
+
* Pipeline only transforms data. Saving is the caller's responsibility.
|
|
14
|
+
*/ export class TranslationPipeline {
|
|
15
|
+
stages;
|
|
16
|
+
constructor(options){
|
|
17
|
+
this.stages = [
|
|
18
|
+
new DataReconcilerStage(),
|
|
19
|
+
new FieldChunkCollectorStage(options.translationStrategy),
|
|
20
|
+
new TextChunkExpanderStage(options.textExpanders),
|
|
21
|
+
new TranslationStage(options.translationProvider),
|
|
22
|
+
new TranslationMutatorStage()
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Executes the translation pipeline.
|
|
27
|
+
* Returns transformed data ready to be saved, or null if nothing to translate.
|
|
28
|
+
*/ async execute(config) {
|
|
29
|
+
let ctx = {
|
|
30
|
+
schema: config.schema,
|
|
31
|
+
sourceData: config.sourceData,
|
|
32
|
+
targetData: config.targetData,
|
|
33
|
+
sourceLng: config.sourceLng,
|
|
34
|
+
targetLng: config.targetLng
|
|
35
|
+
};
|
|
36
|
+
for (const stage of this.stages){
|
|
37
|
+
ctx = await stage.execute(ctx);
|
|
38
|
+
// Early exit checks
|
|
39
|
+
if (ctx.fieldChunks !== undefined && ctx.fieldChunks.length === 0) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
if (ctx.textMap !== undefined && Object.keys(ctx.textMap).length === 0) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (!ctx.filteredData) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
translatedData: ctx.filteredData
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=TranslationPipeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/server/modules/translation-pipeline/TranslationPipeline.ts"],"sourcesContent":["import type { TranslationProvider } from '../translation-providers'\nimport type { PipelineConfig, PipelineResult, PipelineContext, PipelineStage } from './types'\nimport type { TranslationStrategy } from './strategies'\nimport type { TextExpander } from './stages'\nimport {\n DataReconcilerStage,\n FieldChunkCollectorStage,\n TranslationStage,\n TextChunkExpanderStage,\n TranslationMutatorStage,\n} from './stages'\n\n/**\n * Options for TranslationPipeline.\n */\nexport type TranslationPipelineOptions = {\n translationProvider: TranslationProvider\n translationStrategy: TranslationStrategy\n textExpanders?: TextExpander[]\n}\n\n/**\n * Main orchestrator for the translation pipeline.\n * Coordinates all stages in sequence via PipelineContext.\n *\n * Pipeline stages:\n * 1. DataReconcilerStage - Reconcile source/target data preserving full document shape\n * 2. FieldChunkCollectorStage - Collect FieldChunks (schema-aware)\n * 3. TextChunkExpanderStage - Expand FieldChunks to TextChunks (schema-free)\n * 4. TranslationStage - Call translation provider\n * 5. TranslationMutatorStage - Apply translations via mutation\n *\n * Pipeline only transforms data. Saving is the caller's responsibility.\n */\nexport class TranslationPipeline {\n private readonly stages: PipelineStage[]\n\n constructor(options: TranslationPipelineOptions) {\n this.stages = [\n new DataReconcilerStage(),\n new FieldChunkCollectorStage(options.translationStrategy),\n new TextChunkExpanderStage(options.textExpanders),\n new TranslationStage(options.translationProvider),\n new TranslationMutatorStage(),\n ]\n }\n\n /**\n * Executes the translation pipeline.\n * Returns transformed data ready to be saved, or null if nothing to translate.\n */\n async execute(config: PipelineConfig): Promise<PipelineResult | null> {\n let ctx: PipelineContext = {\n schema: config.schema,\n sourceData: config.sourceData,\n targetData: config.targetData,\n sourceLng: config.sourceLng,\n targetLng: config.targetLng,\n }\n\n for (const stage of this.stages) {\n ctx = await stage.execute(ctx)\n\n // Early exit checks\n if (ctx.fieldChunks !== undefined && ctx.fieldChunks.length === 0) {\n return null\n }\n if (ctx.textMap !== undefined && Object.keys(ctx.textMap).length === 0) {\n return null\n }\n }\n\n if (!ctx.filteredData) {\n return null\n }\n\n return {\n translatedData: ctx.filteredData,\n }\n }\n}\n"],"names":["DataReconcilerStage","FieldChunkCollectorStage","TranslationStage","TextChunkExpanderStage","TranslationMutatorStage","TranslationPipeline","stages","options","translationStrategy","textExpanders","translationProvider","execute","config","ctx","schema","sourceData","targetData","sourceLng","targetLng","stage","fieldChunks","undefined","length","textMap","Object","keys","filteredData","translatedData"],"mappings":"AAIA,SACEA,mBAAmB,EACnBC,wBAAwB,EACxBC,gBAAgB,EAChBC,sBAAsB,EACtBC,uBAAuB,QAClB,WAAU;AAWjB;;;;;;;;;;;;CAYC,GACD,OAAO,MAAMC;IACMC,OAAuB;IAExC,YAAYC,OAAmC,CAAE;QAC/C,IAAI,CAACD,MAAM,GAAG;YACZ,IAAIN;YACJ,IAAIC,yBAAyBM,QAAQC,mBAAmB;YACxD,IAAIL,uBAAuBI,QAAQE,aAAa;YAChD,IAAIP,iBAAiBK,QAAQG,mBAAmB;YAChD,IAAIN;SACL;IACH;IAEA;;;GAGC,GACD,MAAMO,QAAQC,MAAsB,EAAkC;QACpE,IAAIC,MAAuB;YACzBC,QAAQF,OAAOE,MAAM;YACrBC,YAAYH,OAAOG,UAAU;YAC7BC,YAAYJ,OAAOI,UAAU;YAC7BC,WAAWL,OAAOK,SAAS;YAC3BC,WAAWN,OAAOM,SAAS;QAC7B;QAEA,KAAK,MAAMC,SAAS,IAAI,CAACb,MAAM,CAAE;YAC/BO,MAAM,MAAMM,MAAMR,OAAO,CAACE;YAE1B,oBAAoB;YACpB,IAAIA,IAAIO,WAAW,KAAKC,aAAaR,IAAIO,WAAW,CAACE,MAAM,KAAK,GAAG;gBACjE,OAAO;YACT;YACA,IAAIT,IAAIU,OAAO,KAAKF,aAAaG,OAAOC,IAAI,CAACZ,IAAIU,OAAO,EAAED,MAAM,KAAK,GAAG;gBACtE,OAAO;YACT;QACF;QAEA,IAAI,CAACT,IAAIa,YAAY,EAAE;YACrB,OAAO;QACT;QAEA,OAAO;YACLC,gBAAgBd,IAAIa,YAAY;QAClC;IACF;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TranslationPipeline.test.d.ts","sourceRoot":"","sources":["../../../../src/server/modules/translation-pipeline/TranslationPipeline.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,552 @@
|
|
|
1
|
+
import { describe, it, expect, vi } from 'vitest';
|
|
2
|
+
import { TranslationPipeline } from './TranslationPipeline';
|
|
3
|
+
import { OverwriteStrategy } from './strategies/Overwrite.strategy';
|
|
4
|
+
import { SkipExistingStrategy } from './strategies/SkipExisting.strategy';
|
|
5
|
+
const createMockProvider = (translationFn) => ({
|
|
6
|
+
translate: vi.fn().mockImplementation(async (textMap) => {
|
|
7
|
+
if (translationFn)
|
|
8
|
+
return translationFn(textMap);
|
|
9
|
+
// Default: prefix each value with "TR_"
|
|
10
|
+
const result = {};
|
|
11
|
+
for (const [key, value] of Object.entries(textMap)) {
|
|
12
|
+
result[Number(key)] = `TR_${value}`;
|
|
13
|
+
}
|
|
14
|
+
return result;
|
|
15
|
+
}),
|
|
16
|
+
});
|
|
17
|
+
describe('TranslationPipeline', () => {
|
|
18
|
+
describe('basic translation', () => {
|
|
19
|
+
it('translates simple text fields', async () => {
|
|
20
|
+
const schema = [{ name: 'title', type: 'text', localized: true }];
|
|
21
|
+
const sourceData = { title: 'Hello' };
|
|
22
|
+
const targetData = {};
|
|
23
|
+
const provider = createMockProvider();
|
|
24
|
+
const pipeline = new TranslationPipeline({
|
|
25
|
+
translationProvider: provider,
|
|
26
|
+
translationStrategy: new OverwriteStrategy(),
|
|
27
|
+
});
|
|
28
|
+
const result = await pipeline.execute({
|
|
29
|
+
schema,
|
|
30
|
+
sourceData,
|
|
31
|
+
targetData,
|
|
32
|
+
sourceLng: 'en',
|
|
33
|
+
targetLng: 'ru',
|
|
34
|
+
});
|
|
35
|
+
expect(result).not.toBeNull();
|
|
36
|
+
expect(result.translatedData).toEqual({ title: 'TR_Hello' });
|
|
37
|
+
expect(provider.translate).toHaveBeenCalledWith({ 0: 'Hello' }, 'en', 'ru');
|
|
38
|
+
});
|
|
39
|
+
it('translates multiple fields', async () => {
|
|
40
|
+
const schema = [
|
|
41
|
+
{ name: 'title', type: 'text', localized: true },
|
|
42
|
+
{ name: 'description', type: 'textarea', localized: true },
|
|
43
|
+
];
|
|
44
|
+
const sourceData = { title: 'Hello', description: 'World' };
|
|
45
|
+
const targetData = {};
|
|
46
|
+
const provider = createMockProvider();
|
|
47
|
+
const pipeline = new TranslationPipeline({
|
|
48
|
+
translationProvider: provider,
|
|
49
|
+
translationStrategy: new OverwriteStrategy(),
|
|
50
|
+
});
|
|
51
|
+
const result = await pipeline.execute({
|
|
52
|
+
schema,
|
|
53
|
+
sourceData,
|
|
54
|
+
targetData,
|
|
55
|
+
sourceLng: 'en',
|
|
56
|
+
targetLng: 'ru',
|
|
57
|
+
});
|
|
58
|
+
expect(result).not.toBeNull();
|
|
59
|
+
expect(result.translatedData).toEqual({ title: 'TR_Hello', description: 'TR_World' });
|
|
60
|
+
});
|
|
61
|
+
it('translates nested fields in groups', async () => {
|
|
62
|
+
const schema = [
|
|
63
|
+
{
|
|
64
|
+
name: 'meta',
|
|
65
|
+
type: 'group',
|
|
66
|
+
fields: [{ name: 'title', type: 'text', localized: true }],
|
|
67
|
+
},
|
|
68
|
+
];
|
|
69
|
+
const sourceData = { meta: { title: 'Hello' } };
|
|
70
|
+
const targetData = {};
|
|
71
|
+
const provider = createMockProvider();
|
|
72
|
+
const pipeline = new TranslationPipeline({
|
|
73
|
+
translationProvider: provider,
|
|
74
|
+
translationStrategy: new OverwriteStrategy(),
|
|
75
|
+
});
|
|
76
|
+
const result = await pipeline.execute({
|
|
77
|
+
schema,
|
|
78
|
+
sourceData,
|
|
79
|
+
targetData,
|
|
80
|
+
sourceLng: 'en',
|
|
81
|
+
targetLng: 'ru',
|
|
82
|
+
});
|
|
83
|
+
expect(result).not.toBeNull();
|
|
84
|
+
expect(result.translatedData).toEqual({ meta: { title: 'TR_Hello' } });
|
|
85
|
+
});
|
|
86
|
+
it('translates array items', async () => {
|
|
87
|
+
const schema = [
|
|
88
|
+
{
|
|
89
|
+
name: 'items',
|
|
90
|
+
type: 'array',
|
|
91
|
+
fields: [{ name: 'label', type: 'text', localized: true }],
|
|
92
|
+
},
|
|
93
|
+
];
|
|
94
|
+
const sourceData = {
|
|
95
|
+
items: [
|
|
96
|
+
{ id: '1', label: 'First' },
|
|
97
|
+
{ id: '2', label: 'Second' },
|
|
98
|
+
],
|
|
99
|
+
};
|
|
100
|
+
const targetData = {};
|
|
101
|
+
const provider = createMockProvider();
|
|
102
|
+
const pipeline = new TranslationPipeline({
|
|
103
|
+
translationProvider: provider,
|
|
104
|
+
translationStrategy: new OverwriteStrategy(),
|
|
105
|
+
});
|
|
106
|
+
const result = await pipeline.execute({
|
|
107
|
+
schema,
|
|
108
|
+
sourceData,
|
|
109
|
+
targetData,
|
|
110
|
+
sourceLng: 'en',
|
|
111
|
+
targetLng: 'ru',
|
|
112
|
+
});
|
|
113
|
+
expect(result).not.toBeNull();
|
|
114
|
+
// Note: id is not included in result - Postgres rejects it on update
|
|
115
|
+
expect(result.translatedData).toEqual({
|
|
116
|
+
items: [{ label: 'TR_First' }, { label: 'TR_Second' }],
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
describe('richText translation', () => {
|
|
121
|
+
it('translates richText text nodes', async () => {
|
|
122
|
+
const schema = [{ name: 'content', type: 'richText', localized: true }];
|
|
123
|
+
const sourceData = {
|
|
124
|
+
content: {
|
|
125
|
+
root: {
|
|
126
|
+
type: 'root',
|
|
127
|
+
children: [
|
|
128
|
+
{
|
|
129
|
+
type: 'paragraph',
|
|
130
|
+
children: [{ type: 'text', text: 'Hello', version: 1 }],
|
|
131
|
+
version: 1,
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
version: 1,
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
const targetData = {};
|
|
139
|
+
const provider = createMockProvider();
|
|
140
|
+
const pipeline = new TranslationPipeline({
|
|
141
|
+
translationProvider: provider,
|
|
142
|
+
translationStrategy: new OverwriteStrategy(),
|
|
143
|
+
});
|
|
144
|
+
const result = await pipeline.execute({
|
|
145
|
+
schema,
|
|
146
|
+
sourceData,
|
|
147
|
+
targetData,
|
|
148
|
+
sourceLng: 'en',
|
|
149
|
+
targetLng: 'ru',
|
|
150
|
+
});
|
|
151
|
+
expect(result).not.toBeNull();
|
|
152
|
+
// The richText structure should have translated text nodes
|
|
153
|
+
const content = result.translatedData.content;
|
|
154
|
+
expect(content.root.children[0].children[0].text).toBe('TR_Hello');
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
describe('strategy filtering', () => {
|
|
158
|
+
it('OverwriteStrategy translates all fields', async () => {
|
|
159
|
+
const schema = [{ name: 'title', type: 'text', localized: true }];
|
|
160
|
+
const sourceData = { title: 'Hello' };
|
|
161
|
+
const targetData = { title: 'Existing translation' };
|
|
162
|
+
const provider = createMockProvider();
|
|
163
|
+
const pipeline = new TranslationPipeline({
|
|
164
|
+
translationProvider: provider,
|
|
165
|
+
translationStrategy: new OverwriteStrategy(),
|
|
166
|
+
});
|
|
167
|
+
const result = await pipeline.execute({
|
|
168
|
+
schema,
|
|
169
|
+
sourceData,
|
|
170
|
+
targetData,
|
|
171
|
+
sourceLng: 'en',
|
|
172
|
+
targetLng: 'ru',
|
|
173
|
+
});
|
|
174
|
+
expect(result).not.toBeNull();
|
|
175
|
+
expect(result.translatedData.title).toBe('TR_Hello');
|
|
176
|
+
});
|
|
177
|
+
it('SkipExistingStrategy skips fields with existing translations', async () => {
|
|
178
|
+
const schema = [
|
|
179
|
+
{ name: 'title', type: 'text', localized: true },
|
|
180
|
+
{ name: 'description', type: 'text', localized: true },
|
|
181
|
+
];
|
|
182
|
+
const sourceData = { title: 'Hello', description: 'World' };
|
|
183
|
+
const targetData = { title: 'Existing', description: '' };
|
|
184
|
+
const provider = createMockProvider();
|
|
185
|
+
const pipeline = new TranslationPipeline({
|
|
186
|
+
translationProvider: provider,
|
|
187
|
+
translationStrategy: new SkipExistingStrategy(),
|
|
188
|
+
});
|
|
189
|
+
const result = await pipeline.execute({
|
|
190
|
+
schema,
|
|
191
|
+
sourceData,
|
|
192
|
+
targetData,
|
|
193
|
+
sourceLng: 'en',
|
|
194
|
+
targetLng: 'ru',
|
|
195
|
+
});
|
|
196
|
+
expect(result).not.toBeNull();
|
|
197
|
+
// Result contains full document shape
|
|
198
|
+
// title: kept from target (already translated)
|
|
199
|
+
// description: translated from source
|
|
200
|
+
expect(result.translatedData).toEqual({
|
|
201
|
+
title: 'Existing',
|
|
202
|
+
description: 'TR_World',
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
describe('early exit conditions', () => {
|
|
207
|
+
it('returns null when no localized fields', async () => {
|
|
208
|
+
const schema = [{ name: 'slug', type: 'text', localized: false }];
|
|
209
|
+
const sourceData = { slug: 'hello' };
|
|
210
|
+
const targetData = {};
|
|
211
|
+
const provider = createMockProvider();
|
|
212
|
+
const pipeline = new TranslationPipeline({
|
|
213
|
+
translationProvider: provider,
|
|
214
|
+
translationStrategy: new OverwriteStrategy(),
|
|
215
|
+
});
|
|
216
|
+
const result = await pipeline.execute({
|
|
217
|
+
schema,
|
|
218
|
+
sourceData,
|
|
219
|
+
targetData,
|
|
220
|
+
sourceLng: 'en',
|
|
221
|
+
targetLng: 'ru',
|
|
222
|
+
});
|
|
223
|
+
expect(result).toBeNull();
|
|
224
|
+
expect(provider.translate).not.toHaveBeenCalled();
|
|
225
|
+
});
|
|
226
|
+
it('returns null when all fields already translated (SkipExisting)', async () => {
|
|
227
|
+
const schema = [{ name: 'title', type: 'text', localized: true }];
|
|
228
|
+
const sourceData = { title: 'Hello' };
|
|
229
|
+
const targetData = { title: 'Already translated' };
|
|
230
|
+
const provider = createMockProvider();
|
|
231
|
+
const pipeline = new TranslationPipeline({
|
|
232
|
+
translationProvider: provider,
|
|
233
|
+
translationStrategy: new SkipExistingStrategy(),
|
|
234
|
+
});
|
|
235
|
+
const result = await pipeline.execute({
|
|
236
|
+
schema,
|
|
237
|
+
sourceData,
|
|
238
|
+
targetData,
|
|
239
|
+
sourceLng: 'en',
|
|
240
|
+
targetLng: 'ru',
|
|
241
|
+
});
|
|
242
|
+
expect(result).toBeNull();
|
|
243
|
+
expect(provider.translate).not.toHaveBeenCalled();
|
|
244
|
+
});
|
|
245
|
+
it('returns null when source fields are empty', async () => {
|
|
246
|
+
const schema = [{ name: 'title', type: 'text', localized: true }];
|
|
247
|
+
const sourceData = { title: '' };
|
|
248
|
+
const targetData = {};
|
|
249
|
+
const provider = createMockProvider();
|
|
250
|
+
const pipeline = new TranslationPipeline({
|
|
251
|
+
translationProvider: provider,
|
|
252
|
+
translationStrategy: new OverwriteStrategy(),
|
|
253
|
+
});
|
|
254
|
+
const result = await pipeline.execute({
|
|
255
|
+
schema,
|
|
256
|
+
sourceData,
|
|
257
|
+
targetData,
|
|
258
|
+
sourceLng: 'en',
|
|
259
|
+
targetLng: 'ru',
|
|
260
|
+
});
|
|
261
|
+
expect(result).toBeNull();
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
describe('error handling', () => {
|
|
265
|
+
it('throws when translation provider returns null', async () => {
|
|
266
|
+
const schema = [{ name: 'title', type: 'text', localized: true }];
|
|
267
|
+
const sourceData = { title: 'Hello' };
|
|
268
|
+
const targetData = {};
|
|
269
|
+
const provider = {
|
|
270
|
+
translate: vi.fn().mockResolvedValue(null),
|
|
271
|
+
};
|
|
272
|
+
const pipeline = new TranslationPipeline({
|
|
273
|
+
translationProvider: provider,
|
|
274
|
+
translationStrategy: new OverwriteStrategy(),
|
|
275
|
+
});
|
|
276
|
+
await expect(pipeline.execute({
|
|
277
|
+
schema,
|
|
278
|
+
sourceData,
|
|
279
|
+
targetData,
|
|
280
|
+
sourceLng: 'en',
|
|
281
|
+
targetLng: 'ru',
|
|
282
|
+
})).rejects.toThrow('Translation provider returned null');
|
|
283
|
+
});
|
|
284
|
+
});
|
|
285
|
+
describe('data mutation', () => {
|
|
286
|
+
it('returns translated data without mutating original sourceData', async () => {
|
|
287
|
+
const schema = [{ name: 'title', type: 'text', localized: true }];
|
|
288
|
+
const sourceData = { title: 'Hello' };
|
|
289
|
+
const targetData = {};
|
|
290
|
+
const provider = createMockProvider();
|
|
291
|
+
const pipeline = new TranslationPipeline({
|
|
292
|
+
translationProvider: provider,
|
|
293
|
+
translationStrategy: new OverwriteStrategy(),
|
|
294
|
+
});
|
|
295
|
+
const result = await pipeline.execute({
|
|
296
|
+
schema,
|
|
297
|
+
sourceData,
|
|
298
|
+
targetData,
|
|
299
|
+
sourceLng: 'en',
|
|
300
|
+
targetLng: 'ru',
|
|
301
|
+
});
|
|
302
|
+
// Result contains translated data
|
|
303
|
+
expect(result.translatedData.title).toBe('TR_Hello');
|
|
304
|
+
// Original sourceData is NOT mutated (pipeline works on filtered copy)
|
|
305
|
+
expect(sourceData.title).toBe('Hello');
|
|
306
|
+
});
|
|
307
|
+
});
|
|
308
|
+
describe('full document shape preservation', () => {
|
|
309
|
+
it('preserves non-localized fields in result', async () => {
|
|
310
|
+
const schema = [
|
|
311
|
+
{ name: 'title', type: 'text', localized: true },
|
|
312
|
+
{ name: 'slug', type: 'text', localized: false },
|
|
313
|
+
{ name: 'order', type: 'number', localized: false },
|
|
314
|
+
];
|
|
315
|
+
const sourceData = { title: 'Hello', slug: 'hello', order: 1 };
|
|
316
|
+
const targetData = {};
|
|
317
|
+
const provider = createMockProvider();
|
|
318
|
+
const pipeline = new TranslationPipeline({
|
|
319
|
+
translationProvider: provider,
|
|
320
|
+
translationStrategy: new OverwriteStrategy(),
|
|
321
|
+
});
|
|
322
|
+
const result = await pipeline.execute({
|
|
323
|
+
schema,
|
|
324
|
+
sourceData,
|
|
325
|
+
targetData,
|
|
326
|
+
sourceLng: 'en',
|
|
327
|
+
targetLng: 'ru',
|
|
328
|
+
});
|
|
329
|
+
expect(result.translatedData).toEqual({
|
|
330
|
+
title: 'TR_Hello',
|
|
331
|
+
slug: 'hello',
|
|
332
|
+
order: 1,
|
|
333
|
+
});
|
|
334
|
+
});
|
|
335
|
+
it('preserves existing target non-localized values', async () => {
|
|
336
|
+
const schema = [
|
|
337
|
+
{ name: 'title', type: 'text', localized: true },
|
|
338
|
+
{ name: 'slug', type: 'text', localized: false },
|
|
339
|
+
];
|
|
340
|
+
const sourceData = { title: 'Hello', slug: 'hello' };
|
|
341
|
+
const targetData = { title: '', slug: 'other-slug' };
|
|
342
|
+
const provider = createMockProvider();
|
|
343
|
+
const pipeline = new TranslationPipeline({
|
|
344
|
+
translationProvider: provider,
|
|
345
|
+
translationStrategy: new OverwriteStrategy(),
|
|
346
|
+
});
|
|
347
|
+
const result = await pipeline.execute({
|
|
348
|
+
schema,
|
|
349
|
+
sourceData,
|
|
350
|
+
targetData,
|
|
351
|
+
sourceLng: 'en',
|
|
352
|
+
targetLng: 'ru',
|
|
353
|
+
});
|
|
354
|
+
expect(result.translatedData).toEqual({
|
|
355
|
+
title: 'TR_Hello',
|
|
356
|
+
slug: 'other-slug',
|
|
357
|
+
});
|
|
358
|
+
});
|
|
359
|
+
it('preserves existing target values with SkipExisting', async () => {
|
|
360
|
+
const schema = [
|
|
361
|
+
{ name: 'title', type: 'text', localized: true },
|
|
362
|
+
{ name: 'description', type: 'text', localized: true },
|
|
363
|
+
{ name: 'slug', type: 'text', localized: false },
|
|
364
|
+
];
|
|
365
|
+
const sourceData = { title: 'Hello', description: 'World', slug: 'hello' };
|
|
366
|
+
const targetData = { title: 'Translated', description: '', slug: 'other' };
|
|
367
|
+
const provider = createMockProvider();
|
|
368
|
+
const pipeline = new TranslationPipeline({
|
|
369
|
+
translationProvider: provider,
|
|
370
|
+
translationStrategy: new SkipExistingStrategy(),
|
|
371
|
+
});
|
|
372
|
+
const result = await pipeline.execute({
|
|
373
|
+
schema,
|
|
374
|
+
sourceData,
|
|
375
|
+
targetData,
|
|
376
|
+
sourceLng: 'en',
|
|
377
|
+
targetLng: 'ru',
|
|
378
|
+
});
|
|
379
|
+
expect(result.translatedData).toEqual({
|
|
380
|
+
title: 'Translated',
|
|
381
|
+
description: 'TR_World',
|
|
382
|
+
slug: 'other',
|
|
383
|
+
});
|
|
384
|
+
});
|
|
385
|
+
});
|
|
386
|
+
describe('nested structures with strategy', () => {
|
|
387
|
+
it('applies SkipExisting to nested array fields', async () => {
|
|
388
|
+
const schema = [
|
|
389
|
+
{
|
|
390
|
+
name: 'items',
|
|
391
|
+
type: 'array',
|
|
392
|
+
fields: [{ name: 'label', type: 'text', localized: true }],
|
|
393
|
+
},
|
|
394
|
+
];
|
|
395
|
+
const sourceData = {
|
|
396
|
+
items: [
|
|
397
|
+
{ id: '1', label: 'First' },
|
|
398
|
+
{ id: '2', label: 'Second' },
|
|
399
|
+
],
|
|
400
|
+
};
|
|
401
|
+
const targetData = {
|
|
402
|
+
items: [
|
|
403
|
+
{ id: '1', label: 'Translated' },
|
|
404
|
+
{ id: '2', label: '' },
|
|
405
|
+
],
|
|
406
|
+
};
|
|
407
|
+
const provider = createMockProvider();
|
|
408
|
+
const pipeline = new TranslationPipeline({
|
|
409
|
+
translationProvider: provider,
|
|
410
|
+
translationStrategy: new SkipExistingStrategy(),
|
|
411
|
+
});
|
|
412
|
+
const result = await pipeline.execute({
|
|
413
|
+
schema,
|
|
414
|
+
sourceData,
|
|
415
|
+
targetData,
|
|
416
|
+
sourceLng: 'en',
|
|
417
|
+
targetLng: 'ru',
|
|
418
|
+
});
|
|
419
|
+
// Note: id is not included in result - Postgres rejects it on update
|
|
420
|
+
expect(result.translatedData.items).toEqual([{ label: 'Translated' }, { label: 'TR_Second' }]);
|
|
421
|
+
});
|
|
422
|
+
it('applies SkipExisting to nested group fields', async () => {
|
|
423
|
+
const schema = [
|
|
424
|
+
{
|
|
425
|
+
name: 'meta',
|
|
426
|
+
type: 'group',
|
|
427
|
+
fields: [
|
|
428
|
+
{ name: 'title', type: 'text', localized: true },
|
|
429
|
+
{ name: 'description', type: 'text', localized: true },
|
|
430
|
+
],
|
|
431
|
+
},
|
|
432
|
+
];
|
|
433
|
+
const sourceData = { meta: { title: 'Hello', description: 'World' } };
|
|
434
|
+
const targetData = { meta: { title: 'Translated', description: '' } };
|
|
435
|
+
const provider = createMockProvider();
|
|
436
|
+
const pipeline = new TranslationPipeline({
|
|
437
|
+
translationProvider: provider,
|
|
438
|
+
translationStrategy: new SkipExistingStrategy(),
|
|
439
|
+
});
|
|
440
|
+
const result = await pipeline.execute({
|
|
441
|
+
schema,
|
|
442
|
+
sourceData,
|
|
443
|
+
targetData,
|
|
444
|
+
sourceLng: 'en',
|
|
445
|
+
targetLng: 'ru',
|
|
446
|
+
});
|
|
447
|
+
expect(result.translatedData.meta).toEqual({
|
|
448
|
+
title: 'Translated',
|
|
449
|
+
description: 'TR_World',
|
|
450
|
+
});
|
|
451
|
+
});
|
|
452
|
+
it('applies SkipExisting to blocks fields', async () => {
|
|
453
|
+
const schema = [
|
|
454
|
+
{
|
|
455
|
+
name: 'layout',
|
|
456
|
+
type: 'blocks',
|
|
457
|
+
blocks: [
|
|
458
|
+
{
|
|
459
|
+
slug: 'text',
|
|
460
|
+
fields: [{ name: 'content', type: 'text', localized: true }],
|
|
461
|
+
},
|
|
462
|
+
],
|
|
463
|
+
},
|
|
464
|
+
];
|
|
465
|
+
const sourceData = {
|
|
466
|
+
layout: [
|
|
467
|
+
{ id: '1', blockType: 'text', content: 'Hello' },
|
|
468
|
+
{ id: '2', blockType: 'text', content: 'World' },
|
|
469
|
+
],
|
|
470
|
+
};
|
|
471
|
+
const targetData = {
|
|
472
|
+
layout: [
|
|
473
|
+
{ id: '1', blockType: 'text', content: 'Translated' },
|
|
474
|
+
{ id: '2', blockType: 'text', content: '' },
|
|
475
|
+
],
|
|
476
|
+
};
|
|
477
|
+
const provider = createMockProvider();
|
|
478
|
+
const pipeline = new TranslationPipeline({
|
|
479
|
+
translationProvider: provider,
|
|
480
|
+
translationStrategy: new SkipExistingStrategy(),
|
|
481
|
+
});
|
|
482
|
+
const result = await pipeline.execute({
|
|
483
|
+
schema,
|
|
484
|
+
sourceData,
|
|
485
|
+
targetData,
|
|
486
|
+
sourceLng: 'en',
|
|
487
|
+
targetLng: 'ru',
|
|
488
|
+
});
|
|
489
|
+
// Note: id is not included in result - Postgres rejects it on update
|
|
490
|
+
expect(result.translatedData.layout).toEqual([
|
|
491
|
+
{ blockType: 'text', content: 'Translated' },
|
|
492
|
+
{ blockType: 'text', content: 'TR_World' },
|
|
493
|
+
]);
|
|
494
|
+
});
|
|
495
|
+
});
|
|
496
|
+
describe('translateKit.exclude handling', () => {
|
|
497
|
+
it('skips excluded fields from translation', async () => {
|
|
498
|
+
const schema = [
|
|
499
|
+
{ name: 'title', type: 'text', localized: true },
|
|
500
|
+
{
|
|
501
|
+
name: 'sku',
|
|
502
|
+
type: 'text',
|
|
503
|
+
localized: true,
|
|
504
|
+
custom: { translateKit: { exclude: true } },
|
|
505
|
+
},
|
|
506
|
+
];
|
|
507
|
+
const sourceData = { title: 'Hello', sku: 'SKU-123' };
|
|
508
|
+
const targetData = { sku: 'SKU-456' };
|
|
509
|
+
const provider = createMockProvider();
|
|
510
|
+
const pipeline = new TranslationPipeline({
|
|
511
|
+
translationProvider: provider,
|
|
512
|
+
translationStrategy: new OverwriteStrategy(),
|
|
513
|
+
});
|
|
514
|
+
const result = await pipeline.execute({
|
|
515
|
+
schema,
|
|
516
|
+
sourceData,
|
|
517
|
+
targetData,
|
|
518
|
+
sourceLng: 'en',
|
|
519
|
+
targetLng: 'ru',
|
|
520
|
+
});
|
|
521
|
+
expect(result.translatedData.title).toBe('TR_Hello');
|
|
522
|
+
expect(result.translatedData.sku).toBe('SKU-456');
|
|
523
|
+
});
|
|
524
|
+
it('uses source value for excluded fields when target is empty', async () => {
|
|
525
|
+
const schema = [
|
|
526
|
+
{ name: 'title', type: 'text', localized: true },
|
|
527
|
+
{
|
|
528
|
+
name: 'sku',
|
|
529
|
+
type: 'text',
|
|
530
|
+
localized: true,
|
|
531
|
+
custom: { translateKit: { exclude: true } },
|
|
532
|
+
},
|
|
533
|
+
];
|
|
534
|
+
const sourceData = { title: 'Hello', sku: 'SKU-123' };
|
|
535
|
+
const targetData = {};
|
|
536
|
+
const provider = createMockProvider();
|
|
537
|
+
const pipeline = new TranslationPipeline({
|
|
538
|
+
translationProvider: provider,
|
|
539
|
+
translationStrategy: new OverwriteStrategy(),
|
|
540
|
+
});
|
|
541
|
+
const result = await pipeline.execute({
|
|
542
|
+
schema,
|
|
543
|
+
sourceData,
|
|
544
|
+
targetData,
|
|
545
|
+
sourceLng: 'en',
|
|
546
|
+
targetLng: 'ru',
|
|
547
|
+
});
|
|
548
|
+
expect(result.translatedData.title).toBe('TR_Hello');
|
|
549
|
+
expect(result.translatedData.sku).toBe('SKU-123');
|
|
550
|
+
});
|
|
551
|
+
});
|
|
552
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/server/modules/translation-pipeline/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AACvD,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/server/modules/translation-pipeline/index.ts"],"sourcesContent":["export { TranslationPipeline } from './TranslationPipeline'\nexport type { TranslationStrategy } from './strategies'\nexport { OverwriteStrategy, SkipExistingStrategy } from './strategies'\n"],"names":["TranslationPipeline","OverwriteStrategy","SkipExistingStrategy"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,wBAAuB;AAE3D,SAASC,iBAAiB,EAAEC,oBAAoB,QAAQ,eAAc"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Field } from 'payload';
|
|
2
|
+
/**
|
|
3
|
+
* Deep merges source and target data with target priority.
|
|
4
|
+
* Creates full document shape needed for Payload validation.
|
|
5
|
+
*
|
|
6
|
+
* Logic:
|
|
7
|
+
* - If targetValue exists and is not empty → use targetValue
|
|
8
|
+
* - Otherwise → use sourceValue
|
|
9
|
+
*
|
|
10
|
+
* Stage 1 of the translation pipeline.
|
|
11
|
+
*/
|
|
12
|
+
export declare class DataReconciler {
|
|
13
|
+
private readonly schema;
|
|
14
|
+
constructor(schema: Field[]);
|
|
15
|
+
/**
|
|
16
|
+
* Reconciles source and target data into a complete document shape.
|
|
17
|
+
* The result contains all fields needed for Payload validation.
|
|
18
|
+
*
|
|
19
|
+
* @param sourceData - Source locale document data
|
|
20
|
+
* @param targetData - Target locale document data (may be empty/partial)
|
|
21
|
+
* @returns Complete document shape with reconciled field values
|
|
22
|
+
*/
|
|
23
|
+
reconcile(sourceData: Record<string, unknown>, targetData: Record<string, unknown>): Record<string, unknown>;
|
|
24
|
+
private reconcileFields;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=DataReconciler.d.ts.map
|
package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataReconciler.d.ts","sourceRoot":"","sources":["../../../../../../src/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAKpC;;;;;;;;;GASG;AACH,qBAAa,cAAc;IACb,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,KAAK,EAAE;IAE5C;;;;;;;OAOG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAI5G,OAAO,CAAC,eAAe;CAiFxB"}
|