@cocreate/api 1.7.1 → 1.7.3

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.7.3](https://github.com/CoCreate-app/CoCreate-api/compare/v1.7.2...v1.7.3) (2023-02-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * getValueFromObject ([d326bb6](https://github.com/CoCreate-app/CoCreate-api/commit/d326bb6baa49c170ac70a9b15b2d57a501aaf2cc))
7
+
8
+ ## [1.7.2](https://github.com/CoCreate-app/CoCreate-api/compare/v1.7.1...v1.7.2) (2023-02-12)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * import getAttributes from utils ([0782ede](https://github.com/CoCreate-app/CoCreate-api/commit/0782edef09f271b1beb3da859c8358240471e5b6))
14
+
1
15
  ## [1.7.1](https://github.com/CoCreate-app/CoCreate-api/compare/v1.7.0...v1.7.1) (2023-02-12)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/api",
3
- "version": "1.7.1",
3
+ "version": "1.7.3",
4
4
  "description": "A simple api helper component in vanilla javascript used by JavaScript developers to create thirdparty api intergrations. CoCreate-api includes the client component and server side for api processing. Thirdparty apis can be accessible using HTML5 attributes and/or JavaScript API. ",
5
5
  "keywords": [
6
6
  "thirdparty-api-intergration",
package/src/client.js CHANGED
@@ -1,9 +1,10 @@
1
1
  /*globals CustomEvent, config*/
2
- import { getValueFromObject, dotNotationToObject} from "@cocreate/utils";
2
+ import {getAttributes, getValueFromObject, dotNotationToObject} from "@cocreate/utils";
3
3
  import socket from "@cocreate/socket-client";
4
4
  import CoCreateAction from '@cocreate/actions';
5
5
  import CoCreateRender from '@cocreate/render';
6
6
  import '@cocreate/element-prototype';
7
+ import utils from "@cocreate/utils/src/utils";
7
8
 
8
9
  const CoCreateApi = {
9
10
  components: {},
@@ -115,12 +116,12 @@ const CoCreateApi = {
115
116
 
116
117
  for (let el of elements) {
117
118
  let name = el.getAttribute(attribute)
118
- const { isRead, isUpdate, isCrdt } = crud.getAttributes(el);
119
+ const { isRead, isUpdate, isCrdt } = getAttributes(el);
119
120
  if (!name || isRead == "false" || isUpdate == "false" || isCrdt == "true") continue;
120
121
 
121
122
  if (el.hasAttribute('actions')) continue;
122
123
 
123
- let value = getValueFromObject({[action]: data}, name);
124
+ let value = getValueFromObject({[action]: {[name]: data}}, name);
124
125
  el.setValue(value);
125
126
  }
126
127