sanity 6.14.0 → 6.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{AddonDatasetProvider-0aiLWkZg.js → AddonDatasetProvider-C9tdum2G.js} +2 -2
- package/lib/{AddonDatasetProvider-0aiLWkZg.js.map → AddonDatasetProvider-C9tdum2G.js.map} +1 -1
- package/lib/{CalendarFilter-DVz369RP.js → CalendarFilter-C80uOkw-.js} +3 -3
- package/lib/{CalendarFilter-DVz369RP.js.map → CalendarFilter-C80uOkw-.js.map} +1 -1
- package/lib/{CommandList-CTDV_QZY.js → CommandList-duj-LVnd.js} +2 -2
- package/lib/{CommandList-CTDV_QZY.js.map → CommandList-duj-LVnd.js.map} +1 -1
- package/lib/{CommentInput-B5T1Iwnt.js → CommentInput-BXYQnGhq.js} +5 -5
- package/lib/{CommentInput-B5T1Iwnt.js.map → CommentInput-BXYQnGhq.js.map} +1 -1
- package/lib/{CommentsDocumentLayout-ByFwej_y.js → CommentsDocumentLayout-DAwAhx7q.js} +2 -2
- package/lib/{CommentsDocumentLayout-ByFwej_y.js.map → CommentsDocumentLayout-DAwAhx7q.js.map} +1 -1
- package/lib/{CommentsDocumentLayout-Czb6fC0_.js → CommentsDocumentLayout-pfM29WSy.js} +2 -2
- package/lib/{CommentsDocumentLayout-Czb6fC0_.js.map → CommentsDocumentLayout-pfM29WSy.js.map} +1 -1
- package/lib/{CommentsEnabledProvider-D2gutvsb.js → CommentsEnabledProvider-DN_oXwXM.js} +3 -3
- package/lib/{CommentsEnabledProvider-D2gutvsb.js.map → CommentsEnabledProvider-DN_oXwXM.js.map} +1 -1
- package/lib/{CommentsField-D2Fum0Jx.js → CommentsField-B7wTBRMB.js} +5 -5
- package/lib/{CommentsField-D2Fum0Jx.js.map → CommentsField-B7wTBRMB.js.map} +1 -1
- package/lib/{CommentsField-YM3cp3fA.js → CommentsField-BxoVuJOl.js} +4 -4
- package/lib/{CommentsField-YM3cp3fA.js.map → CommentsField-BxoVuJOl.js.map} +1 -1
- package/lib/{CommentsInput-Bx2t5AW_.js → CommentsInput-C3rEb5L8.js} +6 -6
- package/lib/{CommentsInput-Bx2t5AW_.js.map → CommentsInput-C3rEb5L8.js.map} +1 -1
- package/lib/{CommentsInput-BBBng3CJ.js → CommentsInput-CU-PFXmu.js} +7 -7
- package/lib/{CommentsInput-BBBng3CJ.js.map → CommentsInput-CU-PFXmu.js.map} +1 -1
- package/lib/{CommentsInspector-BnSG5Mq0.js → CommentsInspector-BJ1qwj6P.js} +6 -6
- package/lib/{CommentsInspector-BnSG5Mq0.js.map → CommentsInspector-BJ1qwj6P.js.map} +1 -1
- package/lib/{CommentsInspector-B5V_Bpz5.js → CommentsInspector-BQiMPjvm.js} +6 -6
- package/lib/{CommentsInspector-B5V_Bpz5.js.map → CommentsInspector-BQiMPjvm.js.map} +1 -1
- package/lib/{CommentsListItem-DnqAlN4p.js → CommentsListItem-QyYan1DB.js} +5 -5
- package/lib/{CommentsListItem-DnqAlN4p.js.map → CommentsListItem-QyYan1DB.js.map} +1 -1
- package/lib/{CommentsListItem-DVE4IMls.js → CommentsListItem-dvKmANi3.js} +4 -4
- package/lib/{CommentsListItem-DVE4IMls.js.map → CommentsListItem-dvKmANi3.js.map} +1 -1
- package/lib/{CommentsSelectedPathProvider-DRJ3Xqs4.js → CommentsSelectedPathProvider-COcPb3W3.js} +3 -3
- package/lib/{CommentsSelectedPathProvider-DRJ3Xqs4.js.map → CommentsSelectedPathProvider-COcPb3W3.js.map} +1 -1
- package/lib/{CommentsStudioLayout-Di510XhD.js → CommentsStudioLayout-BkX6o14w.js} +3 -3
- package/lib/{CommentsStudioLayout-Di510XhD.js.map → CommentsStudioLayout-BkX6o14w.js.map} +1 -1
- package/lib/{CommentsStudioLayout-Z09s50bM.js → CommentsStudioLayout-dIXEz52s.js} +3 -3
- package/lib/{CommentsStudioLayout-Z09s50bM.js.map → CommentsStudioLayout-dIXEz52s.js.map} +1 -1
- package/lib/{GlobalPerspectiveMenu-Cwur4_iD.js → GlobalPerspectiveMenu-0Hs276Z-.js} +15 -15
- package/lib/{GlobalPerspectiveMenu-Cwur4_iD.js.map → GlobalPerspectiveMenu-0Hs276Z-.js.map} +1 -1
- package/lib/{LoadingBlock-Ch_dBXfn.js → LoadingBlock-CElIdb7F.js} +3 -3
- package/lib/{LoadingBlock-Ch_dBXfn.js.map → LoadingBlock-CElIdb7F.js.map} +1 -1
- package/lib/{PerspectiveProvider-Yk7lgugx.js → PerspectiveProvider-D-6sweQH.js} +130 -97
- package/lib/PerspectiveProvider-D-6sweQH.js.map +1 -0
- package/lib/{ReleaseAvatar-C68bGuVQ.js → ReleaseAvatar-Bqp_Ci7r.js} +4 -4
- package/lib/{ReleaseAvatar-C68bGuVQ.js.map → ReleaseAvatar-Bqp_Ci7r.js.map} +1 -1
- package/lib/{ReleasesMetadataProvider-DabLuMD8.js → ReleasesMetadataProvider-BD6XRcpT.js} +2 -2
- package/lib/{ReleasesMetadataProvider-DabLuMD8.js.map → ReleasesMetadataProvider-BD6XRcpT.js.map} +1 -1
- package/lib/{ReleasesStudioLayout-DsygG30q.js → ReleasesStudioLayout-C6mmxoaY.js} +7 -7
- package/lib/{ReleasesStudioLayout-DsygG30q.js.map → ReleasesStudioLayout-C6mmxoaY.js.map} +1 -1
- package/lib/{ReleasesTool-CNXNODI_.js → ReleasesTool-DIDmkzic.js} +23 -23
- package/lib/{ReleasesTool-CNXNODI_.js.map → ReleasesTool-DIDmkzic.js.map} +1 -1
- package/lib/{SchedulePublishingStudioLayout-EsgEGZ7F.js → SchedulePublishingStudioLayout-DrZO-qbI.js} +3 -3
- package/lib/{SchedulePublishingStudioLayout-EsgEGZ7F.js.map → SchedulePublishingStudioLayout-DrZO-qbI.js.map} +1 -1
- package/lib/{SchedulePublishingUpsellProvider-CWxgqzFp.js → SchedulePublishingUpsellProvider-DeZ_jZIX.js} +2 -2
- package/lib/{SchedulePublishingUpsellProvider-CWxgqzFp.js.map → SchedulePublishingUpsellProvider-DeZ_jZIX.js.map} +1 -1
- package/lib/{ScheduledPublishingEnabledProvider-CQ-T1Y96.js → ScheduledPublishingEnabledProvider-B8C0_tc5.js} +3 -3
- package/lib/{ScheduledPublishingEnabledProvider-CQ-T1Y96.js.map → ScheduledPublishingEnabledProvider-B8C0_tc5.js.map} +1 -1
- package/lib/{SearchProvider-CEXmRg1N.js → SearchProvider-T8fsDJV5.js} +8 -8
- package/lib/{SearchProvider-CEXmRg1N.js.map → SearchProvider-T8fsDJV5.js.map} +1 -1
- package/lib/{SingleDocReleaseLayout-ByDXFS8N.js → SingleDocReleaseLayout-BpMXU9KY.js} +2 -2
- package/lib/{SingleDocReleaseLayout-ByDXFS8N.js.map → SingleDocReleaseLayout-BpMXU9KY.js.map} +1 -1
- package/lib/{SingleDocReleaseUpsellProvider-ByuDpBIG.js → SingleDocReleaseUpsellProvider-7_OXHySY.js} +3 -3
- package/lib/{SingleDocReleaseUpsellProvider-ByuDpBIG.js.map → SingleDocReleaseUpsellProvider-7_OXHySY.js.map} +1 -1
- package/lib/{TasksFooterOpenTasks-BSO8TgVF.js → TasksFooterOpenTasks-IFtOEGnB.js} +2 -2
- package/lib/{TasksFooterOpenTasks-BSO8TgVF.js.map → TasksFooterOpenTasks-IFtOEGnB.js.map} +1 -1
- package/lib/{TasksStudioActiveToolLayout-BXktrH08.js → TasksStudioActiveToolLayout-C99LQz4S.js} +20 -20
- package/lib/{TasksStudioActiveToolLayout-BXktrH08.js.map → TasksStudioActiveToolLayout-C99LQz4S.js.map} +1 -1
- package/lib/{TasksStudioLayout-BfN-M93c.js → TasksStudioLayout-CmFbUpnB.js} +4 -4
- package/lib/{TasksStudioLayout-BfN-M93c.js.map → TasksStudioLayout-CmFbUpnB.js.map} +1 -1
- package/lib/{TasksStudioNavbar-CfqloSfP.js → TasksStudioNavbar-DB7DJC4e.js} +2 -2
- package/lib/{TasksStudioNavbar-CfqloSfP.js.map → TasksStudioNavbar-DB7DJC4e.js.map} +1 -1
- package/lib/{TimeZoneButton-FCwCyJ1J.js → TimeZoneButton-B_ki5v8q.js} +7 -7
- package/lib/{TimeZoneButton-FCwCyJ1J.js.map → TimeZoneButton-B_ki5v8q.js.map} +1 -1
- package/lib/{Tool-PzN5dskE.js → Tool-DlkZrcrD.js} +15 -15
- package/lib/{Tool-PzN5dskE.js.map → Tool-DlkZrcrD.js.map} +1 -1
- package/lib/{UpsellPanel-T-5ZD_7k.js → UpsellPanel-ITWwjktp.js} +2 -2
- package/lib/{UpsellPanel-T-5ZD_7k.js.map → UpsellPanel-ITWwjktp.js.map} +1 -1
- package/lib/{VariantsStudioNavbar-D0XbvL1D.js → VariantsStudioNavbar-DwEV1roH.js} +9 -9
- package/lib/{VariantsStudioNavbar-D0XbvL1D.js.map → VariantsStudioNavbar-DwEV1roH.js.map} +1 -1
- package/lib/{VariantsTool-B3EEDrQT.js → VariantsTool-Dzhy3PST.js} +12 -12
- package/lib/{VariantsTool-B3EEDrQT.js.map → VariantsTool-Dzhy3PST.js.map} +1 -1
- package/lib/{WorkspaceLoader-BH_VDaY4.js → WorkspaceLoader-Ck4TMoR5.js} +31 -31
- package/lib/{WorkspaceLoader-BH_VDaY4.js.map → WorkspaceLoader-Ck4TMoR5.js.map} +1 -1
- package/lib/_createContext.js +1 -1
- package/lib/_unstable-embedded.js +5 -5
- package/lib/{buildRangeDecorationSelectionsFromComments-B1-tJPvG.js → buildRangeDecorationSelectionsFromComments-BnlhrvDK.js} +3 -3
- package/lib/{buildRangeDecorationSelectionsFromComments-B1-tJPvG.js.map → buildRangeDecorationSelectionsFromComments-BnlhrvDK.js.map} +1 -1
- package/lib/{buildTextSelectionFromFragment-BiLg851R.js → buildTextSelectionFromFragment-BXrYd9lr.js} +3 -3
- package/lib/{buildTextSelectionFromFragment-BiLg851R.js.map → buildTextSelectionFromFragment-BXrYd9lr.js.map} +1 -1
- package/lib/{constants-DdgHySkY.js → constants-BQItnHll.js} +2 -2
- package/lib/{constants-DdgHySkY.js.map → constants-BQItnHll.js.map} +1 -1
- package/lib/{datastores-D1tF4HQA.js → datastores-DNOJm1LF.js} +2 -2
- package/lib/{datastores-D1tF4HQA.js.map → datastores-DNOJm1LF.js.map} +1 -1
- package/lib/{i18n-Cl_y4bbR.js → i18n-JUYUb7y_.js} +2 -2
- package/lib/{i18n-Cl_y4bbR.js.map → i18n-JUYUb7y_.js.map} +1 -1
- package/lib/index.js +38 -38
- package/lib/{inputResolver-CUWPjdGU.js → inputResolver-Ce1lTBE-.js} +4 -4
- package/lib/{inputResolver-CUWPjdGU.js.map → inputResolver-Ce1lTBE-.js.map} +1 -1
- package/lib/{navigation.telemetry-rXclq03x.js → navigation.telemetry-BPxX2IEN.js} +10 -10
- package/lib/{navigation.telemetry-rXclq03x.js.map → navigation.telemetry-BPxX2IEN.js.map} +1 -1
- package/lib/{plugin-CSp8hwQE.js → plugin-Bvxhb5ko.js} +8 -8
- package/lib/{plugin-CSp8hwQE.js.map → plugin-Bvxhb5ko.js.map} +1 -1
- package/lib/{plugin-Daxe5hwG.js → plugin-Cv6TLYbE.js} +6 -6
- package/lib/{plugin-Daxe5hwG.js.map → plugin-Cv6TLYbE.js.map} +1 -1
- package/lib/{plugin-BFTpdKKH.js → plugin-D6-7jrXf.js} +3 -3
- package/lib/{plugin-BFTpdKKH.js.map → plugin-D6-7jrXf.js.map} +1 -1
- package/lib/{plugin-dtgDcBsL.js → plugin-D_GVPwTR.js} +6 -6
- package/lib/{plugin-dtgDcBsL.js.map → plugin-D_GVPwTR.js.map} +1 -1
- package/lib/{releases.telemetry-B6tRA9U2.js → releases.telemetry-BAO7xaO7.js} +6 -6
- package/lib/{releases.telemetry-B6tRA9U2.js.map → releases.telemetry-BAO7xaO7.js.map} +1 -1
- package/lib/{resources-BjljYbUa.js → resources-Bw1bpPhG.js} +2 -2
- package/lib/{resources-BjljYbUa.js.map → resources-Bw1bpPhG.js.map} +1 -1
- package/lib/{resources-DYxnNjS8.js → resources-CC1qBsSO.js} +2 -2
- package/lib/{resources-DYxnNjS8.js.map → resources-CC1qBsSO.js.map} +1 -1
- package/lib/{resources-D7Mp6N-8.js → resources-CH42UqhC.js} +2 -2
- package/lib/{resources-D7Mp6N-8.js.map → resources-CH42UqhC.js.map} +1 -1
- package/lib/{resources-GpX0LblP.js → resources-Cq1lXH8T.js} +2 -2
- package/lib/{resources-GpX0LblP.js.map → resources-Cq1lXH8T.js.map} +1 -1
- package/lib/{resources-B7mfG9Km.js → resources-D7XsFe7y.js} +2 -2
- package/lib/{resources-B7mfG9Km.js.map → resources-D7XsFe7y.js.map} +1 -1
- package/lib/{resources-CmmAynkL.js → resources-DYn0yzEW.js} +2 -2
- package/lib/{resources-CmmAynkL.js.map → resources-DYn0yzEW.js.map} +1 -1
- package/lib/{resources-C79qQva3.js → resources-TsgtFPi7.js} +2 -2
- package/lib/{resources-C79qQva3.js.map → resources-TsgtFPi7.js.map} +1 -1
- package/lib/{scheduleItem-Bdvl81Kb.js → scheduleItem-5fXCZgfo.js} +13 -13
- package/lib/{scheduleItem-Bdvl81Kb.js.map → scheduleItem-5fXCZgfo.js.map} +1 -1
- package/lib/{schedules-D7bPbTPm.js → schedules-BsE0_g47.js} +3 -3
- package/lib/{schedules-D7bPbTPm.js.map → schedules-BsE0_g47.js.map} +1 -1
- package/lib/{searchDocumentRelease-v1o9dMnE.js → searchDocumentRelease-Bang3A8l.js} +5 -5
- package/lib/{searchDocumentRelease-v1o9dMnE.js.map → searchDocumentRelease-Bang3A8l.js.map} +1 -1
- package/lib/{studioClient-EJDu6kOb.js → studioClient-C7B6Aobi.js} +2 -2
- package/lib/{studioClient-EJDu6kOb.js.map → studioClient-C7B6Aobi.js.map} +1 -1
- package/lib/{useActiveReleases-Bh_Q6f7G.js → useActiveReleases-DxYjyTB1.js} +5 -5
- package/lib/{useActiveReleases-Bh_Q6f7G.js.map → useActiveReleases-DxYjyTB1.js.map} +1 -1
- package/lib/{useBundleDocuments-zP6JiTzz.js → useBundleDocuments-2YaaN-2l.js} +3 -3
- package/lib/{useBundleDocuments-zP6JiTzz.js.map → useBundleDocuments-2YaaN-2l.js.map} +1 -1
- package/lib/{useComments-BGOJwUe0.js → useComments-DWh1k0kS.js} +5 -5
- package/lib/{useComments-BGOJwUe0.js.map → useComments-DWh1k0kS.js.map} +1 -1
- package/lib/{useCommentsTelemetry-BMkf6MTO.js → useCommentsTelemetry-BbJ8lTKN.js} +4 -4
- package/lib/{useCommentsTelemetry-BMkf6MTO.js.map → useCommentsTelemetry-BbJ8lTKN.js.map} +1 -1
- package/lib/{useDocumentPreviewValues-CryTvfKc.js → useDocumentPreviewValues-CK5VteK3.js} +4 -4
- package/lib/{useDocumentPreviewValues-CryTvfKc.js.map → useDocumentPreviewValues-CK5VteK3.js.map} +1 -1
- package/lib/{useFieldActions-BTj7VsW5.js → useFieldActions-BmY1Kh3s.js} +2 -2
- package/lib/{useFieldActions-BTj7VsW5.js.map → useFieldActions-BmY1Kh3s.js.map} +1 -1
- package/lib/{useProjectId-BN6GCdwS.js → useProjectId-C8pZxybz.js} +2 -2
- package/lib/{useProjectId-BN6GCdwS.js.map → useProjectId-C8pZxybz.js.map} +1 -1
- package/lib/{useReleasesToolAvailable-CQ9-I8Tt.js → useReleasesToolAvailable-DjaSujLo.js} +3 -3
- package/lib/{useReleasesToolAvailable-CQ9-I8Tt.js.map → useReleasesToolAvailable-DjaSujLo.js.map} +1 -1
- package/lib/{useScheduledDraftMenuActions-OSkdxONo.js → useScheduledDraftMenuActions-DSJU6xQa.js} +9 -9
- package/lib/{useScheduledDraftMenuActions-OSkdxONo.js.map → useScheduledDraftMenuActions-DSJU6xQa.js.map} +1 -1
- package/lib/{useStudioUrl-DUBI_S4K.js → useStudioUrl-DcTGV00c.js} +5 -5
- package/lib/{useStudioUrl-DUBI_S4K.js.map → useStudioUrl-DcTGV00c.js.map} +1 -1
- package/lib/{useTasksNavigation-fohCXW6l.js → useTasksNavigation-tAXFJd2V.js} +2 -2
- package/lib/{useTasksNavigation-fohCXW6l.js.map → useTasksNavigation-tAXFJd2V.js.map} +1 -1
- package/lib/{useTimeZone-DM8ZmUO2.js → useTimeZone-Dj7C8tfZ.js} +2 -2
- package/lib/{useTimeZone-DM8ZmUO2.js.map → useTimeZone-Dj7C8tfZ.js.map} +1 -1
- package/lib/{utils-D-4rueJZ.js → utils-CT034e4q.js} +3 -3
- package/lib/{utils-D-4rueJZ.js.map → utils-CT034e4q.js.map} +1 -1
- package/lib/{validationUtils-jTd1rxfY.js → validationUtils-BZPoHEYN.js} +4 -4
- package/lib/{validationUtils-jTd1rxfY.js.map → validationUtils-BZPoHEYN.js.map} +1 -1
- package/lib/{version-D0Vx4cX1.js → version-BDSMcNU7.js} +2 -2
- package/lib/{version-D0Vx4cX1.js.map → version-BDSMcNU7.js.map} +1 -1
- package/package.json +17 -17
- package/lib/PerspectiveProvider-Yk7lgugx.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduleItem-Bdvl81Kb.js","names":["<input style={{opacity: 0, position: 'absolute', width: 0}} tabIndex={-1} type=\"button\" />","{marginTop: '-1em', marginBottom: '-1em'}","t('time-zone.time-zone-tooltip-scheduled-publishing', {\n alternativeName: timeZone.alternativeName,\n offset: timeZone.offset,\n })","alternativeName","offset","<Box marginLeft={2} style={{marginTop: '-1em', marginBottom: '-1em'}}>\n <TimeZoneButton\n tooltipContent={t('time-zone.time-zone-tooltip-scheduled-publishing', {\n alternativeName: timeZone.alternativeName,\n offset: timeZone.offset,\n })}\n timeZoneScope={timeZoneScope}\n useElementQueries\n />\n </Box>","<TimeZoneButtonElementQuery>\n <Flex alignItems=\"center\">\n {title}\n {/*\n HACK: Sanity UI will attempt to focus the first 'focusable' descendant of any dialog.\n Typically this is fine, but since our first focusable element is a button with a tooltip, this\n default behaviour causes the tooltip to appear whenever the dialog is opened, which we don't want!\n\n To get around this, we include a pseudo-hidden input to ensure our tooltip-enabled button remains\n unfocused on initial mount.\n */}\n <input style={{opacity: 0, position: 'absolute', width: 0}} tabIndex={-1} type=\"button\" />\n <Box marginLeft={2} style={{marginTop: '-1em', marginBottom: '-1em'}}>\n <TimeZoneButton\n tooltipContent={t('time-zone.time-zone-tooltip-scheduled-publishing', {\n alternativeName: timeZone.alternativeName,\n offset: timeZone.offset,\n })}\n timeZoneScope={timeZoneScope}\n useElementQueries\n />\n </Box>\n </Flex>\n </TimeZoneButtonElementQuery>","useMemo(() => {\n if (!customValidation) {\n return true\n }\n return customValidation(endOfDay(date))\n }, [date, customValidation])","customValidation(endOfDay(date))","() => {\n if (isValid) {\n onSelect(date)\n }\n }","useCallback(() => {\n if (isValid) {\n onSelect(date)\n }\n }, [date, isValid, onSelect])","date.toDateString()","{textAlign: 'center'}","date.getDate()","<Text\n muted={!selected && !isCurrentMonth}\n style={{textAlign: 'center'}}\n weight={isCurrentMonth ? 'medium' : 'regular'}\n >\n {date.getDate()}\n </Text>","!selected && !isCurrentMonth","isCurrentMonth ? 'medium' : 'regular'","<Card\n aria-label={date.toDateString()}\n aria-pressed={selected}\n as=\"button\"\n __unstable_focusRing\n data-weekday\n data-focused={focused ? 'true' : ''}\n disabled={!isValid}\n role=\"button\"\n tabIndex={-1}\n onClick={handleClick}\n padding={3}\n radius={2}\n selected={selected}\n tone={isToday || selected ? 'primary' : 'default'}\n >\n <Text\n muted={!selected && !isCurrentMonth}\n style={{textAlign: 'center'}}\n weight={isCurrentMonth ? 'medium' : 'regular'}\n >\n {date.getDate()}\n </Text>\n </Card>","focused ? 'true' : ''","!isValid","isToday || selected ? 'primary' : 'default'","<div aria-selected={selected} data-ui=\"CalendarDay\">\n <Card\n aria-label={date.toDateString()}\n aria-pressed={selected}\n as=\"button\"\n __unstable_focusRing\n data-weekday\n data-focused={focused ? 'true' : ''}\n disabled={!isValid}\n role=\"button\"\n tabIndex={-1}\n onClick={handleClick}\n padding={3}\n radius={2}\n selected={selected}\n tone={isToday || selected ? 'primary' : 'default'}\n >\n <Text\n muted={!selected && !isCurrentMonth}\n style={{textAlign: 'center'}}\n weight={isCurrentMonth ? 'medium' : 'regular'}\n >\n {date.getDate()}\n </Text>\n </Card>\n </div>","{gridTemplateColumns: 'repeat(7, minmax(44px, 46px))'}","WEEK_DAY_NAMES.map((weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n ))","(weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n )","getWeeksOfMonth(props.date).map((week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, getCurrentZoneDate())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n customValidation={customValidation}\n onSelect={props.onSelect}\n selected={selected}\n />\n )\n }),\n )","date","focused","onSelect","selected","(week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, getCurrentZoneDate())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n customValidation={customValidation}\n onSelect={props.onSelect}\n selected={selected}\n />\n )\n })","<Grid gap={1} style={{gridTemplateColumns: 'repeat(7, minmax(44px, 46px))'}}>\n {WEEK_DAY_NAMES.map((weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n ))}\n\n {/* Note: UTC dates are passed to each Calendar day but we use 'wall time' for comparison */}\n {getWeeksOfMonth(props.date).map((week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, getCurrentZoneDate())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n customValidation={customValidation}\n onSelect={props.onSelect}\n selected={selected}\n />\n )\n }),\n )}\n </Grid>","<Box aria-hidden={props.hidden || false} data-ui=\"CalendarMonth\">\n <Grid gap={1} style={{gridTemplateColumns: 'repeat(7, minmax(44px, 46px))'}}>\n {WEEK_DAY_NAMES.map((weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n ))}\n\n {/* Note: UTC dates are passed to each Calendar day but we use 'wall time' for comparison */}\n {getWeeksOfMonth(props.date).map((week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, getCurrentZoneDate())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n customValidation={customValidation}\n onSelect={props.onSelect}\n selected={selected}\n />\n )\n }),\n )}\n </Grid>\n </Box>","props.hidden || false","{onChange, ...props}: Props","(event: FocusEvent<HTMLInputElement> | ChangeEvent<HTMLInputElement>) => {\n const numericValue = parseInt(event.currentTarget.value, 10)\n if (!isNaN(numericValue)) {\n onChange(numericValue)\n }\n }","useCallback(\n (event: FocusEvent<HTMLInputElement> | ChangeEvent<HTMLInputElement>) => {\n const numericValue = parseInt(event.currentTarget.value, 10)\n if (!isNaN(numericValue)) {\n onChange(numericValue)\n }\n },\n [onChange],\n )","<LazyTextInput\n data-testid=\"date-input\"\n {...props}\n onChange={handleChange}\n inputMode=\"numeric\"\n />","selectedDate = getCurrentZoneDate()","focusedDate = selectedDate","timeStep = 1","(date: Date) => onFocusedDateChange(zoneDateToUtc(date))","useCallback(\n (date: Date) => onFocusedDateChange(zoneDateToUtc(date)),\n [onFocusedDateChange, zoneDateToUtc],\n )","(month: number) => setFocusedDate(setDate(setMonth(focusedDate, month), 1))","useCallback(\n (month: number) => setFocusedDate(setDate(setMonth(focusedDate, month), 1)),\n [focusedDate, setFocusedDate],\n )","(e: FormEvent<HTMLSelectElement>) => setFocusedDateMonth(Number(e.currentTarget.value))","useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (e: FormEvent<HTMLSelectElement>) => setFocusedDateMonth(Number(e.currentTarget.value)),\n [setFocusedDateMonth],\n )","(by: number) => setFocusedDate(addMonths(focusedDate, by))","useCallback(\n (by: number) => setFocusedDate(addMonths(focusedDate, by)),\n [focusedDate, setFocusedDate],\n )","(year: number) => setFocusedDate(setYear(focusedDate, year))","useCallback(\n (year: number) => setFocusedDate(setYear(focusedDate, year)),\n [focusedDate, setFocusedDate],\n )","(date: Date) => {\n onSelect(\n zoneDateToUtc(\n setMinutes(setHours(date, selectedDate.getHours()), selectedDate.getMinutes()),\n ),\n )\n }","date","useCallback(\n (date: Date) => {\n onSelect(\n zoneDateToUtc(\n setMinutes(setHours(date, selectedDate.getHours()), selectedDate.getMinutes()),\n ),\n )\n },\n [onSelect, selectedDate, zoneDateToUtc],\n )","(event: FormEvent<HTMLSelectElement>) => {\n const m = Number(event.currentTarget.value)\n onSelect(zoneDateToUtc(setMinutes(selectedDate, m)))\n }","useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (event: FormEvent<HTMLSelectElement>) => {\n const m = Number(event.currentTarget.value)\n onSelect(zoneDateToUtc(setMinutes(selectedDate, m)))\n },\n [onSelect, selectedDate, zoneDateToUtc],\n )","(event: FormEvent<HTMLSelectElement>) => {\n const m = Number(event.currentTarget.value)\n onSelect(zoneDateToUtc(setHours(selectedDate, m)))\n }","m","event","useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (event: FormEvent<HTMLSelectElement>) => {\n const m = Number(event.currentTarget.value)\n onSelect(zoneDateToUtc(setHours(selectedDate, m)))\n },\n [onSelect, selectedDate, zoneDateToUtc],\n )","(hours: number, mins: number) => {\n onSelect(zoneDateToUtc(setHours(setMinutes(selectedDate, mins), hours)))\n }","useCallback(\n (hours: number, mins: number) => {\n onSelect(zoneDateToUtc(setHours(setMinutes(selectedDate, mins), hours)))\n },\n [onSelect, selectedDate, zoneDateToUtc],\n )","() => ref.current","() => {\n ref.current?.querySelector<HTMLElement>(`[data-focused=\"true\"]`)?.focus()\n }","useCallback(() => {\n ref.current?.querySelector<HTMLElement>(`[data-focused=\"true\"]`)?.focus()\n }, [ref])","(event: KeyboardEvent<HTMLDivElement>) => {\n if (!ARROW_KEYS.includes(event.key)) {\n return\n }\n event.preventDefault()\n if (event.currentTarget.hasAttribute('data-calendar-grid')) {\n focusCurrentWeekDay()\n return\n }\n if (event.key === 'ArrowUp') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, -7)))\n }\n if (event.key === 'ArrowDown') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, 7)))\n }\n if (event.key === 'ArrowLeft') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, -1)))\n }\n if (event.key === 'ArrowRight') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, 1)))\n }\n // set focus temporarily on this element to make sure focus is still inside the calendar-grid after re-render\n ref.current?.querySelector<HTMLElement>('[data-preserve-focus]')?.focus()\n }","useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (!ARROW_KEYS.includes(event.key)) {\n return\n }\n event.preventDefault()\n if (event.currentTarget.hasAttribute('data-calendar-grid')) {\n focusCurrentWeekDay()\n return\n }\n if (event.key === 'ArrowUp') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, -7)))\n }\n if (event.key === 'ArrowDown') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, 7)))\n }\n if (event.key === 'ArrowLeft') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, -1)))\n }\n if (event.key === 'ArrowRight') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, 1)))\n }\n // set focus temporarily on this element to make sure focus is still inside the calendar-grid after re-render\n ref.current?.querySelector<HTMLElement>('[data-preserve-focus]')?.focus()\n },\n [zoneDateToUtc, ref, focusCurrentWeekDay, onFocusedDateChange, focusedDate],\n )","() => {\n focusCurrentWeekDay()\n }","[focusCurrentWeekDay]","() => {\n const currentFocusInCalendarGrid = document.activeElement?.matches(\n '[data-calendar-grid], [data-calendar-grid] [data-preserve-focus]',\n )\n if (\n // Only move focus if it's currently in the calendar grid\n currentFocusInCalendarGrid\n ) {\n focusCurrentWeekDay()\n }\n // oxlint-disable-next-line react/exhaustive-effect-dependencies -- pre-existing violation, to be fixed in a follow-up\n }","[ref, focusCurrentWeekDay, focusedDate]","() => onSelect(new Date())","useCallback(() => onSelect(new Date()), [onSelect])","focusedDate?.getMonth()","focusedDate?.getMonth","<Box flexBasis=\"0%\" flexGrow={1}>\n <CalendarMonthSelect\n moveFocusedDate={moveFocusedDate}\n onChange={handleFocusedMonthChange}\n value={focusedDate?.getMonth()}\n />\n </Box>","focusedDate.getFullYear()","<Box marginLeft={2}>\n <CalendarYearSelect\n moveFocusedDate={moveFocusedDate}\n onChange={setFocusedDateYear}\n value={focusedDate.getFullYear()}\n />\n </Box>","<Flex>\n <Box flexBasis=\"0%\" flexGrow={1}>\n <CalendarMonthSelect\n moveFocusedDate={moveFocusedDate}\n onChange={handleFocusedMonthChange}\n value={focusedDate?.getMonth()}\n />\n </Box>\n <Box marginLeft={2}>\n <CalendarYearSelect\n moveFocusedDate={moveFocusedDate}\n onChange={setFocusedDateYear}\n value={focusedDate.getFullYear()}\n />\n </Box>\n </Flex>","<CalendarMonth\n date={focusedDate}\n focused={focusedDate}\n customValidation={customValidation}\n onSelect={handleDateChange}\n selected={selectedDate}\n timeZoneScope={timeZoneScope}\n />","<Box\n data-calendar-grid\n onKeyDown={handleKeyDown}\n marginTop={2}\n overflow=\"hidden\"\n tabIndex={0}\n >\n <CalendarMonth\n date={focusedDate}\n focused={focusedDate}\n customValidation={customValidation}\n onSelect={handleDateChange}\n selected={selectedDate}\n timeZoneScope={timeZoneScope}\n />\n {PRESERVE_FOCUS_ELEMENT}\n </Box>","<Box padding={2}>\n {/* Select month and year */}\n <Flex>\n <Box flexBasis=\"0%\" flexGrow={1}>\n <CalendarMonthSelect\n moveFocusedDate={moveFocusedDate}\n onChange={handleFocusedMonthChange}\n value={focusedDate?.getMonth()}\n />\n </Box>\n <Box marginLeft={2}>\n <CalendarYearSelect\n moveFocusedDate={moveFocusedDate}\n onChange={setFocusedDateYear}\n value={focusedDate.getFullYear()}\n />\n </Box>\n </Flex>\n\n {/* Selected month (grid of days) */}\n <Box\n data-calendar-grid\n onKeyDown={handleKeyDown}\n marginTop={2}\n overflow=\"hidden\"\n tabIndex={0}\n >\n <CalendarMonth\n date={focusedDate}\n focused={focusedDate}\n customValidation={customValidation}\n onSelect={handleDateChange}\n selected={selectedDate}\n timeZoneScope={timeZoneScope}\n />\n {PRESERVE_FOCUS_ELEMENT}\n </Box>\n </Box>","selectTime && (\n <Box padding={2} style={{borderTop: '1px solid var(--card-border-color)'}}>\n <Flex alignItems=\"center\">\n <Flex alignItems=\"center\" flexBasis=\"0%\" flexGrow={1}>\n <Box>\n <Select\n aria-label=\"Select hour\"\n value={selectedDate?.getHours()}\n onChange={handleHoursChange}\n >\n {HOURS_24.map((h) => (\n <option key={h} value={h}>\n {`${h}`.padStart(2, '0')}\n </option>\n ))}\n </Select>\n </Box>\n\n <Box paddingX={1}>\n <Text>:</Text>\n </Box>\n\n <Box>\n <Select\n aria-label=\"Select minutes\"\n value={selectedDate?.getMinutes()}\n onChange={handleMinutesChange}\n >\n {range(0, 60, timeStep).map((m) => (\n <option key={m} value={m}>\n {`${m}`.padStart(2, '0')}\n </option>\n ))}\n </Select>\n </Box>\n </Flex>\n\n <Box marginLeft={2}>\n <Button text=\"Set to current time\" mode=\"bleed\" onClick={handleNowClick} />\n </Box>\n </Flex>\n\n {features.timePresets && (\n <Flex\n flexDirection=\"row\"\n justifyContent=\"center\"\n alignItems=\"center\"\n style={{marginTop: 5}}\n >\n {DEFAULT_TIME_PRESETS.map(([hours, minutes]) => {\n return (\n <CalendarTimePresetButton\n key={`${hours}-${minutes}`}\n hours={hours}\n minutes={minutes}\n onTimeChange={handleTimeChange}\n selectedDate={selectedDate}\n />\n )\n })}\n </Flex>\n )}\n </Box>\n )","selectedDate?.getHours","(h) => (\n <option key={h} value={h}>\n {`${h}`.padStart(2, '0')}\n </option>\n )","(m) => (\n <option key={m} value={m}>\n {`${m}`.padStart(2, '0')}\n </option>\n )","hours","[hours, minutes]","<Box data-ui=\"Calendar\" {...restProps} ref={ref}>\n {/* Select date */}\n <Box padding={2}>\n {/* Select month and year */}\n <Flex>\n <Box flexBasis=\"0%\" flexGrow={1}>\n <CalendarMonthSelect\n moveFocusedDate={moveFocusedDate}\n onChange={handleFocusedMonthChange}\n value={focusedDate?.getMonth()}\n />\n </Box>\n <Box marginLeft={2}>\n <CalendarYearSelect\n moveFocusedDate={moveFocusedDate}\n onChange={setFocusedDateYear}\n value={focusedDate.getFullYear()}\n />\n </Box>\n </Flex>\n\n {/* Selected month (grid of days) */}\n <Box\n data-calendar-grid\n onKeyDown={handleKeyDown}\n marginTop={2}\n overflow=\"hidden\"\n tabIndex={0}\n >\n <CalendarMonth\n date={focusedDate}\n focused={focusedDate}\n customValidation={customValidation}\n onSelect={handleDateChange}\n selected={selectedDate}\n timeZoneScope={timeZoneScope}\n />\n {PRESERVE_FOCUS_ELEMENT}\n </Box>\n </Box>\n\n {/* Select time */}\n {selectTime && (\n <Box padding={2} style={{borderTop: '1px solid var(--card-border-color)'}}>\n <Flex alignItems=\"center\">\n <Flex alignItems=\"center\" flexBasis=\"0%\" flexGrow={1}>\n <Box>\n <Select\n aria-label=\"Select hour\"\n value={selectedDate?.getHours()}\n onChange={handleHoursChange}\n >\n {HOURS_24.map((h) => (\n <option key={h} value={h}>\n {`${h}`.padStart(2, '0')}\n </option>\n ))}\n </Select>\n </Box>\n\n <Box paddingX={1}>\n <Text>:</Text>\n </Box>\n\n <Box>\n <Select\n aria-label=\"Select minutes\"\n value={selectedDate?.getMinutes()}\n onChange={handleMinutesChange}\n >\n {range(0, 60, timeStep).map((m) => (\n <option key={m} value={m}>\n {`${m}`.padStart(2, '0')}\n </option>\n ))}\n </Select>\n </Box>\n </Flex>\n\n <Box marginLeft={2}>\n <Button text=\"Set to current time\" mode=\"bleed\" onClick={handleNowClick} />\n </Box>\n </Flex>\n\n {features.timePresets && (\n <Flex\n flexDirection=\"row\"\n justifyContent=\"center\"\n alignItems=\"center\"\n style={{marginTop: 5}}\n >\n {DEFAULT_TIME_PRESETS.map(([hours, minutes]) => {\n return (\n <CalendarTimePresetButton\n key={`${hours}-${minutes}`}\n hours={hours}\n minutes={minutes}\n onTimeChange={handleTimeChange}\n selectedDate={selectedDate}\n />\n )\n })}\n </Flex>\n )}\n </Box>\n )}\n </Box>","formatTime(hours, minutes)","() => {\n onTimeChange(hours, minutes)\n }","useCallback(() => {\n onTimeChange(hours, minutes)\n }, [hours, minutes, onTimeChange])","selectedDate.toDateString()","<Button\n text={formatted}\n aria-label={`${formatted} on ${selectedDate.toDateString()}`}\n mode=\"bleed\"\n fontSize={1}\n onClick={handleClick}\n />","`${formatted} on ${selectedDate.toDateString()}`","() => moveFocusedDate(-1)","useCallback(() => moveFocusedDate(-1), [moveFocusedDate])","() => moveFocusedDate(1)","useCallback(() => moveFocusedDate(1), [moveFocusedDate])","<Button\n aria-label=\"Go to previous month\"\n onClick={handlePrevMonthClick}\n mode=\"bleed\"\n icon={ChevronLeftIcon}\n paddingX={2}\n radius={0}\n />","MONTH_NAMES.map((m, i) => (\n // oxlint-disable-next-line no-array-index-key\n <option key={i} value={i}>\n {m}\n </option>\n ))","(m, i) => (\n // oxlint-disable-next-line no-array-index-key\n <option key={i} value={i}>\n {m}\n </option>\n )","<Box flexBasis=\"0%\" flexGrow={1}>\n <Select radius={0} value={value} onChange={onChange}>\n {MONTH_NAMES.map((m, i) => (\n // oxlint-disable-next-line no-array-index-key\n <option key={i} value={i}>\n {m}\n </option>\n ))}\n </Select>\n </Box>","<Button\n aria-label=\"Go to next month\"\n mode=\"bleed\"\n icon={ChevronRightIcon}\n onClick={handleNextMonthClick}\n paddingX={2}\n radius={0}\n />","<Flex flexBasis=\"0%\" flexGrow={1}>\n <Button\n aria-label=\"Go to previous month\"\n onClick={handlePrevMonthClick}\n mode=\"bleed\"\n icon={ChevronLeftIcon}\n paddingX={2}\n radius={0}\n />\n <Box flexBasis=\"0%\" flexGrow={1}>\n <Select radius={0} value={value} onChange={onChange}>\n {MONTH_NAMES.map((m, i) => (\n // oxlint-disable-next-line no-array-index-key\n <option key={i} value={i}>\n {m}\n </option>\n ))}\n </Select>\n </Box>\n <Button\n aria-label=\"Go to next month\"\n mode=\"bleed\"\n icon={ChevronRightIcon}\n onClick={handleNextMonthClick}\n paddingX={2}\n radius={0}\n />\n </Flex>","() => moveFocusedDate(-12)","useCallback(() => moveFocusedDate(-12), [moveFocusedDate])","() => moveFocusedDate(12)","useCallback(() => moveFocusedDate(12), [moveFocusedDate])","<Button\n aria-label=\"Previous year\"\n onClick={handlePrevYearClick}\n mode=\"bleed\"\n icon={ChevronLeftIcon}\n paddingX={2}\n radius={0}\n />","{width: 65}","<YearInput value={value} onChange={onChange} radius={0} style={{width: 65}} />","<Button\n aria-label=\"Next year\"\n onClick={handleNextYearClick}\n mode=\"bleed\"\n icon={ChevronRightIcon}\n paddingX={2}\n radius={0}\n />","<Flex>\n <Button\n aria-label=\"Previous year\"\n onClick={handlePrevYearClick}\n mode=\"bleed\"\n icon={ChevronLeftIcon}\n paddingX={2}\n radius={0}\n />\n <YearInput value={value} onChange={onChange} radius={0} style={{width: 65}} />\n <Button\n aria-label=\"Next year\"\n onClick={handleNextYearClick}\n mode=\"bleed\"\n icon={ChevronRightIcon}\n paddingX={2}\n radius={0}\n />\n </Flex>","_value ?? new Date()","(nextDate: Date) => {\n onChange(nextDate)\n setFocusedDay(undefined)\n }","useCallback(\n (nextDate: Date) => {\n onChange(nextDate)\n setFocusedDay(undefined)\n },\n [onChange],\n )","utcToCurrentZoneDate(value)","utcToCurrentZoneDate(focusedDate || value)","focusedDate || value","<Calendar\n {...rest}\n ref={ref}\n selectedDate={utcToCurrentZoneDate(value)}\n onSelect={handleSelect}\n focusedDate={utcToCurrentZoneDate(focusedDate || value)}\n onFocusedDateChange={setFocusedDay}\n customValidation={customValidation}\n timeZoneScope={timeZoneScope}\n />","() => inputRef.current","() => setPickerOpen(false)","() => [popoverRef.current]","() => {\n inputRef.current?.focus()\n inputRef.current?.select()\n }","useCallback(() => {\n inputRef.current?.focus()\n inputRef.current?.select()\n }, [inputRef])","(e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n setPickerOpen(false)\n }\n }","useCallback((e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n setPickerOpen(false)\n }\n }, [])","() => setPickerOpen(true)","useCallback(() => setPickerOpen(true), [])","{padding: '5px'}","<Box style={{padding: '5px'}}>\n <Button\n ref={buttonRef}\n icon={CalendarIcon}\n mode=\"bleed\"\n padding={2}\n onClick={handleClick}\n style={{display: 'block'}}\n data-testid=\"select-date-button\"\n />\n </Box>","isPickerOpen ? (\n // Note: we're conditionally inserting the popover here due to an\n // issue with popovers rendering incorrectly on subsequent renders\n // see https://github.com/sanity-io/design/issues/519\n <LayerProvider zOffset={1000}>\n <Popover\n constrainSize\n content={\n <Box overflow=\"auto\">\n <FocusLock onDeactivation={handleDeactivation}>\n <DatePicker\n selectTime={selectTime}\n timeStep={timeStep}\n onKeyUp={handleKeyUp}\n value={value}\n onChange={onChange}\n customValidation={customValidation}\n timeZoneScope={timeZoneScope}\n />\n </FocusLock>\n </Box>\n }\n data-testid=\"date-input-dialog\"\n fallbackPlacements={['bottom', 'bottom-start', 'top-end', 'top', 'top-start']}\n floatingBoundary={portal.element}\n open\n placement=\"bottom-end\"\n portal\n radius={2}\n ref={popoverRef}\n >\n {suffix}\n </Popover>\n </LayerProvider>\n ) : (\n suffix\n )","portal.element","<LazyTextInput\n data-testid=\"date-input\"\n ref={inputRef}\n {...rest}\n value={inputValue}\n onChange={onInputChange}\n suffix={\n isPickerOpen ? (\n // Note: we're conditionally inserting the popover here due to an\n // issue with popovers rendering incorrectly on subsequent renders\n // see https://github.com/sanity-io/design/issues/519\n <LayerProvider zOffset={1000}>\n <Popover\n constrainSize\n content={\n <Box overflow=\"auto\">\n <FocusLock onDeactivation={handleDeactivation}>\n <DatePicker\n selectTime={selectTime}\n timeStep={timeStep}\n onKeyUp={handleKeyUp}\n value={value}\n onChange={onChange}\n customValidation={customValidation}\n timeZoneScope={timeZoneScope}\n />\n </FocusLock>\n </Box>\n }\n data-testid=\"date-input-dialog\"\n fallbackPlacements={['bottom', 'bottom-start', 'top-end', 'top', 'top-start']}\n floatingBoundary={portal.element}\n open\n placement=\"bottom-end\"\n portal\n radius={2}\n ref={popoverRef}\n >\n {suffix}\n </Popover>\n </LayerProvider>\n ) : (\n suffix\n )\n }\n />","() => {\n // oxlint-disable-next-line react/set-state-in-effect -- pre-existing violation, to be fixed in a follow-up\n setLocalValue(null)\n // oxlint-disable-next-line react/exhaustive-effect-dependencies -- pre-existing violation, to be fixed in a follow-up\n }","[value]","(event: FocusEvent<HTMLInputElement>) => {\n const nextInputValue = event.currentTarget.value\n const result = nextInputValue === '' ? null : parseInputValue(nextInputValue)\n\n if (result === null) {\n onChange(null)\n\n // If the field value is undefined, and we are clearing the invalid value\n // the above useEffect won't trigger, so we do some extra clean up here\n if (undefinedValue && localValue) {\n setLocalValue(null)\n }\n } else if (result.isValid) {\n // Convert zone time to UTC\n onChange(serialize(zoneDateToUtc(result.date)))\n } else {\n setLocalValue(nextInputValue)\n }\n }","useCallback(\n (event: FocusEvent<HTMLInputElement>) => {\n const nextInputValue = event.currentTarget.value\n const result = nextInputValue === '' ? null : parseInputValue(nextInputValue)\n\n if (result === null) {\n onChange(null)\n\n // If the field value is undefined, and we are clearing the invalid value\n // the above useEffect won't trigger, so we do some extra clean up here\n if (undefinedValue && localValue) {\n setLocalValue(null)\n }\n } else if (result.isValid) {\n // Convert zone time to UTC\n onChange(serialize(zoneDateToUtc(result.date)))\n } else {\n setLocalValue(nextInputValue)\n }\n },\n [undefinedValue, zoneDateToUtc, localValue, serialize, onChange, parseInputValue],\n )","(nextDate: Date | null) => {\n onChange(nextDate ? serialize(nextDate) : null)\n }","useCallback(\n (nextDate: Date | null) => {\n onChange(nextDate ? serialize(nextDate) : null)\n },\n [serialize, onChange],\n )","() => inputRef.current","localValue\n ? localValue\n : parseResult?.isValid\n ? formatInputValue(parseResult.date)\n : value","markers.map((m) => ({\n level: m.level,\n path: m.path,\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n message: m.message ?? m.item?.message,\n }))","(m) => ({\n level: m.level,\n path: m.path,\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n message: m.message ?? m.item?.message,\n })","useMemo(\n () =>\n markers.map((m) => ({\n level: m.level,\n path: m.path,\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n message: m.message ?? m.item?.message,\n })),\n [markers],\n )","parseResult?.error\n ? [\n ...nodeValidations,\n {\n level: 'error',\n message: parseResult.error,\n path: [],\n }, // casting to marker to avoid having to implement cloneWithMessage on item\n ]\n : nodeValidations","parseResult?.error","[]","readOnly ? (\n <TextInput value={inputValue} readOnly />\n ) : (\n <DateTimeInput\n {...rest}\n id={id}\n selectTime={selectTime}\n timeStep={timeStep}\n placeholder={placeholder || `e.g. ${formatInputValue(new Date())}`}\n ref={inputRef}\n value={parseResult?.date}\n inputValue={inputValue || ''}\n readOnly={Boolean(readOnly)}\n onInputChange={handleDatePickerInputChange}\n onChange={handleDatePickerChange}\n customValidity={parseResult?.error}\n customValidation={customValidation}\n timeZoneScope={timeZoneScope}\n />\n )","date","error","<FormField\n validation={\n parseResult?.error\n ? [\n ...nodeValidations,\n {\n level: 'error',\n message: parseResult.error,\n path: [],\n }, // casting to marker to avoid having to implement cloneWithMessage on item\n ]\n : nodeValidations\n }\n title={title}\n level={level}\n description={description}\n inputId={id}\n path={[]}\n >\n {readOnly ? (\n <TextInput value={inputValue} readOnly />\n ) : (\n <DateTimeInput\n {...rest}\n id={id}\n selectTime={selectTime}\n timeStep={timeStep}\n placeholder={placeholder || `e.g. ${formatInputValue(new Date())}`}\n ref={inputRef}\n value={parseResult?.date}\n inputValue={inputValue || ''}\n readOnly={Boolean(readOnly)}\n onInputChange={handleDatePickerInputChange}\n onChange={handleDatePickerChange}\n customValidity={parseResult?.error}\n customValidation={customValidation}\n timeZoneScope={timeZoneScope}\n />\n )}\n </FormField>","parseOptions(type.options)","options","(nextDate: string | null) => {\n let date = nextDate\n if (date !== null && timeStep > 1) {\n date = enforceTimeStep(date, timeStep)\n }\n\n onChange(date)\n }","useCallback(\n (nextDate: string | null) => {\n let date = nextDate\n if (date !== null && timeStep > 1) {\n date = enforceTimeStep(date, timeStep)\n }\n\n onChange(date)\n },\n [onChange, timeStep],\n )","(date: Date) => format(date, `${inputDateTimeFormat}`, {in: tzHelper(timeZone.name)})","name","date","useCallback(\n (date: Date) => format(date, `${inputDateTimeFormat}`, {in: tzHelper(timeZone.name)}),\n [inputDateTimeFormat, timeZone.name],\n )","(inputValue: string) => {\n const parsed = parse(inputValue, `${inputDateTimeFormat}`, getCurrentZoneDate())\n\n // Check is value is a valid date\n if (!isValid(parsed)) {\n return {\n isValid: false,\n error: `Invalid date. Must be in the format \"${inputDateTimeFormat}\"`,\n } as ParseResult\n }\n\n // Check if value adheres to custom validation rules\n if (!customValidation(parsed)) {\n return {\n isValid: false,\n error: customValidationMessage,\n } as ParseResult\n }\n\n return {\n isValid: true,\n date: parsed,\n } as ParseResult\n }","useCallback(\n (inputValue: string) => {\n const parsed = parse(inputValue, `${inputDateTimeFormat}`, getCurrentZoneDate())\n\n // Check is value is a valid date\n if (!isValid(parsed)) {\n return {\n isValid: false,\n error: `Invalid date. Must be in the format \"${inputDateTimeFormat}\"`,\n } as ParseResult\n }\n\n // Check if value adheres to custom validation rules\n if (!customValidation(parsed)) {\n return {\n isValid: false,\n error: customValidationMessage,\n } as ParseResult\n }\n\n return {\n isValid: true,\n date: parsed,\n } as ParseResult\n },\n [customValidation, customValidationMessage, getCurrentZoneDate, inputDateTimeFormat],\n )","<CommonDateTimeInput\n {...rest}\n onChange={handleChange}\n ref={forwardedRef}\n selectTime\n timeStep={timeStep}\n title={title}\n description={description}\n placeholder={placeholder}\n serialize={serialize}\n deserialize={deserialize}\n formatInputValue={formatInputValue}\n customValidation={customValidation}\n parseInputValue={parseInputValue}\n timeZoneScope={timeZoneScope}\n />","timeZoneScope","(date: string | null) => {\n if (date && onChange) {\n onChange({date})\n setInputValue(date)\n }\n }","(selectedDate: Date): boolean => {\n return selectedDate > getCurrentZoneDate()\n }","[]","{\n name: 'date',\n options: {\n customValidation: handleCustomValidation,\n customValidationMessage: 'Date cannot be in the past.',\n },\n title: 'Date and time',\n }","<Stack gap={4}>\n <Card>\n <DateTimeInput\n level={0}\n markers={[]}\n onChange={handleChange}\n type={{\n name: 'date',\n options: {\n customValidation: handleCustomValidation,\n customValidationMessage: 'Date cannot be in the past.',\n },\n title: 'Date and time',\n }}\n value={inputValue === undefined ? value?.date : inputValue}\n timeZoneScope={timeZoneScope}\n />\n </Card>\n </Stack>","inputValue === undefined ? value?.date : inputValue","<ScheduleForm onChange={onChange} value={value} />","<Stack gap={4}>\n {props.children}\n <ScheduleForm onChange={onChange} value={value} />\n </Stack>","children","<Text size={2}>\n <ErrorOutlineIcon />\n </Text>","<Text size={1} weight=\"semibold\">\n {title}\n </Text>","description && <Text size={1}>{description}</Text>","<Card overflow=\"hidden\" padding={4} radius={2} shadow={1} tone=\"critical\">\n <Flex alignItems=\"center\" gap={4}>\n <Text size={2}>\n <ErrorOutlineIcon />\n </Text>\n <Inline gap={2}>\n <Text size={1} weight=\"semibold\">\n {title}\n </Text>\n {description && <Text size={1}>{description}</Text>}\n </Inline>\n </Flex>\n </Card>","{\n children,\n value,\n}: {\n children: ReactNode\n value: DocumentActionProps\n}","<DocumentActionPropsContext.Provider value={value}>\n {children}\n </DocumentActionPropsContext.Provider>","DocumentActionPropsContext.Provider","schedule && schedule?.executeAt\n ? {\n date: schedule.executeAt,\n }\n : null","(form: ScheduleFormData) => {\n const equalDates =\n schedule?.executeAt &&\n new Date(schedule.executeAt).getTime() === new Date(form?.date).getTime()\n\n setFormData(form)\n setIsDirty(!equalDates)\n }","schedule?.executeAt","{\n formData,\n isDirty,\n onFormChange: handleFormChange,\n }","() => {\n if (onClick) {\n onClick(marker.path)\n }\n }","path","useCallback(() => {\n if (onClick) {\n onClick(marker.path)\n }\n }, [marker.path, onClick])","marker.level === 'error' && <ErrorOutlineIcon />","level","marker.level === 'warning' && <WarningOutlineIcon />","marker.level === 'info' && <InfoOutlineIcon />","<Box>\n <Text size={1}>\n {marker.level === 'error' && <ErrorOutlineIcon />}\n {marker.level === 'warning' && <WarningOutlineIcon />}\n {marker.level === 'info' && <InfoOutlineIcon />}\n </Text>\n </Box>","path && (\n <StyledText size={1} weight=\"semibold\">\n {path}\n </StyledText>\n )","message && (\n <StyledText muted size={1} textOverflow={truncate ? 'ellipsis' : undefined}>\n {message}\n </StyledText>\n )","<Stack gap={2} flex={1} paddingLeft={3}>\n {path && (\n <StyledText size={1} weight=\"semibold\">\n {path}\n </StyledText>\n )}\n {message && (\n <StyledText muted size={1} textOverflow={truncate ? 'ellipsis' : undefined}>\n {message}\n </StyledText>\n )}\n </Stack>","<Flex>\n <Box>\n <Text size={1}>\n {marker.level === 'error' && <ErrorOutlineIcon />}\n {marker.level === 'warning' && <WarningOutlineIcon />}\n {marker.level === 'info' && <InfoOutlineIcon />}\n </Text>\n </Box>\n\n <Stack gap={2} flex={1} paddingLeft={3}>\n {path && (\n <StyledText size={1} weight=\"semibold\">\n {path}\n </StyledText>\n )}\n {message && (\n <StyledText muted size={1} textOverflow={truncate ? 'ellipsis' : undefined}>\n {message}\n </StyledText>\n )}\n </Stack>\n </Flex>","<Box padding={2}>{children}</Box>","<MenuItem padding={1} onClick={handleClick} radius={2} tone={menuItemTone}>\n <Box padding={2}>{children}</Box>\n </MenuItem>","Container","0","kind","\"validation-list\"","hasErrors &&\n errors.map((_error, i) => (\n <ValidationListItem\n // oxlint-disable-next-line no-array-index-key\n key={i}\n truncate={truncate}\n path={resolvePathTitle(_error.path)}\n marker={_error}\n onClick={handleClick}\n />\n ))","hasWarnings &&\n warnings.map((_warning, i) => (\n <ValidationListItem\n // oxlint-disable-next-line no-array-index-key\n key={i}\n truncate={truncate}\n path={resolvePathTitle(_warning.path)}\n marker={_warning}\n onClick={handleClick}\n />\n ))","hasInfo &&\n info.map((_info, i) => (\n <ValidationListItem\n // oxlint-disable-next-line no-array-index-key\n key={i}\n truncate={truncate}\n path={resolvePathTitle(_info.path)}\n marker={_info}\n onClick={handleClick}\n />\n ))","(path: Path = []) => {\n if (onFocus) onFocus(path)\n if (onClose) onClose()\n }","path: Path = []","useCallback(\n (path: Path = []) => {\n if (onFocus) onFocus(path)\n if (onClose) onClose()\n },\n [onFocus, onClose],\n )","(path: Path) => {\n const fields = documentType && documentType.fields\n const field = fields && fields.find((curr) => curr.name === path[0])\n\n return (field && field.type.title) || ''\n }","path","i","<Container width={0} data-kind={kind} data-testid=\"validation-list\">\n {hasErrors &&\n errors.map((_error, i) => (\n <ValidationListItem\n // oxlint-disable-next-line no-array-index-key\n key={i}\n truncate={truncate}\n path={resolvePathTitle(_error.path)}\n marker={_error}\n onClick={handleClick}\n />\n ))}\n {hasWarnings &&\n warnings.map((_warning, i) => (\n <ValidationListItem\n // oxlint-disable-next-line no-array-index-key\n key={i}\n truncate={truncate}\n path={resolvePathTitle(_warning.path)}\n marker={_warning}\n onClick={handleClick}\n />\n ))}\n {hasInfo &&\n info.map((_info, i) => (\n <ValidationListItem\n // oxlint-disable-next-line no-array-index-key\n key={i}\n truncate={truncate}\n path={resolvePathTitle(_info.path)}\n marker={_info}\n onClick={handleClick}\n />\n ))}\n </Container>","(path: Path) => {\n if (!publishId) {\n return\n }\n router.navigateIntent('edit', {\n id: publishId,\n path: encodeURIComponent(PathUtils.toString(path)),\n })\n }","useCallback(\n (path: Path) => {\n if (!publishId) {\n return\n }\n router.navigateIntent('edit', {\n id: publishId,\n path: encodeURIComponent(PathUtils.toString(path)),\n })\n },\n [router, publishId],\n )","{content: 'Show validation issues'}","{visibility}","<Button\n tooltipProps={{content: 'Show validation issues'}}\n mode=\"bleed\"\n data-testid=\"schedule-validation-list-button\"\n icon={hasError ? ErrorOutlineIcon : WarningOutlineIcon}\n style={{visibility}}\n tone={hasError ? 'critical' : 'default'}\n />","hasError ? ErrorOutlineIcon : WarningOutlineIcon","hasError ? 'critical' : 'default'","<ValidationList\n documentType={type as ObjectSchemaType}\n validation={markers}\n onFocus={onFocus}\n />","type as ObjectSchemaType","<Menu padding={1}>\n <Container width={0}>\n <Stack gap={1}>\n {menuHeader ?? null}\n <ValidationList\n documentType={type as ObjectSchemaType}\n validation={markers}\n onFocus={onFocus}\n />\n </Stack>\n </Container>\n </Menu>","menuHeader ?? null","<MenuButton\n id={id || ''}\n button={\n <Button\n tooltipProps={{content: 'Show validation issues'}}\n mode=\"bleed\"\n data-testid=\"schedule-validation-list-button\"\n icon={hasError ? ErrorOutlineIcon : WarningOutlineIcon}\n style={{visibility}}\n tone={hasError ? 'critical' : 'default'}\n />\n }\n menu={\n <Menu padding={1}>\n <Container width={0}>\n <Stack gap={1}>\n {menuHeader ?? null}\n <ValidationList\n documentType={type as ObjectSchemaType}\n validation={markers}\n onFocus={onFocus}\n />\n </Stack>\n </Container>\n </Menu>\n }\n popover={POPOVER_PROPS}\n />","id || ''","getScheduledDocument(schedule)","useMemo(() => {\n if (!schemaName) {\n return undefined\n }\n return schema.get(schemaName) as SchemaType\n }, [schemaName, schema])","schema.get(schemaName)","schemaType\n ? getPreviewStateObservable(documentPreviewStore, schemaType, documentId, '')\n : of(EMPTY_STATE)","useMemo(\n () =>\n schemaType\n ? getPreviewStateObservable(documentPreviewStore, schemaType, documentId, '')\n : of(EMPTY_STATE),\n [documentPreviewStore, schemaType, documentId],\n )","async () => {\n if (!formData?.date) {\n return\n }\n // Update schedule then close self\n await updateSchedule({\n date: formData.date,\n scheduleId: schedule.id,\n })\n onClose()\n }","formData?.date","schedule.id","{\n confirmButton: {\n text: 'Update',\n disabled: !isDirty,\n onClick: handleScheduleUpdate,\n },\n }","!isDirty","<DialogHeader timeZoneScope={timeZoneScope} title=\"Edit schedule\" />","timeZoneScope","<EditScheduleForm onChange={onFormChange} value={formData} />","<Dialog\n footer={{\n confirmButton: {\n text: 'Update',\n disabled: !isDirty,\n onClick: handleScheduleUpdate,\n },\n }}\n header={<DialogHeader timeZoneScope={timeZoneScope} title=\"Edit schedule\" />}\n id=\"time-zone\"\n onClose={onClose}\n width={1}\n >\n {/* oxlint-disable-next-line no-deprecated -- will fix in follow up PR */}\n <EditScheduleForm onChange={onFormChange} value={formData} />\n </Dialog>","() => {\n setDialogVisible(false)\n }","useCallback(() => {\n setDialogVisible(false)\n }, [])","() => {\n setDialogVisible(true)\n }","useCallback(() => {\n setDialogVisible(true)\n }, [])","{\n visible: dialogVisible,\n show,\n timeZoneScope,\n hide,\n }","{\n onClose: hide,\n schedule,\n visible,\n }","{\n DialogScheduleEdit: visible ? DialogScheduleEdit : null,\n dialogProps,\n timeZoneScope,\n dialogScheduleEditShow: show,\n hide,\n }","visible ? DialogScheduleEdit : null","<Box paddingX={2} paddingY={1}>\n <InsufficientPermissionsMessage\n currentUser={currentUser}\n context={permissionsOperationLabel}\n />\n </Box>","<div>\n <MenuItem\n disabled={!hasPermission || disabled}\n icon={icon}\n onClick={onClick}\n text={title}\n tone={tone}\n />\n </div>","!hasPermission || disabled","<Tooltip\n content={\n <Box paddingX={2} paddingY={1}>\n <InsufficientPermissionsMessage\n currentUser={currentUser}\n context={permissionsOperationLabel}\n />\n </Box>\n }\n disabled={hasPermission}\n placement=\"left\"\n portal\n >\n {/* Wrapper element to allow disabled menu items to trigger tooltips */}\n <div>\n <MenuItem\n disabled={!hasPermission || disabled}\n icon={icon}\n onClick={onClick}\n text={title}\n tone={tone}\n />\n </div>\n </Tooltip>","getScheduledDocument(schedule)","{\n id: firstDocument.documentId,\n type: schemaType?.name,\n permission: 'publish',\n }","documentId","schemaType?.name","() => {\n onEdit?.()\n }","() => {\n void deleteSchedule({schedule}).then(() => onDelete?.())\n }","() => {\n void publishSchedule({schedule})\n }","actions?.edit && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={CalendarIcon}\n onClick={handleEdit}\n permissionsOperationLabel=\"edit-schedules\"\n title=\"Edit schedule\"\n disabled={mode === 'upsell'}\n />\n )","edit","actions?.execute && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={PublishIcon}\n onClick={handleExecute}\n permissionsOperationLabel=\"execute-schedules\"\n title=\"Publish now\"\n disabled={mode === 'upsell'}\n />\n )","execute","actions?.delete && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={TrashIcon}\n onClick={handleDelete}\n permissionsOperationLabel=\"delete-schedules\"\n title=\"Delete schedule\"\n tone=\"critical\"\n disabled={mode === 'upsell'}\n />\n )","delete","actions?.clear && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={CheckmarkCircleIcon}\n onClick={handleDelete}\n permissionsOperationLabel=\"delete-schedules\"\n title=\"Clear completed schedule\"\n disabled={mode === 'upsell'}\n />\n )","clear","<>\n {actions?.edit && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={CalendarIcon}\n onClick={handleEdit}\n permissionsOperationLabel=\"edit-schedules\"\n title=\"Edit schedule\"\n disabled={mode === 'upsell'}\n />\n )}\n {actions?.execute && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={PublishIcon}\n onClick={handleExecute}\n permissionsOperationLabel=\"execute-schedules\"\n title=\"Publish now\"\n disabled={mode === 'upsell'}\n />\n )}\n {actions?.delete && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={TrashIcon}\n onClick={handleDelete}\n permissionsOperationLabel=\"delete-schedules\"\n title=\"Delete schedule\"\n tone=\"critical\"\n disabled={mode === 'upsell'}\n />\n )}\n {actions?.clear && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={CheckmarkCircleIcon}\n onClick={handleDelete}\n permissionsOperationLabel=\"delete-schedules\"\n title=\"Clear completed schedule\"\n disabled={mode === 'upsell'}\n />\n )}\n </>","<ContextMenuButton />","<Menu>\n <ContextMenuItems\n actions={actions}\n onDelete={onDelete}\n onEdit={onEdit}\n schedule={schedule}\n schemaType={schemaType}\n />\n </Menu>","{placement: 'left', portal: true, tone: 'default'}","<MenuButton\n button={<ContextMenuButton />}\n id=\"contextMenu\"\n menu={\n <Menu>\n <ContextMenuItems\n actions={actions}\n onDelete={onDelete}\n onEdit={onEdit}\n schedule={schedule}\n schemaType={schemaType}\n />\n </Menu>\n }\n popover={{placement: 'left', portal: true, tone: 'default'}}\n />","{schedule, updateValidation}: Props","getScheduledDocumentId(schedule)","<DelayedValidationRunner\n id={id}\n schemaName={schemaType.name}\n updateValidation={updateValidation}\n />","name","{id, schemaName, updateValidation}: ValidationRunnerProps","() => {\n const timeout = setTimeout(() => {\n setReady(true)\n }, VALIDATION_DELAY_MS)\n\n return () => {\n clearTimeout(timeout)\n }\n }","[]","<ValidationRunner id={id} schemaName={schemaName} updateValidation={updateValidation} />","getDraftId(id)","() => {\n if (!validationStatus.isValidating) {\n updateValidation(validationStatus)\n }\n }","[updateValidation, validationStatus]","validationStatus.isValidating","{type: 'scheduledPublishing'}","formatDistance(date, new Date(), {\n addSuffix: true,\n })","formatDateTz({date, format: DATE_FORMAT.LARGE})","formatDateTz({date, format: DATE_FORMAT.MEDIUM})","formatDateTz({date, format: DATE_FORMAT.SMALL})","useElementQueries ? (\n <>\n <span className=\"date-small\">{dateTimeSmall}</span>\n <span className=\"date-medium\">{dateTimeMedium}</span>\n <span className=\"date-large\">{dateTimeLarge}</span>\n </>\n ) : (\n dateTimeLarge\n )","<span>\n {useElementQueries ? (\n <>\n <span className=\"date-small\">{dateTimeSmall}</span>\n <span className=\"date-medium\">{dateTimeMedium}</span>\n <span className=\"date-large\">{dateTimeLarge}</span>\n </>\n ) : (\n dateTimeLarge\n )}\n </span>","<Text size={1} textOverflow=\"ellipsis\">\n <Tooltip content={distance} portal>\n <span>\n {useElementQueries ? (\n <>\n <span className=\"date-small\">{dateTimeSmall}</span>\n <span className=\"date-medium\">{dateTimeMedium}</span>\n <span className=\"date-large\">{dateTimeLarge}</span>\n </>\n ) : (\n dateTimeLarge\n )}\n </span>\n </Tooltip>\n </Text>","<Button\n tooltipProps={{content: 'Schedule failed'}}\n mode=\"bleed\"\n data-testid=\"schedule-validation-list-button\"\n icon={ErrorOutlineIcon}\n tone=\"critical\"\n />","<Text size={1}>{SCHEDULE_FAILED_TEXT}</Text>","<Text size={1} style={{color: red[700].hex}}>\n <ErrorOutlineIcon />\n </Text>","{color: red[700].hex}","<MenuButton\n id=\"stateReason\"\n button={\n <Button\n tooltipProps={{content: 'Schedule failed'}}\n mode=\"bleed\"\n data-testid=\"schedule-validation-list-button\"\n icon={ErrorOutlineIcon}\n tone=\"critical\"\n />\n }\n menu={\n <Menu padding={1}>\n <Container padding={2} width={0}>\n <Text size={1}>{SCHEDULE_FAILED_TEXT}</Text>\n <Flex gap={3} marginTop={4} padding={1}>\n <Text size={1} style={{color: red[700].hex}}>\n <ErrorOutlineIcon />\n </Text>\n <Text size={1} style={{color: red[700].hex}} weight=\"medium\">\n {stateReason}\n </Text>\n </Flex>\n </Container>\n </Menu>\n }\n popover={POPOVER_PROPS}\n />","<UserAvatar user={id} withTooltip />","{type: 'scheduledPublishing'}","Stack","Box","Flex","Card","Tooltip","2","schedule.action === 'unpublish' && (\n <Flex style={{flexShrink: 0}}>\n <Badge fontSize={0} tone={SCHEDULE_ACTION_DICTIONARY[schedule.action].badgeTone}>\n {schedule.action}\n </Badge>\n </Flex>\n )","linkProps as object | undefined","__unstable_focusRing","linkComponent ? (linkComponent as ElementType) : undefined","onClick || linkComponent ? 'a' : undefined","1","onClick","0","scheduleDate ? (\n <>\n <Text size={1}>\n {formatDateTz({date: scheduleDate, format: 'dd/MM/yyyy'})}\n </Text>\n <Text size={1}>{formatDateTz({date: scheduleDate, format: 'p'})}</Text>\n </>\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )","validationTone","{open: 400}","\"bottom-end\"","publishedDocumentId ? (\n <DocumentVersionsStatus documentGroupId={publishedDocumentId} />\n ) : null","!publishedDocumentId","\"center\"","\"space-between\"","['block', 'none']","mode === 'upsell' && schedule.state === 'scheduled' ? {opacity: 0.7} : undefined","{flexShrink: 0, width: '90px'}","3","\"flex-start\"","children ? 0 : [1, 2]","children && <Box style={{flexBasis: 'auto', flexGrow: 1}}>{children}</Box>","state","action","<Stack gap={2}>\n {scheduleDate ? (\n <>\n <Text size={1}>\n {formatDateTz({date: scheduleDate, format: 'dd/MM/yyyy'})}\n </Text>\n <Text size={1}>{formatDateTz({date: scheduleDate, format: 'p'})}</Text>\n </>\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Stack>","<Box display={['block', 'none']} style={{flexShrink: 0, width: '90px'}}>\n <Stack gap={2}>\n {scheduleDate ? (\n <>\n <Text size={1}>\n {formatDateTz({date: scheduleDate, format: 'dd/MM/yyyy'})}\n </Text>\n <Text size={1}>{formatDateTz({date: scheduleDate, format: 'p'})}</Text>\n </>\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Stack>\n </Box>","['none', 'block']","{flexShrink: 0, maxWidth: '250px', width: children ? '35%' : 'auto'}","children ? '35%' : 'auto'","scheduleDate ? (\n <DateWithTooltip date={scheduleDate} useElementQueries={useElementQueries} />\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )","<Box\n display={['none', 'block']}\n style={{flexShrink: 0, maxWidth: '250px', width: children ? '35%' : 'auto'}}\n >\n {scheduleDate ? (\n <DateWithTooltip date={scheduleDate} useElementQueries={useElementQueries} />\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Box>","!children && (\n <Box style={{visibility: 'hidden'}}>\n <SanityDefaultPreview isPlaceholder />\n </Box>\n )","{flexShrink: 0, marginLeft: 'auto'}","['none', 'none', 'block']","{flexShrink: 0}","<Box display={['none', 'none', 'block']} marginX={3} style={{flexShrink: 0}}>\n <User id={schedule?.author} />\n </Box>","schedule?.author","[2, 2, 3]","<Box display={['none', 'block']} marginX={[2, 2, 3]} style={{flexShrink: 0}}>\n {publishedDocumentId ? (\n <ScheduleItemStatusIndicator publishedDocumentId={publishedDocumentId} />\n ) : (\n <StatusDotPlaceholder />\n )}\n </Box>","<Flex alignItems=\"center\" style={{flexShrink: 0, marginLeft: 'auto'}}>\n {/* Avatar */}\n <Box display={['none', 'none', 'block']} marginX={3} style={{flexShrink: 0}}>\n <User id={schedule?.author} />\n </Box>\n\n {/* Document status */}\n <Box display={['none', 'block']} marginX={[2, 2, 3]} style={{flexShrink: 0}}>\n {publishedDocumentId ? (\n <ScheduleItemStatusIndicator publishedDocumentId={publishedDocumentId} />\n ) : (\n <StatusDotPlaceholder />\n )}\n </Box>\n </Flex>","<Flex\n alignItems=\"center\"\n gap={3}\n justifyContent=\"flex-start\"\n paddingLeft={children ? 0 : [1, 2]}\n >\n {children && <Box style={{flexBasis: 'auto', flexGrow: 1}}>{children}</Box>}\n\n {/* Badge */}\n {schedule.action === 'unpublish' && (\n <Flex style={{flexShrink: 0}}>\n <Badge fontSize={0} tone={SCHEDULE_ACTION_DICTIONARY[schedule.action].badgeTone}>\n {schedule.action}\n </Badge>\n </Flex>\n )}\n\n {/* Schedule date */}\n <Box display={['block', 'none']} style={{flexShrink: 0, width: '90px'}}>\n <Stack gap={2}>\n {scheduleDate ? (\n <>\n <Text size={1}>\n {formatDateTz({date: scheduleDate, format: 'dd/MM/yyyy'})}\n </Text>\n <Text size={1}>{formatDateTz({date: scheduleDate, format: 'p'})}</Text>\n </>\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Stack>\n </Box>\n <Box\n display={['none', 'block']}\n style={{flexShrink: 0, maxWidth: '250px', width: children ? '35%' : 'auto'}}\n >\n {scheduleDate ? (\n <DateWithTooltip date={scheduleDate} useElementQueries={useElementQueries} />\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Box>\n\n {/* HACK: render invisible preview wrapper when no children are provided to ensure consistent height */}\n {!children && (\n <Box style={{visibility: 'hidden'}}>\n <SanityDefaultPreview isPlaceholder />\n </Box>\n )}\n\n <Flex alignItems=\"center\" style={{flexShrink: 0, marginLeft: 'auto'}}>\n {/* Avatar */}\n <Box display={['none', 'none', 'block']} marginX={3} style={{flexShrink: 0}}>\n <User id={schedule?.author} />\n </Box>\n\n {/* Document status */}\n <Box display={['none', 'block']} marginX={[2, 2, 3]} style={{flexShrink: 0}}>\n {publishedDocumentId ? (\n <ScheduleItemStatusIndicator publishedDocumentId={publishedDocumentId} />\n ) : (\n <StatusDotPlaceholder />\n )}\n </Box>\n </Flex>\n </Flex>","<Card\n {...(linkProps as object | undefined)}\n __unstable_focusRing\n as={linkComponent ? (linkComponent as ElementType) : undefined}\n data-as={onClick || linkComponent ? 'a' : undefined}\n flex={1}\n onClick={onClick}\n padding={1}\n radius={2}\n tabIndex={0}\n tone={validationTone}\n >\n <Flex\n alignItems=\"center\"\n gap={3}\n justifyContent=\"flex-start\"\n paddingLeft={children ? 0 : [1, 2]}\n >\n {children && <Box style={{flexBasis: 'auto', flexGrow: 1}}>{children}</Box>}\n\n {/* Badge */}\n {schedule.action === 'unpublish' && (\n <Flex style={{flexShrink: 0}}>\n <Badge fontSize={0} tone={SCHEDULE_ACTION_DICTIONARY[schedule.action].badgeTone}>\n {schedule.action}\n </Badge>\n </Flex>\n )}\n\n {/* Schedule date */}\n <Box display={['block', 'none']} style={{flexShrink: 0, width: '90px'}}>\n <Stack gap={2}>\n {scheduleDate ? (\n <>\n <Text size={1}>\n {formatDateTz({date: scheduleDate, format: 'dd/MM/yyyy'})}\n </Text>\n <Text size={1}>{formatDateTz({date: scheduleDate, format: 'p'})}</Text>\n </>\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Stack>\n </Box>\n <Box\n display={['none', 'block']}\n style={{flexShrink: 0, maxWidth: '250px', width: children ? '35%' : 'auto'}}\n >\n {scheduleDate ? (\n <DateWithTooltip date={scheduleDate} useElementQueries={useElementQueries} />\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Box>\n\n {/* HACK: render invisible preview wrapper when no children are provided to ensure consistent height */}\n {!children && (\n <Box style={{visibility: 'hidden'}}>\n <SanityDefaultPreview isPlaceholder />\n </Box>\n )}\n\n <Flex alignItems=\"center\" style={{flexShrink: 0, marginLeft: 'auto'}}>\n {/* Avatar */}\n <Box display={['none', 'none', 'block']} marginX={3} style={{flexShrink: 0}}>\n <User id={schedule?.author} />\n </Box>\n\n {/* Document status */}\n <Box display={['none', 'block']} marginX={[2, 2, 3]} style={{flexShrink: 0}}>\n {publishedDocumentId ? (\n <ScheduleItemStatusIndicator publishedDocumentId={publishedDocumentId} />\n ) : (\n <StatusDotPlaceholder />\n )}\n </Box>\n </Flex>\n </Flex>\n </Card>","<Tooltip\n delay={{open: 400}}\n placement=\"bottom-end\"\n content={\n publishedDocumentId ? (\n <DocumentVersionsStatus documentGroupId={publishedDocumentId} />\n ) : null\n }\n disabled={!publishedDocumentId}\n >\n <Card\n {...(linkProps as object | undefined)}\n __unstable_focusRing\n as={linkComponent ? (linkComponent as ElementType) : undefined}\n data-as={onClick || linkComponent ? 'a' : undefined}\n flex={1}\n onClick={onClick}\n padding={1}\n radius={2}\n tabIndex={0}\n tone={validationTone}\n >\n <Flex\n alignItems=\"center\"\n gap={3}\n justifyContent=\"flex-start\"\n paddingLeft={children ? 0 : [1, 2]}\n >\n {children && <Box style={{flexBasis: 'auto', flexGrow: 1}}>{children}</Box>}\n\n {/* Badge */}\n {schedule.action === 'unpublish' && (\n <Flex style={{flexShrink: 0}}>\n <Badge fontSize={0} tone={SCHEDULE_ACTION_DICTIONARY[schedule.action].badgeTone}>\n {schedule.action}\n </Badge>\n </Flex>\n )}\n\n {/* Schedule date */}\n <Box display={['block', 'none']} style={{flexShrink: 0, width: '90px'}}>\n <Stack gap={2}>\n {scheduleDate ? (\n <>\n <Text size={1}>\n {formatDateTz({date: scheduleDate, format: 'dd/MM/yyyy'})}\n </Text>\n <Text size={1}>{formatDateTz({date: scheduleDate, format: 'p'})}</Text>\n </>\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Stack>\n </Box>\n <Box\n display={['none', 'block']}\n style={{flexShrink: 0, maxWidth: '250px', width: children ? '35%' : 'auto'}}\n >\n {scheduleDate ? (\n <DateWithTooltip date={scheduleDate} useElementQueries={useElementQueries} />\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Box>\n\n {/* HACK: render invisible preview wrapper when no children are provided to ensure consistent height */}\n {!children && (\n <Box style={{visibility: 'hidden'}}>\n <SanityDefaultPreview isPlaceholder />\n </Box>\n )}\n\n <Flex alignItems=\"center\" style={{flexShrink: 0, marginLeft: 'auto'}}>\n {/* Avatar */}\n <Box display={['none', 'none', 'block']} marginX={3} style={{flexShrink: 0}}>\n <User id={schedule?.author} />\n </Box>\n\n {/* Document status */}\n <Box display={['none', 'block']} marginX={[2, 2, 3]} style={{flexShrink: 0}}>\n {publishedDocumentId ? (\n <ScheduleItemStatusIndicator publishedDocumentId={publishedDocumentId} />\n ) : (\n <StatusDotPlaceholder />\n )}\n </Box>\n </Flex>\n </Flex>\n </Card>\n </Tooltip>","{width: '38px'}","schedule.state === 'scheduled' && (\n <Box>\n <ValidateScheduleDoc schedule={schedule} updateValidation={setValidationStatus} />\n <ValidationInfo\n markers={validation}\n type={schemaType}\n documentId={publishedDocumentId}\n menuHeader={\n <Box padding={2}>\n <Text size={1}>\n {hasError ? DOCUMENT_HAS_ERRORS_TEXT : DOCUMENT_HAS_WARNINGS_TEXT}\n </Text>\n </Box>\n }\n />\n </Box>\n )","schedule.state","schedule.state === 'cancelled' && (\n <StateReasonFailedInfo stateReason={schedule.stateReason} />\n )","stateReason","<Flex justifyContent=\"center\" style={{width: '38px'}}>\n {/* Validation status (only displayed on upcoming schedules) */}\n {schedule.state === 'scheduled' && (\n <Box>\n <ValidateScheduleDoc schedule={schedule} updateValidation={setValidationStatus} />\n <ValidationInfo\n markers={validation}\n type={schemaType}\n documentId={publishedDocumentId}\n menuHeader={\n <Box padding={2}>\n <Text size={1}>\n {hasError ? DOCUMENT_HAS_ERRORS_TEXT : DOCUMENT_HAS_WARNINGS_TEXT}\n </Text>\n </Box>\n }\n />\n </Box>\n )}\n\n {/* Failed state reason (only displayed on cancelled schedules) */}\n {schedule.state === 'cancelled' && (\n <StateReasonFailedInfo stateReason={schedule.stateReason} />\n )}\n </Flex>","schedule.state === 'cancelled' && (\n <StateReasonFailedInfo stateReason={schedule.stateReason} />\n )","contextMenu && (\n <Box style={{flexShrink: 0}} paddingRight={2}>\n {contextMenu}\n </Box>\n )","<Flex alignItems=\"center\" gap={1} justifyContent=\"space-between\">\n <Tooltip\n delay={{open: 400}}\n placement=\"bottom-end\"\n content={\n publishedDocumentId ? (\n <DocumentVersionsStatus documentGroupId={publishedDocumentId} />\n ) : null\n }\n disabled={!publishedDocumentId}\n >\n <Card\n {...(linkProps as object | undefined)}\n __unstable_focusRing\n as={linkComponent ? (linkComponent as ElementType) : undefined}\n data-as={onClick || linkComponent ? 'a' : undefined}\n flex={1}\n onClick={onClick}\n padding={1}\n radius={2}\n tabIndex={0}\n tone={validationTone}\n >\n <Flex\n alignItems=\"center\"\n gap={3}\n justifyContent=\"flex-start\"\n paddingLeft={children ? 0 : [1, 2]}\n >\n {children && <Box style={{flexBasis: 'auto', flexGrow: 1}}>{children}</Box>}\n\n {/* Badge */}\n {schedule.action === 'unpublish' && (\n <Flex style={{flexShrink: 0}}>\n <Badge fontSize={0} tone={SCHEDULE_ACTION_DICTIONARY[schedule.action].badgeTone}>\n {schedule.action}\n </Badge>\n </Flex>\n )}\n\n {/* Schedule date */}\n <Box display={['block', 'none']} style={{flexShrink: 0, width: '90px'}}>\n <Stack gap={2}>\n {scheduleDate ? (\n <>\n <Text size={1}>\n {formatDateTz({date: scheduleDate, format: 'dd/MM/yyyy'})}\n </Text>\n <Text size={1}>{formatDateTz({date: scheduleDate, format: 'p'})}</Text>\n </>\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Stack>\n </Box>\n <Box\n display={['none', 'block']}\n style={{flexShrink: 0, maxWidth: '250px', width: children ? '35%' : 'auto'}}\n >\n {scheduleDate ? (\n <DateWithTooltip date={scheduleDate} useElementQueries={useElementQueries} />\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Box>\n\n {/* HACK: render invisible preview wrapper when no children are provided to ensure consistent height */}\n {!children && (\n <Box style={{visibility: 'hidden'}}>\n <SanityDefaultPreview isPlaceholder />\n </Box>\n )}\n\n <Flex alignItems=\"center\" style={{flexShrink: 0, marginLeft: 'auto'}}>\n {/* Avatar */}\n <Box display={['none', 'none', 'block']} marginX={3} style={{flexShrink: 0}}>\n <User id={schedule?.author} />\n </Box>\n\n {/* Document status */}\n <Box display={['none', 'block']} marginX={[2, 2, 3]} style={{flexShrink: 0}}>\n {publishedDocumentId ? (\n <ScheduleItemStatusIndicator publishedDocumentId={publishedDocumentId} />\n ) : (\n <StatusDotPlaceholder />\n )}\n </Box>\n </Flex>\n </Flex>\n </Card>\n </Tooltip>\n\n <Flex justifyContent=\"center\" style={{width: '38px'}}>\n {/* Validation status (only displayed on upcoming schedules) */}\n {schedule.state === 'scheduled' && (\n <Box>\n <ValidateScheduleDoc schedule={schedule} updateValidation={setValidationStatus} />\n <ValidationInfo\n markers={validation}\n type={schemaType}\n documentId={publishedDocumentId}\n menuHeader={\n <Box padding={2}>\n <Text size={1}>\n {hasError ? DOCUMENT_HAS_ERRORS_TEXT : DOCUMENT_HAS_WARNINGS_TEXT}\n </Text>\n </Box>\n }\n />\n </Box>\n )}\n\n {/* Failed state reason (only displayed on cancelled schedules) */}\n {schedule.state === 'cancelled' && (\n <StateReasonFailedInfo stateReason={schedule.stateReason} />\n )}\n </Flex>\n\n {/* Failed state reason (only displayed on cancelled schedules) */}\n {schedule.state === 'cancelled' && (\n <StateReasonFailedInfo stateReason={schedule.stateReason} />\n )}\n\n {/* Context menu */}\n {contextMenu && (\n <Box style={{flexShrink: 0}} paddingRight={2}>\n {contextMenu}\n </Box>\n )}\n </Flex>","<Card\n padding={1}\n radius={2}\n shadow={1}\n tone={validationTone}\n style={mode === 'upsell' && schedule.state === 'scheduled' ? {opacity: 0.7} : undefined}\n >\n <Flex alignItems=\"center\" gap={1} justifyContent=\"space-between\">\n <Tooltip\n delay={{open: 400}}\n placement=\"bottom-end\"\n content={\n publishedDocumentId ? (\n <DocumentVersionsStatus documentGroupId={publishedDocumentId} />\n ) : null\n }\n disabled={!publishedDocumentId}\n >\n <Card\n {...(linkProps as object | undefined)}\n __unstable_focusRing\n as={linkComponent ? (linkComponent as ElementType) : undefined}\n data-as={onClick || linkComponent ? 'a' : undefined}\n flex={1}\n onClick={onClick}\n padding={1}\n radius={2}\n tabIndex={0}\n tone={validationTone}\n >\n <Flex\n alignItems=\"center\"\n gap={3}\n justifyContent=\"flex-start\"\n paddingLeft={children ? 0 : [1, 2]}\n >\n {children && <Box style={{flexBasis: 'auto', flexGrow: 1}}>{children}</Box>}\n\n {/* Badge */}\n {schedule.action === 'unpublish' && (\n <Flex style={{flexShrink: 0}}>\n <Badge fontSize={0} tone={SCHEDULE_ACTION_DICTIONARY[schedule.action].badgeTone}>\n {schedule.action}\n </Badge>\n </Flex>\n )}\n\n {/* Schedule date */}\n <Box display={['block', 'none']} style={{flexShrink: 0, width: '90px'}}>\n <Stack gap={2}>\n {scheduleDate ? (\n <>\n <Text size={1}>\n {formatDateTz({date: scheduleDate, format: 'dd/MM/yyyy'})}\n </Text>\n <Text size={1}>{formatDateTz({date: scheduleDate, format: 'p'})}</Text>\n </>\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Stack>\n </Box>\n <Box\n display={['none', 'block']}\n style={{flexShrink: 0, maxWidth: '250px', width: children ? '35%' : 'auto'}}\n >\n {scheduleDate ? (\n <DateWithTooltip date={scheduleDate} useElementQueries={useElementQueries} />\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Box>\n\n {/* HACK: render invisible preview wrapper when no children are provided to ensure consistent height */}\n {!children && (\n <Box style={{visibility: 'hidden'}}>\n <SanityDefaultPreview isPlaceholder />\n </Box>\n )}\n\n <Flex alignItems=\"center\" style={{flexShrink: 0, marginLeft: 'auto'}}>\n {/* Avatar */}\n <Box display={['none', 'none', 'block']} marginX={3} style={{flexShrink: 0}}>\n <User id={schedule?.author} />\n </Box>\n\n {/* Document status */}\n <Box display={['none', 'block']} marginX={[2, 2, 3]} style={{flexShrink: 0}}>\n {publishedDocumentId ? (\n <ScheduleItemStatusIndicator publishedDocumentId={publishedDocumentId} />\n ) : (\n <StatusDotPlaceholder />\n )}\n </Box>\n </Flex>\n </Flex>\n </Card>\n </Tooltip>\n\n <Flex justifyContent=\"center\" style={{width: '38px'}}>\n {/* Validation status (only displayed on upcoming schedules) */}\n {schedule.state === 'scheduled' && (\n <Box>\n <ValidateScheduleDoc schedule={schedule} updateValidation={setValidationStatus} />\n <ValidationInfo\n markers={validation}\n type={schemaType}\n documentId={publishedDocumentId}\n menuHeader={\n <Box padding={2}>\n <Text size={1}>\n {hasError ? DOCUMENT_HAS_ERRORS_TEXT : DOCUMENT_HAS_WARNINGS_TEXT}\n </Text>\n </Box>\n }\n />\n </Box>\n )}\n\n {/* Failed state reason (only displayed on cancelled schedules) */}\n {schedule.state === 'cancelled' && (\n <StateReasonFailedInfo stateReason={schedule.stateReason} />\n )}\n </Flex>\n\n {/* Failed state reason (only displayed on cancelled schedules) */}\n {schedule.state === 'cancelled' && (\n <StateReasonFailedInfo stateReason={schedule.stateReason} />\n )}\n\n {/* Context menu */}\n {contextMenu && (\n <Box style={{flexShrink: 0}} paddingRight={2}>\n {contextMenu}\n </Box>\n )}\n </Flex>\n </Card>","{publishedDocumentId}: {publishedDocumentId: string}","{documentId: publishedDocumentId}","<DocumentVersionsStatusIndicator documentVersions={versions} />","timeZoneScope","getScheduledDocumentId(schedule)","useMemo(() => getScheduledDocumentId(schedule), [schedule])","DialogScheduleEdit && <DialogScheduleEdit {...dialogProps} />","{\n delete: true,\n edit: true,\n }","<ScheduleContextMenu\n actions={{\n delete: true,\n edit: true,\n }}\n onDelete={onComplete}\n onEdit={dialogScheduleEditShow}\n schedule={schedule}\n schemaType={schemaType}\n />","<PreviewWrapper\n contextMenu={\n <ScheduleContextMenu\n actions={{\n delete: true,\n edit: true,\n }}\n onDelete={onComplete}\n onEdit={dialogScheduleEditShow}\n schedule={schedule}\n schemaType={schemaType}\n />\n }\n onClick={dialogScheduleEditShow}\n publishedDocumentId={publishedId}\n schedule={schedule}\n schemaType={schemaType}\n />","<>\n {/* Dialogs (rendered outside of cards so they don't infer card colors) */}\n {DialogScheduleEdit && <DialogScheduleEdit {...dialogProps} />}\n\n <PreviewWrapper\n contextMenu={\n <ScheduleContextMenu\n actions={{\n delete: true,\n edit: true,\n }}\n onDelete={onComplete}\n onEdit={dialogScheduleEditShow}\n schedule={schedule}\n schemaType={schemaType}\n />\n }\n onClick={dialogScheduleEditShow}\n publishedDocumentId={publishedId}\n schedule={schedule}\n schemaType={schemaType}\n />\n </>","() => {\n void deleteSchedule({schedule}).then(() => onDelete?.())\n }","<ContextMenuButton />","<Menu>\n <MenuItem\n icon={TrashIcon}\n onClick={handleDelete}\n text=\"Delete schedule\"\n tone=\"critical\"\n />\n </Menu>","{placement: 'left', portal: true, tone: 'default'}","<MenuButton\n button={<ContextMenuButton />}\n id=\"contextMenu\"\n menu={\n <Menu>\n <MenuItem\n icon={TrashIcon}\n onClick={handleDelete}\n text=\"Delete schedule\"\n tone=\"critical\"\n />\n </Menu>\n }\n popover={{placement: 'left', portal: true, tone: 'default'}}\n />","{schedule}: {schedule: Schedule}","<FallbackContextMenu schedule={schedule} />","<SanityDefaultPreview\n icon={UnknownIcon}\n layout=\"default\"\n subtitle={<em>It may have been deleted</em>}\n title={<em style={{color: red[600].hex}}>Document not found</em>}\n />","<PreviewWrapper\n contextMenu={<FallbackContextMenu schedule={schedule} />}\n schedule={schedule}\n useElementQueries\n >\n <SanityDefaultPreview\n icon={UnknownIcon}\n layout=\"default\"\n subtitle={<em>It may have been deleted</em>}\n title={<em style={{color: red[600].hex}}>Document not found</em>}\n />\n </PreviewWrapper>","timeZoneScope","visibleDocument ? getPublishedId(visibleDocument._id) : undefined","DialogScheduleEdit && <DialogScheduleEdit {...dialogProps} />","{\n clear: isCompleted,\n delete: !isCompleted,\n edit: isScheduled,\n execute: isScheduled,\n }","!isCompleted","<ScheduleContextMenu\n actions={{\n clear: isCompleted,\n delete: !isCompleted,\n edit: isScheduled,\n execute: isScheduled,\n }}\n onEdit={dialogScheduleEditShow}\n schedule={schedule}\n schemaType={schemaType}\n />","publishedDocId ? {id: publishedDocId} : {}","{\n intent: 'edit',\n params: {\n type: schemaType.name,\n ...(publishedDocId ? {id: publishedDocId} : {}),\n },\n }","name","previewState.isLoading ? (\n <SanityDefaultPreview\n icon={schemaType?.icon as ComponentType}\n isPlaceholder={previewState.isLoading}\n layout=\"default\"\n />\n ) : (\n <Preview layout=\"default\" schemaType={schemaType} value={visibleDocument} />\n )","isLoading","schemaType?.icon","<PreviewWrapper\n contextMenu={\n <ScheduleContextMenu\n actions={{\n clear: isCompleted,\n delete: !isCompleted,\n edit: isScheduled,\n execute: isScheduled,\n }}\n onEdit={dialogScheduleEditShow}\n schedule={schedule}\n schemaType={schemaType}\n />\n }\n linkComponent={IntentLink}\n linkProps={{\n intent: 'edit',\n params: {\n type: schemaType.name,\n ...(publishedDocId ? {id: publishedDocId} : {}),\n },\n }}\n publishedDocumentId={publishedDocId}\n schedule={schedule}\n schemaType={schemaType}\n useElementQueries\n >\n {previewState.isLoading ? (\n <SanityDefaultPreview\n icon={schemaType?.icon as ComponentType}\n isPlaceholder={previewState.isLoading}\n layout=\"default\"\n />\n ) : (\n <Preview layout=\"default\" schemaType={schemaType} value={visibleDocument} />\n )}\n </PreviewWrapper>","<>\n {/* Dialogs (rendered outside of cards so they don't infer card colors) */}\n {DialogScheduleEdit && <DialogScheduleEdit {...dialogProps} />}\n <PreviewWrapper\n contextMenu={\n <ScheduleContextMenu\n actions={{\n clear: isCompleted,\n delete: !isCompleted,\n edit: isScheduled,\n execute: isScheduled,\n }}\n onEdit={dialogScheduleEditShow}\n schedule={schedule}\n schemaType={schemaType}\n />\n }\n linkComponent={IntentLink}\n linkProps={{\n intent: 'edit',\n params: {\n type: schemaType.name,\n ...(publishedDocId ? {id: publishedDocId} : {}),\n },\n }}\n publishedDocumentId={publishedDocId}\n schedule={schedule}\n schemaType={schemaType}\n useElementQueries\n >\n {previewState.isLoading ? (\n <SanityDefaultPreview\n icon={schemaType?.icon as ComponentType}\n isPlaceholder={previewState.isLoading}\n layout=\"default\"\n />\n ) : (\n <Preview layout=\"default\" schemaType={schemaType} value={visibleDocument} />\n )}\n </PreviewWrapper>\n </>","getScheduledDocument(schedule)","useMemo(() => {\n if (!schemaType || invalidDocument) {\n return <NoSchemaItem schedule={schedule} />\n }\n\n if (type === 'document') {\n return <DocumentPreview schedule={schedule} schemaType={schemaType} />\n }\n\n if (type === 'tool') {\n return <ToolPreview previewState={previewState} schedule={schedule} schemaType={schemaType} />\n }\n\n return null\n }, [invalidDocument, type, previewState, schedule, schemaType])","<NoSchemaItem schedule={schedule} />","<DocumentPreview schedule={schedule} schemaType={schemaType} />","<ToolPreview previewState={previewState} schedule={schedule} schemaType={schemaType} />","<DateWithTooltipElementQuery>{preview}</DateWithTooltipElementQuery>"],"sources":["../src/core/scheduled-publishing/components/dialogs/TimeZoneButtonElementQuery.tsx","../src/core/scheduled-publishing/components/dialogs/DialogHeader.tsx","../src/core/scheduled-publishing/components/dateInputs/base/calendar/CalendarDay.tsx","../src/core/scheduled-publishing/components/dateInputs/base/calendar/constants.ts","../src/core/scheduled-publishing/components/dateInputs/base/calendar/utils.ts","../src/core/scheduled-publishing/components/dateInputs/base/calendar/CalendarMonth.tsx","../src/core/scheduled-publishing/components/dateInputs/base/calendar/features.ts","../src/core/scheduled-publishing/components/dateInputs/base/calendar/YearInput.tsx","../src/core/scheduled-publishing/components/dateInputs/base/calendar/Calendar.tsx","../src/core/scheduled-publishing/components/dateInputs/base/DatePicker.tsx","../src/core/scheduled-publishing/components/dateInputs/base/DateTimeInput.tsx","../src/core/scheduled-publishing/components/dateInputs/CommonDateTimeInput.tsx","../src/core/scheduled-publishing/components/dateInputs/utils.ts","../src/core/scheduled-publishing/components/dateInputs/DateTimeInput.tsx","../src/core/scheduled-publishing/components/editScheduleForm/ScheduleForm.tsx","../src/core/scheduled-publishing/components/editScheduleForm/EditScheduleForm.tsx","../src/core/scheduled-publishing/components/errorCallout/ErrorCallout.tsx","../src/core/scheduled-publishing/contexts/documentActionProps.tsx","../src/core/scheduled-publishing/hooks/useScheduleForm.ts","../src/core/scheduled-publishing/components/validation/ValidationListItem.tsx","../src/core/scheduled-publishing/components/validation/ValidationList.tsx","../src/core/scheduled-publishing/components/validation/ValidationInfo.tsx","../src/core/scheduled-publishing/utils/paneItemHelpers.tsx","../src/core/scheduled-publishing/hooks/useSchemaType.ts","../src/core/scheduled-publishing/hooks/usePreviewState.ts","../src/core/scheduled-publishing/components/scheduleItem/dateWithTooltip/DateWithTooltipElementQuery.tsx","../src/core/scheduled-publishing/components/dialogs/DialogScheduleEdit.tsx","../src/core/scheduled-publishing/hooks/useDialogVisibile.ts","../src/core/scheduled-publishing/hooks/useDialogScheduleEdit.ts","../src/core/scheduled-publishing/components/scheduleContextMenu/MenuItemWithPermissionsTooltip.tsx","../src/core/scheduled-publishing/components/scheduleContextMenu/ContextMenuItems.tsx","../src/core/scheduled-publishing/components/scheduleContextMenu/ScheduleContextMenu.tsx","../src/core/scheduled-publishing/components/validation/SchedulesValidation.tsx","../src/core/scheduled-publishing/components/scheduleItem/dateWithTooltip/DateWithTooltip.tsx","../src/core/scheduled-publishing/components/scheduleItem/StateReasonFailedInfo.tsx","../src/core/scheduled-publishing/components/scheduleItem/User.tsx","../src/core/scheduled-publishing/components/scheduleItem/PreviewWrapper.tsx","../src/core/scheduled-publishing/components/scheduleItem/DocumentPreview.tsx","../src/core/scheduled-publishing/components/scheduleContextMenu/FallbackContextMenu.tsx","../src/core/scheduled-publishing/components/scheduleItem/NoSchemaItem.tsx","../src/core/scheduled-publishing/components/scheduleItem/ToolPreview.tsx","../src/core/scheduled-publishing/components/scheduleItem/ScheduleItem.tsx"],"sourcesContent":["import {ElementQuery} from '@sanity/ui'\nimport {styled} from 'styled-components'\n\nconst TimeZoneButtonElementQuery = styled(ElementQuery)`\n .button-small {\n display: block;\n }\n .button-large {\n display: none;\n }\n\n &[data-eq-min~='2'] {\n .button-small {\n display: none;\n }\n .button-large {\n display: block;\n }\n }\n`\n\nexport default TimeZoneButtonElementQuery\n","import {Flex, Box} from 'ui5'\n\nimport {TimeZoneButton} from '../../../components/timeZone/timeZoneButton/TimeZoneButton'\nimport {type TimeZoneScope, useTimeZone} from '../../../hooks/useTimeZone'\nimport {useTranslation} from '../../../i18n/hooks/useTranslation'\nimport TimeZoneButtonElementQuery from './TimeZoneButtonElementQuery'\n\ninterface Props {\n title: string\n timeZoneScope: TimeZoneScope\n}\n\nconst DialogHeader = (props: Props) => {\n const {title, timeZoneScope} = props\n const {timeZone} = useTimeZone(timeZoneScope)\n const {t} = useTranslation()\n return (\n <TimeZoneButtonElementQuery>\n <Flex alignItems=\"center\">\n {title}\n {/*\n HACK: Sanity UI will attempt to focus the first 'focusable' descendant of any dialog.\n Typically this is fine, but since our first focusable element is a button with a tooltip, this\n default behaviour causes the tooltip to appear whenever the dialog is opened, which we don't want!\n\n To get around this, we include a pseudo-hidden input to ensure our tooltip-enabled button remains\n unfocused on initial mount.\n */}\n <input style={{opacity: 0, position: 'absolute', width: 0}} tabIndex={-1} type=\"button\" />\n <Box marginLeft={2} style={{marginTop: '-1em', marginBottom: '-1em'}}>\n <TimeZoneButton\n tooltipContent={t('time-zone.time-zone-tooltip-scheduled-publishing', {\n alternativeName: timeZone.alternativeName,\n offset: timeZone.offset,\n })}\n timeZoneScope={timeZoneScope}\n useElementQueries\n />\n </Box>\n </Flex>\n </TimeZoneButtonElementQuery>\n )\n}\n\nexport default DialogHeader\n","import {Card, Text} from '@sanity/ui'\nimport {endOfDay} from 'date-fns/endOfDay'\nimport {useCallback, useMemo} from 'react'\n\ninterface CalendarDayProps {\n date: Date\n focused?: boolean\n onSelect: (date: Date) => void\n isCurrentMonth?: boolean\n isToday: boolean\n customValidation?: (selectedDate: Date) => boolean\n selected?: boolean\n}\n\nexport function CalendarDay(props: CalendarDayProps) {\n const {date, focused, isCurrentMonth, isToday, customValidation, onSelect, selected} = props\n\n // Round date to the end of day when passing to custom validate function.\n // Remember that all calendar days are in UTC, but comparison is done with 'wall clock' time.\n const isValid = useMemo(() => {\n if (!customValidation) {\n return true\n }\n return customValidation(endOfDay(date))\n }, [date, customValidation])\n\n const handleClick = useCallback(() => {\n if (isValid) {\n onSelect(date)\n }\n }, [date, isValid, onSelect])\n\n return (\n <div aria-selected={selected} data-ui=\"CalendarDay\">\n <Card\n aria-label={date.toDateString()}\n aria-pressed={selected}\n as=\"button\"\n __unstable_focusRing\n data-weekday\n data-focused={focused ? 'true' : ''}\n disabled={!isValid}\n role=\"button\"\n tabIndex={-1}\n onClick={handleClick}\n padding={3}\n radius={2}\n selected={selected}\n tone={isToday || selected ? 'primary' : 'default'}\n >\n <Text\n muted={!selected && !isCurrentMonth}\n style={{textAlign: 'center'}}\n weight={isCurrentMonth ? 'medium' : 'regular'}\n >\n {date.getDate()}\n </Text>\n </Card>\n </div>\n )\n}\n","import range from 'lodash-es/range.js'\n\nexport const MONTH_NAMES = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n]\n\nexport const WEEK_DAY_NAMES = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']\n\nexport const HOURS_24 = range(0, 24)\n\nexport const ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight']\n\nexport const DEFAULT_TIME_PRESETS = [\n [0, 0],\n [6, 0],\n [12, 0],\n [18, 0],\n [23, 59],\n]\n\n// all weekdays except first\nexport const TAIL_WEEKDAYS = [1, 2, 3, 4, 5, 6]\n","import {addDays} from 'date-fns/addDays'\nimport {eachWeekOfInterval} from 'date-fns/eachWeekOfInterval'\nimport {getWeek} from 'date-fns/getWeek'\nimport {lastDayOfMonth} from 'date-fns/lastDayOfMonth'\nimport {startOfMonth} from 'date-fns/startOfMonth'\n\nimport {TAIL_WEEKDAYS} from './constants'\n\nconst getWeekStartsOfMonth = (date: Date): Date[] => {\n const firstDay = startOfMonth(date)\n return eachWeekOfInterval({\n start: firstDay,\n end: lastDayOfMonth(firstDay),\n })\n}\n\nconst getWeekDaysFromWeekStarts = (weekStarts: Date[]): Date[][] => {\n return weekStarts.map((weekStart) => [\n weekStart,\n ...TAIL_WEEKDAYS.map((d) => addDays(weekStart, d)),\n ])\n}\n\ntype Week = {\n number: number\n days: Date[]\n}\n\nexport const getWeeksOfMonth = (date: Date): Week[] =>\n getWeekDaysFromWeekStarts(getWeekStartsOfMonth(date)).map((days): Week => ({\n number: getWeek(days[0]),\n days,\n }))\n\nexport const formatTime = (hours: number, minutes: number): string =>\n `${`${hours}`.padStart(2, '0')}:${`${minutes}`.padStart(2, '0')}`\n","import {Text} from '@sanity/ui'\nimport {isSameDay} from 'date-fns/isSameDay'\nimport {isSameMonth} from 'date-fns/isSameMonth'\nimport {Grid, Box} from 'ui5'\n\nimport {type TimeZoneScope, useTimeZone} from '../../../../../hooks/useTimeZone'\nimport {CalendarDay} from './CalendarDay'\nimport {WEEK_DAY_NAMES} from './constants'\nimport {getWeeksOfMonth} from './utils'\n\ninterface CalendarMonthProps {\n date: Date\n focused?: Date\n selected?: Date\n onSelect: (date: Date) => void\n hidden?: boolean\n customValidation?: (selectedDate: Date) => boolean\n timeZoneScope: TimeZoneScope\n}\n\nexport function CalendarMonth(props: CalendarMonthProps) {\n const {customValidation, timeZoneScope} = props\n const {getCurrentZoneDate} = useTimeZone(timeZoneScope)\n return (\n <Box aria-hidden={props.hidden || false} data-ui=\"CalendarMonth\">\n <Grid gap={1} style={{gridTemplateColumns: 'repeat(7, minmax(44px, 46px))'}}>\n {WEEK_DAY_NAMES.map((weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n ))}\n\n {/* Note: UTC dates are passed to each Calendar day but we use 'wall time' for comparison */}\n {getWeeksOfMonth(props.date).map((week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, getCurrentZoneDate())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n customValidation={customValidation}\n onSelect={props.onSelect}\n selected={selected}\n />\n )\n }),\n )}\n </Grid>\n </Box>\n )\n}\n","export const features = {\n dayPresets: false,\n timePresets: false,\n}\n","import {type ChangeEvent, type ComponentProps, type FocusEvent, useCallback} from 'react'\n\nimport {LazyTextInput} from '../../../../../components/inputs/DateInputs/LazyTextInput'\n\ntype Props = Omit<ComponentProps<typeof LazyTextInput>, 'onChange' | 'value'> & {\n value?: number\n onChange: (year: number) => void\n}\n\nexport const YearInput = ({onChange, ...props}: Props) => {\n const handleChange = useCallback(\n (event: FocusEvent<HTMLInputElement> | ChangeEvent<HTMLInputElement>) => {\n const numericValue = parseInt(event.currentTarget.value, 10)\n if (!isNaN(numericValue)) {\n onChange(numericValue)\n }\n },\n [onChange],\n )\n\n return (\n <LazyTextInput\n data-testid=\"date-input\"\n {...props}\n onChange={handleChange}\n inputMode=\"numeric\"\n />\n )\n}\n","import {ChevronLeftIcon} from '@sanity/icons/ChevronLeft'\nimport {ChevronRightIcon} from '@sanity/icons/ChevronRight'\nimport {\n // oxlint-disable-next-line no-restricted-imports\n Button,\n Select,\n Text,\n} from '@sanity/ui'\nimport {addDays} from 'date-fns/addDays'\nimport {addMonths} from 'date-fns/addMonths'\nimport {setDate} from 'date-fns/setDate'\nimport {setHours} from 'date-fns/setHours'\nimport {setMinutes} from 'date-fns/setMinutes'\nimport {setMonth} from 'date-fns/setMonth'\nimport {setYear} from 'date-fns/setYear'\nimport range from 'lodash-es/range.js'\nimport {\n type ComponentProps,\n type FormEvent,\n type KeyboardEvent,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n type RefAttributes,\n} from 'react'\nimport {Flex, Box} from 'ui5'\n\nimport {type TimeZoneScope, useTimeZone} from '../../../../../hooks/useTimeZone'\nimport {CalendarMonth} from './CalendarMonth'\nimport {ARROW_KEYS, DEFAULT_TIME_PRESETS, HOURS_24, MONTH_NAMES} from './constants'\nimport {features} from './features'\nimport {formatTime} from './utils'\nimport {YearInput} from './YearInput'\n\nexport type CalendarProps = Omit<ComponentProps<'div'>, 'onSelect'> & {\n selectTime?: boolean\n selectedDate?: Date\n timeStep?: number\n onSelect: (date: Date) => void\n focusedDate: Date\n onFocusedDateChange: (index: Date) => void\n customValidation?: (selectedDate: Date) => boolean\n timeZoneScope: TimeZoneScope\n}\n\n// This is used to maintain focus on a child element of the calendar-grid between re-renders\n// When using arrow keys to move focus from a day in one month to another we are setting focus at the button for the day\n// after it has changed but *only* if we *already* had focus inside the calendar grid (e.g not if focus was on the \"next\n// year\" button, or any of the other controls)\n// When moving from the last day of a month that displays 6 weeks in the grid to a month that displays 5 weeks, current\n// focus gets lost on render, so this provides us with a stable element to help us preserve focus on a child element of\n// the calendar grid between re-renders\nconst PRESERVE_FOCUS_ELEMENT = (\n <span\n data-preserve-focus\n style={{overflow: 'hidden', position: 'absolute', outline: 'none'}}\n tabIndex={-1}\n />\n)\n\nexport function Calendar(props: CalendarProps & RefAttributes<HTMLDivElement>) {\n const {getCurrentZoneDate, zoneDateToUtc} = useTimeZone(props.timeZoneScope)\n const {\n ref: forwardedRef,\n selectTime,\n onFocusedDateChange,\n selectedDate = getCurrentZoneDate(),\n focusedDate = selectedDate,\n timeStep = 1,\n onSelect,\n customValidation,\n timeZoneScope,\n ...restProps\n } = props\n\n const setFocusedDate = useCallback(\n (date: Date) => onFocusedDateChange(zoneDateToUtc(date)),\n [onFocusedDateChange, zoneDateToUtc],\n )\n\n const setFocusedDateMonth = useCallback(\n (month: number) => setFocusedDate(setDate(setMonth(focusedDate, month), 1)),\n [focusedDate, setFocusedDate],\n )\n\n const handleFocusedMonthChange = useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (e: FormEvent<HTMLSelectElement>) => setFocusedDateMonth(Number(e.currentTarget.value)),\n [setFocusedDateMonth],\n )\n\n const moveFocusedDate = useCallback(\n (by: number) => setFocusedDate(addMonths(focusedDate, by)),\n [focusedDate, setFocusedDate],\n )\n\n const setFocusedDateYear = useCallback(\n (year: number) => setFocusedDate(setYear(focusedDate, year)),\n [focusedDate, setFocusedDate],\n )\n\n const handleDateChange = useCallback(\n (date: Date) => {\n onSelect(\n zoneDateToUtc(\n setMinutes(setHours(date, selectedDate.getHours()), selectedDate.getMinutes()),\n ),\n )\n },\n [onSelect, selectedDate, zoneDateToUtc],\n )\n\n const handleMinutesChange = useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (event: FormEvent<HTMLSelectElement>) => {\n const m = Number(event.currentTarget.value)\n onSelect(zoneDateToUtc(setMinutes(selectedDate, m)))\n },\n [onSelect, selectedDate, zoneDateToUtc],\n )\n\n const handleHoursChange = useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (event: FormEvent<HTMLSelectElement>) => {\n const m = Number(event.currentTarget.value)\n onSelect(zoneDateToUtc(setHours(selectedDate, m)))\n },\n [onSelect, selectedDate, zoneDateToUtc],\n )\n\n const handleTimeChange = useCallback(\n (hours: number, mins: number) => {\n onSelect(zoneDateToUtc(setHours(setMinutes(selectedDate, mins), hours)))\n },\n [onSelect, selectedDate, zoneDateToUtc],\n )\n\n const ref = useRef<HTMLDivElement | null>(null)\n useImperativeHandle<HTMLDivElement | null, HTMLDivElement | null>(forwardedRef, () => ref.current)\n\n const focusCurrentWeekDay = useCallback(() => {\n ref.current?.querySelector<HTMLElement>(`[data-focused=\"true\"]`)?.focus()\n }, [ref])\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (!ARROW_KEYS.includes(event.key)) {\n return\n }\n event.preventDefault()\n if (event.currentTarget.hasAttribute('data-calendar-grid')) {\n focusCurrentWeekDay()\n return\n }\n if (event.key === 'ArrowUp') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, -7)))\n }\n if (event.key === 'ArrowDown') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, 7)))\n }\n if (event.key === 'ArrowLeft') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, -1)))\n }\n if (event.key === 'ArrowRight') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, 1)))\n }\n // set focus temporarily on this element to make sure focus is still inside the calendar-grid after re-render\n ref.current?.querySelector<HTMLElement>('[data-preserve-focus]')?.focus()\n },\n [zoneDateToUtc, ref, focusCurrentWeekDay, onFocusedDateChange, focusedDate],\n )\n\n useEffect(() => {\n focusCurrentWeekDay()\n }, [focusCurrentWeekDay])\n\n useEffect(() => {\n const currentFocusInCalendarGrid = document.activeElement?.matches(\n '[data-calendar-grid], [data-calendar-grid] [data-preserve-focus]',\n )\n if (\n // Only move focus if it's currently in the calendar grid\n currentFocusInCalendarGrid\n ) {\n focusCurrentWeekDay()\n }\n // oxlint-disable-next-line react/exhaustive-effect-dependencies -- pre-existing violation, to be fixed in a follow-up\n }, [ref, focusCurrentWeekDay, focusedDate])\n\n const handleNowClick = useCallback(() => onSelect(new Date()), [onSelect])\n\n return (\n <Box data-ui=\"Calendar\" {...restProps} ref={ref}>\n {/* Select date */}\n <Box padding={2}>\n {/* Select month and year */}\n <Flex>\n <Box flexBasis=\"0%\" flexGrow={1}>\n <CalendarMonthSelect\n moveFocusedDate={moveFocusedDate}\n onChange={handleFocusedMonthChange}\n value={focusedDate?.getMonth()}\n />\n </Box>\n <Box marginLeft={2}>\n <CalendarYearSelect\n moveFocusedDate={moveFocusedDate}\n onChange={setFocusedDateYear}\n value={focusedDate.getFullYear()}\n />\n </Box>\n </Flex>\n\n {/* Selected month (grid of days) */}\n <Box\n data-calendar-grid\n onKeyDown={handleKeyDown}\n marginTop={2}\n overflow=\"hidden\"\n tabIndex={0}\n >\n <CalendarMonth\n date={focusedDate}\n focused={focusedDate}\n customValidation={customValidation}\n onSelect={handleDateChange}\n selected={selectedDate}\n timeZoneScope={timeZoneScope}\n />\n {PRESERVE_FOCUS_ELEMENT}\n </Box>\n </Box>\n\n {/* Select time */}\n {selectTime && (\n <Box padding={2} style={{borderTop: '1px solid var(--card-border-color)'}}>\n <Flex alignItems=\"center\">\n <Flex alignItems=\"center\" flexBasis=\"0%\" flexGrow={1}>\n <Box>\n <Select\n aria-label=\"Select hour\"\n value={selectedDate?.getHours()}\n onChange={handleHoursChange}\n >\n {HOURS_24.map((h) => (\n <option key={h} value={h}>\n {`${h}`.padStart(2, '0')}\n </option>\n ))}\n </Select>\n </Box>\n\n <Box paddingX={1}>\n <Text>:</Text>\n </Box>\n\n <Box>\n <Select\n aria-label=\"Select minutes\"\n value={selectedDate?.getMinutes()}\n onChange={handleMinutesChange}\n >\n {range(0, 60, timeStep).map((m) => (\n <option key={m} value={m}>\n {`${m}`.padStart(2, '0')}\n </option>\n ))}\n </Select>\n </Box>\n </Flex>\n\n <Box marginLeft={2}>\n <Button text=\"Set to current time\" mode=\"bleed\" onClick={handleNowClick} />\n </Box>\n </Flex>\n\n {features.timePresets && (\n <Flex\n flexDirection=\"row\"\n justifyContent=\"center\"\n alignItems=\"center\"\n style={{marginTop: 5}}\n >\n {DEFAULT_TIME_PRESETS.map(([hours, minutes]) => {\n return (\n <CalendarTimePresetButton\n key={`${hours}-${minutes}`}\n hours={hours}\n minutes={minutes}\n onTimeChange={handleTimeChange}\n selectedDate={selectedDate}\n />\n )\n })}\n </Flex>\n )}\n </Box>\n )}\n </Box>\n )\n}\n\nfunction CalendarTimePresetButton(props: {\n hours: number\n minutes: number\n onTimeChange: (hours: number, minutes: number) => void\n selectedDate: Date\n}) {\n const {hours, minutes, onTimeChange, selectedDate} = props\n const formatted = formatTime(hours, minutes)\n\n const handleClick = useCallback(() => {\n onTimeChange(hours, minutes)\n }, [hours, minutes, onTimeChange])\n\n return (\n <Button\n text={formatted}\n aria-label={`${formatted} on ${selectedDate.toDateString()}`}\n mode=\"bleed\"\n fontSize={1}\n onClick={handleClick}\n />\n )\n}\n\nfunction CalendarMonthSelect(props: {\n moveFocusedDate: (by: number) => void\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n onChange: (e: FormEvent<HTMLSelectElement>) => void\n value?: number\n}) {\n const {moveFocusedDate, onChange, value} = props\n\n const handlePrevMonthClick = useCallback(() => moveFocusedDate(-1), [moveFocusedDate])\n\n const handleNextMonthClick = useCallback(() => moveFocusedDate(1), [moveFocusedDate])\n\n return (\n <Flex flexBasis=\"0%\" flexGrow={1}>\n <Button\n aria-label=\"Go to previous month\"\n onClick={handlePrevMonthClick}\n mode=\"bleed\"\n icon={ChevronLeftIcon}\n paddingX={2}\n radius={0}\n />\n <Box flexBasis=\"0%\" flexGrow={1}>\n <Select radius={0} value={value} onChange={onChange}>\n {MONTH_NAMES.map((m, i) => (\n // oxlint-disable-next-line no-array-index-key\n <option key={i} value={i}>\n {m}\n </option>\n ))}\n </Select>\n </Box>\n <Button\n aria-label=\"Go to next month\"\n mode=\"bleed\"\n icon={ChevronRightIcon}\n onClick={handleNextMonthClick}\n paddingX={2}\n radius={0}\n />\n </Flex>\n )\n}\n\nfunction CalendarYearSelect(props: {\n moveFocusedDate: (by: number) => void\n onChange: (year: number) => void\n value?: number\n}) {\n const {moveFocusedDate, onChange, value} = props\n\n const handlePrevYearClick = useCallback(() => moveFocusedDate(-12), [moveFocusedDate])\n\n const handleNextYearClick = useCallback(() => moveFocusedDate(12), [moveFocusedDate])\n\n return (\n <Flex>\n <Button\n aria-label=\"Previous year\"\n onClick={handlePrevYearClick}\n mode=\"bleed\"\n icon={ChevronLeftIcon}\n paddingX={2}\n radius={0}\n />\n <YearInput value={value} onChange={onChange} radius={0} style={{width: 65}} />\n <Button\n aria-label=\"Next year\"\n onClick={handleNextYearClick}\n mode=\"bleed\"\n icon={ChevronRightIcon}\n paddingX={2}\n radius={0}\n />\n </Flex>\n )\n}\n","import {type ComponentProps, useCallback, useState, type RefAttributes} from 'react'\n\nimport {type TimeZoneScope, useTimeZone} from '../../../../hooks/useTimeZone'\nimport {Calendar} from './calendar/Calendar'\n\nexport function DatePicker(\n props: Omit<ComponentProps<'div'>, 'onChange'> & {\n value?: Date\n onChange: (nextDate: Date) => void\n selectTime?: boolean\n timeStep?: number\n customValidation?: (selectedDate: Date) => boolean\n timeZoneScope: TimeZoneScope\n } & RefAttributes<HTMLDivElement>,\n) {\n const {ref, value: _value, onChange, customValidation, timeZoneScope, ...rest} = props\n const value = _value ?? new Date()\n const {utcToCurrentZoneDate} = useTimeZone(timeZoneScope)\n const [focusedDate, setFocusedDay] = useState<Date>()\n\n const handleSelect = useCallback(\n (nextDate: Date) => {\n onChange(nextDate)\n setFocusedDay(undefined)\n },\n [onChange],\n )\n\n return (\n <Calendar\n {...rest}\n ref={ref}\n selectedDate={utcToCurrentZoneDate(value)}\n onSelect={handleSelect}\n focusedDate={utcToCurrentZoneDate(focusedDate || value)}\n onFocusedDateChange={setFocusedDay}\n customValidation={customValidation}\n timeZoneScope={timeZoneScope}\n />\n )\n}\n","import {CalendarIcon} from '@sanity/icons/Calendar'\nimport {\n // oxlint-disable-next-line no-restricted-imports\n Button,\n LayerProvider,\n useClickOutsideEvent,\n usePortal,\n} from '@sanity/ui'\nimport {\n type FocusEvent,\n type KeyboardEvent,\n useCallback,\n useImperativeHandle,\n useRef,\n useState,\n type RefAttributes,\n} from 'react'\nimport FocusLock from 'react-focus-lock'\nimport {Box} from 'ui5'\n\nimport {Popover} from '../../../../../ui-components/popover/Popover'\nimport {LazyTextInput} from '../../../../components/inputs/DateInputs/LazyTextInput'\nimport {type TimeZoneScope} from '../../../../hooks/useTimeZone'\nimport {DatePicker} from './DatePicker'\n\ntype Props = {\n value?: Date\n id?: string\n readOnly?: boolean\n selectTime?: boolean\n timeStep?: number\n customValidity?: string\n placeholder?: string\n onInputChange?: (event: FocusEvent<HTMLInputElement>) => void\n inputValue?: string\n onChange: (date: Date | null) => void\n customValidation?: (selectedDate: Date) => boolean\n timeZoneScope: TimeZoneScope\n}\n\nexport function DateTimeInput(props: Props & RefAttributes<HTMLInputElement>) {\n const {\n ref: forwardedRef,\n value,\n inputValue,\n customValidation,\n onInputChange,\n onChange,\n selectTime,\n timeStep,\n timeZoneScope,\n ...rest\n } = props\n\n const popoverRef = useRef<HTMLDivElement | null>(null)\n\n const inputRef = useRef<HTMLInputElement | null>(null)\n const buttonRef = useRef(null)\n\n useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(\n forwardedRef,\n () => inputRef.current,\n )\n\n const [isPickerOpen, setPickerOpen] = useState(false)\n\n const portal = usePortal()\n\n useClickOutsideEvent(\n () => setPickerOpen(false),\n () => [popoverRef.current],\n )\n\n const handleDeactivation = useCallback(() => {\n inputRef.current?.focus()\n inputRef.current?.select()\n }, [inputRef])\n\n const handleKeyUp = useCallback((e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n setPickerOpen(false)\n }\n }, [])\n\n const handleClick = useCallback(() => setPickerOpen(true), [])\n\n const suffix = (\n <Box style={{padding: '5px'}}>\n <Button\n ref={buttonRef}\n icon={CalendarIcon}\n mode=\"bleed\"\n padding={2}\n onClick={handleClick}\n style={{display: 'block'}}\n data-testid=\"select-date-button\"\n />\n </Box>\n )\n\n return (\n <LazyTextInput\n data-testid=\"date-input\"\n ref={inputRef}\n {...rest}\n value={inputValue}\n onChange={onInputChange}\n suffix={\n isPickerOpen ? (\n // Note: we're conditionally inserting the popover here due to an\n // issue with popovers rendering incorrectly on subsequent renders\n // see https://github.com/sanity-io/design/issues/519\n <LayerProvider zOffset={1000}>\n <Popover\n constrainSize\n content={\n <Box overflow=\"auto\">\n <FocusLock onDeactivation={handleDeactivation}>\n <DatePicker\n selectTime={selectTime}\n timeStep={timeStep}\n onKeyUp={handleKeyUp}\n value={value}\n onChange={onChange}\n customValidation={customValidation}\n timeZoneScope={timeZoneScope}\n />\n </FocusLock>\n </Box>\n }\n data-testid=\"date-input-dialog\"\n fallbackPlacements={['bottom', 'bottom-start', 'top-end', 'top', 'top-start']}\n floatingBoundary={portal.element}\n open\n placement=\"bottom-end\"\n portal\n radius={2}\n ref={popoverRef}\n >\n {suffix}\n </Popover>\n </LayerProvider>\n ) : (\n suffix\n )\n }\n />\n )\n}\n","import {TextInput} from '@sanity/ui'\nimport {\n type FocusEvent,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type RefAttributes,\n} from 'react'\n\nimport {FormField} from '../../../form/components/formField/FormField'\nimport {type TimeZoneScope, useTimeZone} from '../../../hooks/useTimeZone'\nimport {DateTimeInput} from './base/DateTimeInput'\nimport {type CommonProps, type ParseResult} from './types'\n\ntype Props = CommonProps & {\n title: string\n description?: string\n parseInputValue: (inputValue: string) => ParseResult\n formatInputValue: (date: Date) => string\n deserialize: (value: string) => ParseResult\n serialize: (date: Date) => string\n onChange: (nextDate: string | null) => void\n selectTime?: boolean\n placeholder?: string\n timeStep?: number\n customValidation?: (selectedDate: Date) => boolean\n timeZoneScope: TimeZoneScope\n}\n\nexport function CommonDateTimeInput(props: Props & RefAttributes<HTMLInputElement>) {\n const {\n ref: forwardedRef,\n value,\n markers,\n title,\n description,\n placeholder,\n parseInputValue,\n formatInputValue,\n deserialize,\n serialize,\n selectTime,\n timeStep,\n readOnly,\n level,\n onChange,\n customValidation,\n timeZoneScope,\n ...rest\n } = props\n\n const [localValue, setLocalValue] = useState<string | null>(null)\n\n useEffect(() => {\n // oxlint-disable-next-line react/set-state-in-effect -- pre-existing violation, to be fixed in a follow-up\n setLocalValue(null)\n // oxlint-disable-next-line react/exhaustive-effect-dependencies -- pre-existing violation, to be fixed in a follow-up\n }, [value])\n\n const {zoneDateToUtc} = useTimeZone(timeZoneScope)\n const undefinedValue = typeof value === 'undefined'\n // Text input changes ('wall time')\n const handleDatePickerInputChange = useCallback(\n (event: FocusEvent<HTMLInputElement>) => {\n const nextInputValue = event.currentTarget.value\n const result = nextInputValue === '' ? null : parseInputValue(nextInputValue)\n\n if (result === null) {\n onChange(null)\n\n // If the field value is undefined, and we are clearing the invalid value\n // the above useEffect won't trigger, so we do some extra clean up here\n if (undefinedValue && localValue) {\n setLocalValue(null)\n }\n } else if (result.isValid) {\n // Convert zone time to UTC\n onChange(serialize(zoneDateToUtc(result.date)))\n } else {\n setLocalValue(nextInputValue)\n }\n },\n [undefinedValue, zoneDateToUtc, localValue, serialize, onChange, parseInputValue],\n )\n\n // Calendar changes (UTC)\n const handleDatePickerChange = useCallback(\n (nextDate: Date | null) => {\n onChange(nextDate ? serialize(nextDate) : null)\n },\n [serialize, onChange],\n )\n\n const inputRef = useRef<HTMLInputElement | null>(null)\n\n useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(\n forwardedRef,\n () => inputRef.current,\n )\n\n const id = useId()\n\n const parseResult = localValue ? parseInputValue(localValue) : value ? deserialize(value) : null\n\n const inputValue = localValue\n ? localValue\n : parseResult?.isValid\n ? formatInputValue(parseResult.date)\n : value\n\n const nodeValidations = useMemo(\n () =>\n markers.map((m) => ({\n level: m.level,\n path: m.path,\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n message: m.message ?? m.item?.message,\n })),\n [markers],\n )\n return (\n <FormField\n validation={\n parseResult?.error\n ? [\n ...nodeValidations,\n {\n level: 'error',\n message: parseResult.error,\n path: [],\n }, // casting to marker to avoid having to implement cloneWithMessage on item\n ]\n : nodeValidations\n }\n title={title}\n level={level}\n description={description}\n inputId={id}\n path={[]}\n >\n {readOnly ? (\n <TextInput value={inputValue} readOnly />\n ) : (\n <DateTimeInput\n {...rest}\n id={id}\n selectTime={selectTime}\n timeStep={timeStep}\n placeholder={placeholder || `e.g. ${formatInputValue(new Date())}`}\n ref={inputRef}\n value={parseResult?.date}\n inputValue={inputValue || ''}\n readOnly={Boolean(readOnly)}\n onInputChange={handleDatePickerInputChange}\n onChange={handleDatePickerChange}\n customValidity={parseResult?.error}\n customValidation={customValidation}\n timeZoneScope={timeZoneScope}\n />\n )}\n </FormField>\n )\n}\n","export function isValidDate(date: Date): boolean {\n return date instanceof Date && !isNaN(date.valueOf())\n}\n","import {tz as tzHelper} from '@date-fns/tz'\nimport {format} from 'date-fns/format'\nimport {getMinutes} from 'date-fns/getMinutes'\nimport {isValid} from 'date-fns/isValid'\nimport {parse} from 'date-fns/parse'\nimport {parseISO} from 'date-fns/parseISO'\nimport {setMinutes} from 'date-fns/setMinutes'\nimport {useCallback, type RefAttributes} from 'react'\n\nimport {type TimeZoneScope, useTimeZone} from '../../../hooks/useTimeZone'\nimport {useWorkspace} from '../../../studio/workspace'\nimport {CommonDateTimeInput} from './CommonDateTimeInput'\nimport {type CommonProps, type ParseResult} from './types'\nimport {isValidDate} from './utils'\n\ntype ParsedOptions = {\n calendarTodayLabel: string\n customValidation: (selectedDate: Date) => boolean\n customValidationMessage?: string\n timeStep: number\n}\ntype SchemaOptions = {\n calendarTodayLabel?: string\n customValidation?: (selectedDate: Date) => boolean\n customValidationMessage?: string\n timeStep?: number\n}\nexport type Props = CommonProps & {\n onChange: (date: string | null) => void\n timeZoneScope: TimeZoneScope\n type: {\n name: string\n title: string\n description?: string\n options?: SchemaOptions\n placeholder?: string\n }\n}\n\nfunction parseOptions(options: SchemaOptions = {}): ParsedOptions {\n return {\n customValidation:\n options.customValidation ||\n function () {\n return true\n },\n customValidationMessage: options.customValidationMessage || 'Invalid date.',\n calendarTodayLabel: options.calendarTodayLabel || 'Today',\n timeStep: ('timeStep' in options && Number(options.timeStep)) || 1,\n }\n}\n\nfunction serialize(date: Date) {\n return date.toISOString()\n}\nfunction deserialize(isoString: string): ParseResult {\n const deserialized = new Date(isoString)\n if (isValidDate(deserialized)) {\n return {isValid: true, date: deserialized}\n }\n return {isValid: false, error: `Invalid date value: \"${isoString}\"`}\n}\n\n// enforceTimeStep takes a dateString and datetime schema options and enforces the time\n// to be within the configured timeStep\nfunction enforceTimeStep(dateString: string, timeStep: number) {\n if (!timeStep || timeStep === 1) {\n return dateString\n }\n\n const date = parseISO(dateString)\n const minutes = getMinutes(date)\n const leftOver = minutes % timeStep\n if (leftOver !== 0) {\n return serialize(setMinutes(date, minutes - leftOver))\n }\n\n return serialize(date)\n}\n\nexport function DateTimeInput(props: Props & RefAttributes<HTMLInputElement>) {\n const {ref: forwardedRef, type, onChange, timeZoneScope, ...rest} = props\n const {title, description, placeholder} = type\n\n const {scheduledPublishing} = useWorkspace()\n const inputDateTimeFormat = scheduledPublishing.inputDateTimeFormat\n\n const {getCurrentZoneDate, timeZone} = useTimeZone(timeZoneScope)\n\n const {customValidation, customValidationMessage, timeStep} = parseOptions(type.options)\n\n // Returns date in UTC string\n const handleChange = useCallback(\n (nextDate: string | null) => {\n let date = nextDate\n if (date !== null && timeStep > 1) {\n date = enforceTimeStep(date, timeStep)\n }\n\n onChange(date)\n },\n [onChange, timeStep],\n )\n\n const formatInputValue = useCallback(\n (date: Date) => format(date, `${inputDateTimeFormat}`, {in: tzHelper(timeZone.name)}),\n [inputDateTimeFormat, timeZone.name],\n )\n\n const parseInputValue = useCallback(\n (inputValue: string) => {\n const parsed = parse(inputValue, `${inputDateTimeFormat}`, getCurrentZoneDate())\n\n // Check is value is a valid date\n if (!isValid(parsed)) {\n return {\n isValid: false,\n error: `Invalid date. Must be in the format \"${inputDateTimeFormat}\"`,\n } as ParseResult\n }\n\n // Check if value adheres to custom validation rules\n if (!customValidation(parsed)) {\n return {\n isValid: false,\n error: customValidationMessage,\n } as ParseResult\n }\n\n return {\n isValid: true,\n date: parsed,\n } as ParseResult\n },\n [customValidation, customValidationMessage, getCurrentZoneDate, inputDateTimeFormat],\n )\n\n return (\n <CommonDateTimeInput\n {...rest}\n onChange={handleChange}\n ref={forwardedRef}\n selectTime\n timeStep={timeStep}\n title={title}\n description={description}\n placeholder={placeholder}\n serialize={serialize}\n deserialize={deserialize}\n formatInputValue={formatInputValue}\n customValidation={customValidation}\n parseInputValue={parseInputValue}\n timeZoneScope={timeZoneScope}\n />\n )\n}\n","import {Card, Stack} from '@sanity/ui'\nimport {useState} from 'react'\n\nimport {useTimeZone} from '../../../hooks/useTimeZone'\nimport {SCHEDULED_PUBLISHING_TIME_ZONE_SCOPE} from '../../constants'\nimport {type ScheduleFormData} from '../../types'\nimport {DateTimeInput} from '../dateInputs'\n\ninterface Props {\n onChange?: (formData: ScheduleFormData) => void\n value?: ScheduleFormData | null\n}\n\nconst ScheduleForm = (props: Props) => {\n const {onChange, value} = props\n const timeZoneScope = SCHEDULED_PUBLISHING_TIME_ZONE_SCOPE\n const {getCurrentZoneDate} = useTimeZone(timeZoneScope)\n\n // Date input is stored locally to handle behaviour of the studio's `<LazyTextInput />` component.\n // If we don't keep this local state (and only rely on the canonical value of `ScheduleFormData`),\n // you'll see an unsightly flash when text inputs are blurred / lose focus, as `<LazyTextInput />`\n // clears its internal value before it's had a chance to re-render as a result of its own props changing.\n const [inputValue, setInputValue] = useState<string>()\n\n const handleChange = (date: string | null) => {\n if (date && onChange) {\n onChange({date})\n setInputValue(date)\n }\n }\n\n // Only allow dates in the future (`selectedDate` is UTC)\n const handleCustomValidation = (selectedDate: Date): boolean => {\n return selectedDate > getCurrentZoneDate()\n }\n\n return (\n <Stack gap={4}>\n <Card>\n <DateTimeInput\n level={0}\n markers={[]}\n onChange={handleChange}\n type={{\n name: 'date',\n options: {\n customValidation: handleCustomValidation,\n customValidationMessage: 'Date cannot be in the past.',\n },\n title: 'Date and time',\n }}\n value={inputValue === undefined ? value?.date : inputValue}\n timeZoneScope={timeZoneScope}\n />\n </Card>\n </Stack>\n )\n}\n\nexport default ScheduleForm\n","import {Stack} from '@sanity/ui'\nimport {type PropsWithChildren} from 'react'\n\nimport {type ScheduleFormData} from '../../types'\nimport ScheduleForm from './ScheduleForm'\n\ninterface Props {\n onChange?: (formData: ScheduleFormData) => void\n value?: ScheduleFormData | null\n}\n\n/**\n * Form for editing a schedule for a document when scheduled publishing is enabled.\n * @deprecated we will be dropping support for scheduled publishing on a future major version\n * @internal\n */\nexport function EditScheduleForm(props: PropsWithChildren<Props>) {\n const {onChange, value} = props\n\n return (\n <Stack gap={4}>\n {props.children}\n <ScheduleForm onChange={onChange} value={value} />\n </Stack>\n )\n}\n","import {ErrorOutlineIcon} from '@sanity/icons/ErrorOutline'\nimport {Card, Inline, Text} from '@sanity/ui'\nimport {Flex} from 'ui5'\n\ninterface Props {\n description?: string\n title: string\n}\n\nconst ErrorCallout = (props: Props) => {\n const {description, title} = props\n\n return (\n <Card overflow=\"hidden\" padding={4} radius={2} shadow={1} tone=\"critical\">\n <Flex alignItems=\"center\" gap={4}>\n <Text size={2}>\n <ErrorOutlineIcon />\n </Text>\n <Inline gap={2}>\n <Text size={1} weight=\"semibold\">\n {title}\n </Text>\n {description && <Text size={1}>{description}</Text>}\n </Inline>\n </Flex>\n </Card>\n )\n}\n\nexport default ErrorCallout\n","import {type ReactNode, useContext} from 'react'\nimport {DocumentActionPropsContext} from 'sanity/_singletons'\n\nimport {type DocumentActionProps} from '../../config/document/actions'\n\nfunction DocumentActionPropsProvider({\n children,\n value,\n}: {\n children: ReactNode\n value: DocumentActionProps\n}) {\n return (\n <DocumentActionPropsContext.Provider value={value}>\n {children}\n </DocumentActionPropsContext.Provider>\n )\n}\n\nfunction useDocumentActionProps(): DocumentActionProps {\n const context = useContext(DocumentActionPropsContext)\n if (context === undefined) {\n throw new Error('useDocumentActionProps must be used within a DocumentActionPropsProvider')\n }\n return context\n}\n\nexport {DocumentActionPropsProvider, useDocumentActionProps}\n","import {useState} from 'react'\n\nimport {type Schedule, type ScheduleFormData} from '../types'\n\nexport default function useScheduleForm(schedule?: Schedule) {\n const [isDirty, setIsDirty] = useState(false)\n const [formData, setFormData] = useState<ScheduleFormData | null>(\n schedule && schedule?.executeAt\n ? {\n date: schedule.executeAt,\n }\n : null,\n )\n\n const handleFormChange = (form: ScheduleFormData) => {\n const equalDates =\n schedule?.executeAt &&\n new Date(schedule.executeAt).getTime() === new Date(form?.date).getTime()\n\n setFormData(form)\n setIsDirty(!equalDates)\n }\n\n return {\n formData,\n isDirty,\n onFormChange: handleFormChange,\n }\n}\n","import {ErrorOutlineIcon} from '@sanity/icons/ErrorOutline'\nimport {InfoOutlineIcon} from '@sanity/icons/InfoOutline'\nimport {WarningOutlineIcon} from '@sanity/icons/WarningOutline'\nimport {type Path, type ValidationMarker} from '@sanity/types'\nimport {type ButtonTone, Stack, Text} from '@sanity/ui'\n// oxlint-disable-next-line no-restricted-imports\nimport {MenuItem} from '@sanity/ui/menu'\nimport {useCallback} from 'react'\nimport {styled} from 'styled-components'\nimport {Flex, Box} from 'ui5'\n\nconst StyledText = styled(Text)`\n white-space: initial;\n`\n\nconst MENU_ITEM_TONES: Record<'error' | 'warning' | 'info', ButtonTone> = {\n error: 'critical',\n warning: 'caution',\n info: 'primary',\n}\n\n/**\n * @internal\n */\nexport interface ValidationListItemProps {\n marker: ValidationMarker\n onClick?: (path?: Path) => void\n path: string\n truncate?: boolean\n}\n\n/**\n * @internal\n */\nexport function ValidationListItem(props: ValidationListItemProps) {\n const {marker, onClick, path, truncate} = props\n\n const handleClick = useCallback(() => {\n if (onClick) {\n onClick(marker.path)\n }\n }, [marker.path, onClick])\n\n const menuItemTone = MENU_ITEM_TONES[marker?.level] || undefined\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n const message = marker.message ?? marker.item?.message\n const children = (\n <Flex>\n <Box>\n <Text size={1}>\n {marker.level === 'error' && <ErrorOutlineIcon />}\n {marker.level === 'warning' && <WarningOutlineIcon />}\n {marker.level === 'info' && <InfoOutlineIcon />}\n </Text>\n </Box>\n\n <Stack gap={2} flex={1} paddingLeft={3}>\n {path && (\n <StyledText size={1} weight=\"semibold\">\n {path}\n </StyledText>\n )}\n {message && (\n <StyledText muted size={1} textOverflow={truncate ? 'ellipsis' : undefined}>\n {message}\n </StyledText>\n )}\n </Stack>\n </Flex>\n )\n return (\n <MenuItem padding={1} onClick={handleClick} radius={2} tone={menuItemTone}>\n <Box padding={2}>{children}</Box>\n </MenuItem>\n )\n}\n","import {\n isValidationErrorMarker,\n isValidationInfoMarker,\n isValidationWarningMarker,\n type ObjectSchemaType,\n type Path,\n type ValidationMarker,\n} from '@sanity/types'\nimport {Container} from '@sanity/ui'\nimport {useCallback} from 'react'\n\nimport {ValidationListItem} from './ValidationListItem'\n\n/** @internal */\nexport interface ValidationListProps {\n documentType?: ObjectSchemaType\n kind?: 'simple'\n validation: ValidationMarker[]\n onFocus?: (path: Path) => void\n onClose?: () => void\n truncate?: boolean\n}\n\n/** @internal */\nexport function ValidationList(props: ValidationListProps) {\n const {documentType, kind, validation, onFocus, onClose, truncate} = props\n const errors = validation.filter(isValidationErrorMarker)\n const warnings = validation.filter(isValidationWarningMarker)\n const info = validation.filter(isValidationInfoMarker)\n\n const handleClick = useCallback(\n (path: Path = []) => {\n if (onFocus) onFocus(path)\n if (onClose) onClose()\n },\n [onFocus, onClose],\n )\n\n const resolvePathTitle = (path: Path) => {\n const fields = documentType && documentType.fields\n const field = fields && fields.find((curr) => curr.name === path[0])\n\n return (field && field.type.title) || ''\n }\n\n const hasErrors = errors.length > 0\n const hasWarnings = warnings.length > 0\n const hasInfo = info.length > 0\n\n if (!hasErrors && !hasWarnings && !hasInfo) {\n return null\n }\n\n return (\n <Container width={0} data-kind={kind} data-testid=\"validation-list\">\n {hasErrors &&\n errors.map((_error, i) => (\n <ValidationListItem\n // oxlint-disable-next-line no-array-index-key\n key={i}\n truncate={truncate}\n path={resolvePathTitle(_error.path)}\n marker={_error}\n onClick={handleClick}\n />\n ))}\n {hasWarnings &&\n warnings.map((_warning, i) => (\n <ValidationListItem\n // oxlint-disable-next-line no-array-index-key\n key={i}\n truncate={truncate}\n path={resolvePathTitle(_warning.path)}\n marker={_warning}\n onClick={handleClick}\n />\n ))}\n {hasInfo &&\n info.map((_info, i) => (\n <ValidationListItem\n // oxlint-disable-next-line no-array-index-key\n key={i}\n truncate={truncate}\n path={resolvePathTitle(_info.path)}\n marker={_info}\n onClick={handleClick}\n />\n ))}\n </Container>\n )\n}\n","import {ErrorOutlineIcon} from '@sanity/icons/ErrorOutline'\nimport {WarningOutlineIcon} from '@sanity/icons/WarningOutline'\nimport {\n type ObjectSchemaType,\n type Path,\n type SchemaType,\n type ValidationMarker,\n} from '@sanity/types'\nimport {type CardTone, Container, Stack} from '@sanity/ui'\nimport {Menu} from '@sanity/ui/menu'\nimport * as PathUtils from '@sanity/util/paths'\nimport {type ReactNode, useCallback, useId} from 'react'\nimport {useRouter} from 'sanity/router'\n\nimport {Button} from '../../../../ui-components/button/Button'\nimport {MenuButton} from '../../../../ui-components/menuButton/MenuButton'\nimport {usePublishedId} from '../../hooks/usePublishedId'\nimport {useValidationState} from '../../utils/validationUtils'\nimport {ValidationList} from './ValidationList'\n\ninterface ValidationProps {\n documentId?: string\n markers: ValidationMarker[]\n type?: SchemaType\n menuHeader?: ReactNode\n}\n\nconst POPOVER_PROPS = {\n portal: true,\n constrainSize: true,\n preventOverflow: true,\n tone: 'default' as CardTone,\n width: 0,\n placement: 'bottom-end',\n} as const\n\nexport function ValidationInfo(props: ValidationProps) {\n const {type, markers, menuHeader, documentId} = props\n const router = useRouter()\n const {hasError, hasWarning} = useValidationState(markers)\n // use visibility so we can occupy the space equally for all states\n const visibility = hasError || hasWarning ? 'visible' : 'hidden'\n const id = useId() || ''\n const publishId = usePublishedId(documentId)\n\n const onFocus = useCallback(\n (path: Path) => {\n if (!publishId) {\n return\n }\n router.navigateIntent('edit', {\n id: publishId,\n path: encodeURIComponent(PathUtils.toString(path)),\n })\n },\n [router, publishId],\n )\n\n return (\n <MenuButton\n id={id || ''}\n button={\n <Button\n tooltipProps={{content: 'Show validation issues'}}\n mode=\"bleed\"\n data-testid=\"schedule-validation-list-button\"\n icon={hasError ? ErrorOutlineIcon : WarningOutlineIcon}\n style={{visibility}}\n tone={hasError ? 'critical' : 'default'}\n />\n }\n menu={\n <Menu padding={1}>\n <Container width={0}>\n <Stack gap={1}>\n {menuHeader ?? null}\n <ValidationList\n documentType={type as ObjectSchemaType}\n validation={markers}\n onFocus={onFocus}\n />\n </Stack>\n </Container>\n </Menu>\n }\n popover={POPOVER_PROPS}\n />\n )\n}\n","// Based off: https://github.com/sanity-io/sanity/blob/next/packages/@sanity/desk-tool/src/components/paneItem/helpers.tsx\nimport {type SanityDocument} from '@sanity/client'\nimport {type SchemaType} from '@sanity/types'\nimport {type ReactNode} from 'react'\nimport {combineLatest, type Observable, of} from 'rxjs'\nimport {map, startWith} from 'rxjs/operators'\n\nimport {type DocumentPreviewStore} from '../../preview/documentPreviewStore'\nimport {getDraftId, getPublishedId} from '../../util/draftUtils'\nimport {type Schedule} from '../types'\n\nexport interface PaneItemPreviewState {\n isLoading?: boolean\n draft?: SanityDocument | null\n published?: SanityDocument | null\n}\n\nconst isLiveEditEnabled = (schemaType: any) => schemaType.liveEdit === true\n\nexport function getPreviewStateObservable(\n documentPreviewStore: DocumentPreviewStore,\n schemaType: SchemaType,\n documentId: string,\n title: ReactNode,\n): Observable<PaneItemPreviewState> {\n const draft$ = isLiveEditEnabled(schemaType)\n ? of({snapshot: null})\n : documentPreviewStore.observeForPreview(\n {_type: 'reference', _ref: getDraftId(documentId)},\n schemaType,\n )\n\n const published$ = documentPreviewStore.observeForPreview(\n {_type: 'reference', _ref: getPublishedId(documentId)},\n schemaType,\n )\n\n return combineLatest([draft$, published$]).pipe(\n map(([draft, published]: any) => ({\n draft: draft.snapshot ? {title, ...draft.snapshot} : null,\n isLoading: false,\n published: published.snapshot ? {title, ...published.snapshot} : null,\n })),\n startWith({draft: null, isLoading: true, published: null}),\n )\n}\n\n/**\n * Whilst schedules can contain multiple documents, this plugin specifically limits schedules to one document only\n */\nexport function getScheduledDocument(schedule: Schedule) {\n return schedule.documents?.[0]\n}\n\n/**\n * Whilst schedules can contain multiple documents, this plugin specifically limits schedules to one document only\n */\nexport function getScheduledDocumentId(schedule: Schedule): string | undefined {\n return getScheduledDocument(schedule)?.documentId.replaceAll('drafts.', '')\n}\n","import {type SchemaType} from '@sanity/types'\nimport {useMemo} from 'react'\n\nimport {useSchema} from '../../hooks/useSchema'\nimport {type Schedule} from '../types'\nimport {getScheduledDocument} from '../utils/paneItemHelpers'\n\nexport function useScheduleSchemaType(schedule: Schedule): SchemaType | undefined {\n const firstDocument = getScheduledDocument(schedule)\n const schema = useSchema()\n const schemaName = firstDocument.documentType\n\n return useMemo(() => {\n if (!schemaName) {\n return undefined\n }\n return schema.get(schemaName) as SchemaType\n }, [schemaName, schema])\n}\n\nexport function useSchemaType(schemaName: string): SchemaType {\n const schema = useSchema()\n return useMemo(() => schema.get(schemaName) as SchemaType, [schemaName, schema])\n}\n","import {type SchemaType} from '@sanity/types'\nimport {useMemo} from 'react'\nimport {useObservable} from 'react-rx'\nimport {of} from 'rxjs'\n\nimport {useDocumentPreviewStore} from '../../store/datastores'\nimport {getPreviewStateObservable, type PaneItemPreviewState} from '../utils/paneItemHelpers'\n\nconst EMPTY_STATE: PaneItemPreviewState = {}\n\nexport default function usePreviewState(\n documentId: string,\n schemaType?: SchemaType,\n): PaneItemPreviewState {\n const documentPreviewStore = useDocumentPreviewStore()\n\n const preview$ = useMemo(\n () =>\n schemaType\n ? getPreviewStateObservable(documentPreviewStore, schemaType, documentId, '')\n : of(EMPTY_STATE),\n [documentPreviewStore, schemaType, documentId],\n )\n\n return useObservable(preview$, EMPTY_STATE)\n}\n","import {ElementQuery} from '@sanity/ui'\nimport {styled} from 'styled-components'\n\nconst DateWithTooltipElementQuery: typeof ElementQuery = styled(ElementQuery)`\n .date-small {\n display: inline;\n }\n .date-medium {\n display: none;\n }\n .date-large {\n display: none;\n }\n\n &[data-eq-min~='1'] {\n .date-small {\n display: none;\n }\n .date-medium {\n display: inline;\n }\n .date-large {\n display: none;\n }\n }\n\n &[data-eq-min~='2'] {\n .date-small {\n display: none;\n }\n .date-medium {\n display: none;\n }\n .date-large {\n display: inline;\n }\n }\n`\n\nexport default DateWithTooltipElementQuery\n","import {Dialog} from '../../../../ui-components/dialog/Dialog'\nimport {SCHEDULED_PUBLISHING_TIME_ZONE_SCOPE} from '../../constants'\nimport useScheduleForm from '../../hooks/useScheduleForm'\nimport useScheduleOperation from '../../hooks/useScheduleOperation'\nimport {type Schedule} from '../../types'\nimport {EditScheduleForm} from '../editScheduleForm/EditScheduleForm'\nimport DialogHeader from './DialogHeader'\n\nexport interface DialogScheduleEditProps {\n onClose: () => void\n schedule: Schedule\n}\n\nconst DialogScheduleEdit = (props: DialogScheduleEditProps) => {\n const {onClose, schedule} = props\n const timeZoneScope = SCHEDULED_PUBLISHING_TIME_ZONE_SCOPE\n\n const {updateSchedule} = useScheduleOperation()\n const {formData, isDirty, onFormChange} = useScheduleForm(schedule)\n\n // Callbacks\n const handleScheduleUpdate = async () => {\n if (!formData?.date) {\n return\n }\n // Update schedule then close self\n await updateSchedule({\n date: formData.date,\n scheduleId: schedule.id,\n })\n onClose()\n }\n\n return (\n <Dialog\n footer={{\n confirmButton: {\n text: 'Update',\n disabled: !isDirty,\n onClick: handleScheduleUpdate,\n },\n }}\n header={<DialogHeader timeZoneScope={timeZoneScope} title=\"Edit schedule\" />}\n id=\"time-zone\"\n onClose={onClose}\n width={1}\n >\n {/* oxlint-disable-next-line no-deprecated -- will fix in follow up PR */}\n <EditScheduleForm onChange={onFormChange} value={formData} />\n </Dialog>\n )\n}\n\nexport default DialogScheduleEdit\n","import {useCallback, useState} from 'react'\n\nimport {type TimeZoneScope} from '../../hooks/useTimeZone'\n\ninterface DialogControls {\n show: () => void\n hide: () => void\n timeZoneScope: TimeZoneScope\n visible: boolean\n}\n\nexport function useDialogVisible(timeZoneScope: TimeZoneScope): DialogControls {\n const [dialogVisible, setDialogVisible] = useState(false)\n\n const hide = useCallback(() => {\n setDialogVisible(false)\n }, [])\n const show = useCallback(() => {\n setDialogVisible(true)\n }, [])\n\n return {\n visible: dialogVisible,\n show,\n timeZoneScope,\n hide,\n }\n}\n","import {type TimeZoneScope} from '../../hooks/useTimeZone'\nimport DialogScheduleEdit from '../components/dialogs/DialogScheduleEdit'\nimport {type Schedule} from '../types'\nimport {useDialogVisible} from './useDialogVisibile'\n\nfunction useDialogScheduleEdit(schedule: Schedule, tzScope: TimeZoneScope) {\n const {visible, show, hide, timeZoneScope} = useDialogVisible(tzScope)\n\n const dialogProps = {\n onClose: hide,\n schedule,\n visible,\n }\n\n return {\n DialogScheduleEdit: visible ? DialogScheduleEdit : null,\n dialogProps,\n timeZoneScope,\n dialogScheduleEditShow: show,\n hide,\n }\n}\n\nexport default useDialogScheduleEdit\n","import {type CurrentUser} from '@sanity/types'\nimport {type SelectableTone} from '@sanity/ui'\nimport {type ComponentType, type ReactNode} from 'react'\nimport {Box} from 'ui5'\n\nimport {MenuItem} from '../../../../ui-components/menuItem/MenuItem'\nimport {Tooltip} from '../../../../ui-components/tooltip/Tooltip'\nimport {\n InsufficientPermissionsMessage,\n type InsufficientPermissionsMessageProps,\n} from '../../../components/InsufficientPermissionsMessage'\n\ninterface Props {\n currentUser?: CurrentUser\n hasPermission?: boolean\n icon: ComponentType | ReactNode\n onClick: () => void\n permissionsOperationLabel: InsufficientPermissionsMessageProps['context']\n title: string\n tone?: SelectableTone\n disabled?: boolean\n}\n\nconst MenuItemWithPermissionsTooltip = (props: Props) => {\n const {\n currentUser,\n hasPermission,\n icon,\n onClick,\n permissionsOperationLabel,\n title,\n tone,\n disabled,\n } = props\n return (\n <Tooltip\n content={\n <Box paddingX={2} paddingY={1}>\n <InsufficientPermissionsMessage\n currentUser={currentUser}\n context={permissionsOperationLabel}\n />\n </Box>\n }\n disabled={hasPermission}\n placement=\"left\"\n portal\n >\n {/* Wrapper element to allow disabled menu items to trigger tooltips */}\n <div>\n <MenuItem\n disabled={!hasPermission || disabled}\n icon={icon}\n onClick={onClick}\n text={title}\n tone={tone}\n />\n </div>\n </Tooltip>\n )\n}\n\nexport default MenuItemWithPermissionsTooltip\n","import {CalendarIcon} from '@sanity/icons/Calendar'\nimport {CheckmarkCircleIcon} from '@sanity/icons/CheckmarkCircle'\nimport {PublishIcon} from '@sanity/icons/Publish'\nimport {TrashIcon} from '@sanity/icons/Trash'\nimport {type SchemaType} from '@sanity/types'\n\nimport {useScheduledPublishingEnabled} from '../../../scheduledPublishing/contexts/ScheduledPublishingEnabledProvider'\nimport {useDocumentPairPermissions} from '../../../store/grants/documentPairPermissions'\nimport {useCurrentUser} from '../../../store/user/hooks'\nimport useScheduleOperation from '../../hooks/useScheduleOperation'\nimport {type Schedule} from '../../types'\nimport {getScheduledDocument} from '../../utils/paneItemHelpers'\nimport MenuItemWithPermissionsTooltip from './MenuItemWithPermissionsTooltip'\n\ninterface Props {\n actions?: {\n clear?: boolean\n delete?: boolean\n edit?: boolean\n execute?: boolean\n }\n onDelete?: () => void\n onEdit?: () => void\n schedule: Schedule\n schemaType: SchemaType\n}\n\n/**\n * Edit, Delete and Clear are intentionally not gated on `document.actions`.\n * These items call `useScheduleOperation` (schedules HTTP API), not document operations.\n * Edit patches a schedule record; the in-pane call site is already behind\n * `useScheduleAction.action = 'schedule'`.\n * Delete and Clear are not `delete` (the document lives) and not `discardVersion`\n * (legacy schedules are not versions).\n * Publish now is a document publish, so its call site gates it on `publish`.\n * Grant checks stay on `useDocumentPairPermissions({permission: 'publish'})`.\n */\nconst ContextMenuItems = (props: Props) => {\n const {actions, onDelete, onEdit, schedule, schemaType} = props\n const {mode} = useScheduledPublishingEnabled()\n const firstDocument = getScheduledDocument(schedule)\n\n const currentUser = useCurrentUser()\n const [permissions, isPermissionsLoading] = useDocumentPairPermissions({\n id: firstDocument.documentId,\n type: schemaType?.name,\n permission: 'publish',\n })\n const {deleteSchedule, publishSchedule} = useScheduleOperation()\n\n const insufficientPermissions = !isPermissionsLoading && !permissions?.granted\n\n // Callbacks\n const handleEdit = () => {\n onEdit?.()\n }\n\n const handleDelete = () => {\n void deleteSchedule({schedule}).then(() => onDelete?.())\n }\n\n const handleExecute = () => {\n void publishSchedule({schedule})\n }\n\n if (!currentUser) {\n return null\n }\n\n return (\n <>\n {actions?.edit && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={CalendarIcon}\n onClick={handleEdit}\n permissionsOperationLabel=\"edit-schedules\"\n title=\"Edit schedule\"\n disabled={mode === 'upsell'}\n />\n )}\n {actions?.execute && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={PublishIcon}\n onClick={handleExecute}\n permissionsOperationLabel=\"execute-schedules\"\n title=\"Publish now\"\n disabled={mode === 'upsell'}\n />\n )}\n {actions?.delete && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={TrashIcon}\n onClick={handleDelete}\n permissionsOperationLabel=\"delete-schedules\"\n title=\"Delete schedule\"\n tone=\"critical\"\n disabled={mode === 'upsell'}\n />\n )}\n {actions?.clear && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={CheckmarkCircleIcon}\n onClick={handleDelete}\n permissionsOperationLabel=\"delete-schedules\"\n title=\"Clear completed schedule\"\n disabled={mode === 'upsell'}\n />\n )}\n </>\n )\n}\n\nexport default ContextMenuItems\n","import {type SchemaType} from '@sanity/types'\nimport {Menu} from '@sanity/ui/menu'\n\nimport {MenuButton} from '../../../../ui-components/menuButton/MenuButton'\nimport {ContextMenuButton} from '../../../components/contextMenuButton/ContextMenuButton'\nimport {type Schedule} from '../../types'\nimport ContextMenuItems from './ContextMenuItems'\n\ninterface Props {\n actions?: {\n clear?: boolean\n delete?: boolean\n edit?: boolean\n execute?: boolean\n }\n onDelete?: () => void\n onEdit?: () => void\n schedule: Schedule\n schemaType: SchemaType\n}\n\nexport const ScheduleContextMenu = (props: Props) => {\n const {actions, onDelete, onEdit, schedule, schemaType} = props\n\n return (\n <MenuButton\n button={<ContextMenuButton />}\n id=\"contextMenu\"\n menu={\n <Menu>\n <ContextMenuItems\n actions={actions}\n onDelete={onDelete}\n onEdit={onEdit}\n schedule={schedule}\n schemaType={schemaType}\n />\n </Menu>\n }\n popover={{placement: 'left', portal: true, tone: 'default'}}\n />\n )\n}\n","import {useEffect, useState} from 'react'\n\nimport {useValidationStatus} from '../../../hooks/useValidationStatus'\nimport {getDraftId} from '../../../util/draftUtils'\nimport {useScheduleSchemaType} from '../../hooks/useSchemaType'\nimport {type Schedule, type ValidationStatus} from '../../types'\nimport {getScheduledDocumentId} from '../../utils/paneItemHelpers'\n\ninterface Props {\n schedule: Schedule\n updateValidation: (status: ValidationStatus) => void\n}\n\n// Duration to wait before validating (after this component has mounted)\nconst VALIDATION_DELAY_MS = 1500\n\n/**\n * useValidationStatus requires a published id, and we dont always have that\n *\n * This a boilerplate wrapper component around it,\n * so we conditionally call back with updated status whenver it is possible.\n * */\nexport function ValidateScheduleDoc({schedule, updateValidation}: Props) {\n const schemaType = useScheduleSchemaType(schedule)\n const id = getScheduledDocumentId(schedule)\n\n if (!id || !schemaType?.name) {\n return null\n }\n return (\n <DelayedValidationRunner\n id={id}\n schemaName={schemaType.name}\n updateValidation={updateValidation}\n />\n )\n}\n\ninterface ValidationRunnerProps {\n id: string\n schemaName: string\n updateValidation: (status: ValidationStatus) => void\n}\n\nfunction DelayedValidationRunner({id, schemaName, updateValidation}: ValidationRunnerProps) {\n const [ready, setReady] = useState(false)\n\n useEffect(() => {\n const timeout = setTimeout(() => {\n setReady(true)\n }, VALIDATION_DELAY_MS)\n\n return () => {\n clearTimeout(timeout)\n }\n }, [])\n\n if (!ready) {\n return null\n }\n\n return <ValidationRunner id={id} schemaName={schemaName} updateValidation={updateValidation} />\n}\n\nfunction ValidationRunner({id, schemaName, updateValidation}: ValidationRunnerProps) {\n const draftId = getDraftId(id)\n // No `getTargetScopeId(useTargetDocumentState())` here: scheduled publishing deliberately validates the\n // explicit draft of the scheduled document, independent of the selected perspective.\n // TODO: this will be supported in the future, look for SAPP-3986 and SAPP-3987.\n const validationStatus = useValidationStatus(draftId, schemaName, true)\n\n useEffect(() => {\n if (!validationStatus.isValidating) {\n updateValidation(validationStatus)\n }\n }, [updateValidation, validationStatus])\n\n return null\n}\n","import {Text} from '@sanity/ui'\nimport {formatDistance} from 'date-fns/formatDistance'\n\nimport {Tooltip} from '../../../../../ui-components/tooltip/Tooltip'\nimport {useTimeZone} from '../../../../hooks/useTimeZone'\nimport {DATE_FORMAT} from '../../../../studio/timezones/constants'\n\ninterface Props {\n date: Date // local date in UTC\n useElementQueries?: boolean\n}\n\n/**\n * If `useElementQueries` is enabled, dates will be conditionally toggled at different element\n * breakpoints, provided this `<DateWithTooltip>` is wrapped in a `<DateElementQuery>` component.\n */\nconst DateWithTooltip = (props: Props) => {\n const {date, useElementQueries} = props\n\n const {formatDateTz} = useTimeZone({type: 'scheduledPublishing'})\n\n // Get distance between both dates\n const distance = formatDistance(date, new Date(), {\n addSuffix: true,\n })\n\n const dateTimeLarge = formatDateTz({date, format: DATE_FORMAT.LARGE})\n const dateTimeMedium = formatDateTz({date, format: DATE_FORMAT.MEDIUM})\n const dateTimeSmall = formatDateTz({date, format: DATE_FORMAT.SMALL})\n\n return (\n <Text size={1} textOverflow=\"ellipsis\">\n <Tooltip content={distance} portal>\n <span>\n {useElementQueries ? (\n <>\n <span className=\"date-small\">{dateTimeSmall}</span>\n <span className=\"date-medium\">{dateTimeMedium}</span>\n <span className=\"date-large\">{dateTimeLarge}</span>\n </>\n ) : (\n dateTimeLarge\n )}\n </span>\n </Tooltip>\n </Text>\n )\n}\n\nexport default DateWithTooltip\n","import {red} from '@sanity/color'\nimport {ErrorOutlineIcon} from '@sanity/icons/ErrorOutline'\nimport {type CardTone, Container, Text} from '@sanity/ui'\nimport {Menu} from '@sanity/ui/menu'\nimport {Flex} from 'ui5'\n\nimport {Button} from '../../../../ui-components/button/Button'\nimport {MenuButton} from '../../../../ui-components/menuButton/MenuButton'\nimport {SCHEDULE_FAILED_TEXT} from '../../constants'\n\ninterface Props {\n stateReason: string\n}\n\nconst POPOVER_PROPS = {\n portal: true,\n constrainSize: true,\n preventOverflow: true,\n tone: 'default' as CardTone,\n width: 0,\n}\n\nconst StateReasonFailedInfo = (props: Props) => {\n const {stateReason} = props\n\n return (\n <MenuButton\n id=\"stateReason\"\n button={\n <Button\n tooltipProps={{content: 'Schedule failed'}}\n mode=\"bleed\"\n data-testid=\"schedule-validation-list-button\"\n icon={ErrorOutlineIcon}\n tone=\"critical\"\n />\n }\n menu={\n <Menu padding={1}>\n <Container padding={2} width={0}>\n <Text size={1}>{SCHEDULE_FAILED_TEXT}</Text>\n <Flex gap={3} marginTop={4} padding={1}>\n <Text size={1} style={{color: red[700].hex}}>\n <ErrorOutlineIcon />\n </Text>\n <Text size={1} style={{color: red[700].hex}} weight=\"medium\">\n {stateReason}\n </Text>\n </Flex>\n </Container>\n </Menu>\n }\n popover={POPOVER_PROPS}\n />\n )\n}\n\nexport default StateReasonFailedInfo\n","import {UserAvatar} from '../../../components/userAvatar/UserAvatar'\n\ninterface Props {\n id: string\n}\n\nconst User = (props: Props) => {\n const {id} = props\n return <UserAvatar user={id} withTooltip />\n}\n\nexport default User\n","import {type SchemaType} from '@sanity/types'\nimport {Badge, Card, Stack, Text} from '@sanity/ui'\nimport {type ComponentPropsWithoutRef, type ElementType, type ReactNode, useState} from 'react'\nimport {styled} from 'styled-components'\nimport {Flex, Box} from 'ui5'\n\nimport {Tooltip} from '../../../../ui-components/tooltip/Tooltip'\nimport {DocumentVersionsStatus} from '../../../components/documentStatus/DocumentVersionsStatus'\nimport {DocumentVersionsStatusIndicator} from '../../../components/documentStatusIndicator/DocumentVersionsStatusIndicator'\nimport {useTimeZone} from '../../../hooks/useTimeZone'\nimport {SanityDefaultPreview} from '../../../preview/components/SanityDefaultPreview'\nimport {useDocumentVersions} from '../../../releases/hooks/useDocumentVersions'\nimport {useScheduledPublishingEnabled} from '../../../scheduledPublishing/contexts/ScheduledPublishingEnabledProvider'\nimport {\n DOCUMENT_HAS_ERRORS_TEXT,\n DOCUMENT_HAS_WARNINGS_TEXT,\n SCHEDULE_ACTION_DICTIONARY,\n} from '../../constants'\nimport {type Schedule} from '../../types'\nimport {getLastExecuteDate} from '../../utils/scheduleUtils'\nimport {EMPTY_VALIDATION_STATUS, useValidationState} from '../../utils/validationUtils'\nimport {ValidateScheduleDoc} from '../validation/SchedulesValidation'\nimport {ValidationInfo} from '../validation/ValidationInfo'\nimport DateWithTooltip from './dateWithTooltip/DateWithTooltip'\nimport StateReasonFailedInfo from './StateReasonFailedInfo'\nimport User from './User'\n\nconst StatusDotPlaceholder = styled(Box)`\n width: 9px;\n`\ninterface Props<TLink extends ElementType | undefined = undefined> {\n children?: ReactNode\n contextMenu?: ReactNode\n linkComponent?: TLink\n linkProps?: TLink extends ElementType ? ComponentPropsWithoutRef<TLink> : undefined\n onClick?: () => void\n publishedDocumentId?: string\n schedule: Schedule\n schemaType?: SchemaType\n useElementQueries?: boolean\n}\n\nfunction PreviewWrapper<TLink extends ElementType | undefined = undefined>(props: Props<TLink>) {\n const {\n children,\n contextMenu,\n linkComponent,\n linkProps,\n onClick,\n publishedDocumentId,\n schedule,\n schemaType,\n useElementQueries,\n } = props\n const {mode} = useScheduledPublishingEnabled()\n const [validationStatus, setValidationStatus] = useState(EMPTY_VALIDATION_STATUS)\n const {validation} = validationStatus\n const {hasError, validationTone} = useValidationState(validation)\n const {formatDateTz} = useTimeZone({type: 'scheduledPublishing'})\n\n const executeDate = getLastExecuteDate(schedule)\n const scheduleDate = executeDate ? new Date(executeDate) : null\n\n return (\n <Card\n padding={1}\n radius={2}\n shadow={1}\n tone={validationTone}\n style={mode === 'upsell' && schedule.state === 'scheduled' ? {opacity: 0.7} : undefined}\n >\n <Flex alignItems=\"center\" gap={1} justifyContent=\"space-between\">\n <Tooltip\n delay={{open: 400}}\n placement=\"bottom-end\"\n content={\n publishedDocumentId ? (\n <DocumentVersionsStatus documentGroupId={publishedDocumentId} />\n ) : null\n }\n disabled={!publishedDocumentId}\n >\n <Card\n {...(linkProps as object | undefined)}\n __unstable_focusRing\n as={linkComponent ? (linkComponent as ElementType) : undefined}\n data-as={onClick || linkComponent ? 'a' : undefined}\n flex={1}\n onClick={onClick}\n padding={1}\n radius={2}\n tabIndex={0}\n tone={validationTone}\n >\n <Flex\n alignItems=\"center\"\n gap={3}\n justifyContent=\"flex-start\"\n paddingLeft={children ? 0 : [1, 2]}\n >\n {children && <Box style={{flexBasis: 'auto', flexGrow: 1}}>{children}</Box>}\n\n {/* Badge */}\n {schedule.action === 'unpublish' && (\n <Flex style={{flexShrink: 0}}>\n <Badge fontSize={0} tone={SCHEDULE_ACTION_DICTIONARY[schedule.action].badgeTone}>\n {schedule.action}\n </Badge>\n </Flex>\n )}\n\n {/* Schedule date */}\n <Box display={['block', 'none']} style={{flexShrink: 0, width: '90px'}}>\n <Stack gap={2}>\n {scheduleDate ? (\n <>\n <Text size={1}>\n {formatDateTz({date: scheduleDate, format: 'dd/MM/yyyy'})}\n </Text>\n <Text size={1}>{formatDateTz({date: scheduleDate, format: 'p'})}</Text>\n </>\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Stack>\n </Box>\n <Box\n display={['none', 'block']}\n style={{flexShrink: 0, maxWidth: '250px', width: children ? '35%' : 'auto'}}\n >\n {scheduleDate ? (\n <DateWithTooltip date={scheduleDate} useElementQueries={useElementQueries} />\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Box>\n\n {/* HACK: render invisible preview wrapper when no children are provided to ensure consistent height */}\n {!children && (\n <Box style={{visibility: 'hidden'}}>\n <SanityDefaultPreview isPlaceholder />\n </Box>\n )}\n\n <Flex alignItems=\"center\" style={{flexShrink: 0, marginLeft: 'auto'}}>\n {/* Avatar */}\n <Box display={['none', 'none', 'block']} marginX={3} style={{flexShrink: 0}}>\n <User id={schedule?.author} />\n </Box>\n\n {/* Document status */}\n <Box display={['none', 'block']} marginX={[2, 2, 3]} style={{flexShrink: 0}}>\n {publishedDocumentId ? (\n <ScheduleItemStatusIndicator publishedDocumentId={publishedDocumentId} />\n ) : (\n <StatusDotPlaceholder />\n )}\n </Box>\n </Flex>\n </Flex>\n </Card>\n </Tooltip>\n\n <Flex justifyContent=\"center\" style={{width: '38px'}}>\n {/* Validation status (only displayed on upcoming schedules) */}\n {schedule.state === 'scheduled' && (\n <Box>\n <ValidateScheduleDoc schedule={schedule} updateValidation={setValidationStatus} />\n <ValidationInfo\n markers={validation}\n type={schemaType}\n documentId={publishedDocumentId}\n menuHeader={\n <Box padding={2}>\n <Text size={1}>\n {hasError ? DOCUMENT_HAS_ERRORS_TEXT : DOCUMENT_HAS_WARNINGS_TEXT}\n </Text>\n </Box>\n }\n />\n </Box>\n )}\n\n {/* Failed state reason (only displayed on cancelled schedules) */}\n {schedule.state === 'cancelled' && (\n <StateReasonFailedInfo stateReason={schedule.stateReason} />\n )}\n </Flex>\n\n {/* Failed state reason (only displayed on cancelled schedules) */}\n {schedule.state === 'cancelled' && (\n <StateReasonFailedInfo stateReason={schedule.stateReason} />\n )}\n\n {/* Context menu */}\n {contextMenu && (\n <Box style={{flexShrink: 0}} paddingRight={2}>\n {contextMenu}\n </Box>\n )}\n </Flex>\n </Card>\n )\n}\n\nexport default PreviewWrapper\n\nfunction ScheduleItemStatusIndicator({publishedDocumentId}: {publishedDocumentId: string}) {\n const {versions} = useDocumentVersions({documentId: publishedDocumentId})\n return <DocumentVersionsStatusIndicator documentVersions={versions} />\n}\n","import {type SchemaType} from '@sanity/types'\nimport {useMemo} from 'react'\n\nimport {SCHEDULED_PUBLISHING_TIME_ZONE_SCOPE} from '../../constants'\nimport {useDocumentActionProps} from '../../contexts/documentActionProps'\nimport useDialogScheduleEdit from '../../hooks/useDialogScheduleEdit'\nimport {type Schedule} from '../../types'\nimport {getScheduledDocumentId} from '../../utils/paneItemHelpers'\nimport {ScheduleContextMenu} from '../scheduleContextMenu'\nimport PreviewWrapper from './PreviewWrapper'\n\ninterface Props {\n schedule: Schedule\n schemaType: SchemaType\n}\n\nconst DocumentPreview = (props: Props) => {\n const {schedule, schemaType} = props\n const timeZoneScope = SCHEDULED_PUBLISHING_TIME_ZONE_SCOPE\n\n const {DialogScheduleEdit, dialogProps, dialogScheduleEditShow} = useDialogScheduleEdit(\n schedule,\n timeZoneScope,\n )\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n const {onComplete} = useDocumentActionProps()\n const publishedId = useMemo(() => getScheduledDocumentId(schedule), [schedule])\n\n return (\n <>\n {/* Dialogs (rendered outside of cards so they don't infer card colors) */}\n {DialogScheduleEdit && <DialogScheduleEdit {...dialogProps} />}\n\n <PreviewWrapper\n contextMenu={\n <ScheduleContextMenu\n actions={{\n delete: true,\n edit: true,\n }}\n onDelete={onComplete}\n onEdit={dialogScheduleEditShow}\n schedule={schedule}\n schemaType={schemaType}\n />\n }\n onClick={dialogScheduleEditShow}\n publishedDocumentId={publishedId}\n schedule={schedule}\n schemaType={schemaType}\n />\n </>\n )\n}\n\nexport default DocumentPreview\n","import {TrashIcon} from '@sanity/icons/Trash'\nimport {Menu} from '@sanity/ui/menu'\n\nimport {MenuButton} from '../../../../ui-components/menuButton/MenuButton'\nimport {MenuItem} from '../../../../ui-components/menuItem/MenuItem'\nimport {ContextMenuButton} from '../../../components/contextMenuButton/ContextMenuButton'\nimport useScheduleOperation from '../../hooks/useScheduleOperation'\nimport {type Schedule} from '../../types'\n\ninterface Props {\n onDelete?: () => void\n schedule: Schedule\n}\n\n/**\n * 'Fallback' context menu used with schedules that don't have any valid associated documentType.\n * Currently, all users can delete schedules that don't have any associated documents, so we don't need to check for permissions here.\n *\n * Intentionally not gated on `document.actions`: there is no `schemaType` to build\n * `{schemaType, documentId, versionType, releaseId}`, and delete-schedule has no honest action id.\n * Remediation UI for orphaned or deleted documents.\n */\nexport const FallbackContextMenu = (props: Props) => {\n const {onDelete, schedule} = props\n const {deleteSchedule} = useScheduleOperation()\n\n const handleDelete = () => {\n void deleteSchedule({schedule}).then(() => onDelete?.())\n }\n\n return (\n <MenuButton\n button={<ContextMenuButton />}\n id=\"contextMenu\"\n menu={\n <Menu>\n <MenuItem\n icon={TrashIcon}\n onClick={handleDelete}\n text=\"Delete schedule\"\n tone=\"critical\"\n />\n </Menu>\n }\n popover={{placement: 'left', portal: true, tone: 'default'}}\n />\n )\n}\n","import {red} from '@sanity/color'\nimport {UnknownIcon} from '@sanity/icons/Unknown'\n\nimport {SanityDefaultPreview} from '../../../preview/components/SanityDefaultPreview'\nimport {type Schedule} from '../../types'\nimport {FallbackContextMenu} from '../scheduleContextMenu/FallbackContextMenu'\nimport PreviewWrapper from './PreviewWrapper'\n\nconst NoSchemaItem = ({schedule}: {schedule: Schedule}) => {\n return (\n <PreviewWrapper\n contextMenu={<FallbackContextMenu schedule={schedule} />}\n schedule={schedule}\n useElementQueries\n >\n <SanityDefaultPreview\n icon={UnknownIcon}\n layout=\"default\"\n subtitle={<em>It may have been deleted</em>}\n title={<em style={{color: red[600].hex}}>Document not found</em>}\n />\n </PreviewWrapper>\n )\n}\n\nexport default NoSchemaItem\n","import {type SchemaType} from '@sanity/types'\nimport {type ComponentType} from 'react'\nimport {IntentLink} from 'sanity/router'\n\nimport {Preview} from '../../../preview/components/Preview'\nimport {SanityDefaultPreview} from '../../../preview/components/SanityDefaultPreview'\nimport {getPublishedId} from '../../../util/draftUtils'\nimport {SCHEDULED_PUBLISHING_TIME_ZONE_SCOPE} from '../../constants'\nimport useDialogScheduleEdit from '../../hooks/useDialogScheduleEdit'\nimport {type Schedule} from '../../types'\nimport {type PaneItemPreviewState} from '../../utils/paneItemHelpers'\nimport {ScheduleContextMenu} from '../scheduleContextMenu'\nimport PreviewWrapper from './PreviewWrapper'\n\ninterface Props {\n previewState: PaneItemPreviewState\n schedule: Schedule\n schemaType: SchemaType\n}\n\nconst ToolPreview = (props: Props) => {\n const {previewState, schedule, schemaType} = props\n const timeZoneScope = SCHEDULED_PUBLISHING_TIME_ZONE_SCOPE\n\n const visibleDocument = previewState.draft || previewState.published\n const isCompleted = schedule.state === 'succeeded'\n const isScheduled = schedule.state === 'scheduled'\n\n const {DialogScheduleEdit, dialogProps, dialogScheduleEditShow} = useDialogScheduleEdit(\n schedule,\n timeZoneScope,\n )\n const publishedDocId = visibleDocument ? getPublishedId(visibleDocument._id) : undefined\n\n return (\n <>\n {/* Dialogs (rendered outside of cards so they don't infer card colors) */}\n {DialogScheduleEdit && <DialogScheduleEdit {...dialogProps} />}\n <PreviewWrapper\n contextMenu={\n <ScheduleContextMenu\n actions={{\n clear: isCompleted,\n delete: !isCompleted,\n edit: isScheduled,\n execute: isScheduled,\n }}\n onEdit={dialogScheduleEditShow}\n schedule={schedule}\n schemaType={schemaType}\n />\n }\n linkComponent={IntentLink}\n linkProps={{\n intent: 'edit',\n params: {\n type: schemaType.name,\n ...(publishedDocId ? {id: publishedDocId} : {}),\n },\n }}\n publishedDocumentId={publishedDocId}\n schedule={schedule}\n schemaType={schemaType}\n useElementQueries\n >\n {previewState.isLoading ? (\n <SanityDefaultPreview\n icon={schemaType?.icon as ComponentType}\n isPlaceholder={previewState.isLoading}\n layout=\"default\"\n />\n ) : (\n <Preview layout=\"default\" schemaType={schemaType} value={visibleDocument} />\n )}\n </PreviewWrapper>\n </>\n )\n}\n\nexport default ToolPreview\n","import {useMemo} from 'react'\n\nimport usePreviewState from '../../hooks/usePreviewState'\nimport {useScheduleSchemaType} from '../../hooks/useSchemaType'\nimport {type Schedule} from '../../types'\nimport {getScheduledDocument} from '../../utils/paneItemHelpers'\nimport DateWithTooltipElementQuery from './dateWithTooltip/DateWithTooltipElementQuery'\nimport DocumentPreview from './DocumentPreview'\nimport NoSchemaItem from './NoSchemaItem'\nimport ToolPreview from './ToolPreview'\n\ninterface Props {\n schedule: Schedule\n type: 'document' | 'tool'\n}\n\nexport const ScheduleItem = (props: Props) => {\n const {schedule, type} = props\n\n const firstDocument = getScheduledDocument(schedule)\n\n const schemaType = useScheduleSchemaType(schedule)\n const previewState = usePreviewState(firstDocument?.documentId, schemaType)\n\n const visibleDocument = previewState.draft || previewState.published\n const invalidDocument = !visibleDocument && !previewState.isLoading\n\n const preview = useMemo(() => {\n if (!schemaType || invalidDocument) {\n return <NoSchemaItem schedule={schedule} />\n }\n\n if (type === 'document') {\n return <DocumentPreview schedule={schedule} schemaType={schemaType} />\n }\n\n if (type === 'tool') {\n return <ToolPreview previewState={previewState} schedule={schedule} schemaType={schemaType} />\n }\n\n return null\n }, [invalidDocument, type, previewState, schedule, schemaType])\n\n return <DateWithTooltipElementQuery>{preview}</DateWithTooltipElementQuery>\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAM,6BAA6B,OAAO,YAAY,CAAC,CAAA,WAAA;;;6ICSjD,gBAAgB,UAAiB;gBAC/B,EAAC,OAAO,kBAAiB,OACzB,EAAC,aAAY,YAAY,aAAa,GACtC,EAAC,MAAK,eAAe,GAarBA;qDAAC,KAAA,oBAAA,SAAD;EAAO,OAAO;GAAC,SAAS;GAAG,UAAU;GAAY,OAAO;EAAC;EAAG,UAAU;EAAI,MAAK;CAAU,CAAA;CAC9DC,IAAAA;;EAAC,WAAW;EAAQ,cAAc;CAAM;CAE/CC,IAAAA;CACYC,AAAAA,EAAAA,OAAAA,KAAAA,EAAAA,OAAAA,SAAAA,mBAAAA,EAAAA,OACTC,SAAAA,UAFH,KAAA,EAAE,oDAAoD;EACpE,iBAAiB,SAAS;EAC1B,QAAQ,SAAS;CACnB,CAAC,GAHe,EAAA,KAAA,GACYD,EAAAA,KAAAA,SAAAA,iBACTC,EAAAA,KAAAA,SAAAA;CAJvBC,IAAAA;CAEoBH,AAAAA,EAAAA,OAAAA,MAAAA,EAAAA,OAID,iBANnB,KAAA,oBAAC,OAAD;EAAK,YAAY;EAAG,OAAOD;EACzB,UAAA,oBAAC,gBAAD;GACE,gBAAgBC;GAID;GACf,mBAAA;EACD,CAAA;CACE,CAAA,GAPeA,EAAAA,KAAAA,IAID,EAAA,KAAA;CAlBvBI,IAAAA;CADF,OAaMD,EAAAA,OAAAA,MAAAA,EAAAA,QAVC,SAFL,KAAA,oBAAC,4BAAD,EAAA,UACE,qBAAC,QA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C,EAAA,MAAA,sBAA9BA;AACT"}
|
|
1
|
+
{"version":3,"file":"scheduleItem-5fXCZgfo.js","names":["<input style={{opacity: 0, position: 'absolute', width: 0}} tabIndex={-1} type=\"button\" />","{marginTop: '-1em', marginBottom: '-1em'}","t('time-zone.time-zone-tooltip-scheduled-publishing', {\n alternativeName: timeZone.alternativeName,\n offset: timeZone.offset,\n })","alternativeName","offset","<Box marginLeft={2} style={{marginTop: '-1em', marginBottom: '-1em'}}>\n <TimeZoneButton\n tooltipContent={t('time-zone.time-zone-tooltip-scheduled-publishing', {\n alternativeName: timeZone.alternativeName,\n offset: timeZone.offset,\n })}\n timeZoneScope={timeZoneScope}\n useElementQueries\n />\n </Box>","<TimeZoneButtonElementQuery>\n <Flex alignItems=\"center\">\n {title}\n {/*\n HACK: Sanity UI will attempt to focus the first 'focusable' descendant of any dialog.\n Typically this is fine, but since our first focusable element is a button with a tooltip, this\n default behaviour causes the tooltip to appear whenever the dialog is opened, which we don't want!\n\n To get around this, we include a pseudo-hidden input to ensure our tooltip-enabled button remains\n unfocused on initial mount.\n */}\n <input style={{opacity: 0, position: 'absolute', width: 0}} tabIndex={-1} type=\"button\" />\n <Box marginLeft={2} style={{marginTop: '-1em', marginBottom: '-1em'}}>\n <TimeZoneButton\n tooltipContent={t('time-zone.time-zone-tooltip-scheduled-publishing', {\n alternativeName: timeZone.alternativeName,\n offset: timeZone.offset,\n })}\n timeZoneScope={timeZoneScope}\n useElementQueries\n />\n </Box>\n </Flex>\n </TimeZoneButtonElementQuery>","useMemo(() => {\n if (!customValidation) {\n return true\n }\n return customValidation(endOfDay(date))\n }, [date, customValidation])","customValidation(endOfDay(date))","() => {\n if (isValid) {\n onSelect(date)\n }\n }","useCallback(() => {\n if (isValid) {\n onSelect(date)\n }\n }, [date, isValid, onSelect])","date.toDateString()","{textAlign: 'center'}","date.getDate()","<Text\n muted={!selected && !isCurrentMonth}\n style={{textAlign: 'center'}}\n weight={isCurrentMonth ? 'medium' : 'regular'}\n >\n {date.getDate()}\n </Text>","!selected && !isCurrentMonth","isCurrentMonth ? 'medium' : 'regular'","<Card\n aria-label={date.toDateString()}\n aria-pressed={selected}\n as=\"button\"\n __unstable_focusRing\n data-weekday\n data-focused={focused ? 'true' : ''}\n disabled={!isValid}\n role=\"button\"\n tabIndex={-1}\n onClick={handleClick}\n padding={3}\n radius={2}\n selected={selected}\n tone={isToday || selected ? 'primary' : 'default'}\n >\n <Text\n muted={!selected && !isCurrentMonth}\n style={{textAlign: 'center'}}\n weight={isCurrentMonth ? 'medium' : 'regular'}\n >\n {date.getDate()}\n </Text>\n </Card>","focused ? 'true' : ''","!isValid","isToday || selected ? 'primary' : 'default'","<div aria-selected={selected} data-ui=\"CalendarDay\">\n <Card\n aria-label={date.toDateString()}\n aria-pressed={selected}\n as=\"button\"\n __unstable_focusRing\n data-weekday\n data-focused={focused ? 'true' : ''}\n disabled={!isValid}\n role=\"button\"\n tabIndex={-1}\n onClick={handleClick}\n padding={3}\n radius={2}\n selected={selected}\n tone={isToday || selected ? 'primary' : 'default'}\n >\n <Text\n muted={!selected && !isCurrentMonth}\n style={{textAlign: 'center'}}\n weight={isCurrentMonth ? 'medium' : 'regular'}\n >\n {date.getDate()}\n </Text>\n </Card>\n </div>","{gridTemplateColumns: 'repeat(7, minmax(44px, 46px))'}","WEEK_DAY_NAMES.map((weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n ))","(weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n )","getWeeksOfMonth(props.date).map((week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, getCurrentZoneDate())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n customValidation={customValidation}\n onSelect={props.onSelect}\n selected={selected}\n />\n )\n }),\n )","date","focused","onSelect","selected","(week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, getCurrentZoneDate())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n customValidation={customValidation}\n onSelect={props.onSelect}\n selected={selected}\n />\n )\n })","<Grid gap={1} style={{gridTemplateColumns: 'repeat(7, minmax(44px, 46px))'}}>\n {WEEK_DAY_NAMES.map((weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n ))}\n\n {/* Note: UTC dates are passed to each Calendar day but we use 'wall time' for comparison */}\n {getWeeksOfMonth(props.date).map((week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, getCurrentZoneDate())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n customValidation={customValidation}\n onSelect={props.onSelect}\n selected={selected}\n />\n )\n }),\n )}\n </Grid>","<Box aria-hidden={props.hidden || false} data-ui=\"CalendarMonth\">\n <Grid gap={1} style={{gridTemplateColumns: 'repeat(7, minmax(44px, 46px))'}}>\n {WEEK_DAY_NAMES.map((weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n ))}\n\n {/* Note: UTC dates are passed to each Calendar day but we use 'wall time' for comparison */}\n {getWeeksOfMonth(props.date).map((week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, getCurrentZoneDate())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n customValidation={customValidation}\n onSelect={props.onSelect}\n selected={selected}\n />\n )\n }),\n )}\n </Grid>\n </Box>","props.hidden || false","{onChange, ...props}: Props","(event: FocusEvent<HTMLInputElement> | ChangeEvent<HTMLInputElement>) => {\n const numericValue = parseInt(event.currentTarget.value, 10)\n if (!isNaN(numericValue)) {\n onChange(numericValue)\n }\n }","useCallback(\n (event: FocusEvent<HTMLInputElement> | ChangeEvent<HTMLInputElement>) => {\n const numericValue = parseInt(event.currentTarget.value, 10)\n if (!isNaN(numericValue)) {\n onChange(numericValue)\n }\n },\n [onChange],\n )","<LazyTextInput\n data-testid=\"date-input\"\n {...props}\n onChange={handleChange}\n inputMode=\"numeric\"\n />","selectedDate = getCurrentZoneDate()","focusedDate = selectedDate","timeStep = 1","(date: Date) => onFocusedDateChange(zoneDateToUtc(date))","useCallback(\n (date: Date) => onFocusedDateChange(zoneDateToUtc(date)),\n [onFocusedDateChange, zoneDateToUtc],\n )","(month: number) => setFocusedDate(setDate(setMonth(focusedDate, month), 1))","useCallback(\n (month: number) => setFocusedDate(setDate(setMonth(focusedDate, month), 1)),\n [focusedDate, setFocusedDate],\n )","(e: FormEvent<HTMLSelectElement>) => setFocusedDateMonth(Number(e.currentTarget.value))","useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (e: FormEvent<HTMLSelectElement>) => setFocusedDateMonth(Number(e.currentTarget.value)),\n [setFocusedDateMonth],\n )","(by: number) => setFocusedDate(addMonths(focusedDate, by))","useCallback(\n (by: number) => setFocusedDate(addMonths(focusedDate, by)),\n [focusedDate, setFocusedDate],\n )","(year: number) => setFocusedDate(setYear(focusedDate, year))","useCallback(\n (year: number) => setFocusedDate(setYear(focusedDate, year)),\n [focusedDate, setFocusedDate],\n )","(date: Date) => {\n onSelect(\n zoneDateToUtc(\n setMinutes(setHours(date, selectedDate.getHours()), selectedDate.getMinutes()),\n ),\n )\n }","date","useCallback(\n (date: Date) => {\n onSelect(\n zoneDateToUtc(\n setMinutes(setHours(date, selectedDate.getHours()), selectedDate.getMinutes()),\n ),\n )\n },\n [onSelect, selectedDate, zoneDateToUtc],\n )","(event: FormEvent<HTMLSelectElement>) => {\n const m = Number(event.currentTarget.value)\n onSelect(zoneDateToUtc(setMinutes(selectedDate, m)))\n }","useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (event: FormEvent<HTMLSelectElement>) => {\n const m = Number(event.currentTarget.value)\n onSelect(zoneDateToUtc(setMinutes(selectedDate, m)))\n },\n [onSelect, selectedDate, zoneDateToUtc],\n )","(event: FormEvent<HTMLSelectElement>) => {\n const m = Number(event.currentTarget.value)\n onSelect(zoneDateToUtc(setHours(selectedDate, m)))\n }","m","event","useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (event: FormEvent<HTMLSelectElement>) => {\n const m = Number(event.currentTarget.value)\n onSelect(zoneDateToUtc(setHours(selectedDate, m)))\n },\n [onSelect, selectedDate, zoneDateToUtc],\n )","(hours: number, mins: number) => {\n onSelect(zoneDateToUtc(setHours(setMinutes(selectedDate, mins), hours)))\n }","useCallback(\n (hours: number, mins: number) => {\n onSelect(zoneDateToUtc(setHours(setMinutes(selectedDate, mins), hours)))\n },\n [onSelect, selectedDate, zoneDateToUtc],\n )","() => ref.current","() => {\n ref.current?.querySelector<HTMLElement>(`[data-focused=\"true\"]`)?.focus()\n }","useCallback(() => {\n ref.current?.querySelector<HTMLElement>(`[data-focused=\"true\"]`)?.focus()\n }, [ref])","(event: KeyboardEvent<HTMLDivElement>) => {\n if (!ARROW_KEYS.includes(event.key)) {\n return\n }\n event.preventDefault()\n if (event.currentTarget.hasAttribute('data-calendar-grid')) {\n focusCurrentWeekDay()\n return\n }\n if (event.key === 'ArrowUp') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, -7)))\n }\n if (event.key === 'ArrowDown') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, 7)))\n }\n if (event.key === 'ArrowLeft') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, -1)))\n }\n if (event.key === 'ArrowRight') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, 1)))\n }\n // set focus temporarily on this element to make sure focus is still inside the calendar-grid after re-render\n ref.current?.querySelector<HTMLElement>('[data-preserve-focus]')?.focus()\n }","useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (!ARROW_KEYS.includes(event.key)) {\n return\n }\n event.preventDefault()\n if (event.currentTarget.hasAttribute('data-calendar-grid')) {\n focusCurrentWeekDay()\n return\n }\n if (event.key === 'ArrowUp') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, -7)))\n }\n if (event.key === 'ArrowDown') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, 7)))\n }\n if (event.key === 'ArrowLeft') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, -1)))\n }\n if (event.key === 'ArrowRight') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, 1)))\n }\n // set focus temporarily on this element to make sure focus is still inside the calendar-grid after re-render\n ref.current?.querySelector<HTMLElement>('[data-preserve-focus]')?.focus()\n },\n [zoneDateToUtc, ref, focusCurrentWeekDay, onFocusedDateChange, focusedDate],\n )","() => {\n focusCurrentWeekDay()\n }","[focusCurrentWeekDay]","() => {\n const currentFocusInCalendarGrid = document.activeElement?.matches(\n '[data-calendar-grid], [data-calendar-grid] [data-preserve-focus]',\n )\n if (\n // Only move focus if it's currently in the calendar grid\n currentFocusInCalendarGrid\n ) {\n focusCurrentWeekDay()\n }\n // oxlint-disable-next-line react/exhaustive-effect-dependencies -- pre-existing violation, to be fixed in a follow-up\n }","[ref, focusCurrentWeekDay, focusedDate]","() => onSelect(new Date())","useCallback(() => onSelect(new Date()), [onSelect])","focusedDate?.getMonth()","focusedDate?.getMonth","<Box flexBasis=\"0%\" flexGrow={1}>\n <CalendarMonthSelect\n moveFocusedDate={moveFocusedDate}\n onChange={handleFocusedMonthChange}\n value={focusedDate?.getMonth()}\n />\n </Box>","focusedDate.getFullYear()","<Box marginLeft={2}>\n <CalendarYearSelect\n moveFocusedDate={moveFocusedDate}\n onChange={setFocusedDateYear}\n value={focusedDate.getFullYear()}\n />\n </Box>","<Flex>\n <Box flexBasis=\"0%\" flexGrow={1}>\n <CalendarMonthSelect\n moveFocusedDate={moveFocusedDate}\n onChange={handleFocusedMonthChange}\n value={focusedDate?.getMonth()}\n />\n </Box>\n <Box marginLeft={2}>\n <CalendarYearSelect\n moveFocusedDate={moveFocusedDate}\n onChange={setFocusedDateYear}\n value={focusedDate.getFullYear()}\n />\n </Box>\n </Flex>","<CalendarMonth\n date={focusedDate}\n focused={focusedDate}\n customValidation={customValidation}\n onSelect={handleDateChange}\n selected={selectedDate}\n timeZoneScope={timeZoneScope}\n />","<Box\n data-calendar-grid\n onKeyDown={handleKeyDown}\n marginTop={2}\n overflow=\"hidden\"\n tabIndex={0}\n >\n <CalendarMonth\n date={focusedDate}\n focused={focusedDate}\n customValidation={customValidation}\n onSelect={handleDateChange}\n selected={selectedDate}\n timeZoneScope={timeZoneScope}\n />\n {PRESERVE_FOCUS_ELEMENT}\n </Box>","<Box padding={2}>\n {/* Select month and year */}\n <Flex>\n <Box flexBasis=\"0%\" flexGrow={1}>\n <CalendarMonthSelect\n moveFocusedDate={moveFocusedDate}\n onChange={handleFocusedMonthChange}\n value={focusedDate?.getMonth()}\n />\n </Box>\n <Box marginLeft={2}>\n <CalendarYearSelect\n moveFocusedDate={moveFocusedDate}\n onChange={setFocusedDateYear}\n value={focusedDate.getFullYear()}\n />\n </Box>\n </Flex>\n\n {/* Selected month (grid of days) */}\n <Box\n data-calendar-grid\n onKeyDown={handleKeyDown}\n marginTop={2}\n overflow=\"hidden\"\n tabIndex={0}\n >\n <CalendarMonth\n date={focusedDate}\n focused={focusedDate}\n customValidation={customValidation}\n onSelect={handleDateChange}\n selected={selectedDate}\n timeZoneScope={timeZoneScope}\n />\n {PRESERVE_FOCUS_ELEMENT}\n </Box>\n </Box>","selectTime && (\n <Box padding={2} style={{borderTop: '1px solid var(--card-border-color)'}}>\n <Flex alignItems=\"center\">\n <Flex alignItems=\"center\" flexBasis=\"0%\" flexGrow={1}>\n <Box>\n <Select\n aria-label=\"Select hour\"\n value={selectedDate?.getHours()}\n onChange={handleHoursChange}\n >\n {HOURS_24.map((h) => (\n <option key={h} value={h}>\n {`${h}`.padStart(2, '0')}\n </option>\n ))}\n </Select>\n </Box>\n\n <Box paddingX={1}>\n <Text>:</Text>\n </Box>\n\n <Box>\n <Select\n aria-label=\"Select minutes\"\n value={selectedDate?.getMinutes()}\n onChange={handleMinutesChange}\n >\n {range(0, 60, timeStep).map((m) => (\n <option key={m} value={m}>\n {`${m}`.padStart(2, '0')}\n </option>\n ))}\n </Select>\n </Box>\n </Flex>\n\n <Box marginLeft={2}>\n <Button text=\"Set to current time\" mode=\"bleed\" onClick={handleNowClick} />\n </Box>\n </Flex>\n\n {features.timePresets && (\n <Flex\n flexDirection=\"row\"\n justifyContent=\"center\"\n alignItems=\"center\"\n style={{marginTop: 5}}\n >\n {DEFAULT_TIME_PRESETS.map(([hours, minutes]) => {\n return (\n <CalendarTimePresetButton\n key={`${hours}-${minutes}`}\n hours={hours}\n minutes={minutes}\n onTimeChange={handleTimeChange}\n selectedDate={selectedDate}\n />\n )\n })}\n </Flex>\n )}\n </Box>\n )","selectedDate?.getHours","(h) => (\n <option key={h} value={h}>\n {`${h}`.padStart(2, '0')}\n </option>\n )","(m) => (\n <option key={m} value={m}>\n {`${m}`.padStart(2, '0')}\n </option>\n )","hours","[hours, minutes]","<Box data-ui=\"Calendar\" {...restProps} ref={ref}>\n {/* Select date */}\n <Box padding={2}>\n {/* Select month and year */}\n <Flex>\n <Box flexBasis=\"0%\" flexGrow={1}>\n <CalendarMonthSelect\n moveFocusedDate={moveFocusedDate}\n onChange={handleFocusedMonthChange}\n value={focusedDate?.getMonth()}\n />\n </Box>\n <Box marginLeft={2}>\n <CalendarYearSelect\n moveFocusedDate={moveFocusedDate}\n onChange={setFocusedDateYear}\n value={focusedDate.getFullYear()}\n />\n </Box>\n </Flex>\n\n {/* Selected month (grid of days) */}\n <Box\n data-calendar-grid\n onKeyDown={handleKeyDown}\n marginTop={2}\n overflow=\"hidden\"\n tabIndex={0}\n >\n <CalendarMonth\n date={focusedDate}\n focused={focusedDate}\n customValidation={customValidation}\n onSelect={handleDateChange}\n selected={selectedDate}\n timeZoneScope={timeZoneScope}\n />\n {PRESERVE_FOCUS_ELEMENT}\n </Box>\n </Box>\n\n {/* Select time */}\n {selectTime && (\n <Box padding={2} style={{borderTop: '1px solid var(--card-border-color)'}}>\n <Flex alignItems=\"center\">\n <Flex alignItems=\"center\" flexBasis=\"0%\" flexGrow={1}>\n <Box>\n <Select\n aria-label=\"Select hour\"\n value={selectedDate?.getHours()}\n onChange={handleHoursChange}\n >\n {HOURS_24.map((h) => (\n <option key={h} value={h}>\n {`${h}`.padStart(2, '0')}\n </option>\n ))}\n </Select>\n </Box>\n\n <Box paddingX={1}>\n <Text>:</Text>\n </Box>\n\n <Box>\n <Select\n aria-label=\"Select minutes\"\n value={selectedDate?.getMinutes()}\n onChange={handleMinutesChange}\n >\n {range(0, 60, timeStep).map((m) => (\n <option key={m} value={m}>\n {`${m}`.padStart(2, '0')}\n </option>\n ))}\n </Select>\n </Box>\n </Flex>\n\n <Box marginLeft={2}>\n <Button text=\"Set to current time\" mode=\"bleed\" onClick={handleNowClick} />\n </Box>\n </Flex>\n\n {features.timePresets && (\n <Flex\n flexDirection=\"row\"\n justifyContent=\"center\"\n alignItems=\"center\"\n style={{marginTop: 5}}\n >\n {DEFAULT_TIME_PRESETS.map(([hours, minutes]) => {\n return (\n <CalendarTimePresetButton\n key={`${hours}-${minutes}`}\n hours={hours}\n minutes={minutes}\n onTimeChange={handleTimeChange}\n selectedDate={selectedDate}\n />\n )\n })}\n </Flex>\n )}\n </Box>\n )}\n </Box>","formatTime(hours, minutes)","() => {\n onTimeChange(hours, minutes)\n }","useCallback(() => {\n onTimeChange(hours, minutes)\n }, [hours, minutes, onTimeChange])","selectedDate.toDateString()","<Button\n text={formatted}\n aria-label={`${formatted} on ${selectedDate.toDateString()}`}\n mode=\"bleed\"\n fontSize={1}\n onClick={handleClick}\n />","`${formatted} on ${selectedDate.toDateString()}`","() => moveFocusedDate(-1)","useCallback(() => moveFocusedDate(-1), [moveFocusedDate])","() => moveFocusedDate(1)","useCallback(() => moveFocusedDate(1), [moveFocusedDate])","<Button\n aria-label=\"Go to previous month\"\n onClick={handlePrevMonthClick}\n mode=\"bleed\"\n icon={ChevronLeftIcon}\n paddingX={2}\n radius={0}\n />","MONTH_NAMES.map((m, i) => (\n // oxlint-disable-next-line no-array-index-key\n <option key={i} value={i}>\n {m}\n </option>\n ))","(m, i) => (\n // oxlint-disable-next-line no-array-index-key\n <option key={i} value={i}>\n {m}\n </option>\n )","<Box flexBasis=\"0%\" flexGrow={1}>\n <Select radius={0} value={value} onChange={onChange}>\n {MONTH_NAMES.map((m, i) => (\n // oxlint-disable-next-line no-array-index-key\n <option key={i} value={i}>\n {m}\n </option>\n ))}\n </Select>\n </Box>","<Button\n aria-label=\"Go to next month\"\n mode=\"bleed\"\n icon={ChevronRightIcon}\n onClick={handleNextMonthClick}\n paddingX={2}\n radius={0}\n />","<Flex flexBasis=\"0%\" flexGrow={1}>\n <Button\n aria-label=\"Go to previous month\"\n onClick={handlePrevMonthClick}\n mode=\"bleed\"\n icon={ChevronLeftIcon}\n paddingX={2}\n radius={0}\n />\n <Box flexBasis=\"0%\" flexGrow={1}>\n <Select radius={0} value={value} onChange={onChange}>\n {MONTH_NAMES.map((m, i) => (\n // oxlint-disable-next-line no-array-index-key\n <option key={i} value={i}>\n {m}\n </option>\n ))}\n </Select>\n </Box>\n <Button\n aria-label=\"Go to next month\"\n mode=\"bleed\"\n icon={ChevronRightIcon}\n onClick={handleNextMonthClick}\n paddingX={2}\n radius={0}\n />\n </Flex>","() => moveFocusedDate(-12)","useCallback(() => moveFocusedDate(-12), [moveFocusedDate])","() => moveFocusedDate(12)","useCallback(() => moveFocusedDate(12), [moveFocusedDate])","<Button\n aria-label=\"Previous year\"\n onClick={handlePrevYearClick}\n mode=\"bleed\"\n icon={ChevronLeftIcon}\n paddingX={2}\n radius={0}\n />","{width: 65}","<YearInput value={value} onChange={onChange} radius={0} style={{width: 65}} />","<Button\n aria-label=\"Next year\"\n onClick={handleNextYearClick}\n mode=\"bleed\"\n icon={ChevronRightIcon}\n paddingX={2}\n radius={0}\n />","<Flex>\n <Button\n aria-label=\"Previous year\"\n onClick={handlePrevYearClick}\n mode=\"bleed\"\n icon={ChevronLeftIcon}\n paddingX={2}\n radius={0}\n />\n <YearInput value={value} onChange={onChange} radius={0} style={{width: 65}} />\n <Button\n aria-label=\"Next year\"\n onClick={handleNextYearClick}\n mode=\"bleed\"\n icon={ChevronRightIcon}\n paddingX={2}\n radius={0}\n />\n </Flex>","_value ?? new Date()","(nextDate: Date) => {\n onChange(nextDate)\n setFocusedDay(undefined)\n }","useCallback(\n (nextDate: Date) => {\n onChange(nextDate)\n setFocusedDay(undefined)\n },\n [onChange],\n )","utcToCurrentZoneDate(value)","utcToCurrentZoneDate(focusedDate || value)","focusedDate || value","<Calendar\n {...rest}\n ref={ref}\n selectedDate={utcToCurrentZoneDate(value)}\n onSelect={handleSelect}\n focusedDate={utcToCurrentZoneDate(focusedDate || value)}\n onFocusedDateChange={setFocusedDay}\n customValidation={customValidation}\n timeZoneScope={timeZoneScope}\n />","() => inputRef.current","() => setPickerOpen(false)","() => [popoverRef.current]","() => {\n inputRef.current?.focus()\n inputRef.current?.select()\n }","useCallback(() => {\n inputRef.current?.focus()\n inputRef.current?.select()\n }, [inputRef])","(e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n setPickerOpen(false)\n }\n }","useCallback((e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n setPickerOpen(false)\n }\n }, [])","() => setPickerOpen(true)","useCallback(() => setPickerOpen(true), [])","{padding: '5px'}","<Box style={{padding: '5px'}}>\n <Button\n ref={buttonRef}\n icon={CalendarIcon}\n mode=\"bleed\"\n padding={2}\n onClick={handleClick}\n style={{display: 'block'}}\n data-testid=\"select-date-button\"\n />\n </Box>","isPickerOpen ? (\n // Note: we're conditionally inserting the popover here due to an\n // issue with popovers rendering incorrectly on subsequent renders\n // see https://github.com/sanity-io/design/issues/519\n <LayerProvider zOffset={1000}>\n <Popover\n constrainSize\n content={\n <Box overflow=\"auto\">\n <FocusLock onDeactivation={handleDeactivation}>\n <DatePicker\n selectTime={selectTime}\n timeStep={timeStep}\n onKeyUp={handleKeyUp}\n value={value}\n onChange={onChange}\n customValidation={customValidation}\n timeZoneScope={timeZoneScope}\n />\n </FocusLock>\n </Box>\n }\n data-testid=\"date-input-dialog\"\n fallbackPlacements={['bottom', 'bottom-start', 'top-end', 'top', 'top-start']}\n floatingBoundary={portal.element}\n open\n placement=\"bottom-end\"\n portal\n radius={2}\n ref={popoverRef}\n >\n {suffix}\n </Popover>\n </LayerProvider>\n ) : (\n suffix\n )","portal.element","<LazyTextInput\n data-testid=\"date-input\"\n ref={inputRef}\n {...rest}\n value={inputValue}\n onChange={onInputChange}\n suffix={\n isPickerOpen ? (\n // Note: we're conditionally inserting the popover here due to an\n // issue with popovers rendering incorrectly on subsequent renders\n // see https://github.com/sanity-io/design/issues/519\n <LayerProvider zOffset={1000}>\n <Popover\n constrainSize\n content={\n <Box overflow=\"auto\">\n <FocusLock onDeactivation={handleDeactivation}>\n <DatePicker\n selectTime={selectTime}\n timeStep={timeStep}\n onKeyUp={handleKeyUp}\n value={value}\n onChange={onChange}\n customValidation={customValidation}\n timeZoneScope={timeZoneScope}\n />\n </FocusLock>\n </Box>\n }\n data-testid=\"date-input-dialog\"\n fallbackPlacements={['bottom', 'bottom-start', 'top-end', 'top', 'top-start']}\n floatingBoundary={portal.element}\n open\n placement=\"bottom-end\"\n portal\n radius={2}\n ref={popoverRef}\n >\n {suffix}\n </Popover>\n </LayerProvider>\n ) : (\n suffix\n )\n }\n />","() => {\n // oxlint-disable-next-line react/set-state-in-effect -- pre-existing violation, to be fixed in a follow-up\n setLocalValue(null)\n // oxlint-disable-next-line react/exhaustive-effect-dependencies -- pre-existing violation, to be fixed in a follow-up\n }","[value]","(event: FocusEvent<HTMLInputElement>) => {\n const nextInputValue = event.currentTarget.value\n const result = nextInputValue === '' ? null : parseInputValue(nextInputValue)\n\n if (result === null) {\n onChange(null)\n\n // If the field value is undefined, and we are clearing the invalid value\n // the above useEffect won't trigger, so we do some extra clean up here\n if (undefinedValue && localValue) {\n setLocalValue(null)\n }\n } else if (result.isValid) {\n // Convert zone time to UTC\n onChange(serialize(zoneDateToUtc(result.date)))\n } else {\n setLocalValue(nextInputValue)\n }\n }","useCallback(\n (event: FocusEvent<HTMLInputElement>) => {\n const nextInputValue = event.currentTarget.value\n const result = nextInputValue === '' ? null : parseInputValue(nextInputValue)\n\n if (result === null) {\n onChange(null)\n\n // If the field value is undefined, and we are clearing the invalid value\n // the above useEffect won't trigger, so we do some extra clean up here\n if (undefinedValue && localValue) {\n setLocalValue(null)\n }\n } else if (result.isValid) {\n // Convert zone time to UTC\n onChange(serialize(zoneDateToUtc(result.date)))\n } else {\n setLocalValue(nextInputValue)\n }\n },\n [undefinedValue, zoneDateToUtc, localValue, serialize, onChange, parseInputValue],\n )","(nextDate: Date | null) => {\n onChange(nextDate ? serialize(nextDate) : null)\n }","useCallback(\n (nextDate: Date | null) => {\n onChange(nextDate ? serialize(nextDate) : null)\n },\n [serialize, onChange],\n )","() => inputRef.current","localValue\n ? localValue\n : parseResult?.isValid\n ? formatInputValue(parseResult.date)\n : value","markers.map((m) => ({\n level: m.level,\n path: m.path,\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n message: m.message ?? m.item?.message,\n }))","(m) => ({\n level: m.level,\n path: m.path,\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n message: m.message ?? m.item?.message,\n })","useMemo(\n () =>\n markers.map((m) => ({\n level: m.level,\n path: m.path,\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n message: m.message ?? m.item?.message,\n })),\n [markers],\n )","parseResult?.error\n ? [\n ...nodeValidations,\n {\n level: 'error',\n message: parseResult.error,\n path: [],\n }, // casting to marker to avoid having to implement cloneWithMessage on item\n ]\n : nodeValidations","parseResult?.error","[]","readOnly ? (\n <TextInput value={inputValue} readOnly />\n ) : (\n <DateTimeInput\n {...rest}\n id={id}\n selectTime={selectTime}\n timeStep={timeStep}\n placeholder={placeholder || `e.g. ${formatInputValue(new Date())}`}\n ref={inputRef}\n value={parseResult?.date}\n inputValue={inputValue || ''}\n readOnly={Boolean(readOnly)}\n onInputChange={handleDatePickerInputChange}\n onChange={handleDatePickerChange}\n customValidity={parseResult?.error}\n customValidation={customValidation}\n timeZoneScope={timeZoneScope}\n />\n )","date","error","<FormField\n validation={\n parseResult?.error\n ? [\n ...nodeValidations,\n {\n level: 'error',\n message: parseResult.error,\n path: [],\n }, // casting to marker to avoid having to implement cloneWithMessage on item\n ]\n : nodeValidations\n }\n title={title}\n level={level}\n description={description}\n inputId={id}\n path={[]}\n >\n {readOnly ? (\n <TextInput value={inputValue} readOnly />\n ) : (\n <DateTimeInput\n {...rest}\n id={id}\n selectTime={selectTime}\n timeStep={timeStep}\n placeholder={placeholder || `e.g. ${formatInputValue(new Date())}`}\n ref={inputRef}\n value={parseResult?.date}\n inputValue={inputValue || ''}\n readOnly={Boolean(readOnly)}\n onInputChange={handleDatePickerInputChange}\n onChange={handleDatePickerChange}\n customValidity={parseResult?.error}\n customValidation={customValidation}\n timeZoneScope={timeZoneScope}\n />\n )}\n </FormField>","parseOptions(type.options)","options","(nextDate: string | null) => {\n let date = nextDate\n if (date !== null && timeStep > 1) {\n date = enforceTimeStep(date, timeStep)\n }\n\n onChange(date)\n }","useCallback(\n (nextDate: string | null) => {\n let date = nextDate\n if (date !== null && timeStep > 1) {\n date = enforceTimeStep(date, timeStep)\n }\n\n onChange(date)\n },\n [onChange, timeStep],\n )","(date: Date) => format(date, `${inputDateTimeFormat}`, {in: tzHelper(timeZone.name)})","name","date","useCallback(\n (date: Date) => format(date, `${inputDateTimeFormat}`, {in: tzHelper(timeZone.name)}),\n [inputDateTimeFormat, timeZone.name],\n )","(inputValue: string) => {\n const parsed = parse(inputValue, `${inputDateTimeFormat}`, getCurrentZoneDate())\n\n // Check is value is a valid date\n if (!isValid(parsed)) {\n return {\n isValid: false,\n error: `Invalid date. Must be in the format \"${inputDateTimeFormat}\"`,\n } as ParseResult\n }\n\n // Check if value adheres to custom validation rules\n if (!customValidation(parsed)) {\n return {\n isValid: false,\n error: customValidationMessage,\n } as ParseResult\n }\n\n return {\n isValid: true,\n date: parsed,\n } as ParseResult\n }","useCallback(\n (inputValue: string) => {\n const parsed = parse(inputValue, `${inputDateTimeFormat}`, getCurrentZoneDate())\n\n // Check is value is a valid date\n if (!isValid(parsed)) {\n return {\n isValid: false,\n error: `Invalid date. Must be in the format \"${inputDateTimeFormat}\"`,\n } as ParseResult\n }\n\n // Check if value adheres to custom validation rules\n if (!customValidation(parsed)) {\n return {\n isValid: false,\n error: customValidationMessage,\n } as ParseResult\n }\n\n return {\n isValid: true,\n date: parsed,\n } as ParseResult\n },\n [customValidation, customValidationMessage, getCurrentZoneDate, inputDateTimeFormat],\n )","<CommonDateTimeInput\n {...rest}\n onChange={handleChange}\n ref={forwardedRef}\n selectTime\n timeStep={timeStep}\n title={title}\n description={description}\n placeholder={placeholder}\n serialize={serialize}\n deserialize={deserialize}\n formatInputValue={formatInputValue}\n customValidation={customValidation}\n parseInputValue={parseInputValue}\n timeZoneScope={timeZoneScope}\n />","timeZoneScope","(date: string | null) => {\n if (date && onChange) {\n onChange({date})\n setInputValue(date)\n }\n }","(selectedDate: Date): boolean => {\n return selectedDate > getCurrentZoneDate()\n }","[]","{\n name: 'date',\n options: {\n customValidation: handleCustomValidation,\n customValidationMessage: 'Date cannot be in the past.',\n },\n title: 'Date and time',\n }","<Stack gap={4}>\n <Card>\n <DateTimeInput\n level={0}\n markers={[]}\n onChange={handleChange}\n type={{\n name: 'date',\n options: {\n customValidation: handleCustomValidation,\n customValidationMessage: 'Date cannot be in the past.',\n },\n title: 'Date and time',\n }}\n value={inputValue === undefined ? value?.date : inputValue}\n timeZoneScope={timeZoneScope}\n />\n </Card>\n </Stack>","inputValue === undefined ? value?.date : inputValue","<ScheduleForm onChange={onChange} value={value} />","<Stack gap={4}>\n {props.children}\n <ScheduleForm onChange={onChange} value={value} />\n </Stack>","children","<Text size={2}>\n <ErrorOutlineIcon />\n </Text>","<Text size={1} weight=\"semibold\">\n {title}\n </Text>","description && <Text size={1}>{description}</Text>","<Card overflow=\"hidden\" padding={4} radius={2} shadow={1} tone=\"critical\">\n <Flex alignItems=\"center\" gap={4}>\n <Text size={2}>\n <ErrorOutlineIcon />\n </Text>\n <Inline gap={2}>\n <Text size={1} weight=\"semibold\">\n {title}\n </Text>\n {description && <Text size={1}>{description}</Text>}\n </Inline>\n </Flex>\n </Card>","{\n children,\n value,\n}: {\n children: ReactNode\n value: DocumentActionProps\n}","<DocumentActionPropsContext.Provider value={value}>\n {children}\n </DocumentActionPropsContext.Provider>","DocumentActionPropsContext.Provider","schedule && schedule?.executeAt\n ? {\n date: schedule.executeAt,\n }\n : null","(form: ScheduleFormData) => {\n const equalDates =\n schedule?.executeAt &&\n new Date(schedule.executeAt).getTime() === new Date(form?.date).getTime()\n\n setFormData(form)\n setIsDirty(!equalDates)\n }","schedule?.executeAt","{\n formData,\n isDirty,\n onFormChange: handleFormChange,\n }","() => {\n if (onClick) {\n onClick(marker.path)\n }\n }","path","useCallback(() => {\n if (onClick) {\n onClick(marker.path)\n }\n }, [marker.path, onClick])","marker.level === 'error' && <ErrorOutlineIcon />","level","marker.level === 'warning' && <WarningOutlineIcon />","marker.level === 'info' && <InfoOutlineIcon />","<Box>\n <Text size={1}>\n {marker.level === 'error' && <ErrorOutlineIcon />}\n {marker.level === 'warning' && <WarningOutlineIcon />}\n {marker.level === 'info' && <InfoOutlineIcon />}\n </Text>\n </Box>","path && (\n <StyledText size={1} weight=\"semibold\">\n {path}\n </StyledText>\n )","message && (\n <StyledText muted size={1} textOverflow={truncate ? 'ellipsis' : undefined}>\n {message}\n </StyledText>\n )","<Stack gap={2} flex={1} paddingLeft={3}>\n {path && (\n <StyledText size={1} weight=\"semibold\">\n {path}\n </StyledText>\n )}\n {message && (\n <StyledText muted size={1} textOverflow={truncate ? 'ellipsis' : undefined}>\n {message}\n </StyledText>\n )}\n </Stack>","<Flex>\n <Box>\n <Text size={1}>\n {marker.level === 'error' && <ErrorOutlineIcon />}\n {marker.level === 'warning' && <WarningOutlineIcon />}\n {marker.level === 'info' && <InfoOutlineIcon />}\n </Text>\n </Box>\n\n <Stack gap={2} flex={1} paddingLeft={3}>\n {path && (\n <StyledText size={1} weight=\"semibold\">\n {path}\n </StyledText>\n )}\n {message && (\n <StyledText muted size={1} textOverflow={truncate ? 'ellipsis' : undefined}>\n {message}\n </StyledText>\n )}\n </Stack>\n </Flex>","<Box padding={2}>{children}</Box>","<MenuItem padding={1} onClick={handleClick} radius={2} tone={menuItemTone}>\n <Box padding={2}>{children}</Box>\n </MenuItem>","Container","0","kind","\"validation-list\"","hasErrors &&\n errors.map((_error, i) => (\n <ValidationListItem\n // oxlint-disable-next-line no-array-index-key\n key={i}\n truncate={truncate}\n path={resolvePathTitle(_error.path)}\n marker={_error}\n onClick={handleClick}\n />\n ))","hasWarnings &&\n warnings.map((_warning, i) => (\n <ValidationListItem\n // oxlint-disable-next-line no-array-index-key\n key={i}\n truncate={truncate}\n path={resolvePathTitle(_warning.path)}\n marker={_warning}\n onClick={handleClick}\n />\n ))","hasInfo &&\n info.map((_info, i) => (\n <ValidationListItem\n // oxlint-disable-next-line no-array-index-key\n key={i}\n truncate={truncate}\n path={resolvePathTitle(_info.path)}\n marker={_info}\n onClick={handleClick}\n />\n ))","(path: Path = []) => {\n if (onFocus) onFocus(path)\n if (onClose) onClose()\n }","path: Path = []","useCallback(\n (path: Path = []) => {\n if (onFocus) onFocus(path)\n if (onClose) onClose()\n },\n [onFocus, onClose],\n )","(path: Path) => {\n const fields = documentType && documentType.fields\n const field = fields && fields.find((curr) => curr.name === path[0])\n\n return (field && field.type.title) || ''\n }","path","i","<Container width={0} data-kind={kind} data-testid=\"validation-list\">\n {hasErrors &&\n errors.map((_error, i) => (\n <ValidationListItem\n // oxlint-disable-next-line no-array-index-key\n key={i}\n truncate={truncate}\n path={resolvePathTitle(_error.path)}\n marker={_error}\n onClick={handleClick}\n />\n ))}\n {hasWarnings &&\n warnings.map((_warning, i) => (\n <ValidationListItem\n // oxlint-disable-next-line no-array-index-key\n key={i}\n truncate={truncate}\n path={resolvePathTitle(_warning.path)}\n marker={_warning}\n onClick={handleClick}\n />\n ))}\n {hasInfo &&\n info.map((_info, i) => (\n <ValidationListItem\n // oxlint-disable-next-line no-array-index-key\n key={i}\n truncate={truncate}\n path={resolvePathTitle(_info.path)}\n marker={_info}\n onClick={handleClick}\n />\n ))}\n </Container>","(path: Path) => {\n if (!publishId) {\n return\n }\n router.navigateIntent('edit', {\n id: publishId,\n path: encodeURIComponent(PathUtils.toString(path)),\n })\n }","useCallback(\n (path: Path) => {\n if (!publishId) {\n return\n }\n router.navigateIntent('edit', {\n id: publishId,\n path: encodeURIComponent(PathUtils.toString(path)),\n })\n },\n [router, publishId],\n )","{content: 'Show validation issues'}","{visibility}","<Button\n tooltipProps={{content: 'Show validation issues'}}\n mode=\"bleed\"\n data-testid=\"schedule-validation-list-button\"\n icon={hasError ? ErrorOutlineIcon : WarningOutlineIcon}\n style={{visibility}}\n tone={hasError ? 'critical' : 'default'}\n />","hasError ? ErrorOutlineIcon : WarningOutlineIcon","hasError ? 'critical' : 'default'","<ValidationList\n documentType={type as ObjectSchemaType}\n validation={markers}\n onFocus={onFocus}\n />","type as ObjectSchemaType","<Menu padding={1}>\n <Container width={0}>\n <Stack gap={1}>\n {menuHeader ?? null}\n <ValidationList\n documentType={type as ObjectSchemaType}\n validation={markers}\n onFocus={onFocus}\n />\n </Stack>\n </Container>\n </Menu>","menuHeader ?? null","<MenuButton\n id={id || ''}\n button={\n <Button\n tooltipProps={{content: 'Show validation issues'}}\n mode=\"bleed\"\n data-testid=\"schedule-validation-list-button\"\n icon={hasError ? ErrorOutlineIcon : WarningOutlineIcon}\n style={{visibility}}\n tone={hasError ? 'critical' : 'default'}\n />\n }\n menu={\n <Menu padding={1}>\n <Container width={0}>\n <Stack gap={1}>\n {menuHeader ?? null}\n <ValidationList\n documentType={type as ObjectSchemaType}\n validation={markers}\n onFocus={onFocus}\n />\n </Stack>\n </Container>\n </Menu>\n }\n popover={POPOVER_PROPS}\n />","id || ''","getScheduledDocument(schedule)","useMemo(() => {\n if (!schemaName) {\n return undefined\n }\n return schema.get(schemaName) as SchemaType\n }, [schemaName, schema])","schema.get(schemaName)","schemaType\n ? getPreviewStateObservable(documentPreviewStore, schemaType, documentId, '')\n : of(EMPTY_STATE)","useMemo(\n () =>\n schemaType\n ? getPreviewStateObservable(documentPreviewStore, schemaType, documentId, '')\n : of(EMPTY_STATE),\n [documentPreviewStore, schemaType, documentId],\n )","async () => {\n if (!formData?.date) {\n return\n }\n // Update schedule then close self\n await updateSchedule({\n date: formData.date,\n scheduleId: schedule.id,\n })\n onClose()\n }","formData?.date","schedule.id","{\n confirmButton: {\n text: 'Update',\n disabled: !isDirty,\n onClick: handleScheduleUpdate,\n },\n }","!isDirty","<DialogHeader timeZoneScope={timeZoneScope} title=\"Edit schedule\" />","timeZoneScope","<EditScheduleForm onChange={onFormChange} value={formData} />","<Dialog\n footer={{\n confirmButton: {\n text: 'Update',\n disabled: !isDirty,\n onClick: handleScheduleUpdate,\n },\n }}\n header={<DialogHeader timeZoneScope={timeZoneScope} title=\"Edit schedule\" />}\n id=\"time-zone\"\n onClose={onClose}\n width={1}\n >\n {/* oxlint-disable-next-line no-deprecated -- will fix in follow up PR */}\n <EditScheduleForm onChange={onFormChange} value={formData} />\n </Dialog>","() => {\n setDialogVisible(false)\n }","useCallback(() => {\n setDialogVisible(false)\n }, [])","() => {\n setDialogVisible(true)\n }","useCallback(() => {\n setDialogVisible(true)\n }, [])","{\n visible: dialogVisible,\n show,\n timeZoneScope,\n hide,\n }","{\n onClose: hide,\n schedule,\n visible,\n }","{\n DialogScheduleEdit: visible ? DialogScheduleEdit : null,\n dialogProps,\n timeZoneScope,\n dialogScheduleEditShow: show,\n hide,\n }","visible ? DialogScheduleEdit : null","<Box paddingX={2} paddingY={1}>\n <InsufficientPermissionsMessage\n currentUser={currentUser}\n context={permissionsOperationLabel}\n />\n </Box>","<div>\n <MenuItem\n disabled={!hasPermission || disabled}\n icon={icon}\n onClick={onClick}\n text={title}\n tone={tone}\n />\n </div>","!hasPermission || disabled","<Tooltip\n content={\n <Box paddingX={2} paddingY={1}>\n <InsufficientPermissionsMessage\n currentUser={currentUser}\n context={permissionsOperationLabel}\n />\n </Box>\n }\n disabled={hasPermission}\n placement=\"left\"\n portal\n >\n {/* Wrapper element to allow disabled menu items to trigger tooltips */}\n <div>\n <MenuItem\n disabled={!hasPermission || disabled}\n icon={icon}\n onClick={onClick}\n text={title}\n tone={tone}\n />\n </div>\n </Tooltip>","getScheduledDocument(schedule)","{\n id: firstDocument.documentId,\n type: schemaType?.name,\n permission: 'publish',\n }","documentId","schemaType?.name","() => {\n onEdit?.()\n }","() => {\n void deleteSchedule({schedule}).then(() => onDelete?.())\n }","() => {\n void publishSchedule({schedule})\n }","actions?.edit && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={CalendarIcon}\n onClick={handleEdit}\n permissionsOperationLabel=\"edit-schedules\"\n title=\"Edit schedule\"\n disabled={mode === 'upsell'}\n />\n )","edit","actions?.execute && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={PublishIcon}\n onClick={handleExecute}\n permissionsOperationLabel=\"execute-schedules\"\n title=\"Publish now\"\n disabled={mode === 'upsell'}\n />\n )","execute","actions?.delete && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={TrashIcon}\n onClick={handleDelete}\n permissionsOperationLabel=\"delete-schedules\"\n title=\"Delete schedule\"\n tone=\"critical\"\n disabled={mode === 'upsell'}\n />\n )","delete","actions?.clear && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={CheckmarkCircleIcon}\n onClick={handleDelete}\n permissionsOperationLabel=\"delete-schedules\"\n title=\"Clear completed schedule\"\n disabled={mode === 'upsell'}\n />\n )","clear","<>\n {actions?.edit && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={CalendarIcon}\n onClick={handleEdit}\n permissionsOperationLabel=\"edit-schedules\"\n title=\"Edit schedule\"\n disabled={mode === 'upsell'}\n />\n )}\n {actions?.execute && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={PublishIcon}\n onClick={handleExecute}\n permissionsOperationLabel=\"execute-schedules\"\n title=\"Publish now\"\n disabled={mode === 'upsell'}\n />\n )}\n {actions?.delete && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={TrashIcon}\n onClick={handleDelete}\n permissionsOperationLabel=\"delete-schedules\"\n title=\"Delete schedule\"\n tone=\"critical\"\n disabled={mode === 'upsell'}\n />\n )}\n {actions?.clear && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={CheckmarkCircleIcon}\n onClick={handleDelete}\n permissionsOperationLabel=\"delete-schedules\"\n title=\"Clear completed schedule\"\n disabled={mode === 'upsell'}\n />\n )}\n </>","<ContextMenuButton />","<Menu>\n <ContextMenuItems\n actions={actions}\n onDelete={onDelete}\n onEdit={onEdit}\n schedule={schedule}\n schemaType={schemaType}\n />\n </Menu>","{placement: 'left', portal: true, tone: 'default'}","<MenuButton\n button={<ContextMenuButton />}\n id=\"contextMenu\"\n menu={\n <Menu>\n <ContextMenuItems\n actions={actions}\n onDelete={onDelete}\n onEdit={onEdit}\n schedule={schedule}\n schemaType={schemaType}\n />\n </Menu>\n }\n popover={{placement: 'left', portal: true, tone: 'default'}}\n />","{schedule, updateValidation}: Props","getScheduledDocumentId(schedule)","<DelayedValidationRunner\n id={id}\n schemaName={schemaType.name}\n updateValidation={updateValidation}\n />","name","{id, schemaName, updateValidation}: ValidationRunnerProps","() => {\n const timeout = setTimeout(() => {\n setReady(true)\n }, VALIDATION_DELAY_MS)\n\n return () => {\n clearTimeout(timeout)\n }\n }","[]","<ValidationRunner id={id} schemaName={schemaName} updateValidation={updateValidation} />","getDraftId(id)","() => {\n if (!validationStatus.isValidating) {\n updateValidation(validationStatus)\n }\n }","[updateValidation, validationStatus]","validationStatus.isValidating","{type: 'scheduledPublishing'}","formatDistance(date, new Date(), {\n addSuffix: true,\n })","formatDateTz({date, format: DATE_FORMAT.LARGE})","formatDateTz({date, format: DATE_FORMAT.MEDIUM})","formatDateTz({date, format: DATE_FORMAT.SMALL})","useElementQueries ? (\n <>\n <span className=\"date-small\">{dateTimeSmall}</span>\n <span className=\"date-medium\">{dateTimeMedium}</span>\n <span className=\"date-large\">{dateTimeLarge}</span>\n </>\n ) : (\n dateTimeLarge\n )","<span>\n {useElementQueries ? (\n <>\n <span className=\"date-small\">{dateTimeSmall}</span>\n <span className=\"date-medium\">{dateTimeMedium}</span>\n <span className=\"date-large\">{dateTimeLarge}</span>\n </>\n ) : (\n dateTimeLarge\n )}\n </span>","<Text size={1} textOverflow=\"ellipsis\">\n <Tooltip content={distance} portal>\n <span>\n {useElementQueries ? (\n <>\n <span className=\"date-small\">{dateTimeSmall}</span>\n <span className=\"date-medium\">{dateTimeMedium}</span>\n <span className=\"date-large\">{dateTimeLarge}</span>\n </>\n ) : (\n dateTimeLarge\n )}\n </span>\n </Tooltip>\n </Text>","<Button\n tooltipProps={{content: 'Schedule failed'}}\n mode=\"bleed\"\n data-testid=\"schedule-validation-list-button\"\n icon={ErrorOutlineIcon}\n tone=\"critical\"\n />","<Text size={1}>{SCHEDULE_FAILED_TEXT}</Text>","<Text size={1} style={{color: red[700].hex}}>\n <ErrorOutlineIcon />\n </Text>","{color: red[700].hex}","<MenuButton\n id=\"stateReason\"\n button={\n <Button\n tooltipProps={{content: 'Schedule failed'}}\n mode=\"bleed\"\n data-testid=\"schedule-validation-list-button\"\n icon={ErrorOutlineIcon}\n tone=\"critical\"\n />\n }\n menu={\n <Menu padding={1}>\n <Container padding={2} width={0}>\n <Text size={1}>{SCHEDULE_FAILED_TEXT}</Text>\n <Flex gap={3} marginTop={4} padding={1}>\n <Text size={1} style={{color: red[700].hex}}>\n <ErrorOutlineIcon />\n </Text>\n <Text size={1} style={{color: red[700].hex}} weight=\"medium\">\n {stateReason}\n </Text>\n </Flex>\n </Container>\n </Menu>\n }\n popover={POPOVER_PROPS}\n />","<UserAvatar user={id} withTooltip />","{type: 'scheduledPublishing'}","Stack","Box","Flex","Card","Tooltip","2","schedule.action === 'unpublish' && (\n <Flex style={{flexShrink: 0}}>\n <Badge fontSize={0} tone={SCHEDULE_ACTION_DICTIONARY[schedule.action].badgeTone}>\n {schedule.action}\n </Badge>\n </Flex>\n )","linkProps as object | undefined","__unstable_focusRing","linkComponent ? (linkComponent as ElementType) : undefined","onClick || linkComponent ? 'a' : undefined","1","onClick","0","scheduleDate ? (\n <>\n <Text size={1}>\n {formatDateTz({date: scheduleDate, format: 'dd/MM/yyyy'})}\n </Text>\n <Text size={1}>{formatDateTz({date: scheduleDate, format: 'p'})}</Text>\n </>\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )","validationTone","{open: 400}","\"bottom-end\"","publishedDocumentId ? (\n <DocumentVersionsStatus documentGroupId={publishedDocumentId} />\n ) : null","!publishedDocumentId","\"center\"","\"space-between\"","['block', 'none']","mode === 'upsell' && schedule.state === 'scheduled' ? {opacity: 0.7} : undefined","{flexShrink: 0, width: '90px'}","3","\"flex-start\"","children ? 0 : [1, 2]","children && <Box style={{flexBasis: 'auto', flexGrow: 1}}>{children}</Box>","state","action","<Stack gap={2}>\n {scheduleDate ? (\n <>\n <Text size={1}>\n {formatDateTz({date: scheduleDate, format: 'dd/MM/yyyy'})}\n </Text>\n <Text size={1}>{formatDateTz({date: scheduleDate, format: 'p'})}</Text>\n </>\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Stack>","<Box display={['block', 'none']} style={{flexShrink: 0, width: '90px'}}>\n <Stack gap={2}>\n {scheduleDate ? (\n <>\n <Text size={1}>\n {formatDateTz({date: scheduleDate, format: 'dd/MM/yyyy'})}\n </Text>\n <Text size={1}>{formatDateTz({date: scheduleDate, format: 'p'})}</Text>\n </>\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Stack>\n </Box>","['none', 'block']","{flexShrink: 0, maxWidth: '250px', width: children ? '35%' : 'auto'}","children ? '35%' : 'auto'","scheduleDate ? (\n <DateWithTooltip date={scheduleDate} useElementQueries={useElementQueries} />\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )","<Box\n display={['none', 'block']}\n style={{flexShrink: 0, maxWidth: '250px', width: children ? '35%' : 'auto'}}\n >\n {scheduleDate ? (\n <DateWithTooltip date={scheduleDate} useElementQueries={useElementQueries} />\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Box>","!children && (\n <Box style={{visibility: 'hidden'}}>\n <SanityDefaultPreview isPlaceholder />\n </Box>\n )","{flexShrink: 0, marginLeft: 'auto'}","['none', 'none', 'block']","{flexShrink: 0}","<Box display={['none', 'none', 'block']} marginX={3} style={{flexShrink: 0}}>\n <User id={schedule?.author} />\n </Box>","schedule?.author","[2, 2, 3]","<Box display={['none', 'block']} marginX={[2, 2, 3]} style={{flexShrink: 0}}>\n {publishedDocumentId ? (\n <ScheduleItemStatusIndicator publishedDocumentId={publishedDocumentId} />\n ) : (\n <StatusDotPlaceholder />\n )}\n </Box>","<Flex alignItems=\"center\" style={{flexShrink: 0, marginLeft: 'auto'}}>\n {/* Avatar */}\n <Box display={['none', 'none', 'block']} marginX={3} style={{flexShrink: 0}}>\n <User id={schedule?.author} />\n </Box>\n\n {/* Document status */}\n <Box display={['none', 'block']} marginX={[2, 2, 3]} style={{flexShrink: 0}}>\n {publishedDocumentId ? (\n <ScheduleItemStatusIndicator publishedDocumentId={publishedDocumentId} />\n ) : (\n <StatusDotPlaceholder />\n )}\n </Box>\n </Flex>","<Flex\n alignItems=\"center\"\n gap={3}\n justifyContent=\"flex-start\"\n paddingLeft={children ? 0 : [1, 2]}\n >\n {children && <Box style={{flexBasis: 'auto', flexGrow: 1}}>{children}</Box>}\n\n {/* Badge */}\n {schedule.action === 'unpublish' && (\n <Flex style={{flexShrink: 0}}>\n <Badge fontSize={0} tone={SCHEDULE_ACTION_DICTIONARY[schedule.action].badgeTone}>\n {schedule.action}\n </Badge>\n </Flex>\n )}\n\n {/* Schedule date */}\n <Box display={['block', 'none']} style={{flexShrink: 0, width: '90px'}}>\n <Stack gap={2}>\n {scheduleDate ? (\n <>\n <Text size={1}>\n {formatDateTz({date: scheduleDate, format: 'dd/MM/yyyy'})}\n </Text>\n <Text size={1}>{formatDateTz({date: scheduleDate, format: 'p'})}</Text>\n </>\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Stack>\n </Box>\n <Box\n display={['none', 'block']}\n style={{flexShrink: 0, maxWidth: '250px', width: children ? '35%' : 'auto'}}\n >\n {scheduleDate ? (\n <DateWithTooltip date={scheduleDate} useElementQueries={useElementQueries} />\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Box>\n\n {/* HACK: render invisible preview wrapper when no children are provided to ensure consistent height */}\n {!children && (\n <Box style={{visibility: 'hidden'}}>\n <SanityDefaultPreview isPlaceholder />\n </Box>\n )}\n\n <Flex alignItems=\"center\" style={{flexShrink: 0, marginLeft: 'auto'}}>\n {/* Avatar */}\n <Box display={['none', 'none', 'block']} marginX={3} style={{flexShrink: 0}}>\n <User id={schedule?.author} />\n </Box>\n\n {/* Document status */}\n <Box display={['none', 'block']} marginX={[2, 2, 3]} style={{flexShrink: 0}}>\n {publishedDocumentId ? (\n <ScheduleItemStatusIndicator publishedDocumentId={publishedDocumentId} />\n ) : (\n <StatusDotPlaceholder />\n )}\n </Box>\n </Flex>\n </Flex>","<Card\n {...(linkProps as object | undefined)}\n __unstable_focusRing\n as={linkComponent ? (linkComponent as ElementType) : undefined}\n data-as={onClick || linkComponent ? 'a' : undefined}\n flex={1}\n onClick={onClick}\n padding={1}\n radius={2}\n tabIndex={0}\n tone={validationTone}\n >\n <Flex\n alignItems=\"center\"\n gap={3}\n justifyContent=\"flex-start\"\n paddingLeft={children ? 0 : [1, 2]}\n >\n {children && <Box style={{flexBasis: 'auto', flexGrow: 1}}>{children}</Box>}\n\n {/* Badge */}\n {schedule.action === 'unpublish' && (\n <Flex style={{flexShrink: 0}}>\n <Badge fontSize={0} tone={SCHEDULE_ACTION_DICTIONARY[schedule.action].badgeTone}>\n {schedule.action}\n </Badge>\n </Flex>\n )}\n\n {/* Schedule date */}\n <Box display={['block', 'none']} style={{flexShrink: 0, width: '90px'}}>\n <Stack gap={2}>\n {scheduleDate ? (\n <>\n <Text size={1}>\n {formatDateTz({date: scheduleDate, format: 'dd/MM/yyyy'})}\n </Text>\n <Text size={1}>{formatDateTz({date: scheduleDate, format: 'p'})}</Text>\n </>\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Stack>\n </Box>\n <Box\n display={['none', 'block']}\n style={{flexShrink: 0, maxWidth: '250px', width: children ? '35%' : 'auto'}}\n >\n {scheduleDate ? (\n <DateWithTooltip date={scheduleDate} useElementQueries={useElementQueries} />\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Box>\n\n {/* HACK: render invisible preview wrapper when no children are provided to ensure consistent height */}\n {!children && (\n <Box style={{visibility: 'hidden'}}>\n <SanityDefaultPreview isPlaceholder />\n </Box>\n )}\n\n <Flex alignItems=\"center\" style={{flexShrink: 0, marginLeft: 'auto'}}>\n {/* Avatar */}\n <Box display={['none', 'none', 'block']} marginX={3} style={{flexShrink: 0}}>\n <User id={schedule?.author} />\n </Box>\n\n {/* Document status */}\n <Box display={['none', 'block']} marginX={[2, 2, 3]} style={{flexShrink: 0}}>\n {publishedDocumentId ? (\n <ScheduleItemStatusIndicator publishedDocumentId={publishedDocumentId} />\n ) : (\n <StatusDotPlaceholder />\n )}\n </Box>\n </Flex>\n </Flex>\n </Card>","<Tooltip\n delay={{open: 400}}\n placement=\"bottom-end\"\n content={\n publishedDocumentId ? (\n <DocumentVersionsStatus documentGroupId={publishedDocumentId} />\n ) : null\n }\n disabled={!publishedDocumentId}\n >\n <Card\n {...(linkProps as object | undefined)}\n __unstable_focusRing\n as={linkComponent ? (linkComponent as ElementType) : undefined}\n data-as={onClick || linkComponent ? 'a' : undefined}\n flex={1}\n onClick={onClick}\n padding={1}\n radius={2}\n tabIndex={0}\n tone={validationTone}\n >\n <Flex\n alignItems=\"center\"\n gap={3}\n justifyContent=\"flex-start\"\n paddingLeft={children ? 0 : [1, 2]}\n >\n {children && <Box style={{flexBasis: 'auto', flexGrow: 1}}>{children}</Box>}\n\n {/* Badge */}\n {schedule.action === 'unpublish' && (\n <Flex style={{flexShrink: 0}}>\n <Badge fontSize={0} tone={SCHEDULE_ACTION_DICTIONARY[schedule.action].badgeTone}>\n {schedule.action}\n </Badge>\n </Flex>\n )}\n\n {/* Schedule date */}\n <Box display={['block', 'none']} style={{flexShrink: 0, width: '90px'}}>\n <Stack gap={2}>\n {scheduleDate ? (\n <>\n <Text size={1}>\n {formatDateTz({date: scheduleDate, format: 'dd/MM/yyyy'})}\n </Text>\n <Text size={1}>{formatDateTz({date: scheduleDate, format: 'p'})}</Text>\n </>\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Stack>\n </Box>\n <Box\n display={['none', 'block']}\n style={{flexShrink: 0, maxWidth: '250px', width: children ? '35%' : 'auto'}}\n >\n {scheduleDate ? (\n <DateWithTooltip date={scheduleDate} useElementQueries={useElementQueries} />\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Box>\n\n {/* HACK: render invisible preview wrapper when no children are provided to ensure consistent height */}\n {!children && (\n <Box style={{visibility: 'hidden'}}>\n <SanityDefaultPreview isPlaceholder />\n </Box>\n )}\n\n <Flex alignItems=\"center\" style={{flexShrink: 0, marginLeft: 'auto'}}>\n {/* Avatar */}\n <Box display={['none', 'none', 'block']} marginX={3} style={{flexShrink: 0}}>\n <User id={schedule?.author} />\n </Box>\n\n {/* Document status */}\n <Box display={['none', 'block']} marginX={[2, 2, 3]} style={{flexShrink: 0}}>\n {publishedDocumentId ? (\n <ScheduleItemStatusIndicator publishedDocumentId={publishedDocumentId} />\n ) : (\n <StatusDotPlaceholder />\n )}\n </Box>\n </Flex>\n </Flex>\n </Card>\n </Tooltip>","{width: '38px'}","schedule.state === 'scheduled' && (\n <Box>\n <ValidateScheduleDoc schedule={schedule} updateValidation={setValidationStatus} />\n <ValidationInfo\n markers={validation}\n type={schemaType}\n documentId={publishedDocumentId}\n menuHeader={\n <Box padding={2}>\n <Text size={1}>\n {hasError ? DOCUMENT_HAS_ERRORS_TEXT : DOCUMENT_HAS_WARNINGS_TEXT}\n </Text>\n </Box>\n }\n />\n </Box>\n )","schedule.state","schedule.state === 'cancelled' && (\n <StateReasonFailedInfo stateReason={schedule.stateReason} />\n )","stateReason","<Flex justifyContent=\"center\" style={{width: '38px'}}>\n {/* Validation status (only displayed on upcoming schedules) */}\n {schedule.state === 'scheduled' && (\n <Box>\n <ValidateScheduleDoc schedule={schedule} updateValidation={setValidationStatus} />\n <ValidationInfo\n markers={validation}\n type={schemaType}\n documentId={publishedDocumentId}\n menuHeader={\n <Box padding={2}>\n <Text size={1}>\n {hasError ? DOCUMENT_HAS_ERRORS_TEXT : DOCUMENT_HAS_WARNINGS_TEXT}\n </Text>\n </Box>\n }\n />\n </Box>\n )}\n\n {/* Failed state reason (only displayed on cancelled schedules) */}\n {schedule.state === 'cancelled' && (\n <StateReasonFailedInfo stateReason={schedule.stateReason} />\n )}\n </Flex>","schedule.state === 'cancelled' && (\n <StateReasonFailedInfo stateReason={schedule.stateReason} />\n )","contextMenu && (\n <Box style={{flexShrink: 0}} paddingRight={2}>\n {contextMenu}\n </Box>\n )","<Flex alignItems=\"center\" gap={1} justifyContent=\"space-between\">\n <Tooltip\n delay={{open: 400}}\n placement=\"bottom-end\"\n content={\n publishedDocumentId ? (\n <DocumentVersionsStatus documentGroupId={publishedDocumentId} />\n ) : null\n }\n disabled={!publishedDocumentId}\n >\n <Card\n {...(linkProps as object | undefined)}\n __unstable_focusRing\n as={linkComponent ? (linkComponent as ElementType) : undefined}\n data-as={onClick || linkComponent ? 'a' : undefined}\n flex={1}\n onClick={onClick}\n padding={1}\n radius={2}\n tabIndex={0}\n tone={validationTone}\n >\n <Flex\n alignItems=\"center\"\n gap={3}\n justifyContent=\"flex-start\"\n paddingLeft={children ? 0 : [1, 2]}\n >\n {children && <Box style={{flexBasis: 'auto', flexGrow: 1}}>{children}</Box>}\n\n {/* Badge */}\n {schedule.action === 'unpublish' && (\n <Flex style={{flexShrink: 0}}>\n <Badge fontSize={0} tone={SCHEDULE_ACTION_DICTIONARY[schedule.action].badgeTone}>\n {schedule.action}\n </Badge>\n </Flex>\n )}\n\n {/* Schedule date */}\n <Box display={['block', 'none']} style={{flexShrink: 0, width: '90px'}}>\n <Stack gap={2}>\n {scheduleDate ? (\n <>\n <Text size={1}>\n {formatDateTz({date: scheduleDate, format: 'dd/MM/yyyy'})}\n </Text>\n <Text size={1}>{formatDateTz({date: scheduleDate, format: 'p'})}</Text>\n </>\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Stack>\n </Box>\n <Box\n display={['none', 'block']}\n style={{flexShrink: 0, maxWidth: '250px', width: children ? '35%' : 'auto'}}\n >\n {scheduleDate ? (\n <DateWithTooltip date={scheduleDate} useElementQueries={useElementQueries} />\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Box>\n\n {/* HACK: render invisible preview wrapper when no children are provided to ensure consistent height */}\n {!children && (\n <Box style={{visibility: 'hidden'}}>\n <SanityDefaultPreview isPlaceholder />\n </Box>\n )}\n\n <Flex alignItems=\"center\" style={{flexShrink: 0, marginLeft: 'auto'}}>\n {/* Avatar */}\n <Box display={['none', 'none', 'block']} marginX={3} style={{flexShrink: 0}}>\n <User id={schedule?.author} />\n </Box>\n\n {/* Document status */}\n <Box display={['none', 'block']} marginX={[2, 2, 3]} style={{flexShrink: 0}}>\n {publishedDocumentId ? (\n <ScheduleItemStatusIndicator publishedDocumentId={publishedDocumentId} />\n ) : (\n <StatusDotPlaceholder />\n )}\n </Box>\n </Flex>\n </Flex>\n </Card>\n </Tooltip>\n\n <Flex justifyContent=\"center\" style={{width: '38px'}}>\n {/* Validation status (only displayed on upcoming schedules) */}\n {schedule.state === 'scheduled' && (\n <Box>\n <ValidateScheduleDoc schedule={schedule} updateValidation={setValidationStatus} />\n <ValidationInfo\n markers={validation}\n type={schemaType}\n documentId={publishedDocumentId}\n menuHeader={\n <Box padding={2}>\n <Text size={1}>\n {hasError ? DOCUMENT_HAS_ERRORS_TEXT : DOCUMENT_HAS_WARNINGS_TEXT}\n </Text>\n </Box>\n }\n />\n </Box>\n )}\n\n {/* Failed state reason (only displayed on cancelled schedules) */}\n {schedule.state === 'cancelled' && (\n <StateReasonFailedInfo stateReason={schedule.stateReason} />\n )}\n </Flex>\n\n {/* Failed state reason (only displayed on cancelled schedules) */}\n {schedule.state === 'cancelled' && (\n <StateReasonFailedInfo stateReason={schedule.stateReason} />\n )}\n\n {/* Context menu */}\n {contextMenu && (\n <Box style={{flexShrink: 0}} paddingRight={2}>\n {contextMenu}\n </Box>\n )}\n </Flex>","<Card\n padding={1}\n radius={2}\n shadow={1}\n tone={validationTone}\n style={mode === 'upsell' && schedule.state === 'scheduled' ? {opacity: 0.7} : undefined}\n >\n <Flex alignItems=\"center\" gap={1} justifyContent=\"space-between\">\n <Tooltip\n delay={{open: 400}}\n placement=\"bottom-end\"\n content={\n publishedDocumentId ? (\n <DocumentVersionsStatus documentGroupId={publishedDocumentId} />\n ) : null\n }\n disabled={!publishedDocumentId}\n >\n <Card\n {...(linkProps as object | undefined)}\n __unstable_focusRing\n as={linkComponent ? (linkComponent as ElementType) : undefined}\n data-as={onClick || linkComponent ? 'a' : undefined}\n flex={1}\n onClick={onClick}\n padding={1}\n radius={2}\n tabIndex={0}\n tone={validationTone}\n >\n <Flex\n alignItems=\"center\"\n gap={3}\n justifyContent=\"flex-start\"\n paddingLeft={children ? 0 : [1, 2]}\n >\n {children && <Box style={{flexBasis: 'auto', flexGrow: 1}}>{children}</Box>}\n\n {/* Badge */}\n {schedule.action === 'unpublish' && (\n <Flex style={{flexShrink: 0}}>\n <Badge fontSize={0} tone={SCHEDULE_ACTION_DICTIONARY[schedule.action].badgeTone}>\n {schedule.action}\n </Badge>\n </Flex>\n )}\n\n {/* Schedule date */}\n <Box display={['block', 'none']} style={{flexShrink: 0, width: '90px'}}>\n <Stack gap={2}>\n {scheduleDate ? (\n <>\n <Text size={1}>\n {formatDateTz({date: scheduleDate, format: 'dd/MM/yyyy'})}\n </Text>\n <Text size={1}>{formatDateTz({date: scheduleDate, format: 'p'})}</Text>\n </>\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Stack>\n </Box>\n <Box\n display={['none', 'block']}\n style={{flexShrink: 0, maxWidth: '250px', width: children ? '35%' : 'auto'}}\n >\n {scheduleDate ? (\n <DateWithTooltip date={scheduleDate} useElementQueries={useElementQueries} />\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Box>\n\n {/* HACK: render invisible preview wrapper when no children are provided to ensure consistent height */}\n {!children && (\n <Box style={{visibility: 'hidden'}}>\n <SanityDefaultPreview isPlaceholder />\n </Box>\n )}\n\n <Flex alignItems=\"center\" style={{flexShrink: 0, marginLeft: 'auto'}}>\n {/* Avatar */}\n <Box display={['none', 'none', 'block']} marginX={3} style={{flexShrink: 0}}>\n <User id={schedule?.author} />\n </Box>\n\n {/* Document status */}\n <Box display={['none', 'block']} marginX={[2, 2, 3]} style={{flexShrink: 0}}>\n {publishedDocumentId ? (\n <ScheduleItemStatusIndicator publishedDocumentId={publishedDocumentId} />\n ) : (\n <StatusDotPlaceholder />\n )}\n </Box>\n </Flex>\n </Flex>\n </Card>\n </Tooltip>\n\n <Flex justifyContent=\"center\" style={{width: '38px'}}>\n {/* Validation status (only displayed on upcoming schedules) */}\n {schedule.state === 'scheduled' && (\n <Box>\n <ValidateScheduleDoc schedule={schedule} updateValidation={setValidationStatus} />\n <ValidationInfo\n markers={validation}\n type={schemaType}\n documentId={publishedDocumentId}\n menuHeader={\n <Box padding={2}>\n <Text size={1}>\n {hasError ? DOCUMENT_HAS_ERRORS_TEXT : DOCUMENT_HAS_WARNINGS_TEXT}\n </Text>\n </Box>\n }\n />\n </Box>\n )}\n\n {/* Failed state reason (only displayed on cancelled schedules) */}\n {schedule.state === 'cancelled' && (\n <StateReasonFailedInfo stateReason={schedule.stateReason} />\n )}\n </Flex>\n\n {/* Failed state reason (only displayed on cancelled schedules) */}\n {schedule.state === 'cancelled' && (\n <StateReasonFailedInfo stateReason={schedule.stateReason} />\n )}\n\n {/* Context menu */}\n {contextMenu && (\n <Box style={{flexShrink: 0}} paddingRight={2}>\n {contextMenu}\n </Box>\n )}\n </Flex>\n </Card>","{publishedDocumentId}: {publishedDocumentId: string}","{documentId: publishedDocumentId}","<DocumentVersionsStatusIndicator documentVersions={versions} />","timeZoneScope","getScheduledDocumentId(schedule)","useMemo(() => getScheduledDocumentId(schedule), [schedule])","DialogScheduleEdit && <DialogScheduleEdit {...dialogProps} />","{\n delete: true,\n edit: true,\n }","<ScheduleContextMenu\n actions={{\n delete: true,\n edit: true,\n }}\n onDelete={onComplete}\n onEdit={dialogScheduleEditShow}\n schedule={schedule}\n schemaType={schemaType}\n />","<PreviewWrapper\n contextMenu={\n <ScheduleContextMenu\n actions={{\n delete: true,\n edit: true,\n }}\n onDelete={onComplete}\n onEdit={dialogScheduleEditShow}\n schedule={schedule}\n schemaType={schemaType}\n />\n }\n onClick={dialogScheduleEditShow}\n publishedDocumentId={publishedId}\n schedule={schedule}\n schemaType={schemaType}\n />","<>\n {/* Dialogs (rendered outside of cards so they don't infer card colors) */}\n {DialogScheduleEdit && <DialogScheduleEdit {...dialogProps} />}\n\n <PreviewWrapper\n contextMenu={\n <ScheduleContextMenu\n actions={{\n delete: true,\n edit: true,\n }}\n onDelete={onComplete}\n onEdit={dialogScheduleEditShow}\n schedule={schedule}\n schemaType={schemaType}\n />\n }\n onClick={dialogScheduleEditShow}\n publishedDocumentId={publishedId}\n schedule={schedule}\n schemaType={schemaType}\n />\n </>","() => {\n void deleteSchedule({schedule}).then(() => onDelete?.())\n }","<ContextMenuButton />","<Menu>\n <MenuItem\n icon={TrashIcon}\n onClick={handleDelete}\n text=\"Delete schedule\"\n tone=\"critical\"\n />\n </Menu>","{placement: 'left', portal: true, tone: 'default'}","<MenuButton\n button={<ContextMenuButton />}\n id=\"contextMenu\"\n menu={\n <Menu>\n <MenuItem\n icon={TrashIcon}\n onClick={handleDelete}\n text=\"Delete schedule\"\n tone=\"critical\"\n />\n </Menu>\n }\n popover={{placement: 'left', portal: true, tone: 'default'}}\n />","{schedule}: {schedule: Schedule}","<FallbackContextMenu schedule={schedule} />","<SanityDefaultPreview\n icon={UnknownIcon}\n layout=\"default\"\n subtitle={<em>It may have been deleted</em>}\n title={<em style={{color: red[600].hex}}>Document not found</em>}\n />","<PreviewWrapper\n contextMenu={<FallbackContextMenu schedule={schedule} />}\n schedule={schedule}\n useElementQueries\n >\n <SanityDefaultPreview\n icon={UnknownIcon}\n layout=\"default\"\n subtitle={<em>It may have been deleted</em>}\n title={<em style={{color: red[600].hex}}>Document not found</em>}\n />\n </PreviewWrapper>","timeZoneScope","visibleDocument ? getPublishedId(visibleDocument._id) : undefined","DialogScheduleEdit && <DialogScheduleEdit {...dialogProps} />","{\n clear: isCompleted,\n delete: !isCompleted,\n edit: isScheduled,\n execute: isScheduled,\n }","!isCompleted","<ScheduleContextMenu\n actions={{\n clear: isCompleted,\n delete: !isCompleted,\n edit: isScheduled,\n execute: isScheduled,\n }}\n onEdit={dialogScheduleEditShow}\n schedule={schedule}\n schemaType={schemaType}\n />","publishedDocId ? {id: publishedDocId} : {}","{\n intent: 'edit',\n params: {\n type: schemaType.name,\n ...(publishedDocId ? {id: publishedDocId} : {}),\n },\n }","name","previewState.isLoading ? (\n <SanityDefaultPreview\n icon={schemaType?.icon as ComponentType}\n isPlaceholder={previewState.isLoading}\n layout=\"default\"\n />\n ) : (\n <Preview layout=\"default\" schemaType={schemaType} value={visibleDocument} />\n )","isLoading","schemaType?.icon","<PreviewWrapper\n contextMenu={\n <ScheduleContextMenu\n actions={{\n clear: isCompleted,\n delete: !isCompleted,\n edit: isScheduled,\n execute: isScheduled,\n }}\n onEdit={dialogScheduleEditShow}\n schedule={schedule}\n schemaType={schemaType}\n />\n }\n linkComponent={IntentLink}\n linkProps={{\n intent: 'edit',\n params: {\n type: schemaType.name,\n ...(publishedDocId ? {id: publishedDocId} : {}),\n },\n }}\n publishedDocumentId={publishedDocId}\n schedule={schedule}\n schemaType={schemaType}\n useElementQueries\n >\n {previewState.isLoading ? (\n <SanityDefaultPreview\n icon={schemaType?.icon as ComponentType}\n isPlaceholder={previewState.isLoading}\n layout=\"default\"\n />\n ) : (\n <Preview layout=\"default\" schemaType={schemaType} value={visibleDocument} />\n )}\n </PreviewWrapper>","<>\n {/* Dialogs (rendered outside of cards so they don't infer card colors) */}\n {DialogScheduleEdit && <DialogScheduleEdit {...dialogProps} />}\n <PreviewWrapper\n contextMenu={\n <ScheduleContextMenu\n actions={{\n clear: isCompleted,\n delete: !isCompleted,\n edit: isScheduled,\n execute: isScheduled,\n }}\n onEdit={dialogScheduleEditShow}\n schedule={schedule}\n schemaType={schemaType}\n />\n }\n linkComponent={IntentLink}\n linkProps={{\n intent: 'edit',\n params: {\n type: schemaType.name,\n ...(publishedDocId ? {id: publishedDocId} : {}),\n },\n }}\n publishedDocumentId={publishedDocId}\n schedule={schedule}\n schemaType={schemaType}\n useElementQueries\n >\n {previewState.isLoading ? (\n <SanityDefaultPreview\n icon={schemaType?.icon as ComponentType}\n isPlaceholder={previewState.isLoading}\n layout=\"default\"\n />\n ) : (\n <Preview layout=\"default\" schemaType={schemaType} value={visibleDocument} />\n )}\n </PreviewWrapper>\n </>","getScheduledDocument(schedule)","useMemo(() => {\n if (!schemaType || invalidDocument) {\n return <NoSchemaItem schedule={schedule} />\n }\n\n if (type === 'document') {\n return <DocumentPreview schedule={schedule} schemaType={schemaType} />\n }\n\n if (type === 'tool') {\n return <ToolPreview previewState={previewState} schedule={schedule} schemaType={schemaType} />\n }\n\n return null\n }, [invalidDocument, type, previewState, schedule, schemaType])","<NoSchemaItem schedule={schedule} />","<DocumentPreview schedule={schedule} schemaType={schemaType} />","<ToolPreview previewState={previewState} schedule={schedule} schemaType={schemaType} />","<DateWithTooltipElementQuery>{preview}</DateWithTooltipElementQuery>"],"sources":["../src/core/scheduled-publishing/components/dialogs/TimeZoneButtonElementQuery.tsx","../src/core/scheduled-publishing/components/dialogs/DialogHeader.tsx","../src/core/scheduled-publishing/components/dateInputs/base/calendar/CalendarDay.tsx","../src/core/scheduled-publishing/components/dateInputs/base/calendar/constants.ts","../src/core/scheduled-publishing/components/dateInputs/base/calendar/utils.ts","../src/core/scheduled-publishing/components/dateInputs/base/calendar/CalendarMonth.tsx","../src/core/scheduled-publishing/components/dateInputs/base/calendar/features.ts","../src/core/scheduled-publishing/components/dateInputs/base/calendar/YearInput.tsx","../src/core/scheduled-publishing/components/dateInputs/base/calendar/Calendar.tsx","../src/core/scheduled-publishing/components/dateInputs/base/DatePicker.tsx","../src/core/scheduled-publishing/components/dateInputs/base/DateTimeInput.tsx","../src/core/scheduled-publishing/components/dateInputs/CommonDateTimeInput.tsx","../src/core/scheduled-publishing/components/dateInputs/utils.ts","../src/core/scheduled-publishing/components/dateInputs/DateTimeInput.tsx","../src/core/scheduled-publishing/components/editScheduleForm/ScheduleForm.tsx","../src/core/scheduled-publishing/components/editScheduleForm/EditScheduleForm.tsx","../src/core/scheduled-publishing/components/errorCallout/ErrorCallout.tsx","../src/core/scheduled-publishing/contexts/documentActionProps.tsx","../src/core/scheduled-publishing/hooks/useScheduleForm.ts","../src/core/scheduled-publishing/components/validation/ValidationListItem.tsx","../src/core/scheduled-publishing/components/validation/ValidationList.tsx","../src/core/scheduled-publishing/components/validation/ValidationInfo.tsx","../src/core/scheduled-publishing/utils/paneItemHelpers.tsx","../src/core/scheduled-publishing/hooks/useSchemaType.ts","../src/core/scheduled-publishing/hooks/usePreviewState.ts","../src/core/scheduled-publishing/components/scheduleItem/dateWithTooltip/DateWithTooltipElementQuery.tsx","../src/core/scheduled-publishing/components/dialogs/DialogScheduleEdit.tsx","../src/core/scheduled-publishing/hooks/useDialogVisibile.ts","../src/core/scheduled-publishing/hooks/useDialogScheduleEdit.ts","../src/core/scheduled-publishing/components/scheduleContextMenu/MenuItemWithPermissionsTooltip.tsx","../src/core/scheduled-publishing/components/scheduleContextMenu/ContextMenuItems.tsx","../src/core/scheduled-publishing/components/scheduleContextMenu/ScheduleContextMenu.tsx","../src/core/scheduled-publishing/components/validation/SchedulesValidation.tsx","../src/core/scheduled-publishing/components/scheduleItem/dateWithTooltip/DateWithTooltip.tsx","../src/core/scheduled-publishing/components/scheduleItem/StateReasonFailedInfo.tsx","../src/core/scheduled-publishing/components/scheduleItem/User.tsx","../src/core/scheduled-publishing/components/scheduleItem/PreviewWrapper.tsx","../src/core/scheduled-publishing/components/scheduleItem/DocumentPreview.tsx","../src/core/scheduled-publishing/components/scheduleContextMenu/FallbackContextMenu.tsx","../src/core/scheduled-publishing/components/scheduleItem/NoSchemaItem.tsx","../src/core/scheduled-publishing/components/scheduleItem/ToolPreview.tsx","../src/core/scheduled-publishing/components/scheduleItem/ScheduleItem.tsx"],"sourcesContent":["import {ElementQuery} from '@sanity/ui'\nimport {styled} from 'styled-components'\n\nconst TimeZoneButtonElementQuery = styled(ElementQuery)`\n .button-small {\n display: block;\n }\n .button-large {\n display: none;\n }\n\n &[data-eq-min~='2'] {\n .button-small {\n display: none;\n }\n .button-large {\n display: block;\n }\n }\n`\n\nexport default TimeZoneButtonElementQuery\n","import {Flex, Box} from 'ui5'\n\nimport {TimeZoneButton} from '../../../components/timeZone/timeZoneButton/TimeZoneButton'\nimport {type TimeZoneScope, useTimeZone} from '../../../hooks/useTimeZone'\nimport {useTranslation} from '../../../i18n/hooks/useTranslation'\nimport TimeZoneButtonElementQuery from './TimeZoneButtonElementQuery'\n\ninterface Props {\n title: string\n timeZoneScope: TimeZoneScope\n}\n\nconst DialogHeader = (props: Props) => {\n const {title, timeZoneScope} = props\n const {timeZone} = useTimeZone(timeZoneScope)\n const {t} = useTranslation()\n return (\n <TimeZoneButtonElementQuery>\n <Flex alignItems=\"center\">\n {title}\n {/*\n HACK: Sanity UI will attempt to focus the first 'focusable' descendant of any dialog.\n Typically this is fine, but since our first focusable element is a button with a tooltip, this\n default behaviour causes the tooltip to appear whenever the dialog is opened, which we don't want!\n\n To get around this, we include a pseudo-hidden input to ensure our tooltip-enabled button remains\n unfocused on initial mount.\n */}\n <input style={{opacity: 0, position: 'absolute', width: 0}} tabIndex={-1} type=\"button\" />\n <Box marginLeft={2} style={{marginTop: '-1em', marginBottom: '-1em'}}>\n <TimeZoneButton\n tooltipContent={t('time-zone.time-zone-tooltip-scheduled-publishing', {\n alternativeName: timeZone.alternativeName,\n offset: timeZone.offset,\n })}\n timeZoneScope={timeZoneScope}\n useElementQueries\n />\n </Box>\n </Flex>\n </TimeZoneButtonElementQuery>\n )\n}\n\nexport default DialogHeader\n","import {Card, Text} from '@sanity/ui'\nimport {endOfDay} from 'date-fns/endOfDay'\nimport {useCallback, useMemo} from 'react'\n\ninterface CalendarDayProps {\n date: Date\n focused?: boolean\n onSelect: (date: Date) => void\n isCurrentMonth?: boolean\n isToday: boolean\n customValidation?: (selectedDate: Date) => boolean\n selected?: boolean\n}\n\nexport function CalendarDay(props: CalendarDayProps) {\n const {date, focused, isCurrentMonth, isToday, customValidation, onSelect, selected} = props\n\n // Round date to the end of day when passing to custom validate function.\n // Remember that all calendar days are in UTC, but comparison is done with 'wall clock' time.\n const isValid = useMemo(() => {\n if (!customValidation) {\n return true\n }\n return customValidation(endOfDay(date))\n }, [date, customValidation])\n\n const handleClick = useCallback(() => {\n if (isValid) {\n onSelect(date)\n }\n }, [date, isValid, onSelect])\n\n return (\n <div aria-selected={selected} data-ui=\"CalendarDay\">\n <Card\n aria-label={date.toDateString()}\n aria-pressed={selected}\n as=\"button\"\n __unstable_focusRing\n data-weekday\n data-focused={focused ? 'true' : ''}\n disabled={!isValid}\n role=\"button\"\n tabIndex={-1}\n onClick={handleClick}\n padding={3}\n radius={2}\n selected={selected}\n tone={isToday || selected ? 'primary' : 'default'}\n >\n <Text\n muted={!selected && !isCurrentMonth}\n style={{textAlign: 'center'}}\n weight={isCurrentMonth ? 'medium' : 'regular'}\n >\n {date.getDate()}\n </Text>\n </Card>\n </div>\n )\n}\n","import range from 'lodash-es/range.js'\n\nexport const MONTH_NAMES = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n]\n\nexport const WEEK_DAY_NAMES = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']\n\nexport const HOURS_24 = range(0, 24)\n\nexport const ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight']\n\nexport const DEFAULT_TIME_PRESETS = [\n [0, 0],\n [6, 0],\n [12, 0],\n [18, 0],\n [23, 59],\n]\n\n// all weekdays except first\nexport const TAIL_WEEKDAYS = [1, 2, 3, 4, 5, 6]\n","import {addDays} from 'date-fns/addDays'\nimport {eachWeekOfInterval} from 'date-fns/eachWeekOfInterval'\nimport {getWeek} from 'date-fns/getWeek'\nimport {lastDayOfMonth} from 'date-fns/lastDayOfMonth'\nimport {startOfMonth} from 'date-fns/startOfMonth'\n\nimport {TAIL_WEEKDAYS} from './constants'\n\nconst getWeekStartsOfMonth = (date: Date): Date[] => {\n const firstDay = startOfMonth(date)\n return eachWeekOfInterval({\n start: firstDay,\n end: lastDayOfMonth(firstDay),\n })\n}\n\nconst getWeekDaysFromWeekStarts = (weekStarts: Date[]): Date[][] => {\n return weekStarts.map((weekStart) => [\n weekStart,\n ...TAIL_WEEKDAYS.map((d) => addDays(weekStart, d)),\n ])\n}\n\ntype Week = {\n number: number\n days: Date[]\n}\n\nexport const getWeeksOfMonth = (date: Date): Week[] =>\n getWeekDaysFromWeekStarts(getWeekStartsOfMonth(date)).map((days): Week => ({\n number: getWeek(days[0]),\n days,\n }))\n\nexport const formatTime = (hours: number, minutes: number): string =>\n `${`${hours}`.padStart(2, '0')}:${`${minutes}`.padStart(2, '0')}`\n","import {Text} from '@sanity/ui'\nimport {isSameDay} from 'date-fns/isSameDay'\nimport {isSameMonth} from 'date-fns/isSameMonth'\nimport {Grid, Box} from 'ui5'\n\nimport {type TimeZoneScope, useTimeZone} from '../../../../../hooks/useTimeZone'\nimport {CalendarDay} from './CalendarDay'\nimport {WEEK_DAY_NAMES} from './constants'\nimport {getWeeksOfMonth} from './utils'\n\ninterface CalendarMonthProps {\n date: Date\n focused?: Date\n selected?: Date\n onSelect: (date: Date) => void\n hidden?: boolean\n customValidation?: (selectedDate: Date) => boolean\n timeZoneScope: TimeZoneScope\n}\n\nexport function CalendarMonth(props: CalendarMonthProps) {\n const {customValidation, timeZoneScope} = props\n const {getCurrentZoneDate} = useTimeZone(timeZoneScope)\n return (\n <Box aria-hidden={props.hidden || false} data-ui=\"CalendarMonth\">\n <Grid gap={1} style={{gridTemplateColumns: 'repeat(7, minmax(44px, 46px))'}}>\n {WEEK_DAY_NAMES.map((weekday) => (\n <Box key={weekday} paddingY={2}>\n <Text size={1} weight=\"medium\" style={{textAlign: 'center'}}>\n {weekday}\n </Text>\n </Box>\n ))}\n\n {/* Note: UTC dates are passed to each Calendar day but we use 'wall time' for comparison */}\n {getWeeksOfMonth(props.date).map((week, weekIdx) =>\n week.days.map((date, dayIdx) => {\n const focused = props.focused && isSameDay(date, props.focused)\n const selected = props.selected && isSameDay(date, props.selected)\n const isToday = isSameDay(date, getCurrentZoneDate())\n const isCurrentMonth = props.focused && isSameMonth(date, props.focused)\n\n return (\n <CalendarDay\n key={`${weekIdx}-${dayIdx}`}\n date={date}\n focused={focused}\n isCurrentMonth={isCurrentMonth}\n isToday={isToday}\n customValidation={customValidation}\n onSelect={props.onSelect}\n selected={selected}\n />\n )\n }),\n )}\n </Grid>\n </Box>\n )\n}\n","export const features = {\n dayPresets: false,\n timePresets: false,\n}\n","import {type ChangeEvent, type ComponentProps, type FocusEvent, useCallback} from 'react'\n\nimport {LazyTextInput} from '../../../../../components/inputs/DateInputs/LazyTextInput'\n\ntype Props = Omit<ComponentProps<typeof LazyTextInput>, 'onChange' | 'value'> & {\n value?: number\n onChange: (year: number) => void\n}\n\nexport const YearInput = ({onChange, ...props}: Props) => {\n const handleChange = useCallback(\n (event: FocusEvent<HTMLInputElement> | ChangeEvent<HTMLInputElement>) => {\n const numericValue = parseInt(event.currentTarget.value, 10)\n if (!isNaN(numericValue)) {\n onChange(numericValue)\n }\n },\n [onChange],\n )\n\n return (\n <LazyTextInput\n data-testid=\"date-input\"\n {...props}\n onChange={handleChange}\n inputMode=\"numeric\"\n />\n )\n}\n","import {ChevronLeftIcon} from '@sanity/icons/ChevronLeft'\nimport {ChevronRightIcon} from '@sanity/icons/ChevronRight'\nimport {\n // oxlint-disable-next-line no-restricted-imports\n Button,\n Select,\n Text,\n} from '@sanity/ui'\nimport {addDays} from 'date-fns/addDays'\nimport {addMonths} from 'date-fns/addMonths'\nimport {setDate} from 'date-fns/setDate'\nimport {setHours} from 'date-fns/setHours'\nimport {setMinutes} from 'date-fns/setMinutes'\nimport {setMonth} from 'date-fns/setMonth'\nimport {setYear} from 'date-fns/setYear'\nimport range from 'lodash-es/range.js'\nimport {\n type ComponentProps,\n type FormEvent,\n type KeyboardEvent,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n type RefAttributes,\n} from 'react'\nimport {Flex, Box} from 'ui5'\n\nimport {type TimeZoneScope, useTimeZone} from '../../../../../hooks/useTimeZone'\nimport {CalendarMonth} from './CalendarMonth'\nimport {ARROW_KEYS, DEFAULT_TIME_PRESETS, HOURS_24, MONTH_NAMES} from './constants'\nimport {features} from './features'\nimport {formatTime} from './utils'\nimport {YearInput} from './YearInput'\n\nexport type CalendarProps = Omit<ComponentProps<'div'>, 'onSelect'> & {\n selectTime?: boolean\n selectedDate?: Date\n timeStep?: number\n onSelect: (date: Date) => void\n focusedDate: Date\n onFocusedDateChange: (index: Date) => void\n customValidation?: (selectedDate: Date) => boolean\n timeZoneScope: TimeZoneScope\n}\n\n// This is used to maintain focus on a child element of the calendar-grid between re-renders\n// When using arrow keys to move focus from a day in one month to another we are setting focus at the button for the day\n// after it has changed but *only* if we *already* had focus inside the calendar grid (e.g not if focus was on the \"next\n// year\" button, or any of the other controls)\n// When moving from the last day of a month that displays 6 weeks in the grid to a month that displays 5 weeks, current\n// focus gets lost on render, so this provides us with a stable element to help us preserve focus on a child element of\n// the calendar grid between re-renders\nconst PRESERVE_FOCUS_ELEMENT = (\n <span\n data-preserve-focus\n style={{overflow: 'hidden', position: 'absolute', outline: 'none'}}\n tabIndex={-1}\n />\n)\n\nexport function Calendar(props: CalendarProps & RefAttributes<HTMLDivElement>) {\n const {getCurrentZoneDate, zoneDateToUtc} = useTimeZone(props.timeZoneScope)\n const {\n ref: forwardedRef,\n selectTime,\n onFocusedDateChange,\n selectedDate = getCurrentZoneDate(),\n focusedDate = selectedDate,\n timeStep = 1,\n onSelect,\n customValidation,\n timeZoneScope,\n ...restProps\n } = props\n\n const setFocusedDate = useCallback(\n (date: Date) => onFocusedDateChange(zoneDateToUtc(date)),\n [onFocusedDateChange, zoneDateToUtc],\n )\n\n const setFocusedDateMonth = useCallback(\n (month: number) => setFocusedDate(setDate(setMonth(focusedDate, month), 1)),\n [focusedDate, setFocusedDate],\n )\n\n const handleFocusedMonthChange = useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (e: FormEvent<HTMLSelectElement>) => setFocusedDateMonth(Number(e.currentTarget.value)),\n [setFocusedDateMonth],\n )\n\n const moveFocusedDate = useCallback(\n (by: number) => setFocusedDate(addMonths(focusedDate, by)),\n [focusedDate, setFocusedDate],\n )\n\n const setFocusedDateYear = useCallback(\n (year: number) => setFocusedDate(setYear(focusedDate, year)),\n [focusedDate, setFocusedDate],\n )\n\n const handleDateChange = useCallback(\n (date: Date) => {\n onSelect(\n zoneDateToUtc(\n setMinutes(setHours(date, selectedDate.getHours()), selectedDate.getMinutes()),\n ),\n )\n },\n [onSelect, selectedDate, zoneDateToUtc],\n )\n\n const handleMinutesChange = useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (event: FormEvent<HTMLSelectElement>) => {\n const m = Number(event.currentTarget.value)\n onSelect(zoneDateToUtc(setMinutes(selectedDate, m)))\n },\n [onSelect, selectedDate, zoneDateToUtc],\n )\n\n const handleHoursChange = useCallback(\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n (event: FormEvent<HTMLSelectElement>) => {\n const m = Number(event.currentTarget.value)\n onSelect(zoneDateToUtc(setHours(selectedDate, m)))\n },\n [onSelect, selectedDate, zoneDateToUtc],\n )\n\n const handleTimeChange = useCallback(\n (hours: number, mins: number) => {\n onSelect(zoneDateToUtc(setHours(setMinutes(selectedDate, mins), hours)))\n },\n [onSelect, selectedDate, zoneDateToUtc],\n )\n\n const ref = useRef<HTMLDivElement | null>(null)\n useImperativeHandle<HTMLDivElement | null, HTMLDivElement | null>(forwardedRef, () => ref.current)\n\n const focusCurrentWeekDay = useCallback(() => {\n ref.current?.querySelector<HTMLElement>(`[data-focused=\"true\"]`)?.focus()\n }, [ref])\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (!ARROW_KEYS.includes(event.key)) {\n return\n }\n event.preventDefault()\n if (event.currentTarget.hasAttribute('data-calendar-grid')) {\n focusCurrentWeekDay()\n return\n }\n if (event.key === 'ArrowUp') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, -7)))\n }\n if (event.key === 'ArrowDown') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, 7)))\n }\n if (event.key === 'ArrowLeft') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, -1)))\n }\n if (event.key === 'ArrowRight') {\n onFocusedDateChange(zoneDateToUtc(addDays(focusedDate, 1)))\n }\n // set focus temporarily on this element to make sure focus is still inside the calendar-grid after re-render\n ref.current?.querySelector<HTMLElement>('[data-preserve-focus]')?.focus()\n },\n [zoneDateToUtc, ref, focusCurrentWeekDay, onFocusedDateChange, focusedDate],\n )\n\n useEffect(() => {\n focusCurrentWeekDay()\n }, [focusCurrentWeekDay])\n\n useEffect(() => {\n const currentFocusInCalendarGrid = document.activeElement?.matches(\n '[data-calendar-grid], [data-calendar-grid] [data-preserve-focus]',\n )\n if (\n // Only move focus if it's currently in the calendar grid\n currentFocusInCalendarGrid\n ) {\n focusCurrentWeekDay()\n }\n // oxlint-disable-next-line react/exhaustive-effect-dependencies -- pre-existing violation, to be fixed in a follow-up\n }, [ref, focusCurrentWeekDay, focusedDate])\n\n const handleNowClick = useCallback(() => onSelect(new Date()), [onSelect])\n\n return (\n <Box data-ui=\"Calendar\" {...restProps} ref={ref}>\n {/* Select date */}\n <Box padding={2}>\n {/* Select month and year */}\n <Flex>\n <Box flexBasis=\"0%\" flexGrow={1}>\n <CalendarMonthSelect\n moveFocusedDate={moveFocusedDate}\n onChange={handleFocusedMonthChange}\n value={focusedDate?.getMonth()}\n />\n </Box>\n <Box marginLeft={2}>\n <CalendarYearSelect\n moveFocusedDate={moveFocusedDate}\n onChange={setFocusedDateYear}\n value={focusedDate.getFullYear()}\n />\n </Box>\n </Flex>\n\n {/* Selected month (grid of days) */}\n <Box\n data-calendar-grid\n onKeyDown={handleKeyDown}\n marginTop={2}\n overflow=\"hidden\"\n tabIndex={0}\n >\n <CalendarMonth\n date={focusedDate}\n focused={focusedDate}\n customValidation={customValidation}\n onSelect={handleDateChange}\n selected={selectedDate}\n timeZoneScope={timeZoneScope}\n />\n {PRESERVE_FOCUS_ELEMENT}\n </Box>\n </Box>\n\n {/* Select time */}\n {selectTime && (\n <Box padding={2} style={{borderTop: '1px solid var(--card-border-color)'}}>\n <Flex alignItems=\"center\">\n <Flex alignItems=\"center\" flexBasis=\"0%\" flexGrow={1}>\n <Box>\n <Select\n aria-label=\"Select hour\"\n value={selectedDate?.getHours()}\n onChange={handleHoursChange}\n >\n {HOURS_24.map((h) => (\n <option key={h} value={h}>\n {`${h}`.padStart(2, '0')}\n </option>\n ))}\n </Select>\n </Box>\n\n <Box paddingX={1}>\n <Text>:</Text>\n </Box>\n\n <Box>\n <Select\n aria-label=\"Select minutes\"\n value={selectedDate?.getMinutes()}\n onChange={handleMinutesChange}\n >\n {range(0, 60, timeStep).map((m) => (\n <option key={m} value={m}>\n {`${m}`.padStart(2, '0')}\n </option>\n ))}\n </Select>\n </Box>\n </Flex>\n\n <Box marginLeft={2}>\n <Button text=\"Set to current time\" mode=\"bleed\" onClick={handleNowClick} />\n </Box>\n </Flex>\n\n {features.timePresets && (\n <Flex\n flexDirection=\"row\"\n justifyContent=\"center\"\n alignItems=\"center\"\n style={{marginTop: 5}}\n >\n {DEFAULT_TIME_PRESETS.map(([hours, minutes]) => {\n return (\n <CalendarTimePresetButton\n key={`${hours}-${minutes}`}\n hours={hours}\n minutes={minutes}\n onTimeChange={handleTimeChange}\n selectedDate={selectedDate}\n />\n )\n })}\n </Flex>\n )}\n </Box>\n )}\n </Box>\n )\n}\n\nfunction CalendarTimePresetButton(props: {\n hours: number\n minutes: number\n onTimeChange: (hours: number, minutes: number) => void\n selectedDate: Date\n}) {\n const {hours, minutes, onTimeChange, selectedDate} = props\n const formatted = formatTime(hours, minutes)\n\n const handleClick = useCallback(() => {\n onTimeChange(hours, minutes)\n }, [hours, minutes, onTimeChange])\n\n return (\n <Button\n text={formatted}\n aria-label={`${formatted} on ${selectedDate.toDateString()}`}\n mode=\"bleed\"\n fontSize={1}\n onClick={handleClick}\n />\n )\n}\n\nfunction CalendarMonthSelect(props: {\n moveFocusedDate: (by: number) => void\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n onChange: (e: FormEvent<HTMLSelectElement>) => void\n value?: number\n}) {\n const {moveFocusedDate, onChange, value} = props\n\n const handlePrevMonthClick = useCallback(() => moveFocusedDate(-1), [moveFocusedDate])\n\n const handleNextMonthClick = useCallback(() => moveFocusedDate(1), [moveFocusedDate])\n\n return (\n <Flex flexBasis=\"0%\" flexGrow={1}>\n <Button\n aria-label=\"Go to previous month\"\n onClick={handlePrevMonthClick}\n mode=\"bleed\"\n icon={ChevronLeftIcon}\n paddingX={2}\n radius={0}\n />\n <Box flexBasis=\"0%\" flexGrow={1}>\n <Select radius={0} value={value} onChange={onChange}>\n {MONTH_NAMES.map((m, i) => (\n // oxlint-disable-next-line no-array-index-key\n <option key={i} value={i}>\n {m}\n </option>\n ))}\n </Select>\n </Box>\n <Button\n aria-label=\"Go to next month\"\n mode=\"bleed\"\n icon={ChevronRightIcon}\n onClick={handleNextMonthClick}\n paddingX={2}\n radius={0}\n />\n </Flex>\n )\n}\n\nfunction CalendarYearSelect(props: {\n moveFocusedDate: (by: number) => void\n onChange: (year: number) => void\n value?: number\n}) {\n const {moveFocusedDate, onChange, value} = props\n\n const handlePrevYearClick = useCallback(() => moveFocusedDate(-12), [moveFocusedDate])\n\n const handleNextYearClick = useCallback(() => moveFocusedDate(12), [moveFocusedDate])\n\n return (\n <Flex>\n <Button\n aria-label=\"Previous year\"\n onClick={handlePrevYearClick}\n mode=\"bleed\"\n icon={ChevronLeftIcon}\n paddingX={2}\n radius={0}\n />\n <YearInput value={value} onChange={onChange} radius={0} style={{width: 65}} />\n <Button\n aria-label=\"Next year\"\n onClick={handleNextYearClick}\n mode=\"bleed\"\n icon={ChevronRightIcon}\n paddingX={2}\n radius={0}\n />\n </Flex>\n )\n}\n","import {type ComponentProps, useCallback, useState, type RefAttributes} from 'react'\n\nimport {type TimeZoneScope, useTimeZone} from '../../../../hooks/useTimeZone'\nimport {Calendar} from './calendar/Calendar'\n\nexport function DatePicker(\n props: Omit<ComponentProps<'div'>, 'onChange'> & {\n value?: Date\n onChange: (nextDate: Date) => void\n selectTime?: boolean\n timeStep?: number\n customValidation?: (selectedDate: Date) => boolean\n timeZoneScope: TimeZoneScope\n } & RefAttributes<HTMLDivElement>,\n) {\n const {ref, value: _value, onChange, customValidation, timeZoneScope, ...rest} = props\n const value = _value ?? new Date()\n const {utcToCurrentZoneDate} = useTimeZone(timeZoneScope)\n const [focusedDate, setFocusedDay] = useState<Date>()\n\n const handleSelect = useCallback(\n (nextDate: Date) => {\n onChange(nextDate)\n setFocusedDay(undefined)\n },\n [onChange],\n )\n\n return (\n <Calendar\n {...rest}\n ref={ref}\n selectedDate={utcToCurrentZoneDate(value)}\n onSelect={handleSelect}\n focusedDate={utcToCurrentZoneDate(focusedDate || value)}\n onFocusedDateChange={setFocusedDay}\n customValidation={customValidation}\n timeZoneScope={timeZoneScope}\n />\n )\n}\n","import {CalendarIcon} from '@sanity/icons/Calendar'\nimport {\n // oxlint-disable-next-line no-restricted-imports\n Button,\n LayerProvider,\n useClickOutsideEvent,\n usePortal,\n} from '@sanity/ui'\nimport {\n type FocusEvent,\n type KeyboardEvent,\n useCallback,\n useImperativeHandle,\n useRef,\n useState,\n type RefAttributes,\n} from 'react'\nimport FocusLock from 'react-focus-lock'\nimport {Box} from 'ui5'\n\nimport {Popover} from '../../../../../ui-components/popover/Popover'\nimport {LazyTextInput} from '../../../../components/inputs/DateInputs/LazyTextInput'\nimport {type TimeZoneScope} from '../../../../hooks/useTimeZone'\nimport {DatePicker} from './DatePicker'\n\ntype Props = {\n value?: Date\n id?: string\n readOnly?: boolean\n selectTime?: boolean\n timeStep?: number\n customValidity?: string\n placeholder?: string\n onInputChange?: (event: FocusEvent<HTMLInputElement>) => void\n inputValue?: string\n onChange: (date: Date | null) => void\n customValidation?: (selectedDate: Date) => boolean\n timeZoneScope: TimeZoneScope\n}\n\nexport function DateTimeInput(props: Props & RefAttributes<HTMLInputElement>) {\n const {\n ref: forwardedRef,\n value,\n inputValue,\n customValidation,\n onInputChange,\n onChange,\n selectTime,\n timeStep,\n timeZoneScope,\n ...rest\n } = props\n\n const popoverRef = useRef<HTMLDivElement | null>(null)\n\n const inputRef = useRef<HTMLInputElement | null>(null)\n const buttonRef = useRef(null)\n\n useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(\n forwardedRef,\n () => inputRef.current,\n )\n\n const [isPickerOpen, setPickerOpen] = useState(false)\n\n const portal = usePortal()\n\n useClickOutsideEvent(\n () => setPickerOpen(false),\n () => [popoverRef.current],\n )\n\n const handleDeactivation = useCallback(() => {\n inputRef.current?.focus()\n inputRef.current?.select()\n }, [inputRef])\n\n const handleKeyUp = useCallback((e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n setPickerOpen(false)\n }\n }, [])\n\n const handleClick = useCallback(() => setPickerOpen(true), [])\n\n const suffix = (\n <Box style={{padding: '5px'}}>\n <Button\n ref={buttonRef}\n icon={CalendarIcon}\n mode=\"bleed\"\n padding={2}\n onClick={handleClick}\n style={{display: 'block'}}\n data-testid=\"select-date-button\"\n />\n </Box>\n )\n\n return (\n <LazyTextInput\n data-testid=\"date-input\"\n ref={inputRef}\n {...rest}\n value={inputValue}\n onChange={onInputChange}\n suffix={\n isPickerOpen ? (\n // Note: we're conditionally inserting the popover here due to an\n // issue with popovers rendering incorrectly on subsequent renders\n // see https://github.com/sanity-io/design/issues/519\n <LayerProvider zOffset={1000}>\n <Popover\n constrainSize\n content={\n <Box overflow=\"auto\">\n <FocusLock onDeactivation={handleDeactivation}>\n <DatePicker\n selectTime={selectTime}\n timeStep={timeStep}\n onKeyUp={handleKeyUp}\n value={value}\n onChange={onChange}\n customValidation={customValidation}\n timeZoneScope={timeZoneScope}\n />\n </FocusLock>\n </Box>\n }\n data-testid=\"date-input-dialog\"\n fallbackPlacements={['bottom', 'bottom-start', 'top-end', 'top', 'top-start']}\n floatingBoundary={portal.element}\n open\n placement=\"bottom-end\"\n portal\n radius={2}\n ref={popoverRef}\n >\n {suffix}\n </Popover>\n </LayerProvider>\n ) : (\n suffix\n )\n }\n />\n )\n}\n","import {TextInput} from '@sanity/ui'\nimport {\n type FocusEvent,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type RefAttributes,\n} from 'react'\n\nimport {FormField} from '../../../form/components/formField/FormField'\nimport {type TimeZoneScope, useTimeZone} from '../../../hooks/useTimeZone'\nimport {DateTimeInput} from './base/DateTimeInput'\nimport {type CommonProps, type ParseResult} from './types'\n\ntype Props = CommonProps & {\n title: string\n description?: string\n parseInputValue: (inputValue: string) => ParseResult\n formatInputValue: (date: Date) => string\n deserialize: (value: string) => ParseResult\n serialize: (date: Date) => string\n onChange: (nextDate: string | null) => void\n selectTime?: boolean\n placeholder?: string\n timeStep?: number\n customValidation?: (selectedDate: Date) => boolean\n timeZoneScope: TimeZoneScope\n}\n\nexport function CommonDateTimeInput(props: Props & RefAttributes<HTMLInputElement>) {\n const {\n ref: forwardedRef,\n value,\n markers,\n title,\n description,\n placeholder,\n parseInputValue,\n formatInputValue,\n deserialize,\n serialize,\n selectTime,\n timeStep,\n readOnly,\n level,\n onChange,\n customValidation,\n timeZoneScope,\n ...rest\n } = props\n\n const [localValue, setLocalValue] = useState<string | null>(null)\n\n useEffect(() => {\n // oxlint-disable-next-line react/set-state-in-effect -- pre-existing violation, to be fixed in a follow-up\n setLocalValue(null)\n // oxlint-disable-next-line react/exhaustive-effect-dependencies -- pre-existing violation, to be fixed in a follow-up\n }, [value])\n\n const {zoneDateToUtc} = useTimeZone(timeZoneScope)\n const undefinedValue = typeof value === 'undefined'\n // Text input changes ('wall time')\n const handleDatePickerInputChange = useCallback(\n (event: FocusEvent<HTMLInputElement>) => {\n const nextInputValue = event.currentTarget.value\n const result = nextInputValue === '' ? null : parseInputValue(nextInputValue)\n\n if (result === null) {\n onChange(null)\n\n // If the field value is undefined, and we are clearing the invalid value\n // the above useEffect won't trigger, so we do some extra clean up here\n if (undefinedValue && localValue) {\n setLocalValue(null)\n }\n } else if (result.isValid) {\n // Convert zone time to UTC\n onChange(serialize(zoneDateToUtc(result.date)))\n } else {\n setLocalValue(nextInputValue)\n }\n },\n [undefinedValue, zoneDateToUtc, localValue, serialize, onChange, parseInputValue],\n )\n\n // Calendar changes (UTC)\n const handleDatePickerChange = useCallback(\n (nextDate: Date | null) => {\n onChange(nextDate ? serialize(nextDate) : null)\n },\n [serialize, onChange],\n )\n\n const inputRef = useRef<HTMLInputElement | null>(null)\n\n useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(\n forwardedRef,\n () => inputRef.current,\n )\n\n const id = useId()\n\n const parseResult = localValue ? parseInputValue(localValue) : value ? deserialize(value) : null\n\n const inputValue = localValue\n ? localValue\n : parseResult?.isValid\n ? formatInputValue(parseResult.date)\n : value\n\n const nodeValidations = useMemo(\n () =>\n markers.map((m) => ({\n level: m.level,\n path: m.path,\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n message: m.message ?? m.item?.message,\n })),\n [markers],\n )\n return (\n <FormField\n validation={\n parseResult?.error\n ? [\n ...nodeValidations,\n {\n level: 'error',\n message: parseResult.error,\n path: [],\n }, // casting to marker to avoid having to implement cloneWithMessage on item\n ]\n : nodeValidations\n }\n title={title}\n level={level}\n description={description}\n inputId={id}\n path={[]}\n >\n {readOnly ? (\n <TextInput value={inputValue} readOnly />\n ) : (\n <DateTimeInput\n {...rest}\n id={id}\n selectTime={selectTime}\n timeStep={timeStep}\n placeholder={placeholder || `e.g. ${formatInputValue(new Date())}`}\n ref={inputRef}\n value={parseResult?.date}\n inputValue={inputValue || ''}\n readOnly={Boolean(readOnly)}\n onInputChange={handleDatePickerInputChange}\n onChange={handleDatePickerChange}\n customValidity={parseResult?.error}\n customValidation={customValidation}\n timeZoneScope={timeZoneScope}\n />\n )}\n </FormField>\n )\n}\n","export function isValidDate(date: Date): boolean {\n return date instanceof Date && !isNaN(date.valueOf())\n}\n","import {tz as tzHelper} from '@date-fns/tz'\nimport {format} from 'date-fns/format'\nimport {getMinutes} from 'date-fns/getMinutes'\nimport {isValid} from 'date-fns/isValid'\nimport {parse} from 'date-fns/parse'\nimport {parseISO} from 'date-fns/parseISO'\nimport {setMinutes} from 'date-fns/setMinutes'\nimport {useCallback, type RefAttributes} from 'react'\n\nimport {type TimeZoneScope, useTimeZone} from '../../../hooks/useTimeZone'\nimport {useWorkspace} from '../../../studio/workspace'\nimport {CommonDateTimeInput} from './CommonDateTimeInput'\nimport {type CommonProps, type ParseResult} from './types'\nimport {isValidDate} from './utils'\n\ntype ParsedOptions = {\n calendarTodayLabel: string\n customValidation: (selectedDate: Date) => boolean\n customValidationMessage?: string\n timeStep: number\n}\ntype SchemaOptions = {\n calendarTodayLabel?: string\n customValidation?: (selectedDate: Date) => boolean\n customValidationMessage?: string\n timeStep?: number\n}\nexport type Props = CommonProps & {\n onChange: (date: string | null) => void\n timeZoneScope: TimeZoneScope\n type: {\n name: string\n title: string\n description?: string\n options?: SchemaOptions\n placeholder?: string\n }\n}\n\nfunction parseOptions(options: SchemaOptions = {}): ParsedOptions {\n return {\n customValidation:\n options.customValidation ||\n function () {\n return true\n },\n customValidationMessage: options.customValidationMessage || 'Invalid date.',\n calendarTodayLabel: options.calendarTodayLabel || 'Today',\n timeStep: ('timeStep' in options && Number(options.timeStep)) || 1,\n }\n}\n\nfunction serialize(date: Date) {\n return date.toISOString()\n}\nfunction deserialize(isoString: string): ParseResult {\n const deserialized = new Date(isoString)\n if (isValidDate(deserialized)) {\n return {isValid: true, date: deserialized}\n }\n return {isValid: false, error: `Invalid date value: \"${isoString}\"`}\n}\n\n// enforceTimeStep takes a dateString and datetime schema options and enforces the time\n// to be within the configured timeStep\nfunction enforceTimeStep(dateString: string, timeStep: number) {\n if (!timeStep || timeStep === 1) {\n return dateString\n }\n\n const date = parseISO(dateString)\n const minutes = getMinutes(date)\n const leftOver = minutes % timeStep\n if (leftOver !== 0) {\n return serialize(setMinutes(date, minutes - leftOver))\n }\n\n return serialize(date)\n}\n\nexport function DateTimeInput(props: Props & RefAttributes<HTMLInputElement>) {\n const {ref: forwardedRef, type, onChange, timeZoneScope, ...rest} = props\n const {title, description, placeholder} = type\n\n const {scheduledPublishing} = useWorkspace()\n const inputDateTimeFormat = scheduledPublishing.inputDateTimeFormat\n\n const {getCurrentZoneDate, timeZone} = useTimeZone(timeZoneScope)\n\n const {customValidation, customValidationMessage, timeStep} = parseOptions(type.options)\n\n // Returns date in UTC string\n const handleChange = useCallback(\n (nextDate: string | null) => {\n let date = nextDate\n if (date !== null && timeStep > 1) {\n date = enforceTimeStep(date, timeStep)\n }\n\n onChange(date)\n },\n [onChange, timeStep],\n )\n\n const formatInputValue = useCallback(\n (date: Date) => format(date, `${inputDateTimeFormat}`, {in: tzHelper(timeZone.name)}),\n [inputDateTimeFormat, timeZone.name],\n )\n\n const parseInputValue = useCallback(\n (inputValue: string) => {\n const parsed = parse(inputValue, `${inputDateTimeFormat}`, getCurrentZoneDate())\n\n // Check is value is a valid date\n if (!isValid(parsed)) {\n return {\n isValid: false,\n error: `Invalid date. Must be in the format \"${inputDateTimeFormat}\"`,\n } as ParseResult\n }\n\n // Check if value adheres to custom validation rules\n if (!customValidation(parsed)) {\n return {\n isValid: false,\n error: customValidationMessage,\n } as ParseResult\n }\n\n return {\n isValid: true,\n date: parsed,\n } as ParseResult\n },\n [customValidation, customValidationMessage, getCurrentZoneDate, inputDateTimeFormat],\n )\n\n return (\n <CommonDateTimeInput\n {...rest}\n onChange={handleChange}\n ref={forwardedRef}\n selectTime\n timeStep={timeStep}\n title={title}\n description={description}\n placeholder={placeholder}\n serialize={serialize}\n deserialize={deserialize}\n formatInputValue={formatInputValue}\n customValidation={customValidation}\n parseInputValue={parseInputValue}\n timeZoneScope={timeZoneScope}\n />\n )\n}\n","import {Card, Stack} from '@sanity/ui'\nimport {useState} from 'react'\n\nimport {useTimeZone} from '../../../hooks/useTimeZone'\nimport {SCHEDULED_PUBLISHING_TIME_ZONE_SCOPE} from '../../constants'\nimport {type ScheduleFormData} from '../../types'\nimport {DateTimeInput} from '../dateInputs'\n\ninterface Props {\n onChange?: (formData: ScheduleFormData) => void\n value?: ScheduleFormData | null\n}\n\nconst ScheduleForm = (props: Props) => {\n const {onChange, value} = props\n const timeZoneScope = SCHEDULED_PUBLISHING_TIME_ZONE_SCOPE\n const {getCurrentZoneDate} = useTimeZone(timeZoneScope)\n\n // Date input is stored locally to handle behaviour of the studio's `<LazyTextInput />` component.\n // If we don't keep this local state (and only rely on the canonical value of `ScheduleFormData`),\n // you'll see an unsightly flash when text inputs are blurred / lose focus, as `<LazyTextInput />`\n // clears its internal value before it's had a chance to re-render as a result of its own props changing.\n const [inputValue, setInputValue] = useState<string>()\n\n const handleChange = (date: string | null) => {\n if (date && onChange) {\n onChange({date})\n setInputValue(date)\n }\n }\n\n // Only allow dates in the future (`selectedDate` is UTC)\n const handleCustomValidation = (selectedDate: Date): boolean => {\n return selectedDate > getCurrentZoneDate()\n }\n\n return (\n <Stack gap={4}>\n <Card>\n <DateTimeInput\n level={0}\n markers={[]}\n onChange={handleChange}\n type={{\n name: 'date',\n options: {\n customValidation: handleCustomValidation,\n customValidationMessage: 'Date cannot be in the past.',\n },\n title: 'Date and time',\n }}\n value={inputValue === undefined ? value?.date : inputValue}\n timeZoneScope={timeZoneScope}\n />\n </Card>\n </Stack>\n )\n}\n\nexport default ScheduleForm\n","import {Stack} from '@sanity/ui'\nimport {type PropsWithChildren} from 'react'\n\nimport {type ScheduleFormData} from '../../types'\nimport ScheduleForm from './ScheduleForm'\n\ninterface Props {\n onChange?: (formData: ScheduleFormData) => void\n value?: ScheduleFormData | null\n}\n\n/**\n * Form for editing a schedule for a document when scheduled publishing is enabled.\n * @deprecated we will be dropping support for scheduled publishing on a future major version\n * @internal\n */\nexport function EditScheduleForm(props: PropsWithChildren<Props>) {\n const {onChange, value} = props\n\n return (\n <Stack gap={4}>\n {props.children}\n <ScheduleForm onChange={onChange} value={value} />\n </Stack>\n )\n}\n","import {ErrorOutlineIcon} from '@sanity/icons/ErrorOutline'\nimport {Card, Inline, Text} from '@sanity/ui'\nimport {Flex} from 'ui5'\n\ninterface Props {\n description?: string\n title: string\n}\n\nconst ErrorCallout = (props: Props) => {\n const {description, title} = props\n\n return (\n <Card overflow=\"hidden\" padding={4} radius={2} shadow={1} tone=\"critical\">\n <Flex alignItems=\"center\" gap={4}>\n <Text size={2}>\n <ErrorOutlineIcon />\n </Text>\n <Inline gap={2}>\n <Text size={1} weight=\"semibold\">\n {title}\n </Text>\n {description && <Text size={1}>{description}</Text>}\n </Inline>\n </Flex>\n </Card>\n )\n}\n\nexport default ErrorCallout\n","import {type ReactNode, useContext} from 'react'\nimport {DocumentActionPropsContext} from 'sanity/_singletons'\n\nimport {type DocumentActionProps} from '../../config/document/actions'\n\nfunction DocumentActionPropsProvider({\n children,\n value,\n}: {\n children: ReactNode\n value: DocumentActionProps\n}) {\n return (\n <DocumentActionPropsContext.Provider value={value}>\n {children}\n </DocumentActionPropsContext.Provider>\n )\n}\n\nfunction useDocumentActionProps(): DocumentActionProps {\n const context = useContext(DocumentActionPropsContext)\n if (context === undefined) {\n throw new Error('useDocumentActionProps must be used within a DocumentActionPropsProvider')\n }\n return context\n}\n\nexport {DocumentActionPropsProvider, useDocumentActionProps}\n","import {useState} from 'react'\n\nimport {type Schedule, type ScheduleFormData} from '../types'\n\nexport default function useScheduleForm(schedule?: Schedule) {\n const [isDirty, setIsDirty] = useState(false)\n const [formData, setFormData] = useState<ScheduleFormData | null>(\n schedule && schedule?.executeAt\n ? {\n date: schedule.executeAt,\n }\n : null,\n )\n\n const handleFormChange = (form: ScheduleFormData) => {\n const equalDates =\n schedule?.executeAt &&\n new Date(schedule.executeAt).getTime() === new Date(form?.date).getTime()\n\n setFormData(form)\n setIsDirty(!equalDates)\n }\n\n return {\n formData,\n isDirty,\n onFormChange: handleFormChange,\n }\n}\n","import {ErrorOutlineIcon} from '@sanity/icons/ErrorOutline'\nimport {InfoOutlineIcon} from '@sanity/icons/InfoOutline'\nimport {WarningOutlineIcon} from '@sanity/icons/WarningOutline'\nimport {type Path, type ValidationMarker} from '@sanity/types'\nimport {type ButtonTone, Stack, Text} from '@sanity/ui'\n// oxlint-disable-next-line no-restricted-imports\nimport {MenuItem} from '@sanity/ui/menu'\nimport {useCallback} from 'react'\nimport {styled} from 'styled-components'\nimport {Flex, Box} from 'ui5'\n\nconst StyledText = styled(Text)`\n white-space: initial;\n`\n\nconst MENU_ITEM_TONES: Record<'error' | 'warning' | 'info', ButtonTone> = {\n error: 'critical',\n warning: 'caution',\n info: 'primary',\n}\n\n/**\n * @internal\n */\nexport interface ValidationListItemProps {\n marker: ValidationMarker\n onClick?: (path?: Path) => void\n path: string\n truncate?: boolean\n}\n\n/**\n * @internal\n */\nexport function ValidationListItem(props: ValidationListItemProps) {\n const {marker, onClick, path, truncate} = props\n\n const handleClick = useCallback(() => {\n if (onClick) {\n onClick(marker.path)\n }\n }, [marker.path, onClick])\n\n const menuItemTone = MENU_ITEM_TONES[marker?.level] || undefined\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n const message = marker.message ?? marker.item?.message\n const children = (\n <Flex>\n <Box>\n <Text size={1}>\n {marker.level === 'error' && <ErrorOutlineIcon />}\n {marker.level === 'warning' && <WarningOutlineIcon />}\n {marker.level === 'info' && <InfoOutlineIcon />}\n </Text>\n </Box>\n\n <Stack gap={2} flex={1} paddingLeft={3}>\n {path && (\n <StyledText size={1} weight=\"semibold\">\n {path}\n </StyledText>\n )}\n {message && (\n <StyledText muted size={1} textOverflow={truncate ? 'ellipsis' : undefined}>\n {message}\n </StyledText>\n )}\n </Stack>\n </Flex>\n )\n return (\n <MenuItem padding={1} onClick={handleClick} radius={2} tone={menuItemTone}>\n <Box padding={2}>{children}</Box>\n </MenuItem>\n )\n}\n","import {\n isValidationErrorMarker,\n isValidationInfoMarker,\n isValidationWarningMarker,\n type ObjectSchemaType,\n type Path,\n type ValidationMarker,\n} from '@sanity/types'\nimport {Container} from '@sanity/ui'\nimport {useCallback} from 'react'\n\nimport {ValidationListItem} from './ValidationListItem'\n\n/** @internal */\nexport interface ValidationListProps {\n documentType?: ObjectSchemaType\n kind?: 'simple'\n validation: ValidationMarker[]\n onFocus?: (path: Path) => void\n onClose?: () => void\n truncate?: boolean\n}\n\n/** @internal */\nexport function ValidationList(props: ValidationListProps) {\n const {documentType, kind, validation, onFocus, onClose, truncate} = props\n const errors = validation.filter(isValidationErrorMarker)\n const warnings = validation.filter(isValidationWarningMarker)\n const info = validation.filter(isValidationInfoMarker)\n\n const handleClick = useCallback(\n (path: Path = []) => {\n if (onFocus) onFocus(path)\n if (onClose) onClose()\n },\n [onFocus, onClose],\n )\n\n const resolvePathTitle = (path: Path) => {\n const fields = documentType && documentType.fields\n const field = fields && fields.find((curr) => curr.name === path[0])\n\n return (field && field.type.title) || ''\n }\n\n const hasErrors = errors.length > 0\n const hasWarnings = warnings.length > 0\n const hasInfo = info.length > 0\n\n if (!hasErrors && !hasWarnings && !hasInfo) {\n return null\n }\n\n return (\n <Container width={0} data-kind={kind} data-testid=\"validation-list\">\n {hasErrors &&\n errors.map((_error, i) => (\n <ValidationListItem\n // oxlint-disable-next-line no-array-index-key\n key={i}\n truncate={truncate}\n path={resolvePathTitle(_error.path)}\n marker={_error}\n onClick={handleClick}\n />\n ))}\n {hasWarnings &&\n warnings.map((_warning, i) => (\n <ValidationListItem\n // oxlint-disable-next-line no-array-index-key\n key={i}\n truncate={truncate}\n path={resolvePathTitle(_warning.path)}\n marker={_warning}\n onClick={handleClick}\n />\n ))}\n {hasInfo &&\n info.map((_info, i) => (\n <ValidationListItem\n // oxlint-disable-next-line no-array-index-key\n key={i}\n truncate={truncate}\n path={resolvePathTitle(_info.path)}\n marker={_info}\n onClick={handleClick}\n />\n ))}\n </Container>\n )\n}\n","import {ErrorOutlineIcon} from '@sanity/icons/ErrorOutline'\nimport {WarningOutlineIcon} from '@sanity/icons/WarningOutline'\nimport {\n type ObjectSchemaType,\n type Path,\n type SchemaType,\n type ValidationMarker,\n} from '@sanity/types'\nimport {type CardTone, Container, Stack} from '@sanity/ui'\nimport {Menu} from '@sanity/ui/menu'\nimport * as PathUtils from '@sanity/util/paths'\nimport {type ReactNode, useCallback, useId} from 'react'\nimport {useRouter} from 'sanity/router'\n\nimport {Button} from '../../../../ui-components/button/Button'\nimport {MenuButton} from '../../../../ui-components/menuButton/MenuButton'\nimport {usePublishedId} from '../../hooks/usePublishedId'\nimport {useValidationState} from '../../utils/validationUtils'\nimport {ValidationList} from './ValidationList'\n\ninterface ValidationProps {\n documentId?: string\n markers: ValidationMarker[]\n type?: SchemaType\n menuHeader?: ReactNode\n}\n\nconst POPOVER_PROPS = {\n portal: true,\n constrainSize: true,\n preventOverflow: true,\n tone: 'default' as CardTone,\n width: 0,\n placement: 'bottom-end',\n} as const\n\nexport function ValidationInfo(props: ValidationProps) {\n const {type, markers, menuHeader, documentId} = props\n const router = useRouter()\n const {hasError, hasWarning} = useValidationState(markers)\n // use visibility so we can occupy the space equally for all states\n const visibility = hasError || hasWarning ? 'visible' : 'hidden'\n const id = useId() || ''\n const publishId = usePublishedId(documentId)\n\n const onFocus = useCallback(\n (path: Path) => {\n if (!publishId) {\n return\n }\n router.navigateIntent('edit', {\n id: publishId,\n path: encodeURIComponent(PathUtils.toString(path)),\n })\n },\n [router, publishId],\n )\n\n return (\n <MenuButton\n id={id || ''}\n button={\n <Button\n tooltipProps={{content: 'Show validation issues'}}\n mode=\"bleed\"\n data-testid=\"schedule-validation-list-button\"\n icon={hasError ? ErrorOutlineIcon : WarningOutlineIcon}\n style={{visibility}}\n tone={hasError ? 'critical' : 'default'}\n />\n }\n menu={\n <Menu padding={1}>\n <Container width={0}>\n <Stack gap={1}>\n {menuHeader ?? null}\n <ValidationList\n documentType={type as ObjectSchemaType}\n validation={markers}\n onFocus={onFocus}\n />\n </Stack>\n </Container>\n </Menu>\n }\n popover={POPOVER_PROPS}\n />\n )\n}\n","// Based off: https://github.com/sanity-io/sanity/blob/next/packages/@sanity/desk-tool/src/components/paneItem/helpers.tsx\nimport {type SanityDocument} from '@sanity/client'\nimport {type SchemaType} from '@sanity/types'\nimport {type ReactNode} from 'react'\nimport {combineLatest, type Observable, of} from 'rxjs'\nimport {map, startWith} from 'rxjs/operators'\n\nimport {type DocumentPreviewStore} from '../../preview/documentPreviewStore'\nimport {getDraftId, getPublishedId} from '../../util/draftUtils'\nimport {type Schedule} from '../types'\n\nexport interface PaneItemPreviewState {\n isLoading?: boolean\n draft?: SanityDocument | null\n published?: SanityDocument | null\n}\n\nconst isLiveEditEnabled = (schemaType: any) => schemaType.liveEdit === true\n\nexport function getPreviewStateObservable(\n documentPreviewStore: DocumentPreviewStore,\n schemaType: SchemaType,\n documentId: string,\n title: ReactNode,\n): Observable<PaneItemPreviewState> {\n const draft$ = isLiveEditEnabled(schemaType)\n ? of({snapshot: null})\n : documentPreviewStore.observeForPreview(\n {_type: 'reference', _ref: getDraftId(documentId)},\n schemaType,\n )\n\n const published$ = documentPreviewStore.observeForPreview(\n {_type: 'reference', _ref: getPublishedId(documentId)},\n schemaType,\n )\n\n return combineLatest([draft$, published$]).pipe(\n map(([draft, published]: any) => ({\n draft: draft.snapshot ? {title, ...draft.snapshot} : null,\n isLoading: false,\n published: published.snapshot ? {title, ...published.snapshot} : null,\n })),\n startWith({draft: null, isLoading: true, published: null}),\n )\n}\n\n/**\n * Whilst schedules can contain multiple documents, this plugin specifically limits schedules to one document only\n */\nexport function getScheduledDocument(schedule: Schedule) {\n return schedule.documents?.[0]\n}\n\n/**\n * Whilst schedules can contain multiple documents, this plugin specifically limits schedules to one document only\n */\nexport function getScheduledDocumentId(schedule: Schedule): string | undefined {\n return getScheduledDocument(schedule)?.documentId.replaceAll('drafts.', '')\n}\n","import {type SchemaType} from '@sanity/types'\nimport {useMemo} from 'react'\n\nimport {useSchema} from '../../hooks/useSchema'\nimport {type Schedule} from '../types'\nimport {getScheduledDocument} from '../utils/paneItemHelpers'\n\nexport function useScheduleSchemaType(schedule: Schedule): SchemaType | undefined {\n const firstDocument = getScheduledDocument(schedule)\n const schema = useSchema()\n const schemaName = firstDocument.documentType\n\n return useMemo(() => {\n if (!schemaName) {\n return undefined\n }\n return schema.get(schemaName) as SchemaType\n }, [schemaName, schema])\n}\n\nexport function useSchemaType(schemaName: string): SchemaType {\n const schema = useSchema()\n return useMemo(() => schema.get(schemaName) as SchemaType, [schemaName, schema])\n}\n","import {type SchemaType} from '@sanity/types'\nimport {useMemo} from 'react'\nimport {useObservable} from 'react-rx'\nimport {of} from 'rxjs'\n\nimport {useDocumentPreviewStore} from '../../store/datastores'\nimport {getPreviewStateObservable, type PaneItemPreviewState} from '../utils/paneItemHelpers'\n\nconst EMPTY_STATE: PaneItemPreviewState = {}\n\nexport default function usePreviewState(\n documentId: string,\n schemaType?: SchemaType,\n): PaneItemPreviewState {\n const documentPreviewStore = useDocumentPreviewStore()\n\n const preview$ = useMemo(\n () =>\n schemaType\n ? getPreviewStateObservable(documentPreviewStore, schemaType, documentId, '')\n : of(EMPTY_STATE),\n [documentPreviewStore, schemaType, documentId],\n )\n\n return useObservable(preview$, EMPTY_STATE)\n}\n","import {ElementQuery} from '@sanity/ui'\nimport {styled} from 'styled-components'\n\nconst DateWithTooltipElementQuery: typeof ElementQuery = styled(ElementQuery)`\n .date-small {\n display: inline;\n }\n .date-medium {\n display: none;\n }\n .date-large {\n display: none;\n }\n\n &[data-eq-min~='1'] {\n .date-small {\n display: none;\n }\n .date-medium {\n display: inline;\n }\n .date-large {\n display: none;\n }\n }\n\n &[data-eq-min~='2'] {\n .date-small {\n display: none;\n }\n .date-medium {\n display: none;\n }\n .date-large {\n display: inline;\n }\n }\n`\n\nexport default DateWithTooltipElementQuery\n","import {Dialog} from '../../../../ui-components/dialog/Dialog'\nimport {SCHEDULED_PUBLISHING_TIME_ZONE_SCOPE} from '../../constants'\nimport useScheduleForm from '../../hooks/useScheduleForm'\nimport useScheduleOperation from '../../hooks/useScheduleOperation'\nimport {type Schedule} from '../../types'\nimport {EditScheduleForm} from '../editScheduleForm/EditScheduleForm'\nimport DialogHeader from './DialogHeader'\n\nexport interface DialogScheduleEditProps {\n onClose: () => void\n schedule: Schedule\n}\n\nconst DialogScheduleEdit = (props: DialogScheduleEditProps) => {\n const {onClose, schedule} = props\n const timeZoneScope = SCHEDULED_PUBLISHING_TIME_ZONE_SCOPE\n\n const {updateSchedule} = useScheduleOperation()\n const {formData, isDirty, onFormChange} = useScheduleForm(schedule)\n\n // Callbacks\n const handleScheduleUpdate = async () => {\n if (!formData?.date) {\n return\n }\n // Update schedule then close self\n await updateSchedule({\n date: formData.date,\n scheduleId: schedule.id,\n })\n onClose()\n }\n\n return (\n <Dialog\n footer={{\n confirmButton: {\n text: 'Update',\n disabled: !isDirty,\n onClick: handleScheduleUpdate,\n },\n }}\n header={<DialogHeader timeZoneScope={timeZoneScope} title=\"Edit schedule\" />}\n id=\"time-zone\"\n onClose={onClose}\n width={1}\n >\n {/* oxlint-disable-next-line no-deprecated -- will fix in follow up PR */}\n <EditScheduleForm onChange={onFormChange} value={formData} />\n </Dialog>\n )\n}\n\nexport default DialogScheduleEdit\n","import {useCallback, useState} from 'react'\n\nimport {type TimeZoneScope} from '../../hooks/useTimeZone'\n\ninterface DialogControls {\n show: () => void\n hide: () => void\n timeZoneScope: TimeZoneScope\n visible: boolean\n}\n\nexport function useDialogVisible(timeZoneScope: TimeZoneScope): DialogControls {\n const [dialogVisible, setDialogVisible] = useState(false)\n\n const hide = useCallback(() => {\n setDialogVisible(false)\n }, [])\n const show = useCallback(() => {\n setDialogVisible(true)\n }, [])\n\n return {\n visible: dialogVisible,\n show,\n timeZoneScope,\n hide,\n }\n}\n","import {type TimeZoneScope} from '../../hooks/useTimeZone'\nimport DialogScheduleEdit from '../components/dialogs/DialogScheduleEdit'\nimport {type Schedule} from '../types'\nimport {useDialogVisible} from './useDialogVisibile'\n\nfunction useDialogScheduleEdit(schedule: Schedule, tzScope: TimeZoneScope) {\n const {visible, show, hide, timeZoneScope} = useDialogVisible(tzScope)\n\n const dialogProps = {\n onClose: hide,\n schedule,\n visible,\n }\n\n return {\n DialogScheduleEdit: visible ? DialogScheduleEdit : null,\n dialogProps,\n timeZoneScope,\n dialogScheduleEditShow: show,\n hide,\n }\n}\n\nexport default useDialogScheduleEdit\n","import {type CurrentUser} from '@sanity/types'\nimport {type SelectableTone} from '@sanity/ui'\nimport {type ComponentType, type ReactNode} from 'react'\nimport {Box} from 'ui5'\n\nimport {MenuItem} from '../../../../ui-components/menuItem/MenuItem'\nimport {Tooltip} from '../../../../ui-components/tooltip/Tooltip'\nimport {\n InsufficientPermissionsMessage,\n type InsufficientPermissionsMessageProps,\n} from '../../../components/InsufficientPermissionsMessage'\n\ninterface Props {\n currentUser?: CurrentUser\n hasPermission?: boolean\n icon: ComponentType | ReactNode\n onClick: () => void\n permissionsOperationLabel: InsufficientPermissionsMessageProps['context']\n title: string\n tone?: SelectableTone\n disabled?: boolean\n}\n\nconst MenuItemWithPermissionsTooltip = (props: Props) => {\n const {\n currentUser,\n hasPermission,\n icon,\n onClick,\n permissionsOperationLabel,\n title,\n tone,\n disabled,\n } = props\n return (\n <Tooltip\n content={\n <Box paddingX={2} paddingY={1}>\n <InsufficientPermissionsMessage\n currentUser={currentUser}\n context={permissionsOperationLabel}\n />\n </Box>\n }\n disabled={hasPermission}\n placement=\"left\"\n portal\n >\n {/* Wrapper element to allow disabled menu items to trigger tooltips */}\n <div>\n <MenuItem\n disabled={!hasPermission || disabled}\n icon={icon}\n onClick={onClick}\n text={title}\n tone={tone}\n />\n </div>\n </Tooltip>\n )\n}\n\nexport default MenuItemWithPermissionsTooltip\n","import {CalendarIcon} from '@sanity/icons/Calendar'\nimport {CheckmarkCircleIcon} from '@sanity/icons/CheckmarkCircle'\nimport {PublishIcon} from '@sanity/icons/Publish'\nimport {TrashIcon} from '@sanity/icons/Trash'\nimport {type SchemaType} from '@sanity/types'\n\nimport {useScheduledPublishingEnabled} from '../../../scheduledPublishing/contexts/ScheduledPublishingEnabledProvider'\nimport {useDocumentPairPermissions} from '../../../store/grants/documentPairPermissions'\nimport {useCurrentUser} from '../../../store/user/hooks'\nimport useScheduleOperation from '../../hooks/useScheduleOperation'\nimport {type Schedule} from '../../types'\nimport {getScheduledDocument} from '../../utils/paneItemHelpers'\nimport MenuItemWithPermissionsTooltip from './MenuItemWithPermissionsTooltip'\n\ninterface Props {\n actions?: {\n clear?: boolean\n delete?: boolean\n edit?: boolean\n execute?: boolean\n }\n onDelete?: () => void\n onEdit?: () => void\n schedule: Schedule\n schemaType: SchemaType\n}\n\n/**\n * Edit, Delete and Clear are intentionally not gated on `document.actions`.\n * These items call `useScheduleOperation` (schedules HTTP API), not document operations.\n * Edit patches a schedule record; the in-pane call site is already behind\n * `useScheduleAction.action = 'schedule'`.\n * Delete and Clear are not `delete` (the document lives) and not `discardVersion`\n * (legacy schedules are not versions).\n * Publish now is a document publish, so its call site gates it on `publish`.\n * Grant checks stay on `useDocumentPairPermissions({permission: 'publish'})`.\n */\nconst ContextMenuItems = (props: Props) => {\n const {actions, onDelete, onEdit, schedule, schemaType} = props\n const {mode} = useScheduledPublishingEnabled()\n const firstDocument = getScheduledDocument(schedule)\n\n const currentUser = useCurrentUser()\n const [permissions, isPermissionsLoading] = useDocumentPairPermissions({\n id: firstDocument.documentId,\n type: schemaType?.name,\n permission: 'publish',\n })\n const {deleteSchedule, publishSchedule} = useScheduleOperation()\n\n const insufficientPermissions = !isPermissionsLoading && !permissions?.granted\n\n // Callbacks\n const handleEdit = () => {\n onEdit?.()\n }\n\n const handleDelete = () => {\n void deleteSchedule({schedule}).then(() => onDelete?.())\n }\n\n const handleExecute = () => {\n void publishSchedule({schedule})\n }\n\n if (!currentUser) {\n return null\n }\n\n return (\n <>\n {actions?.edit && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={CalendarIcon}\n onClick={handleEdit}\n permissionsOperationLabel=\"edit-schedules\"\n title=\"Edit schedule\"\n disabled={mode === 'upsell'}\n />\n )}\n {actions?.execute && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={PublishIcon}\n onClick={handleExecute}\n permissionsOperationLabel=\"execute-schedules\"\n title=\"Publish now\"\n disabled={mode === 'upsell'}\n />\n )}\n {actions?.delete && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={TrashIcon}\n onClick={handleDelete}\n permissionsOperationLabel=\"delete-schedules\"\n title=\"Delete schedule\"\n tone=\"critical\"\n disabled={mode === 'upsell'}\n />\n )}\n {actions?.clear && (\n <MenuItemWithPermissionsTooltip\n currentUser={currentUser}\n hasPermission={!insufficientPermissions}\n icon={CheckmarkCircleIcon}\n onClick={handleDelete}\n permissionsOperationLabel=\"delete-schedules\"\n title=\"Clear completed schedule\"\n disabled={mode === 'upsell'}\n />\n )}\n </>\n )\n}\n\nexport default ContextMenuItems\n","import {type SchemaType} from '@sanity/types'\nimport {Menu} from '@sanity/ui/menu'\n\nimport {MenuButton} from '../../../../ui-components/menuButton/MenuButton'\nimport {ContextMenuButton} from '../../../components/contextMenuButton/ContextMenuButton'\nimport {type Schedule} from '../../types'\nimport ContextMenuItems from './ContextMenuItems'\n\ninterface Props {\n actions?: {\n clear?: boolean\n delete?: boolean\n edit?: boolean\n execute?: boolean\n }\n onDelete?: () => void\n onEdit?: () => void\n schedule: Schedule\n schemaType: SchemaType\n}\n\nexport const ScheduleContextMenu = (props: Props) => {\n const {actions, onDelete, onEdit, schedule, schemaType} = props\n\n return (\n <MenuButton\n button={<ContextMenuButton />}\n id=\"contextMenu\"\n menu={\n <Menu>\n <ContextMenuItems\n actions={actions}\n onDelete={onDelete}\n onEdit={onEdit}\n schedule={schedule}\n schemaType={schemaType}\n />\n </Menu>\n }\n popover={{placement: 'left', portal: true, tone: 'default'}}\n />\n )\n}\n","import {useEffect, useState} from 'react'\n\nimport {useValidationStatus} from '../../../hooks/useValidationStatus'\nimport {getDraftId} from '../../../util/draftUtils'\nimport {useScheduleSchemaType} from '../../hooks/useSchemaType'\nimport {type Schedule, type ValidationStatus} from '../../types'\nimport {getScheduledDocumentId} from '../../utils/paneItemHelpers'\n\ninterface Props {\n schedule: Schedule\n updateValidation: (status: ValidationStatus) => void\n}\n\n// Duration to wait before validating (after this component has mounted)\nconst VALIDATION_DELAY_MS = 1500\n\n/**\n * useValidationStatus requires a published id, and we dont always have that\n *\n * This a boilerplate wrapper component around it,\n * so we conditionally call back with updated status whenver it is possible.\n * */\nexport function ValidateScheduleDoc({schedule, updateValidation}: Props) {\n const schemaType = useScheduleSchemaType(schedule)\n const id = getScheduledDocumentId(schedule)\n\n if (!id || !schemaType?.name) {\n return null\n }\n return (\n <DelayedValidationRunner\n id={id}\n schemaName={schemaType.name}\n updateValidation={updateValidation}\n />\n )\n}\n\ninterface ValidationRunnerProps {\n id: string\n schemaName: string\n updateValidation: (status: ValidationStatus) => void\n}\n\nfunction DelayedValidationRunner({id, schemaName, updateValidation}: ValidationRunnerProps) {\n const [ready, setReady] = useState(false)\n\n useEffect(() => {\n const timeout = setTimeout(() => {\n setReady(true)\n }, VALIDATION_DELAY_MS)\n\n return () => {\n clearTimeout(timeout)\n }\n }, [])\n\n if (!ready) {\n return null\n }\n\n return <ValidationRunner id={id} schemaName={schemaName} updateValidation={updateValidation} />\n}\n\nfunction ValidationRunner({id, schemaName, updateValidation}: ValidationRunnerProps) {\n const draftId = getDraftId(id)\n // No `getTargetScopeId(useTargetDocumentState())` here: scheduled publishing deliberately validates the\n // explicit draft of the scheduled document, independent of the selected perspective.\n // TODO: this will be supported in the future, look for SAPP-3986 and SAPP-3987.\n const validationStatus = useValidationStatus(draftId, schemaName, true)\n\n useEffect(() => {\n if (!validationStatus.isValidating) {\n updateValidation(validationStatus)\n }\n }, [updateValidation, validationStatus])\n\n return null\n}\n","import {Text} from '@sanity/ui'\nimport {formatDistance} from 'date-fns/formatDistance'\n\nimport {Tooltip} from '../../../../../ui-components/tooltip/Tooltip'\nimport {useTimeZone} from '../../../../hooks/useTimeZone'\nimport {DATE_FORMAT} from '../../../../studio/timezones/constants'\n\ninterface Props {\n date: Date // local date in UTC\n useElementQueries?: boolean\n}\n\n/**\n * If `useElementQueries` is enabled, dates will be conditionally toggled at different element\n * breakpoints, provided this `<DateWithTooltip>` is wrapped in a `<DateElementQuery>` component.\n */\nconst DateWithTooltip = (props: Props) => {\n const {date, useElementQueries} = props\n\n const {formatDateTz} = useTimeZone({type: 'scheduledPublishing'})\n\n // Get distance between both dates\n const distance = formatDistance(date, new Date(), {\n addSuffix: true,\n })\n\n const dateTimeLarge = formatDateTz({date, format: DATE_FORMAT.LARGE})\n const dateTimeMedium = formatDateTz({date, format: DATE_FORMAT.MEDIUM})\n const dateTimeSmall = formatDateTz({date, format: DATE_FORMAT.SMALL})\n\n return (\n <Text size={1} textOverflow=\"ellipsis\">\n <Tooltip content={distance} portal>\n <span>\n {useElementQueries ? (\n <>\n <span className=\"date-small\">{dateTimeSmall}</span>\n <span className=\"date-medium\">{dateTimeMedium}</span>\n <span className=\"date-large\">{dateTimeLarge}</span>\n </>\n ) : (\n dateTimeLarge\n )}\n </span>\n </Tooltip>\n </Text>\n )\n}\n\nexport default DateWithTooltip\n","import {red} from '@sanity/color'\nimport {ErrorOutlineIcon} from '@sanity/icons/ErrorOutline'\nimport {type CardTone, Container, Text} from '@sanity/ui'\nimport {Menu} from '@sanity/ui/menu'\nimport {Flex} from 'ui5'\n\nimport {Button} from '../../../../ui-components/button/Button'\nimport {MenuButton} from '../../../../ui-components/menuButton/MenuButton'\nimport {SCHEDULE_FAILED_TEXT} from '../../constants'\n\ninterface Props {\n stateReason: string\n}\n\nconst POPOVER_PROPS = {\n portal: true,\n constrainSize: true,\n preventOverflow: true,\n tone: 'default' as CardTone,\n width: 0,\n}\n\nconst StateReasonFailedInfo = (props: Props) => {\n const {stateReason} = props\n\n return (\n <MenuButton\n id=\"stateReason\"\n button={\n <Button\n tooltipProps={{content: 'Schedule failed'}}\n mode=\"bleed\"\n data-testid=\"schedule-validation-list-button\"\n icon={ErrorOutlineIcon}\n tone=\"critical\"\n />\n }\n menu={\n <Menu padding={1}>\n <Container padding={2} width={0}>\n <Text size={1}>{SCHEDULE_FAILED_TEXT}</Text>\n <Flex gap={3} marginTop={4} padding={1}>\n <Text size={1} style={{color: red[700].hex}}>\n <ErrorOutlineIcon />\n </Text>\n <Text size={1} style={{color: red[700].hex}} weight=\"medium\">\n {stateReason}\n </Text>\n </Flex>\n </Container>\n </Menu>\n }\n popover={POPOVER_PROPS}\n />\n )\n}\n\nexport default StateReasonFailedInfo\n","import {UserAvatar} from '../../../components/userAvatar/UserAvatar'\n\ninterface Props {\n id: string\n}\n\nconst User = (props: Props) => {\n const {id} = props\n return <UserAvatar user={id} withTooltip />\n}\n\nexport default User\n","import {type SchemaType} from '@sanity/types'\nimport {Badge, Card, Stack, Text} from '@sanity/ui'\nimport {type ComponentPropsWithoutRef, type ElementType, type ReactNode, useState} from 'react'\nimport {styled} from 'styled-components'\nimport {Flex, Box} from 'ui5'\n\nimport {Tooltip} from '../../../../ui-components/tooltip/Tooltip'\nimport {DocumentVersionsStatus} from '../../../components/documentStatus/DocumentVersionsStatus'\nimport {DocumentVersionsStatusIndicator} from '../../../components/documentStatusIndicator/DocumentVersionsStatusIndicator'\nimport {useTimeZone} from '../../../hooks/useTimeZone'\nimport {SanityDefaultPreview} from '../../../preview/components/SanityDefaultPreview'\nimport {useDocumentVersions} from '../../../releases/hooks/useDocumentVersions'\nimport {useScheduledPublishingEnabled} from '../../../scheduledPublishing/contexts/ScheduledPublishingEnabledProvider'\nimport {\n DOCUMENT_HAS_ERRORS_TEXT,\n DOCUMENT_HAS_WARNINGS_TEXT,\n SCHEDULE_ACTION_DICTIONARY,\n} from '../../constants'\nimport {type Schedule} from '../../types'\nimport {getLastExecuteDate} from '../../utils/scheduleUtils'\nimport {EMPTY_VALIDATION_STATUS, useValidationState} from '../../utils/validationUtils'\nimport {ValidateScheduleDoc} from '../validation/SchedulesValidation'\nimport {ValidationInfo} from '../validation/ValidationInfo'\nimport DateWithTooltip from './dateWithTooltip/DateWithTooltip'\nimport StateReasonFailedInfo from './StateReasonFailedInfo'\nimport User from './User'\n\nconst StatusDotPlaceholder = styled(Box)`\n width: 9px;\n`\ninterface Props<TLink extends ElementType | undefined = undefined> {\n children?: ReactNode\n contextMenu?: ReactNode\n linkComponent?: TLink\n linkProps?: TLink extends ElementType ? ComponentPropsWithoutRef<TLink> : undefined\n onClick?: () => void\n publishedDocumentId?: string\n schedule: Schedule\n schemaType?: SchemaType\n useElementQueries?: boolean\n}\n\nfunction PreviewWrapper<TLink extends ElementType | undefined = undefined>(props: Props<TLink>) {\n const {\n children,\n contextMenu,\n linkComponent,\n linkProps,\n onClick,\n publishedDocumentId,\n schedule,\n schemaType,\n useElementQueries,\n } = props\n const {mode} = useScheduledPublishingEnabled()\n const [validationStatus, setValidationStatus] = useState(EMPTY_VALIDATION_STATUS)\n const {validation} = validationStatus\n const {hasError, validationTone} = useValidationState(validation)\n const {formatDateTz} = useTimeZone({type: 'scheduledPublishing'})\n\n const executeDate = getLastExecuteDate(schedule)\n const scheduleDate = executeDate ? new Date(executeDate) : null\n\n return (\n <Card\n padding={1}\n radius={2}\n shadow={1}\n tone={validationTone}\n style={mode === 'upsell' && schedule.state === 'scheduled' ? {opacity: 0.7} : undefined}\n >\n <Flex alignItems=\"center\" gap={1} justifyContent=\"space-between\">\n <Tooltip\n delay={{open: 400}}\n placement=\"bottom-end\"\n content={\n publishedDocumentId ? (\n <DocumentVersionsStatus documentGroupId={publishedDocumentId} />\n ) : null\n }\n disabled={!publishedDocumentId}\n >\n <Card\n {...(linkProps as object | undefined)}\n __unstable_focusRing\n as={linkComponent ? (linkComponent as ElementType) : undefined}\n data-as={onClick || linkComponent ? 'a' : undefined}\n flex={1}\n onClick={onClick}\n padding={1}\n radius={2}\n tabIndex={0}\n tone={validationTone}\n >\n <Flex\n alignItems=\"center\"\n gap={3}\n justifyContent=\"flex-start\"\n paddingLeft={children ? 0 : [1, 2]}\n >\n {children && <Box style={{flexBasis: 'auto', flexGrow: 1}}>{children}</Box>}\n\n {/* Badge */}\n {schedule.action === 'unpublish' && (\n <Flex style={{flexShrink: 0}}>\n <Badge fontSize={0} tone={SCHEDULE_ACTION_DICTIONARY[schedule.action].badgeTone}>\n {schedule.action}\n </Badge>\n </Flex>\n )}\n\n {/* Schedule date */}\n <Box display={['block', 'none']} style={{flexShrink: 0, width: '90px'}}>\n <Stack gap={2}>\n {scheduleDate ? (\n <>\n <Text size={1}>\n {formatDateTz({date: scheduleDate, format: 'dd/MM/yyyy'})}\n </Text>\n <Text size={1}>{formatDateTz({date: scheduleDate, format: 'p'})}</Text>\n </>\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Stack>\n </Box>\n <Box\n display={['none', 'block']}\n style={{flexShrink: 0, maxWidth: '250px', width: children ? '35%' : 'auto'}}\n >\n {scheduleDate ? (\n <DateWithTooltip date={scheduleDate} useElementQueries={useElementQueries} />\n ) : (\n <Text muted size={1}>\n <em>No date specified</em>\n </Text>\n )}\n </Box>\n\n {/* HACK: render invisible preview wrapper when no children are provided to ensure consistent height */}\n {!children && (\n <Box style={{visibility: 'hidden'}}>\n <SanityDefaultPreview isPlaceholder />\n </Box>\n )}\n\n <Flex alignItems=\"center\" style={{flexShrink: 0, marginLeft: 'auto'}}>\n {/* Avatar */}\n <Box display={['none', 'none', 'block']} marginX={3} style={{flexShrink: 0}}>\n <User id={schedule?.author} />\n </Box>\n\n {/* Document status */}\n <Box display={['none', 'block']} marginX={[2, 2, 3]} style={{flexShrink: 0}}>\n {publishedDocumentId ? (\n <ScheduleItemStatusIndicator publishedDocumentId={publishedDocumentId} />\n ) : (\n <StatusDotPlaceholder />\n )}\n </Box>\n </Flex>\n </Flex>\n </Card>\n </Tooltip>\n\n <Flex justifyContent=\"center\" style={{width: '38px'}}>\n {/* Validation status (only displayed on upcoming schedules) */}\n {schedule.state === 'scheduled' && (\n <Box>\n <ValidateScheduleDoc schedule={schedule} updateValidation={setValidationStatus} />\n <ValidationInfo\n markers={validation}\n type={schemaType}\n documentId={publishedDocumentId}\n menuHeader={\n <Box padding={2}>\n <Text size={1}>\n {hasError ? DOCUMENT_HAS_ERRORS_TEXT : DOCUMENT_HAS_WARNINGS_TEXT}\n </Text>\n </Box>\n }\n />\n </Box>\n )}\n\n {/* Failed state reason (only displayed on cancelled schedules) */}\n {schedule.state === 'cancelled' && (\n <StateReasonFailedInfo stateReason={schedule.stateReason} />\n )}\n </Flex>\n\n {/* Failed state reason (only displayed on cancelled schedules) */}\n {schedule.state === 'cancelled' && (\n <StateReasonFailedInfo stateReason={schedule.stateReason} />\n )}\n\n {/* Context menu */}\n {contextMenu && (\n <Box style={{flexShrink: 0}} paddingRight={2}>\n {contextMenu}\n </Box>\n )}\n </Flex>\n </Card>\n )\n}\n\nexport default PreviewWrapper\n\nfunction ScheduleItemStatusIndicator({publishedDocumentId}: {publishedDocumentId: string}) {\n const {versions} = useDocumentVersions({documentId: publishedDocumentId})\n return <DocumentVersionsStatusIndicator documentVersions={versions} />\n}\n","import {type SchemaType} from '@sanity/types'\nimport {useMemo} from 'react'\n\nimport {SCHEDULED_PUBLISHING_TIME_ZONE_SCOPE} from '../../constants'\nimport {useDocumentActionProps} from '../../contexts/documentActionProps'\nimport useDialogScheduleEdit from '../../hooks/useDialogScheduleEdit'\nimport {type Schedule} from '../../types'\nimport {getScheduledDocumentId} from '../../utils/paneItemHelpers'\nimport {ScheduleContextMenu} from '../scheduleContextMenu'\nimport PreviewWrapper from './PreviewWrapper'\n\ninterface Props {\n schedule: Schedule\n schemaType: SchemaType\n}\n\nconst DocumentPreview = (props: Props) => {\n const {schedule, schemaType} = props\n const timeZoneScope = SCHEDULED_PUBLISHING_TIME_ZONE_SCOPE\n\n const {DialogScheduleEdit, dialogProps, dialogScheduleEditShow} = useDialogScheduleEdit(\n schedule,\n timeZoneScope,\n )\n // oxlint-disable-next-line no-deprecated -- will fix in follow up PR\n const {onComplete} = useDocumentActionProps()\n const publishedId = useMemo(() => getScheduledDocumentId(schedule), [schedule])\n\n return (\n <>\n {/* Dialogs (rendered outside of cards so they don't infer card colors) */}\n {DialogScheduleEdit && <DialogScheduleEdit {...dialogProps} />}\n\n <PreviewWrapper\n contextMenu={\n <ScheduleContextMenu\n actions={{\n delete: true,\n edit: true,\n }}\n onDelete={onComplete}\n onEdit={dialogScheduleEditShow}\n schedule={schedule}\n schemaType={schemaType}\n />\n }\n onClick={dialogScheduleEditShow}\n publishedDocumentId={publishedId}\n schedule={schedule}\n schemaType={schemaType}\n />\n </>\n )\n}\n\nexport default DocumentPreview\n","import {TrashIcon} from '@sanity/icons/Trash'\nimport {Menu} from '@sanity/ui/menu'\n\nimport {MenuButton} from '../../../../ui-components/menuButton/MenuButton'\nimport {MenuItem} from '../../../../ui-components/menuItem/MenuItem'\nimport {ContextMenuButton} from '../../../components/contextMenuButton/ContextMenuButton'\nimport useScheduleOperation from '../../hooks/useScheduleOperation'\nimport {type Schedule} from '../../types'\n\ninterface Props {\n onDelete?: () => void\n schedule: Schedule\n}\n\n/**\n * 'Fallback' context menu used with schedules that don't have any valid associated documentType.\n * Currently, all users can delete schedules that don't have any associated documents, so we don't need to check for permissions here.\n *\n * Intentionally not gated on `document.actions`: there is no `schemaType` to build\n * `{schemaType, documentId, versionType, releaseId}`, and delete-schedule has no honest action id.\n * Remediation UI for orphaned or deleted documents.\n */\nexport const FallbackContextMenu = (props: Props) => {\n const {onDelete, schedule} = props\n const {deleteSchedule} = useScheduleOperation()\n\n const handleDelete = () => {\n void deleteSchedule({schedule}).then(() => onDelete?.())\n }\n\n return (\n <MenuButton\n button={<ContextMenuButton />}\n id=\"contextMenu\"\n menu={\n <Menu>\n <MenuItem\n icon={TrashIcon}\n onClick={handleDelete}\n text=\"Delete schedule\"\n tone=\"critical\"\n />\n </Menu>\n }\n popover={{placement: 'left', portal: true, tone: 'default'}}\n />\n )\n}\n","import {red} from '@sanity/color'\nimport {UnknownIcon} from '@sanity/icons/Unknown'\n\nimport {SanityDefaultPreview} from '../../../preview/components/SanityDefaultPreview'\nimport {type Schedule} from '../../types'\nimport {FallbackContextMenu} from '../scheduleContextMenu/FallbackContextMenu'\nimport PreviewWrapper from './PreviewWrapper'\n\nconst NoSchemaItem = ({schedule}: {schedule: Schedule}) => {\n return (\n <PreviewWrapper\n contextMenu={<FallbackContextMenu schedule={schedule} />}\n schedule={schedule}\n useElementQueries\n >\n <SanityDefaultPreview\n icon={UnknownIcon}\n layout=\"default\"\n subtitle={<em>It may have been deleted</em>}\n title={<em style={{color: red[600].hex}}>Document not found</em>}\n />\n </PreviewWrapper>\n )\n}\n\nexport default NoSchemaItem\n","import {type SchemaType} from '@sanity/types'\nimport {type ComponentType} from 'react'\nimport {IntentLink} from 'sanity/router'\n\nimport {Preview} from '../../../preview/components/Preview'\nimport {SanityDefaultPreview} from '../../../preview/components/SanityDefaultPreview'\nimport {getPublishedId} from '../../../util/draftUtils'\nimport {SCHEDULED_PUBLISHING_TIME_ZONE_SCOPE} from '../../constants'\nimport useDialogScheduleEdit from '../../hooks/useDialogScheduleEdit'\nimport {type Schedule} from '../../types'\nimport {type PaneItemPreviewState} from '../../utils/paneItemHelpers'\nimport {ScheduleContextMenu} from '../scheduleContextMenu'\nimport PreviewWrapper from './PreviewWrapper'\n\ninterface Props {\n previewState: PaneItemPreviewState\n schedule: Schedule\n schemaType: SchemaType\n}\n\nconst ToolPreview = (props: Props) => {\n const {previewState, schedule, schemaType} = props\n const timeZoneScope = SCHEDULED_PUBLISHING_TIME_ZONE_SCOPE\n\n const visibleDocument = previewState.draft || previewState.published\n const isCompleted = schedule.state === 'succeeded'\n const isScheduled = schedule.state === 'scheduled'\n\n const {DialogScheduleEdit, dialogProps, dialogScheduleEditShow} = useDialogScheduleEdit(\n schedule,\n timeZoneScope,\n )\n const publishedDocId = visibleDocument ? getPublishedId(visibleDocument._id) : undefined\n\n return (\n <>\n {/* Dialogs (rendered outside of cards so they don't infer card colors) */}\n {DialogScheduleEdit && <DialogScheduleEdit {...dialogProps} />}\n <PreviewWrapper\n contextMenu={\n <ScheduleContextMenu\n actions={{\n clear: isCompleted,\n delete: !isCompleted,\n edit: isScheduled,\n execute: isScheduled,\n }}\n onEdit={dialogScheduleEditShow}\n schedule={schedule}\n schemaType={schemaType}\n />\n }\n linkComponent={IntentLink}\n linkProps={{\n intent: 'edit',\n params: {\n type: schemaType.name,\n ...(publishedDocId ? {id: publishedDocId} : {}),\n },\n }}\n publishedDocumentId={publishedDocId}\n schedule={schedule}\n schemaType={schemaType}\n useElementQueries\n >\n {previewState.isLoading ? (\n <SanityDefaultPreview\n icon={schemaType?.icon as ComponentType}\n isPlaceholder={previewState.isLoading}\n layout=\"default\"\n />\n ) : (\n <Preview layout=\"default\" schemaType={schemaType} value={visibleDocument} />\n )}\n </PreviewWrapper>\n </>\n )\n}\n\nexport default ToolPreview\n","import {useMemo} from 'react'\n\nimport usePreviewState from '../../hooks/usePreviewState'\nimport {useScheduleSchemaType} from '../../hooks/useSchemaType'\nimport {type Schedule} from '../../types'\nimport {getScheduledDocument} from '../../utils/paneItemHelpers'\nimport DateWithTooltipElementQuery from './dateWithTooltip/DateWithTooltipElementQuery'\nimport DocumentPreview from './DocumentPreview'\nimport NoSchemaItem from './NoSchemaItem'\nimport ToolPreview from './ToolPreview'\n\ninterface Props {\n schedule: Schedule\n type: 'document' | 'tool'\n}\n\nexport const ScheduleItem = (props: Props) => {\n const {schedule, type} = props\n\n const firstDocument = getScheduledDocument(schedule)\n\n const schemaType = useScheduleSchemaType(schedule)\n const previewState = usePreviewState(firstDocument?.documentId, schemaType)\n\n const visibleDocument = previewState.draft || previewState.published\n const invalidDocument = !visibleDocument && !previewState.isLoading\n\n const preview = useMemo(() => {\n if (!schemaType || invalidDocument) {\n return <NoSchemaItem schedule={schedule} />\n }\n\n if (type === 'document') {\n return <DocumentPreview schedule={schedule} schemaType={schemaType} />\n }\n\n if (type === 'tool') {\n return <ToolPreview previewState={previewState} schedule={schedule} schemaType={schemaType} />\n }\n\n return null\n }, [invalidDocument, type, previewState, schedule, schemaType])\n\n return <DateWithTooltipElementQuery>{preview}</DateWithTooltipElementQuery>\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAM,6BAA6B,OAAO,YAAY,CAAC,CAAA,WAAA;;;6ICSjD,gBAAgB,UAAiB;gBAC/B,EAAC,OAAO,kBAAiB,OACzB,EAAC,aAAY,YAAY,aAAa,GACtC,EAAC,MAAK,eAAe,GAarBA;qDAAC,KAAA,oBAAA,SAAD;EAAO,OAAO;GAAC,SAAS;GA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