@isoftdata/svelte-user-configuration 1.3.0 → 1.3.2
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.
|
@@ -32,7 +32,7 @@ export async function open(userAccount) {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
const { t: translate } = getContext("i18next") || { t: defaultTranslate };
|
|
35
|
-
$: passwordMismatch = !(
|
|
35
|
+
$: passwordMismatch = !(newPassword && confirmPassword && newPassword === confirmPassword);
|
|
36
36
|
$: disablePasswordChange = changePasswordMode && !currentPassword || passwordMismatch || !newPassword || !confirmPassword || !passwordIsValid;
|
|
37
37
|
</script>
|
|
38
38
|
|
|
@@ -14,6 +14,7 @@ export let canToggleActive = true;
|
|
|
14
14
|
export let canEditAccountInfo = true;
|
|
15
15
|
export let doSendPasswordRecoveryToken = false;
|
|
16
16
|
export let hasPermissionToChangePassword = false;
|
|
17
|
+
export let passwordValidationRules = void 0;
|
|
17
18
|
export let error = void 0;
|
|
18
19
|
export let success = void 0;
|
|
19
20
|
export let deactivateUser = void 0;
|
|
@@ -43,14 +44,15 @@ let cardHeight;
|
|
|
43
44
|
bind:cardHeight
|
|
44
45
|
{canToggleActive}
|
|
45
46
|
{canEditAccountInfo}
|
|
47
|
+
{passwordValidationRules}
|
|
46
48
|
{hasPermissionToChangePassword}
|
|
47
49
|
{error}
|
|
48
50
|
{success}
|
|
49
51
|
{deactivateUser}
|
|
50
52
|
{accountInfoChanged}
|
|
51
53
|
{confirmPasswordSet}
|
|
52
|
-
{sendPasswordRecoveryToken}
|
|
53
54
|
{generateNewActivationPIN}
|
|
55
|
+
{sendPasswordRecoveryToken}
|
|
54
56
|
icon={userAccountInfoIcon}
|
|
55
57
|
>
|
|
56
58
|
<slot name="userAccountInfo"></slot>
|
|
@@ -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, DoSendPasswordRecoveryToken, 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, PasswordValidationRules, GroupMembershipChangeFn, PermissionValueChangeFn, GroupPermissionValueMap, GenerateNewActivationPINFn, DoSendPasswordRecoveryToken, SendPasswordRecoveryTokenFn, HasPermissionToChangePassword, PermissionListCardHeaderTitle } from './util';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
siteLabel?: SiteLabel;
|
|
@@ -14,10 +14,11 @@ declare const __propDef: {
|
|
|
14
14
|
canEditAccountInfo?: CanEditAccountInfo;
|
|
15
15
|
doSendPasswordRecoveryToken?: DoSendPasswordRecoveryToken;
|
|
16
16
|
hasPermissionToChangePassword?: HasPermissionToChangePassword;
|
|
17
|
+
passwordValidationRules?: PasswordValidationRules | undefined;
|
|
17
18
|
error?: ErrorFn;
|
|
18
19
|
success?: SuccessFn;
|
|
19
20
|
deactivateUser?: DeactivateUserFn;
|
|
20
|
-
confirmPasswordSet?: ConfirmPasswordSetFn;
|
|
21
|
+
confirmPasswordSet?: ConfirmPasswordSetFn | undefined;
|
|
21
22
|
accountInfoChanged?: AccountInfoChangedFn;
|
|
22
23
|
sendPasswordRecoveryToken?: SendPasswordRecoveryTokenFn;
|
|
23
24
|
generateNewActivationPIN?: GenerateNewActivationPINFn;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,4 +5,3 @@ export { default as PermissionList } from './PermissionList.svelte';
|
|
|
5
5
|
export { default as UserSiteAccess } from './UserSiteAccess.svelte';
|
|
6
6
|
export * from './util';
|
|
7
7
|
export type * from './util';
|
|
8
|
-
export type { ValidationRules as PasswordValidationRules } from '@isoftdata/svelte-password-fields';
|
package/dist/util.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export interface UserAccount {
|
|
|
26
26
|
} | null;
|
|
27
27
|
}
|
|
28
28
|
export type { IconName } from '@fortawesome/fontawesome-common-types';
|
|
29
|
+
export type { ValidationRules as PasswordValidationRules } from '@isoftdata/svelte-password-fields';
|
|
29
30
|
export type HTMLDivAttributes = HTMLAttributes<HTMLDivElement>;
|
|
30
31
|
export type SiteLabel = string;
|
|
31
32
|
export type PermissionValue = 'NONE' | 'SITE' | 'GLOBAL';
|