@isoftdata/svelte-user-configuration 1.2.2 → 1.2.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.
@@ -51,8 +51,16 @@ $: disablePasswordChange = changePasswordMode && !currentPassword || passwordMis
51
51
  on:submit={async e => {
52
52
  e.preventDefault()
53
53
  if (!disablePasswordChange && confirmPasswordSet) {
54
- await confirmPasswordSet({ currentPassword, newPassword })
55
- show = false
54
+ try {
55
+ const success = await confirmPasswordSet({ currentPassword, newPassword })
56
+ if (success) {
57
+ show = false
58
+ }
59
+ } catch (err) {
60
+ //In case the consumer doesn't handle their own error messages
61
+ console.error(err)
62
+ err instanceof Error ? alert(err.message) : undefined
63
+ }
56
64
  }
57
65
  }}
58
66
  >
@@ -7,7 +7,7 @@ declare const __propDef: {
7
7
  confirmPasswordSet?: ((ctx: {
8
8
  currentPassword: string;
9
9
  newPassword: string;
10
- }) => void | Promise<void>) | undefined;
10
+ }) => boolean | Promise<boolean>) | undefined;
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";
@@ -163,7 +162,7 @@ $: isCreatingNewUser = userAccount.id === null;
163
162
  {/if}
164
163
  </div>
165
164
  {/if}
166
- <div class="col-12">
165
+ <div class="col-12 col-lg-6">
167
166
  <Input
168
167
  label={translate('configuration.user.accountInfo.username', 'Username')}
169
168
  bind:value={userAccount.name}
@@ -180,6 +179,7 @@ $: isCreatingNewUser = userAccount.id === null;
180
179
  tabindex={myAccountMode ? -1 : undefined}
181
180
  />
182
181
  </div>
182
+ <div class="col-12 col-lg-6"></div>
183
183
  <div class="col-12 col-md-6">
184
184
  <Input
185
185
  label={translate('configuration.user.accountInfo.firstName', 'First Name')}
@@ -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.2",
3
+ "version": "1.2.4",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package",