@wordpress/core-data 7.32.0 → 7.32.1-next.ff1cebbba.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/build/actions.js +375 -632
  2. package/build/actions.js.map +7 -1
  3. package/build/batch/create-batch.js +49 -62
  4. package/build/batch/create-batch.js.map +7 -1
  5. package/build/batch/default-processor.js +43 -39
  6. package/build/batch/default-processor.js.map +7 -1
  7. package/build/batch/index.js +38 -17
  8. package/build/batch/index.js.map +7 -1
  9. package/build/dynamic-entities.js +30 -32
  10. package/build/dynamic-entities.js.map +7 -1
  11. package/build/entities.js +298 -410
  12. package/build/entities.js.map +7 -1
  13. package/build/entity-context.js +29 -12
  14. package/build/entity-context.js.map +7 -1
  15. package/build/entity-provider.js +38 -46
  16. package/build/entity-provider.js.map +7 -1
  17. package/build/entity-types/attachment.js +16 -5
  18. package/build/entity-types/attachment.js.map +7 -1
  19. package/build/entity-types/base-entity-records.js +16 -42
  20. package/build/entity-types/base-entity-records.js.map +7 -1
  21. package/build/entity-types/base.js +16 -5
  22. package/build/entity-types/base.js.map +7 -1
  23. package/build/entity-types/comment.js +16 -5
  24. package/build/entity-types/comment.js.map +7 -1
  25. package/build/entity-types/global-styles-revision.js +16 -5
  26. package/build/entity-types/global-styles-revision.js.map +7 -1
  27. package/build/entity-types/helpers.js +16 -5
  28. package/build/entity-types/helpers.js.map +7 -1
  29. package/build/entity-types/index.js +16 -5
  30. package/build/entity-types/index.js.map +7 -1
  31. package/build/entity-types/menu-location.js +16 -5
  32. package/build/entity-types/menu-location.js.map +7 -1
  33. package/build/entity-types/nav-menu-item.js +16 -5
  34. package/build/entity-types/nav-menu-item.js.map +7 -1
  35. package/build/entity-types/nav-menu.js +16 -5
  36. package/build/entity-types/nav-menu.js.map +7 -1
  37. package/build/entity-types/page.js +16 -5
  38. package/build/entity-types/page.js.map +7 -1
  39. package/build/entity-types/plugin.js +16 -5
  40. package/build/entity-types/plugin.js.map +7 -1
  41. package/build/entity-types/post-revision.js +16 -5
  42. package/build/entity-types/post-revision.js.map +7 -1
  43. package/build/entity-types/post-status.js +16 -5
  44. package/build/entity-types/post-status.js.map +7 -1
  45. package/build/entity-types/post.js +16 -5
  46. package/build/entity-types/post.js.map +7 -1
  47. package/build/entity-types/settings.js +16 -5
  48. package/build/entity-types/settings.js.map +7 -1
  49. package/build/entity-types/sidebar.js +16 -5
  50. package/build/entity-types/sidebar.js.map +7 -1
  51. package/build/entity-types/taxonomy.js +16 -5
  52. package/build/entity-types/taxonomy.js.map +7 -1
  53. package/build/entity-types/term.js +16 -5
  54. package/build/entity-types/term.js.map +7 -1
  55. package/build/entity-types/theme.js +16 -5
  56. package/build/entity-types/theme.js.map +7 -1
  57. package/build/entity-types/type.js +16 -5
  58. package/build/entity-types/type.js.map +7 -1
  59. package/build/entity-types/user.js +16 -5
  60. package/build/entity-types/user.js.map +7 -1
  61. package/build/entity-types/widget-type.js +16 -5
  62. package/build/entity-types/widget-type.js.map +7 -1
  63. package/build/entity-types/widget.js +16 -5
  64. package/build/entity-types/widget.js.map +7 -1
  65. package/build/entity-types/wp-template-part.js +16 -5
  66. package/build/entity-types/wp-template-part.js.map +7 -1
  67. package/build/entity-types/wp-template.js +16 -5
  68. package/build/entity-types/wp-template.js.map +7 -1
  69. package/build/fetch/__experimental-fetch-link-suggestions.js +141 -154
  70. package/build/fetch/__experimental-fetch-link-suggestions.js.map +7 -1
  71. package/build/fetch/__experimental-fetch-url-data.js +47 -59
  72. package/build/fetch/__experimental-fetch-url-data.js.map +7 -1
  73. package/build/fetch/index.js +53 -32
  74. package/build/fetch/index.js.map +7 -1
  75. package/build/footnotes/get-footnotes-order.js +38 -25
  76. package/build/footnotes/get-footnotes-order.js.map +7 -1
  77. package/build/footnotes/get-rich-text-values-cached.js +26 -27
  78. package/build/footnotes/get-rich-text-values-cached.js.map +7 -1
  79. package/build/footnotes/index.js +68 -55
  80. package/build/footnotes/index.js.map +7 -1
  81. package/build/hooks/constants.js +33 -12
  82. package/build/hooks/constants.js.map +7 -1
  83. package/build/hooks/index.js +59 -68
  84. package/build/hooks/index.js.map +7 -1
  85. package/build/hooks/memoize.js +34 -12
  86. package/build/hooks/memoize.js.map +7 -1
  87. package/build/hooks/use-entity-block-editor.js +111 -119
  88. package/build/hooks/use-entity-block-editor.js.map +7 -1
  89. package/build/hooks/use-entity-id.js +25 -23
  90. package/build/hooks/use-entity-id.js.map +7 -1
  91. package/build/hooks/use-entity-prop.js +59 -60
  92. package/build/hooks/use-entity-prop.js.map +7 -1
  93. package/build/hooks/use-entity-record.js +95 -155
  94. package/build/hooks/use-entity-record.js.map +7 -1
  95. package/build/hooks/use-entity-records.js +131 -139
  96. package/build/hooks/use-entity-records.js.map +7 -1
  97. package/build/hooks/use-query-select.js +65 -84
  98. package/build/hooks/use-query-select.js.map +7 -1
  99. package/build/hooks/use-resource-permissions.js +92 -145
  100. package/build/hooks/use-resource-permissions.js.map +7 -1
  101. package/build/index.js +96 -153
  102. package/build/index.js.map +7 -1
  103. package/build/lock-unlock.js +31 -14
  104. package/build/lock-unlock.js.map +7 -1
  105. package/build/locks/actions.js +36 -19
  106. package/build/locks/actions.js.map +7 -1
  107. package/build/locks/engine.js +48 -47
  108. package/build/locks/engine.js.map +7 -1
  109. package/build/locks/reducer.js +54 -63
  110. package/build/locks/reducer.js.map +7 -1
  111. package/build/locks/selectors.js +35 -30
  112. package/build/locks/selectors.js.map +7 -1
  113. package/build/locks/utils.js +37 -16
  114. package/build/locks/utils.js.map +7 -1
  115. package/build/name.js +27 -12
  116. package/build/name.js.map +7 -1
  117. package/build/private-actions.js +67 -75
  118. package/build/private-actions.js.map +7 -1
  119. package/build/private-apis.js +33 -16
  120. package/build/private-apis.js.map +7 -1
  121. package/build/private-selectors.js +204 -184
  122. package/build/private-selectors.js.map +7 -1
  123. package/build/queried-data/actions.js +32 -41
  124. package/build/queried-data/actions.js.map +7 -1
  125. package/build/queried-data/get-query-parts.js +41 -79
  126. package/build/queried-data/get-query-parts.js.map +7 -1
  127. package/build/queried-data/index.js +39 -36
  128. package/build/queried-data/index.js.map +7 -1
  129. package/build/queried-data/reducer.js +162 -193
  130. package/build/queried-data/reducer.js.map +7 -1
  131. package/build/queried-data/selectors.js +57 -85
  132. package/build/queried-data/selectors.js.map +7 -1
  133. package/build/reducer.js +279 -404
  134. package/build/reducer.js.map +7 -1
  135. package/build/resolvers.js +553 -600
  136. package/build/resolvers.js.map +7 -1
  137. package/build/selectors.js +456 -981
  138. package/build/selectors.js.map +7 -1
  139. package/build/sync.js +34 -22
  140. package/build/sync.js.map +7 -1
  141. package/build/types.js +16 -5
  142. package/build/types.js.map +7 -1
  143. package/build/utils/conservative-map-item.js +34 -27
  144. package/build/utils/conservative-map-item.js.map +7 -1
  145. package/build/utils/crdt-blocks.js +289 -0
  146. package/build/utils/crdt-blocks.js.map +7 -0
  147. package/build/utils/crdt.js +202 -0
  148. package/build/utils/crdt.js.map +7 -0
  149. package/build/utils/forward-resolver.js +24 -16
  150. package/build/utils/forward-resolver.js.map +7 -1
  151. package/build/utils/get-nested-value.js +26 -21
  152. package/build/utils/get-nested-value.js.map +7 -1
  153. package/build/utils/get-normalized-comma-separable.js +25 -17
  154. package/build/utils/get-normalized-comma-separable.js.map +7 -1
  155. package/build/utils/if-matching-action.js +25 -19
  156. package/build/utils/if-matching-action.js.map +7 -1
  157. package/build/utils/index.js +77 -108
  158. package/build/utils/index.js.map +7 -1
  159. package/build/utils/is-numeric-id.js +22 -12
  160. package/build/utils/is-numeric-id.js.map +7 -1
  161. package/build/utils/is-raw-attribute.js +22 -13
  162. package/build/utils/is-raw-attribute.js.map +7 -1
  163. package/build/utils/log-entity-deprecation.js +37 -38
  164. package/build/utils/log-entity-deprecation.js.map +7 -1
  165. package/build/utils/on-sub-key.js +30 -24
  166. package/build/utils/on-sub-key.js.map +7 -1
  167. package/build/utils/receive-intermediate-results.js +29 -6
  168. package/build/utils/receive-intermediate-results.js.map +7 -1
  169. package/build/utils/replace-action.js +24 -17
  170. package/build/utils/replace-action.js.map +7 -1
  171. package/build/utils/set-nested-value.js +25 -30
  172. package/build/utils/set-nested-value.js.map +7 -1
  173. package/build/utils/user-permissions.js +41 -13
  174. package/build/utils/user-permissions.js.map +7 -1
  175. package/build/utils/with-weak-map-cache.js +26 -22
  176. package/build/utils/with-weak-map-cache.js.map +7 -1
  177. package/build-module/actions.js +322 -601
  178. package/build-module/actions.js.map +7 -1
  179. package/build-module/batch/create-batch.js +21 -57
  180. package/build-module/batch/create-batch.js.map +7 -1
  181. package/build-module/batch/default-processor.js +14 -33
  182. package/build-module/batch/default-processor.js.map +7 -1
  183. package/build-module/batch/index.js +7 -3
  184. package/build-module/batch/index.js.map +7 -1
  185. package/build-module/dynamic-entities.js +7 -28
  186. package/build-module/dynamic-entities.js.map +7 -1
  187. package/build-module/entities.js +263 -399
  188. package/build-module/entities.js.map +7 -1
  189. package/build-module/entity-context.js +7 -7
  190. package/build-module/entity-context.js.map +7 -1
  191. package/build-module/entity-provider.js +19 -42
  192. package/build-module/entity-provider.js.map +7 -1
  193. package/build-module/entity-types/attachment.js +1 -2
  194. package/build-module/entity-types/attachment.js.map +7 -1
  195. package/build-module/entity-types/base-entity-records.js +1 -37
  196. package/build-module/entity-types/base-entity-records.js.map +7 -1
  197. package/build-module/entity-types/base.js +1 -2
  198. package/build-module/entity-types/base.js.map +7 -1
  199. package/build-module/entity-types/comment.js +1 -2
  200. package/build-module/entity-types/comment.js.map +7 -1
  201. package/build-module/entity-types/global-styles-revision.js +1 -2
  202. package/build-module/entity-types/global-styles-revision.js.map +7 -1
  203. package/build-module/entity-types/helpers.js +1 -2
  204. package/build-module/entity-types/helpers.js.map +7 -1
  205. package/build-module/entity-types/index.js +1 -2
  206. package/build-module/entity-types/index.js.map +7 -1
  207. package/build-module/entity-types/menu-location.js +1 -2
  208. package/build-module/entity-types/menu-location.js.map +7 -1
  209. package/build-module/entity-types/nav-menu-item.js +1 -2
  210. package/build-module/entity-types/nav-menu-item.js.map +7 -1
  211. package/build-module/entity-types/nav-menu.js +1 -2
  212. package/build-module/entity-types/nav-menu.js.map +7 -1
  213. package/build-module/entity-types/page.js +1 -2
  214. package/build-module/entity-types/page.js.map +7 -1
  215. package/build-module/entity-types/plugin.js +1 -2
  216. package/build-module/entity-types/plugin.js.map +7 -1
  217. package/build-module/entity-types/post-revision.js +1 -2
  218. package/build-module/entity-types/post-revision.js.map +7 -1
  219. package/build-module/entity-types/post-status.js +1 -2
  220. package/build-module/entity-types/post-status.js.map +7 -1
  221. package/build-module/entity-types/post.js +1 -2
  222. package/build-module/entity-types/post.js.map +7 -1
  223. package/build-module/entity-types/settings.js +1 -2
  224. package/build-module/entity-types/settings.js.map +7 -1
  225. package/build-module/entity-types/sidebar.js +1 -2
  226. package/build-module/entity-types/sidebar.js.map +7 -1
  227. package/build-module/entity-types/taxonomy.js +1 -2
  228. package/build-module/entity-types/taxonomy.js.map +7 -1
  229. package/build-module/entity-types/term.js +1 -2
  230. package/build-module/entity-types/term.js.map +7 -1
  231. package/build-module/entity-types/theme.js +1 -2
  232. package/build-module/entity-types/theme.js.map +7 -1
  233. package/build-module/entity-types/type.js +1 -2
  234. package/build-module/entity-types/type.js.map +7 -1
  235. package/build-module/entity-types/user.js +1 -2
  236. package/build-module/entity-types/user.js.map +7 -1
  237. package/build-module/entity-types/widget-type.js +1 -2
  238. package/build-module/entity-types/widget-type.js.map +7 -1
  239. package/build-module/entity-types/widget.js +1 -2
  240. package/build-module/entity-types/widget.js.map +7 -1
  241. package/build-module/entity-types/wp-template-part.js +1 -2
  242. package/build-module/entity-types/wp-template-part.js.map +7 -1
  243. package/build-module/entity-types/wp-template.js +1 -2
  244. package/build-module/entity-types/wp-template.js.map +7 -1
  245. package/build-module/fetch/__experimental-fetch-link-suggestions.js +111 -149
  246. package/build-module/fetch/__experimental-fetch-link-suggestions.js.map +7 -1
  247. package/build-module/fetch/__experimental-fetch-url-data.js +20 -49
  248. package/build-module/fetch/__experimental-fetch-url-data.js.map +7 -1
  249. package/build-module/fetch/index.js +20 -15
  250. package/build-module/fetch/index.js.map +7 -1
  251. package/build-module/footnotes/get-footnotes-order.js +10 -19
  252. package/build-module/footnotes/get-footnotes-order.js.map +7 -1
  253. package/build-module/footnotes/get-rich-text-values-cached.js +8 -23
  254. package/build-module/footnotes/get-rich-text-values-cached.js.map +7 -1
  255. package/build-module/footnotes/index.js +34 -47
  256. package/build-module/footnotes/index.js.map +7 -1
  257. package/build-module/hooks/constants.js +11 -8
  258. package/build-module/hooks/constants.js.map +7 -1
  259. package/build-module/hooks/index.js +27 -15
  260. package/build-module/hooks/index.js.map +7 -1
  261. package/build-module/hooks/memoize.js +6 -8
  262. package/build-module/hooks/memoize.js.map +7 -1
  263. package/build-module/hooks/use-entity-block-editor.js +80 -110
  264. package/build-module/hooks/use-entity-block-editor.js.map +7 -1
  265. package/build-module/hooks/use-entity-id.js +7 -19
  266. package/build-module/hooks/use-entity-id.js.map +7 -1
  267. package/build-module/hooks/use-entity-prop.js +31 -55
  268. package/build-module/hooks/use-entity-prop.js.map +7 -1
  269. package/build-module/hooks/use-entity-record.js +63 -148
  270. package/build-module/hooks/use-entity-record.js.map +7 -1
  271. package/build-module/hooks/use-entity-records.js +98 -131
  272. package/build-module/hooks/use-entity-records.js.map +7 -1
  273. package/build-module/hooks/use-query-select.js +27 -71
  274. package/build-module/hooks/use-query-select.js.map +7 -1
  275. package/build-module/hooks/use-resource-permissions.js +57 -136
  276. package/build-module/hooks/use-resource-permissions.js.map +7 -1
  277. package/build-module/index.js +49 -71
  278. package/build-module/index.js.map +7 -1
  279. package/build-module/lock-unlock.js +8 -7
  280. package/build-module/lock-unlock.js.map +7 -1
  281. package/build-module/locks/actions.js +8 -13
  282. package/build-module/locks/actions.js.map +7 -1
  283. package/build-module/locks/engine.js +17 -38
  284. package/build-module/locks/engine.js.map +7 -1
  285. package/build-module/locks/reducer.js +37 -59
  286. package/build-module/locks/reducer.js.map +7 -1
  287. package/build-module/locks/selectors.js +16 -23
  288. package/build-module/locks/selectors.js.map +7 -1
  289. package/build-module/locks/utils.js +15 -12
  290. package/build-module/locks/utils.js.map +7 -1
  291. package/build-module/name.js +5 -8
  292. package/build-module/name.js.map +7 -1
  293. package/build-module/private-actions.js +35 -69
  294. package/build-module/private-actions.js.map +7 -1
  295. package/build-module/private-apis.js +8 -8
  296. package/build-module/private-apis.js.map +7 -1
  297. package/build-module/private-selectors.js +167 -174
  298. package/build-module/private-selectors.js.map +7 -1
  299. package/build-module/queried-data/actions.js +11 -38
  300. package/build-module/queried-data/actions.js.map +7 -1
  301. package/build-module/queried-data/get-query-parts.js +20 -75
  302. package/build-module/queried-data/get-query-parts.js.map +7 -1
  303. package/build-module/queried-data/index.js +7 -4
  304. package/build-module/queried-data/index.js.map +7 -1
  305. package/build-module/queried-data/reducer.js +134 -185
  306. package/build-module/queried-data/reducer.js.map +7 -1
  307. package/build-module/queried-data/selectors.js +23 -78
  308. package/build-module/queried-data/selectors.js.map +7 -1
  309. package/build-module/reducer.js +243 -393
  310. package/build-module/reducer.js.map +7 -1
  311. package/build-module/resolvers.js +478 -549
  312. package/build-module/resolvers.js.map +7 -1
  313. package/build-module/selectors.js +410 -953
  314. package/build-module/selectors.js.map +7 -1
  315. package/build-module/sync.js +14 -17
  316. package/build-module/sync.js.map +7 -1
  317. package/build-module/types.js +1 -2
  318. package/build-module/types.js.map +7 -1
  319. package/build-module/utils/conservative-map-item.js +6 -22
  320. package/build-module/utils/conservative-map-item.js.map +7 -1
  321. package/build-module/utils/crdt-blocks.js +255 -0
  322. package/build-module/utils/crdt-blocks.js.map +7 -0
  323. package/build-module/utils/crdt.js +167 -0
  324. package/build-module/utils/crdt.js.map +7 -0
  325. package/build-module/utils/forward-resolver.js +6 -12
  326. package/build-module/utils/forward-resolver.js.map +7 -1
  327. package/build-module/utils/get-nested-value.js +9 -18
  328. package/build-module/utils/get-nested-value.js.map +7 -1
  329. package/build-module/utils/get-normalized-comma-separable.js +7 -13
  330. package/build-module/utils/get-normalized-comma-separable.js.map +7 -1
  331. package/build-module/utils/if-matching-action.js +7 -15
  332. package/build-module/utils/if-matching-action.js.map +7 -1
  333. package/build-module/utils/index.js +35 -14
  334. package/build-module/utils/index.js.map +7 -1
  335. package/build-module/utils/is-numeric-id.js +5 -9
  336. package/build-module/utils/is-numeric-id.js.map +7 -1
  337. package/build-module/utils/is-raw-attribute.js +5 -10
  338. package/build-module/utils/is-raw-attribute.js.map +7 -1
  339. package/build-module/utils/log-entity-deprecation.js +8 -31
  340. package/build-module/utils/log-entity-deprecation.js.map +7 -1
  341. package/build-module/utils/on-sub-key.js +8 -19
  342. package/build-module/utils/on-sub-key.js.map +7 -1
  343. package/build-module/utils/receive-intermediate-results.js +7 -2
  344. package/build-module/utils/receive-intermediate-results.js.map +7 -1
  345. package/build-module/utils/replace-action.js +6 -13
  346. package/build-module/utils/replace-action.js.map +7 -1
  347. package/build-module/utils/set-nested-value.js +8 -27
  348. package/build-module/utils/set-nested-value.js.map +7 -1
  349. package/build-module/utils/user-permissions.js +19 -9
  350. package/build-module/utils/user-permissions.js.map +7 -1
  351. package/build-module/utils/with-weak-map-cache.js +8 -18
  352. package/build-module/utils/with-weak-map-cache.js.map +7 -1
  353. package/build-types/actions.d.ts.map +1 -1
  354. package/build-types/entities.d.ts +0 -56
  355. package/build-types/entities.d.ts.map +1 -1
  356. package/build-types/index.d.ts.map +1 -1
  357. package/build-types/private-selectors.d.ts.map +1 -1
  358. package/build-types/resolvers.d.ts +3 -0
  359. package/build-types/resolvers.d.ts.map +1 -1
  360. package/build-types/selectors.d.ts.map +1 -1
  361. package/build-types/sync.d.ts +6 -1
  362. package/build-types/sync.d.ts.map +1 -1
  363. package/build-types/types.d.ts +9 -0
  364. package/build-types/types.d.ts.map +1 -1
  365. package/build-types/utils/crdt-blocks.d.ts +30 -0
  366. package/build-types/utils/crdt-blocks.d.ts.map +1 -0
  367. package/build-types/utils/crdt.d.ts +49 -0
  368. package/build-types/utils/crdt.d.ts.map +1 -0
  369. package/package.json +26 -19
  370. package/src/actions.js +56 -74
  371. package/src/entities.js +59 -113
  372. package/src/private-selectors.ts +32 -7
  373. package/src/resolvers.js +173 -120
  374. package/src/selectors.ts +0 -13
  375. package/src/sync.ts +12 -0
  376. package/src/test/resolvers.js +183 -0
  377. package/src/types.ts +12 -0
  378. package/src/utils/crdt-blocks.ts +503 -0
  379. package/src/utils/crdt.ts +310 -0
  380. package/src/utils/test/crdt-blocks.ts +375 -0
  381. package/src/utils/test/crdt.ts +254 -0
  382. package/tsconfig.tsbuildinfo +1 -1
  383. package/src/sync.js +0 -27
