{"id":15573248,"url":"https://github.com/polo2ro/teleperiod","last_synced_at":"2025-04-24T00:49:59.260Z","repository":{"id":25403765,"uuid":"28832645","full_name":"polo2ro/teleperiod","owner":"polo2ro","description":"period picker on a time line with working hours","archived":false,"fork":false,"pushed_at":"2022-05-25T23:44:28.000Z","size":351,"stargazers_count":4,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-24T13:55:14.389Z","etag":null,"topics":["javascript","period","timeline","ui"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/polo2ro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-05T21:29:37.000Z","updated_at":"2019-12-01T17:39:49.000Z","dependencies_parsed_at":"2022-08-23T20:00:43.070Z","dependency_job_id":null,"html_url":"https://github.com/polo2ro/teleperiod","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polo2ro%2Fteleperiod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polo2ro%2Fteleperiod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polo2ro%2Fteleperiod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polo2ro%2Fteleperiod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/polo2ro","download_url":"https://codeload.github.com/polo2ro/teleperiod/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250021957,"owners_count":21362162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","period","timeline","ui"],"created_at":"2024-10-02T18:11:29.831Z","updated_at":"2025-04-24T00:49:59.241Z","avatar_url":"https://github.com/polo2ro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"teleperiod\n==========\n\nperiod picker on a time line with working hours\n\n\n![Preview](/examples/preview.png?raw=true)\n\n\nTechnical overview\n------------------\n\nThe calendar is created in [SVG](http://fr.wikipedia.org/wiki/Scalable_Vector_Graphics) using [d3 js](http://d3js.org/) toolkit. This can be added in any web page and allow to retreive the periods of the selection in a javascript object.\nIt lazy load events and working hours while browsing on dates.\n\nInstallation as a [bower](http://bower.io/) componenent:\n\n    bower install teleperiod\n\n\nAn angular version is available: [angular-teleperiod](https://github.com/polo2ro/angular-teleperiod)\n\n\nFeatures\n--------\n\n* Select one period on a calendar view\n* Display mutiple timelines for references (ex: other pepoles availability, scolar vacations periods ...)\n* Get the duration of the selection period according to working schedule and special events\n\n\nUsage\n-----\n\nAdd to page teleperiod.min.js and teleperiod.min.css\n\ncreate a svg placeholder in page:\n```html\n    \u003cdiv class=\"row\"\u003e\n        \u003csvg id=\"teleperiod_placeholder\"\u003e\u003c/svg\u003e\n    \u003c/div\u003e\n```\n\nInitialize teleperiod object with options:\n```javascript\n    var teleperiod = new Teleperiod({\n        object: d3.select('#teleperiod_placeholder'),\n        workingtimes: function(interval) {\n        \n        },\n        events: function(interval) {\n        \n        },\n        onUpdated: function(selection) {\n        \n        }\n    });\n```    \n    \nAvailables options:\n\nProperty            | Description\n------------------- | -------------\nobject              | a D3 html element, it will be used as placeholder to load the graph. This option is mandatory\nworkingtimes        | A function called to load the working times on the specified interval. The function must return a Q promise. This option is mandatory\nevents              | A function called to load some events on the specified interval. The function must return a Q promise. This option is mandatory\nonUpdated           | A function called when the selection is modified, the selection is given as a parameter. This option is mandatory\nfocusDate           | A Date object, the graph will be open at this date, if not set, the default value is the current date\nselectedEvents      | array of events UID, on loaded, the events will be converted to a modifiable selection\ndateLocale          | A string to represent the locale used in dates functions, default is 'FR_fr'\nwidth               | An integer for the graph width, default is the size of parent container\n    \nAdd some bottom timeline references using the timeline object:\n```javascript\n    var timeline = new Timeline('My timeline', function(interval) {\n    \n    });\n    \n    teleperiod.addTimeLine(timeline);\n``` \n\nDraw the widget:\n```javascript\n    teleperiod.draw();\n``` \n\nSet a selected period for modifications:\n```javascript\n    teleperiod.setSelection(\n        new Date(2015, 1, 10, 0, 0, 0),\n        new Date(2015, 1, 11, 0, 0, 0)\n    );\n``` \n\n\nUsage exemples\n--------------\n\nRoom reservations, vacation periods request, resources management ...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolo2ro%2Fteleperiod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolo2ro%2Fteleperiod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolo2ro%2Fteleperiod/lists"}