Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #124 from etn-ccis/dev
Browse files Browse the repository at this point in the history
update master
  • Loading branch information
JeffGreiner-eaton authored Oct 13, 2023
2 parents f1d00cd + 3c4036c commit 279a611
Show file tree
Hide file tree
Showing 20 changed files with 1,824 additions and 1,227 deletions.
34 changes: 8 additions & 26 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2.1
orbs:
codecov: codecov/codecov@1.1.3
codecov: codecov/codecov@3.2.2
gh: circleci/[email protected]
jobs:
build_shared:
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
at: .
- codecov/upload:
file: './coverage/clover.xml'
token: 02bbcfe3-8746-4ca0-99e3-720414bb8fbc
token: CODECOV_TOKEN

publish:
docker:
Expand All @@ -72,17 +72,6 @@ jobs:
command: |
yarn publish:package -b $CIRCLE_BRANCH
tag:
docker:
- image: cimg/node:14.19.0-browsers
steps:
- checkout
- gh/setup
- run:
name: Tag @brightlayer-ui/react-auth-shared
command: |
yarn tag:package -b $CIRCLE_BRANCH -s -blui-react-auth-shared
workflows:
version: 2
react_auth_shared:
Expand All @@ -96,17 +85,10 @@ workflows:
only:
- master
- dev
- tag:
requires:
- publish
filters:
branches:
only:
- master
- coverage_report:
requires:
- build_shared
filters:
branches:
only:
- master
requires:
- build_shared
filters:
branches:
only:
- master
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug Report
about: Report a bug with a Brightlayer UI resource
title: ''
labels: 'bug, needs-review, brightlayer-ui'
assignees: ''
---

#### Describe the bug / expected behavior

#### What are the steps to reproduce?

1. Go to...
2. Click on...

#### Screenshots / Screen recording

#### Code snippet / Link to minimum reproduction example

<!-- Please include a minimum code snippet (if relevant) that shows the bug, or link to a codesandbox or other running example where it can be observed -->

```
CODE HERE
```

#### Your environment information

<!-- Describe any relevant environment information (e.g., Operating System, Library version number, browser used, etc.) where the issue was discovered -->

#### Suggested fix

<!-- If you have a suggestion for what might be causing the issue or where to look as a starting point, please mention it here -->

#### Anything else to add?
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Feature Request
about: Suggest an idea for this resource
title: ''
labels: 'enhancement, needs-review, brightlayer-ui'
assignees: ''
---

#### Describe the desired feature/functionality

#### Additional Context (where / how would this be used)

#### Is this request related to a current issue?

#### Suggested implementation details
29 changes: 29 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!-- If this pull request fixes an Issue, link it below. If not, you can remove the line below -->

Fixes # .

<!-- Include a bulleted list summarizing the main changes you have made in this PR -->

#### Changes proposed in this Pull Request:

-
-
-

<!-- Include screenshots if they will help illustrate the changes in this PR -->

#### Screenshots / Screen Recording (if applicable)

-

<!-- Instruction for PR reviewers, if more complicated than a simple yarn start -->

#### To Test:

-

<!-- Useful for draft pull requests -->

#### Any specific feedback you are looking for?

-
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'monthly'
day: 'monday'
open-pull-requests-limit: 1
target-branch: 'dev'
labels:
- 'external-dependency'
18 changes: 18 additions & 0 deletions .github/workflows/blui-pr-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: blui-pr-actions
on:
pull_request_target:
types:
- opened

permissions:
pull-requests: write
contents: read

jobs:
pr-labels:
uses: etn-ccis/blui-automation/.github/workflows/blui-labels.yml@dev
secrets: inherit

pr-comment:
uses: etn-ccis/blui-automation/.github/workflows/blui-comment.yml@dev
secrets: inherit
17 changes: 17 additions & 0 deletions .github/workflows/tagging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Tagging

env:
GH_TOKEN: ${{ github.token }}
CURRENT_BRANCH: ${{ github.ref_name }}

on:
push:
branches:
- master

jobs:
tag-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn tag:package -b ${CURRENT_BRANCH}
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +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).

## v3.8.0 (October 12, 2023)

### Added

- Ability to hide the CreatePassword screen
- Ability to hide the login form in the Login screen.

### Changed

- Changed resend email button's text label on the email verification screen.

