@amedia/user 0.14.102 → 0.14.103
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/dist/personas.js +12 -0
- package/dist/user.js +14 -6
- package/package.json +6 -6
package/dist/personas.js
CHANGED
|
@@ -9,6 +9,12 @@ export default {
|
|
|
9
9
|
isLoggedIn: false,
|
|
10
10
|
},
|
|
11
11
|
storage: {},
|
|
12
|
+
nonUserAccess: [
|
|
13
|
+
{
|
|
14
|
+
accessFeatures: ['newspaper'],
|
|
15
|
+
company: 'some_company',
|
|
16
|
+
},
|
|
17
|
+
],
|
|
12
18
|
},
|
|
13
19
|
},
|
|
14
20
|
donald: {
|
|
@@ -93,6 +99,12 @@ export default {
|
|
|
93
99
|
personalized_content_set: '2022-10-10T17:16:32.631+02:00',
|
|
94
100
|
},
|
|
95
101
|
},
|
|
102
|
+
nonUserAccess: [
|
|
103
|
+
{
|
|
104
|
+
accessFeatures: ['newspaper'],
|
|
105
|
+
company: 'some_company',
|
|
106
|
+
},
|
|
107
|
+
],
|
|
96
108
|
},
|
|
97
109
|
},
|
|
98
110
|
};
|
package/dist/user.js
CHANGED
|
@@ -45,9 +45,10 @@ function getMockData() {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
export class UserDataRequest {
|
|
48
|
-
constructor(attributes, namespaces) {
|
|
48
|
+
constructor(attributes, namespaces, nonUserAccess = false) {
|
|
49
49
|
this.attributes = attributes;
|
|
50
50
|
this.namespaces = namespaces;
|
|
51
|
+
this.nonUserAccess = nonUserAccess;
|
|
51
52
|
this.setupMockData();
|
|
52
53
|
}
|
|
53
54
|
|
|
@@ -58,15 +59,21 @@ export class UserDataRequest {
|
|
|
58
59
|
withAttributes(attributes) {
|
|
59
60
|
return new UserDataRequest(
|
|
60
61
|
[...(this.attributes || []), ...attributes],
|
|
61
|
-
this.namespaces
|
|
62
|
+
this.namespaces,
|
|
63
|
+
this.nonUserAccess
|
|
62
64
|
);
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
withStorage(namespaces) {
|
|
66
|
-
return new UserDataRequest(
|
|
67
|
-
|
|
68
|
-
...namespaces,
|
|
69
|
-
|
|
68
|
+
return new UserDataRequest(
|
|
69
|
+
this.attributes,
|
|
70
|
+
[...(this.namespaces || []), ...namespaces],
|
|
71
|
+
this.nonUserAccess
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
withNonUserAccess() {
|
|
76
|
+
return new UserDataRequest(this.attributes, this.namespaces, true);
|
|
70
77
|
}
|
|
71
78
|
|
|
72
79
|
subscribe(onData) {
|
|
@@ -91,6 +98,7 @@ export class UserDataRequest {
|
|
|
91
98
|
),
|
|
92
99
|
}),
|
|
93
100
|
state: this.mockData.state,
|
|
101
|
+
...(this.nonUserAccess && { nonUserAccess: this.mockData.nonUserAccess }),
|
|
94
102
|
});
|
|
95
103
|
}
|
|
96
104
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amedia/user",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.103",
|
|
4
4
|
"description": "Client lib for working with aID user and associated data",
|
|
5
5
|
"repository": "https://github.com/amedia/amedia-user-js",
|
|
6
6
|
"author": "Amedia Utvikling (ID og data)",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"@amedia/kragl": "^1.2.3",
|
|
53
53
|
"@changesets/changelog-github": "^0.4.8",
|
|
54
54
|
"@changesets/cli": "^2.26.0",
|
|
55
|
-
"@eik/esbuild-plugin": "^1.1.
|
|
56
|
-
"@types/jest": "^29.
|
|
55
|
+
"@eik/esbuild-plugin": "^1.1.32",
|
|
56
|
+
"@types/jest": "^29.5.0",
|
|
57
57
|
"@types/node": "^18.15.3",
|
|
58
58
|
"concurrently": "^7.6.0",
|
|
59
59
|
"cors": "^2.8.5",
|
|
60
|
-
"esbuild": "0.17.
|
|
60
|
+
"esbuild": "0.17.17",
|
|
61
61
|
"express": "^4.18.2",
|
|
62
62
|
"jest": "^29.5.0",
|
|
63
63
|
"jest-environment-jsdom": "^29.5.0",
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"mockdate": "^3.0.5",
|
|
67
67
|
"npm-run-all": "^4.1.5",
|
|
68
68
|
"prettier": "^2.8.4",
|
|
69
|
-
"rollup": "3.
|
|
70
|
-
"rollup-plugin-dts": "5.
|
|
69
|
+
"rollup": "3.20.6",
|
|
70
|
+
"rollup-plugin-dts": "5.3.0",
|
|
71
71
|
"ts-jest": "^29.0.5",
|
|
72
72
|
"tslib": "^2.5.0",
|
|
73
73
|
"typescript": "^4.9.5"
|