@websolutespa/payload-plugin-bowl 2.0.1 → 3.0.1

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 (455) hide show
  1. package/CHANGELOG.md +23 -4
  2. package/README.md +1 -1
  3. package/dist/blocks/MenuItem.js +219 -0
  4. package/dist/blocks/MenuItem.js.map +1 -0
  5. package/dist/blocks/index.js +4 -0
  6. package/dist/blocks/index.js.map +1 -0
  7. package/dist/blocks/withComponentBlock.js +31 -0
  8. package/dist/blocks/withComponentBlock.js.map +1 -0
  9. package/dist/bowl.js +331 -0
  10. package/dist/bowl.js.map +1 -0
  11. package/dist/collections/Address.js +7 -0
  12. package/dist/collections/Address.js.map +1 -0
  13. package/dist/collections/Category.js +94 -0
  14. package/dist/collections/Category.js.map +1 -0
  15. package/dist/collections/ConsentPreference.js +34 -0
  16. package/dist/collections/ConsentPreference.js.map +1 -0
  17. package/dist/collections/Continent.js +24 -0
  18. package/dist/collections/Continent.js.map +1 -0
  19. package/dist/collections/Country.js +66 -0
  20. package/dist/collections/Country.js.map +1 -0
  21. package/dist/collections/CountryZone.js +24 -0
  22. package/dist/collections/CountryZone.js.map +1 -0
  23. package/dist/collections/EmailConfig.js +84 -0
  24. package/dist/collections/EmailConfig.js.map +1 -0
  25. package/dist/collections/EndUsers.js +24 -0
  26. package/dist/collections/EndUsers.js.map +1 -0
  27. package/dist/collections/Label.js +26 -0
  28. package/dist/collections/Label.js.map +1 -0
  29. package/dist/collections/Language.js +35 -0
  30. package/dist/collections/Language.js.map +1 -0
  31. package/dist/collections/LegalNotice.js +29 -0
  32. package/dist/collections/LegalNotice.js.map +1 -0
  33. package/dist/collections/Market.js +106 -0
  34. package/dist/collections/Market.js.map +1 -0
  35. package/dist/collections/Media.js +40 -0
  36. package/dist/collections/Media.js.map +1 -0
  37. package/dist/collections/Menu.js +49 -0
  38. package/dist/collections/Menu.js.map +1 -0
  39. package/dist/collections/Municipality.js +68 -0
  40. package/dist/collections/Municipality.js.map +1 -0
  41. package/dist/collections/Province.js +59 -0
  42. package/dist/collections/Province.js.map +1 -0
  43. package/dist/collections/Redirect.js +90 -0
  44. package/dist/collections/Redirect.js.map +1 -0
  45. package/dist/collections/Region.js +45 -0
  46. package/dist/collections/Region.js.map +1 -0
  47. package/dist/collections/SubContinent.js +36 -0
  48. package/dist/collections/SubContinent.js.map +1 -0
  49. package/dist/collections/Template.js +79 -0
  50. package/dist/collections/Template.js.map +1 -0
  51. package/dist/collections/Users.js +11 -0
  52. package/dist/collections/Users.js.map +1 -0
  53. package/dist/components/Category/CategoryMenu.js +47 -0
  54. package/dist/components/Category/CategoryMenu.js.map +1 -0
  55. package/dist/components/Category/CategoryTree.js +430 -0
  56. package/dist/components/Category/CategoryTree.js.map +1 -0
  57. package/dist/components/Category/CategoryTree.scss +330 -0
  58. package/dist/components/Category/CategoryTreeRoute.js +51 -0
  59. package/dist/components/Category/CategoryTreeRoute.js.map +1 -0
  60. package/dist/components/Category/category.service.js +32 -0
  61. package/dist/components/Category/category.service.js.map +1 -0
  62. package/dist/components/DataTree/DataTree.js +281 -0
  63. package/dist/components/DataTree/DataTree.js.map +1 -0
  64. package/dist/components/DataTree/DataTree.scss +363 -0
  65. package/dist/components/DataTree/DataTreeProvider.js +67 -0
  66. package/dist/components/DataTree/DataTreeProvider.js.map +1 -0
  67. package/dist/components/DataTree/EventEmitter.js +38 -0
  68. package/dist/components/DataTree/EventEmitter.js.map +1 -0
  69. package/dist/components/DataTree/useDataTree.js +52 -0
  70. package/dist/components/DataTree/useDataTree.js.map +1 -0
  71. package/dist/components/DecoratedList/DecoratedList.js +17 -0
  72. package/dist/components/DecoratedList/DecoratedList.js.map +1 -0
  73. package/dist/components/IconServer/IconServer.js +15 -0
  74. package/dist/components/IconServer/IconServer.js.map +1 -0
  75. package/dist/components/IconServer/IconServer.scss +14 -0
  76. package/dist/components/ImportExport/ImportExportList.js +91 -0
  77. package/dist/components/ImportExport/ImportExportList.js.map +1 -0
  78. package/dist/components/ImportExport/ImportExportList.scss +70 -0
  79. package/dist/components/ImportExport/ImportExportRedirect.js +142 -0
  80. package/dist/components/ImportExport/ImportExportRedirect.js.map +1 -0
  81. package/dist/components/ImportExport/ImportModal.js +458 -0
  82. package/dist/components/ImportExport/ImportModal.js.map +1 -0
  83. package/dist/components/ImportExport/ImportModal.scss +99 -0
  84. package/dist/components/ImportExport/types.js +3 -0
  85. package/dist/components/ImportExport/types.js.map +1 -0
  86. package/dist/components/LeaveWithoutSaving/LeaveWithoutSaving.js +83 -0
  87. package/dist/components/LeaveWithoutSaving/LeaveWithoutSaving.js.map +1 -0
  88. package/dist/components/LeaveWithoutSaving/LeaveWithoutSaving.scss +46 -0
  89. package/dist/components/LeaveWithoutSaving/usePreventLeave.js +119 -0
  90. package/dist/components/LeaveWithoutSaving/usePreventLeave.js.map +1 -0
  91. package/dist/components/LocalizedDescription/LocalizedDescriptionClient.js +15 -0
  92. package/dist/components/LocalizedDescription/LocalizedDescriptionClient.js.map +1 -0
  93. package/dist/components/LocalizedDescription/LocalizedDescriptionServer.js +13 -0
  94. package/dist/components/LocalizedDescription/LocalizedDescriptionServer.js.map +1 -0
  95. package/dist/components/LogoServer/LogoServer.js +20 -0
  96. package/dist/components/LogoServer/LogoServer.js.map +1 -0
  97. package/dist/components/LogoServer/LogoServer.scss +21 -0
  98. package/dist/core/access/access.js +181 -0
  99. package/dist/core/access/access.js.map +1 -0
  100. package/dist/core/access/access.test.js +454 -0
  101. package/dist/core/access/access.test.js.map +1 -0
  102. package/dist/core/access/index.js +3 -0
  103. package/dist/core/access/index.js.map +1 -0
  104. package/dist/core/api/action.service.js +441 -0
  105. package/dist/core/api/action.service.js.map +1 -0
  106. package/dist/core/api/action.service.test.js +218 -0
  107. package/dist/core/api/action.service.test.js.map +1 -0
  108. package/dist/core/api/cache.service.js +33 -0
  109. package/dist/core/api/cache.service.js.map +1 -0
  110. package/dist/core/api/cache.service.test.js +33 -0
  111. package/dist/core/api/cache.service.test.js.map +1 -0
  112. package/dist/core/api/category.service.js +53 -0
  113. package/dist/core/api/category.service.js.map +1 -0
  114. package/dist/core/api/collection.service.js +457 -0
  115. package/dist/core/api/collection.service.js.map +1 -0
  116. package/dist/core/api/collection.service.test.js +318 -0
  117. package/dist/core/api/collection.service.test.js.map +1 -0
  118. package/dist/core/api/email.service.js +84 -0
  119. package/dist/core/api/email.service.js.map +1 -0
  120. package/dist/core/api/global.service.js +18 -0
  121. package/dist/core/api/global.service.js.map +1 -0
  122. package/dist/core/api/health.service.js +12 -0
  123. package/dist/core/api/health.service.js.map +1 -0
  124. package/dist/core/api/index.js +16 -0
  125. package/dist/core/api/index.js.map +1 -0
  126. package/dist/core/api/locale.service.js +58 -0
  127. package/dist/core/api/locale.service.js.map +1 -0
  128. package/dist/core/api/locale.service.test.js +46 -0
  129. package/dist/core/api/locale.service.test.js.map +1 -0
  130. package/dist/core/api/menu.service.js +81 -0
  131. package/dist/core/api/menu.service.js.map +1 -0
  132. package/dist/core/api/menu.service.test.js +300 -0
  133. package/dist/core/api/menu.service.test.js.map +1 -0
  134. package/dist/core/api/page.service.js +171 -0
  135. package/dist/core/api/page.service.js.map +1 -0
  136. package/dist/core/api/page.service.test.js +68 -0
  137. package/dist/core/api/page.service.test.js.map +1 -0
  138. package/dist/core/api/pagination.service.js +29 -0
  139. package/dist/core/api/pagination.service.js.map +1 -0
  140. package/dist/core/api/pagination.service.test.js +175 -0
  141. package/dist/core/api/pagination.service.test.js.map +1 -0
  142. package/dist/core/api/redirect.service.js +106 -0
  143. package/dist/core/api/redirect.service.js.map +1 -0
  144. package/dist/core/api/redirect.service.test.js +106 -0
  145. package/dist/core/api/redirect.service.test.js.map +1 -0
  146. package/dist/core/api/route.service.js +451 -0
  147. package/dist/core/api/route.service.js.map +1 -0
  148. package/dist/core/api/route.service.test.js +214 -0
  149. package/dist/core/api/route.service.test.js.map +1 -0
  150. package/dist/core/api/static.service.js +249 -0
  151. package/dist/core/api/static.service.js.map +1 -0
  152. package/dist/core/api/static.service.test.js +240 -0
  153. package/dist/core/api/static.service.test.js.map +1 -0
  154. package/dist/core/api/store.service.js +336 -0
  155. package/dist/core/api/store.service.js.map +1 -0
  156. package/dist/core/api/store.service.test.js +105 -0
  157. package/dist/core/api/store.service.test.js.map +1 -0
  158. package/dist/core/api/types.js +21 -0
  159. package/dist/core/api/types.js.map +1 -0
  160. package/dist/core/api/utils.js +83 -0
  161. package/dist/core/api/utils.js.map +1 -0
  162. package/dist/core/api/where.service.js +231 -0
  163. package/dist/core/api/where.service.js.map +1 -0
  164. package/dist/core/collections/index.js +12 -0
  165. package/dist/core/collections/index.js.map +1 -0
  166. package/dist/core/collections/withAction.js +91 -0
  167. package/dist/core/collections/withAction.js.map +1 -0
  168. package/dist/core/collections/withAction.test.js +68 -0
  169. package/dist/core/collections/withAction.test.js.map +1 -0
  170. package/dist/core/collections/withAddress.js +122 -0
  171. package/dist/core/collections/withAddress.js.map +1 -0
  172. package/dist/core/collections/withBlock.js +17 -0
  173. package/dist/core/collections/withBlock.js.map +1 -0
  174. package/dist/core/collections/withBlock.test.js +68 -0
  175. package/dist/core/collections/withBlock.test.js.map +1 -0
  176. package/dist/core/collections/withCollection.js +61 -0
  177. package/dist/core/collections/withCollection.js.map +1 -0
  178. package/dist/core/collections/withCollection.test.js +64 -0
  179. package/dist/core/collections/withCollection.test.js.map +1 -0
  180. package/dist/core/collections/withEndUser.js +301 -0
  181. package/dist/core/collections/withEndUser.js.map +1 -0
  182. package/dist/core/collections/withGlobal.js +27 -0
  183. package/dist/core/collections/withGlobal.js.map +1 -0
  184. package/dist/core/collections/withGlobal.test.js +57 -0
  185. package/dist/core/collections/withGlobal.test.js.map +1 -0
  186. package/dist/core/collections/withMenu.js +19 -0
  187. package/dist/core/collections/withMenu.js.map +1 -0
  188. package/dist/core/collections/withMenu.test.js +63 -0
  189. package/dist/core/collections/withMenu.test.js.map +1 -0
  190. package/dist/core/collections/withPage.js +126 -0
  191. package/dist/core/collections/withPage.js.map +1 -0
  192. package/dist/core/collections/withPage.test.js +103 -0
  193. package/dist/core/collections/withPage.test.js.map +1 -0
  194. package/dist/core/collections/withStaticCollection.js +60 -0
  195. package/dist/core/collections/withStaticCollection.js.map +1 -0
  196. package/dist/core/collections/withStaticCollection.test.js +84 -0
  197. package/dist/core/collections/withStaticCollection.test.js.map +1 -0
  198. package/dist/core/collections/withUser.js +56 -0
  199. package/dist/core/collections/withUser.js.map +1 -0
  200. package/dist/core/decorators/category.js +28 -0
  201. package/dist/core/decorators/category.js.map +1 -0
  202. package/dist/core/decorators/components.js +9 -0
  203. package/dist/core/decorators/components.js.map +1 -0
  204. package/dist/core/decorators/href.js +25 -0
  205. package/dist/core/decorators/href.js.map +1 -0
  206. package/dist/core/decorators/index.js +11 -0
  207. package/dist/core/decorators/index.js.map +1 -0
  208. package/dist/core/decorators/localize.js +27 -0
  209. package/dist/core/decorators/localize.js.map +1 -0
  210. package/dist/core/decorators/menu.js +246 -0
  211. package/dist/core/decorators/menu.js.map +1 -0
  212. package/dist/core/decorators/nav.js +42 -0
  213. package/dist/core/decorators/nav.js.map +1 -0
  214. package/dist/core/decorators/rich-text.js +39 -0
  215. package/dist/core/decorators/rich-text.js.map +1 -0
  216. package/dist/core/decorators/schema.js +16 -0
  217. package/dist/core/decorators/schema.js.map +1 -0
  218. package/dist/core/decorators/upload.js +44 -0
  219. package/dist/core/decorators/upload.js.map +1 -0
  220. package/dist/core/encryption/encryption.js +66 -0
  221. package/dist/core/encryption/encryption.js.map +1 -0
  222. package/dist/core/encryption/index.js +3 -0
  223. package/dist/core/encryption/index.js.map +1 -0
  224. package/dist/core/fields/index.js +28 -0
  225. package/dist/core/fields/index.js.map +1 -0
  226. package/dist/core/fields/withAbstract.js +15 -0
  227. package/dist/core/fields/withAbstract.js.map +1 -0
  228. package/dist/core/fields/withAbstract.test.js +72 -0
  229. package/dist/core/fields/withAbstract.test.js.map +1 -0
  230. package/dist/core/fields/withAnchor.js +56 -0
  231. package/dist/core/fields/withAnchor.js.map +1 -0
  232. package/dist/core/fields/withCategory.js +21 -0
  233. package/dist/core/fields/withCategory.js.map +1 -0
  234. package/dist/core/fields/withCategory.test.js +63 -0
  235. package/dist/core/fields/withCategory.test.js.map +1 -0
  236. package/dist/core/fields/withCheckbox.js +19 -0
  237. package/dist/core/fields/withCheckbox.js.map +1 -0
  238. package/dist/core/fields/withCheckbox.test.js +59 -0
  239. package/dist/core/fields/withCheckbox.test.js.map +1 -0
  240. package/dist/core/fields/withComponents.js +17 -0
  241. package/dist/core/fields/withComponents.js.map +1 -0
  242. package/dist/core/fields/withComponents.test.js +62 -0
  243. package/dist/core/fields/withComponents.test.js.map +1 -0
  244. package/dist/core/fields/withDate.js +18 -0
  245. package/dist/core/fields/withDate.js.map +1 -0
  246. package/dist/core/fields/withDate.test.js +56 -0
  247. package/dist/core/fields/withDate.test.js.map +1 -0
  248. package/dist/core/fields/withDescription.js +15 -0
  249. package/dist/core/fields/withDescription.js.map +1 -0
  250. package/dist/core/fields/withDescription.test.js +72 -0
  251. package/dist/core/fields/withDescription.test.js.map +1 -0
  252. package/dist/core/fields/withId.js +19 -0
  253. package/dist/core/fields/withId.js.map +1 -0
  254. package/dist/core/fields/withId.test.js +61 -0
  255. package/dist/core/fields/withId.test.js.map +1 -0
  256. package/dist/core/fields/withIsActive.js +15 -0
  257. package/dist/core/fields/withIsActive.js.map +1 -0
  258. package/dist/core/fields/withIsActive.test.js +59 -0
  259. package/dist/core/fields/withIsActive.test.js.map +1 -0
  260. package/dist/core/fields/withIsDefault.js +15 -0
  261. package/dist/core/fields/withIsDefault.js.map +1 -0
  262. package/dist/core/fields/withIsDefault.test.js +59 -0
  263. package/dist/core/fields/withIsDefault.test.js.map +1 -0
  264. package/dist/core/fields/withLink.js +116 -0
  265. package/dist/core/fields/withLink.js.map +1 -0
  266. package/dist/core/fields/withLink.test.js +144 -0
  267. package/dist/core/fields/withLink.test.js.map +1 -0
  268. package/dist/core/fields/withMarkets.js +21 -0
  269. package/dist/core/fields/withMarkets.js.map +1 -0
  270. package/dist/core/fields/withMarkets.test.js +65 -0
  271. package/dist/core/fields/withMarkets.test.js.map +1 -0
  272. package/dist/core/fields/withMedia.js +20 -0
  273. package/dist/core/fields/withMedia.js.map +1 -0
  274. package/dist/core/fields/withMedia.test.js +41 -0
  275. package/dist/core/fields/withMedia.test.js.map +1 -0
  276. package/dist/core/fields/withMedias.js +25 -0
  277. package/dist/core/fields/withMedias.js.map +1 -0
  278. package/dist/core/fields/withMedias.test.js +46 -0
  279. package/dist/core/fields/withMedias.test.js.map +1 -0
  280. package/dist/core/fields/withName.js +17 -0
  281. package/dist/core/fields/withName.js.map +1 -0
  282. package/dist/core/fields/withName.test.js +59 -0
  283. package/dist/core/fields/withName.test.js.map +1 -0
  284. package/dist/core/fields/withNav.js +28 -0
  285. package/dist/core/fields/withNav.js.map +1 -0
  286. package/dist/core/fields/withNavs.js +53 -0
  287. package/dist/core/fields/withNavs.js.map +1 -0
  288. package/dist/core/fields/withOrder.js +80 -0
  289. package/dist/core/fields/withOrder.js.map +1 -0
  290. package/dist/core/fields/withOrder.test.js +56 -0
  291. package/dist/core/fields/withOrder.test.js.map +1 -0
  292. package/dist/core/fields/withRelated.js +18 -0
  293. package/dist/core/fields/withRelated.js.map +1 -0
  294. package/dist/core/fields/withRelated.test.js +62 -0
  295. package/dist/core/fields/withRelated.test.js.map +1 -0
  296. package/dist/core/fields/withRichText.js +68 -0
  297. package/dist/core/fields/withRichText.js.map +1 -0
  298. package/dist/core/fields/withRichText.test.js +72 -0
  299. package/dist/core/fields/withRichText.test.js.map +1 -0
  300. package/dist/core/fields/withRoles.js +27 -0
  301. package/dist/core/fields/withRoles.js.map +1 -0
  302. package/dist/core/fields/withRoles.test.js +49 -0
  303. package/dist/core/fields/withRoles.test.js.map +1 -0
  304. package/dist/core/fields/withSelect.js +23 -0
  305. package/dist/core/fields/withSelect.js.map +1 -0
  306. package/dist/core/fields/withSelect.test.js +59 -0
  307. package/dist/core/fields/withSelect.test.js.map +1 -0
  308. package/dist/core/fields/withSeoWeight.js +19 -0
  309. package/dist/core/fields/withSeoWeight.js.map +1 -0
  310. package/dist/core/fields/withSlug.js +33 -0
  311. package/dist/core/fields/withSlug.js.map +1 -0
  312. package/dist/core/fields/withSlug.test.js +71 -0
  313. package/dist/core/fields/withSlug.test.js.map +1 -0
  314. package/dist/core/fields/withTemplate.js +49 -0
  315. package/dist/core/fields/withTemplate.js.map +1 -0
  316. package/dist/core/fields/withTemplate.test.js +93 -0
  317. package/dist/core/fields/withTemplate.test.js.map +1 -0
  318. package/dist/core/fields/withTenants.js +21 -0
  319. package/dist/core/fields/withTenants.js.map +1 -0
  320. package/dist/core/fields/withTenants.test.js +42 -0
  321. package/dist/core/fields/withTenants.test.js.map +1 -0
  322. package/dist/core/fields/withText.js +18 -0
  323. package/dist/core/fields/withText.js.map +1 -0
  324. package/dist/core/fields/withText.test.js +56 -0
  325. package/dist/core/fields/withText.test.js.map +1 -0
  326. package/dist/core/fields/withTitle.js +17 -0
  327. package/dist/core/fields/withTitle.js.map +1 -0
  328. package/dist/core/fields/withTitle.test.js +58 -0
  329. package/dist/core/fields/withTitle.test.js.map +1 -0
  330. package/dist/core/index.js +11 -0
  331. package/dist/core/index.js.map +1 -0
  332. package/dist/core/logger/index.js +3 -0
  333. package/dist/core/logger/index.js.map +1 -0
  334. package/dist/core/logger/logger.js +9 -0
  335. package/dist/core/logger/logger.js.map +1 -0
  336. package/dist/core/translations/index.js +3 -0
  337. package/dist/core/translations/index.js.map +1 -0
  338. package/dist/core/translations/translations.js +137 -0
  339. package/dist/core/translations/translations.js.map +1 -0
  340. package/dist/core/translations/translations.test.js +72 -0
  341. package/dist/core/translations/translations.test.js.map +1 -0
  342. package/dist/core/utils/findByIDHandler.js +28 -0
  343. package/dist/core/utils/findByIDHandler.js.map +1 -0
  344. package/dist/core/utils/findHandler.js +31 -0
  345. package/dist/core/utils/findHandler.js.map +1 -0
  346. package/dist/core/utils/getPreviewURL.js +45 -0
  347. package/dist/core/utils/getPreviewURL.js.map +1 -0
  348. package/dist/core/utils/getRequestCollection.js +49 -0
  349. package/dist/core/utils/getRequestCollection.js.map +1 -0
  350. package/dist/core/utils/index.js +7 -0
  351. package/dist/core/utils/index.js.map +1 -0
  352. package/dist/core/utils/mergeCollections.js +18 -0
  353. package/dist/core/utils/mergeCollections.js.map +1 -0
  354. package/dist/core/utils/mergeFields.js +20 -0
  355. package/dist/core/utils/mergeFields.js.map +1 -0
  356. package/dist/core/utils/mergeGlobals.js +17 -0
  357. package/dist/core/utils/mergeGlobals.js.map +1 -0
  358. package/dist/core/utils/richText.js +29 -0
  359. package/dist/core/utils/richText.js.map +1 -0
  360. package/dist/core/utils/sortByGroup.js +36 -0
  361. package/dist/core/utils/sortByGroup.js.map +1 -0
  362. package/dist/debug.js +25 -0
  363. package/dist/debug.js.map +1 -0
  364. package/dist/declaration.d.js +3 -0
  365. package/dist/declaration.d.js.map +1 -0
  366. package/dist/exports/client.d.ts +36 -0
  367. package/dist/exports/client.d.ts.map +1 -0
  368. package/dist/exports/client.js +8 -0
  369. package/dist/exports/client.js.map +1 -0
  370. package/dist/exports/rsc.d.ts +18 -0
  371. package/dist/exports/rsc.d.ts.map +1 -0
  372. package/dist/exports/rsc.js +5 -0
  373. package/dist/exports/rsc.js.map +1 -0
  374. package/dist/fields/color-picker/ColorCell.js +19 -0
  375. package/dist/fields/color-picker/ColorCell.js.map +1 -0
  376. package/dist/fields/color-picker/ColorField.js +131 -0
  377. package/dist/fields/color-picker/ColorField.js.map +1 -0
  378. package/dist/fields/color-picker/index.js +26 -0
  379. package/dist/fields/color-picker/index.js.map +1 -0
  380. package/dist/fields/color-picker/styles.scss +113 -0
  381. package/dist/fields/color-picker/utils.js +6 -0
  382. package/dist/fields/color-picker/utils.js.map +1 -0
  383. package/dist/fields/index.js +3 -0
  384. package/dist/fields/index.js.map +1 -0
  385. package/dist/globals/App.js +97 -0
  386. package/dist/globals/App.js.map +1 -0
  387. package/dist/globals/Locale.js +82 -0
  388. package/dist/globals/Locale.js.map +1 -0
  389. package/dist/globals/LocaleRowLabel.js +16 -0
  390. package/dist/globals/LocaleRowLabel.js.map +1 -0
  391. package/dist/index.d.ts +891 -844
  392. package/dist/index.d.ts.map +1 -0
  393. package/dist/index.js +11 -9263
  394. package/dist/index.js.map +1 -0
  395. package/dist/mapper.js +199 -0
  396. package/dist/mapper.js.map +1 -0
  397. package/dist/options.js +76 -0
  398. package/dist/options.js.map +1 -0
  399. package/dist/test/blocks/blocks.js +13 -0
  400. package/dist/test/blocks/blocks.js.map +1 -0
  401. package/dist/test/collections/ActionCollection.js +12 -0
  402. package/dist/test/collections/ActionCollection.js.map +1 -0
  403. package/dist/test/collections/AdminCollection.js +18 -0
  404. package/dist/test/collections/AdminCollection.js.map +1 -0
  405. package/dist/test/collections/BlockCollection.js +16 -0
  406. package/dist/test/collections/BlockCollection.js.map +1 -0
  407. package/dist/test/collections/Collection.js +12 -0
  408. package/dist/test/collections/Collection.js.map +1 -0
  409. package/dist/test/collections/FieldCollection.js +84 -0
  410. package/dist/test/collections/FieldCollection.js.map +1 -0
  411. package/dist/test/collections/GlobalCollection.js +12 -0
  412. package/dist/test/collections/GlobalCollection.js.map +1 -0
  413. package/dist/test/collections/LinkCollection.js +12 -0
  414. package/dist/test/collections/LinkCollection.js.map +1 -0
  415. package/dist/test/collections/MenuCollection.js +12 -0
  416. package/dist/test/collections/MenuCollection.js.map +1 -0
  417. package/dist/test/collections/PageCollection.js +12 -0
  418. package/dist/test/collections/PageCollection.js.map +1 -0
  419. package/dist/test/collections/RoleCollection.js +19 -0
  420. package/dist/test/collections/RoleCollection.js.map +1 -0
  421. package/dist/test/collections/RoleFieldCollection.js +40 -0
  422. package/dist/test/collections/RoleFieldCollection.js.map +1 -0
  423. package/dist/test/collections/StaticCollection.js +56 -0
  424. package/dist/test/collections/StaticCollection.js.map +1 -0
  425. package/dist/test/collections/StorePageCollection.js +12 -0
  426. package/dist/test/collections/StorePageCollection.js.map +1 -0
  427. package/dist/test/collections/TenantCollection.js +22 -0
  428. package/dist/test/collections/TenantCollection.js.map +1 -0
  429. package/dist/test/collections/TranslationCollection.js +16 -0
  430. package/dist/test/collections/TranslationCollection.js.map +1 -0
  431. package/dist/test/collections/TypeACollection.js +18 -0
  432. package/dist/test/collections/TypeACollection.js.map +1 -0
  433. package/dist/test/collections/TypeBCollection.js +18 -0
  434. package/dist/test/collections/TypeBCollection.js.map +1 -0
  435. package/dist/test/collections/actions/NewsletterAction.js +29 -0
  436. package/dist/test/collections/actions/NewsletterAction.js.map +1 -0
  437. package/dist/test/collections/actions/RegisterAction.js +44 -0
  438. package/dist/test/collections/actions/RegisterAction.js.map +1 -0
  439. package/dist/test/collections/users/EndUsers.js +40 -0
  440. package/dist/test/collections/users/EndUsers.js.map +1 -0
  441. package/dist/test/collections/users/Users.js +20 -0
  442. package/dist/test/collections/users/Users.js.map +1 -0
  443. package/dist/test/index.js +32 -0
  444. package/dist/test/index.js.map +1 -0
  445. package/dist/test/payload.config.js +106 -0
  446. package/dist/test/payload.config.js.map +1 -0
  447. package/dist/test/utils.js +52 -0
  448. package/dist/test/utils.js.map +1 -0
  449. package/dist/translations.js +467 -0
  450. package/dist/translations.js.map +1 -0
  451. package/dist/types.js +31 -0
  452. package/dist/types.js.map +1 -0
  453. package/package.json +119 -37
  454. package/scss/styles.scss +0 -1
  455. package/dist/index.css +0 -796
