@isoftdata/svelte-user-configuration
Advanced tools
@@ -107,9 +107,8 @@ <script lang="ts"> | ||
| } catch (err) { | ||
| console.log(err) | ||
| if (err instanceof Error) { | ||
| await error?.({ | ||
| heading: translate('configuration.messageHeading.failedToGenerateNewPIN', 'Failed To Generate New PIN'), | ||
| message: err.message, | ||
| }) | ||
| } | ||
| console.error(err) | ||
| await error?.({ | ||
| heading: translate('configuration.messageHeading.failedToGenerateNewPIN', 'Failed To Generate New PIN'), | ||
| message: | ||
| err instanceof Error ? err.message : translate('workOrder.unknownError', 'An unknown error occurred'), | ||
| }) | ||
| } | ||
@@ -404,8 +403,6 @@ } | ||
| console.error(err) | ||
| if (err instanceof Error) { | ||
| await error?.({ | ||
| heading: translate('configuration.user.messageHeading.failedToDeactivateUser', 'Failed To Deactivate User'), | ||
| message: err.message, | ||
| }) | ||
| } | ||
| await error?.({ | ||
| heading: translate('configuration.user.messageHeading.failedToDeactivateUser', 'Failed To Deactivate User'), | ||
| message: err instanceof Error ? err.message : translate('workOrder.unknownError', 'An unknown error occurred'), | ||
| }) | ||
| } | ||
@@ -428,2 +425,3 @@ }} | ||
| } catch (err) { | ||
| console.error(err) | ||
| await error?.({ | ||
@@ -434,3 +432,2 @@ heading: translate('configuration.user.passwordChangeErrorHeading', 'Failed To Change Password'), | ||
| }) | ||
| console.error(err) | ||
| throw err | ||
@@ -437,0 +434,0 @@ } |
+4
-1
| { | ||
| "name": "@isoftdata/svelte-user-configuration", | ||
| "version": "2.0.0", | ||
| "version": "2.0.1", | ||
| "scripts": { | ||
@@ -75,3 +75,6 @@ "dev": "vite dev", | ||
| "svelte": "^5.23.2" | ||
| }, | ||
| "engines": { | ||
| "pnpm": "10.x" | ||
| } | ||
| } |
+8
-5
@@ -5,6 +5,8 @@ # Svelte UserConfiguration | ||
|  | ||
|  | ||
| ## Install | ||
| ```sh | ||
| npm i @isoftdata/svelte-user-configuration | ||
| pnpm i @isoftdata/svelte-user-configuration | ||
| ``` | ||
@@ -31,4 +33,5 @@ | ||
| | `myAccountMode` | boolean | ❌ | `false` | When `true`, admin controls will be hidden/disabled. This is designed to be used when using the user account info component standalone so the current session user can edit their own account info, including first & last name, password recovery email, & password. | | ||
| | `passwordValidationRules` | `validationRules` of the [PasswordFields](<https://github.com/ISoft-Data-Systems/svelte-component-password-fields>) component | ❌ | `undefined` | Passwords rules to be enforced during password change. | | ||
| > Additionally, the `validationRules` & `passwordIsValid` props from the [PasswordFields](<https://github.com/ISoft-Data-Systems/svelte-component-password-fields>) component can be passed and will be used during password setting when `hasPermissionToChangePassword` or `myAccountMode` are `true` . | ||
| > The `passwordValidationRules` prop will be used during password setting when `hasPermissionToChangePassword` or `myAccountMode` are `true` . | ||
@@ -84,6 +87,6 @@ ### Site Access Properties | ||
| ## Slots | ||
| This component provides named slots for injecting additional content. | ||
| ## Snippets | ||
| This component provides snippets for injecting additional content. | ||
| | Slot Name | Description | | ||
| | Snippet Name | Description | | ||
| |-----------|-------------| | ||
@@ -90,0 +93,0 @@ | `userAccountInfo` | Slot at the end of the `userAccountInfo` component's card body | |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
65491
1.92%162
1.89%1
Infinity%