@focus-reactive/payload-plugin-translator 0.6.0 → 0.6.2
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/README.md +172 -306
- package/dist/client/app/cache/CacheProvider.d.ts +1 -1
- package/dist/client/app/cache/CacheProvider.export.d.ts +1 -1
- package/dist/client/app/cache/CacheProvider.export.js +2 -2
- package/dist/client/app/cache/CacheProvider.js +5 -5
- package/dist/client/app/config/TranslateKitConfigContext.d.ts +1 -1
- package/dist/client/app/config/TranslateKitConfigContext.js +3 -3
- package/dist/client/app/config/index.d.ts +2 -2
- package/dist/client/app/config/index.js +1 -1
- package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.js +7 -7
- package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.js +7 -7
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.d.ts +1 -1
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.js +8 -8
- package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.js +6 -6
- package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.js +7 -7
- package/dist/client/entities/translation/api/mutations/useTranslateField.d.ts +1 -1
- package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.d.ts +2 -2
- package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.js +9 -10
- package/dist/client/entities/translation/api/queries/useDocumentTranslation.d.ts +2 -2
- package/dist/client/entities/translation/api/queries/useDocumentTranslation.js +9 -10
- package/dist/client/entities/translation/index.d.ts +12 -12
- package/dist/client/entities/translation/index.js +11 -11
- package/dist/client/entities/translation/model/types.d.ts +1 -1
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.js +12 -12
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.d.ts +1 -1
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.js +1 -1
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/styles.module.scss +1 -1
- package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.js +8 -8
- package/dist/client/entities/translation/ui/FailedTranslationStatus/index.d.ts +1 -1
- package/dist/client/entities/translation/ui/FailedTranslationStatus/index.js +1 -1
- package/dist/client/entities/translation/ui/FailedTranslationStatus/styles.module.scss +1 -1
- package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.js +14 -14
- package/dist/client/entities/translation/ui/PendingTranslationStatus/index.d.ts +1 -1
- package/dist/client/entities/translation/ui/PendingTranslationStatus/index.js +1 -1
- package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.js +13 -13
- package/dist/client/entities/translation/ui/RunningTranslationStatus/index.d.ts +1 -1
- package/dist/client/entities/translation/ui/RunningTranslationStatus/index.js +1 -1
- package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.d.ts +1 -1
- package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.js +2 -2
- package/dist/client/entities/translation/ui/TranslationDirection/index.d.ts +1 -1
- package/dist/client/entities/translation/ui/TranslationDirection/index.js +1 -1
- package/dist/client/entities/translation/ui/TranslationDirection/styles.module.scss +1 -1
- package/dist/client/features/collection-translation-form/index.client.d.ts +1 -1
- package/dist/client/features/collection-translation-form/index.client.js +1 -1
- package/dist/client/features/collection-translation-form/index.d.ts +3 -3
- package/dist/client/features/collection-translation-form/index.js +2 -2
- package/dist/client/features/collection-translation-form/model/constants.d.ts +1 -1
- package/dist/client/features/collection-translation-form/model/constants.js +9 -9
- package/dist/client/features/collection-translation-form/model/form-model.d.ts +1 -1
- package/dist/client/features/collection-translation-form/model/index.d.ts +1 -1
- package/dist/client/features/collection-translation-form/model/index.js +1 -1
- package/dist/client/features/collection-translation-form/model/schema.d.ts +1 -1
- package/dist/client/features/collection-translation-form/model/schema.js +6 -6
- package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.d.ts +1 -1
- package/dist/client/features/collection-translation-form/ui/index.d.ts +1 -1
- package/dist/client/features/collection-translation-form/ui/index.js +1 -1
- package/dist/client/features/collection-translation-form/ui/styles.module.scss +1 -1
- package/dist/client/features/collection-translation-popup/index.d.ts +1 -1
- package/dist/client/features/collection-translation-popup/index.js +1 -1
- package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.d.ts +1 -1
- package/dist/client/features/collection-translation-popup/ui/styles.module.scss +1 -1
- package/dist/client/features/collection-translation-progress/index.d.ts +1 -1
- package/dist/client/features/collection-translation-progress/index.js +1 -1
- package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.d.ts +2 -2
- package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.js +13 -13
- package/dist/client/features/collection-translation-progress/ui/styles.module.scss +1 -1
- package/dist/client/features/document-translation-progress-failed/index.d.ts +1 -1
- package/dist/client/features/document-translation-progress-failed/index.js +1 -1
- package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.d.ts +2 -2
- package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.js +3 -3
- package/dist/client/features/document-translation-progress-pending/index.d.ts +1 -1
- package/dist/client/features/document-translation-progress-pending/index.js +1 -1
- package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.d.ts +2 -2
- package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.js +5 -5
- package/dist/client/features/document-translation-progress-running/index.d.ts +1 -1
- package/dist/client/features/document-translation-progress-running/index.js +1 -1
- package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.d.ts +2 -2
- package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.js +3 -3
- package/dist/client/features/open-document-translation-popup/index.d.ts +1 -1
- package/dist/client/features/open-document-translation-popup/index.js +1 -1
- package/dist/client/features/open-document-translation-popup/ui/styles.module.scss +1 -1
- package/dist/client/features/translate-document-form/index.client.d.ts +1 -1
- package/dist/client/features/translate-document-form/index.client.js +1 -1
- package/dist/client/features/translate-document-form/index.d.ts +3 -3
- package/dist/client/features/translate-document-form/index.js +2 -2
- package/dist/client/features/translate-document-form/model/constants.d.ts +1 -1
- package/dist/client/features/translate-document-form/model/constants.js +11 -11
- package/dist/client/features/translate-document-form/model/form-model.d.ts +1 -1
- package/dist/client/features/translate-document-form/model/index.d.ts +1 -1
- package/dist/client/features/translate-document-form/model/index.js +1 -1
- package/dist/client/features/translate-document-form/model/schema.d.ts +1 -1
- package/dist/client/features/translate-document-form/model/schema.js +5 -5
- package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.d.ts +1 -1
- package/dist/client/features/translate-document-form/ui/index.d.ts +1 -1
- package/dist/client/features/translate-document-form/ui/index.js +1 -1
- package/dist/client/features/translate-document-form/ui/styles.module.scss +1 -1
- package/dist/client/shared/lib/errors/handleApiError.d.ts +1 -1
- package/dist/client/shared/lib/errors/handleApiError.js +2 -2
- package/dist/client/shared/lib/forms/handle-form-error.d.ts +1 -1
- package/dist/client/shared/lib/forms/handle-form-error.js +6 -6
- package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.d.ts +1 -1
- package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.js +1 -1
- package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.d.ts +1 -1
- package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.js +2 -2
- package/dist/client/shared/lib/payload/hooks/useLocaleOptions.js +2 -2
- package/dist/client/shared/lib/utils/errors/handleApiError.d.ts +1 -1
- package/dist/client/shared/lib/utils/errors/handleApiError.js +2 -2
- package/dist/client/shared/lib/utils/react/useToggle.js +1 -1
- package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.d.ts +2 -2
- package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.js +3 -3
- package/dist/client/shared/providers/CacheClientProvider/index.d.ts +1 -1
- package/dist/client/shared/providers/CacheClientProvider/index.js +1 -1
- package/dist/client/shared/types/AccessGuard.d.ts +1 -1
- package/dist/client/shared/ui/Alert/Alert.d.ts +2 -2
- package/dist/client/shared/ui/Alert/Alert.js +18 -18
- package/dist/client/shared/ui/Alert/index.d.ts +1 -1
- package/dist/client/shared/ui/Alert/index.js +1 -1
- package/dist/client/shared/ui/Alert/styles.module.scss +1 -1
- package/dist/client/shared/ui/Button/index.d.ts +1 -1
- package/dist/client/shared/ui/Button/index.js +1 -1
- package/dist/client/shared/ui/Button/styles.module.scss +6 -3
- package/dist/client/shared/ui/Checkbox/Checkbox.d.ts +2 -2
- package/dist/client/shared/ui/Checkbox/Checkbox.js +4 -4
- package/dist/client/shared/ui/Checkbox/index.d.ts +1 -1
- package/dist/client/shared/ui/Checkbox/index.js +1 -1
- package/dist/client/shared/ui/Checkbox/styles.module.scss +1 -1
- package/dist/client/shared/ui/ColorIndicator/ColorIndicator.d.ts +2 -2
- package/dist/client/shared/ui/ColorIndicator/ColorIndicator.js +2 -2
- package/dist/client/shared/ui/ColorIndicator/index.d.ts +1 -1
- package/dist/client/shared/ui/ColorIndicator/index.js +1 -1
- package/dist/client/shared/ui/ColorIndicator/styles.module.scss +1 -1
- package/dist/client/shared/ui/Description/Description.d.ts +3 -3
- package/dist/client/shared/ui/Description/Description.js +4 -4
- package/dist/client/shared/ui/Description/index.d.ts +1 -1
- package/dist/client/shared/ui/Description/index.js +1 -1
- package/dist/client/shared/ui/Description/styles.module.scss +1 -1
- package/dist/client/shared/ui/Divider/Divider.d.ts +4 -4
- package/dist/client/shared/ui/Divider/Divider.js +4 -4
- package/dist/client/shared/ui/Divider/index.d.ts +1 -1
- package/dist/client/shared/ui/Divider/index.js +1 -1
- package/dist/client/shared/ui/Divider/styles.module.scss +1 -1
- package/dist/client/shared/ui/Label/Label.d.ts +2 -2
- package/dist/client/shared/ui/Label/Label.js +3 -3
- package/dist/client/shared/ui/Label/index.d.ts +1 -1
- package/dist/client/shared/ui/Label/index.js +1 -1
- package/dist/client/shared/ui/Label/styles.module.scss +1 -1
- package/dist/client/shared/ui/Loading/Loading.d.ts +1 -1
- package/dist/client/shared/ui/Loading/Loading.js +9 -9
- package/dist/client/shared/ui/Loading/index.d.ts +1 -1
- package/dist/client/shared/ui/Loading/index.js +1 -1
- package/dist/client/shared/ui/Loading/styles.module.scss +2 -2
- package/dist/client/shared/ui/Popup/Popup.d.ts +1 -1
- package/dist/client/shared/ui/Popup/index.d.ts +1 -1
- package/dist/client/shared/ui/Popup/index.js +1 -1
- package/dist/client/shared/ui/Popup/styles.module.scss +1 -1
- package/dist/client/shared/ui/ProgressBar/ProgressBar.d.ts +2 -2
- package/dist/client/shared/ui/ProgressBar/ProgressBar.js +3 -3
- package/dist/client/shared/ui/ProgressBar/index.d.ts +1 -1
- package/dist/client/shared/ui/ProgressBar/index.js +1 -1
- package/dist/client/shared/ui/ProgressBar/styles.module.scss +1 -1
- package/dist/client/shared/ui/Select/index.d.ts +1 -1
- package/dist/client/shared/ui/Select/index.js +1 -1
- package/dist/client/shared/ui/Select/styles.module.scss +1 -1
- package/dist/client/shared/ui/StatusCounter/StatusCounter.d.ts +2 -2
- package/dist/client/shared/ui/StatusCounter/StatusCounter.js +13 -13
- package/dist/client/shared/ui/StatusCounter/index.d.ts +1 -1
- package/dist/client/shared/ui/StatusCounter/index.js +1 -1
- package/dist/client/shared/ui/StatusCounter/styles.module.scss +1 -1
- package/dist/client/shared/ui/StatusIndicator/StatusIndicator.d.ts +3 -3
- package/dist/client/shared/ui/StatusIndicator/StatusIndicator.js +4 -4
- package/dist/client/shared/ui/StatusIndicator/index.d.ts +1 -1
- package/dist/client/shared/ui/StatusIndicator/index.js +1 -1
- package/dist/client/shared/ui/StatusIndicator/styles.module.scss +1 -1
- package/dist/client/shared/ui/Tooltip/Tooltip.d.ts +2 -2
- package/dist/client/shared/ui/Tooltip/Tooltip.js +4 -4
- package/dist/client/shared/ui/Tooltip/index.d.ts +1 -1
- package/dist/client/shared/ui/Tooltip/index.js +1 -1
- package/dist/client/shared/ui/Tooltip/styles.module.scss +5 -5
- package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.d.ts +1 -1
- package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.js +6 -6
- package/dist/client/shared/ui/form/FormCheckbox/index.d.ts +1 -1
- package/dist/client/shared/ui/form/FormCheckbox/index.js +1 -1
- package/dist/client/shared/ui/form/FormCheckbox/styles.module.scss +1 -1
- package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.js +5 -5
- package/dist/client/shared/ui/form/FormCheckboxPublish/index.d.ts +1 -1
- package/dist/client/shared/ui/form/FormCheckboxPublish/index.js +1 -1
- package/dist/client/shared/ui/form/FormCheckboxPublish/styles.module.scss +1 -1
- package/dist/client/shared/ui/form/FormSelect/FormSelect.d.ts +5 -5
- package/dist/client/shared/ui/form/FormSelect/FormSelect.js +9 -9
- package/dist/client/shared/ui/form/FormSelect/index.d.ts +1 -1
- package/dist/client/shared/ui/form/FormSelect/index.js +1 -1
- package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.d.ts +1 -1
- package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.js +2 -2
- package/dist/client/shared/ui/form/FormSelectLocale/index.d.ts +1 -1
- package/dist/client/shared/ui/form/FormSelectLocale/index.js +1 -1
- package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.d.ts +2 -2
- package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.js +9 -9
- package/dist/client/shared/ui/form/FormSelectStrategy/index.d.ts +2 -2
- package/dist/client/shared/ui/form/FormSelectStrategy/index.js +1 -1
- package/dist/client/shared/ui/form/FormSelectStrategy/styles.module.scss +1 -1
- package/dist/client/shared/utils/componentPath.js +1 -1
- package/dist/client/widgets/bulk-translation-dashboard/index.d.ts +1 -1
- package/dist/client/widgets/bulk-translation-dashboard/index.js +1 -1
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.d.ts +2 -2
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.js +3 -3
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.js +11 -11
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.d.ts +2 -2
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.js +3 -3
- package/dist/client/widgets/bulk-translation-dashboard/ui/index.d.ts +1 -1
- package/dist/client/widgets/bulk-translation-dashboard/ui/index.js +1 -1
- package/dist/client/widgets/translate-document/index.d.ts +1 -1
- package/dist/client/widgets/translate-document/index.js +1 -1
- package/dist/client/widgets/translate-document/ui/TranslateDocument.export.d.ts +3 -3
- package/dist/client/widgets/translate-document/ui/TranslateDocument.export.js +3 -3
- package/dist/client/widgets/translate-document/ui/TranslateDocument.js +16 -16
- package/dist/client/widgets/translate-document/ui/TranslateDocument.server.d.ts +2 -2
- package/dist/client/widgets/translate-document/ui/TranslateDocument.server.js +3 -3
- package/dist/client/widgets/translate-document/ui/index.d.ts +1 -1
- package/dist/client/widgets/translate-document/ui/index.js +1 -1
- package/dist/client/widgets/translate-field-control/ui/TranslateFieldControl.export.d.ts +1 -1
- package/dist/client/widgets/translate-field-control/ui/styles.module.scss +1 -1
- package/dist/{server/modules/translation-levels → composition/levels}/collectionLevel.d.ts +1 -1
- package/dist/{server/modules/translation-levels → composition/levels}/collectionLevel.js +1 -1
- package/dist/{server/modules/translation-levels → composition/levels}/documentLevel.d.ts +1 -1
- package/dist/{server/modules/translation-levels → composition/levels}/documentLevel.js +1 -1
- package/dist/{server/modules/translation-levels → composition/levels}/fieldLevel.d.ts +1 -1
- package/dist/{server/modules/translation-levels → composition/levels}/fieldLevel.js +1 -1
- package/dist/composition/levels/index.d.ts +3 -0
- package/dist/composition/levels/index.js +5 -0
- package/dist/{server/modules/translation-levels → composition/levels}/useDocTranslationApi.d.ts +1 -1
- package/dist/{server/modules/translation-levels → composition/levels}/useDocTranslationApi.js +1 -1
- package/dist/core/content-projection/contentProjector.d.ts +28 -0
- package/dist/core/content-projection/contentProjector.js +97 -0
- package/dist/core/content-projection/fingerprinter.d.ts +28 -0
- package/dist/core/content-projection/fingerprinter.js +29 -0
- package/dist/core/content-projection/idPath.d.ts +48 -0
- package/dist/core/content-projection/idPath.js +64 -0
- package/dist/core/content-projection/translatableLeaf.d.ts +27 -0
- package/dist/core/content-projection/translatableLeaf.js +37 -0
- package/dist/core/field-config/getFieldConfig.d.ts +23 -0
- package/dist/{server/shared → core}/field-config/getFieldConfig.js +5 -5
- package/dist/{server/shared → core}/field-config/index.d.ts +3 -3
- package/dist/core/field-config/index.js +4 -0
- package/dist/{server/shared → core}/field-traversal/findFieldByPath.d.ts +2 -3
- package/dist/core/field-traversal/guards.d.ts +19 -0
- package/dist/core/field-traversal/guards.js +20 -0
- package/dist/core/field-traversal/index.d.ts +7 -0
- package/dist/core/field-traversal/index.js +7 -0
- package/dist/{server/shared → core}/field-traversal/kernel.d.ts +7 -8
- package/dist/{server/shared → core}/field-traversal/kernel.js +6 -6
- package/dist/core/field-traversal/predicates.d.ts +24 -0
- package/dist/core/field-traversal/predicates.js +17 -0
- package/dist/{server/shared → core}/field-traversal/types.d.ts +129 -27
- package/dist/{server/shared → core}/field-traversal/types.js +6 -0
- package/dist/{server/shared → core}/field-traversal/walkFields.d.ts +2 -3
- package/dist/core/index.d.ts +10 -0
- package/dist/core/index.js +14 -0
- package/dist/{server/shared → core}/lexical/collectTextNodes.d.ts +1 -1
- package/dist/{server/shared → core}/lexical/collectTextNodes.js +1 -1
- package/dist/{server/shared → core}/lexical/guards.d.ts +1 -1
- package/dist/{server/shared → core}/lexical/guards.js +4 -4
- package/dist/core/lexical/index.d.ts +6 -0
- package/dist/core/lexical/index.js +6 -0
- package/dist/{server/shared → core}/lexical/isEmptyRichText.d.ts +1 -1
- package/dist/{server/shared → core}/lexical/isEmptyRichText.js +3 -3
- package/dist/{server/shared → core}/lexical/traverseLexicalTree.d.ts +1 -1
- package/dist/{server/shared → core}/lexical/traverseLexicalTree.js +1 -1
- package/dist/core/lexical/types.d.ts +33 -0
- package/dist/core/lexical/types.js +11 -0
- package/dist/{server/modules → core}/translation-pipeline/TranslationPipeline.d.ts +4 -4
- package/dist/{server/modules → core}/translation-pipeline/TranslationPipeline.js +1 -1
- package/dist/{server/modules → core}/translation-pipeline/stages/data-reconciler/DataReconciler.d.ts +2 -2
- package/dist/{server/modules → core}/translation-pipeline/stages/data-reconciler/DataReconciler.js +3 -2
- package/dist/core/translation-pipeline/stages/data-reconciler/index.d.ts +2 -0
- package/dist/core/translation-pipeline/stages/data-reconciler/index.js +4 -0
- package/dist/{server/modules → core}/translation-pipeline/stages/field-collector/FieldChunkCollector.d.ts +2 -2
- package/dist/{server/modules → core}/translation-pipeline/stages/field-collector/FieldChunkCollector.js +18 -4
- package/dist/{server/modules → core}/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.d.ts +2 -2
- package/dist/{server/modules → core}/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.js +2 -2
- package/dist/core/translation-pipeline/stages/field-collector/index.d.ts +2 -0
- package/dist/core/translation-pipeline/stages/field-collector/index.js +4 -0
- package/dist/core/translation-pipeline/stages/index.d.ts +6 -0
- package/dist/core/translation-pipeline/stages/index.js +7 -0
- package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/PlainTextExpander.d.ts +2 -2
- package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/PlainTextExpander.js +2 -2
- package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/RichTextExpander.d.ts +2 -2
- package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/RichTextExpander.js +3 -3
- package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/TextChunkExpander.d.ts +2 -2
- package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/TextChunkExpander.stage.d.ts +2 -2
- package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/TextChunkExpander.stage.js +4 -4
- package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/TextExpander.interface.d.ts +1 -1
- package/dist/core/translation-pipeline/stages/text-expander/index.d.ts +6 -0
- package/dist/core/translation-pipeline/stages/text-expander/index.js +6 -0
- package/dist/{server/modules → core}/translation-pipeline/stages/translation/Translation.stage.d.ts +2 -2
- package/dist/{server/modules → core}/translation-pipeline/stages/translation/Translation.stage.js +1 -1
- package/dist/core/translation-pipeline/stages/translation/index.d.ts +1 -0
- package/dist/core/translation-pipeline/stages/translation/index.js +3 -0
- package/dist/{server/modules → core}/translation-pipeline/stages/translation-applicator/TranslationMutator.d.ts +1 -1
- package/dist/{server/modules → core}/translation-pipeline/stages/translation-applicator/TranslationMutator.js +1 -1
- package/dist/{server/modules → core}/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.d.ts +1 -1
- package/dist/{server/modules → core}/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.js +2 -2
- package/dist/core/translation-pipeline/stages/translation-applicator/index.d.ts +2 -0
- package/dist/core/translation-pipeline/stages/translation-applicator/index.js +4 -0
- package/dist/{server/modules → core}/translation-pipeline/strategies/Overwrite.strategy.d.ts +1 -1
- package/dist/{server/modules → core}/translation-pipeline/strategies/Overwrite.strategy.js +1 -1
- package/dist/{server/modules → core}/translation-pipeline/strategies/SkipExisting.strategy.d.ts +1 -1
- package/dist/{server/modules → core}/translation-pipeline/strategies/SkipExisting.strategy.js +3 -1
- package/dist/core/translation-pipeline/strategies/index.d.ts +13 -0
- package/dist/{server/modules → core}/translation-pipeline/strategies/index.js +4 -4
- package/dist/{server/modules → core}/translation-pipeline/translateContent.d.ts +2 -2
- package/dist/{server/modules → core}/translation-pipeline/types/FieldChunk.d.ts +3 -3
- package/dist/{server/modules → core}/translation-pipeline/types/Pipeline.d.ts +2 -2
- package/dist/{server/modules → core}/translation-pipeline/types/PipelineContext.d.ts +4 -4
- package/dist/{server/modules → core}/translation-pipeline/types/TextChunk.d.ts +3 -3
- package/dist/{server/modules → core}/translation-pipeline/types/TextChunk.js +2 -2
- package/dist/core/translation-pipeline/types/index.d.ts +5 -0
- package/dist/core/translation-pipeline/types/index.js +3 -0
- package/dist/core/translation-providers/index.d.ts +1 -0
- package/dist/core/translation-providers/index.js +5 -0
- package/dist/core/utils/index.d.ts +2 -0
- package/dist/core/utils/index.js +4 -0
- package/dist/{server/shared → core}/utils/isEmpty.js +2 -2
- package/dist/{server/shared → core}/utils/isObject.js +1 -1
- package/dist/field-actions.d.ts +1 -1
- package/dist/field-config.d.ts +1 -1
- package/dist/field-config.js +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +4 -4
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.js +1 -1
- package/dist/server/features/_lib/collection-utils.d.ts +1 -1
- package/dist/server/features/_lib/index.d.ts +1 -1
- package/dist/server/features/_lib/index.js +1 -1
- package/dist/server/features/cancel/index.d.ts +1 -1
- package/dist/server/features/cancel/index.js +1 -1
- package/dist/server/features/cancel-by-collection/index.d.ts +1 -1
- package/dist/server/features/cancel-by-collection/index.js +1 -1
- package/dist/server/features/cancel-by-collection/model.d.ts +2 -2
- package/dist/server/features/cancel-by-collection/model.js +1 -1
- package/dist/server/features/createTranslationRoutes.d.ts +1 -1
- package/dist/server/features/enqueue-translation/index.d.ts +1 -1
- package/dist/server/features/enqueue-translation/index.js +1 -1
- package/dist/server/features/enqueue-translation/model.d.ts +2 -2
- package/dist/server/features/enqueue-translation/model.js +4 -4
- package/dist/server/features/get-collection-status/index.d.ts +1 -1
- package/dist/server/features/get-collection-status/index.js +1 -1
- package/dist/server/features/get-collection-status/model.d.ts +3 -3
- package/dist/server/features/get-collection-status/model.js +1 -1
- package/dist/server/features/get-document-status/index.d.ts +2 -2
- package/dist/server/features/get-document-status/index.js +2 -2
- package/dist/server/features/run-translation/index.d.ts +1 -1
- package/dist/server/features/run-translation/index.js +1 -1
- package/dist/server/features/translate-document/handler.d.ts +3 -2
- package/dist/server/features/translate-document/handler.js +1 -1
- package/dist/server/features/translate-document/index.d.ts +1 -1
- package/dist/server/features/translate-document/model.d.ts +2 -7
- package/dist/server/features/translate-document/model.js +1 -2
- package/dist/server/features/translate-field/handler.js +1 -1
- package/dist/server/features/translate-field/index.d.ts +2 -1
- package/dist/server/features/translate-field/model.d.ts +2 -19
- package/dist/server/features/translate-field/resolveFieldSubtree.js +1 -1
- package/dist/server/features/translate-field/route.d.ts +1 -1
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +3 -3
- package/dist/server/modules/index.d.ts +2 -2
- package/dist/server/modules/index.js +2 -2
- package/dist/server/modules/task-runner/TaskRunner.interface.d.ts +2 -2
- package/dist/server/modules/task-runner/TaskRunnerProvider.interface.d.ts +1 -1
- package/dist/server/modules/task-runner/index.d.ts +1 -1
- package/dist/server/modules/task-runner/payload-jobs-runner/index.d.ts +2 -2
- package/dist/server/modules/task-runner/payload-jobs-runner/index.js +1 -1
- package/dist/server/modules/task-runner/sync-runner/index.d.ts +1 -1
- package/dist/server/modules/task-runner/sync-runner/index.js +1 -1
- package/dist/server/modules/translation-levels/PluginConfigBuilder.d.ts +3 -3
- package/dist/server/modules/translation-levels/index.d.ts +1 -4
- package/dist/server/modules/translation-levels/index.js +1 -3
- package/dist/server/modules/translation-levels/types.d.ts +3 -3
- package/dist/server/shared/access/AnyAccessGuard.d.ts +1 -1
- package/dist/server/shared/access/handler.d.ts +1 -1
- package/dist/server/shared/access/index.d.ts +3 -3
- package/dist/server/shared/access/index.js +1 -1
- package/dist/server/shared/access/types.d.ts +1 -1
- package/dist/server/shared/guards/collection-guards.d.ts +1 -1
- package/dist/server/shared/guards/collection-guards.js +2 -2
- package/dist/server/shared/guards/field-guards.d.ts +9 -20
- package/dist/server/shared/guards/field-guards.js +5 -20
- package/dist/server/shared/guards/index.d.ts +3 -3
- package/dist/server/shared/guards/index.js +2 -2
- package/dist/server/shared/http/ServerResponse.js +15 -15
- package/dist/server/shared/http/index.d.ts +3 -3
- package/dist/server/shared/http/index.js +3 -3
- package/dist/server/shared/http/withAccessCheck.d.ts +2 -2
- package/dist/server/shared/http/withAccessCheck.js +1 -1
- package/dist/server/shared/http/withErrorHandler.js +3 -3
- package/dist/server/shared/index.d.ts +6 -5
- package/dist/server/shared/index.js +4 -3
- package/dist/server/shared/utils/filterLocalizedFields.js +2 -2
- package/dist/server/shared/utils/getByPath.js +2 -2
- package/dist/server/shared/utils/index.d.ts +9 -9
- package/dist/server/shared/utils/index.js +8 -8
- package/dist/server/shared/utils/normalizePath.js +3 -3
- package/dist/server/shared/utils/setByPath.js +2 -2
- package/dist/translation-providers/index.d.ts +2 -0
- package/dist/translation-providers/index.js +10 -0
- package/dist/{server/modules/translation-providers → translation-providers/openai}/OpenAITranslation.provider.d.ts +1 -1
- package/dist/{server/modules/translation-providers → translation-providers/openai}/OpenAITranslation.provider.js +1 -1
- package/dist/translation-providers/openai/index.d.ts +1 -0
- package/dist/translation-providers/openai/index.js +5 -0
- package/dist/types/CollectionSchemaMap.d.ts +6 -0
- package/dist/types/CollectionSchemaMap.js +6 -0
- package/dist/{client/shared/types → types}/PayloadComponentExport.d.ts +1 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/wire/field-translation.d.ts +17 -0
- package/dist/types/wire/field-translation.js +7 -0
- package/package.json +3 -1
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.d.ts +0 -2
- package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.js +0 -4
- package/dist/server/modules/translation-pipeline/stages/field-collector/index.d.ts +0 -2
- package/dist/server/modules/translation-pipeline/stages/field-collector/index.js +0 -4
- package/dist/server/modules/translation-pipeline/stages/index.d.ts +0 -6
- package/dist/server/modules/translation-pipeline/stages/index.js +0 -7
- package/dist/server/modules/translation-pipeline/stages/text-expander/index.d.ts +0 -6
- package/dist/server/modules/translation-pipeline/stages/text-expander/index.js +0 -6
- package/dist/server/modules/translation-pipeline/stages/translation/index.d.ts +0 -1
- package/dist/server/modules/translation-pipeline/stages/translation/index.js +0 -3
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.d.ts +0 -2
- package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.js +0 -4
- package/dist/server/modules/translation-pipeline/strategies/index.d.ts +0 -13
- package/dist/server/modules/translation-pipeline/types/index.d.ts +0 -5
- package/dist/server/modules/translation-pipeline/types/index.js +0 -3
- package/dist/server/modules/translation-providers/index.d.ts +0 -2
- package/dist/server/modules/translation-providers/index.js +0 -3
- package/dist/server/shared/field-config/getFieldConfig.d.ts +0 -20
- package/dist/server/shared/field-config/index.js +0 -4
- package/dist/server/shared/field-traversal/index.d.ts +0 -5
- package/dist/server/shared/field-traversal/index.js +0 -5
- package/dist/server/shared/lexical/index.d.ts +0 -6
- package/dist/server/shared/lexical/index.js +0 -6
- package/dist/server/shared/lexical/types.d.ts +0 -19
- package/dist/server/shared/lexical/types.js +0 -8
- /package/dist/{server/shared → core}/field-config/types.d.ts +0 -0
- /package/dist/{server/shared → core}/field-config/types.js +0 -0
- /package/dist/{server/shared → core}/field-traversal/findFieldByPath.js +0 -0
- /package/dist/{server/shared → core}/field-traversal/walkFields.js +0 -0
- /package/dist/{server/modules → core}/translation-pipeline/index.d.ts +0 -0
- /package/dist/{server/modules → core}/translation-pipeline/index.js +0 -0
- /package/dist/{server/modules → core}/translation-pipeline/stages/data-reconciler/DataReconciler.stage.d.ts +0 -0
- /package/dist/{server/modules → core}/translation-pipeline/stages/data-reconciler/DataReconciler.stage.js +0 -0
- /package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/TextChunkExpander.js +0 -0
- /package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/TextExpander.interface.js +0 -0
- /package/dist/{server/modules → core}/translation-pipeline/strategies/TranslationStrategy.interface.d.ts +0 -0
- /package/dist/{server/modules → core}/translation-pipeline/strategies/TranslationStrategy.interface.js +0 -0
- /package/dist/{server/modules → core}/translation-pipeline/translateContent.js +0 -0
- /package/dist/{server/modules → core}/translation-pipeline/types/FieldChunk.js +0 -0
- /package/dist/{server/modules → core}/translation-pipeline/types/Pipeline.js +0 -0
- /package/dist/{server/modules → core}/translation-pipeline/types/PipelineContext.js +0 -0
- /package/dist/{server/modules → core}/translation-providers/TranslationProvider.interface.d.ts +0 -0
- /package/dist/{server/modules → core}/translation-providers/TranslationProvider.interface.js +0 -0
- /package/dist/{server/shared → core}/utils/isEmpty.d.ts +0 -0
- /package/dist/{server/shared → core}/utils/isObject.d.ts +0 -0
- /package/dist/{client/shared/types → types}/PayloadComponentExport.js +0 -0
package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { TrashIcon } from
|
|
3
|
-
import { LanguageTranslateIcon } from
|
|
4
|
-
import Button from
|
|
5
|
-
import Divider from
|
|
6
|
-
import StatusIndicator from
|
|
7
|
-
import Tooltip from
|
|
8
|
-
import { TranslationDirection } from
|
|
2
|
+
import { TrashIcon } from "@payloadcms/ui/icons/Trash";
|
|
3
|
+
import { LanguageTranslateIcon } from "../../../../shared/lib/assets/icons/LanguageTranslateIcon";
|
|
4
|
+
import Button from "../../../../shared/ui/Button";
|
|
5
|
+
import Divider from "../../../../shared/ui/Divider";
|
|
6
|
+
import StatusIndicator from "../../../../shared/ui/StatusIndicator";
|
|
7
|
+
import Tooltip from "../../../../shared/ui/Tooltip";
|
|
8
|
+
import { TranslationDirection } from "../TranslationDirection";
|
|
9
9
|
export function RunningTranslationStatus({ onCancel, isLoading, disabled, sourceLocale, targetLocale, createdAt }) {
|
|
10
10
|
return /*#__PURE__*/ _jsxs(StatusIndicator, {
|
|
11
11
|
$animated: true,
|
|
@@ -19,13 +19,13 @@ export function RunningTranslationStatus({ onCancel, isLoading, disabled, source
|
|
|
19
19
|
dateTime: createdAt,
|
|
20
20
|
children: [
|
|
21
21
|
"Created at:",
|
|
22
|
-
|
|
22
|
+
" ",
|
|
23
23
|
new Date(createdAt).toLocaleString(undefined, {
|
|
24
|
-
year:
|
|
25
|
-
month:
|
|
26
|
-
day:
|
|
27
|
-
hour:
|
|
28
|
-
minute:
|
|
24
|
+
year: "numeric",
|
|
25
|
+
month: "short",
|
|
26
|
+
day: "numeric",
|
|
27
|
+
hour: "2-digit",
|
|
28
|
+
minute: "2-digit"
|
|
29
29
|
})
|
|
30
30
|
]
|
|
31
31
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { RunningTranslationStatus } from
|
|
1
|
+
export { RunningTranslationStatus } from "./RunningTranslationStatus";
|
|
@@ -3,5 +3,5 @@ interface TranslationDirectionProps {
|
|
|
3
3
|
targetLocale: string;
|
|
4
4
|
className?: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const TranslationDirection: ({ sourceLocale, targetLocale, className }: TranslationDirectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const TranslationDirection: ({ sourceLocale, targetLocale, className, }: TranslationDirectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import styles from
|
|
2
|
+
import styles from "./styles.module.scss";
|
|
3
3
|
export const TranslationDirection = ({ sourceLocale, targetLocale, className })=>{
|
|
4
4
|
return /*#__PURE__*/ _jsxs("div", {
|
|
5
|
-
className: `${styles.container} ${className ||
|
|
5
|
+
className: `${styles.container} ${className || ""}`,
|
|
6
6
|
role: "group",
|
|
7
7
|
"aria-label": `Translation from ${sourceLocale} to ${targetLocale}`,
|
|
8
8
|
children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { TranslationDirection } from
|
|
1
|
+
export { TranslationDirection } from "./TranslationDirection";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { CollectionTranslationFormModel } from
|
|
1
|
+
export { CollectionTranslationFormModel } from "./model";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { FormValues, FormInput } from
|
|
2
|
-
export { FORM_FIELDS } from
|
|
3
|
-
export { CollectionTranslationForm } from
|
|
1
|
+
export type { FormValues, FormInput } from "./model/schema";
|
|
2
|
+
export { FORM_FIELDS } from "./model/constants";
|
|
3
|
+
export { CollectionTranslationForm } from "./ui/CollectionTranslationForm";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { FORM_FIELDS } from
|
|
2
|
-
export { CollectionTranslationForm } from
|
|
1
|
+
export { FORM_FIELDS } from "./model/constants";
|
|
2
|
+
export { CollectionTranslationForm } from "./ui/CollectionTranslationForm";
|
|
3
3
|
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TranslationStrategy } from
|
|
1
|
+
import type { TranslationStrategy } from "../../../shared/ui/form/FormSelectStrategy";
|
|
2
2
|
export declare const FORM_FIELDS: {
|
|
3
3
|
readonly SOURCE_LNG: "source_lng";
|
|
4
4
|
readonly TARGET_LNG: "target_lng";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export const FORM_FIELDS = {
|
|
2
|
-
SOURCE_LNG:
|
|
3
|
-
TARGET_LNG:
|
|
4
|
-
HIDDEN_COLLECTION_SLUG:
|
|
5
|
-
STRATEGY:
|
|
6
|
-
PUBLISH_ON_TRANSLATION:
|
|
2
|
+
SOURCE_LNG: "source_lng",
|
|
3
|
+
TARGET_LNG: "target_lng",
|
|
4
|
+
HIDDEN_COLLECTION_SLUG: "collection_slug",
|
|
5
|
+
STRATEGY: "strategy",
|
|
6
|
+
PUBLISH_ON_TRANSLATION: "publish_on_translation"
|
|
7
7
|
};
|
|
8
8
|
export const defaultValues = {
|
|
9
|
-
[FORM_FIELDS.SOURCE_LNG]:
|
|
10
|
-
[FORM_FIELDS.TARGET_LNG]:
|
|
11
|
-
[FORM_FIELDS.HIDDEN_COLLECTION_SLUG]:
|
|
12
|
-
[FORM_FIELDS.STRATEGY]:
|
|
9
|
+
[FORM_FIELDS.SOURCE_LNG]: "",
|
|
10
|
+
[FORM_FIELDS.TARGET_LNG]: "",
|
|
11
|
+
[FORM_FIELDS.HIDDEN_COLLECTION_SLUG]: "",
|
|
12
|
+
[FORM_FIELDS.STRATEGY]: "overwrite",
|
|
13
13
|
[FORM_FIELDS.PUBLISH_ON_TRANSLATION]: false
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -7,5 +7,5 @@ type UseFormProps = {
|
|
|
7
7
|
initialValues?: FormInput;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export declare const useCollectionTranslationForm: ({ initialValues, disabled }?: UseFormProps) => UseFormReturn_;
|
|
10
|
+
export declare const useCollectionTranslationForm: ({ initialValues, disabled, }?: UseFormProps) => UseFormReturn_;
|
|
11
11
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
import { FORM_FIELDS } from
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { FORM_FIELDS } from "./constants";
|
|
3
3
|
export const validationSchema = z.object({
|
|
4
|
-
[FORM_FIELDS.SOURCE_LNG]: z.string().nonempty(
|
|
5
|
-
[FORM_FIELDS.TARGET_LNG]: z.string().nonempty(
|
|
4
|
+
[FORM_FIELDS.SOURCE_LNG]: z.string().nonempty(""),
|
|
5
|
+
[FORM_FIELDS.TARGET_LNG]: z.string().nonempty(""),
|
|
6
6
|
[FORM_FIELDS.HIDDEN_COLLECTION_SLUG]: z.string().nonempty(),
|
|
7
7
|
[FORM_FIELDS.STRATEGY]: z.enum([
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
"overwrite",
|
|
9
|
+
"skip_existing"
|
|
10
10
|
]),
|
|
11
11
|
[FORM_FIELDS.PUBLISH_ON_TRANSLATION]: z.boolean().default(false)
|
|
12
12
|
});
|
|
@@ -6,5 +6,5 @@ type CollectionTranslationFormProps = {
|
|
|
6
6
|
selectedCount: number;
|
|
7
7
|
hasDrafts: boolean;
|
|
8
8
|
};
|
|
9
|
-
export declare function CollectionTranslationForm({ form, onSubmit, selectedCount, hasDrafts }: CollectionTranslationFormProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function CollectionTranslationForm({ form, onSubmit, selectedCount, hasDrafts, }: CollectionTranslationFormProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { CollectionTranslationForm } from
|
|
1
|
+
export { CollectionTranslationForm } from "./CollectionTranslationForm";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from "./ui/CollectionTranslationPopup";
|
package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ type CollectionTranslationPopupProps = PropsWithChildren<{
|
|
|
3
3
|
translationInProgress: boolean;
|
|
4
4
|
selectedCount: number;
|
|
5
5
|
}>;
|
|
6
|
-
declare function CollectionTranslationPopup({ children, translationInProgress, selectedCount }: CollectionTranslationPopupProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function CollectionTranslationPopup({ children, translationInProgress, selectedCount, }: CollectionTranslationPopupProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default CollectionTranslationPopup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { CollectionTranslationProgress } from
|
|
1
|
+
export { CollectionTranslationProgress } from "./ui/CollectionTranslationProgress";
|
package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { GroupedCollectionTranslationStatus } from
|
|
1
|
+
import type { GroupedCollectionTranslationStatus } from "../../../entities/translation";
|
|
2
2
|
type CollectionTranslationProgressProps = {
|
|
3
3
|
collection: string;
|
|
4
4
|
data: GroupedCollectionTranslationStatus | undefined;
|
|
5
5
|
isPending: boolean;
|
|
6
6
|
};
|
|
7
|
-
export declare function CollectionTranslationProgress({ collection, data, isPending }: CollectionTranslationProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function CollectionTranslationProgress({ collection, data, isPending, }: CollectionTranslationProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { ShimmerEffect } from
|
|
4
|
-
import { TrashIcon } from
|
|
5
|
-
import { TranslationsApi } from
|
|
6
|
-
import { LanguageTranslateIcon } from
|
|
7
|
-
import Button from
|
|
8
|
-
import StatusIndicator from
|
|
9
|
-
import Tooltip from
|
|
10
|
-
import styles from
|
|
3
|
+
import { ShimmerEffect } from "@payloadcms/ui";
|
|
4
|
+
import { TrashIcon } from "@payloadcms/ui/icons/Trash";
|
|
5
|
+
import { TranslationsApi } from "../../../entities/translation";
|
|
6
|
+
import { LanguageTranslateIcon } from "../../../shared/lib/assets/icons/LanguageTranslateIcon";
|
|
7
|
+
import Button from "../../../shared/ui/Button";
|
|
8
|
+
import StatusIndicator from "../../../shared/ui/StatusIndicator";
|
|
9
|
+
import Tooltip from "../../../shared/ui/Tooltip";
|
|
10
|
+
import styles from "./styles.module.scss";
|
|
11
11
|
export function CollectionTranslationProgress({ collection, data, isPending }) {
|
|
12
12
|
const cancelPendingTranslations = TranslationsApi.useCancelCollectionTranslations();
|
|
13
13
|
return /*#__PURE__*/ _jsxs("div", {
|
|
@@ -36,7 +36,7 @@ export function CollectionTranslationProgress({ collection, data, isPending }) {
|
|
|
36
36
|
data && /*#__PURE__*/ _jsxs(_Fragment, {
|
|
37
37
|
children: [
|
|
38
38
|
/*#__PURE__*/ _jsxs(StatusIndicator, {
|
|
39
|
-
className: styles[
|
|
39
|
+
className: styles["status-indicator"],
|
|
40
40
|
title: "Completed",
|
|
41
41
|
$color: "green",
|
|
42
42
|
children: [
|
|
@@ -47,7 +47,7 @@ export function CollectionTranslationProgress({ collection, data, isPending }) {
|
|
|
47
47
|
]
|
|
48
48
|
}, "completed"),
|
|
49
49
|
/*#__PURE__*/ _jsxs(StatusIndicator, {
|
|
50
|
-
className: styles[
|
|
50
|
+
className: styles["status-indicator"],
|
|
51
51
|
title: "Failed",
|
|
52
52
|
$color: "red",
|
|
53
53
|
children: [
|
|
@@ -58,7 +58,7 @@ export function CollectionTranslationProgress({ collection, data, isPending }) {
|
|
|
58
58
|
]
|
|
59
59
|
}, "failed"),
|
|
60
60
|
/*#__PURE__*/ _jsxs(StatusIndicator, {
|
|
61
|
-
className: styles[
|
|
61
|
+
className: styles["status-indicator"],
|
|
62
62
|
title: "In progress",
|
|
63
63
|
$animated: data.running.length > 0,
|
|
64
64
|
$color: "blue",
|
|
@@ -70,7 +70,7 @@ export function CollectionTranslationProgress({ collection, data, isPending }) {
|
|
|
70
70
|
]
|
|
71
71
|
}, "running"),
|
|
72
72
|
/*#__PURE__*/ _jsxs(StatusIndicator, {
|
|
73
|
-
className: styles[
|
|
73
|
+
className: styles["status-indicator"],
|
|
74
74
|
title: "Pending",
|
|
75
75
|
$animated: data.pending.length > 0,
|
|
76
76
|
$color: "gray",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DocumentTranslationProgressFailed } from
|
|
1
|
+
export { DocumentTranslationProgressFailed } from "./ui/DocumentTranslationProgressFailed";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { DocumentTranslationFailed } from
|
|
1
|
+
import type { DocumentTranslationFailed } from "../../../entities/translation";
|
|
2
2
|
type DocumentTranslationProgressFailedProps = {
|
|
3
3
|
data: DocumentTranslationFailed;
|
|
4
4
|
};
|
|
5
|
-
export declare function DocumentTranslationProgressFailed({ data }: DocumentTranslationProgressFailedProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function DocumentTranslationProgressFailed({ data, }: DocumentTranslationProgressFailedProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { toast } from
|
|
3
|
-
import { FailedTranslationStatus, TranslationsApi } from
|
|
2
|
+
import { toast } from "@payloadcms/ui";
|
|
3
|
+
import { FailedTranslationStatus, TranslationsApi } from "../../../entities/translation";
|
|
4
4
|
export function DocumentTranslationProgressFailed({ data }) {
|
|
5
5
|
const runQueuedTranslationApi = TranslationsApi.useRunDocumentTranslation();
|
|
6
6
|
const handleRunDocumentTranslation = async ()=>{
|
|
@@ -12,7 +12,7 @@ export function DocumentTranslationProgressFailed({ data }) {
|
|
|
12
12
|
if (e instanceof Error) {
|
|
13
13
|
toast.error(e.message);
|
|
14
14
|
} else {
|
|
15
|
-
toast.error(
|
|
15
|
+
toast.error("Error running document translation");
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DocumentTranslationProgressPending } from
|
|
1
|
+
export { DocumentTranslationProgressPending } from "./ui/DocumentTranslationProgressPending";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { DocumentTranslationPending } from
|
|
1
|
+
import type { DocumentTranslationPending } from "../../../entities/translation";
|
|
2
2
|
type DocumentTranslationProgressPendingProps = {
|
|
3
3
|
data: DocumentTranslationPending;
|
|
4
4
|
};
|
|
5
|
-
export declare function DocumentTranslationProgressPending({ data }: DocumentTranslationProgressPendingProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function DocumentTranslationProgressPending({ data, }: DocumentTranslationProgressPendingProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { toast } from
|
|
3
|
-
import { TranslationsApi } from
|
|
4
|
-
import { PendingTranslationStatus } from
|
|
2
|
+
import { toast } from "@payloadcms/ui";
|
|
3
|
+
import { TranslationsApi } from "../../../entities/translation";
|
|
4
|
+
import { PendingTranslationStatus } from "../../../entities/translation";
|
|
5
5
|
export function DocumentTranslationProgressPending({ data }) {
|
|
6
6
|
const cancelDocumentTranslationApi = TranslationsApi.useCancelDocumentTranslation();
|
|
7
7
|
const runQueuedTranslationApi = TranslationsApi.useRunDocumentTranslation();
|
|
@@ -14,7 +14,7 @@ export function DocumentTranslationProgressPending({ data }) {
|
|
|
14
14
|
if (e instanceof Error) {
|
|
15
15
|
toast.error(e.message);
|
|
16
16
|
} else {
|
|
17
|
-
toast.error(
|
|
17
|
+
toast.error("Error canceling document translation");
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
};
|
|
@@ -27,7 +27,7 @@ export function DocumentTranslationProgressPending({ data }) {
|
|
|
27
27
|
if (e instanceof Error) {
|
|
28
28
|
toast.error(e.message);
|
|
29
29
|
} else {
|
|
30
|
-
toast.error(
|
|
30
|
+
toast.error("Error running document translation");
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DocumentTranslationProgressRunning } from
|
|
1
|
+
export { DocumentTranslationProgressRunning } from "./ui/DocumentTranslationProgressRunning";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { DocumentTranslationRunning } from
|
|
1
|
+
import type { DocumentTranslationRunning } from "../../../entities/translation";
|
|
2
2
|
type DocumentTranslationProgressRunningProps = {
|
|
3
3
|
data: DocumentTranslationRunning;
|
|
4
4
|
};
|
|
5
|
-
export declare function DocumentTranslationProgressRunning({ data }: DocumentTranslationProgressRunningProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function DocumentTranslationProgressRunning({ data, }: DocumentTranslationProgressRunningProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { toast } from
|
|
3
|
-
import { RunningTranslationStatus, TranslationsApi } from
|
|
2
|
+
import { toast } from "@payloadcms/ui";
|
|
3
|
+
import { RunningTranslationStatus, TranslationsApi } from "../../../entities/translation";
|
|
4
4
|
export function DocumentTranslationProgressRunning({ data }) {
|
|
5
5
|
const cancelDocumentTranslationApi = TranslationsApi.useCancelDocumentTranslation();
|
|
6
6
|
const handleCancelDocumentTranslation = async ()=>{
|
|
@@ -12,7 +12,7 @@ export function DocumentTranslationProgressRunning({ data }) {
|
|
|
12
12
|
if (e instanceof Error) {
|
|
13
13
|
toast.error(e.message);
|
|
14
14
|
} else {
|
|
15
|
-
toast.error(
|
|
15
|
+
toast.error("Error canceling document translation");
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as OpenDocumentTranslationPopup } from
|
|
1
|
+
export { default as OpenDocumentTranslationPopup } from "./ui/OpenDocumentTranslationPopup";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DocumentTranslationFormModel } from
|
|
1
|
+
export { DocumentTranslationFormModel } from "./model";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { FormValues, FormInput } from
|
|
2
|
-
export { FORM_FIELDS } from
|
|
3
|
-
export { DocumentTranslationForm } from
|
|
1
|
+
export type { FormValues, FormInput } from "./model/schema";
|
|
2
|
+
export { FORM_FIELDS } from "./model/constants";
|
|
3
|
+
export { DocumentTranslationForm } from "./ui/DocumentTranslationForm";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { FORM_FIELDS } from
|
|
2
|
-
export { DocumentTranslationForm } from
|
|
1
|
+
export { FORM_FIELDS } from "./model/constants";
|
|
2
|
+
export { DocumentTranslationForm } from "./ui/DocumentTranslationForm";
|
|
3
3
|
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TranslationStrategy } from
|
|
1
|
+
import type { TranslationStrategy } from "../../../shared/ui/form/FormSelectStrategy";
|
|
2
2
|
export declare const FORM_FIELDS: {
|
|
3
3
|
readonly SOURCE_LNG: "source_lng";
|
|
4
4
|
readonly TARGET_LNG: "target_lng";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export const FORM_FIELDS = {
|
|
2
|
-
SOURCE_LNG:
|
|
3
|
-
TARGET_LNG:
|
|
4
|
-
HIDDEN_COLLECTION_SLUG:
|
|
5
|
-
HIDDEN_COLLECTION_ID:
|
|
6
|
-
STRATEGY:
|
|
7
|
-
PUBLISH_ON_TRANSLATION:
|
|
2
|
+
SOURCE_LNG: "source_lng",
|
|
3
|
+
TARGET_LNG: "target_lng",
|
|
4
|
+
HIDDEN_COLLECTION_SLUG: "collection_slug",
|
|
5
|
+
HIDDEN_COLLECTION_ID: "collection_id",
|
|
6
|
+
STRATEGY: "strategy",
|
|
7
|
+
PUBLISH_ON_TRANSLATION: "publish_on_translation"
|
|
8
8
|
};
|
|
9
9
|
export const defaultValues = {
|
|
10
|
-
[FORM_FIELDS.SOURCE_LNG]:
|
|
11
|
-
[FORM_FIELDS.TARGET_LNG]:
|
|
12
|
-
[FORM_FIELDS.HIDDEN_COLLECTION_ID]:
|
|
13
|
-
[FORM_FIELDS.HIDDEN_COLLECTION_SLUG]:
|
|
14
|
-
[FORM_FIELDS.STRATEGY]:
|
|
10
|
+
[FORM_FIELDS.SOURCE_LNG]: "",
|
|
11
|
+
[FORM_FIELDS.TARGET_LNG]: "",
|
|
12
|
+
[FORM_FIELDS.HIDDEN_COLLECTION_ID]: "",
|
|
13
|
+
[FORM_FIELDS.HIDDEN_COLLECTION_SLUG]: "",
|
|
14
|
+
[FORM_FIELDS.STRATEGY]: "overwrite",
|
|
15
15
|
[FORM_FIELDS.PUBLISH_ON_TRANSLATION]: false
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -7,5 +7,5 @@ type UseFormProps = {
|
|
|
7
7
|
initialValues?: FormInput;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export declare const useTranslateDocumentForm: ({ initialValues, disabled }?: UseFormProps) => UseFormReturn_;
|
|
10
|
+
export declare const useTranslateDocumentForm: ({ initialValues, disabled, }?: UseFormProps) => UseFormReturn_;
|
|
11
11
|
export {};
|