package/dist/index.d.ts CHANGED
@@ -1,254 +1,139 @@
1
- import { Resource } from 'i18next';
2
- import { Endpoint, AdminView, Locale as Locale$1, Config } from 'payload/config';
3
- import { FieldBase, Tab, UIField } from 'payload/dist/fields/config/types';
4
- import * as payload_types from 'payload/types';
5
- import { AccessArgs, Access, CollectionConfig, PayloadRequest, SanitizedCollectionConfig, Field, CollectionAfterChangeHook, CollectionAfterDeleteHook, TypeWithID, BeforeDuplicate, Where, Block, GlobalConfig, FieldHook, RichTextField, RelationshipField, CheckboxField, BlockField, DateField, TextField, GroupField, UploadField, ArrayField, CollapsibleField, NumberField, SelectField, Option as Option$1, RowField, TabsField } from 'payload/types';
6
- import * as payload_dist_admin_components_forms_FieldDescription_types from 'payload/dist/admin/components/forms/FieldDescription/types';
7
- import * as React from 'react';
8
- import React__default, { ReactNode } from 'react';
9
- import * as _websolutespa_bom_core from '@websolutespa/bom-core';
10
- import { UserWithRoles, IRoute, IEquatable, ICategory, ILocale, ICategorized, IEntity, IMarket, IMemoryStore, ILocalizable, IMedia, MenuCategoryStrategy, IPageRelation, ISchema, IMenuItem, IMenuGroup, IMenuLink, IMenuPage, IMenuRoute, IMenu } from '@websolutespa/bom-core';
11
- import { DocumentDrawerProps } from 'payload/dist/admin/components/elements/DocumentDrawer/types';
12
- import * as react_jsx_runtime from 'react/jsx-runtime';
13
- import { TreeDataProvider, TreeItemIndex, TreeItem, Disposable, TreeItemRenderContext, TreeInformation } from 'react-complex-tree';
14
- import { Props as Props$2 } from 'payload/dist/admin/components/views/collections/List/types';
15
- import { User } from 'payload/dist/auth';
16
- import { PaginatedDocs } from 'payload/database';
17
- import { Response, NextFunction } from 'express';
18
- import { RequestContext } from 'payload';
19
- import { ContextType } from 'payload/dist/admin/components/utilities/DocumentInfo/types';
20
- import { Props as Props$3 } from 'payload/components/views/Cell';
21
- import { Props as Props$4 } from 'payload/components/fields/Text';
22
- import { FieldTypes } from 'payload/dist/admin/components/forms/field-types';
23
-
24
- declare const hasRole: (user: User, ...roles: BowlRole[]) => boolean;
1
+ import { Access, AccessArgs, AdminViewConfig, ArrayField, Block, BlocksField, CheckboxField, ClientUser, CollapsibleField, CollectionAfterChangeHook, CollectionAfterDeleteHook, CollectionAfterOperationHook, CollectionAfterReadHook, CollectionBeforeChangeHook, CollectionBeforeOperationHook, CollectionBeforeValidateHook, CollectionConfig, CollectionSlug, Config, DateField, Endpoint, Field, FieldHook, GlobalConfig, GroupField, Locale, NamedGroupField, NumberField, Option as Option$1, PaginatedDocs, Payload, PayloadRequest, RelationshipField, RequestContext, RichTextField, RowField, SanitizedCollectionConfig, SanitizedConfig, SanitizedGlobalConfig, SelectField, Tab, TabsField, TaskHandlerResult, TextField, TypeWithID, TypedUser, UnnamedGroupField, UploadField, Where } from "payload";
2
+ import React, { ReactNode } from "react";
3
+ import { acceptedLanguages } from "@payloadcms/translations";
4
+ import { Resource, UploadNode } from "@websolutespa/payload-utils";
5
+ import * as _websolutespa_bom_core0 from "@websolutespa/bom-core";
6
+ import { ICategorized, ICategory, IEntity, IEquatable, ILocale, ILocalizable, IMarket, IMedia, IMemoryStore, IMenu, IMenuGroup, IMenuItem, IMenuLink, IMenuPage, IMenuRoute, IPageRelation, IRoute, ISchema, MenuCategoryStrategy, UserWithRoles } from "@websolutespa/bom-core";
7
+ import { TreeItem, TreeItemIndex } from "react-complex-tree";
8
+
9
+ //#region src/core/access/access.d.ts
10
+ type UserWithRoles$1 = TypedUser & {
11
+ roles: BowlRole[];
12
+ };
13
+ declare const hasRole: (user_?: ClientUser | TypedUser | null, ...roles: BowlRole[]) => user_ is UserWithRoles$1;
25
14
  declare const isRole: (...roles: BowlRole[]) => (args: AccessArgs) => boolean;
26
15
  declare const isPageRole: (...roles: BowlRole[]) => (args: AccessArgs) => boolean | {
27
- or: ({
28
- _status: {
29
- equals: string;
30
- exists?: undefined;
31
- };
32
- } | {
33
- _status: {
34
- exists: boolean;
35
- equals?: undefined;
36
- };
37
- })[];
16
+ or: ({
17
+ _status: {
18
+ equals: string;
19
+ exists?: undefined;
20
+ };
21
+ } | {
22
+ _status: {
23
+ exists: boolean;
24
+ equals?: undefined;
25
+ };
26
+ })[];
38
27
  };
39
28
  declare const isAdmin: (args: AccessArgs) => boolean;
40
29
  declare const isSelf: (args: AccessArgs) => false | {
41
- id: {
42
- equals: any;
43
- };
30
+ id: {
31
+ equals: string | number;
32
+ };
44
33
  };
45
34
  declare const isOwn: (args: AccessArgs) => false | {
46
- 'user.id': {
47
- equals: any;
48
- };
35
+ 'user.id': {
36
+ equals: string | number;
37
+ };
49
38
  };
50
39
  declare const isAdminOrSelf: (args: AccessArgs) => boolean | {
51
- id: {
52
- equals: any;
53
- };
40
+ id: {
41
+ equals: string | number;
42
+ };
54
43
  };
55
44
  declare const isAdminOrOwn: (args: AccessArgs) => boolean | {
56
- 'user.id': {
57
- equals: any;
58
- };
59
- };
60
- declare const isTenant: (slug: string) => (args: AccessArgs) => false | {
61
- id: {
62
- in: string[];
63
- };
45
+ 'user.id': {
46
+ equals: string | number;
47
+ };
48
+ };
49
+ declare const isTenant: (slug: CollectionSlug) => (args: AccessArgs) => false | {
50
+ id: {
51
+ in: (string | undefined)[];
52
+ };
64
53
  } | {
65
- and: {
66
- or: ({
67
- [x: string]: {
68
- in: string[];
69
- };
70
- } | {
71
- [x: string]: {
72
- exists: boolean;
73
- };
74
- } | {
75
- [x: string]: {
76
- equals: string;
77
- };
78
- } | {
79
- [x: string]: {
80
- equals: any[];
81
- };
82
- })[];
83
- }[];
54
+ and: {
55
+ or: ({
56
+ [x: string]: {
57
+ in: (string | undefined)[];
58
+ };
59
+ } | {
60
+ [x: string]: {
61
+ exists: boolean;
62
+ };
63
+ } | {
64
+ [x: string]: {
65
+ equals: string;
66
+ };
67
+ } | {
68
+ [x: string]: {
69
+ equals: null;
70
+ };
71
+ } | {
72
+ [x: string]: {
73
+ equals: never[];
74
+ };
75
+ })[];
76
+ }[];
84
77
  };
85
78
  declare const orAccess: (...access: Access[]) => Access;
86
-
79
+ //#endregion
80
+ //#region src/core/api/action.service.d.ts
87
81
  type IEndUserConsentPreference = {
88
- consentPreference: string;
89
- date: string | Date;
82
+ consentPreference: string;
83
+ date: string | Date;
84
+ };
85
+ type IEndUserData = UserWithRoles & {
86
+ consentPreferences?: IEndUserConsentPreference[];
90
87
  };
