Commit 0a84fc23 authored by David Burke's avatar David Burke

Nativescript now runs with angular 8

parent f2538075
Pipeline #64263103 canceled with stage
This diff is collapsed.
......@@ -21,7 +21,7 @@ import {
]
})
export class ConfirmEmailComponent implements OnInit {
@ViewChild("codeInput") codeInput: ElementRef;
@ViewChild("codeInput", { static: true }) codeInput: ElementRef;
/** The error message, passed from the container to the template */
@Input() errorMessage: string;
......
......@@ -19,56 +19,35 @@ import { CheckboxComponent } from "../../shared/checkbox/checkbox.component";
selector: "register-component",
moduleId: module.id,
templateUrl: "./register.component.html",
styleUrls: ["./register.component.css", "../../shared/account-frame/account-frame.component.css"]
styleUrls: [
"./register.component.css",
"../../shared/account-frame/account-frame.component.css"
]
})
export class RegisterComponent {
@Input()
errorMessage: string;
@Input()
form: FormGroupState<IRegisterForm>;
@Input()
urlForm: FormGroupState<IUrlForm>;
// @Input()
// backupCode: string | null;
@Input()
isEmailTaken: boolean;
@Input()
isUrlValid: boolean | undefined;
@Input()
showUrl: string;
@Input()
isExtension: boolean;
@Input()
urlDisplayName: string;
@Input()
hasSubmitStarted: boolean;
@Input()
hasSubmitFinished: boolean;
@Output()
register = new EventEmitter();
@Output()
goToLogin = new EventEmitter<string>();
@Output()
checkEmail = new EventEmitter();
@Output()
checkUrl = new EventEmitter<string>();
@Output()
toggleShowConfirm = new EventEmitter();
@Output()
markAsSubmitted = new EventEmitter();
@Output()
incrementStage = new EventEmitter();
@Output()
switchStage = new EventEmitter<number>();
@Output()
displayUrlInput = new EventEmitter();
@Output()
hideUrlInput = new EventEmitter();
@Output()
setNewsletterSubscribe = new EventEmitter();
@Output()
registrationFinished = new EventEmitter();
@Input() errorMessage: string;
@Input() form: FormGroupState<IRegisterForm>;
@Input() urlForm: FormGroupState<IUrlForm>;
@Input() isEmailTaken: boolean;
@Input() isUrlValid: boolean | undefined;
@Input() showUrl: string;
@Input() isExtension: boolean;
@Input() urlDisplayName: string;
@Input() hasSubmitStarted: boolean;
@Input() hasSubmitFinished: boolean;
@Output() register = new EventEmitter();
@Output() goToLogin = new EventEmitter<string>();
@Output() checkEmail = new EventEmitter();
@Output() checkUrl = new EventEmitter<string>();
@Output() toggleShowConfirm = new EventEmitter();
@Output() markAsSubmitted = new EventEmitter();
@Output() incrementStage = new EventEmitter();
@Output() switchStage = new EventEmitter<number>();
@Output() displayUrlInput = new EventEmitter();
@Output() hideUrlInput = new EventEmitter();
@Output() setNewsletterSubscribe = new EventEmitter();
@Output() registrationFinished = new EventEmitter();
_stageValue: number;
passwordFocused = false;
......@@ -78,13 +57,14 @@ export class RegisterComponent {
passwordLengthHintText: FormattedString | null;
scrollableHeight: number;
@ViewChild("emailInput")
emailInput: TextFieldComponent;
@ViewChild("passwordInput")
// @Input()
// backupCode: string | null;
@ViewChild("emailInput", { static: false }) emailInput: TextFieldComponent;
@ViewChild("passwordInput", { static: false })
passwordInput: TextFieldComponent;
@ViewChild("newsletterInput")
@ViewChild("newsletterInput", { static: false })
newsletterInput: CheckboxComponent;
@ViewChild("registerScrollView")
@ViewChild("registerScrollView", { static: false })
registerScrollView: ElementRef;
constructor(private actionsSubject: ActionsSubject) {}
......
......@@ -18,53 +18,30 @@ import { RegisterStages } from "../constants";
animations: [flyInOut]
})
export class RegisterComponent {
@Input()
errorMessage: string;
@Input()
form: FormGroupState<IRegisterForm>;
@Input()
urlForm: FormGroupState<IUrlForm>;
@Input()
backupCode: string | null;
@Input()
isEmailTaken: boolean;
@Input()
isUrlValid: boolean | undefined;
@Input()
showUrl: string;
@Input()
isExtension: boolean;
@Input()
urlDisplayName: string;
@Input()
hasSubmitStarted: boolean;
@Input()
hasSubmitFinished: boolean;
@Output()
register = new EventEmitter();
@Output()
goToLogin = new EventEmitter<string>();
@Output()
checkEmail = new EventEmitter();
@Output()
checkUrl = new EventEmitter<string>();
@Output()
toggleShowConfirm = new EventEmitter();
@Output()
markAsSubmitted = new EventEmitter();
@Output()
incrementStage = new EventEmitter();
@Output()
switchStage = new EventEmitter<number>();
@Output()
displayUrlInput = new EventEmitter();
@Output()
hideUrlInput = new EventEmitter();
@Output()
setNewsletterSubscribe = new EventEmitter();
@Output()
registrationFinished = new EventEmitter();
@Input() errorMessage: string;
@Input() form: FormGroupState<IRegisterForm>;
@Input() urlForm: FormGroupState<IUrlForm>;
@Input() backupCode: string | null;
@Input() isEmailTaken: boolean;
@Input() isUrlValid: boolean | undefined;
@Input() showUrl: string;
@Input() isExtension: boolean;
@Input() urlDisplayName: string;
@Input() hasSubmitStarted: boolean;
@Input() hasSubmitFinished: boolean;
@Output() register = new EventEmitter();
@Output() goToLogin = new EventEmitter<string>();
@Output() checkEmail = new EventEmitter();
@Output() checkUrl = new EventEmitter<string>();
@Output() toggleShowConfirm = new EventEmitter();
@Output() markAsSubmitted = new EventEmitter();
@Output() incrementStage = new EventEmitter();
@Output() switchStage = new EventEmitter<number>();
@Output() displayUrlInput = new EventEmitter();
@Output() hideUrlInput = new EventEmitter();
@Output() setNewsletterSubscribe = new EventEmitter();
@Output() registrationFinished = new EventEmitter();
_stageValue: number;
passwordFocused = false;
......@@ -72,11 +49,8 @@ export class RegisterComponent {
backupCodeDownloaded: boolean;
stages = RegisterStages;
@ViewChild("passwordInput", { static: false })
passwordInput: ElementRef;
@ViewChild("newsletterInput", { static: false })
newsletterInput: ElementRef;
@ViewChild("passwordInput", { static: false }) passwordInput: ElementRef;
@ViewChild("newsletterInput", { static: false }) newsletterInput: ElementRef;
constructor() {}
......
......@@ -20,7 +20,7 @@ export class ListActionBarComponent {
@Output() search = new EventEmitter<string>();
@Output() clearSearch = new EventEmitter();
@ViewChild("searchBar") searchBar: ElementRef;
@ViewChild("searchBar", { static: false }) searchBar: ElementRef;
public onSearchChange(args: any) {
const textField = <TextField>args.object;
......
......@@ -59,7 +59,8 @@ export class SecretFormComponent {
});
}
@ViewChild("realPasswordInput") realPasswordInput: ElementRef;
@ViewChild("realPasswordInput", { static: false })
realPasswordInput: ElementRef;
constructor(private cd: ChangeDetectorRef) {}
......
......@@ -24,7 +24,7 @@ export class LoginComponent {
@Output() goToRegister = new EventEmitter();
@Output() goToResetPassword = new EventEmitter();
@ViewChild("password") password: ElementRef;
@ViewChild("password", { static: false }) password: ElementRef;
constructor(private actionsSubject: ActionsSubject) {}
......
......@@ -4,7 +4,7 @@ import { EffectsModule } from "@ngrx/effects";
import * as fromLogin from "./login.reducer";
import { TNSLoginEffects } from "./tns-login-effects.tns";
import { LoginComponent } from "./login.component.tns";
import { LoginComponent } from "./login.component";
import { LoginContainer } from "./login.container";
import { LoginEffects } from "./login.effects";
import { StoreModule } from "@ngrx/store";
......
......@@ -24,7 +24,7 @@ export class AccountFrameComponent implements OnChanges {
@Output() titleAction = new EventEmitter();
@Output() bottomLeftAction = new EventEmitter();
@ViewChild("ScrollList") scrollList: ElementRef;
@ViewChild("ScrollList", { static: false }) scrollList: ElementRef;
// scrolls to top when there are nonfield errors so the user can see the notification
ngOnChanges() {
......
......@@ -10,23 +10,28 @@ import { AbstractControlState } from "ngrx-forms";
@Component({
selector: "app-checkbox",
template: `
<FlexboxLayout flexDirection="row" alignItems="flex-start" justifyContent="space-between">
<StackLayout>
<Label
class="text-label m-b-5 m-t-2"
[text]="title"
textWrap="true"
></Label>
<Label
class="text-label text-label--light m-r-5"
[text]="subtext"
textWrap="true"
></Label>
</StackLayout>
<Switch #switch
[ngrxFormControlState]="control"
class="app-switch"
></Switch>
<FlexboxLayout
flexDirection="row"
alignItems="flex-start"
justifyContent="space-between"
>
<StackLayout>
<Label
class="text-label m-b-5 m-t-2"
[text]="title"
textWrap="true"
></Label>
<Label
class="text-label text-label--light m-r-5"
[text]="subtext"
textWrap="true"
></Label>
</StackLayout>
<Switch
#switch
[ngrxFormControlState]="control"
class="app-switch"
></Switch>
</FlexboxLayout>
`,
styles: [
......@@ -47,16 +52,11 @@ import { AbstractControlState } from "ngrx-forms";
changeDetection: ChangeDetectionStrategy.OnPush
})
export class CheckboxComponent {
@Input()
title: string;
@Input()
subtext: string;
@Input()
inline = false;
@Input()
control: AbstractControlState<boolean>;
@ViewChild("switch")
switch: ElementRef;
@Input() title: string;
@Input() subtext: string;
@Input() inline = false;
@Input() control: AbstractControlState<boolean>;
@ViewChild("switch", { static: false }) switch: ElementRef;
focusInput = () => {
this.switch.nativeElement.focus();
......
......@@ -26,7 +26,7 @@ import {
export class NsCheckboxComponent {
@Input() checked = false;
@Output() tap = new EventEmitter();
@ViewChild("CB") checkbox: ElementRef;
@ViewChild("CB", { static: false }) checkbox: ElementRef;
onTap() {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment