Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from aws-amplify:main #14

Merged
merged 1 commit into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ export class AmplifyAmazonButton {
@Prop()
handleAuthStateChange: AuthStateHandler = dispatchAuthStateChangeEvent;

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

private federatedSignIn = response => {
const { access_token, expires_in } = response;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import { Component, h, Host } from '@stencil/core';
tag: 'amplify-auth-container',
})
export class AmplifyAuthContainer {
componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}
render() {
return (
<Host>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ export class AmplifyAuthFields {
*/
@Prop() formFields: FormFieldTypes | string[];

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

private constructFormFieldOptions(formFields: FormFieldTypes | string[]) {
const content = [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ export class AmplifyAuth0Button {

private _auth0: any;

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

private handleLoad = () => {
// @ts-ignore Property 'auth0' does not exist on type '{}'.
const { oauth = {} } = Auth.configure();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ export class AmplifyAuthenticator {
};

async componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);

onAuthUIStateChange((authState, authData) => {
this.onAuthStateChange(authState, authData as CognitoUserInterface);
this.toastMessage = '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ export class AmplifyButton {
/** Name of icon to be placed inside the button */
@Prop() icon?: IconNameType;

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

render() {
return (
<Host>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ export class AmplifyChatbot {
* Lifecycle functions
*/
componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);

if (!Interactions || typeof Interactions.onComplete !== 'function') {
throw new Error(NO_INTERACTIONS_MODULE_FOUND);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ export class AmplifyCheckbox {
this.checked = !this.checked;
};

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

render() {
return (
<span class="checkbox">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ export class AmplifyCodeField {
/** Will disable the input if set to true */
@Prop() disabled?: boolean;

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

render() {
return (
<amplify-form-field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ export class AmplifyConfirmSignIn {
private constructedFormFieldOptions: FormFieldTypes | string[];

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
this.setup();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ export class AmplifyConfirmSignUp {
};

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);

this.setup();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ import { Component, h, Host } from '@stencil/core';
styleUrl: 'amplify-container.scss',
})
export class AmplifyContainer {
componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

render() {
return (
<Host>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export class AmplifyCountryDialCode {
private selectedDialCode: string;

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);

this.setSelectedDialCode();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ export class AmplifyEmailField {
/** Used for the hint text that displays underneath the input field */
@Prop() hint?: string | FunctionalComponent | null;

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

render() {
return (
<amplify-form-field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ export class AmplifyFacebookButton {
@Prop()
handleAuthStateChange: AuthStateHandler = dispatchAuthStateChangeEvent;

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

private federatedSignIn = authResponse => {
const { accessToken, expiresIn } = authResponse;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export class AmplifyFederatedButtons {
handleAuthStateChange: AuthStateHandler = dispatchAuthStateChangeEvent;

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);

if (!Auth || typeof Auth.configure !== 'function') {
throw new Error(NO_AUTH_MODULE_FOUND);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export class AmplifyFederatedSignIn {
@Prop() federated: any = {};

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);

if (!Auth || typeof Auth.configure !== 'function') {
throw new Error(NO_AUTH_MODULE_FOUND);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ export class AmplifyForgotPassword {
};

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);

checkUsernameAlias(this.usernameAlias);
this.buildFormFields();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ export class AmplifyFormField {
/** Will disable the input if set to true */
@Prop() disabled?: boolean;

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

render() {
return (
<div class="form-field">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ export class AmplifyFormSection {
this.handleSubmit(ev.detail);
}

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

render() {
return (
<form onSubmit={this.handleSubmit}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ export class AmplifyGoogleButton {
/** App-specific client ID from Google */
@Prop() clientId: FederatedConfig['googleClientId'];

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

private getAuthInstance() {
if (window['gapi'] && window['gapi'].auth2) {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ export class AmplifyGreetings {
@Prop()
handleAuthStateChange: AuthStateHandler = dispatchAuthStateChangeEvent;

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

render() {
return (
<header class="greetings">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ import { Component, h } from '@stencil/core';
shadow: true,
})
export class AmplifyHint {
componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

render() {
return (
<div class="hint">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ export class AmplifyIconButton {
/** (Optional) Whether or not to show the tooltip automatically */
@Prop() autoShowTooltip: boolean = false;

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

render() {
return (
<span class="action-button">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ export class AmplifyIcon {
@Prop() name: IconNameType;

@Watch('name')
componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

validateName(newValue: string) {
const isBlank = typeof newValue == null;
if (isBlank) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ export class AmplifyInput {
}

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);

// the below behaviors are only applicable if `amplify-input` is used by `amplify-authenticator`.
if (!closestElement('amplify-authenticator', this.el)) return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ export class AmplifyLabel {
/** Reflects the value of the for content property of html element */
@Prop() htmlFor: string;

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

render() {
return (
<label class="label" htmlFor={this.htmlFor}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ export class AmplifyLink {
/** The link role is used to identify an element that creates a hyperlink to a resource that is in the application or external */
@Prop() role: string = 'navigation';

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

render() {
return (
<a class="link" role={this.role}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import { Component, h } from '@stencil/core';
shadow: true,
})
export class AmplifyLoadingSpinner {
componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}
render() {
return <amplify-icon class="loading-spinner" name="loading" />;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import { Component, h } from '@stencil/core';
shadow: true,
})
export class AmplifyNav {
componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}
render() {
return (
<nav class="nav">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ export class AmplifyOAuthButton {
Auth.federatedSignIn();
}

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

render() {
return (
<amplify-sign-in-button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ export class AmplifyPasswordField {
/** Will disable the input if set to true */
@Prop() disabled?: boolean;

componentWillLoad() {
console.warn(
'Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'
);
}

render() {
return (
<amplify-form-field
Expand Down
Loading