@isoftdata/svelte-user-configuration 2.3.2 → 2.3.3
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.
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
permissionValueMap: PermissionValueMap
|
|
47
47
|
groupPermissionValueMap?: PermissionValueMap | undefined
|
|
48
48
|
children?: Snippet
|
|
49
|
+
permissionTranslationNamespace?: string
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
let {
|
|
@@ -58,6 +59,7 @@
|
|
|
58
59
|
permissionValueMap = $bindable(new SvelteMap()),
|
|
59
60
|
groupPermissionValueMap = undefined,
|
|
60
61
|
children,
|
|
62
|
+
permissionTranslationNamespace = 'permissions',
|
|
61
63
|
...rest
|
|
62
64
|
}: Props = $props()
|
|
63
65
|
|
|
@@ -139,8 +141,14 @@
|
|
|
139
141
|
|
|
140
142
|
return {
|
|
141
143
|
...permission,
|
|
142
|
-
displayName: translate(
|
|
143
|
-
|
|
144
|
+
displayName: translate(
|
|
145
|
+
`${permissionTranslationNamespace}:${camelCase(permission.codeName)}.displayName`,
|
|
146
|
+
permission.displayName,
|
|
147
|
+
),
|
|
148
|
+
category: translate(
|
|
149
|
+
`${permissionTranslationNamespace}:categories.${camelCase(permission.category)}`,
|
|
150
|
+
permission.category,
|
|
151
|
+
),
|
|
144
152
|
value,
|
|
145
153
|
groupValue,
|
|
146
154
|
computedValue:
|
|
@@ -18,6 +18,7 @@ declare const PermissionList: import("svelte").Component<HTMLDivAttributes & {
|
|
|
18
18
|
permissionValueMap: Map<number, "NONE" | "SITE" | "GLOBAL">;
|
|
19
19
|
groupPermissionValueMap?: Map<number, "NONE" | "SITE" | "GLOBAL"> | undefined;
|
|
20
20
|
children?: Snippet;
|
|
21
|
+
permissionTranslationNamespace?: string;
|
|
21
22
|
}, {}, "permissionValueMap">;
|
|
22
23
|
type PermissionList = ReturnType<typeof PermissionList>;
|
|
23
24
|
export default PermissionList;
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
groupMembershipChange?: GroupMembershipChangeFn
|
|
65
65
|
permissions: Permissions
|
|
66
66
|
permissionValueMap?: PermissionValueMap
|
|
67
|
+
permissionTranslationNamespace?: string
|
|
67
68
|
groupPermissionValueMap?: GroupPermissionValueMap
|
|
68
69
|
permissionValueChange?: PermissionValueChangeFn
|
|
69
70
|
userAccountInfo?: Snippet
|
|
@@ -80,6 +81,7 @@
|
|
|
80
81
|
permissionListIcon = 'user-lock',
|
|
81
82
|
userSiteAccessIcon = 'industry-windows',
|
|
82
83
|
permissionListCardHeaderTitle = 'Permissions',
|
|
84
|
+
permissionTranslationNamespace,
|
|
83
85
|
usernameInput = $bindable(undefined),
|
|
84
86
|
userAccount = $bindable(),
|
|
85
87
|
canToggleActive = true,
|
|
@@ -178,6 +180,7 @@
|
|
|
178
180
|
<PermissionList
|
|
179
181
|
{siteLabel}
|
|
180
182
|
{permissions}
|
|
183
|
+
{permissionTranslationNamespace}
|
|
181
184
|
enableSiteScope={showSiteAccess}
|
|
182
185
|
{permissionValueMap}
|
|
183
186
|
{groupPermissionValueMap}
|
|
@@ -30,6 +30,7 @@ interface Props {
|
|
|
30
30
|
groupMembershipChange?: GroupMembershipChangeFn;
|
|
31
31
|
permissions: Permissions;
|
|
32
32
|
permissionValueMap?: PermissionValueMap;
|
|
33
|
+
permissionTranslationNamespace?: string;
|
|
33
34
|
groupPermissionValueMap?: GroupPermissionValueMap;
|
|
34
35
|
permissionValueChange?: PermissionValueChangeFn;
|
|
35
36
|
userAccountInfo?: Snippet;
|