@focus-reactive/payload-plugin-translator 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1064) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +410 -0
  3. package/dist/client/app/cache/CacheProvider.d.ts +7 -0
  4. package/dist/client/app/cache/CacheProvider.d.ts.map +1 -0
  5. package/dist/client/app/cache/CacheProvider.export.d.ts +9 -0
  6. package/dist/client/app/cache/CacheProvider.export.d.ts.map +1 -0
  7. package/dist/client/app/cache/CacheProvider.export.js +12 -0
  8. package/dist/client/app/cache/CacheProvider.export.js.map +1 -0
  9. package/dist/client/app/cache/CacheProvider.js +18 -0
  10. package/dist/client/app/cache/CacheProvider.js.map +1 -0
  11. package/dist/client/app/cache/CacheProvider.jsx +11 -0
  12. package/dist/client/app/config/TranslateKitConfigContext.d.ts +9 -0
  13. package/dist/client/app/config/TranslateKitConfigContext.d.ts.map +1 -0
  14. package/dist/client/app/config/TranslateKitConfigContext.js +23 -0
  15. package/dist/client/app/config/TranslateKitConfigContext.js.map +1 -0
  16. package/dist/client/app/config/TranslateKitConfigContext.jsx +13 -0
  17. package/dist/client/app/config/index.d.ts +3 -0
  18. package/dist/client/app/config/index.d.ts.map +1 -0
  19. package/dist/client/app/config/index.js +3 -0
  20. package/dist/client/app/config/index.js.map +1 -0
  21. package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.d.ts +6 -0
  22. package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.d.ts.map +1 -0
  23. package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.js +27 -0
  24. package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.js.map +1 -0
  25. package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.d.ts +6 -0
  26. package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.d.ts.map +1 -0
  27. package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.js +34 -0
  28. package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.js.map +1 -0
  29. package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.d.ts +13 -0
  30. package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.d.ts.map +1 -0
  31. package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.js +33 -0
  32. package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.js.map +1 -0
  33. package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.d.ts +9 -0
  34. package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.d.ts.map +1 -0
  35. package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.js +20 -0
  36. package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.js.map +1 -0
  37. package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.d.ts +6 -0
  38. package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.d.ts.map +1 -0
  39. package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.js +27 -0
  40. package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.js.map +1 -0
  41. package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.d.ts +179 -0
  42. package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.d.ts.map +1 -0
  43. package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.js +67 -0
  44. package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.js.map +1 -0
  45. package/dist/client/entities/translation/api/queries/useDocumentTranslation.d.ts +180 -0
  46. package/dist/client/entities/translation/api/queries/useDocumentTranslation.d.ts.map +1 -0
  47. package/dist/client/entities/translation/api/queries/useDocumentTranslation.js +55 -0
  48. package/dist/client/entities/translation/api/queries/useDocumentTranslation.js.map +1 -0
  49. package/dist/client/entities/translation/index.d.ts +21 -0
  50. package/dist/client/entities/translation/index.d.ts.map +1 -0
  51. package/dist/client/entities/translation/index.js +21 -0
  52. package/dist/client/entities/translation/index.js.map +1 -0
  53. package/dist/client/entities/translation/model/enums.d.ts +7 -0
  54. package/dist/client/entities/translation/model/enums.d.ts.map +1 -0
  55. package/dist/client/entities/translation/model/enums.js +9 -0
  56. package/dist/client/entities/translation/model/enums.js.map +1 -0
  57. package/dist/client/entities/translation/model/types.d.ts +48 -0
  58. package/dist/client/entities/translation/model/types.d.ts.map +1 -0
  59. package/dist/client/entities/translation/model/types.js +3 -0
  60. package/dist/client/entities/translation/model/types.js.map +1 -0
  61. package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.d.ts +8 -0
  62. package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.d.ts.map +1 -0
  63. package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.js +45 -0
  64. package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.js.map +1 -0
  65. package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.jsx +25 -0
  66. package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.d.ts +2 -0
  67. package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.d.ts.map +1 -0
  68. package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.js +3 -0
  69. package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.js.map +1 -0
  70. package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.d.ts +10 -0
  71. package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.d.ts.map +1 -0
  72. package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.js +54 -0
  73. package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.js.map +1 -0
  74. package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.jsx +24 -0
  75. package/dist/client/entities/translation/ui/FailedTranslationStatus/index.d.ts +2 -0
  76. package/dist/client/entities/translation/ui/FailedTranslationStatus/index.d.ts.map +1 -0
  77. package/dist/client/entities/translation/ui/FailedTranslationStatus/index.js +3 -0
  78. package/dist/client/entities/translation/ui/FailedTranslationStatus/index.js.map +1 -0
  79. package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.d.ts +12 -0
  80. package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.d.ts.map +1 -0
  81. package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.js +83 -0
  82. package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.js.map +1 -0
  83. package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.jsx +38 -0
  84. package/dist/client/entities/translation/ui/PendingTranslationStatus/index.d.ts +2 -0
  85. package/dist/client/entities/translation/ui/PendingTranslationStatus/index.d.ts.map +1 -0
  86. package/dist/client/entities/translation/ui/PendingTranslationStatus/index.js +3 -0
  87. package/dist/client/entities/translation/ui/PendingTranslationStatus/index.js.map +1 -0
  88. package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.d.ts +11 -0
  89. package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.d.ts.map +1 -0
  90. package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.js +66 -0
  91. package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.js.map +1 -0
  92. package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.jsx +32 -0
  93. package/dist/client/entities/translation/ui/RunningTranslationStatus/index.d.ts +2 -0
  94. package/dist/client/entities/translation/ui/RunningTranslationStatus/index.d.ts.map +1 -0
  95. package/dist/client/entities/translation/ui/RunningTranslationStatus/index.js +3 -0
  96. package/dist/client/entities/translation/ui/RunningTranslationStatus/index.js.map +1 -0
  97. package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.d.ts +8 -0
  98. package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.d.ts.map +1 -0
  99. package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.js +28 -0
  100. package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.js.map +1 -0
  101. package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.jsx +16 -0
  102. package/dist/client/entities/translation/ui/TranslationDirection/index.d.ts +2 -0
  103. package/dist/client/entities/translation/ui/TranslationDirection/index.d.ts.map +1 -0
  104. package/dist/client/entities/translation/ui/TranslationDirection/index.js +3 -0
  105. package/dist/client/entities/translation/ui/TranslationDirection/index.js.map +1 -0
  106. package/dist/client/features/collection-translation-form/index.client.d.ts +2 -0
  107. package/dist/client/features/collection-translation-form/index.client.d.ts.map +1 -0
  108. package/dist/client/features/collection-translation-form/index.client.js +3 -0
  109. package/dist/client/features/collection-translation-form/index.client.js.map +1 -0
  110. package/dist/client/features/collection-translation-form/index.d.ts +4 -0
  111. package/dist/client/features/collection-translation-form/index.d.ts.map +1 -0
  112. package/dist/client/features/collection-translation-form/index.js +4 -0
  113. package/dist/client/features/collection-translation-form/index.js.map +1 -0
  114. package/dist/client/features/collection-translation-form/model/constants.d.ts +16 -0
  115. package/dist/client/features/collection-translation-form/model/constants.d.ts.map +1 -0
  116. package/dist/client/features/collection-translation-form/model/constants.js +16 -0
  117. package/dist/client/features/collection-translation-form/model/constants.js.map +1 -0
  118. package/dist/client/features/collection-translation-form/model/form-model.d.ts +12 -0
  119. package/dist/client/features/collection-translation-form/model/form-model.d.ts.map +1 -0
  120. package/dist/client/features/collection-translation-form/model/form-model.js +32 -0
  121. package/dist/client/features/collection-translation-form/model/form-model.js.map +1 -0
  122. package/dist/client/features/collection-translation-form/model/index.d.ts +9 -0
  123. package/dist/client/features/collection-translation-form/model/index.d.ts.map +1 -0
  124. package/dist/client/features/collection-translation-form/model/index.js +6 -0
  125. package/dist/client/features/collection-translation-form/model/index.js.map +1 -0
  126. package/dist/client/features/collection-translation-form/model/schema.d.ts +23 -0
  127. package/dist/client/features/collection-translation-form/model/schema.d.ts.map +1 -0
  128. package/dist/client/features/collection-translation-form/model/schema.js +14 -0
  129. package/dist/client/features/collection-translation-form/model/schema.js.map +1 -0
  130. package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.d.ts +11 -0
  131. package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.d.ts.map +1 -0
  132. package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.js +64 -0
  133. package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.js.map +1 -0
  134. package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.jsx +25 -0
  135. package/dist/client/features/collection-translation-form/ui/index.d.ts +2 -0
  136. package/dist/client/features/collection-translation-form/ui/index.d.ts.map +1 -0
  137. package/dist/client/features/collection-translation-form/ui/index.js +3 -0
  138. package/dist/client/features/collection-translation-form/ui/index.js.map +1 -0
  139. package/dist/client/features/collection-translation-popup/index.d.ts +2 -0
  140. package/dist/client/features/collection-translation-popup/index.d.ts.map +1 -0
  141. package/dist/client/features/collection-translation-popup/index.js +3 -0
  142. package/dist/client/features/collection-translation-popup/index.js.map +1 -0
  143. package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.d.ts +8 -0
  144. package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.d.ts.map +1 -0
  145. package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.js +48 -0
  146. package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.js.map +1 -0
  147. package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.jsx +23 -0
  148. package/dist/client/features/collection-translation-progress/index.d.ts +2 -0
  149. package/dist/client/features/collection-translation-progress/index.d.ts.map +1 -0
  150. package/dist/client/features/collection-translation-progress/index.js +3 -0
  151. package/dist/client/features/collection-translation-progress/index.js.map +1 -0
  152. package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.d.ts +9 -0
  153. package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.d.ts.map +1 -0
  154. package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.js +108 -0
  155. package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.js.map +1 -0
  156. package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.jsx +47 -0
  157. package/dist/client/features/document-translation-progress-failed/index.d.ts +2 -0
  158. package/dist/client/features/document-translation-progress-failed/index.d.ts.map +1 -0
  159. package/dist/client/features/document-translation-progress-failed/index.js +3 -0
  160. package/dist/client/features/document-translation-progress-failed/index.js.map +1 -0
  161. package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.d.ts +7 -0
  162. package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.d.ts.map +1 -0
  163. package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.js +28 -0
  164. package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.js.map +1 -0
  165. package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.jsx +19 -0
  166. package/dist/client/features/document-translation-progress-pending/index.d.ts +2 -0
  167. package/dist/client/features/document-translation-progress-pending/index.d.ts.map +1 -0
  168. package/dist/client/features/document-translation-progress-pending/index.js +3 -0
  169. package/dist/client/features/document-translation-progress-pending/index.js.map +1 -0
  170. package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.d.ts +7 -0
  171. package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.d.ts.map +1 -0
  172. package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.js +44 -0
  173. package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.js.map +1 -0
  174. package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.jsx +34 -0
  175. package/dist/client/features/document-translation-progress-running/index.d.ts +2 -0
  176. package/dist/client/features/document-translation-progress-running/index.d.ts.map +1 -0
  177. package/dist/client/features/document-translation-progress-running/index.js +3 -0
  178. package/dist/client/features/document-translation-progress-running/index.js.map +1 -0
  179. package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.d.ts +7 -0
  180. package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.d.ts.map +1 -0
  181. package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.js +28 -0
  182. package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.js.map +1 -0
  183. package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.jsx +19 -0
  184. package/dist/client/features/open-document-translation-popup/index.d.ts +2 -0
  185. package/dist/client/features/open-document-translation-popup/index.d.ts.map +1 -0
  186. package/dist/client/features/open-document-translation-popup/index.js +3 -0
  187. package/dist/client/features/open-document-translation-popup/index.js.map +1 -0
  188. package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.d.ts +10 -0
  189. package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.d.ts.map +1 -0
  190. package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.js +35 -0
  191. package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.js.map +1 -0
  192. package/dist/client/features/open-document-translation-popup/ui/OpenDocumentTranslationPopup.jsx +15 -0
  193. package/dist/client/features/translate-document-form/index.client.d.ts +2 -0
  194. package/dist/client/features/translate-document-form/index.client.d.ts.map +1 -0
  195. package/dist/client/features/translate-document-form/index.client.js +3 -0
  196. package/dist/client/features/translate-document-form/index.client.js.map +1 -0
  197. package/dist/client/features/translate-document-form/index.d.ts +4 -0
  198. package/dist/client/features/translate-document-form/index.d.ts.map +1 -0
  199. package/dist/client/features/translate-document-form/index.js +4 -0
  200. package/dist/client/features/translate-document-form/index.js.map +1 -0
  201. package/dist/client/features/translate-document-form/model/constants.d.ts +18 -0
  202. package/dist/client/features/translate-document-form/model/constants.d.ts.map +1 -0
  203. package/dist/client/features/translate-document-form/model/constants.js +18 -0
  204. package/dist/client/features/translate-document-form/model/constants.js.map +1 -0
  205. package/dist/client/features/translate-document-form/model/form-model.d.ts +12 -0
  206. package/dist/client/features/translate-document-form/model/form-model.d.ts.map +1 -0
  207. package/dist/client/features/translate-document-form/model/form-model.js +32 -0
  208. package/dist/client/features/translate-document-form/model/form-model.js.map +1 -0
  209. package/dist/client/features/translate-document-form/model/index.d.ts +9 -0
  210. package/dist/client/features/translate-document-form/model/index.d.ts.map +1 -0
  211. package/dist/client/features/translate-document-form/model/index.js +6 -0
  212. package/dist/client/features/translate-document-form/model/index.js.map +1 -0
  213. package/dist/client/features/translate-document-form/model/schema.d.ts +26 -0
  214. package/dist/client/features/translate-document-form/model/schema.d.ts.map +1 -0
  215. package/dist/client/features/translate-document-form/model/schema.js +15 -0
  216. package/dist/client/features/translate-document-form/model/schema.js.map +1 -0
  217. package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.d.ts +10 -0
  218. package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.d.ts.map +1 -0
  219. package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.js +57 -0
  220. package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.js.map +1 -0
  221. package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.jsx +24 -0
  222. package/dist/client/features/translate-document-form/ui/index.d.ts +2 -0
  223. package/dist/client/features/translate-document-form/ui/index.d.ts.map +1 -0
  224. package/dist/client/features/translate-document-form/ui/index.js +3 -0
  225. package/dist/client/features/translate-document-form/ui/index.js.map +1 -0
  226. package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.d.ts +2 -0
  227. package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.d.ts.map +1 -0
  228. package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.js +18 -0
  229. package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.js.map +1 -0
  230. package/dist/client/shared/lib/assets/icons/LanguageTranslateIcon.jsx +4 -0
  231. package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.d.ts +2 -0
  232. package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.d.ts.map +1 -0
  233. package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.js +16 -0
  234. package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.js.map +1 -0
  235. package/dist/client/shared/lib/assets/icons/QuestionCircleIcon.jsx +3 -0
  236. package/dist/client/shared/lib/assets/icons/ReloadIcon.d.ts +2 -0
  237. package/dist/client/shared/lib/assets/icons/ReloadIcon.d.ts.map +1 -0
  238. package/dist/client/shared/lib/assets/icons/ReloadIcon.js +14 -0
  239. package/dist/client/shared/lib/assets/icons/ReloadIcon.js.map +1 -0
  240. package/dist/client/shared/lib/assets/icons/ReloadIcon.jsx +3 -0
  241. package/dist/client/shared/lib/errors/handleApiError.d.ts +8 -0
  242. package/dist/client/shared/lib/errors/handleApiError.d.ts.map +1 -0
  243. package/dist/client/shared/lib/errors/handleApiError.js +24 -0
  244. package/dist/client/shared/lib/errors/handleApiError.js.map +1 -0
  245. package/dist/client/shared/lib/forms/handle-form-error.d.ts +3 -0
  246. package/dist/client/shared/lib/forms/handle-form-error.d.ts.map +1 -0
  247. package/dist/client/shared/lib/forms/handle-form-error.js +26 -0
  248. package/dist/client/shared/lib/forms/handle-form-error.js.map +1 -0
  249. package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.d.ts +7 -0
  250. package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.d.ts.map +1 -0
  251. package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.js +12 -0
  252. package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.js.map +1 -0
  253. package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.d.ts +9 -0
  254. package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.d.ts.map +1 -0
  255. package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.js +14 -0
  256. package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.js.map +1 -0
  257. package/dist/client/shared/lib/payload/hooks/useLocaleOptions.d.ts +5 -0
  258. package/dist/client/shared/lib/payload/hooks/useLocaleOptions.d.ts.map +1 -0
  259. package/dist/client/shared/lib/payload/hooks/useLocaleOptions.js +13 -0
  260. package/dist/client/shared/lib/payload/hooks/useLocaleOptions.js.map +1 -0
  261. package/dist/client/shared/lib/utils/errors/handleApiError.d.ts +8 -0
  262. package/dist/client/shared/lib/utils/errors/handleApiError.d.ts.map +1 -0
  263. package/dist/client/shared/lib/utils/errors/handleApiError.js +24 -0
  264. package/dist/client/shared/lib/utils/errors/handleApiError.js.map +1 -0
  265. package/dist/client/shared/lib/utils/react/useToggle.d.ts +7 -0
  266. package/dist/client/shared/lib/utils/react/useToggle.d.ts.map +1 -0
  267. package/dist/client/shared/lib/utils/react/useToggle.js +24 -0
  268. package/dist/client/shared/lib/utils/react/useToggle.js.map +1 -0
  269. package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.d.ts +32 -0
  270. package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.d.ts.map +1 -0
  271. package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.js +66 -0
  272. package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.js.map +1 -0
  273. package/dist/client/shared/providers/CacheClientProvider/index.d.ts +2 -0
  274. package/dist/client/shared/providers/CacheClientProvider/index.d.ts.map +1 -0
  275. package/dist/client/shared/providers/CacheClientProvider/index.js +3 -0
  276. package/dist/client/shared/providers/CacheClientProvider/index.js.map +1 -0
  277. package/dist/client/shared/types/AccessGuard.d.ts +12 -0
  278. package/dist/client/shared/types/AccessGuard.d.ts.map +1 -0
  279. package/dist/client/shared/types/AccessGuard.js +3 -0
  280. package/dist/client/shared/types/AccessGuard.js.map +1 -0
  281. package/dist/client/shared/types/PayloadComponentExport.d.ts +3 -0
  282. package/dist/client/shared/types/PayloadComponentExport.d.ts.map +1 -0
  283. package/dist/client/shared/types/PayloadComponentExport.js +3 -0
  284. package/dist/client/shared/types/PayloadComponentExport.js.map +1 -0
  285. package/dist/client/shared/ui/Alert/Alert.d.ts +10 -0
  286. package/dist/client/shared/ui/Alert/Alert.d.ts.map +1 -0
  287. package/dist/client/shared/ui/Alert/Alert.js +40 -0
  288. package/dist/client/shared/ui/Alert/Alert.js.map +1 -0
  289. package/dist/client/shared/ui/Alert/Alert.jsx +33 -0
  290. package/dist/client/shared/ui/Alert/index.d.ts +2 -0
  291. package/dist/client/shared/ui/Alert/index.d.ts.map +1 -0
  292. package/dist/client/shared/ui/Alert/index.js +3 -0
  293. package/dist/client/shared/ui/Alert/index.js.map +1 -0
  294. package/dist/client/shared/ui/Button/Button.d.ts +12 -0
  295. package/dist/client/shared/ui/Button/Button.d.ts.map +1 -0
  296. package/dist/client/shared/ui/Button/Button.js +47 -0
  297. package/dist/client/shared/ui/Button/Button.js.map +1 -0
  298. package/dist/client/shared/ui/Button/Button.jsx +35 -0
  299. package/dist/client/shared/ui/Button/index.d.ts +2 -0
  300. package/dist/client/shared/ui/Button/index.d.ts.map +1 -0
  301. package/dist/client/shared/ui/Button/index.js +3 -0
  302. package/dist/client/shared/ui/Button/index.js.map +1 -0
  303. package/dist/client/shared/ui/Checkbox/Checkbox.d.ts +7 -0
  304. package/dist/client/shared/ui/Checkbox/Checkbox.d.ts.map +1 -0
  305. package/dist/client/shared/ui/Checkbox/Checkbox.js +14 -0
  306. package/dist/client/shared/ui/Checkbox/Checkbox.js.map +1 -0
  307. package/dist/client/shared/ui/Checkbox/Checkbox.jsx +6 -0
  308. package/dist/client/shared/ui/Checkbox/index.d.ts +2 -0
  309. package/dist/client/shared/ui/Checkbox/index.d.ts.map +1 -0
  310. package/dist/client/shared/ui/Checkbox/index.js +3 -0
  311. package/dist/client/shared/ui/Checkbox/index.js.map +1 -0
  312. package/dist/client/shared/ui/ColorIndicator/ColorIndicator.d.ts +9 -0
  313. package/dist/client/shared/ui/ColorIndicator/ColorIndicator.d.ts.map +1 -0
  314. package/dist/client/shared/ui/ColorIndicator/ColorIndicator.js +13 -0
  315. package/dist/client/shared/ui/ColorIndicator/ColorIndicator.js.map +1 -0
  316. package/dist/client/shared/ui/ColorIndicator/ColorIndicator.jsx +7 -0
  317. package/dist/client/shared/ui/ColorIndicator/index.d.ts +2 -0
  318. package/dist/client/shared/ui/ColorIndicator/index.d.ts.map +1 -0
  319. package/dist/client/shared/ui/ColorIndicator/index.js +3 -0
  320. package/dist/client/shared/ui/ColorIndicator/index.js.map +1 -0
  321. package/dist/client/shared/ui/Description/Description.d.ts +8 -0
  322. package/dist/client/shared/ui/Description/Description.d.ts.map +1 -0
  323. package/dist/client/shared/ui/Description/Description.js +15 -0
  324. package/dist/client/shared/ui/Description/Description.js.map +1 -0
  325. package/dist/client/shared/ui/Description/Description.jsx +7 -0
  326. package/dist/client/shared/ui/Description/index.d.ts +2 -0
  327. package/dist/client/shared/ui/Description/index.d.ts.map +1 -0
  328. package/dist/client/shared/ui/Description/index.js +3 -0
  329. package/dist/client/shared/ui/Description/index.js.map +1 -0
  330. package/dist/client/shared/ui/Divider/Divider.d.ts +11 -0
  331. package/dist/client/shared/ui/Divider/Divider.d.ts.map +1 -0
  332. package/dist/client/shared/ui/Divider/Divider.js +17 -0
  333. package/dist/client/shared/ui/Divider/Divider.js.map +1 -0
  334. package/dist/client/shared/ui/Divider/Divider.jsx +7 -0
  335. package/dist/client/shared/ui/Divider/index.d.ts +2 -0
  336. package/dist/client/shared/ui/Divider/index.d.ts.map +1 -0
  337. package/dist/client/shared/ui/Divider/index.js +3 -0
  338. package/dist/client/shared/ui/Divider/index.js.map +1 -0
  339. package/dist/client/shared/ui/Label/Label.d.ts +7 -0
  340. package/dist/client/shared/ui/Label/Label.d.ts.map +1 -0
  341. package/dist/client/shared/ui/Label/Label.js +20 -0
  342. package/dist/client/shared/ui/Label/Label.js.map +1 -0
  343. package/dist/client/shared/ui/Label/Label.jsx +9 -0
  344. package/dist/client/shared/ui/Label/index.d.ts +2 -0
  345. package/dist/client/shared/ui/Label/index.d.ts.map +1 -0
  346. package/dist/client/shared/ui/Label/index.js +3 -0
  347. package/dist/client/shared/ui/Label/index.js.map +1 -0
  348. package/dist/client/shared/ui/Loading/Loading.d.ts +8 -0
  349. package/dist/client/shared/ui/Loading/Loading.d.ts.map +1 -0
  350. package/dist/client/shared/ui/Loading/Loading.js +26 -0
  351. package/dist/client/shared/ui/Loading/Loading.js.map +1 -0
  352. package/dist/client/shared/ui/Loading/Loading.jsx +11 -0
  353. package/dist/client/shared/ui/Loading/index.d.ts +2 -0
  354. package/dist/client/shared/ui/Loading/index.d.ts.map +1 -0
  355. package/dist/client/shared/ui/Loading/index.js +3 -0
  356. package/dist/client/shared/ui/Loading/index.js.map +1 -0
  357. package/dist/client/shared/ui/Popup/Popup.d.ts +11 -0
  358. package/dist/client/shared/ui/Popup/Popup.d.ts.map +1 -0
  359. package/dist/client/shared/ui/Popup/Popup.js +27 -0
  360. package/dist/client/shared/ui/Popup/Popup.js.map +1 -0
  361. package/dist/client/shared/ui/Popup/Popup.jsx +13 -0
  362. package/dist/client/shared/ui/Popup/index.d.ts +2 -0
  363. package/dist/client/shared/ui/Popup/index.d.ts.map +1 -0
  364. package/dist/client/shared/ui/Popup/index.js +3 -0
  365. package/dist/client/shared/ui/Popup/index.js.map +1 -0
  366. package/dist/client/shared/ui/ProgressBar/ProgressBar.d.ts +10 -0
  367. package/dist/client/shared/ui/ProgressBar/ProgressBar.d.ts.map +1 -0
  368. package/dist/client/shared/ui/ProgressBar/ProgressBar.js +29 -0
  369. package/dist/client/shared/ui/ProgressBar/ProgressBar.js.map +1 -0
  370. package/dist/client/shared/ui/ProgressBar/ProgressBar.jsx +11 -0
  371. package/dist/client/shared/ui/ProgressBar/index.d.ts +2 -0
  372. package/dist/client/shared/ui/ProgressBar/index.d.ts.map +1 -0
  373. package/dist/client/shared/ui/ProgressBar/index.js +3 -0
  374. package/dist/client/shared/ui/ProgressBar/index.js.map +1 -0
  375. package/dist/client/shared/ui/Select/Select.d.ts +20 -0
  376. package/dist/client/shared/ui/Select/Select.d.ts.map +1 -0
  377. package/dist/client/shared/ui/Select/Select.js +54 -0
  378. package/dist/client/shared/ui/Select/Select.js.map +1 -0
  379. package/dist/client/shared/ui/Select/Select.jsx +41 -0
  380. package/dist/client/shared/ui/Select/index.d.ts +2 -0
  381. package/dist/client/shared/ui/Select/index.d.ts.map +1 -0
  382. package/dist/client/shared/ui/Select/index.js +3 -0
  383. package/dist/client/shared/ui/Select/index.js.map +1 -0
  384. package/dist/client/shared/ui/StatusCounter/StatusCounter.d.ts +11 -0
  385. package/dist/client/shared/ui/StatusCounter/StatusCounter.d.ts.map +1 -0
  386. package/dist/client/shared/ui/StatusCounter/StatusCounter.js +45 -0
  387. package/dist/client/shared/ui/StatusCounter/StatusCounter.js.map +1 -0
  388. package/dist/client/shared/ui/StatusCounter/StatusCounter.jsx +26 -0
  389. package/dist/client/shared/ui/StatusCounter/index.d.ts +2 -0
  390. package/dist/client/shared/ui/StatusCounter/index.d.ts.map +1 -0
  391. package/dist/client/shared/ui/StatusCounter/index.js +3 -0
  392. package/dist/client/shared/ui/StatusCounter/index.js.map +1 -0
  393. package/dist/client/shared/ui/StatusIndicator/StatusIndicator.d.ts +10 -0
  394. package/dist/client/shared/ui/StatusIndicator/StatusIndicator.d.ts.map +1 -0
  395. package/dist/client/shared/ui/StatusIndicator/StatusIndicator.js +20 -0
  396. package/dist/client/shared/ui/StatusIndicator/StatusIndicator.js.map +1 -0
  397. package/dist/client/shared/ui/StatusIndicator/StatusIndicator.jsx +10 -0
  398. package/dist/client/shared/ui/StatusIndicator/index.d.ts +2 -0
  399. package/dist/client/shared/ui/StatusIndicator/index.d.ts.map +1 -0
  400. package/dist/client/shared/ui/StatusIndicator/index.js +3 -0
  401. package/dist/client/shared/ui/StatusIndicator/index.js.map +1 -0
  402. package/dist/client/shared/ui/Tooltip/Tooltip.d.ts +11 -0
  403. package/dist/client/shared/ui/Tooltip/Tooltip.d.ts.map +1 -0
  404. package/dist/client/shared/ui/Tooltip/Tooltip.js +32 -0
  405. package/dist/client/shared/ui/Tooltip/Tooltip.js.map +1 -0
  406. package/dist/client/shared/ui/Tooltip/Tooltip.jsx +16 -0
  407. package/dist/client/shared/ui/Tooltip/index.d.ts +2 -0
  408. package/dist/client/shared/ui/Tooltip/index.d.ts.map +1 -0
  409. package/dist/client/shared/ui/Tooltip/index.js +3 -0
  410. package/dist/client/shared/ui/Tooltip/index.js.map +1 -0
  411. package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.d.ts +11 -0
  412. package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.d.ts.map +1 -0
  413. package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.js +51 -0
  414. package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.js.map +1 -0
  415. package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.jsx +24 -0
  416. package/dist/client/shared/ui/form/FormCheckbox/index.d.ts +2 -0
  417. package/dist/client/shared/ui/form/FormCheckbox/index.d.ts.map +1 -0
  418. package/dist/client/shared/ui/form/FormCheckbox/index.js +3 -0
  419. package/dist/client/shared/ui/form/FormCheckbox/index.js.map +1 -0
  420. package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.d.ts +8 -0
  421. package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.d.ts.map +1 -0
  422. package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.js +37 -0
  423. package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.js.map +1 -0
  424. package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.jsx +21 -0
  425. package/dist/client/shared/ui/form/FormCheckboxPublish/index.d.ts +2 -0
  426. package/dist/client/shared/ui/form/FormCheckboxPublish/index.d.ts.map +1 -0
  427. package/dist/client/shared/ui/form/FormCheckboxPublish/index.js +3 -0
  428. package/dist/client/shared/ui/form/FormCheckboxPublish/index.js.map +1 -0
  429. package/dist/client/shared/ui/form/FormSelect/FormSelect.d.ts +20 -0
  430. package/dist/client/shared/ui/form/FormSelect/FormSelect.d.ts.map +1 -0
  431. package/dist/client/shared/ui/form/FormSelect/FormSelect.js +88 -0
  432. package/dist/client/shared/ui/form/FormSelect/FormSelect.js.map +1 -0
  433. package/dist/client/shared/ui/form/FormSelect/FormSelect.jsx +44 -0
  434. package/dist/client/shared/ui/form/FormSelect/index.d.ts +2 -0
  435. package/dist/client/shared/ui/form/FormSelect/index.d.ts.map +1 -0
  436. package/dist/client/shared/ui/form/FormSelect/index.js +3 -0
  437. package/dist/client/shared/ui/form/FormSelect/index.js.map +1 -0
  438. package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.d.ts +12 -0
  439. package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.d.ts.map +1 -0
  440. package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.js +19 -0
  441. package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.js.map +1 -0
  442. package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.jsx +6 -0
  443. package/dist/client/shared/ui/form/FormSelectLocale/index.d.ts +2 -0
  444. package/dist/client/shared/ui/form/FormSelectLocale/index.d.ts.map +1 -0
  445. package/dist/client/shared/ui/form/FormSelectLocale/index.js +3 -0
  446. package/dist/client/shared/ui/form/FormSelectLocale/index.js.map +1 -0
  447. package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.d.ts +19 -0
  448. package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.d.ts.map +1 -0
  449. package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.js +59 -0
  450. package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.js.map +1 -0
  451. package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.jsx +25 -0
  452. package/dist/client/shared/ui/form/FormSelectStrategy/index.d.ts +3 -0
  453. package/dist/client/shared/ui/form/FormSelectStrategy/index.d.ts.map +1 -0
  454. package/dist/client/shared/ui/form/FormSelectStrategy/index.js +3 -0
  455. package/dist/client/shared/ui/form/FormSelectStrategy/index.js.map +1 -0
  456. package/dist/client/shared/utils/componentPath.d.ts +6 -0
  457. package/dist/client/shared/utils/componentPath.d.ts.map +1 -0
  458. package/dist/client/shared/utils/componentPath.js +9 -0
  459. package/dist/client/shared/utils/componentPath.js.map +1 -0
  460. package/dist/client/widgets/bulk-translation-dashboard/index.d.ts +2 -0
  461. package/dist/client/widgets/bulk-translation-dashboard/index.d.ts.map +1 -0
  462. package/dist/client/widgets/bulk-translation-dashboard/index.js +3 -0
  463. package/dist/client/widgets/bulk-translation-dashboard/index.js.map +1 -0
  464. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.d.ts +6 -0
  465. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.d.ts.map +1 -0
  466. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.d.ts +9 -0
  467. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.d.ts.map +1 -0
  468. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.js +15 -0
  469. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.js.map +1 -0
  470. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.jsx +11 -0
  471. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.js +78 -0
  472. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.js.map +1 -0
  473. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.jsx +55 -0
  474. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.d.ts +8 -0
  475. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.d.ts.map +1 -0
  476. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.js +24 -0
  477. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.js.map +1 -0
  478. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.jsx +17 -0
  479. package/dist/client/widgets/bulk-translation-dashboard/ui/index.d.ts +2 -0
  480. package/dist/client/widgets/bulk-translation-dashboard/ui/index.d.ts.map +1 -0
  481. package/dist/client/widgets/bulk-translation-dashboard/ui/index.js +3 -0
  482. package/dist/client/widgets/bulk-translation-dashboard/ui/index.js.map +1 -0
  483. package/dist/client/widgets/translate-document/index.d.ts +2 -0
  484. package/dist/client/widgets/translate-document/index.d.ts.map +1 -0
  485. package/dist/client/widgets/translate-document/index.js +3 -0
  486. package/dist/client/widgets/translate-document/index.js.map +1 -0
  487. package/dist/client/widgets/translate-document/ui/TranslateDocument.d.ts +6 -0
  488. package/dist/client/widgets/translate-document/ui/TranslateDocument.d.ts.map +1 -0
  489. package/dist/client/widgets/translate-document/ui/TranslateDocument.export.d.ts +11 -0
  490. package/dist/client/widgets/translate-document/ui/TranslateDocument.export.d.ts.map +1 -0
  491. package/dist/client/widgets/translate-document/ui/TranslateDocument.export.js +18 -0
  492. package/dist/client/widgets/translate-document/ui/TranslateDocument.export.js.map +1 -0
  493. package/dist/client/widgets/translate-document/ui/TranslateDocument.js +87 -0
  494. package/dist/client/widgets/translate-document/ui/TranslateDocument.js.map +1 -0
  495. package/dist/client/widgets/translate-document/ui/TranslateDocument.jsx +55 -0
  496. package/dist/client/widgets/translate-document/ui/TranslateDocument.server.d.ts +9 -0
  497. package/dist/client/widgets/translate-document/ui/TranslateDocument.server.d.ts.map +1 -0
  498. package/dist/client/widgets/translate-document/ui/TranslateDocument.server.js +23 -0
  499. package/dist/client/widgets/translate-document/ui/TranslateDocument.server.js.map +1 -0
  500. package/dist/client/widgets/translate-document/ui/TranslateDocument.server.jsx +16 -0
  501. package/dist/client/widgets/translate-document/ui/index.d.ts +2 -0
  502. package/dist/client/widgets/translate-document/ui/index.d.ts.map +1 -0
  503. package/dist/client/widgets/translate-document/ui/index.js +3 -0
  504. package/dist/client/widgets/translate-document/ui/index.js.map +1 -0
  505. package/dist/field-config.d.ts +48 -0
  506. package/dist/field-config.d.ts.map +1 -0
  507. package/dist/field-config.js +49 -0
  508. package/dist/field-config.js.map +1 -0
  509. package/dist/index.d.ts +15 -0
  510. package/dist/index.d.ts.map +1 -0
  511. package/dist/index.js +14 -0
  512. package/dist/index.js.map +1 -0
  513. package/dist/plugin.d.ts +63 -0
  514. package/dist/plugin.d.ts.map +1 -0
  515. package/dist/plugin.js +110 -0
  516. package/dist/plugin.js.map +1 -0
  517. package/dist/server/features/_lib/collection-utils.d.ts +10 -0
  518. package/dist/server/features/_lib/collection-utils.d.ts.map +1 -0
  519. package/dist/server/features/_lib/collection-utils.js +20 -0
  520. package/dist/server/features/_lib/collection-utils.js.map +1 -0
  521. package/dist/server/features/_lib/index.d.ts +2 -0
  522. package/dist/server/features/_lib/index.d.ts.map +1 -0
  523. package/dist/server/features/_lib/index.js +3 -0
  524. package/dist/server/features/_lib/index.js.map +1 -0
  525. package/dist/server/features/cancel/handler.d.ts +11 -0
  526. package/dist/server/features/cancel/handler.d.ts.map +1 -0
  527. package/dist/server/features/cancel/handler.js +20 -0
  528. package/dist/server/features/cancel/handler.js.map +1 -0
  529. package/dist/server/features/cancel/handler.test.d.ts +2 -0
  530. package/dist/server/features/cancel/handler.test.d.ts.map +1 -0
  531. package/dist/server/features/cancel/handler.test.js +63 -0
  532. package/dist/server/features/cancel/index.d.ts +2 -0
  533. package/dist/server/features/cancel/index.d.ts.map +1 -0
  534. package/dist/server/features/cancel/index.js +3 -0
  535. package/dist/server/features/cancel/index.js.map +1 -0
  536. package/dist/server/features/cancel/model.d.ts +12 -0
  537. package/dist/server/features/cancel/model.d.ts.map +1 -0
  538. package/dist/server/features/cancel/model.js +8 -0
  539. package/dist/server/features/cancel/model.js.map +1 -0
  540. package/dist/server/features/cancel/route.d.ts +8 -0
  541. package/dist/server/features/cancel/route.d.ts.map +1 -0
  542. package/dist/server/features/cancel/route.js +14 -0
  543. package/dist/server/features/cancel/route.js.map +1 -0
  544. package/dist/server/features/cancel-by-collection/handler.d.ts +13 -0
  545. package/dist/server/features/cancel-by-collection/handler.d.ts.map +1 -0
  546. package/dist/server/features/cancel-by-collection/handler.js +28 -0
  547. package/dist/server/features/cancel-by-collection/handler.js.map +1 -0
  548. package/dist/server/features/cancel-by-collection/handler.test.d.ts +2 -0
  549. package/dist/server/features/cancel-by-collection/handler.test.d.ts.map +1 -0
  550. package/dist/server/features/cancel-by-collection/handler.test.js +126 -0
  551. package/dist/server/features/cancel-by-collection/index.d.ts +2 -0
  552. package/dist/server/features/cancel-by-collection/index.d.ts.map +1 -0
  553. package/dist/server/features/cancel-by-collection/index.js +3 -0
  554. package/dist/server/features/cancel-by-collection/index.js.map +1 -0
  555. package/dist/server/features/cancel-by-collection/model.d.ts +19 -0
  556. package/dist/server/features/cancel-by-collection/model.d.ts.map +1 -0
  557. package/dist/server/features/cancel-by-collection/model.js +8 -0
  558. package/dist/server/features/cancel-by-collection/model.js.map +1 -0
  559. package/dist/server/features/cancel-by-collection/route.d.ts +9 -0
  560. package/dist/server/features/cancel-by-collection/route.d.ts.map +1 -0
  561. package/dist/server/features/cancel-by-collection/route.js +14 -0
  562. package/dist/server/features/cancel-by-collection/route.js.map +1 -0
  563. package/dist/server/features/enqueue-translation/handler.d.ts +13 -0
  564. package/dist/server/features/enqueue-translation/handler.d.ts.map +1 -0
  565. package/dist/server/features/enqueue-translation/handler.js +37 -0
  566. package/dist/server/features/enqueue-translation/handler.js.map +1 -0
  567. package/dist/server/features/enqueue-translation/handler.test.d.ts +2 -0
  568. package/dist/server/features/enqueue-translation/handler.test.d.ts.map +1 -0
  569. package/dist/server/features/enqueue-translation/handler.test.js +115 -0
  570. package/dist/server/features/enqueue-translation/index.d.ts +2 -0
  571. package/dist/server/features/enqueue-translation/index.d.ts.map +1 -0
  572. package/dist/server/features/enqueue-translation/index.js +3 -0
  573. package/dist/server/features/enqueue-translation/index.js.map +1 -0
  574. package/dist/server/features/enqueue-translation/model.d.ts +37 -0
  575. package/dist/server/features/enqueue-translation/model.d.ts.map +1 -0
  576. package/dist/server/features/enqueue-translation/model.js +17 -0
  577. package/dist/server/features/enqueue-translation/model.js.map +1 -0
  578. package/dist/server/features/enqueue-translation/route.d.ts +9 -0
  579. package/dist/server/features/enqueue-translation/route.d.ts.map +1 -0
  580. package/dist/server/features/enqueue-translation/route.js +14 -0
  581. package/dist/server/features/enqueue-translation/route.js.map +1 -0
  582. package/dist/server/features/get-collection-status/handler.d.ts +13 -0
  583. package/dist/server/features/get-collection-status/handler.d.ts.map +1 -0
  584. package/dist/server/features/get-collection-status/handler.js +29 -0
  585. package/dist/server/features/get-collection-status/handler.js.map +1 -0
  586. package/dist/server/features/get-collection-status/handler.test.d.ts +2 -0
  587. package/dist/server/features/get-collection-status/handler.test.d.ts.map +1 -0
  588. package/dist/server/features/get-collection-status/handler.test.js +108 -0
  589. package/dist/server/features/get-collection-status/index.d.ts +2 -0
  590. package/dist/server/features/get-collection-status/index.d.ts.map +1 -0
  591. package/dist/server/features/get-collection-status/index.js +3 -0
  592. package/dist/server/features/get-collection-status/index.js.map +1 -0
  593. package/dist/server/features/get-collection-status/model.d.ts +34 -0
  594. package/dist/server/features/get-collection-status/model.d.ts.map +1 -0
  595. package/dist/server/features/get-collection-status/model.js +8 -0
  596. package/dist/server/features/get-collection-status/model.js.map +1 -0
  597. package/dist/server/features/get-collection-status/route.d.ts +9 -0
  598. package/dist/server/features/get-collection-status/route.d.ts.map +1 -0
  599. package/dist/server/features/get-collection-status/route.js +14 -0
  600. package/dist/server/features/get-collection-status/route.js.map +1 -0
  601. package/dist/server/features/get-document-status/handler.d.ts +13 -0
  602. package/dist/server/features/get-document-status/handler.d.ts.map +1 -0
  603. package/dist/server/features/get-document-status/handler.js +27 -0
  604. package/dist/server/features/get-document-status/handler.js.map +1 -0
  605. package/dist/server/features/get-document-status/handler.test.d.ts +2 -0
  606. package/dist/server/features/get-document-status/handler.test.d.ts.map +1 -0
  607. package/dist/server/features/get-document-status/handler.test.js +138 -0
  608. package/dist/server/features/get-document-status/index.d.ts +3 -0
  609. package/dist/server/features/get-document-status/index.d.ts.map +1 -0
  610. package/dist/server/features/get-document-status/index.js +4 -0
  611. package/dist/server/features/get-document-status/index.js.map +1 -0
  612. package/dist/server/features/get-document-status/model.d.ts +59 -0
  613. package/dist/server/features/get-document-status/model.d.ts.map +1 -0
  614. package/dist/server/features/get-document-status/model.js +33 -0
  615. package/dist/server/features/get-document-status/model.js.map +1 -0
  616. package/dist/server/features/get-document-status/route.d.ts +9 -0
  617. package/dist/server/features/get-document-status/route.d.ts.map +1 -0
  618. package/dist/server/features/get-document-status/route.js +14 -0
  619. package/dist/server/features/get-document-status/route.js.map +1 -0
  620. package/dist/server/features/index.d.ts +7 -0
  621. package/dist/server/features/index.d.ts.map +1 -0
  622. package/dist/server/features/index.js +8 -0
  623. package/dist/server/features/index.js.map +1 -0
  624. package/dist/server/features/run-translation/handler.d.ts +11 -0
  625. package/dist/server/features/run-translation/handler.d.ts.map +1 -0
  626. package/dist/server/features/run-translation/handler.js +28 -0
  627. package/dist/server/features/run-translation/handler.js.map +1 -0
  628. package/dist/server/features/run-translation/handler.test.d.ts +2 -0
  629. package/dist/server/features/run-translation/handler.test.d.ts.map +1 -0
  630. package/dist/server/features/run-translation/handler.test.js +98 -0
  631. package/dist/server/features/run-translation/index.d.ts +2 -0
  632. package/dist/server/features/run-translation/index.d.ts.map +1 -0
  633. package/dist/server/features/run-translation/index.js +3 -0
  634. package/dist/server/features/run-translation/index.js.map +1 -0
  635. package/dist/server/features/run-translation/model.d.ts +12 -0
  636. package/dist/server/features/run-translation/model.d.ts.map +1 -0
  637. package/dist/server/features/run-translation/model.js +8 -0
  638. package/dist/server/features/run-translation/model.js.map +1 -0
  639. package/dist/server/features/run-translation/route.d.ts +8 -0
  640. package/dist/server/features/run-translation/route.d.ts.map +1 -0
  641. package/dist/server/features/run-translation/route.js +14 -0
  642. package/dist/server/features/run-translation/route.js.map +1 -0
  643. package/dist/server/features/translate-document/handler.d.ts +19 -0
  644. package/dist/server/features/translate-document/handler.d.ts.map +1 -0
  645. package/dist/server/features/translate-document/handler.js +69 -0
  646. package/dist/server/features/translate-document/handler.js.map +1 -0
  647. package/dist/server/features/translate-document/handler.test.d.ts +2 -0
  648. package/dist/server/features/translate-document/handler.test.d.ts.map +1 -0
  649. package/dist/server/features/translate-document/handler.test.js +171 -0
  650. package/dist/server/features/translate-document/index.d.ts +4 -0
  651. package/dist/server/features/translate-document/index.d.ts.map +1 -0
  652. package/dist/server/features/translate-document/index.js +4 -0
  653. package/dist/server/features/translate-document/index.js.map +1 -0
  654. package/dist/server/features/translate-document/model.d.ts +53 -0
  655. package/dist/server/features/translate-document/model.d.ts.map +1 -0
  656. package/dist/server/features/translate-document/model.js +30 -0
  657. package/dist/server/features/translate-document/model.js.map +1 -0
  658. package/dist/server/features/translate-document/task.d.ts +41 -0
  659. package/dist/server/features/translate-document/task.d.ts.map +1 -0
  660. package/dist/server/features/translate-document/task.js +44 -0
  661. package/dist/server/features/translate-document/task.js.map +1 -0
  662. package/dist/server/index.d.ts +4 -0
  663. package/dist/server/index.d.ts.map +1 -0
  664. package/dist/server/index.js +5 -0
  665. package/dist/server/index.js.map +1 -0
  666. package/dist/server/modules/index.d.ts +3 -0
  667. package/dist/server/modules/index.d.ts.map +1 -0
  668. package/dist/server/modules/index.js +4 -0
  669. package/dist/server/modules/index.js.map +1 -0
  670. package/dist/server/modules/task-runner/TaskRunner.interface.d.ts +31 -0
  671. package/dist/server/modules/task-runner/TaskRunner.interface.d.ts.map +1 -0
  672. package/dist/server/modules/task-runner/TaskRunner.interface.js +10 -0
  673. package/dist/server/modules/task-runner/TaskRunner.interface.js.map +1 -0
  674. package/dist/server/modules/task-runner/TaskRunnerProvider.interface.d.ts +46 -0
  675. package/dist/server/modules/task-runner/TaskRunnerProvider.interface.d.ts.map +1 -0
  676. package/dist/server/modules/task-runner/TaskRunnerProvider.interface.js +11 -0
  677. package/dist/server/modules/task-runner/TaskRunnerProvider.interface.js.map +1 -0
  678. package/dist/server/modules/task-runner/index.d.ts +7 -0
  679. package/dist/server/modules/task-runner/index.d.ts.map +1 -0
  680. package/dist/server/modules/task-runner/index.js +4 -0
  681. package/dist/server/modules/task-runner/index.js.map +1 -0
  682. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.d.ts +20 -0
  683. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.d.ts.map +1 -0
  684. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.js +128 -0
  685. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsRunnerProvider.js.map +1 -0
  686. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.d.ts +31 -0
  687. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.d.ts.map +1 -0
  688. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.js +165 -0
  689. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.js.map +1 -0
  690. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.test.d.ts +2 -0
  691. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.test.d.ts.map +1 -0
  692. package/dist/server/modules/task-runner/payload-jobs-runner/PayloadJobsTaskRunner.test.js +188 -0
  693. package/dist/server/modules/task-runner/payload-jobs-runner/index.d.ts +3 -0
  694. package/dist/server/modules/task-runner/payload-jobs-runner/index.d.ts.map +1 -0
  695. package/dist/server/modules/task-runner/payload-jobs-runner/index.js +3 -0
  696. package/dist/server/modules/task-runner/payload-jobs-runner/index.js.map +1 -0
  697. package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.d.ts +7 -0
  698. package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.d.ts.map +1 -0
  699. package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.js +40 -0
  700. package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.js.map +1 -0
  701. package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.test.d.ts +2 -0
  702. package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.test.d.ts.map +1 -0
  703. package/dist/server/modules/task-runner/payload-jobs-runner/normalizeJob.test.js +169 -0
  704. package/dist/server/modules/task-runner/payload-jobs-runner/types.d.ts +85 -0
  705. package/dist/server/modules/task-runner/payload-jobs-runner/types.d.ts.map +1 -0
  706. package/dist/server/modules/task-runner/payload-jobs-runner/types.js +5 -0
  707. package/dist/server/modules/task-runner/payload-jobs-runner/types.js.map +1 -0
  708. package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.d.ts +25 -0
  709. package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.d.ts.map +1 -0
  710. package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.js +42 -0
  711. package/dist/server/modules/task-runner/sync-runner/SyncRunnerProvider.js.map +1 -0
  712. package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.d.ts +23 -0
  713. package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.d.ts.map +1 -0
  714. package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.js +72 -0
  715. package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.js.map +1 -0
  716. package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.test.d.ts +2 -0
  717. package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.test.d.ts.map +1 -0
  718. package/dist/server/modules/task-runner/sync-runner/SyncTaskRunner.test.js +148 -0
  719. package/dist/server/modules/task-runner/sync-runner/index.d.ts +2 -0
  720. package/dist/server/modules/task-runner/sync-runner/index.d.ts.map +1 -0
  721. package/dist/server/modules/task-runner/sync-runner/index.js +3 -0
  722. package/dist/server/modules/task-runner/sync-runner/index.js.map +1 -0
  723. package/dist/server/modules/task-runner/sync-runner/types.d.ts +18 -0
  724. package/dist/server/modules/task-runner/sync-runner/types.d.ts.map +1 -0
  725. package/dist/server/modules/task-runner/sync-runner/types.js +5 -0
  726. package/dist/server/modules/task-runner/sync-runner/types.js.map +1 -0
  727. package/dist/server/modules/task-runner/types.d.ts +41 -0
  728. package/dist/server/modules/task-runner/types.d.ts.map +1 -0
  729. package/dist/server/modules/task-runner/types.js +5 -0
  730. package/dist/server/modules/task-runner/types.js.map +1 -0
  731. package/dist/server/modules/translation-pipeline/TranslationPipeline.d.ts +35 -0
  732. package/dist/server/modules/translation-pipeline/TranslationPipeline.d.ts.map +1 -0
  733. package/dist/server/modules/translation-pipeline/TranslationPipeline.js +55 -0
  734. package/dist/server/modules/translation-pipeline/TranslationPipeline.js.map +1 -0
  735. package/dist/server/modules/translation-pipeline/TranslationPipeline.test.d.ts +2 -0
  736. package/dist/server/modules/translation-pipeline/TranslationPipeline.test.d.ts.map +1 -0
  737. package/dist/server/modules/translation-pipeline/TranslationPipeline.test.js +552 -0
  738. package/dist/server/modules/translation-pipeline/index.d.ts +4 -0
  739. package/dist/server/modules/translation-pipeline/index.d.ts.map +1 -0
  740. package/dist/server/modules/translation-pipeline/index.js +4 -0
  741. package/dist/server/modules/translation-pipeline/index.js.map +1 -0
  742. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.d.ts +26 -0
  743. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.d.ts.map +1 -0
  744. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.js +97 -0
  745. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.js.map +1 -0
  746. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.d.ts +9 -0
  747. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.d.ts.map +1 -0
  748. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.js +15 -0
  749. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.js.map +1 -0
  750. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.test.d.ts +2 -0
  751. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.test.d.ts.map +1 -0
  752. package/dist/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.test.js +294 -0
  753. package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.d.ts +3 -0
  754. package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.d.ts.map +1 -0
  755. package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.js +4 -0
  756. package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.js.map +1 -0
  757. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.d.ts +35 -0
  758. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.d.ts.map +1 -0
  759. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.js +128 -0
  760. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.js.map +1 -0
  761. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.d.ts +13 -0
  762. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.d.ts.map +1 -0
  763. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.js +23 -0
  764. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.js.map +1 -0
  765. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.test.d.ts +2 -0
  766. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.test.d.ts.map +1 -0
  767. package/dist/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.test.js +737 -0
  768. package/dist/server/modules/translation-pipeline/stages/field-collector/index.d.ts +3 -0
  769. package/dist/server/modules/translation-pipeline/stages/field-collector/index.d.ts.map +1 -0
  770. package/dist/server/modules/translation-pipeline/stages/field-collector/index.js +4 -0
  771. package/dist/server/modules/translation-pipeline/stages/field-collector/index.js.map +1 -0
  772. package/dist/server/modules/translation-pipeline/stages/index.d.ts +7 -0
  773. package/dist/server/modules/translation-pipeline/stages/index.d.ts.map +1 -0
  774. package/dist/server/modules/translation-pipeline/stages/index.js +7 -0
  775. package/dist/server/modules/translation-pipeline/stages/index.js.map +1 -0
  776. package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.d.ts +10 -0
  777. package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.d.ts.map +1 -0
  778. package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.js +28 -0
  779. package/dist/server/modules/translation-pipeline/stages/text-expander/PlainTextExpander.js.map +1 -0
  780. package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.d.ts +10 -0
  781. package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.d.ts.map +1 -0
  782. package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.js +32 -0
  783. package/dist/server/modules/translation-pipeline/stages/text-expander/RichTextExpander.js.map +1 -0
  784. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.d.ts +24 -0
  785. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.d.ts.map +1 -0
  786. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.js +34 -0
  787. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.js.map +1 -0
  788. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.d.ts +11 -0
  789. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.d.ts.map +1 -0
  790. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.js +29 -0
  791. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.stage.js.map +1 -0
  792. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.test.d.ts +2 -0
  793. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.test.d.ts.map +1 -0
  794. package/dist/server/modules/translation-pipeline/stages/text-expander/TextChunkExpander.test.js +396 -0
  795. package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.d.ts +27 -0
  796. package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.d.ts.map +1 -0
  797. package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.js +6 -0
  798. package/dist/server/modules/translation-pipeline/stages/text-expander/TextExpander.interface.js.map +1 -0
  799. package/dist/server/modules/translation-pipeline/stages/text-expander/index.d.ts +7 -0
  800. package/dist/server/modules/translation-pipeline/stages/text-expander/index.d.ts.map +1 -0
  801. package/dist/server/modules/translation-pipeline/stages/text-expander/index.js +6 -0
  802. package/dist/server/modules/translation-pipeline/stages/text-expander/index.js.map +1 -0
  803. package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.d.ts +11 -0
  804. package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.d.ts.map +1 -0
  805. package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.js +23 -0
  806. package/dist/server/modules/translation-pipeline/stages/translation/Translation.stage.js.map +1 -0
  807. package/dist/server/modules/translation-pipeline/stages/translation/index.d.ts +2 -0
  808. package/dist/server/modules/translation-pipeline/stages/translation/index.d.ts.map +1 -0
  809. package/dist/server/modules/translation-pipeline/stages/translation/index.js +3 -0
  810. package/dist/server/modules/translation-pipeline/stages/translation/index.js.map +1 -0
  811. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.d.ts +18 -0
  812. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.d.ts.map +1 -0
  813. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.js +27 -0
  814. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.js.map +1 -0
  815. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.d.ts +8 -0
  816. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.d.ts.map +1 -0
  817. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.js +15 -0
  818. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.js.map +1 -0
  819. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.test.d.ts +2 -0
  820. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.test.d.ts.map +1 -0
  821. package/dist/server/modules/translation-pipeline/stages/translation-applicator/TranslationMutator.test.js +110 -0
  822. package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.d.ts +3 -0
  823. package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.d.ts.map +1 -0
  824. package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.js +4 -0
  825. package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.js.map +1 -0
  826. package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.d.ts +9 -0
  827. package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.d.ts.map +1 -0
  828. package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.js +11 -0
  829. package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.js.map +1 -0
  830. package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.test.d.ts +2 -0
  831. package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.test.d.ts.map +1 -0
  832. package/dist/server/modules/translation-pipeline/strategies/Overwrite.strategy.test.js +36 -0
  833. package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.d.ts +10 -0
  834. package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.d.ts.map +1 -0
  835. package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.js +19 -0
  836. package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.js.map +1 -0
  837. package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.test.d.ts +2 -0
  838. package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.test.d.ts.map +1 -0
  839. package/dist/server/modules/translation-pipeline/strategies/SkipExisting.strategy.test.js +77 -0
  840. package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.d.ts +22 -0
  841. package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.d.ts.map +1 -0
  842. package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.js +10 -0
  843. package/dist/server/modules/translation-pipeline/strategies/TranslationStrategy.interface.js.map +1 -0
  844. package/dist/server/modules/translation-pipeline/strategies/index.d.ts +14 -0
  845. package/dist/server/modules/translation-pipeline/strategies/index.d.ts.map +1 -0
  846. package/dist/server/modules/translation-pipeline/strategies/index.js +16 -0
  847. package/dist/server/modules/translation-pipeline/strategies/index.js.map +1 -0
  848. package/dist/server/modules/translation-pipeline/types/FieldChunk.d.ts +18 -0
  849. package/dist/server/modules/translation-pipeline/types/FieldChunk.d.ts.map +1 -0
  850. package/dist/server/modules/translation-pipeline/types/FieldChunk.js +8 -0
  851. package/dist/server/modules/translation-pipeline/types/FieldChunk.js.map +1 -0
  852. package/dist/server/modules/translation-pipeline/types/Pipeline.d.ts +21 -0
  853. package/dist/server/modules/translation-pipeline/types/Pipeline.d.ts.map +1 -0
  854. package/dist/server/modules/translation-pipeline/types/Pipeline.js +6 -0
  855. package/dist/server/modules/translation-pipeline/types/Pipeline.js.map +1 -0
  856. package/dist/server/modules/translation-pipeline/types/PipelineContext.d.ts +28 -0
  857. package/dist/server/modules/translation-pipeline/types/PipelineContext.d.ts.map +1 -0
  858. package/dist/server/modules/translation-pipeline/types/PipelineContext.js +6 -0
  859. package/dist/server/modules/translation-pipeline/types/PipelineContext.js.map +1 -0
  860. package/dist/server/modules/translation-pipeline/types/TextChunk.d.ts +43 -0
  861. package/dist/server/modules/translation-pipeline/types/TextChunk.d.ts.map +1 -0
  862. package/dist/server/modules/translation-pipeline/types/TextChunk.js +12 -0
  863. package/dist/server/modules/translation-pipeline/types/TextChunk.js.map +1 -0
  864. package/dist/server/modules/translation-pipeline/types/index.d.ts +6 -0
  865. package/dist/server/modules/translation-pipeline/types/index.d.ts.map +1 -0
  866. package/dist/server/modules/translation-pipeline/types/index.js +3 -0
  867. package/dist/server/modules/translation-pipeline/types/index.js.map +1 -0
  868. package/dist/server/modules/translation-providers/OpenAITranslation.provider.d.ts +128 -0
  869. package/dist/server/modules/translation-providers/OpenAITranslation.provider.d.ts.map +1 -0
  870. package/dist/server/modules/translation-providers/OpenAITranslation.provider.js +138 -0
  871. package/dist/server/modules/translation-providers/OpenAITranslation.provider.js.map +1 -0
  872. package/dist/server/modules/translation-providers/OpenAITranslation.provider.test.d.ts +2 -0
  873. package/dist/server/modules/translation-providers/OpenAITranslation.provider.test.d.ts.map +1 -0
  874. package/dist/server/modules/translation-providers/OpenAITranslation.provider.test.js +214 -0
  875. package/dist/server/modules/translation-providers/TranslationProvider.interface.d.ts +56 -0
  876. package/dist/server/modules/translation-providers/TranslationProvider.interface.d.ts.map +1 -0
  877. package/dist/server/modules/translation-providers/TranslationProvider.interface.js +26 -0
  878. package/dist/server/modules/translation-providers/TranslationProvider.interface.js.map +1 -0
  879. package/dist/server/modules/translation-providers/index.d.ts +3 -0
  880. package/dist/server/modules/translation-providers/index.d.ts.map +1 -0
  881. package/dist/server/modules/translation-providers/index.js +3 -0
  882. package/dist/server/modules/translation-providers/index.js.map +1 -0
  883. package/dist/server/shared/access/AnyAccessGuard.d.ts +8 -0
  884. package/dist/server/shared/access/AnyAccessGuard.d.ts.map +1 -0
  885. package/dist/server/shared/access/AnyAccessGuard.js +9 -0
  886. package/dist/server/shared/access/AnyAccessGuard.js.map +1 -0
  887. package/dist/server/shared/access/handler.d.ts +8 -0
  888. package/dist/server/shared/access/handler.d.ts.map +1 -0
  889. package/dist/server/shared/access/handler.js +5 -0
  890. package/dist/server/shared/access/handler.js.map +1 -0
  891. package/dist/server/shared/access/index.d.ts +4 -0
  892. package/dist/server/shared/access/index.d.ts.map +1 -0
  893. package/dist/server/shared/access/index.js +3 -0
  894. package/dist/server/shared/access/index.js.map +1 -0
  895. package/dist/server/shared/access/types.d.ts +2 -0
  896. package/dist/server/shared/access/types.d.ts.map +1 -0
  897. package/dist/server/shared/access/types.js +3 -0
  898. package/dist/server/shared/access/types.js.map +1 -0
  899. package/dist/server/shared/field-config/getFieldConfig.d.ts +21 -0
  900. package/dist/server/shared/field-config/getFieldConfig.d.ts.map +1 -0
  901. package/dist/server/shared/field-config/getFieldConfig.js +29 -0
  902. package/dist/server/shared/field-config/getFieldConfig.js.map +1 -0
  903. package/dist/server/shared/field-config/getFieldConfig.test.d.ts +2 -0
  904. package/dist/server/shared/field-config/getFieldConfig.test.d.ts.map +1 -0
  905. package/dist/server/shared/field-config/getFieldConfig.test.js +74 -0
  906. package/dist/server/shared/field-config/index.d.ts +4 -0
  907. package/dist/server/shared/field-config/index.d.ts.map +1 -0
  908. package/dist/server/shared/field-config/index.js +4 -0
  909. package/dist/server/shared/field-config/index.js.map +1 -0
  910. package/dist/server/shared/field-config/types.d.ts +39 -0
  911. package/dist/server/shared/field-config/types.d.ts.map +1 -0
  912. package/dist/server/shared/field-config/types.js +22 -0
  913. package/dist/server/shared/field-config/types.js.map +1 -0
  914. package/dist/server/shared/guards/collection-guards.d.ts +7 -0
  915. package/dist/server/shared/guards/collection-guards.d.ts.map +1 -0
  916. package/dist/server/shared/guards/collection-guards.js +16 -0
  917. package/dist/server/shared/guards/collection-guards.js.map +1 -0
  918. package/dist/server/shared/guards/field-guards.d.ts +37 -0
  919. package/dist/server/shared/guards/field-guards.d.ts.map +1 -0
  920. package/dist/server/shared/guards/field-guards.js +34 -0
  921. package/dist/server/shared/guards/field-guards.js.map +1 -0
  922. package/dist/server/shared/guards/field-guards.test.d.ts +2 -0
  923. package/dist/server/shared/guards/field-guards.test.d.ts.map +1 -0
  924. package/dist/server/shared/guards/field-guards.test.js +166 -0
  925. package/dist/server/shared/guards/index.d.ts +4 -0
  926. package/dist/server/shared/guards/index.d.ts.map +1 -0
  927. package/dist/server/shared/guards/index.js +4 -0
  928. package/dist/server/shared/guards/index.js.map +1 -0
  929. package/dist/server/shared/http/ServerResponse.d.ts +24 -0
  930. package/dist/server/shared/http/ServerResponse.d.ts.map +1 -0
  931. package/dist/server/shared/http/ServerResponse.js +165 -0
  932. package/dist/server/shared/http/ServerResponse.js.map +1 -0
  933. package/dist/server/shared/http/ServerResponse.test.d.ts +2 -0
  934. package/dist/server/shared/http/ServerResponse.test.d.ts.map +1 -0
  935. package/dist/server/shared/http/ServerResponse.test.js +161 -0
  936. package/dist/server/shared/http/index.d.ts +4 -0
  937. package/dist/server/shared/http/index.d.ts.map +1 -0
  938. package/dist/server/shared/http/index.js +5 -0
  939. package/dist/server/shared/http/index.js.map +1 -0
  940. package/dist/server/shared/http/withAccessCheck.d.ts +8 -0
  941. package/dist/server/shared/http/withAccessCheck.d.ts.map +1 -0
  942. package/dist/server/shared/http/withAccessCheck.js +16 -0
  943. package/dist/server/shared/http/withAccessCheck.js.map +1 -0
  944. package/dist/server/shared/http/withAccessCheck.test.d.ts +2 -0
  945. package/dist/server/shared/http/withAccessCheck.test.d.ts.map +1 -0
  946. package/dist/server/shared/http/withAccessCheck.test.js +46 -0
  947. package/dist/server/shared/http/withErrorHandler.d.ts +6 -0
  948. package/dist/server/shared/http/withErrorHandler.d.ts.map +1 -0
  949. package/dist/server/shared/http/withErrorHandler.js +23 -0
  950. package/dist/server/shared/http/withErrorHandler.js.map +1 -0
  951. package/dist/server/shared/http/withErrorHandler.test.d.ts +2 -0
  952. package/dist/server/shared/http/withErrorHandler.test.d.ts.map +1 -0
  953. package/dist/server/shared/http/withErrorHandler.test.js +69 -0
  954. package/dist/server/shared/index.d.ts +11 -0
  955. package/dist/server/shared/index.d.ts.map +1 -0
  956. package/dist/server/shared/index.js +13 -0
  957. package/dist/server/shared/index.js.map +1 -0
  958. package/dist/server/shared/lexical/collectTextNodes.d.ts +10 -0
  959. package/dist/server/shared/lexical/collectTextNodes.d.ts.map +1 -0
  960. package/dist/server/shared/lexical/collectTextNodes.js +31 -0
  961. package/dist/server/shared/lexical/collectTextNodes.js.map +1 -0
  962. package/dist/server/shared/lexical/collectTextNodes.test.d.ts +2 -0
  963. package/dist/server/shared/lexical/collectTextNodes.test.d.ts.map +1 -0
  964. package/dist/server/shared/lexical/collectTextNodes.test.js +120 -0
  965. package/dist/server/shared/lexical/guards.d.ts +20 -0
  966. package/dist/server/shared/lexical/guards.d.ts.map +1 -0
  967. package/dist/server/shared/lexical/guards.js +18 -0
  968. package/dist/server/shared/lexical/guards.js.map +1 -0
  969. package/dist/server/shared/lexical/guards.test.d.ts +2 -0
  970. package/dist/server/shared/lexical/guards.test.d.ts.map +1 -0
  971. package/dist/server/shared/lexical/guards.test.js +160 -0
  972. package/dist/server/shared/lexical/index.d.ts +7 -0
  973. package/dist/server/shared/lexical/index.d.ts.map +1 -0
  974. package/dist/server/shared/lexical/index.js +6 -0
  975. package/dist/server/shared/lexical/index.js.map +1 -0
  976. package/dist/server/shared/lexical/isEmptyRichText.d.ts +14 -0
  977. package/dist/server/shared/lexical/isEmptyRichText.d.ts.map +1 -0
  978. package/dist/server/shared/lexical/isEmptyRichText.js +31 -0
  979. package/dist/server/shared/lexical/isEmptyRichText.js.map +1 -0
  980. package/dist/server/shared/lexical/isEmptyRichText.test.d.ts +2 -0
  981. package/dist/server/shared/lexical/isEmptyRichText.test.d.ts.map +1 -0
  982. package/dist/server/shared/lexical/isEmptyRichText.test.js +251 -0
  983. package/dist/server/shared/lexical/traverseLexicalTree.d.ts +11 -0
  984. package/dist/server/shared/lexical/traverseLexicalTree.d.ts.map +1 -0
  985. package/dist/server/shared/lexical/traverseLexicalTree.js +19 -0
  986. package/dist/server/shared/lexical/traverseLexicalTree.js.map +1 -0
  987. package/dist/server/shared/lexical/traverseLexicalTree.test.d.ts +2 -0
  988. package/dist/server/shared/lexical/traverseLexicalTree.test.d.ts.map +1 -0
  989. package/dist/server/shared/lexical/traverseLexicalTree.test.js +112 -0
  990. package/dist/server/shared/lexical/types.d.ts +20 -0
  991. package/dist/server/shared/lexical/types.d.ts.map +1 -0
  992. package/dist/server/shared/lexical/types.js +8 -0
  993. package/dist/server/shared/lexical/types.js.map +1 -0
  994. package/dist/server/shared/utils/LazyMap.d.ts +71 -0
  995. package/dist/server/shared/utils/LazyMap.d.ts.map +1 -0
  996. package/dist/server/shared/utils/LazyMap.js +95 -0
  997. package/dist/server/shared/utils/LazyMap.js.map +1 -0
  998. package/dist/server/shared/utils/LazyMap.test.d.ts +2 -0
  999. package/dist/server/shared/utils/LazyMap.test.d.ts.map +1 -0
  1000. package/dist/server/shared/utils/LazyMap.test.js +262 -0
  1001. package/dist/server/shared/utils/filterLocalizedFields.d.ts +11 -0
  1002. package/dist/server/shared/utils/filterLocalizedFields.d.ts.map +1 -0
  1003. package/dist/server/shared/utils/filterLocalizedFields.js +72 -0
  1004. package/dist/server/shared/utils/filterLocalizedFields.js.map +1 -0
  1005. package/dist/server/shared/utils/filterLocalizedFields.test.d.ts +2 -0
  1006. package/dist/server/shared/utils/filterLocalizedFields.test.d.ts.map +1 -0
  1007. package/dist/server/shared/utils/filterLocalizedFields.test.js +338 -0
  1008. package/dist/server/shared/utils/getByPath.d.ts +9 -0
  1009. package/dist/server/shared/utils/getByPath.d.ts.map +1 -0
  1010. package/dist/server/shared/utils/getByPath.js +18 -0
  1011. package/dist/server/shared/utils/getByPath.js.map +1 -0
  1012. package/dist/server/shared/utils/getByPath.test.d.ts +2 -0
  1013. package/dist/server/shared/utils/getByPath.test.d.ts.map +1 -0
  1014. package/dist/server/shared/utils/getByPath.test.js +33 -0
  1015. package/dist/server/shared/utils/index.d.ts +10 -0
  1016. package/dist/server/shared/utils/index.d.ts.map +1 -0
  1017. package/dist/server/shared/utils/index.js +10 -0
  1018. package/dist/server/shared/utils/index.js.map +1 -0
  1019. package/dist/server/shared/utils/isEmpty.d.ts +9 -0
  1020. package/dist/server/shared/utils/isEmpty.d.ts.map +1 -0
  1021. package/dist/server/shared/utils/isEmpty.js +15 -0
  1022. package/dist/server/shared/utils/isEmpty.js.map +1 -0
  1023. package/dist/server/shared/utils/isEmpty.test.d.ts +2 -0
  1024. package/dist/server/shared/utils/isEmpty.test.d.ts.map +1 -0
  1025. package/dist/server/shared/utils/isEmpty.test.js +60 -0
  1026. package/dist/server/shared/utils/isObject.d.ts +5 -0
  1027. package/dist/server/shared/utils/isObject.d.ts.map +1 -0
  1028. package/dist/server/shared/utils/isObject.js +7 -0
  1029. package/dist/server/shared/utils/isObject.js.map +1 -0
  1030. package/dist/server/shared/utils/isObject.test.d.ts +2 -0
  1031. package/dist/server/shared/utils/isObject.test.d.ts.map +1 -0
  1032. package/dist/server/shared/utils/isObject.test.js +57 -0
  1033. package/dist/server/shared/utils/normalizePath.d.ts +16 -0
  1034. package/dist/server/shared/utils/normalizePath.d.ts.map +1 -0
  1035. package/dist/server/shared/utils/normalizePath.js +22 -0
  1036. package/dist/server/shared/utils/normalizePath.js.map +1 -0
  1037. package/dist/server/shared/utils/normalizePath.test.d.ts +2 -0
  1038. package/dist/server/shared/utils/normalizePath.test.d.ts.map +1 -0
  1039. package/dist/server/shared/utils/normalizePath.test.js +33 -0
  1040. package/dist/server/shared/utils/pipe.d.ts +5 -0
  1041. package/dist/server/shared/utils/pipe.d.ts.map +1 -0
  1042. package/dist/server/shared/utils/pipe.js +5 -0
  1043. package/dist/server/shared/utils/pipe.js.map +1 -0
  1044. package/dist/server/shared/utils/pipe.test.d.ts +2 -0
  1045. package/dist/server/shared/utils/pipe.test.d.ts.map +1 -0
  1046. package/dist/server/shared/utils/pipe.test.js +55 -0
  1047. package/dist/server/shared/utils/setByPath.d.ts +11 -0
  1048. package/dist/server/shared/utils/setByPath.d.ts.map +1 -0
  1049. package/dist/server/shared/utils/setByPath.js +26 -0
  1050. package/dist/server/shared/utils/setByPath.js.map +1 -0
  1051. package/dist/server/shared/utils/setByPath.test.d.ts +2 -0
  1052. package/dist/server/shared/utils/setByPath.test.d.ts.map +1 -0
  1053. package/dist/server/shared/utils/setByPath.test.js +46 -0
  1054. package/dist/types/AccessGuard.d.ts +12 -0
  1055. package/dist/types/AccessGuard.d.ts.map +1 -0
  1056. package/dist/types/AccessGuard.js +3 -0
  1057. package/dist/types/AccessGuard.js.map +1 -0
  1058. package/dist/types/index.d.ts +2 -0
  1059. package/dist/types/index.d.ts.map +1 -0
  1060. package/dist/types/index.js +3 -0
  1061. package/dist/types/index.js.map +1 -0
  1062. package/dist/vitest-env.d.js +3 -0
  1063. package/dist/vitest-env.d.js.map +1 -0
  1064. package/package.json +91 -0
