@cocreate/users 1.27.6 → 1.28.0

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 CHANGED
@@ -1,3 +1,19 @@
1
+ # [1.28.0](https://github.com/CoCreate-app/CoCreate-users/compare/v1.27.7...v1.28.0) (2023-10-22)
2
+
3
+
4
+ ### Features
5
+
6
+ * ObjectId() returns an object containg the parts iof the _id along with a toString() function ([2c28ca9](https://github.com/CoCreate-app/CoCreate-users/commit/2c28ca9ec2e48e91c127347052ac1b85f3c86e57))
7
+
8
+ ## [1.27.7](https://github.com/CoCreate-app/CoCreate-users/compare/v1.27.6...v1.27.7) (2023-10-20)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * removed console.log ([b0bbf02](https://github.com/CoCreate-app/CoCreate-users/commit/b0bbf024e88c08011388dc0e44d332ece9e9851a))
14
+ * removed console.log ([db03fb5](https://github.com/CoCreate-app/CoCreate-users/commit/db03fb5b8aa486582719f95e97a02b387ccbf530))
15
+ * removed dupilicate variable ([9015f6b](https://github.com/CoCreate-app/CoCreate-users/commit/9015f6bf8898a161daa18b342701e781b076be4b))
16
+
1
17
  ## [1.27.6](https://github.com/CoCreate-app/CoCreate-users/compare/v1.27.5...v1.27.6) (2023-10-19)
2
18
 
3
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/users",
3
- "version": "1.27.6",
3
+ "version": "1.28.0",
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",
package/src/client.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import Crud from '@cocreate/crud-client';
3
3
  import Actions from '@cocreate/actions';
4
4
  import Elements from '@cocreate/elements';
5
- import { render } from '@cocreate/render';
5
+ import render from '@cocreate/render';
6
6
  import '@cocreate/element-prototype';
7
7
  import './index.css';
8
8
 
@@ -35,7 +35,7 @@ const CoCreateUser = {
35
35
  // data.organization_id = organization_id;
36
36
 
37
37
  // if (!data.object[0]._id)
38
- // data.object[0]._id = Crud.ObjectId();
38
+ // data.object[0]._id = Crud.ObjectId().toString();
39
39
 
40
40
  // let user = await Crud.send(data)
41
41
  // Elements.setTypeValue(formEl, user)
@@ -60,8 +60,8 @@ const CoCreateUser = {
60
60
  if (response && response.object && response.object[0]) {
61
61
  // Crud.socket.send({ method: 'signUp', user, userKey })
62
62
 
63
- render({
64
- selector: "[template='signUp']",
63
+ render.render({
64
+ selector: "[template*='signUp']",
65
65
  data: {
66
66
  type: 'signUp',
67
67
  message: 'Succesfully Signed Up',
@@ -135,13 +135,15 @@ const CoCreateUser = {
135
135
  else
136
136
  message = "The email or password you entered is incorrect";
137
137
 
138
- render({
139
- selector: "[template='signIn']",
138
+ render.render({
139
+ selector: "[template*='signIn']",
140
140
  data: {
141
141
  type: 'signIn',
142
- status,
143
- message,
144
- success
142
+ signIn: {
143
+ status,
144
+ message,
145
+ success
146
+ }
145
147
  }
146
148
  });
147
149
  },
@@ -151,8 +153,8 @@ const CoCreateUser = {
151
153
  localStorage.removeItem("user_id");
152
154
  localStorage.removeItem("token");
153
155
 
154
- render({
155
- selector: "[template='signOut']",
156
+ render.render({
157
+ selector: "[template*='signOut']",
156
158
  data: {
157
159
  type: 'signOut',
158
160
  message: 'Succesfully logged out',
package/src/server.js CHANGED
@@ -74,7 +74,6 @@ class CoCreateUser {
74
74
  response.userStatus = 'on'
75
75
  response.user_id = user_id
76
76
  response.token = token
77
- response.userStatus = 'on'
78
77
  }
79
78
  }
80
79
  self.wsManager.send(response)