Skip to content

Commit

Permalink
Updated link in README.
Browse files Browse the repository at this point in the history
Added ngx-pipe. Closes #216.
Replaced objToArr() with values pipe.
  • Loading branch information
imolorhe committed Feb 4, 2018
1 parent 1ed4b08 commit 1f64993
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 76 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ You can use Altair with either the light or the dark theme, depending on which t

### Missing feature?

Is there a feature that is missing? You can let us know by creating a [new issue](https://github.com/imolorhe/altair/issues/new) or you can add the feature by creating a [Pull Request](https://github.com/imolorhe/altair/blob/staging/CONTRIBUTING.md).
Is there a feature that is missing? You can let us know by creating a [new issue](https://github.com/imolorhe/altair/issues/new) or you can add the feature by creating a [Pull Request](https://github.com/imolorhe/altair/blob/staging/.github/CONTRIBUTING.md).

## Development server

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"ng2-toastr": "^4.1.2",
"ngrx-store-localstorage": "^0.3.0",
"ngx-electron": "^1.0.4",
"ngx-pipes": "^2.1.0",
"opencollective": "^1.0.3",
"rxjs": "^5.5.6",
"sortablejs": "^1.7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

<div class="doc-viewer-section doc-viewer-fields" *ngIf="data && data.getFields">
<div class="doc-viewer-section-title">{{ 'DOCS_FIELDS_TEXT' | translate }}</div>
<div class="doc-viewer-item doc-viewer-item-query" *ngFor="let item of objToArr(data.getFields());">
<div class="doc-viewer-item doc-viewer-item-query" *ngFor="let item of (data.getFields() | values);">
<div class="doc-viewer-item-query-inner">
<span class="no-link-link"
(click)="goToField(item.name, data.name)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,6 @@ export class DocViewerTypeComponent implements OnInit {
ngOnInit() {
}

/**
* Transform an object into an array
* @param obj
*/
objToArr(obj: any) {
const arr = [];

// Convert any object created with the dict pattern (Object.create(null)) to a regular object
const _obj = Object.assign({}, obj);

for (const key in _obj) {
if (_obj.hasOwnProperty(key)) {
arr.push(_obj[key]);
}
}

return arr;
}

/**
* Check if the current type is a root type
* @param type
Expand Down
19 changes: 0 additions & 19 deletions src/app/components/doc-viewer/doc-viewer/doc-viewer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,25 +217,6 @@ export class DocViewerComponent implements OnChanges {
console.log(this.searchResult);
}

/**
* Transform an object into an array
* @param obj
*/
objToArr(obj: any) {
const arr = [];

// Convert any object created with the dict pattern (Object.create(null)) to a regular object
const _obj = Object.assign({}, obj);

for (const key in _obj) {
if (_obj.hasOwnProperty(key)) {
arr.push(_obj[key]);
}
}

return arr;
}

/**
* Cleans out getType() names to contain only the type name itself
* @param name
Expand Down
19 changes: 0 additions & 19 deletions src/app/containers/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,25 +184,6 @@ export class AppComponent {
this.store.dispatch(new settingsActions.SetLanguageAction({ value: language }));
}

/**
* Transform an object into an array
* @param obj
*/
objToArr(obj: any) {
const arr = [];

// Convert any object created with the dict pattern (Object.create(null)) to a regular object
const _obj = Object.assign({}, obj);

for (const key in _obj) {
if (_obj.hasOwnProperty(key)) {
arr.push(_obj[key]);
}
}

return arr;
}

externalLink(e, url) {
e.preventDefault();

Expand Down
7 changes: 4 additions & 3 deletions src/app/reducers/query/initialQuery.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const initialQuery = `
# Welcome to Altair GraphQL Client.
# Welcome to Altair GraphQL Client.
# You can send your request using CmdOrCtrl + Enter.
# Enter your graphQL query here.
# Enter your graphQL query here.
`;

export {
initialQuery
initialQuery
};
7 changes: 5 additions & 2 deletions src/app/shared/shared.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@ import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';
import { NgxElectronModule } from 'ngx-electron';
import { SortablejsModule } from 'angular-sortablejs';
import { NgPipesModule } from 'ngx-pipes';

@NgModule({
imports: [
CommonModule,
TranslateModule,
NgxElectronModule,
SortablejsModule
SortablejsModule,
NgPipesModule
],
exports: [
TranslateModule,
NgxElectronModule,
SortablejsModule
SortablejsModule,
NgPipesModule
]
})
export class SharedModule { }
83 changes: 71 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,14 @@ [email protected]:
core-js "^2.4.0"
regenerator-runtime "^0.9.5"

[email protected]:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d"
dependencies:
babel-runtime "^6.22.0"
core-js "^2.4.0"
regenerator-runtime "^0.10.0"

[email protected]:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153"
Expand Down Expand Up @@ -1809,15 +1817,7 @@ center-align@^0.1.1:
align-text "^0.1.3"
lazy-cache "^1.0.3"

[email protected], chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba"
dependencies:
ansi-styles "^3.1.0"
escape-string-regexp "^1.0.5"
supports-color "^4.0.0"

chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3:
[email protected], chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
dependencies:
Expand All @@ -1827,6 +1827,14 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3:
strip-ansi "^3.0.0"
supports-color "^2.0.0"

[email protected], chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba"
dependencies:
ansi-styles "^3.1.0"
escape-string-regexp "^1.0.5"
supports-color "^4.0.0"

chalk@~2.2.0:
version "2.2.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.2.2.tgz#4403f5cf18f35c05f51fbdf152bf588f956cf7cb"
Expand Down Expand Up @@ -3775,7 +3783,7 @@ extend@3, extend@^3.0.0, extend@~3.0.0, extend@~3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444"

external-editor@^2.0.4:
external-editor@^2.0.1, external-editor@^2.0.4:
version "2.1.0"
resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.1.0.tgz#3d026a21b7f95b5726387d4200ac160d372c3b48"
dependencies:
Expand Down Expand Up @@ -4841,6 +4849,24 @@ ini@^1.3.4, ini@^1.3.5, ini@~1.3.0, ini@~1.3.3:
version "1.3.5"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"

[email protected]:
version "3.0.6"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.0.6.tgz#e04aaa9d05b7a3cb9b0f407d04375f0447190347"
dependencies:
ansi-escapes "^1.1.0"
chalk "^1.0.0"
cli-cursor "^2.1.0"
cli-width "^2.0.0"
external-editor "^2.0.1"
figures "^2.0.0"
lodash "^4.3.0"
mute-stream "0.0.7"
run-async "^2.2.0"
rx "^4.1.0"
string-width "^2.0.0"
strip-ansi "^3.0.0"
through "^2.3.6"

inquirer@^0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e"
Expand Down Expand Up @@ -6048,7 +6074,7 @@ [email protected]:
version "1.1.3"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.1.3.tgz#3bedfd91a92d39016fcfaa1c681e8faa1a1efda8"

minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@~1.2.0:
minimist@1.2.0, minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"

Expand Down Expand Up @@ -6222,6 +6248,10 @@ ngx-electron@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/ngx-electron/-/ngx-electron-1.0.4.tgz#2d80b25d74ae4d6226ad8b3bc4ecfa611e48fdca"

ngx-pipes@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/ngx-pipes/-/ngx-pipes-2.1.0.tgz#969cbc78f1c7512b12cc050f441c2528fb3a05a0"

nib@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/nib/-/nib-1.1.2.tgz#6a69ede4081b95c0def8be024a4c8ae0c2cbb6c7"
Expand All @@ -6234,6 +6264,13 @@ no-case@^2.2.0:
dependencies:
lower-case "^1.1.1"

[email protected]:
version "1.6.3"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.6.3.tgz#dc234edd6489982d58e8f0db4f695029abcd8c04"
dependencies:
encoding "^0.1.11"
is-stream "^1.0.1"

[email protected]:
version "1.7.3"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
Expand Down Expand Up @@ -6522,6 +6559,24 @@ [email protected]:
version "0.0.5"
resolved "https://registry.yarnpkg.com/open/-/open-0.0.5.tgz#42c3e18ec95466b6bf0dc42f3a2945c3f0cad8fc"

opencollective@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/opencollective/-/opencollective-1.0.3.tgz#aee6372bc28144583690c3ca8daecfc120dd0ef1"
dependencies:
babel-polyfill "6.23.0"
chalk "1.1.3"
inquirer "3.0.6"
minimist "1.2.0"
node-fetch "1.6.3"
opn "4.0.2"

[email protected]:
version "4.0.2"
resolved "https://registry.yarnpkg.com/opn/-/opn-4.0.2.tgz#7abc22e644dff63b0a96d5ab7f2790c0f01abc95"
dependencies:
object-assign "^4.0.1"
pinkie-promise "^2.0.0"

opn@^5.1.0, opn@~5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/opn/-/opn-5.1.0.tgz#72ce2306a17dbea58ff1041853352b4a8fc77519"
Expand Down Expand Up @@ -7588,7 +7643,7 @@ [email protected], regenerator-runtime@^0.11.0:
version "0.11.1"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"

regenerator-runtime@^0.10.5:
regenerator-runtime@^0.10.0, regenerator-runtime@^0.10.5:
version "0.10.5"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658"

Expand Down Expand Up @@ -7930,6 +7985,10 @@ rx-lite@^3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102"

rx@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782"

rxjs@^5.1.1, rxjs@^5.5.2, rxjs@^5.5.6:
version "5.5.6"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.6.tgz#e31fb96d6fd2ff1fd84bcea8ae9c02d007179c02"
Expand Down

0 comments on commit 1f64993

Please sign in to comment.