-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
517 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...search-selector-result-my-location/area-search-selector-result-my-location.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<app-area-search-selector-result icon='my-location' display='המיקום שלי' name='המיקום שלי' [state]='state'></app-area-search-selector-result> |
Empty file.
18 changes: 18 additions & 0 deletions
18
...a-search-selector-result-my-location/area-search-selector-result-my-location.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
import { AreaSearchState } from '../area-search-selector/area-search-selector.component'; | ||
|
||
@Component({ | ||
selector: 'app-area-search-selector-result-my-location', | ||
templateUrl: './area-search-selector-result-my-location.component.html', | ||
styleUrls: ['./area-search-selector-result-my-location.component.less'] | ||
}) | ||
export class AreaSearchSelectorResultMyLocationComponent implements OnInit { | ||
|
||
@Input() state: AreaSearchState; | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
...search-selector-result-nation-wide/area-search-selector-result-nation-wide.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<app-area-search-selector-result icon='nation-wide' display='בכל הארץ' name='בכל הארץ' [state]='state'></app-area-search-selector-result> |
Empty file.
18 changes: 18 additions & 0 deletions
18
...a-search-selector-result-nation-wide/area-search-selector-result-nation-wide.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
import { AreaSearchState } from '../area-search-selector/area-search-selector.component'; | ||
|
||
@Component({ | ||
selector: 'app-area-search-selector-result-nation-wide', | ||
templateUrl: './area-search-selector-result-nation-wide.component.html', | ||
styleUrls: ['./area-search-selector-result-nation-wide.component.less'] | ||
}) | ||
export class AreaSearchSelectorResultNationWideComponent implements OnInit { | ||
|
||
@Input() state: AreaSearchState; | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
...rc/app/area-search-selector-result-place/area-search-selector-result-place.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<app-area-search-selector-result icon='place' [display]='place.display' [name]='place.name' [state]='state'></app-area-search-selector-result> |
Empty file.
26 changes: 26 additions & 0 deletions
26
.../src/app/area-search-selector-result-place/area-search-selector-result-place.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
import { LngLatBoundsLike } from 'mapbox-gl'; | ||
import { AreaSearchState } from '../area-search-selector/area-search-selector.component'; | ||
|
||
export type PlaceResult = { | ||
name: string; | ||
display: string; | ||
bounds: LngLatBoundsLike; | ||
}; | ||
|
||
@Component({ | ||
selector: 'app-area-search-selector-result-place', | ||
templateUrl: './area-search-selector-result-place.component.html', | ||
styleUrls: ['./area-search-selector-result-place.component.less'] | ||
}) | ||
export class AreaSearchSelectorResultPlaceComponent implements OnInit { | ||
|
||
@Input() place: PlaceResult; | ||
@Input() state: AreaSearchState; | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
} |
6 changes: 6 additions & 0 deletions
6
projects/srm/src/app/area-search-selector-result/area-search-selector-result.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div class='result'> | ||
<div [class]='"icon " + icon'></div> | ||
<a class='title focusable' [innerHTML]='display' clickOnReturn [attr.aria-label]='name + " - מיקוד המפה לשם"' | ||
(focus)='state.focusResults()' (blur)='state.blurResults()' | ||
></a> | ||
</div> |
54 changes: 54 additions & 0 deletions
54
projects/srm/src/app/area-search-selector-result/area-search-selector-result.component.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
@import '../../common.less'; | ||
|
||
.result { | ||
width: 100%; | ||
height: 56px; | ||
padding: 0 12px; | ||
display: flex; | ||
flex-flow: row; | ||
align-items: center; | ||
gap: 12px; | ||
box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.10); | ||
background-color: @color-white; | ||
|
||
.icon { | ||
width: 32px; | ||
height: 32px; | ||
.background-image; | ||
background-size: 32px; | ||
&.place { | ||
background-image: url('../../assets/img/icon-place.svg'); | ||
} | ||
&.nation-wide { | ||
background-image: url('../../assets/img/icon-nation-wide.svg'); | ||
} | ||
&.my-location { | ||
background-image: url('../../assets/img/icon-my-location.svg'); | ||
} | ||
} | ||
|
||
a, a:visited, a:hover { | ||
flex: 1 1 auto; | ||
white-space: nowrap; | ||
color: @color-blue-1; | ||
.font-rag-sans; | ||
font-size: 20px; | ||
font-weight: 400; | ||
line-height: 20px; | ||
text-decoration: none; | ||
|
||
::ng-deep { | ||
.highlight { | ||
font-weight: 600; | ||
em { | ||
font-weight: 300; | ||
} | ||
} | ||
} | ||
} | ||
|
||
&:hover { | ||
background-color: @color-gray-7; | ||
cursor: pointer; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
projects/srm/src/app/area-search-selector-result/area-search-selector-result.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
import { AreaSearchState } from '../area-search-selector/area-search-selector.component'; | ||
|
||
@Component({ | ||
selector: 'app-area-search-selector-result', | ||
templateUrl: './area-search-selector-result.component.html', | ||
styleUrls: ['./area-search-selector-result.component.less'] | ||
}) | ||
export class AreaSearchSelectorResultComponent implements OnInit { | ||
|
||
@Input() icon: string; | ||
@Input() name: string; | ||
@Input() display: string; | ||
@Input() bounds: number[][]; | ||
@Input() state: AreaSearchState; | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
...ects/srm/src/app/area-search-selector-results/area-search-selector-results.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<div class='results' [style.width]='(state.resultsWidth | async) + "px"' *ngIf='state.showResults | async' | ||
(focus)='state.focusResults()' (blur)='state.blurResults()' | ||
> | ||
<ng-container *ngIf='(state.results | async) === null'> | ||
<app-area-search-selector-result-my-location [state]='state'></app-area-search-selector-result-my-location> | ||
<app-area-search-selector-result-nation-wide [state]='state'></app-area-search-selector-result-nation-wide> | ||
<app-area-search-selector-result-place [place]='place' [state]='state' *ngFor='let place of presets'></app-area-search-selector-result-place> | ||
</ng-container> | ||
<ng-container *ngIf='(state.results | async) !== null'> | ||
<app-area-search-selector-result-place [place]='place' [state]='state' *ngFor='let place of (state.results | async)'></app-area-search-selector-result-place> | ||
</ng-container> | ||
</div> |
11 changes: 11 additions & 0 deletions
11
...ects/srm/src/app/area-search-selector-results/area-search-selector-results.component.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@import '../../common.less'; | ||
|
||
.results { | ||
display: flex; | ||
flex-flow: column; | ||
background: @color-white; | ||
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25), 0px 12px 12px 0px rgba(0, 0, 0, 0.12), 0px 24px 24px 0px rgba(0, 0, 0, 0.06); | ||
max-height: calc(56px * 6); | ||
.no-scrollbars; | ||
overflow-y: scroll; | ||
} |
29 changes: 29 additions & 0 deletions
29
projects/srm/src/app/area-search-selector-results/area-search-selector-results.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
import { PlaceResult } from '../area-search-selector-result-place/area-search-selector-result-place.component'; | ||
import { Subject } from 'rxjs'; | ||
import { AreaSearchState } from '../area-search-selector/area-search-selector.component'; | ||
|
||
|
||
|
||
@Component({ | ||
selector: 'app-area-search-selector-results', | ||
templateUrl: './area-search-selector-results.component.html', | ||
styleUrls: ['./area-search-selector-results.component.less'] | ||
}) | ||
export class AreaSearchSelectorResultsComponent implements OnInit { | ||
|
||
@Input() state: AreaSearchState; | ||
|
||
presets: PlaceResult[] = [ | ||
{name: 'גוש דן', display: 'גוש דן', bounds: [[34.6, 31.8],[35.1, 32.181]]}, | ||
{name: 'איזור ירושלים', display: 'איזור ירושלים', bounds: [[34.9, 31.7], [35.3, 31.9]]}, | ||
{name: 'איזור הצפון', display: 'איזור הצפון', bounds: [[34.5, 32.5], [35.8, 33.3]]}, | ||
{name: 'איזור באר-שבע', display: 'איזור באר-שבע', bounds: [[34.5, 30.8], [35.5, 31.5]]}, | ||
]; | ||
|
||
constructor() { | ||
} | ||
|
||
ngOnInit(): void { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.