Skip to content

Commit

Permalink
chore(in-app-messaging): merge main in to in-app-messaging/main from …
Browse files Browse the repository at this point in the history
…latest release commit (#2485)

* chore: Update yarn.lock (#2440)

* update yarn.lock

* updated yarn.lock to include geocoder update

Co-authored-by: Joe Buono <[email protected]>

* Fix location search bug (#2450)

* fix: update maplibre-gl-js-amplify to v2.0.3 to fix location search bug

* fix: update to maplibre-gl-js-amplify v2.0.4

* fix: pin maplibre-gl-js-amplify version

* Create hip-horses-arrive.md

* fix(react): hide svg icon images in a11y tree in Rating component (#2469)

* fix(react): hide svg icon images in a11y tree in Rating component

* Version Packages (#2461)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix(docs): type error on fragment (#2477)

Co-authored-by: 0618 <[email protected]>

* add @types/react to resolutions field

* chore(ui): Set `predictableActionArguments` to true (#2468)

* Set `predictableActionArguments` to true

* Create clean-suns-fix.md

* Add predictableActionArguments to `true`

* Delete the auth-with-username environment (#2489)

* Revert "chore(ui): Set `predictableActionArguments` to true (#2468)" (#2492)

This reverts commit 665c426.

* fix(ci): Change e2e environments to auth-with-username-no-attributes (#2491)

* Change e2e environments to auth-with-username-no-attributes

* Remove additional attribute from sign-up test

Co-authored-by: William Lee <[email protected]>

* chore: remove stale chmod line in package.json (#2497)

* Remove chmod in package.json

* remove chmod in canary as well

* [REVERT] poc run without chmod

* [REVERT]: add missing environement

* [REVERT]: Add amplify cli

* trigger-ci

* [REVERT]: Remove unneeded codes in POC workflow

* use yarn environments pull instead of yarn pull

* Why doesn't this work?

* This should work!

* Remove duplciate shell call

* Remove poc workflow

* chore(hosting): Skip cypress binary installation (#2508)

* chore(environments): move environments to their own folder (#2501)

* Split environments into respective folders

* chore(environments): Update scripts for environments split (#2502)

* Initial approach

* Simpler solution

* Add auth/geo/datastore scripts

* Add general pull command

* Explicitly get path to the shell file

* fix typo

* chore(environments): update `awsExports` to point to new paths (#2504)

* Update react aws-exports

* Vue aws-exports update

* Angular aws-exports updates

* Dial code (#2459)

* rename countryCode to dialCode

* begin deprecating countryCode by adding in duplicate dialCode props and updating all examples to use dialCode props

* update props table

* duplicate phone number field tests using dialCode

* update tests

* add required field to phoneNumberFieldProps, added deprecation warning

* update e2e tests

* update phone number field documentation

* rename countrycode files to dialcode

* update angular and vue dial code select name

* update angular and vue to dial code

* return default label to country code and undo e2e test changes

* update unit tests

* update e2e tests to revert change to dial code

* Create swift-kids-help.md

* Update docs/src/pages/[platform]/components/phonenumberfield/react.mdx

add `role="none"` to docs alert

Co-authored-by: Heather Buchel <[email protected]>

* Update swift-kids-help.md

Co-authored-by: Jacob Logan <[email protected]>
Co-authored-by: Heather Buchel <[email protected]>

* Add troubleshooting steps for CRA and geo components (#2511)

* fix(environments): fix environments pull on CI (#2512)

* POC run against guides

* Try bash instead of sh

* Add debug line

* Use printf instead of echo

* Add more comments

* Update import path in guides

* Adjust comments

* Adjust comment

* Remove extraneous comments

* More comments adjustment

* Revert "POC run against guides"

This reverts commit 88bceca.

* update changeset (#2515)

Co-authored-by: Jacob Logan <[email protected]>

Co-authored-by: Joe Buono <[email protected]>
Co-authored-by: Joe Buono <[email protected]>
Co-authored-by: thaddmt <[email protected]>
Co-authored-by: Heather Buchel <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: MJ <[email protected]>
Co-authored-by: 0618 <[email protected]>
Co-authored-by: William Lee <[email protected]>
Co-authored-by: Shane Laymance <[email protected]>
Co-authored-by: jacoblogan <[email protected]>
Co-authored-by: Jacob Logan <[email protected]>
  • Loading branch information
13 people authored Aug 25, 2022
1 parent a5f0a74 commit cffdf7f
Show file tree
Hide file tree
Showing 323 changed files with 2,290 additions and 3,958 deletions.
17 changes: 17 additions & 0 deletions .changeset/swift-kids-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"@aws-amplify/ui-vue": patch
"@aws-amplify/ui-react": minor
"@aws-amplify/ui-angular": patch
---

Angular: Add `amplify-dialcodeselect` class which contains the previous countrycodeselect styles
Vue: Add `amplify-dialcodeselect` class which contains the previous countrycodeselect styles
React: Added 'dialCode' versions of all 'countryCode' props so that users can begin migrating away from the deprecated `countryCode`.

```
countryCodeLabel => dialCodeLabel
countryCodeName => dialCodeName
onCountryCodeChange => onDialCodeChange
countryCodeRef => dialCodeRef
defaultCountryCode => defaultDialCode
```
3 changes: 3 additions & 0 deletions amplify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ applications:
- export FLUTTER_HOME=${HOME}/sdks/flutter
- git clone -b stable --depth 1 https://github.com/flutter/flutter.git ${FLUTTER_HOME}
- export PATH="$PATH:${FLUTTER_HOME}/bin"
# Skip cypress binary installation, as it's unneeded for docs and often fails transiently
# https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation
- export CYPRESS_INSTALL_BINARY=0
- (cd .. && yarn install && yarn build)
build:
commands:
Expand Down
2 changes: 1 addition & 1 deletion canary/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"build": "yarn react && yarn vue && yarn angular",
"clean": "rimraf ./**/yarn.lock && rimraf ./**/node_modules",
"install": "yarn react:install && yarn vue:install && yarn angular:install",
"pull": "chmod +x ./environments/pull-environments.sh && ./environments/pull-environments.sh",
"pull": "./environments/pull-environments.sh",
"script:install": "yarn --cwd script",
"setup:next": "rm ../postcss.config.js && yarn script:install && yarn updatePackage",
"test": "yarn --cwd e2e test",
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"test": "$_ run build"
},
"dependencies": {
"@aws-amplify/ui-react": "3.4.0",
"@aws-amplify/ui-react": "3.4.1",
"@cucumber/gherkin": "^19.0.3",
"@cucumber/messages": "^16.0.1",
"@docsearch/react": "3",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/Fragment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface FragmentProps {
* Note: if this is true, platforms={['web']} should be used to enable web content instead of platforms={['react', 'vue', 'angular']}
*/
useCommonWebContent?: boolean;
children: ({ platform: string }) => LoaderComponent;
children: ({ platform }: { platform: string }) => LoaderComponent;
}

const shouldRenderFragment = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export interface PhoneNumberFieldPropControlsProps
setValue: (
value: React.SetStateAction<PhoneNumberFieldProps['value']>
) => void;
setDefaultCountryCode: (
value: React.SetStateAction<PhoneNumberFieldProps['defaultCountryCode']>
setDefaultDialCode: (
value: React.SetStateAction<PhoneNumberFieldProps['defaultDialCode']>
) => void;
}

Expand Down
10 changes: 5 additions & 5 deletions docs/src/pages/[platform]/components/phonenumberfield/demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { getPropString } from '../utils/getPropString';
const propsToCode = (props) => {
return (
`<PhoneNumberField` +
`\n defaultCountryCode="${props.defaultCountryCode}"` +
`\n defaultDialCode="${props.defaultDialCode}"` +
`\n label="${props.label}"` +
(props.labelHidden ? `\n labelHidden` : '') +
getPropString(props.descriptiveText, 'descriptiveText') +
Expand All @@ -25,7 +25,7 @@ const propsToCode = (props) => {
};

const defaultPhoneNumberFieldProps: PhoneNumberFieldProps = {
defaultCountryCode: '+1',
defaultDialCode: '+1',
label: 'Phone number',
value: '',
descriptiveText: 'Please enter your phone number',
Expand All @@ -51,9 +51,9 @@ export const PhoneNumberFieldDemo = () => {
<PhoneNumberField
value={phoneNumberFieldProps.value}
onChange={(event) => phoneNumberFieldProps.setValue(event.target.value)}
defaultCountryCode={phoneNumberFieldProps.defaultCountryCode}
onCountryCodeChange={(event) =>
phoneNumberFieldProps.setDefaultCountryCode(event.target.value)
defaultDialCode={phoneNumberFieldProps.defaultDialCode}
onDialCodeChange={(event) =>
phoneNumberFieldProps.setDefaultDialCode(event.target.value)
}
label={phoneNumberFieldProps.label}
labelHidden={phoneNumberFieldProps.labelHidden}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ export const AccessibilityExample = () => (
<PhoneNumberField
label="Phone Number"
labelHidden={true}
defaultCountryCode="+1"
defaultDialCode="+1"
placeholder="Phone Number"
countryCodeLabel="Country code"
dialCodeLabel="Dial code"
/>
);
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const AutoCompleteExample = () => {
autoComplete="username"
label="Phone Number"
name="phone_number"
defaultCountryCode="+1"
defaultDialCode="+1"
/>
<Button type="submit">Sign In</Button>
</Flex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { PhoneNumberField } from '@aws-amplify/ui-react';
export const ClassNameExample = () => (
<PhoneNumberField
className="custom-phonenumberfield-class"
defaultCountryCode="+1"
defaultDialCode="+1"
label="Square field"
/>
);

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PhoneNumberField } from '@aws-amplify/ui-react';

export const DefaultPhoneNumberFieldExample = () => (
<PhoneNumberField label="Phone Number" defaultCountryCode="+1" />
<PhoneNumberField label="Phone Number" defaultDialCode="+1" />
);
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { PhoneNumberField, Text } from '@aws-amplify/ui-react';
export const DescriptiveTextExample = () => (
<>
<PhoneNumberField
defaultCountryCode="+1"
defaultDialCode="+1"
label="Phone Number"
descriptiveText="This is basic descriptive text"
/>
<PhoneNumberField
defaultCountryCode="+1"
defaultDialCode="+1"
label="Phone Number"
descriptiveText={
<Text
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { PhoneNumberField } from '@aws-amplify/ui-react';

export const DialCodeSelectExample = () => (
<PhoneNumberField
label="Phone Number"
defaultDialCode="+7"
dialCodeList={['+1', '+44', '+52', '+86', '+91']}
dialCodeName="dial_code"
dialCodeLabel="Dial Code"
onDialCodeChange={(e) => alert(`Dial Code changed to: ${e.target.value}`)}
/>
);
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const PhoneNumberFieldThemeExample = () => (
<ThemeProvider theme={theme} colorMode="light">
<PhoneNumberField
label="Themed field"
defaultCountryCode="+1"
defaultDialCode="+1"
labelHidden={true}
/>
</ThemeProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ import * as React from 'react';

export const RefsExample = () => {
const inputRef = React.useRef(null);
const countryCodeRef = React.useRef(null);
const dialCodeRef = React.useRef(null);

const [inputRefValue, setInputRefValue] = React.useState('');

const onBlur = () => {
countryCodeRef.current.focus();
dialCodeRef.current.focus();
setInputRefValue(inputRef.current.value);
};

return (
<Flex direction="column">
<PhoneNumberField
ref={inputRef}
countryCodeRef={countryCodeRef}
dialCodeRef={dialCodeRef}
label="Phone number"
defaultCountryCode="+1"
defaultDialCode="+1"
onBlur={onBlur}
/>
<Text>`inputRef` value: {inputRefValue}</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const RequiredFieldExample = () => {
return (
<Flex as="form" direction="column" onSubmit={handleSubmit}>
<PhoneNumberField
defaultCountryCode="+1"
defaultDialCode="+1"
label="Phone Number"
name="phone_number"
isRequired={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const RequiredFieldStyledExample = () => {
return (
<Flex as="form" direction="column" onSubmit={handleSubmit}>
<PhoneNumberField
defaultCountryCode="+1"
defaultDialCode="+1"
label="Primary phone number"
name="primary_phone"
descriptiveText={
Expand All @@ -22,7 +22,7 @@ export const RequiredFieldStyledExample = () => {
isRequired={true}
/>
<PhoneNumberField
defaultCountryCode="+1"
defaultDialCode="+1"
label={
<Text>
Secondary phone number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ export const SizeExample = () => (
<Flex direction="column" gap="1rem">
<Flex>
<PhoneNumberField
defaultCountryCode="+1"
defaultDialCode="+1"
label="Small"
size="small"
labelHidden
/>
<Button size="small">Small</Button>
</Flex>
<Flex>
<PhoneNumberField defaultCountryCode="+1" label="Default" labelHidden />
<PhoneNumberField defaultDialCode="+1" label="Default" labelHidden />
<Button>Default</Button>
</Flex>
<Flex>
<PhoneNumberField
defaultCountryCode="+1"
defaultDialCode="+1"
label="Large"
size="large"
labelHidden
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { PhoneNumberField, Flex } from '@aws-amplify/ui-react';
export const StatesExample = () => (
<Flex direction="column" gap="2rem">
<PhoneNumberField
defaultCountryCode="+1"
defaultDialCode="+1"
label="Disabled"
isDisabled={true}
descriptiveText="You can't submit me"
/>
<PhoneNumberField
defaultCountryCode="+1"
defaultDialCode="+1"
label="Readonly"
isReadOnly={true}
descriptiveText="You can't edit me"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const StylePropsExample = () => {

return (
<PhoneNumberField
defaultCountryCode="+1"
defaultDialCode="+1"
label={
<Text fontWeight="bold" fontSize={tokens.fontSizes.large}>
Phone Number:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { PhoneNumberField } from '@aws-amplify/ui-react';

export const ValidationErrorExample = () => (
<PhoneNumberField
defaultCountryCode="+1"
defaultDialCode="+1"
label="Phone number"
defaultValue="1234"
hasError={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { PhoneNumberField, Flex } from '@aws-amplify/ui-react';

export const VariationExample = () => (
<Flex direction="column">
<PhoneNumberField defaultCountryCode="+1" label="Default" />
<PhoneNumberField defaultCountryCode="+1" label="Quiet" variation="quiet" />
<PhoneNumberField defaultDialCode="+1" label="Default" />
<PhoneNumberField defaultDialCode="+1" label="Quiet" variation="quiet" />
</Flex>
);
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export { AccessibilityExample } from './AccessibilityExample';
export { AutoCompleteExample } from './AutoCompleteExample';
export { ClassNameExample } from './ClassNameExample';
export { CountryCodeSelectExample } from './CountryCodeSelectExample';
export { DialCodeSelectExample } from './DialCodeSelectExample';
export { DefaultPhoneNumberFieldExample } from './DefaultPhoneNumberFieldExample';
export { DescriptiveTextExample } from './DescriptiveTextExample';
export { RefsExample } from './RefsExample';
Expand Down
Loading

0 comments on commit cffdf7f

Please sign in to comment.