@@ -0,0 +1,97 @@
1
+ import { fieldAffectsData, fieldIsArrayType, fieldIsBlockType, fieldIsGroupType, tabHasName } from 'payload/shared';
2
+ import { hasFields, isBlockItem, isTabsField, isEmpty, isObject } from '../../../../shared';
3
+ /**
4
+ * Deep merges source and target data with target priority.
5
+ * Creates full document shape needed for Payload validation.
6
+ *
7
+ * Logic:
8
+ * - If targetValue exists and is not empty → use targetValue
9
+ * - Otherwise → use sourceValue
10
+ *
11
+ * Stage 1 of the translation pipeline.
12
+ */ export class DataReconciler {
13
+ schema;
14
+ constructor(schema){
15
+ this.schema = schema;
16
+ }
17
+ /**
18
+ * Reconciles source and target data into a complete document shape.
19
+ * The result contains all fields needed for Payload validation.
20
+ *
21
+ * @param sourceData - Source locale document data
22
+ * @param targetData - Target locale document data (may be empty/partial)
23
+ * @returns Complete document shape with reconciled field values
24
+ */ reconcile(sourceData, targetData) {
25
+ return this.reconcileFields(this.schema, sourceData, targetData ?? {});
26
+ }
27
+ reconcileFields(fields, source, target) {
28
+ const result = {};
29
+ for (const field of fields){
30
+ if (isTabsField(field)) {
31
+ for (const tab of field.tabs){
32
+ if (hasFields(tab)) {
33
+ if (tabHasName(tab)) {
34
+ const tabSource = source[tab.name];
35
+ const tabTarget = target[tab.name];
36
+ if (isObject(tabSource)) {
37
+ result[tab.name] = this.reconcileFields(tab.fields, tabSource, isObject(tabTarget) ? tabTarget : {});
38
+ }
39
+ } else {
40
+ Object.assign(result, this.reconcileFields(tab.fields, source, target));
41
+ }
42
+ }
43
+ }
44
+ continue;
45
+ }
46
+ if (!fieldAffectsData(field)) {
47
+ if (hasFields(field)) Object.assign(result, this.reconcileFields(field.fields, source, target));
48
+ continue;
49
+ }
50
+ const sourceValue = source[field.name];
51
+ const targetValue = target[field.name];
52
+ // Skip undefined source values
53
+ if (sourceValue === undefined) continue;
54
+ // Group - recursively reconcile
55
+ if (fieldIsGroupType(field) && isObject(sourceValue)) {
56
+ const targetGroup = isObject(targetValue) ? targetValue : {};
57
+ result[field.name] = this.reconcileFields(field.fields, sourceValue, targetGroup);
58
+ continue;
59
+ }
60
+ // Array - recursively reconcile each item (without id - Postgres rejects it)
61
+ if (fieldIsArrayType(field) && Array.isArray(sourceValue)) {
62
+ const targetArray = Array.isArray(targetValue) ? targetValue : [];
63
+ result[field.name] = sourceValue.map((sourceItem, index)=>{
64
+ if (isObject(sourceItem)) {
65
+ const targetItem = isObject(targetArray[index]) ? targetArray[index] : {};
66
+ return this.reconcileFields(field.fields, sourceItem, targetItem);
67
+ }
68
+ return sourceItem;
69
+ });
70
+ continue;
71
+ }
72
+ // Blocks - recursively reconcile each block (without id - Postgres rejects it)
73
+ if (fieldIsBlockType(field) && Array.isArray(sourceValue)) {
74
+ const targetArray = Array.isArray(targetValue) ? targetValue : [];
75
+ result[field.name] = sourceValue.map((sourceItem, index)=>{
76
+ if (isBlockItem(sourceItem)) {
77
+ const block = field.blocks.find((b)=>b.slug === sourceItem.blockType);
78
+ if (block) {
79
+ const targetItem = isObject(targetArray[index]) ? targetArray[index] : {};
80
+ return {
81
+ ...this.reconcileFields(block.fields, sourceItem, targetItem),
82
+ blockType: sourceItem.blockType
83
+ };
84
+ }
85
+ }
86
+ return sourceItem;
87
+ });
88
+ continue;
89
+ }
90
+ // Deep merge: target priority, fallback to source
91
+ result[field.name] = isEmpty(targetValue) ? sourceValue : targetValue;
92
+ }
93
+ return result;
94
+ }
95
+ }
96
+
97
+ //# sourceMappingURL=DataReconciler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.ts"],"sourcesContent":["import type { Field } from 'payload'\nimport { fieldAffectsData, fieldIsArrayType, fieldIsBlockType, fieldIsGroupType, tabHasName } from 'payload/shared'\n\nimport { hasFields, isBlockItem, isTabsField, isEmpty, isObject } from '../../../../shared'\n\n/**\n * Deep merges source and target data with target priority.\n * Creates full document shape needed for Payload validation.\n *\n * Logic:\n * - If targetValue exists and is not empty → use targetValue\n * - Otherwise → use sourceValue\n *\n * Stage 1 of the translation pipeline.\n */\nexport class DataReconciler {\n constructor(private readonly schema: Field[]) {}\n\n /**\n * Reconciles source and target data into a complete document shape.\n * The result contains all fields needed for Payload validation.\n *\n * @param sourceData - Source locale document data\n * @param targetData - Target locale document data (may be empty/partial)\n * @returns Complete document shape with reconciled field values\n */\n reconcile(sourceData: Record<string, unknown>, targetData: Record<string, unknown>): Record<string, unknown> {\n return this.reconcileFields(this.schema, sourceData, targetData ?? {})\n }\n\n private reconcileFields(\n fields: Field[],\n source: Record<string, unknown>,\n target: Record<string, unknown>,\n ): Record<string, unknown> {\n const result: Record<string, unknown> = {}\n\n for (const field of fields) {\n if (isTabsField(field)) {\n for (const tab of field.tabs) {\n if (hasFields(tab)) {\n if (tabHasName(tab)) {\n const tabSource = source[tab.name]\n const tabTarget = target[tab.name]\n if (isObject(tabSource)) {\n result[tab.name] = this.reconcileFields(tab.fields, tabSource, isObject(tabTarget) ? tabTarget : {})\n }\n } else {\n Object.assign(result, this.reconcileFields(tab.fields, source, target))\n }\n }\n }\n continue\n }\n\n if (!fieldAffectsData(field)) {\n if (hasFields(field)) Object.assign(result, this.reconcileFields(field.fields, source, target))\n continue\n }\n\n const sourceValue = source[field.name]\n const targetValue = target[field.name]\n\n // Skip undefined source values\n if (sourceValue === undefined) continue\n\n // Group - recursively reconcile\n if (fieldIsGroupType(field) && isObject(sourceValue)) {\n const targetGroup = isObject(targetValue) ? targetValue : {}\n result[field.name] = this.reconcileFields(field.fields, sourceValue, targetGroup)\n continue\n }\n\n // Array - recursively reconcile each item (without id - Postgres rejects it)\n if (fieldIsArrayType(field) && Array.isArray(sourceValue)) {\n const targetArray = Array.isArray(targetValue) ? targetValue : []\n result[field.name] = sourceValue.map((sourceItem, index) => {\n if (isObject(sourceItem)) {\n const targetItem = isObject(targetArray[index]) ? targetArray[index] : {}\n return this.reconcileFields(field.fields, sourceItem, targetItem)\n }\n return sourceItem\n })\n continue\n }\n\n // Blocks - recursively reconcile each block (without id - Postgres rejects it)\n if (fieldIsBlockType(field) && Array.isArray(sourceValue)) {\n const targetArray = Array.isArray(targetValue) ? targetValue : []\n result[field.name] = sourceValue.map((sourceItem, index) => {\n if (isBlockItem(sourceItem)) {\n const block = field.blocks.find((b) => b.slug === sourceItem.blockType)\n if (block) {\n const targetItem = isObject(targetArray[index]) ? targetArray[index] : {}\n return {\n ...this.reconcileFields(block.fields, sourceItem, targetItem),\n blockType: sourceItem.blockType,\n }\n }\n }\n return sourceItem\n })\n continue\n }\n\n // Deep merge: target priority, fallback to source\n result[field.name] = isEmpty(targetValue) ? sourceValue : targetValue\n }\n\n return result\n }\n}\n"],"names":["fieldAffectsData","fieldIsArrayType","fieldIsBlockType","fieldIsGroupType","tabHasName","hasFields","isBlockItem","isTabsField","isEmpty","isObject","DataReconciler","schema","reconcile","sourceData","targetData","reconcileFields","fields","source","target","result","field","tab","tabs","tabSource","name","tabTarget","Object","assign","sourceValue","targetValue","undefined","targetGroup","Array","isArray","targetArray","map","sourceItem","index","targetItem","block","blocks","find","b","slug","blockType"],"mappings":"AACA,SAASA,gBAAgB,EAAEC,gBAAgB,EAAEC,gBAAgB,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ,iBAAgB;AAEnH,SAASC,SAAS,EAAEC,WAAW,EAAEC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,qBAAoB;AAE3F;;;;;;;;;CASC,GACD,OAAO,MAAMC;;IACX,YAAY,AAAiBC,MAAe,CAAE;aAAjBA,SAAAA;IAAkB;IAE/C;;;;;;;GAOC,GACDC,UAAUC,UAAmC,EAAEC,UAAmC,EAA2B;QAC3G,OAAO,IAAI,CAACC,eAAe,CAAC,IAAI,CAACJ,MAAM,EAAEE,YAAYC,cAAc,CAAC;IACtE;IAEQC,gBACNC,MAAe,EACfC,MAA+B,EAC/BC,MAA+B,EACN;QACzB,MAAMC,SAAkC,CAAC;QAEzC,KAAK,MAAMC,SAASJ,OAAQ;YAC1B,IAAIT,YAAYa,QAAQ;gBACtB,KAAK,MAAMC,OAAOD,MAAME,IAAI,CAAE;oBAC5B,IAAIjB,UAAUgB,MAAM;wBAClB,IAAIjB,WAAWiB,MAAM;4BACnB,MAAME,YAAYN,MAAM,CAACI,IAAIG,IAAI,CAAC;4BAClC,MAAMC,YAAYP,MAAM,CAACG,IAAIG,IAAI,CAAC;4BAClC,IAAIf,SAASc,YAAY;gCACvBJ,MAAM,CAACE,IAAIG,IAAI,CAAC,GAAG,IAAI,CAACT,eAAe,CAACM,IAAIL,MAAM,EAAEO,WAAWd,SAASgB,aAAaA,YAAY,CAAC;4BACpG;wBACF,OAAO;4BACLC,OAAOC,MAAM,CAACR,QAAQ,IAAI,CAACJ,eAAe,CAACM,IAAIL,MAAM,EAAEC,QAAQC;wBACjE;oBACF;gBACF;gBACA;YACF;YAEA,IAAI,CAAClB,iBAAiBoB,QAAQ;gBAC5B,IAAIf,UAAUe,QAAQM,OAAOC,MAAM,CAACR,QAAQ,IAAI,CAACJ,eAAe,CAACK,MAAMJ,MAAM,EAAEC,QAAQC;gBACvF;YACF;YAEA,MAAMU,cAAcX,MAAM,CAACG,MAAMI,IAAI,CAAC;YACtC,MAAMK,cAAcX,MAAM,CAACE,MAAMI,IAAI,CAAC;YAEtC,+BAA+B;YAC/B,IAAII,gBAAgBE,WAAW;YAE/B,gCAAgC;YAChC,IAAI3B,iBAAiBiB,UAAUX,SAASmB,cAAc;gBACpD,MAAMG,cAActB,SAASoB,eAAeA,cAAc,CAAC;gBAC3DV,MAAM,CAACC,MAAMI,IAAI,CAAC,GAAG,IAAI,CAACT,eAAe,CAACK,MAAMJ,MAAM,EAAEY,aAAaG;gBACrE;YACF;YAEA,6EAA6E;YAC7E,IAAI9B,iBAAiBmB,UAAUY,MAAMC,OAAO,CAACL,cAAc;gBACzD,MAAMM,cAAcF,MAAMC,OAAO,CAACJ,eAAeA,cAAc,EAAE;gBACjEV,MAAM,CAACC,MAAMI,IAAI,CAAC,GAAGI,YAAYO,GAAG,CAAC,CAACC,YAAYC;oBAChD,IAAI5B,SAAS2B,aAAa;wBACxB,MAAME,aAAa7B,SAASyB,WAAW,CAACG,MAAM,IAAIH,WAAW,CAACG,MAAM,GAAG,CAAC;wBACxE,OAAO,IAAI,CAACtB,eAAe,CAACK,MAAMJ,MAAM,EAAEoB,YAAYE;oBACxD;oBACA,OAAOF;gBACT;gBACA;YACF;YAEA,+EAA+E;YAC/E,IAAIlC,iBAAiBkB,UAAUY,MAAMC,OAAO,CAACL,cAAc;gBACzD,MAAMM,cAAcF,MAAMC,OAAO,CAACJ,eAAeA,cAAc,EAAE;gBACjEV,MAAM,CAACC,MAAMI,IAAI,CAAC,GAAGI,YAAYO,GAAG,CAAC,CAACC,YAAYC;oBAChD,IAAI/B,YAAY8B,aAAa;wBAC3B,MAAMG,QAAQnB,MAAMoB,MAAM,CAACC,IAAI,CAAC,CAACC,IAAMA,EAAEC,IAAI,KAAKP,WAAWQ,SAAS;wBACtE,IAAIL,OAAO;4BACT,MAAMD,aAAa7B,SAASyB,WAAW,CAACG,MAAM,IAAIH,WAAW,CAACG,MAAM,GAAG,CAAC;4BACxE,OAAO;gCACL,GAAG,IAAI,CAACtB,eAAe,CAACwB,MAAMvB,MAAM,EAAEoB,YAAYE,WAAW;gCAC7DM,WAAWR,WAAWQ,SAAS;4BACjC;wBACF;oBACF;oBACA,OAAOR;gBACT;gBACA;YACF;YAEA,kDAAkD;YAClDjB,MAAM,CAACC,MAAMI,IAAI,CAAC,GAAGhB,QAAQqB,eAAeD,cAAcC;QAC5D;QAEA,OAAOV;IACT;AACF"}
@@ -0,0 +1,9 @@
1
+ import type { PipelineContext, PipelineStage } from '../../types';
2
+ /**
3
+ * Deep merges source and target data with target priority.
4
+ * Stage 1 of the translation pipeline.
5
+ */
6
+ export declare class DataReconcilerStage implements PipelineStage {
7
+ execute(ctx: PipelineContext): PipelineContext;
8
+ }
9
+ //# sourceMappingURL=DataReconciler.stage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataReconciler.stage.d.ts","sourceRoot":"","sources":["../../../../../../src/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAGjE;;;GAGG;AACH,qBAAa,mBAAoB,YAAW,aAAa;IACvD,OAAO,CAAC,GAAG,EAAE,eAAe,GAAG,eAAe;CAO/C"}
@@ -0,0 +1,15 @@
1
+ import { DataReconciler } from './DataReconciler';
2
+ /**
3
+ * Deep merges source and target data with target priority.
4
+ * Stage 1 of the translation pipeline.
5
+ */ export class DataReconcilerStage {
6
+ execute(ctx) {
7
+ const reconciler = new DataReconciler(ctx.schema);
8
+ return {
9
+ ...ctx,
10
+ filteredData: reconciler.reconcile(ctx.sourceData, ctx.targetData)
11
+ };
12
+ }
13
+ }
14
+
15
+ //# sourceMappingURL=DataReconciler.stage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.stage.ts"],"sourcesContent":["import type { PipelineContext, PipelineStage } from '../../types'\nimport { DataReconciler } from './DataReconciler'\n\n/**\n * Deep merges source and target data with target priority.\n * Stage 1 of the translation pipeline.\n */\nexport class DataReconcilerStage implements PipelineStage {\n execute(ctx: PipelineContext): PipelineContext {\n const reconciler = new DataReconciler(ctx.schema)\n return {\n ...ctx,\n filteredData: reconciler.reconcile(ctx.sourceData, ctx.targetData),\n }\n }\n}\n"],"names":["DataReconciler","DataReconcilerStage","execute","ctx","reconciler","schema","filteredData","reconcile","sourceData","targetData"],"mappings":"AACA,SAASA,cAAc,QAAQ,mBAAkB;AAEjD;;;CAGC,GACD,OAAO,MAAMC;IACXC,QAAQC,GAAoB,EAAmB;QAC7C,MAAMC,aAAa,IAAIJ,eAAeG,IAAIE,MAAM;QAChD,OAAO;YACL,GAAGF,GAAG;YACNG,cAAcF,WAAWG,SAAS,CAACJ,IAAIK,UAAU,EAAEL,IAAIM,UAAU;QACnE;IACF;AACF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DataReconciler.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataReconciler.test.d.ts","sourceRoot":"","sources":["../../../../../../src/server/modules/translation-pipeline/stages/data-reconciler/DataReconciler.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,294 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { DataReconciler } from './DataReconciler';
3
+ describe('DataReconciler', () => {
4
+ describe('deep merge with target priority', () => {
5
+ it('uses target value when it exists', () => {
6
+ const schema = [{ name: 'title', type: 'text', localized: true }];
7
+ const sourceData = { title: 'Hello' };
8
+ const targetData = { title: 'Existing' };
9
+ const reconciler = new DataReconciler(schema);
10
+ expect(reconciler.reconcile(sourceData, targetData)).toEqual({ title: 'Existing' });
11
+ });
12
+ it('uses source value when target is empty', () => {
13
+ const schema = [{ name: 'title', type: 'text', localized: true }];
14
+ const sourceData = { title: 'Hello' };
15
+ const targetData = { title: '' };
16
+ const reconciler = new DataReconciler(schema);
17
+ expect(reconciler.reconcile(sourceData, targetData)).toEqual({ title: 'Hello' });
18
+ });
19
+ it('uses source value when target is missing', () => {
20
+ const schema = [{ name: 'title', type: 'text', localized: true }];
21
+ const sourceData = { title: 'Hello' };
22
+ const targetData = {};
23
+ const reconciler = new DataReconciler(schema);
24
+ expect(reconciler.reconcile(sourceData, targetData)).toEqual({ title: 'Hello' });
25
+ });
26
+ it('handles multiple fields independently', () => {
27
+ const schema = [
28
+ { name: 'title', type: 'text', localized: true },
29
+ { name: 'description', type: 'text', localized: true },
30
+ { name: 'slug', type: 'text', localized: false },
31
+ ];
32
+ const sourceData = { title: 'Hello', description: 'World', slug: 'hello' };
33
+ const targetData = { title: 'Translated Title', description: '', slug: 'other-slug' };
34
+ const reconciler = new DataReconciler(schema);
35
+ expect(reconciler.reconcile(sourceData, targetData)).toEqual({
36
+ title: 'Translated Title',
37
+ description: 'World',
38
+ slug: 'other-slug',
39
+ });
40
+ });
41
+ it('preserves full document shape', () => {
42
+ const schema = [
43
+ { name: 'title', type: 'text', localized: true },
44
+ { name: 'slug', type: 'text', localized: false },
45
+ { name: 'author', type: 'relationship', relationTo: 'users', localized: false },
46
+ ];
47
+ const sourceData = { title: 'Hello', slug: 'hello', author: '123' };
48
+ const targetData = {};
49
+ const reconciler = new DataReconciler(schema);
50
+ expect(reconciler.reconcile(sourceData, targetData)).toEqual({
51
+ title: 'Hello',
52
+ slug: 'hello',
53
+ author: '123',
54
+ });
55
+ });
56
+ });
57
+ describe('nested structures', () => {
58
+ it('reconciles group fields', () => {
59
+ const schema = [
60
+ {
61
+ name: 'meta',
62
+ type: 'group',
63
+ fields: [
64
+ { name: 'title', type: 'text', localized: true },
65
+ { name: 'slug', type: 'text', localized: false },
66
+ ],
67
+ },
68
+ ];
69
+ const sourceData = { meta: { title: 'Hello', slug: 'hello' } };
70
+ const targetData = { meta: { title: 'Existing', slug: '' } };
71
+ const reconciler = new DataReconciler(schema);
72
+ expect(reconciler.reconcile(sourceData, targetData)).toEqual({
73
+ meta: { title: 'Existing', slug: 'hello' },
74
+ });
75
+ });
76
+ it('reconciles array fields', () => {
77
+ const schema = [
78
+ {
79
+ name: 'items',
80
+ type: 'array',
81
+ fields: [
82
+ { name: 'label', type: 'text', localized: true },
83
+ { name: 'value', type: 'text', localized: false },
84
+ ],
85
+ },
86
+ ];
87
+ const sourceData = {
88
+ items: [
89
+ { id: '1', label: 'First', value: 'one' },
90
+ { id: '2', label: 'Second', value: 'two' },
91
+ ],
92
+ };
93
+ const targetData = {
94
+ items: [
95
+ { id: '1', label: 'Translated', value: '' },
96
+ { id: '2', label: '', value: 'y' },
97
+ ],
98
+ };
99
+ const reconciler = new DataReconciler(schema);
100
+ // Note: id is not included in result - Postgres rejects it on update
101
+ expect(reconciler.reconcile(sourceData, targetData)).toEqual({
102
+ items: [
103
+ { label: 'Translated', value: 'one' },
104
+ { label: 'Second', value: 'y' },
105
+ ],
106
+ });
107
+ });
108
+ it('reconciles blocks fields', () => {
109
+ const schema = [
110
+ {
111
+ name: 'layout',
112
+ type: 'blocks',
113
+ blocks: [
114
+ {
115
+ slug: 'text',
116
+ fields: [
117
+ { name: 'content', type: 'text', localized: true },
118
+ { name: 'style', type: 'text', localized: false },
119
+ ],
120
+ },
121
+ ],
122
+ },
123
+ ];
124
+ const sourceData = {
125
+ layout: [{ id: '1', blockType: 'text', content: 'Hello', style: 'bold' }],
126
+ };
127
+ const targetData = {
128
+ layout: [{ id: '1', blockType: 'text', content: 'Existing', style: '' }],
129
+ };
130
+ const reconciler = new DataReconciler(schema);
131
+ // Note: id is not included in result - Postgres rejects it on update
132
+ expect(reconciler.reconcile(sourceData, targetData)).toEqual({
133
+ layout: [{ blockType: 'text', content: 'Existing', style: 'bold' }],
134
+ });
135
+ });
136
+ it('uses source for empty target in blocks', () => {
137
+ const schema = [
138
+ {
139
+ name: 'layout',
140
+ type: 'blocks',
141
+ blocks: [
142
+ {
143
+ slug: 'text',
144
+ fields: [{ name: 'content', type: 'text', localized: true }],
145
+ },
146
+ ],
147
+ },
148
+ ];
149
+ const sourceData = {
150
+ layout: [{ id: '1', blockType: 'text', content: 'Hello' }],
151
+ };
152
+ const targetData = {
153
+ layout: [{ id: '1', blockType: 'text', content: '' }],
154
+ };
155
+ const reconciler = new DataReconciler(schema);
156
+ // Note: id is not included in result - Postgres rejects it on update
157
+ expect(reconciler.reconcile(sourceData, targetData)).toEqual({
158
+ layout: [{ blockType: 'text', content: 'Hello' }],
159
+ });
160
+ });
161
+ });
162
+ describe('edge cases', () => {
163
+ it('handles null targetData', () => {
164
+ const schema = [{ name: 'title', type: 'text', localized: true }];
165
+ const sourceData = { title: 'Hello' };
166
+ const reconciler = new DataReconciler(schema);
167
+ expect(reconciler.reconcile(sourceData, null)).toEqual({
168
+ title: 'Hello',
169
+ });
170
+ });
171
+ it('skips undefined source values', () => {
172
+ const schema = [
173
+ { name: 'title', type: 'text', localized: true },
174
+ { name: 'description', type: 'text', localized: true },
175
+ ];
176
+ const sourceData = { title: 'Hello' };
177
+ const targetData = { title: 'Existing', description: 'Target desc' };
178
+ const reconciler = new DataReconciler(schema);
179
+ expect(reconciler.reconcile(sourceData, targetData)).toEqual({
180
+ title: 'Existing',
181
+ });
182
+ });
183
+ });
184
+ describe('tabs support', () => {
185
+ it('reconciles fields in named tabs', () => {
186
+ const schema = [
187
+ {
188
+ type: 'tabs',
189
+ tabs: [
190
+ {
191
+ name: 'seo',
192
+ fields: [
193
+ { name: 'title', type: 'text', localized: true },
194
+ { name: 'description', type: 'text', localized: true },
195
+ ],
196
+ },
197
+ ],
198
+ },
199
+ ];
200
+ const sourceData = { seo: { title: 'Hello', description: 'World' } };
201
+ const targetData = { seo: { title: 'Translated', description: '' } };
202
+ const reconciler = new DataReconciler(schema);
203
+ expect(reconciler.reconcile(sourceData, targetData)).toEqual({
204
+ seo: { title: 'Translated', description: 'World' },
205
+ });
206
+ });
207
+ it('reconciles fields in unnamed tabs', () => {
208
+ const schema = [
209
+ {
210
+ type: 'tabs',
211
+ tabs: [
212
+ {
213
+ label: 'Content',
214
+ fields: [
215
+ { name: 'title', type: 'text', localized: true },
216
+ { name: 'body', type: 'text', localized: true },
217
+ ],
218
+ },
219
+ ],
220
+ },
221
+ ];
222
+ const sourceData = { title: 'Hello', body: 'World' };
223
+ const targetData = { title: 'Translated', body: '' };
224
+ const reconciler = new DataReconciler(schema);
225
+ expect(reconciler.reconcile(sourceData, targetData)).toEqual({
226
+ title: 'Translated',
227
+ body: 'World',
228
+ });
229
+ });
230
+ it('reconciles multiple tabs with mixed named/unnamed', () => {
231
+ const schema = [
232
+ {
233
+ type: 'tabs',
234
+ tabs: [
235
+ {
236
+ label: 'Content',
237
+ fields: [{ name: 'title', type: 'text', localized: true }],
238
+ },
239
+ {
240
+ name: 'seo',
241
+ fields: [{ name: 'metaTitle', type: 'text', localized: true }],
242
+ },
243
+ ],
244
+ },
245
+ ];
246
+ const sourceData = { title: 'Hello', seo: { metaTitle: 'SEO Title' } };
247
+ const targetData = { title: 'Translated', seo: { metaTitle: '' } };
248
+ const reconciler = new DataReconciler(schema);
249
+ expect(reconciler.reconcile(sourceData, targetData)).toEqual({
250
+ title: 'Translated',
251
+ seo: { metaTitle: 'SEO Title' },
252
+ });
253
+ });
254
+ });
255
+ describe('row and collapsible fields', () => {
256
+ it('reconciles fields in row', () => {
257
+ const schema = [
258
+ {
259
+ type: 'row',
260
+ fields: [
261
+ { name: 'firstName', type: 'text', localized: true },
262
+ { name: 'lastName', type: 'text', localized: true },
263
+ ],
264
+ },
265
+ ];
266
+ const sourceData = { firstName: 'John', lastName: 'Doe' };
267
+ const targetData = { firstName: 'Johann', lastName: '' };
268
+ const reconciler = new DataReconciler(schema);
269
+ expect(reconciler.reconcile(sourceData, targetData)).toEqual({
270
+ firstName: 'Johann',
271
+ lastName: 'Doe',
272
+ });
273
+ });
274
+ it('reconciles fields in collapsible', () => {
275
+ const schema = [
276
+ {
277
+ type: 'collapsible',
278
+ label: 'Advanced',
279
+ fields: [
280
+ { name: 'seoTitle', type: 'text', localized: true },
281
+ { name: 'seoDescription', type: 'text', localized: true },
282
+ ],
283
+ },
284
+ ];
285
+ const sourceData = { seoTitle: 'Title', seoDescription: 'Description' };
286
+ const targetData = { seoTitle: 'Translated', seoDescription: '' };
287
+ const reconciler = new DataReconciler(schema);
288
+ expect(reconciler.reconcile(sourceData, targetData)).toEqual({
289
+ seoTitle: 'Translated',
290
+ seoDescription: 'Description',
291
+ });
292
+ });
293
+ });
294
+ });
@@ -0,0 +1,3 @@
1
+ export { DataReconciler } from './DataReconciler';
2
+ export { DataReconcilerStage } from './DataReconciler.stage';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/server/modules/translation-pipeline/stages/data-reconciler/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA"}
@@ -0,0 +1,4 @@
1
+ export { DataReconciler } from './DataReconciler';
2
+ export { DataReconcilerStage } from './DataReconciler.stage';
3
+
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/server/modules/translation-pipeline/stages/data-reconciler/index.ts"],"sourcesContent":["export { DataReconciler } from './DataReconciler'\nexport { DataReconcilerStage } from './DataReconciler.stage'\n"],"names":["DataReconciler","DataReconcilerStage"],"mappings":"AAAA,SAASA,cAAc,QAAQ,mBAAkB;AACjD,SAASC,mBAAmB,QAAQ,yBAAwB"}
@@ -0,0 +1,35 @@
1
+ import type { Field } from 'payload';
2
+ import type { FieldChunk } from '../../types';
3
+ import type { TranslationStrategy } from '../../strategies';
4
+ /**
5
+ * Collects FieldChunks by traversing schema and data in parallel.
6
+ * Each chunk contains a reference to the parent data object for later mutation.
7
+ *
8
+ * Applies all filtering logic:
9
+ * - isTranslatableField
10
+ * - isLocalizedField
11
+ * - strategy.shouldTranslate(sourceValue, targetValue)
12
+ * - !isFieldExcludedFromTranslation
13
+ *
14
+ * IMPORTANT: Expects ORIGINAL collection schemas (before Payload sanitization).
15
+ * Original schemas preserve `localized: true` on nested fields.
16
+ */
17
+ export declare class FieldChunkCollector {
18
+ private readonly schema;
19
+ private readonly filteredData;
20
+ private readonly sourceData;
21
+ private readonly targetData;
22
+ private readonly strategy;
23
+ private chunks;
24
+ constructor(schema: Field[], filteredData: Record<string, unknown>, sourceData: Record<string, unknown>, targetData: Record<string, unknown>, strategy: TranslationStrategy);
25
+ /**
26
+ * Collects translatable field chunks that need translation.
27
+ */
28
+ collect(): FieldChunk[];
29
+ /**
30
+ * Traverses fields recursively, collecting translatable fields that need translation.
31
+ * Uses strategy.shouldTranslate() to determine if field needs translation.
32
+ */
33
+ private traverseFields;
34
+ }
35
+ //# sourceMappingURL=FieldChunkCollector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldChunkCollector.d.ts","sourceRoot":"","sources":["../../../../../../src/server/modules/translation-pipeline/stages/field-collector/FieldChunkCollector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAYpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAE3D;;;;;;;;;;;;GAYG;AACH,qBAAa,mBAAmB;IAI5B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAP3B,OAAO,CAAC,MAAM,CAAmB;gBAGd,MAAM,EAAE,KAAK,EAAE,EACf,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACrC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,QAAQ,EAAE,mBAAmB;IAGhD;;OAEG;IACH,OAAO,IAAI,UAAU,EAAE;IAMvB;;;OAGG;IACH,OAAO,CAAC,cAAc;CAiGvB"}
@@ -0,0 +1,128 @@
1
+ import { fieldAffectsData, fieldIsArrayType, fieldIsBlockType, fieldIsGroupType, tabHasName } from 'payload/shared';
2
+ import { hasFields, isBlockItem, isLocalizedField, isObject, isTabsField, isTranslatableField, isFieldExcludedFromTranslation } from '../../../../shared';
3
+ /**
4
+ * Collects FieldChunks by traversing schema and data in parallel.
5
+ * Each chunk contains a reference to the parent data object for later mutation.
6
+ *
7
+ * Applies all filtering logic:
8
+ * - isTranslatableField
9
+ * - isLocalizedField
10
+ * - strategy.shouldTranslate(sourceValue, targetValue)
11
+ * - !isFieldExcludedFromTranslation
12
+ *
13
+ * IMPORTANT: Expects ORIGINAL collection schemas (before Payload sanitization).
14
+ * Original schemas preserve `localized: true` on nested fields.
15
+ */ export class FieldChunkCollector {
16
+ schema;
17
+ filteredData;
18
+ sourceData;
19
+ targetData;
20
+ strategy;
21
+ chunks = [];
22
+ constructor(schema, filteredData, sourceData, targetData, strategy){
23
+ this.schema = schema;
24
+ this.filteredData = filteredData;
25
+ this.sourceData = sourceData;
26
+ this.targetData = targetData;
27
+ this.strategy = strategy;
28
+ }
29
+ /**
30
+ * Collects translatable field chunks that need translation.
31
+ */ collect() {
32
+ this.chunks = [];
33
+ this.traverseFields(this.schema, this.filteredData, this.sourceData, this.targetData, []);
34
+ return this.chunks;
35
+ }
36
+ /**
37
+ * Traverses fields recursively, collecting translatable fields that need translation.
38
+ * Uses strategy.shouldTranslate() to determine if field needs translation.
39
+ */ traverseFields(fields, data, source, target, path) {
40
+ for (const field of fields){
41
+ if (isTabsField(field)) {
42
+ for (const tab of field.tabs){
43
+ if (hasFields(tab)) {
44
+ if (tabHasName(tab)) {
45
+ const tabData = data[tab.name];
46
+ const tabSource = source[tab.name];
47
+ const tabTarget = target[tab.name];
48
+ if (isObject(tabData)) {
49
+ this.traverseFields(tab.fields, tabData, isObject(tabSource) ? tabSource : {}, isObject(tabTarget) ? tabTarget : {}, [
50
+ ...path,
51
+ tab.name
52
+ ]);
53
+ }
54
+ } else {
55
+ this.traverseFields(tab.fields, data, source, target, path);
56
+ }
57
+ }
58
+ }
59
+ continue;
60
+ }
61
+ if (!fieldAffectsData(field)) {
62
+ if (hasFields(field)) this.traverseFields(field.fields, data, source, target, path);
63
+ continue;
64
+ }
65
+ const value = data[field.name];
66
+ const sourceValue = source[field.name];
67
+ const targetValue = target[field.name];
68
+ if (value === undefined || value === null) continue;
69
+ const currentPath = [
70
+ ...path,
71
+ field.name
72
+ ];
73
+ if (fieldIsGroupType(field) && isObject(value)) {
74
+ this.traverseFields(field.fields, value, isObject(sourceValue) ? sourceValue : {}, isObject(targetValue) ? targetValue : {}, currentPath);
75
+ continue;
76
+ }
77
+ if (fieldIsArrayType(field) && Array.isArray(value)) {
78
+ const sourceArray = Array.isArray(sourceValue) ? sourceValue : [];
79
+ const targetArray = Array.isArray(targetValue) ? targetValue : [];
80
+ value.forEach((item, index)=>{
81
+ if (isObject(item)) {
82
+ const sourceItem = isObject(sourceArray[index]) ? sourceArray[index] : {};
83
+ const targetItem = isObject(targetArray[index]) ? targetArray[index] : {};
84
+ this.traverseFields(field.fields, item, sourceItem, targetItem, [
85
+ ...currentPath,
86
+ String(index)
87
+ ]);
88
+ }
89
+ });
90
+ continue;
91
+ }
92
+ if (fieldIsBlockType(field) && Array.isArray(value)) {
93
+ const sourceArray = Array.isArray(sourceValue) ? sourceValue : [];
94
+ const targetArray = Array.isArray(targetValue) ? targetValue : [];
95
+ value.forEach((item, index)=>{
96
+ if (isBlockItem(item)) {
97
+ const block = field.blocks.find((b)=>b.slug === item.blockType);
98
+ if (block) {
99
+ const sourceItem = isObject(sourceArray[index]) ? sourceArray[index] : {};
100
+ const targetItem = isObject(targetArray[index]) ? targetArray[index] : {};
101
+ this.traverseFields(block.fields, item, sourceItem, targetItem, [
102
+ ...currentPath,
103
+ String(index)
104
+ ]);
105
+ }
106
+ }
107
+ });
108
+ continue;
109
+ }
110
+ // Collect if: translatable, localized, not excluded, and strategy says to translate
111
+ if (isTranslatableField(field) && isLocalizedField(field) && !isFieldExcludedFromTranslation(field) && this.strategy.shouldTranslate({
112
+ sourceValue,
113
+ targetValue
114
+ })) {
115
+ // Write sourceValue to filteredData — this is what will be translated
116
+ data[field.name] = sourceValue;
117
+ this.chunks.push({
118
+ schema: field,
119
+ dataRef: data,
120
+ key: field.name,
121
+ path: currentPath
122
+ });
123
+ }
124
+ }
125
+ }
126
+ }
127
+
128
+ //# sourceMappingURL=FieldChunkCollector.js.map