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
/** | |
* @param scrollable The element being scrolled | |
* @param debounceMS The number of milliseconds to debounce scroll events | |
* @param sp The function returning the scroll position coordinates. | |
* @return A boolean valued observable indicating whether the element is scrolling up or down | |
*/ | |
export function scrollingUp( | |
scrollable: any, | |
debounceMS: number, | |
sp: scrollPosition): Observable<boolean> { |
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
import { ACTIVE_MENU_KEY, MENU_ITEMS } from './model'; | |
import { Injectable, OnDestroy } from '@angular/core'; | |
import { OStore} from "@fireflysemantics/slice"; | |
import { Observable } from "rxjs"; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class StateService { | |
public ostore:OStore = new OStore(); |
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
<mat-form-field floatLabel="never"> | |
<input matInput | |
#searchInput="matInput" | |
type="text" | |
placeholder="Search" | |
[value]="appState.todoStore.query" | |
(keyup)="appState.search($event.target.value)" | |
autocomplete="off"/> | |
<mat-icon [color]="searchInput.focused ? 'primary' : ''" | |
matSuffix>search</mat-icon> |
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
import { Injectable, OnDestroy } from '@angular/core' | |
import { OStore} from '@fireflysemantics/slice' | |
import { Observable } from 'rxjs' | |
import { MenuItems} from './model' | |
import { untilDestroyed } from 'ngx-take-until-destroy' | |
export const ACTIVE_MENU = "ACTIVE_MENU" | |
export const AUTHENTICATED = "AUTHENTICATED" | |
export const SAVED = "SAVED" |
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
/* | |
* Class mapped to the the contacts table in db.ts by the line: | |
* db.contacts.mapToClass(Contact) | |
*/ | |
export class Contact { | |
id: string; | |
firstName: string; | |
lastName: string; | |
emails: IEmailAddress[]; | |
phones: IPhoneNumber[]; |
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
import Dexie from 'dexie'; | |
import { IEmailAddress, | |
IPhoneNumber, | |
Contact } from './model'; | |
export class AppDatabase extends Dexie { | |
public contacts: Dexie.Table<Contact, string> | |
public emails: Dexie.Table<IEmailAddress, string> |
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
/* | |
* Class mapped to the the contacts table in db.ts by the line: | |
* db.contacts.mapToClass(Contact) | |
*/ | |
export class Contact extends AbstractEntity { | |
emails: EmailAddress[] | |
phones: PhoneNumber[] | |
constructor( | |
public firstName: string, |
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
import Dexie from 'dexie'; | |
import { EmailAddress, | |
PhoneNumber, | |
Contact } from './model'; | |
export class AppDatabase extends Dexie { | |
public contacts: Dexie.Table<Contact, string> | |
public emails: Dexie.Table<EmailAddress, number> |
OlderNewer