@ruya.sa/plugin-import-export 3.71.3

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 (410) hide show
  1. package/README.md +7 -0
  2. package/dist/components/CollectionField/index.d.ts +3 -0
  3. package/dist/components/CollectionField/index.d.ts.map +1 -0
  4. package/dist/components/CollectionField/index.js +29 -0
  5. package/dist/components/CollectionField/index.js.map +1 -0
  6. package/dist/components/ExportListMenuItem/index.d.ts +6 -0
  7. package/dist/components/ExportListMenuItem/index.d.ts.map +1 -0
  8. package/dist/components/ExportListMenuItem/index.js +44 -0
  9. package/dist/components/ExportListMenuItem/index.js.map +1 -0
  10. package/dist/components/ExportPreview/index.d.ts +4 -0
  11. package/dist/components/ExportPreview/index.d.ts.map +1 -0
  12. package/dist/components/ExportPreview/index.js +252 -0
  13. package/dist/components/ExportPreview/index.js.map +1 -0
  14. package/dist/components/ExportPreview/index.scss +36 -0
  15. package/dist/components/ExportSaveButton/index.d.ts +3 -0
  16. package/dist/components/ExportSaveButton/index.d.ts.map +1 -0
  17. package/dist/components/ExportSaveButton/index.js +110 -0
  18. package/dist/components/ExportSaveButton/index.js.map +1 -0
  19. package/dist/components/FieldsToExport/index.d.ts +3 -0
  20. package/dist/components/FieldsToExport/index.d.ts.map +1 -0
  21. package/dist/components/FieldsToExport/index.js +87 -0
  22. package/dist/components/FieldsToExport/index.js.map +1 -0
  23. package/dist/components/FieldsToExport/index.scss +0 -0
  24. package/dist/components/FieldsToExport/reduceFields.d.ts +13 -0
  25. package/dist/components/FieldsToExport/reduceFields.d.ts.map +1 -0
  26. package/dist/components/FieldsToExport/reduceFields.js +109 -0
  27. package/dist/components/FieldsToExport/reduceFields.js.map +1 -0
  28. package/dist/components/ImportCollectionField/index.d.ts +3 -0
  29. package/dist/components/ImportCollectionField/index.d.ts.map +1 -0
  30. package/dist/components/ImportCollectionField/index.js +17 -0
  31. package/dist/components/ImportCollectionField/index.js.map +1 -0
  32. package/dist/components/ImportExportProvider/index.d.ts +12 -0
  33. package/dist/components/ImportExportProvider/index.d.ts.map +1 -0
  34. package/dist/components/ImportExportProvider/index.js +20 -0
  35. package/dist/components/ImportExportProvider/index.js.map +1 -0
  36. package/dist/components/ImportListMenuItem/index.d.ts +6 -0
  37. package/dist/components/ImportListMenuItem/index.d.ts.map +1 -0
  38. package/dist/components/ImportListMenuItem/index.js +48 -0
  39. package/dist/components/ImportListMenuItem/index.js.map +1 -0
  40. package/dist/components/ImportPreview/index.d.ts +4 -0
  41. package/dist/components/ImportPreview/index.d.ts.map +1 -0
  42. package/dist/components/ImportPreview/index.js +624 -0
  43. package/dist/components/ImportPreview/index.js.map +1 -0
  44. package/dist/components/ImportPreview/index.scss +41 -0
  45. package/dist/components/ImportSaveButton/index.d.ts +2 -0
  46. package/dist/components/ImportSaveButton/index.d.ts.map +1 -0
  47. package/dist/components/ImportSaveButton/index.js +18 -0
  48. package/dist/components/ImportSaveButton/index.js.map +1 -0
  49. package/dist/components/Page/index.d.ts +4 -0
  50. package/dist/components/Page/index.d.ts.map +1 -0
  51. package/dist/components/Page/index.js +40 -0
  52. package/dist/components/Page/index.js.map +1 -0
  53. package/dist/components/Page/index.scss +5 -0
  54. package/dist/components/SelectionToUseField/index.d.ts +3 -0
  55. package/dist/components/SelectionToUseField/index.d.ts.map +1 -0
  56. package/dist/components/SelectionToUseField/index.js +128 -0
  57. package/dist/components/SelectionToUseField/index.js.map +1 -0
  58. package/dist/components/SortBy/index.d.ts +4 -0
  59. package/dist/components/SortBy/index.d.ts.map +1 -0
  60. package/dist/components/SortBy/index.js +133 -0
  61. package/dist/components/SortBy/index.js.map +1 -0
  62. package/dist/components/SortBy/index.scss +3 -0
  63. package/dist/components/SortOrder/index.d.ts +4 -0
  64. package/dist/components/SortOrder/index.d.ts.map +1 -0
  65. package/dist/components/SortOrder/index.js +121 -0
  66. package/dist/components/SortOrder/index.js.map +1 -0
  67. package/dist/components/SortOrder/index.scss +3 -0
  68. package/dist/constants.d.ts +21 -0
  69. package/dist/constants.d.ts.map +1 -0
  70. package/dist/constants.js +21 -0
  71. package/dist/constants.js.map +1 -0
  72. package/dist/export/batchProcessor.d.ts +107 -0
  73. package/dist/export/batchProcessor.d.ts.map +1 -0
  74. package/dist/export/batchProcessor.js +187 -0
  75. package/dist/export/batchProcessor.js.map +1 -0
  76. package/dist/export/createExport.d.ts +37 -0
  77. package/dist/export/createExport.d.ts.map +1 -0
  78. package/dist/export/createExport.js +385 -0
  79. package/dist/export/createExport.js.map +1 -0
  80. package/dist/export/getCreateExportCollectionTask.d.ts +16 -0
  81. package/dist/export/getCreateExportCollectionTask.d.ts.map +1 -0
  82. package/dist/export/getCreateExportCollectionTask.js +35 -0
  83. package/dist/export/getCreateExportCollectionTask.js.map +1 -0
  84. package/dist/export/getExportCollection.d.ts +8 -0
  85. package/dist/export/getExportCollection.d.ts.map +1 -0
  86. package/dist/export/getExportCollection.js +100 -0
  87. package/dist/export/getExportCollection.js.map +1 -0
  88. package/dist/export/getFields.d.ts +10 -0
  89. package/dist/export/getFields.d.ts.map +1 -0
  90. package/dist/export/getFields.js +244 -0
  91. package/dist/export/getFields.js.map +1 -0
  92. package/dist/export/handleDownload.d.ts +3 -0
  93. package/dist/export/handleDownload.d.ts.map +1 -0
  94. package/dist/export/handleDownload.js +42 -0
  95. package/dist/export/handleDownload.js.map +1 -0
  96. package/dist/export/handlePreview.d.ts +3 -0
  97. package/dist/export/handlePreview.d.ts.map +1 -0
  98. package/dist/export/handlePreview.js +163 -0
  99. package/dist/export/handlePreview.js.map +1 -0
  100. package/dist/exports/rsc.d.ts +15 -0
  101. package/dist/exports/rsc.d.ts.map +1 -0
  102. package/dist/exports/rsc.js +16 -0
  103. package/dist/exports/rsc.js.map +1 -0
  104. package/dist/exports/types.d.ts +2 -0
  105. package/dist/exports/types.d.ts.map +1 -0
  106. package/dist/exports/types.js +3 -0
  107. package/dist/exports/types.js.map +1 -0
  108. package/dist/import/batchProcessor.d.ts +46 -0
  109. package/dist/import/batchProcessor.d.ts.map +1 -0
  110. package/dist/import/batchProcessor.js +529 -0
  111. package/dist/import/batchProcessor.js.map +1 -0
  112. package/dist/import/createImport.d.ts +45 -0
  113. package/dist/import/createImport.d.ts.map +1 -0
  114. package/dist/import/createImport.js +175 -0
  115. package/dist/import/createImport.js.map +1 -0
  116. package/dist/import/getCreateImportCollectionTask.d.ts +13 -0
  117. package/dist/import/getCreateImportCollectionTask.d.ts.map +1 -0
  118. package/dist/import/getCreateImportCollectionTask.js +81 -0
  119. package/dist/import/getCreateImportCollectionTask.js.map +1 -0
  120. package/dist/import/getFields.d.ts +7 -0
  121. package/dist/import/getFields.d.ts.map +1 -0
  122. package/dist/import/getFields.js +150 -0
  123. package/dist/import/getFields.js.map +1 -0
  124. package/dist/import/getImportCollection.d.ts +8 -0
  125. package/dist/import/getImportCollection.d.ts.map +1 -0
  126. package/dist/import/getImportCollection.js +258 -0
  127. package/dist/import/getImportCollection.js.map +1 -0
  128. package/dist/import/handlePreview.d.ts +3 -0
  129. package/dist/import/handlePreview.d.ts.map +1 -0
  130. package/dist/import/handlePreview.js +94 -0
  131. package/dist/import/handlePreview.js.map +1 -0
  132. package/dist/index.d.ts +32 -0
  133. package/dist/index.d.ts.map +1 -0
  134. package/dist/index.js +120 -0
  135. package/dist/index.js.map +1 -0
  136. package/dist/translations/index.d.ts +6 -0
  137. package/dist/translations/index.d.ts.map +1 -0
  138. package/dist/translations/index.js +84 -0
  139. package/dist/translations/index.js.map +1 -0
  140. package/dist/translations/languages/ar.d.ts +4 -0
  141. package/dist/translations/languages/ar.d.ts.map +1 -0
  142. package/dist/translations/languages/ar.js +48 -0
  143. package/dist/translations/languages/ar.js.map +1 -0
  144. package/dist/translations/languages/az.d.ts +4 -0
  145. package/dist/translations/languages/az.d.ts.map +1 -0
  146. package/dist/translations/languages/az.js +48 -0
  147. package/dist/translations/languages/az.js.map +1 -0
  148. package/dist/translations/languages/bg.d.ts +4 -0
  149. package/dist/translations/languages/bg.d.ts.map +1 -0
  150. package/dist/translations/languages/bg.js +48 -0
  151. package/dist/translations/languages/bg.js.map +1 -0
  152. package/dist/translations/languages/bnBd.d.ts +4 -0
  153. package/dist/translations/languages/bnBd.d.ts.map +1 -0
  154. package/dist/translations/languages/bnBd.js +48 -0
  155. package/dist/translations/languages/bnBd.js.map +1 -0
  156. package/dist/translations/languages/bnIn.d.ts +4 -0
  157. package/dist/translations/languages/bnIn.d.ts.map +1 -0
  158. package/dist/translations/languages/bnIn.js +48 -0
  159. package/dist/translations/languages/bnIn.js.map +1 -0
  160. package/dist/translations/languages/ca.d.ts +4 -0
  161. package/dist/translations/languages/ca.d.ts.map +1 -0
  162. package/dist/translations/languages/ca.js +48 -0
  163. package/dist/translations/languages/ca.js.map +1 -0
  164. package/dist/translations/languages/cs.d.ts +4 -0
  165. package/dist/translations/languages/cs.d.ts.map +1 -0
  166. package/dist/translations/languages/cs.js +48 -0
  167. package/dist/translations/languages/cs.js.map +1 -0
  168. package/dist/translations/languages/da.d.ts +4 -0
  169. package/dist/translations/languages/da.d.ts.map +1 -0
  170. package/dist/translations/languages/da.js +48 -0
  171. package/dist/translations/languages/da.js.map +1 -0
  172. package/dist/translations/languages/de.d.ts +4 -0
  173. package/dist/translations/languages/de.d.ts.map +1 -0
  174. package/dist/translations/languages/de.js +48 -0
  175. package/dist/translations/languages/de.js.map +1 -0
  176. package/dist/translations/languages/en.d.ts +45 -0
  177. package/dist/translations/languages/en.d.ts.map +1 -0
  178. package/dist/translations/languages/en.js +48 -0
  179. package/dist/translations/languages/en.js.map +1 -0
  180. package/dist/translations/languages/es.d.ts +4 -0
  181. package/dist/translations/languages/es.d.ts.map +1 -0
  182. package/dist/translations/languages/es.js +48 -0
  183. package/dist/translations/languages/es.js.map +1 -0
  184. package/dist/translations/languages/et.d.ts +4 -0
  185. package/dist/translations/languages/et.d.ts.map +1 -0
  186. package/dist/translations/languages/et.js +48 -0
  187. package/dist/translations/languages/et.js.map +1 -0
  188. package/dist/translations/languages/fa.d.ts +4 -0
  189. package/dist/translations/languages/fa.d.ts.map +1 -0
  190. package/dist/translations/languages/fa.js +48 -0
  191. package/dist/translations/languages/fa.js.map +1 -0
  192. package/dist/translations/languages/fr.d.ts +4 -0
  193. package/dist/translations/languages/fr.d.ts.map +1 -0
  194. package/dist/translations/languages/fr.js +48 -0
  195. package/dist/translations/languages/fr.js.map +1 -0
  196. package/dist/translations/languages/he.d.ts +4 -0
  197. package/dist/translations/languages/he.d.ts.map +1 -0
  198. package/dist/translations/languages/he.js +48 -0
  199. package/dist/translations/languages/he.js.map +1 -0
  200. package/dist/translations/languages/hr.d.ts +4 -0
  201. package/dist/translations/languages/hr.d.ts.map +1 -0
  202. package/dist/translations/languages/hr.js +48 -0
  203. package/dist/translations/languages/hr.js.map +1 -0
  204. package/dist/translations/languages/hu.d.ts +4 -0
  205. package/dist/translations/languages/hu.d.ts.map +1 -0
  206. package/dist/translations/languages/hu.js +48 -0
  207. package/dist/translations/languages/hu.js.map +1 -0
  208. package/dist/translations/languages/hy.d.ts +4 -0
  209. package/dist/translations/languages/hy.d.ts.map +1 -0
  210. package/dist/translations/languages/hy.js +48 -0
  211. package/dist/translations/languages/hy.js.map +1 -0
  212. package/dist/translations/languages/id.d.ts +4 -0
  213. package/dist/translations/languages/id.d.ts.map +1 -0
  214. package/dist/translations/languages/id.js +48 -0
  215. package/dist/translations/languages/id.js.map +1 -0
  216. package/dist/translations/languages/is.d.ts +4 -0
  217. package/dist/translations/languages/is.d.ts.map +1 -0
  218. package/dist/translations/languages/is.js +48 -0
  219. package/dist/translations/languages/is.js.map +1 -0
  220. package/dist/translations/languages/it.d.ts +4 -0
  221. package/dist/translations/languages/it.d.ts.map +1 -0
  222. package/dist/translations/languages/it.js +48 -0
  223. package/dist/translations/languages/it.js.map +1 -0
  224. package/dist/translations/languages/ja.d.ts +4 -0
  225. package/dist/translations/languages/ja.d.ts.map +1 -0
  226. package/dist/translations/languages/ja.js +48 -0
  227. package/dist/translations/languages/ja.js.map +1 -0
  228. package/dist/translations/languages/ko.d.ts +4 -0
  229. package/dist/translations/languages/ko.d.ts.map +1 -0
  230. package/dist/translations/languages/ko.js +48 -0
  231. package/dist/translations/languages/ko.js.map +1 -0
  232. package/dist/translations/languages/lt.d.ts +4 -0
  233. package/dist/translations/languages/lt.d.ts.map +1 -0
  234. package/dist/translations/languages/lt.js +48 -0
  235. package/dist/translations/languages/lt.js.map +1 -0
  236. package/dist/translations/languages/lv.d.ts +4 -0
  237. package/dist/translations/languages/lv.d.ts.map +1 -0
  238. package/dist/translations/languages/lv.js +48 -0
  239. package/dist/translations/languages/lv.js.map +1 -0
  240. package/dist/translations/languages/my.d.ts +4 -0
  241. package/dist/translations/languages/my.d.ts.map +1 -0
  242. package/dist/translations/languages/my.js +48 -0
  243. package/dist/translations/languages/my.js.map +1 -0
  244. package/dist/translations/languages/nb.d.ts +4 -0
  245. package/dist/translations/languages/nb.d.ts.map +1 -0
  246. package/dist/translations/languages/nb.js +48 -0
  247. package/dist/translations/languages/nb.js.map +1 -0
  248. package/dist/translations/languages/nl.d.ts +4 -0
  249. package/dist/translations/languages/nl.d.ts.map +1 -0
  250. package/dist/translations/languages/nl.js +48 -0
  251. package/dist/translations/languages/nl.js.map +1 -0
  252. package/dist/translations/languages/pl.d.ts +4 -0
  253. package/dist/translations/languages/pl.d.ts.map +1 -0
  254. package/dist/translations/languages/pl.js +48 -0
  255. package/dist/translations/languages/pl.js.map +1 -0
  256. package/dist/translations/languages/pt.d.ts +4 -0
  257. package/dist/translations/languages/pt.d.ts.map +1 -0
  258. package/dist/translations/languages/pt.js +48 -0
  259. package/dist/translations/languages/pt.js.map +1 -0
  260. package/dist/translations/languages/ro.d.ts +4 -0
  261. package/dist/translations/languages/ro.d.ts.map +1 -0
  262. package/dist/translations/languages/ro.js +48 -0
  263. package/dist/translations/languages/ro.js.map +1 -0
  264. package/dist/translations/languages/rs.d.ts +4 -0
  265. package/dist/translations/languages/rs.d.ts.map +1 -0
  266. package/dist/translations/languages/rs.js +48 -0
  267. package/dist/translations/languages/rs.js.map +1 -0
  268. package/dist/translations/languages/rsLatin.d.ts +4 -0
  269. package/dist/translations/languages/rsLatin.d.ts.map +1 -0
  270. package/dist/translations/languages/rsLatin.js +48 -0
  271. package/dist/translations/languages/rsLatin.js.map +1 -0
  272. package/dist/translations/languages/ru.d.ts +4 -0
  273. package/dist/translations/languages/ru.d.ts.map +1 -0
  274. package/dist/translations/languages/ru.js +48 -0
  275. package/dist/translations/languages/ru.js.map +1 -0
  276. package/dist/translations/languages/sk.d.ts +4 -0
  277. package/dist/translations/languages/sk.d.ts.map +1 -0
  278. package/dist/translations/languages/sk.js +48 -0
  279. package/dist/translations/languages/sk.js.map +1 -0
  280. package/dist/translations/languages/sl.d.ts +4 -0
  281. package/dist/translations/languages/sl.d.ts.map +1 -0
  282. package/dist/translations/languages/sl.js +48 -0
  283. package/dist/translations/languages/sl.js.map +1 -0
  284. package/dist/translations/languages/sv.d.ts +4 -0
  285. package/dist/translations/languages/sv.d.ts.map +1 -0
  286. package/dist/translations/languages/sv.js +48 -0
  287. package/dist/translations/languages/sv.js.map +1 -0
  288. package/dist/translations/languages/ta.d.ts +4 -0
  289. package/dist/translations/languages/ta.d.ts.map +1 -0
  290. package/dist/translations/languages/ta.js +48 -0
  291. package/dist/translations/languages/ta.js.map +1 -0
  292. package/dist/translations/languages/th.d.ts +4 -0
  293. package/dist/translations/languages/th.d.ts.map +1 -0
  294. package/dist/translations/languages/th.js +48 -0
  295. package/dist/translations/languages/th.js.map +1 -0
  296. package/dist/translations/languages/tr.d.ts +4 -0
  297. package/dist/translations/languages/tr.d.ts.map +1 -0
  298. package/dist/translations/languages/tr.js +48 -0
  299. package/dist/translations/languages/tr.js.map +1 -0
  300. package/dist/translations/languages/translation-schema.json +114 -0
  301. package/dist/translations/languages/uk.d.ts +4 -0
  302. package/dist/translations/languages/uk.d.ts.map +1 -0
  303. package/dist/translations/languages/uk.js +48 -0
  304. package/dist/translations/languages/uk.js.map +1 -0
  305. package/dist/translations/languages/vi.d.ts +4 -0
  306. package/dist/translations/languages/vi.d.ts.map +1 -0
  307. package/dist/translations/languages/vi.js +48 -0
  308. package/dist/translations/languages/vi.js.map +1 -0
  309. package/dist/translations/languages/zh.d.ts +4 -0
  310. package/dist/translations/languages/zh.d.ts.map +1 -0
  311. package/dist/translations/languages/zh.js +48 -0
  312. package/dist/translations/languages/zh.js.map +1 -0
  313. package/dist/translations/languages/zhTw.d.ts +4 -0
  314. package/dist/translations/languages/zhTw.d.ts.map +1 -0
  315. package/dist/translations/languages/zhTw.js +48 -0
  316. package/dist/translations/languages/zhTw.js.map +1 -0
  317. package/dist/translations/types.d.ts +38 -0
  318. package/dist/translations/types.d.ts.map +1 -0
  319. package/dist/translations/types.js +3 -0
  320. package/dist/translations/types.js.map +1 -0
  321. package/dist/types.d.ts +221 -0
  322. package/dist/types.d.ts.map +1 -0
  323. package/dist/types.js +5 -0
  324. package/dist/types.js.map +1 -0
  325. package/dist/utilities/buildDisabledFieldRegex.d.ts +5 -0
  326. package/dist/utilities/buildDisabledFieldRegex.d.ts.map +1 -0
  327. package/dist/utilities/buildDisabledFieldRegex.js +12 -0
  328. package/dist/utilities/buildDisabledFieldRegex.js.map +1 -0
  329. package/dist/utilities/collectDisabledFieldPaths.d.ts +15 -0
  330. package/dist/utilities/collectDisabledFieldPaths.d.ts.map +1 -0
  331. package/dist/utilities/collectDisabledFieldPaths.js +61 -0
  332. package/dist/utilities/collectDisabledFieldPaths.js.map +1 -0
  333. package/dist/utilities/flattenObject.d.ts +11 -0
  334. package/dist/utilities/flattenObject.d.ts.map +1 -0
  335. package/dist/utilities/flattenObject.js +129 -0
  336. package/dist/utilities/flattenObject.js.map +1 -0
  337. package/dist/utilities/getExportFieldFunctions.d.ts +12 -0
  338. package/dist/utilities/getExportFieldFunctions.d.ts.map +1 -0
  339. package/dist/utilities/getExportFieldFunctions.js +102 -0
  340. package/dist/utilities/getExportFieldFunctions.js.map +1 -0
  341. package/dist/utilities/getFilename.d.ts +6 -0
  342. package/dist/utilities/getFilename.d.ts.map +1 -0
  343. package/dist/utilities/getFilename.js +13 -0
  344. package/dist/utilities/getFilename.js.map +1 -0
  345. package/dist/utilities/getFlattenedFieldKeys.d.ts +24 -0
  346. package/dist/utilities/getFlattenedFieldKeys.d.ts.map +1 -0
  347. package/dist/utilities/getFlattenedFieldKeys.js +95 -0
  348. package/dist/utilities/getFlattenedFieldKeys.js.map +1 -0
  349. package/dist/utilities/getImportFieldFunctions.d.ts +12 -0
  350. package/dist/utilities/getImportFieldFunctions.d.ts.map +1 -0
  351. package/dist/utilities/getImportFieldFunctions.js +130 -0
  352. package/dist/utilities/getImportFieldFunctions.js.map +1 -0
  353. package/dist/utilities/getPluginCollections.d.ts +39 -0
  354. package/dist/utilities/getPluginCollections.d.ts.map +1 -0
  355. package/dist/utilities/getPluginCollections.js +102 -0
  356. package/dist/utilities/getPluginCollections.js.map +1 -0
  357. package/dist/utilities/getSchemaColumns.d.ts +43 -0
  358. package/dist/utilities/getSchemaColumns.d.ts.map +1 -0
  359. package/dist/utilities/getSchemaColumns.js +163 -0
  360. package/dist/utilities/getSchemaColumns.js.map +1 -0
  361. package/dist/utilities/getSelect.d.ts +11 -0
  362. package/dist/utilities/getSelect.d.ts.map +1 -0
  363. package/dist/utilities/getSelect.js +27 -0
  364. package/dist/utilities/getSelect.js.map +1 -0
  365. package/dist/utilities/getvalueAtPath.d.ts +15 -0
  366. package/dist/utilities/getvalueAtPath.d.ts.map +1 -0
  367. package/dist/utilities/getvalueAtPath.js +49 -0
  368. package/dist/utilities/getvalueAtPath.js.map +1 -0
  369. package/dist/utilities/parseCSV.d.ts +11 -0
  370. package/dist/utilities/parseCSV.d.ts.map +1 -0
  371. package/dist/utilities/parseCSV.js +67 -0
  372. package/dist/utilities/parseCSV.js.map +1 -0
  373. package/dist/utilities/parseCSV.spec.js +169 -0
  374. package/dist/utilities/parseCSV.spec.js.map +1 -0
  375. package/dist/utilities/parseJSON.d.ts +11 -0
  376. package/dist/utilities/parseJSON.d.ts.map +1 -0
  377. package/dist/utilities/parseJSON.js +25 -0
  378. package/dist/utilities/parseJSON.js.map +1 -0
  379. package/dist/utilities/processRichTextField.d.ts +6 -0
  380. package/dist/utilities/processRichTextField.d.ts.map +1 -0
  381. package/dist/utilities/processRichTextField.js +45 -0
  382. package/dist/utilities/processRichTextField.js.map +1 -0
  383. package/dist/utilities/removeDisabledFields.d.ts +15 -0
  384. package/dist/utilities/removeDisabledFields.d.ts.map +1 -0
  385. package/dist/utilities/removeDisabledFields.js +66 -0
  386. package/dist/utilities/removeDisabledFields.js.map +1 -0
  387. package/dist/utilities/setNestedValue.d.ts +19 -0
  388. package/dist/utilities/setNestedValue.d.ts.map +1 -0
  389. package/dist/utilities/setNestedValue.js +55 -0
  390. package/dist/utilities/setNestedValue.js.map +1 -0
  391. package/dist/utilities/sortHelpers.d.ts +6 -0
  392. package/dist/utilities/sortHelpers.d.ts.map +1 -0
  393. package/dist/utilities/sortHelpers.js +14 -0
  394. package/dist/utilities/sortHelpers.js.map +1 -0
  395. package/dist/utilities/unflattenObject.d.ts +11 -0
  396. package/dist/utilities/unflattenObject.d.ts.map +1 -0
  397. package/dist/utilities/unflattenObject.js +431 -0
  398. package/dist/utilities/unflattenObject.js.map +1 -0
  399. package/dist/utilities/unflattenObject.spec.js +680 -0
  400. package/dist/utilities/unflattenObject.spec.js.map +1 -0
  401. package/dist/utilities/useBatchProcessor.d.ts +103 -0
  402. package/dist/utilities/useBatchProcessor.d.ts.map +1 -0
  403. package/dist/utilities/useBatchProcessor.js +88 -0
  404. package/dist/utilities/useBatchProcessor.js.map +1 -0
  405. package/dist/utilities/validateLimitValue.d.ts +3 -0
  406. package/dist/utilities/validateLimitValue.d.ts.map +1 -0
  407. package/dist/utilities/validateLimitValue.js +12 -0
  408. package/dist/utilities/validateLimitValue.js.map +1 -0
  409. package/license.md +22 -0
  410. package/package.json +90 -0
