@ndla/ui 34.5.0 → 34.6.1
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.
- package/lib/User/apiTypes.d.ts +4 -4
- package/lib/User/index.d.ts +2 -2
- package/lib/User/parseUserObject.d.ts +1 -1
- package/lib/index.d.ts +1 -1
- package/package.json +11 -11
- package/src/User/__tests__/parseUserObject-test.ts +10 -10
- package/src/User/apiTypes.ts +4 -4
- package/src/User/index.ts +10 -2
- package/src/index.ts +9 -1
package/lib/User/apiTypes.d.ts
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
type OrgType = 'higher_education' | 'primary_and_lower_secondary' | 'primary_and_lower_secondary_owner' | 'upper_secondary' | 'upper_secondary_owner';
|
|
9
|
-
type AffiliationType = 'member' | 'student' | 'faculty' | 'staff' | 'affiliate' | 'employee';
|
|
9
|
+
export type AffiliationType = 'member' | 'student' | 'faculty' | 'staff' | 'affiliate' | 'employee';
|
|
10
10
|
export interface FeideMembershipType {
|
|
11
11
|
basic: 'member' | 'admin' | 'owner';
|
|
12
|
-
affiliation?: AffiliationType[]
|
|
12
|
+
affiliation?: AffiliationType[];
|
|
13
13
|
primarySchool?: boolean;
|
|
14
14
|
primaryAffiliation?: AffiliationType;
|
|
15
15
|
displayName?: string;
|
|
@@ -51,8 +51,8 @@ export type FeideGroup = FeideOrg | FeideGoGroup | FeideGrep;
|
|
|
51
51
|
export interface FeideUser {
|
|
52
52
|
cn: string[];
|
|
53
53
|
displayName: string;
|
|
54
|
-
eduPersonAffiliation: AffiliationType[]
|
|
55
|
-
eduPersonPrimaryAffiliation:
|
|
54
|
+
eduPersonAffiliation: AffiliationType[];
|
|
55
|
+
eduPersonPrimaryAffiliation: AffiliationType;
|
|
56
56
|
eduPersonPrincipalName: string;
|
|
57
57
|
givenName: string[];
|
|
58
58
|
mail?: string[];
|
package/lib/User/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import AuthModal from './AuthModal';
|
|
9
9
|
import { UserInfo } from './UserInfo';
|
|
10
|
-
import type { FeideGoGroup, FeideGroup, FeideOrg, FeideUserApiType, FeideMembershipType, FeideUser } from './apiTypes';
|
|
10
|
+
import type { AffiliationType, FeideGoGroup, FeideGroup, FeideOrg, FeideUserApiType, FeideMembershipType, FeideUser } from './apiTypes';
|
|
11
11
|
export { UserInfo };
|
|
12
|
-
export type { FeideGoGroup, FeideGroup, FeideOrg, FeideUserApiType, FeideMembershipType, FeideUser };
|
|
12
|
+
export type { AffiliationType, FeideGoGroup, FeideGroup, FeideOrg, FeideUserApiType, FeideMembershipType, FeideUser };
|
|
13
13
|
export default AuthModal;
|
|
@@ -12,7 +12,7 @@ type GoGroupType = 'basic' | 'teaching' | 'other';
|
|
|
12
12
|
*/
|
|
13
13
|
export declare const parseUserObject: (user: FeideUserApiType) => {
|
|
14
14
|
uid: string[];
|
|
15
|
-
primaryAffiliation:
|
|
15
|
+
primaryAffiliation: import("./apiTypes").AffiliationType;
|
|
16
16
|
displayName: string;
|
|
17
17
|
mail: string[] | undefined;
|
|
18
18
|
organizations: {
|
package/lib/index.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export { default as MastheadSearchModal } from './Masthead/MastheadSearchModal';
|
|
|
42
42
|
export { default as MastheadAuthModal } from './Masthead/MastheadAuthModal';
|
|
43
43
|
export { UserInfo } from './User';
|
|
44
44
|
export { default as AuthModal } from './User';
|
|
45
|
-
export type { FeideGoGroup, FeideGroup, FeideOrg, FeideUserApiType, FeideMembershipType, FeideUser } from './User';
|
|
45
|
+
export type { AffiliationType, FeideGoGroup, FeideGroup, FeideOrg, FeideUserApiType, FeideMembershipType, FeideUser, } from './User';
|
|
46
46
|
export { default as resourceTypeColor } from './utils/resourceTypeColor';
|
|
47
47
|
export { default as CreatedBy } from './CreatedBy';
|
|
48
48
|
export { default as Breadcrumblist } from './Breadcrumblist';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "34.
|
|
3
|
+
"version": "34.6.1",
|
|
4
4
|
"description": "UI component library for NDLA.",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -32,19 +32,19 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@ndla/article-scripts": "^3.0.14",
|
|
35
|
-
"@ndla/button": "^9.1.
|
|
35
|
+
"@ndla/button": "^9.1.3",
|
|
36
36
|
"@ndla/carousel": "^3.0.3",
|
|
37
37
|
"@ndla/core": "^3.1.2",
|
|
38
|
-
"@ndla/forms": "^4.2.
|
|
39
|
-
"@ndla/hooks": "^2.0.
|
|
38
|
+
"@ndla/forms": "^4.2.6",
|
|
39
|
+
"@ndla/hooks": "^2.0.1",
|
|
40
40
|
"@ndla/icons": "^2.2.3",
|
|
41
|
-
"@ndla/licenses": "^7.0.
|
|
41
|
+
"@ndla/licenses": "^7.0.1",
|
|
42
42
|
"@ndla/modal": "^2.2.7",
|
|
43
|
-
"@ndla/notion": "^4.2.
|
|
44
|
-
"@ndla/safelink": "^4.0.
|
|
43
|
+
"@ndla/notion": "^4.2.3",
|
|
44
|
+
"@ndla/safelink": "^4.0.8",
|
|
45
45
|
"@ndla/switch": "^1.0.7",
|
|
46
|
-
"@ndla/tabs": "^2.1.
|
|
47
|
-
"@ndla/tooltip": "^4.0.
|
|
46
|
+
"@ndla/tabs": "^2.1.6",
|
|
47
|
+
"@ndla/tooltip": "^4.0.9",
|
|
48
48
|
"@ndla/types-learningpath-api": "^0.0.17",
|
|
49
49
|
"@ndla/util": "^3.1.9",
|
|
50
50
|
"@radix-ui/react-dropdown-menu": "2.0.2",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"i18next-browser-languagedetector": "^6.1.1",
|
|
57
57
|
"invariant": "^2.2.3",
|
|
58
58
|
"react-bem-helper": "1.4.1",
|
|
59
|
-
"react-device-detect": "^2.2.
|
|
59
|
+
"react-device-detect": "^2.2.3",
|
|
60
60
|
"react-select": "^5.7.0",
|
|
61
61
|
"react-swipeable": "^7.0.0",
|
|
62
62
|
"remarkable": "^2.0.1",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"access": "public"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "f4df50f25d48eeea4c064864366cf0ccb2d4f778"
|
|
87
87
|
}
|
|
@@ -70,7 +70,7 @@ const feideUserLaerer: FeideUserApiType = {
|
|
|
70
70
|
parent: 'fc:org:spusers.feide.no:unit:NO856326501',
|
|
71
71
|
membership: {
|
|
72
72
|
basic: 'member',
|
|
73
|
-
affiliation: 'employee',
|
|
73
|
+
affiliation: ['employee'],
|
|
74
74
|
displayName: 'Ansatt',
|
|
75
75
|
},
|
|
76
76
|
go_type_displayName: 'basisgruppe',
|
|
@@ -85,7 +85,7 @@ const feideUserLaerer: FeideUserApiType = {
|
|
|
85
85
|
parent: 'fc:org:spusers.feide.no:unit:NO856326501',
|
|
86
86
|
membership: {
|
|
87
87
|
basic: 'member',
|
|
88
|
-
affiliation: 'employee',
|
|
88
|
+
affiliation: ['employee'],
|
|
89
89
|
displayName: 'Ansatt',
|
|
90
90
|
},
|
|
91
91
|
go_type_displayName: 'other groups',
|
|
@@ -100,7 +100,7 @@ const feideUserLaerer: FeideUserApiType = {
|
|
|
100
100
|
parent: 'fc:org:spusers.feide.no:unit:NO856326501',
|
|
101
101
|
membership: {
|
|
102
102
|
basic: 'member',
|
|
103
|
-
affiliation: 'employee',
|
|
103
|
+
affiliation: ['employee'],
|
|
104
104
|
displayName: 'Ansatt',
|
|
105
105
|
},
|
|
106
106
|
go_type_displayName: 'other groups',
|
|
@@ -115,7 +115,7 @@ const feideUserLaerer: FeideUserApiType = {
|
|
|
115
115
|
parent: 'fc:org:spusers.feide.no:unit:NO856326501',
|
|
116
116
|
membership: {
|
|
117
117
|
basic: 'member',
|
|
118
|
-
affiliation: 'employee',
|
|
118
|
+
affiliation: ['employee'],
|
|
119
119
|
displayName: 'Ansatt',
|
|
120
120
|
},
|
|
121
121
|
go_type_displayName: 'undervisningsgruppe',
|
|
@@ -134,7 +134,7 @@ const feideUserLaerer: FeideUserApiType = {
|
|
|
134
134
|
parent: 'fc:org:spusers.feide.no:unit:NO856326501',
|
|
135
135
|
membership: {
|
|
136
136
|
basic: 'member',
|
|
137
|
-
affiliation: 'employee',
|
|
137
|
+
affiliation: ['employee'],
|
|
138
138
|
displayName: 'Ansatt',
|
|
139
139
|
},
|
|
140
140
|
go_type_displayName: 'undervisningsgruppe',
|
|
@@ -228,7 +228,7 @@ describe('parseUserObject', () => {
|
|
|
228
228
|
parent: 'fc:org:spusers.feide.no:unit:NO856326501',
|
|
229
229
|
membership: {
|
|
230
230
|
basic: 'member',
|
|
231
|
-
affiliation: 'employee',
|
|
231
|
+
affiliation: ['employee'],
|
|
232
232
|
displayName: 'Ansatt',
|
|
233
233
|
},
|
|
234
234
|
go_type_displayName: 'basisgruppe',
|
|
@@ -245,7 +245,7 @@ describe('parseUserObject', () => {
|
|
|
245
245
|
parent: 'fc:org:spusers.feide.no:unit:NO856326501',
|
|
246
246
|
membership: {
|
|
247
247
|
basic: 'member',
|
|
248
|
-
affiliation: 'employee',
|
|
248
|
+
affiliation: ['employee'],
|
|
249
249
|
displayName: 'Ansatt',
|
|
250
250
|
},
|
|
251
251
|
go_type_displayName: 'undervisningsgruppe',
|
|
@@ -264,7 +264,7 @@ describe('parseUserObject', () => {
|
|
|
264
264
|
parent: 'fc:org:spusers.feide.no:unit:NO856326501',
|
|
265
265
|
membership: {
|
|
266
266
|
basic: 'member',
|
|
267
|
-
affiliation: 'employee',
|
|
267
|
+
affiliation: ['employee'],
|
|
268
268
|
displayName: 'Ansatt',
|
|
269
269
|
},
|
|
270
270
|
go_type_displayName: 'undervisningsgruppe',
|
|
@@ -285,7 +285,7 @@ describe('parseUserObject', () => {
|
|
|
285
285
|
parent: 'fc:org:spusers.feide.no:unit:NO856326501',
|
|
286
286
|
membership: {
|
|
287
287
|
basic: 'member',
|
|
288
|
-
affiliation: 'employee',
|
|
288
|
+
affiliation: ['employee'],
|
|
289
289
|
displayName: 'Ansatt',
|
|
290
290
|
},
|
|
291
291
|
go_type_displayName: 'other groups',
|
|
@@ -300,7 +300,7 @@ describe('parseUserObject', () => {
|
|
|
300
300
|
parent: 'fc:org:spusers.feide.no:unit:NO856326501',
|
|
301
301
|
membership: {
|
|
302
302
|
basic: 'member',
|
|
303
|
-
affiliation: 'employee',
|
|
303
|
+
affiliation: ['employee'],
|
|
304
304
|
displayName: 'Ansatt',
|
|
305
305
|
},
|
|
306
306
|
go_type_displayName: 'other groups',
|
package/src/User/apiTypes.ts
CHANGED
|
@@ -13,11 +13,11 @@ type OrgType =
|
|
|
13
13
|
| 'upper_secondary'
|
|
14
14
|
| 'upper_secondary_owner';
|
|
15
15
|
|
|
16
|
-
type AffiliationType = 'member' | 'student' | 'faculty' | 'staff' | 'affiliate' | 'employee';
|
|
16
|
+
export type AffiliationType = 'member' | 'student' | 'faculty' | 'staff' | 'affiliate' | 'employee';
|
|
17
17
|
|
|
18
18
|
export interface FeideMembershipType {
|
|
19
19
|
basic: 'member' | 'admin' | 'owner'; // Basic membership role of user.
|
|
20
|
-
affiliation?: AffiliationType[]
|
|
20
|
+
affiliation?: AffiliationType[];
|
|
21
21
|
primarySchool?: boolean;
|
|
22
22
|
primaryAffiliation?: AffiliationType;
|
|
23
23
|
displayName?: string;
|
|
@@ -65,8 +65,8 @@ export type FeideGroup = FeideOrg | FeideGoGroup | FeideGrep;
|
|
|
65
65
|
export interface FeideUser {
|
|
66
66
|
cn: string[];
|
|
67
67
|
displayName: string;
|
|
68
|
-
eduPersonAffiliation: AffiliationType[]
|
|
69
|
-
eduPersonPrimaryAffiliation:
|
|
68
|
+
eduPersonAffiliation: AffiliationType[];
|
|
69
|
+
eduPersonPrimaryAffiliation: AffiliationType;
|
|
70
70
|
eduPersonPrincipalName: string;
|
|
71
71
|
givenName: string[];
|
|
72
72
|
mail?: string[];
|
package/src/User/index.ts
CHANGED
|
@@ -8,8 +8,16 @@
|
|
|
8
8
|
|
|
9
9
|
import AuthModal from './AuthModal';
|
|
10
10
|
import { UserInfo } from './UserInfo';
|
|
11
|
-
import type {
|
|
11
|
+
import type {
|
|
12
|
+
AffiliationType,
|
|
13
|
+
FeideGoGroup,
|
|
14
|
+
FeideGroup,
|
|
15
|
+
FeideOrg,
|
|
16
|
+
FeideUserApiType,
|
|
17
|
+
FeideMembershipType,
|
|
18
|
+
FeideUser,
|
|
19
|
+
} from './apiTypes';
|
|
12
20
|
|
|
13
21
|
export { UserInfo };
|
|
14
|
-
export type { FeideGoGroup, FeideGroup, FeideOrg, FeideUserApiType, FeideMembershipType, FeideUser };
|
|
22
|
+
export type { AffiliationType, FeideGoGroup, FeideGroup, FeideOrg, FeideUserApiType, FeideMembershipType, FeideUser };
|
|
15
23
|
export default AuthModal;
|
package/src/index.ts
CHANGED
|
@@ -121,7 +121,15 @@ export { default as MastheadSearchModal } from './Masthead/MastheadSearchModal';
|
|
|
121
121
|
export { default as MastheadAuthModal } from './Masthead/MastheadAuthModal';
|
|
122
122
|
export { UserInfo } from './User';
|
|
123
123
|
export { default as AuthModal } from './User';
|
|
124
|
-
export type {
|
|
124
|
+
export type {
|
|
125
|
+
AffiliationType,
|
|
126
|
+
FeideGoGroup,
|
|
127
|
+
FeideGroup,
|
|
128
|
+
FeideOrg,
|
|
129
|
+
FeideUserApiType,
|
|
130
|
+
FeideMembershipType,
|
|
131
|
+
FeideUser,
|
|
132
|
+
} from './User';
|
|
125
133
|
|
|
126
134
|
export { default as resourceTypeColor } from './utils/resourceTypeColor';
|
|
127
135
|
|