Skip to content

Commit

Permalink
feat: ansyn api (#1)
Browse files Browse the repository at this point in the history
* feat: ansyn api

* add AnsynApi on README

* css changes
  • Loading branch information
yairtawil authored Oct 11, 2018
1 parent 0ab3650 commit 53922e0
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 67 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,16 @@ on `app.component.html`:
<ansyn-app></ansyn-app>
...
```
`AnsynApi` service on `ansyn.component.ts`:
```typescript
import { AnsynApi } from '@ansyn/ansyn';

@Component({
...
})
export class AppComponent {
constructor(protected ansynApi: AnsynApi) {
}
}

```
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"@angular/platform-browser": "^6.0.3",
"@angular/platform-browser-dynamic": "^6.0.3",
"@angular/router": "^6.0.3",
"@ansyn/ansyn": "^0.2.8-2.2",
"@ansyn/assets": "^0.2.8-2.2",
"@ansyn/ansyn": "^0.2.8-2.3",
"@ansyn/assets": "^0.2.8-2.3",
"core-js": "^2.5.4",
"rxjs": "^6.0.0",
"zone.js": "^0.8.26"
Expand Down
12 changes: 10 additions & 2 deletions src/app/app.component.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
:host {
display: flex;
flex-direction: column;
width: 100vw;
height: 100vh;
padding: 10px;
box-sizing: border-box;
}
ansyn-app {
display: block;
width: 800px;
height: 800px;
flex: 1;
border: 5px solid darkgreen;
}
9 changes: 8 additions & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<h1> Angular 2 implementation </h1>
<div class="top">

<h1> Angular 2 implementation </h1>
<select (change)="setLayout($event.target.value)">
<option *ngFor="let layout of layoutKeys">{{ layout }}</option>
</select>

</div>

<ansyn-app></ansyn-app>
10 changes: 10 additions & 0 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
import { Component } from '@angular/core';
import { AnsynApi } from '@ansyn/ansyn';
import { LayoutKey, layoutOptions } from '@ansyn/core';

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
layoutKeys: LayoutKey[] = Array.from(layoutOptions.keys());

constructor(protected ansynApi: AnsynApi) {
}

setLayout(layout: LayoutKey): void {
this.ansynApi.changeMapLayout(layout);
}
}
3 changes: 1 addition & 2 deletions src/styles.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* You can add global styles to this file, and also import other style files */
body {
display: flex;
justify-content: center;
margin: 0;
}
120 changes: 60 additions & 60 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -175,19 +175,19 @@
dependencies:
tslib "^1.9.0"

"@ansyn/ansyn@^0.2.8-2.2":
version "0.2.8-2.2"
resolved "https://registry.yarnpkg.com/@ansyn/ansyn/-/ansyn-0.2.8-2.2.tgz#e9af6f48694d23ed44c319db14b93899422c7ecc"
dependencies:
"@ansyn/context" "0.2.82.2"
"@ansyn/core" "0.2.82.2"
"@ansyn/imagery" "0.2.82.2"
"@ansyn/map-facade" "0.2.82.2"
"@ansyn/menu" "0.2.82.2"
"@ansyn/menu-items" "0.2.82.2"
"@ansyn/overlays" "0.2.82.2"
"@ansyn/plugins" "0.2.82.2"
"@ansyn/status-bar" "0.2.82.2"
"@ansyn/ansyn@^0.2.8-2.3":
version "0.2.8-2.3"
resolved "https://registry.yarnpkg.com/@ansyn/ansyn/-/ansyn-0.2.8-2.3.tgz#92234190c4876fa53e9e69199aec03b7b9753a90"
dependencies:
"@ansyn/context" "0.2.82.3"
"@ansyn/core" "0.2.82.3"
"@ansyn/imagery" "0.2.82.3"
"@ansyn/map-facade" "0.2.82.3"
"@ansyn/menu" "0.2.82.3"
"@ansyn/menu-items" "0.2.82.3"
"@ansyn/overlays" "0.2.82.3"
"@ansyn/plugins" "0.2.82.3"
"@ansyn/status-bar" "0.2.82.3"
"@ngrx/core" "^1.2.0"
"@ngrx/effects" "^6.0.1"
"@ngrx/store" "^6.0.1"
Expand All @@ -199,29 +199,29 @@
tslib "^1.9.0"
wellknown "0.5.0"

"@ansyn/assets@^0.2.8-2.2":
version "0.2.8-2.2"
resolved "https://registry.yarnpkg.com/@ansyn/assets/-/assets-0.2.8-2.2.tgz#f19313300f9f623f80e6613aae7957ede32b3f93"
"@ansyn/assets@^0.2.8-2.3":
version "0.2.8-2.3"
resolved "https://registry.yarnpkg.com/@ansyn/assets/-/assets-0.2.8-2.3.tgz#04cd43ee9b37a6e575cbf51f95c97633c7a212b0"
dependencies:
"@ansyn/event-drops" "0.2.81.7"
flatpickr "4.1.2"
font-awesome "^4.7.0"
ol "4.6.3"
primeng "^6.1.4"

"@ansyn/context@0.2.82.2":
version "0.2.8-2.2"
resolved "https://registry.yarnpkg.com/@ansyn/context/-/context-0.2.8-2.2.tgz#e69cfdafa57432fb87dbde453aecacd14e1e621c"
"@ansyn/context@0.2.82.3":
version "0.2.8-2.3"
resolved "https://registry.yarnpkg.com/@ansyn/context/-/context-0.2.8-2.3.tgz#7f1e7d989ad1225a924979f58e55e209b3a061fb"
dependencies:
"@ansyn/core" "0.2.82.2"
"@ansyn/core" "0.2.82.3"
"@ngrx/core" "^1.2.0"
"@ngrx/entity" "^6.0.1"
"@ngrx/store" "^6.0.1"
tslib "^1.9.0"

"@ansyn/core@0.2.82.2":
version "0.2.8-2.2"
resolved "https://registry.yarnpkg.com/@ansyn/core/-/core-0.2.8-2.2.tgz#fb642a9fbc141863cbad8e3c0b37fe1b46f67b8b"
"@ansyn/core@0.2.82.3":
version "0.2.8-2.3"
resolved "https://registry.yarnpkg.com/@ansyn/core/-/core-0.2.8-2.3.tgz#078e82b00dbe67335728eb42eda9135b8ffd21f4"
dependencies:
"@ngrx/core" "^1.2.0"
"@ngrx/effects" "^6.0.1"
Expand All @@ -238,20 +238,20 @@
version "0.2.8-1.7"
resolved "https://registry.yarnpkg.com/@ansyn/event-drops/-/event-drops-0.2.8-1.7.tgz#8009a0edbc8e29da8d302db205b0dba4daec5016"

"@ansyn/imagery@0.2.82.2":
version "0.2.8-2.2"
resolved "https://registry.yarnpkg.com/@ansyn/imagery/-/imagery-0.2.8-2.2.tgz#0b7536f3563c04301264deca8731bd1c47b279fa"
"@ansyn/imagery@0.2.82.3":
version "0.2.8-2.3"
resolved "https://registry.yarnpkg.com/@ansyn/imagery/-/imagery-0.2.8-2.3.tgz#22f75b24f87d01c543a5a5f627f14f2eb4bab164"
dependencies:
"@ansyn/core" "0.2.82.2"
"@ansyn/core" "0.2.82.3"
auto-subscriptions "^1.0.3"
tslib "^1.9.0"

"@ansyn/map-facade@0.2.82.2":
version "0.2.8-2.2"
resolved "https://registry.yarnpkg.com/@ansyn/map-facade/-/map-facade-0.2.8-2.2.tgz#a0544b84ddcf0c3b0e267a16e598dd4fe1148f1b"
"@ansyn/map-facade@0.2.82.3":
version "0.2.8-2.3"
resolved "https://registry.yarnpkg.com/@ansyn/map-facade/-/map-facade-0.2.8-2.3.tgz#acb2815fda917272c836e7dec00a8fe6cab55dc6"
dependencies:
"@ansyn/core" "0.2.82.2"
"@ansyn/imagery" "0.2.82.2"
"@ansyn/core" "0.2.82.3"
"@ansyn/imagery" "0.2.82.3"
"@ngrx/core" "^1.2.0"
"@ngrx/effects" "^6.0.1"
"@ngrx/store" "^6.0.1"
Expand All @@ -262,13 +262,13 @@
lodash "4.17.5"
tslib "^1.9.0"

"@ansyn/menu-items@0.2.82.2":
version "0.2.8-2.2"
resolved "https://registry.yarnpkg.com/@ansyn/menu-items/-/menu-items-0.2.8-2.2.tgz#e26937d4188d400aeef76c1aba93e891ae1e45c5"
"@ansyn/menu-items@0.2.82.3":
version "0.2.8-2.3"
resolved "https://registry.yarnpkg.com/@ansyn/menu-items/-/menu-items-0.2.8-2.3.tgz#1e317efeed693e7023a588701da1a213081c76de"
dependencies:
"@ansyn/context" "0.2.82.2"
"@ansyn/core" "0.2.82.2"
"@ansyn/menu" "0.2.82.2"
"@ansyn/context" "0.2.82.3"
"@ansyn/core" "0.2.82.3"
"@ansyn/menu" "0.2.82.3"
"@ngrx/core" "^1.2.0"
"@ngrx/effects" "^6.0.1"
"@ngrx/entity" "^6.0.1"
Expand All @@ -290,21 +290,21 @@
tslib "^1.9.0"
wellknown "0.5.0"

"@ansyn/menu@0.2.82.2":
version "0.2.8-2.2"
resolved "https://registry.yarnpkg.com/@ansyn/menu/-/menu-0.2.8-2.2.tgz#9b159fbc5fde8a3499a0790f599691b2a11e7858"
"@ansyn/menu@0.2.82.3":
version "0.2.8-2.3"
resolved "https://registry.yarnpkg.com/@ansyn/menu/-/menu-0.2.8-2.3.tgz#c7d72b8696cddefce9ded1ba63aa66ce00d5193f"
dependencies:
"@ngrx/core" "^1.2.0"
"@ngrx/entity" "^6.0.1"
"@ngrx/store" "^6.0.1"
auto-subscriptions "^1.0.3"
tslib "^1.9.0"

"@ansyn/overlays@0.2.82.2":
version "0.2.8-2.2"
resolved "https://registry.yarnpkg.com/@ansyn/overlays/-/overlays-0.2.8-2.2.tgz#478118b7bc1fb348eddcf0da1b2f7e659ec6f75d"
"@ansyn/overlays@0.2.82.3":
version "0.2.8-2.3"
resolved "https://registry.yarnpkg.com/@ansyn/overlays/-/overlays-0.2.8-2.3.tgz#85d73db4e1e9883a603409079afd80289a6cea07"
dependencies:
"@ansyn/core" "0.2.82.2"
"@ansyn/core" "0.2.82.3"
"@ansyn/event-drops" "0.2.81.7"
"@ngrx/core" "^1.2.0"
"@ngrx/effects" "^6.0.1"
Expand All @@ -316,17 +316,17 @@
lodash "4.17.5"
tslib "^1.9.0"

"@ansyn/plugins@0.2.82.2":
version "0.2.8-2.2"
resolved "https://registry.yarnpkg.com/@ansyn/plugins/-/plugins-0.2.8-2.2.tgz#480e197791b82ca9f44c6660d766b1666ec72bed"
dependencies:
"@ansyn/context" "0.2.82.2"
"@ansyn/core" "0.2.82.2"
"@ansyn/imagery" "0.2.82.2"
"@ansyn/map-facade" "0.2.82.2"
"@ansyn/menu-items" "0.2.82.2"
"@ansyn/overlays" "0.2.82.2"
"@ansyn/status-bar" "0.2.82.2"
"@ansyn/plugins@0.2.82.3":
version "0.2.8-2.3"
resolved "https://registry.yarnpkg.com/@ansyn/plugins/-/plugins-0.2.8-2.3.tgz#a26fd3d72b2911778c8fa296229c0becad269d9a"
dependencies:
"@ansyn/context" "0.2.82.3"
"@ansyn/core" "0.2.82.3"
"@ansyn/imagery" "0.2.82.3"
"@ansyn/map-facade" "0.2.82.3"
"@ansyn/menu-items" "0.2.82.3"
"@ansyn/overlays" "0.2.82.3"
"@ansyn/status-bar" "0.2.82.3"
"@ngrx/core" "^1.2.0"
"@ngrx/effects" "^6.0.1"
"@ngrx/store" "^6.0.1"
Expand All @@ -337,11 +337,11 @@
ol "4.6.3"
tslib "^1.9.0"

"@ansyn/status-bar@0.2.82.2":
version "0.2.8-2.2"
resolved "https://registry.yarnpkg.com/@ansyn/status-bar/-/status-bar-0.2.8-2.2.tgz#c6d28fab3386a28adf36b1d2fc44c2b5f2a9f4d2"
"@ansyn/status-bar@0.2.82.3":
version "0.2.8-2.3"
resolved "https://registry.yarnpkg.com/@ansyn/status-bar/-/status-bar-0.2.8-2.3.tgz#efa2534ecc0bcfbd37599adcafc4ab09fea59a02"
dependencies:
"@ansyn/core" "0.2.82.2"
"@ansyn/core" "0.2.82.3"
"@ngrx/core" "^1.2.0"
"@ngrx/effects" "^6.0.1"
"@ngrx/store" "^6.0.1"
Expand Down

0 comments on commit 53922e0

Please sign in to comment.