{"action":"created","comment":{"url":"https://api.github.com/repos/akveo/nebular/pulls/comments/167536398","pull_request_review_id":95748647,"id":167536398,"diff_hunk":"@@ -0,0 +1,79 @@\n+import { Observable } from 'rxjs/Observable';\n+import { filter } from 'rxjs/operators/filter';\n+import { fromEvent as observableFromEvent } from 'rxjs/observable/fromEvent';\n+\n+/**\n+ * NbPopoverMode describes when to trigger show and hide methods of the popover.\n+ * */\n+export enum NbPopoverMode {\n+  CLICK = 'click',\n+  HOVER = 'hover',\n+}\n+\n+export class NbPopoverTrigger {\n+  open: Observable<Event>;\n+  close: Observable<Event>;\n+}\n+\n+/**\n+ * Describes popover triggers strategies based on popover {@link NbPopoverMode} mode.\n+ * */\n+const NB_TRIGGERS = {\n+\n+  /**\n+   * Creates open and close events streams based on popover {@link NbPopoverMode#CLICK} mode.\n+   * Fires open event when click was performed on the host element.\n+   * Fires close event when click was performed on the document but\n+   * not on the host or container or popover container isn't rendered yet.\n+   *\n+   * @param host {HTMLElement} popover host element.\n+   * @param getContainer {Function} popover container getter.\n+   *\n+   * @return {NbPopoverTrigger} open and close events streams.\n+   * */\n+  [NbPopoverMode.CLICK](host: HTMLElement, getContainer: Function): NbPopoverTrigger {\n+    return {\n+      open: observableFromEvent(host, 'click'),\n+      close: observableFromEvent<Event>(document, 'click')\n+        .pipe(\n+          filter(event => !host.contains(event.target as Node)),","path":"src/framework/theme/components/popover/trigger.helper.ts","position":39,"original_position":39,"commit_id":"8aa97967301b7832de064a3ae737c959a40e69da","original_commit_id":"8aa97967301b7832de064a3ae737c959a40e69da","user":{"login":"KostyaDanovsky","id":773632,"avatar_url":"https://avatars0.githubusercontent.com/u/773632?v=4","gravatar_id":"","url":"https://api.github.com/users/KostyaDanovsky","html_url":"https://github.com/KostyaDanovsky","followers_url":"https://api.github.com/users/KostyaDanovsky/followers","following_url":"https://api.github.com/users/KostyaDanovsky/following{/other_user}","gists_url":"https://api.github.com/users/KostyaDanovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/KostyaDanovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KostyaDanovsky/subscriptions","organizations_url":"https://api.github.com/users/KostyaDanovsky/orgs","repos_url":"https://api.github.com/users/KostyaDanovsky/repos","events_url":"https://api.github.com/users/KostyaDanovsky/events{/privacy}","received_events_url":"https://api.github.com/users/KostyaDanovsky/received_events","type":"User","site_admin":false},"body":"Use one filter instead of 3","created_at":"2018-02-12T12:06:33Z","updated_at":"2018-02-12T12:07:29Z","html_url":"https://github.com/akveo/nebular/pull/203#discussion_r167536398","pull_request_url":"https://api.github.com/repos/akveo/nebular/pulls/203","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/akveo/nebular/pulls/comments/167536398"},"html":{"href":"https://github.com/akveo/nebular/pull/203#discussion_r167536398"},"pull_request":{"href":"https://api.github.com/repos/akveo/nebular/pulls/203"}}},"pull_request":{"url":"https://api.github.com/repos/akveo/nebular/pulls/203","id":168088123,"html_url":"https://github.com/akveo/nebular/pull/203","diff_url":"https://github.com/akveo/nebular/pull/203.diff","patch_url":"https://github.com/akveo/nebular/pull/203.patch","issue_url":"https://api.github.com/repos/akveo/nebular/issues/203","number":203,"state":"open","locked":false,"title":"Feature/popover","user":{"login":"Tibing","id":17410089,"avatar_url":"https://avatars1.githubusercontent.com/u/17410089?v=4","gravatar_id":"","url":"https://api.github.com/users/Tibing","html_url":"https://github.com/Tibing","followers_url":"https://api.github.com/users/Tibing/followers","following_url":"https://api.github.com/users/Tibing/following{/other_user}","gists_url":"https://api.github.com/users/Tibing/gists{/gist_id}","starred_url":"https://api.github.com/users/Tibing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tibing/subscriptions","organizations_url":"https://api.github.com/users/Tibing/orgs","repos_url":"https://api.github.com/users/Tibing/repos","events_url":"https://api.github.com/users/Tibing/events{/privacy}","received_events_url":"https://api.github.com/users/Tibing/received_events","type":"User","site_admin":false},"body":"### Please read and mark the following check list before creating a pull request:\r\n\r\n - [x] I read and followed the [CONTRIBUTING.md](https://github.com/akveo/nebular/blob/master/CONTRIBUTING.md) guide.\r\n - [x] I read and followed the [New Feature Checklist](https://github.com/akveo/nebular/blob/master/DEV_DOCS.md#new-feature-checklist) guide.\r\n \r\n #### Short description of what this resolves:\r\n\r\nAdd popover directive\r\n","created_at":"2018-02-08T21:11:26Z","updated_at":"2018-02-12T12:07:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"33974a4c6c13741d49aeebf84e69f29a7585b3fa","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":744224145,"url":"https://api.github.com/repos/akveo/nebular/labels/action:%20review","name":"action: review","color":"efc8aa","default":false},{"id":706272751,"url":"https://api.github.com/repos/akveo/nebular/labels/module:theme","name":"module:theme","color":"c2e0c6","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/akveo/nebular/pulls/203/commits","review_comments_url":"https://api.github.com/repos/akveo/nebular/pulls/203/comments","review_comment_url":"https://api.github.com/repos/akveo/nebular/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akveo/nebular/issues/203/comments","statuses_url":"https://api.github.com/repos/akveo/nebular/statuses/8aa97967301b7832de064a3ae737c959a40e69da","head":{"label":"Tibing:feature/popover","ref":"feature/popover","sha":"8aa97967301b7832de064a3ae737c959a40e69da","user":{"login":"Tibing","id":17410089,"avatar_url":"https://avatars1.githubusercontent.com/u/17410089?v=4","gravatar_id":"","url":"https://api.github.com/users/Tibing","html_url":"https://github.com/Tibing","followers_url":"https://api.github.com/users/Tibing/followers","following_url":"https://api.github.com/users/Tibing/following{/other_user}","gists_url":"https://api.github.com/users/Tibing/gists{/gist_id}","starred_url":"https://api.github.com/users/Tibing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tibing/subscriptions","organizations_url":"https://api.github.com/users/Tibing/orgs","repos_url":"https://api.github.com/users/Tibing/repos","events_url":"https://api.github.com/users/Tibing/events{/privacy}","received_events_url":"https://api.github.com/users/Tibing/received_events","type":"User","site_admin":false},"repo":{"id":113602426,"name":"nebular","full_name":"Tibing/nebular","owner":{"login":"Tibing","id":17410089,"avatar_url":"https://avatars1.githubusercontent.com/u/17410089?v=4","gravatar_id":"","url":"https://api.github.com/users/Tibing","html_url":"https://github.com/Tibing","followers_url":"https://api.github.com/users/Tibing/followers","following_url":"https://api.github.com/users/Tibing/following{/other_user}","gists_url":"https://api.github.com/users/Tibing/gists{/gist_id}","starred_url":"https://api.github.com/users/Tibing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tibing/subscriptions","organizations_url":"https://api.github.com/users/Tibing/orgs","repos_url":"https://api.github.com/users/Tibing/repos","events_url":"https://api.github.com/users/Tibing/events{/privacy}","received_events_url":"https://api.github.com/users/Tibing/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Tibing/nebular","description":"Nebular is a set of essential modules for your next Angular application.","fork":true,"url":"https://api.github.com/repos/Tibing/nebular","forks_url":"https://api.github.com/repos/Tibing/nebular/forks","keys_url":"https://api.github.com/repos/Tibing/nebular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tibing/nebular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tibing/nebular/teams","hooks_url":"https://api.github.com/repos/Tibing/nebular/hooks","issue_events_url":"https://api.github.com/repos/Tibing/nebular/issues/events{/number}","events_url":"https://api.github.com/repos/Tibing/nebular/events","assignees_url":"https://api.github.com/repos/Tibing/nebular/assignees{/user}","branches_url":"https://api.github.com/repos/Tibing/nebular/branches{/branch}","tags_url":"https://api.github.com/repos/Tibing/nebular/tags","blobs_url":"https://api.github.com/repos/Tibing/nebular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tibing/nebular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tibing/nebular/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tibing/nebular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tibing/nebular/statuses/{sha}","languages_url":"https://api.github.com/repos/Tibing/nebular/languages","stargazers_url":"https://api.github.com/repos/Tibing/nebular/stargazers","contributors_url":"https://api.github.com/repos/Tibing/nebular/contributors","subscribers_url":"https://api.github.com/repos/Tibing/nebular/subscribers","subscription_url":"https://api.github.com/repos/Tibing/nebular/subscription","commits_url":"https://api.github.com/repos/Tibing/nebular/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tibing/nebular/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tibing/nebular/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tibing/nebular/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tibing/nebular/contents/{+path}","compare_url":"https://api.github.com/repos/Tibing/nebular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tibing/nebular/merges","archive_url":"https://api.github.com/repos/Tibing/nebular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tibing/nebular/downloads","issues_url":"https://api.github.com/repos/Tibing/nebular/issues{/number}","pulls_url":"https://api.github.com/repos/Tibing/nebular/pulls{/number}","milestones_url":"https://api.github.com/repos/Tibing/nebular/milestones{/number}","notifications_url":"https://api.github.com/repos/Tibing/nebular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tibing/nebular/labels{/name}","releases_url":"https://api.github.com/repos/Tibing/nebular/releases{/id}","deployments_url":"https://api.github.com/repos/Tibing/nebular/deployments","created_at":"2017-12-08T17:56:01Z","updated_at":"2017-12-08T17:56:04Z","pushed_at":"2018-02-12T08:22:01Z","git_url":"git://github.com/Tibing/nebular.git","ssh_url":"git@github.com:Tibing/nebular.git","clone_url":"https://github.com/Tibing/nebular.git","svn_url":"https://github.com/Tibing/nebular","homepage":"https://akveo.github.io/nebular","size":48035,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"akveo:master","ref":"master","sha":"18ccdf6ddbc62c894a3123e419323ca0345aa697","user":{"login":"akveo","id":11921694,"avatar_url":"https://avatars3.githubusercontent.com/u/11921694?v=4","gravatar_id":"","url":"https://api.github.com/users/akveo","html_url":"https://github.com/akveo","followers_url":"https://api.github.com/users/akveo/followers","following_url":"https://api.github.com/users/akveo/following{/other_user}","gists_url":"https://api.github.com/users/akveo/gists{/gist_id}","starred_url":"https://api.github.com/users/akveo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akveo/subscriptions","organizations_url":"https://api.github.com/users/akveo/orgs","repos_url":"https://api.github.com/users/akveo/repos","events_url":"https://api.github.com/users/akveo/events{/privacy}","received_events_url":"https://api.github.com/users/akveo/received_events","type":"Organization","site_admin":false},"repo":{"id":104188467,"name":"nebular","full_name":"akveo/nebular","owner":{"login":"akveo","id":11921694,"avatar_url":"https://avatars3.githubusercontent.com/u/11921694?v=4","gravatar_id":"","url":"https://api.github.com/users/akveo","html_url":"https://github.com/akveo","followers_url":"https://api.github.com/users/akveo/followers","following_url":"https://api.github.com/users/akveo/following{/other_user}","gists_url":"https://api.github.com/users/akveo/gists{/gist_id}","starred_url":"https://api.github.com/users/akveo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akveo/subscriptions","organizations_url":"https://api.github.com/users/akveo/orgs","repos_url":"https://api.github.com/users/akveo/repos","events_url":"https://api.github.com/users/akveo/events{/privacy}","received_events_url":"https://api.github.com/users/akveo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akveo/nebular","description":"Nebular is a set of essential modules for your next Angular 5 application.","fork":false,"url":"https://api.github.com/repos/akveo/nebular","forks_url":"https://api.github.com/repos/akveo/nebular/forks","keys_url":"https://api.github.com/repos/akveo/nebular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akveo/nebular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akveo/nebular/teams","hooks_url":"https://api.github.com/repos/akveo/nebular/hooks","issue_events_url":"https://api.github.com/repos/akveo/nebular/issues/events{/number}","events_url":"https://api.github.com/repos/akveo/nebular/events","assignees_url":"https://api.github.com/repos/akveo/nebular/assignees{/user}","branches_url":"https://api.github.com/repos/akveo/nebular/branches{/branch}","tags_url":"https://api.github.com/repos/akveo/nebular/tags","blobs_url":"https://api.github.com/repos/akveo/nebular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akveo/nebular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akveo/nebular/git/refs{/sha}","trees_url":"https://api.github.com/repos/akveo/nebular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akveo/nebular/statuses/{sha}","languages_url":"https://api.github.com/repos/akveo/nebular/languages","stargazers_url":"https://api.github.com/repos/akveo/nebular/stargazers","contributors_url":"https://api.github.com/repos/akveo/nebular/contributors","subscribers_url":"https://api.github.com/repos/akveo/nebular/subscribers","subscription_url":"https://api.github.com/repos/akveo/nebular/subscription","commits_url":"https://api.github.com/repos/akveo/nebular/commits{/sha}","git_commits_url":"https://api.github.com/repos/akveo/nebular/git/commits{/sha}","comments_url":"https://api.github.com/repos/akveo/nebular/comments{/number}","issue_comment_url":"https://api.github.com/repos/akveo/nebular/issues/comments{/number}","contents_url":"https://api.github.com/repos/akveo/nebular/contents/{+path}","compare_url":"https://api.github.com/repos/akveo/nebular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akveo/nebular/merges","archive_url":"https://api.github.com/repos/akveo/nebular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akveo/nebular/downloads","issues_url":"https://api.github.com/repos/akveo/nebular/issues{/number}","pulls_url":"https://api.github.com/repos/akveo/nebular/pulls{/number}","milestones_url":"https://api.github.com/repos/akveo/nebular/milestones{/number}","notifications_url":"https://api.github.com/repos/akveo/nebular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akveo/nebular/labels{/name}","releases_url":"https://api.github.com/repos/akveo/nebular/releases{/id}","deployments_url":"https://api.github.com/repos/akveo/nebular/deployments","created_at":"2017-09-20T08:33:06Z","updated_at":"2018-02-12T10:55:56Z","pushed_at":"2018-02-12T11:49:11Z","git_url":"git://github.com/akveo/nebular.git","ssh_url":"git@github.com:akveo/nebular.git","clone_url":"https://github.com/akveo/nebular.git","svn_url":"https://github.com/akveo/nebular","homepage":"https://akveo.github.io/nebular","size":48105,"stargazers_count":1185,"watchers_count":1185,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":248,"mirror_url":null,"archived":false,"open_issues_count":57,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":248,"open_issues":57,"watchers":1185,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akveo/nebular/pulls/203"},"html":{"href":"https://github.com/akveo/nebular/pull/203"},"issue":{"href":"https://api.github.com/repos/akveo/nebular/issues/203"},"comments":{"href":"https://api.github.com/repos/akveo/nebular/issues/203/comments"},"review_comments":{"href":"https://api.github.com/repos/akveo/nebular/pulls/203/comments"},"review_comment":{"href":"https://api.github.com/repos/akveo/nebular/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akveo/nebular/pulls/203/commits"},"statuses":{"href":"https://api.github.com/repos/akveo/nebular/statuses/8aa97967301b7832de064a3ae737c959a40e69da"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"KostyaDanovsky"}}