{"action":"created","comment":{"url":"https://api.github.com/repos/valantic/vue-template/pulls/comments/182438483","pull_request_review_id":113232724,"id":182438483,"diff_hunk":"@@ -0,0 +1,222 @@\n+<!-- This component has no <template> because of dynamic root element -->\n+\n+<template>\n+\n+  <div :class=\"b(modifiers)\">\n+    <input :value=\"value\"\n+           :class=\"b('field')\"\n+           :disabled=\"disabled\"\n+           :name=\"$attrs.name\"\n+           :placeholder=\"$attrs.placeholder\"\n+           @blur=\"hasFocus = false\"\n+           @focus=\"hasFocus = true\"\n+           @input=\"input($event.target.value)\"\n+           @mouseenter=\"hasHover = true\"\n+           @mouseleave=\"hasHover = false\"\n+    >\n+  </div>\n+\n+</template>\n+\n+<script>\n+  export default {\n+\n+    name: 'e-input',\n+    inheritAttrs: false,\n+\n+    // components: {},\n+    // mixins: [],\n+\n+    props: {\n+\n+      /**\n+       * User input passed by v-model\n+       */\n+      value: {\n+        default: null,\n+        required: false,\n+        type: String\n+      },\n+\n+      /**\n+       * Adds the state to the input field\n+       */\n+      state: {\n+        default: null,\n+        required: false,\n+        type: String,\n+        validator(value) {\n+          return [\n+            'error',\n+            'info',\n+            'success',\n+          ].includes(value);\n+        }\n+      },\n+\n+      /**\n+       * Adds active state\n+       */\n+      active: {\n+        type: Boolean,\n+        default: false,\n+      },\n+\n+      /**\n+       * Adds disabled state\n+       */\n+      disabled: {\n+        type: Boolean,\n+        default: false,\n+      },\n+\n+      /**\n+       * Adds focus state\n+       */\n+      focus: {\n+        type: Boolean,\n+        default: false,\n+      },\n+\n+      /**\n+       * Adds hover state\n+       */\n+      hover: {\n+        type: Boolean,\n+        default: false,\n+      },\n+\n+    },\n+\n+    data() {\n+      return {\n+        isActive: this.$props.active,\n+        isDisabled: this.$props.disabled,\n+        hasFocus: this.$props.focus,\n+        hasHover: this.$props.hover,\n+      };\n+    },\n+\n+    computed: {\n+\n+      /**\n+       * Adds state modifier classes to e-input\n+       * @returns  {Object}   BEM classes\n+       */\n+      modifiers() {\n+        return {\n+          active: this.isActive,\n+          disabled: this.isDisabled,\n+          focus: this.hasFocus,\n+          hover: this.hasHover,\n+          state: this.state,\n+        };\n+      }\n+    },\n+    // watch: {},\n+\n+    // beforeCreate() {},\n+    // created() {},\n+    // beforeMount() {},\n+    // mounted() {},\n+    // beforeUpdate() {},\n+    // updated() {},\n+    // activated() {},\n+    // deactivated() {},\n+    // beforeDestroy() {},\n+    // destroyed() {},\n+\n+    methods: {\n+      /**\n+       * Emits input to parent component\n+       * @param   {String}  value   Field input\n+       */\n+      input(value) {\n+        this.$emit('input', value);\n+      }\n+\n+    }\n+    // render() {},\n+  };\n+</script>\n+\n+<style lang=\"scss\">\n+  .e-input {\n+    @include half-border($color-grayscale--500);\n+\n+    border: 1px solid transparent;\n+    margin-bottom: $spacing--10;\n+    position: relative;\n+\n+    // input\n+    &__field {\n+      border: 1px solid transparent;\n+      border-radius: 2px;","path":"app/components/e-input.vue","position":154,"original_position":154,"commit_id":"24d0e641cca2753de4d2af5dd2997104c8e2b717","original_commit_id":"24d0e641cca2753de4d2af5dd2997104c8e2b717","user":{"login":"silvanbaumann","id":316247,"avatar_url":"https://avatars3.githubusercontent.com/u/316247?v=4","gravatar_id":"","url":"https://api.github.com/users/silvanbaumann","html_url":"https://github.com/silvanbaumann","followers_url":"https://api.github.com/users/silvanbaumann/followers","following_url":"https://api.github.com/users/silvanbaumann/following{/other_user}","gists_url":"https://api.github.com/users/silvanbaumann/gists{/gist_id}","starred_url":"https://api.github.com/users/silvanbaumann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silvanbaumann/subscriptions","organizations_url":"https://api.github.com/users/silvanbaumann/orgs","repos_url":"https://api.github.com/users/silvanbaumann/repos","events_url":"https://api.github.com/users/silvanbaumann/events{/privacy}","received_events_url":"https://api.github.com/users/silvanbaumann/received_events","type":"User","site_admin":false},"body":"Glad, that we now have a variable.  ;-)","created_at":"2018-04-18T14:05:18Z","updated_at":"2018-04-18T14:05:18Z","html_url":"https://github.com/valantic/vue-template/pull/9#discussion_r182438483","pull_request_url":"https://api.github.com/repos/valantic/vue-template/pulls/9","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/valantic/vue-template/pulls/comments/182438483"},"html":{"href":"https://github.com/valantic/vue-template/pull/9#discussion_r182438483"},"pull_request":{"href":"https://api.github.com/repos/valantic/vue-template/pulls/9"}},"in_reply_to_id":182050865},"pull_request":{"url":"https://api.github.com/repos/valantic/vue-template/pulls/9","id":181861362,"html_url":"https://github.com/valantic/vue-template/pull/9","diff_url":"https://github.com/valantic/vue-template/pull/9.diff","patch_url":"https://github.com/valantic/vue-template/pull/9.patch","issue_url":"https://api.github.com/repos/valantic/vue-template/issues/9","number":9,"state":"open","locked":false,"title":"Feature/wf 447","user":{"login":"silvanbaumann","id":316247,"avatar_url":"https://avatars3.githubusercontent.com/u/316247?v=4","gravatar_id":"","url":"https://api.github.com/users/silvanbaumann","html_url":"https://github.com/silvanbaumann","followers_url":"https://api.github.com/users/silvanbaumann/followers","following_url":"https://api.github.com/users/silvanbaumann/following{/other_user}","gists_url":"https://api.github.com/users/silvanbaumann/gists{/gist_id}","starred_url":"https://api.github.com/users/silvanbaumann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silvanbaumann/subscriptions","organizations_url":"https://api.github.com/users/silvanbaumann/orgs","repos_url":"https://api.github.com/users/silvanbaumann/repos","events_url":"https://api.github.com/users/silvanbaumann/events{/privacy}","received_events_url":"https://api.github.com/users/silvanbaumann/received_events","type":"User","site_admin":false},"body":"## Pull request\r\nAdds 'e-input'  component with several state options.\r\n \r\n### Ticket\r\nhttps://winterhalter-fenner.atlassian.net/browse/WF-447\r\n \r\n### Browser testing\r\nhttp://localhost:8080/styleguide/forms\r\nhttp://localhost:6060/styleguide#einput\r\n \r\n### Checklist\r\n- [x] Tested all links in project relevant browsers\r\n- [x] Tested all links in different screen sizes\r\n- [x] Did run automated tests and linters\r\n- [x] Did assign ticket\r\n- [x] Double checked target branch\r\n \r\n## Review/Test checklist\r\n- [x] Did run automated tests and linters\r\n- [x] Did review code\r\n- [ ] Tested all links in project relevant browsers\r\n- [ ] Tested all links in different screen sizes\r\n- [ ] Re-assign ticket to developer\r\n","created_at":"2018-04-16T13:30:50Z","updated_at":"2018-04-18T14:05:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/valantic/vue-template/pulls/9/commits","review_comments_url":"https://api.github.com/repos/valantic/vue-template/pulls/9/comments","review_comment_url":"https://api.github.com/repos/valantic/vue-template/pulls/comments{/number}","comments_url":"https://api.github.com/repos/valantic/vue-template/issues/9/comments","statuses_url":"https://api.github.com/repos/valantic/vue-template/statuses/24d0e641cca2753de4d2af5dd2997104c8e2b717","head":{"label":"valantic:feature/WF-447","ref":"feature/WF-447","sha":"24d0e641cca2753de4d2af5dd2997104c8e2b717","user":{"login":"valantic","id":37074558,"avatar_url":"https://avatars1.githubusercontent.com/u/37074558?v=4","gravatar_id":"","url":"https://api.github.com/users/valantic","html_url":"https://github.com/valantic","followers_url":"https://api.github.com/users/valantic/followers","following_url":"https://api.github.com/users/valantic/following{/other_user}","gists_url":"https://api.github.com/users/valantic/gists{/gist_id}","starred_url":"https://api.github.com/users/valantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valantic/subscriptions","organizations_url":"https://api.github.com/users/valantic/orgs","repos_url":"https://api.github.com/users/valantic/repos","events_url":"https://api.github.com/users/valantic/events{/privacy}","received_events_url":"https://api.github.com/users/valantic/received_events","type":"Organization","site_admin":false},"repo":{"id":124873048,"name":"vue-template","full_name":"valantic/vue-template","owner":{"login":"valantic","id":37074558,"avatar_url":"https://avatars1.githubusercontent.com/u/37074558?v=4","gravatar_id":"","url":"https://api.github.com/users/valantic","html_url":"https://github.com/valantic","followers_url":"https://api.github.com/users/valantic/followers","following_url":"https://api.github.com/users/valantic/following{/other_user}","gists_url":"https://api.github.com/users/valantic/gists{/gist_id}","starred_url":"https://api.github.com/users/valantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valantic/subscriptions","organizations_url":"https://api.github.com/users/valantic/orgs","repos_url":"https://api.github.com/users/valantic/repos","events_url":"https://api.github.com/users/valantic/events{/privacy}","received_events_url":"https://api.github.com/users/valantic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/valantic/vue-template","description":"A custom Vue.js boilerplate based on webpack.","fork":false,"url":"https://api.github.com/repos/valantic/vue-template","forks_url":"https://api.github.com/repos/valantic/vue-template/forks","keys_url":"https://api.github.com/repos/valantic/vue-template/keys{/key_id}","collaborators_url":"https://api.github.com/repos/valantic/vue-template/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/valantic/vue-template/teams","hooks_url":"https://api.github.com/repos/valantic/vue-template/hooks","issue_events_url":"https://api.github.com/repos/valantic/vue-template/issues/events{/number}","events_url":"https://api.github.com/repos/valantic/vue-template/events","assignees_url":"https://api.github.com/repos/valantic/vue-template/assignees{/user}","branches_url":"https://api.github.com/repos/valantic/vue-template/branches{/branch}","tags_url":"https://api.github.com/repos/valantic/vue-template/tags","blobs_url":"https://api.github.com/repos/valantic/vue-template/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/valantic/vue-template/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/valantic/vue-template/git/refs{/sha}","trees_url":"https://api.github.com/repos/valantic/vue-template/git/trees{/sha}","statuses_url":"https://api.github.com/repos/valantic/vue-template/statuses/{sha}","languages_url":"https://api.github.com/repos/valantic/vue-template/languages","stargazers_url":"https://api.github.com/repos/valantic/vue-template/stargazers","contributors_url":"https://api.github.com/repos/valantic/vue-template/contributors","subscribers_url":"https://api.github.com/repos/valantic/vue-template/subscribers","subscription_url":"https://api.github.com/repos/valantic/vue-template/subscription","commits_url":"https://api.github.com/repos/valantic/vue-template/commits{/sha}","git_commits_url":"https://api.github.com/repos/valantic/vue-template/git/commits{/sha}","comments_url":"https://api.github.com/repos/valantic/vue-template/comments{/number}","issue_comment_url":"https://api.github.com/repos/valantic/vue-template/issues/comments{/number}","contents_url":"https://api.github.com/repos/valantic/vue-template/contents/{+path}","compare_url":"https://api.github.com/repos/valantic/vue-template/compare/{base}...{head}","merges_url":"https://api.github.com/repos/valantic/vue-template/merges","archive_url":"https://api.github.com/repos/valantic/vue-template/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/valantic/vue-template/downloads","issues_url":"https://api.github.com/repos/valantic/vue-template/issues{/number}","pulls_url":"https://api.github.com/repos/valantic/vue-template/pulls{/number}","milestones_url":"https://api.github.com/repos/valantic/vue-template/milestones{/number}","notifications_url":"https://api.github.com/repos/valantic/vue-template/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/valantic/vue-template/labels{/name}","releases_url":"https://api.github.com/repos/valantic/vue-template/releases{/id}","deployments_url":"https://api.github.com/repos/valantic/vue-template/deployments","created_at":"2018-03-12T10:35:10Z","updated_at":"2018-04-10T06:10:00Z","pushed_at":"2018-04-18T13:21:30Z","git_url":"git://github.com/valantic/vue-template.git","ssh_url":"git@github.com:valantic/vue-template.git","clone_url":"https://github.com/valantic/vue-template.git","svn_url":"https://github.com/valantic/vue-template","homepage":null,"size":525,"stargazers_count":1,"watchers_count":1,"language":"Vue","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":6,"watchers":1,"default_branch":"master"}},"base":{"label":"valantic:develop","ref":"develop","sha":"52d4e003ba2a0c003100cbac867e247cf12dc786","user":{"login":"valantic","id":37074558,"avatar_url":"https://avatars1.githubusercontent.com/u/37074558?v=4","gravatar_id":"","url":"https://api.github.com/users/valantic","html_url":"https://github.com/valantic","followers_url":"https://api.github.com/users/valantic/followers","following_url":"https://api.github.com/users/valantic/following{/other_user}","gists_url":"https://api.github.com/users/valantic/gists{/gist_id}","starred_url":"https://api.github.com/users/valantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valantic/subscriptions","organizations_url":"https://api.github.com/users/valantic/orgs","repos_url":"https://api.github.com/users/valantic/repos","events_url":"https://api.github.com/users/valantic/events{/privacy}","received_events_url":"https://api.github.com/users/valantic/received_events","type":"Organization","site_admin":false},"repo":{"id":124873048,"name":"vue-template","full_name":"valantic/vue-template","owner":{"login":"valantic","id":37074558,"avatar_url":"https://avatars1.githubusercontent.com/u/37074558?v=4","gravatar_id":"","url":"https://api.github.com/users/valantic","html_url":"https://github.com/valantic","followers_url":"https://api.github.com/users/valantic/followers","following_url":"https://api.github.com/users/valantic/following{/other_user}","gists_url":"https://api.github.com/users/valantic/gists{/gist_id}","starred_url":"https://api.github.com/users/valantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valantic/subscriptions","organizations_url":"https://api.github.com/users/valantic/orgs","repos_url":"https://api.github.com/users/valantic/repos","events_url":"https://api.github.com/users/valantic/events{/privacy}","received_events_url":"https://api.github.com/users/valantic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/valantic/vue-template","description":"A custom Vue.js boilerplate based on webpack.","fork":false,"url":"https://api.github.com/repos/valantic/vue-template","forks_url":"https://api.github.com/repos/valantic/vue-template/forks","keys_url":"https://api.github.com/repos/valantic/vue-template/keys{/key_id}","collaborators_url":"https://api.github.com/repos/valantic/vue-template/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/valantic/vue-template/teams","hooks_url":"https://api.github.com/repos/valantic/vue-template/hooks","issue_events_url":"https://api.github.com/repos/valantic/vue-template/issues/events{/number}","events_url":"https://api.github.com/repos/valantic/vue-template/events","assignees_url":"https://api.github.com/repos/valantic/vue-template/assignees{/user}","branches_url":"https://api.github.com/repos/valantic/vue-template/branches{/branch}","tags_url":"https://api.github.com/repos/valantic/vue-template/tags","blobs_url":"https://api.github.com/repos/valantic/vue-template/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/valantic/vue-template/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/valantic/vue-template/git/refs{/sha}","trees_url":"https://api.github.com/repos/valantic/vue-template/git/trees{/sha}","statuses_url":"https://api.github.com/repos/valantic/vue-template/statuses/{sha}","languages_url":"https://api.github.com/repos/valantic/vue-template/languages","stargazers_url":"https://api.github.com/repos/valantic/vue-template/stargazers","contributors_url":"https://api.github.com/repos/valantic/vue-template/contributors","subscribers_url":"https://api.github.com/repos/valantic/vue-template/subscribers","subscription_url":"https://api.github.com/repos/valantic/vue-template/subscription","commits_url":"https://api.github.com/repos/valantic/vue-template/commits{/sha}","git_commits_url":"https://api.github.com/repos/valantic/vue-template/git/commits{/sha}","comments_url":"https://api.github.com/repos/valantic/vue-template/comments{/number}","issue_comment_url":"https://api.github.com/repos/valantic/vue-template/issues/comments{/number}","contents_url":"https://api.github.com/repos/valantic/vue-template/contents/{+path}","compare_url":"https://api.github.com/repos/valantic/vue-template/compare/{base}...{head}","merges_url":"https://api.github.com/repos/valantic/vue-template/merges","archive_url":"https://api.github.com/repos/valantic/vue-template/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/valantic/vue-template/downloads","issues_url":"https://api.github.com/repos/valantic/vue-template/issues{/number}","pulls_url":"https://api.github.com/repos/valantic/vue-template/pulls{/number}","milestones_url":"https://api.github.com/repos/valantic/vue-template/milestones{/number}","notifications_url":"https://api.github.com/repos/valantic/vue-template/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/valantic/vue-template/labels{/name}","releases_url":"https://api.github.com/repos/valantic/vue-template/releases{/id}","deployments_url":"https://api.github.com/repos/valantic/vue-template/deployments","created_at":"2018-03-12T10:35:10Z","updated_at":"2018-04-10T06:10:00Z","pushed_at":"2018-04-18T13:21:30Z","git_url":"git://github.com/valantic/vue-template.git","ssh_url":"git@github.com:valantic/vue-template.git","clone_url":"https://github.com/valantic/vue-template.git","svn_url":"https://github.com/valantic/vue-template","homepage":null,"size":525,"stargazers_count":1,"watchers_count":1,"language":"Vue","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":6,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/valantic/vue-template/pulls/9"},"html":{"href":"https://github.com/valantic/vue-template/pull/9"},"issue":{"href":"https://api.github.com/repos/valantic/vue-template/issues/9"},"comments":{"href":"https://api.github.com/repos/valantic/vue-template/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/valantic/vue-template/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/valantic/vue-template/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/valantic/vue-template/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/valantic/vue-template/statuses/24d0e641cca2753de4d2af5dd2997104c8e2b717"}},"author_association":"NONE"}}
{"actor":{"display_login":"silvanbaumann"}}