@@ -1,472 +1,336 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { capitalCase, pascalCase } from 'change-case';
5
-
6
- /**
7
- * WordPress dependencies
8
- */
9
- import apiFetch from '@wordpress/api-fetch';
10
- import { __ } from '@wordpress/i18n';
11
- import { RichTextData } from '@wordpress/rich-text';
12
- export const DEFAULT_ENTITY_KEY = 'id';
13
- const POST_RAW_ATTRIBUTES = ['title', 'excerpt', 'content'];
14
- export const rootEntitiesConfig = [{
15
- label: __('Base'),
16
- kind: 'root',
17
- name: '__unstableBase',
18
- baseURL: '/',
19
- baseURLParams: {
20
- // Please also change the preload path when changing this.
21
- // @see lib/compat/wordpress-6.8/preload.php
22
- _fields: ['description', 'gmt_offset', 'home', 'name', 'site_icon', 'site_icon_url', 'site_logo', 'timezone_string', 'url', 'page_for_posts', 'page_on_front', 'show_on_front'].join(',')
23
- },
24
- // The entity doesn't support selecting multiple records.
25
- // The property is maintained for backward compatibility.
26
- plural: '__unstableBases',
27
- syncConfig: {
28
- fetch: async () => {
29
- return apiFetch({
30
- path: '/'
31
- });
32
- },
33
- applyChangesToDoc: (doc, changes) => {
34
- const document = doc.getMap('document');
35
- Object.entries(changes).forEach(([key, value]) => {
36
- if (document.get(key) !== value) {
37
- document.set(key, value);
38
- }
39
- });
40
- },
41
- fromCRDTDoc: doc => {
42
- return doc.getMap('document').toJSON();
43
- }
44
- },
45
- syncObjectType: 'root/base',
46
- getSyncObjectId: () => 'index'
47
- }, {
48
- label: __('Post Type'),
49
- name: 'postType',
50
- kind: 'root',
51
- key: 'slug',
52
- baseURL: '/wp/v2/types',
53
- baseURLParams: {
54
- context: 'edit'
55
- },
56
- plural: 'postTypes',
57
- syncConfig: {
58
- fetch: async id => {
59
- return apiFetch({
60
- path: `/wp/v2/types/${id}?context=edit`
61
- });
62
- },
63
- applyChangesToDoc: (doc, changes) => {
64
- const document = doc.getMap('document');
65
- Object.entries(changes).forEach(([key, value]) => {
66
- if (document.get(key) !== value) {
67
- document.set(key, value);
68
- }
69
- });
1
+ import { capitalCase, pascalCase } from "change-case";
2
+ import apiFetch from "@wordpress/api-fetch";
3
+ import { __unstableSerializeAndClean, parse } from "@wordpress/blocks";
4
+ import { __ } from "@wordpress/i18n";
5
+ import {
6
+ applyPostChangesToCRDTDoc,
7
+ defaultApplyChangesToCRDTDoc,
8
+ defaultGetChangesFromCRDTDoc,
9
+ getPostChangesFromCRDTDoc
10
+ } from "./utils/crdt";
11
+ const DEFAULT_ENTITY_KEY = "id";
12
+ const POST_RAW_ATTRIBUTES = ["title", "excerpt", "content"];
13
+ const blocksTransientEdits = {
14
+ blocks: {
15
+ read: (record) => parse(record.content?.raw ?? ""),
16
+ write: (record) => ({
17
+ content: __unstableSerializeAndClean(record.blocks)
18
+ })
19
+ }
20
+ };
21
+ const rootEntitiesConfig = [
22
+ {
23
+ label: __("Base"),
24
+ kind: "root",
25
+ name: "__unstableBase",
26
+ baseURL: "/",
27
+ baseURLParams: {
28
+ // Please also change the preload path when changing this.
29
+ // @see lib/compat/wordpress-6.8/preload.php
30
+ _fields: [
31
+ "description",
32
+ "gmt_offset",
33
+ "home",
34
+ "name",
35
+ "site_icon",
36
+ "site_icon_url",
37
+ "site_logo",
38
+ "timezone_string",
39
+ "url",
40
+ "page_for_posts",
41
+ "page_on_front",
42
+ "show_on_front"
43
+ ].join(",")
70
44
  },
71
- fromCRDTDoc: doc => {
72
- return doc.getMap('document').toJSON();
73
- }
74
- },
75
- syncObjectType: 'root/postType',
76
- getSyncObjectId: id => id
77
- }, {
78
- name: 'media',
79
- kind: 'root',
80
- baseURL: '/wp/v2/media',
81
- baseURLParams: {
82
- context: 'edit'
83
- },
84
- plural: 'mediaItems',
85
- label: __('Media'),
86
- rawAttributes: ['caption', 'title', 'description'],
87
- supportsPagination: true
88
- }, {
89
- name: 'taxonomy',
90
- kind: 'root',
91
- key: 'slug',
92
- baseURL: '/wp/v2/taxonomies',
93
- baseURLParams: {
94
- context: 'edit'
45
+ // The entity doesn't support selecting multiple records.
46
+ // The property is maintained for backward compatibility.
47
+ plural: "__unstableBases"
95
48
  },
96
- plural: 'taxonomies',
97
- label: __('Taxonomy')
98
- }, {
99
- name: 'sidebar',
100
- kind: 'root',
101
- baseURL: '/wp/v2/sidebars',
102
- baseURLParams: {
103
- context: 'edit'
49
+ {
50
+ label: __("Post Type"),
51
+ name: "postType",
52
+ kind: "root",
53
+ key: "slug",
54
+ baseURL: "/wp/v2/types",
55
+ baseURLParams: { context: "edit" },
56
+ plural: "postTypes"
104
57
  },
105
- plural: 'sidebars',
106
- transientEdits: {
107
- blocks: true
58
+ {
59
+ name: "media",
60
+ kind: "root",
61
+ baseURL: "/wp/v2/media",
62
+ baseURLParams: { context: "edit" },
63
+ plural: "mediaItems",
64
+ label: __("Media"),
65
+ rawAttributes: ["caption", "title", "description"],
66
+ supportsPagination: true
108
67
  },
109
- label: __('Widget areas')
110
- }, {
111
- name: 'widget',
112
- kind: 'root',
113
- baseURL: '/wp/v2/widgets',
114
- baseURLParams: {
115
- context: 'edit'
68
+ {
69
+ name: "taxonomy",
70
+ kind: "root",
71
+ key: "slug",
72
+ baseURL: "/wp/v2/taxonomies",
73
+ baseURLParams: { context: "edit" },
74
+ plural: "taxonomies",
75
+ label: __("Taxonomy")
116
76
  },
117
- plural: 'widgets',
118
- transientEdits: {
119
- blocks: true
77
+ {
78
+ name: "sidebar",
79
+ kind: "root",
80
+ baseURL: "/wp/v2/sidebars",
81
+ baseURLParams: { context: "edit" },
82
+ plural: "sidebars",
83
+ transientEdits: { blocks: true },
84
+ label: __("Widget areas")
120
85
  },
121
- label: __('Widgets')
122
- }, {
123
- name: 'widgetType',
124
- kind: 'root',
125
- baseURL: '/wp/v2/widget-types',
126
- baseURLParams: {
127
- context: 'edit'
86
+ {
87
+ name: "widget",
88
+ kind: "root",
89
+ baseURL: "/wp/v2/widgets",
90
+ baseURLParams: { context: "edit" },
91
+ plural: "widgets",
92
+ transientEdits: { blocks: true },
93
+ label: __("Widgets")
128
94
  },
129
- plural: 'widgetTypes',
130
- label: __('Widget types')
131
- }, {
132
- label: __('User'),
133
- name: 'user',
134
- kind: 'root',
135
- baseURL: '/wp/v2/users',
136
- getTitle: record => record?.name || record?.slug,
137
- baseURLParams: {
138
- context: 'edit'
95
+ {
96
+ name: "widgetType",
97
+ kind: "root",
98
+ baseURL: "/wp/v2/widget-types",
99
+ baseURLParams: { context: "edit" },
100
+ plural: "widgetTypes",
101
+ label: __("Widget types")
139
102
  },
140
- plural: 'users',
141
- supportsPagination: true
142
- }, {
143
- name: 'comment',
144
- kind: 'root',
145
- baseURL: '/wp/v2/comments',
146
- baseURLParams: {
147
- context: 'edit'
103
+ {
104
+ label: __("User"),
105
+ name: "user",
106
+ kind: "root",
107
+ baseURL: "/wp/v2/users",
108
+ getTitle: (record) => record?.name || record?.slug,
109
+ baseURLParams: { context: "edit" },
110
+ plural: "users",
111
+ supportsPagination: true
148
112
  },
149
- plural: 'comments',
150
- label: __('Comment'),
151
- supportsPagination: true
152
- }, {
153
- name: 'menu',
154
- kind: 'root',
155
- baseURL: '/wp/v2/menus',
156
- baseURLParams: {
157
- context: 'edit'
113
+ {
114
+ name: "comment",
115
+ kind: "root",
116
+ baseURL: "/wp/v2/comments",
117
+ baseURLParams: { context: "edit" },
118
+ plural: "comments",
119
+ label: __("Comment"),
120
+ supportsPagination: true
158
121
  },
159
- plural: 'menus',
160
- label: __('Menu'),
161
- supportsPagination: true
162
- }, {
163
- name: 'menuItem',
164
- kind: 'root',
165
- baseURL: '/wp/v2/menu-items',
166
- baseURLParams: {
167
- context: 'edit'
122
+ {
123
+ name: "menu",
124
+ kind: "root",
125
+ baseURL: "/wp/v2/menus",
126
+ baseURLParams: { context: "edit" },
127
+ plural: "menus",
128
+ label: __("Menu"),
129
+ supportsPagination: true
168
130
  },
169
- plural: 'menuItems',
170
- label: __('Menu Item'),
171
- rawAttributes: ['title'],
172
- supportsPagination: true
173
- }, {
174
- name: 'menuLocation',
175
- kind: 'root',
176
- baseURL: '/wp/v2/menu-locations',
177
- baseURLParams: {
178
- context: 'edit'
131
+ {
132
+ name: "menuItem",
133
+ kind: "root",
134
+ baseURL: "/wp/v2/menu-items",
135
+ baseURLParams: { context: "edit" },
136
+ plural: "menuItems",
137
+ label: __("Menu Item"),
138
+ rawAttributes: ["title"],
139
+ supportsPagination: true
179
140
  },
180
- plural: 'menuLocations',
181
- label: __('Menu Location'),
182
- key: 'name'
183
- }, {
184
- label: __('Global Styles'),
185
- name: 'globalStyles',
186
- kind: 'root',
187
- baseURL: '/wp/v2/global-styles',
188
- baseURLParams: {
189
- context: 'edit'
141
+ {
142
+ name: "menuLocation",
143
+ kind: "root",
144
+ baseURL: "/wp/v2/menu-locations",
145
+ baseURLParams: { context: "edit" },
146
+ plural: "menuLocations",
147
+ label: __("Menu Location"),
148
+ key: "name"
190
149
  },
191
- plural: 'globalStylesVariations',
192
- // Should be different from name.
193
- getTitle: () => __('Custom Styles'),
194
- getRevisionsUrl: (parentId, revisionId) => `/wp/v2/global-styles/${parentId}/revisions${revisionId ? '/' + revisionId : ''}`,
195
- supportsPagination: true
196
- }, {
197
- label: __('Themes'),
198
- name: 'theme',
199
- kind: 'root',
200
- baseURL: '/wp/v2/themes',
201
- baseURLParams: {
202
- context: 'edit'
150
+ {
151
+ label: __("Global Styles"),
152
+ name: "globalStyles",
153
+ kind: "root",
154
+ baseURL: "/wp/v2/global-styles",
155
+ baseURLParams: { context: "edit" },
156
+ plural: "globalStylesVariations",
157
+ // Should be different from name.
158
+ getTitle: () => __("Custom Styles"),
159
+ getRevisionsUrl: (parentId, revisionId) => `/wp/v2/global-styles/${parentId}/revisions${revisionId ? "/" + revisionId : ""}`,
160
+ supportsPagination: true
203
161
  },
204
- plural: 'themes',
205
- key: 'stylesheet'
206
- }, {
207
- label: __('Plugins'),
208
- name: 'plugin',
209
- kind: 'root',
210
- baseURL: '/wp/v2/plugins',
211
- baseURLParams: {
212
- context: 'edit'
162
+ {
163
+ label: __("Themes"),
164
+ name: "theme",
165
+ kind: "root",
166
+ baseURL: "/wp/v2/themes",
167
+ baseURLParams: { context: "edit" },
168
+ plural: "themes",
169
+ key: "stylesheet"
213
170
  },
214
- plural: 'plugins',
215
- key: 'plugin'
216
- }, {
217
- label: __('Status'),
218
- name: 'status',
219
- kind: 'root',
220
- baseURL: '/wp/v2/statuses',
221
- baseURLParams: {
222
- context: 'edit'
171
+ {
172
+ label: __("Plugins"),
173
+ name: "plugin",
174
+ kind: "root",
175
+ baseURL: "/wp/v2/plugins",
176
+ baseURLParams: { context: "edit" },
177
+ plural: "plugins",
178
+ key: "plugin"
223
179
  },
224
- plural: 'statuses',
225
- key: 'slug'
226
- }];
227
- export const deprecatedEntities = {
180
+ {
181
+ label: __("Status"),
182
+ name: "status",
183
+ kind: "root",
184
+ baseURL: "/wp/v2/statuses",
185
+ baseURLParams: { context: "edit" },
186
+ plural: "statuses",
187
+ key: "slug"
188
+ }
189
+ ];
190
+ const deprecatedEntities = {
228
191
  root: {
229
192
  media: {
230
- since: '6.9',
193
+ since: "6.9",
231
194
  alternative: {
232
- kind: 'postType',
233
- name: 'attachment'
195
+ kind: "postType",
196
+ name: "attachment"
234
197
  }
235
198
  }
236
199
  }
237
200
  };
238
- export const additionalEntityConfigLoaders = [{
239
- kind: 'postType',
240
- loadEntities: loadPostTypeEntities
241
- }, {
242
- kind: 'taxonomy',
243
- loadEntities: loadTaxonomyEntities
244
- }, {
245
- kind: 'root',
246
- name: 'site',
247
- plural: 'sites',
248
- loadEntities: loadSiteEntity
249
- }];
250
-
251
- /**
252
- * Returns a function to be used to retrieve extra edits to apply before persisting a post type.
253
- *
254
- * @param {Object} persistedRecord Already persisted Post
255
- * @param {Object} edits Edits.
256
- * @return {Object} Updated edits.
257
- */
258
- export const prePersistPostType = (persistedRecord, edits) => {
201
+ const additionalEntityConfigLoaders = [
202
+ { kind: "postType", loadEntities: loadPostTypeEntities },
203
+ { kind: "taxonomy", loadEntities: loadTaxonomyEntities },
204
+ {
205
+ kind: "root",
206
+ name: "site",
207
+ plural: "sites",
208
+ loadEntities: loadSiteEntity
209
+ }
210
+ ];
211
+ const prePersistPostType = (persistedRecord, edits) => {
259
212
  const newEdits = {};
260
- if (persistedRecord?.status === 'auto-draft') {
261
- // Saving an auto-draft should create a draft by default.
213
+ if (persistedRecord?.status === "auto-draft") {
262
214
  if (!edits.status && !newEdits.status) {
263
- newEdits.status = 'draft';
215
+ newEdits.status = "draft";
264
216
  }
265
-
266
- // Fix the auto-draft default title.
267
- if ((!edits.title || edits.title === 'Auto Draft') && !newEdits.title && (!persistedRecord?.title || persistedRecord?.title === 'Auto Draft')) {
268
- newEdits.title = '';
217
+ if ((!edits.title || edits.title === "Auto Draft") && !newEdits.title && (!persistedRecord?.title || persistedRecord?.title === "Auto Draft")) {
218
+ newEdits.title = "";
269
219
  }
270
220
  }
271
221
  return newEdits;
272
222
  };
273
- const serialisableBlocksCache = new WeakMap();
274
- function makeBlockAttributesSerializable(attributes) {
275
- const newAttributes = {
276
- ...attributes
277
- };
278
- for (const [key, value] of Object.entries(attributes)) {
279
- if (value instanceof RichTextData) {
280
- newAttributes[key] = value.valueOf();
281
- }
282
- }
283
- return newAttributes;
284
- }
285
- function makeBlocksSerializable(blocks) {
286
- return blocks.map(block => {
287
- const {
288
- innerBlocks,
289
- attributes,
290
- ...rest
291
- } = block;
292
- return {
293
- ...rest,
294
- attributes: makeBlockAttributesSerializable(attributes),
295
- innerBlocks: makeBlocksSerializable(innerBlocks)
296
- };
297
- });
298
- }
299
-
300
- /**
301
- * Returns the list of post type entities.
302
- *
303
- * @return {Promise} Entities promise
304
- */
305
223
  async function loadPostTypeEntities() {
306
224
  const postTypes = await apiFetch({
307
- path: '/wp/v2/types?context=view'
225
+ path: "/wp/v2/types?context=view"
308
226
  });
309
- return Object.entries(postTypes !== null && postTypes !== void 0 ? postTypes : {}).map(([name, postType]) => {
310
- var _postType$rest_namesp;
311
- const isTemplate = ['wp_template', 'wp_template_part'].includes(name);
312
- const namespace = (_postType$rest_namesp = postType?.rest_namespace) !== null && _postType$rest_namesp !== void 0 ? _postType$rest_namesp : 'wp/v2';
227
+ return Object.entries(postTypes ?? {}).map(([name, postType]) => {
228
+ const isTemplate = ["wp_template", "wp_template_part"].includes(
229
+ name
230
+ );
231
+ const namespace = postType?.rest_namespace ?? "wp/v2";
232
+ const syncConfig = {
233
+ /**
234
+ * Apply changes from the local editor to the local CRDT document so
235
+ * that those changes can be synced to other peers (via the provider).
236
+ *
237
+ * @param {import('@wordpress/sync').CRDTDoc} crdtDoc
238
+ * @param {Partial< import('@wordpress/sync').ObjectData >} changes
239
+ * @return {void}
240
+ */
241
+ applyChangesToCRDTDoc: (crdtDoc, changes) => applyPostChangesToCRDTDoc(crdtDoc, changes, postType),
242
+ /**
243
+ * Extract changes from a CRDT document that can be used to update the
244
+ * local editor state.
245
+ *
246
+ * @param {import('@wordpress/sync').CRDTDoc} crdtDoc
247
+ * @param {import('@wordpress/sync').ObjectData} editedRecord
248
+ * @return {Partial< import('@wordpress/sync').ObjectData >} Changes to record
249
+ */
250
+ getChangesFromCRDTDoc: (crdtDoc, editedRecord) => getPostChangesFromCRDTDoc(crdtDoc, editedRecord, postType),
251
+ /**
252
+ * Sync features supported by the entity.
253
+ *
254
+ * @type {Record< string, boolean >}
255
+ */
256
+ supports: {}
257
+ };
313
258
  return {
314
- kind: 'postType',
259
+ kind: "postType",
315
260
  baseURL: `/${namespace}/${postType.rest_base}`,
316
- baseURLParams: {
317
- context: 'edit'
318
- },
261
+ baseURLParams: { context: "edit" },
319
262
  name,
320
263
  label: postType.name,
321
264
  transientEdits: {
322
- blocks: true,
265
+ ...blocksTransientEdits,
323
266
  selection: true
324
267
  },
325
- mergedEdits: {
326
- meta: true
327
- },
268
+ mergedEdits: { meta: true },
328
269
  rawAttributes: POST_RAW_ATTRIBUTES,
329
- getTitle: record => {
330
- var _record$slug;
331
- return record?.title?.rendered || record?.title || (isTemplate ? capitalCase((_record$slug = record.slug) !== null && _record$slug !== void 0 ? _record$slug : '') : String(record.id));
332
- },
333
- __unstablePrePersist: isTemplate ? undefined : prePersistPostType,
270
+ getTitle: (record) => record?.title?.rendered || record?.title || (isTemplate ? capitalCase(record.slug ?? "") : String(record.id)),
271
+ __unstablePrePersist: isTemplate ? void 0 : prePersistPostType,
334
272
  __unstable_rest_base: postType.rest_base,
335
- syncConfig: {
336
- fetch: async id => {
337
- return apiFetch({
338
- path: `/${namespace}/${postType.rest_base}/${id}?context=edit`
339
- });
340
- },
341
- applyChangesToDoc: (doc, changes) => {
342
- const document = doc.getMap('document');
343
- Object.entries(changes).forEach(([key, value]) => {
344
- if (typeof value !== 'function') {
345
- if (key === 'blocks') {
346
- if (!serialisableBlocksCache.has(value)) {
347
- serialisableBlocksCache.set(value, makeBlocksSerializable(value));
348
- }
349
- value = serialisableBlocksCache.get(value);
350
- }
351
- if (document.get(key) !== value) {
352
- document.set(key, value);
353
- }
354
- }
355
- });
356
- },
357
- fromCRDTDoc: doc => {
358
- return doc.getMap('document').toJSON();
359
- }
360
- },
361
- syncObjectType: 'postType/' + postType.name,
362
- getSyncObjectId: id => id,
273
+ syncConfig,
363
274
  supportsPagination: true,
364
- getRevisionsUrl: (parentId, revisionId) => `/${namespace}/${postType.rest_base}/${parentId}/revisions${revisionId ? '/' + revisionId : ''}`,
275
+ getRevisionsUrl: (parentId, revisionId) => `/${namespace}/${postType.rest_base}/${parentId}/revisions${revisionId ? "/" + revisionId : ""}`,
365
276
  revisionKey: DEFAULT_ENTITY_KEY
366
277
  };
367
278
  });
368
279
  }
369
-
370
- /**
371
- * Returns the list of the taxonomies entities.
372
- *
373
- * @return {Promise} Entities promise
374
- */
375
280
  async function loadTaxonomyEntities() {
376
281
  const taxonomies = await apiFetch({
377
- path: '/wp/v2/taxonomies?context=view'
282
+ path: "/wp/v2/taxonomies?context=view"
378
283
  });
379
- return Object.entries(taxonomies !== null && taxonomies !== void 0 ? taxonomies : {}).map(([name, taxonomy]) => {
380
- var _taxonomy$rest_namesp;
381
- const namespace = (_taxonomy$rest_namesp = taxonomy?.rest_namespace) !== null && _taxonomy$rest_namesp !== void 0 ? _taxonomy$rest_namesp : 'wp/v2';
284
+ return Object.entries(taxonomies ?? {}).map(([name, taxonomy]) => {
285
+ const namespace = taxonomy?.rest_namespace ?? "wp/v2";
382
286
  return {
383
- kind: 'taxonomy',
287
+ kind: "taxonomy",
384
288
  baseURL: `/${namespace}/${taxonomy.rest_base}`,
385
- baseURLParams: {
386
- context: 'edit'
387
- },
289
+ baseURLParams: { context: "edit" },
388
290
  name,
389
291
  label: taxonomy.name,
390
- getTitle: record => record?.name,
292
+ getTitle: (record) => record?.name,
391
293
  supportsPagination: true
392
294
  };
393
295
  });
394
296
  }
395
-
396
- /**
397
- * Returns the Site entity.
398
- *
399
- * @return {Promise} Entity promise
400
- */
401
297
  async function loadSiteEntity() {
402
- var _site$schema$properti;
403
298
  const entity = {
404
- label: __('Site'),
405
- name: 'site',
406
- kind: 'root',
407
- baseURL: '/wp/v2/settings',
299
+ label: __("Site"),
300
+ name: "site",
301
+ kind: "root",
302
+ baseURL: "/wp/v2/settings",
408
303
  syncConfig: {
409
- fetch: async () => {
410
- return apiFetch({
411
- path: '/wp/v2/settings'
412
- });
413
- },
414
- applyChangesToDoc: (doc, changes) => {
415
- const document = doc.getMap('document');
416
- Object.entries(changes).forEach(([key, value]) => {
417
- if (document.get(key) !== value) {
418
- document.set(key, value);
419
- }
420
- });
421
- },
422
- fromCRDTDoc: doc => {
423
- return doc.getMap('document').toJSON();
424
- }
304
+ applyChangesToCRDTDoc: defaultApplyChangesToCRDTDoc,
305
+ getChangesFromCRDTDoc: defaultGetChangesFromCRDTDoc
425
306
  },
426
- syncObjectType: 'root/site',
427
- getSyncObjectId: () => 'index',
428
307
  meta: {}
429
308
  };
430
309
  const site = await apiFetch({
431
310
  path: entity.baseURL,
432
- method: 'OPTIONS'
311
+ method: "OPTIONS"
433
312
  });
434
313
  const labels = {};
435
- Object.entries((_site$schema$properti = site?.schema?.properties) !== null && _site$schema$properti !== void 0 ? _site$schema$properti : {}).forEach(([key, value]) => {
436
- // Ignore properties `title` and `type` keys.
437
- if (typeof value === 'object' && value.title) {
438
- labels[key] = value.title;
439
- }
440
- });
441
- return [{
442
- ...entity,
443
- meta: {
444
- labels
314
+ Object.entries(site?.schema?.properties ?? {}).forEach(
315
+ ([key, value]) => {
316
+ if (typeof value === "object" && value.title) {
317
+ labels[key] = value.title;
318
+ }
445
319
  }
446
- }];
320
+ );
321
+ return [{ ...entity, meta: { labels } }];
447
322
  }
448
-
449
- /**
450
- * Returns the entity's getter method name given its kind and name or plural name.
451
- *
452
- * @example
453
- * ```js
454
- * const nameSingular = getMethodName( 'root', 'theme', 'get' );
455
- * // nameSingular is getRootTheme
456
- *
457
- * const namePlural = getMethodName( 'root', 'themes', 'set' );
458
- * // namePlural is setRootThemes
459
- * ```
460
- *
461
- * @param {string} kind Entity kind.
462
- * @param {string} name Entity name or plural name.
463
- * @param {string} prefix Function prefix.
464
- *
465
- * @return {string} Method name
466
- */
467
- export const getMethodName = (kind, name, prefix = 'get') => {
468
- const kindPrefix = kind === 'root' ? '' : pascalCase(kind);
323
+ const getMethodName = (kind, name, prefix = "get") => {
324
+ const kindPrefix = kind === "root" ? "" : pascalCase(kind);
469
325
  const suffix = pascalCase(name);
470
326
  return `${prefix}${kindPrefix}${suffix}`;
471
327
  };
472
- //# sourceMappingURL=entities.js.map
328
+ export {
329
+ DEFAULT_ENTITY_KEY,
330
+ additionalEntityConfigLoaders,
331
+ deprecatedEntities,
332
+ getMethodName,
333
+ prePersistPostType,
334
+ rootEntitiesConfig
335
+ };
336
+ //# sourceMappingURL=entities.js.map