From 642c41f9d3bfa5ebacff262175ec731a2199eb9b Mon Sep 17 00:00:00 2001 From: manojleaton Date: Fri, 29 Sep 2023 12:15:01 +0530 Subject: [PATCH 1/6] Updated the version and changeLog --- login-workflow/CHANGELOG.md | 14 +++++--------- login-workflow/package.json | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/login-workflow/CHANGELOG.md b/login-workflow/CHANGELOG.md index fc9c50d5..04c184aa 100644 --- a/login-workflow/CHANGELOG.md +++ b/login-workflow/CHANGELOG.md @@ -5,21 +5,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## v4.0.0 (Unreleased) +## v6.0.0 (Unreleased) ### Added -- A `ViewEulaSubscreen` component. -- A `ContactSupportSubscreen` component. -- A `BrandedCardContainer` component. -- Confirm password field error state message in `ChangePasswordForm`. -- Option to hide the Create Password screen during registration -- A `ExistingAccountRegisterSuccessSubscreen` component. -- A `RegistrationWorkflowContext` context, a `RegistrationWorkflowContextProvider` component and a `useRegistrationWorkflowContext` hook. +- Reusable screen components. +- Support for custom react auth workflow injection. +- Support for router customizability. ### Changed -- Changed the verification code styles for the self registration workflow. +- Update support for the latest versions of i18n and react-i18n. ## v3.1.1 (December 14, 2022) diff --git a/login-workflow/package.json b/login-workflow/package.json index 6f20397f..521649a5 100644 --- a/login-workflow/package.json +++ b/login-workflow/package.json @@ -1,6 +1,6 @@ { "name": "@brightlayer-ui/react-auth-workflow", - "version": "5.0.0-alpha.1", + "version": "6.0.0", "author": "Brightlayer UI (https://github.com/brightlayer-ui)", "license": "BSD-3-Clause", "description": "Re-usable workflow components for Authentication and Registration within Eaton applications.", From 42933324bb27e87bce7a81787bf60869a7d4817a Mon Sep 17 00:00:00 2001 From: manojleaton Date: Fri, 29 Sep 2023 12:21:10 +0530 Subject: [PATCH 2/6] removed shared auth folder --- login-workflow/shared-auth | 1 - 1 file changed, 1 deletion(-) delete mode 160000 login-workflow/shared-auth diff --git a/login-workflow/shared-auth b/login-workflow/shared-auth deleted file mode 160000 index 792a7901..00000000 --- a/login-workflow/shared-auth +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 792a7901102a66107245a7b273d777a4e06c2a81 From ed82bd3acfc18ccb57950d59bb22d56e24c93e9a Mon Sep 17 00:00:00 2001 From: manojleaton <130662346+manojleaton@users.noreply.github.com> Date: Fri, 29 Sep 2023 14:33:21 +0530 Subject: [PATCH 3/6] Update login-workflow/CHANGELOG.md Co-authored-by: surajeaton <120575281+surajeaton@users.noreply.github.com> --- login-workflow/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/login-workflow/CHANGELOG.md b/login-workflow/CHANGELOG.md index 04c184aa..772e5df1 100644 --- a/login-workflow/CHANGELOG.md +++ b/login-workflow/CHANGELOG.md @@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Update support for the latest versions of i18n and react-i18n. +- Updated i18next and react-i18next packages to the latest. ## v3.1.1 (December 14, 2022) From de427ca80dac10bdc09e7c76e368a62380919972 Mon Sep 17 00:00:00 2001 From: manojleaton Date: Fri, 29 Sep 2023 14:48:16 +0530 Subject: [PATCH 4/6] added migration guide link in changeLog --- login-workflow/CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/login-workflow/CHANGELOG.md b/login-workflow/CHANGELOG.md index 772e5df1..79ebde69 100644 --- a/login-workflow/CHANGELOG.md +++ b/login-workflow/CHANGELOG.md @@ -12,10 +12,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Reusable screen components. - Support for custom react auth workflow injection. - Support for router customizability. +- Learn more about migrating from v4 => v5 your existing application by reading our [Migrating Guide](https://github.com/etn-ccis/blui-react-workflows/blob/dev/login-workflow/README.md#migrating-from-v4--v5) ### Changed -- Updated i18next and react-i18next packages to the latest. +- Updated i18next and react-i18next packages to the latest. ## v3.1.1 (December 14, 2022) From 609d2e61ec73f2e3307575d0482367bbbb708502 Mon Sep 17 00:00:00 2001 From: manojleaton Date: Fri, 29 Sep 2023 15:11:07 +0530 Subject: [PATCH 5/6] updated version and migration guide link --- login-workflow/CHANGELOG.md | 4 +-- login-workflow/docs/migration-guide-4-5.md | 31 ++++++++-------------- login-workflow/package.json | 2 +- 3 files changed, 14 insertions(+), 23 deletions(-) diff --git a/login-workflow/CHANGELOG.md b/login-workflow/CHANGELOG.md index 79ebde69..9516f848 100644 --- a/login-workflow/CHANGELOG.md +++ b/login-workflow/CHANGELOG.md @@ -5,14 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## v6.0.0 (Unreleased) +## v5.0.0 (October 3, 2023) ### Added - Reusable screen components. - Support for custom react auth workflow injection. - Support for router customizability. -- Learn more about migrating from v4 => v5 your existing application by reading our [Migrating Guide](https://github.com/etn-ccis/blui-react-workflows/blob/dev/login-workflow/README.md#migrating-from-v4--v5) +- Learn more about migrating from v4 => v5 your existing application by reading our [Migrating Guide](https://github.com/etn-ccis/blui-react-workflows/blob/master/login-workflow/README.md#migrating-from-v4--v5). ### Changed diff --git a/login-workflow/docs/migration-guide-4-5.md b/login-workflow/docs/migration-guide-4-5.md index f2a769de..dcc8a86a 100644 --- a/login-workflow/docs/migration-guide-4-5.md +++ b/login-workflow/docs/migration-guide-4-5.md @@ -3,6 +3,7 @@ ## Update Dependencies First, update your @brightlayer-ui/react-auth-workflow dependency to the latest version. + ```shell npm install --save @brightlayer-ui/react-auth-workflow@^5.0.0 // or @@ -11,14 +12,12 @@ yarn upgrade @brightlayer-ui/react-auth-workflow@^5.0.0 ## Managing Auth State -In order to be more flexible / customizable, the workflow no longer manages the authentication status of the user internally. You will need to establish your own mechanism (such as using a ContextProvider or Redux) to track whether or not a user is authenticated to your application. For reference, you can look at how we set up the [AppContext](https://github.com/etn-ccis/blui-react-workflows/blob/dev/login-workflow/example/src/contexts/AppContextProvider.tsx) in the example project. - +In order to be more flexible / customizable, the workflow no longer manages the authentication status of the user internally. You will need to establish your own mechanism (such as using a ContextProvider or Redux) to track whether or not a user is authenticated to your application. For reference, you can look at how we set up the [AppContext](https://github.com/etn-ccis/blui-react-workflows/blob/master/login-workflow/example/src/contexts/AppContextProvider.tsx) in the example project. ## Managing Routing In order to be more flexible / customizable, the workflow no longer manages routing. The `AuthNavigationContainer` has been removed and will need to be replaced by your own routing solution (we recommend React Router). Please follow our [Routing Guide](./routing.md) for detailed information on setup. - ## Managing Workflow Providers We previously provided a `AuthUIContextProvider` component that was used to configure / wrap both the Authentication workflow and the Registration workflow. In version 5, we have split the management of the workflows so that they can be used independently. You will need to implement the [`AuthContextProvider`](authentication-workflow.md) and [`RegistrationContextProvider`](./registration-workflow.md) instead. @@ -27,29 +26,27 @@ We previously provided a `AuthUIContextProvider` component that was used to conf You no longer need to merge your apps translation data into the workflow — they an exist independently for the sake of simplifying your setup. If you aren't already, you will need to set up [react-i18next](https://react.i18next.com/) to manage your application side translations. Refer to our [Language Support](./language-support.md) guide for more information. - ## Updated Actions ### AuthUIActions The `SecurityContextActions` no longer exist in the newest version and so they will not be available to your action definitions (i.e., `onUserAuthenticated` and `onUserNotAuthenticated` are no longer available). You will need to pass your own self-managed auth state/functions and use those instead (refer to above). - ## RegistrationUIActions -1) Update type name `AccountDetailInformation` to `AccountDetails`. +1. Update type name `AccountDetailInformation` to `AccountDetails`. ```tsx -// before +// before import { RegistrationUIActions, AccountDetailInformation } from '@brightlayer-ui/react-auth-workflow'; // after import { RegistrationUIActions, AccountDetails } from '@brightlayer-ui/react-auth-workflow'; ``` -2) LoadEULA renamed to loadEula +2. LoadEULA renamed to loadEula ```tsx -// before +// before loadEULA: async (language: string): Promise => { ... return SAMPLE_EULA; @@ -62,7 +59,7 @@ loadEula: async (language: string): Promise => { }, ``` -3) Additional data available in completeRegistration +3. Additional data available in completeRegistration The `userData` parameter will now pass all data collected from the registration workflow, including custom data. @@ -91,19 +88,17 @@ completeRegistration: async ( }, ``` -4) New actions available +4. New actions available To give greater flexibility / granularity in the workflow, we have added a few more actions in registrationUIActions such as `acceptEula`, `requestRegistrationCode`, `createPassword`, and `setAccountDetails`. Refer to the [Registration Workflow](./registration-workflow.md) Guide for information about these new actions. - ## New Setup Your new app architecture will look something like this once you have made all of the necessary updates: - ```tsx // Your application instance of i18n - + {/* Your custom context provider for managing auth state, etc. */} {/* Your implementation of a routing solution */} - - {/* Auth Routes */} - - - {/* Registration Routes */} - + {/* Auth Routes */} + {/* Registration Routes */} diff --git a/login-workflow/package.json b/login-workflow/package.json index c3ecaae8..bc689ebb 100644 --- a/login-workflow/package.json +++ b/login-workflow/package.json @@ -1,6 +1,6 @@ { "name": "@brightlayer-ui/react-auth-workflow", - "version": "6.0.0", + "version": "5.0.0", "author": "Brightlayer UI (https://github.com/brightlayer-ui)", "license": "BSD-3-Clause", "description": "Re-usable workflow components for Authentication and Registration within Eaton applications.", From b9f0e39897c9569edffadc1e8d53ff446251dfcd Mon Sep 17 00:00:00 2001 From: Suraj Karambe Date: Fri, 29 Sep 2023 15:16:45 +0530 Subject: [PATCH 6/6] Run prettier --- login-workflow/docs/migration-guide-4-5.md | 29 ++++++++++++++-------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/login-workflow/docs/migration-guide-4-5.md b/login-workflow/docs/migration-guide-4-5.md index dcc8a86a..0d097917 100644 --- a/login-workflow/docs/migration-guide-4-5.md +++ b/login-workflow/docs/migration-guide-4-5.md @@ -3,7 +3,6 @@ ## Update Dependencies First, update your @brightlayer-ui/react-auth-workflow dependency to the latest version. - ```shell npm install --save @brightlayer-ui/react-auth-workflow@^5.0.0 // or @@ -14,10 +13,12 @@ yarn upgrade @brightlayer-ui/react-auth-workflow@^5.0.0 In order to be more flexible / customizable, the workflow no longer manages the authentication status of the user internally. You will need to establish your own mechanism (such as using a ContextProvider or Redux) to track whether or not a user is authenticated to your application. For reference, you can look at how we set up the [AppContext](https://github.com/etn-ccis/blui-react-workflows/blob/master/login-workflow/example/src/contexts/AppContextProvider.tsx) in the example project. + ## Managing Routing In order to be more flexible / customizable, the workflow no longer manages routing. The `AuthNavigationContainer` has been removed and will need to be replaced by your own routing solution (we recommend React Router). Please follow our [Routing Guide](./routing.md) for detailed information on setup. + ## Managing Workflow Providers We previously provided a `AuthUIContextProvider` component that was used to configure / wrap both the Authentication workflow and the Registration workflow. In version 5, we have split the management of the workflows so that they can be used independently. You will need to implement the [`AuthContextProvider`](authentication-workflow.md) and [`RegistrationContextProvider`](./registration-workflow.md) instead. @@ -26,27 +27,29 @@ We previously provided a `AuthUIContextProvider` component that was used to conf You no longer need to merge your apps translation data into the workflow — they an exist independently for the sake of simplifying your setup. If you aren't already, you will need to set up [react-i18next](https://react.i18next.com/) to manage your application side translations. Refer to our [Language Support](./language-support.md) guide for more information. + ## Updated Actions ### AuthUIActions The `SecurityContextActions` no longer exist in the newest version and so they will not be available to your action definitions (i.e., `onUserAuthenticated` and `onUserNotAuthenticated` are no longer available). You will need to pass your own self-managed auth state/functions and use those instead (refer to above). + ## RegistrationUIActions -1. Update type name `AccountDetailInformation` to `AccountDetails`. +1) Update type name `AccountDetailInformation` to `AccountDetails`. ```tsx -// before +// before import { RegistrationUIActions, AccountDetailInformation } from '@brightlayer-ui/react-auth-workflow'; // after import { RegistrationUIActions, AccountDetails } from '@brightlayer-ui/react-auth-workflow'; ``` -2. LoadEULA renamed to loadEula +2) LoadEULA renamed to loadEula ```tsx -// before +// before loadEULA: async (language: string): Promise => { ... return SAMPLE_EULA; @@ -59,7 +62,7 @@ loadEula: async (language: string): Promise => { }, ``` -3. Additional data available in completeRegistration +3) Additional data available in completeRegistration The `userData` parameter will now pass all data collected from the registration workflow, including custom data. @@ -88,17 +91,19 @@ completeRegistration: async ( }, ``` -4. New actions available +4) New actions available To give greater flexibility / granularity in the workflow, we have added a few more actions in registrationUIActions such as `acceptEula`, `requestRegistrationCode`, `createPassword`, and `setAccountDetails`. Refer to the [Registration Workflow](./registration-workflow.md) Guide for information about these new actions. + ## New Setup Your new app architecture will look something like this once you have made all of the necessary updates: + ```tsx // Your application instance of i18n - + {/* Your custom context provider for managing auth state, etc. */} {/* Your implementation of a routing solution */} - {/* Auth Routes */} - {/* Registration Routes */} + + {/* Auth Routes */} + + + {/* Registration Routes */} +