slice-machine-ui 1.26.1-beta.2 → 1.26.1-beta.21

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 (521) hide show
  1. package/.eslintrc.js +6 -1
  2. package/.storybook/preview.tsx +2 -1
  3. package/out/404.html +1 -1
  4. package/out/_next/static/chunks/127-6451528762141246.js +1 -0
  5. package/out/_next/static/chunks/{183-ebd633fed7c74545.js → 183-6ad1d7303abecd2b.js} +1 -1
  6. package/out/_next/static/chunks/18539003-8854ec97730b0755.js +22 -0
  7. package/out/_next/static/chunks/569-2ae3e9666f3bf991.js +1 -0
  8. package/out/_next/static/chunks/614-873c38acd991869b.js +1 -0
  9. package/out/_next/static/chunks/756-61dc56b98d01e964.js +10 -0
  10. package/out/_next/static/chunks/90-2d4bdae13d031364.js +1 -0
  11. package/out/_next/static/chunks/91-717d764a224ac07f.js +1 -0
  12. package/out/_next/static/chunks/96-d28e81d2b1c10a08.js +1 -0
  13. package/out/_next/static/chunks/pages/_app-b18f49d5323fa9eb.js +530 -0
  14. package/out/_next/static/chunks/pages/changelog-042822d12df57669.js +1 -0
  15. package/out/_next/static/chunks/pages/changes-194f6cf187fa6ee7.js +1 -0
  16. package/out/_next/static/chunks/pages/custom-types/[customTypeId]-ff73a06702296c34.js +1 -0
  17. package/out/_next/static/chunks/pages/{custom-types-3c8e721ec6802127.js → custom-types-900b40b54b74e6d6.js} +1 -1
  18. package/out/_next/static/chunks/pages/{index-cf93d16e9c63b6db.js → index-ccd2975faba412f6.js} +1 -1
  19. package/out/_next/static/chunks/pages/labs-7a4fe64cb86b59e8.js +1 -0
  20. package/out/_next/static/chunks/pages/page-types/[pageTypeId]-30d471f6127ebed7.js +1 -0
  21. package/out/_next/static/chunks/pages/settings-419384d4d43070c2.js +1 -0
  22. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-9bdb355306fca592.js +1 -0
  23. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-c431bb8d59974559.js +1 -0
  24. package/out/_next/static/chunks/pages/slices-98f88ac46b6ad58b.js +1 -0
  25. package/out/_next/static/css/22f264c93bd9d85f.css +1 -0
  26. package/out/_next/static/css/321d78460d2d69bc.css +1 -0
  27. package/out/_next/static/css/a686f7612f1943ed.css +1 -0
  28. package/out/_next/static/css/c47241940651ef2f.css +1 -0
  29. package/out/_next/static/css/dc201720b301472d.css +1 -0
  30. package/out/_next/static/css/e5745b5b0494af29.css +1 -0
  31. package/out/_next/static/jEpmnNgSaQQGEtlMfn4ek/_buildManifest.js +1 -0
  32. package/out/changelog.html +1 -1
  33. package/out/changes.html +1 -1
  34. package/out/custom-types/[customTypeId].html +1 -1
  35. package/out/custom-types.html +1 -1
  36. package/out/index.html +1 -1
  37. package/out/labs.html +1 -1
  38. package/out/page-types/[pageTypeId].html +1 -1
  39. package/out/settings.html +1 -1
  40. package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
  41. package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
  42. package/out/slices.html +1 -1
  43. package/package.json +10 -8
  44. package/sentry.client.config.ts +2 -1
  45. package/src/ErrorBoundary.tsx +1 -1
  46. package/src/apiClient.ts +13 -9
  47. package/src/components/BaseHoverCard/BaseHoverCard.stories.tsx +1 -1
  48. package/src/components/BaseHoverCard/BaseHoverCard.test.tsx +1 -1
  49. package/src/components/BaseHoverCard/BaseHoverCard.tsx +1 -1
  50. package/src/components/BlankSlate/BlankSlate.module.css +74 -0
  51. package/src/components/BlankSlate/BlankSlate.module.css.d.ts +13 -0
  52. package/src/components/BlankSlate/BlankSlate.stories.tsx +1 -1
  53. package/src/components/BlankSlate/BlankSlate.tsx +1 -1
  54. package/src/components/BlankSlate/index.ts +1 -1
  55. package/src/components/Breadcrumb/Breadcrumb.module.css +11 -0
  56. package/src/components/Breadcrumb/Breadcrumb.module.css.d.ts +6 -0
  57. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +34 -0
  58. package/src/components/Breadcrumb/Breadcrumb.tsx +43 -25
  59. package/src/components/Breadcrumb/index.ts +1 -1
  60. package/src/components/Card/Card.stories.tsx +3 -3
  61. package/src/components/Card/Card.tsx +3 -2
  62. package/src/components/CodeBlock/CodeBlock.module.css +46 -0
  63. package/src/components/CodeBlock/CodeBlock.module.css.d.ts +10 -0
  64. package/src/components/CodeBlock/CodeBlock.tsx +7 -7
  65. package/src/components/ContentTabs/ContentTabs.module.css +60 -0
  66. package/src/components/ContentTabs/ContentTabs.module.css.d.ts +12 -0
  67. package/src/components/ContentTabs/ContentTabs.tsx +2 -2
  68. package/src/components/Count/Count.tsx +1 -1
  69. package/src/components/Divider/Divider.module.css +23 -0
  70. package/src/components/Divider/Divider.module.css.d.ts +7 -0
  71. package/src/components/Divider/Divider.stories.tsx +3 -4
  72. package/src/components/Divider/Divider.tsx +5 -8
  73. package/src/components/HoverCard/HoverCard.module.css +79 -0
  74. package/src/components/HoverCard/HoverCard.module.css.d.ts +13 -0
  75. package/src/components/HoverCard/HoverCard.stories.tsx +3 -2
  76. package/src/components/HoverCard/HoverCard.test.tsx +2 -2
  77. package/src/components/HoverCard/HoverCard.tsx +3 -3
  78. package/src/components/HoverCard/index.ts +3 -3
  79. package/src/components/PageLayout/PageLayout.module.css +1 -1
  80. package/src/components/SideNav/SideNav.module.css +1 -1
  81. package/src/components/SideNav/SideNav.stories.tsx +6 -6
  82. package/src/components/SideNav/SideNav.tsx +8 -8
  83. package/src/components/SideNav/SideNavEnvironmentSelector.tsx +10 -12
  84. package/src/components/Table/Table.stories.tsx +2 -2
  85. package/src/components/Table/Table.test.tsx +2 -2
  86. package/src/components/Table/Table.tsx +2 -2
  87. package/src/components/Table/index.ts +1 -1
  88. package/src/components/TextLink/TextLink.module.css +58 -0
  89. package/src/components/TextLink/TextLink.module.css.d.ts +11 -0
  90. package/src/components/TextLink/TextLink.stories.tsx +1 -1
  91. package/src/components/TextLink/TextLink.tsx +5 -5
  92. package/src/domain/__tests__/customType.test.ts +1 -186
  93. package/src/domain/__tests__/group.test.ts +161 -0
  94. package/src/domain/__tests__/slice.test.ts +41 -0
  95. package/src/domain/customType.ts +1 -193
  96. package/src/domain/group.ts +89 -0
  97. package/src/domain/slice.ts +53 -12
  98. package/src/features/autoSave/AutoSaveStatusIndicator.tsx +2 -2
  99. package/src/features/changelog/useSliceMachineLatestNonBreakingVersion.ts +1 -1
  100. package/src/features/changelog/useSliceMachineReleaseNotes.ts +1 -1
  101. package/src/features/changelog/useSliceMachineVersions.ts +2 -2
  102. package/src/features/changes/BlankSlates/NoChangesBlankSlate.tsx +11 -14
  103. package/src/features/changes/PushChangesButton.tsx +5 -5
  104. package/src/features/changes/StatusBadge.tsx +2 -2
  105. package/src/features/customTypes/EditDropdown.tsx +6 -9
  106. package/src/features/customTypes/PageTypeOnboarding.tsx +5 -5
  107. package/src/features/customTypes/__tests__/CustomTypeBuilderPage.test.tsx +16 -18
  108. package/src/features/customTypes/__tests__/CustomTypesTablePage.test.tsx +11 -10
  109. package/src/features/customTypes/actions/convertCustomToPageType.ts +4 -4
  110. package/src/features/customTypes/actions/createCustomType.ts +5 -5
  111. package/src/features/customTypes/actions/deleteCustomType.ts +3 -3
  112. package/src/features/customTypes/actions/renameCustomType.ts +3 -3
  113. package/src/features/customTypes/customTypesBuilder/CustomTypeProvider.tsx +8 -8
  114. package/src/features/customTypes/customTypesBuilder/CustomTypesBuilderPage.tsx +25 -15
  115. package/src/features/customTypes/customTypesBuilder/PageSnippetDialog/PageSnippetDialog.tsx +7 -7
  116. package/src/features/customTypes/customTypesBuilder/SliceZoneBlankSlate.tsx +3 -3
  117. package/src/features/customTypes/customTypesBuilder/useCustomType.ts +1 -1
  118. package/src/features/customTypes/customTypesConfig.ts +2 -2
  119. package/src/features/customTypes/customTypesTable/CustomTypesTable.tsx +16 -16
  120. package/src/features/customTypes/customTypesTable/CustomTypesTablePage.tsx +19 -20
  121. package/src/features/customTypes/customTypesTable/useCustomTypes.ts +8 -8
  122. package/src/features/documentation/MarkdownRenderer/index.tsx +5 -6
  123. package/src/features/documentation/useDocumentation.ts +1 -1
  124. package/src/features/environments/actions/getActiveEnvironment.ts +1 -1
  125. package/src/features/environments/actions/getEnvironments.ts +1 -1
  126. package/src/features/environments/actions/setEnvironment.ts +3 -3
  127. package/src/features/inAppGuide/InAppGuideContext.tsx +2 -2
  128. package/src/features/inAppGuide/InAppGuideDialog.tsx +4 -4
  129. package/src/features/inAppGuide/inAppGuideContent.tsx +4 -4
  130. package/src/features/labs/labsList/LabsList.tsx +2 -2
  131. package/src/features/labs/labsList/LabsListItem.tsx +1 -1
  132. package/src/features/labs/labsList/LabsPage.tsx +8 -5
  133. package/src/features/labs/labsList/useLab.tsx +1 -1
  134. package/src/features/settings/SettingsPage.tsx +7 -4
  135. package/src/features/settings/git/ConnectGitRepository.tsx +9 -9
  136. package/src/features/settings/git/GitOwnerSelect.tsx +1 -1
  137. package/src/features/settings/git/GitProvider.ts +4 -4
  138. package/src/features/settings/git/GitProviderConnectButtons.tsx +1 -1
  139. package/src/features/settings/git/GitRepositoriesList.tsx +5 -5
  140. package/src/features/settings/git/GitRepositoriesSearch.tsx +5 -5
  141. package/src/features/settings/git/GitRepositoryConnectDialog.tsx +5 -8
  142. package/src/features/settings/git/useGitIntegrationExperiment.ts +1 -1
  143. package/src/features/settings/git/useGitOwners.ts +1 -1
  144. package/src/features/settings/git/useGitRepos.ts +1 -1
  145. package/src/features/settings/git/useLinkedGitRepos.ts +2 -2
  146. package/src/features/settings/git/useWriteAPIToken.ts +2 -2
  147. package/src/features/slices/actions/addSlicesToSliceZone.ts +2 -2
  148. package/src/features/slices/actions/createSlice.ts +5 -5
  149. package/src/features/slices/actions/deleteSlice.ts +1 -1
  150. package/src/features/slices/actions/renameSlice.ts +4 -4
  151. package/src/features/slices/actions/uploadSliceScreenshot.ts +2 -2
  152. package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewSliceDialog.tsx +10 -10
  153. package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewVariationDialog.tsx +7 -7
  154. package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.module.css +14 -0
  155. package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.module.css.d.ts +6 -0
  156. package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.tsx +12 -12
  157. package/src/features/slices/convertLegacySlice/ConvertLegacySliceMergeWithIdenticalDialog.tsx +5 -8
  158. package/src/features/slices/convertLegacySlice/types.ts +2 -2
  159. package/src/features/slices/sliceBuilder/FloatingBackButton.tsx +6 -6
  160. package/src/features/slices/sliceBuilder/SliceBuilderProvider.tsx +9 -9
  161. package/src/features/slices/sliceBuilder/actions/deleteVariation.ts +4 -4
  162. package/src/features/slices/sliceBuilder/actions/renameVariation.ts +3 -3
  163. package/src/features/slices/sliceBuilder/useGroupsInSlicesExperiment.ts +8 -0
  164. package/src/features/slices/sliceCards/NonSharedSliceCard.tsx +4 -4
  165. package/src/features/slices/sliceCards/SharedSliceCard.tsx +7 -7
  166. package/src/features/slicesTemplates/actions/createSlicesTemplates.ts +2 -2
  167. package/src/features/slicesTemplates/useSlicesTemplates.ts +2 -1
  168. package/src/features/sync/AutoSyncProvider.tsx +17 -17
  169. package/src/features/sync/actions/pushChanges.ts +4 -3
  170. package/src/features/sync/actions/trackPushChangesSuccess.ts +3 -3
  171. package/src/features/sync/components/AutoSyncStatusIndicator.module.css +1 -1
  172. package/src/features/sync/components/AutoSyncStatusIndicator.tsx +4 -4
  173. package/src/features/sync/fetchUnSyncChanges.ts +5 -5
  174. package/src/features/sync/getUnSyncChanges.ts +9 -9
  175. package/src/features/sync/useUnSyncChanges.ts +5 -5
  176. package/src/hooks/useActionQueue.tsx +5 -5
  177. package/src/hooks/useAdapterName.ts +1 -1
  178. package/src/hooks/useAuthStatus.ts +2 -2
  179. package/src/hooks/useCurrentSlice.tsx +4 -4
  180. package/src/hooks/useEditorContent.ts +5 -4
  181. package/src/hooks/useExperimentVariant.ts +2 -2
  182. package/src/hooks/useIsEmptyProject.ts +1 -1
  183. package/src/hooks/useRepositoryInformation.ts +2 -2
  184. package/src/hooks/useRouteChange.tsx +1 -1
  185. package/src/hooks/useSMTracker.ts +6 -6
  186. package/src/hooks/useScreenshotChangesModal.ts +4 -3
  187. package/src/hooks/useServerState.ts +4 -4
  188. package/src/hooks/useSliceMachineConfig.ts +2 -2
  189. package/src/hooks/useSliceMachineRunningVersion.ts +1 -1
  190. package/src/hooks/useThrottle.ts +1 -1
  191. package/src/hooks/useUpdateAvailable.ts +1 -1
  192. package/src/hooks/useWindowDimensions.ts +1 -1
  193. package/src/hooks/useWindowSize.ts +2 -1
  194. package/{components → src/legacy/components}/App/index.tsx +8 -8
  195. package/{components → src/legacy/components}/AppLayout/index.tsx +6 -7
  196. package/{components → src/legacy/components}/AuthInstructions/index.jsx +1 -1
  197. package/{components → src/legacy/components}/Button/index.tsx +1 -2
  198. package/{components → src/legacy/components}/Card/Default.jsx +2 -1
  199. package/{components → src/legacy/components}/Card/Preview.jsx +1 -1
  200. package/{components → src/legacy/components}/Card/WithTabs/index.jsx +4 -3
  201. package/{components → src/legacy/components}/Card/index.tsx +1 -0
  202. package/{components → src/legacy/components}/Changelog/index.tsx +8 -8
  203. package/{components → src/legacy/components}/Changelog/navigation/VersionBadge.tsx +2 -1
  204. package/{components → src/legacy/components}/Changelog/navigation/VersionTag.tsx +1 -0
  205. package/{components → src/legacy/components}/Changelog/navigation/index.tsx +6 -6
  206. package/{components → src/legacy/components}/Changelog/versionDetails/UpdateCommandBox.tsx +6 -6
  207. package/{components → src/legacy/components}/Changelog/versionDetails/VersionKindLabel.tsx +3 -4
  208. package/{components → src/legacy/components}/Changelog/versionDetails/index.tsx +5 -5
  209. package/{components → src/legacy/components}/ChangesEmptyState/AuthErrorPage.tsx +5 -5
  210. package/{components → src/legacy/components}/ChangesItems/ChangesItems.tsx +14 -14
  211. package/{components → src/legacy/components}/ChangesItems/DevCollaborationExperiment.tsx +3 -3
  212. package/{components → src/legacy/components}/CodeBlock/index.tsx +3 -3
  213. package/{components → src/legacy/components}/ConfigErrors/index.jsx +4 -3
  214. package/{components → src/legacy/components}/CustomTypeTable/changesPage.tsx +9 -8
  215. package/{components → src/legacy/components}/DeleteCTModal/index.tsx +9 -9
  216. package/{components → src/legacy/components}/DeleteDocumentsDrawer/AssociatedDocumentsCard.tsx +4 -4
  217. package/{components → src/legacy/components}/DeleteDocumentsDrawer/HardDeleteDocumentsDrawer.tsx +9 -9
  218. package/{components → src/legacy/components}/DeleteDocumentsDrawer/SoftDeleteDocumentsDrawer.tsx +9 -8
  219. package/{components → src/legacy/components}/DeleteSliceModal/index.tsx +6 -6
  220. package/{components → src/legacy/components}/DeleteVariationModal/index.tsx +6 -6
  221. package/{components → src/legacy/components}/DropDownSelector/index.tsx +2 -4
  222. package/{components → src/legacy/components}/EmptyState/index.tsx +3 -3
  223. package/{components → src/legacy/components}/FormFields/Array.jsx +2 -4
  224. package/{components → src/legacy/components}/FormFields/Checkbox.jsx +1 -1
  225. package/{components → src/legacy/components}/FormFields/CheckboxControl.jsx +1 -1
  226. package/{components → src/legacy/components}/FormFields/Input.tsx +3 -2
  227. package/{components → src/legacy/components}/FormFields/SelectDefaultValue.jsx +1 -1
  228. package/{components → src/legacy/components}/Forms/CreateCustomTypeModal/CreateCustomTypeModal.tsx +18 -18
  229. package/{components → src/legacy/components}/Forms/CreateSliceModal/CreateSliceModal.tsx +10 -10
  230. package/{components → src/legacy/components}/Forms/RenameCustomTypeModal/RenameCustomTypeModal.tsx +12 -12
  231. package/{components → src/legacy/components}/Forms/RenameSliceModal/RenameSliceModal.tsx +8 -8
  232. package/src/legacy/components/Forms/RenameVariationModal/RenameVariationModal.module.css +5 -0
  233. package/src/legacy/components/Forms/RenameVariationModal/RenameVariationModal.module.css.d.ts +5 -0
  234. package/{components → src/legacy/components}/Forms/RenameVariationModal/RenameVariationModal.tsx +7 -7
  235. package/{components → src/legacy/components}/Forms/components/InputBox.tsx +2 -2
  236. package/{components → src/legacy/components}/Forms/components/SelectRepeatable.tsx +4 -3
  237. package/{components → src/legacy/components}/Forms/formsValidator.ts +6 -4
  238. package/{components → src/legacy/components}/FullPage/index.tsx +1 -1
  239. package/{components → src/legacy/components}/ListItem/Header.tsx +3 -2
  240. package/{components → src/legacy/components}/ListItem/index.tsx +8 -10
  241. package/{components → src/legacy/components}/LoadingPage/index.tsx +1 -0
  242. package/{components → src/legacy/components}/LoginModal/index.tsx +22 -22
  243. package/{components → src/legacy/components}/ModalFormCard/index.tsx +7 -6
  244. package/{components → src/legacy/components}/Navigation/ChangesItem.tsx +18 -16
  245. package/{components → src/legacy/components}/Navigation/Environment.tsx +13 -13
  246. package/{components → src/legacy/components}/Navigation/RunningVersion.tsx +2 -2
  247. package/{components → src/legacy/components}/Navigation/UpdateBox.tsx +3 -3
  248. package/src/legacy/components/Navigation/VideoItem.module.css.d.ts +5 -0
  249. package/{components → src/legacy/components}/Navigation/VideoItem.tsx +14 -13
  250. package/src/legacy/components/Navigation/index.module.css +3 -0
  251. package/src/legacy/components/Navigation/index.module.css.d.ts +5 -0
  252. package/{components → src/legacy/components}/Navigation/index.test.tsx +12 -12
  253. package/{components → src/legacy/components}/Navigation/index.tsx +20 -21
  254. package/{components → src/legacy/components}/ReviewModal/ReviewForm.tsx +12 -12
  255. package/{components → src/legacy/components}/ReviewModal/ReviewModal.tsx +6 -6
  256. package/{components → src/legacy/components}/ScreenshotChangesModal/VariationDropZone.tsx +7 -7
  257. package/{components → src/legacy/components}/ScreenshotChangesModal/index.tsx +12 -15
  258. package/{components → src/legacy/components}/ScreenshotChangesModal/useCustomScreenshot.tsx +1 -1
  259. package/{components → src/legacy/components}/ScreenshotPreviewModal/index.tsx +8 -7
  260. package/{components → src/legacy/components}/Simulator/components/FailedConnect/index.tsx +3 -3
  261. package/{components → src/legacy/components}/Simulator/components/Header/VariationsPopover/MenuList.tsx +2 -1
  262. package/{components → src/legacy/components}/Simulator/components/Header/VariationsPopover/index.tsx +4 -5
  263. package/{components → src/legacy/components}/Simulator/components/Header/index.tsx +7 -7
  264. package/{components → src/legacy/components}/Simulator/components/IframeRenderer/index.tsx +3 -4
  265. package/{components → src/legacy/components}/Simulator/components/Toolbar/ScreensizeInput/index.tsx +2 -1
  266. package/{components → src/legacy/components}/Simulator/components/Toolbar/index.tsx +4 -5
  267. package/{components → src/legacy/components}/Simulator/index.tsx +25 -30
  268. package/{components → src/legacy/components}/SliceMachineDrawer/index.tsx +3 -2
  269. package/{components → src/legacy/components}/ToasterContainer/index.tsx +3 -5
  270. package/{components → src/legacy/components}/Tooltip/TextWithTooltip.tsx +2 -2
  271. package/{components → src/legacy/components}/Tooltip/index.jsx +2 -2
  272. package/{components → src/legacy/components}/Warnings/index.jsx +1 -1
  273. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/DeleteSliceZoneModal.tsx +4 -4
  274. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/List.tsx +8 -8
  275. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/SlicesTemplatesModal.tsx +11 -11
  276. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModal.tsx +3 -3
  277. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModalList.tsx +4 -3
  278. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/index.tsx +26 -23
  279. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/sliceTemplatesComingSoon.ts +1 -1
  280. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/InputBox.tsx +1 -1
  281. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/create.tsx +2 -1
  282. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/delete.tsx +2 -2
  283. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/update.tsx +3 -2
  284. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabZone/index.tsx +32 -32
  285. package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/index.tsx +5 -5
  286. package/src/legacy/lib/builders/SliceBuilder/FieldZones/index.tsx +273 -0
  287. package/{lib → src/legacy/lib}/builders/SliceBuilder/Sidebar/AddVariationModal.tsx +7 -7
  288. package/{lib → src/legacy/lib}/builders/SliceBuilder/Sidebar/index.tsx +45 -37
  289. package/{lib → src/legacy/lib}/builders/SliceBuilder/SimulatorButton/index.tsx +12 -11
  290. package/{lib → src/legacy/lib}/builders/SliceBuilder/index.tsx +13 -9
  291. package/{lib → src/legacy/lib}/builders/common/EditModal/Field.jsx +3 -5
  292. package/{lib → src/legacy/lib}/builders/common/EditModal/Form.jsx +1 -1
  293. package/{lib → src/legacy/lib}/builders/common/EditModal/index.jsx +14 -16
  294. package/{lib → src/legacy/lib}/builders/common/SelectFieldTypeModal/index.jsx +3 -4
  295. package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/ErrorTooltip.tsx +2 -2
  296. package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/Hints/CodeBlock.tsx +4 -5
  297. package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/Hints/index.tsx +2 -1
  298. package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/NewField.tsx +16 -13
  299. package/{lib → src/legacy/lib}/builders/common/Zone/Card/index.jsx +15 -9
  300. package/{lib → src/legacy/lib}/builders/common/Zone/components/EmptyState/index.tsx +2 -2
  301. package/{lib → src/legacy/lib}/builders/common/Zone/index.jsx +7 -10
  302. package/{lib → src/legacy/lib}/builders/utils/index.ts +1 -1
  303. package/{lib → src/legacy/lib}/forms/fields.ts +1 -2
  304. package/{lib → src/legacy/lib}/forms/index.ts +1 -0
  305. package/{lib → src/legacy/lib}/models/common/CustomType/index.ts +5 -4
  306. package/{lib → src/legacy/lib}/models/common/CustomType/sliceZone.ts +2 -1
  307. package/{lib → src/legacy/lib}/models/common/DeprecatedMockConfigMessage.tsx +3 -2
  308. package/{lib → src/legacy/lib}/models/common/Environment.ts +2 -2
  309. package/{lib → src/legacy/lib}/models/common/Group.ts +3 -2
  310. package/{lib → src/legacy/lib}/models/common/Library.ts +2 -1
  311. package/{lib → src/legacy/lib}/models/common/LibraryUI.ts +1 -1
  312. package/{lib → src/legacy/lib}/models/common/ModelData.ts +3 -3
  313. package/{lib → src/legacy/lib}/models/common/ModelStatus/compareCustomTypeModels.ts +2 -1
  314. package/{lib → src/legacy/lib}/models/common/ModelStatus/compareSliceModels.ts +2 -1
  315. package/{lib → src/legacy/lib}/models/common/ModelStatus/index.ts +10 -9
  316. package/{lib → src/legacy/lib}/models/common/Slice.ts +19 -5
  317. package/{lib → src/legacy/lib}/models/common/normalizers/customType.ts +2 -2
  318. package/{lib → src/legacy/lib}/models/common/normalizers/slices.ts +3 -2
  319. package/{lib → src/legacy/lib}/models/common/widgets/Boolean/index.ts +5 -7
  320. package/{lib → src/legacy/lib}/models/common/widgets/Color/index.ts +2 -3
  321. package/{lib → src/legacy/lib}/models/common/widgets/ContentRelationship/Form.tsx +9 -10
  322. package/{lib → src/legacy/lib}/models/common/widgets/ContentRelationship/index.ts +7 -7
  323. package/{lib → src/legacy/lib}/models/common/widgets/GeoPoint/index.ts +2 -3
  324. package/{lib → src/legacy/lib}/models/common/widgets/Group/Form.jsx +6 -6
  325. package/{lib → src/legacy/lib}/models/common/widgets/Group/ListItem/index.jsx +63 -76
  326. package/{lib → src/legacy/lib}/models/common/widgets/Group/index.ts +6 -4
  327. package/{lib → src/legacy/lib}/models/common/widgets/Image/Form.tsx +9 -11
  328. package/{lib → src/legacy/lib}/models/common/widgets/Image/components.tsx +6 -5
  329. package/{lib → src/legacy/lib}/models/common/widgets/Image/index.ts +3 -5
  330. package/{lib → src/legacy/lib}/models/common/widgets/Link/Form.jsx +5 -7
  331. package/{lib → src/legacy/lib}/models/common/widgets/LinkToMedia/Form.jsx +4 -6
  332. package/{lib → src/legacy/lib}/models/common/widgets/LinkToMedia/index.ts +4 -4
  333. package/{lib → src/legacy/lib}/models/common/widgets/Select/FormFields.jsx +7 -7
  334. package/{lib → src/legacy/lib}/models/common/widgets/Select/index.ts +3 -6
  335. package/{lib → src/legacy/lib}/models/common/widgets/StructuredText/Form.tsx +12 -11
  336. package/{lib → src/legacy/lib}/models/common/widgets/StructuredText/index.ts +3 -6
  337. package/{lib → src/legacy/lib}/models/common/widgets/StructuredText/options.tsx +2 -2
  338. package/{lib → src/legacy/lib}/models/common/widgets/Timestamp/index.ts +4 -5
  339. package/{lib → src/legacy/lib}/models/common/widgets/UID/index.ts +4 -5
  340. package/{lib → src/legacy/lib}/models/common/widgets/Widget.ts +3 -1
  341. package/src/legacy/lib/models/common/widgets/groupBuilderArray.ts +18 -0
  342. package/src/legacy/lib/models/common/widgets/sliceBuilderArray.ts +19 -0
  343. package/src/legacy/lib/models/common/widgets/withGroup.ts +2 -0
  344. package/{lib → src/legacy/lib}/models/server/ServerState.ts +4 -3
  345. package/{lib → src/legacy/lib}/utils/index.ts +4 -5
  346. package/{lib → src/legacy/lib}/utils/shared/customTypes.ts +1 -1
  347. package/src/modules/availableCustomTypes/index.ts +15 -13
  348. package/src/modules/availableCustomTypes/types.ts +2 -2
  349. package/src/modules/environment/index.ts +10 -8
  350. package/src/modules/environment/types.ts +1 -1
  351. package/src/modules/loading/index.ts +3 -2
  352. package/src/modules/modal/index.ts +4 -2
  353. package/src/modules/slices/index.ts +13 -9
  354. package/src/modules/slices/selector.ts +1 -1
  355. package/src/modules/slices/types.ts +2 -2
  356. package/src/modules/useSliceMachineActions.ts +25 -20
  357. package/src/modules/userContext/index.ts +5 -3
  358. package/{pages → src/pages}/_app.tsx +23 -25
  359. package/{pages → src/pages}/changelog.tsx +1 -1
  360. package/{pages → src/pages}/changes.tsx +25 -19
  361. package/src/pages/custom-types/[customTypeId].tsx +1 -0
  362. package/{pages → src/pages}/custom-types.tsx +1 -1
  363. package/{pages → src/pages}/index.tsx +3 -3
  364. package/src/pages/labs.tsx +1 -0
  365. package/src/pages/page-types/[pageTypeId].tsx +1 -0
  366. package/src/pages/settings.tsx +1 -0
  367. package/{pages → src/pages}/slices/[lib]/[sliceName]/[variation]/index.tsx +3 -3
  368. package/{pages → src/pages}/slices/[lib]/[sliceName]/[variation]/simulator.tsx +2 -2
  369. package/{pages → src/pages}/slices.tsx +24 -21
  370. package/src/redux/reducer.ts +8 -7
  371. package/src/redux/store.ts +8 -6
  372. package/src/redux/type.ts +7 -6
  373. package/src/theme.ts +1 -2
  374. package/src/utils/getContentTypeForTracking.ts +21 -0
  375. package/test/__setup__.ts +12 -7
  376. package/test/__testutils__/createTestPlugin.ts +3 -2
  377. package/test/__testutils__/createTestProject.ts +5 -4
  378. package/test/__testutils__/index.tsx +6 -5
  379. package/test/__testutils__/mockAWSACLAPI.ts +1 -1
  380. package/test/__testutils__/mockCustomTypesAPI.ts +1 -1
  381. package/test/__testutils__/mockPrismicAuthAPI.ts +1 -1
  382. package/test/__testutils__/mockPrismicUserAPI.ts +2 -3
  383. package/test/__testutils__/readMSWFormData.ts +1 -1
  384. package/test/components/IframeRenderer.test.ts +3 -2
  385. package/test/lib/builders/EditModal.test.tsx +5 -3
  386. package/test/lib/builders/buildersUtils.test.ts +3 -3
  387. package/test/lib/consts.test.ts +6 -2
  388. package/test/lib/models/common/CustomType.test.ts +6 -2
  389. package/test/lib/models/common/ModelStatus.test.ts +6 -4
  390. package/test/lib/models/common/Slice.test.ts +3 -2
  391. package/test/lib/models/common/widgets/index.test.ts +8 -4
  392. package/test/lib/utils/index.test.ts +3 -2
  393. package/test/lib/utils/preferWroomBase.test.ts +3 -2
  394. package/test/lib/utils/shared/customTypes.test.ts +2 -1
  395. package/test/pages/slices.test.tsx +10 -10
  396. package/test/src/modules/__fixtures__/serverState.ts +3 -3
  397. package/test/src/modules/__fixtures__/sliceUtilsFactory.ts +3 -3
  398. package/test/src/modules/availableCustomTypes/index.test.ts +3 -3
  399. package/test/src/modules/environment.test.ts +3 -5
  400. package/test/src/modules/loading.test.ts +3 -3
  401. package/test/src/modules/modal.test.ts +5 -5
  402. package/test/src/modules/slices.test.ts +3 -2
  403. package/test/src/modules/userContext.test.ts +3 -3
  404. package/test/src/normalizers/customType.test.ts +16 -3
  405. package/test/src/utils/fieldNameCreator.test.ts +1 -1
  406. package/tsconfig.json +1 -6
  407. package/vite.config.ts +5 -10
  408. package/components/Forms/RenameVariationModal/RenameVariationModal.css.ts +0 -7
  409. package/components/Navigation/index.css.ts +0 -5
  410. package/lib/builders/SliceBuilder/FieldZones/index.tsx +0 -216
  411. package/lib/models/common/widgets/sliceBuilderArray.ts +0 -31
  412. package/lib/models/common/widgets/withGroup.ts +0 -20
  413. package/out/_next/static/M7hTqxKEI7x7a09i22lAK/_buildManifest.js +0 -1
  414. package/out/_next/static/chunks/18539003-a5a5d48f20a7b261.js +0 -97
  415. package/out/_next/static/chunks/25-792af14760d9df34.js +0 -1
  416. package/out/_next/static/chunks/286-e0950c3083c672e8.js +0 -1
  417. package/out/_next/static/chunks/318-d6f1200138628ec3.js +0 -1
  418. package/out/_next/static/chunks/46-d22d7a121254e31d.js +0 -8
  419. package/out/_next/static/chunks/727-2c302be2def92786.js +0 -1
  420. package/out/_next/static/chunks/799-7b910b896ff60ebe.js +0 -1
  421. package/out/_next/static/chunks/904-c9221a5cb09524e8.js +0 -1
  422. package/out/_next/static/chunks/pages/_app-7c41eb6cdd942b9e.js +0 -436
  423. package/out/_next/static/chunks/pages/changelog-5c9ac93faf0df06b.js +0 -1
  424. package/out/_next/static/chunks/pages/changes-3e4989e09fd412a8.js +0 -1
  425. package/out/_next/static/chunks/pages/custom-types/[customTypeId]-d1a4a07e6b600fa6.js +0 -1
  426. package/out/_next/static/chunks/pages/labs-6f5925cd6cdcee9e.js +0 -1
  427. package/out/_next/static/chunks/pages/page-types/[pageTypeId]-a724ff12ef322020.js +0 -1
  428. package/out/_next/static/chunks/pages/settings-f0620e5b727cda03.js +0 -1
  429. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-01d67e97cb901e46.js +0 -1
  430. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-8d7043e6638d65cd.js +0 -1
  431. package/out/_next/static/chunks/pages/slices-77cff50b1df13579.js +0 -1
  432. package/out/_next/static/css/238631d146c5ed97.css +0 -1
  433. package/out/_next/static/css/72465cc1225f28a2.css +0 -1
  434. package/out/_next/static/css/838fd8bb5a7c32b0.css +0 -1
  435. package/out/_next/static/css/b22c0750c14cc089.css +0 -1
  436. package/out/_next/static/css/be1f49e49a5aa7eb.css +0 -1
  437. package/out/_next/static/css/f8eb526e10bc2441.css +0 -1
  438. package/pages/custom-types/[customTypeId].tsx +0 -1
  439. package/pages/labs.tsx +0 -1
  440. package/pages/page-types/[pageTypeId].tsx +0 -1
  441. package/pages/settings.tsx +0 -1
  442. package/src/components/BlankSlate/BlankSlate.css.ts +0 -96
  443. package/src/components/Breadcrumb/Breadcrumb.css.ts +0 -5
  444. package/src/components/Breadcrumb/Breadcrumb.stories.ts +0 -32
  445. package/src/components/CodeBlock/CodeBlock.css.ts +0 -37
  446. package/src/components/ContentTabs/ContentTabs.css.ts +0 -49
  447. package/src/components/Divider/Divider.css.ts +0 -31
  448. package/src/components/HoverCard/HoverCard.css.ts +0 -105
  449. package/src/components/TextLink/TextLink.css.ts +0 -65
  450. package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.css.ts +0 -15
  451. package/out/_next/static/{M7hTqxKEI7x7a09i22lAK → jEpmnNgSaQQGEtlMfn4ek}/_ssgManifest.js +0 -0
  452. package/{components → src/legacy/components}/Card/CardBox.tsx +0 -0
  453. package/{components → src/legacy/components}/Card/WithTabs/components.jsx +1 -1
  454. package/{components → src/legacy/components}/Changelog/versionDetails/ReleaseNotesDetails.tsx +1 -1
  455. package/{components → src/legacy/components}/ChangesEmptyState/OfflinePage.tsx +1 -1
  456. package/{components → src/legacy/components}/ChangesEmptyState/index.ts +1 -1
  457. package/{components → src/legacy/components}/ChangesItems/ErrorBanner.tsx +1 -1
  458. package/{components → src/legacy/components}/ChangesItems/index.ts +0 -0
  459. package/{components → src/legacy/components}/ChangesSectionHeader/ChangesSectionHeader.tsx +0 -0
  460. package/{components → src/legacy/components}/ChangesSectionHeader/index.ts +0 -0
  461. package/{components → src/legacy/components}/DeleteDocumentsDrawer/index.tsx +1 -1
  462. package/{components → src/legacy/components}/DropDownSelector/MenuList.tsx +0 -0
  463. package/{components → src/legacy/components}/Flex/index.tsx +0 -0
  464. package/{components → src/legacy/components}/FormFields/index.ts +0 -0
  465. package/{components → src/legacy/components}/Forms/CreateCustomTypeModal/index.tsx +0 -0
  466. package/{components → src/legacy/components}/Forms/CreateSliceModal/index.tsx +0 -0
  467. package/{components → src/legacy/components}/Forms/RenameCustomTypeModal/index.ts +0 -0
  468. package/{components → src/legacy/components}/Forms/RenameSliceModal/index.ts +0 -0
  469. package/{components → src/legacy/components}/Forms/RenameVariationModal/index.ts +0 -0
  470. package/{components → src/legacy/components}/Forms/components/FlexCard.tsx +0 -0
  471. package/{components → src/legacy/components}/Forms/formsTypes.ts +0 -0
  472. package/{components → src/legacy/components}/Grid/index.tsx +0 -0
  473. package/{components → src/legacy/components}/InputDeleteIcon/index.jsx +1 -1
  474. package/{components → src/legacy/components}/ItemHeader/index.tsx +1 -1
  475. package/{components → src/legacy/components}/Li/index.tsx +0 -0
  476. package/{components → src/legacy/components}/ListItem/utils.js +0 -0
  477. package/{components → src/legacy/components}/MissingLibraries/index.tsx +0 -0
  478. package/{components → src/legacy/components}/Navigation/VideoItem.module.css +0 -0
  479. package/{components → src/legacy/components}/ReactTooltipPortal/index.tsx +0 -0
  480. package/{components → src/legacy/components}/ReviewModal/ReviewFormSelect.tsx +1 -1
  481. package/{components → src/legacy/components}/ReviewModal/index.ts +0 -0
  482. package/{components → src/legacy/components}/ScreenshotPreview/index.tsx +1 -1
  483. package/{components → src/legacy/components}/Simulator/components/FullPage/index.tsx +0 -0
  484. package/{components → src/legacy/components}/Simulator/components/Header/links.ts +0 -0
  485. package/{components → src/legacy/components}/SliceMachineIconButton/index.tsx +1 -1
  486. package/{components → src/legacy/components}/SliceMachineModal/index.tsx +1 -1
  487. package/{components → src/legacy/components}/WindowPortal/index.js +0 -0
  488. package/{components → src/legacy/components}/YoutubeEmbed/index.tsx +0 -0
  489. package/{lib → src/legacy/lib}/builders/common/SelectFieldTypeModal/FieldTypeCard.jsx +0 -0
  490. package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/EditItem.jsx +0 -0
  491. package/{lib → src/legacy/lib}/consts.ts +0 -0
  492. package/{lib → src/legacy/lib}/env/sentry.ts +0 -0
  493. package/{lib → src/legacy/lib}/forms/defaults.ts +1 -1
  494. package/{lib → src/legacy/lib}/forms/types.ts +0 -0
  495. package/{lib → src/legacy/lib}/hljs/svelte.ts +0 -0
  496. package/{lib → src/legacy/lib}/models/common/Auth.ts +0 -0
  497. package/{lib → src/legacy/lib}/models/common/ComponentUI.ts +1 -1
  498. package/{lib → src/legacy/lib}/models/common/CustomType/tab.ts +4 -4
  499. package/{lib → src/legacy/lib}/models/common/ErrorWithStatus.ts +0 -0
  500. package/{lib → src/legacy/lib}/models/common/Fields.ts +1 -1
  501. package/{lib → src/legacy/lib}/models/common/Manifest.ts +0 -0
  502. package/{lib → src/legacy/lib}/models/common/PrismicData.ts +0 -0
  503. package/{lib → src/legacy/lib}/models/common/PrismicFile.ts +0 -0
  504. package/{lib → src/legacy/lib}/models/common/Screenshots.ts +0 -0
  505. package/{lib → src/legacy/lib}/models/common/Simulator.ts +0 -0
  506. package/{lib → src/legacy/lib}/models/common/Slices.ts +2 -2
  507. package/{lib → src/legacy/lib}/models/common/UserProfile.ts +0 -0
  508. package/{lib → src/legacy/lib}/models/common/Warning.ts +0 -0
  509. package/{lib → src/legacy/lib}/models/common/widgets/Date/index.ts +2 -2
  510. package/{lib → src/legacy/lib}/models/common/widgets/Embed/index.ts +2 -2
  511. package/{lib → src/legacy/lib}/models/common/widgets/Link/index.ts +3 -3
  512. package/{lib → src/legacy/lib}/models/common/widgets/Number/index.ts +2 -2
  513. package/{lib → src/legacy/lib}/models/common/widgets/Text/index.ts +5 -5
  514. package/{lib → src/legacy/lib}/models/common/widgets/ctBuilderArray.ts +0 -0
  515. package/{lib → src/legacy/lib}/models/common/widgets/index.ts +1 -1
  516. /package/{lib → src/legacy/lib}/prismic/endpoints.ts +0 -0
  517. /package/{lib → src/legacy/lib}/utils/poll.ts +0 -0
  518. /package/{lib → src/legacy/lib}/utils/preferWroomBase.ts +0 -0
  519. /package/{lib → src/legacy/lib}/utils/repo.ts +0 -0
  520. /package/{lib → src/legacy/lib}/utils/str.ts +0 -0
  521. /package/{pages → src/pages}/api/embed.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[569],{82032:function(e,n,t){"use strict";t.d(n,{R$:function(){return f},Qj:function(){return v},T9:function(){return m},nf:function(){return h},u2:function(){return p},_T:function(){return y}});var r=t(67557),o=t(62230),i=t(85244),s=t(98240),a=t(52322),c=t(22715),l=t(6277),u=t(29052),d=t.n(u),f=function(e){var n=e.backgroundImage,t=e.style,c=(0,s.Z)(e,["backgroundImage","style"]),u=void 0!==n;return(0,a.jsx)("article",(0,i.Z)((0,o.Z)({},c),{className:(0,l.W)(d().root,(0,r.Z)({},d().withBackground,u)),style:(0,o.Z)({backgroundImage:u?"url(".concat(n,")"):void 0},t)}))},p=function(e){return(0,a.jsx)("div",(0,i.Z)((0,o.Z)({},e),{className:d().image}))},m=function(e){return(0,a.jsx)("div",(0,i.Z)((0,o.Z)({},e),{className:d().content}))},y=function(e){return(0,a.jsx)(c.xv,(0,i.Z)((0,o.Z)({},e),{className:d().title}))},h=function(e){return(0,a.jsx)(c.xv,(0,i.Z)((0,o.Z)({},e),{className:d().desc,color:"grey11"}))},v=function(e){return(0,a.jsx)("div",(0,i.Z)((0,o.Z)({},e),{className:d().actions,color:"grey"}))}},91061:function(e,n,t){"use strict";t.d(n,{AK:function(){return Z},E3:function(){return m},EN:function(){return y},F$:function(){return x},HO:function(){return g},L4:function(){return j},Tr:function(){return p},Ue:function(){return _},gR:function(){return S},mf:function(){return h},vB:function(){return v},xS:function(){return b},y6:function(){return l}});var r=t(67557),o=t(62230),i=t(85244),s=t(17064),a=t(98863),c=t(88866);function l(e){var n;return null!==(n=e.format)&&void 0!==n?n:"custom"}function u(e){return Object.entries(e.json)}function d(e,n){return e.json[n]}function f(e,n){var t=d(e,n);if(void 0!==t)return Object.entries(t).find(function(e){var n=(0,s.Z)(e,2);return(n[0],n[1]).type===c.SlicesFieldType})}function p(e,n){if(t=e,d=f(t,a=n),(p=(0,s.Z)(null!=d?d:[],2))[0],null!==(l=null==(m=p[1])?void 0:m.config)&&void 0!==l?l:void 0)return e;var t,a,l,d,p,m,y=function(e,n){var t,r=u(e),o=r.findIndex(function(e){return(0,s.Z)(e,1)[0]===n}),i=r.flatMap(function(e){var n=(0,s.Z)(e,2),t=(n[0],n[1]);return Object.keys(t).filter(function(e){return t[e].type===c.SlicesFieldType})}),a=o;do t="slices".concat(0!==a?a.toString():""),a++;while(i.includes(t));return t}(e,n);return(0,i.Z)((0,o.Z)({},e),{json:(0,i.Z)((0,o.Z)({},e.json),(0,r.Z)({},n,(0,i.Z)((0,o.Z)({},e.json[n]),(0,r.Z)({},y,{type:c.SlicesFieldType,fieldset:"Slice Zone"}))))})}function m(e,n){var t=d(e,n);if(void 0===t)return e;var s=Object.keys(t).find(function(e){return t[e].type===c.SlicesFieldType});if(void 0===s)return e;var l=(0,a.ud)(t,s);return(0,i.Z)((0,o.Z)({},e),{json:(0,i.Z)((0,o.Z)({},e.json),(0,r.Z)({},n,l))})}function y(e){var n,t,s=e.customType,l=e.sectionId,u=e.sliceId,f=d(s,l);if(void 0===f)return s;var p=Object.keys(f).find(function(e){return f[e].type===c.SlicesFieldType});if(void 0===p)return s;var m=f[p];if(m.type!==c.SlicesFieldType)return s;var y=(0,a.ud)(null!==(t=null===(n=m.config)||void 0===n?void 0:n.choices)&&void 0!==t?t:{},u);return(0,i.Z)((0,o.Z)({},s),{json:(0,i.Z)((0,o.Z)({},s.json),(0,r.Z)({},l,(0,i.Z)((0,o.Z)({},f),(0,r.Z)({},p,(0,i.Z)((0,o.Z)({},m),{config:(0,i.Z)((0,o.Z)({},m.config),{choices:y})})))))})}function h(e){var n,t=(0,i.Z)((0,o.Z)({},e),{format:"page"}),r=u(e)[0];if(r){var a=(0,s.Z)(r,1)[0];t=p(t,a)}return t}function v(e,n){return(0,i.Z)((0,o.Z)({},e),{json:(0,i.Z)((0,o.Z)({},e.json),(0,r.Z)({},n,{}))})}function x(e,n){var t=(0,a.ud)(e.json,n);return(0,i.Z)((0,o.Z)({},e),{json:t})}function g(e,n,t){if(n===t)return e;var r=Object.keys(e.json).reduce(function(r,o){return o===n?r[t]=e.json[o]:r[o]=e.json[o],r},{});return(0,i.Z)((0,o.Z)({},e),{json:r})}function b(e){var n=e.customType,t=e.sectionId,a=e.newField,l=e.newFieldId,u=n.json[t],d=f(n,t),p=Object.fromEntries(Object.entries(u).filter(function(e){var n=(0,s.Z)(e,2);return(n[0],n[1]).type!==c.SlicesFieldType})),m=(0,i.Z)((0,o.Z)({},p),(0,r.Z)({},l,a));if(void 0!==d){var y=(0,s.Z)(d,2),h=y[0],v=y[1];m[h]=v}return I({customType:n,sectionId:t,updatedSection:m})}function Z(e){var n=e.customType,t=e.sectionId,r=e.fieldId,o=(0,a.ud)(n.json[t],r);return I({customType:n,sectionId:t,updatedSection:o})}function j(e){var n,t,r,o,i,a=e.customType,c=e.sectionId,l=e.previousFieldId,u=e.newFieldId,d=e.newField,f=(n={fields:a.json[c],previousFieldId:l,newFieldId:u,newField:d},t=n.fields,r=n.previousFieldId,o=n.newFieldId,i=n.newField,Object.entries(t).reduce(function(e,n){var t=(0,s.Z)(n,2),a=t[0],c=t[1];return a===r?e[o]=i:a!==o&&(e[a]=c),e},{}));return I({customType:a,sectionId:c,updatedSection:f})}function S(e){var n,t,r,o,i,a,l,u=e.customType,d=e.sectionId,p=e.sourceIndex,m=e.destinationIndex,y=u.json[d],h=f(u,d),v=(n={fields:Object.fromEntries(Object.entries(y).filter(function(e){var n=(0,s.Z)(e,2);return(n[0],n[1]).type!==c.SlicesFieldType})),sourceIndex:p,destinationIndex:m},t=n.fields,r=n.sourceIndex,o=n.destinationIndex,i=Object.entries(t),a=(0,s.Z)(i.splice(r,1),1)[0],i.splice(o,0,a),Object.fromEntries(i));if(void 0!==h){var x=(0,s.Z)(h,2),g=x[0],b=x[1];v[g]=b}return I({customType:u,sectionId:d,updatedSection:v})}function I(e){var n=e.customType,t=e.sectionId,s=e.updatedSection;return(0,i.Z)((0,o.Z)({},n),{json:(0,i.Z)((0,o.Z)({},n.json),(0,r.Z)({},t,s))})}function _(e){var n,t,r=e.id,i=e.label,s=e.repeatable,a=e.format,c=(n=s,t=a,!1===n&&"page"===t?(0,o.Z)({},C,F):!1===n?T:"page"===t?(0,o.Z)({},w,F):k);return{format:a,id:r,json:c,label:i,repeatable:s,status:!0}}var T={Main:{}},C={Main:{slices:{config:{choices:{}},fieldset:"Slice Zone",type:"Slices"}}},k={Main:{uid:{config:{label:"UID"},type:"UID"}}},w={Main:(0,o.Z)({},k.Main,C.Main)},F={"SEO & Metadata":{meta_description:{config:{label:"Meta Description",placeholder:"A brief summary of the page"},type:"Text"},meta_image:{config:{constraint:{height:1260,width:2400},label:"Meta Image",thumbnails:[]},type:"Image"},meta_title:{config:{label:"Meta Title",placeholder:"A title of the page used for social media and search engines"},type:"Text"}}}},54845:function(e,n,t){"use strict";t.d(n,{_:function(){return N}});var r=t(22710),o=t(99267),i=t(52322),s=t(22715),a=t(5632),c=t(2784),l=t(65186),u=t(59326),d=t(75289),f=t(88932),p=t(81038),m=t(78656);function y(){return(y=(0,r.Z)(function(e){var n,t,r,i,s,a;return(0,o.__generator)(this,function(o){switch(o.label){case 0:n=e.customType,t=e.onSuccess,r=m.$[n.format],o.label=1;case 1:return o.trys.push([1,3,,4]),[4,p.j.customTypes.deleteCustomType({id:n.id})];case 2:if((i=o.sent().errors).length>0)throw i;return t(),f.Am.success("".concat(r.name({start:!0,plural:!1})," deleted")),[3,4];case 3:return s=o.sent(),a="Internal Error: ".concat(r.name({start:!0,plural:!1})," could not be deleted"),console.error(a,s),f.Am.error(a),[3,4];case 4:return[2]}})})).apply(this,arguments)}var h=t(34226),v=t(98898),x=t(83399),g=t(90374),b=function(e){var n,t=e.customType,s=e.format,a=e.onClose,f=e.onDeleteCustomTypeSuccess,p=m.$[s],b=(0,c.useState)(!1),Z=b[0],j=b[1],S=(0,g.Z)().deleteCustomTypeSuccess,I=(n=(0,r.Z)(function(){return(0,o.__generator)(this,function(e){switch(e.label){case 0:return j(!0),[4,function(e){return y.apply(this,arguments)}({customType:t,onSuccess:function(){return S(t.id)}})];case 1:return e.sent(),f(),[2]}})}),function(){return n.apply(this,arguments)}),_=(0,u.B7)().theme;return(0,i.jsx)(x.Z,{isOpen:!0,shouldCloseOnOverlayClick:!0,style:{content:{maxWidth:612}},onRequestClose:function(){return a()},children:(0,i.jsx)(v.Z,{bodySx:{p:0,bg:"white",position:"relative",height:"100%",padding:16},footerSx:{position:"sticky",bottom:0,p:0},sx:{border:"none",overflow:"hidden"},borderFooter:!0,Header:function(){var e;return(0,i.jsxs)(d.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",alignItems:"center",justifyContent:"space-between",borderBottom:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.borders))}},children:[(0,i.jsxs)(d.kC,{sx:{alignItems:"center"},children:[(0,i.jsx)(l.$vK,{size:20,color:null===(e=_.colors)||void 0===e?void 0:e.greyIcon}),(0,i.jsxs)(d.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:["Delete"," ",p.name({start:!1,plural:!1})]})]}),(0,i.jsx)(d.x8,{type:"button",onClick:function(){return a()}})]})},Footer:function(){return(0,i.jsxs)(d.kC,{sx:{justifyContent:"flex-end",height:64,alignItems:"center",paddingRight:16,borderTop:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.darkBorders))},backgroundColor:"gray"},children:[(0,i.jsx)(h.z,{label:"Cancel",variant:"secondary",onClick:function(){return a()},sx:{mr:"10px",fontWeight:"bold",color:"grey12",borderRadius:6}}),void 0!==t&&(0,i.jsx)(h.z,{label:"Delete",variant:"danger",isLoading:Z,onClick:function(){I()},sx:{minHeight:39,minWidth:78}})]})},children:(0,i.jsxs)("div",{children:["This action will immediately make the following change:",(0,i.jsx)("ul",{children:(0,i.jsxs)("li",{children:["Delete the"," ",(0,i.jsxs)(d.xv,{sx:{fontWeight:"bold"},children:["customtypes/",null==t?void 0:t.id,"/"]})," ","directory."]})}),"The next time you push your changes to Prismic, the following change will happen:",(0,i.jsx)("ul",{children:(0,i.jsxs)("li",{children:["Remove the"," ",p.name({start:!1,plural:!1})," and any associated Documents from your repository."]})})]})})})},Z=t(62230),j=t(85244),S=t(56580);function I(){return(I=(0,r.Z)(function(e){var n,t,r,i,s,a,c,l;return(0,o.__generator)(this,function(o){switch(o.label){case 0:n=e.model,t=e.newLabel,r=e.onSuccess,i=m.$[n.format],o.label=1;case 1:return o.trys.push([1,3,,4]),s=(0,j.Z)((0,Z.Z)({},n),{label:t}),[4,p.j.customTypes.renameCustomType({model:s})];case 2:if((a=o.sent().errors).length>0)throw a;return r(s),f.Am.success("".concat(i.name({start:!0,plural:!1})," renamed")),[3,4];case 3:return c=o.sent(),l="Internal Error: ".concat(i.name({start:!0,plural:!1})," could not be renamed"),console.error(l,c),f.Am.error(l),[3,4];case 4:return[2]}})})).apply(this,arguments)}var _=t(50950),T=t(28849),C=t(6134),k=t(36960),w=function(e){var n,t,s,a=e.isChangesLocal,l=e.customType,u=e.format,f=e.onClose,p=e.setLocalCustomType,y=null!==(n=null==l?void 0:l.label)&&void 0!==n?n:"",h=null!==(t=null==l?void 0:l.id)&&void 0!==t?t:"",v=(0,g.Z)().renameCustomTypeSuccess,x=(0,_.g)().syncChanges,b=(0,c.useState)(!1),w=b[0],F=b[1],O=(s=(0,r.Z)(function(e){return(0,o.__generator)(this,function(n){switch(n.label){case 0:if(F(!0),!(a&&p))return[3,1];return p((0,j.Z)((0,Z.Z)({},l),{label:e.customTypeName})),[3,3];case 1:return[4,function(e){return I.apply(this,arguments)}({model:l,newLabel:e.customTypeName,onSuccess:function(e){v(e),x()}})];case 2:n.sent(),n.label=3;case 3:return F(!1),f(),[2]}})}),function(e){return s.apply(this,arguments)}),B=(0,S.v9)(function(e){return{customTypeLabels:(0,T.YS)(e)}}).customTypeLabels,L=m.$[u];return(0,i.jsx)(C.Z,{isOpen:!0,testId:"rename-custom-type-modal",widthInPx:"530px",formId:"rename-custom-type-modal-".concat(h),buttonLabel:"Rename",close:f,onSubmit:function(e){O(e)},initialValues:{customTypeName:y},isLoading:w,content:{title:"Rename a ".concat(L.name({start:!1,plural:!1}))},validate:function(e){var n=e.customTypeName,t={};return n&&n.length||(t.customTypeName="Cannot be empty."),void 0!=t.customTypeName&&B.includes(n)&&y!==n&&(t.customTypeName="".concat(L.name({start:!0,plural:!1})," name is already taken.")),Object.keys(t).length>0?t:void 0},children:function(e){var n=e.errors;return(0,i.jsx)(d.xu,{children:(0,i.jsx)(k.W,{name:"customTypeName",label:"".concat(L.name({start:!0,plural:!1})," Name"),placeholder:"A display name for the ".concat(L.name({start:!1,plural:!1})),error:n.customTypeName,testId:"custom-type-name-input"})})}})},F=t(82770),O=t(91061);function B(){return(B=(0,r.Z)(function(e,n){var t,r,i,s,a;return(0,o.__generator)(this,function(o){switch(o.label){case 0:t=m.$[e.format],o.label=1;case 1:return o.trys.push([1,3,,4]),r=(0,O.mf)(e),[4,(0,F.KA)(r)];case 2:if((i=o.sent().errors).length>0)throw i;return n(r),f.Am.success("".concat(t.name({start:!0,plural:!1})," converted to page type")),[3,4];case 3:return s=o.sent(),a="Internal Error: ".concat(t.name({start:!0,plural:!1})," not converted to page type"),console.error(a,s),f.Am.error(a),[3,4];case 4:return[2]}})})).apply(this,arguments)}var L=t(67445),N=function(e){var n,t=e.format,l=e.customType,u=e.isChangesLocal,d=e.setLocalCustomType,f=(0,a.useRouter)(),p=(0,g.Z)().saveCustomTypeSuccess,m=(0,c.useState)(!1),y=m[0],h=m[1],v=(0,c.useState)(!1),x=v[0],Z=v[1],j=(0,c.useState)(!1),S=j[0],I=j[1],_=(n=(0,r.Z)(function(){var e,n;return(0,o.__generator)(this,function(t){switch(t.label){case 0:return I(!0),[4,function(e,n){return B.apply(this,arguments)}(l,p)];case 1:return t.sent(),e=L.cd.custom.getBuilderPagePathname(l.id),f.asPath===e&&(n=L.cd.page.getBuilderPagePathname(l.id),f.replace(n)),I(!1),[2]}})}),function(){return n.apply(this,arguments)}),T=function(){var e,n=L.cd[null!==(e=l.format)&&void 0!==e?e:"custom"].tablePagePathname;f.asPath!==n?f.replace(n):h(!1)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(s.h_,{modal:!0,children:[(0,i.jsx)(s.$F,{disabled:S,children:(0,i.jsx)(s.hU,{color:"grey","data-testid":"editDropdown",hiddenLabel:"Custom type actions",icon:"moreVert",loading:S,variant:"solid"})}),(0,i.jsxs)(s.AW,{align:"end",children:[(0,i.jsx)(s.Xi,{startIcon:(0,i.jsx)(s.I5,{name:"edit"}),onSelect:function(){Z(!0)},children:"Rename"}),"custom"===t&&!u&&(0,i.jsx)(s.Xi,{startIcon:(0,i.jsx)(s.I5,{name:"driveFileMove"}),onSelect:function(){_()},children:"Convert to page type"}),(0,i.jsx)(s.Xi,{color:"tomato",startIcon:(0,i.jsx)(s.I5,{name:"delete"}),onSelect:function(){h(!0)},children:"Remove"})]})]}),y?(0,i.jsx)(b,{format:t,customType:l,onClose:function(){return h(!1)},onDeleteCustomTypeSuccess:T}):null,x?(0,i.jsx)(w,{format:t,customType:l,isChangesLocal:u,onClose:function(){return Z(!1)},setLocalCustomType:d}):null]})}},34226:function(e,n,t){"use strict";t.d(n,{z:function(){return d}});var r=t(62230),o=t(85244),i=t(98240),s=t(52322),a=t(2784),c=t(75289),l=function(e,n){return e?"".concat(e,"-").concat(n):""},u=function(e){switch(e){case"white":case"secondaryMedium":case"secondarySmall":case"secondary":return"#1A1523";default:return"grey01"}},d=(0,a.forwardRef)(function(e,n){var t=e.label,a=e.Icon,d=e.type,f=e.form,p=e.isLoading,m=void 0!==p&&p,y=e.disabled,h=e.onClick,v=e.sx,x=e.iconSize,g=void 0===x?16:x,b=e.iconFill,Z=e.variant,j=void 0===Z?"primary":Z,S=(0,i.Z)(e,["label","Icon","type","form","isLoading","disabled","onClick","sx","iconSize","iconFill","variant"]);return(0,s.jsx)(c.zx,(0,o.Z)((0,r.Z)({ref:n,sx:(0,r.Z)((0,o.Z)((0,r.Z)({},void 0===v?{}:v),{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px"}),m?{cursor:"wait !important"}:{}),type:d,form:f,disabled:void 0!==y&&y||m,onClick:m?void 0:h,variant:j},S),{children:m?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.$j,{size:g,color:u(j),"data-testid":l(S["data-testid"],"spinner")}),a&&t]}):(0,s.jsxs)(s.Fragment,{children:[a&&(0,s.jsx)(a,{size:g,fill:b,"data-testid":l(S["data-testid"],"icon")}),t]})}))})},36960:function(e,n,t){"use strict";t.d(n,{W:function(){return a}});var r=t(62230),o=t(52322),i=t(63397);t(2784);var s=t(75289),a=function(e){var n=e.name,t=e.label,a=e.placeholder,c=e.error,l=e.testId,u=e.onChange;return(0,o.jsxs)(s.xu,{mb:3,children:[(0,o.jsx)(s.__,{htmlFor:n,mb:2,children:t}),(0,o.jsx)(i.gN,(0,r.Z)({name:n,type:"text",placeholder:a,as:s.II,autoComplete:"off"},u?{onChange:u}:null,l?{"data-testid":l}:null)),c?(0,o.jsx)(s.xv,{"data-testid":l?"".concat(l,"-error"):"input-error",sx:{color:"error",mt:1},children:c}):null]})}},6134:function(e,n,t){"use strict";var r=t(62230),o=t(85244),i=t(52322),s=t(63397),a=t(37149),c=t.n(a),l=t(75289),u=t(34226),d=t(83399),f=t(98898);n.Z=function(e){var n=e.children,t=e.close,a=e.isOpen,p=e.formId,m=e.validate,y=e.onSubmit,h=e.widthInPx,v=e.initialValues,x=e.content.title,g=e.cardProps,b=e.omitFooter,Z=void 0!==b&&b,j=e.isLoading,S=void 0!==j&&j,I=e.buttonLabel,_=void 0===I?"Save":I,T=e.testId,C=e.actionMessage;return c().setAppElement("#__next"),(0,i.jsx)(d.Z,{isOpen:a,shouldCloseOnOverlayClick:!0,onRequestClose:t,contentLabel:x,style:{content:{width:null!=h?h:"900px"}},children:(0,i.jsx)(s.J9,{initialValues:v,validate:function(e){return m?m(e):void 0},onSubmit:function(e){y(e)},children:function(e){var a=e.isValid,c=e.isSubmitting,d=e.values,m=e.errors,y=e.touched,h=e.setFieldValue,v=e.setValues;return(0,i.jsx)(s.l0,(0,o.Z)((0,r.Z)({id:p},null!=T?{"data-testid":T}:null),{children:(0,i.jsx)(f.Z,(0,o.Z)((0,r.Z)({borderFooter:!0,footerSx:{p:3,position:"sticky",bottom:0,background:"gray"},bodySx:{px:4,py:4},sx:{border:"none"}},g),{Header:function(e){var n=e.radius;return(0,i.jsxs)(l.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",pl:4,bg:"headSection",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:n,borderTopRightRadius:n,borderBottom:function(e){var n;return"1px solid ".concat(null===(n=e.colors)||void 0===n?void 0:n.borders)}},children:[(0,i.jsx)(l.X6,{sx:{fontSize:"20px"},children:x}),(0,i.jsx)(l.x8,{type:"button",onClick:t})]})},Footer:Z?null:(0,i.jsxs)(l.kC,{sx:{alignItems:"space-between"},children:[(0,i.jsx)(l.kC,{sx:{fontSize:"14px",alignItems:"center"},children:"function"==typeof C?C(e):C}),(0,i.jsxs)(l.kC,{sx:{ml:"auto"},children:[(0,i.jsx)(l.zx,{mr:2,type:"button",onClick:t,variant:"secondary",disabled:c||S,children:"Cancel"}),(0,i.jsx)(u.z,{label:_,form:p,type:"submit",disabled:!a||c||S,isLoading:c||S,sx:{fontWeight:"400",paddingBlock:"8px",paddingInline:"16px",fontSize:"14px",borderRadius:"4px"}})]})]}),children:n({isValid:a,isSubmitting:c,values:d,errors:m,touched:y,setFieldValue:h,setValues:v})}))}))}})})}},29052:function(e){e.exports={column:"BlankSlate_column__ysDb2",root:"BlankSlate_root__DJ7wC BlankSlate_column__ysDb2",fadeIn:"BlankSlate_fadeIn__KMuKu",withBackground:"BlankSlate_withBackground___V5y5",image:"BlankSlate_image__rOe9w BlankSlate_column__ysDb2",content:"BlankSlate_content__wmOAI BlankSlate_column__ysDb2",title:"BlankSlate_title__5oTre",desc:"BlankSlate_desc__f6ZWf",actions:"BlankSlate_actions__6zYZr"}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[614],{24804:function(e,n,t){"use strict";t.d(n,{Zb:function(){return b},T$:function(){return p},eW:function(){return g},ZB:function(){return _},Lm:function(){return x}});var o=t(67557),i=t(62230),r=t(85244),c=t(98240),d=t(52322),s=t(50002),a=t(22715),l=t(6277),u=t(2784);t(88268);var f={solid:"_1ecs97d3c _1ecs97dap _1ecs97d4ug _1ecs97d51t",outlined:"_1ecs97d2i _1ecs97d9v _1ecs97dw _1ecs97d89 _1ecs97d2w _1ecs97da9 _1ecs97d4tm _1ecs97d50z _1ecs97d4t8 _1ecs97d50l"},h={div:"_1ecs97dffi _1ecs97dffl _1ecs97dffv",img:"kedahr9 _1ecs97dfnq _1ecs97dfg5"},v={small:"kedahr2",medium:"kedahr3"},m={solid:"kedahr4 _1ecs97d1u _1ecs97d97 _1ecs97d4ua _1ecs97d51n",outlined:"kedahr5 _1ecs97d18 _1ecs97d8l _1ecs97d4t2 _1ecs97d50f"},b=function(e){var n,t=e.checked,a=e.size,h=e.variant,b=void 0===h?"solid":h,_=(e.interactive,e.disabled,e.onClick,e.href,e.component),p=void 0===_?"a":_,g=(e.replace,(0,c.Z)(e,["checked","size","variant","interactive","disabled","onClick","href","component","replace"])),x=(0,r.Z)((0,i.Z)({},g),{className:(0,l.W)("_1ecs97dffi _1ecs97dffk _1ecs97dfft _1ecs97d3j4 _1ecs97d3qh _1ecs97dfh9 _1ecs97dfil _1ecs97dfiz _1ecs97dffj _1ecs97dfg9 _1ecs97dfgd",v[void 0===a?"medium":a],m[b],(n={},(0,o.Z)(n,"kedahr6",e.interactive),(0,o.Z)(n,f[b],e.interactive),n)),"data-state":!0===(void 0!==t&&t)?"checked":void 0});return!0===e.interactive&&void 0===e.href?(0,d.jsx)("div",(0,r.Z)((0,i.Z)({},x),{"data-disabled":!0===e.disabled?"":void 0,onClick:function(n){if(!0!==e.disabled&&void 0!==e.onClick){var t=n.target;(0,s.JY)(t)===n.currentTarget&&e.onClick(n)}},tabIndex:!0===e.disabled?void 0:0})):!0===e.interactive?(0,u.createElement)(p,(0,i.Z)((0,r.Z)((0,i.Z)({},x),{href:e.href,onClick:function(e){var n=e.target;(0,s.JY)(n)!==e.currentTarget&&e.preventDefault()}}),"a"===p?{}:{replace:e.replace})):(0,d.jsx)("div",(0,i.Z)({},x))},_=function(e){var n=e.className,t=e.component,o=void 0===t?"img":t,s=e.overlay,a=(0,c.Z)(e,["className","component","overlay"]);return(0,d.jsxs)("div",{className:"kedahr7 _1ecs97dffi _1ecs97dffk _1ecs97dfft _1ecs97dffw _1ecs97dffv _1ecs97dfnw _1ecs97dfgd",children:[(0,u.createElement)(o,(0,r.Z)((0,i.Z)({},a),{className:(0,l.W)(h[o],n)})),Boolean(s)?(0,d.jsx)("div",{className:"kedahra _1ecs97dffi _1ecs97dffl _1ecs97dfpw _1ecs97dfgb _1ecs97dfh0",children:s}):void 0]})},p=function(e){return(0,d.jsx)("div",(0,r.Z)((0,i.Z)({},e),{className:"kedahrc kedahrb _1ecs97dffi _1ecs97dffk _1ecs97dffq _1ecs97dffj _1ecs97dffu _1ecs97dfnk _1ecs97dfg0"}))},g=function(e){var n=e.action,t=e.subtitle,o=e.title,s=(0,c.Z)(e,["action","subtitle","title"]);return(0,d.jsxs)("div",(0,r.Z)((0,i.Z)({},s),{className:"kedahrd kedahrb _1ecs97dffi _1ecs97dffk _1ecs97dffq _1ecs97dffj _1ecs97dffu _1ecs97dfpl _1ecs97dfnm",children:[(0,d.jsxs)("div",{className:"kedahre _1ecs97dffi _1ecs97dffk _1ecs97dfft _1ecs97dffw _1ecs97dffv _1ecs97dflk",children:[(0,d.jsx)(a.xv,{component:"span",noWrap:!0,variant:"bold",children:o}),(0,d.jsx)(a.xv,{color:"grey11",component:"span",noWrap:!0,variant:"small",children:t})]}),n]}))},x=function(e){var n=e.children,t=(0,c.Z)(e,["children"]);return(0,d.jsx)("div",(0,r.Z)((0,i.Z)({},t),{className:"kedahrf _1ecs97dffi _1ecs97dffk _1ecs97dfft _1ecs97dfne _1ecs97dfro _1ecs97dffz _1ecs97dfy1 _1ecs97dfgb",children:(0,d.jsx)(a.xv,{align:"center",color:"inherit",component:"span",noWrap:!0,variant:"smallBold",children:n})}))}},34728:function(e,n,t){"use strict";t.d(n,{O:function(){return d}});var o=t(52322),i=t(22715),r=t(94007),c=t(79096),d=function(e){var n=function(e){var n=s[e.modelType];switch(e.modelStatus){case r.GJ.New:return{badgeColor:"green",badgeTitle:"New",tooltipContent:"This ".concat(n," exists only locally. Upon sync, it will be pushed to your remote repository.")};case r.GJ.Modified:return{badgeColor:"amber",badgeTitle:"Modified",tooltipContent:"This ".concat(n," has been modified locally. Upon sync, changes will be pushed to your remote repository.")};case r.GJ.Synced:return{badgeColor:"purple",badgeTitle:"Synced",tooltipContent:"This ".concat(n," is in sync with the remote repository.")};case r.GJ.Deleted:return{badgeColor:"tomato",badgeTitle:"Deleted",tooltipContent:"This ".concat(n," has been deleted locally.")};case r.GJ.Unknown:if(!e.isOnline)return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (no internet connection)."};if(e.authStatus===c.t.UNAUTHORIZED)return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (not connected to Prismic)."};if(e.authStatus===c.t.FORBIDDEN)return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (you don't have access to the repository)."};default:return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (unknown error)."}}}(e),t=n.badgeColor,d=n.badgeTitle,a=n.tooltipContent;return(0,o.jsx)(i.u,{content:a,side:"bottom",children:(0,o.jsx)(i.Ct,{color:t,title:d})})},s={CustomType:"type",Slice:"slice"}},56319:function(e,n,t){"use strict";t.d(n,{b:function(){return _}});var o=t(62230),i=t(85244),r=t(52322),c=t(22715),d=t(39097),s=t.n(d),a=t(24804),l=t(5479),u=t(34728),f=t(49451),h=function(e){return(0,r.jsx)("svg",(0,i.Z)((0,o.Z)({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 5.5C4 4.67157 4.67157 4 5.5 4H18.5C19.3284 4 20 4.67157 20 5.5V12.4413C20 12.4512 19.9997 12.461 19.9991 12.4707C20.0072 12.6083 19.9586 12.7485 19.8536 12.8536C19.6583 13.0488 19.3417 13.0488 19.1464 12.8536L16.3536 10.0607C16.1583 9.8654 15.8417 9.8654 15.6464 10.0607L11.8536 13.8536C11.6583 14.0488 11.3417 14.0488 11.1464 13.8536L9.35355 12.0607C9.15829 11.8654 8.84171 11.8654 8.64645 12.0607L5 15.7071V18.5C5 18.7761 5.22386 19 5.5 19H12.5C12.7761 19 13 19.2239 13 19.5C13 19.7761 12.7761 20 12.5 20H5.5C4.67157 20 4 19.3284 4 18.5V15.5003V15.4997V5.5ZM11.5 12.7929L14.9393 9.35355C15.5251 8.76777 16.4749 8.76777 17.0607 9.35355L19 11.2929V5.5C19 5.22386 18.7761 5 18.5 5H5.5C5.22386 5 5 5.22386 5 5.5V14.2929L7.93934 11.3536C8.52513 10.7678 9.47487 10.7678 10.0607 11.3536L11.5 12.7929ZM16.5 13C16.7761 13 17 13.2239 17 13.5V16H19.5C19.7761 16 20 16.2239 20 16.5C20 16.7761 19.7761 17 19.5 17H17V19.5C17 19.7761 16.7761 20 16.5 20C16.2239 20 16 19.7761 16 19.5V17H13.5C13.2239 17 13 16.7761 13 16.5C13 16.2239 13.2239 16 13.5 16H16V13.5C16 13.2239 16.2239 13 16.5 13Z",fill:"currentColor"})}))},v=t(67557),m=t(17064),b={build:function(e){var n;return(0,i.Z)((0,o.Z)({},e),{screenshots:(n=e.screenshots)?Object.entries(n).reduce(function(e,n){var t,r=(0,m.Z)(n,2),c=r[0],d=r[1];return d.hash?(0,i.Z)((0,o.Z)({},e),(0,v.Z)({},c,(0,o.Z)({},d,{hash:d.hash}))):e},{}):{}})},variation:function(e,n){if(e.model.variations.length)return n?e.model.variations.find(function(e){return e.id===n}):e.model.variations[0]}},_=function(e){var n,t=e.action,d=e.isComingSoon,v=void 0!==d&&d,m=e.isDeleted,_=e.onUpdateScreenshot,x=e.selected,C=void 0!==x&&x,j=e.slice,k=e.variant,Z=e.variationId,y=b.variation(j,Z);if(!y)return null;var S=(0,l.d7)(j,y),w=v||void 0!==m&&m,T=!w&&!!_,N="outlined"===k,R=void 0!==Z;return n="selection"===e.mode?{disabled:w,interactive:!0,onClick:function(){e.onSelectedChange(!C)}}:w?{interactive:!1}:{component:s(),href:f.Y.getBuilderPagePathname({libraryName:j.href,sliceName:j.model.name,variationId:y.id}),interactive:!0,replace:e.replace},(0,r.jsxs)(a.Zb,(0,i.Z)((0,o.Z)({"aria-label":"".concat(j.model.name," ").concat(y.name," slice card"),checked:C,"data-testid":"shared-slice-card"},n,"outlined"===k?{size:"small",variant:"outlined"}:{}),{children:[void 0!==S?(0,r.jsx)(a.ZB,{alt:"Preview image",overlay:T&&!N?(0,r.jsx)(c.xu,{alignItems:"center",justifyContent:"center",children:(0,r.jsx)(p,{onClick:_})}):void 0,src:S}):(0,r.jsx)(a.ZB,{component:"div",children:(0,r.jsxs)(c.xu,{alignItems:"center",flexDirection:"column",gap:8,justifyContent:"center",children:[(0,r.jsx)(c.xv,{color:"grey11",component:"span",children:"No screenshot available"}),T&&!N?(0,r.jsx)(p,{onClick:_}):void 0]})}),(0,r.jsx)(a.eW,{action:"checkbox"===t.type&&"selection"===e.mode?(0,r.jsx)("div",{onClick:function(e){return e.stopPropagation()},children:(0,r.jsx)(c.XZ,{checked:C,disabled:w,onCheckedChange:e.onSelectedChange})}):"menu"===t.type?(0,r.jsxs)(c.h_,{modal:!0,children:[(0,r.jsx)(c.$F,{disabled:w,children:(0,r.jsx)(c.hU,{hiddenLabel:"Slice actions",icon:"moreVert"})}),(0,r.jsxs)(c.AW,{align:"end","data-testid":"slice-action-icon-dropdown",children:[T&&N?(0,r.jsx)(c.Xi,{onSelect:_,startIcon:(0,r.jsx)(h,{}),children:"Update screenshot"}):void 0,(0,r.jsx)(c.Xi,{onSelect:t.onRename,startIcon:(0,r.jsx)(c.I5,{name:"edit"}),children:"Rename"}),!0===t.removeDisabled&&R?(0,r.jsx)(c.u,{content:"The slice needs to have at least one variation.",side:"bottom",stableMount:!0,children:(0,r.jsx)(g,{disabled:!0,onSelect:t.onRemove})}):(0,r.jsx)(g,{disabled:!0===t.removeDisabled,onSelect:t.onRemove})]})]}):"remove"===t.type?(0,r.jsx)(c.hU,{icon:"close",onClick:function(){return!w&&t.onRemove()},hiddenLabel:"Remove slice"}):"status"===t.type?(0,r.jsx)(u.O,{authStatus:t.authStatus,isOnline:t.isOnline,modelStatus:t.modelStatus,modelType:"Slice"}):void 0,subtitle:(0,r.jsxs)(r.Fragment,{children:[R?y.id:"".concat(j.model.variations.length," variation").concat(j.model.variations.length>1?"s":""),v?(0,r.jsxs)(c.xv,{color:"purple11",component:"span",variant:"small",children:[" ","• (coming soon)"]}):void 0]}),title:R?y.name:j.model.name}),T&&!R&&(0,l.cx)(j)>0?(0,r.jsx)(a.Lm,{children:"Missing screenshot"}):void 0]}))},p=function(e){return(0,r.jsx)(c.zx,{onClick:e.onClick,renderStartIcon:function(){return(0,r.jsx)(h,{color:c.TV.color.greyLight11})},color:"grey",children:"Update screenshot"})},g=function(e){return(0,r.jsx)(c.Xi,(0,i.Z)((0,o.Z)({},e),{color:"tomato",startIcon:(0,r.jsx)(c.I5,{name:"delete"}),children:"Delete"}))}},49451:function(e,n,t){"use strict";t.d(n,{Y:function(){return o}});var o={getBuilderPagePathname:function(e){return"/slices/".concat(e.libraryName.replaceAll("/","--"),"/").concat(e.sliceName,"/").concat(e.variationId)}}},98898:function(e,n,t){"use strict";t.d(n,{Z:function(){return a}});var o=t(62230),i=t(85244),r=t(98240),c=t(52322);t(2784);var d=t(75289),s=function(e){var n=e.bg,t=e.background,i=e.sx,r=e.withRadius,s=e.radius,a=e.children;return(0,c.jsx)(d.xu,{sx:(0,o.Z)({p:4,bg:n||t},r?{borderBottomLeftRadius:s,borderBottomRightRadius:s}:null,i),children:a})},a=function(e){var n=e.Header,t=void 0===n?null:n,a=e.SubHeader,l=void 0===a?null:a,u=e.Body,f=void 0===u?null:u,h=e.Footer,v=void 0===h?null:h,m=e.borderFooter,b=e.radius,_=void 0===b?"6px":b,p=e.bodySx,g=e.footerSx,x=e.sx,C=e.bg,j=e.background,k=e.children,Z=(0,r.Z)(e,["Header","SubHeader","Body","Footer","borderFooter","radius","bodySx","footerSx","sx","bg","background","children"]);return(0,c.jsxs)(d.Zb,(0,i.Z)((0,o.Z)({sx:(0,o.Z)({border:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.borders))},borderRadius:_},void 0===x?null:x)},Z),{children:[t?(0,c.jsx)(t,{radius:_}):null,l?(0,c.jsx)(l,{radius:_}):null,(0,c.jsxs)(s,{bg:C,background:j,sx:void 0===p?{}:p,withRadius:!v,children:[f?(0,c.jsx)(f,{}):null,k||null]}),v?(0,c.jsx)(s,{bg:C,background:j,sx:(0,o.Z)({},void 0!==m&&m?{borderTop:function(e){var n=e.colors;return"1px solid ".concat(String(null==n?void 0:n.borders))}}:null,void 0===g?{}:g),radius:_,withRadius:!0,children:"object"==typeof v?v:(0,c.jsx)(v,{})}):null]}))}},63094:function(e,n,t){"use strict";t.d(n,{Sn:function(){return d},lS:function(){return o},nG:function(){return i},pq:function(){return s},rd:function(){return c},xo:function(){return r}});var o=["components"],i=["png","jpg","jpeg"],r=/^[A-Za-z0-9]+(?:_[A-Za-z0-9]+)*$/,c="placeholders/What_are_Slices_mrvome",d="SM_HELP_VIDEOS/mock_data",s="slice-machine-simulator"},88268:function(){}}]);