{"action":"created","comment":{"url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/pulls/comments/153024241","pull_request_review_id":78980553,"id":153024241,"diff_hunk":"@@ -0,0 +1,214 @@\n+<script>\n+\twindow.Cosmoz = window.Cosmoz || {};\n+\n+\t/** @polymerBehavior */\n+\tCosmoz.RangeColumnBehavior = {\n+\t\tproperties: {\n+\t\t\tbindValues: {\n+\t\t\t\ttype: Boolean,\n+\t\t\t\treadOnly: true,\n+\t\t\t\tvalue: true\n+\t\t\t},\n+\n+\t\t\tvalues: {\n+\t\t\t\ttype: Array,\n+\t\t\t\tvalue: function () {\n+\t\t\t\t\treturn [];\n+\t\t\t\t}\n+\t\t\t},\n+\n+\t\t\t_filterInput: {\n+\t\t\t\ttype: Object,\n+\t\t\t\tvalue() {\n+\t\t\t\t\treturn { min: null, max: null };\n+\t\t\t\t}\n+\t\t\t},\n+\n+\t\t\t_range: {\n+\t\t\t\ttype: Object,\n+\t\t\t\tcomputed: '_computeRange(values.*)'\n+\t\t\t},\n+\n+\t\t\t_limit: {\n+\t\t\t\ttype: Object,\n+\t\t\t\tcomputed: '_computeLimit(_range, _filterInput.*)'\n+\t\t\t},\n+\n+\t\t\t_tooltip: {\n+\t\t\t\ttype: String,\n+\t\t\t\tcomputed: '_computeTooltip(title, _filterText)'\n+\t\t\t},\n+\t\t},\n+\n+\t\tobservers: [\n+\t\t\t'_filterInputChanged(_filterInput.*)',\n+\t\t\t'_filterChanged(filter.*)'\n+\t\t],\n+\n+\t\ttoNumber(value) {\n+\t\t\tif (value == null || value === '') {\n+\t\t\t\treturn;\n+\t\t\t}\n+\t\t\tconst number = Number(value);\n+\t\t\tif (Number.isNaN(number)) {\n+\t\t\t\treturn;\n+\t\t\t}\n+\t\t\treturn number;\n+\t\t},\n+\t\ttoLimitedNumber(value, limit, limitFunc) {\n+\t\t\tconst number = this.toNumber(value);\n+\t\t\tif (number == null) {\n+\t\t\t\treturn;\n+\t\t\t}\n+\t\t\tif (limit == null || limitFunc == null) {\n+\t\t\t\treturn number;\n+\t\t\t}\n+\t\t\treturn limitFunc(number, limit);\n+\t\t},\n+\n+\t\tlimitNumbers(func = Math.min, ...numbers) {\n+\t\t\tif (!numbers.length) {\n+\t\t\t\treturn;\n+\t\t\t}\n+\t\t\tconst validNumbers = numbers.map(n => this.toNumber(n)).filter(n => n != null);\n+\t\t\tif (!validNumbers.length) {\n+\t\t\t\treturn;\n+\t\t\t}\n+\t\t\treturn func.apply(null, validNumbers);\n+\t\t},\n+\n+\t\tgetComparableValue: function (item, valuePath) {\n+\t\t\treturn this.toNumber(valuePath != null ? this.get(valuePath, item) : item);\n+\t\t},\n+\n+\t\t_computeRange: function (change) {\n+\t\t\tconst values = change.base;\n+\n+\t\t\tif (!Array.isArray(values) || values.length < 1) {\n+\t\t\t\treturn {\n+\t\t\t\t\tmin: null,\n+\t\t\t\t\tmax: null\n+\t\t\t\t};\n+\t\t\t}\n+\t\t\treturn values.reduce((acc, item) => {\n+\t\t\t\tacc.max = this.limitNumbers(Math.max, acc.max, this.getComparableValue(item));\n+\t\t\t\tacc.min = this.limitNumbers(Math.min, acc.min, this.getComparableValue(item));\n+\t\t\t\treturn acc;\n+\t\t\t}, {});\n+\t\t},\n+\n+\t\t_computeLimit(range, inputChange) {\n+\t\t\tconst input = inputChange.base;\n+\t\t\treturn {\n+\t\t\t\tfromMin: range.min,","path":"cosmoz-omnitable-column-range-behavior.html","position":103,"original_position":103,"commit_id":"7a660e4e1f42f8c5d3745c340694194b7e8d5fe3","original_commit_id":"7a660e4e1f42f8c5d3745c340694194b7e8d5fe3","user":{"login":"nomego","id":960553,"avatar_url":"https://avatars3.githubusercontent.com/u/960553?v=4","gravatar_id":"","url":"https://api.github.com/users/nomego","html_url":"https://github.com/nomego","followers_url":"https://api.github.com/users/nomego/followers","following_url":"https://api.github.com/users/nomego/following{/other_user}","gists_url":"https://api.github.com/users/nomego/gists{/gist_id}","starred_url":"https://api.github.com/users/nomego/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nomego/subscriptions","organizations_url":"https://api.github.com/users/nomego/orgs","repos_url":"https://api.github.com/users/nomego/repos","events_url":"https://api.github.com/users/nomego/events{/privacy}","received_events_url":"https://api.github.com/users/nomego/received_events","type":"User","site_admin":false},"body":"Ah I see that you do it later on. Why?","created_at":"2017-11-24T20:26:00Z","updated_at":"2017-11-24T20:39:53Z","html_url":"https://github.com/Neovici/cosmoz-omnitable/pull/94#discussion_r153024241","pull_request_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/pulls/94","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Neovici/cosmoz-omnitable/pulls/comments/153024241"},"html":{"href":"https://github.com/Neovici/cosmoz-omnitable/pull/94#discussion_r153024241"},"pull_request":{"href":"https://api.github.com/repos/Neovici/cosmoz-omnitable/pulls/94"}},"in_reply_to_id":153023999},"pull_request":{"url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/pulls/94","id":154363068,"html_url":"https://github.com/Neovici/cosmoz-omnitable/pull/94","diff_url":"https://github.com/Neovici/cosmoz-omnitable/pull/94.diff","patch_url":"https://github.com/Neovici/cosmoz-omnitable/pull/94.patch","issue_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/issues/94","number":94,"state":"open","locked":false,"title":"Refactor amount and number columns","user":{"login":"megheaiulian","id":1788114,"avatar_url":"https://avatars2.githubusercontent.com/u/1788114?v=4","gravatar_id":"","url":"https://api.github.com/users/megheaiulian","html_url":"https://github.com/megheaiulian","followers_url":"https://api.github.com/users/megheaiulian/followers","following_url":"https://api.github.com/users/megheaiulian/following{/other_user}","gists_url":"https://api.github.com/users/megheaiulian/gists{/gist_id}","starred_url":"https://api.github.com/users/megheaiulian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megheaiulian/subscriptions","organizations_url":"https://api.github.com/users/megheaiulian/orgs","repos_url":"https://api.github.com/users/megheaiulian/repos","events_url":"https://api.github.com/users/megheaiulian/events{/privacy}","received_events_url":"https://api.github.com/users/megheaiulian/received_events","type":"User","site_admin":false},"body":"- [ ] Synchronize filter with hash\r\n- [ ] Refactor duplicate code between amount and number columns","created_at":"2017-11-23T12:18:44Z","updated_at":"2017-11-24T20:39:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"058d5f7c1ffb319645b54c933ee57675ba550385","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/pulls/94/commits","review_comments_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/pulls/94/comments","review_comment_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/issues/94/comments","statuses_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/statuses/7a660e4e1f42f8c5d3745c340694194b7e8d5fe3","head":{"label":"plumelo:feature/NEOV-60-number-amount","ref":"feature/NEOV-60-number-amount","sha":"7a660e4e1f42f8c5d3745c340694194b7e8d5fe3","user":{"login":"plumelo","id":15955263,"avatar_url":"https://avatars0.githubusercontent.com/u/15955263?v=4","gravatar_id":"","url":"https://api.github.com/users/plumelo","html_url":"https://github.com/plumelo","followers_url":"https://api.github.com/users/plumelo/followers","following_url":"https://api.github.com/users/plumelo/following{/other_user}","gists_url":"https://api.github.com/users/plumelo/gists{/gist_id}","starred_url":"https://api.github.com/users/plumelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plumelo/subscriptions","organizations_url":"https://api.github.com/users/plumelo/orgs","repos_url":"https://api.github.com/users/plumelo/repos","events_url":"https://api.github.com/users/plumelo/events{/privacy}","received_events_url":"https://api.github.com/users/plumelo/received_events","type":"Organization","site_admin":false},"repo":{"id":107093066,"name":"cosmoz-omnitable","full_name":"plumelo/cosmoz-omnitable","owner":{"login":"plumelo","id":15955263,"avatar_url":"https://avatars0.githubusercontent.com/u/15955263?v=4","gravatar_id":"","url":"https://api.github.com/users/plumelo","html_url":"https://github.com/plumelo","followers_url":"https://api.github.com/users/plumelo/followers","following_url":"https://api.github.com/users/plumelo/following{/other_user}","gists_url":"https://api.github.com/users/plumelo/gists{/gist_id}","starred_url":"https://api.github.com/users/plumelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plumelo/subscriptions","organizations_url":"https://api.github.com/users/plumelo/orgs","repos_url":"https://api.github.com/users/plumelo/repos","events_url":"https://api.github.com/users/plumelo/events{/privacy}","received_events_url":"https://api.github.com/users/plumelo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/plumelo/cosmoz-omnitable","description":"The Cosmoz Omnitable","fork":true,"url":"https://api.github.com/repos/plumelo/cosmoz-omnitable","forks_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/forks","keys_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/teams","hooks_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/hooks","issue_events_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/issues/events{/number}","events_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/events","assignees_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/assignees{/user}","branches_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/branches{/branch}","tags_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/tags","blobs_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/git/refs{/sha}","trees_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/statuses/{sha}","languages_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/languages","stargazers_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/stargazers","contributors_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/contributors","subscribers_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/subscribers","subscription_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/subscription","commits_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/commits{/sha}","git_commits_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/git/commits{/sha}","comments_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/comments{/number}","issue_comment_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/issues/comments{/number}","contents_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/contents/{+path}","compare_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/merges","archive_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/downloads","issues_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/issues{/number}","pulls_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/pulls{/number}","milestones_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/milestones{/number}","notifications_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/labels{/name}","releases_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/releases{/id}","deployments_url":"https://api.github.com/repos/plumelo/cosmoz-omnitable/deployments","created_at":"2017-10-16T07:31:26Z","updated_at":"2017-10-16T07:31:28Z","pushed_at":"2017-11-24T14:00:02Z","git_url":"git://github.com/plumelo/cosmoz-omnitable.git","ssh_url":"git@github.com:plumelo/cosmoz-omnitable.git","clone_url":"https://github.com/plumelo/cosmoz-omnitable.git","svn_url":"https://github.com/plumelo/cosmoz-omnitable","homepage":null,"size":4536,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Neovici:master","ref":"master","sha":"8de0f3164be6dbcd7e3116b6febd5dad79d4a296","user":{"login":"Neovici","id":10965763,"avatar_url":"https://avatars0.githubusercontent.com/u/10965763?v=4","gravatar_id":"","url":"https://api.github.com/users/Neovici","html_url":"https://github.com/Neovici","followers_url":"https://api.github.com/users/Neovici/followers","following_url":"https://api.github.com/users/Neovici/following{/other_user}","gists_url":"https://api.github.com/users/Neovici/gists{/gist_id}","starred_url":"https://api.github.com/users/Neovici/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Neovici/subscriptions","organizations_url":"https://api.github.com/users/Neovici/orgs","repos_url":"https://api.github.com/users/Neovici/repos","events_url":"https://api.github.com/users/Neovici/events{/privacy}","received_events_url":"https://api.github.com/users/Neovici/received_events","type":"Organization","site_admin":false},"repo":{"id":45485652,"name":"cosmoz-omnitable","full_name":"Neovici/cosmoz-omnitable","owner":{"login":"Neovici","id":10965763,"avatar_url":"https://avatars0.githubusercontent.com/u/10965763?v=4","gravatar_id":"","url":"https://api.github.com/users/Neovici","html_url":"https://github.com/Neovici","followers_url":"https://api.github.com/users/Neovici/followers","following_url":"https://api.github.com/users/Neovici/following{/other_user}","gists_url":"https://api.github.com/users/Neovici/gists{/gist_id}","starred_url":"https://api.github.com/users/Neovici/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Neovici/subscriptions","organizations_url":"https://api.github.com/users/Neovici/orgs","repos_url":"https://api.github.com/users/Neovici/repos","events_url":"https://api.github.com/users/Neovici/events{/privacy}","received_events_url":"https://api.github.com/users/Neovici/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Neovici/cosmoz-omnitable","description":"The Cosmoz Omnitable","fork":false,"url":"https://api.github.com/repos/Neovici/cosmoz-omnitable","forks_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/forks","keys_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/teams","hooks_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/hooks","issue_events_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/issues/events{/number}","events_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/events","assignees_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/assignees{/user}","branches_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/branches{/branch}","tags_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/tags","blobs_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/git/refs{/sha}","trees_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/statuses/{sha}","languages_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/languages","stargazers_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/stargazers","contributors_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/contributors","subscribers_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/subscribers","subscription_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/subscription","commits_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/commits{/sha}","git_commits_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/git/commits{/sha}","comments_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/comments{/number}","issue_comment_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/issues/comments{/number}","contents_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/contents/{+path}","compare_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/merges","archive_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/downloads","issues_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/issues{/number}","pulls_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/pulls{/number}","milestones_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/milestones{/number}","notifications_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/labels{/name}","releases_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/releases{/id}","deployments_url":"https://api.github.com/repos/Neovici/cosmoz-omnitable/deployments","created_at":"2015-11-03T18:08:36Z","updated_at":"2017-11-03T11:58:49Z","pushed_at":"2017-11-24T14:00:03Z","git_url":"git://github.com/Neovici/cosmoz-omnitable.git","ssh_url":"git@github.com:Neovici/cosmoz-omnitable.git","clone_url":"https://github.com/Neovici/cosmoz-omnitable.git","svn_url":"https://github.com/Neovici/cosmoz-omnitable","homepage":null,"size":4507,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":16,"forks":4,"open_issues":16,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Neovici/cosmoz-omnitable/pulls/94"},"html":{"href":"https://github.com/Neovici/cosmoz-omnitable/pull/94"},"issue":{"href":"https://api.github.com/repos/Neovici/cosmoz-omnitable/issues/94"},"comments":{"href":"https://api.github.com/repos/Neovici/cosmoz-omnitable/issues/94/comments"},"review_comments":{"href":"https://api.github.com/repos/Neovici/cosmoz-omnitable/pulls/94/comments"},"review_comment":{"href":"https://api.github.com/repos/Neovici/cosmoz-omnitable/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Neovici/cosmoz-omnitable/pulls/94/commits"},"statuses":{"href":"https://api.github.com/repos/Neovici/cosmoz-omnitable/statuses/7a660e4e1f42f8c5d3745c340694194b7e8d5fe3"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"nomego"}}