
Product
Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.
@isoftdata/svelte-user-configuration
Advanced tools
This Svelte component provides a user configuration interface, including user account details, site access, group membership, and permissions.

pnpm i @isoftdata/svelte-user-configuration
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
userAccount | UserAccount | ✅ | - | The user account information. |
canToggleActive | boolean | ❌ | true | Whether the user can be activated/deactivated. |
canEditAccountInfo | boolean | ❌ | true | Whether account details can be edited. |
doSendPasswordRecoveryToken | boolean | ❌ | false | Whether to allow sending password recovery tokens. |
hasPermissionToChangePassword | boolean | ❌ | false | Whether the user has permission to change passwords. |
myAccountMode | boolean | ❌ | false | When true, admin controls will be hidden/disabled. This is designed to be used when using the user account info component standalone so the current session user can edit their own account info, including first & last name, password recovery email, & password. |
passwordValidationRules | validationRules of the PasswordFields component | ❌ | undefined | Passwords rules to be enforced during password change. |
The
passwordValidationRulesprop will be used during password setting whenhasPermissionToChangePasswordormyAccountModearetrue.
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
userSites | UserSites | ✅ | - | List of sites the user has access to. |
canEditSiteAccess | boolean | ❌ | true | Whether site access can be edited. |
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
groupMembership | GroupMembership | ✅ | - | The user's group membership information. |
canEditGroupMembership | boolean | ❌ | true | Whether group memberships can be edited. |
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
permissions | Permissions | ✅ | - | The list of permissions for the user. |
permissionValueMap | PermissionValueMap | ✅ | new SvelteMap() | A mapping of permissions to their values. Note this must be a SvelteMap or reactivity will not work. |
groupPermissionValueMap | GroupPermissionValueMap | ❌ | undefined | A mapping of group-based permissions. |
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
siteLabel | SiteLabel | ❌ | "Site" | Label for the site. |
showSiteAccess | boolean | ❌ | true | Whether the site access section is shown. |
userAccountInfoIcon | IconName | ❌ | "user" | Icon for the user account section. |
groupMembershipIcon | IconName | ❌ | "users" | Icon for the group membership section. |
permissionListIcon | IconName | ❌ | "user-lock" | Icon for the permission list section. |
userSiteAccessIcon | IconName | ❌ | "industry-windows" | Icon for the site access section. |
permissionListCardHeaderTitle | PermissionListCardHeaderTitle | ❌ | "Permissions" | Title for the permission list card header. |
usernameInput | HTMLInputElement | undefined | ❌ | undefined | Reference to the username input element. |
| Prop | Type | Description |
|---|---|---|
error | ErrorFn | Callback for handling errors. |
success | SuccessFn | Callback for handling success messages. |
deactivateUser | DeactivateUserFn | Function to deactivate a user. |
confirmPasswordSet | ConfirmPasswordSetFn | Function called when a password is set. |
accountInfoChanged | AccountInfoChangedFn | Function called when account info changes. |
sendPasswordRecoveryToken | SendPasswordRecoveryTokenFn | Function to send password recovery token. |
generateNewActivationPIN | GenerateNewActivationPINFn | Function to generate a new activation PIN. |
permissionValueChange | PermissionValueChangeFn | Function called when permissions change. |
siteAccessChange | SiteAccessChangeFn | Function called when site access is changed. |
groupMembershipChange | GroupMembershipChangeFn | Function called when group membership changes. |
This component provides snippets for injecting additional content.
| Snippet Name | Description |
|---|---|
userAccountInfo | Slot at the end of the userAccountInfo component's card body |
siteAccess | Slot at the end of the siteAccess component's card body |
userGroupMembership | Slot at the end of the userGroupMembership component's card body |
permissionList | Slot at the end of the permissionList component's card body |
<script lang="ts">
import { UserConfiguration, getGroupHighestPermissionValueMap } from '@isoftdata/svelte-user-configuration'
interface Props {
plants: PlantsForDropdown$result['plants']['data']
groups: Array<Group>
permissions: UserConfigurationData$result['permissions']['data']
userAccount: UserAccount
permissionValueMap?: PermissionValueMap
groupPermissionMap?: GroupPermissionMap
authorizedSitesSet?: any
groupMembershipSet?: any
}
let {
plants,
groups,
permissions,
userAccount = $bindable(),
permissionValueMap = $bindable(new SvelteMap()),
groupPermissionMap = new SvelteMap(),
authorizedSitesSet = $bindable(new SvelteSet<number>()),
groupMembershipSet = $bindable(new SvelteSet<number>()),
}: Props = $props()
let userSites = $derived(
plants.map(({ id, code, name }) => {
return { id, code, name, isAuthorized: authorizedSitesSet.has(id) }
}),
)
let groupMembership = $derived(
groups.map(({ id, name }) => {
return { id, name, isMember: groupMembershipSet.has(id) }
}),
)
let groupPermissionValueMap = $derived(getGroupHighestPermissionValueMap(groupMembershipSet, groupPermissionMap))
</script>
<UserConfiguration
siteLabel="Plant"
bind:userAccount
bind:usernameInput
bind:doSendPasswordRecoveryToken={sendPasswordRecoveryToken}
{userSites}
{groupMembership}
{permissions}
{permissionValueMap}
{groupPermissionValueMap}
siteAccessChange={async site => {
site.isAuthorized ? authorizedSitesSet.add(site.id) : authorizedSitesSet.delete(site.id)
authorizedSitesSet = new Set(authorizedSitesSet)
}}
groupMembershipChange={async ({ id, isMember }) => {
isMember ? groupMembershipSet.add(id) : groupMembershipSet.delete(id)
groupMembershipSet = new Set(groupMembershipSet)
}}
permissionValueChange={async ({ permissionIds, value }) => {
for (const id of permissionIds) {
permissionValueMap.set(id, value)
}
permissionValueMap = new SvelteMap(permissionValueMap)
}}
/>
FAQs
Unknown package
The npm package @isoftdata/svelte-user-configuration receives a total of 216 weekly downloads. As such, @isoftdata/svelte-user-configuration popularity was classified as not popular.
We found that @isoftdata/svelte-user-configuration demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.