91
- type IEndUserData = Partial<UserWithRoles & {
92
- consentPreferences?: IEndUserConsentPreference[];
93
- }>;
94
88
  declare const optinGet: Endpoint;
95
89
  declare const optoutGet: Endpoint;
96
90
  /**
97
91
  * beforeValidateActionHook:
98
92
  * check existing email address if createEndUser == 'user'
99
93
  */
100
- declare const beforeValidateActionHook: (collectionConfig: CollectionConfig) => CollectionConfig['hooks']['beforeValidate'][number];
94
+ declare const beforeValidateActionHook: (collectionConfig: CollectionConfig) => CollectionBeforeValidateHook;
101
95
  /**
102
96
  * beforeChangeActionHook:
103
97
  * assigning endUser id if user is logged in
104
98
  */
105
- declare const beforeChangeActionHook: (collectionConfig: CollectionConfig) => CollectionConfig['hooks']['beforeChange'][number];
99
+ declare const beforeChangeActionHook: (collectionConfig: CollectionConfig) => CollectionBeforeChangeHook;
106
100
  /**
107
101
  * afterChangeActionHook:
108
102
  * on operation create, send emails if the post data contains an emailData array
109
103
  */
110
- declare const afterChangeActionHook: (collectionConfig: CollectionConfig) => CollectionConfig['hooks']['afterChange'][number];
111
-
104
+ declare const afterChangeActionHook: (collectionConfig: CollectionConfig) => CollectionAfterChangeHook;
105
+ //# sourceMappingURL=action.service.d.ts.map
106
+ //#endregion
107
+ //#region src/core/api/cache.service.d.ts
112
108
  type ICache<T = any> = {
113
- timestamp: number;
114
- data: T;
109
+ timestamp: number;
110
+ data: T;
115
111
  };
116
112
  type InMemoryCacheOptions = {
117
- duration?: number | false;
113
+ duration?: number | false;
118
114
  };
119
115
  declare class InMemoryCache<T = any> {
120
- duration: number | false;
121
- cache: Map<string, ICache<T>>;
122
- constructor(options?: InMemoryCacheOptions);
123
- private isExpired_;
124
- has(key: string): boolean;
125
- get(key: string): T;
126
- set(key: string, data: T): void;
116
+ duration: number | false;
117
+ cache: Map<string, ICache<T>>;
118
+ constructor(options?: InMemoryCacheOptions);
119
+ private isExpired_;
120
+ has(key: string): boolean;
121
+ get(key: string): T;
122
+ set(key: string, data: T): void;
127
123
  }
128
- declare function keyWithRequest(key: string, req: PayloadRequest<any>): string;
129
-
130
- type CategoryMenuProps = {
131
- collection: SanitizedCollectionConfig;
132
- };
133
- declare const CategoryMenu: React__default.FC<CategoryMenuProps>;
134
-
135
- type CategoryTreeConflictProps = {
136
- conflicts: IRoute[][];
137
- };
138
- type RouteConflict = {
139
- schema: string;
140
- page: IEquatable;
141
- template: string;
142
- category: IEquatable;
143
- routes: IRoute[];
144
- };
145
- type CategoryTreeProps = {
146
- collection: SanitizedCollectionConfig;
147
- };
148
- declare const CategoryTree: React__default.FC<CategoryTreeProps>;
149
-
150
- type CustomEditModalProps = DocumentDrawerProps & {
151
- filter?: (fields: Field[]) => Field[];
152
- };
153
- declare const CustomEditModal: React__default.FC<CustomEditModalProps>;
154
-
124
+ declare function keyWithRequest(key: string, req: PayloadRequest): string;
125
+ //# sourceMappingURL=cache.service.d.ts.map
126
+ //#endregion
127
+ //#region src/components/DataTree/DataTreeProvider.d.ts
155
128
  type TreeItemData = {
156
- title: string;
157
- extra?: ReactNode;
158
- };
159
- declare class DataTreeProvider<T extends TreeItemData> implements TreeDataProvider {
160
- private data;
161
- private onDidChangeTreeDataEmitter;
162
- private onSetData?;
163
- constructor(items: Record<TreeItemIndex, TreeItem<T>>, onSetData?: (item: TreeItem<T>, data: T) => TreeItem<T>);
164
- getTreeItem(itemId: TreeItemIndex): Promise<TreeItem>;
165
- onChangeItemChildren(itemId: TreeItemIndex, children: TreeItemIndex[]): Promise<void>;
166
- onRenameItem(item: TreeItem<T>, name: string): Promise<void>;
167
- onDidChangeTreeData(callback: (changedItemIds: TreeItemIndex[]) => void): Disposable;
168
- onItemsDidChange_(items: Record<TreeItemIndex, TreeItem<T>>): void;
169
- onItemsDidChange(callback: (items: Record<TreeItemIndex, TreeItem<T>>) => void): void;
170
- }
171
-
172
- type TreeItems<T extends TreeItemData> = Record<TreeItemIndex, TreeItem<T>>;
173
- type DataTreeItemProps<T extends TreeItemData = TreeItemData, C extends string = never> = {
174
- item: TreeItem<T>;
175
- depth: number;
176
- children: React__default.ReactNode | null;
177
- title: React__default.ReactNode;
178
- arrow: React__default.ReactNode;
179
- context: TreeItemRenderContext<C>;
180
- info: TreeInformation;
181
- };
182
- declare function getTreeItemClassName(props: DataTreeItemProps): string;
183
- declare const DataTreeItemLi: (props: DataTreeItemProps & {
184
- interactive: ReactNode;
185
- }) => React__default.ReactElement;
186
- declare const DataTreeDragItem: (props: DataTreeItemProps) => React__default.ReactElement;
187
- declare const DataTreeRenameItem: (props: DataTreeItemProps) => React__default.ReactElement;
188
- declare const DataTreeItem: (props: DataTreeItemProps) => React__default.ReactElement;
189
- type DataTreeInstance<T extends TreeItemData> = {
190
- onSetData: (item: TreeItem<T>, data: T) => TreeItem<T>;
191
- };
192
- type DataTreeProps<T extends TreeItemData> = {
193
- items: TreeItems<T>;
194
- rootItem?: string;
195
- treeId?: string;
196
- treeLabel?: string;
197
- onChange?: (items: TreeItems<T>) => void;
198
- onEdit?: (items: TreeItem<T>, treeId: string) => void;
199
- };
200
- declare function DataTree_<T extends TreeItemData>(props: DataTreeProps<T>, ref: React__default.ForwardedRef<DataTreeInstance<T>>): react_jsx_runtime.JSX.Element;
201
- declare const DataTree: <T extends TreeItemData>(props: DataTreeProps<T> & {
202
- ref?: React__default.ForwardedRef<DataTreeInstance<T>>;
203
- }) => ReturnType<typeof DataTree_>;
204
-
205
- type DecoratedListProps = {
206
- props: Props$2;
207
- before?: ReactNode;
208
- after?: ReactNode;
209
- };
210
- declare const DecoratedList: React__default.FC<DecoratedListProps>;
211
-
212
- type IImportItem = Record<string, string | number | boolean | Date>;
213
-
214
- type ImportExportListProps<T = any> = Props$2 & {
215
- parser?: (items: IImportItem[]) => T[];
216
- exampleCSV?: string;
129
+ title: string;
130
+ extra?: ReactNode;
217
131
  };
218
- declare const ImportExportList: React__default.FC<ImportExportListProps>;
219
- declare function importExportListWithParser<T>(parser: (items: IImportItem[]) => T[], exampleCSV?: string): React__default.FC<Props$2>;
220
-
221
- declare const redirectParser: (items: IImportItem[]) => any[];
222
- declare const ImportExportRedirectList: React__default.FC<ImportExportListProps>;
223
-
224
- declare const modalSlug = "leave-without-saving";
225
- type LeaveWithoutSavingModalProps = {
226
- onConfirm: () => void;
227
- onCancel: () => void;
228
- };
229
- declare const LeaveWithoutSavingModal: React__default.FC<LeaveWithoutSavingModalProps>;
230
- declare const LeaveModal: (props: {
231
- visible: boolean;
232
- }) => react_jsx_runtime.JSX.Element;
233
-
234
- type LocalizedDescriptionProps = {
235
- value?: unknown;
236
- callback: (value?: unknown) => string;
237
- };
238
- declare const LocalizedDescription: React__default.FC<LocalizedDescriptionProps>;
239
- declare function withLocalizedDescription(callback: (value?: unknown) => string): React__default.FunctionComponent<{
240
- path: string;
241
- value?: unknown;
242
- }>;
243
-
244
- type Props$1 = {};
245
- declare const Publish: React__default.FC<Props$1>;
246
-
247
- type Props = {};
248
- declare const Save: React__default.FC<Props>;
249
-
250
- declare const SaveDraft: React__default.FC;
251
-
132
+ //#endregion
133
+ //#region src/components/DataTree/DataTree.d.ts
134
+ type TreeItems<T extends TreeItemData> = Record<TreeItemIndex, TreeItem<T>>;
135
+ //#endregion
136
+ //#region src/core/api/category.service.d.ts
252
137
  /**
253
138
  * afterCategoryChangeHook.
254
139
  */
@@ -259,28 +144,29 @@ declare const afterCategoryChangeHook: CollectionAfterChangeHook;
259
144
  declare const afterCategoryDeleteHook: CollectionAfterDeleteHook;
260
145
  declare const ROOT_ITEM = "_root";
261
146
  type CategoryTreeItem = {
262
- title: string;
263
- conflicts: IRoute[][];
264
- extra?: ReactNode;
147
+ title: string;
148
+ conflicts: IRoute[][];
149
+ extra?: ReactNode;
265
150
  };
266
151
  type CategoryTreeItems = TreeItems<CategoryTreeItem>;
267
152
  declare function getNewCategoriesFromChanges(categories: ICategory[], changes: CategoryTreeItems): {
268
- [x: string]: unknown;
269
- id: _websolutespa_bom_core.IEquatable;
270
- schema?: string;
271
- category?: _websolutespa_bom_core.IEquatable | ICategory;
272
- media?: _websolutespa_bom_core.IMedia;
273
- order?: number;
274
- slug: _websolutespa_bom_core.ILocalizable; /**
275
- * afterCategoryChangeHook.
276
- */
277
- title: _websolutespa_bom_core.ILocalizable;
278
- isHidden?: boolean;
153
+ [x: string]: unknown;
154
+ id: _websolutespa_bom_core0.IEquatable;
155
+ schema?: string;
156
+ category?: _websolutespa_bom_core0.IEquatable | ICategory;
157
+ media?: _websolutespa_bom_core0.IMedia;
158
+ order?: number;
159
+ slug: _websolutespa_bom_core0.ILocalizable;
160
+ title: _websolutespa_bom_core0.ILocalizable;
161
+ isHidden?: boolean;
279
162
  }[];
280
-
281
- declare function getCollectionItems<T extends TypeWithID & Record<string, unknown>>(req: PayloadRequest, slug: string, depth?: number): Promise<T[]>;
282
- declare function getCollectionItem<T extends TypeWithID & Record<string, unknown>>(req: PayloadRequest, slug: string, id: string, depth?: number): Promise<T>;
283
- declare function getGlobalItems<T extends TypeWithID & Record<string, unknown>>(req: PayloadRequest, slug: string, depth?: number): Promise<T[]>;
163
+ //# sourceMappingURL=category.service.d.ts.map
164
+ //#endregion
165
+ //#region src/core/api/collection.service.d.ts
166
+ declare function parseDepth(depth: unknown, defaultDepth?: number): number;
167
+ declare function getCollectionItems<T extends TypeWithID & Record<string, unknown>>(req: PayloadRequest, slug: CollectionSlug, depth?: number): Promise<T[]>;
168
+ declare function getCollectionItem<T extends TypeWithID & Record<string, unknown>>(req: PayloadRequest, slug: CollectionSlug, id: string, depth?: number): Promise<T>;
169
+ declare function getGlobalItems<T extends TypeWithID & Record<string, unknown>>(req: PayloadRequest, slug: CollectionSlug, depth?: number): Promise<T[]>;
284
170
  /**
285
171
  * Rest api collection index get handler.
286
172
  */
@@ -302,35 +188,45 @@ declare const collectionUpdatePatch: ((slug: string) => Endpoint);
302
188
  * Rest api collection export get handler.
303
189
  */
304
190
  declare const collectionExportGet: ((slug: string) => Endpoint);
305
- declare enum ImportLogType {
306
- Duplicate = "duplicate",
307
- Invalid = "invalid",
308
- Required = "required",
309
- Unexpected = "unexpected",
310
- Optional = "optional"
311
- }
312
- declare const ImportLogInvalidTypes: ImportLogType[];
313
- declare enum ImportMode {
314
- Append = "append",
315
- Replace = "replace",
316
- Update = "update"
317
- }
318
191
  /**
319
192
  * Rest api collection import post handler.
320
193
  */
321
194
  declare const collectionImportPost: ((slug: string) => Endpoint);
195
+ /**
196
+ * Decorate Mixer context.
197
+ */
198
+ declare const beforeOperationHook: CollectionBeforeOperationHook;
322
199
  /**
323
200
  * Decorate record with static collection data.
324
201
  */
325
- declare const afterCollectionReadHook: (collectionConfig: CollectionConfig) => CollectionConfig['hooks']['afterRead'][number];
202
+ declare const afterCollectionReadHook: (collectionConfig: CollectionConfig) => CollectionAfterReadHook;
326
203
  /**
204
+ * !!! removed from v3
327
205
  * Enforce unique field values during duplication.
328
- */
329
- declare const beforeDuplicateCollectionHook: BeforeDuplicate;
330
206
 
331
- declare function getLocale(req: PayloadRequest<any>): Promise<ILocale[]>;
207
+ export const beforeDuplicateCollectionHook: BeforeDuplicate = async ({
208
+ data,
209
+ collection,
210
+ }) => {
211
+ data = {
212
+ ...data,
213
+ };
214
+ collection.fields.forEach(field => {
215
+ if (isDataField(field) && field.unique) {
216
+ data[field.name] = `${data[field.name]}-${uuid()}`;
217
+ }
218
+ });
219
+ return data;
220
+ };
221
+ */
222
+ //# sourceMappingURL=collection.service.d.ts.map
223
+ //#endregion
224
+ //#region src/core/api/locale.service.d.ts
225
+ declare function getLocale(req: PayloadRequest): Promise<ILocale[]>;
332
226
  declare const localeGet: Endpoint;
333
-
227
+ //# sourceMappingURL=locale.service.d.ts.map
228
+ //#endregion
229
+ //#region src/core/api/menu.service.d.ts
334
230
  /**
335
231
  * Rest api menu get handler.
336
232
  */
@@ -342,8 +238,10 @@ declare const menuDetailGet: ((options: BowlOptions) => Endpoint);
342
238
  /**
343
239
  * Decorate record for Mixer when queried by market and locale.
344
240
  */
345
- declare const afterMenuReadHook: (collectionConfig: CollectionConfig) => CollectionConfig['hooks']['afterRead'][number];
346
-
241
+ declare const afterMenuReadHook: (collectionConfig: CollectionConfig) => CollectionAfterReadHook;
242
+ //# sourceMappingURL=menu.service.d.ts.map
243
+ //#endregion
244
+ //#region src/core/api/page.service.d.ts
347
245
  /**
348
246
  * Rest api page collection get handler.
349
247
  */
@@ -355,11 +253,11 @@ declare const pageDetailGet: ((slug: string) => Endpoint);
355
253
  /**
356
254
  * Modify record for Mixer when queried by market and locale.
357
255
  */
358
- declare const afterPageOperationHook: (collectionConfig: CollectionConfig) => CollectionConfig['hooks']['afterOperation'][number];
256
+ declare const afterPageOperationHook: (collectionConfig: CollectionConfig) => CollectionAfterOperationHook;
359
257
  /**
360
258
  * Decorate record for Mixer when queried by market and locale.
361
259
  */
362
- declare const afterPageReadHook: (collectionConfig: CollectionConfig) => CollectionConfig['hooks']['afterRead'][number];
260
+ declare const afterPageReadHook: (collectionConfig: CollectionConfig) => CollectionAfterReadHook;
363
261
  /**
364
262
  * Create a record of the pages collection related to the created document.
365
263
  */
@@ -368,179 +266,235 @@ declare const afterPageChangeHook: CollectionAfterChangeHook<ICategorized>;
368
266
  * Delete records of the pages collection related to the deleted document.
369
267
  */
370
268
  declare const afterPageDeleteHook: CollectionAfterDeleteHook;
371
-
269
+ //# sourceMappingURL=page.service.d.ts.map
270
+ //#endregion
271
+ //#region src/core/api/pagination.service.d.ts
372
272
  type IPagination = {
373
- hasNextPage: boolean;
374
- hasPrevPage: boolean;
375
- limit: number;
376
- nextPage: number | null;
377
- page: number;
378
- pagingCounter: number;
379
- prevPage: number | null;
380
- totalDocs: number;
381
- totalPages: number;
273
+ hasNextPage: boolean;
274
+ hasPrevPage: boolean;
275
+ limit: number;
276
+ nextPage: number | null;
277
+ page: number;
278
+ pagingCounter: number;
279
+ prevPage: number | null;
280
+ totalDocs: number;
281
+ totalPages: number;
382
282
  };
383
283
  declare function getPagination<T = IEntity>(items: T[], page?: number, limit?: number): Promise<PaginatedDocs<T>>;
384
-
284
+ //# sourceMappingURL=pagination.service.d.ts.map
285
+ //#endregion
286
+ //#region src/core/api/route.service.d.ts
385
287
  declare function getRoutes(req: PayloadRequest): Promise<IRoute[]>;
386
- declare function getRoute(req: PayloadRequest<any>, id: string): Promise<IRoute | null>;
387
- declare function getRouteByItemAndLocale(req: PayloadRequest<any>, item: ICategorized, localeId: string, slug: string): Promise<IRoute[]>;
388
- declare function getRouteByCategoryAndLocale(req: PayloadRequest<any>, item: ICategory, localeId: string, slug: string): Promise<IRoute[]>;
288
+ declare function getRoute(req: PayloadRequest, id: string): Promise<IRoute | null>;
289
+ declare function getRouteByItemAndLocale(req: PayloadRequest, item: ICategorized, localeId: string, slug: string): Promise<IRoute[]>;
290
+ declare function getRouteByCategoryAndLocale(req: PayloadRequest, item: ICategory, localeId: string, slug: string): Promise<IRoute[]>;
389
291
  declare const routeGet: Endpoint;
