@cocreate/users 1.13.2 → 1.14.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.14.1](https://github.com/CoCreate-app/CoCreate-users/compare/v1.14.0...v1.14.1) (2023-01-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * docs sanbox overflow ([8475ec8](https://github.com/CoCreate-app/CoCreate-users/commit/8475ec8592e426b5b7cf7cb2c03a5d907eecd4cd))
7
+
8
+ # [1.14.0](https://github.com/CoCreate-app/CoCreate-users/compare/v1.13.2...v1.14.0) (2022-12-31)
9
+
10
+
11
+ ### Features
12
+
13
+ * initSession function to sendMessage to server to get userStatus ([24a9493](https://github.com/CoCreate-app/CoCreate-users/commit/24a94937eb5323c0511d78277a23fa873f08d835))
14
+
1
15
  ## [1.13.2](https://github.com/CoCreate-app/CoCreate-users/compare/v1.13.1...v1.13.2) (2022-12-31)
2
16
 
3
17
 
package/docs/index.html CHANGED
@@ -96,14 +96,14 @@
96
96
  </div>
97
97
  <div class="position:sticky top:0 padding:15px_0px height:100vh">
98
98
  <!-- SandBox -->
99
- <div class="position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px" id="playground">
99
+ <div class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px" id="playground">
100
100
 
101
101
  <div id="demo-code" resizable class="position:relative height:50%">
102
102
  <textarea type="code" lang="html" collection="demos" document_id="" name="demo" save="false" id="demo" class="height:100% width:100% outline:none border:none resize:none padding:5px"></textarea>
103
103
  <div resize="bottom" class="background:lightgrey"></div>
104
104
  </div>
105
105
 
106
- <div id="demo-preview" class="position:relative display:flex height:100% background-color:white">
106
+ <div id="demo-preview" class="position:relative overflow:auto background-color:white">
107
107
  <div get-value="#demo" class="padding:20px"></div>
108
108
  </div>
109
109
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/users",
3
- "version": "1.13.2",
3
+ "version": "1.14.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",
@@ -60,10 +60,10 @@
60
60
  "webpack-log": "^3.0.1"
61
61
  },
62
62
  "dependencies": {
63
- "@cocreate/actions": "^1.5.47",
64
- "@cocreate/crud-client": "^1.17.8",
65
- "@cocreate/docs": "^1.5.1",
66
- "@cocreate/element-prototype": "^1.2.20",
67
- "@cocreate/render": "^1.17.13"
63
+ "@cocreate/actions": "^1.5.48",
64
+ "@cocreate/crud-client": "^1.17.9",
65
+ "@cocreate/docs": "^1.5.2",
66
+ "@cocreate/element-prototype": "^1.2.21",
67
+ "@cocreate/render": "^1.18.0"
68
68
  }
69
69
  }
package/src/client.js CHANGED
@@ -9,6 +9,7 @@ import './index.css';
9
9
  const CoCreateUser = {
10
10
  init: function() {
11
11
  this.initSocket();
12
+ this.initSession();
12
13
  this.initChangeOrg();
13
14
  },
14
15
 
@@ -240,6 +241,20 @@ const CoCreateUser = {
240
241
 
241
242
  },
242
243
 
244
+ initSession: () => {
245
+ let redirectTag = document.querySelector('[session]');
246
+
247
+ if (redirectTag) {
248
+ crud.socket.send('sendMessage', {
249
+ message: 'checkSession',
250
+ broadcast: false,
251
+ broadcastSender: false,
252
+ broadcastBrowser: false
253
+ });
254
+ }
255
+
256
+ },
257
+
243
258
  initChangeOrg: () => {
244
259
  const user_id = window.localStorage.getItem('user_id');
245
260