{"_id":"@atomcorp/react-available-times","_rev":"1-5b0a5f35fb533794f94c497d9e534f9b","name":"@atomcorp/react-available-times","dist-tags":{"latest":"1.2.3"},"versions":{"1.2.3":{"name":"@atomcorp/react-available-times","version":"1.2.3","description":"A calendar to pick available time slots (fork fix for moment)","main":"dist/main.js","repository":{"type":"git","url":"git+ssh://git@github.com/atomcorp/react-available-times.git"},"author":{"name":"Henric Trotzig","email":"henric.trotzig@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"npm run clean && webpack","lint":"eslint . --ext=.js,.jsx","start-test":"node src/testServer.js","prepublish":"npm run test && npm run build","test":"npm run lint && jest"},"jest":{"testRegex":"test.*-test\\.jsx?$","moduleNameMapper":{"\\.css$":"identity-obj-proxy"}},"dependencies":{"moment":"^2.18.1","moment-timezone":"^0.5.13","prop-types":"^15.5.8"},"devDependencies":{"autoprefixer":"^6.7.7","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-jest":"^19.0.0","babel-loader":"^6.4.1","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-assign":"^6.22.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-es2015":"^6.24.1","babel-preset-react":"^6.24.1","css-loader":"^0.28.0","enzyme":"^2.8.2","eslint":"^3.19.0","eslint-config-airbnb":"^14.1.0","eslint-plugin-import":"^2.2.0","eslint-plugin-jest":"^19.0.1","eslint-plugin-jsx-a11y":"^4.0.0","eslint-plugin-react":"^6.10.3","express":"^4.15.2","identity-obj-proxy":"^3.0.0","jest":"^19.0.2","postcss-loader":"^1.3.3","react":"^15.5.4","react-dom":"^15.5.4","react-test-renderer":"^15.5.4","regenerator-runtime":"^0.10.3","rimraf":"^2.6.1","style-loader":"^0.16.1","webpack":"^2.4.1","webpack-dev-middleware":"^1.10.1","webpack-node-externals":"^1.5.4"},"peerDependencies":{"react":"^0.14.0 || ^15.0.0, || ^16.0.0"},"gitHead":"983192be9892d53d0a89de3e6db88b3b2cf2f0bf","bugs":{"url":"https://github.com/atomcorp/react-available-times/issues"},"homepage":"https://github.com/atomcorp/react-available-times#readme","_id":"@atomcorp/react-available-times@1.2.3","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-EtL51eLbNH6AXS1/SkBVv+D6m5Nm85N88rs/bUGw5VphTtKhXl4rmy2CF/iLEwxG5PUjgz+ZyduuEflo8ClUyA==","shasum":"d05847d63b9b91654b9bb68eed0830f39268d459","tarball":"https://registry.npmjs.org/@atomcorp/react-available-times/-/react-available-times-1.2.3.tgz","fileCount":4,"unpackedSize":136930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMHUTCRA9TVsSAnZWagAANWAP/RKxgl7ECpC6qOepIGFu\nqIPBv9o/ebMhQlBEiaJvUkk6RBI5CsxAe7EHEM4ZwF9qmvyI59TTRiTeMQN4\nT18pssqH5YT9zF7UJWmHIM/V/ET3ElbxsUZSv6Xu5/YP/FozNvptmi1mIfx/\n1s0LdupQ9t+yfXGK/uPIgTYkSdgV9mG0+x9ZtEypBsQHlHU1Iozcr6VEqdMi\nlCNKovz5rNYMj7ULCmdbQZtV4HfuXOapMfi0CmqH4SaGW6rryyDaB1+wCiN3\nQGOh9mM21xtSM/ykb+3HeDltKxm2ZUUaOrIdZwuxe/FvpL4HyQGxm9+fDxCO\nfohhjxcw+U8Nna1/7NZquEJWpw5wgH70JDzU2agwY9apqjZW604b2sLRg2pj\nQHdlNDHWe4Mq2886kuRSkKIPiretUGXnudW1ru0ju+perCpHwIpbBwSU5AEr\nK17mhdNsC41W2TfuSpox8OFGQ7G3WejFBwacClbkWgc5O2yxpHEOzAJ5rJYO\napj+JFJ9yP9j0jwpVXFMyk+qQw7iaR4uIfoJ1SessRM9Xhp0W1jK3k+6wla3\nRJTmajvQcDjVcECgmCVOY8dug+R1KO2jJqniEsu4N8uhSqdyJKewnab1GcJp\nNl3QZl66d650jSR6bCs7QvNRACjr6yBAX6whSrbrGGCSG+7U+D3ROXGLO6sY\nnI3P\r\n=KR7D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvy9EWb0K2XoZiqvSJDPDnBqsY2u50NmawThXz9npLngIgWUljNiea1I2KkbReQwFXcLs/Apy85t3TWIvJPzGU5uw="}]},"maintainers":[{"name":"atomcorp","email":"faotms+npm@gmail.com"}],"_npmUser":{"name":"atomcorp","email":"faotms+npm@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-available-times_1.2.3_1563456786531_0.5077425911952613"},"_hasShrinkwrap":false}},"time":{"created":"2019-07-18T13:33:06.320Z","1.2.3":"2019-07-18T13:33:06.817Z","modified":"2022-04-04T16:14:34.429Z"},"maintainers":[{"name":"atomcorp","email":"faotms+npm@gmail.com"}],"description":"A calendar to pick available time slots (fork fix for moment)","homepage":"https://github.com/atomcorp/react-available-times#readme","repository":{"type":"git","url":"git+ssh://git@github.com/atomcorp/react-available-times.git"},"author":{"name":"Henric Trotzig","email":"henric.trotzig@gmail.com"},"bugs":{"url":"https://github.com/atomcorp/react-available-times/issues"},"license":"MIT","readme":"# React Available Times\n\nA React component that allows a user to select time-slots in a calendar-like UI.\n\n![Demo](/available-times-demo.gif)\n\n## Installation\n```\nnpm install --save react-available-times\n```\n\n## Usage\n\n```jsx\nimport AvailableTimes from 'react-available-times';\n\n<AvailableTimes\n  weekStartsOn=\"monday\"\n  calendars={[\n    {\n      id: 'work',\n      title: 'Work',\n      foregroundColor: '#ff00ff',\n      backgroundColor: '#f0f0f0',\n      selected: true,\n    },\n    {\n      id: 'private',\n      title: 'My private cal',\n      foregroundColor: '#666',\n      backgroundColor: '#f3f3f3',\n    },\n  ]}\n  onChange={(selections) => {\n    selections.forEach(({ start, end }) => {\n      console.log('Start:', start, 'End:', end);\n    })\n  }}\n  onEventsRequested={({ calendarId, start, end, callback }) => {\n    loadMoreEvents(calendarId, start, end).then(callback);\n  }}\n  initialSelections={[\n    { start: aDateObject, end: anotherDateObject }\n  ]}\n  height={400}\n  recurring={false}\n  availableDays={['monday', 'tuesday', 'wednesday', 'thursday', 'friday']}\n  availableHourRange={{ start: 9, end: 19 }}\n/>\n```\n\n## Props\n\nNone of the props are required.\n\n- `weekStartsOn`: a string (either `\"monday\"` or `\"sunday\"`) specifying what\n  day of the week should come first.\n- `calendars`: a list of calendars displayed in the dropdown at the top right.\n- `onChange`: a function called whenever a selection is made. Receives an array\n  of objects, each with a `start` and an `end` date.\n- `onEventsRequested`: a function called when new weeks are loaded. Hook in to\n  this function to continuously feed events to the calendar view. The `callback`\n  provided should be called when you have fetched events for the particular\n  `calendarId`. Call the callback with an array of objects, where each object\n  has a `start` and an `end` date, plus a `title` property. Can have a\n  `calendarId` property tying them to a calendar, inheriting the foreground and\n  background color. Can also have a `allDay` property, in which case they are\n  rendered at the top.\n- `initialSelections`: an array of pre-filled selections. Each object in the\n  array needs a `start` and an `end` date.\n- `height`: a string or a number controlling the `height` of the component.\n  E.g. `'100%'`, `350`, `'100vh'`. If left out, the full height of the screen\n  will be used.\n- `recurring`: set to `true` to turn the view into a selector for recurring\n  availability. No dates are then shown, and the `onChange` callback is called\n  with events that have a start and end expressed in number of minutes since\n  the start of the week. The `weekStartsOn` prop is taken into account here, so\n  the `0` minute is either monday at 00:00 or sunday at 00:00.\n- `availableDays`: an array of strings (`\"monday\"`, `\"tuesday\"` ...) specifying\n  what days of the week are available to be used. It is set to every day by default.\n- `availableHourRange`: an object with `start` and `end` numbers, ranging from 0 to 24\n  inclusive. Defaults to the entire day by default.\n\n## Contributing\n\nFirst, run `npm install` to install all dependencies. Then, to manually test\nthe component, run `npm run start-test` and open `http://localhost:3333/` in a\nbrowser.\n\nUnit tests are run with [jest](https://facebook.github.io/jest/). Run `npm run\ntest -- --watch` to run tests.\n","readmeFilename":"README.md"}