@cocreate/users 1.28.2 → 1.28.4
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/CHANGELOG.md +16 -0
- package/demo/signin.html +3 -3
- package/demo/signout.html +3 -3
- package/package.json +7 -7
- package/src/client.js +3 -3
- package/src/index.js +6 -6
- package/src/server.js +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [1.28.4](https://github.com/CoCreate-app/CoCreate-users/compare/v1.28.3...v1.28.4) (2023-11-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* favicon.ico path ([94b50f4](https://github.com/CoCreate-app/CoCreate-users/commit/94b50f44bd9fd678864142c0fb997eaacc8f6599))
|
|
7
|
+
* update dependencies to the lates versions ([8e7b78e](https://github.com/CoCreate-app/CoCreate-users/commit/8e7b78ec39e5175eed4305bcf0f00142f906c833))
|
|
8
|
+
* update method to use object.update etc ([3d8bc93](https://github.com/CoCreate-app/CoCreate-users/commit/3d8bc93190e8a3b97113a410f9b084b904f56072))
|
|
9
|
+
|
|
10
|
+
## [1.28.3](https://github.com/CoCreate-app/CoCreate-users/compare/v1.28.2...v1.28.3) (2023-10-25)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* bump dependencies ([32e622d](https://github.com/CoCreate-app/CoCreate-users/commit/32e622dd1f79dd4982e30600162a6063756f6519))
|
|
16
|
+
|
|
1
17
|
## [1.28.2](https://github.com/CoCreate-app/CoCreate-users/compare/v1.28.1...v1.28.2) (2023-10-24)
|
|
2
18
|
|
|
3
19
|
|
package/demo/signin.html
CHANGED
package/demo/signout.html
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/users",
|
|
3
|
-
"version": "1.28.
|
|
3
|
+
"version": "1.28.4",
|
|
4
4
|
"description": "A simple users component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"users",
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
"webpack-log": "^3.0.1"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@cocreate/actions": "^1.
|
|
62
|
-
"@cocreate/crud-client": "^1.28.
|
|
63
|
-
"@cocreate/element-prototype": "^1.11.
|
|
64
|
-
"@cocreate/elements": "^1.
|
|
65
|
-
"@cocreate/local-storage": "^1.10.
|
|
66
|
-
"@cocreate/render": "^1.
|
|
61
|
+
"@cocreate/actions": "^1.12.1",
|
|
62
|
+
"@cocreate/crud-client": "^1.28.12",
|
|
63
|
+
"@cocreate/element-prototype": "^1.11.8",
|
|
64
|
+
"@cocreate/elements": "^1.25.2",
|
|
65
|
+
"@cocreate/local-storage": "^1.10.8",
|
|
66
|
+
"@cocreate/render": "^1.29.1"
|
|
67
67
|
}
|
|
68
68
|
}
|
package/src/client.js
CHANGED
|
@@ -29,7 +29,7 @@ const CoCreateUser = {
|
|
|
29
29
|
|
|
30
30
|
let data = await Elements.save(action.form)
|
|
31
31
|
let user = data[0]
|
|
32
|
-
// data.method = 'create
|
|
32
|
+
// data.method = 'object.create'
|
|
33
33
|
// data['array'] = array
|
|
34
34
|
|
|
35
35
|
// data.organization_id = organization_id;
|
|
@@ -44,7 +44,7 @@ const CoCreateUser = {
|
|
|
44
44
|
// if (!socket[0] || !socket[0].connected || window && !window.navigator.onLine) {
|
|
45
45
|
let key = {
|
|
46
46
|
status: 'await',
|
|
47
|
-
method: 'create
|
|
47
|
+
method: 'object.create',
|
|
48
48
|
array: 'keys',
|
|
49
49
|
object: {
|
|
50
50
|
type: "user",
|
|
@@ -88,7 +88,7 @@ const CoCreateUser = {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
let request = {
|
|
91
|
-
method: 'read
|
|
91
|
+
method: 'object.read',
|
|
92
92
|
array: 'keys',
|
|
93
93
|
$filter: {
|
|
94
94
|
query
|
package/src/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
(function (root, factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd) {
|
|
3
|
-
define(["./client"], function(CoCreateUsers) {
|
|
4
|
-
|
|
3
|
+
define(["./client"], function (CoCreateUsers) {
|
|
4
|
+
return factory(CoCreateUsers)
|
|
5
5
|
});
|
|
6
6
|
} else if (typeof module === 'object' && module.exports) {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const CoCreateUsers = require("./server.js")
|
|
8
|
+
module.exports = factory(CoCreateUsers);
|
|
9
9
|
} else {
|
|
10
10
|
root.returnExports = factory(root["./client.js"]);
|
|
11
|
-
|
|
11
|
+
}
|
|
12
12
|
}(typeof self !== 'undefined' ? self : this, function (CoCreateUsers) {
|
|
13
|
-
|
|
13
|
+
return CoCreateUsers;
|
|
14
14
|
}));
|
package/src/server.js
CHANGED
|
@@ -16,13 +16,13 @@ class CoCreateUser {
|
|
|
16
16
|
async signUp(data) {
|
|
17
17
|
try {
|
|
18
18
|
if (data.user) {
|
|
19
|
-
data.user.method = 'create
|
|
19
|
+
data.user.method = 'object.create'
|
|
20
20
|
const response = await this.crud.send(data.user)
|
|
21
21
|
this.wsManager.send(response);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
if (data.userKey) {
|
|
25
|
-
data.userKey.method = 'create
|
|
25
|
+
data.userKey.method = 'object.create'
|
|
26
26
|
const response = await this.crud.send(data.userKey)
|
|
27
27
|
this.wsManager.send(response);
|
|
28
28
|
}
|
|
@@ -48,7 +48,7 @@ class CoCreateUser {
|
|
|
48
48
|
async signIn(data) {
|
|
49
49
|
const self = this;
|
|
50
50
|
try {
|
|
51
|
-
data.method = 'read
|
|
51
|
+
data.method = 'object.read'
|
|
52
52
|
let socket = data.socket
|
|
53
53
|
delete data.socket
|
|
54
54
|
|
|
@@ -105,7 +105,7 @@ class CoCreateUser {
|
|
|
105
105
|
userStatus: data.userStatus
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
data.method = 'update
|
|
108
|
+
data.method = 'object.update'
|
|
109
109
|
data = await this.crud.send(data)
|
|
110
110
|
|
|
111
111
|
if (data.socket)
|