@isoftdata/svelte-user-configuration 1.2.3 → 1.2.5

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.
@@ -16,7 +16,7 @@ let passwordRecoveryEmail = void 0;
16
16
  let passwordIsValid = false;
17
17
  export let validationRules = void 0;
18
18
  export let changePasswordMode = false;
19
- export let confirmPasswordSet = void 0;
19
+ export let confirmPasswordSet;
20
20
  export async function open(userAccount) {
21
21
  currentPassword = "";
22
22
  newPassword = "";
@@ -50,7 +50,7 @@ $: disablePasswordChange = changePasswordMode && !currentPassword || passwordMis
50
50
  id="setPasswordForm"
51
51
  on:submit={async e => {
52
52
  e.preventDefault()
53
- if (!disablePasswordChange && confirmPasswordSet) {
53
+ if (!disablePasswordChange) {
54
54
  await confirmPasswordSet({ currentPassword, newPassword })
55
55
  show = false
56
56
  }
@@ -4,10 +4,10 @@ declare const __propDef: {
4
4
  props: {
5
5
  validationRules?: PasswordValidationRules | undefined;
6
6
  changePasswordMode?: boolean;
7
- confirmPasswordSet?: ((ctx: {
7
+ confirmPasswordSet: (ctx: {
8
8
  currentPassword: string;
9
9
  newPassword: string;
10
- }) => void | Promise<void>) | undefined;
10
+ }) => void | Promise<void>;
11
11
  open?: (userAccount?: UserAccount) => Promise<void>;
12
12
  };
13
13
  events: {
@@ -1,10 +1,9 @@
1
- <script>import { getContext, tick } from "svelte";
1
+ <script>import { getContext } from "svelte";
2
2
  import Icon from "@isoftdata/svelte-icon";
3
3
  import Input from "@isoftdata/svelte-input";
4
4
  import Button from "@isoftdata/svelte-button";
5
5
  import TextArea from "@isoftdata/svelte-textarea";
6
6
  import PasswordSetModal from "./PasswordSetModal.svelte";
7
- import PasswordFields from "@isoftdata/svelte-password-fields";
8
7
  import DeactivateUserModal from "./DeactivateUserModal.svelte";
9
8
  import PasswordRecoveryModal from "./PasswordRecoveryModal.svelte";
10
9
  import { translate as defaultTranslate } from "@isoftdata/utility-string";
@@ -326,6 +325,8 @@ $: isCreatingNewUser = userAccount.id === null;
326
325
  heading: translate('configuration.user.passwordChangeFailure', 'Failed To Change Password'),
327
326
  message: err instanceof Error ? err.message : translate('workOrder.unknownError', 'An unknown error occurred'),
328
327
  })
328
+ console.error(err)
329
+ throw err
329
330
  }
330
331
  } else {
331
332
  //Guess if they didn't give us a confirmPasswordSet function to call we'll just update the userAccount object and they can handle it later
@@ -28,7 +28,6 @@ declare const __propDef: {
28
28
  myAccountMode?: boolean;
29
29
  passwordValidationRules?: PasswordValidationRules | undefined;
30
30
  cardTitle?: string;
31
- passwordIsValid?: boolean;
32
31
  };
33
32
  events: {
34
33
  [evt: string]: CustomEvent<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isoftdata/svelte-user-configuration",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package",