mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
1 line
No EOL
34 KiB
Text
1 line
No EOL
34 KiB
Text
{"version":3,"file":"files_reminders-init.mjs","sources":["../node_modules/@mdi/svg/svg/alarm-off.svg?raw","../build/frontend/apps/files_reminders/src/services/reminderService.ts","../build/frontend/apps/files_reminders/src/shared/utils.ts","../build/frontend/apps/files_reminders/src/files_actions/clearReminderAction.ts","../node_modules/@mdi/svg/svg/alarm.svg?raw","../build/frontend/apps/files_reminders/src/shared/logger.ts","../build/frontend/apps/files_reminders/src/components/SetCustomReminderModal.vue","../build/frontend/apps/files_reminders/src/services/customPicker.ts","../build/frontend/apps/files_reminders/src/files_actions/reminderStatusAction.ts","../node_modules/@mdi/svg/svg/calendar-clock.svg?raw","../build/frontend/apps/files_reminders/src/files_actions/setReminderMenuAction.ts","../build/frontend/apps/files_reminders/src/files_actions/setReminderCustomAction.ts","../build/frontend/apps/files_reminders/src/files_actions/setReminderSuggestionActions.ts","../build/frontend/apps/files_reminders/src/files-init.ts"],"sourcesContent":["export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" id=\\\"mdi-alarm-off\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M8,3.28L6.6,1.86L5.74,2.57L7.16,4M16.47,18.39C15.26,19.39 13.7,20 12,20A7,7 0 0,1 5,13C5,11.3 5.61,9.74 6.61,8.53M2.92,2.29L1.65,3.57L3,4.9L1.87,5.83L3.29,7.25L4.4,6.31L5.2,7.11C3.83,8.69 3,10.75 3,13A9,9 0 0,0 12,22C14.25,22 16.31,21.17 17.89,19.8L20.09,22L21.36,20.73L3.89,3.27L2.92,2.29M22,5.72L17.4,1.86L16.11,3.39L20.71,7.25L22,5.72M12,6A7,7 0 0,1 19,13C19,13.84 18.84,14.65 18.57,15.4L20.09,16.92C20.67,15.73 21,14.41 21,13A9,9 0 0,0 12,4C10.59,4 9.27,4.33 8.08,4.91L9.6,6.43C10.35,6.16 11.16,6 12,6Z\\\" /></svg>\"","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\n\ninterface Reminder {\n\tdueDate: null | Date\n}\n\n/**\n * Get the reminder for a specific file\n *\n * @param fileId - The file id to get the reminder for\n */\nexport async function getReminder(fileId: number): Promise<Reminder> {\n\tconst url = generateOcsUrl('/apps/files_reminders/api/v1/{fileId}', { fileId })\n\tconst response = await axios.get(url)\n\tconst dueDate = response.data.ocs.data.dueDate ? new Date(response.data.ocs.data.dueDate) : null\n\n\treturn {\n\t\tdueDate,\n\t}\n}\n\n/**\n * Set a reminder for a specific file\n *\n * @param fileId - The file id to set the reminder for\n * @param dueDate - The due date for the reminder\n */\nexport async function setReminder(fileId: number, dueDate: Date): Promise<[]> {\n\tconst url = generateOcsUrl('/apps/files_reminders/api/v1/{fileId}', { fileId })\n\n\tconst response = await axios.put(url, {\n\t\tdueDate: dueDate.toISOString(), // timezone of string is always UTC\n\t})\n\n\treturn response.data.ocs.data\n}\n\n/**\n * Clear the reminder for a specific file\n *\n * @param fileId - The file id to clear the reminder for\n */\nexport async function clearReminder(fileId: number): Promise<[]> {\n\tconst url = generateOcsUrl('/apps/files_reminders/api/v1/{fileId}', { fileId })\n\tconst response = await axios.delete(url)\n\n\treturn response.data.ocs.data\n}\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getCanonicalLocale } from '@nextcloud/l10n'\n\nexport enum DateTimePreset {\n\tLaterToday = 'later-today',\n\tTomorrow = 'tomorrow',\n\tThisWeekend = 'this-weekend',\n\tNextWeek = 'next-week',\n}\n\n/**\n *\n */\nfunction getFirstWorkdayOfWeek() {\n\tconst now = new Date()\n\tnow.setHours(0, 0, 0, 0)\n\tnow.setDate(now.getDate() - now.getDay() + 1)\n\treturn new Date(now)\n}\n\n/**\n * @param date - The date to get the week number for\n */\nfunction getWeek(date: Date) {\n\tconst dateClone = new Date(date)\n\tdateClone.setHours(0, 0, 0, 0)\n\tconst firstDayOfYear = new Date(date.getFullYear(), 0, 1, 0, 0, 0, 0)\n\tconst daysFromFirstDay = (date.getTime() - firstDayOfYear.getTime()) / 86400000\n\treturn Math.ceil((daysFromFirstDay + firstDayOfYear.getDay() + 1) / 7)\n}\n\n/**\n * @param a - First date\n * @param b - Second date\n */\nfunction isSameWeek(a: Date, b: Date) {\n\treturn getWeek(a) === getWeek(b)\n\t\t&& a.getFullYear() === b.getFullYear()\n}\n\n/**\n * @param a - First date\n * @param b - Second date\n */\nfunction isSameDate(a: Date, b: Date) {\n\treturn a.getDate() === b.getDate()\n\t\t&& a.getMonth() === b.getMonth()\n\t\t&& a.getFullYear() === b.getFullYear()\n}\n\n/**\n * @param dateTime - The preset to get the date for\n */\nexport function getDateTime(dateTime: DateTimePreset): null | Date {\n\tconst matchPreset: Record<DateTimePreset, () => null | Date> = {\n\t\t[DateTimePreset.LaterToday]: () => {\n\t\t\tconst now = new Date()\n\t\t\tconst evening = new Date()\n\t\t\tevening.setHours(18, 0, 0, 0)\n\t\t\tconst cutoff = new Date()\n\t\t\tcutoff.setHours(17, 0, 0, 0)\n\t\t\tif (now >= cutoff) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn evening\n\t\t},\n\n\t\t[DateTimePreset.Tomorrow]: () => {\n\t\t\tconst now = new Date()\n\t\t\tconst day = new Date()\n\t\t\tday.setDate(now.getDate() + 1)\n\t\t\tday.setHours(8, 0, 0, 0)\n\t\t\treturn day\n\t\t},\n\n\t\t[DateTimePreset.ThisWeekend]: () => {\n\t\t\tconst today = new Date()\n\t\t\tif (\n\t\t\t\t[\n\t\t\t\t\t5, // Friday\n\t\t\t\t\t6, // Saturday\n\t\t\t\t\t0, // Sunday\n\t\t\t\t].includes(today.getDay())\n\t\t\t) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst saturday = new Date()\n\t\t\tconst firstWorkdayOfWeek = getFirstWorkdayOfWeek()\n\t\t\tsaturday.setDate(firstWorkdayOfWeek.getDate() + 5)\n\t\t\tsaturday.setHours(8, 0, 0, 0)\n\t\t\treturn saturday\n\t\t},\n\n\t\t[DateTimePreset.NextWeek]: () => {\n\t\t\tconst today = new Date()\n\t\t\tif (today.getDay() === 0) { // Sunday\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst workday = new Date()\n\t\t\tconst firstWorkdayOfWeek = getFirstWorkdayOfWeek()\n\t\t\tworkday.setDate(firstWorkdayOfWeek.getDate() + 7)\n\t\t\tworkday.setHours(8, 0, 0, 0)\n\t\t\treturn workday\n\t\t},\n\t}\n\n\treturn matchPreset[dateTime]()\n}\n\n/**\n *\n */\nexport function getInitialCustomDueDate(): Date {\n\tconst now = new Date()\n\tconst dueDate = new Date()\n\tdueDate.setHours(now.getHours() + 2, 0, 0, 0)\n\treturn dueDate\n}\n\n/**\n * @param dueDate - The date to format as a string\n */\nexport function getDateString(dueDate: Date): string {\n\tlet formatOptions: Intl.DateTimeFormatOptions = {\n\t\thour: 'numeric',\n\t\tminute: '2-digit',\n\t}\n\n\tconst today = new Date()\n\n\tif (!isSameDate(dueDate, today)) {\n\t\tformatOptions = {\n\t\t\t...formatOptions,\n\t\t\tweekday: 'short',\n\t\t}\n\t}\n\n\tif (!isSameWeek(dueDate, today)) {\n\t\tformatOptions = {\n\t\t\t...formatOptions,\n\t\t\tmonth: 'short',\n\t\t\tday: 'numeric',\n\t\t}\n\t}\n\n\tif (dueDate.getFullYear() !== today.getFullYear()) {\n\t\tformatOptions = {\n\t\t\t...formatOptions,\n\t\t\tyear: 'numeric',\n\t\t}\n\t}\n\n\treturn dueDate.toLocaleString(\n\t\tgetCanonicalLocale(),\n\t\tformatOptions,\n\t)\n}\n\n/**\n * @param dueDate - The date to format as a string\n */\nexport function getVerboseDateString(dueDate: Date): string {\n\tlet formatOptions: Intl.DateTimeFormatOptions = {\n\t\tmonth: 'long',\n\t\tday: 'numeric',\n\t\tweekday: 'long',\n\t\thour: 'numeric',\n\t\tminute: '2-digit',\n\t}\n\n\tconst today = new Date()\n\n\tif (dueDate.getFullYear() !== today.getFullYear()) {\n\t\tformatOptions = {\n\t\t\t...formatOptions,\n\t\t\tyear: 'numeric',\n\t\t}\n\t}\n\n\treturn dueDate.toLocaleString(\n\t\tgetCanonicalLocale(),\n\t\tformatOptions,\n\t)\n}\n","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport AlarmOffSvg from '@mdi/svg/svg/alarm-off.svg?raw'\nimport { emit } from '@nextcloud/event-bus'\nimport { FileAction } from '@nextcloud/files'\nimport { t } from '@nextcloud/l10n'\nimport { clearReminder } from '../services/reminderService.ts'\nimport { getVerboseDateString } from '../shared/utils.ts'\n\nexport const action = new FileAction({\n\tid: 'clear-reminder',\n\n\tdisplayName: () => t('files_reminders', 'Clear reminder'),\n\n\ttitle: ({ nodes }) => {\n\t\tconst node = nodes.at(0)!\n\t\tconst dueDate = new Date(node.attributes['reminder-due-date'])\n\t\treturn `${t('files_reminders', 'Clear reminder')} – ${getVerboseDateString(dueDate)}`\n\t},\n\n\ticonSvgInline: () => AlarmOffSvg,\n\n\tenabled: ({ nodes }) => {\n\t\t// Only allow on a single node\n\t\tif (nodes.length !== 1) {\n\t\t\treturn false\n\t\t}\n\t\tconst node = nodes.at(0)!\n\t\tconst dueDate = node.attributes['reminder-due-date']\n\t\treturn Boolean(dueDate)\n\t},\n\n\tasync exec({ nodes }) {\n\t\tconst node = nodes.at(0)!\n\t\tif (node.fileid) {\n\t\t\ttry {\n\t\t\t\tawait clearReminder(node.fileid)\n\t\t\t\tnode.attributes['reminder-due-date'] = ''\n\t\t\t\temit('files:node:updated', node)\n\t\t\t\treturn true\n\t\t\t} catch {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\treturn null\n\t},\n\n\torder: 19,\n})\n","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" id=\\\"mdi-alarm\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A9,9 0 0,0 21,13A9,9 0 0,0 12,4M12.5,8H11V14L15.75,16.85L16.5,15.62L12.5,13.25V8M7.88,3.39L6.6,1.86L2,5.71L3.29,7.24L7.88,3.39M22,5.72L17.4,1.86L16.11,3.39L20.71,7.25L22,5.72Z\\\" /></svg>\"","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport const logger = getLoggerBuilder()\n\t.setApp('files_reminders')\n\t.detectUser()\n\t.build()\n","<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { INode } from '@nextcloud/files'\n\nimport { showError, showSuccess } from '@nextcloud/dialogs'\nimport { emit as emitEventBus } from '@nextcloud/event-bus'\nimport { t } from '@nextcloud/l10n'\nimport { onBeforeMount, onMounted, ref } from 'vue'\nimport NcButton from '@nextcloud/vue/components/NcButton'\nimport NcDateTime from '@nextcloud/vue/components/NcDateTime'\nimport NcDateTimePickerNative from '@nextcloud/vue/components/NcDateTimePickerNative'\nimport NcDialog from '@nextcloud/vue/components/NcDialog'\nimport NcNoteCard from '@nextcloud/vue/components/NcNoteCard'\nimport { clearReminder, setReminder } from '../services/reminderService.ts'\nimport { logger } from '../shared/logger.ts'\nimport { getInitialCustomDueDate } from '../shared/utils.ts'\n\nconst props = defineProps<{\n\tnode: INode\n}>()\n\nconst emit = defineEmits<{\n\tclose: [void]\n}>()\n\nconst hasDueDate = ref(false)\nconst opened = ref(false)\nconst isValid = ref(true)\nconst customDueDate = ref<Date>()\nconst nowDate = ref(new Date())\n\nonBeforeMount(() => {\n\tconst dueDate = props.node.attributes['reminder-due-date']\n\t\t? new Date(props.node.attributes['reminder-due-date'])\n\t\t: undefined\n\n\thasDueDate.value = Boolean(dueDate)\n\tisValid.value = true\n\topened.value = true\n\tcustomDueDate.value = dueDate ?? getInitialCustomDueDate()\n\tnowDate.value = new Date()\n})\n\nonMounted(() => {\n\tconst input = document.getElementById('set-custom-reminder') as HTMLInputElement\n\tinput.focus()\n\tif (!hasDueDate.value) {\n\t\tinput.showPicker()\n\t}\n})\n\n/**\n * Set the custom reminder\n */\nasync function setCustom(): Promise<void> {\n\t// Handle input cleared or invalid date\n\tif (!(customDueDate.value instanceof Date) || isNaN(customDueDate.value.getTime())) {\n\t\tshowError(t('files_reminders', 'Please choose a valid date & time'))\n\t\treturn\n\t}\n\n\ttry {\n\t\tawait setReminder(props.node.fileid!, customDueDate.value)\n\t\tconst node = props.node.clone()\n\t\tnode.attributes['reminder-due-date'] = customDueDate.value.toISOString()\n\t\temitEventBus('files:node:updated', node)\n\t\tshowSuccess(t('files_reminders', 'Reminder set for \"{fileName}\"', { fileName: props.node.displayname }))\n\t\tonClose()\n\t} catch (error) {\n\t\tlogger.error('Failed to set reminder', { error })\n\t\tshowError(t('files_reminders', 'Failed to set reminder'))\n\t}\n}\n\n/**\n * Clear the reminder\n */\nasync function clear(): Promise<void> {\n\ttry {\n\t\tawait clearReminder(props.node.fileid!)\n\t\tconst node = props.node.clone()\n\t\tnode.attributes['reminder-due-date'] = ''\n\t\temitEventBus('files:node:updated', node)\n\t\tshowSuccess(t('files_reminders', 'Reminder cleared for \"{fileName}\"', { fileName: props.node.displayname }))\n\t\tonClose()\n\t} catch (error) {\n\t\tlogger.error('Failed to clear reminder', { error })\n\t\tshowError(t('files_reminders', 'Failed to clear reminder'))\n\t}\n}\n\n/**\n * Close the modal\n */\nfunction onClose(): void {\n\topened.value = false\n\temit('close')\n}\n\n/**\n * Validate the input on change\n */\nfunction onInput(): void {\n\tconst input = document.getElementById('set-custom-reminder') as HTMLInputElement\n\tisValid.value = input.checkValidity()\n}\n</script>\n\n<template>\n\t<NcDialog\n\t\tv-if=\"opened\"\n\t\t:name=\"t('files_reminders', `Set reminder for '{fileName}'`, { fileName: node.displayname })\"\n\t\toutTransition\n\t\tsize=\"small\"\n\t\tcloseOnClickOutside\n\t\t@closing=\"onClose\">\n\t\t<form\n\t\t\tid=\"set-custom-reminder-form\"\n\t\t\tclass=\"custom-reminder-modal\"\n\t\t\t@submit.prevent=\"setCustom\">\n\t\t\t<NcDateTimePickerNative\n\t\t\t\tid=\"set-custom-reminder\"\n\t\t\t\tv-model=\"customDueDate\"\n\t\t\t\t:label=\"t('files_reminders', 'Reminder at custom date & time')\"\n\t\t\t\t:min=\"nowDate\"\n\t\t\t\t:required=\"true\"\n\t\t\t\ttype=\"datetime-local\"\n\t\t\t\t@input=\"onInput\" />\n\n\t\t\t<NcNoteCard v-if=\"isValid && customDueDate\" type=\"info\">\n\t\t\t\t{{ t('files_reminders', 'We will remind you of this file') }}\n\t\t\t\t<NcDateTime :timestamp=\"customDueDate\" />\n\t\t\t</NcNoteCard>\n\n\t\t\t<NcNoteCard v-else type=\"error\">\n\t\t\t\t{{ t('files_reminders', 'Please choose a valid date & time') }}\n\t\t\t</NcNoteCard>\n\t\t</form>\n\t\t<template #actions>\n\t\t\t<!-- Cancel pick -->\n\t\t\t<NcButton variant=\"tertiary\" @click=\"onClose\">\n\t\t\t\t{{ t('files_reminders', 'Cancel') }}\n\t\t\t</NcButton>\n\n\t\t\t<!-- Clear reminder -->\n\t\t\t<NcButton v-if=\"hasDueDate\" @click=\"clear\">\n\t\t\t\t{{ t('files_reminders', 'Clear reminder') }}\n\t\t\t</NcButton>\n\n\t\t\t<!-- Set reminder -->\n\t\t\t<NcButton\n\t\t\t\t:disabled=\"!isValid\"\n\t\t\t\tvariant=\"primary\"\n\t\t\t\tform=\"set-custom-reminder-form\"\n\t\t\t\ttype=\"submit\">\n\t\t\t\t{{ t('files_reminders', 'Set reminder') }}\n\t\t\t</NcButton>\n\t\t</template>\n\t</NcDialog>\n</template>\n\n<style lang=\"scss\" scoped>\n.custom-reminder-modal {\n\tmargin: 0 12px;\n}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { INode } from '@nextcloud/files'\n\nimport { spawnDialog } from '@nextcloud/vue'\nimport SetCustomReminderModal from '../components/SetCustomReminderModal.vue'\n\n/**\n * @param node - The file or folder node to set the custom reminder for\n */\nexport async function pickCustomDate(node: INode): Promise<void> {\n\tawait spawnDialog(SetCustomReminderModal, {\n\t\tnode,\n\t})\n}\n","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport AlarmSvg from '@mdi/svg/svg/alarm.svg?raw'\nimport { FileAction } from '@nextcloud/files'\nimport { t } from '@nextcloud/l10n'\nimport { pickCustomDate } from '../services/customPicker.ts'\nimport { getVerboseDateString } from '../shared/utils.ts'\n\nexport const action = new FileAction({\n\tid: 'reminder-status',\n\n\tinline: () => true,\n\n\tdisplayName: () => '',\n\n\ttitle: ({ nodes }) => {\n\t\tconst node = nodes.at(0)!\n\t\tconst dueDate = new Date(node.attributes['reminder-due-date'])\n\t\treturn `${t('files_reminders', 'Reminder set')} – ${getVerboseDateString(dueDate)}`\n\t},\n\n\ticonSvgInline: () => AlarmSvg,\n\n\tenabled: ({ nodes }) => {\n\t\t// Only allow on a single node\n\t\tif (nodes.length !== 1) {\n\t\t\treturn false\n\t\t}\n\n\t\tconst node = nodes.at(0)!\n\t\tconst dueDate = node.attributes['reminder-due-date']\n\t\treturn Boolean(dueDate)\n\t},\n\n\tasync exec({ nodes }) {\n\t\tconst node = nodes.at(0)!\n\t\tawait pickCustomDate(node)\n\t\treturn null\n\t},\n\n\torder: -15,\n})\n","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" id=\\\"mdi-calendar-clock\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M15,13H16.5V15.82L18.94,17.23L18.19,18.53L15,16.69V13M19,8H5V19H9.67C9.24,18.09 9,17.07 9,16A7,7 0 0,1 16,9C17.07,9 18.09,9.24 19,9.67V8M5,21C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1H18V3H19A2,2 0 0,1 21,5V11.1C22.24,12.36 23,14.09 23,16A7,7 0 0,1 16,23C14.09,23 12.36,22.24 11.1,21H5M16,11.15A4.85,4.85 0 0,0 11.15,16C11.15,18.68 13.32,20.85 16,20.85A4.85,4.85 0 0,0 20.85,16C20.85,13.32 18.68,11.15 16,11.15Z\\\" /></svg>\"","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport AlarmSvg from '@mdi/svg/svg/alarm.svg?raw'\nimport { FileAction } from '@nextcloud/files'\nimport { translate as t } from '@nextcloud/l10n'\n\nexport const SET_REMINDER_MENU_ID = 'set-reminder-menu'\n\nexport const action = new FileAction({\n\tid: SET_REMINDER_MENU_ID,\n\tdisplayName: () => t('files_reminders', 'Set reminder'),\n\ticonSvgInline: () => AlarmSvg,\n\n\tenabled: ({ nodes, view }) => {\n\t\tif (view.id === 'trashbin') {\n\t\t\treturn false\n\t\t}\n\t\t// Only allow on a single INode\n\t\tif (nodes.length !== 1) {\n\t\t\treturn false\n\t\t}\n\t\tconst node = nodes.at(0)!\n\t\tconst dueDate = node.attributes['reminder-due-date']\n\t\treturn dueDate !== undefined\n\t},\n\n\tasync exec() {\n\t\treturn null\n\t},\n\n\torder: 20,\n})\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport CalendarClockSvg from '@mdi/svg/svg/calendar-clock.svg?raw'\nimport { FileAction } from '@nextcloud/files'\nimport { t } from '@nextcloud/l10n'\nimport { pickCustomDate } from '../services/customPicker.ts'\nimport { SET_REMINDER_MENU_ID } from './setReminderMenuAction.ts'\n\nexport const action = new FileAction({\n\tid: 'set-reminder-custom',\n\tdisplayName: () => t('files_reminders', 'Custom reminder'),\n\ttitle: () => t('files_reminders', 'Reminder at custom date & time'),\n\ticonSvgInline: () => CalendarClockSvg,\n\n\tenabled: ({ nodes, view }) => {\n\t\tif (view.id === 'trashbin') {\n\t\t\treturn false\n\t\t}\n\t\t// Only allow on a single INode\n\t\tif (nodes.length !== 1) {\n\t\t\treturn false\n\t\t}\n\t\tconst node = nodes.at(0)!\n\t\tconst dueDate = node.attributes['reminder-due-date']\n\t\treturn dueDate !== undefined\n\t},\n\n\tparent: SET_REMINDER_MENU_ID,\n\n\tasync exec({ nodes }) {\n\t\tconst node = nodes.at(0)!\n\t\tpickCustomDate(node)\n\t\treturn null\n\t},\n\n\t// After presets\n\torder: 22,\n})\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { showError, showSuccess } from '@nextcloud/dialogs'\nimport { emit } from '@nextcloud/event-bus'\nimport { FileAction } from '@nextcloud/files'\nimport { t } from '@nextcloud/l10n'\nimport { setReminder } from '../services/reminderService.ts'\nimport { logger } from '../shared/logger.ts'\nimport { DateTimePreset, getDateString, getDateTime, getVerboseDateString } from '../shared/utils.ts'\nimport { SET_REMINDER_MENU_ID } from './setReminderMenuAction.ts'\n\nimport './setReminderSuggestionActions.scss'\n\ninterface ReminderOption {\n\tdateTimePreset: DateTimePreset\n\tlabel: string\n\tariaLabel: string\n\tdateString?: string\n\tverboseDateString?: string\n\taction?: () => Promise<void>\n}\n\nconst laterToday: ReminderOption = {\n\tdateTimePreset: DateTimePreset.LaterToday,\n\tlabel: t('files_reminders', 'Later today'),\n\tariaLabel: t('files_reminders', 'Set reminder for later today'),\n\tdateString: '',\n\tverboseDateString: '',\n}\n\nconst tomorrow: ReminderOption = {\n\tdateTimePreset: DateTimePreset.Tomorrow,\n\tlabel: t('files_reminders', 'Tomorrow'),\n\tariaLabel: t('files_reminders', 'Set reminder for tomorrow'),\n\tdateString: '',\n\tverboseDateString: '',\n}\n\nconst thisWeekend: ReminderOption = {\n\tdateTimePreset: DateTimePreset.ThisWeekend,\n\tlabel: t('files_reminders', 'This weekend'),\n\tariaLabel: t('files_reminders', 'Set reminder for this weekend'),\n\tdateString: '',\n\tverboseDateString: '',\n}\n\nconst nextWeek: ReminderOption = {\n\tdateTimePreset: DateTimePreset.NextWeek,\n\tlabel: t('files_reminders', 'Next week'),\n\tariaLabel: t('files_reminders', 'Set reminder for next week'),\n\tdateString: '',\n\tverboseDateString: '',\n}\n\n/**\n * Generate a file action for the given option\n *\n * @param option The option to generate the action for\n * @return The file action or null if the option should not be shown\n */\nfunction generateFileAction(option: ReminderOption): FileAction | null {\n\treturn new FileAction({\n\t\tid: `set-reminder-${option.dateTimePreset}`,\n\t\tdisplayName: () => `${option.label} – ${option.dateString}`,\n\t\ttitle: () => `${option.ariaLabel} – ${option.verboseDateString}`,\n\n\t\t// Empty svg to hide the icon\n\t\ticonSvgInline: () => '<svg></svg>',\n\n\t\tenabled: ({ nodes, view }) => {\n\t\t\tif (view.id === 'trashbin') {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\t// Only allow on a single INode\n\t\t\tif (nodes.length !== 1) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tconst node = nodes.at(0)!\n\t\t\tconst dueDate = node.attributes['reminder-due-date']\n\t\t\treturn dueDate !== undefined && Boolean(getDateTime(option.dateTimePreset))\n\t\t},\n\n\t\tparent: SET_REMINDER_MENU_ID,\n\n\t\tasync exec({ nodes }) {\n\t\t\t// Can't really happen, but just in case™\n\t\t\tconst node = nodes.at(0)!\n\t\t\tif (!node.fileid) {\n\t\t\t\tlogger.error('Failed to set reminder, missing file id')\n\t\t\t\tshowError(t('files_reminders', 'Failed to set reminder'))\n\t\t\t\treturn null\n\t\t\t}\n\n\t\t\t// Set the reminder\n\t\t\ttry {\n\t\t\t\tconst dateTime = getDateTime(option.dateTimePreset)!\n\t\t\t\tawait setReminder(node.fileid, dateTime)\n\t\t\t\tnode.attributes['reminder-due-date'] = dateTime.toISOString()\n\t\t\t\temit('files:node:updated', node)\n\t\t\t\tshowSuccess(t('files_reminders', 'Reminder set for \"{fileName}\"', { fileName: node.basename }))\n\t\t\t} catch (error) {\n\t\t\t\tlogger.error('Failed to set reminder', { error })\n\t\t\t\tshowError(t('files_reminders', 'Failed to set reminder'))\n\t\t\t}\n\t\t\t// Silent success as we display our own notification\n\t\t\treturn null\n\t\t},\n\n\t\torder: 21,\n\t})\n}\n\n[laterToday, tomorrow, thisWeekend, nextWeek].forEach((option) => {\n\t// Generate the initial date string\n\tconst dateTime = getDateTime(option.dateTimePreset)\n\tif (!dateTime) {\n\t\treturn\n\t}\n\toption.dateString = getDateString(dateTime)\n\toption.verboseDateString = getVerboseDateString(dateTime)\n\n\t// Update the date string every 30 minutes\n\tsetInterval(() => {\n\t\tconst dateTime = getDateTime(option.dateTimePreset)\n\t\tif (!dateTime) {\n\t\t\treturn\n\t\t}\n\n\t\t// update the submenu remind options strings\n\t\toption.dateString = getDateString(dateTime)\n\t\toption.verboseDateString = getVerboseDateString(dateTime)\n\t}, 1000 * 30 * 60)\n})\n\n// Generate the default preset actions\nexport const actions = [laterToday, tomorrow, thisWeekend, nextWeek]\n\t.map(generateFileAction) as FileAction[]\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { registerFileAction } from '@nextcloud/files'\nimport { registerDavProperty } from '@nextcloud/files/dav'\nimport { action as clearAction } from './files_actions/clearReminderAction.ts'\nimport { action as statusAction } from './files_actions/reminderStatusAction.ts'\nimport { action as customAction } from './files_actions/setReminderCustomAction.ts'\nimport { action as menuAction } from './files_actions/setReminderMenuAction.ts'\nimport { actions as suggestionActions } from './files_actions/setReminderSuggestionActions.ts'\n\nregisterDavProperty('nc:reminder-due-date', { nc: 'http://nextcloud.org/ns' })\n\nregisterFileAction(statusAction)\nregisterFileAction(clearAction)\nregisterFileAction(menuAction)\nregisterFileAction(customAction)\nsuggestionActions.forEach((action) => registerFileAction(action))\n"],"names":["AlarmOffSvg","setReminder","fileId","dueDate","url","generateOcsUrl","axios","clearReminder","DateTimePreset","getFirstWorkdayOfWeek","now","getWeek","date","firstDayOfYear","daysFromFirstDay","isSameWeek","a","b","isSameDate","getDateTime","dateTime","evening","cutoff","day","today","saturday","firstWorkdayOfWeek","workday","getInitialCustomDueDate","getDateString","formatOptions","getCanonicalLocale","getVerboseDateString","action","FileAction","t","nodes","node","emit","AlarmSvg","logger","getLoggerBuilder","props","__props","__emit","hasDueDate","ref","opened","isValid","customDueDate","nowDate","onBeforeMount","onMounted","input","setCustom","showError","emitEventBus","showSuccess","onClose","error","clear","onInput","_createBlock","_unref","NcDialog","_createVNode","NcButton","_createElementVNode","NcDateTimePickerNative","$event","NcNoteCard","_createTextVNode","_toDisplayString","NcDateTime","pickCustomDate","spawnDialog","SetCustomReminderModal","CalendarClockSvg","SET_REMINDER_MENU_ID","view","laterToday","tomorrow","thisWeekend","nextWeek","generateFileAction","option","actions","registerDavProperty","registerFileAction","statusAction","clearAction","menuAction","customAction","suggestionActions"],"mappings":"s/DAAA,MAAAA,GAAe,+lBCiCf,eAAsBC,EAAYC,EAAgBC,EAA4B,CAC7E,MAAMC,EAAMC,EAAe,wCAAyC,CAAE,OAAAH,EAAQ,EAM9E,OAJiB,MAAMI,EAAM,IAAIF,EAAK,CACrC,QAASD,EAAQ,YAAA,CAAY,CAC7B,GAEe,KAAK,IAAI,IAC1B,CAOA,eAAsBI,EAAcL,EAA6B,CAChE,MAAME,EAAMC,EAAe,wCAAyC,CAAE,O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