{"action":"created","comment":{"url":"https://api.github.com/repos/onap-sdc/sdc-ui/pulls/comments/155521565","pull_request_review_id":81852959,"id":155521565,"diff_hunk":"@@ -1,28 +1,200 @@\n-import {Component, EventEmitter, Input, Output} from '@angular/core'\n+import {\n+    Component, EventEmitter, Input, Output, forwardRef, OnChanges, SimpleChanges, OnInit,\n+    ElementRef, ViewChild\n+} from '@angular/core'\n \n-export class DropdownValue {\n-    value:any;\n-    label:string;\n-\n-    constructor(value:any, label:string) {\n-        this.value = value;\n-        this.label = label;\n-    }\n-}\n+import {\n+     IDropDownOption,\n+    DropDownOptionType\n+} from \"./dropdown-models\";\n \n @Component({\n     selector: 'sdc-dropdown',\n     templateUrl: './dropdown.component.html',\n+    host: {\n+        '(document:click)': 'onClickOutside($event)',\n+    }\n })\n-export class DropDownComponent {\n+export class DropDownComponent implements OnChanges, OnInit {\n \n+    /**\n+     * Drop-down value changed event emitter\n+     */\n     @Output('valueChange') baseEmitter:EventEmitter<any> = new EventEmitter<any>();\n \n-    @Input() label:string;\n-    @Input() options:DropdownValue[] | string[];\n-    @Input() value:any;\n-    @Input() disabled:boolean;\n+    /**\n+     * The label that will show up above the drop-down\n+     */\n+    @Input() label: string;\n+\n+    /**\n+     * Option can be add by a list of IDropDownGroup, IDropDownItem objects, or a list of strings\n+     */\n+    //@Input() options: (IDropDownGroup|IDropDownItem|string)[];\n+\n+    @Input() options: IDropDownOption[];\n+\n+    /**\n+     * Initial value the drop-down should have\n+     */\n+    @Input() value: any;\n+\n+    /**\n+     * Drop-down disabled flag\n+     */\n+    @Input() disabled: boolean;\n+\n+    /**\n+     * The text users will see on the drop-down header when no option was selected\n+     */\n     @Input() placeHolder:string;\n+\n+    /**\n+     * Drop-down required flag\n+     */\n     @Input() required:boolean;\n \n+\n+    @Input() validate:boolean;\n+\n+    @Input() headless = false;\n+\n+    @ViewChild('dropDownWrapper') dropDownWrapper: ElementRef;\n+\n+    /**\n+     * Selected option index\n+     */\n+    public selectedIndex: number;\n+\n+    /**\n+     * Selected option label\n+     */\n+    public selectedLabel:string;\n+\n+    /**\n+     * Drop-down show/hide flag. default is false (closed)\n+     * @type {boolean}\n+     */\n+    public show = false;\n+\n+    /**\n+     * Error flag\n+     * @type {boolean}\n+     */\n+    public error: boolean;\n+\n+    /**\n+     * Export DropDownOptionType enum so we can use it on the template\n+     */\n+    public cIDropDownOptionType = DropDownOptionType;\n+\n+    /**\n+     * Configure unselectable option types\n+     */\n+    private unselectableOptions = [DropDownOptionType.Disable, DropDownOptionType.Header, DropDownOptionType.HorizontalLine];","path":"src/angular/form-elements/dropdown/dropdown.component.ts","position":109,"original_position":109,"commit_id":"d5def9efffb10765d8b5766f24d4d02abb9d6037","original_commit_id":"d5def9efffb10765d8b5766f24d4d02abb9d6037","user":{"login":"eliyahen","id":6380406,"avatar_url":"https://avatars0.githubusercontent.com/u/6380406?v=4","gravatar_id":"","url":"https://api.github.com/users/eliyahen","html_url":"https://github.com/eliyahen","followers_url":"https://api.github.com/users/eliyahen/followers","following_url":"https://api.github.com/users/eliyahen/following{/other_user}","gists_url":"https://api.github.com/users/eliyahen/gists{/gist_id}","starred_url":"https://api.github.com/users/eliyahen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliyahen/subscriptions","organizations_url":"https://api.github.com/users/eliyahen/orgs","repos_url":"https://api.github.com/users/eliyahen/repos","events_url":"https://api.github.com/users/eliyahen/events{/privacy}","received_events_url":"https://api.github.com/users/eliyahen/received_events","type":"User","site_admin":false},"body":"Liked this.","created_at":"2017-12-07T13:37:01Z","updated_at":"2017-12-07T13:37:01Z","html_url":"https://github.com/onap-sdc/sdc-ui/pull/168#discussion_r155521565","pull_request_url":"https://api.github.com/repos/onap-sdc/sdc-ui/pulls/168","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/onap-sdc/sdc-ui/pulls/comments/155521565"},"html":{"href":"https://github.com/onap-sdc/sdc-ui/pull/168#discussion_r155521565"},"pull_request":{"href":"https://api.github.com/repos/onap-sdc/sdc-ui/pulls/168"}}},"pull_request":{"url":"https://api.github.com/repos/onap-sdc/sdc-ui/pulls/168","id":154151041,"html_url":"https://github.com/onap-sdc/sdc-ui/pull/168","diff_url":"https://github.com/onap-sdc/sdc-ui/pull/168.diff","patch_url":"https://github.com/onap-sdc/sdc-ui/pull/168.patch","issue_url":"https://api.github.com/repos/onap-sdc/sdc-ui/issues/168","number":168,"state":"open","locked":false,"title":"Drop down","user":{"login":"ibaraness","id":18361980,"avatar_url":"https://avatars3.githubusercontent.com/u/18361980?v=4","gravatar_id":"","url":"https://api.github.com/users/ibaraness","html_url":"https://github.com/ibaraness","followers_url":"https://api.github.com/users/ibaraness/followers","following_url":"https://api.github.com/users/ibaraness/following{/other_user}","gists_url":"https://api.github.com/users/ibaraness/gists{/gist_id}","starred_url":"https://api.github.com/users/ibaraness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibaraness/subscriptions","organizations_url":"https://api.github.com/users/ibaraness/orgs","repos_url":"https://api.github.com/users/ibaraness/repos","events_url":"https://api.github.com/users/ibaraness/events{/privacy}","received_events_url":"https://api.github.com/users/ibaraness/received_events","type":"User","site_admin":false},"body":"Drop-down component ready to test on SDC-UI","created_at":"2017-11-22T13:19:19Z","updated_at":"2017-12-07T13:37:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a1472f6f21cc4e30a5decdb87a4c7ebe2d512c2b","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/onap-sdc/sdc-ui/pulls/168/commits","review_comments_url":"https://api.github.com/repos/onap-sdc/sdc-ui/pulls/168/comments","review_comment_url":"https://api.github.com/repos/onap-sdc/sdc-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/onap-sdc/sdc-ui/issues/168/comments","statuses_url":"https://api.github.com/repos/onap-sdc/sdc-ui/statuses/d5def9efffb10765d8b5766f24d4d02abb9d6037","head":{"label":"ibaraness:drop-down","ref":"drop-down","sha":"d5def9efffb10765d8b5766f24d4d02abb9d6037","user":{"login":"ibaraness","id":18361980,"avatar_url":"https://avatars3.githubusercontent.com/u/18361980?v=4","gravatar_id":"","url":"https://api.github.com/users/ibaraness","html_url":"https://github.com/ibaraness","followers_url":"https://api.github.com/users/ibaraness/followers","following_url":"https://api.github.com/users/ibaraness/following{/other_user}","gists_url":"https://api.github.com/users/ibaraness/gists{/gist_id}","starred_url":"https://api.github.com/users/ibaraness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibaraness/subscriptions","organizations_url":"https://api.github.com/users/ibaraness/orgs","repos_url":"https://api.github.com/users/ibaraness/repos","events_url":"https://api.github.com/users/ibaraness/events{/privacy}","received_events_url":"https://api.github.com/users/ibaraness/received_events","type":"User","site_admin":false},"repo":{"id":108277148,"name":"sdc-ui","full_name":"ibaraness/sdc-ui","owner":{"login":"ibaraness","id":18361980,"avatar_url":"https://avatars3.githubusercontent.com/u/18361980?v=4","gravatar_id":"","url":"https://api.github.com/users/ibaraness","html_url":"https://github.com/ibaraness","followers_url":"https://api.github.com/users/ibaraness/followers","following_url":"https://api.github.com/users/ibaraness/following{/other_user}","gists_url":"https://api.github.com/users/ibaraness/gists{/gist_id}","starred_url":"https://api.github.com/users/ibaraness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibaraness/subscriptions","organizations_url":"https://api.github.com/users/ibaraness/orgs","repos_url":"https://api.github.com/users/ibaraness/repos","events_url":"https://api.github.com/users/ibaraness/events{/privacy}","received_events_url":"https://api.github.com/users/ibaraness/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ibaraness/sdc-ui","description":"Shared UI styles and components","fork":true,"url":"https://api.github.com/repos/ibaraness/sdc-ui","forks_url":"https://api.github.com/repos/ibaraness/sdc-ui/forks","keys_url":"https://api.github.com/repos/ibaraness/sdc-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ibaraness/sdc-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ibaraness/sdc-ui/teams","hooks_url":"https://api.github.com/repos/ibaraness/sdc-ui/hooks","issue_events_url":"https://api.github.com/repos/ibaraness/sdc-ui/issues/events{/number}","events_url":"https://api.github.com/repos/ibaraness/sdc-ui/events","assignees_url":"https://api.github.com/repos/ibaraness/sdc-ui/assignees{/user}","branches_url":"https://api.github.com/repos/ibaraness/sdc-ui/branches{/branch}","tags_url":"https://api.github.com/repos/ibaraness/sdc-ui/tags","blobs_url":"https://api.github.com/repos/ibaraness/sdc-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ibaraness/sdc-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ibaraness/sdc-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/ibaraness/sdc-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ibaraness/sdc-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/ibaraness/sdc-ui/languages","stargazers_url":"https://api.github.com/repos/ibaraness/sdc-ui/stargazers","contributors_url":"https://api.github.com/repos/ibaraness/sdc-ui/contributors","subscribers_url":"https://api.github.com/repos/ibaraness/sdc-ui/subscribers","subscription_url":"https://api.github.com/repos/ibaraness/sdc-ui/subscription","commits_url":"https://api.github.com/repos/ibaraness/sdc-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/ibaraness/sdc-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/ibaraness/sdc-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/ibaraness/sdc-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/ibaraness/sdc-ui/contents/{+path}","compare_url":"https://api.github.com/repos/ibaraness/sdc-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ibaraness/sdc-ui/merges","archive_url":"https://api.github.com/repos/ibaraness/sdc-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ibaraness/sdc-ui/downloads","issues_url":"https://api.github.com/repos/ibaraness/sdc-ui/issues{/number}","pulls_url":"https://api.github.com/repos/ibaraness/sdc-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/ibaraness/sdc-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/ibaraness/sdc-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ibaraness/sdc-ui/labels{/name}","releases_url":"https://api.github.com/repos/ibaraness/sdc-ui/releases{/id}","deployments_url":"https://api.github.com/repos/ibaraness/sdc-ui/deployments","created_at":"2017-10-25T13:52:34Z","updated_at":"2017-12-04T13:26:40Z","pushed_at":"2017-12-06T10:18:32Z","git_url":"git://github.com/ibaraness/sdc-ui.git","ssh_url":"git@github.com:ibaraness/sdc-ui.git","clone_url":"https://github.com/ibaraness/sdc-ui.git","svn_url":"https://github.com/ibaraness/sdc-ui","homepage":"http://ibaraness.github.io/sdc-ui","size":1488,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"onap-sdc:master","ref":"master","sha":"7993ec826f409c5c0d67f0254cb62e46f1b497f7","user":{"login":"onap-sdc","id":26852403,"avatar_url":"https://avatars1.githubusercontent.com/u/26852403?v=4","gravatar_id":"","url":"https://api.github.com/users/onap-sdc","html_url":"https://github.com/onap-sdc","followers_url":"https://api.github.com/users/onap-sdc/followers","following_url":"https://api.github.com/users/onap-sdc/following{/other_user}","gists_url":"https://api.github.com/users/onap-sdc/gists{/gist_id}","starred_url":"https://api.github.com/users/onap-sdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onap-sdc/subscriptions","organizations_url":"https://api.github.com/users/onap-sdc/orgs","repos_url":"https://api.github.com/users/onap-sdc/repos","events_url":"https://api.github.com/users/onap-sdc/events{/privacy}","received_events_url":"https://api.github.com/users/onap-sdc/received_events","type":"User","site_admin":false},"repo":{"id":86983260,"name":"sdc-ui","full_name":"onap-sdc/sdc-ui","owner":{"login":"onap-sdc","id":26852403,"avatar_url":"https://avatars1.githubusercontent.com/u/26852403?v=4","gravatar_id":"","url":"https://api.github.com/users/onap-sdc","html_url":"https://github.com/onap-sdc","followers_url":"https://api.github.com/users/onap-sdc/followers","following_url":"https://api.github.com/users/onap-sdc/following{/other_user}","gists_url":"https://api.github.com/users/onap-sdc/gists{/gist_id}","starred_url":"https://api.github.com/users/onap-sdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onap-sdc/subscriptions","organizations_url":"https://api.github.com/users/onap-sdc/orgs","repos_url":"https://api.github.com/users/onap-sdc/repos","events_url":"https://api.github.com/users/onap-sdc/events{/privacy}","received_events_url":"https://api.github.com/users/onap-sdc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/onap-sdc/sdc-ui","description":"Shared UI styles and components","fork":false,"url":"https://api.github.com/repos/onap-sdc/sdc-ui","forks_url":"https://api.github.com/repos/onap-sdc/sdc-ui/forks","keys_url":"https://api.github.com/repos/onap-sdc/sdc-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/onap-sdc/sdc-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/onap-sdc/sdc-ui/teams","hooks_url":"https://api.github.com/repos/onap-sdc/sdc-ui/hooks","issue_events_url":"https://api.github.com/repos/onap-sdc/sdc-ui/issues/events{/number}","events_url":"https://api.github.com/repos/onap-sdc/sdc-ui/events","assignees_url":"https://api.github.com/repos/onap-sdc/sdc-ui/assignees{/user}","branches_url":"https://api.github.com/repos/onap-sdc/sdc-ui/branches{/branch}","tags_url":"https://api.github.com/repos/onap-sdc/sdc-ui/tags","blobs_url":"https://api.github.com/repos/onap-sdc/sdc-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/onap-sdc/sdc-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/onap-sdc/sdc-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/onap-sdc/sdc-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/onap-sdc/sdc-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/onap-sdc/sdc-ui/languages","stargazers_url":"https://api.github.com/repos/onap-sdc/sdc-ui/stargazers","contributors_url":"https://api.github.com/repos/onap-sdc/sdc-ui/contributors","subscribers_url":"https://api.github.com/repos/onap-sdc/sdc-ui/subscribers","subscription_url":"https://api.github.com/repos/onap-sdc/sdc-ui/subscription","commits_url":"https://api.github.com/repos/onap-sdc/sdc-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/onap-sdc/sdc-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/onap-sdc/sdc-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/onap-sdc/sdc-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/onap-sdc/sdc-ui/contents/{+path}","compare_url":"https://api.github.com/repos/onap-sdc/sdc-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/onap-sdc/sdc-ui/merges","archive_url":"https://api.github.com/repos/onap-sdc/sdc-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/onap-sdc/sdc-ui/downloads","issues_url":"https://api.github.com/repos/onap-sdc/sdc-ui/issues{/number}","pulls_url":"https://api.github.com/repos/onap-sdc/sdc-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/onap-sdc/sdc-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/onap-sdc/sdc-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/onap-sdc/sdc-ui/labels{/name}","releases_url":"https://api.github.com/repos/onap-sdc/sdc-ui/releases{/id}","deployments_url":"https://api.github.com/repos/onap-sdc/sdc-ui/deployments","created_at":"2017-04-02T11:59:26Z","updated_at":"2017-11-30T07:50:10Z","pushed_at":"2017-12-07T12:57:58Z","git_url":"git://github.com/onap-sdc/sdc-ui.git","ssh_url":"git@github.com:onap-sdc/sdc-ui.git","clone_url":"https://github.com/onap-sdc/sdc-ui.git","svn_url":"https://github.com/onap-sdc/sdc-ui","homepage":"http://onap-sdc.github.io/sdc-ui","size":2568,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":44,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":21,"open_issues":44,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/onap-sdc/sdc-ui/pulls/168"},"html":{"href":"https://github.com/onap-sdc/sdc-ui/pull/168"},"issue":{"href":"https://api.github.com/repos/onap-sdc/sdc-ui/issues/168"},"comments":{"href":"https://api.github.com/repos/onap-sdc/sdc-ui/issues/168/comments"},"review_comments":{"href":"https://api.github.com/repos/onap-sdc/sdc-ui/pulls/168/comments"},"review_comment":{"href":"https://api.github.com/repos/onap-sdc/sdc-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/onap-sdc/sdc-ui/pulls/168/commits"},"statuses":{"href":"https://api.github.com/repos/onap-sdc/sdc-ui/statuses/d5def9efffb10765d8b5766f24d4d02abb9d6037"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"eliyahen"}}