## v3.7.4 (November 30, 2022)

### Changed
Expand Down Expand Up @@ -33,7 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Fix Portuguese translation issues ([#74](https://github.com/brightlayer-ui/react-auth-shared/issues/74)).
- Fix Portuguese translation issues ([#74](https://github.com/etn-ccis/blui-react-auth-shared/issues/74)).

## v3.7.0 (April 26, 2022)

Expand All @@ -51,7 +62,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Fixed non-bold text on Forgot Password screen when using Portuguese translations ([#59](https://github.com/brightlayer-ui/react-auth-shared/issues/59)).
- Fixed non-bold text on Forgot Password screen when using Portuguese translations ([#59](https://github.com/etn-ccis/blui-react-auth-shared/issues/59)).

## v3.6.0 (December 9, 2021)

Expand Down
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @jeffvg @daileytj @emclaug2
* @JeffGreiner-eaton @daileytj @surajeaton
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# React Auth Shared

![npm (scoped)](https://img.shields.io/npm/v/@brightlayer-ui/react-auth-shared)
[![](https://img.shields.io/circleci/project/github/etn-ccis/blui-react-auth-shared/master.svg?style=flat)](https://circleci.com/gh/etn-ccis/blui-react-auth-shared/tree/master) ![npm (scoped)](https://img.shields.io/npm/v/@brightlayer-ui/react-auth-shared) [![codecov](https://codecov.io/gh/etn-ccis/blui-react-auth-shared/branch/master/graph/badge.svg?token=BKDXMXPSDI)](https://codecov.io/gh/etn-ccis/blui-react-auth-shared)

The React Auth Shared package provides extracts the common logic shared by [@brightlayer-ui/react-native-auth-workflow](https://www.npmjs.com/package/@brightlayer-ui/react-native-auth-workflow) and [@brightlayer-ui/react-auth-workflow](https://www.npmjs.com/package/@brightlayer-ui/react-auth-workflow). This package must be used in combination with workflow screen definitions (either by using one of the packages above, or by building your own and integrating them yourself).

Expand Down Expand Up @@ -28,14 +28,14 @@ We recommend you use the [@brightlayer-ui/react-native-auth-workflow](https://ww

# Documentation

More information about exported objects and functions can found in the [API](https://github.com/brightlayer-ui/react-auth-shared/tree/master/docs/API.md) documentation.
More information about exported objects and functions can found in the [API](https://github.com/etn-ccis/blui-react-auth-shared/tree/master/docs/API.md) documentation.

# Contributors

To work on this package as a contributor, first clone down the repository:

```shell
git clone https://github.com/brightlayer-ui/react-auth-shared
git clone https://github.com/etn-ccis/blui-react-auth-shared
cd react-auth-shared
```

Expand Down
6 changes: 6 additions & 0 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ import { AuthUIContextProvider } from '@brightlayer-ui/react-native-auth-workflo
- **enableResetPassword**: (optional) _`boolean`_
- When true, the Forgot Password and Reset Password workflow screens will be accessible
- Default: true
- **enableCreatePassword**: (optional) _`boolean`_
- When true, the Create Password screen will be part of registration
- Default: true
- **htmlEula** (optional): _`boolean`_
- Set to true if your EULA needs to be rendered as HTML
- Default: false
Expand Down Expand Up @@ -90,6 +93,9 @@ import { AuthUIContextProvider } from '@brightlayer-ui/react-native-auth-workflo
- **showSelfRegistration**: _`boolean`_
- When true, shows the Create Account button to allow for self registration.
- Default: true
- **showLoginForm**: (optional) _`boolean`_
- If false, the email/password fields will be hidden to limit login options to custom 3rd-party integrations (e.g., Okta).
- Default: true

### SecurityContextProvider

Expand Down
21 changes: 10 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "@brightlayer-ui/react-auth-shared",
"description": "Re-usable react logic for Authentication and Registration within Eaton applications. For use with @brightlayer-ui/react-native-auth-workflow and @brightlayer-ui/react-auth-workflow.",
"version": "3.7.4",
"version": "3.8.0",
"license": "BSD-3-Clause",
"author": {
"name": "Brightlayer UI",
"email": "[email protected]"
},
"homepage": "https://github.com/brightlayer-ui/react-auth-shared/tree/master/",
"homepage": "https://github.com/etn-ccis/blui-react-auth-shared/tree/master/",
"repository": {
"type": "git",
"url": "https://github.com/brightlayer-ui/react-auth-shared/tree/master"
"url": "https://github.com/etn-ccis/blui-react-auth-shared/tree/master"
},
"keywords": [
"Brightlayer UI",
Expand Down Expand Up @@ -39,7 +39,7 @@
"prettier:check": "prettier \"**/**.{tsx,ts,js,json,md}\" --check",
"build": "bob build",
"publish:package": "set npm_config_yes=true && npx -p @brightlayer-ui/publish blui-publish",
"tag:package": "npx -p @brightlayer-ui/tag blui-tag",
"tag:package": "npx -p @brightlayer-ui/tag blui-tag -s -blui-react-auth-shared",
"generate:licenses": "npm-license-crawler -onlyDirectDependencies -json LICENSES.json",
"validate": "yarn prettier && yarn lint && yarn typescript && yarn test",
"precommit": "yarn validate && yarn generate:licenses",
Expand All @@ -48,7 +48,7 @@
},
"peerDependencies": {
"date-fns": "^2.14.0",
"i18next": "^20.0.0",
"i18next": "^23.4.4",
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
"react-i18next": "^11.3.4"
},
Expand All @@ -62,14 +62,13 @@
"@react-native-community/bob": "^0.10.0",
"@types/enzyme": "^3.10.5",
"@types/enzyme-adapter-react-16": "^1.0.6",
"@types/jest": "^26.0.0",
"@types/jest": "^29.5.2",
"@types/node": "^14.0.0",
"@types/react-native": "^0.70.7",
"@types/react-test-renderer": "^17.0.0",
"@types/react-test-renderer": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^4.0.0",
"@typescript-eslint/parser": "^4.0.0",
"babel-jest": "^26.0.0",
"codecov": "^3.8.2",
"date-fns": "^2.19.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
Expand All @@ -78,9 +77,9 @@
"eslint-config-prettier": "^8.0.0",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^4.0.0",
"i18next": "^20.0.0",
"i18next": "^23.4.4",
"identity-obj-proxy": "^3.0.0",
"jest": "^26.0.0",
"jest": "^29.5.0",
"jest-enzyme": "^7.1.2",
"jest-junit": "^12.0.0",
"jsdom": "^16.2.2",
Expand All @@ -90,7 +89,7 @@
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-i18next": "^11.3.4",
"react-test-renderer": "^17.0.0",
"react-test-renderer": "^18.2.0",
"typescript": "^4.8.4"
},
"jest": {
Expand Down
4 changes: 4 additions & 0 deletions src/contexts/AuthUIContextProvider/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const AuthUIContextProvider: React.FC<React.PropsWithChildren<AuthUIConte
enableInviteRegistration: props.enableInviteRegistration,
showContactSupport: props.showContactSupport,
enableResetPassword: props.enableResetPassword,
enableCreatePassword: props.enableCreatePassword,
showRememberMe: props.showRememberMe,
showCybersecurityBadge: props.showCybersecurityBadge,
allowDebugMode: props.allowDebugMode,
Expand All @@ -40,6 +41,7 @@ export const AuthUIContextProvider: React.FC<React.PropsWithChildren<AuthUIConte
accountAlreadyExistsScreen: props.accountAlreadyExistsScreen,
registrationConfig: props.registrationConfig,
disablePagerAnimation: props.disablePagerAnimation,
showLoginForm: props.showLoginForm,
};

return propsForContext;
Expand All @@ -56,6 +58,7 @@ export const AuthUIContextProvider: React.FC<React.PropsWithChildren<AuthUIConte
props.registrationSuccessScreen,
props.enableInviteRegistration,
props.enableResetPassword,
props.enableCreatePassword,
props.htmlEula,
props.loginActions,
props.loginFooter,
Expand All @@ -70,6 +73,7 @@ export const AuthUIContextProvider: React.FC<React.PropsWithChildren<AuthUIConte
props.showCybersecurityBadge,
props.showSelfRegistration,
props.registrationConfig,
props.showLoginForm,
]);

return <AuthUIContext.Provider value={memoizedProps}>{props.children}</AuthUIContext.Provider>;
Expand Down
Loading

0 comments on commit 279a611

Please sign in to comment.