@nascentdigital/funnel-editor 4.4.18

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 (801) hide show
  1. package/README.md +44 -0
  2. package/dist/EditorApp.d.ts +9 -0
  3. package/dist/EditorApp.js +40 -0
  4. package/dist/EditorRoutes.d.ts +1 -0
  5. package/dist/EditorRoutes.js +116 -0
  6. package/dist/api/EditorApi.d.ts +4 -0
  7. package/dist/api/EditorApi.js +292 -0
  8. package/dist/api/EditorApiCommand.d.ts +32 -0
  9. package/dist/api/EditorApiCommand.js +159 -0
  10. package/dist/api/EditorAuthCommand.d.ts +29 -0
  11. package/dist/api/EditorAuthCommand.js +44 -0
  12. package/dist/api/auth/CmsAuthCommand.d.ts +13 -0
  13. package/dist/api/auth/CmsAuthCommand.js +36 -0
  14. package/dist/api/auth/GoogleAuthCommand.d.ts +10 -0
  15. package/dist/api/auth/GoogleAuthCommand.js +43 -0
  16. package/dist/api/auth/index.d.ts +2 -0
  17. package/dist/api/auth/index.js +18 -0
  18. package/dist/api/changeset/CommitChangeSetCommand.d.ts +14 -0
  19. package/dist/api/changeset/CommitChangeSetCommand.js +38 -0
  20. package/dist/api/changeset/GetChangeSetCommand.d.ts +13 -0
  21. package/dist/api/changeset/GetChangeSetCommand.js +35 -0
  22. package/dist/api/changeset/ListChangeSetGroupsCommand.d.ts +13 -0
  23. package/dist/api/changeset/ListChangeSetGroupsCommand.js +37 -0
  24. package/dist/api/changeset/ListChangeSetsCommand.d.ts +13 -0
  25. package/dist/api/changeset/ListChangeSetsCommand.js +35 -0
  26. package/dist/api/changeset/RevertChangeSetCommand.d.ts +13 -0
  27. package/dist/api/changeset/RevertChangeSetCommand.js +35 -0
  28. package/dist/api/changeset/index.d.ts +5 -0
  29. package/dist/api/changeset/index.js +21 -0
  30. package/dist/api/collections/CreateCollectionCommand.d.ts +14 -0
  31. package/dist/api/collections/CreateCollectionCommand.js +39 -0
  32. package/dist/api/collections/DuplicateCollectionCommand.d.ts +14 -0
  33. package/dist/api/collections/DuplicateCollectionCommand.js +38 -0
  34. package/dist/api/collections/GetCollectionCommand.d.ts +13 -0
  35. package/dist/api/collections/GetCollectionCommand.js +35 -0
  36. package/dist/api/collections/GetCollectionDependantsCommand.d.ts +13 -0
  37. package/dist/api/collections/GetCollectionDependantsCommand.js +35 -0
  38. package/dist/api/collections/GetCollectionDependenciesCommand.d.ts +13 -0
  39. package/dist/api/collections/GetCollectionDependenciesCommand.js +35 -0
  40. package/dist/api/collections/GetCollectionGroupCommand.d.ts +13 -0
  41. package/dist/api/collections/GetCollectionGroupCommand.js +35 -0
  42. package/dist/api/collections/GetCollectionItemsCommand.d.ts +13 -0
  43. package/dist/api/collections/GetCollectionItemsCommand.js +35 -0
  44. package/dist/api/collections/GetCollectionsOverviewCommand.d.ts +13 -0
  45. package/dist/api/collections/GetCollectionsOverviewCommand.js +35 -0
  46. package/dist/api/collections/UnpublishCollectionCommand.d.ts +14 -0
  47. package/dist/api/collections/UnpublishCollectionCommand.js +38 -0
  48. package/dist/api/collections/UpdateCollectionCommand.d.ts +14 -0
  49. package/dist/api/collections/UpdateCollectionCommand.js +38 -0
  50. package/dist/api/collections/index.d.ts +10 -0
  51. package/dist/api/collections/index.js +26 -0
  52. package/dist/api/files/CreateFileCommand.d.ts +13 -0
  53. package/dist/api/files/CreateFileCommand.js +36 -0
  54. package/dist/api/files/DeleteFileCommand.d.ts +13 -0
  55. package/dist/api/files/DeleteFileCommand.js +35 -0
  56. package/dist/api/files/GetFileCommand.d.ts +13 -0
  57. package/dist/api/files/GetFileCommand.js +35 -0
  58. package/dist/api/files/GetFilesCommand.d.ts +13 -0
  59. package/dist/api/files/GetFilesCommand.js +35 -0
  60. package/dist/api/files/UpdateFileCommand.d.ts +13 -0
  61. package/dist/api/files/UpdateFileCommand.js +35 -0
  62. package/dist/api/files/index.d.ts +5 -0
  63. package/dist/api/files/index.js +21 -0
  64. package/dist/api/index.d.ts +6 -0
  65. package/dist/api/index.js +22 -0
  66. package/dist/api/pages/CreatePageCommand.d.ts +14 -0
  67. package/dist/api/pages/CreatePageCommand.js +39 -0
  68. package/dist/api/pages/DuplicatePageCommand.d.ts +14 -0
  69. package/dist/api/pages/DuplicatePageCommand.js +38 -0
  70. package/dist/api/pages/FindPagesCommand.d.ts +13 -0
  71. package/dist/api/pages/FindPagesCommand.js +35 -0
  72. package/dist/api/pages/GetPageCommand.d.ts +13 -0
  73. package/dist/api/pages/GetPageCommand.js +35 -0
  74. package/dist/api/pages/GetPageCountsCommand.d.ts +16 -0
  75. package/dist/api/pages/GetPageCountsCommand.js +51 -0
  76. package/dist/api/pages/GetPageDependantsCommand.d.ts +13 -0
  77. package/dist/api/pages/GetPageDependantsCommand.js +35 -0
  78. package/dist/api/pages/GetPageDependenciesCommand.d.ts +13 -0
  79. package/dist/api/pages/GetPageDependenciesCommand.js +35 -0
  80. package/dist/api/pages/GetPageGroup.d.ts +13 -0
  81. package/dist/api/pages/GetPageGroup.js +36 -0
  82. package/dist/api/pages/GetPageSummariesCommand.d.ts +13 -0
  83. package/dist/api/pages/GetPageSummariesCommand.js +35 -0
  84. package/dist/api/pages/GetPagesOverviewCommand.d.ts +15 -0
  85. package/dist/api/pages/GetPagesOverviewCommand.js +35 -0
  86. package/dist/api/pages/SearchPagesCommand.d.ts +13 -0
  87. package/dist/api/pages/SearchPagesCommand.js +35 -0
  88. package/dist/api/pages/TouchPageCommand.d.ts +14 -0
  89. package/dist/api/pages/TouchPageCommand.js +34 -0
  90. package/dist/api/pages/UnpublishPageCommand.d.ts +14 -0
  91. package/dist/api/pages/UnpublishPageCommand.js +38 -0
  92. package/dist/api/pages/UpdatePageCommand.d.ts +14 -0
  93. package/dist/api/pages/UpdatePageCommand.js +38 -0
  94. package/dist/api/pages/index.d.ts +14 -0
  95. package/dist/api/pages/index.js +30 -0
  96. package/dist/api/site-config/GetSiteConfigCommand.d.ts +13 -0
  97. package/dist/api/site-config/GetSiteConfigCommand.js +31 -0
  98. package/dist/api/site-config/UpdateSiteConfigCommand.d.ts +14 -0
  99. package/dist/api/site-config/UpdateSiteConfigCommand.js +50 -0
  100. package/dist/api/site-config/index.d.ts +2 -0
  101. package/dist/api/site-config/index.js +18 -0
  102. package/dist/api/upgrade/ExecuteUpgradeCommand.d.ts +12 -0
  103. package/dist/api/upgrade/ExecuteUpgradeCommand.js +30 -0
  104. package/dist/api/upgrade/GetUpgradeStatusCommand.d.ts +12 -0
  105. package/dist/api/upgrade/GetUpgradeStatusCommand.js +30 -0
  106. package/dist/api/upgrade/index.d.ts +2 -0
  107. package/dist/api/upgrade/index.js +18 -0
  108. package/dist/api/users/CreateUserCommand.d.ts +13 -0
  109. package/dist/api/users/CreateUserCommand.js +52 -0
  110. package/dist/api/users/DeleteUserCommand.d.ts +13 -0
  111. package/dist/api/users/DeleteUserCommand.js +52 -0
  112. package/dist/api/users/GetCurrentUserCommand.d.ts +14 -0
  113. package/dist/api/users/GetCurrentUserCommand.js +34 -0
  114. package/dist/api/users/GetUserCommand.d.ts +13 -0
  115. package/dist/api/users/GetUserCommand.js +37 -0
  116. package/dist/api/users/GetUsersCommand.d.ts +13 -0
  117. package/dist/api/users/GetUsersCommand.js +36 -0
  118. package/dist/api/users/ResetUserCommand.d.ts +14 -0
  119. package/dist/api/users/ResetUserCommand.js +34 -0
  120. package/dist/api/users/UpdateUserCommand.d.ts +13 -0
  121. package/dist/api/users/UpdateUserCommand.js +55 -0
  122. package/dist/api/users/UserUtils.d.ts +7 -0
  123. package/dist/api/users/UserUtils.js +88 -0
  124. package/dist/api/users/index.d.ts +7 -0
  125. package/dist/api/users/index.js +23 -0
  126. package/dist/changesets/index.d.ts +1 -0
  127. package/dist/changesets/index.js +17 -0
  128. package/dist/changesets/screens/ChangeSetViewer.d.ts +7 -0
  129. package/dist/changesets/screens/ChangeSetViewer.js +210 -0
  130. package/dist/changesets/screens/ChangeSetsExplorer.d.ts +1 -0
  131. package/dist/changesets/screens/ChangeSetsExplorer.js +64 -0
  132. package/dist/changesets/screens/index.d.ts +2 -0
  133. package/dist/changesets/screens/index.js +18 -0
  134. package/dist/collection/components/CollectionHeader.d.ts +10 -0
  135. package/dist/collection/components/CollectionHeader.js +76 -0
  136. package/dist/collection/components/CollectionNotCreated.d.ts +8 -0
  137. package/dist/collection/components/CollectionNotCreated.js +44 -0
  138. package/dist/collection/components/CollectionStatus.d.ts +6 -0
  139. package/dist/collection/components/CollectionStatus.js +218 -0
  140. package/dist/collection/components/index.d.ts +3 -0
  141. package/dist/collection/components/index.js +19 -0
  142. package/dist/collection/components/status/AutoSave.d.ts +6 -0
  143. package/dist/collection/components/status/AutoSave.js +35 -0
  144. package/dist/collection/components/status/index.d.ts +1 -0
  145. package/dist/collection/components/status/index.js +17 -0
  146. package/dist/collection/hooks/CollectionController.d.ts +40 -0
  147. package/dist/collection/hooks/CollectionController.js +320 -0
  148. package/dist/collection/hooks/index.d.ts +2 -0
  149. package/dist/collection/hooks/index.js +18 -0
  150. package/dist/collection/hooks/useCollectionController.d.ts +8 -0
  151. package/dist/collection/hooks/useCollectionController.js +24 -0
  152. package/dist/collection/index.d.ts +1 -0
  153. package/dist/collection/index.js +17 -0
  154. package/dist/collection/screens/CollectionEditor.d.ts +9 -0
  155. package/dist/collection/screens/CollectionEditor.js +76 -0
  156. package/dist/collection/screens/index.d.ts +1 -0
  157. package/dist/collection/screens/index.js +17 -0
  158. package/dist/core/app/AppEvent.d.ts +29 -0
  159. package/dist/core/app/AppEvent.js +44 -0
  160. package/dist/core/app/AppState.d.ts +22 -0
  161. package/dist/core/app/AppState.js +69 -0
  162. package/dist/core/app/AppStateContainer.d.ts +5 -0
  163. package/dist/core/app/AppStateContainer.js +14 -0
  164. package/dist/core/app/AppStateContext.d.ts +7 -0
  165. package/dist/core/app/AppStateContext.js +6 -0
  166. package/dist/core/app/error/AppError.d.ts +7 -0
  167. package/dist/core/app/error/AppError.js +12 -0
  168. package/dist/core/app/error/EditorBlocked.d.ts +1 -0
  169. package/dist/core/app/error/EditorBlocked.js +18 -0
  170. package/dist/core/app/error/EditorOffline.d.ts +1 -0
  171. package/dist/core/app/error/EditorOffline.js +18 -0
  172. package/dist/core/app/error/index.d.ts +3 -0
  173. package/dist/core/app/error/index.js +19 -0
  174. package/dist/core/app/index.d.ts +5 -0
  175. package/dist/core/app/index.js +21 -0
  176. package/dist/core/app/useAppState.d.ts +1 -0
  177. package/dist/core/app/useAppState.js +32 -0
  178. package/dist/core/auth/Auth.d.ts +1 -0
  179. package/dist/core/auth/Auth.js +52 -0
  180. package/dist/core/auth/AuthContainer.d.ts +5 -0
  181. package/dist/core/auth/AuthContainer.js +16 -0
  182. package/dist/core/auth/AuthContext.d.ts +7 -0
  183. package/dist/core/auth/AuthContext.js +6 -0
  184. package/dist/core/auth/Authenticator.d.ts +36 -0
  185. package/dist/core/auth/Authenticator.js +181 -0
  186. package/dist/core/auth/index.d.ts +5 -0
  187. package/dist/core/auth/index.js +21 -0
  188. package/dist/core/auth/useAuthenticator.d.ts +1 -0
  189. package/dist/core/auth/useAuthenticator.js +24 -0
  190. package/dist/core/client/EditorApiClient.d.ts +72 -0
  191. package/dist/core/client/EditorApiClient.js +253 -0
  192. package/dist/core/client/EditorApiContainer.d.ts +5 -0
  193. package/dist/core/client/EditorApiContainer.js +16 -0
  194. package/dist/core/client/EditorApiContext.d.ts +7 -0
  195. package/dist/core/client/EditorApiContext.js +6 -0
  196. package/dist/core/client/index.d.ts +3 -0
  197. package/dist/core/client/index.js +19 -0
  198. package/dist/core/client/useEditorApi.d.ts +2 -0
  199. package/dist/core/client/useEditorApi.js +12 -0
  200. package/dist/core/components/AutoSave.d.ts +9 -0
  201. package/dist/core/components/AutoSave.js +38 -0
  202. package/dist/core/components/ColorModeToggle.d.ts +8 -0
  203. package/dist/core/components/ColorModeToggle.js +40 -0
  204. package/dist/core/components/Header.d.ts +26 -0
  205. package/dist/core/components/Header.js +69 -0
  206. package/dist/core/components/TagEditor.d.ts +8 -0
  207. package/dist/core/components/TagEditor.js +26 -0
  208. package/dist/core/components/UserEditor.d.ts +14 -0
  209. package/dist/core/components/UserEditor.js +241 -0
  210. package/dist/core/components/feedback/Badge.d.ts +13 -0
  211. package/dist/core/components/feedback/Badge.js +61 -0
  212. package/dist/core/components/feedback/CountBadge.d.ts +9 -0
  213. package/dist/core/components/feedback/CountBadge.js +27 -0
  214. package/dist/core/components/feedback/EmptyState.d.ts +13 -0
  215. package/dist/core/components/feedback/EmptyState.js +22 -0
  216. package/dist/core/components/feedback/ErrorMessage.d.ts +15 -0
  217. package/dist/core/components/feedback/ErrorMessage.js +81 -0
  218. package/dist/core/components/feedback/Note.d.ts +9 -0
  219. package/dist/core/components/feedback/Note.js +32 -0
  220. package/dist/core/components/feedback/ProgressBar.d.ts +8 -0
  221. package/dist/core/components/feedback/ProgressBar.js +23 -0
  222. package/dist/core/components/feedback/SelectionDecorator.d.ts +7 -0
  223. package/dist/core/components/feedback/SelectionDecorator.js +20 -0
  224. package/dist/core/components/feedback/StatusBadge.d.ts +9 -0
  225. package/dist/core/components/feedback/StatusBadge.js +31 -0
  226. package/dist/core/components/feedback/StatusChip.d.ts +9 -0
  227. package/dist/core/components/feedback/StatusChip.js +33 -0
  228. package/dist/core/components/feedback/StatusIcon.d.ts +10 -0
  229. package/dist/core/components/feedback/StatusIcon.js +53 -0
  230. package/dist/core/components/feedback/dialog/Confirm.d.ts +32 -0
  231. package/dist/core/components/feedback/dialog/Confirm.js +103 -0
  232. package/dist/core/components/feedback/dialog/Custom.d.ts +15 -0
  233. package/dist/core/components/feedback/dialog/Custom.js +14 -0
  234. package/dist/core/components/feedback/dialog/DialogContainer.d.ts +7 -0
  235. package/dist/core/components/feedback/dialog/DialogContainer.js +65 -0
  236. package/dist/core/components/feedback/dialog/DialogContext.d.ts +11 -0
  237. package/dist/core/components/feedback/dialog/DialogContext.js +6 -0
  238. package/dist/core/components/feedback/dialog/DialogLayout.d.ts +20 -0
  239. package/dist/core/components/feedback/dialog/DialogLayout.js +18 -0
  240. package/dist/core/components/feedback/dialog/MinimalDialogLayout.d.ts +20 -0
  241. package/dist/core/components/feedback/dialog/MinimalDialogLayout.js +18 -0
  242. package/dist/core/components/feedback/dialog/Notify.d.ts +19 -0
  243. package/dist/core/components/feedback/dialog/Notify.js +28 -0
  244. package/dist/core/components/feedback/dialog/index.d.ts +4 -0
  245. package/dist/core/components/feedback/dialog/index.js +20 -0
  246. package/dist/core/components/feedback/dialog/useDialog.d.ts +24 -0
  247. package/dist/core/components/feedback/dialog/useDialog.js +78 -0
  248. package/dist/core/components/feedback/index.d.ts +11 -0
  249. package/dist/core/components/feedback/index.js +27 -0
  250. package/dist/core/components/fields/BooleanField.d.ts +10 -0
  251. package/dist/core/components/fields/BooleanField.js +29 -0
  252. package/dist/core/components/fields/DateField.d.ts +10 -0
  253. package/dist/core/components/fields/DateField.js +18 -0
  254. package/dist/core/components/fields/DynamicPagesEditor.d.ts +16 -0
  255. package/dist/core/components/fields/DynamicPagesEditor.js +212 -0
  256. package/dist/core/components/fields/EmptyFieldCard.d.ts +12 -0
  257. package/dist/core/components/fields/EmptyFieldCard.js +52 -0
  258. package/dist/core/components/fields/EnumField.d.ts +11 -0
  259. package/dist/core/components/fields/EnumField.js +58 -0
  260. package/dist/core/components/fields/FieldButton.d.ts +11 -0
  261. package/dist/core/components/fields/FieldButton.js +17 -0
  262. package/dist/core/components/fields/FieldCard.d.ts +18 -0
  263. package/dist/core/components/fields/FieldCard.js +44 -0
  264. package/dist/core/components/fields/FieldCardLayout.d.ts +17 -0
  265. package/dist/core/components/fields/FieldCardLayout.js +63 -0
  266. package/dist/core/components/fields/FieldEditor.d.ts +15 -0
  267. package/dist/core/components/fields/FieldEditor.js +97 -0
  268. package/dist/core/components/fields/FieldErrorController.d.ts +12 -0
  269. package/dist/core/components/fields/FieldErrorController.js +13 -0
  270. package/dist/core/components/fields/FieldHeader.d.ts +13 -0
  271. package/dist/core/components/fields/FieldHeader.js +62 -0
  272. package/dist/core/components/fields/FieldLayout.d.ts +17 -0
  273. package/dist/core/components/fields/FieldLayout.js +61 -0
  274. package/dist/core/components/fields/FieldsPanel.d.ts +14 -0
  275. package/dist/core/components/fields/FieldsPanel.js +110 -0
  276. package/dist/core/components/fields/FormEditor.d.ts +8 -0
  277. package/dist/core/components/fields/FormEditor.js +139 -0
  278. package/dist/core/components/fields/ListEditor.d.ts +8 -0
  279. package/dist/core/components/fields/ListEditor.js +152 -0
  280. package/dist/core/components/fields/OptInField.d.ts +8 -0
  281. package/dist/core/components/fields/OptInField.js +23 -0
  282. package/dist/core/components/fields/RichTextEditor.d.ts +24 -0
  283. package/dist/core/components/fields/RichTextEditor.js +219 -0
  284. package/dist/core/components/fields/RichTextField.d.ts +10 -0
  285. package/dist/core/components/fields/RichTextField.js +38 -0
  286. package/dist/core/components/fields/TextField.d.ts +25 -0
  287. package/dist/core/components/fields/TextField.js +191 -0
  288. package/dist/core/components/fields/TimestampField.d.ts +13 -0
  289. package/dist/core/components/fields/TimestampField.js +47 -0
  290. package/dist/core/components/fields/asset/AssetCard.d.ts +6 -0
  291. package/dist/core/components/fields/asset/AssetCard.js +71 -0
  292. package/dist/core/components/fields/asset/AssetEditor.d.ts +13 -0
  293. package/dist/core/components/fields/asset/AssetEditor.js +213 -0
  294. package/dist/core/components/fields/asset/AssetInfo.d.ts +48 -0
  295. package/dist/core/components/fields/asset/AssetInfo.js +116 -0
  296. package/dist/core/components/fields/asset/AssetPicker.d.ts +12 -0
  297. package/dist/core/components/fields/asset/AssetPicker.js +218 -0
  298. package/dist/core/components/fields/asset/AssetPreview.d.ts +9 -0
  299. package/dist/core/components/fields/asset/AssetPreview.js +27 -0
  300. package/dist/core/components/fields/asset/AssetSelectorPane.d.ts +10 -0
  301. package/dist/core/components/fields/asset/AssetSelectorPane.js +182 -0
  302. package/dist/core/components/fields/asset/AssetSpecs.d.ts +11 -0
  303. package/dist/core/components/fields/asset/AssetSpecs.js +59 -0
  304. package/dist/core/components/fields/asset/AssetUploader.d.ts +13 -0
  305. package/dist/core/components/fields/asset/AssetUploader.js +212 -0
  306. package/dist/core/components/fields/asset/index.d.ts +5 -0
  307. package/dist/core/components/fields/asset/index.js +21 -0
  308. package/dist/core/components/fields/asset/preview/ImagePreview.d.ts +8 -0
  309. package/dist/core/components/fields/asset/preview/ImagePreview.js +37 -0
  310. package/dist/core/components/fields/asset/preview/VideoPreview.d.ts +9 -0
  311. package/dist/core/components/fields/asset/preview/VideoPreview.js +77 -0
  312. package/dist/core/components/fields/asset/preview/index.d.ts +2 -0
  313. package/dist/core/components/fields/asset/preview/index.js +18 -0
  314. package/dist/core/components/fields/asset/useAssetFields.d.ts +20 -0
  315. package/dist/core/components/fields/asset/useAssetFields.js +39 -0
  316. package/dist/core/components/fields/collection/CollectionCard.d.ts +6 -0
  317. package/dist/core/components/fields/collection/CollectionCard.js +58 -0
  318. package/dist/core/components/fields/collection/CollectionEditor.d.ts +15 -0
  319. package/dist/core/components/fields/collection/CollectionEditor.js +154 -0
  320. package/dist/core/components/fields/collection/CollectionPicker.d.ts +15 -0
  321. package/dist/core/components/fields/collection/CollectionPicker.js +252 -0
  322. package/dist/core/components/fields/collection/index.d.ts +3 -0
  323. package/dist/core/components/fields/collection/index.js +19 -0
  324. package/dist/core/components/fields/collection/previews/ClientPreview.d.ts +10 -0
  325. package/dist/core/components/fields/collection/previews/ClientPreview.js +29 -0
  326. package/dist/core/components/fields/collection/previews/GenericPreview.d.ts +9 -0
  327. package/dist/core/components/fields/collection/previews/GenericPreview.js +10 -0
  328. package/dist/core/components/fields/collection/previews/index.d.ts +2 -0
  329. package/dist/core/components/fields/collection/previews/index.js +18 -0
  330. package/dist/core/components/fields/dynamicPages/PageCard.d.ts +10 -0
  331. package/dist/core/components/fields/dynamicPages/PageCard.js +21 -0
  332. package/dist/core/components/fields/dynamicPages/PageGhostCard.d.ts +7 -0
  333. package/dist/core/components/fields/dynamicPages/PageGhostCard.js +14 -0
  334. package/dist/core/components/fields/dynamicPages/PagePriorityDialog.d.ts +15 -0
  335. package/dist/core/components/fields/dynamicPages/PagePriorityDialog.js +115 -0
  336. package/dist/core/components/fields/dynamicPages/index.d.ts +3 -0
  337. package/dist/core/components/fields/dynamicPages/index.js +19 -0
  338. package/dist/core/components/fields/embed/EmbeddedVideoCard.d.ts +6 -0
  339. package/dist/core/components/fields/embed/EmbeddedVideoCard.js +39 -0
  340. package/dist/core/components/fields/embed/EmbeddedVideoEditor.d.ts +15 -0
  341. package/dist/core/components/fields/embed/EmbeddedVideoEditor.js +234 -0
  342. package/dist/core/components/fields/embed/index.d.ts +2 -0
  343. package/dist/core/components/fields/embed/index.js +18 -0
  344. package/dist/core/components/fields/factories/AssetFactory.d.ts +11 -0
  345. package/dist/core/components/fields/factories/AssetFactory.js +150 -0
  346. package/dist/core/components/fields/factories/CollectionFactory.d.ts +12 -0
  347. package/dist/core/components/fields/factories/CollectionFactory.js +167 -0
  348. package/dist/core/components/fields/factories/EmbeddedVideoFactory.d.ts +12 -0
  349. package/dist/core/components/fields/factories/EmbeddedVideoFactory.js +40 -0
  350. package/dist/core/components/fields/factories/FieldValueFactory.d.ts +11 -0
  351. package/dist/core/components/fields/factories/FieldValueFactory.js +52 -0
  352. package/dist/core/components/fields/factories/LinkFactory.d.ts +13 -0
  353. package/dist/core/components/fields/factories/LinkFactory.js +40 -0
  354. package/dist/core/components/fields/factories/ObjectFactory.d.ts +11 -0
  355. package/dist/core/components/fields/factories/ObjectFactory.js +39 -0
  356. package/dist/core/components/fields/factories/PageFactory.d.ts +11 -0
  357. package/dist/core/components/fields/factories/PageFactory.js +39 -0
  358. package/dist/core/components/fields/factories/TextFactory.d.ts +11 -0
  359. package/dist/core/components/fields/factories/TextFactory.js +47 -0
  360. package/dist/core/components/fields/factories/index.d.ts +1 -0
  361. package/dist/core/components/fields/factories/index.js +5 -0
  362. package/dist/core/components/fields/form/FormFieldEditor.d.ts +18 -0
  363. package/dist/core/components/fields/form/FormFieldEditor.js +125 -0
  364. package/dist/core/components/fields/form/FormFieldItem.d.ts +15 -0
  365. package/dist/core/components/fields/form/FormFieldItem.js +79 -0
  366. package/dist/core/components/fields/form/index.d.ts +2 -0
  367. package/dist/core/components/fields/form/index.js +18 -0
  368. package/dist/core/components/fields/index.d.ts +8 -0
  369. package/dist/core/components/fields/index.js +24 -0
  370. package/dist/core/components/fields/link/LinkCard.d.ts +6 -0
  371. package/dist/core/components/fields/link/LinkCard.js +95 -0
  372. package/dist/core/components/fields/link/LinkEditor.d.ts +16 -0
  373. package/dist/core/components/fields/link/LinkEditor.js +232 -0
  374. package/dist/core/components/fields/link/index.d.ts +2 -0
  375. package/dist/core/components/fields/link/index.js +18 -0
  376. package/dist/core/components/fields/list/CreateFieldButton.d.ts +10 -0
  377. package/dist/core/components/fields/list/CreateFieldButton.js +45 -0
  378. package/dist/core/components/fields/list/CreateFieldCard.d.ts +12 -0
  379. package/dist/core/components/fields/list/CreateFieldCard.js +52 -0
  380. package/dist/core/components/fields/list/index.d.ts +2 -0
  381. package/dist/core/components/fields/list/index.js +18 -0
  382. package/dist/core/components/fields/object/ObjectCard.d.ts +6 -0
  383. package/dist/core/components/fields/object/ObjectCard.js +43 -0
  384. package/dist/core/components/fields/object/ObjectEditor.d.ts +12 -0
  385. package/dist/core/components/fields/object/ObjectEditor.js +62 -0
  386. package/dist/core/components/fields/object/index.d.ts +2 -0
  387. package/dist/core/components/fields/object/index.js +18 -0
  388. package/dist/core/components/fields/page/PageCard.d.ts +6 -0
  389. package/dist/core/components/fields/page/PageCard.js +48 -0
  390. package/dist/core/components/fields/page/PagePicker.d.ts +18 -0
  391. package/dist/core/components/fields/page/PagePicker.js +289 -0
  392. package/dist/core/components/fields/page/index.d.ts +2 -0
  393. package/dist/core/components/fields/page/index.js +18 -0
  394. package/dist/core/components/fields/richtext/FloatingToolbarPlugin.d.ts +10 -0
  395. package/dist/core/components/fields/richtext/FloatingToolbarPlugin.js +85 -0
  396. package/dist/core/components/fields/richtext/LinkEditor.d.ts +9 -0
  397. package/dist/core/components/fields/richtext/LinkEditor.js +112 -0
  398. package/dist/core/components/fields/richtext/LinkPopup.d.ts +6 -0
  399. package/dist/core/components/fields/richtext/LinkPopup.js +168 -0
  400. package/dist/core/components/fields/richtext/SanitizerPlugin.d.ts +8 -0
  401. package/dist/core/components/fields/richtext/SanitizerPlugin.js +66 -0
  402. package/dist/core/components/fields/richtext/StyledTextNodePlugin.d.ts +1 -0
  403. package/dist/core/components/fields/richtext/StyledTextNodePlugin.js +44 -0
  404. package/dist/core/components/fields/richtext/Theme.d.ts +6 -0
  405. package/dist/core/components/fields/richtext/Theme.js +65 -0
  406. package/dist/core/components/fields/richtext/Toolbar.d.ts +11 -0
  407. package/dist/core/components/fields/richtext/Toolbar.js +382 -0
  408. package/dist/core/components/fields/richtext/index.d.ts +7 -0
  409. package/dist/core/components/fields/richtext/index.js +23 -0
  410. package/dist/core/components/fields/richtext/useEditorActive.d.ts +4 -0
  411. package/dist/core/components/fields/richtext/useEditorActive.js +44 -0
  412. package/dist/core/components/index.d.ts +12 -0
  413. package/dist/core/components/index.js +28 -0
  414. package/dist/core/components/interaction/Animate.d.ts +13 -0
  415. package/dist/core/components/interaction/Animate.js +23 -0
  416. package/dist/core/components/interaction/AvatarButton.d.ts +9 -0
  417. package/dist/core/components/interaction/AvatarButton.js +28 -0
  418. package/dist/core/components/interaction/Button.d.ts +31 -0
  419. package/dist/core/components/interaction/Button.js +45 -0
  420. package/dist/core/components/interaction/ButtonLink.d.ts +19 -0
  421. package/dist/core/components/interaction/ButtonLink.js +30 -0
  422. package/dist/core/components/interaction/Checkbox.d.ts +9 -0
  423. package/dist/core/components/interaction/Checkbox.js +49 -0
  424. package/dist/core/components/interaction/Chip.d.ts +13 -0
  425. package/dist/core/components/interaction/Chip.js +31 -0
  426. package/dist/core/components/interaction/ChipFilters.d.ts +17 -0
  427. package/dist/core/components/interaction/ChipFilters.js +31 -0
  428. package/dist/core/components/interaction/ChoiceChip.d.ts +14 -0
  429. package/dist/core/components/interaction/ChoiceChip.js +31 -0
  430. package/dist/core/components/interaction/Combobox.d.ts +36 -0
  431. package/dist/core/components/interaction/Combobox.js +94 -0
  432. package/dist/core/components/interaction/DatePicker.d.ts +18 -0
  433. package/dist/core/components/interaction/DatePicker.js +156 -0
  434. package/dist/core/components/interaction/DateTimePicker.d.ts +18 -0
  435. package/dist/core/components/interaction/DateTimePicker.js +98 -0
  436. package/dist/core/components/interaction/IconButton.d.ts +26 -0
  437. package/dist/core/components/interaction/IconButton.js +41 -0
  438. package/dist/core/components/interaction/IconLink.d.ts +6 -0
  439. package/dist/core/components/interaction/IconLink.js +28 -0
  440. package/dist/core/components/interaction/LinkGroup.d.ts +18 -0
  441. package/dist/core/components/interaction/LinkGroup.js +68 -0
  442. package/dist/core/components/interaction/Loader.d.ts +10 -0
  443. package/dist/core/components/interaction/Loader.js +35 -0
  444. package/dist/core/components/interaction/MiniEditor.d.ts +19 -0
  445. package/dist/core/components/interaction/MiniEditor.js +113 -0
  446. package/dist/core/components/interaction/MultiSelectControls.d.ts +27 -0
  447. package/dist/core/components/interaction/MultiSelectControls.js +88 -0
  448. package/dist/core/components/interaction/NavButton.d.ts +9 -0
  449. package/dist/core/components/interaction/NavButton.js +47 -0
  450. package/dist/core/components/interaction/Picker.d.ts +5 -0
  451. package/dist/core/components/interaction/Picker.js +26 -0
  452. package/dist/core/components/interaction/Popup.d.ts +34 -0
  453. package/dist/core/components/interaction/Popup.js +160 -0
  454. package/dist/core/components/interaction/Profile.d.ts +11 -0
  455. package/dist/core/components/interaction/Profile.js +15 -0
  456. package/dist/core/components/interaction/QuickInput.d.ts +17 -0
  457. package/dist/core/components/interaction/QuickInput.js +149 -0
  458. package/dist/core/components/interaction/SegmentedButton.d.ts +23 -0
  459. package/dist/core/components/interaction/SegmentedButton.js +75 -0
  460. package/dist/core/components/interaction/Sortable.d.ts +24 -0
  461. package/dist/core/components/interaction/Sortable.js +57 -0
  462. package/dist/core/components/interaction/Toggle.d.ts +9 -0
  463. package/dist/core/components/interaction/Toggle.js +33 -0
  464. package/dist/core/components/interaction/Touchable.d.ts +14 -0
  465. package/dist/core/components/interaction/Touchable.js +33 -0
  466. package/dist/core/components/interaction/centersheet/CenterSheet.d.ts +20 -0
  467. package/dist/core/components/interaction/centersheet/CenterSheet.js +137 -0
  468. package/dist/core/components/interaction/centersheet/CenterSheetContainer.d.ts +5 -0
  469. package/dist/core/components/interaction/centersheet/CenterSheetContainer.js +65 -0
  470. package/dist/core/components/interaction/centersheet/CenterSheetContext.d.ts +27 -0
  471. package/dist/core/components/interaction/centersheet/CenterSheetContext.js +6 -0
  472. package/dist/core/components/interaction/centersheet/index.d.ts +3 -0
  473. package/dist/core/components/interaction/centersheet/index.js +19 -0
  474. package/dist/core/components/interaction/index.d.ts +29 -0
  475. package/dist/core/components/interaction/index.js +45 -0
  476. package/dist/core/components/interaction/menu/Menu.d.ts +25 -0
  477. package/dist/core/components/interaction/menu/Menu.js +88 -0
  478. package/dist/core/components/interaction/menu/MenuButton.d.ts +16 -0
  479. package/dist/core/components/interaction/menu/MenuButton.js +31 -0
  480. package/dist/core/components/interaction/menu/MenuItem.d.ts +27 -0
  481. package/dist/core/components/interaction/menu/MenuItem.js +32 -0
  482. package/dist/core/components/interaction/menu/MenuList.d.ts +11 -0
  483. package/dist/core/components/interaction/menu/MenuList.js +28 -0
  484. package/dist/core/components/interaction/menu/index.d.ts +5 -0
  485. package/dist/core/components/interaction/menu/index.js +21 -0
  486. package/dist/core/components/interaction/menu/useMenuController.d.ts +22 -0
  487. package/dist/core/components/interaction/menu/useMenuController.js +70 -0
  488. package/dist/core/components/interaction/table/Table.d.ts +11 -0
  489. package/dist/core/components/interaction/table/Table.js +21 -0
  490. package/dist/core/components/interaction/table/TableItem.d.ts +15 -0
  491. package/dist/core/components/interaction/table/TableItem.js +56 -0
  492. package/dist/core/components/interaction/table/index.d.ts +2 -0
  493. package/dist/core/components/interaction/table/index.js +18 -0
  494. package/dist/core/components/languageDialog/CreateLanguageStep.d.ts +13 -0
  495. package/dist/core/components/languageDialog/CreateLanguageStep.js +58 -0
  496. package/dist/core/components/languageDialog/ErrorState.d.ts +9 -0
  497. package/dist/core/components/languageDialog/ErrorState.js +11 -0
  498. package/dist/core/components/languageDialog/LanguageDialog.d.ts +21 -0
  499. package/dist/core/components/languageDialog/LanguageDialog.js +102 -0
  500. package/dist/core/components/languageDialog/OverviewStep.d.ts +13 -0
  501. package/dist/core/components/languageDialog/OverviewStep.js +14 -0
  502. package/dist/core/components/languageDialog/index.d.ts +1 -0
  503. package/dist/core/components/languageDialog/index.js +17 -0
  504. package/dist/core/components/layout/InfoPanel.d.ts +15 -0
  505. package/dist/core/components/layout/InfoPanel.js +47 -0
  506. package/dist/core/components/layout/index.d.ts +1 -0
  507. package/dist/core/components/layout/index.js +17 -0
  508. package/dist/core/components/transitions/FadeIn.d.ts +10 -0
  509. package/dist/core/components/transitions/FadeIn.js +41 -0
  510. package/dist/core/components/transitions/LoadingUntilReady.d.ts +8 -0
  511. package/dist/core/components/transitions/LoadingUntilReady.js +14 -0
  512. package/dist/core/components/transitions/index.d.ts +2 -0
  513. package/dist/core/components/transitions/index.js +18 -0
  514. package/dist/core/components/visuals/BlockIcon.d.ts +11 -0
  515. package/dist/core/components/visuals/BlockIcon.js +35 -0
  516. package/dist/core/components/visuals/Icon.d.ts +19 -0
  517. package/dist/core/components/visuals/Icon.js +282 -0
  518. package/dist/core/components/visuals/Illustration.d.ts +11 -0
  519. package/dist/core/components/visuals/Illustration.js +54 -0
  520. package/dist/core/components/visuals/Logo.d.ts +7 -0
  521. package/dist/core/components/visuals/Logo.js +13 -0
  522. package/dist/core/components/visuals/SkeletonLayout.d.ts +9 -0
  523. package/dist/core/components/visuals/SkeletonLayout.js +236 -0
  524. package/dist/core/components/visuals/index.d.ts +5 -0
  525. package/dist/core/components/visuals/index.js +21 -0
  526. package/dist/core/domain/Asset.d.ts +5 -0
  527. package/dist/core/domain/Asset.js +2 -0
  528. package/dist/core/domain/Block.d.ts +55 -0
  529. package/dist/core/domain/Block.js +350 -0
  530. package/dist/core/domain/BlockConfiguration.d.ts +42 -0
  531. package/dist/core/domain/BlockConfiguration.js +240 -0
  532. package/dist/core/domain/ChangeSetBrowser.d.ts +33 -0
  533. package/dist/core/domain/ChangeSetBrowser.js +90 -0
  534. package/dist/core/domain/Collection.d.ts +125 -0
  535. package/dist/core/domain/Collection.js +348 -0
  536. package/dist/core/domain/CollectionBrowser.d.ts +40 -0
  537. package/dist/core/domain/CollectionBrowser.js +119 -0
  538. package/dist/core/domain/CollectionFieldProxy.d.ts +87 -0
  539. package/dist/core/domain/CollectionFieldProxy.js +441 -0
  540. package/dist/core/domain/CollectionGroup.d.ts +24 -0
  541. package/dist/core/domain/CollectionGroup.js +22 -0
  542. package/dist/core/domain/CollectionSummary.d.ts +33 -0
  543. package/dist/core/domain/CollectionSummary.js +67 -0
  544. package/dist/core/domain/Collections.d.ts +40 -0
  545. package/dist/core/domain/Collections.js +107 -0
  546. package/dist/core/domain/IAssetStore.d.ts +15 -0
  547. package/dist/core/domain/IAssetStore.js +2 -0
  548. package/dist/core/domain/ICollectionStore.d.ts +12 -0
  549. package/dist/core/domain/ICollectionStore.js +2 -0
  550. package/dist/core/domain/IPageRefStore.d.ts +12 -0
  551. package/dist/core/domain/IPageRefStore.js +2 -0
  552. package/dist/core/domain/ITagged.d.ts +8 -0
  553. package/dist/core/domain/ITagged.js +2 -0
  554. package/dist/core/domain/Item.d.ts +18 -0
  555. package/dist/core/domain/Item.js +20 -0
  556. package/dist/core/domain/ItemBase.d.ts +45 -0
  557. package/dist/core/domain/ItemBase.js +153 -0
  558. package/dist/core/domain/Page.d.ts +172 -0
  559. package/dist/core/domain/Page.js +701 -0
  560. package/dist/core/domain/PageOverview.d.ts +38 -0
  561. package/dist/core/domain/PageOverview.js +63 -0
  562. package/dist/core/domain/PageRefStoreProxy.d.ts +31 -0
  563. package/dist/core/domain/PageRefStoreProxy.js +118 -0
  564. package/dist/core/domain/PageSettings.d.ts +11 -0
  565. package/dist/core/domain/PageSettings.js +20 -0
  566. package/dist/core/domain/PageSummary.d.ts +35 -0
  567. package/dist/core/domain/PageSummary.js +88 -0
  568. package/dist/core/domain/Pages.d.ts +37 -0
  569. package/dist/core/domain/Pages.js +137 -0
  570. package/dist/core/domain/Section.d.ts +45 -0
  571. package/dist/core/domain/Section.js +156 -0
  572. package/dist/core/domain/SectionBlock.d.ts +32 -0
  573. package/dist/core/domain/SectionBlock.js +77 -0
  574. package/dist/core/domain/Site.d.ts +52 -0
  575. package/dist/core/domain/Site.js +168 -0
  576. package/dist/core/domain/TranslateSchema.d.ts +7 -0
  577. package/dist/core/domain/TranslateSchema.js +2 -0
  578. package/dist/core/domain/UserBrowser.d.ts +38 -0
  579. package/dist/core/domain/UserBrowser.js +106 -0
  580. package/dist/core/domain/UserValidation.d.ts +6 -0
  581. package/dist/core/domain/UserValidation.js +24 -0
  582. package/dist/core/domain/index.d.ts +28 -0
  583. package/dist/core/domain/index.js +44 -0
  584. package/dist/core/hooks/index.d.ts +23 -0
  585. package/dist/core/hooks/index.js +39 -0
  586. package/dist/core/hooks/useAssetStore.d.ts +6 -0
  587. package/dist/core/hooks/useAssetStore.js +32 -0
  588. package/dist/core/hooks/useBlock.d.ts +2 -0
  589. package/dist/core/hooks/useBlock.js +21 -0
  590. package/dist/core/hooks/useBlockConfiguration.d.ts +2 -0
  591. package/dist/core/hooks/useBlockConfiguration.js +21 -0
  592. package/dist/core/hooks/useChangeSet.d.ts +2 -0
  593. package/dist/core/hooks/useChangeSet.js +41 -0
  594. package/dist/core/hooks/useChangeSetBrowser.d.ts +5 -0
  595. package/dist/core/hooks/useChangeSetBrowser.js +28 -0
  596. package/dist/core/hooks/useCollection.d.ts +9 -0
  597. package/dist/core/hooks/useCollection.js +39 -0
  598. package/dist/core/hooks/useCollectionBrowser.d.ts +3 -0
  599. package/dist/core/hooks/useCollectionBrowser.js +30 -0
  600. package/dist/core/hooks/useCollectionData.d.ts +9 -0
  601. package/dist/core/hooks/useCollectionData.js +45 -0
  602. package/dist/core/hooks/useCollectionFieldProxy.d.ts +2 -0
  603. package/dist/core/hooks/useCollectionFieldProxy.js +21 -0
  604. package/dist/core/hooks/useCollectionRepository.d.ts +2 -0
  605. package/dist/core/hooks/useCollectionRepository.js +11 -0
  606. package/dist/core/hooks/useCollectionStore.d.ts +6 -0
  607. package/dist/core/hooks/useCollectionStore.js +32 -0
  608. package/dist/core/hooks/useCollections.d.ts +9 -0
  609. package/dist/core/hooks/useCollections.js +39 -0
  610. package/dist/core/hooks/useField.d.ts +3 -0
  611. package/dist/core/hooks/useField.js +41 -0
  612. package/dist/core/hooks/useHotkeyScopeLock.d.ts +7 -0
  613. package/dist/core/hooks/useHotkeyScopeLock.js +40 -0
  614. package/dist/core/hooks/usePage.d.ts +9 -0
  615. package/dist/core/hooks/usePage.js +39 -0
  616. package/dist/core/hooks/usePageCollection.d.ts +3 -0
  617. package/dist/core/hooks/usePageCollection.js +38 -0
  618. package/dist/core/hooks/usePageRef.d.ts +2 -0
  619. package/dist/core/hooks/usePageRef.js +11 -0
  620. package/dist/core/hooks/usePageRefStore.d.ts +7 -0
  621. package/dist/core/hooks/usePageRefStore.js +39 -0
  622. package/dist/core/hooks/usePageRepository.d.ts +2 -0
  623. package/dist/core/hooks/usePageRepository.js +11 -0
  624. package/dist/core/hooks/usePages.d.ts +7 -0
  625. package/dist/core/hooks/usePages.js +27 -0
  626. package/dist/core/hooks/useSite.d.ts +9 -0
  627. package/dist/core/hooks/useSite.js +39 -0
  628. package/dist/core/hooks/useTempFields.d.ts +8 -0
  629. package/dist/core/hooks/useTempFields.js +55 -0
  630. package/dist/core/hooks/useUserBrowser.d.ts +5 -0
  631. package/dist/core/hooks/useUserBrowser.js +28 -0
  632. package/dist/core/index.d.ts +12 -0
  633. package/dist/core/index.js +28 -0
  634. package/dist/core/repository/CollectionRepository.d.ts +29 -0
  635. package/dist/core/repository/CollectionRepository.js +274 -0
  636. package/dist/core/repository/CollectionSerializer.d.ts +14 -0
  637. package/dist/core/repository/CollectionSerializer.js +57 -0
  638. package/dist/core/repository/CollectionTarget.d.ts +9 -0
  639. package/dist/core/repository/CollectionTarget.js +24 -0
  640. package/dist/core/repository/FieldSerializer.d.ts +11 -0
  641. package/dist/core/repository/FieldSerializer.js +69 -0
  642. package/dist/core/repository/PageRepository.d.ts +32 -0
  643. package/dist/core/repository/PageRepository.js +462 -0
  644. package/dist/core/repository/PageSerializer.d.ts +13 -0
  645. package/dist/core/repository/PageSerializer.js +182 -0
  646. package/dist/core/repository/PageTarget.d.ts +9 -0
  647. package/dist/core/repository/PageTarget.js +2 -0
  648. package/dist/core/repository/SiteRepository.d.ts +5 -0
  649. package/dist/core/repository/SiteRepository.js +10 -0
  650. package/dist/core/repository/TagSerializer.d.ts +8 -0
  651. package/dist/core/repository/TagSerializer.js +26 -0
  652. package/dist/core/repository/index.d.ts +9 -0
  653. package/dist/core/repository/index.js +25 -0
  654. package/dist/core/routing/index.d.ts +1 -0
  655. package/dist/core/routing/index.js +17 -0
  656. package/dist/core/routing/useEditorRouter.d.ts +105 -0
  657. package/dist/core/routing/useEditorRouter.js +399 -0
  658. package/dist/core/screens/NotFound.d.ts +1 -0
  659. package/dist/core/screens/NotFound.js +12 -0
  660. package/dist/core/screens/index.d.ts +1 -0
  661. package/dist/core/screens/index.js +17 -0
  662. package/dist/core/settings/Settings.d.ts +31 -0
  663. package/dist/core/settings/Settings.js +86 -0
  664. package/dist/core/settings/SettingsContainer.d.ts +5 -0
  665. package/dist/core/settings/SettingsContainer.js +36 -0
  666. package/dist/core/settings/SettingsContext.d.ts +7 -0
  667. package/dist/core/settings/SettingsContext.js +6 -0
  668. package/dist/core/settings/index.d.ts +4 -0
  669. package/dist/core/settings/index.js +20 -0
  670. package/dist/core/settings/useSettings.d.ts +2 -0
  671. package/dist/core/settings/useSettings.js +11 -0
  672. package/dist/core/site-config/SiteConfig.d.ts +39 -0
  673. package/dist/core/site-config/SiteConfig.js +200 -0
  674. package/dist/core/site-config/SiteConfigContainer.d.ts +5 -0
  675. package/dist/core/site-config/SiteConfigContainer.js +21 -0
  676. package/dist/core/site-config/SiteConfigContext.d.ts +7 -0
  677. package/dist/core/site-config/SiteConfigContext.js +6 -0
  678. package/dist/core/site-config/index.d.ts +4 -0
  679. package/dist/core/site-config/index.js +20 -0
  680. package/dist/core/site-config/useSiteConfig.d.ts +2 -0
  681. package/dist/core/site-config/useSiteConfig.js +24 -0
  682. package/dist/core/splash/Splash.d.ts +7 -0
  683. package/dist/core/splash/Splash.js +40 -0
  684. package/dist/core/splash/SplashContainer.d.ts +5 -0
  685. package/dist/core/splash/SplashContainer.js +33 -0
  686. package/dist/core/splash/SplashContext.d.ts +7 -0
  687. package/dist/core/splash/SplashContext.js +6 -0
  688. package/dist/core/splash/SplashService.d.ts +42 -0
  689. package/dist/core/splash/SplashService.js +108 -0
  690. package/dist/core/splash/index.d.ts +2 -0
  691. package/dist/core/splash/index.js +18 -0
  692. package/dist/core/splash/useSplash.d.ts +2 -0
  693. package/dist/core/splash/useSplash.js +11 -0
  694. package/dist/dashboard/components/NavCard.d.ts +14 -0
  695. package/dist/dashboard/components/NavCard.js +15 -0
  696. package/dist/dashboard/components/index.d.ts +1 -0
  697. package/dist/dashboard/components/index.js +17 -0
  698. package/dist/dashboard/index.d.ts +1 -0
  699. package/dist/dashboard/index.js +17 -0
  700. package/dist/dashboard/screens/Dashboard.d.ts +1 -0
  701. package/dist/dashboard/screens/Dashboard.js +30 -0
  702. package/dist/dashboard/screens/index.d.ts +1 -0
  703. package/dist/dashboard/screens/index.js +17 -0
  704. package/dist/devtools/components/PlatformStatus.d.ts +6 -0
  705. package/dist/devtools/components/PlatformStatus.js +16 -0
  706. package/dist/devtools/components/index.d.ts +1 -0
  707. package/dist/devtools/components/index.js +17 -0
  708. package/dist/devtools/components/status/Upgrader.d.ts +6 -0
  709. package/dist/devtools/components/status/Upgrader.js +144 -0
  710. package/dist/devtools/components/status/index.d.ts +1 -0
  711. package/dist/devtools/components/status/index.js +17 -0
  712. package/dist/devtools/index.d.ts +1 -0
  713. package/dist/devtools/index.js +17 -0
  714. package/dist/devtools/screens/Devtools.d.ts +1 -0
  715. package/dist/devtools/screens/Devtools.js +70 -0
  716. package/dist/devtools/screens/index.d.ts +1 -0
  717. package/dist/devtools/screens/index.js +17 -0
  718. package/dist/explore/components/CreateCollectionDialog.d.ts +13 -0
  719. package/dist/explore/components/CreateCollectionDialog.js +135 -0
  720. package/dist/explore/components/CreatePageDialog.d.ts +15 -0
  721. package/dist/explore/components/CreatePageDialog.js +204 -0
  722. package/dist/explore/components/ExploreHeader.d.ts +9 -0
  723. package/dist/explore/components/ExploreHeader.js +44 -0
  724. package/dist/explore/components/index.d.ts +3 -0
  725. package/dist/explore/components/index.js +19 -0
  726. package/dist/explore/index.d.ts +2 -0
  727. package/dist/explore/index.js +18 -0
  728. package/dist/explore/screens/CollectionExplorer.d.ts +7 -0
  729. package/dist/explore/screens/CollectionExplorer.js +114 -0
  730. package/dist/explore/screens/CollectionsExplorer.d.ts +4 -0
  731. package/dist/explore/screens/CollectionsExplorer.js +41 -0
  732. package/dist/explore/screens/PageExplorer.d.ts +8 -0
  733. package/dist/explore/screens/PageExplorer.js +124 -0
  734. package/dist/explore/screens/SiteExplorer.d.ts +6 -0
  735. package/dist/explore/screens/SiteExplorer.js +37 -0
  736. package/dist/explore/screens/index.d.ts +4 -0
  737. package/dist/explore/screens/index.js +20 -0
  738. package/dist/index.d.ts +1 -0
  739. package/dist/index.js +17 -0
  740. package/dist/onboarding/EmailLogin.d.ts +1 -0
  741. package/dist/onboarding/EmailLogin.js +88 -0
  742. package/dist/onboarding/GoogleLogin.d.ts +1 -0
  743. package/dist/onboarding/GoogleLogin.js +25 -0
  744. package/dist/onboarding/Login.d.ts +1 -0
  745. package/dist/onboarding/Login.js +31 -0
  746. package/dist/onboarding/LoginReset.d.ts +1 -0
  747. package/dist/onboarding/LoginReset.js +132 -0
  748. package/dist/onboarding/index.d.ts +2 -0
  749. package/dist/onboarding/index.js +18 -0
  750. package/dist/page/components/BlockConfig.d.ts +8 -0
  751. package/dist/page/components/BlockConfig.js +88 -0
  752. package/dist/page/components/BlockEditor.d.ts +10 -0
  753. package/dist/page/components/BlockEditor.js +67 -0
  754. package/dist/page/components/PageHeader.d.ts +12 -0
  755. package/dist/page/components/PageHeader.js +77 -0
  756. package/dist/page/components/PageNav.d.ts +10 -0
  757. package/dist/page/components/PageNav.js +59 -0
  758. package/dist/page/components/PageNotCreated.d.ts +8 -0
  759. package/dist/page/components/PageNotCreated.js +45 -0
  760. package/dist/page/components/PageNotFound.d.ts +8 -0
  761. package/dist/page/components/PageNotFound.js +19 -0
  762. package/dist/page/components/PageStatus.d.ts +10 -0
  763. package/dist/page/components/PageStatus.js +267 -0
  764. package/dist/page/components/SettingsEditor.d.ts +6 -0
  765. package/dist/page/components/SettingsEditor.js +70 -0
  766. package/dist/page/components/index.d.ts +7 -0
  767. package/dist/page/components/index.js +23 -0
  768. package/dist/page/components/nav/NavBlock.d.ts +12 -0
  769. package/dist/page/components/nav/NavBlock.js +25 -0
  770. package/dist/page/components/nav/NavLayout.d.ts +9 -0
  771. package/dist/page/components/nav/NavLayout.js +14 -0
  772. package/dist/page/components/nav/NavSection.d.ts +11 -0
  773. package/dist/page/components/nav/NavSection.js +45 -0
  774. package/dist/page/components/nav/index.d.ts +3 -0
  775. package/dist/page/components/nav/index.js +19 -0
  776. package/dist/page/components/status/AutoSave.d.ts +6 -0
  777. package/dist/page/components/status/AutoSave.js +35 -0
  778. package/dist/page/components/status/index.d.ts +1 -0
  779. package/dist/page/components/status/index.js +17 -0
  780. package/dist/page/hooks/PageController.d.ts +68 -0
  781. package/dist/page/hooks/PageController.js +359 -0
  782. package/dist/page/hooks/index.d.ts +2 -0
  783. package/dist/page/hooks/index.js +18 -0
  784. package/dist/page/hooks/usePageController.d.ts +8 -0
  785. package/dist/page/hooks/usePageController.js +24 -0
  786. package/dist/page/index.d.ts +3 -0
  787. package/dist/page/index.js +19 -0
  788. package/dist/page/screens/PageEditor.d.ts +10 -0
  789. package/dist/page/screens/PageEditor.js +127 -0
  790. package/dist/page/screens/index.d.ts +1 -0
  791. package/dist/page/screens/index.js +17 -0
  792. package/dist/styles/index.css +6220 -0
  793. package/dist/styles/tailwind.d.ts +2 -0
  794. package/dist/styles/tailwind.js +292 -0
  795. package/dist/users/index.d.ts +1 -0
  796. package/dist/users/index.js +17 -0
  797. package/dist/users/screens/UserExplorer.d.ts +1 -0
  798. package/dist/users/screens/UserExplorer.js +193 -0
  799. package/dist/users/screens/index.d.ts +1 -0
  800. package/dist/users/screens/index.js +17 -0
  801. package/package.json +93 -0
