@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
|
@@ -1,14 +1,14 @@
|
|
|
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
4
|
[FORM_FIELDS.SOURCE_LNG]: z.string().nonempty(),
|
|
5
5
|
[FORM_FIELDS.TARGET_LNG]: z.string().nonempty(),
|
|
6
6
|
[FORM_FIELDS.HIDDEN_COLLECTION_ID]: z.string().nonempty(),
|
|
7
7
|
[FORM_FIELDS.HIDDEN_COLLECTION_SLUG]: z.string().nonempty(),
|
|
8
8
|
[FORM_FIELDS.STRATEGY]: z.enum([
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
]).default(
|
|
9
|
+
"overwrite",
|
|
10
|
+
"skip_existing"
|
|
11
|
+
]).default("overwrite"),
|
|
12
12
|
[FORM_FIELDS.PUBLISH_ON_TRANSLATION]: z.boolean().default(false)
|
|
13
13
|
});
|
|
14
14
|
|
|
@@ -5,5 +5,5 @@ type DocumentTranslationFormProps = {
|
|
|
5
5
|
onSubmit: (values: FormValues) => Promise<void>;
|
|
6
6
|
hasDrafts?: boolean;
|
|
7
7
|
};
|
|
8
|
-
export declare function DocumentTranslationForm({ form, onSubmit, hasDrafts }: DocumentTranslationFormProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function DocumentTranslationForm({ form, onSubmit, hasDrafts, }: DocumentTranslationFormProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DocumentTranslationForm } from
|
|
1
|
+
export { DocumentTranslationForm } from "./DocumentTranslationForm";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FetchError } from
|
|
1
|
+
import { FetchError } from "ofetch";
|
|
2
2
|
export class NextApiError extends Error {
|
|
3
3
|
message;
|
|
4
4
|
details;
|
|
@@ -19,7 +19,7 @@ export async function handleNextApiError(callback) {
|
|
|
19
19
|
if (e instanceof Error) {
|
|
20
20
|
throw new NextApiError(e.message);
|
|
21
21
|
}
|
|
22
|
-
throw new NextApiError(
|
|
22
|
+
throw new NextApiError("Unknown error");
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { UseFormReturn } from
|
|
1
|
+
import type { UseFormReturn } from "react-hook-form";
|
|
2
2
|
export declare function handleFormError<D extends object>(error: unknown, form: UseFormReturn<D, unknown, any>): void;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { NextApiError } from
|
|
1
|
+
import { NextApiError } from "../errors/handleApiError";
|
|
2
2
|
export function handleFormError(error, form) {
|
|
3
3
|
if (error instanceof NextApiError) {
|
|
4
4
|
if (error.details) {
|
|
5
5
|
error.details?.forEach((error)=>{
|
|
6
|
-
form.setError(error.path.join(
|
|
6
|
+
form.setError(error.path.join("."), {
|
|
7
7
|
message: error.message
|
|
8
8
|
});
|
|
9
9
|
});
|
|
10
10
|
} else {
|
|
11
|
-
form.setError(
|
|
11
|
+
form.setError("root", {
|
|
12
12
|
message: error.message
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
} else if (error instanceof Error) {
|
|
16
|
-
form.setError(
|
|
16
|
+
form.setError("root", {
|
|
17
17
|
message: error.message
|
|
18
18
|
});
|
|
19
19
|
} else {
|
|
20
|
-
form.setError(
|
|
21
|
-
message:
|
|
20
|
+
form.setError("root", {
|
|
21
|
+
message: "Unknown error"
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useParams } from
|
|
1
|
+
import { useParams } from "next/navigation";
|
|
2
2
|
export function useCollectionDocumentUrlParams() {
|
|
3
3
|
const params = useParams();
|
|
4
4
|
const segments = params.segments;
|
|
5
5
|
if (!segments) {
|
|
6
|
-
throw new Error(
|
|
6
|
+
throw new Error("useCollectionUrlParams hook can only be called on collection pages. Make sure you are using this hook within a Payload collection context.");
|
|
7
7
|
}
|
|
8
8
|
return {
|
|
9
9
|
collection: segments[1],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useConfig } from
|
|
2
|
-
import { useMemo } from
|
|
1
|
+
import { useConfig } from "@payloadcms/ui";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
3
|
export function useLocaleOptions() {
|
|
4
4
|
const appConfig = useConfig();
|
|
5
5
|
return useMemo(()=>appConfig.config.localization ? appConfig.config.localization.locales.map((l)=>({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FetchError } from
|
|
1
|
+
import { FetchError } from "ofetch";
|
|
2
2
|
export class TranslationApiError extends Error {
|
|
3
3
|
message;
|
|
4
4
|
details;
|
|
@@ -19,7 +19,7 @@ export async function handleApiError(callback) {
|
|
|
19
19
|
if (e instanceof Error) {
|
|
20
20
|
throw new TranslationApiError(e.message);
|
|
21
21
|
}
|
|
22
|
-
throw new TranslationApiError(
|
|
22
|
+
throw new TranslationApiError("Unknown error");
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QueryClient } from
|
|
1
|
+
import { QueryClient } from "@tanstack/react-query";
|
|
2
2
|
export interface QueryClientConfig {
|
|
3
3
|
staleTime?: number;
|
|
4
4
|
gcTime?: number;
|
|
@@ -8,7 +8,7 @@ export interface QueryClientConfig {
|
|
|
8
8
|
refetchOnMount?: boolean;
|
|
9
9
|
retryDelay?: number | ((attemptIndex: number) => number);
|
|
10
10
|
}
|
|
11
|
-
export type QueryClientType =
|
|
11
|
+
export type QueryClientType = "server" | "client";
|
|
12
12
|
export declare class CacheClientProviderFactory {
|
|
13
13
|
private clientQueryClient;
|
|
14
14
|
private readonly config;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QueryClient } from
|
|
1
|
+
import { QueryClient } from "@tanstack/react-query";
|
|
2
2
|
export class CacheClientProviderFactory {
|
|
3
3
|
clientQueryClient = null;
|
|
4
4
|
config;
|
|
@@ -19,9 +19,9 @@ export class CacheClientProviderFactory {
|
|
|
19
19
|
* Creates QueryClient with specified type
|
|
20
20
|
*/ create(type) {
|
|
21
21
|
switch(type){
|
|
22
|
-
case
|
|
22
|
+
case "server":
|
|
23
23
|
return this.createServerQueryClient();
|
|
24
|
-
case
|
|
24
|
+
case "client":
|
|
25
25
|
if (!this.clientQueryClient) {
|
|
26
26
|
this.clientQueryClient = this.createClientQueryClient();
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { CacheClientProviderFactory } from
|
|
1
|
+
export { CacheClientProviderFactory } from "./CacheClientProvider.factory";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
export type AlertVariant =
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type AlertVariant = "transparent" | "info" | "warning" | "error";
|
|
3
3
|
export interface AlertProps {
|
|
4
4
|
variant?: AlertVariant;
|
|
5
5
|
children: React.ReactNode;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import classNames from
|
|
3
|
-
import React from
|
|
4
|
-
import styles from
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import styles from "./styles.module.scss";
|
|
5
5
|
const getRole = (variant)=>{
|
|
6
6
|
switch(variant){
|
|
7
|
-
case
|
|
8
|
-
return
|
|
9
|
-
case
|
|
10
|
-
return
|
|
11
|
-
case
|
|
12
|
-
return
|
|
7
|
+
case "error":
|
|
8
|
+
return "alert";
|
|
9
|
+
case "warning":
|
|
10
|
+
return "alert";
|
|
11
|
+
case "info":
|
|
12
|
+
return "status";
|
|
13
13
|
default:
|
|
14
|
-
return
|
|
14
|
+
return "status";
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
const getAriaLive = (variant)=>{
|
|
18
18
|
switch(variant){
|
|
19
|
-
case
|
|
20
|
-
return
|
|
21
|
-
case
|
|
22
|
-
return
|
|
23
|
-
case
|
|
24
|
-
return
|
|
19
|
+
case "error":
|
|
20
|
+
return "assertive";
|
|
21
|
+
case "warning":
|
|
22
|
+
return "polite";
|
|
23
|
+
case "info":
|
|
24
|
+
return "polite";
|
|
25
25
|
default:
|
|
26
|
-
return
|
|
26
|
+
return "polite";
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
-
const Alert = ({ variant =
|
|
29
|
+
const Alert = ({ variant = "transparent", children, className })=>{
|
|
30
30
|
return /*#__PURE__*/ _jsx("div", {
|
|
31
31
|
className: classNames(styles.alert, styles[`alert--${variant}`], className),
|
|
32
32
|
role: getRole(variant),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from "./Alert";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from "./Button";
|
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
justify-content: center;
|
|
8
8
|
align-items: center;
|
|
9
9
|
text-decoration: none;
|
|
10
|
-
transition:
|
|
10
|
+
transition:
|
|
11
|
+
background 0.1s ease-in-out,
|
|
12
|
+
opacity 0.2s ease-in-out,
|
|
13
|
+
border-color 0.2s ease-in-out;
|
|
11
14
|
background: none;
|
|
12
15
|
padding-block: 0.25rem;
|
|
13
16
|
padding-inline: var(--padding-inline);
|
|
@@ -97,7 +100,7 @@
|
|
|
97
100
|
|
|
98
101
|
&:hover:not(:disabled),
|
|
99
102
|
&:focus {
|
|
100
|
-
background-color: transparent
|
|
103
|
+
background-color: transparent;
|
|
101
104
|
}
|
|
102
105
|
}
|
|
103
106
|
|
|
@@ -123,4 +126,4 @@
|
|
|
123
126
|
background-color: var(--theme-elevation-50);
|
|
124
127
|
color: var(--theme-elevation-400);
|
|
125
128
|
}
|
|
126
|
-
}
|
|
129
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentPropsWithRef } from
|
|
2
|
-
type CheckboxProps = Omit<ComponentPropsWithRef<
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
type CheckboxProps = Omit<ComponentPropsWithRef<"input">, "type"> & {
|
|
3
3
|
hasError?: boolean;
|
|
4
4
|
};
|
|
5
5
|
declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from
|
|
3
|
-
import styles from
|
|
4
|
-
const Checkbox = /*#__PURE__*/ forwardRef(function Checkbox({ className =
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import styles from "./styles.module.scss";
|
|
4
|
+
const Checkbox = /*#__PURE__*/ forwardRef(function Checkbox({ className = "", hasError, ...props }, ref) {
|
|
5
5
|
return /*#__PURE__*/ _jsx("input", {
|
|
6
6
|
ref: ref,
|
|
7
7
|
type: "checkbox",
|
|
8
|
-
className: `${styles.checkbox} ${hasError ? styles[
|
|
8
|
+
className: `${styles.checkbox} ${hasError ? styles["checkbox--error"] : ""} ${className}`,
|
|
9
9
|
...props
|
|
10
10
|
});
|
|
11
11
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Checkbox } from
|
|
1
|
+
export { default as Checkbox } from "./Checkbox";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
type ColorIndicatorProps = {
|
|
2
|
-
$color:
|
|
2
|
+
$color: "red" | "green" | "blue" | "gray";
|
|
3
3
|
$animated?: boolean;
|
|
4
4
|
title?: string;
|
|
5
5
|
className?: string;
|
|
6
6
|
};
|
|
7
|
-
export default function ColorIndicator({ $color, $animated, title, className }: ColorIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default function ColorIndicator({ $color, $animated, title, className, }: ColorIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import classNames from
|
|
3
|
-
import styles from
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import styles from "./styles.module.scss";
|
|
4
4
|
export default function ColorIndicator({ $color, $animated, title, className }) {
|
|
5
5
|
return /*#__PURE__*/ _jsx("div", {
|
|
6
6
|
title: title,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from "./ColorIndicator";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ComponentPropsWithoutRef } from
|
|
2
|
-
type DescriptionProps = ComponentPropsWithoutRef<
|
|
1
|
+
import type { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
type DescriptionProps = ComponentPropsWithoutRef<"div"> & {
|
|
3
3
|
id: string;
|
|
4
|
-
variant?:
|
|
4
|
+
variant?: "default" | "error";
|
|
5
5
|
};
|
|
6
6
|
export default function Description({ children, className, id, variant, ...props }: DescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import styles from
|
|
3
|
-
export default function Description({ children, className =
|
|
2
|
+
import styles from "./styles.module.scss";
|
|
3
|
+
export default function Description({ children, className = "", id, variant = "default", ...props }) {
|
|
4
4
|
const descriptionClassName = `${styles.description} ${styles[variant]} ${className}`;
|
|
5
5
|
return /*#__PURE__*/ _jsx("p", {
|
|
6
6
|
id: id,
|
|
7
7
|
className: descriptionClassName,
|
|
8
|
-
role: variant ===
|
|
9
|
-
"aria-live": variant ===
|
|
8
|
+
role: variant === "error" ? "alert" : undefined,
|
|
9
|
+
"aria-live": variant === "error" ? "polite" : undefined,
|
|
10
10
|
...props,
|
|
11
11
|
children: children
|
|
12
12
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from "./Description";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
type DividerProps = {
|
|
3
|
-
$orientation?:
|
|
4
|
-
$size?:
|
|
5
|
-
$color?:
|
|
3
|
+
$orientation?: "horizontal" | "vertical";
|
|
4
|
+
$size?: "sm" | "md" | "lg";
|
|
5
|
+
$color?: "light" | "medium" | "dark";
|
|
6
6
|
className?: string;
|
|
7
7
|
style?: React.CSSProperties;
|
|
8
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import classNames from
|
|
3
|
-
import * as React from
|
|
4
|
-
import styles from
|
|
5
|
-
const Divider = /*#__PURE__*/ React.forwardRef(function Divider({ $orientation =
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import styles from "./styles.module.scss";
|
|
5
|
+
const Divider = /*#__PURE__*/ React.forwardRef(function Divider({ $orientation = "horizontal", $size = "md", $color = "medium", className, style, ...props }, ref) {
|
|
6
6
|
return /*#__PURE__*/ _jsx("hr", {
|
|
7
7
|
ref: ref,
|
|
8
8
|
className: classNames(styles.divider, styles[$orientation], styles[$size], styles[$color], className),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from "./Divider";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentPropsWithRef, ReactElement } from
|
|
2
|
-
type LabelProps = ComponentPropsWithRef<
|
|
1
|
+
import type { ComponentPropsWithRef, ReactElement } from "react";
|
|
2
|
+
type LabelProps = ComponentPropsWithRef<"label"> & {
|
|
3
3
|
label: string | ReactElement;
|
|
4
4
|
};
|
|
5
5
|
declare const Label: import("react").ForwardRefExoticComponent<Omit<LabelProps, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from
|
|
3
|
-
import styles from
|
|
4
|
-
const Label = /*#__PURE__*/ forwardRef(function Label({ children, className =
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import styles from "./styles.module.scss";
|
|
4
|
+
const Label = /*#__PURE__*/ forwardRef(function Label({ children, className = "", label, ...props }, ref) {
|
|
5
5
|
return /*#__PURE__*/ _jsxs("label", {
|
|
6
6
|
ref: ref,
|
|
7
7
|
className: `${styles.label} ${className}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from "./Label";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import classNames from
|
|
3
|
-
import styles from
|
|
4
|
-
function Loading({ text, className, size =
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import styles from "./styles.module.scss";
|
|
4
|
+
function Loading({ text, className, size = "medium" }) {
|
|
5
5
|
return /*#__PURE__*/ _jsxs("div", {
|
|
6
|
-
className: classNames(styles[
|
|
6
|
+
className: classNames(styles["loading-overlay"], styles["loading-overlay--entering"], className),
|
|
7
7
|
style: {
|
|
8
|
-
animationDuration:
|
|
8
|
+
animationDuration: "500ms"
|
|
9
9
|
},
|
|
10
10
|
children: [
|
|
11
11
|
/*#__PURE__*/ _jsx("div", {
|
|
12
|
-
className: classNames(styles[
|
|
13
|
-
children: new Array(size ===
|
|
14
|
-
className: classNames(styles[
|
|
12
|
+
className: classNames(styles["loading-overlay__bars"], styles[`loading-overlay__bars_${size}`]),
|
|
13
|
+
children: new Array(size === "small" ? 2 : 5).fill(null).map((_, index)=>/*#__PURE__*/ _jsx("div", {
|
|
14
|
+
className: classNames(styles["loading-overlay__bar"], styles[`loading-overlay__bar_size-${size}`])
|
|
15
15
|
}, index))
|
|
16
16
|
}),
|
|
17
17
|
text && /*#__PURE__*/ _jsx("span", {
|
|
18
|
-
className: styles[
|
|
18
|
+
className: styles["loading-overlay__text"],
|
|
19
19
|
children: text
|
|
20
20
|
})
|
|
21
21
|
]
|