@@ -0,0 +1,680 @@
1
+ import { unflattenObject } from './unflattenObject.js';
2
+ import { describe, it, expect, vi } from 'vitest';
3
+ describe('unflattenObject', ()=>{
4
+ const mockReq = {
5
+ payload: {
6
+ logger: {
7
+ error: vi.fn()
8
+ }
9
+ }
10
+ };
11
+ describe('hasMany number fields', ()=>{
12
+ const fields = [
13
+ {
14
+ name: 'hasManyNumber',
15
+ type: 'number',
16
+ hasMany: true
17
+ }
18
+ ];
19
+ it('should handle comma-separated number strings', ()=>{
20
+ const data = {
21
+ hasManyNumber: '1,2,3,5,8'
22
+ };
23
+ const result = unflattenObject({
24
+ data,
25
+ fields,
26
+ req: mockReq
27
+ });
28
+ expect(result).toEqual({
29
+ hasManyNumber: [
30
+ 1,
31
+ 2,
32
+ 3,
33
+ 5,
34
+ 8
35
+ ]
36
+ });
37
+ });
38
+ it('should handle comma-separated numbers with spaces', ()=>{
39
+ const data = {
40
+ hasManyNumber: ' 10 , 20 , 30 '
41
+ };
42
+ const result = unflattenObject({
43
+ data,
44
+ fields,
45
+ req: mockReq
46
+ });
47
+ expect(result).toEqual({
48
+ hasManyNumber: [
49
+ 10,
50
+ 20,
51
+ 30
52
+ ]
53
+ });
54
+ });
55
+ it('should filter out empty values in comma-separated strings', ()=>{
56
+ const data = {
57
+ hasManyNumber: '1,,3,,5'
58
+ };
59
+ const result = unflattenObject({
60
+ data,
61
+ fields,
62
+ req: mockReq
63
+ });
64
+ expect(result).toEqual({
65
+ hasManyNumber: [
66
+ 1,
67
+ 3,
68
+ 5
69
+ ]
70
+ });
71
+ });
72
+ it('should handle single number values', ()=>{
73
+ const data = {
74
+ hasManyNumber: 42
75
+ };
76
+ const result = unflattenObject({
77
+ data,
78
+ fields,
79
+ req: mockReq
80
+ });
81
+ expect(result).toEqual({
82
+ hasManyNumber: [
83
+ 42
84
+ ]
85
+ });
86
+ });
87
+ it('should handle single string number values', ()=>{
88
+ const data = {
89
+ hasManyNumber: '42'
90
+ };
91
+ const result = unflattenObject({
92
+ data,
93
+ fields,
94
+ req: mockReq
95
+ });
96
+ expect(result).toEqual({
97
+ hasManyNumber: [
98
+ 42
99
+ ]
100
+ });
101
+ });
102
+ it('should handle indexed array format', ()=>{
103
+ const data = {
104
+ hasManyNumber_0: 1,
105
+ hasManyNumber_1: 2,
106
+ hasManyNumber_2: 3
107
+ };
108
+ const result = unflattenObject({
109
+ data,
110
+ fields,
111
+ req: mockReq
112
+ });
113
+ expect(result).toEqual({
114
+ hasManyNumber: [
115
+ 1,
116
+ 2,
117
+ 3
118
+ ]
119
+ });
120
+ });
121
+ it('should filter out null and empty values from indexed arrays', ()=>{
122
+ const data = {
123
+ hasManyNumber_0: 1,
124
+ hasManyNumber_1: null,
125
+ hasManyNumber_2: '',
126
+ hasManyNumber_3: 3
127
+ };
128
+ const result = unflattenObject({
129
+ data,
130
+ fields,
131
+ req: mockReq
132
+ });
133
+ expect(result).toEqual({
134
+ hasManyNumber: [
135
+ 1,
136
+ 3
137
+ ]
138
+ });
139
+ });
140
+ it('should handle empty, null, and undefined values', ()=>{
141
+ // explicit null gets converted to empty array in postProcess for hasMany
142
+ expect(unflattenObject({
143
+ data: {
144
+ hasManyNumber: null
145
+ },
146
+ fields,
147
+ req: mockReq
148
+ })).toEqual({
149
+ hasManyNumber: []
150
+ });
151
+ // undefined is skipped entirely (preserves existing data)
152
+ expect(unflattenObject({
153
+ data: {
154
+ hasManyNumber: undefined
155
+ },
156
+ fields,
157
+ req: mockReq
158
+ })).toEqual({});
159
+ });
160
+ });
161
+ describe('hasMany relationship fields', ()=>{
162
+ const fields = [
163
+ {
164
+ name: 'hasManyRelationship',
165
+ type: 'relationship',
166
+ hasMany: true,
167
+ relationTo: 'posts'
168
+ }
169
+ ];
170
+ it('should handle comma-separated ID strings', ()=>{
171
+ const data = {
172
+ hasManyRelationship: 'id1,id2,id3'
173
+ };
174
+ const result = unflattenObject({
175
+ data,
176
+ fields,
177
+ req: mockReq
178
+ });
179
+ expect(result).toEqual({
180
+ hasManyRelationship: [
181
+ 'id1',
182
+ 'id2',
183
+ 'id3'
184
+ ]
185
+ });
186
+ });
187
+ it('should handle comma-separated IDs with spaces', ()=>{
188
+ const data = {
189
+ hasManyRelationship: ' id1 , id2 , id3 '
190
+ };
191
+ const result = unflattenObject({
192
+ data,
193
+ fields,
194
+ req: mockReq
195
+ });
196
+ expect(result).toEqual({
197
+ hasManyRelationship: [
198
+ 'id1',
199
+ 'id2',
200
+ 'id3'
201
+ ]
202
+ });
203
+ });
204
+ it('should filter out empty values in comma-separated IDs', ()=>{
205
+ const data = {
206
+ hasManyRelationship: 'id1,,id3,,id5'
207
+ };
208
+ const result = unflattenObject({
209
+ data,
210
+ fields,
211
+ req: mockReq
212
+ });
213
+ expect(result).toEqual({
214
+ hasManyRelationship: [
215
+ 'id1',
216
+ 'id3',
217
+ 'id5'
218
+ ]
219
+ });
220
+ });
221
+ it('should handle single ID values', ()=>{
222
+ const data = {
223
+ hasManyRelationship: 'singleId'
224
+ };
225
+ const result = unflattenObject({
226
+ data,
227
+ fields,
228
+ req: mockReq
229
+ });
230
+ expect(result).toEqual({
231
+ hasManyRelationship: [
232
+ 'singleId'
233
+ ]
234
+ });
235
+ });
236
+ it('should handle indexed array format', ()=>{
237
+ const data = {
238
+ hasManyRelationship_0: 'id1',
239
+ hasManyRelationship_1: 'id2',
240
+ hasManyRelationship_2: 'id3'
241
+ };
242
+ const result = unflattenObject({
243
+ data,
244
+ fields,
245
+ req: mockReq
246
+ });
247
+ expect(result).toEqual({
248
+ hasManyRelationship: [
249
+ 'id1',
250
+ 'id2',
251
+ 'id3'
252
+ ]
253
+ });
254
+ });
255
+ it('should handle MongoDB ObjectIDs', ()=>{
256
+ const data = {
257
+ hasManyRelationship: '507f1f77bcf86cd799439011,507f191e810c19729de860ea'
258
+ };
259
+ const result = unflattenObject({
260
+ data,
261
+ fields,
262
+ req: mockReq
263
+ });
264
+ expect(result).toEqual({
265
+ hasManyRelationship: [
266
+ '507f1f77bcf86cd799439011',
267
+ '507f191e810c19729de860ea'
268
+ ]
269
+ });
270
+ });
271
+ });
272
+ describe('localized fields', ()=>{
273
+ const fields = [
274
+ {
275
+ name: 'title',
276
+ type: 'text',
277
+ localized: true
278
+ }
279
+ ];
280
+ it('should transform locale-specific keys to nested structure', ()=>{
281
+ const data = {
282
+ title_en: 'English Title',
283
+ title_es: 'Título en Español'
284
+ };
285
+ const result = unflattenObject({
286
+ data,
287
+ fields,
288
+ req: mockReq
289
+ });
290
+ expect(result).toEqual({
291
+ title: {
292
+ en: 'English Title',
293
+ es: 'Título en Español'
294
+ }
295
+ });
296
+ });
297
+ it('should handle missing locales', ()=>{
298
+ const data = {
299
+ title_en: 'English Title'
300
+ };
301
+ const result = unflattenObject({
302
+ data,
303
+ fields,
304
+ req: mockReq
305
+ });
306
+ expect(result).toEqual({
307
+ title: {
308
+ en: 'English Title'
309
+ }
310
+ });
311
+ });
312
+ });
313
+ describe('blocks fields', ()=>{
314
+ const fields = [
315
+ {
316
+ name: 'blocks',
317
+ type: 'blocks'
318
+ }
319
+ ];
320
+ it('should handle block fields with blockType', ()=>{
321
+ const data = {
322
+ blocks_0_hero_title: 'Hero Title',
323
+ blocks_0_hero_subtitle: 'Hero Subtitle',
324
+ blocks_0_hero_blockType: 'hero'
325
+ };
326
+ const result = unflattenObject({
327
+ data,
328
+ fields,
329
+ req: mockReq
330
+ });
331
+ expect(result).toEqual({
332
+ blocks: [
333
+ {
334
+ blockType: 'hero',
335
+ title: 'Hero Title',
336
+ subtitle: 'Hero Subtitle'
337
+ }
338
+ ]
339
+ });
340
+ });
341
+ it('should handle multiple blocks', ()=>{
342
+ const data = {
343
+ blocks_0_hero_title: 'Hero Title',
344
+ blocks_0_hero_blockType: 'hero',
345
+ blocks_1_text_content: 'Text Content',
346
+ blocks_1_text_blockType: 'text'
347
+ };
348
+ const result = unflattenObject({
349
+ data,
350
+ fields,
351
+ req: mockReq
352
+ });
353
+ expect(result).toEqual({
354
+ blocks: [
355
+ {
356
+ blockType: 'hero',
357
+ title: 'Hero Title'
358
+ },
359
+ {
360
+ blockType: 'text',
361
+ content: 'Text Content'
362
+ }
363
+ ]
364
+ });
365
+ });
366
+ });
367
+ describe('array fields', ()=>{
368
+ const fields = [
369
+ {
370
+ name: 'items',
371
+ type: 'array'
372
+ }
373
+ ];
374
+ it('should handle indexed array objects', ()=>{
375
+ const data = {
376
+ items_0_name: 'Item 1',
377
+ items_0_value: 10,
378
+ items_1_name: 'Item 2',
379
+ items_1_value: 20
380
+ };
381
+ const result = unflattenObject({
382
+ data,
383
+ fields,
384
+ req: mockReq
385
+ });
386
+ expect(result).toEqual({
387
+ items: [
388
+ {
389
+ name: 'Item 1',
390
+ value: 10
391
+ },
392
+ {
393
+ name: 'Item 2',
394
+ value: 20
395
+ }
396
+ ]
397
+ });
398
+ });
399
+ it('should handle sparse arrays', ()=>{
400
+ const data = {
401
+ items_0_name: 'Item 1',
402
+ items_2_name: 'Item 3'
403
+ };
404
+ const result = unflattenObject({
405
+ data,
406
+ fields,
407
+ req: mockReq
408
+ });
409
+ expect(result).toEqual({
410
+ items: [
411
+ {
412
+ name: 'Item 1'
413
+ },
414
+ null,
415
+ {
416
+ name: 'Item 3'
417
+ }
418
+ ]
419
+ });
420
+ });
421
+ });
422
+ describe('group fields', ()=>{
423
+ const fields = [
424
+ {
425
+ name: 'group',
426
+ type: 'group'
427
+ }
428
+ ];
429
+ it('should handle nested group fields', ()=>{
430
+ const data = {
431
+ group_field1: 'Value 1',
432
+ group_field2: 'Value 2'
433
+ };
434
+ const result = unflattenObject({
435
+ data,
436
+ fields,
437
+ req: mockReq
438
+ });
439
+ expect(result).toEqual({
440
+ group: {
441
+ field1: 'Value 1',
442
+ field2: 'Value 2'
443
+ }
444
+ });
445
+ });
446
+ });
447
+ describe('polymorphic relationships', ()=>{
448
+ const fields = [
449
+ {
450
+ name: 'polymorphic',
451
+ type: 'relationship',
452
+ relationTo: [
453
+ 'posts',
454
+ 'pages'
455
+ ]
456
+ }
457
+ ];
458
+ it('should handle polymorphic relationship with id and relationTo', ()=>{
459
+ const data = {
460
+ polymorphic_id: '123',
461
+ polymorphic_relationTo: 'posts'
462
+ };
463
+ const result = unflattenObject({
464
+ data,
465
+ fields,
466
+ req: mockReq
467
+ });
468
+ expect(result).toEqual({
469
+ polymorphic: {
470
+ relationTo: 'posts',
471
+ value: '123'
472
+ }
473
+ });
474
+ });
475
+ it('should handle explicitly null polymorphic relationships', ()=>{
476
+ const data = {
477
+ polymorphic_id: null,
478
+ polymorphic_relationTo: null
479
+ };
480
+ const result = unflattenObject({
481
+ data,
482
+ fields,
483
+ req: mockReq
484
+ });
485
+ expect(result).toEqual({
486
+ polymorphic: null
487
+ });
488
+ });
489
+ it('should skip polymorphic relationships with undefined values', ()=>{
490
+ const data = {
491
+ polymorphic_id: undefined,
492
+ polymorphic_relationTo: undefined
493
+ };
494
+ const result = unflattenObject({
495
+ data,
496
+ fields,
497
+ req: mockReq
498
+ });
499
+ // Both undefined means field is not set (preserves existing data)
500
+ expect(result).toEqual({});
501
+ });
502
+ it('should skip polymorphic relationship with undefined id', ()=>{
503
+ const data = {
504
+ polymorphic_id: undefined,
505
+ polymorphic_relationTo: 'posts'
506
+ };
507
+ const result = unflattenObject({
508
+ data,
509
+ fields,
510
+ req: mockReq
511
+ });
512
+ // Undefined ID means don't update this field
513
+ expect(result).toEqual({});
514
+ });
515
+ it('should skip polymorphic relationship with undefined relationTo', ()=>{
516
+ const data = {
517
+ polymorphic_id: '123',
518
+ polymorphic_relationTo: undefined
519
+ };
520
+ const result = unflattenObject({
521
+ data,
522
+ fields,
523
+ req: mockReq
524
+ });
525
+ // Undefined relationTo means don't update this field
526
+ expect(result).toEqual({});
527
+ });
528
+ it('should handle polymorphic hasMany relationships', ()=>{
529
+ const fields = [
530
+ {
531
+ name: 'polymorphicMany',
532
+ type: 'relationship',
533
+ hasMany: true,
534
+ relationTo: [
535
+ 'posts',
536
+ 'pages'
537
+ ]
538
+ }
539
+ ];
540
+ const data = {
541
+ polymorphicMany_0_id: '123',
542
+ polymorphicMany_0_relationTo: 'posts',
543
+ polymorphicMany_1_id: '456',
544
+ polymorphicMany_1_relationTo: 'pages'
545
+ };
546
+ const result = unflattenObject({
547
+ data,
548
+ fields,
549
+ req: mockReq
550
+ });
551
+ expect(result).toEqual({
552
+ polymorphicMany: [
553
+ {
554
+ relationTo: 'posts',
555
+ value: '123'
556
+ },
557
+ {
558
+ relationTo: 'pages',
559
+ value: '456'
560
+ }
561
+ ]
562
+ });
563
+ });
564
+ it('should filter out empty polymorphic hasMany items', ()=>{
565
+ const fields = [
566
+ {
567
+ name: 'polymorphicMany',
568
+ type: 'relationship',
569
+ hasMany: true,
570
+ relationTo: [
571
+ 'posts',
572
+ 'pages'
573
+ ]
574
+ }
575
+ ];
576
+ const data = {
577
+ polymorphicMany_0_id: '123',
578
+ polymorphicMany_0_relationTo: 'posts',
579
+ polymorphicMany_1_id: null,
580
+ polymorphicMany_1_relationTo: null,
581
+ polymorphicMany_2_id: '456',
582
+ polymorphicMany_2_relationTo: 'pages'
583
+ };
584
+ const result = unflattenObject({
585
+ data,
586
+ fields,
587
+ req: mockReq
588
+ });
589
+ expect(result).toEqual({
590
+ polymorphicMany: [
591
+ {
592
+ relationTo: 'posts',
593
+ value: '123'
594
+ },
595
+ {
596
+ relationTo: 'pages',
597
+ value: '456'
598
+ }
599
+ ]
600
+ });
601
+ });
602
+ it('should handle all empty polymorphic hasMany items', ()=>{
603
+ const fields = [
604
+ {
605
+ name: 'polymorphicMany',
606
+ type: 'relationship',
607
+ hasMany: true,
608
+ relationTo: [
609
+ 'posts',
610
+ 'pages'
611
+ ]
612
+ }
613
+ ];
614
+ const data = {
615
+ polymorphicMany_0_id: null,
616
+ polymorphicMany_0_relationTo: null,
617
+ polymorphicMany_1_id: '',
618
+ polymorphicMany_1_relationTo: ''
619
+ };
620
+ const result = unflattenObject({
621
+ data,
622
+ fields,
623
+ req: mockReq
624
+ });
625
+ expect(result).toEqual({
626
+ polymorphicMany: []
627
+ });
628
+ });
629
+ });
630
+ describe('edge cases', ()=>{
631
+ it('should handle empty data', ()=>{
632
+ const result = unflattenObject({
633
+ data: {},
634
+ fields: [],
635
+ req: mockReq
636
+ });
637
+ expect(result).toEqual({});
638
+ });
639
+ it('should handle null data', ()=>{
640
+ const result = unflattenObject({
641
+ data: null,
642
+ fields: [],
643
+ req: mockReq
644
+ });
645
+ expect(result).toEqual({});
646
+ });
647
+ it('should handle undefined values', ()=>{
648
+ const data = {
649
+ field1: undefined,
650
+ field2: 'value'
651
+ };
652
+ const result = unflattenObject({
653
+ data,
654
+ fields: [],
655
+ req: mockReq
656
+ });
657
+ expect(result).toEqual({
658
+ field2: 'value'
659
+ });
660
+ });
661
+ it('should preserve null values for validation', ()=>{
662
+ const data = {
663
+ field1: null,
664
+ field2: 'value'
665
+ };
666
+ const result = unflattenObject({
667
+ data,
668
+ fields: [],
669
+ req: mockReq
670
+ });
671
+ // null values are preserved for validation
672
+ expect(result).toEqual({
673
+ field1: null,
674
+ field2: 'value'
675
+ });
676
+ });
677
+ });
678
+ });
679
+
680
+ //# sourceMappingURL=unflattenObject.spec.js.map