@@ -0,0 +1,462 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.PageRepository = void 0;
15
+ const funnel_core_1 = require("@nascentdigital/funnel-core");
16
+ const domain_1 = require("../domain");
17
+ const PageSerializer_1 = require("./PageSerializer");
18
+ // class
19
+ class PageRepository {
20
+ constructor(editorApi) {
21
+ this.editorApi = editorApi;
22
+ }
23
+ async search(args) {
24
+ // query pages
25
+ const { template, region } = args, query = __rest(args, ["template", "region"]);
26
+ const _a = await this.editorApi.searchPages(Object.assign(Object.assign({}, query), { version: 'draft', brand: funnel_core_1.AppConfig.brand(), region, type: template.type })), { items } = _a, pagination = __rest(_a, ["items"]);
27
+ // return result
28
+ return Object.assign({ items: items.map((_a) => {
29
+ var _b;
30
+ var { tags } = _a, item = __rest(_a, ["tags"]);
31
+ return (Object.assign(Object.assign({}, item), { template,
32
+ region, name: (_b = item.name) !== null && _b !== void 0 ? _b : `Unnamed ${template.name} page`, tags: template.tags.flatMap(tagGroup => tagGroup.parse(tags)) }));
33
+ }) }, pagination);
34
+ }
35
+ async load(args) {
36
+ // try to load page (skip if there's no page at all)
37
+ const { eventBus, template } = args, query = __rest(args, ["eventBus", "template"]);
38
+ const data = await this.editorApi.getPageGroup(Object.assign(Object.assign({}, query), { type: template.type, version: 'draft' }));
39
+ if (!data) {
40
+ return undefined;
41
+ }
42
+ console.debug('[PageRepository/load] parsing page data', data);
43
+ // deserialize page (if any)
44
+ return PageSerializer_1.PageSerializer.deserializePageWithSummary(Object.assign(Object.assign({}, args), data));
45
+ }
46
+ async create(_a) {
47
+ var { eventBus, name } = _a, args = __rest(_a, ["eventBus", "name"]);
48
+ // resolve page (get or create)
49
+ const { template } = args, query = __rest(args, ["template"]);
50
+ const data = await this.editorApi.createPage(Object.assign(Object.assign({}, query), { type: template.type, name: name || template.name }));
51
+ // return page
52
+ return PageSerializer_1.PageSerializer.deserializePageWithSummary(Object.assign(Object.assign({ eventBus: eventBus !== null && eventBus !== void 0 ? eventBus : new funnel_core_1.EventBus() }, args), data));
53
+ }
54
+ async createLanguage(args) {
55
+ // resolve page (get or create)
56
+ const { eventBus, template } = args, query = __rest(args, ["eventBus", "template"]);
57
+ const data = await this.editorApi.createPage(Object.assign(Object.assign({}, query), { type: template.type }));
58
+ // return page
59
+ return PageSerializer_1.PageSerializer.deserializePageWithSummary(Object.assign(Object.assign({ region: data.group.region }, args), data));
60
+ }
61
+ async save(page) {
62
+ // get page update
63
+ const savables = [];
64
+ const update = this.serializePageUpdate(page, savables);
65
+ // start all updates
66
+ page.onSaveStart();
67
+ savables.forEach(savable => savable.onSaveStart());
68
+ // update page
69
+ const { updatedOn, changeSetId, page: pageData } = await this.editorApi.updatePage(update);
70
+ // complete all updates
71
+ savables.forEach(savable => savable.onSaveComplete());
72
+ page.onSaveComplete(updatedOn, changeSetId);
73
+ // return new page if it was updated
74
+ if (pageData) {
75
+ console.debug('[PageRepository/save] received new page');
76
+ const { eventBus, template, region } = page;
77
+ return PageSerializer_1.PageSerializer.deserializePage(Object.assign(Object.assign({}, pageData), { eventBus, template, region }));
78
+ }
79
+ // or simply update the page updated stamp
80
+ else {
81
+ console.debug('[PageRepository/save] received no page update but timestamp is now', updatedOn);
82
+ // return the same page
83
+ return page;
84
+ }
85
+ }
86
+ async unpublish(page) {
87
+ // throw if not valid
88
+ if (!page.published) {
89
+ throw new funnel_core_1.InvalidOperationError('Cannot unpublish page that is in draft state');
90
+ }
91
+ // unpublish page
92
+ await this.editorApi.unpublishPage(page.id);
93
+ }
94
+ serializePageUpdate(page, savables) {
95
+ var _a, _b;
96
+ // root page updates
97
+ const { id, discover, content } = page;
98
+ const rootPageUpdates = [];
99
+ // name
100
+ if (page.initialName !== page.name) {
101
+ rootPageUpdates.push({
102
+ type: 'page',
103
+ property: 'name',
104
+ value: page.name
105
+ });
106
+ }
107
+ // tags
108
+ if (page.initialTags.symmetricDifference(page.tags).size > 0) {
109
+ rootPageUpdates.push({
110
+ type: 'page',
111
+ property: 'tags',
112
+ value: Array.from(page.tags).map(tag => tag.data)
113
+ });
114
+ }
115
+ // slug + url
116
+ if (page.initialSlug !== page.slug) {
117
+ rootPageUpdates.push({
118
+ type: 'page',
119
+ property: 'slug',
120
+ value: (_a = page.slug) !== null && _a !== void 0 ? _a : null
121
+ });
122
+ rootPageUpdates.push({
123
+ type: 'page',
124
+ property: 'url',
125
+ value: page.url
126
+ });
127
+ }
128
+ // preview
129
+ const previewBlock = page.getPreviewBlock();
130
+ if (previewBlock && previewBlock.modified) {
131
+ rootPageUpdates.push({
132
+ type: 'page',
133
+ property: 'preview',
134
+ value: previewBlock.value
135
+ });
136
+ }
137
+ // errors
138
+ if (page.initialErrors !== !page.valid) {
139
+ rootPageUpdates.push({
140
+ type: 'page',
141
+ property: 'errors',
142
+ value: !page.valid
143
+ });
144
+ }
145
+ // publication
146
+ if (page.initialPublication !== page.publication) {
147
+ rootPageUpdates.push({
148
+ type: 'page',
149
+ property: 'publication',
150
+ value: (_b = page.publication) !== null && _b !== void 0 ? _b : null
151
+ });
152
+ }
153
+ // aggregate other updates
154
+ return {
155
+ id,
156
+ updatedOn: page.updatedOn,
157
+ updates: [
158
+ ...rootPageUpdates,
159
+ ...discover.reduce((updates, block) => {
160
+ // try to update block
161
+ this.serializeBlockUpdate(updates, block, 'discover', savables);
162
+ // keep reducing
163
+ return updates;
164
+ }, []),
165
+ ...content.reduce((updates, item) => {
166
+ // handle block
167
+ if (item instanceof domain_1.Block) {
168
+ this.serializeBlockUpdate(updates, item, 'content', savables);
169
+ }
170
+ // or section
171
+ else {
172
+ this.serializeSectionUpdate(updates, item, 'content', savables);
173
+ }
174
+ // keep reducing
175
+ return updates;
176
+ }, []),
177
+ ...page.deleteBlocks.map(block => ({
178
+ type: 'block.delete',
179
+ path: [block.area, block.key]
180
+ }))
181
+ ]
182
+ };
183
+ }
184
+ serializeSectionUpdate(updates, section, parentPath, savables) {
185
+ // track insert/update
186
+ let sectionChanged = false;
187
+ const path = [parentPath, section.key];
188
+ const { blocks, initialBlocks = [] } = section;
189
+ const blockIds = [];
190
+ blocks.forEach((sectionBlock, index) => {
191
+ // track id
192
+ const { id, block } = sectionBlock;
193
+ blockIds.push(id);
194
+ // track insert
195
+ const originalIndex = initialBlocks.findIndex(item => item.id === id);
196
+ if (originalIndex < 0) {
197
+ // add as insertion
198
+ updates.push({
199
+ type: 'section.insert',
200
+ path,
201
+ index,
202
+ section: {
203
+ type: 'section',
204
+ version: section.schema.version
205
+ },
206
+ block: sectionBlock.value
207
+ });
208
+ // mark changed
209
+ sectionChanged = true;
210
+ // track nested savables for section-block insertion
211
+ const fields = [...block.config, ...block.fields];
212
+ fields.forEach(field => {
213
+ if (field.modified) {
214
+ savables.push(field);
215
+ }
216
+ });
217
+ }
218
+ // recurse update if it's set
219
+ else if (block.modified) {
220
+ // track name field
221
+ if (block.nameField.modified) {
222
+ // send update
223
+ updates.push({
224
+ type: 'section.blockName',
225
+ path,
226
+ id,
227
+ value: funnel_core_1.Schema.TextField.Value.fromData(block.nameField.value) || null
228
+ });
229
+ // track change
230
+ savables.push(block.nameField);
231
+ }
232
+ // serialize config fields
233
+ this.serializeFieldsUpdate(updates, block.config, [...path, id, 'config'], savables);
234
+ // serialize content fields
235
+ this.serializeFieldsUpdate(updates, block.fields, [...path, id, 'fields'], savables);
236
+ }
237
+ });
238
+ // track delete/reorder
239
+ let reordered = false;
240
+ initialBlocks.forEach(({ id }, index) => {
241
+ // add to deleted list if the original doesn't exist anymore
242
+ const blockIndex = blockIds.findIndex(blockId => blockId === id);
243
+ if (blockIndex < 0) {
244
+ // delete
245
+ updates.push({
246
+ type: 'section.delete',
247
+ path,
248
+ id
249
+ });
250
+ // track reorder
251
+ sectionChanged = true;
252
+ }
253
+ // or mark reorder if index isn't the same
254
+ else if (blockIndex !== index) {
255
+ reordered = true;
256
+ sectionChanged = true;
257
+ }
258
+ });
259
+ // track reorder
260
+ if (reordered) {
261
+ updates.push({
262
+ type: 'section.reorder',
263
+ path,
264
+ ids: blockIds
265
+ });
266
+ }
267
+ // track section change (if any)
268
+ if (sectionChanged) {
269
+ savables.push(section);
270
+ }
271
+ }
272
+ serializeBlockUpdate(updates, block, parentPath, savables) {
273
+ // ignore if block isn't activated
274
+ if (!block.activated) {
275
+ return;
276
+ }
277
+ // create a new block if it's new
278
+ else if (block.isNew) {
279
+ // create update
280
+ updates.push({
281
+ type: 'block.create',
282
+ path: [parentPath, block.key],
283
+ block: block.value
284
+ });
285
+ // track block
286
+ savables.push(block);
287
+ // track nested savables for block insertion
288
+ const fields = [...block.config, ...block.fields];
289
+ fields.forEach(field => {
290
+ if (field.modified) {
291
+ savables.push(field);
292
+ }
293
+ });
294
+ }
295
+ // or just track updated fields
296
+ else {
297
+ // serialize config fields
298
+ this.serializeFieldsUpdate(updates, block.config, [parentPath, block.key, 'config'], savables);
299
+ // serialize content fields
300
+ this.serializeFieldsUpdate(updates, block.fields, [parentPath, block.key, 'fields'], savables);
301
+ }
302
+ }
303
+ serializeFieldsUpdate(updates, fields, parentPath, savables) {
304
+ // handle fields in block
305
+ fields.forEach(field => {
306
+ if (field instanceof funnel_core_1.Field) {
307
+ this.serializeFieldUpdate(updates, field, parentPath, savables);
308
+ }
309
+ else if (field instanceof funnel_core_1.ObjectField) {
310
+ this.serializeObjectFieldUpdate(updates, field, parentPath, savables);
311
+ }
312
+ else {
313
+ this.serializeListUpdate(updates, field, parentPath, savables);
314
+ }
315
+ });
316
+ // return changes (for chaining)
317
+ return updates;
318
+ }
319
+ serializeObjectFieldUpdate(updates, field, parentPath, savables) {
320
+ var _a;
321
+ // create object if it's new
322
+ if (field.isNew) {
323
+ // add insert
324
+ updates.push({
325
+ type: 'object.insert',
326
+ path: [...parentPath, field.id],
327
+ value: (_a = field.value) !== null && _a !== void 0 ? _a : null
328
+ });
329
+ // track save
330
+ savables.push(field);
331
+ }
332
+ // or process subfields
333
+ else if (field.exists) {
334
+ // save fields
335
+ this.serializeFieldsUpdate(updates, field.fields, [...parentPath, field.id], savables);
336
+ // track save
337
+ savables.push(field);
338
+ }
339
+ // or process opted out field
340
+ else if (field.optedOut) {
341
+ // remove field
342
+ updates.push({
343
+ type: 'value',
344
+ path: [...parentPath, field.id],
345
+ value: null
346
+ });
347
+ // track save
348
+ savables.push(field);
349
+ }
350
+ }
351
+ serializeFieldUpdate(updates, field, parentPath, savables) {
352
+ var _a;
353
+ // track change if modified (ignore if field is sandboxed)
354
+ if (field.modified && !field.sandboxed) {
355
+ // set field
356
+ updates.push({
357
+ type: 'value',
358
+ path: [...parentPath, field.id],
359
+ value: ((_a = field.value) !== null && _a !== void 0 ? _a : null)
360
+ });
361
+ // track save
362
+ savables.push(field);
363
+ }
364
+ }
365
+ serializeListUpdate(updates, list, parentPath, savables) {
366
+ var _a, _b;
367
+ // create list if it's new
368
+ if (list.isNew) {
369
+ // add new list
370
+ updates.push({
371
+ type: 'value',
372
+ path: [...parentPath, list.id],
373
+ value: funnel_core_1.Schema.Field.Data.newValue('list')
374
+ });
375
+ // track save
376
+ savables.push(list);
377
+ }
378
+ // or drop list on opt-out
379
+ else if (list.optedOut) {
380
+ // drop list
381
+ updates.push({
382
+ type: 'value',
383
+ path: [...parentPath, list.id],
384
+ value: null
385
+ });
386
+ // track save
387
+ savables.push(list);
388
+ }
389
+ // or if it is modified (otherwise ignore)
390
+ else if (list.modified) {
391
+ // add new list if there's nothing and it's new
392
+ const path = [...parentPath, list.id];
393
+ const { value: currentValue, items: fields, initialValue } = list;
394
+ const currentItems = (_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) !== null && _a !== void 0 ? _a : [];
395
+ const initialItems = (_b = initialValue === null || initialValue === void 0 ? void 0 : initialValue.value) !== null && _b !== void 0 ? _b : [];
396
+ const fieldIds = [];
397
+ // track inserts/updates of elements
398
+ currentItems.forEach((item, index) => {
399
+ // track id
400
+ const { id, field } = fields[index];
401
+ fieldIds.push(item.id);
402
+ // track insert
403
+ const originalIndex = initialItems.findIndex(initialItem => initialItem.id === id);
404
+ if (originalIndex < 0) {
405
+ updates.push({
406
+ type: 'array.insert',
407
+ path,
408
+ index,
409
+ id,
410
+ value: item
411
+ });
412
+ }
413
+ // track update
414
+ else if (field.modified) {
415
+ // object field updates should be recursed and indexed
416
+ if (field instanceof funnel_core_1.ObjectField) {
417
+ this.serializeFieldsUpdate(updates, field.fields, [...path, id], savables);
418
+ }
419
+ // basic field updates can be done inline
420
+ else {
421
+ updates.push({
422
+ type: 'value',
423
+ path: [...path, id],
424
+ value: item
425
+ });
426
+ }
427
+ }
428
+ });
429
+ // track delete/reorder
430
+ let reordered = false;
431
+ let deleted = 0;
432
+ initialItems.forEach(({ id }, index) => {
433
+ // add to deleted list if the original doesn't exist anymore
434
+ const fieldIndex = fieldIds.findIndex(fieldId => fieldId === id) + deleted;
435
+ if (fieldIndex < 0) {
436
+ updates.push({
437
+ type: 'array.delete',
438
+ path,
439
+ id
440
+ });
441
+ // track deletion
442
+ ++deleted;
443
+ }
444
+ // or mark reorder if index isn't the same
445
+ else if (fieldIndex !== index) {
446
+ reordered = true;
447
+ }
448
+ });
449
+ // track reorder
450
+ if (reordered) {
451
+ updates.push({
452
+ type: 'array.reorder',
453
+ path,
454
+ ids: fieldIds
455
+ });
456
+ }
457
+ // track save
458
+ savables.push(list);
459
+ }
460
+ }
461
+ }
462
+ exports.PageRepository = PageRepository;
@@ -0,0 +1,13 @@
1
+ import { EventBus, Schema } from '@nascentdigital/funnel-core';
2
+ import { Page } from '../domain';
3
+ import { PageTarget } from './PageTarget';
4
+ export declare namespace PageSerializer {
5
+ type DeserializePageWithSummaryArgs = Schema.Page.Data.AsGroup & PageTarget & {
6
+ eventBus: EventBus;
7
+ };
8
+ function deserializePageWithSummary({ eventBus, group: groupData, page: pageData, ...args }: DeserializePageWithSummaryArgs): Page.WithSummary;
9
+ type DeserializePageArgs = Schema.Page.Data & PageTarget & {
10
+ eventBus: EventBus;
11
+ };
12
+ function deserializePage({ eventBus, template, tags, discover, content, files, pages, collections, snapshot, ...data }: DeserializePageArgs): Page;
13
+ }
@@ -0,0 +1,182 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.PageSerializer = void 0;
15
+ const funnel_core_1 = require("@nascentdigital/funnel-core");
16
+ const domain_1 = require("../domain");
17
+ const FieldSerializer_1 = require("./FieldSerializer");
18
+ const TagSerializer_1 = require("./TagSerializer");
19
+ // namespace
20
+ var PageSerializer;
21
+ (function (PageSerializer) {
22
+ function deserializePageWithSummary(_a) {
23
+ var { eventBus, group: groupData, page: pageData } = _a, args = __rest(_a, ["eventBus", "group", "page"]);
24
+ // deserialize page (if any)
25
+ const { template, region } = args;
26
+ const page = pageData && deserializePage(Object.assign(Object.assign({}, pageData), { template, region, eventBus }));
27
+ // deserialize summary
28
+ const { brand, groupId, instances } = groupData;
29
+ const summary = new domain_1.PageSummary(Object.assign(Object.assign({}, args), { brand,
30
+ groupId, pages: instances }));
31
+ // return result
32
+ return { summary, page };
33
+ }
34
+ PageSerializer.deserializePageWithSummary = deserializePageWithSummary;
35
+ function deserializePage(_a) {
36
+ var { eventBus, template, tags, discover = {}, content = {}, files = [], pages = [], collections = [], snapshot } = _a, data = __rest(_a, ["eventBus", "template", "tags", "discover", "content", "files", "pages", "collections", "snapshot"]);
37
+ // determine latest snapshot (if any)
38
+ const { discover: discoverSnapshot = {}, preview: previewSnapshot = {}, content: contentSnapshot = {} } = snapshot !== null && snapshot !== void 0 ? snapshot : {};
39
+ // create new page using shared bus
40
+ const region = data.region;
41
+ const pageSchemas = funnel_core_1.Schema.Site.current().regions[region];
42
+ const page = new domain_1.Page(Object.assign(Object.assign({ eventBus,
43
+ template, tags: TagSerializer_1.TagSerializer.deserializeTags({
44
+ groups: template.tags,
45
+ tagsData: tags
46
+ }) }, data), { discover: [
47
+ deserializeBlock({ schema: funnel_core_1.Schema.Seo, eventBus, key: 'seo', content: discover['seo'], snapshot: discoverSnapshot['seo'] })
48
+ ], content: Object.entries(template.content).map(([key, schema]) => deserializeContent({
49
+ key,
50
+ schema: schema.unwrap(),
51
+ eventBus,
52
+ content: content[key],
53
+ snapshot: contentSnapshot[key]
54
+ })), files, pages: pages.map((_a) => {
55
+ var { type, tags } = _a, ref = __rest(_a, ["type", "tags"]);
56
+ return (Object.assign(Object.assign({}, ref), { template: pageSchemas[type], tags: template.tags.flatMap(tagGroup => tagGroup.parse(tags)) }));
57
+ }), collections,
58
+ snapshot }));
59
+ // repair any issues on the page
60
+ page.repair();
61
+ // return page
62
+ return page;
63
+ }
64
+ PageSerializer.deserializePage = deserializePage;
65
+ function deserializeContent({ key, schema, content, eventBus, snapshot }) {
66
+ // handle section
67
+ if (schema instanceof funnel_core_1.Schema.Section) {
68
+ // fail if content isn't a section (unless it's undefined)
69
+ if (content && content.type !== 'section') {
70
+ console.error('[PageSerializer/deserializeContent] invalid section content', content);
71
+ throw new funnel_core_1.IllegalStateError(`Section content expected, but found "${content.type}" instead`);
72
+ }
73
+ // or if snapshot is invalid
74
+ else if (snapshot && snapshot.type !== 'section') {
75
+ throw new funnel_core_1.IllegalStateError(`Section snapshot expected, but found "${snapshot.type}" instead`);
76
+ }
77
+ // deserialize
78
+ return deserializeSection({
79
+ key,
80
+ eventBus,
81
+ schema,
82
+ content,
83
+ snapshot
84
+ });
85
+ }
86
+ // or handle block
87
+ else {
88
+ // fail if content isn't a section (unless it's undefined)
89
+ if (content && content.type !== 'block') {
90
+ console.error('[PageSerializer/deserializeContent] invalid block content', content);
91
+ throw new funnel_core_1.IllegalStateError(`Block content expected, but found "${content.type}" instead`);
92
+ }
93
+ // or if snapshot is invalid
94
+ else if (snapshot && snapshot.type !== 'block') {
95
+ throw new funnel_core_1.IllegalStateError(`Block snapshot expected, but found "${snapshot.type}" instead`);
96
+ }
97
+ // deserialize
98
+ return deserializeBlock({
99
+ key,
100
+ eventBus,
101
+ schema,
102
+ content,
103
+ snapshot
104
+ });
105
+ }
106
+ }
107
+ function deserializeSection({ key, eventBus, schema, content, snapshot }) {
108
+ // TODO: handle version mismatch (between schema + content) and upgrading
109
+ if (content && content.version !== schema.version) {
110
+ throw new funnel_core_1.NotImplementedError();
111
+ }
112
+ // deserialize
113
+ return new domain_1.Section({
114
+ key,
115
+ eventBus,
116
+ schema,
117
+ availableBlocks: Object.entries(schema.blocks).map(([key, schema]) => deserializeBlock({
118
+ key,
119
+ eventBus,
120
+ schema,
121
+ content: undefined,
122
+ snapshot: undefined
123
+ })),
124
+ blocks: content === null || content === void 0 ? void 0 : content.blocks.map(content => deserializeSectionBlock({
125
+ id: content.section.id,
126
+ key: content.section.block,
127
+ eventBus,
128
+ schema: schema.blocks[content.section.block],
129
+ content,
130
+ snapshot: snapshot === null || snapshot === void 0 ? void 0 : snapshot.blocks.find(({ section }) => section.id === content.section.id)
131
+ })),
132
+ required: false,
133
+ exists: content !== undefined
134
+ });
135
+ }
136
+ function deserializeSectionBlock({ id, key, eventBus, schema, content, snapshot }) {
137
+ // create block and return it (upgrade is handled in block deserialization)
138
+ return new domain_1.SectionBlock({
139
+ id,
140
+ key,
141
+ eventBus,
142
+ block: deserializeBlock({ key, eventBus, schema, content, snapshot }),
143
+ required: false,
144
+ exists: true
145
+ });
146
+ }
147
+ function deserializeBlock({ key, eventBus, schema, content: blockContent, snapshot }) {
148
+ // throw if there's a type mismatch
149
+ const { type = schema.type, version = schema.version, config = {}, fields = {} } = blockContent !== null && blockContent !== void 0 ? blockContent : {};
150
+ const { config: snapshotConfig = {}, fields: snapshotFields = {} } = snapshot !== null && snapshot !== void 0 ? snapshot : {};
151
+ if (type !== schema.type) {
152
+ throw new funnel_core_1.IllegalStateError(`Schema type mismatch for ${schema.name} block - expected "${schema.type}", found "${type}"`);
153
+ }
154
+ // TODO: handle version mismatch (between schema + content) and upgrading
155
+ if (version !== schema.version) {
156
+ throw new funnel_core_1.NotImplementedError(`Unable to upgrade ${schema.name} content from v${version} -> v${schema.version}`);
157
+ }
158
+ // create block and return it
159
+ return new domain_1.Block({
160
+ eventBus,
161
+ key,
162
+ schema,
163
+ fields: Object.entries(schema.editableFields).map(([id, schema]) => FieldSerializer_1.FieldSerializer.deserializeField({
164
+ id,
165
+ eventBus,
166
+ schema,
167
+ content: fields[id],
168
+ snapshot: snapshotFields[id]
169
+ })),
170
+ config: Object.entries(schema.config).map(([id, schema]) => FieldSerializer_1.FieldSerializer.deserializeField({
171
+ id,
172
+ eventBus,
173
+ schema: schema,
174
+ content: config[id],
175
+ snapshot: snapshotConfig[id]
176
+ })),
177
+ required: schema.required,
178
+ exists: blockContent !== undefined,
179
+ name: config.name
180
+ });
181
+ }
182
+ })(PageSerializer || (exports.PageSerializer = PageSerializer = {}));
@@ -0,0 +1,9 @@
1
+ import { PageClient } from '@nascentdigital/funnel-cms';
2
+ import { EventBus } from '@nascentdigital/funnel-core';
3
+ import { Page } from '../domain';
4
+ export type PageTarget = Pick<PageClient.Query.ByDetails, 'region' | 'language'> & Pick<Page.ConstructorArgs, 'template'>;
5
+ export declare namespace PageTarget {
6
+ type WithEventBus = PageTarget & {
7
+ eventBus: EventBus;
8
+ };
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { EditorApiClient } from '../client';
2
+ export declare class SiteRepository {
3
+ readonly editorApi: EditorApiClient;
4
+ constructor(editorApi: EditorApiClient);
5
+ }