{"bugs":{"url":"https://github.com/sanity-io/sanity-plugin-scheduled-publishing/issues"},"dist":{"shasum":"88be3233f56edae0086dc770ce8ceb624598f69a","tarball":"https://registry.npmjs.org/@sanity/scheduled-publishing/-/scheduled-publishing-0.1.14.tgz","fileCount":15,"integrity":"sha512-EIglRLXnGobbRUDz5N3VhwAH09JCcsMLV0svBRr2Ap77O3YBvj3n3q4hFPB+ljXJgVg0yIGYBQhIhxPvspvrqw==","signatures":[{"sig":"MEUCIQCsWT7azy8teEsDaODbdl2EzFTm+VaqR0Xqx58QmkbDYwIgYUdSSPlkDUgXtydQRvvplilrZGNrC6XqMMC7qRCQ4xw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":332516,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfTIDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrKfA/+LROXO89kAJR4pHnqN9Y2Zgl+LzSL/DXQ8SJUbPyDiV6niBUE\r\nEXRMyJhbOsrsWXgq7jfiLj1QyJ3ZX2Bhu8KeBeJ69tXbqEQTVRzWzCvrIYdy\r\n3+HRNfhu9SGZ3TGlo8JAhUnPn0v7fwJmxRlH9+dtPzRYQgenHwsoyrZJtfTn\r\nJ6WPSrv6eItm3NP/vZn5AM8nF7H5Qfx+02iTx4QqSsupArTFDviGKDsv1Ai8\r\nPTHptKwZAeksb3Me4BXlZLPg43bJvZCuEbJBLQ96tVtQszfiAdkkKp+e6zhG\r\nX9LOiq8fWlXfwLM+3f8J6q8EFOqE62klqUhGABa7/5o8+CYhWEAKuW6wnFx8\r\nD48qvLgjhZubp2/D2TpTkIyj1f1YRu72Sc1QU/lQqhixwxBsK2DLrjCC5t3y\r\n1yPZKeTd9kpmdkZwzR+Jwe/c1F1s67nFQx8KAZadfwKaoVeU1uLTjrZh0E6r\r\n17ujbIngD8ALuGM8LoYIvFcjzjpgeBunVcIIj75BKiE4wGrnR5FOu4KLDRa0\r\nV3YuWAw6OAwBmSg0XQX1EGWBkzAnkuclOh3yZpCKwABbCCKoOEguilB8a2b5\r\nmz/VP3z/I4igOs7BDA8ZDiMvon0i0EHZkZubL4XMrKOK3atragHuVOw0PKvZ\r\niOuyjdcReNWu5QNL+XK8JAwhsC0noSzWo+0=\r\n=kEF4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","name":"@sanity/scheduled-publishing","author":{"name":"Sanity.io","email":"hello@sanity.io"},"readme":"# Scheduled Publishing plugin for Sanity.io\n\n> This is a **Sanity Studio v2** plugin.\n> For the v3 version, please refer to the [v3-branch](https://github.com/sanity-io/sanity-plugin-scheduled-publishing).\n \nSchedule your content for future publication and organise upcoming releases – no custom tasks or serverless functions required!\n\n> This plugin uses Sanity's [Scheduling API][scheduling-api] which is available to customers on Team or higher plans. Please visit our [Scheduled Publishing][scheduled-publishing] blog post for more information.\n\n![Scheduled Publishing tool view](https://user-images.githubusercontent.com/209129/159557062-6d3ea6d7-941e-472a-a7d4-7e229bf81780.png)\n\n![Scheduled Publishing document view](https://user-images.githubusercontent.com/209129/159463180-703d557a-cfe6-4ff0-970f-b33eea048e87.png)\n\n## Features\n\n### Create and edit schedules directly from the document editor\n\n- Create and edit schedules for the document you're working on\n- See current schedule status and potential validation issues\n\n### View all your schedules with our dedicated tool\n\n- Filter all schedules by status or use the calendar to browse by date\n- Edit, delete, and immediately publish schedules\n- Automatically validate upcoming schedules, and identify issues before they're published\n- Easily identify who created a schedule\n\n### View schedule dates in any remote time zone\n\n<img src=\"https://user-images.githubusercontent.com/209129/159458620-ce6b8112-c19a-4c24-a2d5-f79798d1e6f7.png\" width=\"600\" />\n\n- Change the time zone you want to preview schedules in by clicking the 🌎 **Time Zone** button when visible. Great when you need to co-ordinate with a global team or want to time publication to specific regions.\n- Easily select time zones by city, time zone abbreviation or name search.\n- Selected time zones are automatically stored in your local storage for future use.\n\n## Getting started\n\nIn your Sanity studio folder:\n\n```sh\nyarn add @sanity/scheduled-publishing@studio-v2\n```\n\nNext, add `\"@sanity/scheduled-publishing\"` to `sanity.json` plugins array:\n```json\n\"plugins\": [\n  \"@sanity/scheduled-publishing\"\n]\n```\n\nThis will automatically:\n\n- Add a Schedule [document action][document-actions] to _all document types_\n- Display a Scheduled [document badge][document-badges] to _all document types_\n- Add the dedicated Schedules _tool_ in your navigation bar\n\nPlease see [Custom setup](#custom-setup) for more fine grained control on limiting schedule buttons to specific document types and working with existing custom document actions or badges.\n\n### Custom setup\n\nThis plugin also exports both the **Schedule document action** and **Scheduled badge** which you can import and compose as you see fit.\n\n#### Manually adding the Schedule document action\n\nThis example assumes [you've customised your own document actions][document-actions] and would like to only show the Schedule button on `movie` documents only.\n\nThe Schedule document action allows users to both create and edit existing schedules directly from the form editor.\n\n```js\nimport {ScheduleAction} from '@sanity/scheduled-publishing'\nimport defaultResolve from 'part:@sanity/base/document-actions'\n\n/*\n * Please note that this will only alter the visibility of the button in the studio.\n * Users with document publish permissions will be able to create schedules directly\n * via the Scheduled Publishing API.\n */\n\nexport default function resolveDocumentActions(props) {\n  // Default document actions\n  const defaultActions = defaultResolve(props)\n\n  // Show the schedule button on `movie` documents only\n  if (props.type === 'movie') {\n    // Add our schedule action AFTER the first action (publish, by default)\n    // to ensure it sits at the top of our document context menu.\n    return [...defaultActions.slice(0, 1), ScheduleAction, ...defaultActions.slice(1)]\n  }\n\n  // Finally, return default actions for all other document types\n  return defaultActions\n}\n```\n\n#### Manually adding the Scheduled document badge\n\nThis example assumes [you've customised your own document badges][document-badges] and would like to only show the Scheduled badge on `movie` documents only.\n\nThe Scheduled document badge displays whether the current document is scheduled and when it will be published if so.\n\n```js\nimport {ScheduledBadge} from '@sanity/scheduled-publishing'\nimport defaultResolve from 'part:@sanity/base/document-badges'\n\nexport default function resolveDocumentBadges(props) {\n  // Default document badges\n  const defaultBadges = defaultResolve(props)\n\n  // Show the scheduled badge on `movie` documents only\n  if (props.type === 'movie') {\n    // Add our scheduled badge after any defaults\n    return [...defaultBadges, ScheduledBadge]\n  }\n\n  // Return default badges for all other document types\n  return defaultBadges\n}\n```\n\n## FAQ\n\n<details>\n<summary>What's the relationship between Schedules and my dataset?</summary>\n\nSchedules sit adjacent to your dataset and can be managed using the [Scheduling API][scheduling-api] (which this plugin does for you).\n\nSchedules are a unique resource and are linked to, but do not exist within your Sanity project and dataset. It's important to understand the following behavior:\n\n- As schedules are not contained within a project’s dataset, you cannot query them via GROQ or GraphQL.\n- Deleting a dataset will immediately delete all schedules.\n- Deleting a project will immediately delete all schedules.\n- `sanity dataset export` will not include schedules and `sanity dataset import` does not support importing schedules.\n- Server-side copying of datasets does not include schedules.\n- When a project is disabled or blocked, all scheduled publishes will invariably fail as mutations will not be allowed on the dataset.\n\nMore information can be found on the [Scheduling API][scheduling-api] page.\n\n</details>\n\n<details>\n<summary>Where is time zone data pulled from?</summary>\n\n- Time zones and their corresponding cities, regions and daylight savings offsets are directly sourced from the [@vvo/dztb][@vvo/dztb] library, which is automatically updated with data from [geonames.org](https://www.geonames.org/).\n- Latest time zone + region data from [@vvo/dztb][@vvo/dztb] is pulled in when first installing this plugin.\n- In the event you need to bring in upstream time zone and region data, run:\n\n  ```sh\n  # Yarn\n  yarn upgrade @sanity/scheduled-publishing\n\n  # NPM\n  npm update @vvo/tzdb --legacy-peer-deps\n  ```\n\n</details>\n\n<details>\n<summary>Will scheduled documents with validation errors publish?</summary>\n\n- **Yes.** Documents scheduled to publish in future will do so, even if they contain validation errors. This also applies to scheduled documents that you manually opt to publish immediately via the tool.\n\n</details>\n\n## License\n\nThis repository is published under the [MIT](LICENSE) license.\n\n[document-actions]: https://www.sanity.io/docs/document-actions\n[document-badges]: https://www.sanity.io/docs/custom-document-badges\n[scheduled-publishing]: https://www.sanity.io/blog/publishing-scheduled\n[scheduling-api]: https://www.sanity.io/docs/scheduling-api\n[@vvo/dztb]: https://github.com/vvo/tzdb\n\n## Developing this plugin\n\n### Release new version\nRun [\"CI & Release\" workflow](https://github.com/sanity-io/sanity-plugin-scheduled-publishing/actions).\nMake sure to select main or v3 branch and check \"Release new version\".\n\nSemantic release will only release on configured branches, so it is safe to run release on any branch.\n","gitHead":"4868f6ac4613ce38b0c3709f4b9a6e46c88b6aea","license":"MIT","scripts":{"dev":"npm run watch","lint":"eslint .","build":"rollup -c rollup.config.js","clean":"rimraf lib","watch":"rollup -c rollup.config.js --watch","format":"prettier src -w","verify":"tsc --noEmit && npm run lint","prepare":"husky install","prebuild":"npm run clean","prepublishOnly":"npm run build"},"_npmUser":{"name":"stipsan","email":"stipsan@gmail.com"},"homepage":"https://github.com/sanity-io/sanity-plugin-scheduled-publishing#readme","keywords":["sanity","plugin"],"repository":{"url":"git+ssh://git@github.com/sanity-io/sanity-plugin-scheduled-publishing.git","type":"git"},"_npmVersion":"8.18.0","description":"> This is a **Sanity Studio v2** plugin. > For the v3 version, please refer to the [v3-branch](https://github.com/sanity-io/sanity-plugin-scheduled-publishing).","directories":{},"maintainers":[{"name":"josh_sanity_io","email":"josh@sanity.io"},{"name":"joneidejohnsen","email":"jon@sanity.io"},{"name":"nina.andal","email":"nina@sanity.io"},{"name":"rankers","email":"richardankers@gmail.com"},{"name":"snorreeb","email":"snorre.e.brekke@gmail.com"},{"name":"mattcraig","email":"matt@sanity.io"},{"name":"vincentquigley","email":"vincent@sanity.io"},{"name":"stipsan","email":"stipsan@gmail.com"},{"name":"michael-sanity","email":"michael@sanity.io"},{"name":"rubioz","email":"jarubc@gmail.com"},{"name":"tonina","email":"zhelyazkova.tonina@gmail.com"},{"name":"ritasdias","email":"anarita151@gmail.com"},{"name":"simeonsanity","email":"simeon@sanity.io"},{"name":"kmelve","email":"knut.melvaer@gmail.com"},{"name":"bjoerge","email":"bjoerge@gmail.com"},{"name":"rexxars","email":"espen@hovlandsdal.com"},{"name":"skogsmaskin","email":"per.kristian.nordnes@gmail.com"},{"name":"simenss","email":"simen@bengler.no"},{"name":"robinpyon","email":"robin@robinpyon.com"},{"name":"mariuslundgard","email":"studio@mariuslundgard.com"},{"name":"sanity-io","email":"developers@sanity.io"},{"name":"evenw","email":"even@sanity.io"},{"name":"radhe_sanity","email":"radhe@sanity.io"},{"name":"rbotten","email":"rbotten@gmail.com"},{"name":"vicbergquist","email":"victoria.bergquist@gmail.com"},{"name":"judofyr","email":"judofyr@gmail.com"},{"name":"obliadp","email":"orjan@sanity.io"},{"name":"dcilke","email":"dain.cilke@gmail.com"},{"name":"fredcarlsen","email":"fred@superbig.co"},{"name":"jorn_georg","email":"jorn@sanity.io"},{"name":"hermanw","email":"herman@sanity.io"},{"name":"svirs","email":"shur@sanity.io"},{"name":"mikolajsanity","email":"mikolaj@sanity.io"},{"name":"sgulseth","email":"sgulseth@gmail.com"},{"name":"atombender","email":"npm@purefiction.net"}],"_nodeVersion":"18.12.0","dependencies":{"swr":"^1.2.0","debug":"^4.3.3","date-fns":"^2.27.0","@vvo/tzdb":"^6.35.0","pluralize":"^8.0.0","date-fns-tz":"^1.2.2","react-virtual":"^2.10.4","react-focus-lock":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rxjs":"^7.5.2","husky":"^7.0.0","react":"^17.0.2","eslint":"8.7.0","lodash":"^4.17.21","rimraf":"^3.0.2","rollup":"^2.66.1","prettier":"^2.5.1","react-dom":"^17.0.2","@sanity/ui":"^0.37.5","typescript":"4.5.5","@babel/core":"^7.17.0","lint-staged":"^12.3.3","@sanity/base":"^2.28.2","@sanity/util":"^2.28.0","@types/debug":"^4.1.7","@types/react":"^17.0.38","@sanity/color":"^2.1.8","@sanity/icons":"^1.2.5","@sanity/types":"^2.28.0","@reach/auto-id":"^0.16.0","@sanity/client":"^3.2.2","@commitlint/cli":"16.1.0","@types/pluralize":"^0.0.29","@types/react-dom":"17.0.11","@babel/preset-env":"7.16.11","@sanity/structure":"^2.28.0","@rollup/plugin-json":"^4.1.0","@sanity/react-hooks":"^2.28.2","eslint-plugin-react":"7.28.0","@rollup/plugin-babel":"^5.3.0","@sanity/form-builder":"^2.29.1","eslint-config-sanity":"^5.1.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"4.0.0","@types/styled-components":"5.1.21","@rollup/plugin-typescript":"^8.3.0","@typescript-eslint/parser":"5.12.0","cz-conventional-changelog":"3.3.0","eslint-plugin-react-hooks":"^4.5.0","@rollup/plugin-node-resolve":"^13.1.3","@commitlint/config-conventional":"15.0.0","@sanity/semantic-release-preset":"^2.0.0","@typescript-eslint/eslint-plugin":"5.12.0","rollup-plugin-peer-deps-external":"^2.2.4"},"peerDependencies":{"rxjs":"^7.5.2","react":">=17.0.2","lodash":"^4.17.21","react-dom":">=17.0.2","@sanity/ui":"^0.37.5","@sanity/base":"^2.28.2","@sanity/util":"^2.28.0","@sanity/color":"^2.1.8","@sanity/icons":"^1.2.5","@reach/auto-id":"^0.16.0","@sanity/client":"^3.2.2","@sanity/structure":"^2.28.0","styled-components":"^5.3.3","@sanity/react-hooks":"^2.28.2","@sanity/form-builder":"^2.29.1"},"_npmOperationalInternal":{"tmp":"tmp/scheduled-publishing_0.1.14_1669149186968_0.01873178732325198","host":"s3://npm-registry-packages"},"_id":"@sanity/scheduled-publishing@0.1.14","version":"0.1.14"}