Skip to content

Commit

Permalink
Added functionality to open parent type in a doc viewer search result.
Browse files Browse the repository at this point in the history
Closes #277.
  • Loading branch information
imolorhe committed May 9, 2018
1 parent b2fca52 commit 26940cd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
Expand Up @@ -22,7 +22,7 @@
</ng-container>
</ng-container>
<div class="doc-viewer-search-result-item-inner">
<span *ngIf="!result.isQuery && result.type" class="doc-viewer-search-result-parent-type">{{result.type}}.</span><span [ngClass]="{'doc-viewer-search-result-highlight': result.highlight !== 'argument'}">{{ result.name }}</span>
<span *ngIf="!result.isQuery && result.type" class="doc-viewer-search-result-parent-type" (click)="goToItem(result.type, null, 'type')">{{result.type}}.</span><span [ngClass]="{'doc-viewer-search-result-highlight': result.highlight !== 'argument'}">{{ result.name }}</span>
<ng-container *ngIf="result.args && result.args.length">
(
<span [ngClass]="{'doc-viewer-search-result-highlight': result.highlight === 'argument'}" *ngFor="let arg of result.args; let last = last">
Expand Down
Expand Up @@ -135,6 +135,7 @@ app-doc-viewer{
}
.doc-viewer-search-result-parent-type{
color: $theme-off-font-color;
text-decoration: underline;
}
.doc-viewer-search-result-cat{
position: absolute;
Expand Down
30 changes: 18 additions & 12 deletions yarn.lock
Expand Up @@ -53,9 +53,9 @@
dependencies:
tslib "^1.7.1"

"@angular/cdk@5.2.4":
version "5.2.4"
resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-5.2.4.tgz#c0a429a8710d8fedb157f546e21cb49d4335f7f7"
"@angular/cdk@5.2.5":
version "5.2.5"
resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-5.2.5.tgz#cae2b12e1990a692dd267a73fdb1d49db37f9604"
dependencies:
tslib "^1.7.1"

Expand Down Expand Up @@ -228,9 +228,11 @@
version "9.0.2"
resolved "https://registry.yarnpkg.com/@ngx-translate/core/-/core-9.0.2.tgz#d4cab861e3ea8ea14a6df5dcd744dfeb29fb15e2"

"@ngx-translate/http-loader@^2.0.1":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@ngx-translate/http-loader/-/http-loader-2.0.1.tgz#aa67788e64bfa8652691a77b022b3b4031209113"
"@ngx-translate/http-loader@^3.0.0":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@ngx-translate/http-loader/-/http-loader-3.0.1.tgz#20b0f98bc6c25321129d3e3302ab3cc489c0a42a"
dependencies:
tslib "^1.9.0"

"@paulcbetts/mime-db@~1.22.0":
version "1.22.4"
Expand Down Expand Up @@ -278,9 +280,9 @@
version "0.11.7"
resolved "https://registry.yarnpkg.com/@types/graphql/-/graphql-0.11.7.tgz#da39a2f7c74e793e32e2bb7b3b68da1691532dd5"

"@types/jasmine@2.8.6":
version "2.8.6"
resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.8.6.tgz#14445b6a1613cf4e05dd61c3c3256d0e95c0421e"
"@types/jasmine@2.8.7":
version "2.8.7"
resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.8.7.tgz#3fe583928ae0a22cdd34cedf930eeffeda2602fd"

"@types/lodash@^4.14.85":
version "4.14.92"
Expand All @@ -302,9 +304,9 @@
version "8.9.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.9.4.tgz#dfd327582a06c114eb6e0441fa3d6fab35edad48"

"@types/node@~9.6.0":
version "9.6.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.0.tgz#d3480ee666df9784b1001a1872a2f6ccefb6c2d7"
"@types/node@~10.0.3":
version "10.0.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.0.6.tgz#c0bce8e539bf34c1b850c13ff46bead2fecc2e58"

"@types/q@^0.0.32":
version "0.0.32"
Expand Down Expand Up @@ -10912,6 +10914,10 @@ tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1:
version "1.8.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.8.1.tgz#6946af2d1d651a7b1863b531d6e5afa41aa44eac"

tslib@^1.9.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8"

tslint@^5.9.1:
version "5.9.1"
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.9.1.tgz#1255f87a3ff57eb0b0e1f0e610a8b4748046c9ae"
Expand Down

0 comments on commit 26940cd

Please sign in to comment.