@cocreate/unique 1.4.5 → 1.5.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,17 @@
1
+ # [1.5.0](https://github.com/CoCreate-app/CoCreate-unique/compare/v1.4.6...v1.5.0) (2022-09-28)
2
+
3
+
4
+ ### Features
5
+
6
+ * config is accessible from socket.config ([e473477](https://github.com/CoCreate-app/CoCreate-unique/commit/e4734771a22ad502bf2c3c0e09dfd39bf4544d1b))
7
+
8
+ ## [1.4.6](https://github.com/CoCreate-app/CoCreate-unique/compare/v1.4.5...v1.4.6) (2022-09-01)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * bump all of [@cocreate](https://github.com/cocreate) dependencies ([5ad562d](https://github.com/CoCreate-app/CoCreate-unique/commit/5ad562de44aad790f5ad6ac6b173c2528af9ce4a))
14
+
1
15
  ## [1.4.5](https://github.com/CoCreate-app/CoCreate-unique/compare/v1.4.4...v1.4.5) (2022-08-31)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/unique",
3
- "version": "1.4.5",
3
+ "version": "1.5.0",
4
4
  "description": "A simple unique component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "unique",
@@ -61,8 +61,8 @@
61
61
  "webpack-log": "^3.0.1"
62
62
  },
63
63
  "dependencies": {
64
- "@cocreate/crud-client": "^1.7.1",
65
- "@cocreate/docs": "^1.3.3",
66
- "@cocreate/uuid": "^1.2.4"
64
+ "@cocreate/crud-client": "^1.10.0",
65
+ "@cocreate/docs": "^1.3.5",
66
+ "@cocreate/uuid": "^1.2.5"
67
67
  }
68
68
  }
package/src/client.js CHANGED
@@ -50,8 +50,6 @@ const CoCreateUnique = {
50
50
  input.addEventListener('input', function(e) {
51
51
  let request_data = {};
52
52
  let value = input.getValue();
53
- request_data['organization_id'] = window.config.organization_id;
54
- request_data['apiKey'] = window.config.apiKey;
55
53
  request_data['collection'] = input.getAttribute('collection');
56
54
  request_data['name'] = input.getAttribute('name');
57
55
  request_data['value'] = value || e.target.value;
package/src/server.js CHANGED
@@ -8,12 +8,12 @@ class CoCreateUnique {
8
8
  init() {
9
9
  if (this.wsManager) {
10
10
  this.wsManager.on('checkUnique',
11
- (socket, data, socketInfo) => this.checkUnique(socket, data, socketInfo));
11
+ (socket, data) => this.checkUnique(socket, data));
12
12
  }
13
13
  }
14
14
 
15
15
 
16
- async checkUnique(socket, req_data, socketInfo) {
16
+ async checkUnique(socket, req_data) {
17
17
  const self = this
18
18
  const db = this.dbClient.db(req_data['organization_id']);
19
19
  const collection = db.collection(req_data["collection"]);
@@ -32,7 +32,7 @@ class CoCreateUnique {
32
32
  if (result.length) {
33
33
  response.unique = false;
34
34
  }
35
- self.wsManager.send(socket, 'checkedUnique', response, socketInfo);
35
+ self.wsManager.send(socket, 'checkedUnique', response);
36
36
  }
37
37
  });
38
38
  } catch (error) {