@isoftdata/svelte-user-configuration 1.0.17 → 1.0.18
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.
|
@@ -11,7 +11,6 @@ export let userAccount;
|
|
|
11
11
|
export let icon = "user";
|
|
12
12
|
export let canToggleActive = true;
|
|
13
13
|
export let canEditAccountInfo = true;
|
|
14
|
-
export let isCreatingNewUser = false;
|
|
15
14
|
export let deactivateUser = void 0;
|
|
16
15
|
export let hasPermissionToChangePassword = false;
|
|
17
16
|
export let confirmPasswordSet = void 0;
|
|
@@ -65,6 +64,7 @@ async function reactivateUserAccount() {
|
|
|
65
64
|
$: workEmail = userAccount.workEmail;
|
|
66
65
|
$: status = userAccount.status;
|
|
67
66
|
$: activationPIN = userAccount.userActivationData?.activationPIN;
|
|
67
|
+
$: isCreatingNewUser = userAccount.id === null;
|
|
68
68
|
</script>
|
|
69
69
|
|
|
70
70
|
<div
|
|
@@ -191,7 +191,8 @@ $: activationPIN = userAccount.userActivationData?.activationPIN;
|
|
|
191
191
|
required={isCreatingNewUser}
|
|
192
192
|
validation={{
|
|
193
193
|
validator: value => {
|
|
194
|
-
|
|
194
|
+
if (!value) return 'Username is required.'
|
|
195
|
+
else return value.length > 320 ? 'Username must be less than 320 characters.' : true
|
|
195
196
|
},
|
|
196
197
|
}}
|
|
197
198
|
bind:input={usernameInput}
|
|
@@ -5,7 +5,6 @@ declare const __propDef: {
|
|
|
5
5
|
userAccount: UserAccount;
|
|
6
6
|
canEditAccountInfo?: boolean;
|
|
7
7
|
canToggleActive?: boolean;
|
|
8
|
-
isCreatingNewUser?: boolean;
|
|
9
8
|
hasPermissionToChangePassword?: boolean;
|
|
10
9
|
generateNewActivationPIN?: (userName: string, hasWorkEmail: boolean) => Promise<void>;
|
|
11
10
|
confirmPasswordSet?: ConfirmPasswordSetFn;
|
|
@@ -12,7 +12,6 @@ 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 isCreatingNewUser = false;
|
|
16
15
|
export let canEditAccountInfo = true;
|
|
17
16
|
export let hasPermissionToChangePassword = false;
|
|
18
17
|
export let error = void 0;
|
|
@@ -41,7 +40,6 @@ export let permissionValueChange = void 0;
|
|
|
41
40
|
bind:usernameInput
|
|
42
41
|
{canToggleActive}
|
|
43
42
|
{canEditAccountInfo}
|
|
44
|
-
{isCreatingNewUser}
|
|
45
43
|
{hasPermissionToChangePassword}
|
|
46
44
|
{error}
|
|
47
45
|
{success}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { ErrorFn, IconName, UserSites, SuccessFn, SiteLabel, UserAccount, Permissions, GroupMembership, CanToggleActive, DeactivateUserFn, CanEditSiteAccess,
|
|
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';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
siteLabel?: SiteLabel;
|
|
@@ -12,7 +12,6 @@ declare const __propDef: {
|
|
|
12
12
|
usernameInput?: HTMLInputElement | undefined;
|
|
13
13
|
userAccount: UserAccount;
|
|
14
14
|
canToggleActive?: CanToggleActive;
|
|
15
|
-
isCreatingNewUser?: IsCreatingNewUser;
|
|
16
15
|
canEditAccountInfo?: CanEditAccountInfo;
|
|
17
16
|
hasPermissionToChangePassword?: HasPermissionToChangePassword;
|
|
18
17
|
error?: ErrorFn;
|
package/dist/util.d.ts
CHANGED
|
@@ -35,7 +35,6 @@ export type AccountInfoChangedFn = ComponentProps<UserAccountInfo>['accountInfoC
|
|
|
35
35
|
export type SendPasswordRecoveryTokenFn = ComponentProps<UserAccountInfo>['sendPasswordRecoveryToken'];
|
|
36
36
|
export type CanEditAccountInfo = ComponentProps<UserAccountInfo>['canEditAccountInfo'];
|
|
37
37
|
export type CanToggleActive = ComponentProps<UserAccountInfo>['canToggleActive'];
|
|
38
|
-
export type IsCreatingNewUser = ComponentProps<UserAccountInfo>['isCreatingNewUser'];
|
|
39
38
|
export type HasPermissionToChangePassword = ComponentProps<UserAccountInfo>['hasPermissionToChangePassword'];
|
|
40
39
|
export type ConfirmPasswordSetFn = ComponentProps<PasswordSetModal>['confirmPasswordSet'];
|
|
41
40
|
export type DeactivateUserFn = ComponentProps<DeactivateUserModal>['deactivateUser'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isoftdata/svelte-user-configuration",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "vite build && npm run package",
|
|
@@ -70,4 +70,4 @@
|
|
|
70
70
|
"just-camel-case": "^6.2.0",
|
|
71
71
|
"klona": "^2.0.6"
|
|
72
72
|
}
|
|
73
|
-
}
|
|
73
|
+
}
|