@cocreate/users 1.27.7 → 1.28.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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.28.1](https://github.com/CoCreate-app/CoCreate-users/compare/v1.28.0...v1.28.1) (2023-10-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * render data ([188ee15](https://github.com/CoCreate-app/CoCreate-users/commit/188ee15005ca619d89dfbb078b5a857c03c31393))
7
+
8
+ # [1.28.0](https://github.com/CoCreate-app/CoCreate-users/compare/v1.27.7...v1.28.0) (2023-10-22)
9
+
10
+
11
+ ### Features
12
+
13
+ * 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))
14
+
1
15
  ## [1.27.7](https://github.com/CoCreate-app/CoCreate-users/compare/v1.27.6...v1.27.7) (2023-10-20)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/users",
3
- "version": "1.27.7",
3
+ "version": "1.28.1",
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',
@@ -127,7 +127,7 @@ const CoCreateUser = {
127
127
  localStorage.setItem("host", Crud.socket.host);
128
128
  localStorage.setItem('user_id', user_id);
129
129
  localStorage.setItem("token", token);
130
- message = "Succesful signIn";
130
+ message = "Successful signIn";
131
131
  document.dispatchEvent(new CustomEvent('signIn', {
132
132
  detail: {}
133
133
  }));
@@ -135,8 +135,8 @@ 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
142
  status,
@@ -151,8 +151,8 @@ const CoCreateUser = {
151
151
  localStorage.removeItem("user_id");
152
152
  localStorage.removeItem("token");
153
153
 
154
- render({
155
- selector: "[template='signOut']",
154
+ render.render({
155
+ selector: "[template*='signOut']",
156
156
  data: {
157
157
  type: 'signOut',
158
158
  message: 'Succesfully logged out',