390
292
  declare const routePost: Endpoint;
391
293
  declare const routeChangesPost: Endpoint;
392
- declare function routePostHandler(request: PayloadRequest, response: Response, next: NextFunction): Promise<Response<any, Record<string, any>>>;
393
- declare function getEachMarketLocale(req: PayloadRequest<any>, callback: (market: IMarket, locale: ILocale, markets: IMarket[], locales: ILocale[]) => void): Promise<void>;
394
- declare function getPages(req: PayloadRequest<any>): Promise<IMemoryStore<ICategorized>>;
395
-
294
+ declare function routePostHandler(req: PayloadRequest): Promise<Response>;
295
+ declare function getEachMarketLocale(req: PayloadRequest, callback: (market: IMarket, locale: ILocale, markets: IMarket[], locales: ILocale[]) => void): Promise<void>;
296
+ declare function getPages(req: PayloadRequest): Promise<IMemoryStore<ICategorized>>;
297
+ //# sourceMappingURL=route.service.d.ts.map
298
+ //#endregion
299
+ //#region src/core/api/static.service.d.ts
300
+ declare const TASK_NAME = "bowlStaticTask";
301
+ declare const QUEUE_NAME = "bowlStaticQueue";
302
+ declare const USE_EXPIRE_DATE = false;
303
+ type CronConfig = {
304
+ /**
305
+ * The cron schedule for the job.
306
+ * @default '* * * * *' (every minute).
307
+ *
308
+ * @example
309
+ * ┌───────────── (optional) second (0 - 59)
310
+ * │ ┌───────────── minute (0 - 59)
311
+ * │ │ ┌───────────── hour (0 - 23)
312
+ * │ │ │ ┌───────────── day of the month (1 - 31)
313
+ * │ │ │ │ ┌───────────── month (1 - 12)
314
+ * │ │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday)
315
+ * │ │ │ │ │ │
316
+ * │ │ │ │ │ │
317
+ * - '* 0 * * * *' every hour at minute 0
318
+ * - '* 0 0 * * *' daily at midnight
319
+ * - '* 0 0 * * 0' weekly at midnight on Sundays
320
+ * - '* 0 0 1 * *' monthly at midnight on the 1st day of the month
321
+ * - '* 0/5 * * * *' every 5 minutes
322
+ * - '* * * * * *' every second
323
+ */
324
+ cron?: string;
325
+ /**
326
+ * The limit for the job. This can be overridden by the user. Defaults to 10.
327
+ */
328
+ limit?: number;
329
+ /**
330
+ * The queue name for the job.
331
+ */
332
+ queue?: string;
333
+ };
396
334
  type Option = {
397
- id: string;
398
- name: string;
399
- [key: string]: unknown;
335
+ id: string;
336
+ name: string;
337
+ [key: string]: unknown;
400
338
  };
401
339
  type KeyMapper = {
402
- [key: string]: string;
403
- };
340
+ [key: string]: string;
341
+ } | ((item: Option) => Option);
342
+ declare const TASK_OUTPUT_SCHEMA: Field[];
404
343
  declare const staticCollections: string[];
405
- declare const staticCollectionLoaders: Record<string, () => Promise<Option[]>>;
406
- /**
407
- * Decorate record with static collection data.
408
- */
409
- declare const afterStaticReadHook: (collectionConfig: CollectionConfig) => CollectionConfig['hooks']['afterRead'][number];
410
- declare const afterReadItem: (req: PayloadRequest, collectionConfig: CollectionConfig, item: Option) => Promise<Option>;
411
- declare const afterReadItems: (req: PayloadRequest, collectionConfig: CollectionConfig, items: Option[]) => Promise<Option[]>;
412
- /**
413
- * Rest api static collection get handler.
414
- */
415
- declare const staticIndexGet: ((collectionConfig: CollectionConfig) => Endpoint);
416
- /**
417
- * Rest api static collection detail get handler.
418
- */
419
- declare const staticDetailGet: ((collectionConfig: CollectionConfig) => Endpoint);
420
- declare function getStaticLoader(slug: string): () => Promise<Option[]>;
421
-
344
+ declare function seedStatic(payload: Payload): Promise<void>;
345
+ declare function getStaticTaskHandler(props: any): ({
346
+ req
347
+ }: {
348
+ req: PayloadRequest;
349
+ }) => Promise<TaskHandlerResult<typeof TASK_NAME>>;
350
+ declare function enqueueTask({
351
+ payload
352
+ }: {
353
+ payload: Payload;
354
+ }): Promise<void>;
355
+ declare function configureStaticJobs(sourceConfig: SanitizedBowlConfig, cron?: string): SanitizedBowlConfig;
356
+ //# sourceMappingURL=static.service.d.ts.map
357
+ //#endregion
358
+ //#region src/core/api/store.service.d.ts
422
359
  type FindOptions = {
423
- context?: RequestContext;
424
- currentDepth?: number;
425
- depth?: number;
426
- disableErrors?: boolean;
427
- draft?: boolean;
428
- fallbackLocale?: string;
429
- limit?: number;
430
- locale?: string;
431
- overrideAccess?: boolean;
432
- page?: number;
433
- pagination?: boolean;
434
- req?: PayloadRequest;
435
- showHiddenFields?: boolean;
436
- sort?: string;
437
- user?: any;
438
- where?: Where;
360
+ collection: CollectionSlug;
361
+ context?: RequestContext;
362
+ currentDepth?: number;
363
+ depth?: number;
364
+ disableErrors?: boolean;
365
+ draft?: boolean;
366
+ fallbackLocale?: string;
367
+ limit?: number;
368
+ locale?: string;
369
+ overrideAccess?: boolean;
370
+ page?: number;
371
+ pagination?: boolean;
372
+ req?: PayloadRequest;
373
+ showHiddenFields?: boolean;
374
+ sort?: string;
375
+ user?: any;
376
+ where?: Where;
439
377
  };
440
378
  type FindGlobalOptions = {
441
- context?: RequestContext;
442
- depth?: number;
443
- draft?: boolean;
444
- fallbackLocale?: string;
445
- locale?: string;
446
- overrideAccess?: boolean;
447
- req?: PayloadRequest;
448
- showHiddenFields?: boolean;
449
- slug: string;
450
- user?: any;
451
- };
452
- declare function findCollection<T>(req: PayloadRequest, collection: string, findOptions?: Omit<FindOptions, 'req'>): Promise<T[]>;
379
+ context?: RequestContext;
380
+ depth?: number;
381
+ draft?: boolean;
382
+ fallbackLocale?: string;
383
+ locale?: string;
384
+ overrideAccess?: boolean;
385
+ req?: PayloadRequest;
386
+ showHiddenFields?: boolean;
387
+ slug: string;
388
+ user?: any;
389
+ };
390
+ declare function findCollection<T>(req: PayloadRequest, slug: CollectionSlug, findOptions?: Partial<Omit<FindOptions, 'req'>>): Promise<T[]>;
453
391
  declare function findGlobal<T>(req: PayloadRequest, slug: string, findOptions?: Omit<FindGlobalOptions, 'req'>): Promise<T>;
454
- declare function getApiUrl(req: PayloadRequest): string;
455
392
  declare function getSearchUrl(req: PayloadRequest, overrideQuery?: {}): string;
456
393
  declare const storeGet: Endpoint;
457
-
394
+ //# sourceMappingURL=store.service.d.ts.map
395
+ //#endregion
396
+ //#region src/core/api/types.d.ts
458
397
  type IPage = {
459
- id: string;
460
- content: {
461
- value: string;
462
- relationTo: string;
463
- };
464
- createdAt: Date;
465
- updatedAt: Date;
398
+ id: string;
399
+ content: {
400
+ value: string;
401
+ relationTo: string;
402
+ };
403
+ createdAt: Date;
404
+ updatedAt: Date;
466
405
  };
