File

src/app/components/search/search.component.ts

Description

Search component ~extends SearchProviderComponent ~implements OnInit ~implements OnDestroy

Extends

SearchProviderComponent

Implements

OnInit OnDestroy

Metadata

Index

Properties
Methods
Inputs

Constructor

constructor(portfolioService: PortfolioService, engine: EngineService, inputService: InputService, uiService: UiService, searchHistoryService: SearchHistoryService, persistenceService: PersistenceService)

Constructs the Search component.

Parameters :
Name Type Optional Description
portfolioService PortfolioService No

The portfolio service injected dependency.

engine EngineService No

The engine service injected dependency.

inputService InputService No

The input service injected dependency.

uiService UiService No

The ui service injected dependency.

searchHistoryService SearchHistoryService No

The search history service injected dependency.

persistenceService PersistenceService No

The persistence service injected dependency.

Inputs

InstantSearch
Type : boolean

Instant search toggle setter.

position
Type : any

Instance identification position.

SearchToken
Type : string

Search token setter delegate.

Methods

Public keydown
keydown(event: KeyboardEvent)

Connect the keyboard.

Parameters :
Name Type Optional
event KeyboardEvent No
Returns : void
ngOnDestroy
ngOnDestroy()

Clean up upon desctuction of the component.

Returns : void
ngOnInit
ngOnInit()

Subscription

Returns : void
onFieldChange
onFieldChange(query: string)

Field change event handler.

Parameters :
Name Type Optional
query string No
Returns : void
onInstantSearchToggled
onInstantSearchToggled(value: boolean)

Instant search toggled event handler.

Parameters :
Name Type Optional
value boolean No
Returns : void
Public search
search()

Do search.

Returns : void
Public clearSearch
clearSearch()

Clear search-provider field.

Returns : void
Public keypress
keypress(event: KeyboardEvent)

Simulate keyboard clicks delegate.

Parameters :
Name Type Optional
event KeyboardEvent No
Returns : void
Public label
label(key: string)

Label delegate.

Parameters :
Name Type Optional
key string No
Returns : string
Public startAllOver
startAllOver()

Clear toggle state and any future view state and start all over.

Returns : void

Properties

Optional clickableClearSearch
Type : ElementRef
Decorators :
@ViewChild('clickableClearSearch')

Clear search clickable element.

Optional clickableSearch
Type : ElementRef
Decorators :
@ViewChild('clickableSearch')

Search clickable element.

Optional clickableStartAllOver
Type : ElementRef
Decorators :
@ViewChild('clickableStartAllOver')

Start all over clickable element.

Public Readonly persistenceService
Type : PersistenceService
The persistence service injected dependency.
Public Readonly portfolioService
Type : PortfolioService
The portfolio service injected dependency.
Public Readonly searchHistoryService
Type : SearchHistoryService
The search history service injected dependency.
searchTextElement
Type : ElementRef<HTMLInputElement>
Decorators :
@ViewChild('searchTextElement')

The search text element.

toolbar
Type : ToolbarComponent
Decorators :
@ViewChild('toolbar')

The toolbar element.

Public Readonly uiService
Type : UiService
The ui service injected dependency.
Public searchTokenChanged$
Type : Subject<string>
Default value : new Subject<string>()

SearchProvider token changed event.

./search.component.scss

@use "../stylesheets/stylesheets.component.scss" as component;
@use "../stylesheets/stylesheets.component.color.scss" as color;
@use "../../stylesheets/geometry.scss" as geometry;

header,
h1,
.label-block,
.checkbox-block,
.text-block {
  margin: 0px;
  padding: 0px;
}

.input-hint {
  color: color.$header-fore-color;
  font-size: 12px;
}

form {
  flex-wrap: nowrap;
}

.form-inline {
  align-items: start;
}

@media only screen and (max-device-width: 480px) {
  /* styles for mobile browsers smaller than 480px; (iPhone) (15 chunks)*/

  .label-block,
  .checkbox-block,
  .text-block {
    $size: component.$button-size;
    min-width: $size;
    min-height: $size;
    width: $size;
    height: $size;
    max-height: $size;
    max-width: $size;
  }

  header,
  h1 {
    $size: component.$button-size;
    min-height: $size;
    height: $size;
    max-height: $size;
  }

  .text-block {
    visibility: collapse;
  }
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""