@availity/change-password 2.1.2 → 2.1.4

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 CHANGED
@@ -2,6 +2,54 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [2.1.4](https://github.com/Availity/availity-react/compare/@availity/change-password@2.1.3...@availity/change-password@2.1.4) (2024-10-02)
6
+
7
+ ### Dependency Updates
8
+
9
+ * `@availity/form` updated to version `2.1.3`
10
+
11
+
12
+ ## [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)
13
+
14
+ ### Dependency Updates
15
+
16
+ * `@availity/block-ui` updated to version `2.1.2`
17
+ * `@availity/form` updated to version `2.1.2`
18
+ * `@availity/icon` updated to version `2.1.2`
19
+
20
+
21
+ # 1.0.0 (2024-08-22)
22
+
23
+ ### Dependency Updates
24
+
25
+ * `@availity/block-ui` updated to version `1.0.0`
26
+ * `@availity/form` updated to version `1.0.0`
27
+ * `@availity/icon` updated to version `0.1.0`
28
+
29
+ ### Bug Fixes
30
+
31
+ * **change-password:** documentation fixes ([7cfa372](https://github.com/Availity/availity-react/commit/7cfa372ec65c002ecfa0e57c1025207e6bac2d05))
32
+ * pass additional args to onError, onHandleSubmit, passes funcs ([5412e5a](https://github.com/Availity/availity-react/commit/5412e5a247e8dc2b37307a4878a5a394f21efeb3))
33
+ * rename confirmPassword to confirmNewPassword, fix icon styling ([75b8167](https://github.com/Availity/availity-react/commit/75b8167416adecea2ef0b9db73875906c93a851a))
34
+
35
+
36
+ ### Features
37
+
38
+ * add change password component ([47e7041](https://github.com/Availity/availity-react/commit/47e70411c459a0651e60c605bffe2ccfc6d0e872))
39
+ * **change-password:** add support for custom alert toggles ([1903267](https://github.com/Availity/availity-react/commit/190326702c187f6ec82c7ef551856cd64161a175))
40
+ * **change-password:** remove deprecated react-block-ui and change to @availity/block-ui ([18797ab](https://github.com/Availity/availity-react/commit/18797abc426a89a85a4d71ac893b4b12ad69455f))
41
+ * **change-password:** upgrade react query to v4 ([1b635a0](https://github.com/Availity/availity-react/commit/1b635a04a70afa666919578398aa1569641abae7))
42
+ * upgrade deps ([eccefc0](https://github.com/Availity/availity-react/commit/eccefc0549ebd5057595f6ac696642789375f48a))
43
+
44
+
45
+ ### BREAKING CHANGES
46
+
47
+ * **change-password:** react query has been upgraded to v4. you must upgrade
48
+ to @tanstack/react-query@^4.36.1 in order to use this package now
49
+ * axios v1 is now required
50
+
51
+
52
+
5
53
  ## [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
54
 
7
55
  ### Dependency Updates
package/README.md CHANGED
@@ -22,5 +22,4 @@ yarn add @availity/change-password
22
22
 
23
23
  ## Documentation
24
24
 
25
- Check out more documentation at [availity.github.io](https://availity.github.io/availity-react/components/change-password/index)
26
-
25
+ Check out more documentation at [availity.github.io](https://availity.github.io/availity-react/components/change-password/)
package/index.js CHANGED
@@ -1,10 +1,2 @@
1
- import ChangePassword, { useChangePasswordContext, ChangePasswordContext } from './src/ChangePassword';
2
- import ChangePasswordForm from './src/ChangePasswordForm';
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.2",
3
+ "version": "2.1.4",
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.3",
29
- "@availity/form": "1.9.1",
30
- "@availity/icon": "0.11.7",
28
+ "@availity/block-ui": "^1.1.4",
29
+ "@availity/form": "1.9.3",
30
+ "@availity/icon": "0.11.8",
31
31
  "@tanstack/react-query": "^4.36.1",
32
- "classnames": "^2.3.2",
33
- "dayjs": "^1.11.9",
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": "^8.0.7",
39
- "axios": "^1.6.7",
40
- "react": "^18.2.0",
41
- "react-dom": "^18.2.0",
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.0.0",
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
- "root": "packages/change-password",
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": { "jestConfig": "packages/change-password/jest.config.js", "passWithNoTests": true }
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": "@availity/{projectName}@",
18
+ "tagPrefix": "{projectName}@",
16
19
  "baseBranch": "master",
17
20
  "trackDeps": true
18
21
  }
19
22
  },
20
23
  "lint": {
21
- "executor": "@nx/linter:eslint",
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,
@@ -22,6 +22,7 @@ const ChangePassword = ({ resource, schema, conditions, children }) => {
22
22
 
23
23
  return (
24
24
  <ChangePasswordContext.Provider
25
+ // eslint-disable-next-line react/jsx-no-constructed-context-values
25
26
  value={{
26
27
  loading,
27
28
  setLoading,
@@ -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 (new RegExp(/^.{8,15}$/).test(newPassword)) {
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 (new RegExp(/\d/).test(newPassword)) {
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 (new RegExp('[A-Z]').test(newPassword)) {
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 (new RegExp('[a-z]').test(newPassword)) {
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 (new RegExp(/[!"#$%&'()*+,./:;<=>?@[\\\]^_`{|}~-]/).test(newPassword)) {
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 (new RegExp('^\\S*$').test(newPassword)) {
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 }) => new RegExp(/^.{8,16}$/).test(newPassword),
18
+ passes: ({ newPassword }) => /^.{8,16}$/.test(newPassword),
19
19
  },
20
20
  {
21
21
  message: 'Have a number',
22
- passes: ({ newPassword }) => new RegExp(/\d/).test(newPassword),
22
+ passes: ({ newPassword }) => /\d/.test(newPassword),
23
23
  },
24
24
  {
25
25
  message: 'Have an uppercase letter',
26
- passes: ({ newPassword }) => new RegExp('[A-Z]').test(newPassword),
26
+ passes: ({ newPassword }) => /[A-Z]/.test(newPassword),
27
27
  },
28
28
  {
29
29
  message: 'Have a lowercase letter',
30
- passes: ({ newPassword }) => new RegExp('[a-z]').test(newPassword),
30
+ passes: ({ newPassword }) => /[a-z]/.test(newPassword),
31
31
  },
32
32
  {
33
33
  message: 'Have a special character',
34
- passes: ({ newPassword }) => new RegExp(/[!"#$%&'()*+,./:;<=>?@[\\\]^_`{|}~-]/).test(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 }) => new RegExp('^\\S*$').test(newPassword),
42
+ passes: ({ newPassword }) => /^\S*$/.test(newPassword),
43
43
  },
44
44
  {
45
45
  message: 'This one should always display the empty circle',