467
406
  type IPageFull = {
468
- id: string;
469
- content: {
470
- value: {
471
- id: string;
472
- slug: ILocalizable;
473
- category: string;
474
- category_index?: boolean;
475
- markets: string[];
476
- template: string;
477
- title: ILocalizable;
478
- _status: string;
479
- createdAt: Date;
480
- updatedAt: Date;
481
- };
482
- relationTo: string;
407
+ id: string;
408
+ content: {
409
+ value: {
410
+ id: string;
411
+ slug: ILocalizable;
412
+ category: string;
413
+ category_index?: boolean;
414
+ markets: string[];
415
+ template: string;
416
+ title: ILocalizable;
417
+ _status: string;
418
+ createdAt: Date;
419
+ updatedAt: Date;
483
420
  };
484
- createdAt: Date;
485
- updatedAt: Date;
421
+ relationTo: string;
422
+ };
423
+ createdAt: Date;
424
+ updatedAt: Date;
486
425
  };
487
426
  type IUndecoratedMenuBase = {
488
- id: IEquatable;
489
- type: string;
490
- items: IUndecoratedMenuItem[];
491
- abstract?: string;
492
- customClass?: string;
493
- extra?: string;
494
- markets?: string[];
495
- media?: IMedia;
427
+ id: IEquatable;
428
+ type: string;
429
+ items: IUndecoratedMenuItem[];
430
+ abstract?: string;
431
+ customClass?: string;
432
+ extra?: string;
433
+ markets?: string[];
434
+ media?: IMedia;
496
435
  };
497
436
  type IUndecoratedMenuCategory = Omit<IUndecoratedMenuBase, 'type'> & {
498
- type: 'category';
499
- category: IEquatable | ICategory;
500
- maxDepth: number;
501
- strategy?: MenuCategoryStrategy;
502
- customTitle?: string;
437
+ type: 'category';
438
+ category: IEquatable | ICategory;
439
+ maxDepth: number;
440
+ strategy?: MenuCategoryStrategy;
441
+ customTitle?: string;
503
442
  };
504
443
  type IUndecoratedMenuGroup = Omit<IUndecoratedMenuBase, 'type'> & {
505
- type: 'group';
506
- title: string;
444
+ type: 'group';
445
+ title: string;
507
446
  };
508
447
  type IUndecoratedMenuLink = Omit<IUndecoratedMenuBase, 'type'> & {
509
- type: 'link';
510
- title: string;
511
- href: string;
512
- target: string;
448
+ type: 'link';
449
+ title: string;
450
+ href: string;
451
+ target: string;
513
452
  };
514
453
  type IUndecoratedMenuPage = Omit<IUndecoratedMenuBase, 'type'> & {
515
- type: 'page';
516
- page: IPageRelation;
517
- customTitle?: string;
454
+ type: 'page';
455
+ page: IPageRelation;
456
+ customTitle?: string;
518
457
  };
519
458
  type IUndecoratedMenuCustom = Record<string, unknown> & {
520
- id: IEquatable;
521
- type: 'custom';
522
- blockType: string;
459
+ id: IEquatable;
460
+ type: 'custom';
461
+ blockType: string;
523
462
  };
524
463
  type IUndecoratedMenuItem = IUndecoratedMenuCategory | IUndecoratedMenuGroup | IUndecoratedMenuLink | IUndecoratedMenuPage | IUndecoratedMenuCustom;
525
464
  type IUndecoratedNavItem = IUndecoratedMenuCategory | IUndecoratedMenuPage;
526
465
  type IUndecoratedMenu = {
527
- createdAt: Date;
528
- id: string;
529
- items: IUndecoratedMenuItem[];
530
- markets?: string[];
531
- updatedAt: Date;
466
+ createdAt: Date;
467
+ id: string;
468
+ items: IUndecoratedMenuItem[];
469
+ markets?: string[];
470
+ updatedAt: Date;
532
471
  };
533
472
  type MixerContext = {
534
- market?: string;
535
- locale?: string;
536
- routes?: IRoute[];
537
- currentRoutes?: IRoute[];
538
- categories?: ICategory[];
539
- richText?: boolean;
540
- locales?: string[];
541
- markets?: string[];
473
+ market?: string;
474
+ locale?: string;
475
+ routes?: IRoute[];
476
+ currentRoutes?: IRoute[];
477
+ categories?: ICategory[];
478
+ richText?: boolean;
479
+ locales?: string[];
480
+ markets?: string[];
542
481
  };
543
-
482
+ declare enum ImportLogType {
483
+ Duplicate = "duplicate",
484
+ Invalid = "invalid",
485
+ Required = "required",
486
+ Unexpected = "unexpected",
487
+ Optional = "optional",
488
+ }
489
+ declare const ImportLogInvalidTypes: ImportLogType[];
490
+ declare enum ImportMode {
491
+ Append = "append",
492
+ Replace = "replace",
493
+ Update = "update",
494
+ }
495
+ //# sourceMappingURL=types.d.ts.map
496
+ //#endregion
497
+ //#region src/core/api/utils.d.ts
544
498
  declare function getObjectParam(value: unknown): {} | undefined;
545
499
  declare function getNumericParam(value: unknown): number | undefined;
546
500
  declare function getStringParam(value: unknown): string | undefined;
@@ -548,44 +502,48 @@ declare function getSubRequest(req: PayloadRequest): PayloadRequest;
548
502
  declare function setMixerContext(req: PayloadRequest, market: string, locale: string): Promise<MixerContext>;
549
503
  declare function filterRoutes(routes: IRoute[], market: string, locale: string): IRoute[];
550
504
  declare function isMixerRequest(req: PayloadRequest): req is Omit<PayloadRequest, 'query'> & {
551
- query: PayloadRequest['query'] & {
552
- market: string;
553
- locale: string;
554
- };
505
+ query: PayloadRequest['query'] & {
506
+ market: string;
507
+ locale: string;
508
+ };
555
509
  };
556
-
510
+ //# sourceMappingURL=utils.d.ts.map
511
+ //#endregion
512
+ //#region src/core/api/where.service.d.ts
557
513
  declare function whereCollection<T = IEntity>(items: T[], where?: {
558
- [key: string]: any;
514
+ [key: string]: any;
559
515
  }): Promise<T[]>;
560
516
  declare function sortCollection<T = IEntity>(items: T[], sort?: string): Promise<T[]>;
561
-
517
+ //# sourceMappingURL=where.service.d.ts.map
518
+ //#endregion
519
+ //#region src/core/collections/withAction.d.ts
562
520
  type AfterOptHook<T extends TypeWithID = any> = (args: {
563
- collection: SanitizedCollectionConfig;
564
- doc: T;
565
- previousDoc: T;
566
- req: PayloadRequest;
521
+ collection: SanitizedCollectionConfig;
522
+ doc: T;
523
+ previousDoc: T;
524
+ req: PayloadRequest;
567
525
  }) => any;
568
526
  type WithActionProps = (Omit<CollectionConfig, 'fields'> & {
569
- fields?: BowlField[];
570
- views?: Record<string, AdminView>;
571
- custom?: {
572
- /**
573
- *
574
- * eg.
575
- * contacts
576
- * newsletter
577
- * registration
578
- * order guest
579
- * order logged
580
- */
581
- createEndUser?: false | 'guest' | 'user';
582
- afterOptin?: AfterOptHook;
583
- afterOptout?: AfterOptHook;
584
- [key: string]: unknown;
585
- };
527
+ fields?: BowlField[];
528
+ views?: Record<string, AdminViewConfig>;
529
+ custom?: {
530
+ /**
531
+ *
532
+ * eg.
533
+ * contacts
534
+ * newsletter
535
+ * registration
536
+ * order guest
537
+ * order logged
538
+ */
539
+ createEndUser?: false | 'guest' | 'user';
540
+ afterOptin?: AfterOptHook;
541
+ afterOptout?: AfterOptHook;
542
+ [key: string]: unknown;
543
+ };
586
544
  });
587
545
  type WithAction = WithActionProps & {
588
- type: 'withAction';
546
+ type: 'withAction';
589
547
  };
590
548
  declare const ActionDefault: Partial<CollectionConfig>;
591
549
  /**
@@ -593,13 +551,15 @@ declare const ActionDefault: Partial<CollectionConfig>;
593
551
  * @returns {CollectionConfig} Return a `CollectionConfig`.
594
552
  */
595
553
  declare const withAction: (config: WithActionProps) => CollectionConfig;
596
-
554
+ //# sourceMappingURL=withAction.d.ts.map
555
+ //#endregion
556
+ //#region src/core/collections/withAddress.d.ts
597
557
  type WithAddressProps = (Omit<CollectionConfig, 'fields'> & {
598
- fields: BowlField[];
599
- views?: Record<string, AdminView>;
558
+ fields: BowlField[];
559
+ views?: Record<string, AdminViewConfig>;
600
560
  });
601
561
  type WithAddress = WithAddressProps & {
602
- type: 'withAddress';
562
+ type: 'withAddress';
603
563
  };
604
564
  declare const AddressDefault: Partial<CollectionConfig>;
605
565
  /**
@@ -608,12 +568,14 @@ declare const AddressDefault: Partial<CollectionConfig>;
608
568
  * @returns {CollectionConfig} Return a `CollectionConfig` with inherited fields: `id`, `createdAt`, `updatedAt`.
609
569
  */
610
570
  declare const withAddress: (config: WithAddressProps) => CollectionConfig;
611
-
571
+ //# sourceMappingURL=withAddress.d.ts.map
572
+ //#endregion
573
+ //#region src/core/collections/withBlock.d.ts
612
574
  type WithBlockProps = (Omit<Block, 'fields'> & {
613
- fields: BowlField[];
575
+ fields: BowlField[];
614
576
  });
615
577
  type WithBlock = WithBlockProps & {
616
- type: 'withBlock';
578
+ type: 'withBlock';
617
579
  };
618
580
  declare const BlockDefaults: Partial<Block>;
619
581
  /**
@@ -622,13 +584,15 @@ declare const BlockDefaults: Partial<Block>;
622
584
  * @returns {Block} Return a `Block` with inherited fields: `id`, `createdAt`, `updatedAt`.
623
585
  */
624
586
  declare const withBlock: (options: BowlBlock) => Block;
625
-
587
+ //# sourceMappingURL=withBlock.d.ts.map
588
+ //#endregion
589
+ //#region src/core/collections/withCollection.d.ts
626
590
  type WithCollectionProps = (Omit<CollectionConfig, 'fields'> & {
627
- fields: BowlField[];
628
- views?: Record<string, AdminView>;
591
+ fields: BowlField[];
592
+ views?: Record<string, AdminViewConfig>;
629
593
  });
630
594
  type WithCollection = WithCollectionProps & {
631
- type: 'withCollection';
595
+ type: 'withCollection';
632
596
  };
633
597
  declare const CollectionDefault: Partial<CollectionConfig>;
634
598
  /**
@@ -637,27 +601,31 @@ declare const CollectionDefault: Partial<CollectionConfig>;
637
601
  * @returns {CollectionConfig} Return a `CollectionConfig` with inherited fields: `id`, `createdAt`, `updatedAt`.
638
602
  */
639
603
  declare const withCollection: (config: WithCollectionProps) => CollectionConfig;
640
-
604
+ //# sourceMappingURL=withCollection.d.ts.map
605
+ //#endregion
606
+ //#region src/core/collections/withEndUser.d.ts
641
607
  type WithEndUserProps = (Omit<CollectionConfig, 'fields'> & {
642
- fields?: BowlField[];
643
- views?: Record<string, AdminView>;
608
+ fields?: BowlField[];
609
+ views?: Record<string, AdminViewConfig>;
644
610
  });
645
611
  type WithEndUser = WithEndUserProps & {
646
- type: 'withEndUser';
612
+ type: 'withEndUser';
647
613
  };
648
614
  declare const EndUserDefault: Partial<CollectionConfig>;
649
615
  declare const endUserForgotPost: ((slug: string) => Endpoint);
650
616
  declare const endUserResetPost: ((slug: string) => Endpoint);
651
617
  declare const endUserPasswordPost: ((slug: string) => Endpoint);
652
- declare const endUserExistPost: ((slug: string) => Endpoint);
618
+ declare const endUserExistPost: ((slug: CollectionSlug) => Endpoint);
653
619
  declare const withEndUser: (config: WithEndUserProps) => CollectionConfig;
654
-
620
+ //# sourceMappingURL=withEndUser.d.ts.map
621
+ //#endregion
622
+ //#region src/core/collections/withGlobal.d.ts
655
623
  type WithGlobalProps = (Omit<GlobalConfig, 'fields'> & {
656
- fields: BowlField[];
657
- views?: Record<string, AdminView>;
624
+ fields: BowlField[];
625
+ views?: Record<string, AdminViewConfig>;
658
626
  });
659
627
  type WithGlobal = WithGlobalProps & {
660
- type: 'withGlobal';
628
+ type: 'withGlobal';
661
629
  };
662
630
  declare const GlobalDefault: Partial<GlobalConfig>;
663
631
  /**
@@ -666,22 +634,26 @@ declare const GlobalDefault: Partial<GlobalConfig>;
666
634
  * @returns {GlobalConfig} Return a `GlobalConfig` with inherited fields: `id`, `createdAt`, `updatedAt`.
667
635
  */
668
636
  declare const withGlobal: (config: WithGlobalProps) => GlobalConfig;
669
-
637
+ //# sourceMappingURL=withGlobal.d.ts.map
638
+ //#endregion
639
+ //#region src/core/collections/withMenu.d.ts
670
640
  type WithMenuProps = (Omit<CollectionConfig, 'fields'> & {
671
- fields: BowlField[];
672
- views?: Record<string, AdminView>;
641
+ fields: BowlField[];
642
+ views?: Record<string, AdminViewConfig>;
673
643
  });
674
644
  type WithMenu = WithMenuProps & {
675
- type: 'withMenu';
645
+ type: 'withMenu';
676
646
  };
677
647
  declare const withMenu: (config: WithMenuProps) => CollectionConfig;
678
-
648
+ //# sourceMappingURL=withMenu.d.ts.map
649
+ //#endregion
650
+ //#region src/core/collections/withPage.d.ts
679
651
  type WithPageProps = (Omit<CollectionConfig, 'fields'> & {
680
- fields: BowlField[];
681
- views?: Record<string, AdminView>;
652
+ fields: BowlField[];
653
+ views?: Record<string, AdminViewConfig>;
682
654
  });
683
655
  type WithPage = WithPageProps & {
684
- type: 'withPage';
656
+ type: 'withPage';
685
657
  };
686
658
  declare const PageDefault: Partial<CollectionConfig>;
687
659
  /**
@@ -690,54 +662,74 @@ declare const PageDefault: Partial<CollectionConfig>;
690
662
  * @returns {CollectionConfig} Return a `CollectionConfig` with inherited fields: `id`, `title`, `slug`, `category`, `markets`, `template`, `meta`, `status`, `createdAt`, `updatedAt`.
691
663
  */
692
664
  declare const withPage: (config: CollectionConfig) => CollectionConfig;
693
-
665
+ //# sourceMappingURL=withPage.d.ts.map
666
+ //#endregion
667
+ //#region src/core/collections/withStaticCollection.d.ts
694
668
  type WithStaticProps = (Omit<CollectionConfig, 'fields'> & StaticCollectionConfig & {
695
- fields: BowlField[];
696
- views?: Record<string, AdminView>;
669
+ fields: BowlField[];
670
+ views?: Record<string, AdminViewConfig>;
697
671
  });
698
672
  type WithStatic = WithStaticProps & {
699
- type: 'withStatic';
673
+ type: 'withStatic';
700
674
  };
701
675
  type StaticCollectionSrc = string | Option[] | ((config: CollectionConfig) => Option[]) | ((config: CollectionConfig) => Promise<Option[]>);
702
676
  type StaticCollectionConfig = {
703
- src: StaticCollectionSrc;
704
- map?: KeyMapper;
705
- duration?: number | false;
677
+ src: StaticCollectionSrc;
678
+ map?: KeyMapper;
679
+ duration?: number;
706
680
  };
707
681
  declare const StaticCollectionDefault: Partial<CollectionConfig>;
708
682
  /**
709
683
  * @param {CollectionConfig & StaticCollectionConfig} config
710
684
  * @returns {CollectionConfig} Return a `CollectionConfig` from static or remote dataset.
711
685
  */
712
- declare const withStaticCollection: ({ src, map, duration, ...config }: WithStaticProps) => CollectionConfig;
713
-
686
+ declare const withStaticCollection: ({
687
+ src,
688
+ map,
689
+ duration,
690
+ ...config
691
+ }: WithStaticProps) => CollectionConfig;
692
+ //#endregion
693
+ //#region src/core/collections/withUser.d.ts
714
694
  type WithUserProps = (Omit<CollectionConfig, 'fields'> & {
715
- fields?: BowlField[];
716
- views?: Record<string, AdminView>;
695
+ fields?: BowlField[];
696
+ views?: Record<string, AdminViewConfig>;
717
697
  });
718
698
  type WithUser = WithUserProps & {
719
- type: 'withUser';
699
+ type: 'withUser';
720
700
  };
721
701
  declare const UserDefault: Partial<CollectionConfig>;
722
702
  declare const withUser: (config: WithUserProps) => CollectionConfig;
723
-
724
- declare function decorateCategory_<T extends ICategorized = ICategorized>(item: T, slug: string, context: MixerContext): Promise<T | T & {
725
- category: ICategory;
703
+ //# sourceMappingURL=withUser.d.ts.map
704
+ //#endregion
705
+ //#region src/core/decorators/category.d.ts
706
+ declare function decorateCategory_<T extends ICategorized = ICategorized>(item: T, slug: string, context: Required<MixerContext>): Promise<T | T & {
707
+ category: ICategory;
726
708
  }>;
727
- declare function decorateCategories_<T extends ICategorized = ICategorized>(items: T[], slug: string, context: MixerContext): Promise<(T | T & {
728
- category: ICategory;
709
+ declare function decorateCategories_<T extends ICategorized = ICategorized>(items: T[], slug: string, context: Required<MixerContext>): Promise<(T | T & {
710
+ category: ICategory;
729
711
  })[]>;
730
-
731
- declare function decorateHref_<T extends ISchema = ISchema>(item: T, slug: string, context: MixerContext): Promise<T & {
732
- href: string | null;
712
+ //# sourceMappingURL=category.d.ts.map
713
+ //#endregion
714
+ //#region src/core/decorators/components.d.ts
715
+ declare function decorateComponents_<T extends ICategorized = ICategorized>(item: T, slug: string, context: Required<MixerContext>): Promise<T>;
716
+ //# sourceMappingURL=components.d.ts.map
717
+ //#endregion
718
+ //#region src/core/decorators/href.d.ts
719
+ declare function decorateHref_<T extends ISchema = ISchema>(item: T, slug: string, context: Required<MixerContext>): Promise<T & {
720
+ href: string | null;
733
721
  }>;
734
- declare function decorateHrefs_<T extends ISchema = ISchema>(items: T[], slug: string, context: MixerContext): Promise<(T & {
735
- href: string | null;
722
+ declare function decorateHrefs_<T extends ISchema = ISchema>(items: T[], slug: string, context: Required<MixerContext>): Promise<(T & {
723
+ href: string | null;
736
724
  })[]>;
737
-
725
+ //# sourceMappingURL=href.d.ts.map
726
+ //#endregion
727
+ //#region src/core/decorators/localize.d.ts
738
728
  declare function localizeItem<T = IEntity>(item: T, localizedFields: string[], locale: string): Promise<T>;
739
729
  declare function localizeCollection<T = IEntity>(items: T[], localizedFields: string[], locale?: string): Promise<T[]>;
740
-
730
+ //# sourceMappingURL=localize.d.ts.map
731
+ //#endregion
732
+ //#region src/core/decorators/menu.d.ts
741
733
  declare const MAX_INT = 1000000000000;
742
734
  declare function decorateMenuCategory_(item: IUndecoratedMenuCategory, categories: ICategory[], routes: IRoute[], market: string, depth?: number): IMenuItem | undefined;
743
735
  declare function decorateMenuGroup_(item: IUndecoratedMenuGroup, categories: ICategory[], routes: IRoute[], market: string): IMenuGroup;
@@ -747,551 +739,591 @@ declare function decorateMenuRoute_(item: IRoute): IMenuRoute;
747
739
  declare function decorateMenuItem_(item: IUndecoratedMenuItem, categories: ICategory[], routes: IRoute[], market: string, depth?: number): IMenuItem;
748
740
  declare function decorateNavItem_(item: IUndecoratedNavItem, categories: ICategory[], routes: IRoute[], market: string, depth?: number): IMenuItem | IMenuItem[];
749
741
  declare function hasMarket(item: IUndecoratedMenuItem, market: string): boolean;
750
- declare function decorateMenu_(item: IUndecoratedMenu, context: MixerContext): Promise<IMenu>;
751
-
752
- declare function decorateNav_<T extends ISchema = ISchema>(item: T, slug: string, context: MixerContext): Promise<T>;
753
- declare function decorateNavs_<T extends ISchema = ISchema>(items: T[], slug: string, context: MixerContext): Promise<T[]>;
742
+ declare function decorateMenu_(item: IUndecoratedMenu, context: Required<MixerContext>): Promise<IMenu>;
743
+ //# sourceMappingURL=menu.d.ts.map
744
+ //#endregion
745
+ //#region src/core/decorators/nav.d.ts
746
+ declare function decorateNav_<T extends ISchema = ISchema>(item: T, slug: string, context: Required<MixerContext>): Promise<T>;
747
+ declare function decorateNavs_<T extends ISchema = ISchema>(items: T[], slug: string, context: Required<MixerContext>): Promise<T[]>;
754
748
  declare function isUndecoratedNavItem(item: unknown): item is IUndecoratedNavItem;
755
749
  declare function isRelation(item: unknown): item is IRelation;
756
750
  type IRelation = {
757
- relationTo: string;
758
- value: IEntity | IEntity[];
759
- };
760
-
761
- declare function decorateRichText_<T extends ISchema = ISchema>(item: T, slug: string, context: MixerContext, fields: Field[]): Promise<T>;
762
- declare function decorateRichTexts_<T extends ISchema = ISchema>(items: T[], slug: string, context: MixerContext, fields: Field[]): Promise<T[]>;
763
-
751
+ relationTo: string;
752
+ value: IEntity | IEntity[];
753
+ };
754
+ //# sourceMappingURL=nav.d.ts.map
755
+ //#endregion
756
+ //#region src/core/decorators/rich-text.d.ts
757
+ declare function decorateRichText_<T extends ISchema = ISchema>(item: T, fields: Field[], context: MixerContext, config: SanitizedConfig): Promise<T>;
758
+ declare function decorateRichTexts_<T extends ISchema = ISchema>(items: T[], fields: Field[], context: MixerContext, config: SanitizedConfig): Promise<T[]>;
759
+ //# sourceMappingURL=rich-text.d.ts.map
760
+ //#endregion
761
+ //#region src/core/decorators/schema.d.ts
764
762
  declare function decorateSchema_<T extends ISchema = ISchema>(item: T, slug: string): Promise<T & {
765
- schema: string;
763
+ schema: string;
766
764
  }>;
767
765
  declare function decorateSchemas_<T extends ISchema = ISchema>(items: T[], slug: string): Promise<(T & {
768
- schema: string;
766
+ schema: string;
769
767
  })[]>;
770
-
768
+ //# sourceMappingURL=schema.d.ts.map
769
+ //#endregion
770
+ //#region src/core/decorators/upload.d.ts
771
+ declare function decorateUpload_<T extends ISchema = ISchema>(item: T, slug: string, context: MixerContext, fields: Field[]): Promise<T>;
772
+ declare function decorateUploads_<T extends ISchema = ISchema>(items: T[], slug: string, context: MixerContext, fields: Field[], config: SanitizedConfig): Promise<T[]>;
773
+ declare const afterReadUpload: FieldHook;
774
+ //# sourceMappingURL=upload.d.ts.map
775
+ //#endregion
776
+ //#region src/core/encryption/encryption.d.ts
771
777
  declare const encrypt: (text: string) => string;
772
778
  declare const decrypt: (hash: string) => string;
773
779
  declare const encryptField: FieldHook;
774
780
  declare const decryptField: FieldHook;
775
781
  declare const encryptData: (collectionConfig: CollectionConfig) => void;
776
-
782
+ //# sourceMappingURL=encryption.d.ts.map
783
+ //#endregion
784
+ //#region src/core/fields/withAbstract.d.ts
777
785
  type WithAbstractProps = (Omit<RichTextField, 'type' | 'name'> & {
778
- name?: string;
786
+ name?: string;
779
787
  });
780
788
  type WithAbstract = WithAbstractProps & {
781
- type: 'withAbstract';
789
+ type: 'withAbstract';
782
790
  };
783
791
  declare const withAbstract: (options?: WithAbstractProps) => RichTextField;
784
792
  declare const withAbstractRequired: (options?: WithAbstractProps) => RichTextField;
785
-
793
+ //# sourceMappingURL=withAbstract.d.ts.map
794
+ //#endregion
795
+ //#region src/core/fields/withCategory.d.ts
786
796
  type WithCategoryProps = (Omit<RelationshipField, 'type' | 'name' | 'relationTo'> & {
787
- name?: string;
797
+ name?: string;
788
798
  });
789
799
  type WithCategory = WithCategoryProps & {
790
- type: 'withCategory';
800
+ type: 'withCategory';
791
801
  };
792
802
  declare const CategoryDefaults: RelationshipField;
793
803
  declare const withCategory: (options?: WithCategoryProps) => RelationshipField;
794
804
  declare const withCategoryRequired: (options?: WithCategoryProps) => RelationshipField;
795
-
805
+ //# sourceMappingURL=withCategory.d.ts.map
806
+ //#endregion
807
+ //#region src/core/fields/withCheckbox.d.ts
796
808
  type WithCheckboxProps = (Omit<CheckboxField, 'type' | 'name'> & {
797
- name?: string;
809
+ name?: string;
798
810
  });
799
811
  type WithCheckbox = WithCheckboxProps & {
800
- type: 'withCheckbox';
812
+ type: 'withCheckbox';
801
813
  };
802
814
  declare const CheckboxDefaults: CheckboxField;
803
815
  declare const withCheckbox: (options?: WithCheckboxProps) => CheckboxField;
804
816
  declare const withCheckboxRequired: (options?: WithCheckboxProps) => CheckboxField;
805
-
806
- type WithComponentsProps = Omit<Partial<BlockField>, 'type' | 'name' | 'blocks'> & {
807
- name?: string;
808
- blocks: BowlBlock[];
817
+ //# sourceMappingURL=withCheckbox.d.ts.map
818
+ //#endregion
819
+ //#region src/core/fields/withComponents.d.ts
820
+ type WithComponentsProps = Omit<Partial<BlocksField>, 'type' | 'name' | 'blocks'> & {
821
+ name?: string;
822
+ blocks: BowlBlock[];
809
823
  };
810
824
  type WithComponents = WithComponentsProps & {
811
- type: 'withComponents';
825
+ type: 'withComponents';
812
826
  };
813
- declare const ComponentsDefaults: BlockField;
814
- declare const withComponents: (options: WithComponentsProps) => BlockField;
815
-
827
+ declare const ComponentsDefaults: BlocksField;
828
+ declare const withComponents: (options: WithComponentsProps) => BlocksField;
829
+ //# sourceMappingURL=withComponents.d.ts.map
830
+ //#endregion
831
+ //#region src/core/fields/withDate.d.ts
816
832
  type WithDateProps = (Omit<DateField, 'type' | 'name'> & {
817
- name?: string;
833
+ name?: string;
818
834
  });
819
835
  type WithDate = WithDateProps & {
820
- type: 'withDate';
836
+ type: 'withDate';
821
837
  };
822
838
  declare const DateDefaults: DateField;
823
839
  declare const withDate: (options?: WithDateProps) => DateField;
824
840
  declare const withDateRequired: (options?: WithDateProps) => DateField;
825
-
841
+ //# sourceMappingURL=withDate.d.ts.map
842
+ //#endregion
843
+ //#region src/core/fields/withDescription.d.ts
826
844
  type WithDescriptionProps = (Omit<RichTextField, 'type' | 'name'> & {
827
- name?: string;
845
+ name?: string;
828
846
  });
829
847
  type WithDescription = WithDescriptionProps & {
830
- type: 'withDescription';
848
+ type: 'withDescription';
831
849
  };
832
850
  declare const withDescription: (options?: WithDescriptionProps) => RichTextField;
833
851
  declare const withDescriptionRequired: (options?: WithDescriptionProps) => RichTextField;
834
-
852
+ //# sourceMappingURL=withDescription.d.ts.map
853
+ //#endregion
854
+ //#region src/core/fields/withId.d.ts
835
855
  type WithIdProps = (Omit<TextField, 'type' | 'name' | 'hasMany'> & {
836
- name?: string;
856
+ name?: string;
837
857
  });
838
858
  type WithId = WithIdProps & {
839
- type: 'withId';
859
+ type: 'withId';
840
860
  };
841
861
  declare const withId: (options?: WithIdProps) => TextField;
842
862
  declare const withIdRequired: (options?: WithIdProps) => TextField;
843
-
863
+ //# sourceMappingURL=withId.d.ts.map
864
+ //#endregion
865
+ //#region src/core/fields/withIsActive.d.ts
844
866
  type WithIsActiveProps = (Omit<CheckboxField, 'type' | 'name'> & {
845
- name?: string;
867
+ name?: string;
846
868
  });
847
869
  type WithIsActive = WithIsActiveProps & {
848
- type: 'withIsActive';
870
+ type: 'withIsActive';
849
871
  };
850
872
  declare const withIsActive: (options?: WithIsActiveProps) => CheckboxField;
851
873
  declare const withIsActiveRequired: (options?: WithIsActiveProps) => CheckboxField;
852
-
874
+ //# sourceMappingURL=withIsActive.d.ts.map
875
+ //#endregion
876
+ //#region src/core/fields/withIsDefault.d.ts
853
877
  type WithIsDefaultProps = (Omit<CheckboxField, 'type' | 'name'> & {
854
- name?: string;
878
+ name?: string;
855
879
  });
856
880
  type WithIsDefault = WithIsDefaultProps & {
857
- type: 'withIsDefault';
881
+ type: 'withIsDefault';
858
882
  };
859
883
  declare const withIsDefault: (options?: WithIsDefaultProps) => CheckboxField;
860
884
  declare const withIsDefaultRequired: (options?: WithIsDefaultProps) => CheckboxField;
861
-
885
+ //# sourceMappingURL=withIsDefault.d.ts.map
886
+ //#endregion
887
+ //#region src/core/fields/withLink.d.ts
862
888
  type WithLinkOptions = {
863
- appearances?: string[] | false;
864
- disableLabel?: boolean;
889
+ appearances?: string[] | false;
890
+ disableLabel?: boolean;
865
891
  };
866
892
  type WithLinkProps = Omit<GroupField, 'type' | 'name' | 'fields'> & WithLinkOptions;
867
893
  type WithLink = WithLinkProps & {
868
- type: 'withLink';
894
+ type: 'withLink';
869
895
  };
870
896
  declare const appearanceOptions: {
871
- text: {
872
- label: string;
873
- value: string;
874
- };
875
- primaryButton: {
876
- label: string;
877
- value: string;
878
- };
879
- secondaryButton: {
880
- label: string;
881
- value: string;
882
- };
883
- };
884
- declare const withLink: ({ appearances, disableLabel, ...props }?: WithLinkProps) => Omit<payload_types.FieldBase, "required" | "validation"> & {
885
- admin?: {
886
- className?: string;
887
- components?: {
888
- Cell?: React.ComponentType<any>;
889
- Field?: React.ComponentType<any>;
890
- Filter?: React.ComponentType<any>;
891
- };
892
- condition?: payload_types.Condition<any, any>;
893
- description?: payload_dist_admin_components_forms_FieldDescription_types.Description;
894
- disableBulkEdit?: boolean;
895
- disableListColumn?: boolean;
896
- disableListFilter?: boolean;
897
- disabled?: boolean;
898
- hidden?: boolean;
899
- position?: "sidebar";
900
- readOnly?: boolean;
901
- style?: React.CSSProperties;
902
- width?: string;
903
- } & {
904
- hideGutter?: boolean;
905
- };
906
- fields: Field[];
907
- interfaceName?: string;
908
- type: "group";
909
- };
910
-
897
+ text: {
898
+ label: string;
899
+ value: string;
900
+ };
901
+ primaryButton: {
902
+ label: string;
903
+ value: string;
904
+ };
905
+ secondaryButton: {
906
+ label: string;
907
+ value: string;
908
+ };
909
+ };
910
+ declare const withLink: ({
911
+ appearances,
912
+ disableLabel,
913
+ ...props
914
+ }?: WithLinkProps) => GroupField;
915
+ //# sourceMappingURL=withLink.d.ts.map
916
+ //#endregion
917
+ //#region src/core/fields/withMarkets.d.ts
911
918
  type WithMarketsProps = (Omit<RelationshipField, 'type' | 'name' | 'relationTo'> & {
912
- name?: string;
919
+ name?: string;
913
920
  });
914
921
  type WithMarkets = WithMarketsProps & {
915
- type: 'withMarkets';
922
+ type: 'withMarkets';
916
923
  };
917
924
  declare const MarketDefaults: RelationshipField;
918
925
  declare const withMarkets: (options?: WithMarketsProps) => RelationshipField;
919
926
  declare const withMarketsRequired: (options?: WithMarketsProps) => RelationshipField;
920
-
927
+ //# sourceMappingURL=withMarkets.d.ts.map
928
+ //#endregion
929
+ //#region src/core/fields/withMedia.d.ts
921
930
  type WithMediaProps = (Omit<UploadField, 'type' | 'name' | 'relationTo'> & {
922
- name?: string;
923
- relationTo?: string;
931
+ name?: string;
932
+ relationTo?: string;
924
933
  });
925
934
  type WithMedia = WithMediaProps & {
926
- type: 'withMedia';
935
+ type: 'withMedia';
927
936
  };
928
937
  declare const MediaDefaults: UploadField;
929
938
  declare const withMedia: (options?: WithMediaProps) => UploadField;
930
939
  declare const withMediaRequired: (options?: WithMediaProps) => UploadField;
931
-
940
+ //# sourceMappingURL=withMedia.d.ts.map
941
+ //#endregion
942
+ //#region src/core/fields/withMedias.d.ts
932
943
  type WithMediasProps = (Omit<ArrayField, 'type' | 'name' | 'fields'> & {
933
- name?: string;
944
+ name?: string;
934
945
  });
935
946
  type WithMedias = WithMediasProps & {
936
- type: 'withMedias';
947
+ type: 'withMedias';
937
948
  };
938
949
  declare const MediasDefaults: ArrayField;
939
950
  declare const withMedias: (options?: WithMediasProps) => ArrayField;
940
951
  declare const withMediasRequired: (options?: WithMediasProps) => ArrayField;
941
-
952
+ //# sourceMappingURL=withMedias.d.ts.map
953
+ //#endregion
954
+ //#region src/core/fields/withName.d.ts
942
955
  type WithNameProps = (Omit<TextField, 'type' | 'name' | 'hasMany'> & {
943
- name?: string;
956
+ name?: string;
944
957
  });
945
958
  type WithName = WithNameProps & {
946
- type: 'withName';
959
+ type: 'withName';
947
960
  };
948
961
  declare const withName: (options?: WithNameProps) => TextField;
949
962
  declare const withNameRequired: (options?: WithNameProps) => TextField;
950
-
963
+ //# sourceMappingURL=withName.d.ts.map
964
+ //#endregion
965
+ //#region src/core/fields/withNav.d.ts
951
966
  type WithNavProps = (Omit<GroupField, 'type' | 'name' | 'fields'> & {
952
- name?: string;
953
- maxDepth?: number;
954
- disallow?: string | string[];
967
+ name?: string;
968
+ maxDepth?: number;
969
+ disallow?: string | string[];
955
970
  });
956
971
  type WithNav = WithNavProps & {
957
- type: 'withNav';
972
+ type: 'withNav';
958
973
  };
959
974
  declare const NavDefaults: GroupField;
960
- declare const withNav: ({ maxDepth, disallow, ...options }?: WithNavProps) => CollapsibleField;
961
-
975
+ declare const withNav: ({
976
+ maxDepth,
977
+ disallow,
978
+ ...options
979
+ }?: WithNavProps) => CollapsibleField;
980
+ //# sourceMappingURL=withNav.d.ts.map
981
+ //#endregion
982
+ //#region src/core/fields/withNavs.d.ts
962
983
  type WithNavsProps = (Omit<ArrayField, 'type' | 'name' | 'fields'> & {
963
- name?: string;
964
- maxDepth?: number;
965
- disallow?: string | string[];
984
+ name?: string;
985
+ maxDepth?: number;
986
+ disallow?: string | string[];
966
987
  });
967
988
  type WithNavs = WithNavsProps & {
968
- type: 'withNavs';
989
+ type: 'withNavs';
969
990
  };
970
991
  declare const NavsDefaults: ArrayField;
971
- declare const withNavs: ({ maxDepth, disallow, ...options }: WithNavsProps) => CollapsibleField;
992
+ declare const withNavs: ({
993
+ maxDepth,
994
+ disallow,
995
+ ...options
996
+ }: WithNavsProps) => CollapsibleField;
972
997
  declare function navFields(props?: {
973
- pages?: string[];
974
- blocks?: BowlBlock[];
975
- maxDepth?: number;
976
- disallow?: string | string[];
998
+ pages?: string[];
999
+ blocks?: BowlBlock[];
1000
+ maxDepth?: number;
1001
+ disallow?: string | string[];
977
1002
  }): BowlField[];
978
-
1003
+ //# sourceMappingURL=withNavs.d.ts.map
1004
+ //#endregion
1005
+ //#region src/core/fields/withOrder.d.ts
979
1006
  type WithOrderProps = (Omit<NumberField, 'type' | 'name'> & {
980
- name?: string;
981
- slug: string;
1007
+ name?: string;
1008
+ slug: CollectionSlug;
982
1009
  });
983
1010
  type WithOrder = WithOrderProps & {
984
- type: 'withOrder';
1011
+ type: 'withOrder';
985
1012
  };
986
- declare const beforeValidate: (slug: string) => FieldHook;
1013
+ declare const beforeValidate: (slug: CollectionSlug) => FieldHook;
987
1014
  declare const OrderDefaults: NumberField;
988
- declare const withOrder: ({ slug, ...options }: WithOrderProps) => NumberField;
989
- declare const withOrderRequired: ({ slug, ...options }: WithOrderProps) => NumberField;
990
-
991
- type WithRelatedProps = Omit<Partial<BlockField>, 'type' | 'name' | 'blocks'> & {
992
- name?: string;
993
- blocks: BowlBlock[];
1015
+ declare const withOrder: ({
1016
+ slug,
1017
+ ...options
1018
+ }: WithOrderProps) => NumberField;
1019
+ declare const withOrderRequired: ({
1020
+ slug,
1021
+ ...options
1022
+ }: WithOrderProps) => NumberField;
1023
+ /**
1024
+ *
1025
+ * !!! validation function should return true or string error message
1026
+ */
1027
+ //# sourceMappingURL=withOrder.d.ts.map
1028
+ //#endregion
1029
+ //#region src/core/fields/withRelated.d.ts
1030
+ type WithRelatedProps = Omit<Partial<BlocksField>, 'type' | 'name' | 'blocks'> & {
1031
+ name?: string;
1032
+ blocks: BowlBlock[];
994
1033
  };
995
1034
  type WithRelated = WithRelatedProps & {
996
- type: 'withRelated';
997
- };
998
- declare const RelatedDefaults: BlockField;
999
- declare const withRelated: (options: WithRelatedProps) => BlockField;
1000
-
1035
+ type: 'withRelated';
1036
+ };
1037
+ declare const RelatedDefaults: BlocksField;
1038
+ declare const withRelated: (options: WithRelatedProps) => BlocksField;
1039
+ //# sourceMappingURL=withRelated.d.ts.map
1040
+ //#endregion
1041
+ //#region src/core/fields/withRichText.d.ts
1042
+ declare function getMedia(payload: Payload): (node: UploadNode) => Promise<IMedia | null>;
1001
1043
  type WithRichTextProps = (Omit<RichTextField, 'type' | 'name'> & {
1002
- name?: string;
1044
+ name?: string;
1003
1045
  });
1004
1046
  type WithRichText = WithRichTextProps & {
1005
- type: 'withRichText';
1047
+ type: 'withRichText';
1006
1048
  };
1007
- declare const richTextAfterReadHook: FieldBase['hooks']['afterRead'][number];
1049
+ declare const richTextAfterReadHook: FieldHook;
1008
1050
  declare const RichTextDefaults: RichTextField;
1009
1051
  declare const withRichText: (options?: Partial<RichTextField>) => RichTextField;
1010
1052
  declare const withRichTextRequired: (options?: Partial<RichTextField>) => RichTextField;
1011
-
1053
+ //# sourceMappingURL=withRichText.d.ts.map
1054
+ //#endregion
1055
+ //#region src/core/fields/withRoles.d.ts
1012
1056
  type WithRolesProps = (Omit<SelectField, 'type' | 'name' | 'options'> & {
1013
- name?: string;
1014
- roles?: BowlRole[];
1057
+ name?: string;
1058
+ roles?: BowlRole[];
1015
1059
  });
1016
1060
  type WithRoles = WithRolesProps & {
1017
- type: 'withRoles';
1061
+ type: 'withRoles';
1018
1062
  };
1019
1063
  declare const UserRolesDefaults: SelectField;
1020
- declare const withRoles: ({ roles, ...fieldOptions }?: WithRolesProps) => SelectField;
1021
-
1064
+ declare const withRoles: ({
1065
+ roles,
1066
+ ...fieldOptions
1067
+ }?: WithRolesProps) => SelectField;
1068
+ //# sourceMappingURL=withRoles.d.ts.map
1069
+ //#endregion
1070
+ //#region src/core/fields/withSelect.d.ts
1022
1071
  type WithSelectProps = (Omit<SelectField, 'type' | 'name'> & {
1023
- name?: string;
1072
+ name?: string;
1024
1073
  });
1025
1074
  type WithSelect = WithSelectProps & {
1026
- type: 'withSelect';
1075
+ type: 'withSelect';
1027
1076
  };
1028
1077
  declare const SelectDefaults: SelectField;
1029
- declare const withSelect: (options?: Partial<SelectField>) => SelectField;
1030
- declare const withSelectRequired: (options?: Partial<SelectField>) => SelectField;
1031
-
1078
+ declare const withSelect: (options?: Partial<WithSelectProps>) => SelectField;
1079
+ declare const withSelectRequired: (options?: Partial<WithSelectProps>) => SelectField;
1080
+ //# sourceMappingURL=withSelect.d.ts.map
1081
+ //#endregion
1082
+ //#region src/core/fields/withSlug.d.ts
1032
1083
  type WithSlugProps = (Omit<TextField, 'type' | 'name' | 'hasMany'> & {
1033
- fieldToUse: string;
1084
+ fieldToUse: string;
1034
1085
  });
1035
1086
  type WithSlug = WithSlugProps & {
1036
- type: 'withSlug';
1037
- };
1038
- declare const withSlug: ({ fieldToUse, ...options }?: WithSlugProps) => TextField;
1039
- declare const withSlugRequired: ({ fieldToUse, ...options }?: WithSlugProps) => TextField;
1040
-
1087
+ type: 'withSlug';
1088
+ };
1089
+ declare const withSlug: ({
1090
+ fieldToUse,
1091
+ ...options
1092
+ }?: WithSlugProps) => TextField;
1093
+ declare const withSlugRequired: ({
1094
+ fieldToUse,
1095
+ ...options
1096
+ }?: WithSlugProps) => TextField;
1097
+ //# sourceMappingURL=withSlug.d.ts.map
1098
+ //#endregion
1099
+ //#region src/core/fields/withTemplate.d.ts
1041
1100
  type WithTemplateProps = (Omit<RelationshipField, 'type' | 'name' | 'relationTo'> & {
1042
- slugToUse: string;
1101
+ slugToUse: string;
1043
1102
  });
1044
1103
  type WithTemplate = WithTemplateProps & {
1045
- type: 'withTemplate';
1104
+ type: 'withTemplate';
1046
1105
  };
1047
1106
  declare const TemplateDefaults: RelationshipField;
1048
- declare const withTemplate: ({ slugToUse, ...options }: WithTemplateProps) => RelationshipField;
1049
- declare const withTemplateRequired: ({ slugToUse, ...options }: WithTemplateProps) => RelationshipField;
1050
-
1107
+ declare const withTemplate: ({
1108
+ slugToUse,
1109
+ ...options
1110
+ }: WithTemplateProps) => RelationshipField;
1111
+ declare const withTemplateRequired: ({
1112
+ slugToUse,
1113
+ ...options
1114
+ }: WithTemplateProps) => RelationshipField;
1115
+ //# sourceMappingURL=withTemplate.d.ts.map
1116
+ //#endregion
1117
+ //#region src/core/fields/withTenants.d.ts
1051
1118
  type WithTenantsProps = (Omit<RelationshipField, 'type' | 'name' | 'hasMany' | 'relationTo'> & {
1052
- name?: string;
1053
- relationTo?: string | string[];
1119
+ name?: string;
1120
+ relationTo?: string | string[];
1054
1121
  });
1055
1122
  type WithTenants = WithTenantsProps & {
1056
- type: 'withTenants';
1123
+ type: 'withTenants';
1057
1124
  };
1058
1125
  declare const TenantsDefault: RelationshipField;
1059
1126
  declare const withTenants: (srcOptions?: WithTenantsProps) => RelationshipField;
1060
-
1127
+ //# sourceMappingURL=withTenants.d.ts.map
1128
+ //#endregion
1129
+ //#region src/core/fields/withText.d.ts
1061
1130
  type WithTextProps = (Omit<TextField, 'type' | 'name' | 'hasMany'> & {
1062
- name?: string;
1131
+ name?: string;
1063
1132
  });
1064
1133
  type WithText = WithTextProps & {
1065
- type: 'withText';
1134
+ type: 'withText';
1066
1135
  };
1067
1136
  declare const TextDefaults: TextField;
1068
1137
  declare const withText: (options?: WithTextProps) => TextField;
1069
1138
  declare const withTextRequired: (options?: WithTextProps) => TextField;
1070
-
1139
+ //# sourceMappingURL=withText.d.ts.map
1140
+ //#endregion
1141
+ //#region src/core/fields/withTitle.d.ts
1071
1142
  type WithTitleProps = (Omit<TextField, 'type' | 'name' | 'hasMany'> & {
1072
- name?: string;
1143
+ name?: string;
1073
1144
  });
1074
1145
  type WithTitle = WithTitleProps & {
1075
- type: 'withTitle';
1146
+ type: 'withTitle';
1076
1147
  };
1077
1148
  declare const withTitle: (options?: WithTitleProps) => TextField;
1078
1149
  declare const withTitleRequired: (options?: WithTitleProps) => TextField;
1079
-
1150
+ //# sourceMappingURL=withTitle.d.ts.map
1151
+ //#endregion
1152
+ //#region src/core/logger/logger.d.ts
1080
1153
  declare function log(...rest: unknown[]): void;
1081
-
1082
- declare const locales: any[];
1083
- type Locale = typeof locales[number];
1084
- type LocalizedText = {
1085
- [key in Locale]?: string;
1086
- };
1087
- declare function getTranslation(path: string, defaultText: string | undefined, locale: Locale, node?: {
1088
- [key: string]: any;
1154
+ //# sourceMappingURL=logger.d.ts.map
1155
+ //#endregion
1156
+ //#region src/core/translations/translations.d.ts
1157
+ declare const locales: string[];
1158
+ type Locale$1 = typeof locales[number];
1159
+ type LocalizedText = { [key in Locale$1]?: string };
1160
+ declare function getTranslation(path: string, defaultText: string | undefined, locale: Locale$1, node?: {
1161
+ [key: string]: any;
1089
1162
  }, fullPath?: string): string;
1090
1163
  declare function getTranslations(path: string, defaultText?: string): LocalizedText;
1091
1164
  declare function slugToLabels(slug: string): {
1092
- singular: LocalizedText;
1093
- plural: LocalizedText;
1165
+ singular: LocalizedText;
1166
+ plural: LocalizedText;
1094
1167
  };
1095
1168
  declare function slugToLabel(slug: string): LocalizedText;
1096
1169
  declare function translateTab(tab: Tab): Tab;
1097
1170
  declare function translateTabs(tabs: Tab[]): Tab[];
1098
1171
  declare function translateBlock(block: Block): Block;
1099
1172
  declare function translateBlocks(blocks: Block[]): Block[];
1100
- declare function translateField(field: Field): payload_types.ArrayField | BlockField | payload_types.CheckboxField | payload_types.CodeField | payload_types.CollapsibleField | payload_types.DateField | payload_types.EmailField | payload_types.GroupField | payload_types.JSONField | payload_types.NumberField | payload_types.PointField | payload_types.RadioField | payload_types.RelationshipField | payload_types.RichTextField<any, any, {}> | payload_types.RowField | payload_types.SelectField | payload_types.TabsField | payload_types.TextField | payload_types.TextareaField | payload_types.UIField | payload_types.UploadField;
1173
+ declare function translateField(field: Field): Field;
1101
1174
  declare function translateFields(fields: Field[]): Field[];
1102
- declare function translateCollection(config: CollectionConfig): CollectionConfig;
1175
+ declare function translateCollection(config: CollectionConfig | Block): Block | CollectionConfig;
1103
1176
  declare function translateGlobal(config: GlobalConfig): GlobalConfig;
1104
1177
  declare function logMissingTranslations(): void;
1105
-
1178
+ //#endregion
1179
+ //#region src/core/utils/getPreviewURL.d.ts
1106
1180
  type PublicURL = {
1107
- marketId: string;
1108
- localeId: string;
1109
- templateId: string;
1110
- documentId: string;
1111
- _status?: string;
1112
- _live?: boolean;
1113
- _token?: string;
1181
+ marketId: string;
1182
+ localeId: string;
1183
+ templateId: string;
1184
+ documentId: string;
1185
+ _status?: string;
1186
+ _live?: boolean;
1187
+ _token?: string;
1114
1188
  };
1115
1189
  declare function getPreviewPublicURL(qs: PublicURL): string;
1116
1190
  declare function getPreviewURL(doc: Record<string, any>, locale: string, _token?: string): string;
1117
1191
  declare function getLivePreviewURL(args: {
1118
- data: Record<string, any>;
1119
- documentInfo: ContextType;
1120
- locale: Locale$1;
1121
- }): string;
1122
-
1192
+ collectionConfig?: SanitizedCollectionConfig;
1193
+ data: Record<string, any>;
1194
+ globalConfig?: SanitizedGlobalConfig;
1195
+ locale: Locale;
1196
+ req: PayloadRequest;
1197
+ }): Promise<string> | string;
1198
+ //# sourceMappingURL=getPreviewURL.d.ts.map
1199
+ //#endregion
1200
+ //#region src/core/utils/mergeCollections.d.ts
1123
1201
  declare function mergeCollections(source?: (BowlCollection | BowlCollectionFunction)[], target?: (BowlCollection | BowlCollectionFunction)[]): (BowlCollection | BowlCollectionFunction)[];
1124
-
1202
+ //# sourceMappingURL=mergeCollections.d.ts.map
1203
+ //#endregion
1204
+ //#region src/core/utils/mergeFields.d.ts
1125
1205
  declare function mergeFields(source?: Field[], target?: Field[], reverse?: boolean): Field[];
1126
-
1206
+ //# sourceMappingURL=mergeFields.d.ts.map
1207
+ //#endregion
1208
+ //#region src/core/utils/mergeGlobals.d.ts
1127
1209
  declare function mergeGlobals(source?: (BowlGlobal | BowlGlobalFunction)[], target?: (BowlGlobal | BowlGlobalFunction)[]): (BowlGlobal | BowlGlobalFunction)[];
1128
-
1210
+ //# sourceMappingURL=mergeGlobals.d.ts.map
1211
+ //#endregion
1212
+ //#region src/core/utils/sortByGroup.d.ts
1129
1213
  type GroupKey = {
1130
- id: string;
1131
- key?: string;
1132
- value?: string;
1214
+ id: string;
1215
+ key?: string;
1216
+ value?: string;
1133
1217
  };
1134
1218
  declare function sortByGroup<T extends (CollectionConfig | GlobalConfig) = CollectionConfig | GlobalConfig>(collectionsOrGlobals: T[]): T[];
1135
-
1219
+ //# sourceMappingURL=sortByGroup.d.ts.map
1220
+ //#endregion
1221
+ //#region src/core/fields/withAnchor.d.ts
1136
1222
  type WithAnchorProps = (Omit<GroupField, 'type' | 'name' | 'fields'> & {
1137
- name?: string;
1223
+ name?: string;
1138
1224
  });
1139
1225
  type WithAnchor = WithAnchorProps & {
1140
- type: 'withAnchor';
1226
+ type: 'withAnchor';
1141
1227
  };
1142
-
1228
+ //#endregion
1229
+ //#region src/core/fields/withSeoWeight.d.ts
1143
1230
  type WithSeoWeightProps = (Omit<SelectField, 'type' | 'name' | 'options'> & {
1144
- name?: string;
1145
- options?: Option$1[];
1231
+ name?: string;
1232
+ options?: Option$1[];
1146
1233
  });
1147
1234
  type WithSeoWeight = WithSeoWeightProps & {
1148
- type: 'withSeoWeight';
1235
+ type: 'withSeoWeight';
1149
1236
  };
1150
-
1237
+ //#endregion
1238
+ //#region src/fields/color-picker/index.d.ts
1151
1239
  type WithColorProps = (Omit<TextField, 'type' | 'name' | 'hasMany'> & {
1152
- name?: string;
1240
+ name?: string;
1153
1241
  });
1154
1242
  type WithColor = WithColorProps & {
1155
- type: 'withColor';
1243
+ type: 'withColor';
1156
1244
  };
1157
1245
  declare const ColorConfig: TextField;
1158
1246
  declare const withColor: (options?: WithColorProps) => TextField;
1159
1247
  declare const withColorRequired: (options?: WithColorProps) => TextField;
1160
-
1161
- declare const ColorCell: React__default.FC<Props$3>;
1162
-
1163
- declare const ColorField: React__default.FC<Props$4>;
1164
-
1165
- type FieldPermissions$1 = {
1166
- create: {
1167
- permission: boolean;
1168
- };
1169
- read: {
1170
- permission: boolean;
1171
- };
1172
- update: {
1173
- permission: boolean;
1174
- };
1175
- fields?: {
1176
- [field: string]: FieldPermissions$1;
1177
- };
1178
- };
1179
- type DebugFieldType = FieldBase & {
1180
- type: keyof FieldTypes;
1181
- };
1182
- type DebugFieldProps = DebugFieldType & {
1183
- path?: string;
1184
- fieldTypes: FieldTypes;
1185
- permissions: FieldPermissions$1;
1186
- detectLoop?: boolean;
1187
- };
1188
-
1189
- declare const debugField: (options?: Partial<DebugFieldType>) => DebugFieldType;
1190
-
1191
- declare const DebugField: React__default.FC<DebugFieldProps>;
1192
-
1193
- type FieldPermissions = {
1194
- create: {
1195
- permission: boolean;
1196
- };
1197
- read: {
1198
- permission: boolean;
1199
- };
1200
- update: {
1201
- permission: boolean;
1202
- };
1203
- fields?: {
1204
- [field: string]: FieldPermissions;
1205
- };
1206
- };
1207
- type IStatic = FieldBase & {
1208
- type: keyof FieldTypes;
1209
- };
1210
- type StaticProps = IStatic & {
1211
- path?: string;
1212
- fieldTypes: FieldTypes;
1213
- permissions: FieldPermissions;
1214
- };
1215
- type StaticField = UIField & {};
1216
-
1217
- declare const withUIStatic: (options?: Partial<UIField>) => StaticField;
1218
-
1219
- declare const UIStaticCell: React__default.FC<Props$3>;
1220
-
1221
- declare const UIStaticField: React__default.FC<StaticProps>;
1222
-
1248
+ //# sourceMappingURL=index.d.ts.map
1249
+ //#endregion
1250
+ //#region src/types.d.ts
1251
+ type AcceptedLanguages = (typeof acceptedLanguages)[number];
1223
1252
  type BowlTab = Omit<Tab, 'fields'> & {
1224
- fields: BowlField[];
1225
- name?: string;
1253
+ fields: BowlField[];
1254
+ name?: string;
1226
1255
  };
1227
1256
  type BowlArrayField = Omit<ArrayField, 'fields'> & {
1228
- fields: BowlField[];
1257
+ fields: BowlField[];
1229
1258
  };
1230
- type BowlBlockField = Omit<BlockField, 'blocks'> & {
1231
- blocks: BowlBlock[];
1259
+ type BowlBlocksField = Omit<BlocksField, 'blocks'> & {
1260
+ blocks: BowlBlock[];
1232
1261
  };
1233
1262
  type BowlCollapsibleField = Omit<CollapsibleField, 'fields'> & {
1234
- fields: BowlField[];
1263
+ fields: BowlField[];
1235
1264
  };
1236
- type BowlGroupField = Omit<GroupField, 'fields'> & {
1237
- fields: BowlField[];
1265
+ type BowlGroupField = Omit<NamedGroupField, 'fields'> & {
1266
+ fields: BowlField[];
1267
+ } | Omit<UnnamedGroupField, 'fields'> & {
1268
+ fields: BowlField[];
1238
1269
  };
1239
1270
  type BowlRowField = Omit<RowField, 'fields'> & {
1240
- fields: BowlField[];
1271
+ fields: BowlField[];
1241
1272
  };
1242
1273
  type BowlTabsField = Omit<TabsField, 'tabs'> & {
1243
- tabs: BowlTab[];
1274
+ tabs: BowlTab[];
1244
1275
  };
1245
- type BowlField = Exclude<Field, ArrayField | BlockField | CollapsibleField | GroupField | RowField | TabsField> | BowlArrayField | BowlBlockField | BowlCollapsibleField | BowlGroupField | BowlRowField | BowlTabsField | WithAbstract | WithAnchor | WithCategory | WithCheckbox | WithColor | WithComponents | WithDate | WithDescription | WithId | WithIsActive | WithIsDefault | WithLink | WithMarkets | WithMedia | WithMedias | WithName | WithNav | WithNavs | WithOrder | WithRelated | WithRichText | WithSelect | WithSeoWeight | WithSlug | WithTemplate | WithTenants | WithText | WithTitle | WithRoles;
1276
+ type BowlField = Exclude<Field, ArrayField | BlocksField | CollapsibleField | GroupField | RowField | TabsField> | BowlArrayField | BowlBlocksField | BowlCollapsibleField | BowlGroupField | BowlRowField | BowlTabsField | WithAbstract | WithAnchor | WithCategory | WithCheckbox | WithColor | WithComponents | WithDate | WithDescription | WithId | WithIsActive | WithIsDefault | WithLink | WithMarkets | WithMedia | WithMedias | WithName | WithNav | WithNavs | WithOrder | WithRelated | WithRichText | WithSelect | WithSeoWeight | WithSlug | WithTemplate | WithTenants | WithText | WithTitle | WithRoles;
1246
1277
  type BowlBlock = Block | WithBlock;
1247
- type BowlCollection = WithCollection | WithPage | WithStatic | WithMenu | WithAction | WithAddress | WithUser | WithEndUser | CollectionConfig & {
1248
- type?: string;
1249
- views?: Record<string, AdminView>;
1278
+ type BowlCollection = WithCollection | WithPage | WithStatic | WithMenu | WithAction | WithAddress | WithUser | WithEndUser | Omit<CollectionConfig, 'fields'> & {
1279
+ fields: BowlField[];
1280
+ type?: string;
1281
+ views?: Record<string, AdminViewConfig>;
1250
1282
  };
1251
1283
  type BowlGlobal = WithGlobal | GlobalConfig & {
1252
- type?: string;
1253
- views?: Record<string, AdminView>;
1284
+ type?: string;
1285
+ views?: Record<string, AdminViewConfig>;
1254
1286
  };
1255
1287
  type BowlCollectionFunction = ((options: BowlOptions) => BowlCollection);
1256
1288
  type BowlGlobalFunction = (options: BowlOptions) => BowlGlobal;
1257
1289
  type BowlConfig = (Omit<Config, 'collections' | 'globals'> & {
1258
- collections?: (BowlCollection | BowlCollectionFunction)[];
1259
- globals?: (BowlGlobal | BowlGlobalFunction)[];
1290
+ collections?: (BowlCollection | BowlCollectionFunction)[];
1291
+ globals?: (BowlGlobal | BowlGlobalFunction)[];
1260
1292
  });
1261
- type BowlSlug = {
1262
- media: string;
1263
- category: string;
1264
- emailConfig: string;
1265
- label: string;
1266
- locale: string;
1267
- market: string;
1268
- app: string;
1269
- menu: string;
1270
- redirect: string;
1271
- template: string;
1272
- legalNotice: string;
1273
- consentPreference: string;
1274
- users: string;
1275
- endUsers: string;
1276
- continent: string;
1277
- country: string;
1278
- countryZone: string;
1279
- language: string;
1280
- municipality: string;
1281
- province: string;
1282
- region: string;
1283
- subContinent: string;
1284
- [key: string]: string;
1293
+ type BowlSlug = Record<string, CollectionSlug> & {
1294
+ address: CollectionSlug;
1295
+ app: CollectionSlug;
1296
+ category: CollectionSlug;
1297
+ consentPreference: CollectionSlug;
1298
+ emailConfig: CollectionSlug;
1299
+ endUsers: CollectionSlug;
1300
+ label: CollectionSlug;
1301
+ legalNotice: CollectionSlug;
1302
+ locale: CollectionSlug;
1303
+ market: CollectionSlug;
1304
+ media: CollectionSlug;
1305
+ menu: CollectionSlug;
1306
+ redirect: CollectionSlug;
1307
+ template: CollectionSlug;
1308
+ users: CollectionSlug;
1309
+ continent: CollectionSlug;
1310
+ country: CollectionSlug;
1311
+ countryZone: CollectionSlug;
1312
+ language: CollectionSlug;
1313
+ municipality: CollectionSlug;
1314
+ province: CollectionSlug;
1315
+ region: CollectionSlug;
1316
+ subContinent: CollectionSlug;
1285
1317
  };
1286
1318
  type BowlGroup = {
1287
- content: string;
1288
- nav: string;
1289
- actions: string;
1290
- gdpr: string;
1291
- users: string;
1292
- config: string;
1293
- i18n: string;
1294
- [key: string]: string;
1319
+ content: string;
1320
+ nav: string;
1321
+ actions: string;
1322
+ gdpr: string;
1323
+ users: string;
1324
+ config: string;
1325
+ i18n: string;
1326
+ [key: string]: string;
1295
1327
  };
1296
1328
  /**
1297
1329
  * Defaults user roles and endUser roles available on the bowl plugin configuration:
@@ -1303,69 +1335,87 @@ type BowlGroup = {
1303
1335
  * user: endUser authenticated role with reserved data.
1304
1336
  *
1305
1337
  */
1306
- declare const roles: {
1307
- readonly Admin: "admin";
1308
- readonly Contributor: "contributor";
1309
- readonly Editor: "editor";
1310
- readonly Guest: "guest";
1311
- readonly User: "user";
1338
+ declare const roles$1: {
1339
+ readonly Admin: "admin";
1340
+ readonly Contributor: "contributor";
1341
+ readonly Editor: "editor";
1342
+ readonly Guest: "guest";
1343
+ readonly User: "user";
1312
1344
  };
1313
1345
  declare const rolesUser: BowlRole[];
1314
1346
  declare const rolesEndUser: BowlRole[];
1315
1347
  type Values<T> = T[keyof T];
1316
- type BowlRole = Values<typeof roles> | string;
1348
+ type BowlRole = Values<typeof roles$1> | string;
1317
1349
  type BowlOptions = {
1318
- actions: string[];
1319
- bowlCollections: BowlCollection[];
1320
- bowlGlobals: BowlGlobal[];
1321
- collections: string[];
1322
- defaultLocale: string;
1323
- defaultMarket: string;
1324
- group: BowlGroup;
1325
- locales: string[] | Locale$1[];
1326
- menu: {
1327
- blocks: BowlBlock[];
1328
- };
1329
- pages: string[];
1330
- plugins: BowlPlugin[];
1331
- roles: typeof roles & Record<string, string>;
1332
- rolesEndUser: BowlRole[];
1333
- rolesList: BowlRole[];
1334
- rolesUser: BowlRole[];
1335
- slug: BowlSlug;
1336
- translations: Resource;
1337
- users: string[];
1350
+ actions: CollectionSlug[];
1351
+ bowlCollections: BowlCollection[];
1352
+ bowlGlobals: BowlGlobal[];
1353
+ collections: CollectionSlug[];
1354
+ defaultLocale: string;
1355
+ defaultMarket: string;
1356
+ group: BowlGroup;
1357
+ locales: string[] | Locale[];
1358
+ menu: {
1359
+ blocks: BowlBlock[];
1360
+ };
1361
+ pages: CollectionSlug[];
1362
+ plugins: BowlPlugin[];
1363
+ roles: typeof roles$1 & Record<string, string>;
1364
+ rolesEndUser: BowlRole[];
1365
+ rolesList: BowlRole[];
1366
+ rolesUser: BowlRole[];
1367
+ slug: BowlSlug;
1368
+ translations: Resource;
1369
+ users: CollectionSlug[];
1338
1370
  };
1339
1371
  type BowlInitOptions = {
1340
- defaultMarket?: string;
1341
- group?: Partial<BowlGroup>;
1342
- menu?: {
1343
- blocks: BowlBlock[];
1344
- };
1345
- slug?: Partial<BowlSlug>;
1346
- plugins?: BowlPlugin[];
1347
- roles?: typeof roles & Record<string, string>;
1348
- rolesUser?: BowlRole[];
1349
- rolesEndUser?: BowlRole[];
1372
+ defaultMarket?: string;
1373
+ group?: Partial<BowlGroup>;
1374
+ menu?: {
1375
+ blocks: BowlBlock[];
1376
+ };
1377
+ slug?: Partial<BowlSlug>;
1378
+ plugins?: BowlPlugin[];
1379
+ roles?: typeof roles$1 & Record<string, string>;
1380
+ rolesUser?: BowlRole[];
1381
+ rolesEndUser?: BowlRole[];
1350
1382
  };
1351
1383
  type BowlPlugin = (config: BowlConfig, bowlOptions: BowlInitOptions) => BowlConfig;
1352
-
1353
- declare const MenuItem: (pages: string[], customBlocks?: BowlBlock[], depth?: number, maxDepth?: number) => BowlBlock;
1354
-
1355
- declare function withComponentBlock({ slug, fields, optionsFields }: {
1356
- slug: string;
1357
- fields?: BowlField[];
1358
- optionsFields?: BowlField[];
1384
+ type SanitizedBowlConfig = Omit<Config, 'custom'> & {
1385
+ custom: Record<string, any> & {
1386
+ bowl: BowlOptions;
1387
+ };
1388
+ };
1389
+ //#endregion
1390
+ //#region src/blocks/MenuItem.d.ts
1391
+ declare const MenuItem: (pages: CollectionSlug[], customBlocks?: BowlBlock[], depth?: number, maxDepth?: number) => BowlBlock;
1392
+ //# sourceMappingURL=MenuItem.d.ts.map
1393
+ //#endregion
1394
+ //#region src/blocks/withComponentBlock.d.ts
1395
+ declare function withComponentBlock({
1396
+ slug,
1397
+ fields,
1398
+ optionsFields
1399
+ }: {
1400
+ slug: string;
1401
+ fields?: BowlField[];
1402
+ optionsFields?: BowlField[];
1359
1403
  }): BowlBlock;
1360
-
1361
- declare const bowl: (sourceOptions?: BowlInitOptions) => (sourceConfig: BowlConfig) => Config;
1362
-
1404
+ //# sourceMappingURL=withComponentBlock.d.ts.map
1405
+ //#endregion
1406
+ //#region src/bowl.d.ts
1407
+ declare const bowl: (sourceOptions?: BowlInitOptions) => (sourceConfig: BowlConfig) => Promise<Config>;
1408
+ //# sourceMappingURL=bowl.d.ts.map
1409
+ //#endregion
1410
+ //#region src/mapper.d.ts
1363
1411
  declare function toCollection(collection: BowlCollection): CollectionConfig;
1364
1412
  declare function toGlobal(collection: BowlGlobal): GlobalConfig;
1365
1413
  declare function toField(item: BowlField): Field;
1366
1414
  declare function toBlock(item: BowlBlock): Block;
1367
1415
  declare function toTab(item: BowlTab): Tab;
1368
-
1416
+ //# sourceMappingURL=mapper.d.ts.map
1417
+ //#endregion
1418
+ //#region src/options.d.ts
1369
1419
  declare const defaultSlug: BowlSlug;
1370
1420
  declare const defaultGroup: BowlGroup;
1371
1421
  declare const defaultLocales: string[];
@@ -1373,11 +1423,8 @@ declare const defaultLocale: string;
1373
1423
  declare const defaultMarket: string;
1374
1424
  declare const options: BowlOptions;
1375
1425
  declare const internalSlugs: string[];
1426
+ //# sourceMappingURL=options.d.ts.map
1376
1427
 
1377
- declare const Icon: React__default.FC;
1378
-
1379
- declare const Logo: React__default.FC;
1380
-
1381
- declare function webpack(sourceConfig: BowlConfig): (config: any) => any;
1382
-
1383
- export { ActionDefault, AddressDefault, AfterOptHook, BlockDefaults, BowlArrayField, BowlBlock, BowlBlockField, BowlCollapsibleField, BowlCollection, BowlCollectionFunction, BowlConfig, BowlField, BowlGlobal, BowlGlobalFunction, BowlGroup, BowlGroupField, BowlInitOptions, BowlOptions, BowlPlugin, BowlRole, BowlRowField, BowlSlug, BowlTab, BowlTabsField, CategoryDefaults, CategoryMenu, CategoryMenuProps, CategoryTree, CategoryTreeConflictProps, CategoryTreeItem, CategoryTreeItems, CategoryTreeProps, CheckboxDefaults, CollectionDefault, ColorCell, ColorConfig, ColorField, ComponentsDefaults, CustomEditModal, CustomEditModalProps, DataTree, DataTreeDragItem, DataTreeInstance, DataTreeItem, DataTreeItemLi, DataTreeItemProps, DataTreeProps, DataTreeProvider, DataTreeRenameItem, DateDefaults, DebugField, DecoratedList, DecoratedListProps, EndUserDefault, FindGlobalOptions, FindOptions, GlobalDefault, GroupKey, ICache, IEndUserConsentPreference, IEndUserData, IImportItem, IPage, IPageFull, IPagination, IRelation, IUndecoratedMenu, IUndecoratedMenuBase, IUndecoratedMenuCategory, IUndecoratedMenuCustom, IUndecoratedMenuGroup, IUndecoratedMenuItem, IUndecoratedMenuLink, IUndecoratedMenuPage, IUndecoratedNavItem, Icon, ImportExportList, ImportExportListProps, ImportExportRedirectList, ImportLogInvalidTypes, ImportLogType, ImportMode, InMemoryCache, InMemoryCacheOptions, KeyMapper, LeaveModal, LeaveWithoutSavingModal, LeaveWithoutSavingModalProps, LocalizedDescription, LocalizedDescriptionProps, Logo, MAX_INT, MarketDefaults, MediaDefaults, MediasDefaults, MenuItem, MixerContext, NavDefaults, NavsDefaults, Option, OrderDefaults, PageDefault, PublicURL, Publish, ROOT_ITEM, RelatedDefaults, RichTextDefaults, RouteConflict, Save, SaveDraft, SelectDefaults, StaticCollectionConfig, StaticCollectionDefault, TemplateDefaults, TenantsDefault, TextDefaults, TreeItemData, TreeItems, UIStaticCell, UIStaticField, UserDefault, UserRolesDefaults, WithAbstract, WithAbstractProps, WithAction, WithActionProps, WithAddress, WithAddressProps, WithBlock, WithBlockProps, WithCategory, WithCategoryProps, WithCheckbox, WithCheckboxProps, WithCollection, WithCollectionProps, WithColor, WithColorProps, WithComponents, WithComponentsProps, WithDate, WithDateProps, WithDescription, WithDescriptionProps, WithEndUser, WithEndUserProps, WithGlobal, WithGlobalProps, WithId, WithIdProps, WithIsActive, WithIsActiveProps, WithIsDefault, WithIsDefaultProps, WithLink, WithLinkOptions, WithLinkProps, WithMarkets, WithMarketsProps, WithMedia, WithMediaProps, WithMedias, WithMediasProps, WithMenu, WithMenuProps, WithName, WithNameProps, WithNav, WithNavProps, WithNavs, WithNavsProps, WithOrder, WithOrderProps, WithPage, WithPageProps, WithRelated, WithRelatedProps, WithRichText, WithRichTextProps, WithRoles, WithRolesProps, WithSelect, WithSelectProps, WithSlug, WithSlugProps, WithStatic, WithStaticProps, WithTemplate, WithTemplateProps, WithTenants, WithTenantsProps, WithText, WithTextProps, WithTitle, WithTitleProps, WithUser, WithUserProps, afterCategoryChangeHook, afterCategoryDeleteHook, afterChangeActionHook, afterCollectionReadHook, afterMenuReadHook, afterPageChangeHook, afterPageDeleteHook, afterPageOperationHook, afterPageReadHook, afterReadItem, afterReadItems, afterStaticReadHook, appearanceOptions, beforeChangeActionHook, beforeDuplicateCollectionHook, beforeValidate, beforeValidateActionHook, bowl, collectionBulkPatch, collectionDetailGet, collectionExportGet, collectionImportPost, collectionIndexGet, collectionUpdatePatch, debugField, decorateCategories_, decorateCategory_, decorateHref_, decorateHrefs_, decorateMenuCategory_, decorateMenuGroup_, decorateMenuItem_, decorateMenuLink_, decorateMenuPage_, decorateMenuRoute_, decorateMenu_, decorateNavItem_, decorateNav_, decorateNavs_, decorateRichText_, decorateRichTexts_, decorateSchema_, decorateSchemas_, decrypt, decryptField, bowl as default, defaultGroup, defaultLocale, defaultLocales, defaultMarket, defaultSlug, encrypt, encryptData, encryptField, endUserExistPost, endUserForgotPost, endUserPasswordPost, endUserResetPost, filterRoutes, findCollection, findGlobal, getApiUrl, getCollectionItem, getCollectionItems, getEachMarketLocale, getGlobalItems, getLivePreviewURL, getLocale, getNewCategoriesFromChanges, getNumericParam, getObjectParam, getPages, getPagination, getPreviewPublicURL, getPreviewURL, getRoute, getRouteByCategoryAndLocale, getRouteByItemAndLocale, getRoutes, getSearchUrl, getStaticLoader, getStringParam, getSubRequest, getTranslation, getTranslations, getTreeItemClassName, hasMarket, hasRole, importExportListWithParser, internalSlugs, isAdmin, isAdminOrOwn, isAdminOrSelf, isMixerRequest, isOwn, isPageRole, isRelation, isRole, isSelf, isTenant, isUndecoratedNavItem, keyWithRequest, localeGet, localizeCollection, localizeItem, log, logMissingTranslations, menuDetailGet, menuIndexGet, mergeCollections, mergeFields, mergeGlobals, modalSlug, navFields, optinGet, options, optoutGet, orAccess, pageDetailGet, pageIndexGet, redirectParser, richTextAfterReadHook, roles, rolesEndUser, rolesUser, routeChangesPost, routeGet, routePost, routePostHandler, setMixerContext, slugToLabel, slugToLabels, sortByGroup, sortCollection, staticCollectionLoaders, staticCollections, staticDetailGet, staticIndexGet, storeGet, toBlock, toCollection, toField, toGlobal, toTab, translateBlock, translateBlocks, translateCollection, translateField, translateFields, translateGlobal, translateTab, translateTabs, webpack, whereCollection, withAbstract, withAbstractRequired, withAction, withAddress, withBlock, withCategory, withCategoryRequired, withCheckbox, withCheckboxRequired, withCollection, withColor, withColorRequired, withComponentBlock, withComponents, withDate, withDateRequired, withDescription, withDescriptionRequired, withEndUser, withGlobal, withId, withIdRequired, withIsActive, withIsActiveRequired, withIsDefault, withIsDefaultRequired, withLink, withLocalizedDescription, withMarkets, withMarketsRequired, withMedia, withMediaRequired, withMedias, withMediasRequired, withMenu, withName, withNameRequired, withNav, withNavs, withOrder, withOrderRequired, withPage, withRelated, withRichText, withRichTextRequired, withRoles, withSelect, withSelectRequired, withSlug, withSlugRequired, withStaticCollection, withTemplate, withTemplateRequired, withTenants, withText, withTextRequired, withTitle, withTitleRequired, withUIStatic, withUser };
1428
+ //#endregion
1429
+ export { AcceptedLanguages, ActionDefault, AddressDefault, AfterOptHook, BlockDefaults, BowlArrayField, BowlBlock, BowlBlocksField, BowlCollapsibleField, BowlCollection, BowlCollectionFunction, BowlConfig, BowlField, BowlGlobal, BowlGlobalFunction, BowlGroup, BowlGroupField, BowlInitOptions, BowlOptions, BowlPlugin, BowlRole, BowlRowField, BowlSlug, BowlTab, BowlTabsField, CategoryDefaults, CategoryTreeItem, CategoryTreeItems, CheckboxDefaults, CollectionDefault, ColorConfig, ComponentsDefaults, CronConfig, DateDefaults, EndUserDefault, FindGlobalOptions, FindOptions, GlobalDefault, GroupKey, ICache, IEndUserConsentPreference, IEndUserData, IPage, IPageFull, IPagination, IRelation, IUndecoratedMenu, IUndecoratedMenuBase, IUndecoratedMenuCategory, IUndecoratedMenuCustom, IUndecoratedMenuGroup, IUndecoratedMenuItem, IUndecoratedMenuLink, IUndecoratedMenuPage, IUndecoratedNavItem, ImportLogInvalidTypes, ImportLogType, ImportMode, InMemoryCache, InMemoryCacheOptions, KeyMapper, MAX_INT, MarketDefaults, MediaDefaults, MediasDefaults, MenuItem, MixerContext, NavDefaults, NavsDefaults, Option, OrderDefaults, PageDefault, PublicURL, QUEUE_NAME, ROOT_ITEM, RelatedDefaults, RichTextDefaults, SanitizedBowlConfig, SelectDefaults, StaticCollectionConfig, StaticCollectionDefault, TASK_NAME, TASK_OUTPUT_SCHEMA, TemplateDefaults, TenantsDefault, TextDefaults, USE_EXPIRE_DATE, UserDefault, UserRolesDefaults, WithAbstract, WithAbstractProps, WithAction, WithActionProps, WithAddress, WithAddressProps, WithBlock, WithBlockProps, WithCategory, WithCategoryProps, WithCheckbox, WithCheckboxProps, WithCollection, WithCollectionProps, WithColor, WithColorProps, WithComponents, WithComponentsProps, WithDate, WithDateProps, WithDescription, WithDescriptionProps, WithEndUser, WithEndUserProps, WithGlobal, WithGlobalProps, WithId, WithIdProps, WithIsActive, WithIsActiveProps, WithIsDefault, WithIsDefaultProps, WithLink, WithLinkOptions, WithLinkProps, WithMarkets, WithMarketsProps, WithMedia, WithMediaProps, WithMedias, WithMediasProps, WithMenu, WithMenuProps, WithName, WithNameProps, WithNav, WithNavProps, WithNavs, WithNavsProps, WithOrder, WithOrderProps, WithPage, WithPageProps, WithRelated, WithRelatedProps, WithRichText, WithRichTextProps, WithRoles, WithRolesProps, WithSelect, WithSelectProps, WithSlug, WithSlugProps, WithStatic, WithStaticProps, WithTemplate, WithTemplateProps, WithTenants, WithTenantsProps, WithText, WithTextProps, WithTitle, WithTitleProps, WithUser, WithUserProps, afterCategoryChangeHook, afterCategoryDeleteHook, afterChangeActionHook, afterCollectionReadHook, afterMenuReadHook, afterPageChangeHook, afterPageDeleteHook, afterPageOperationHook, afterPageReadHook, afterReadUpload, appearanceOptions, beforeChangeActionHook, beforeOperationHook, beforeValidate, beforeValidateActionHook, bowl, collectionBulkPatch, collectionDetailGet, collectionExportGet, collectionImportPost, collectionIndexGet, collectionUpdatePatch, configureStaticJobs, decorateCategories_, decorateCategory_, decorateComponents_, decorateHref_, decorateHrefs_, decorateMenuCategory_, decorateMenuGroup_, decorateMenuItem_, decorateMenuLink_, decorateMenuPage_, decorateMenuRoute_, decorateMenu_, decorateNavItem_, decorateNav_, decorateNavs_, decorateRichText_, decorateRichTexts_, decorateSchema_, decorateSchemas_, decorateUpload_, decorateUploads_, decrypt, decryptField, bowl as default, defaultGroup, defaultLocale, defaultLocales, defaultMarket, defaultSlug, encrypt, encryptData, encryptField, endUserExistPost, endUserForgotPost, endUserPasswordPost, endUserResetPost, enqueueTask, filterRoutes, findCollection, findGlobal, getCollectionItem, getCollectionItems, getEachMarketLocale, getGlobalItems, getLivePreviewURL, getLocale, getMedia, getNewCategoriesFromChanges, getNumericParam, getObjectParam, getPages, getPagination, getPreviewPublicURL, getPreviewURL, getRoute, getRouteByCategoryAndLocale, getRouteByItemAndLocale, getRoutes, getSearchUrl, getStaticTaskHandler, getStringParam, getSubRequest, getTranslation, getTranslations, hasMarket, hasRole, internalSlugs, isAdmin, isAdminOrOwn, isAdminOrSelf, isMixerRequest, isOwn, isPageRole, isRelation, isRole, isSelf, isTenant, isUndecoratedNavItem, keyWithRequest, localeGet, localizeCollection, localizeItem, log, logMissingTranslations, menuDetailGet, menuIndexGet, mergeCollections, mergeFields, mergeGlobals, navFields, optinGet, options, optoutGet, orAccess, pageDetailGet, pageIndexGet, parseDepth, richTextAfterReadHook, roles$1 as roles, rolesEndUser, rolesUser, routeChangesPost, routeGet, routePost, routePostHandler, seedStatic, setMixerContext, slugToLabel, slugToLabels, sortByGroup, sortCollection, staticCollections, storeGet, toBlock, toCollection, toField, toGlobal, toTab, translateBlock, translateBlocks, translateCollection, translateField, translateFields, translateGlobal, translateTab, translateTabs, whereCollection, withAbstract, withAbstractRequired, withAction, withAddress, withBlock, withCategory, withCategoryRequired, withCheckbox, withCheckboxRequired, withCollection, withColor, withColorRequired, withComponentBlock, withComponents, withDate, withDateRequired, withDescription, withDescriptionRequired, withEndUser, withGlobal, withId, withIdRequired, withIsActive, withIsActiveRequired, withIsDefault, withIsDefaultRequired, withLink, withMarkets, withMarketsRequired, withMedia, withMediaRequired, withMedias, withMediasRequired, withMenu, withName, withNameRequired, withNav, withNavs, withOrder, withOrderRequired, withPage, withRelated, withRichText, withRichTextRequired, withRoles, withSelect, withSelectRequired, withSlug, withSlugRequired, withStaticCollection, withTemplate, withTemplateRequired, withTenants, withText, withTextRequired, withTitle, withTitleRequired, withUser };
1430
+ //# sourceMappingURL=index.d.ts.map