@availity/change-password 2.1.2 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/index.js +2 -10
- package/package.json +11 -11
- package/project.json +8 -6
- package/src/ChangePassword.js +1 -0
- package/stories/change-password.stories.tsx +6 -6
- package/tests/ChangePasswordFeedback.test.js +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [2.1.3](https://github.com/Availity/availity-react/compare/@availity/change-password@2.1.2...@availity/change-password@2.1.3) (2024-08-22)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `@availity/block-ui` updated to version `2.1.2`
|
|
10
|
+
* `@availity/form` updated to version `2.1.2`
|
|
11
|
+
* `@availity/icon` updated to version `2.1.2`
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# 1.0.0 (2024-08-22)
|
|
15
|
+
|
|
16
|
+
### Dependency Updates
|
|
17
|
+
|
|
18
|
+
* `@availity/block-ui` updated to version `1.0.0`
|
|
19
|
+
* `@availity/form` updated to version `1.0.0`
|
|
20
|
+
* `@availity/icon` updated to version `0.1.0`
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* **change-password:** documentation fixes ([7cfa372](https://github.com/Availity/availity-react/commit/7cfa372ec65c002ecfa0e57c1025207e6bac2d05))
|
|
25
|
+
* pass additional args to onError, onHandleSubmit, passes funcs ([5412e5a](https://github.com/Availity/availity-react/commit/5412e5a247e8dc2b37307a4878a5a394f21efeb3))
|
|
26
|
+
* rename confirmPassword to confirmNewPassword, fix icon styling ([75b8167](https://github.com/Availity/availity-react/commit/75b8167416adecea2ef0b9db73875906c93a851a))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* add change password component ([47e7041](https://github.com/Availity/availity-react/commit/47e70411c459a0651e60c605bffe2ccfc6d0e872))
|
|
32
|
+
* **change-password:** add support for custom alert toggles ([1903267](https://github.com/Availity/availity-react/commit/190326702c187f6ec82c7ef551856cd64161a175))
|
|
33
|
+
* **change-password:** remove deprecated react-block-ui and change to @availity/block-ui ([18797ab](https://github.com/Availity/availity-react/commit/18797abc426a89a85a4d71ac893b4b12ad69455f))
|
|
34
|
+
* **change-password:** upgrade react query to v4 ([1b635a0](https://github.com/Availity/availity-react/commit/1b635a04a70afa666919578398aa1569641abae7))
|
|
35
|
+
* upgrade deps ([eccefc0](https://github.com/Availity/availity-react/commit/eccefc0549ebd5057595f6ac696642789375f48a))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### BREAKING CHANGES
|
|
39
|
+
|
|
40
|
+
* **change-password:** react query has been upgraded to v4. you must upgrade
|
|
41
|
+
to @tanstack/react-query@^4.36.1 in order to use this package now
|
|
42
|
+
* axios v1 is now required
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
5
46
|
## [2.1.2](https://github.com/Availity/availity-react/compare/@availity/change-password@2.1.1...@availity/change-password@2.1.2) (2024-08-14)
|
|
6
47
|
|
|
7
48
|
### Dependency Updates
|
package/index.js
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default ChangePassword;
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
useChangePasswordContext,
|
|
8
|
-
ChangePasswordContext,
|
|
9
|
-
ChangePasswordForm,
|
|
10
|
-
};
|
|
1
|
+
export { default, useChangePasswordContext, ChangePasswordContext } from './src/ChangePassword';
|
|
2
|
+
export { default as ChangePasswordForm } from './src/ChangePasswordForm';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/change-password",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "Easy to use change-password components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -25,25 +25,25 @@
|
|
|
25
25
|
"publish:canary": "yarn npm publish --access public --tag canary"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@availity/block-ui": "^1.1.
|
|
29
|
-
"@availity/form": "1.9.
|
|
30
|
-
"@availity/icon": "0.11.
|
|
28
|
+
"@availity/block-ui": "^1.1.4",
|
|
29
|
+
"@availity/form": "1.9.2",
|
|
30
|
+
"@availity/icon": "0.11.8",
|
|
31
31
|
"@tanstack/react-query": "^4.36.1",
|
|
32
|
-
"classnames": "^2.
|
|
33
|
-
"dayjs": "^1.11.
|
|
32
|
+
"classnames": "^2.5.1",
|
|
33
|
+
"dayjs": "^1.11.12",
|
|
34
34
|
"lodash": "^4.17.21",
|
|
35
35
|
"prop-types": "^15.8.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@availity/api-axios": "^
|
|
39
|
-
"axios": "^1.
|
|
40
|
-
"react": "^18.
|
|
41
|
-
"react-dom": "^18.
|
|
38
|
+
"@availity/api-axios": "^9.0.0",
|
|
39
|
+
"axios": "^1.7.4",
|
|
40
|
+
"react": "^18.3.1",
|
|
41
|
+
"react-dom": "^18.3.1",
|
|
42
42
|
"reactstrap": "^8.10.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@availity/api-axios": "^8.0.0",
|
|
46
|
-
"axios": "^1.
|
|
46
|
+
"axios": "^1.7.4",
|
|
47
47
|
"react": ">=16.8.6",
|
|
48
48
|
"reactstrap": "^8.0.0"
|
|
49
49
|
},
|
package/project.json
CHANGED
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"name": "@availity/change-password",
|
|
3
|
+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
3
4
|
"projectType": "library",
|
|
4
5
|
"targets": {
|
|
5
6
|
"test": {
|
|
6
7
|
"executor": "@nx/jest:jest",
|
|
7
|
-
"outputs": ["coverage/change-password"],
|
|
8
|
-
"options": {
|
|
8
|
+
"outputs": ["{workspaceRoot}/coverage/change-password"],
|
|
9
|
+
"options": {
|
|
10
|
+
"jestConfig": "packages/change-password/jest.config.js"
|
|
11
|
+
}
|
|
9
12
|
},
|
|
10
13
|
"version": {
|
|
11
14
|
"executor": "@jscutlery/semver:version",
|
|
12
15
|
"options": {
|
|
13
16
|
"preset": "angular",
|
|
14
17
|
"commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
|
|
15
|
-
"tagPrefix": "
|
|
18
|
+
"tagPrefix": "{projectName}@",
|
|
16
19
|
"baseBranch": "master",
|
|
17
20
|
"trackDeps": true
|
|
18
21
|
}
|
|
19
22
|
},
|
|
20
23
|
"lint": {
|
|
21
|
-
"executor": "@nx/
|
|
24
|
+
"executor": "@nx/eslint:lint",
|
|
22
25
|
"options": {
|
|
23
26
|
"eslintConfig": ".eslintrc.yaml",
|
|
24
|
-
"lintFilePatterns": ["packages/change-password/**/*.{js,ts}"],
|
|
25
27
|
"silent": false,
|
|
26
28
|
"fix": false,
|
|
27
29
|
"cache": true,
|
package/src/ChangePassword.js
CHANGED
|
@@ -78,7 +78,7 @@ export const _Default: StoryObj<typeof ChangePassword> = {
|
|
|
78
78
|
{
|
|
79
79
|
message: 'Have 8 to 15 characters',
|
|
80
80
|
passes: ({ newPassword, newPasswordTouched, submitted }) => {
|
|
81
|
-
if (
|
|
81
|
+
if (/^.{8,15}$/.test(newPassword)) {
|
|
82
82
|
if (newPasswordTouched) return true;
|
|
83
83
|
return null;
|
|
84
84
|
}
|
|
@@ -89,7 +89,7 @@ export const _Default: StoryObj<typeof ChangePassword> = {
|
|
|
89
89
|
{
|
|
90
90
|
message: 'Have a number',
|
|
91
91
|
passes: ({ newPassword, newPasswordTouched, submitted }) => {
|
|
92
|
-
if (
|
|
92
|
+
if (/\d/.test(newPassword)) {
|
|
93
93
|
if (newPasswordTouched) return true;
|
|
94
94
|
return null;
|
|
95
95
|
}
|
|
@@ -100,7 +100,7 @@ export const _Default: StoryObj<typeof ChangePassword> = {
|
|
|
100
100
|
{
|
|
101
101
|
message: 'Have an uppercase letter',
|
|
102
102
|
passes: ({ newPassword, newPasswordTouched, submitted }) => {
|
|
103
|
-
if (
|
|
103
|
+
if (/[A-Z]/.test(newPassword)) {
|
|
104
104
|
if (newPasswordTouched) return true;
|
|
105
105
|
return null;
|
|
106
106
|
}
|
|
@@ -111,7 +111,7 @@ export const _Default: StoryObj<typeof ChangePassword> = {
|
|
|
111
111
|
{
|
|
112
112
|
message: 'Have a lowercase letter',
|
|
113
113
|
passes: ({ newPassword, newPasswordTouched, submitted }) => {
|
|
114
|
-
if (
|
|
114
|
+
if (/[a-z]/.test(newPassword)) {
|
|
115
115
|
if (newPasswordTouched) return true;
|
|
116
116
|
return null;
|
|
117
117
|
}
|
|
@@ -122,7 +122,7 @@ export const _Default: StoryObj<typeof ChangePassword> = {
|
|
|
122
122
|
{
|
|
123
123
|
message: 'Have a special character',
|
|
124
124
|
passes: ({ newPassword, newPasswordTouched, submitted }) => {
|
|
125
|
-
if (
|
|
125
|
+
if (/[!"#$%&'()*+,./:;<=>?@[\\\]^_`{|}~-]/.test(newPassword)) {
|
|
126
126
|
if (newPasswordTouched) return true;
|
|
127
127
|
return null;
|
|
128
128
|
}
|
|
@@ -144,7 +144,7 @@ export const _Default: StoryObj<typeof ChangePassword> = {
|
|
|
144
144
|
{
|
|
145
145
|
message: 'Not contain spaces',
|
|
146
146
|
passes: ({ newPassword, newPasswordTouched, submitted }) => {
|
|
147
|
-
if (
|
|
147
|
+
if (/^\S*$/.test(newPassword)) {
|
|
148
148
|
if (newPasswordTouched) return true;
|
|
149
149
|
return null;
|
|
150
150
|
}
|
|
@@ -15,23 +15,23 @@ describe('ChangePasswordFeedback', () => {
|
|
|
15
15
|
const conditions = [
|
|
16
16
|
{
|
|
17
17
|
message: 'Have 8 to 16 characters',
|
|
18
|
-
passes: ({ newPassword }) =>
|
|
18
|
+
passes: ({ newPassword }) => /^.{8,16}$/.test(newPassword),
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
message: 'Have a number',
|
|
22
|
-
passes: ({ newPassword }) =>
|
|
22
|
+
passes: ({ newPassword }) => /\d/.test(newPassword),
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
message: 'Have an uppercase letter',
|
|
26
|
-
passes: ({ newPassword }) =>
|
|
26
|
+
passes: ({ newPassword }) => /[A-Z]/.test(newPassword),
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
message: 'Have a lowercase letter',
|
|
30
|
-
passes: ({ newPassword }) =>
|
|
30
|
+
passes: ({ newPassword }) => /[a-z]/.test(newPassword),
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
message: 'Have a special character',
|
|
34
|
-
passes: ({ newPassword }) =>
|
|
34
|
+
passes: ({ newPassword }) => /[!"#$%&'()*+,./:;<=>?@[\\\]^_`{|}~-]/.test(newPassword),
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
message: 'Not contain your user Id',
|
|
@@ -39,7 +39,7 @@ describe('ChangePasswordFeedback', () => {
|
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
message: 'Not contain spaces',
|
|
42
|
-
passes: ({ newPassword }) =>
|
|
42
|
+
passes: ({ newPassword }) => /^\S*$/.test(newPassword),
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
message: 'This one should always display the empty circle',
|