@isoftdata/svelte-user-configuration 1.0.18 → 1.0.19

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.
@@ -3,6 +3,7 @@ import Modal from "@isoftdata/svelte-modal";
3
3
  import Input from "@isoftdata/svelte-input";
4
4
  const { t: translate } = getContext("i18next") || { t: (_key, fallback) => fallback };
5
5
  export let sendPasswordRecoveryToken = void 0;
6
+ export let doSendPasswordRecoveryToken = false;
6
7
  let resetDate = void 0;
7
8
  let email = void 0;
8
9
  let show = false;
@@ -28,6 +29,7 @@ export function open(passwordRecoveryEmail, lastResetDate) {
28
29
  on:submit={async event => {
29
30
  event.preventDefault()
30
31
  try {
32
+ doSendPasswordRecoveryToken = true
31
33
  await sendPasswordRecoveryToken?.(email)
32
34
  show = false
33
35
  } catch (err) {
@@ -2,6 +2,7 @@ import { SvelteComponent } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  sendPasswordRecoveryToken?: ((email: string | undefined) => void | Promise<void>) | undefined;
5
+ doSendPasswordRecoveryToken?: boolean;
5
6
  open?: (passwordRecoveryEmail: string | undefined, lastResetDate: Date | undefined) => void;
6
7
  };
7
8
  events: {
@@ -18,6 +18,7 @@ export let accountInfoChanged = void 0;
18
18
  export let error = void 0;
19
19
  export let success = void 0;
20
20
  export let sendPasswordRecoveryToken = void 0;
21
+ export let doSendPasswordRecoveryToken = false;
21
22
  export let generateNewActivationPIN = () => Promise.resolve();
22
23
  export let usernameInput = void 0;
23
24
  let isLoading = false;
@@ -258,6 +259,7 @@ $: isCreatingNewUser = userAccount.id === null;
258
259
 
259
260
  <PasswordRecoveryModal
260
261
  bind:this={passwordRecoveryModal}
262
+ bind:doSendPasswordRecoveryToken
261
263
  {sendPasswordRecoveryToken}
262
264
  />
263
265
 
@@ -19,6 +19,7 @@ declare const __propDef: {
19
19
  }) => void | Promise<void>) | undefined;
20
20
  accountInfoChanged?: (() => void | Promise<void>) | undefined;
21
21
  sendPasswordRecoveryToken?: ((email: string | undefined) => void | Promise<void>) | undefined;
22
+ doSendPasswordRecoveryToken: boolean;
22
23
  icon?: IconName;
23
24
  usernameInput?: HTMLInputElement | undefined;
24
25
  };
@@ -12,6 +12,7 @@ export let cardDeckHeight = "500px";
12
12
  export let usernameInput = void 0;
13
13
  export let userAccount;
14
14
  export let canToggleActive = true;
15
+ export let doSendPasswordRecoveryToken = false;
15
16
  export let canEditAccountInfo = true;
16
17
  export let hasPermissionToChangePassword = false;
17
18
  export let error = void 0;
@@ -38,6 +39,7 @@ export let permissionValueChange = void 0;
38
39
  <UserAccountInfo
39
40
  bind:userAccount
40
41
  bind:usernameInput
42
+ bind:doSendPasswordRecoveryToken
41
43
  {canToggleActive}
42
44
  {canEditAccountInfo}
43
45
  {hasPermissionToChangePassword}
@@ -12,6 +12,7 @@ declare const __propDef: {
12
12
  usernameInput?: HTMLInputElement | undefined;
13
13
  userAccount: UserAccount;
14
14
  canToggleActive?: CanToggleActive;
15
+ doSendPasswordRecoveryToken?: boolean;
15
16
  canEditAccountInfo?: CanEditAccountInfo;
16
17
  hasPermissionToChangePassword?: HasPermissionToChangePassword;
17
18
  error?: ErrorFn;
package/dist/util.d.ts CHANGED
@@ -2,6 +2,7 @@ import type { ComponentProps } from 'svelte';
2
2
  import type { HTMLAttributes } from 'svelte/elements';
3
3
  import DeactivateUserModal from './DeactivateUserModal.svelte';
4
4
  import PasswordSetModal from './PasswordSetModal.svelte';
5
+ import PasswordRecoveryModal from './PasswordRecoveryModal.svelte';
5
6
  import UserAccountInfo from './UserAccountInfo.svelte';
6
7
  import UserSiteAccess from './UserSiteAccess.svelte';
7
8
  import UserGroupMembership from './UserGroupMembership.svelte';
@@ -32,12 +33,13 @@ export type GenerateNewActivationPINFn = ComponentProps<UserAccountInfo>['genera
32
33
  export type SuccessFn = ComponentProps<UserAccountInfo>['success'];
33
34
  export type ErrorFn = ComponentProps<UserAccountInfo>['error'];
34
35
  export type AccountInfoChangedFn = ComponentProps<UserAccountInfo>['accountInfoChanged'];
35
- export type SendPasswordRecoveryTokenFn = ComponentProps<UserAccountInfo>['sendPasswordRecoveryToken'];
36
36
  export type CanEditAccountInfo = ComponentProps<UserAccountInfo>['canEditAccountInfo'];
37
37
  export type CanToggleActive = ComponentProps<UserAccountInfo>['canToggleActive'];
38
38
  export type HasPermissionToChangePassword = ComponentProps<UserAccountInfo>['hasPermissionToChangePassword'];
39
39
  export type ConfirmPasswordSetFn = ComponentProps<PasswordSetModal>['confirmPasswordSet'];
40
40
  export type DeactivateUserFn = ComponentProps<DeactivateUserModal>['deactivateUser'];
41
+ export type DoSendPasswordRecoveryToken = ComponentProps<PasswordRecoveryModal>['doSendPasswordRecoveryToken'];
42
+ export type SendPasswordRecoveryTokenFn = ComponentProps<PasswordRecoveryModal>['sendPasswordRecoveryToken'];
41
43
  export type UserSites = ComponentProps<UserSiteAccess>['userSites'];
42
44
  export type CanEditSiteAccess = ComponentProps<UserSiteAccess>['canEditSiteAccess'];
43
45
  export type SiteAccessChangeFn = ComponentProps<UserSiteAccess>['siteAccessChange'];
package/dist/util.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import DeactivateUserModal from './DeactivateUserModal.svelte';
2
2
  import PasswordSetModal from './PasswordSetModal.svelte';
3
+ import PasswordRecoveryModal from './PasswordRecoveryModal.svelte';
3
4
  import UserAccountInfo from './UserAccountInfo.svelte';
4
5
  import UserSiteAccess from './UserSiteAccess.svelte';
5
6
  import UserGroupMembership from './UserGroupMembership.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isoftdata/svelte-user-configuration",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package",