@isoftdata/svelte-user-configuration 1.0.19 → 1.0.20

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,9 +3,9 @@ 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
+ export let doSendPasswordRecoveryToken;
7
7
  let resetDate = void 0;
8
- let email = void 0;
8
+ let email = null;
9
9
  let show = false;
10
10
  export function open(passwordRecoveryEmail, lastResetDate) {
11
11
  email = passwordRecoveryEmail;
@@ -1,9 +1,9 @@
1
1
  import { SvelteComponent } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
- sendPasswordRecoveryToken?: ((email: string | undefined) => void | Promise<void>) | undefined;
5
- doSendPasswordRecoveryToken?: boolean;
6
- open?: (passwordRecoveryEmail: string | undefined, lastResetDate: Date | undefined) => void;
4
+ sendPasswordRecoveryToken?: ((email: string | null) => void | Promise<void>) | undefined;
5
+ doSendPasswordRecoveryToken: boolean;
6
+ open?: (passwordRecoveryEmail: string | null, lastResetDate: Date | undefined) => void;
7
7
  };
8
8
  events: {
9
9
  [evt: string]: CustomEvent<any>;
@@ -16,6 +16,6 @@ export type PasswordRecoveryModalProps = typeof __propDef.props;
16
16
  export type PasswordRecoveryModalEvents = typeof __propDef.events;
17
17
  export type PasswordRecoveryModalSlots = typeof __propDef.slots;
18
18
  export default class PasswordRecoveryModal extends SvelteComponent<PasswordRecoveryModalProps, PasswordRecoveryModalEvents, PasswordRecoveryModalSlots> {
19
- get open(): (passwordRecoveryEmail: string | undefined, lastResetDate: Date | undefined) => void;
19
+ get open(): (passwordRecoveryEmail: string | null, lastResetDate: Date | undefined) => void;
20
20
  }
21
21
  export {};
@@ -165,7 +165,7 @@ $: isCreatingNewUser = userAccount.id === null;
165
165
  iconClass="paper-plane"
166
166
  on:click={() => {
167
167
  if (userAccount.recoveryEmail) {
168
- passwordRecoveryModal.open(userAccount.recoveryEmail, userAccount.lastPasswordResetDate)
168
+ passwordRecoveryModal.open(userAccount.workEmail, userAccount.lastPasswordResetDate)
169
169
  }
170
170
  }}
171
171
  >
@@ -1,5 +1,7 @@
1
1
  import { SvelteComponent } from "svelte";
2
+ import type { ComponentProps } from 'svelte';
2
3
  import type { UserAccount, ConfirmPasswordSetFn, DeactivateUserFn, HTMLDivAttributes, IconName } from './';
4
+ import PasswordRecoveryModal from './PasswordRecoveryModal.svelte';
3
5
  declare const __propDef: {
4
6
  props: HTMLDivAttributes & {
5
7
  userAccount: UserAccount;
@@ -18,7 +20,7 @@ declare const __propDef: {
18
20
  message: string;
19
21
  }) => void | Promise<void>) | undefined;
20
22
  accountInfoChanged?: (() => void | Promise<void>) | undefined;
21
- sendPasswordRecoveryToken?: ((email: string | undefined) => void | Promise<void>) | undefined;
23
+ sendPasswordRecoveryToken?: ComponentProps<PasswordRecoveryModal>["sendPasswordRecoveryToken"];
22
24
  doSendPasswordRecoveryToken: boolean;
23
25
  icon?: IconName;
24
26
  usernameInput?: HTMLInputElement | undefined;
@@ -12,8 +12,8 @@ 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;
16
15
  export let canEditAccountInfo = true;
16
+ export let doSendPasswordRecoveryToken = false;
17
17
  export let hasPermissionToChangePassword = false;
18
18
  export let error = void 0;
19
19
  export let success = void 0;
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import type { ErrorFn, IconName, UserSites, SuccessFn, SiteLabel, UserAccount, Permissions, GroupMembership, CanToggleActive, DeactivateUserFn, CanEditSiteAccess, SiteAccessChangeFn, PermissionValueMap, CanEditAccountInfo, ConfirmPasswordSetFn, AccountInfoChangedFn, CanEditGroupMembership, GroupMembershipChangeFn, PermissionValueChangeFn, GroupPermissionValueMap, GenerateNewActivationPINFn, SendPasswordRecoveryTokenFn, HasPermissionToChangePassword, PermissionListCardHeaderTitle } from './util';
2
+ import type { ErrorFn, IconName, UserSites, SuccessFn, SiteLabel, UserAccount, Permissions, GroupMembership, CanToggleActive, DeactivateUserFn, CanEditSiteAccess, SiteAccessChangeFn, PermissionValueMap, CanEditAccountInfo, ConfirmPasswordSetFn, AccountInfoChangedFn, CanEditGroupMembership, GroupMembershipChangeFn, PermissionValueChangeFn, GroupPermissionValueMap, GenerateNewActivationPINFn, DoSendPasswordRecoveryToken, SendPasswordRecoveryTokenFn, HasPermissionToChangePassword, PermissionListCardHeaderTitle } from './util';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  siteLabel?: SiteLabel;
@@ -12,8 +12,8 @@ declare const __propDef: {
12
12
  usernameInput?: HTMLInputElement | undefined;
13
13
  userAccount: UserAccount;
14
14
  canToggleActive?: CanToggleActive;
15
- doSendPasswordRecoveryToken?: boolean;
16
15
  canEditAccountInfo?: CanEditAccountInfo;
16
+ doSendPasswordRecoveryToken?: DoSendPasswordRecoveryToken;
17
17
  hasPermissionToChangePassword?: HasPermissionToChangePassword;
18
18
  error?: ErrorFn;
19
19
  success?: SuccessFn;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isoftdata/svelte-user-configuration",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package",